@moser-inc/moser-labs-custom-elements 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,30 +10,33 @@ npm i @moser-inc/moser-labs-custom-elements
10
10
 
11
11
  ## Usage
12
12
 
13
- For these custom elements to function properly, you must first authenticate the user with Keycloak and call the provided `authenticateCustomElements` function before registering.
13
+ For these custom elements to function properly, you must first authenticate the user with Keycloak before calling the provided `registerCustomElements` function, passing the Keycloak instance to it.
14
14
 
15
15
  ```ts
16
16
  import Keycloak from 'keycloak-js';
17
- import { authenticateCustomElements, registerCustomElements } from '@moser-inc/moser-labs-custom-elements';
17
+ import { registerCustomElements } from '@moser-inc/moser-labs-custom-elements';
18
18
 
19
19
  const keycloak = new Keycloak('/keycloak.json');
20
20
 
21
21
  keycloak.init({ onLoad: 'login-required' }).then((isAuthenticated) => {
22
22
  if (!isAuthenticated) return;
23
23
 
24
- authenticateCustomElements(keycloak);
25
- registerCustomElements();
24
+ registerCustomElements({ keycloak });
26
25
  });
27
26
  ```
28
27
 
29
- For greater flexibility, you are also able to import and define each custom element individually rather than registering them all at once.
28
+ ## API
29
+
30
+ In order for the custom elements to use the correct instance for calling API endpoints and getting profile pictures, pass the `apiUri` option to `registerCustomElements`, using an environment variable for it to be dynamic between staging and production. It defaults to using `window.location.origin`.
30
31
 
31
32
  ```ts
32
- import { LabsAppSwitcher, registerCustomElements } from '@moser-inc/moser-labs-custom-elements';
33
+ registerCustomElements({ keycloak, apiUri: import.meta.env.VITE_API_URI });
34
+ ```
33
35
 
34
- // Register all custom elements at once
35
- registerCustomElements();
36
+ ## External
36
37
 
37
- // Or register each custom element individually as needed
38
- customElements.register('labs-app-switcher', LabsAppSwitcher);
38
+ When using a Vue + PrimeVue based application, a version of the package is provided that marks these dependencies as external to drastically reduce the bundle size.
39
+
40
+ ```ts
41
+ import { registerCustomElements } from '@moser-inc/moser-labs-custom-elements/external';
39
42
  ```
@@ -1,10 +1,10 @@
1
1
  var X = Object.defineProperty;
