@rijkshuisstijl-community/web-components-stencil 1.0.0-alpha.4 → 1.0.0-alpha.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/index-79e96916.js +1148 -0
  4. package/dist/cjs/index-79e96916.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +4 -2
  6. package/dist/cjs/loader.cjs.js.map +1 -1
  7. package/dist/cjs/rhc-icon-arrow-right.cjs.entry.js +7 -7
  8. package/dist/cjs/rhc-icon-arrow-right.cjs.entry.js.map +1 -1
  9. package/dist/cjs/rhc-icon-calendar.cjs.entry.js +7 -7
  10. package/dist/cjs/rhc-icon-calendar.cjs.entry.js.map +1 -1
  11. package/dist/cjs/rhc-icon-error.cjs.entry.js +7 -7
  12. package/dist/cjs/rhc-icon-error.cjs.entry.js.map +1 -1
  13. package/dist/cjs/rhc-icon-info_2.cjs.entry.js +19 -18
  14. package/dist/cjs/rhc-icon-info_2.cjs.entry.js.map +1 -1
  15. package/dist/cjs/rhc-icon-success.cjs.entry.js +7 -7
  16. package/dist/cjs/rhc-icon-success.cjs.entry.js.map +1 -1
  17. package/dist/cjs/rhc-icon-warning.cjs.entry.js +7 -7
  18. package/dist/cjs/rhc-icon-warning.cjs.entry.js.map +1 -1
  19. package/dist/cjs/rhc.cjs.js +12 -10
  20. package/dist/cjs/rhc.cjs.js.map +1 -1
  21. package/dist/collection/collection-manifest.json +2 -2
  22. package/dist/collection/icon-arrow-right/stencil.js +5 -5
  23. package/dist/collection/icon-arrow-right/stencil.js.map +1 -1
  24. package/dist/collection/icon-calendar/stencil.js +5 -5
  25. package/dist/collection/icon-calendar/stencil.js.map +1 -1
  26. package/dist/collection/icon-error/stencil.js +5 -5
  27. package/dist/collection/icon-error/stencil.js.map +1 -1
  28. package/dist/collection/icon-info/stencil.js +5 -5
  29. package/dist/collection/icon-info/stencil.js.map +1 -1
  30. package/dist/collection/icon-success/stencil.js +5 -5
  31. package/dist/collection/icon-success/stencil.js.map +1 -1
  32. package/dist/collection/icon-warning/stencil.js +5 -5
  33. package/dist/collection/icon-warning/stencil.js.map +1 -1
  34. package/dist/collection/logo.css +48 -22
  35. package/dist/collection/logo.stencil.js +58 -58
  36. package/dist/collection/logo.stencil.js.map +1 -1
  37. package/dist/components/index.js +15 -15
  38. package/dist/components/rhc-icon-arrow-right.d.ts +2 -2
  39. package/dist/components/rhc-icon-arrow-right.js +19 -19
  40. package/dist/components/rhc-icon-arrow-right.js.map +1 -1
  41. package/dist/components/rhc-icon-calendar.d.ts +2 -2
  42. package/dist/components/rhc-icon-calendar.js +19 -19
  43. package/dist/components/rhc-icon-calendar.js.map +1 -1
  44. package/dist/components/rhc-icon-error.d.ts +2 -2
  45. package/dist/components/rhc-icon-error.js +19 -19
  46. package/dist/components/rhc-icon-error.js.map +1 -1
  47. package/dist/components/rhc-icon-info.d.ts +2 -2
  48. package/dist/components/rhc-icon-info.js +19 -19
  49. package/dist/components/rhc-icon-info.js.map +1 -1
  50. package/dist/components/rhc-icon-success.d.ts +2 -2
  51. package/dist/components/rhc-icon-success.js +19 -19
  52. package/dist/components/rhc-icon-success.js.map +1 -1
  53. package/dist/components/rhc-icon-warning.d.ts +2 -2
  54. package/dist/components/rhc-icon-warning.js +19 -19
  55. package/dist/components/rhc-icon-warning.js.map +1 -1
  56. package/dist/components/rhc-logo.d.ts +2 -2
  57. package/dist/components/rhc-logo.js +28 -27
  58. package/dist/components/rhc-logo.js.map +1 -1
  59. package/dist/esm/app-globals-0f993ce5.js +5 -0
  60. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  61. package/dist/esm/index-0eb79357.js +1122 -0
  62. package/dist/esm/index-0eb79357.js.map +1 -0
  63. package/dist/esm/loader.js +5 -3
  64. package/dist/esm/loader.js.map +1 -1
  65. package/dist/esm/rhc-icon-arrow-right.entry.js +7 -7
  66. package/dist/esm/rhc-icon-arrow-right.entry.js.map +1 -1
  67. package/dist/esm/rhc-icon-calendar.entry.js +7 -7
  68. package/dist/esm/rhc-icon-calendar.entry.js.map +1 -1
  69. package/dist/esm/rhc-icon-error.entry.js +7 -7
  70. package/dist/esm/rhc-icon-error.entry.js.map +1 -1
  71. package/dist/esm/rhc-icon-info_2.entry.js +19 -18
  72. package/dist/esm/rhc-icon-info_2.entry.js.map +1 -1
  73. package/dist/esm/rhc-icon-success.entry.js +7 -7
  74. package/dist/esm/rhc-icon-success.entry.js.map +1 -1
  75. package/dist/esm/rhc-icon-warning.entry.js +7 -7
  76. package/dist/esm/rhc-icon-warning.entry.js.map +1 -1
  77. package/dist/esm/rhc.js +13 -11
  78. package/dist/esm/rhc.js.map +1 -1
  79. package/dist/rhc/index.esm.js.map +1 -1
  80. package/dist/rhc/p-0c06d3c7.entry.js +2 -0
  81. package/dist/rhc/p-0c06d3c7.entry.js.map +1 -0
  82. package/dist/rhc/p-0d031d9b.entry.js +2 -0
  83. package/dist/rhc/p-0d031d9b.entry.js.map +1 -0
  84. package/dist/rhc/p-566be07a.entry.js +2 -0
  85. package/dist/rhc/p-566be07a.entry.js.map +1 -0
  86. package/dist/rhc/p-5adfb6ac.entry.js +2 -0
  87. package/dist/rhc/p-5adfb6ac.entry.js.map +1 -0
  88. package/dist/rhc/p-62f5168e.js +3 -0
  89. package/dist/rhc/p-62f5168e.js.map +1 -0
  90. package/dist/rhc/p-90e047c1.entry.js +2 -0
  91. package/dist/rhc/p-90e047c1.entry.js.map +1 -0
  92. package/dist/rhc/p-994c6c79.entry.js +2 -0
  93. package/dist/rhc/p-994c6c79.entry.js.map +1 -0
  94. package/dist/rhc/p-e1255160.js +2 -0
  95. package/dist/rhc/p-e1255160.js.map +1 -0
  96. package/dist/rhc/rhc.esm.js +1 -1
  97. package/dist/rhc/rhc.esm.js.map +1 -1
  98. package/dist/src/icon-error/stencil.js +2 -8
  99. package/dist/src/icon-error/stencil.js.map +1 -1
  100. package/dist/src/icon-info/stencil.js +4 -6
  101. package/dist/src/icon-info/stencil.js.map +1 -1
  102. package/dist/src/icon-success/stencil.js +2 -4
  103. package/dist/src/icon-success/stencil.js.map +1 -1
  104. package/dist/src/icon-warning/stencil.js +2 -6
  105. package/dist/src/icon-warning/stencil.js.map +1 -1
  106. package/dist/types/icon-arrow-right/stencil.d.ts +1 -1
  107. package/dist/types/icon-calendar/stencil.d.ts +1 -1
  108. package/dist/types/icon-error/stencil.d.ts +1 -1
  109. package/dist/types/icon-info/stencil.d.ts +1 -1
  110. package/dist/types/icon-success/stencil.d.ts +1 -1
  111. package/dist/types/icon-warning/stencil.d.ts +1 -1
  112. package/dist/types/logo.stencil.d.ts +3 -3
  113. package/dist/types/stencil-public-runtime.d.ts +11 -10
  114. package/loader/cdn.js +1 -3
  115. package/loader/index.cjs.js +1 -3
  116. package/loader/index.d.ts +3 -0
  117. package/loader/index.es2017.js +1 -3
  118. package/loader/index.js +1 -3
  119. package/package.json +12 -11
  120. package/dist/cjs/index-6abd9e3a.js +0 -1648
  121. package/dist/cjs/index-6abd9e3a.js.map +0 -1
  122. package/dist/esm/index-a0c70ca0.js +0 -1622
  123. package/dist/esm/index-a0c70ca0.js.map +0 -1
  124. package/dist/esm/polyfills/core-js.js +0 -11
  125. package/dist/esm/polyfills/dom.js +0 -79
  126. package/dist/esm/polyfills/es5-html-element.js +0 -1
  127. package/dist/esm/polyfills/index.js +0 -34
  128. package/dist/esm/polyfills/system.js +0 -6
  129. package/dist/rhc/p-11cacb44.entry.js +0 -2
  130. package/dist/rhc/p-11cacb44.entry.js.map +0 -1
  131. package/dist/rhc/p-6ff329f1.entry.js +0 -2
  132. package/dist/rhc/p-6ff329f1.entry.js.map +0 -1
  133. package/dist/rhc/p-74d5e7fb.js +0 -3
  134. package/dist/rhc/p-74d5e7fb.js.map +0 -1
  135. package/dist/rhc/p-80f1e438.entry.js +0 -2
  136. package/dist/rhc/p-80f1e438.entry.js.map +0 -1
  137. package/dist/rhc/p-c053a5fc.entry.js +0 -2
  138. package/dist/rhc/p-c053a5fc.entry.js.map +0 -1
  139. package/dist/rhc/p-d056e80b.entry.js +0 -2
  140. package/dist/rhc/p-d056e80b.entry.js.map +0 -1
  141. package/dist/rhc/p-e7742379.entry.js +0 -2
  142. package/dist/rhc/p-e7742379.entry.js.map +0 -1
