@telia-ace/widget-types-grid 1.0.30-experimental.2 → 1.0.30-experimental.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,62 +1,82 @@
1
- var we = Object.defineProperty, ve = Object.defineProperties;
2
- var Ee = Object.getOwnPropertyDescriptors;
3
- var W = Object.getOwnPropertySymbols;
4
- var oe = Object.prototype.hasOwnProperty, re = Object.prototype.propertyIsEnumerable;
5
- var ie = (t, e, n) => e in t ? we(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, p = (t, e) => {
6
- for (var n in e || (e = {}))
7
- oe.call(e, n) && ie(t, n, e[n]);
8
- if (W)
9
- for (var n of W(e))
10
- re.call(e, n) && ie(t, n, e[n]);
11
- return t;
12
- }, C = (t, e) => ve(t, Ee(e));
13
- var N = (t, e) => {
1
+ var St = Object.defineProperty, At = Object.defineProperties;
2
+ var Dt = Object.getOwnPropertyDescriptors;
3
+ var H = Object.getOwnPropertySymbols;
4
+ var lt = Object.prototype.hasOwnProperty, ut = Object.prototype.propertyIsEnumerable;
5
+ var ct = (e, t, n) => t in e ? St(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, f = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ lt.call(t, n) && ct(e, n, t[n]);
8
+ if (H)
9
+ for (var n of H(t))
10
+ ut.call(t, n) && ct(e, n, t[n]);
11
+ return e;
12
+ }, C = (e, t) => At(e, Dt(t));
13
+ var M = (e, t) => {
14
14
  var n = {};
15
- for (var s in t)
16
- oe.call(t, s) && e.indexOf(s) < 0 && (n[s] = t[s]);
17
- if (t != null && W)
18
- for (var s of W(t))
19
- e.indexOf(s) < 0 && re.call(t, s) && (n[s] = t[s]);
15
+ for (var s in e)
16
+ lt.call(e, s) && t.indexOf(s) < 0 && (n[s] = e[s]);
17
+ if (e != null && H)
18
+ for (var s of H(e))
19
+ t.indexOf(s) < 0 && ut.call(e, s) && (n[s] = e[s]);
20
20
  return n;
21
21
  };
22
- import { Grid as ue, useRouteData as Ce, useRouter as Oe, useProperties as de, useContext as X, useContainer as T, useComponentNode as ee, useScroll as he, transitionComposer as Se, paddedBorderTabStyle as Ae, useComponent as De, useComponentDescriptor as xe, filterCssPropsStyle as Me, Typography as Ne, useComponentPlatform as me, useIsMounted as $e, useColumns as Le, useLayout as ke, ComponentNodeContext as Pe, ComponentPropertyContext as Re, filterCssProps as Ve } from "@telia-ace/widget-ui";
23
- import h, { useState as z, forwardRef as pe, useMemo as _e, Suspense as Ie, useEffect as B } from "react";
24
- import { css as fe, ThemeProvider as ze, useTheme as Be } from "@emotion/react";
25
- import { asDescriptor as ae, ComponentPlatform as Te, createComponentModel as je, ComponentQuery as Ge, WidgetRenderState as O } from "@telia-ace/widget-core";
26
- import P from "@emotion/styled";
27
- import { appendClassNames as K, notifyDataLoaded as We, lock as q, removeNullAndUndefinedValues as ce, uuid as Fe } from "@telia-ace/widget-utilities";
28
- import { TransitionGroup as He, Transition as Ke } from "react-transition-group";
29
- import { Switch as Ue, Route as Q } from "react-router";
30
- import { onWidgetUrl as Ye } from "@telia-ace/widget-routing";
31
- import { readStorage as $, StorageMedium as v, createStorageWriter as V, StorageCategory as _, StorageScope as qe } from "@telia-ace/widget-services";
32
- import { supportBootstrapping as Qe } from "@webprovisions/bootstrapping";
33
- import { WidgetState as Ze, WidgetType as Je } from "@webprovisions/platform";
34
- var J = /* @__PURE__ */ ((t) => (t.back = "back", t.forth = "forth", t))(J || {});
35
- const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[t] > n[e] ? "back" : "forth", et = ({ views: t, location: e, render: n }) => /* @__PURE__ */ h.createElement(
36
- Ue,
22
+ var dt = (e, t, n) => new Promise((s, o) => {
23
+ var i = (a) => {
24
+ try {
25
+ c(n.next(a));
26
+ } catch (l) {
27
+ o(l);
28
+ }
29
+ }, r = (a) => {
30
+ try {
31
+ c(n.throw(a));
32
+ } catch (l) {
33
+ o(l);
34
+ }
35
+ }, c = (a) => a.done ? s(a.value) : Promise.resolve(a.value).then(i, r);
36
+ c((n = n.apply(e, t)).next());
37
+ });
38
+ import { Grid as ft, useRouteData as Mt, useRouter as Nt, useProperties as gt, useContext as st, useContainer as W, useComponentNode as ot, useScroll as yt, transitionComposer as Pt, paddedBorderTabStyle as Lt, useComponent as _t, useComponentDescriptor as kt, filterCssPropsStyle as Rt, Typography as Vt, useComponentPlatform as bt, useIsMounted as It, useColumns as Tt, useLayout as zt, ComponentNodeContext as Bt, ComponentPropertyContext as jt, filterCssProps as Wt } from "@telia-ace/widget-ui";
39
+ import m, { useState as B, forwardRef as wt, useMemo as Ft, Suspense as Gt, useEffect as j } from "react";
40
+ import { css as vt, ThemeProvider as Ht, useTheme as qt } from "@emotion/react";
41
+ import { asDescriptor as U, ComponentPlatform as Et, createComponentModel as Kt, ComponentQuery as Ut, WidgetRenderState as O } from "@telia-ace/widget-core";
42
+ import k from "@emotion/styled";
43
+ import { appendClassNames as Y, notifyDataLoaded as Yt, lock as X, removeNullAndUndefinedValues as ht, uuid as Qt } from "@telia-ace/widget-utilities";
44
+ import { TransitionGroup as Zt, Transition as Jt } from "react-transition-group";
45
+ import { Switch as Xt, Route as tt } from "react-router";
46
+ import { spread as te } from "@open-wc/lit-helpers";
47
+ import { nothing as ee, css as ne, LitElement as se } from "lit";
48
+ import { property as Ct, state as Q } from "lit/decorators.js";
49
+ import { html as oe, unsafeStatic as ie } from "lit/static-html.js";
50
+ import { onWidgetUrl as re } from "@telia-ace/widget-routing";
51
+ import { readStorage as N, StorageMedium as v, createStorageWriter as V, StorageCategory as I, StorageScope as ae } from "@telia-ace/widget-services";
52
+ import { supportBootstrapping as ce } from "@webprovisions/bootstrapping";
53
+ import { WidgetState as le, WidgetType as ue } from "@webprovisions/platform";
54
+ var nt = /* @__PURE__ */ ((e) => (e.back = "back", e.forth = "forth", e))(nt || {});
55
+ const de = (e, t, n) => typeof n[e] == "number" && typeof n[t] == "number" && n[e] > n[t] ? "back" : "forth", he = ({ views: e, location: t, render: n }) => /* @__PURE__ */ m.createElement(
56
+ Xt,
37
57
  {
38
- location: e && C(p({}, e), {
39
- pathname: e.pathname.split("?")[0]
58
+ location: t && C(f({}, t), {
59
+ pathname: t.pathname.split("?")[0]
40
60
  })
41
61
  },
42
62
  [
43
- ...Object.keys(t).filter((s) => !!t[s].path),
44
- ...Object.keys(t).filter((s) => !t[s].path)
63
+ ...Object.keys(e).filter((s) => !!e[s].path),
64
+ ...Object.keys(e).filter((s) => !e[s].path)
45
65
  ].map((s) => {
46
- const { path: i } = t[s];
47
- return i ? Array.isArray(i) ? i.map((o) => /* @__PURE__ */ h.createElement(Q, { key: s, exact: !0, path: o, render: () => n(s) })) : /* @__PURE__ */ h.createElement(Q, { key: s, exact: !0, path: i, render: () => n(s) }) : /* @__PURE__ */ h.createElement(Q, { key: s, render: () => n(s) });
66
+ const { path: o } = e[s];
67
+ return o ? Array.isArray(o) ? o.map((i) => /* @__PURE__ */ m.createElement(tt, { key: s, exact: !0, path: i, render: () => n(s) })) : /* @__PURE__ */ m.createElement(tt, { key: s, exact: !0, path: o, render: () => n(s) }) : /* @__PURE__ */ m.createElement(tt, { key: s, render: () => n(s) });
48
68
  })
49
- ), ge = et, tt = P.div`
69
+ ), Ot = he, pe = k.div`
50
70
  position: relative;
51
71
  width: 100%;
52
72
  flex: 1;
53
- `, nt = P(ue)`
73
+ `, me = k(ft)`
54
74
  position: absolute;
55
75
  left: 0;
56
76
  right: 0;
57
- ${(t) => !!t.animationCss && t.animationCss}
58
- ${(t) => !!t.scrollableCss && t.scrollableCss}
59
- `, st = {
77
+ ${(e) => !!e.animationCss && e.animationCss}
78
+ ${(e) => !!e.scrollableCss && e.scrollableCss}
79
+ `, fe = {
60
80
  index: 1,
61
81
  search: 2,
62
82
  browse: 3,
@@ -64,94 +84,94 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
64
84
  contact: 5,
65
85
  "contact-method": 6,
66
86
  conversation: 7
67
- }, it = (n) => {
68
- var s = n, { className: t = "" } = s, e = N(s, ["className"]);
69
- const [i, o] = z("index"), [r, c] = z(J.forth), a = Ce(), u = Oe(), d = de(), l = X(), f = T(), m = ee(), { gap: g = "0" } = l, G = d, { columns: b = 1, animation: y = "none", scrollable: E = !1 } = G, A = N(G, ["columns", "animation", "scrollable"]), [j, L] = he(E);
70
- if (!m || !u)
87
+ }, ge = (n) => {
88
+ var s = n, { className: e = "" } = s, t = M(s, ["className"]);
89
+ const [o, i] = B("index"), [r, c] = B(nt.forth), a = Mt(), l = Nt(), d = gt(), u = st(), p = W(), h = ot(), { gap: g = "0" } = u, G = d, { columns: b = 1, animation: y = "none", scrollable: E = !1 } = G, $ = M(G, ["columns", "animation", "scrollable"]), [F, L] = yt(E);
90
+ if (!h || !l)
71
91
  return null;
72
- const { location: se } = u;
73
- a.name !== i && a.name !== "" && y && (c(Xe(i, a.name, st)), o(a.name));
74
- const { views: D } = f.get("$settings");
75
- if (!Object.keys(D).length)
92
+ const { location: at } = l;
93
+ a.name !== o && a.name !== "" && y && (c(de(o, a.name, fe)), i(a.name));
94
+ const { views: S } = p.get("$settings");
95
+ if (!Object.keys(S).length)
76
96
  return null;
77
- const x = (w, M, R) => {
78
- const S = Y(M, R), I = m.getChildren(w)[0];
79
- return /* @__PURE__ */ h.createElement(
80
- nt,
81
- C(p(C(p(p({}, e), A), {
82
- scrollableCss: j,
97
+ const A = (w, D, R) => {
98
+ const x = J(D, R), z = h.getChildren(w)[0];
99
+ return /* @__PURE__ */ m.createElement(
100
+ me,
101
+ C(f(C(f(f({}, t), $), {
102
+ scrollableCss: F,
83
103
  ref: L,
84
104
  columns: b,
85
105
  gap: g
86
- }), S), {
87
- className: K(t, "humany-view")
106
+ }), x), {
107
+ className: Y(e, "humany-view")
88
108
  }),
89
- /* @__PURE__ */ h.createElement(te, { id: I.id, branch: "default" })
109
+ /* @__PURE__ */ m.createElement(it, { id: z.id, branch: "default" })
90
110
  );
91
- }, Y = (w, M) => {
111
+ }, J = (w, D) => {
92
112
  if (y === "slide" || y === "fade")
93
113
  return {
94
- animationCss: Se.composeViewTransition(
114
+ animationCss: Pt.composeViewTransition(
95
115
  w,
96
116
  y,
97
- M
117
+ D
98
118
  ),
99
119
  ["data-state"]: w
100
120
  };
101
121
  };
102
- return /* @__PURE__ */ h.createElement(tt, { className: "humany-animated-view" }, /* @__PURE__ */ h.createElement(
103
- He,
122
+ return /* @__PURE__ */ m.createElement(pe, { className: "humany-animated-view" }, /* @__PURE__ */ m.createElement(
123
+ Zt,
104
124
  {
105
125
  component: null,
106
- childFactory: (w) => h.cloneElement(w, { direction: r })
126
+ childFactory: (w) => m.cloneElement(w, { direction: r })
107
127
  },
108
- /* @__PURE__ */ h.createElement(
109
- Ke,
128
+ /* @__PURE__ */ m.createElement(
129
+ Jt,
110
130
  {
111
- key: i,
131
+ key: o,
112
132
  timeout: { enter: 500, exit: 500 },
113
133
  onEnter: (w) => w == null ? void 0 : w.clientHeight,
114
134
  unmountOnExit: !0,
115
- direction: J.forth
135
+ direction: nt.forth
116
136
  },
117
- (w, { direction: M }) => /* @__PURE__ */ h.createElement(
118
- ge,
137
+ (w, { direction: D }) => /* @__PURE__ */ m.createElement(
138
+ Ot,
119
139
  {
120
- views: D,
121
- location: se,
122
- render: (R) => x(R, w, M)
140
+ views: S,
141
+ location: at,
142
+ render: (R) => A(R, w, D)
123
143
  }
124
144
  )
125
145
  )
126
146
  ));
127
- }, ot = it, rt = P(ue)`
128
- ${(t) => !!t.scrollableCss && t.scrollableCss}
129
- `, at = (n) => {
130
- var s = n, { className: t = "" } = s, e = N(s, ["className"]);
131
- const i = de(), o = X(), r = T(), c = ee(), { views: a } = r.get("$settings"), { gap: u = "0" } = o, y = i, { columns: d = 1, animation: l = "none", scrollable: f = !1 } = y, m = N(y, ["columns", "animation", "scrollable"]), [g, b] = he(f);
132
- return c ? /* @__PURE__ */ h.createElement(
133
- rt,
134
- C(p(p({}, e), m), {
147
+ }, ye = ge, be = k(ft)`
148
+ ${(e) => !!e.scrollableCss && e.scrollableCss}
149
+ `, we = (n) => {
150
+ var s = n, { className: e = "" } = s, t = M(s, ["className"]);
151
+ const o = gt(), i = st(), r = W(), c = ot(), { views: a } = r.get("$settings"), { gap: l = "0" } = i, y = o, { columns: d = 1, animation: u = "none", scrollable: p = !1 } = y, h = M(y, ["columns", "animation", "scrollable"]), [g, b] = yt(p);
152
+ return c ? /* @__PURE__ */ m.createElement(
153
+ be,
154
+ C(f(f({}, t), h), {
135
155
  scrollableCss: g,
136
156
  ref: b,
137
157
  columns: d,
138
- gap: u,
139
- className: K(t, "humany-view")
158
+ gap: l,
159
+ className: Y(e, "humany-view")
140
160
  }),
141
- /* @__PURE__ */ h.createElement(
142
- ge,
161
+ /* @__PURE__ */ m.createElement(
162
+ Ot,
143
163
  {
144
164
  views: a,
145
165
  render: (E) => {
146
- const A = c.getChildren(E)[0];
147
- return /* @__PURE__ */ h.createElement(te, { id: A.id, node: A, branch: "default" });
166
+ const $ = c.getChildren(E)[0];
167
+ return /* @__PURE__ */ m.createElement(it, { id: $.id, node: $, branch: "default" });
148
168
  }
149
169
  }
150
170
  )
151
171
  ) : null;
152
- }, ct = at, U = (t) => {
153
- var e, n;
154
- return fe`
172
+ }, ve = we, Z = (e) => {
173
+ var t, n;
174
+ return vt`
155
175
  outline: none;
156
176
  box-sizing: border-box;
157
177
  * {
@@ -159,212 +179,386 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
159
179
  outline: none;
160
180
  }
161
181
 
162
- grid-column: ${t["data-indent"] ? `${t["data-indent"] + 1} / ${t["data-indent"] + (t["data-width"] || 0) + 1}` : `span ${t["data-width"]}`};
182
+ grid-column: ${e["data-indent"] ? `${e["data-indent"] + 1} / ${e["data-indent"] + (e["data-width"] || 0) + 1}` : `span ${e["data-width"]}`};
163
183
 
164
- ${((e = t.theme.fonts) == null ? void 0 : e.type) && `
165
- font-family: ${t.theme.fonts.type};
184
+ ${((t = e.theme.fonts) == null ? void 0 : t.type) && `
185
+ font-family: ${e.theme.fonts.type};
166
186
 
167
187
  input, textarea {
168
- font-family: ${t.theme.fonts.type};
188
+ font-family: ${e.theme.fonts.type};
169
189
  }
170
190
  `}
171
191
 
172
- ${((n = t.theme.fonts) == null ? void 0 : n.base) && `
173
- font-size: ${t.theme.fonts.base};
192
+ ${((n = e.theme.fonts) == null ? void 0 : n.base) && `
193
+ font-size: ${e.theme.fonts.base};
174
194
  `}
175
195
 
176
196
  &:focus-visible {
177
- ${Ae(t)};
197
+ ${Lt(e)};
178
198
  }
179
199
  `;
180
- }, lt = P(ct)`
181
- ${(t) => U(t)}
182
- `, ut = P(ot)`
183
- ${(t) => U(t)}
184
- `, dt = P.div`
200
+ }, Ee = k(ve)`
201
+ ${(e) => Z(e)}
202
+ `, Ce = k(ye)`
203
+ ${(e) => Z(e)}
204
+ `, Oe = k.div`
185
205
  text-align: center;
186
- ${(t) => {
187
- var e, n, s;
188
- return typeof ((e = t.theme.colors) == null ? void 0 : e.warning) != "undefined" && fe`
189
- color: ${(n = t.theme.colors) == null ? void 0 : n.warning};
190
- border: 2px dashed ${(s = t.theme.colors) == null ? void 0 : s.warning};
206
+ ${(e) => {
207
+ var t, n, s;
208
+ return typeof ((t = e.theme.colors) == null ? void 0 : t.warning) != "undefined" && vt`
209
+ color: ${(n = e.theme.colors) == null ? void 0 : n.warning};
210
+ border: 2px dashed ${(s = e.theme.colors) == null ? void 0 : s.warning};
191
211
  `;
192
212
  }}
193
- ${(t) => typeof t.theme.borderRadius != "undefined" && `border-radius: ${t.theme.borderRadius};`}
194
- ${(t) => U(t)}
195
- `, ht = pe(
196
- (i, s) => {
197
- var o = i, { className: t = "", children: e } = o, n = N(o, ["className", "children"]);
198
- const r = De(), { name: c, type: a, id: u } = xe(), d = _e(() => r ? P(r)`
199
- ${U}
200
- ${Me}
213
+ ${(e) => typeof e.theme.borderRadius != "undefined" && `border-radius: ${e.theme.borderRadius};`}
214
+ ${(e) => Z(e)}
215
+ `, xe = wt(
216
+ (o, s) => {
217
+ var i = o, { className: e = "", children: t } = i, n = M(i, ["className", "children"]);
218
+ const r = _t(), { name: c, type: a, id: l } = kt(), d = Ft(() => r ? k(r)`
219
+ ${Z}
220
+ ${Rt}
201
221
  ` : null, [r]);
202
- return typeof r == "undefined" ? null : r === null || d === null ? process.env.NODE_ENV !== "production" ? /* @__PURE__ */ h.createElement(
203
- dt,
204
- C(p({}, n), {
205
- title: `type: ${a}, definition-id: ${c}, instance-id: ${u}`,
206
- className: K(t, "humany-non-resolved-component")
222
+ return typeof r == "undefined" ? null : r === null || d === null ? process.env.NODE_ENV !== "production" ? /* @__PURE__ */ m.createElement(
223
+ Oe,
224
+ C(f({}, n), {
225
+ title: `type: ${a}, definition-id: ${c}, instance-id: ${l}`,
226
+ className: Y(e, "humany-non-resolved-component")
207
227
  }),
208
- /* @__PURE__ */ h.createElement(Ne, { variant: "h5" }, "Non Resolved Component Type")
209
- ) : null : /* @__PURE__ */ h.createElement(Ie, { fallback: null }, /* @__PURE__ */ h.createElement(
228
+ /* @__PURE__ */ m.createElement(Vt, { variant: "h5" }, "Non Resolved Component Type")
229
+ ) : null : /* @__PURE__ */ m.createElement(Gt, { fallback: null }, /* @__PURE__ */ m.createElement(
210
230
  d,
211
- C(p({
231
+ C(f({
212
232
  ref: s
213
233
  }, n), {
214
- className: K(
215
- t,
234
+ className: Y(
235
+ e,
216
236
  "humany-component",
217
237
  `humany-component-${c}`
218
238
  )
219
239
  }),
220
- e
240
+ t
221
241
  ));
222
242
  }
223
- ), mt = ht, pt = (t) => {
224
- const e = ee(t), n = me(), [s, i] = z({}), o = $e();
225
- return B(() => {
226
- e && o.current && i(e.attributes.properties);
227
- }, [e, t, o]), B(() => {
243
+ ), $e = xe, Se = (e) => {
244
+ const t = ot(e), n = bt(), [s, o] = B({}), i = It();
245
+ return j(() => {
246
+ t && i.current && o(t.attributes.properties);
247
+ }, [t, e, i]), j(() => {
228
248
  if (n) {
229
249
  const r = n.events.subscribe(
230
250
  "components:properties-changed",
231
251
  (c, a) => {
232
- e === a.node && o.current && i(a.node.attributes.properties);
252
+ t === a.node && i.current && o(a.node.attributes.properties);
233
253
  }
234
254
  );
235
255
  return () => {
236
256
  r();
237
257
  };
238
258
  }
239
- }, [n, o, t, e]), s;
240
- }, ft = (t, e) => e ? !0 : typeof t == "string" ? t === "full" : t > 0, gt = pe(
241
- (u, a) => {
242
- var d = u, { className: t = "", id: e, branch: n, node: s, ariaLabel: i, tabIndex: o, context: r } = d, c = N(d, ["className", "id", "branch", "node", "ariaLabel", "tabIndex", "context"]);
243
- const l = me(), f = T(), [m, g] = z(), b = Le(), y = X(e), E = pt(e), { size: A = "none", indent: j = 0 } = ke(e), L = ft(A, s);
244
- if (B(() => {
245
- if (l) {
246
- if (e && !s) {
247
- const S = l.nodes.get(e);
248
- if (S && (g(ae(S, n)), L)) {
249
- const I = S.mount(f);
259
+ }, [n, i, e, t]), s;
260
+ }, Ae = (e, t) => t ? !0 : typeof e == "string" ? e === "full" : e > 0, De = wt(
261
+ (l, a) => {
262
+ var d = l, { className: e = "", id: t, branch: n, node: s, ariaLabel: o, tabIndex: i, context: r } = d, c = M(d, ["className", "id", "branch", "node", "ariaLabel", "tabIndex", "context"]);
263
+ const u = bt(), p = W(), [h, g] = B(), b = Tt(), y = st(t), E = Se(t), { size: $ = "none", indent: F = 0 } = zt(t), L = Ae($, s);
264
+ if (j(() => {
265
+ if (u) {
266
+ if (t && !s) {
267
+ const x = u.nodes.get(t);
268
+ if (x && (g(U(x, n)), L)) {
269
+ const z = x.mount(p);
250
270
  return () => {
251
- I();
271
+ z();
252
272
  };
253
273
  }
254
274
  } else if (s) {
255
- g(ae(s, n));
256
- const S = s.mount(f);
275
+ g(U(s, n));
276
+ const x = s.mount(p);
257
277
  return () => {
258
- S();
278
+ x();
259
279
  };
260
280
  }
261
281
  }
262
- }, [l, e, s, L]), !m || !L)
282
+ }, [u, t, s, L]), !h || !L)
263
283
  return null;
264
- const R = p(p({}, y), r || {}), {
265
- cardinal: D,
266
- fonts: x = {},
267
- accessibility: Y = {}
268
- } = R, G = N(R, [
284
+ const R = f(f({}, y), r || {}), {
285
+ cardinal: S,
286
+ fonts: A = {},
287
+ accessibility: J = {}
288
+ } = R, G = M(R, [
269
289
  "cardinal",
270
290
  "fonts",
271
291
  "accessibility"
272
292
  ]), w = {
273
- type: x.type,
274
- base: x.base || "16px",
275
- small: x.small || "0.8em",
276
- normal: x.normal || "1em",
277
- medium: x.medium || "1.2em",
278
- large: x.large || "1.6em",
279
- huge: x.huge || "2.5em"
280
- }, M = C(p({}, G), {
293
+ type: A.type,
294
+ base: A.base || "16px",
295
+ small: A.small || "0.8em",
296
+ normal: A.normal || "1em",
297
+ medium: A.medium || "1.2em",
298
+ large: A.large || "1.6em",
299
+ huge: A.huge || "2.5em"
300
+ }, D = C(f({}, G), {
281
301
  fonts: w,
282
- accessibility: p({}, Y)
302
+ accessibility: f({}, J)
283
303
  });
284
- return typeof D == "number" && (M.sizes = {
285
- cardinal: D,
286
- small: `${D}px`,
287
- normal: `${D * 3}px`,
288
- medium: `${D * 5}px`,
289
- large: `${D * 8}px`
290
- }), /* @__PURE__ */ h.createElement(ze, { theme: M }, /* @__PURE__ */ h.createElement(Pe.Provider, { value: m }, /* @__PURE__ */ h.createElement(Re.Provider, { value: E }, (() => {
291
- const S = p({
292
- "data-width": A === "full" ? b : Math.min(A, b),
293
- "data-indent": j,
294
- "data-name": m.name,
295
- "data-node-id": m.id,
296
- "data-component-type": m.type,
297
- "aria-label": i,
298
- tabIndex: o,
299
- id: m.id,
304
+ return typeof S == "number" && (D.sizes = {
305
+ cardinal: S,
306
+ small: `${S}px`,
307
+ normal: `${S * 3}px`,
308
+ medium: `${S * 5}px`,
309
+ large: `${S * 8}px`
310
+ }), /* @__PURE__ */ m.createElement(Ht, { theme: D }, /* @__PURE__ */ m.createElement(Bt.Provider, { value: h }, /* @__PURE__ */ m.createElement(jt.Provider, { value: E }, (() => {
311
+ const x = f({
312
+ "data-width": $ === "full" ? b : Math.min($, b),
313
+ "data-indent": F,
314
+ "data-name": h.name,
315
+ "data-node-id": h.id,
316
+ "data-component-type": h.type,
317
+ "aria-label": o,
318
+ tabIndex: i,
319
+ id: h.id,
300
320
  role: E && E.role
301
321
  }, c);
302
- switch (m.type) {
322
+ switch (h.type) {
303
323
  case "view":
304
- return typeof E.animation == "string" && E.animation !== "none" ? /* @__PURE__ */ h.createElement(ut, C(p({}, S), { className: t })) : /* @__PURE__ */ h.createElement(lt, C(p({}, S), { className: t }));
324
+ return typeof E.animation == "string" && E.animation !== "none" ? /* @__PURE__ */ m.createElement(Ce, C(f({}, x), { className: e })) : /* @__PURE__ */ m.createElement(Ee, C(f({}, x), { className: e }));
305
325
  default: {
306
- const I = Ve(E);
307
- return /* @__PURE__ */ h.createElement(
308
- mt,
309
- C(p(p({
326
+ const z = Wt(E);
327
+ return /* @__PURE__ */ m.createElement(
328
+ $e,
329
+ C(f(f({
310
330
  ref: a
311
- }, S), I), {
312
- className: t
331
+ }, x), z), {
332
+ className: e
313
333
  })
314
334
  );
315
335
  }
316
336
  }
317
337
  })())));
318
338
  }
319
- ), te = gt, yt = ({ builder: t }) => {
320
- const e = T(), [n, s] = z(null);
321
- return B(() => {
322
- e.getAsync("components").then((i) => t(i).then((o) => {
323
- s(o);
339
+ ), it = De, Me = ({ builder: e }) => {
340
+ const t = W(), [n, s] = B(null);
341
+ return j(() => {
342
+ t.getAsync("components").then((o) => e(o).then((i) => {
343
+ s(i);
324
344
  }));
325
- }, []), B(() => () => {
326
- n && e.getAsync("components").then((i) => {
327
- i.nodes.detached = i.nodes.detached.filter(
328
- (o) => o.id !== n.id
345
+ }, []), j(() => () => {
346
+ n && t.getAsync("components").then((o) => {
347
+ o.nodes.detached = o.nodes.detached.filter(
348
+ (i) => i.id !== n.id
329
349
  );
330
350
  });
331
- }, [n]), n ? /* @__PURE__ */ h.createElement(te, { id: n.id, node: n, branch: "default" }) : null;
332
- }, bt = yt, wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
351
+ }, [n]), n ? /* @__PURE__ */ m.createElement(it, { id: n.id, node: n, branch: "default" }) : null;
352
+ }, Ne = Me, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
333
353
  __proto__: null,
334
- default: bt
335
- }, Symbol.toStringTag, { value: "Module" })), vt = h.lazy(() => Promise.resolve().then(() => wt)), Et = ({ showSearch: t = !1 }) => {
336
- const e = Be(), n = T();
337
- return /* @__PURE__ */ h.createElement(h.Suspense, { fallback: null }, /* @__PURE__ */ h.createElement(
338
- vt,
354
+ default: Ne
355
+ }, Symbol.toStringTag, { value: "Module" })), Le = m.lazy(() => Promise.resolve().then(() => Pe)), _e = ({ showSearch: e = !1 }) => {
356
+ const t = qt(), n = W();
357
+ return /* @__PURE__ */ m.createElement(m.Suspense, { fallback: null }, /* @__PURE__ */ m.createElement(
358
+ Le,
339
359
  {
340
- builder: (s) => n.get("settings").then((i) => {
341
- var u;
342
- const { properties: o, context: r } = Object.keys(i.components).reduce(
343
- (d, l) => (i.components[l].type === "not-found" && (d.properties = i.components[l].properties, d.context = i.components[l].context), d),
360
+ builder: (s) => n.get("settings").then((o) => {
361
+ var l;
362
+ const { properties: i, context: r } = Object.keys(o.components).reduce(
363
+ (d, u) => (o.components[u].type === "not-found" && (d.properties = o.components[u].properties, d.context = o.components[u].context), d),
344
364
  { properties: {}, context: {} }
345
365
  );
346
- o.showSearch = t;
366
+ i.showSearch = e;
347
367
  const c = s.createNode("area", { detached: !0 });
348
368
  if (c.name = "not-found-area", c.writeLayout({
349
369
  size: "full"
350
- }), t) {
351
- const d = Object.keys(i.components).reduce(
352
- (f, m) => i.components[m].type === "search" ? i.components[m].properties : f,
370
+ }), e) {
371
+ const d = Object.keys(o.components).reduce(
372
+ (p, h) => o.components[h].type === "search" ? o.components[h].properties : p,
353
373
  {}
354
- ), l = s.createNode("search", { detached: !0 });
355
- l.writeLayout({ size: "full" }), l.writeProperties(p({
356
- "css-margin-bottom": ((u = e == null ? void 0 : e.sizes) == null ? void 0 : u.normal) || "15px"
357
- }, d)), c.appendChild(l);
374
+ ), u = s.createNode("search", { detached: !0 });
375
+ u.writeLayout({ size: "full" }), u.writeProperties(f({
376
+ "css-margin-bottom": ((l = t == null ? void 0 : t.sizes) == null ? void 0 : l.normal) || "15px"
377
+ }, d)), c.appendChild(u);
358
378
  }
359
379
  const a = s.createNode("not-found", { detached: !0 });
360
- return a.writeLayout({ size: "full" }), a.writeProperties(o), a.writeContext(r), c.appendChild(a), c;
380
+ return a.writeLayout({ size: "full" }), a.writeProperties(i), a.writeContext(r), c.appendChild(a), c;
361
381
  })
362
382
  }
363
383
  ));
364
- }, Zt = Et, Ct = (t) => {
365
- if (t) {
366
- const { type: e, content: n } = t;
367
- switch (e) {
384
+ }, wn = _e, ke = (e) => {
385
+ class t extends e {
386
+ requestInstance(s) {
387
+ const o = new CustomEvent("request-instance", {
388
+ detail: { key: s },
389
+ bubbles: !0,
390
+ composed: !0,
391
+ cancelable: !0
392
+ });
393
+ return this.dispatchEvent(o), o.detail.instance;
394
+ }
395
+ }
396
+ return t;
397
+ };
398
+ var Re = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, T = (e, t, n, s) => {
399
+ for (var o = s > 1 ? void 0 : s ? Ve(t, n) : t, i = e.length - 1, r; i >= 0; i--)
400
+ (r = e[i]) && (o = (s ? r(t, n, o) : r(o)) || o);
401
+ return s && o && Re(t, n, o), o;
402
+ };
403
+ const Ie = (e) => `w-${e}`, pt = (e = "none", t = 1) => e === "full" ? t : Math.min(e, t);
404
+ class P extends ke(se) {
405
+ constructor() {
406
+ super(...arguments), this.listeners = [], this.branch = "default", this._descriptor = null, this._properties = {}, this._context = {}, this._layout = {};
407
+ }
408
+ connectedCallback() {
409
+ super.connectedCallback(), this.container = this.requestInstance("container"), this.container && Promise.all([
410
+ Et.getInstance(this.container),
411
+ this.container.getAsync("componentResolver")
412
+ ]).then((t) => {
413
+ const n = t[0], s = t[1], o = n.nodes.get(this.nodeId || "");
414
+ if (o) {
415
+ this._descriptor = U(o, this.branch), this._properties = o.attributes.properties, this._context = o.attributes.context, this._layout = o.attributes.layout;
416
+ const i = this.style.getPropertyValue("--columns") ? +this.style.getPropertyValue("--columns") : 1, r = pt(this._layout.size, i), c = typeof this._layout.indent != "undefined" ? `${this._layout.indent + 1} / ${this._layout.indent + (r || 0) + 1}` : `span ${r}`;
417
+ this.style.setProperty("--gridColumn", c), this.listeners.push(
418
+ n.events.subscribe(
419
+ "components:properties-changed",
420
+ (u, p) => {
421
+ var h;
422
+ this.nodeId === ((h = p.node) == null ? void 0 : h.id) && (this._properties = p.node.attributes.properties);
423
+ }
424
+ )
425
+ ), this.listeners.push(
426
+ n.events.subscribe("components:context-changed", (u, p) => {
427
+ var h;
428
+ this.nodeId === ((h = p.node) == null ? void 0 : h.id) && (this._context = p.node.attributes.context);
429
+ })
430
+ ), this.listeners.push(
431
+ n.events.subscribe("components:layout-changed", (u, p) => {
432
+ var h;
433
+ this.nodeId === ((h = p.node) == null ? void 0 : h.id) && (this._layout = p.node.attributes.layout);
434
+ })
435
+ );
436
+ const a = o.mount(this.container);
437
+ if (this.listeners.push(a), !s) {
438
+ console.warn(
439
+ "Could not find resolver. Make sure it is registered on the container."
440
+ );
441
+ return;
442
+ }
443
+ const l = Ie(this._descriptor.type);
444
+ if (customElements.get(l))
445
+ return;
446
+ const d = s.getComponent(this._descriptor.type);
447
+ if (!d) {
448
+ console.warn("Component is missing or using incorrect import.");
449
+ return;
450
+ }
451
+ return d().then((u) => {
452
+ customElements.get(l) || customElements.define(l, u.default);
453
+ });
454
+ }
455
+ });
456
+ }
457
+ disconnectedCallback() {
458
+ this.listeners.forEach((t) => {
459
+ t();
460
+ });
461
+ }
462
+ mapProps() {
463
+ var n;
464
+ const t = this.style.getPropertyValue("--columns") ? +this.style.getPropertyValue("--columns") : 1;
465
+ return Object.entries(this._properties).reduce(
466
+ (s, [o, i]) => (typeof i == "object" ? s[`.${o}`] = i : s[o] = i, s),
467
+ {
468
+ "data-width": pt(this._layout.size, t),
469
+ "data-indent": (n = this._layout.indent) != null ? n : 0,
470
+ id: this._descriptor.id,
471
+ "data-name": this._descriptor.name,
472
+ "data-component-type": this._descriptor.type,
473
+ "data-node-id": this.nodeId
474
+ }
475
+ );
476
+ }
477
+ render() {
478
+ if (!this._descriptor)
479
+ return ee;
480
+ const t = `w-${this._descriptor.type}`, n = this.mapProps();
481
+ return oe`
482
+ <${ie(t)}
483
+ ${te(n)}
484
+ .layout=${this._layout}
485
+ .context=${this._context}
486
+ />
487
+ `;
488
+ }
489
+ }
490
+ P.styles = [
491
+ ne`
492
+ :host {
493
+ outline: none;
494
+ box-sizing: border-box;
495
+ }
496
+
497
+ * {
498
+ box-sizing: border-box;
499
+ outline: none;
500
+ }
501
+
502
+ grid-column: var(--gridColumn);
503
+ `
504
+ ];
505
+ T([
506
+ Ct({ type: String })
507
+ ], P.prototype, "nodeId", 2);
508
+ T([
509
+ Ct({ type: String })
510
+ ], P.prototype, "branch", 2);
511
+ T([
512
+ Q()
513
+ ], P.prototype, "_descriptor", 2);
514
+ T([
515
+ Q()
516
+ ], P.prototype, "_properties", 2);
517
+ T([
518
+ Q()
519
+ ], P.prototype, "_context", 2);
520
+ T([
521
+ Q()
522
+ ], P.prototype, "_layout", 2);
523
+ customElements.get("widget-component") || customElements.define("widget-component", P);
524
+ const Te = (e) => `w-${e}`, vn = (e, t, n) => dt(void 0, null, function* () {
525
+ const s = n.nodes.get(e);
526
+ if (!t) {
527
+ console.warn("Could not find resolver. Make sure it is registered on the container.");
528
+ return;
529
+ }
530
+ if (!s) {
531
+ console.warn(`Unable to find node with id: ${e}`);
532
+ return;
533
+ }
534
+ const o = U(s);
535
+ if (!(o != null && o.type)) {
536
+ console.warn(`Could not get descriptor for: ${s.name}`);
537
+ return;
538
+ }
539
+ const i = Te(o.type);
540
+ if (customElements.get(i))
541
+ return;
542
+ const r = t.getComponent(o.type);
543
+ if (!r) {
544
+ console.warn("Component is missing or using incorrect import.");
545
+ return;
546
+ }
547
+ const c = yield r();
548
+ if (!customElements.get(i))
549
+ try {
550
+ customElements.define(i, c.default);
551
+ } catch (a) {
552
+ console.log("error", a);
553
+ }
554
+ return customElements.whenDefined(i).then(() => ({
555
+ nodeId: e,
556
+ tag: i
557
+ }));
558
+ }), ze = (e) => {
559
+ if (e) {
560
+ const { type: t, content: n } = e;
561
+ switch (t) {
368
562
  case "FontAwesome":
369
563
  return `<i class="humany-icon fa fa-${n}"></i>`;
370
564
  case "Uri":
@@ -373,23 +567,23 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
373
567
  return "";
374
568
  }
375
569
  }
376
- }, Ot = (t) => {
377
- const e = (i, o) => {
378
- !i || (o ? i.classList.add("humany-tabbing") : i.classList.remove("humany-tabbing"));
379
- }, n = (i) => {
380
- i.key === "Tab" ? e(t, !0) : i.key === "Enter" && document.activeElement && document.activeElement.classList.contains("humany-trigger") || e(t, !1);
381
- }, s = (i) => {
382
- document.activeElement && document.activeElement.classList.contains("humany-trigger") && document.activeElement.classList.contains("humany-tabbing") || e(t, !1);
570
+ }, Be = (e) => {
571
+ const t = (o, i) => {
572
+ !o || (i ? o.classList.add("humany-tabbing") : o.classList.remove("humany-tabbing"));
573
+ }, n = (o) => {
574
+ o.key === "Tab" ? t(e, !0) : o.key === "Enter" && document.activeElement && document.activeElement.classList.contains("humany-trigger") || t(e, !1);
575
+ }, s = (o) => {
576
+ document.activeElement && document.activeElement.classList.contains("humany-trigger") && document.activeElement.classList.contains("humany-tabbing") || t(e, !1);
383
577
  };
384
578
  return document.addEventListener("keydown", n), document.addEventListener("click", s), () => {
385
579
  document.removeEventListener("keydown", n), document.removeEventListener("click", s);
386
580
  };
387
581
  };
388
- function St(t, e) {
389
- const { symbol: n, widgetName: s, label: i = "", ariaLabel: o = "", tooltip: r = "" } = e;
390
- t.classList.add("humany-trigger"), t.classList.add(`humany_${s}`), i.length && t.classList.add("humany-has-text"), o.length && !t.getAttribute("aria-label") && t.setAttribute("aria-label", o), o.length && !t.getAttribute("tabindex") && t.setAttribute("tabindex", "0"), r.length && !t.getAttribute("title") && t.setAttribute("title", r);
391
- const c = Ct(n) || "";
392
- return t.innerHTML = `${c}
582
+ function je(e, t) {
583
+ const { symbol: n, widgetName: s, label: o = "", ariaLabel: i = "", tooltip: r = "" } = t;
584
+ e.classList.add("humany-trigger"), e.classList.add(`humany_${s}`), o.length && e.classList.add("humany-has-text"), i.length && !e.getAttribute("aria-label") && e.setAttribute("aria-label", i), i.length && !e.getAttribute("tabindex") && e.setAttribute("tabindex", "0"), r.length && !e.getAttribute("title") && e.setAttribute("title", r);
585
+ const c = ze(n) || "";
586
+ return e.innerHTML = `${c}
393
587
  <span class="humany-close">
394
588
  <svg width="18" height="9" viewBox="0 0 18 9" fill="none" xmlns="http://www.w3.org/2000/svg">
395
589
  <path d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z" fill="white"/>
@@ -407,117 +601,117 @@ function St(t, e) {
407
601
  stroke-miterlimit="10" />
408
602
  </svg>
409
603
  </span>
410
- ${i.length ? `<span>${i}</span>` : ""}`, setTimeout(() => t && t.classList.add("humany-rendered")), Ot(t);
604
+ ${o.length ? `<span>${o}</span>` : ""}`, setTimeout(() => e && e.classList.add("humany-rendered")), Be(e);
411
605
  }
412
- function At(t, e) {
413
- t instanceof HTMLElement ? (e && t.setAttribute("title", e), t.classList.remove("humany-active"), t.classList.remove("humany-loading")) : t instanceof Array && t.forEach((n) => {
414
- e && n.setAttribute("title", e), n.classList.remove("humany-active"), n.classList.remove("humany-loading");
606
+ function We(e, t) {
607
+ e instanceof HTMLElement ? (t && e.setAttribute("title", t), e.classList.remove("humany-active"), e.classList.remove("humany-loading")) : e instanceof Array && e.forEach((n) => {
608
+ t && n.setAttribute("title", t), n.classList.remove("humany-active"), n.classList.remove("humany-loading");
415
609
  });
416
610
  }
417
- function Dt(t) {
418
- t instanceof HTMLElement ? (t.classList.remove("humany-active"), t.classList.add("humany-loading")) : t instanceof Array && t.forEach((e) => {
419
- e.classList.remove("humany-active"), e.classList.add("humany-loading");
611
+ function Fe(e) {
612
+ e instanceof HTMLElement ? (e.classList.remove("humany-active"), e.classList.add("humany-loading")) : e instanceof Array && e.forEach((t) => {
613
+ t.classList.remove("humany-active"), t.classList.add("humany-loading");
420
614
  });
421
615
  }
422
- function ye(t, e) {
423
- t instanceof HTMLElement ? (e && t.setAttribute("title", e), t.classList.add("humany-active"), t.classList.remove("humany-loading")) : t instanceof Array && t.forEach((n) => {
424
- e && n.setAttribute("title", e), n.classList.add("humany-active"), n.classList.remove("humany-loading");
616
+ function xt(e, t) {
617
+ e instanceof HTMLElement ? (t && e.setAttribute("title", t), e.classList.add("humany-active"), e.classList.remove("humany-loading")) : e instanceof Array && e.forEach((n) => {
618
+ t && n.setAttribute("title", t), n.classList.add("humany-active"), n.classList.remove("humany-loading");
425
619
  });
426
620
  }
427
- var k = /* @__PURE__ */ ((t) => (t.Inline = "inline", t.Link = "link", t.Badge = "badge", t.Unsupported = "unsupported", t))(k || {});
428
- const xt = (t, e) => t && e ? "both" : t ? "widgetDOM" : e ? "triggerDOM" : "none", be = (t) => t ? typeof t == "boolean" && t ? "link" : typeof t == "object" && !Array.isArray(t) ? "badge" : "unsupported" : "inline", Mt = (t, e, n, s, i = !1) => {
429
- var u, d;
430
- const o = xt(
431
- e,
621
+ var _ = /* @__PURE__ */ ((e) => (e.Inline = "inline", e.Link = "link", e.Badge = "badge", e.Unsupported = "unsupported", e))(_ || {});
622
+ const Ge = (e, t) => e && t ? "both" : e ? "widgetDOM" : t ? "triggerDOM" : "none", $t = (e) => e ? typeof e == "boolean" && e ? "link" : typeof e == "object" && !Array.isArray(e) ? "badge" : "unsupported" : "inline", He = (e, t, n, s, o = !1) => {
623
+ var l, d;
624
+ const i = Ge(
625
+ t,
432
626
  n
433
- ), r = be(s), c = {
434
- widgetDOMElement: e ? e.cloneNode(!0) : void 0,
627
+ ), r = $t(s), c = {
628
+ widgetDOMElement: t ? t.cloneNode(!0) : void 0,
435
629
  triggerDOMElement: n ? n.cloneNode(!0) : void 0
436
630
  }, a = {
437
631
  triggerType: r,
438
632
  cachedOriginals: c,
439
633
  widgetDOMElement: document.createElement("div")
440
634
  };
441
- switch (o) {
635
+ switch (i) {
442
636
  case "both": {
443
- a.widgetDOMElement = e || document.createElement("div"), r !== "inline" && (a.triggerDOMElement = n);
637
+ a.widgetDOMElement = t || document.createElement("div"), r !== "inline" && (a.triggerDOMElement = n);
444
638
  break;
445
639
  }
446
640
  case "widgetDOM": {
447
- if (a.widgetDOMElement = e || document.createElement("div"), r !== "inline") {
448
- const l = document.body.appendChild(document.createElement("a"));
449
- r === "link" && (l.innerText = t), a.triggerDOMElement = l;
641
+ if (a.widgetDOMElement = t || document.createElement("div"), r !== "inline") {
642
+ const u = document.body.appendChild(document.createElement("a"));
643
+ r === "link" && (u.innerText = e), a.triggerDOMElement = u;
450
644
  }
451
645
  break;
452
646
  }
453
647
  case "triggerDOM": {
454
- const l = document.createElement("div");
455
- a.widgetDOMElement = l, r === "inline" ? (l.id = (n == null ? void 0 : n.id) || "", i ? (l.style.display = "none", (u = n == null ? void 0 : n.parentNode) == null || u.appendChild(l), a.callback = () => {
456
- var f;
457
- (f = n == null ? void 0 : n.parentNode) == null || f.replaceChild(
458
- l,
648
+ const u = document.createElement("div");
649
+ a.widgetDOMElement = u, r === "inline" ? (u.id = (n == null ? void 0 : n.id) || "", o ? (u.style.display = "none", (l = n == null ? void 0 : n.parentNode) == null || l.appendChild(u), a.callback = () => {
650
+ var p;
651
+ (p = n == null ? void 0 : n.parentNode) == null || p.replaceChild(
652
+ u,
459
653
  n
460
- ), l.style.display = (n == null ? void 0 : n.style.display) || "block";
654
+ ), u.style.display = (n == null ? void 0 : n.style.display) || "block";
461
655
  }) : (d = n == null ? void 0 : n.parentNode) == null || d.replaceChild(
462
- l,
656
+ u,
463
657
  n
464
- ), a.cachedOriginals.widgetDOMElement = n, a.cachedOriginals.triggerDOMElement = void 0) : (a.widgetDOMElement = document.body.appendChild(l), a.triggerDOMElement = n);
658
+ ), a.cachedOriginals.widgetDOMElement = n, a.cachedOriginals.triggerDOMElement = void 0) : (a.widgetDOMElement = document.body.appendChild(u), a.triggerDOMElement = n);
465
659
  break;
466
660
  }
467
661
  case "none": {
468
- const l = document.body.appendChild(document.createElement("div"));
469
- if (a.widgetDOMElement = l, r !== "inline") {
470
- const f = document.body.appendChild(document.createElement("a"));
471
- r === "link" && (f.innerText = t), a.triggerDOMElement = f;
662
+ const u = document.body.appendChild(document.createElement("div"));
663
+ if (a.widgetDOMElement = u, r !== "inline") {
664
+ const p = document.body.appendChild(document.createElement("a"));
665
+ r === "link" && (p.innerText = e), a.triggerDOMElement = p;
472
666
  }
473
667
  break;
474
668
  }
475
669
  }
476
670
  return a;
477
- }, Nt = "modals";
478
- class $t {
479
- constructor(e, n) {
480
- this.options = n, this.unsubscribe = [], this.container = e.createChild(this), this.container.register("widgetDOMElement", this.options.widgetDOMElement), this.container.register("triggerDOMElement", this.options.triggerDOMElement);
671
+ }, qe = "modals";
672
+ class Ke {
673
+ constructor(t, n) {
674
+ this.options = n, this.unsubscribe = [], this.container = t.createChild(this), this.container.register("widgetDOMElement", this.options.widgetDOMElement), this.container.register("triggerDOMElement", this.options.triggerDOMElement);
481
675
  const s = this.container.get("$widget");
482
676
  this.options.widgetDOMElement.classList.add("humany-widget"), this.options.widgetDOMElement.classList.add(`humany_${s.name}`);
483
- const i = e.get("widgetDOMElements") || [];
484
- e.register("widgetDOMElements", [
485
- ...i,
677
+ const o = t.get("widgetDOMElements") || [];
678
+ t.register("widgetDOMElements", [
679
+ ...o,
486
680
  this.options.widgetDOMElement
487
681
  ]);
488
682
  }
489
683
  render() {
490
- const { widgetDOMElement: e, triggerDOMElement: n } = this.options, s = this.container.get("$widget");
491
- return e.getAttribute("data-rendered") === "true" ? Promise.resolve() : (n && this.options.triggerType === k.Badge && Dt(n), import("./render.b6303746.js").then((i) => i.default(s.name, this.container, e)).then(() => {
492
- if (e.setAttribute("data-rendered", "true"), n && this.options.triggerType === k.Badge) {
493
- const o = this.options.triggerOptions.openTooltip;
494
- ye(n, o);
684
+ const { widgetDOMElement: t, triggerDOMElement: n } = this.options, s = this.container.get("$widget");
685
+ return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (n && this.options.triggerType === _.Badge && Fe(n), import("./render.3f019371.js").then((o) => o.default(s.name, this.container, t)).then(() => {
686
+ if (t.setAttribute("data-rendered", "true"), n && this.options.triggerType === _.Badge) {
687
+ const i = this.options.triggerOptions.openTooltip;
688
+ xt(n, i);
495
689
  }
496
- We(this.container, e);
497
- const i = this.container.get("$environment").widgets.all();
498
- $(
690
+ Yt(this.container, t);
691
+ const o = this.container.get("$environment").widgets.all();
692
+ N(
499
693
  this.container,
500
- Nt,
694
+ qe,
501
695
  v.Session
502
- ).then((o) => {
503
- o && o.forEach((r) => {
504
- i.find(
696
+ ).then((i) => {
697
+ i && i.forEach((r) => {
698
+ o.find(
505
699
  (c) => c.name === r.name && c.state === "activated"
506
700
  ) && s.events.dispatch("widget:modal-opened", r);
507
701
  });
508
702
  });
509
703
  }));
510
704
  }
511
- renderBadge(e) {
705
+ renderBadge(t) {
512
706
  const { triggerDOMElement: n } = this.options;
513
707
  if (!n)
514
708
  return;
515
709
  n.getAttribute("role") || n.setAttribute("role", "button");
516
- const { name: s } = this.container.get("$widget"), { label: i, symbol: o, ariaLabel: r, closedTooltip: c, openTooltip: a } = e, u = { closedTooltip: c, openTooltip: a };
517
- this.options.triggerOptions = u;
518
- const d = St(n, {
519
- label: i,
520
- symbol: o,
710
+ const { name: s } = this.container.get("$widget"), { label: o, symbol: i, ariaLabel: r, closedTooltip: c, openTooltip: a } = t, l = { closedTooltip: c, openTooltip: a };
711
+ this.options.triggerOptions = l;
712
+ const d = je(n, {
713
+ label: o,
714
+ symbol: i,
521
715
  ariaLabel: r,
522
716
  widgetName: s,
523
717
  tooltip: c
@@ -525,13 +719,13 @@ class $t {
525
719
  this.unsubscribe.push(d);
526
720
  }
527
721
  dispose() {
528
- return import("./unmount.b0816844.js").then((e) => {
529
- var i, o, r, c;
722
+ return import("./unmount.b0816844.js").then((t) => {
723
+ var o, i, r, c;
530
724
  const { triggerDOMElement: n, widgetDOMElement: s } = this.options;
531
- e.default(s), this.options.cachedOriginals.widgetDOMElement && s && ((i = s.parentNode) == null || i.replaceChild(
725
+ t.default(s), this.options.cachedOriginals.widgetDOMElement && s && ((o = s.parentNode) == null || o.replaceChild(
532
726
  this.options.cachedOriginals.widgetDOMElement,
533
727
  s
534
- )), this.options.cachedOriginals.triggerDOMElement && n && ((o = n.parentNode) == null || o.replaceChild(
728
+ )), this.options.cachedOriginals.triggerDOMElement && n && ((i = n.parentNode) == null || i.replaceChild(
535
729
  this.options.cachedOriginals.triggerDOMElement,
536
730
  n
537
731
  )), this.unsubscribe.forEach((a) => {
@@ -540,140 +734,140 @@ class $t {
540
734
  });
541
735
  }
542
736
  }
543
- const F = "changesets", Lt = (t) => {
544
- const e = { tags: t.tags };
545
- return t.context && typeof t.context != "function" && (e.context = t.context), t.properties && typeof t.properties != "function" && (e.properties = t.properties), t.layout && typeof t.layout != "function" && (e.layout = t.layout), e;
737
+ const q = "changesets", Ue = (e) => {
738
+ const t = { tags: e.tags };
739
+ return e.context && typeof e.context != "function" && (t.context = e.context), e.properties && typeof e.properties != "function" && (t.properties = e.properties), e.layout && typeof e.layout != "function" && (t.layout = e.layout), t;
546
740
  };
547
- class ne {
548
- constructor(e, n) {
549
- this.container = e, this.storageWriter = n;
741
+ class rt {
742
+ constructor(t, n) {
743
+ this.container = t, this.storageWriter = n;
550
744
  }
551
- static create(e) {
552
- return V(e, F, _.Necessary, {
745
+ static create(t) {
746
+ return V(t, q, I.Necessary, {
553
747
  medium: v.Local
554
- }).then((n) => new ne(e, n));
748
+ }).then((n) => new rt(t, n));
555
749
  }
556
- write(e, n, s, i) {
557
- return q(this)(() => $(
750
+ write(t, n, s, o) {
751
+ return X(this)(() => N(
558
752
  this.container,
559
- F,
753
+ q,
560
754
  v.Local
561
- ).then((o = {}) => {
562
- const { keys: r = [], items: c = {} } = o, a = r.indexOf(e);
563
- return a > -1 && r.splice(a, 1), r.push(e), c[e] = {
564
- options: i,
565
- attributes: Lt(s),
755
+ ).then((i = {}) => {
756
+ const { keys: r = [], items: c = {} } = i, a = r.indexOf(t);
757
+ return a > -1 && r.splice(a, 1), r.push(t), c[t] = {
758
+ options: o,
759
+ attributes: Ue(s),
566
760
  rules: n.rules
567
761
  }, this.storageWriter({ keys: r, items: c });
568
762
  }));
569
763
  }
570
- remove(e) {
571
- return q(this)(() => $(
764
+ remove(t) {
765
+ return X(this)(() => N(
572
766
  this.container,
573
- F,
767
+ q,
574
768
  v.Local
575
769
  ).then((n = {}) => {
576
- const { keys: s = [], items: i = {} } = n, o = s.indexOf(e);
577
- if (o > -1)
578
- return s.splice(o, 1), delete i[e], this.storageWriter(n);
770
+ const { keys: s = [], items: o = {} } = n, i = s.indexOf(t);
771
+ if (i > -1)
772
+ return s.splice(i, 1), delete o[t], this.storageWriter(n);
579
773
  }));
580
774
  }
581
- load(e) {
582
- return q(this)(() => $(
775
+ load(t) {
776
+ return X(this)(() => N(
583
777
  this.container,
584
- F,
778
+ q,
585
779
  v.Local
586
780
  ).then((n = {}) => {
587
- const { keys: s = [], items: i = {} } = n;
588
- s.forEach((o) => {
589
- const r = i[o];
781
+ const { keys: s = [], items: o = {} } = n;
782
+ s.forEach((i) => {
783
+ const r = o[i];
590
784
  if (r) {
591
- const { rules: c, attributes: a, options: u } = r;
592
- e.write({
785
+ const { rules: c, attributes: a, options: l } = r;
786
+ t.write({
593
787
  attributes: a,
594
- options: u,
595
- target: new Ge(e, c)
788
+ options: l,
789
+ target: new Ut(t, c)
596
790
  });
597
791
  }
598
792
  });
599
793
  }));
600
794
  }
601
795
  }
602
- const kt = (t) => {
603
- const { container: e } = t;
604
- return ne.create(e).then((n) => {
605
- const s = e.get("$settings"), i = { localStorage: n }, o = new Te(t, i), r = je(o, s);
606
- return t.events.subscribe("widget:state-change", (c, a) => {
607
- a.state === Ze.Deactivating && r();
608
- }), o;
796
+ const Ye = (e) => {
797
+ const { container: t } = e;
798
+ return rt.create(t).then((n) => {
799
+ const s = t.get("$settings"), o = { localStorage: n }, i = new Et(e, o), r = Kt(i, s);
800
+ return e.events.subscribe("widget:state-change", (c, a) => {
801
+ a.state === le.Deactivating && r();
802
+ }), i;
609
803
  });
610
- }, Pt = (t) => import("@telia-ace/widget-routing").then(({ RoutingService: e, HistoryMode: n }) => t.get("settings").then((s) => {
804
+ }, Qe = (e) => import("@telia-ace/widget-routing").then(({ RoutingService: t, HistoryMode: n }) => e.get("settings").then((s) => {
611
805
  const {
612
- routing: { initialPath: i = "/", mode: o = n.scopedHash, basePath: r },
806
+ routing: { initialPath: o = "/", mode: i = n.scopedHash, basePath: r },
613
807
  views: c
614
808
  } = s;
615
- return new e(t, {
616
- initialPath: i,
617
- mode: o,
618
- routes: Object.keys(c).map((u) => ({
619
- name: u,
620
- path: c[u].path
809
+ return new t(e, {
810
+ initialPath: o,
811
+ mode: i,
812
+ routes: Object.keys(c).map((l) => ({
813
+ name: l,
814
+ path: c[l].path
621
815
  })),
622
816
  basePath: r
623
817
  });
624
- })), Rt = (t) => import("@telia-ace/widget-services").then(({ StorageProvider: e }) => new e()), Vt = (t) => import("@telia-ace/widget-core").then(({ ActionResolver: e }) => new e(t)), _t = (t) => import("@telia-ace/widget-core").then(({ ComponentResolver: e }) => new e(t)), It = (t) => import("@telia-ace/widget-core").then(({ ComponentPlatform: e, createComponentModel: n }) => kt(t.get("$widget"))), Z = "$settings", H = "open", le = "activeStickyWidget";
625
- class Jt extends Je {
626
- constructor(e) {
627
- super(e), this.outlets = /* @__PURE__ */ new Map(), this.activated = void 0, this.subs = [], this.handleBootstrapping = (n) => {
818
+ })), Ze = (e) => import("@telia-ace/widget-services").then(({ StorageProvider: t }) => new t()), Je = (e) => import("@telia-ace/widget-core").then(({ ActionResolver: t }) => new t(e)), Xe = (e) => import("@telia-ace/widget-core").then(({ ComponentResolver: t }) => new t(e)), tn = (e) => import("@telia-ace/widget-core").then(({ ComponentPlatform: t, createComponentModel: n }) => Ye(e.get("$widget"))), et = "$settings", K = "open", mt = "activeStickyWidget";
819
+ class En extends ue {
820
+ constructor(t) {
821
+ super(t), this.outlets = /* @__PURE__ */ new Map(), this.activated = void 0, this.subs = [], this.handleBootstrapping = (n) => {
628
822
  const s = {
629
823
  triggerDOMElement: n.sourceDOMElement,
630
824
  withRenderState: "storage"
631
825
  };
632
- this.container.get("settings").then((i) => {
633
- const { activate: o } = i;
634
- (typeof o == "undefined" || o === null || o === !0) && (this.activated = (this.activated || this.widget.activate()).then(
826
+ this.container.get("settings").then((o) => {
827
+ const { activate: i } = o;
828
+ (typeof i == "undefined" || i === null || i === !0) && (this.activated = (this.activated || this.widget.activate()).then(
635
829
  () => this.attach(s)
636
830
  ));
637
831
  });
638
- }, this.container.registerAsync("storage", () => Rt(this.container)), this.container.registerFactory("settings", () => $(
832
+ }, this.container.registerAsync("storage", () => Ze(this.container)), this.container.registerFactory("settings", () => N(
639
833
  this.container,
640
- Z,
834
+ et,
641
835
  v.Local
642
- ).then((n = {}) => p(p({}, this.container.get("$settings")), n))), Qe(this, "load", this.handleBootstrapping), this.container.registerAsync(
836
+ ).then((n = {}) => f(f({}, this.container.get("$settings")), n))), ce(this, "load", this.handleBootstrapping), this.container.registerAsync(
643
837
  "componentResolver",
644
- () => _t(this.container)
645
- ), this.container.registerAsync("router", () => Pt(this.container)), this.container.registerAsync("actionResolver", () => Vt(this.container)), this.container.register("matchMedia", window.matchMedia), this.container.registerAsync("components", () => It(this.container));
838
+ () => Xe(this.container)
839
+ ), this.container.registerAsync("router", () => Qe(this.container)), this.container.registerAsync("actionResolver", () => Je(this.container)), this.container.register("matchMedia", window.matchMedia), this.container.registerAsync("components", () => tn(this.container));
646
840
  }
647
841
  initialize() {
648
- const e = this.container.getManyAsync(
842
+ const t = this.container.getManyAsync(
649
843
  "actionResolver",
650
844
  "router",
651
845
  "components"
652
846
  );
653
- return Promise.all([e, this.container.get("settings")]).then(
654
- ([{ actionResolver: n, router: s, components: i }, o]) => {
847
+ return Promise.all([t, this.container.get("settings")]).then(
848
+ ([{ actionResolver: n, router: s, components: o }, i]) => {
655
849
  var a;
656
850
  n.subscribe(
657
851
  this.widget.name,
658
- (u, d, l) => this.onAction(d, l)
852
+ (l, d, u) => this.onAction(d, u)
659
853
  );
660
- const r = (u) => {
661
- i.nodes.query({ type: "view" }).forEach((d) => {
662
- i.setSwitch(d, u);
854
+ const r = (l) => {
855
+ o.nodes.query({ type: "view" }).forEach((d) => {
856
+ o.setSwitch(d, l);
663
857
  });
664
858
  }, c = ((a = s.getInitialRoute()) == null ? void 0 : a.name) || "index";
665
- return r(c), this.events.subscribe("widget:data-loaded", (u, { element: d }) => {
859
+ return r(c), this.events.subscribe("widget:data-loaded", (l, { element: d }) => {
666
860
  this.widget.container.get("seoConfiguration") && this.events.dispatch("widget:preloaded-replaced", {
667
861
  element: d
668
862
  });
669
863
  }), this.events.subscribe(
670
864
  "router:change",
671
- (u, { previous: d = { routeData: {} }, next: l = { routeData: {} } }) => {
672
- const { routeData: f } = d, { routeData: m } = l, g = Object.keys(o.views).reduce((b, y) => typeof o.views[y].path == "undefined" ? y : b, "");
673
- !m.name && g ? r(g) : r(m.name), ce(f && f.params), ce(m && m.params), this.container.getAsync("actionResolver").then((b) => {
865
+ (l, { previous: d = { routeData: {} }, next: u = { routeData: {} } }) => {
866
+ const { routeData: p } = d, { routeData: h } = u, g = Object.keys(i.views).reduce((b, y) => typeof i.views[y].path == "undefined" ? y : b, "");
867
+ !h.name && g ? r(g) : r(h.name), ht(p && p.params), ht(h && h.params), this.container.getAsync("actionResolver").then((b) => {
674
868
  b.action(this.widget.name, "routeChange", {
675
- next: m,
676
- previous: f
869
+ next: h,
870
+ previous: p
677
871
  });
678
872
  });
679
873
  }
@@ -681,41 +875,41 @@ class Jt extends Je {
681
875
  }
682
876
  );
683
877
  }
684
- attach(e = {}) {
878
+ attach(t = {}) {
685
879
  return this.container.get("settings").then(({ trigger: n }) => {
686
- var f, m;
880
+ var p, h;
687
881
  const {
688
882
  widgetDOMElement: s,
689
- key: i = Fe(),
690
- triggerDOMElement: o,
883
+ key: o = Qt(),
884
+ triggerDOMElement: i,
691
885
  withRenderState: r
692
- } = e, a = be(n) === k.Inline && ((o == null ? void 0 : o.childElementCount) || 0) > 0, u = Mt(
886
+ } = t, a = $t(n) === _.Inline && ((i == null ? void 0 : i.childElementCount) || 0) > 0, l = He(
693
887
  this.widget.name,
694
888
  s,
695
- o,
889
+ i,
696
890
  n,
697
891
  a
698
892
  );
699
893
  this.outlets.size < 1 && !r && this.setRenderState("unset");
700
894
  const d = () => {
701
- const g = () => b.querySelectorAll("[data-loading=true]").length === 0, [b] = this.widget.container.get("widgetDOMElements"), y = (j, L) => {
702
- g() && (u.callback && u.callback(), L.disconnect());
895
+ const g = () => b.querySelectorAll("[data-loading=true]").length === 0, [b] = this.widget.container.get("widgetDOMElements"), y = (F, L) => {
896
+ g() && (l.callback && l.callback(), L.disconnect());
703
897
  }, E = {
704
898
  attributes: !0,
705
899
  subtree: !0,
706
900
  childList: !0
707
901
  };
708
- g() && u.callback && u.callback(), new MutationObserver(y).observe(b, E);
902
+ g() && l.callback && l.callback(), new MutationObserver(y).observe(b, E);
709
903
  };
710
904
  a && this.widget.container.getAsync("dataClient").then(({ events: g }) => {
711
905
  g.subscribe("data-client:fetched", (b, y) => {
712
906
  y.unresolvedQueries === 0 && d();
713
907
  });
714
908
  });
715
- const l = this.getOrCreateViewOutlet(i, u);
716
- if (this.outlets.set(i, l), this.widget.events.dispatch("widget:attached", {}, { bubbles: !0 }), u.triggerType === k.Badge && n && ((f = u.triggerDOMElement) == null || f.setAttribute("aria-expanded", "false"), l == null || l.renderBadge(n)), u.triggerType !== k.Inline && ((m = u.triggerDOMElement) == null || m.addEventListener("click", (g) => {
909
+ const u = this.getOrCreateViewOutlet(o, l);
910
+ if (this.outlets.set(o, u), this.widget.events.dispatch("widget:attached", {}, { bubbles: !0 }), l.triggerType === _.Badge && n && ((p = l.triggerDOMElement) == null || p.setAttribute("aria-expanded", "false"), u == null || u.renderBadge(n)), l.triggerType !== _.Inline && ((h = l.triggerDOMElement) == null || h.addEventListener("click", (g) => {
717
911
  g.preventDefault(), this.container.get("settings").then(({ trigger: b }) => {
718
- l.render().then(() => this.renderState()).then((y) => b && b.action && b.action === "hide" ? y === O.open ? this.hide() : this.open() : y === O.open ? this.close() : this.open());
912
+ u.render().then(() => this.renderState()).then((y) => b && b.action && b.action === "hide" ? y === O.open ? this.hide() : this.open() : y === O.open ? this.close() : this.open());
719
913
  });
720
914
  })), this.outlets.size > 1)
721
915
  return this.renderState().then((g) => {
@@ -723,7 +917,7 @@ class Jt extends Je {
723
917
  });
724
918
  if (r)
725
919
  return r === "storage" ? this.renderState().then((g) => {
726
- if (u.triggerType === k.Inline) {
920
+ if (l.triggerType === _.Inline) {
727
921
  this.triggerStateIfApplicable("open");
728
922
  return;
729
923
  }
@@ -731,23 +925,23 @@ class Jt extends Je {
731
925
  }) : this.triggerStateIfApplicable(r);
732
926
  });
733
927
  }
734
- detach(e) {
735
- if (e) {
736
- if (this.outlets.has(e)) {
737
- const n = this.outlets.get(e);
738
- n == null || n.dispose(), this.outlets.delete(e);
928
+ detach(t) {
929
+ if (t) {
930
+ if (this.outlets.has(t)) {
931
+ const n = this.outlets.get(t);
932
+ n == null || n.dispose(), this.outlets.delete(t);
739
933
  return;
740
934
  }
741
- process.env.NODE_ENV !== "production" && console.warn(`detach(): Could not find View Outlet with key ${e}`);
935
+ process.env.NODE_ENV !== "production" && console.warn(`detach(): Could not find View Outlet with key ${t}`);
742
936
  return;
743
937
  }
744
938
  this.outlets.forEach((n) => {
745
939
  n.dispose();
746
940
  }), this.outlets.clear();
747
941
  }
748
- triggerStateIfApplicable(e) {
942
+ triggerStateIfApplicable(t) {
749
943
  return this.container.getAsync("router").then((n) => {
750
- switch (e) {
944
+ switch (t) {
751
945
  case "closed":
752
946
  this.close();
753
947
  break;
@@ -762,72 +956,72 @@ class Jt extends Je {
762
956
  }
763
957
  });
764
958
  }
765
- getOrCreateViewOutlet(e, n) {
766
- return this.outlets.has(e) ? this.outlets.get(e) : new $t(this.container, n);
959
+ getOrCreateViewOutlet(t, n) {
960
+ return this.outlets.has(t) ? this.outlets.get(t) : new Ke(this.container, n);
767
961
  }
768
- render(e = {}) {
769
- if (process.env.NODE_ENV !== "production" && console.warn("widget.render() is deprecated. Use widget.attach() instead."), e.open) {
770
- const n = C(p({}, e), {
962
+ render(t = {}) {
963
+ if (process.env.NODE_ENV !== "production" && console.warn("widget.render() is deprecated. Use widget.attach() instead."), t.open) {
964
+ const n = C(f({}, t), {
771
965
  withRenderState: "open"
772
966
  });
773
967
  return this.attach(n);
774
968
  }
775
- return this.attach(e);
969
+ return this.attach(t);
776
970
  }
777
- activate(e) {
778
- e != null && e.override && this.setSettings(() => e.override), e != null && e.apiNotificationPriorityBy && this.container.register("apiNotificationPriorityBy", e.apiNotificationPriorityBy);
971
+ activate(t) {
972
+ t != null && t.override && this.setSettings(() => t.override), t != null && t.apiNotificationPriorityBy && this.container.register("apiNotificationPriorityBy", t.apiNotificationPriorityBy);
779
973
  }
780
- setSettings(e) {
974
+ setSettings(t) {
781
975
  return Promise.all([
782
976
  this.container.get("settings"),
783
- V(this.container, Z, _.Necessary, {
977
+ V(this.container, et, I.Necessary, {
784
978
  medium: v.Local
785
979
  })
786
- ]).then(([n, s]) => Promise.resolve(e(n)).then((i) => s(i).then(() => {
787
- const o = p(p({}, n), i);
788
- return this.widget.events.dispatch("widget:settings-updated", o), o;
980
+ ]).then(([n, s]) => Promise.resolve(t(n)).then((o) => s(o).then(() => {
981
+ const i = f(f({}, n), o);
982
+ return this.widget.events.dispatch("widget:settings-updated", i), i;
789
983
  })));
790
984
  }
791
985
  clearSettings() {
792
986
  return V(
793
987
  this.container,
794
- Z,
795
- _.Necessary,
988
+ et,
989
+ I.Necessary,
796
990
  { medium: v.Local }
797
- ).then((e) => e()).then(() => this.container.get("settings")).then((e) => {
798
- this.widget.events.dispatch("widget:settings-updated", e);
991
+ ).then((t) => t()).then(() => this.container.get("settings")).then((t) => {
992
+ this.widget.events.dispatch("widget:settings-updated", t);
799
993
  });
800
994
  }
801
- action({ action: e, value: n }) {
995
+ action({ action: t, value: n }) {
802
996
  return this.container.getAsync("actionResolver").then((s) => {
803
- s.action(this.widget.name, e, n);
997
+ s.action(this.widget.name, t, n);
804
998
  });
805
999
  }
806
1000
  renderState() {
807
- if (Ye(this.container))
1001
+ if (re(this.container))
808
1002
  return Promise.resolve(O.open);
809
- const e = () => $(
1003
+ const t = () => N(
810
1004
  this.container,
811
- H,
1005
+ K,
812
1006
  v.Session
813
- ).then((s = O.closed) => s), n = () => $(
1007
+ ).then((s = O.closed) => s), n = () => N(
814
1008
  this.container,
815
- H,
1009
+ K,
816
1010
  v.Session
817
1011
  ).then((s = O.closed) => s);
818
- return this.container.getAsync("router").then((s) => s.isSticky() ? n().then((i) => i === O.open ? i : e()) : e());
1012
+ return this.container.getAsync("router").then((s) => s.isSticky() ? n().then((o) => o === O.open ? o : t()) : t());
819
1013
  }
820
1014
  hide() {
821
1015
  return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
822
1016
  "hide(): No-op as no view outlets are registered. Invoke the attach() command first."
823
- ), Promise.resolve()) : (this.outlets.forEach((e) => e.render()), this.action({ action: "hide" }).then(() => {
1017
+ ), Promise.resolve()) : (this.outlets.forEach((t) => t.render()), this.action({ action: "hide" }).then(() => {
824
1018
  this.setTriggerState(!1);
825
1019
  }));
826
1020
  }
827
1021
  open() {
828
1022
  return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
829
1023
  "open(): No-op as no view outlets are registered. Invoke the attach() command first."
830
- ), Promise.resolve()) : (this.outlets.forEach((e) => e.render()), this.action({ action: "open" }).then(() => (this.widget.events.dispatch("tracking:widget-rendered", {}), this.onOpen())));
1024
+ ), Promise.resolve()) : (this.outlets.forEach((t) => t.render()), this.action({ action: "open" }).then(() => (this.widget.events.dispatch("tracking:widget-rendered", {}), this.onOpen())));
831
1025
  }
832
1026
  close() {
833
1027
  return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
@@ -839,66 +1033,66 @@ class Jt extends Je {
839
1033
  "show(): Command is deprecated and will be removed in the future. Use open() instead."
840
1034
  ), this.open();
841
1035
  }
842
- onAction(e, n) {
843
- switch (e) {
1036
+ onAction(t, n) {
1037
+ switch (t) {
844
1038
  case "close":
845
1039
  case "open":
846
1040
  case "hide":
847
- const s = e === "open" ? O.open : e === "close" ? O.closed : O.hidden;
1041
+ const s = t === "open" ? O.open : t === "close" ? O.closed : O.hidden;
848
1042
  return this.setRenderState(s).then(() => {
849
1043
  this.setTriggerState(s === O.open), s !== O.hidden ? s === O.open ? this.onOpen() : this.onClose() : this.outlets.forEach(
850
- (i) => {
851
- var o;
852
- return (o = i.options.triggerDOMElement) == null ? void 0 : o.setAttribute("aria-expanded", "false");
1044
+ (o) => {
1045
+ var i;
1046
+ return (i = o.options.triggerDOMElement) == null ? void 0 : i.setAttribute("aria-expanded", "false");
853
1047
  }
854
1048
  );
855
1049
  });
856
1050
  }
857
1051
  }
858
- setRenderState(e) {
1052
+ setRenderState(t) {
859
1053
  const { invoke: n, events: s } = this.container.get("$widget");
860
1054
  return Promise.all([
861
- V(this.container, H, _.Necessary, {
1055
+ V(this.container, K, I.Necessary, {
862
1056
  medium: v.Session
863
1057
  }),
864
- V(this.container, H, _.Necessary, {
1058
+ V(this.container, K, I.Necessary, {
865
1059
  medium: v.Local,
866
1060
  duration: { minutes: 5 }
867
1061
  }),
868
1062
  this.container.getAsync("router"),
869
1063
  n("renderState")
870
- ]).then(([i, o, r, c]) => {
871
- e === "unset" || !e ? (o(), i()) : (r.isSticky() && o(e), i(e)), s.dispatch("widget:render-state-changed", {
1064
+ ]).then(([o, i, r, c]) => {
1065
+ t === "unset" || !t ? (i(), o()) : (r.isSticky() && i(t), o(t)), s.dispatch("widget:render-state-changed", {
872
1066
  previous: c,
873
- next: e
1067
+ next: t
874
1068
  });
875
1069
  });
876
1070
  }
877
1071
  onOpen() {
878
- return this.container.getAsync("router").then((e) => (this.outlets.forEach(
1072
+ return this.container.getAsync("router").then((t) => (this.outlets.forEach(
879
1073
  (n) => {
880
1074
  var s;
881
1075
  return (s = n.options.triggerDOMElement) == null ? void 0 : s.setAttribute("aria-expanded", "true");
882
1076
  }
883
- ), e.start()));
1077
+ ), t.start()));
884
1078
  }
885
1079
  onClose() {
886
- const e = this.container.getManyAsync("router", "components");
1080
+ const t = this.container.getManyAsync("router", "components");
887
1081
  return (() => this.container.get("settings").then((s) => {
888
- const { activate: i } = this.container.get("$settings");
889
- return s.activate !== i ? this.setSettings(() => Promise.resolve({ activate: i })) : Promise.resolve();
890
- }))().then(() => e).then(
1082
+ const { activate: o } = this.container.get("$settings");
1083
+ return s.activate !== o ? this.setSettings(() => Promise.resolve({ activate: o })) : Promise.resolve();
1084
+ }))().then(() => t).then(
891
1085
  ({
892
1086
  router: s,
893
- components: i
1087
+ components: o
894
1088
  }) => {
895
- const o = i.nodes.visible;
1089
+ const i = o.nodes.visible;
896
1090
  return this.outlets.forEach(
897
1091
  (r) => {
898
1092
  var c;
899
1093
  return (c = r.options.triggerDOMElement) == null ? void 0 : c.setAttribute("aria-expanded", "false");
900
1094
  }
901
- ), o.filter(
1095
+ ), i.filter(
902
1096
  (r) => r.attributes.properties.animation && r.attributes.properties.animation !== "none"
903
1097
  ).length ? new Promise((r) => {
904
1098
  setTimeout(() => {
@@ -908,38 +1102,40 @@ class Jt extends Je {
908
1102
  }
909
1103
  ).then((s) => s.stop());
910
1104
  }
911
- setTriggerState(e) {
1105
+ setTriggerState(t) {
912
1106
  this.outlets.forEach((n) => {
913
1107
  const {
914
- options: { triggerDOMElement: s, triggerOptions: i }
915
- } = n, { openTooltip: o, closedTooltip: r } = i || {};
916
- s && (e ? ye(s, o) : At(s, r));
1108
+ options: { triggerDOMElement: s, triggerOptions: o }
1109
+ } = n, { openTooltip: i, closedTooltip: r } = o || {};
1110
+ s && (t ? xt(s, i) : We(s, r));
917
1111
  });
918
1112
  }
919
1113
  deactivate() {
920
1114
  this.subs.forEach((n) => n());
921
- const e = [];
922
- return this.outlets.forEach((n) => e.push(n.dispose())), $(
1115
+ const t = [];
1116
+ return this.outlets.forEach((n) => t.push(n.dispose())), N(
923
1117
  this.container,
924
- le,
1118
+ mt,
925
1119
  v.Local
926
1120
  ).then((n) => n === this.widget.name ? V(
927
1121
  this.container,
928
- le,
929
- _.Necessary,
1122
+ mt,
1123
+ I.Necessary,
930
1124
  {
931
1125
  medium: v.Local,
932
- scope: qe.Implementation
1126
+ scope: ae.Implementation
933
1127
  }
934
- ).then((s) => s()).then(() => Promise.all(e)) : Promise.all(e));
1128
+ ).then((s) => s()).then(() => Promise.all(t)) : Promise.all(t));
935
1129
  }
936
1130
  }
937
1131
  export {
938
- te as Component,
939
- bt as DetachedComponent,
940
- Jt as GridWidget,
941
- Zt as NotFound,
942
- Jt as Widget,
943
- U as genericComponentStyling
1132
+ it as Component,
1133
+ Ne as DetachedComponent,
1134
+ En as GridWidget,
1135
+ wn as NotFound,
1136
+ En as Widget,
1137
+ P as WidgetComponent,
1138
+ Z as genericComponentStyling,
1139
+ vn as resolveComponent
944
1140
  };
945
1141
  //# sourceMappingURL=index.js.map