2
2
  var Z = (a, r, s) => r in a ? X(a, r, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[r] = s;
3
- var y = (a, r, s) => Z(a, typeof r != "symbol" ? r + "" : r, s);
3
+ var A = (a, r, s) => Z(a, typeof r != "symbol" ? r + "" : r, s);
4
4
  import ee from "primevue/config";
5
5
  import te from "primevue/tooltip";
6
- import * as V from "vue";
7
- import { inject as se, defineComponent as T, toRef as b, ref as R, computed as g, openBlock as C, createBlock as O, unref as v, createElementBlock as S, Fragment as I, createVNode as E, withCtx as L, createElementVNode as A, toDisplayString as P, resolveDirective as oe, withDirectives as ne, createSlots as re, mergeProps as ie, normalizeClass as B, createCommentVNode as z, createTextVNode as ae, getCurrentInstance as le, nextTick as ce, render as F, h as ue } from "vue";
6
+ import * as B from "vue";
7
+ import { inject as se, defineComponent as M, toRef as b, ref as T, computed as g, openBlock as y, createBlock as D, unref as v, createElementBlock as C, Fragment as R, createVNode as E, withCtx as P, createElementVNode as x, toDisplayString as S, createCommentVNode as I, resolveDirective as oe, withDirectives as ne, createSlots as re, mergeProps as ie, normalizeClass as z, createTextVNode as ae, getCurrentInstance as le, nextTick as ce, render as F, h as ue } from "vue";
8
8
  import G from "primevue/button";
9
9
  import pe from "primevue/divider";
10
10
  import W from "primevue/menu";
@@ -12,8 +12,8 @@ import { useEventListener as de, useFetch as fe, createEventHook as he } from "@
12
12
  import me from "primevue/avatar";
13
13
  import _e from "primevue/inlinemessage";
14
14
  import be from "primevue/progressspinner";
15
- import { extend as H, isArray as K, camelize as M, toNumber as q, hyphenate as x } from "@vue/shared";
16
- const J = Symbol("labs-custom-elements-options"), D = () => {
15
+ import { extend as H, isArray as K, camelize as O, toNumber as q, hyphenate as L } from "@vue/shared";
16
+ const J = Symbol("labs-custom-elements-options"), $ = () => {
17
17
  const a = se(J);
18
18
  if (!a)
19
19
  throw new Error("useCeOptions(): could not find custom elements options!");
@@ -21,7 +21,7 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
21
21
  ...a,
22
22
  apiUri: a.apiUri || window.location.origin
23
23
  };
24
- }, ve = /* @__PURE__ */ T({
24
+ }, ve = /* @__PURE__ */ M({
25
25
  inheritAttrs: !1,
26
26
  __name: "LabsAvatar.ce",
27
27
  props: {
@@ -32,53 +32,62 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
32
32
  shape: { type: null }
33
33
  },
34
34
  setup(a) {
35
- const r = a, { apiUri: s } = D(), t = b(() => r.userId), e = R(), o = g(() => {
35
+ const r = a, { apiUri: s } = $(), t = b(() => r.userId), e = T(), o = g(() => {
36
36
  if (!e.value) return;
37
- const p = e.value.$el;
38
- if (!p) return;
39
- const h = p.querySelector("img");
37
+ const d = e.value.$el;
38
+ if (!d) return;
39
+ const h = d.querySelector("img");
40
40
  if (h)
41
41
  return h;
42
- }), n = R(!0);
42
+ }), n = T(!0);
43
43
  de(o, "error", () => n.value = !1);
44
44
  const u = b(() => `${s}/api/users/${t.value}/photo`), f = g(() => {
45
45
  var i, m;
46
- const p = ((i = r.firstName) == null ? void 0 : i.charAt(0).toLocaleUpperCase()) ?? "", h = ((m = r.lastName) == null ? void 0 : m.charAt(0).toLocaleUpperCase()) ?? "";
47
- return `${p}${h}`;
48
- }), d = g(() => {
46
+ const d = ((i = r.firstName) == null ? void 0 : i.charAt(0).toLocaleUpperCase()) ?? "", h = ((m = r.lastName) == null ? void 0 : m.charAt(0).toLocaleUpperCase()) ?? "";
47
+ return `${d}${h}`;
48
+ }), p = g(() => {
49
49
  if (!n.value)
50
50
  return f.value;
51
51
  }), _ = g(() => {
52
52
  if (n.value)
53
53
  return u.value;
54
54
  }), c = g(() => {
55
- if (!(n.value || d.value))
55
+ if (!(n.value || p.value))
56
56
  return "pi-user";
57
57
  });
58
- return (p, h) => (C(), O(v(me), {
58
+ return (d, h) => (y(), D(v(me), {
59
59
  ref_key: "avatarRef",
60
60
  ref: e,
61
- size: p.size,
62
- shape: p.shape,
63
- label: d.value,
61
+ size: d.size,
62
+ shape: d.shape,
63
+ label: p.value,
64
64
  image: _.value,
65
65
  icon: c.value,
66
66
  pt: { image: "size-full rounded-inherit object-cover" }
67
67
  }, null, 8, ["size", "shape", "label", "image", "icon"]));
68
68
  }
69
- }), ge = "", $ = (a, r) => {
69
+ }), ge = "", U = (a, r) => {
70
70
  const s = a.__vccOpts || a;
71
71
  for (const [t, e] of r)
72
72
  s[t] = e;
73
73
  return s;
74
- }, Y = /* @__PURE__ */ $(ve, [["styles", [ge]]]), ye = "moser-labs-web", Ae = Object.freeze({
74
+ }, Y = /* @__PURE__ */ U(ve, [["styles", [ge]]]), ye = "moser-labs-web", Ae = Object.freeze({
75
75
  SUPER_ADMIN: "super-admin",
76
76
  TENANT_ADMIN: "tenant-admin"
77
- }), Ee = { class: "flex flex-col break-words px-5 py-3 line-height-relaxed" }, we = { class: "font-bold" }, ke = { class: "text-sm text-color-secondary" }, Ce = { class: "text-xs text-color-secondary" }, Ne = /* @__PURE__ */ T({
77
+ }), Ee = { class: "flex flex-col gap-1 break-words px-5 py-3 leading-tight" }, ke = {
78
+ key: 0,
79
+ class: "text-base font-bold leading-inherit"
80
+ }, we = {
81
+ key: 1,
82
+ class: "text-sm text-color-secondary leading-inherit"
83
+ }, Ce = {
84
+ key: 2,
85
+ class: "text-xs text-color-secondary leading-inherit"
86
+ }, Ne = /* @__PURE__ */ M({
78
87
  inheritAttrs: !1,
79
88
  __name: "LabsAccount.ce",
80
89
  setup(a) {
81
- const { keycloak: r, apiUri: s } = D(), t = b(() => r.tokenParsed), e = b(() => {
90
+ const { keycloak: r, apiUri: s } = $(), t = b(() => r.tokenParsed), e = b(() => {
82
91
  var l;
83
92
  return ((l = t.value) == null ? void 0 : l.user_id) || "";
84
93
  }), o = b(() => {
@@ -93,7 +102,7 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
93
102
  }), f = b(() => {
94
103
  var l;
95
104
  return ((l = t.value) == null ? void 0 : l.job_title) || "";
96
- }), d = b(() => {
105
+ }), p = b(() => {
97
106
  var l;
98
107
  return ((l = t.value) == null ? void 0 : l.email) || "";
99
108
  }), _ = b(() => {
@@ -102,7 +111,7 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
102
111
  }), c = b(() => {
103
112
  var l;
104
113
  return ((l = _.value) == null ? void 0 : l.roles) ?? [];
105
- }), { SUPER_ADMIN: p, TENANT_ADMIN: h } = Ae, i = g(() => c.value.includes(p)), m = g(() => c.value.includes(h)), w = g(() => i.value || m.value), k = g(() => [
114
+ }), { SUPER_ADMIN: d, TENANT_ADMIN: h } = Ae, i = g(() => c.value.includes(d)), m = g(() => c.value.includes(h)), k = g(() => i.value || m.value), w = g(() => [
106
115
  {
107
116
  label: "Profile",
108
117
  icon: "pi-user",
@@ -112,18 +121,18 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
112
121
  label: "Admin",
113
122
  icon: "pi-shield",
114
123
  url: `${s}/admin`,
115
- visible: w.value
124
+ visible: k.value
116
125
  },
117
126
  {
118
127
  label: "Logout",
119
128
  icon: "pi-sign-out",
120
129
  command: () => r.logout({ redirectUri: `${s}/login` })
121
130
  }
122
- ]), j = R(), Q = (l) => {
131
+ ]), V = T(), Q = (l) => {
123
132
  var N;
124
- return (N = j.value) == null ? void 0 : N.toggle(l);
133
+ return (N = V.value) == null ? void 0 : N.toggle(l);
125
134
  };
126
- return (l, N) => (C(), S(I, null, [
135
+ return (l, N) => (y(), C(R, null, [
127
136
  E(v(G), {
128
137
  "aria-label": `Signed in as ${u.value} - toggle account menu`,
129
138
  "aria-haspopup": "",
@@ -131,7 +140,7 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
131
140
  class: "border-0 bg-transparent p-0 text-inherit",
132
141
  onClick: Q
133
142
  }, {
134
- default: L(() => [
143
+ default: P(() => [
135
144
  E(Y, {
136
145
  "user-id": e.value,
137
146
  "first-name": o.value,
@@ -143,17 +152,17 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
143
152
  E(v(W), {
144
153
  id: "account-menu",
145
154
  ref_key: "menuRef",
146
- ref: j,
155
+ ref: V,
147
156
  "aria-label": "Account",
148
- model: k.value,
157
+ model: w.value,
149
158
  popup: "",
150
159
  class: "mt-2 w-50"
151
160
  }, {
152
- start: L(() => [
153
- A("div", Ee, [
154
- A("span", we, P(u.value), 1),
155
- A("span", ke, P(f.value), 1),
156
- A("span", Ce, P(d.value), 1)
161
+ start: P(() => [
162
+ x("div", Ee, [
163
+ u.value ? (y(), C("span", ke, S(u.value), 1)) : I("", !0),
164
+ f.value ? (y(), C("span", we, S(f.value), 1)) : I("", !0),
165
+ p.value ? (y(), C("span", Ce, S(p.value), 1)) : I("", !0)
157
166
  ]),
158
167
  E(v(pe), { class: "my-1" })
159
168
  ]),
@@ -161,11 +170,11 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
161
170
  }, 8, ["model"])
162
171
  ], 64));
163
172
  }
164
- }), xe = "", Le = /* @__PURE__ */ $(Ne, [["styles", [xe]]]), Pe = ["href"], Se = { class: "text-xs leading-tight" }, Ie = { class: "p-button-label" }, Re = /* @__PURE__ */ T({
173
+ }), xe = "", Le = /* @__PURE__ */ U(Ne, [["styles", [xe]]]), Pe = ["href"], Se = { class: "text-xs leading-tight" }, Ie = { class: "p-button-label" }, Re = /* @__PURE__ */ M({
165
174
  inheritAttrs: !1,
166
175
  __name: "LabsAppSwitcher.ce",
167
176
  setup(a) {
168
- const { keycloak: r, apiUri: s } = D(), { data: t, isFetching: e, error: o } = fe(
177
+ const { keycloak: r, apiUri: s } = $(), { data: t, isFetching: e, error: o } = fe(
169
178
  () => `${s}/graphql`,
170
179
  {
171
180
  async beforeFetch(c) {
@@ -194,8 +203,8 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
194
203
  }
195
204
  }
196
205
  ), n = b(() => {
197
- var c, p;
198
- return ((p = (c = t.value) == null ? void 0 : c.tenant) == null ? void 0 : p.apps) ?? [];
206
+ var c, d;
207
+ return ((d = (c = t.value) == null ? void 0 : c.tenant) == null ? void 0 : d.apps) ?? [];
199
208
  }), u = (c) => c ? {
200
209
  EATS: "i-mli-eats-badge",
201
210
  ENGAGEMENTS: "i-mli-engagements-badge",
@@ -212,20 +221,20 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
212
221
  href: h.url,
213
222
  label: h.name,
214
223
  icon: u(h.id)
215
- })), p = {
224
+ })), d = {
216
225
  variant: "button",
217
226
  href: s,
218
227
  label: "Moser Labs Dashboard",
219
228
  icon: "pi-arrow-right"
220
229
  };
221
- return [...c, p].filter((h) => !h.hidden);
222
- }), d = R(), _ = (c) => {
223
- var p;
224
- return (p = d.value) == null ? void 0 : p.toggle(c);
230
+ return [...c, d].filter((h) => !h.hidden);
231
+ }), p = T(), _ = (c) => {
232
+ var d;
233
+ return (d = p.value) == null ? void 0 : d.toggle(c);
225
234
  };
226
- return (c, p) => {
235
+ return (c, d) => {
227
236
  const h = oe("tooltip");
228
- return C(), S(I, null, [
237
+ return y(), C(R, null, [
229
238
  ne(E(v(G), {
230
239
  "aria-label": "App Switcher",
231
240
  "aria-haspopup": "",
@@ -246,7 +255,7 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
246
255
  E(v(W), {
247
256
  id: "app-switcher-menu",
248
257
  ref_key: "menuRef",
249
- ref: d,
258
+ ref: p,
250
259
  "aria-label": "Moser labs apps",
251
260
  model: f.value,
252
261
  popup: "",
@@ -261,44 +270,44 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
261
270
  content: "flex flex-col items-center rounded-xl transition-200"
262
271
  }
263
272
  }, re({
264
- item: L(({ item: i, props: m }) => [
265
- A("a", ie({
273
+ item: P(({ item: i, props: m }) => [
274
+ x("a", ie({
266
275
  href: i.href,
267
276
  class: ["w-full duration-150 !rounded-inherit !transition-background-color", {
268
277
  "flex flex-col gap-2 p-3 text-center text-color-secondary": i.variant === "app",
269
278
  "p-button p-button-text w-full rounded-xl color-inherit no-underline": i.variant === "button"
270
279
  }]
271
280
  }, m.action), [
272
- i.variant === "app" ? (C(), S(I, { key: 0 }, [
273
- A("i", {
274
- class: B([i.icon, "text-5xl"])
281
+ i.variant === "app" ? (y(), C(R, { key: 0 }, [
282
+ x("i", {
283
+ class: z([i.icon, "text-5xl"])
275
284
  }, null, 2),
276
- A("span", Se, P(i.label), 1)
277
- ], 64)) : i.variant === "button" ? (C(), S(I, { key: 1 }, [
278
- A("span", Ie, P(i.label), 1),
279
- A("i", {
280
- class: B([i.icon, "p-button-icon p-button-icon-right"])
285
+ x("span", Se, S(i.label), 1)
286
+ ], 64)) : i.variant === "button" ? (y(), C(R, { key: 1 }, [
287
+ x("span", Ie, S(i.label), 1),
288
+ x("i", {
289
+ class: z([i.icon, "p-button-icon p-button-icon-right"])
281
290
  }, null, 2)
282
- ], 64)) : z("", !0)
291
+ ], 64)) : I("", !0)
283
292
  ], 16, Pe)
284
293
  ]),
285
294
  _: 2
286
295
  }, [
287
296
  v(e) || v(o) ? {
288
297
  name: "start",
289
- fn: L(() => [
290
- v(e) ? (C(), O(v(be), {
298
+ fn: P(() => [
299
+ v(e) ? (y(), D(v(be), {
291
300
  key: 0,
292
301
  class: "m-8"
293
- })) : v(o) ? (C(), O(v(_e), {
302
+ })) : v(o) ? (y(), D(v(_e), {
294
303
  key: 1,
295
304
  severity: "error"
296
305
  }, {
297
- default: L(() => [
306
+ default: P(() => [
298
307
  ae(" Unable to load application list ")
299
308
  ]),
300
309
  _: 1
301
- })) : z("", !0)
310
+ })) : I("", !0)
302
311
  ]),
303
312
  key: "0"
304
313
  } : void 0
@@ -306,9 +315,9 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
306
315
  ], 64);
307
316
  };
308
317
  }
309
- }), Te = "", Me = /* @__PURE__ */ $(Re, [["styles", [Te]]]), Oe = (a) => {
318
+ }), Te = "", Me = /* @__PURE__ */ U(Re, [["styles", [Te]]]), Oe = (a) => {
310
319
  const r = le(), s = he();
311
- if (V.onBeforeUnmount(() => s.trigger(void 0)), !r)
320
+ if (B.onBeforeUnmount(() => s.trigger(void 0)), !r)
312
321
  throw new Error("useCeVueApp(): could not find vue instance!");
313
322
  const t = {
314
323
  version: "FAKE_APP_FOR_CE",
@@ -323,7 +332,7 @@ const J = Symbol("labs-custom-elements-options"), D = () => {
323
332
  return r.appContext.directives[e] = o, t;
324
333
  },
325
334
  provide(e, o) {
326
- return V.provide(e, o), t;
335
+ return B.provide(e, o), t;
327
336
  },
328
337
  onUnmount(e) {
329
338
  s.on(e);
@@ -347,13 +356,13 @@ const De = (() => {
347
356
  document.addEventListener(a, e);
348
357
  class o extends HTMLElement {
349
358
  static withParsedCallback(u, f = "parsed") {
350
- const { prototype: d } = u, { connectedCallback: _ } = d, c = f + "Callback", p = (i, m, w, k) => {
351
- m.disconnect(), w.removeEventListener(a, k), h(i);
359
+ const { prototype: p } = u, { connectedCallback: _ } = p, c = f + "Callback", d = (i, m, k, w) => {
360
+ m.disconnect(), k.removeEventListener(a, w), h(i);
352
361
  }, h = (i) => {
353
362
  s.length || requestAnimationFrame(e), s.push([i, c]);
354
363
  };
355
364
  return Object.defineProperties(
356
- d,
365
+ p,
357
366
  {
358
367
  connectedCallback: {
359
368
  configurable: !0,
@@ -364,12 +373,12 @@ const De = (() => {
364
373
  if (r.set(i, !1), m.readyState === "complete" || t(i))
365
374
  h(i);
366
375
  else {
367
- const w = () => p(i, k, m, w);
368
- m.addEventListener(a, w);
369
- const k = new MutationObserver(() => {
370
- t(i) && p(i, k, m, w);
376
+ const k = () => d(i, w, m, k);
377
+ m.addEventListener(a, k);
378
+ const w = new MutationObserver(() => {
379
+ t(i) && d(i, w, m, k);
371
380
  });
372
- k.observe(i.parentNode, { childList: !0, subtree: !0 });
381
+ w.observe(i.parentNode, { childList: !0, subtree: !0 });
373
382
  }
374
383
  }
375
384
  }
@@ -389,29 +398,29 @@ const De = (() => {
389
398
  /*! #__NO_SIDE_EFFECTS__ */
390
399
  // @__NO_SIDE_EFFECTS__
391
400
  function $e(a, r, s) {
392
- const t = T(a);
393
- class e extends U {
401
+ const t = M(a);
402
+ class e extends j {
394
403
  constructor(n) {
395
404
  super(t, n, r, s);
396
405
  }
397
406
  }
398
- return y(e, "def", t), e;
407
+ return A(e, "def", t), e;
399
408
  }
400
409
  const Ue = typeof HTMLElement < "u" ? De : class {
401
410
  };
402
- class U extends Ue {
411
+ class j extends Ue {
403
412
  constructor(s, t = {}, e = {}, o) {
404
413
  super();
405
414
  /**
406
415
  * @internal
407
416
  */
408
- y(this, "_instance", null);
409
- y(this, "_connected", !1);
410
- y(this, "_resolved", !1);
411
- y(this, "_numberProps", null);
412
- y(this, "_styles");
413
- y(this, "_slots");
414
- y(this, "_ob", null);
417
+ A(this, "_instance", null);
418
+ A(this, "_connected", !1);
419
+ A(this, "_resolved", !1);
420
+ A(this, "_numberProps", null);
421
+ A(this, "_styles");
422
+ A(this, "_slots");
423
+ A(this, "_ob", null);
415
424
  this._def = s, this._props = t, this._config = e, this._config = H(
416
425
  {
417
426
  shadowRoot: !0
@@ -454,12 +463,12 @@ class U extends Ue {
454
463
  const { props: n, styles: u } = e;
455
464
  let f;
456
465
  if (n && !K(n))
457
- for (const d in n) {
458
- const _ = n[d];
459
- (_ === Number || _ && _.type === Number) && (d in this._props && (this._props[d] = q(this._props[d])), (f || (f = /* @__PURE__ */ Object.create(null)))[M(d)] = !0);
466
+ for (const p in n) {
467
+ const _ = n[p];
468
+ (_ === Number || _ && _.type === Number) && (p in this._props && (this._props[p] = q(this._props[p])), (f || (f = /* @__PURE__ */ Object.create(null)))[O(p)] = !0);
460
469
  }
461
470
  this._numberProps = f, o && this._resolveProps(e), this._config.shadowRoot || (this._slots = Array.from(this.children).map(
462
- (d) => d.cloneNode(!0)
471
+ (p) => p.cloneNode(!0)
463
472
  ), this.replaceChildren()), this._applyStyles(u), this._update();
464
473
  }, t = this._def.__asyncLoader;
465
474
  t ? t().then((e) => s(e, !0)) : s(this._def);
@@ -468,7 +477,7 @@ class U extends Ue {
468
477
  const { props: t } = s, e = K(t) ? t : Object.keys(t || {});
469
478
  for (const o of Object.keys(this))
470
479
  o[0] !== "_" && e.includes(o) && this._setProp(o, this[o], !0, !1);
471
- for (const o of e.map(M))
480
+ for (const o of e.map(O))
472
481
  Object.defineProperty(this, o, {
473
482
  get() {
474
483
  return this._getProp(o);
@@ -480,7 +489,7 @@ class U extends Ue {
480
489
  }
481
490
  _setAttr(s) {
482
491
  let t = this.getAttribute(s);
483
- const e = M(s);
492
+ const e = O(s);
484
493
  this._numberProps && this._numberProps[e] && (t = q(t)), this._setProp(e, t, !1);
485
494
  }
486
495
  /**
@@ -493,7 +502,7 @@ class U extends Ue {
493
502
  * @internal
494
503
  */
495
504
  _setProp(s, t, e = !0, o = !0) {
496
- t !== this._props[s] && (this._props[s] = t, o && this._instance && this._update(), e && (t === !0 ? this.setAttribute(x(s), "") : typeof t == "string" || typeof t == "number" ? this.setAttribute(x(s), t + "") : t || this.removeAttribute(x(s))));
505
+ t !== this._props[s] && (this._props[s] = t, o && this._instance && this._update(), e && (t === !0 ? this.setAttribute(L(s), "") : typeof t == "string" || typeof t == "number" ? this.setAttribute(L(s), t + "") : t || this.removeAttribute(L(s))));
497
506
  }
498
507
  _update() {
499
508
  F(this._createVNode(), this._root);
@@ -504,8 +513,8 @@ class U extends Ue {
504
513
  const e = (o) => {
505
514
  const n = {};
506
515
  for (let u = 0, f = o.length; u < f; u++) {
507
- const d = o[u];
508
- n[d.nodeName] = d.nodeValue;
516
+ const p = o[u];
517
+ n[p.nodeName] = p.nodeValue;
509
518
  }
510
519
  return n;
511
520
  };
@@ -525,11 +534,11 @@ class U extends Ue {
525
534
  );
526
535
  };
527
536
  e.emit = (u, ...f) => {
528
- o(u, f), x(u) !== u && o(x(u), f);
537
+ o(u, f), L(u) !== u && o(L(u), f);
529
538
  };
530
539
  let n = this;
531
540
  for (; n = n && (n.parentNode || n.host); )
532
- if (n instanceof U) {
541
+ if (n instanceof j) {
533
542
  e.parent = n._instance, e.provides = n._instance.provides;
534
543
  break;
535
544
  }