@@ -0,0 +1,1122 @@
1
+ const NAMESPACE = 'rhc';
2
+ const BUILD = /* rhc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
3
+
4
+ /*
5
+ Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
6
+ */
7
+ var __defProp = Object.defineProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var hostRefs = /* @__PURE__ */ new WeakMap();
13
+ var getHostRef = (ref) => hostRefs.get(ref);
14
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
15
+ var registerHost = (hostElement, cmpMeta) => {
16
+ const hostRef = {
17
+ $flags$: 0,
18
+ $hostElement$: hostElement,
19
+ $cmpMeta$: cmpMeta,
20
+ $instanceValues$: /* @__PURE__ */ new Map()
21
+ };
22
+ {
23
+ hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
24
+ hostElement["s-p"] = [];
25
+ hostElement["s-rc"] = [];
26
+ }
27
+ return hostRefs.set(hostElement, hostRef);
28
+ };
29
+ var isMemberInElement = (elm, memberName) => memberName in elm;
30
+ var consoleError = (e, el) => (0, console.error)(e, el);
31
+
32
+ // src/client/client-load-module.ts
33
+ var cmpModules = /* @__PURE__ */ new Map();
34
+ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
35
+ const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
36
+ const bundleId = cmpMeta.$lazyBundleId$;
37
+ if (!bundleId) {
38
+ return void 0;
39
+ }
40
+ const module = cmpModules.get(bundleId) ;
41
+ if (module) {
42
+ return module[exportName];
43
+ }
44
+
45
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
46
+ const processMod = importedModule => {
47
+ cmpModules.set(bundleId, importedModule);
48
+ return importedModule[exportName];
49
+ }
50
+ switch(bundleId) {
51
+
52
+ case 'rhc-icon-info_2':
53
+ return import(
54
+ /* webpackMode: "lazy" */
55
+ './rhc-icon-info_2.entry.js').then(processMod, consoleError);
56
+ case 'rhc-icon-arrow-right':
57
+ return import(
58
+ /* webpackMode: "lazy" */
59
+ './rhc-icon-arrow-right.entry.js').then(processMod, consoleError);
60
+ case 'rhc-icon-calendar':
61
+ return import(
62
+ /* webpackMode: "lazy" */
63
+ './rhc-icon-calendar.entry.js').then(processMod, consoleError);
64
+ case 'rhc-icon-error':
65
+ return import(
66
+ /* webpackMode: "lazy" */
67
+ './rhc-icon-error.entry.js').then(processMod, consoleError);
68
+ case 'rhc-icon-success':
69
+ return import(
70
+ /* webpackMode: "lazy" */
71
+ './rhc-icon-success.entry.js').then(processMod, consoleError);
72
+ case 'rhc-icon-warning':
73
+ return import(
74
+ /* webpackMode: "lazy" */
75
+ './rhc-icon-warning.entry.js').then(processMod, consoleError);
76
+ }
77
+ }
78
+ return import(
79
+ /* @vite-ignore */
80
+ /* webpackInclude: /\.entry\.js$/ */
81
+ /* webpackExclude: /\.system\.entry\.js$/ */
82
+ /* webpackMode: "lazy" */
83
+ `./${bundleId}.entry.js${""}`
84
+ ).then((importedModule) => {
85
+ {
86
+ cmpModules.set(bundleId, importedModule);
87
+ }
88
+ return importedModule[exportName];
89
+ }, consoleError);
90
+ };
91
+
92
+ // src/client/client-style.ts
93
+ var styles = /* @__PURE__ */ new Map();
94
+ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
95
+ var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
96
+ var win = typeof window !== "undefined" ? window : {};
97
+ var doc = win.document || { head: {} };
98
+ var plt = {
99
+ $flags$: 0,
100
+ $resourcesUrl$: "",
101
+ jmp: (h2) => h2(),
102
+ raf: (h2) => requestAnimationFrame(h2),
103
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
104
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
105
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
106
+ };
107
+ var promiseResolve = (v) => Promise.resolve(v);
108
+ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
109
+ try {
110
+ new CSSStyleSheet();
111
+ return typeof new CSSStyleSheet().replaceSync === "function";
112
+ } catch (e) {
113
+ }
114
+ return false;
115
+ })() ;
116
+ var queuePending = false;
117
+ var queueDomReads = [];
118
+ var queueDomWrites = [];
119
+ var queueTask = (queue, write) => (cb) => {
120
+ queue.push(cb);
121
+ if (!queuePending) {
122
+ queuePending = true;
123
+ if (write && plt.$flags$ & 4 /* queueSync */) {
124
+ nextTick(flush);
125
+ } else {
126
+ plt.raf(flush);
127
+ }
128
+ }
129
+ };
130
+ var consume = (queue) => {
131
+ for (let i2 = 0; i2 < queue.length; i2++) {
132
+ try {
133
+ queue[i2](performance.now());
134
+ } catch (e) {
135
+ consoleError(e);
136
+ }
137
+ }
138
+ queue.length = 0;
139
+ };
140
+ var flush = () => {
141
+ consume(queueDomReads);
142
+ {
143
+ consume(queueDomWrites);
144
+ if (queuePending = queueDomReads.length > 0) {
145
+ plt.raf(flush);
146
+ }
147
+ }
148
+ };
149
+ var nextTick = (cb) => promiseResolve().then(cb);
150
+ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
151
+
152
+ // src/utils/constants.ts
153
+ var EMPTY_OBJ = {};
154
+ var SVG_NS = "http://www.w3.org/2000/svg";
155
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
156
+
157
+ // src/utils/helpers.ts
158
+ var isDef = (v) => v != null;
159
+ var isComplexType = (o) => {
160
+ o = typeof o;
161
+ return o === "object" || o === "function";
162
+ };
163
+
164
+ // src/utils/query-nonce-meta-tag-content.ts
165
+ function queryNonceMetaTagContent(doc2) {
166
+ var _a, _b, _c;
167
+ return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
168
+ }
169
+
170
+ // src/utils/result.ts
171
+ var result_exports = {};
172
+ __export(result_exports, {
173
+ err: () => err,
174
+ map: () => map,
175
+ ok: () => ok,
176
+ unwrap: () => unwrap,
177
+ unwrapErr: () => unwrapErr
178
+ });
179
+ var ok = (value) => ({
180
+ isOk: true,
181
+ isErr: false,
182
+ value
183
+ });
184
+ var err = (value) => ({
185
+ isOk: false,
186
+ isErr: true,
187
+ value
188
+ });
189
+ function map(result, fn) {
190
+ if (result.isOk) {
191
+ const val = fn(result.value);
192
+ if (val instanceof Promise) {
193
+ return val.then((newVal) => ok(newVal));
194
+ } else {
195
+ return ok(val);
196
+ }
197
+ }
198
+ if (result.isErr) {
199
+ const value = result.value;
200
+ return err(value);
201
+ }
202
+ throw "should never get here";
203
+ }
204
+ var unwrap = (result) => {
205
+ if (result.isOk) {
206
+ return result.value;
207
+ } else {
208
+ throw result.value;
209
+ }
210
+ };
211
+ var unwrapErr = (result) => {
212
+ if (result.isErr) {
213
+ return result.value;
214
+ } else {
215
+ throw result.value;
216
+ }
217
+ };
218
+ var createTime = (fnName, tagName = "") => {
219
+ {
220
+ return () => {
221
+ return;
222
+ };
223
+ }
224
+ };
225
+ var uniqueTime = (key, measureText) => {
226
+ {
227
+ return () => {
228
+ return;
229
+ };
230
+ }
231
+ };
232
+ var h = (nodeName, vnodeData, ...children) => {
233
+ let child = null;
234
+ let key = null;
235
+ let simple = false;
236
+ let lastSimple = false;
237
+ const vNodeChildren = [];
238
+ const walk = (c) => {
239
+ for (let i2 = 0; i2 < c.length; i2++) {
240
+ child = c[i2];
241
+ if (Array.isArray(child)) {
242
+ walk(child);
243
+ } else if (child != null && typeof child !== "boolean") {
244
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
245
+ child = String(child);
246
+ }
247
+ if (simple && lastSimple) {
248
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
249
+ } else {
250
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
251
+ }
252
+ lastSimple = simple;
253
+ }
254
+ }
255
+ };
256
+ walk(children);
257
+ if (vnodeData) {
258
+ if (vnodeData.key) {
259
+ key = vnodeData.key;
260
+ }
261
+ {
262
+ const classData = vnodeData.className || vnodeData.class;
263
+ if (classData) {
264
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
265
+ }
266
+ }
267
+ }
268
+ const vnode = newVNode(nodeName, null);
269
+ vnode.$attrs$ = vnodeData;
270
+ if (vNodeChildren.length > 0) {
271
+ vnode.$children$ = vNodeChildren;
272
+ }
273
+ {
274
+ vnode.$key$ = key;
275
+ }
276
+ return vnode;
277
+ };
278
+ var newVNode = (tag, text) => {
279
+ const vnode = {
280
+ $flags$: 0,
281
+ $tag$: tag,
282
+ $text$: text,
283
+ $elm$: null,
284
+ $children$: null
285
+ };
286
+ {
287
+ vnode.$attrs$ = null;
288
+ }
289
+ {
290
+ vnode.$key$ = null;
291
+ }
292
+ return vnode;
293
+ };
294
+ var Host = {};
295
+ var isHost = (node) => node && node.$tag$ === Host;
296
+ var parsePropertyValue = (propValue, propType) => {
297
+ if (propValue != null && !isComplexType(propValue)) {
298
+ if (propType & 1 /* String */) {
299
+ return String(propValue);
300
+ }
301
+ return propValue;
302
+ }
303
+ return propValue;
304
+ };
305
+ var emitEvent = (elm, name, opts) => {
306
+ const ev = plt.ce(name, opts);
307
+ elm.dispatchEvent(ev);
308
+ return ev;
309
+ };
310
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
311
+ var registerStyle = (scopeId2, cssText, allowCS) => {
312
+ let style = styles.get(scopeId2);
313
+ if (supportsConstructableStylesheets && allowCS) {
314
+ style = style || new CSSStyleSheet();
315
+ if (typeof style === "string") {
316
+ style = cssText;
317
+ } else {
318
+ style.replaceSync(cssText);
319
+ }
320
+ } else {
321
+ style = cssText;
322
+ }
323
+ styles.set(scopeId2, style);
324
+ };
325
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
326
+ var _a;
327
+ const scopeId2 = getScopeId(cmpMeta);
328
+ const style = styles.get(scopeId2);
329
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
330
+ if (style) {
331
+ if (typeof style === "string") {
332
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
333
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
334
+ let styleElm;
335
+ if (!appliedStyles) {
336
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
337
+ }
338
+ if (!appliedStyles.has(scopeId2)) {
339
+ {
340
+ styleElm = doc.createElement("style");
341
+ styleElm.innerHTML = style;
342
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
343
+ if (nonce != null) {
344
+ styleElm.setAttribute("nonce", nonce);
345
+ }
346
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
347
+ }
348
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
349
+ styleElm.innerHTML += SLOT_FB_CSS;
350
+ }
351
+ if (appliedStyles) {
352
+ appliedStyles.add(scopeId2);
353
+ }
354
+ }
355
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
356
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
357
+ }
358
+ }
359
+ return scopeId2;
360
+ };
361
+ var attachStyles = (hostRef) => {
362
+ const cmpMeta = hostRef.$cmpMeta$;
363
+ const elm = hostRef.$hostElement$;
364
+ const flags = cmpMeta.$flags$;
365
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
366
+ const scopeId2 = addStyle(
367
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
368
+ cmpMeta);
369
+ if (flags & 10 /* needsScopedEncapsulation */) {
370
+ elm["s-sc"] = scopeId2;
371
+ elm.classList.add(scopeId2 + "-h");
372
+ }
373
+ endAttachStyles();
374
+ };
375
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
376
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
377
+ if (oldValue !== newValue) {
378
+ let isProp = isMemberInElement(elm, memberName);
379
+ memberName.toLowerCase();
380
+ if (memberName === "class") {
381
+ const classList = elm.classList;
382
+ const oldClasses = parseClassList(oldValue);
383
+ const newClasses = parseClassList(newValue);
384
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
385
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
386
+ } else if (memberName === "key") ; else {
387
+ const isComplex = isComplexType(newValue);
388
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
389
+ try {
390
+ if (!elm.tagName.includes("-")) {
391
+ const n = newValue == null ? "" : newValue;
392
+ if (memberName === "list") {
393
+ isProp = false;
394
+ } else if (oldValue == null || elm[memberName] != n) {
395
+ elm[memberName] = n;
396
+ }
397
+ } else {
398
+ elm[memberName] = newValue;
399
+ }
400
+ } catch (e) {
401
+ }
402
+ }
403
+ if (newValue == null || newValue === false) {
404
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
405
+ {
406
+ elm.removeAttribute(memberName);
407
+ }
408
+ }
409
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
410
+ newValue = newValue === true ? "" : newValue;
411
+ {
412
+ elm.setAttribute(memberName, newValue);
413
+ }
414
+ }
415
+ }
416
+ }
417
+ };
418
+ var parseClassListRegex = /\s/;
419
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
420
+
421
+ // src/runtime/vdom/update-element.ts
422
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
423
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
424
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
425
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
426
+ {
427
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
428
+ if (!(memberName in newVnodeAttrs)) {
429
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
430
+ }
431
+ }
432
+ }
433
+ for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
434
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
435
+ }
436
+ };
437
+ function sortedAttrNames(attrNames) {
438
+ return attrNames.includes("ref") ? (
439
+ // we need to sort these to ensure that `'ref'` is the last attr
440
+ [...attrNames.filter((attr) => attr !== "ref"), "ref"]
441
+ ) : (
442
+ // no need to sort, return the original array
443
+ attrNames
444
+ );
445
+ }
446
+
447
+ // src/runtime/vdom/vdom-render.ts
448
+ var scopeId;
449
+ var hostTagName;
450
+ var useNativeShadowDom = false;
451
+ var isSvgMode = false;
452
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
453
+ const newVNode2 = newParentVNode.$children$[childIndex];
454
+ let i2 = 0;
455
+ let elm;
456
+ let childNode;
457
+ if (newVNode2.$text$ !== null) {
458
+ elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
459
+ } else {
460
+ if (!isSvgMode) {
461
+ isSvgMode = newVNode2.$tag$ === "svg";
462
+ }
463
+ elm = newVNode2.$elm$ = doc.createElementNS(
464
+ isSvgMode ? SVG_NS : HTML_NS,
465
+ !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
466
+ ) ;
467
+ if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
468
+ isSvgMode = false;
469
+ }
470
+ {
471
+ updateElement(null, newVNode2, isSvgMode);
472
+ }
473
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
474
+ elm.classList.add(elm["s-si"] = scopeId);
475
+ }
476
+ if (newVNode2.$children$) {
477
+ for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
478
+ childNode = createElm(oldParentVNode, newVNode2, i2);
479
+ if (childNode) {
480
+ elm.appendChild(childNode);
481
+ }
482
+ }
483
+ }
484
+ {
485
+ if (newVNode2.$tag$ === "svg") {
486
+ isSvgMode = false;
487
+ } else if (elm.tagName === "foreignObject") {
488
+ isSvgMode = true;
489
+ }
490
+ }
491
+ }
492
+ elm["s-hn"] = hostTagName;
493
+ return elm;
494
+ };
495
+ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
496
+ let containerElm = parentElm;
497
+ let childNode;
498
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
499
+ containerElm = containerElm.shadowRoot;
500
+ }
501
+ for (; startIdx <= endIdx; ++startIdx) {
502
+ if (vnodes[startIdx]) {
503
+ childNode = createElm(null, parentVNode, startIdx);
504
+ if (childNode) {
505
+ vnodes[startIdx].$elm$ = childNode;
506
+ insertBefore(containerElm, childNode, before);
507
+ }
508
+ }
509
+ }
510
+ };
511
+ var removeVnodes = (vnodes, startIdx, endIdx) => {
512
+ for (let index = startIdx; index <= endIdx; ++index) {
513
+ const vnode = vnodes[index];
514
+ if (vnode) {
515
+ const elm = vnode.$elm$;
516
+ if (elm) {
517
+ elm.remove();
518
+ }
519
+ }
520
+ }
521
+ };
522
+ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
523
+ let oldStartIdx = 0;
524
+ let newStartIdx = 0;
525
+ let idxInOld = 0;
526
+ let i2 = 0;
527
+ let oldEndIdx = oldCh.length - 1;
528
+ let oldStartVnode = oldCh[0];
529
+ let oldEndVnode = oldCh[oldEndIdx];
530
+ let newEndIdx = newCh.length - 1;
531
+ let newStartVnode = newCh[0];
532
+ let newEndVnode = newCh[newEndIdx];
533
+ let node;
534
+ let elmToMove;
535
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
536
+ if (oldStartVnode == null) {
537
+ oldStartVnode = oldCh[++oldStartIdx];
538
+ } else if (oldEndVnode == null) {
539
+ oldEndVnode = oldCh[--oldEndIdx];
540
+ } else if (newStartVnode == null) {
541
+ newStartVnode = newCh[++newStartIdx];
542
+ } else if (newEndVnode == null) {
543
+ newEndVnode = newCh[--newEndIdx];
544
+ } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
545
+ patch(oldStartVnode, newStartVnode, isInitialRender);
546
+ oldStartVnode = oldCh[++oldStartIdx];
547
+ newStartVnode = newCh[++newStartIdx];
548
+ } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
549
+ patch(oldEndVnode, newEndVnode, isInitialRender);
550
+ oldEndVnode = oldCh[--oldEndIdx];
551
+ newEndVnode = newCh[--newEndIdx];
552
+ } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
553
+ patch(oldStartVnode, newEndVnode, isInitialRender);
554
+ insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
555
+ oldStartVnode = oldCh[++oldStartIdx];
556
+ newEndVnode = newCh[--newEndIdx];
557
+ } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
558
+ patch(oldEndVnode, newStartVnode, isInitialRender);
559
+ insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
560
+ oldEndVnode = oldCh[--oldEndIdx];
561
+ newStartVnode = newCh[++newStartIdx];
562
+ } else {
563
+ idxInOld = -1;
564
+ {
565
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
566
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
567
+ idxInOld = i2;
568
+ break;
569
+ }
570
+ }
571
+ }
572
+ if (idxInOld >= 0) {
573
+ elmToMove = oldCh[idxInOld];
574
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
575
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
576
+ } else {
577
+ patch(elmToMove, newStartVnode, isInitialRender);
578
+ oldCh[idxInOld] = void 0;
579
+ node = elmToMove.$elm$;
580
+ }
581
+ newStartVnode = newCh[++newStartIdx];
582
+ } else {
583
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
584
+ newStartVnode = newCh[++newStartIdx];
585
+ }
586
+ if (node) {
587
+ {
588
+ insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
589
+ }
590
+ }
591
+ }
592
+ }
593
+ if (oldStartIdx > oldEndIdx) {
594
+ addVnodes(
595
+ parentElm,
596
+ newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
597
+ newVNode2,
598
+ newCh,
599
+ newStartIdx,
600
+ newEndIdx
601
+ );
602
+ } else if (newStartIdx > newEndIdx) {
603
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
604
+ }
605
+ };
606
+ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
607
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
608
+ if (!isInitialRender) {
609
+ return leftVNode.$key$ === rightVNode.$key$;
610
+ }
611
+ return true;
612
+ }
613
+ return false;
614
+ };
615
+ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
616
+ const elm = newVNode2.$elm$ = oldVNode.$elm$;
617
+ const oldChildren = oldVNode.$children$;
618
+ const newChildren = newVNode2.$children$;
619
+ const tag = newVNode2.$tag$;
620
+ const text = newVNode2.$text$;
621
+ if (text === null) {
622
+ {
623
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
624
+ }
625
+ {
626
+ {
627
+ updateElement(oldVNode, newVNode2, isSvgMode);
628
+ }
629
+ }
630
+ if (oldChildren !== null && newChildren !== null) {
631
+ updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
632
+ } else if (newChildren !== null) {
633
+ if (oldVNode.$text$ !== null) {
634
+ elm.textContent = "";
635
+ }
636
+ addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
637
+ } else if (oldChildren !== null) {
638
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
639
+ }
640
+ if (isSvgMode && tag === "svg") {
641
+ isSvgMode = false;
642
+ }
643
+ } else if (oldVNode.$text$ !== text) {
644
+ elm.data = text;
645
+ }
646
+ };
647
+ var insertBefore = (parent, newNode, reference) => {
648
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
649
+ return inserted;
650
+ };
651
+ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
652
+ const hostElm = hostRef.$hostElement$;
653
+ const cmpMeta = hostRef.$cmpMeta$;
654
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
655
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
656
+ hostTagName = hostElm.tagName;
657
+ if (isInitialLoad && rootVnode.$attrs$) {
658
+ for (const key of Object.keys(rootVnode.$attrs$)) {
659
+ if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
660
+ rootVnode.$attrs$[key] = hostElm[key];
661
+ }
662
+ }
663
+ }
664
+ rootVnode.$tag$ = null;
665
+ rootVnode.$flags$ |= 4 /* isHost */;
666
+ hostRef.$vnode$ = rootVnode;
667
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
668
+ {
669
+ scopeId = hostElm["s-sc"];
670
+ }
671
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
672
+ patch(oldVNode, rootVnode, isInitialLoad);
673
+ };
674
+
675
+ // src/runtime/update-component.ts
676
+ var attachToAncestor = (hostRef, ancestorComponent) => {
677
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
678
+ ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
679
+ }
680
+ };
681
+ var scheduleUpdate = (hostRef, isInitialLoad) => {
682
+ {
683
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
684
+ }
685
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
686
+ hostRef.$flags$ |= 512 /* needsRerender */;
687
+ return;
688
+ }
689
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
690
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
691
+ return writeTask(dispatch) ;
692
+ };
693
+ var dispatchHooks = (hostRef, isInitialLoad) => {
694
+ const elm = hostRef.$hostElement$;
695
+ const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
696
+ const instance = hostRef.$lazyInstance$ ;
697
+ if (!instance) {
698
+ throw new Error(
699
+ `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
700
+ );
701
+ }
702
+ let maybePromise;
703
+ endSchedule();
704
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
705
+ };
706
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
707
+ console.error(err2);
708
+ fn();
709
+ }) : fn();
710
+ var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
711
+ var updateComponent = async (hostRef, instance, isInitialLoad) => {
712
+ var _a;
713
+ const elm = hostRef.$hostElement$;
714
+ const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
715
+ const rc = elm["s-rc"];
716
+ if (isInitialLoad) {
717
+ attachStyles(hostRef);
718
+ }
719
+ const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
720
+ {
721
+ callRender(hostRef, instance, elm, isInitialLoad);
722
+ }
723
+ if (rc) {
724
+ rc.map((cb) => cb());
725
+ elm["s-rc"] = void 0;
726
+ }
727
+ endRender();
728
+ endUpdate();
729
+ {
730
+ const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
731
+ const postUpdate = () => postUpdateComponent(hostRef);
732
+ if (childrenPromises.length === 0) {
733
+ postUpdate();
734
+ } else {
735
+ Promise.all(childrenPromises).then(postUpdate);
736
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
737
+ childrenPromises.length = 0;
738
+ }
739
+ }
740
+ };
741
+ var callRender = (hostRef, instance, elm, isInitialLoad) => {
742
+ try {
743
+ instance = instance.render() ;
744
+ {
745
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
746
+ }
747
+ {
748
+ hostRef.$flags$ |= 2 /* hasRendered */;
749
+ }
750
+ {
751
+ {
752
+ {
753
+ renderVdom(hostRef, instance, isInitialLoad);
754
+ }
755
+ }
756
+ }
757
+ } catch (e) {
758
+ consoleError(e, hostRef.$hostElement$);
759
+ }
760
+ return null;
761
+ };
762
+ var postUpdateComponent = (hostRef) => {
763
+ const tagName = hostRef.$cmpMeta$.$tagName$;
764
+ const elm = hostRef.$hostElement$;
765
+ const endPostUpdate = createTime("postUpdate", tagName);
766
+ const ancestorComponent = hostRef.$ancestorComponent$;
767
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
768
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
769
+ {
770
+ addHydratedFlag(elm);
771
+ }
772
+ endPostUpdate();
773
+ {
774
+ hostRef.$onReadyResolve$(elm);
775
+ if (!ancestorComponent) {
776
+ appDidLoad();
777
+ }
778
+ }
779
+ } else {
780
+ endPostUpdate();
781
+ }
782
+ {
783
+ if (hostRef.$onRenderResolve$) {
784
+ hostRef.$onRenderResolve$();
785
+ hostRef.$onRenderResolve$ = void 0;
786
+ }
787
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
788
+ nextTick(() => scheduleUpdate(hostRef, false));
789
+ }
790
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
791
+ }
792
+ };
793
+ var appDidLoad = (who) => {
794
+ {
795
+ addHydratedFlag(doc.documentElement);
796
+ }
797
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
798
+ };
799
+ var addHydratedFlag = (elm) => {
800
+ var _a;
801
+ return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
802
+ };
803
+
804
+ // src/runtime/set-value.ts
805
+ var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
806
+ var setValue = (ref, propName, newVal, cmpMeta) => {
807
+ const hostRef = getHostRef(ref);
808
+ if (!hostRef) {
809
+ throw new Error(
810
+ `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
811
+ );
812
+ }
813
+ const oldVal = hostRef.$instanceValues$.get(propName);
814
+ const flags = hostRef.$flags$;
815
+ const instance = hostRef.$lazyInstance$ ;
816
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
817
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
818
+ const didValueChange = newVal !== oldVal && !areBothNaN;
819
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
820
+ hostRef.$instanceValues$.set(propName, newVal);
821
+ if (instance) {
822
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
823
+ scheduleUpdate(hostRef, false);
824
+ }
825
+ }
826
+ }
827
+ };
828
+
829
+ // src/runtime/proxy-component.ts
830
+ var proxyComponent = (Cstr, cmpMeta, flags) => {
831
+ var _a, _b;
832
+ const prototype = Cstr.prototype;
833
+ if (cmpMeta.$members$ || BUILD.watchCallback ) {
834
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
835
+ members.map(([memberName, [memberFlags]]) => {
836
+ if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
837
+ Object.defineProperty(prototype, memberName, {
838
+ get() {
839
+ return getValue(this, memberName);
840
+ },
841
+ set(newValue) {
842
+ setValue(this, memberName, newValue, cmpMeta);
843
+ },
844
+ configurable: true,
845
+ enumerable: true
846
+ });
847
+ }
848
+ });
849
+ if ((flags & 1 /* isElementConstructor */)) {
850
+ const attrNameToPropName = /* @__PURE__ */ new Map();
851
+ prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
852
+ plt.jmp(() => {
853
+ var _a2;
854
+ const propName = attrNameToPropName.get(attrName);
855
+ if (this.hasOwnProperty(propName)) {
856
+ newValue = this[propName];
857
+ delete this[propName];
858
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
859
+ return;
860
+ } else if (propName == null) {
861
+ const hostRef = getHostRef(this);
862
+ const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
863
+ if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
864
+ const instance = hostRef.$lazyInstance$ ;
865
+ const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
866
+ entry == null ? void 0 : entry.forEach((callbackName) => {
867
+ if (instance[callbackName] != null) {
868
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
869
+ }
870
+ });
871
+ }
872
+ return;
873
+ }
874
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
875
+ });
876
+ };
877
+ Cstr.observedAttributes = Array.from(
878
+ /* @__PURE__ */ new Set([
879
+ ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
880
+ ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
881
+ const attrName = m[1] || propName;
882
+ attrNameToPropName.set(attrName, propName);
883
+ return attrName;
884
+ })
885
+ ])
886
+ );
887
+ }
888
+ }
889
+ return Cstr;
890
+ };
891
+
892
+ // src/runtime/initialize-component.ts
893
+ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
894
+ let Cstr;
895
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
896
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
897
+ const bundleId = cmpMeta.$lazyBundleId$;
898
+ if (bundleId) {
899
+ const CstrImport = loadModule(cmpMeta);
900
+ if (CstrImport && "then" in CstrImport) {
901
+ const endLoad = uniqueTime();
902
+ Cstr = await CstrImport;
903
+ endLoad();
904
+ } else {
905
+ Cstr = CstrImport;
906
+ }
907
+ if (!Cstr) {
908
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
909
+ }
910
+ if (!Cstr.isProxied) {
911
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
912
+ Cstr.isProxied = true;
913
+ }
914
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
915
+ {
916
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
917
+ }
918
+ try {
919
+ new Cstr(hostRef);
920
+ } catch (e) {
921
+ consoleError(e);
922
+ }
923
+ {
924
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
925
+ }
926
+ endNewInstance();
927
+ } else {
928
+ Cstr = elm.constructor;
929
+ const cmpTag = elm.localName;
930
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
931
+ }
932
+ if (Cstr && Cstr.style) {
933
+ let style;
934
+ if (typeof Cstr.style === "string") {
935
+ style = Cstr.style;
936
+ }
937
+ const scopeId2 = getScopeId(cmpMeta);
938
+ if (!styles.has(scopeId2)) {
939
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
940
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
941
+ endRegisterStyles();
942
+ }
943
+ }
944
+ }
945
+ const ancestorComponent = hostRef.$ancestorComponent$;
946
+ const schedule = () => scheduleUpdate(hostRef, true);
947
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
948
+ ancestorComponent["s-rc"].push(schedule);
949
+ } else {
950
+ schedule();
951
+ }
952
+ };
953
+ var fireConnectedCallback = (instance) => {
954
+ };
955
+
956
+ // src/runtime/connected-callback.ts
957
+ var connectedCallback = (elm) => {
958
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
959
+ const hostRef = getHostRef(elm);
960
+ const cmpMeta = hostRef.$cmpMeta$;
961
+ const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
962
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
963
+ hostRef.$flags$ |= 1 /* hasConnected */;
964
+ {
965
+ let ancestorComponent = elm;
966
+ while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
967
+ if (ancestorComponent["s-p"]) {
968
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
969
+ break;
970
+ }
971
+ }
972
+ }
973
+ if (cmpMeta.$members$) {
974
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
975
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
976
+ const value = elm[memberName];
977
+ delete elm[memberName];
978
+ elm[memberName] = value;
979
+ }
980
+ });
981
+ }
982
+ {
983
+ initializeComponent(elm, hostRef, cmpMeta);
984
+ }
985
+ } else {
986
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
987
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
988
+ }
989
+ }
990
+ endConnected();
991
+ }
992
+ };
993
+ var disconnectInstance = (instance) => {
994
+ };
995
+ var disconnectedCallback = async (elm) => {
996
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
997
+ const hostRef = getHostRef(elm);
998
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
999
+ hostRef.$onReadyPromise$.then(() => disconnectInstance());
1000
+ }
1001
+ }
1002
+ };
1003
+
1004
+ // src/runtime/bootstrap-lazy.ts
1005
+ var bootstrapLazy = (lazyBundles, options = {}) => {
1006
+ var _a;
1007
+ const endBootstrap = createTime();
1008
+ const cmpTags = [];
1009
+ const exclude = options.exclude || [];
1010
+ const customElements2 = win.customElements;
1011
+ const head = doc.head;
1012
+ const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1013
+ const dataStyles = /* @__PURE__ */ doc.createElement("style");
1014
+ const deferredConnectedCallbacks = [];
1015
+ let appLoadFallback;
1016
+ let isBootstrapping = true;
1017
+ Object.assign(plt, options);
1018
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
1019
+ let hasSlotRelocation = false;
1020
+ lazyBundles.map((lazyBundle) => {
1021
+ lazyBundle[1].map((compactMeta) => {
1022
+ const cmpMeta = {
1023
+ $flags$: compactMeta[0],
1024
+ $tagName$: compactMeta[1],
1025
+ $members$: compactMeta[2],
1026
+ $listeners$: compactMeta[3]
1027
+ };
1028
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1029
+ hasSlotRelocation = true;
1030
+ }
1031
+ {
1032
+ cmpMeta.$members$ = compactMeta[2];
1033
+ }
1034
+ const tagName = cmpMeta.$tagName$;
1035
+ const HostElement = class extends HTMLElement {
1036
+ // StencilLazyHost
1037
+ constructor(self) {
1038
+ super(self);
1039
+ this.hasRegisteredEventListeners = false;
1040
+ self = this;
1041
+ registerHost(self, cmpMeta);
1042
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1043
+ {
1044
+ if (!self.shadowRoot) {
1045
+ {
1046
+ self.attachShadow({ mode: "open" });
1047
+ }
1048
+ } else {
1049
+ if (self.shadowRoot.mode !== "open") {
1050
+ throw new Error(
1051
+ `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
1052
+ );
1053
+ }
1054
+ }
1055
+ }
1056
+ }
1057
+ }
1058
+ connectedCallback() {
1059
+ getHostRef(this);
1060
+ if (!this.hasRegisteredEventListeners) {
1061
+ this.hasRegisteredEventListeners = true;
1062
+ }
1063
+ if (appLoadFallback) {
1064
+ clearTimeout(appLoadFallback);
1065
+ appLoadFallback = null;
1066
+ }
1067
+ if (isBootstrapping) {
1068
+ deferredConnectedCallbacks.push(this);
1069
+ } else {
1070
+ plt.jmp(() => connectedCallback(this));
1071
+ }
1072
+ }
1073
+ disconnectedCallback() {
1074
+ plt.jmp(() => disconnectedCallback(this));
1075
+ }
1076
+ componentOnReady() {
1077
+ return getHostRef(this).$onReadyPromise$;
1078
+ }
1079
+ };
1080
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1081
+ if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1082
+ cmpTags.push(tagName);
1083
+ customElements2.define(
1084
+ tagName,
1085
+ proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1086
+ );
1087
+ }
1088
+ });
1089
+ });
1090
+ if (cmpTags.length > 0) {
1091
+ if (hasSlotRelocation) {
1092
+ dataStyles.textContent += SLOT_FB_CSS;
1093
+ }
1094
+ {
1095
+ dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
1096
+ }
1097
+ if (dataStyles.innerHTML.length) {
1098
+ dataStyles.setAttribute("data-styles", "");
1099
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1100
+ if (nonce != null) {
1101
+ dataStyles.setAttribute("nonce", nonce);
1102
+ }
1103
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1104
+ }
1105
+ }
1106
+ isBootstrapping = false;
1107
+ if (deferredConnectedCallbacks.length) {
1108
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1109
+ } else {
1110
+ {
1111
+ plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1112
+ }
1113
+ }
1114
+ endBootstrap();
1115
+ };
1116
+
1117
+ // src/runtime/nonce.ts
1118
+ var setNonce = (nonce) => plt.$nonce$ = nonce;
1119
+
1120
+ export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
1121
+
1122
+ //# sourceMappingURL=index-0eb79357.js.map