index.js 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127
  1. function componentOnReady() {
  2. return getHostRef(this).$onReadyPromise$;
  3. }
  4. function forceUpdate() {}
  5. function hydrateApp(e, t, o, n, s) {
  6. function l() {
  7. if (global.clearTimeout(p), i.clear(), r.clear(), !h) {
  8. h = !0;
  9. try {
  10. t.clientHydrateAnnotations && insertVdomAnnotations(e.document, t.staticComponents),
  11. e.dispatchEvent(new e.Event("DOMContentLoaded")), e.document.createElement = c,
  12. e.document.createElementNS = $;
  13. } catch (e) {
  14. renderCatchError(t, o, e);
  15. }
  16. }
  17. n(e, t, o, s);
  18. }
  19. function a(e) {
  20. renderCatchError(t, o, e), l();
  21. }
  22. const r = new Set, i = new Set, d = new Set, c = e.document.createElement, $ = e.document.createElementNS, m = Promise.resolve();
  23. let p, h = !1;
  24. try {
  25. function u() {
  26. return g(this);
  27. }
  28. function f(e) {
  29. if (isValidComponent(e, t) && !getHostRef(e)) {
  30. const t = loadModule({
  31. $tagName$: e.nodeName.toLowerCase(),
  32. $flags$: null
  33. }, null);
  34. null != t && null != t.cmpMeta && (i.add(e), e.connectedCallback = u, registerHost(e, t.cmpMeta),
  35. function o(e, t) {
  36. if ("function" != typeof e.componentOnReady && (e.componentOnReady = componentOnReady),
  37. "function" != typeof e.forceUpdate && (e.forceUpdate = forceUpdate), 1 & t.$flags$ && (e.shadowRoot = e),
  38. null != t.$members$) {
  39. const o = getHostRef(e);
  40. Object.entries(t.$members$).forEach((([n, s]) => {
  41. const l = s[0];
  42. if (31 & l) {
  43. const a = s[1] || n, r = e.getAttribute(a);
  44. if (null != r) {
  45. const e = parsePropertyValue(r, l);
  46. o.$instanceValues$.set(n, e);
  47. }
  48. const i = e[n];
  49. void 0 !== i && (o.$instanceValues$.set(n, i), delete e[n]), Object.defineProperty(e, n, {
  50. get() {
  51. return getValue(this, n);
  52. },
  53. set(e) {
  54. setValue(this, n, e, t);
  55. },
  56. configurable: !0,
  57. enumerable: !0
  58. });
  59. } else 64 & l && Object.defineProperty(e, n, {
  60. value() {
  61. const e = getHostRef(this), t = arguments;
  62. return e.$onInstancePromise$.then((() => e.$lazyInstance$[n].apply(e.$lazyInstance$, t))).catch(consoleError);
  63. }
  64. });
  65. }));
  66. }
  67. }(e, t.cmpMeta));
  68. }
  69. }
  70. function g(n) {
  71. return i.delete(n), isValidComponent(n, t) && o.hydratedCount < t.maxHydrateCount && !r.has(n) && shouldHydrate(n) ? (r.add(n),
  72. async function s(e, t, o, n, l) {
  73. o = o.toLowerCase();
  74. const a = loadModule({
  75. $tagName$: o,
  76. $flags$: null
  77. });
  78. if (null != a && null != a.cmpMeta) {
  79. l.add(n);
  80. try {
  81. connectedCallback(n), await n.componentOnReady(), t.hydratedCount++;
  82. const e = getHostRef(n), s = e.$modeName$ ? e.$modeName$ : "$";
  83. t.components.some((e => e.tag === o && e.mode === s)) || t.components.push({
  84. tag: o,
  85. mode: s,
  86. count: 0,
  87. depth: -1
  88. });
  89. } catch (t) {
  90. e.console.error(t);
  91. }
  92. l.delete(n);
  93. }
  94. }(e, o, n.nodeName, n, d)) : m;
  95. }
  96. e.document.createElement = function t(o) {
  97. const n = c.call(e.document, o);
  98. return f(n), n;
  99. }, e.document.createElementNS = function t(o, n) {
  100. const s = $.call(e.document, o, n);
  101. return f(s), s;
  102. }, p = global.setTimeout((function L() {
  103. a(`Hydrate exceeded timeout${function e(t) {
  104. return Array.from(t).map(waitingOnElementMsg);
  105. }(d)}`);
  106. }), t.timeout), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
  107. globalScripts(), function e(t) {
  108. if (null != t && 1 === t.nodeType) {
  109. f(t);
  110. const o = t.children;
  111. for (let t = 0, n = o.length; t < n; t++) e(o[t]);
  112. }
  113. }(e.document.body), function e() {
  114. const t = Array.from(i).filter((e => e.parentElement));
  115. return t.length > 0 ? Promise.all(t.map(g)).then(e) : m;
  116. }().then(l).catch(a);
  117. } catch (e) {
  118. a(e);
  119. }
  120. }
  121. function isValidComponent(e, t) {
  122. if (null != e && 1 === e.nodeType) {
  123. const o = e.nodeName;
  124. if ("string" == typeof o && o.includes("-")) return !t.excludeComponents.includes(o.toLowerCase());
  125. }
  126. return !1;
  127. }
  128. function shouldHydrate(e) {
  129. if (9 === e.nodeType) return !0;
  130. if (NO_HYDRATE_TAGS.has(e.nodeName)) return !1;
  131. if (e.hasAttribute("no-prerender")) return !1;
  132. const t = e.parentNode;
  133. return null == t || shouldHydrate(t);
  134. }
  135. function renderCatchError(e, t, o) {
  136. const n = {
  137. level: "error",
  138. type: "build",
  139. header: "Hydrate Error",
  140. messageText: "",
  141. relFilePath: null,
  142. absFilePath: null,
  143. lines: []
  144. };
  145. if (e.url) try {
  146. const t = new URL(e.url);
  147. "/" !== t.pathname && (n.header += ": " + t.pathname);
  148. } catch (e) {}
  149. null != o && (null != o.stack ? n.messageText = o.stack.toString() : null != o.message ? n.messageText = o.message.toString() : n.messageText = o.toString()),
  150. t.diagnostics.push(n);
  151. }
  152. function printTag(e) {
  153. let t = `<${e.nodeName.toLowerCase()}`;
  154. if (Array.isArray(e.attributes)) for (let o = 0; o < e.attributes.length; o++) {
  155. const n = e.attributes[o];
  156. t += ` ${n.name}`, "" !== n.value && (t += `="${n.value}"`);
  157. }
  158. return t += ">", t;
  159. }
  160. function waitingOnElementMsg(e) {
  161. let t = "";
  162. if (e) {
  163. const o = [];
  164. t = " - waiting on:";
  165. let n = e;
  166. for (;n && 9 !== n.nodeType && "BODY" !== n.nodeName; ) o.unshift(printTag(n)),
  167. n = n.parentElement;
  168. let s = "";
  169. for (const e of o) s += " ", t += `\n${s}${e}`;
  170. }
  171. return t;
  172. }
  173. import { BUILD, NAMESPACE } from "@stencil/core/internal/app-data";
  174. export { BUILD, Env, NAMESPACE } from "@stencil/core/internal/app-data";
  175. import { globalScripts } from "@stencil/core/internal/app-globals";
  176. const addHostEventListeners = (e, t, o, n) => {
  177. BUILD.hostListener && o && (BUILD.hostListenerTargetParent && (o = n ? o.filter((([e]) => 32 & e)) : o.filter((([e]) => !(32 & e)))),
  178. o.map((([o, n, s]) => {
  179. const l = BUILD.hostListenerTarget ? getHostListenerTarget(e, o) : e, a = hostListenerProxy(t, s), r = hostListenerOpts(o);
  180. plt.ael(l, n, a, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(l, n, a, r)));
  181. })));
  182. }, hostListenerProxy = (e, t) => o => {
  183. try {
  184. BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](o) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, o ]) : e.$hostElement$[t](o);
  185. } catch (e) {
  186. consoleError(e);
  187. }
  188. }, getHostListenerTarget = (e, t) => BUILD.hostListenerTargetDocument && 4 & t ? doc : BUILD.hostListenerTargetWindow && 8 & t ? win : BUILD.hostListenerTargetBody && 16 & t ? doc.body : BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => 0 != (2 & e), XLINK_NS = "http://www.w3.org/1999/xlink";
  189. let i = 0;
  190. const createTime = (e, t = "") => {
  191. if (BUILD.profile && performance.mark) {
  192. const o = `st:${e}:${t}:${i++}`;
  193. return performance.mark(o), () => performance.measure(`[Stencil] ${e}() <${t}>`, o);
  194. }
  195. return () => {};
  196. }, rootAppliedStyles = new WeakMap, registerStyle = (e, t, o) => {
  197. let n = styles.get(e);
  198. n = t, styles.set(e, n);
  199. }, addStyle = (e, t, o, n) => {
  200. let s = getScopeId(t, o), l = styles.get(s);
  201. if (!BUILD.attachStyles) return s;
  202. if (e = 11 === e.nodeType ? e : doc, l) if ("string" == typeof l) {
  203. e = e.head || e;
  204. let o, a = rootAppliedStyles.get(e);
  205. if (a || rootAppliedStyles.set(e, a = new Set), !a.has(s)) {
  206. if (BUILD.hydrateClientSide && e.host && (o = e.querySelector(`[sty-id="${s}"]`))) o.innerHTML = l; else {
  207. if (BUILD.cssVarShim && plt.$cssShim$) {
  208. o = plt.$cssShim$.createHostStyle(n, s, l, !!(10 & t.$flags$));
  209. const e = o["s-sc"];
  210. e && (s = e, a = null);
  211. } else o = doc.createElement("style"), o.innerHTML = l;
  212. (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && o.setAttribute("sty-id", s),
  213. e.insertBefore(o, e.querySelector("link"));
  214. }
  215. a && a.add(s);
  216. }
  217. } else BUILD.constructableCSS && !e.adoptedStyleSheets.includes(l) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, l ]);
  218. return s;
  219. }, attachStyles = e => {
  220. const t = e.$cmpMeta$, o = e.$hostElement$, n = t.$flags$, s = createTime("attachStyles", t.$tagName$), l = addStyle(BUILD.shadowDom && supportsShadow && o.shadowRoot ? o.shadowRoot : o.getRootNode(), t, e.$modeName$, o);
  221. (BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && 10 & n && (o["s-sc"] = l,
  222. o.classList.add(l + "-h"), BUILD.scoped && 2 & n && o.classList.add(l + "-s")),
  223. s();
  224. }, getScopeId = (e, t) => "sc-" + (BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), setMode = e => modeResolutionChain.push(e), getMode = e => getHostRef(e).$modeName$, EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, isPromise = e => !!e && ("object" == typeof e || "function" == typeof e) && "function" == typeof e.then, h = (e, t, ...o) => {
  225. let n = null, s = null, l = null, a = !1, r = !1, i = [];
  226. const d = t => {
  227. for (let o = 0; o < t.length; o++) n = t[o], Array.isArray(n) ? d(n) : null != n && "boolean" != typeof n && ((a = "function" != typeof e && !isComplexType(n)) ? n = String(n) : BUILD.isDev && "function" != typeof e && n.$flags$,
  228. a && r ? i[i.length - 1].$text$ += n : i.push(a ? newVNode(null, n) : n), r = a);
  229. };
  230. if (d(o), t && (BUILD.isDev && "input" === e && validateInputProperties(t), BUILD.vdomKey && t.key && (s = t.key),
  231. BUILD.slotRelocation && t.name && (l = t.name), BUILD.vdomClass)) {
  232. const e = t.className || t.class;
  233. e && (t.class = "object" != typeof e ? e : Object.keys(e).filter((t => e[t])).join(" "));
  234. }
  235. if (BUILD.isDev && i.some(isHost), BUILD.vdomFunctional && "function" == typeof e) return e(null === t ? {} : t, i, vdomFnUtils);
  236. const c = newVNode(e, null);
  237. return c.$attrs$ = t, i.length > 0 && (c.$children$ = i), BUILD.vdomKey && (c.$key$ = s),
  238. BUILD.slotRelocation && (c.$name$ = l), c;
  239. }, newVNode = (e, t) => {
  240. const o = {
  241. $flags$: 0,
  242. $tag$: e,
  243. $text$: t,
  244. $elm$: null,
  245. $children$: null
  246. };
  247. return BUILD.vdomAttribute && (o.$attrs$ = null), BUILD.vdomKey && (o.$key$ = null),
  248. BUILD.slotRelocation && (o.$name$ = null), o;
  249. }, Host = {}, isHost = e => e && e.$tag$ === Host, vdomFnUtils = {
  250. forEach: (e, t) => e.map(convertToPublic).forEach(t),
  251. map: (e, t) => e.map(convertToPublic).map(t).map(convertToPrivate)
  252. }, convertToPublic = e => ({
  253. vattrs: e.$attrs$,
  254. vchildren: e.$children$,
  255. vkey: e.$key$,
  256. vname: e.$name$,
  257. vtag: e.$tag$,
  258. vtext: e.$text$
  259. }), convertToPrivate = e => {
  260. if ("function" == typeof e.vtag) {
  261. const t = {
  262. ...e.vattrs
  263. };
  264. return e.vkey && (t.key = e.vkey), e.vname && (t.name = e.vname), h(e.vtag, t, ...e.vchildren || []);
  265. }
  266. const t = newVNode(e.vtag, e.vtext);
  267. return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname,
  268. t;
  269. }, validateInputProperties = e => {
  270. const t = Object.keys(e);
  271. -1 !== t.indexOf("value") && (t.indexOf("type"), t.indexOf("min"), t.indexOf("max"),
  272. t.indexOf("step"));
  273. }, setAccessor = (e, t, o, n, s, l) => {
  274. if (o !== n) {
  275. let a = isMemberInElement(e, t), r = t.toLowerCase();
  276. if (BUILD.vdomClass && "class" === t) {
  277. const t = e.classList, s = parseClassList(o), l = parseClassList(n);
  278. t.remove(...s.filter((e => e && !l.includes(e)))), t.add(...l.filter((e => e && !s.includes(e))));
  279. } else if (BUILD.vdomStyle && "style" === t) {
  280. if (BUILD.updatable) for (const t in o) n && null != n[t] || (!BUILD.hydrateServerSide && t.includes("-") ? e.style.removeProperty(t) : e.style[t] = "");
  281. for (const t in n) o && n[t] === o[t] || (!BUILD.hydrateServerSide && t.includes("-") ? e.style.setProperty(t, n[t]) : e.style[t] = n[t]);
  282. } else if (BUILD.vdomKey && "key" === t) ; else if (BUILD.vdomRef && "ref" === t) n && n(e); else if (!BUILD.vdomListener || (BUILD.lazyLoad ? a : e.__lookupSetter__(t)) || "o" !== t[0] || "n" !== t[1]) {
  283. if (BUILD.vdomPropOrAttr) {
  284. const i = isComplexType(n);
  285. if ((a || i && null !== n) && !s) try {
  286. if (e.tagName.includes("-")) e[t] = n; else {
  287. let s = null == n ? "" : n;
  288. "list" === t ? a = !1 : null != o && e[t] == s || (e[t] = s);
  289. }
  290. } catch (e) {}
  291. let d = !1;
  292. BUILD.vdomXlink && r !== (r = r.replace(/^xlink\:?/, "")) && (t = r, d = !0), null == n || !1 === n ? !1 === n && "" !== e.getAttribute(t) || (BUILD.vdomXlink && d ? e.removeAttributeNS(XLINK_NS, t) : e.removeAttribute(t)) : (!a || 4 & l || s) && !i && (n = !0 === n ? "" : n,
  293. BUILD.vdomXlink && d ? e.setAttributeNS(XLINK_NS, t, n) : e.setAttribute(t, n));
  294. }
  295. } else t = "-" === t[2] ? t.slice(3) : isMemberInElement(win, r) ? r.slice(2) : r[2] + t.slice(3),
  296. o && plt.rel(e, t, o, !1), n && plt.ael(e, t, n, !1);
  297. }
  298. }, parseClassListRegex = /\s/, parseClassList = e => e ? e.split(parseClassListRegex) : [], updateElement = (e, t, o, n) => {
  299. const s = 11 === t.$elm$.nodeType && t.$elm$.host ? t.$elm$.host : t.$elm$, l = e && e.$attrs$ || EMPTY_OBJ, a = t.$attrs$ || EMPTY_OBJ;
  300. if (BUILD.updatable) for (n in l) n in a || setAccessor(s, n, l[n], void 0, o, t.$flags$);
  301. for (n in a) setAccessor(s, n, l[n], a[n], o, t.$flags$);
  302. };
  303. let scopeId, contentRef, hostTagName, useNativeShadowDom = !1, checkSlotFallbackVisibility = !1, checkSlotRelocate = !1, isSvgMode = !1;
  304. const createElm = (e, t, o, n) => {
  305. let s, l, a, r = t.$children$[o], i = 0;
  306. if (BUILD.slotRelocation && !useNativeShadowDom && (checkSlotRelocate = !0, "slot" === r.$tag$ && (scopeId && n.classList.add(scopeId + "-s"),
  307. r.$flags$ |= r.$children$ ? 2 : 1)), BUILD.isDev && r.$elm$ && consoleDevError(`The JSX ${null !== r.$text$ ? `"${r.$text$}" text` : `"${r.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),
  308. BUILD.vdomText && null !== r.$text$) s = r.$elm$ = doc.createTextNode(r.$text$); else if (BUILD.slotRelocation && 1 & r.$flags$) s = r.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(r) : doc.createTextNode(""); else {
  309. if (BUILD.svg && !isSvgMode && (isSvgMode = "svg" === r.$tag$), s = r.$elm$ = BUILD.svg ? doc.createElementNS(isSvgMode ? "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml", BUILD.slotRelocation && 2 & r.$flags$ ? "slot-fb" : r.$tag$) : doc.createElement(BUILD.slotRelocation && 2 & r.$flags$ ? "slot-fb" : r.$tag$),
  310. BUILD.svg && isSvgMode && "foreignObject" === r.$tag$ && (isSvgMode = !1), BUILD.vdomAttribute && updateElement(null, r, isSvgMode),
  311. (BUILD.shadowDom || BUILD.scoped) && null != scopeId && s["s-si"] !== scopeId && s.classList.add(s["s-si"] = scopeId),
  312. r.$children$) for (i = 0; i < r.$children$.length; ++i) l = createElm(e, r, i, s),
  313. l && s.appendChild(l);
  314. BUILD.svg && ("svg" === r.$tag$ ? isSvgMode = !1 : "foreignObject" === s.tagName && (isSvgMode = !0));
  315. }
  316. return BUILD.slotRelocation && (s["s-hn"] = hostTagName, 3 & r.$flags$ && (s["s-sr"] = !0,
  317. s["s-cr"] = contentRef, s["s-sn"] = r.$name$ || "", a = e && e.$children$ && e.$children$[o],
  318. a && a.$tag$ === r.$tag$ && e.$elm$ && putBackInOriginalLocation(e.$elm$, !1))),
  319. s;
  320. }, putBackInOriginalLocation = (e, t) => {
  321. plt.$flags$ |= 1;
  322. const o = e.childNodes;
  323. for (let e = o.length - 1; e >= 0; e--) {
  324. const n = o[e];
  325. n["s-hn"] !== hostTagName && n["s-ol"] && (parentReferenceNode(n).insertBefore(n, referenceNode(n)),
  326. n["s-ol"].remove(), n["s-ol"] = void 0, checkSlotRelocate = !0), t && putBackInOriginalLocation(n, t);
  327. }
  328. plt.$flags$ &= -2;
  329. }, addVnodes = (e, t, o, n, s, l) => {
  330. let a, r = BUILD.slotRelocation && e["s-cr"] && e["s-cr"].parentNode || e;
  331. for (BUILD.shadowDom && r.shadowRoot && r.tagName === hostTagName && (r = r.shadowRoot); s <= l; ++s) n[s] && (a = createElm(null, o, s, e),
  332. a && (n[s].$elm$ = a, r.insertBefore(a, BUILD.slotRelocation ? referenceNode(t) : t)));
  333. }, removeVnodes = (e, t, o, n, s) => {
  334. for (;t <= o; ++t) (n = e[t]) && (s = n.$elm$, callNodeRefs(n), BUILD.slotRelocation && (checkSlotFallbackVisibility = !0,
  335. s["s-ol"] ? s["s-ol"].remove() : putBackInOriginalLocation(s, !0)), s.remove());
  336. }, isSameVnode = (e, t) => e.$tag$ === t.$tag$ && (BUILD.slotRelocation && "slot" === e.$tag$ ? e.$name$ === t.$name$ : !BUILD.vdomKey || e.$key$ === t.$key$), referenceNode = e => e && e["s-ol"] || e, parentReferenceNode = e => (e["s-ol"] ? e["s-ol"] : e).parentNode, patch = (e, t) => {
  337. const o = t.$elm$ = e.$elm$, n = e.$children$, s = t.$children$, l = t.$tag$, a = t.$text$;
  338. let r;
  339. BUILD.vdomText && null !== a ? BUILD.vdomText && BUILD.slotRelocation && (r = o["s-cr"]) ? r.parentNode.textContent = a : BUILD.vdomText && e.$text$ !== a && (o.data = a) : (BUILD.svg && (isSvgMode = "svg" === l || "foreignObject" !== l && isSvgMode),
  340. (BUILD.vdomAttribute || BUILD.reflect) && (BUILD.slot && "slot" === l || updateElement(e, t, isSvgMode)),
  341. BUILD.updatable && null !== n && null !== s ? ((e, t, o, n) => {
  342. let s, l, a = 0, r = 0, i = 0, d = 0, c = t.length - 1, $ = t[0], m = t[c], p = n.length - 1, h = n[0], u = n[p];
  343. for (;a <= c && r <= p; ) if (null == $) $ = t[++a]; else if (null == m) m = t[--c]; else if (null == h) h = n[++r]; else if (null == u) u = n[--p]; else if (isSameVnode($, h)) patch($, h),
  344. $ = t[++a], h = n[++r]; else if (isSameVnode(m, u)) patch(m, u), m = t[--c], u = n[--p]; else if (isSameVnode($, u)) !BUILD.slotRelocation || "slot" !== $.$tag$ && "slot" !== u.$tag$ || putBackInOriginalLocation($.$elm$.parentNode, !1),
  345. patch($, u), e.insertBefore($.$elm$, m.$elm$.nextSibling), $ = t[++a], u = n[--p]; else if (isSameVnode(m, h)) !BUILD.slotRelocation || "slot" !== $.$tag$ && "slot" !== u.$tag$ || putBackInOriginalLocation(m.$elm$.parentNode, !1),
  346. patch(m, h), e.insertBefore(m.$elm$, $.$elm$), m = t[--c], h = n[++r]; else {
  347. if (i = -1, BUILD.vdomKey) for (d = a; d <= c; ++d) if (t[d] && null !== t[d].$key$ && t[d].$key$ === h.$key$) {
  348. i = d;
  349. break;
  350. }
  351. BUILD.vdomKey && i >= 0 ? (l = t[i], l.$tag$ !== h.$tag$ ? s = createElm(t && t[r], o, i, e) : (patch(l, h),
  352. t[i] = void 0, s = l.$elm$), h = n[++r]) : (s = createElm(t && t[r], o, r, e), h = n[++r]),
  353. s && (BUILD.slotRelocation ? parentReferenceNode($.$elm$).insertBefore(s, referenceNode($.$elm$)) : $.$elm$.parentNode.insertBefore(s, $.$elm$));
  354. }
  355. a > c ? addVnodes(e, null == n[p + 1] ? null : n[p + 1].$elm$, o, n, r, p) : BUILD.updatable && r > p && removeVnodes(t, a, c);
  356. })(o, n, t, s) : null !== s ? (BUILD.updatable && BUILD.vdomText && null !== e.$text$ && (o.textContent = ""),
  357. addVnodes(o, null, t, s, 0, s.length - 1)) : BUILD.updatable && null !== n && removeVnodes(n, 0, n.length - 1),
  358. BUILD.svg && isSvgMode && "svg" === l && (isSvgMode = !1));
  359. }, updateFallbackSlotVisibility = e => {
  360. let t, o, n, s, l, a, r = e.childNodes;
  361. for (o = 0, n = r.length; o < n; o++) if (t = r[o], 1 === t.nodeType) {
  362. if (t["s-sr"]) for (l = t["s-sn"], t.hidden = !1, s = 0; s < n; s++) if (a = r[s].nodeType,
  363. r[s]["s-hn"] !== t["s-hn"] || "" !== l) {
  364. if (1 === a && l === r[s].getAttribute("slot")) {
  365. t.hidden = !0;
  366. break;
  367. }
  368. } else if (1 === a || 3 === a && "" !== r[s].textContent.trim()) {
  369. t.hidden = !0;
  370. break;
  371. }
  372. updateFallbackSlotVisibility(t);
  373. }
  374. }, relocateNodes = [], relocateSlotContent = e => {
  375. let t, o, n, s, l, a, r = 0, i = e.childNodes, d = i.length;
  376. for (;r < d; r++) {
  377. if (t = i[r], t["s-sr"] && (o = t["s-cr"]) && o.parentNode) for (n = o.parentNode.childNodes,
  378. s = t["s-sn"], a = n.length - 1; a >= 0; a--) o = n[a], o["s-cn"] || o["s-nr"] || o["s-hn"] === t["s-hn"] || (isNodeLocatedInSlot(o, s) ? (l = relocateNodes.find((e => e.$nodeToRelocate$ === o)),
  379. checkSlotFallbackVisibility = !0, o["s-sn"] = o["s-sn"] || s, l ? l.$slotRefNode$ = t : relocateNodes.push({
  380. $slotRefNode$: t,
  381. $nodeToRelocate$: o
  382. }), o["s-sr"] && relocateNodes.map((e => {
  383. isNodeLocatedInSlot(e.$nodeToRelocate$, o["s-sn"]) && (l = relocateNodes.find((e => e.$nodeToRelocate$ === o)),
  384. l && !e.$slotRefNode$ && (e.$slotRefNode$ = l.$slotRefNode$));
  385. }))) : relocateNodes.some((e => e.$nodeToRelocate$ === o)) || relocateNodes.push({
  386. $nodeToRelocate$: o
  387. }));
  388. 1 === t.nodeType && relocateSlotContent(t);
  389. }
  390. }, isNodeLocatedInSlot = (e, t) => 1 === e.nodeType ? null === e.getAttribute("slot") && "" === t || e.getAttribute("slot") === t : e["s-sn"] === t || "" === t, callNodeRefs = e => {
  391. BUILD.vdomRef && (e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(callNodeRefs));
  392. }, renderVdom = (e, t) => {
  393. const o = e.$hostElement$, n = e.$cmpMeta$, s = e.$vnode$ || newVNode(null, null), l = isHost(t) ? t : h(null, null, t);
  394. if (hostTagName = o.tagName, BUILD.isDev && Array.isArray(t) && t.some(isHost)) throw new Error(`The <Host> must be the single root component.\nLooks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);
  395. if (BUILD.reflect && n.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, n.$attrsToReflect$.map((([e, t]) => l.$attrs$[t] = o[e]))),
  396. l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = s.$elm$ = BUILD.shadowDom && o.shadowRoot || o,
  397. (BUILD.scoped || BUILD.shadowDom) && (scopeId = o["s-sc"]), BUILD.slotRelocation && (contentRef = o["s-cr"],
  398. useNativeShadowDom = supportsShadow, checkSlotFallbackVisibility = !1), patch(s, l),
  399. BUILD.slotRelocation) {
  400. if (plt.$flags$ |= 1, checkSlotRelocate) {
  401. let e, t, o, n, s, a;
  402. relocateSlotContent(l.$elm$);
  403. let r = 0;
  404. for (;r < relocateNodes.length; r++) e = relocateNodes[r], t = e.$nodeToRelocate$,
  405. t["s-ol"] || (o = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(t) : doc.createTextNode(""),
  406. o["s-nr"] = t, t.parentNode.insertBefore(t["s-ol"] = o, t));
  407. for (r = 0; r < relocateNodes.length; r++) if (e = relocateNodes[r], t = e.$nodeToRelocate$,
  408. e.$slotRefNode$) {
  409. for (n = e.$slotRefNode$.parentNode, s = e.$slotRefNode$.nextSibling, o = t["s-ol"]; o = o.previousSibling; ) if (a = o["s-nr"],
  410. a && a["s-sn"] === t["s-sn"] && n === a.parentNode && (a = a.nextSibling, !a || !a["s-nr"])) {
  411. s = a;
  412. break;
  413. }
  414. (!s && n !== t.parentNode || t.nextSibling !== s) && t !== s && (!t["s-hn"] && t["s-ol"] && (t["s-hn"] = t["s-ol"].parentNode.nodeName),
  415. n.insertBefore(t, s));
  416. } else 1 === t.nodeType && (t.hidden = !0);
  417. }
  418. checkSlotFallbackVisibility && updateFallbackSlotVisibility(l.$elm$), plt.$flags$ &= -2,
  419. relocateNodes.length = 0;
  420. }
  421. }, slotReferenceDebugNode = e => doc.createComment(`<slot${e.$name$ ? ' name="' + e.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`), originalLocationDebugNode = e => doc.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)), getElement = e => BUILD.lazyLoad ? getHostRef(e).$hostElement$ : e, createEvent = (e, t, o) => {
  422. const n = getElement(e);
  423. return {
  424. emit: e => (BUILD.isDev && n.isConnected, emitEvent(n, t, {
  425. bubbles: !!(4 & o),
  426. composed: !!(2 & o),
  427. cancelable: !!(1 & o),
  428. detail: e
  429. }))
  430. };
  431. }, emitEvent = (e, t, o) => {
  432. const n = plt.ce(t, o);
  433. return e.dispatchEvent(n), n;
  434. }, attachToAncestor = (e, t) => {
  435. BUILD.asyncLoading && t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((t => e.$onRenderResolve$ = t)));
  436. }, scheduleUpdate = (e, t) => {
  437. if (BUILD.taskQueue && BUILD.updatable && (e.$flags$ |= 16), BUILD.asyncLoading && 4 & e.$flags$) return void (e.$flags$ |= 512);
  438. attachToAncestor(e, e.$ancestorComponent$);
  439. const o = () => dispatchHooks(e, t);
  440. return BUILD.taskQueue ? writeTask(o) : o();
  441. }, dispatchHooks = (e, t) => {
  442. const o = e.$hostElement$, n = createTime("scheduleUpdate", e.$cmpMeta$.$tagName$), s = BUILD.lazyLoad ? e.$lazyInstance$ : o;
  443. let l;
  444. return t ? (BUILD.lazyLoad && BUILD.hostListener && (e.$flags$ |= 256, e.$queuedListeners$ && (e.$queuedListeners$.map((([e, t]) => safeCall(s, e, t))),
  445. e.$queuedListeners$ = null)), emitLifecycleEvent(o, "componentWillLoad"), BUILD.cmpWillLoad && (l = safeCall(s, "componentWillLoad"))) : (emitLifecycleEvent(o, "componentWillUpdate"),
  446. BUILD.cmpWillUpdate && (l = safeCall(s, "componentWillUpdate"))), emitLifecycleEvent(o, "componentWillRender"),
  447. BUILD.cmpWillRender && (l = then(l, (() => safeCall(s, "componentWillRender")))),
  448. n(), then(l, (() => updateComponent(e, s, t)));
  449. }, updateComponent = async (e, t, o) => {
  450. const n = e.$hostElement$, s = createTime("update", e.$cmpMeta$.$tagName$), l = n["s-rc"];
  451. BUILD.style && o && attachStyles(e);
  452. const a = createTime("render", e.$cmpMeta$.$tagName$);
  453. if (BUILD.isDev && (e.$flags$ |= 1024), BUILD.hydrateServerSide ? await callRender(e, t, n) : callRender(e, t, n),
  454. BUILD.cssVarShim && plt.$cssShim$ && plt.$cssShim$.updateHost(n), BUILD.isDev && (e.$renderCount$++,
  455. e.$flags$ &= -1025), BUILD.hydrateServerSide) try {
  456. serverSideConnected(n), o && (1 & e.$cmpMeta$.$flags$ ? n["s-en"] = "" : 2 & e.$cmpMeta$.$flags$ && (n["s-en"] = "c"));
  457. } catch (e) {
  458. consoleError(e, n);
  459. }
  460. if (BUILD.asyncLoading && l && (l.map((e => e())), n["s-rc"] = void 0), a(), s(),
  461. BUILD.asyncLoading) {
  462. const t = n["s-p"], o = () => postUpdateComponent(e);
  463. 0 === t.length ? o() : (Promise.all(t).then(o), e.$flags$ |= 4, t.length = 0);
  464. } else postUpdateComponent(e);
  465. };
  466. let renderingRef = null;
  467. const callRender = (e, t, o) => {
  468. const n = !!BUILD.allRenderFn, s = !!BUILD.lazyLoad, l = !!BUILD.taskQueue, a = !!BUILD.updatable;
  469. try {
  470. if (renderingRef = t, t = (n || t.render) && t.render(), a && l && (e.$flags$ &= -17),
  471. (a || s) && (e.$flags$ |= 2), BUILD.hasRenderFn || BUILD.reflect) if (BUILD.vdomRender || BUILD.reflect) {
  472. if (BUILD.hydrateServerSide) return Promise.resolve(t).then((t => renderVdom(e, t)));
  473. renderVdom(e, t);
  474. } else o.textContent = t;
  475. } catch (t) {
  476. consoleError(t, e.$hostElement$);
  477. }
  478. return renderingRef = null, null;
  479. }, getRenderingRef = () => renderingRef, postUpdateComponent = e => {
  480. const t = e.$cmpMeta$.$tagName$, o = e.$hostElement$, n = createTime("postUpdate", t), s = BUILD.lazyLoad ? e.$lazyInstance$ : o, l = e.$ancestorComponent$;
  481. BUILD.cmpDidRender && (BUILD.isDev && (e.$flags$ |= 1024), safeCall(s, "componentDidRender"),
  482. BUILD.isDev && (e.$flags$ &= -1025)), emitLifecycleEvent(o, "componentDidRender"),
  483. 64 & e.$flags$ ? (BUILD.cmpDidUpdate && (BUILD.isDev && (e.$flags$ |= 1024), safeCall(s, "componentDidUpdate"),
  484. BUILD.isDev && (e.$flags$ &= -1025)), emitLifecycleEvent(o, "componentDidUpdate"),
  485. n()) : (e.$flags$ |= 64, BUILD.asyncLoading && BUILD.cssAnnotations && addHydratedFlag(o),
  486. BUILD.cmpDidLoad && (BUILD.isDev && (e.$flags$ |= 2048), safeCall(s, "componentDidLoad"),
  487. BUILD.isDev && (e.$flags$ &= -2049)), emitLifecycleEvent(o, "componentDidLoad"),
  488. n(), BUILD.asyncLoading && (e.$onReadyResolve$(o), l || appDidLoad(t))), BUILD.hotModuleReplacement && o["s-hmr-load"] && o["s-hmr-load"](),
  489. BUILD.method && BUILD.lazyLoad && e.$onInstanceResolve$(o), BUILD.asyncLoading && (e.$onRenderResolve$ && (e.$onRenderResolve$(),
  490. e.$onRenderResolve$ = void 0), 512 & e.$flags$ && nextTick((() => scheduleUpdate(e, !1))),
  491. e.$flags$ &= -517);
  492. }, forceUpdate$1 = e => {
  493. if (BUILD.updatable) {
  494. const t = getHostRef(e), o = t.$hostElement$.isConnected;
  495. return o && 2 == (18 & t.$flags$) && scheduleUpdate(t, !1), o;
  496. }
  497. return !1;
  498. }, appDidLoad = e => {
  499. BUILD.cssAnnotations && addHydratedFlag(doc.documentElement), BUILD.asyncQueue && (plt.$flags$ |= 2),
  500. nextTick((() => emitEvent(win, "appload", {
  501. detail: {
  502. namespace: NAMESPACE
  503. }
  504. }))), BUILD.profile && performance.measure && performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${e})`, "st:app:start");
  505. }, safeCall = (e, t, o) => {
  506. if (e && e[t]) try {
  507. return e[t](o);
  508. } catch (e) {
  509. consoleError(e);
  510. }
  511. }, then = (e, t) => e && e.then ? e.then(t) : t(), emitLifecycleEvent = (e, t) => {
  512. BUILD.lifecycleDOMEvents && emitEvent(e, "stencil_" + t, {
  513. bubbles: !0,
  514. composed: !0,
  515. detail: {
  516. namespace: NAMESPACE
  517. }
  518. });
  519. }, addHydratedFlag = e => BUILD.hydratedClass ? e.classList.add("hydrated") : BUILD.hydratedAttribute ? e.setAttribute("hydrated", "") : void 0, serverSideConnected = e => {
  520. const t = e.children;
  521. if (null != t) for (let e = 0, o = t.length; e < o; e++) {
  522. const o = t[e];
  523. "function" == typeof o.connectedCallback && o.connectedCallback(), serverSideConnected(o);
  524. }
  525. }, clientHydrate = (e, t, o, n, s, l, a) => {
  526. let r, i, d, c;
  527. if (1 === l.nodeType) {
  528. for (r = l.getAttribute("c-id"), r && (i = r.split("."), i[0] !== a && "0" !== i[0] || (d = {
  529. $flags$: 0,
  530. $hostId$: i[0],
  531. $nodeId$: i[1],
  532. $depth$: i[2],
  533. $index$: i[3],
  534. $tag$: l.tagName.toLowerCase(),
  535. $elm$: l,
  536. $attrs$: null,
  537. $children$: null,
  538. $key$: null,
  539. $name$: null,
  540. $text$: null
  541. }, t.push(d), l.removeAttribute("c-id"), e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d,
  542. e = d, n && "0" === d.$depth$ && (n[d.$index$] = d.$elm$))), c = l.childNodes.length - 1; c >= 0; c--) clientHydrate(e, t, o, n, s, l.childNodes[c], a);
  543. if (l.shadowRoot) for (c = l.shadowRoot.childNodes.length - 1; c >= 0; c--) clientHydrate(e, t, o, n, s, l.shadowRoot.childNodes[c], a);
  544. } else if (8 === l.nodeType) i = l.nodeValue.split("."), i[1] !== a && "0" !== i[1] || (r = i[0],
  545. d = {
  546. $flags$: 0,
  547. $hostId$: i[1],
  548. $nodeId$: i[2],
  549. $depth$: i[3],
  550. $index$: i[4],
  551. $elm$: l,
  552. $attrs$: null,
  553. $children$: null,
  554. $key$: null,
  555. $name$: null,
  556. $tag$: null,
  557. $text$: null
  558. }, "t" === r ? (d.$elm$ = l.nextSibling, d.$elm$ && 3 === d.$elm$.nodeType && (d.$text$ = d.$elm$.textContent,
  559. t.push(d), l.remove(), e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d,
  560. n && "0" === d.$depth$ && (n[d.$index$] = d.$elm$))) : d.$hostId$ === a && ("s" === r ? (d.$tag$ = "slot",
  561. i[5] ? l["s-sn"] = d.$name$ = i[5] : l["s-sn"] = "", l["s-sr"] = !0, BUILD.shadowDom && n && (d.$elm$ = doc.createElement(d.$tag$),
  562. d.$name$ && d.$elm$.setAttribute("name", d.$name$), l.parentNode.insertBefore(d.$elm$, l),
  563. l.remove(), "0" === d.$depth$ && (n[d.$index$] = d.$elm$)), o.push(d), e.$children$ || (e.$children$ = []),
  564. e.$children$[d.$index$] = d) : "r" === r && (BUILD.shadowDom && n ? l.remove() : BUILD.slotRelocation && (s["s-cr"] = l,
  565. l["s-cn"] = !0)))); else if (e && "style" === e.$tag$) {
  566. const t = newVNode(null, l.textContent);
  567. t.$elm$ = l, t.$index$ = "0", e.$children$ = [ t ];
  568. }
  569. }, initializeDocumentHydrate = (e, t) => {
  570. if (1 === e.nodeType) {
  571. let o = 0;
  572. for (;o < e.childNodes.length; o++) initializeDocumentHydrate(e.childNodes[o], t);
  573. if (e.shadowRoot) for (o = 0; o < e.shadowRoot.childNodes.length; o++) initializeDocumentHydrate(e.shadowRoot.childNodes[o], t);
  574. } else if (8 === e.nodeType) {
  575. const o = e.nodeValue.split(".");
  576. "o" === o[0] && (t.set(o[1] + "." + o[2], e), e.nodeValue = "", e["s-en"] = o[3]);
  577. }
  578. }, parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : BUILD.propNumber && 2 & t ? parseFloat(e) : BUILD.propString && 1 & t ? String(e) : e, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, o, n) => {
  579. const s = getHostRef(e), l = BUILD.lazyLoad ? s.$hostElement$ : e, a = s.$instanceValues$.get(t), r = s.$flags$, i = BUILD.lazyLoad ? s.$lazyInstance$ : l;
  580. o = parsePropertyValue(o, n.$members$[t][0]);
  581. const d = Number.isNaN(a) && Number.isNaN(o), c = o !== a && !d;
  582. if ((!BUILD.lazyLoad || !(8 & r) || void 0 === a) && c && (s.$instanceValues$.set(t, o),
  583. BUILD.isDev && (1024 & s.$flags$ || s.$flags$), !BUILD.lazyLoad || i)) {
  584. if (BUILD.watchCallback && n.$watchers$ && 128 & r) {
  585. const e = n.$watchers$[t];
  586. e && e.map((e => {
  587. try {
  588. i[e](o, a, t);
  589. } catch (e) {
  590. consoleError(e, l);
  591. }
  592. }));
  593. }
  594. if (BUILD.updatable && 2 == (18 & r)) {
  595. if (BUILD.cmpShouldUpdate && i.componentShouldUpdate && !1 === i.componentShouldUpdate(o, a, t)) return;
  596. scheduleUpdate(s, !1);
  597. }
  598. }
  599. }, proxyComponent = (e, t, o) => {
  600. if (BUILD.member && t.$members$) {
  601. BUILD.watchCallback && e.watchers && (t.$watchers$ = e.watchers);
  602. const n = Object.entries(t.$members$), s = e.prototype;
  603. if (n.map((([e, [n]]) => {
  604. (BUILD.prop || BUILD.state) && (31 & n || (!BUILD.lazyLoad || 2 & o) && 32 & n) ? Object.defineProperty(s, e, {
  605. get() {
  606. return getValue(this, e);
  607. },
  608. set(s) {
  609. if (BUILD.isDev) {
  610. const s = getHostRef(this);
  611. 0 == (1 & o) && 0 == (8 & s.$flags$) && 0 != (31 & n) && 0 == (1024 & n) && consoleDevWarn(`@Prop() "${e}" on <${t.$tagName$}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`);
  612. }
  613. setValue(this, e, s, t);
  614. },
  615. configurable: !0,
  616. enumerable: !0
  617. }) : BUILD.lazyLoad && BUILD.method && 1 & o && 64 & n && Object.defineProperty(s, e, {
  618. value(...t) {
  619. const o = getHostRef(this);
  620. return o.$onInstancePromise$.then((() => o.$lazyInstance$[e](...t)));
  621. }
  622. });
  623. })), BUILD.observeAttribute && (!BUILD.lazyLoad || 1 & o)) {
  624. const o = new Map;
  625. s.attributeChangedCallback = function(e, t, n) {
  626. plt.jmp((() => {
  627. const t = o.get(e);
  628. if (this.hasOwnProperty(t)) n = this[t], delete this[t]; else if (s.hasOwnProperty(t) && "number" == typeof this[t] && this[t] == n) return;
  629. this[t] = (null !== n || "boolean" != typeof this[t]) && n;
  630. }));
  631. }, e.observedAttributes = n.filter((([e, t]) => 15 & t[0])).map((([e, n]) => {
  632. const s = n[1] || e;
  633. return o.set(s, e), BUILD.reflect && 512 & n[0] && t.$attrsToReflect$.push([ e, s ]),
  634. s;
  635. }));
  636. }
  637. }
  638. return e;
  639. }, initializeComponent = async (e, t, o, n, s) => {
  640. if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) && 0 == (32 & t.$flags$)) {
  641. if (BUILD.lazyLoad || BUILD.hydrateClientSide) {
  642. if (t.$flags$ |= 32, (s = loadModule(o)).then) {
  643. const e = (l = `st:load:${o.$tagName$}:${t.$modeName$}`, a = `[Stencil] Load module for <${o.$tagName$}>`,
  644. BUILD.profile && performance.mark ? (0 === performance.getEntriesByName(l).length && performance.mark(l),
  645. () => {
  646. 0 === performance.getEntriesByName(a).length && performance.measure(a, l);
  647. }) : () => {});
  648. s = await s, e();
  649. }
  650. if ((BUILD.isDev || BUILD.isDebug) && !s) throw new Error(`Constructor for "${o.$tagName$}#${t.$modeName$}" was not found`);
  651. BUILD.member && !s.isProxied && (BUILD.watchCallback && (o.$watchers$ = s.watchers),
  652. proxyComponent(s, o, 2), s.isProxied = !0);
  653. const e = createTime("createInstance", o.$tagName$);
  654. BUILD.member && (t.$flags$ |= 8);
  655. try {
  656. new s(t);
  657. } catch (e) {
  658. consoleError(e);
  659. }
  660. BUILD.member && (t.$flags$ &= -9), BUILD.watchCallback && (t.$flags$ |= 128), e(),
  661. fireConnectedCallback(t.$lazyInstance$);
  662. } else s = e.constructor, t.$flags$ |= 32, customElements.whenDefined(o.$tagName$).then((() => t.$flags$ |= 128));
  663. if (BUILD.style && s.style) {
  664. let n = s.style;
  665. BUILD.mode && "string" != typeof n && (n = n[t.$modeName$ = computeMode(e)], BUILD.hydrateServerSide && t.$modeName$ && e.setAttribute("s-mode", t.$modeName$));
  666. const l = getScopeId(o, t.$modeName$);
  667. if (!styles.has(l)) {
  668. const e = createTime("registerStyles", o.$tagName$);
  669. !BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && 8 & o.$flags$ && (n = await import("./shadow-css.js").then((e => e.scopeCss(n, l, !1)))),
  670. registerStyle(l, n, o.$flags$), e();
  671. }
  672. }
  673. }
  674. var l, a;
  675. const r = t.$ancestorComponent$, i = () => scheduleUpdate(t, !0);
  676. BUILD.asyncLoading && r && r["s-rc"] ? r["s-rc"].push(i) : i();
  677. }, fireConnectedCallback = e => {
  678. BUILD.lazyLoad && BUILD.connectedCallback && safeCall(e, "connectedCallback");
  679. }, connectedCallback = e => {
  680. if (0 == (1 & plt.$flags$)) {
  681. const t = getHostRef(e), o = t.$cmpMeta$, n = createTime("connectedCallback", o.$tagName$);
  682. if (BUILD.hostListenerTargetParent && addHostEventListeners(e, t, o.$listeners$, !0),
  683. 1 & t.$flags$) addHostEventListeners(e, t, o.$listeners$, !1), fireConnectedCallback(t.$lazyInstance$); else {
  684. let n;
  685. if (t.$flags$ |= 1, BUILD.hydrateClientSide && (n = e.getAttribute("s-id"), n)) {
  686. if (BUILD.shadowDom && supportsShadow && 1 & o.$flags$) {
  687. const t = BUILD.mode ? addStyle(e.shadowRoot, o, e.getAttribute("s-mode")) : addStyle(e.shadowRoot, o);
  688. e.classList.remove(t + "-h", t + "-s");
  689. }
  690. ((e, t, o, n) => {
  691. const s = createTime("hydrateClient", t), l = e.shadowRoot, a = [], r = BUILD.shadowDom && l ? [] : null, i = n.$vnode$ = newVNode(t, null);
  692. plt.$orgLocNodes$ || initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = new Map),
  693. e["s-id"] = o, e.removeAttribute("s-id"), clientHydrate(i, a, [], r, e, e, o), a.map((e => {
  694. const o = e.$hostId$ + "." + e.$nodeId$, n = plt.$orgLocNodes$.get(o), s = e.$elm$;
  695. n && supportsShadow && "" === n["s-en"] && n.parentNode.insertBefore(s, n.nextSibling),
  696. l || (s["s-hn"] = t, n && (s["s-ol"] = n, s["s-ol"]["s-nr"] = s)), plt.$orgLocNodes$.delete(o);
  697. })), BUILD.shadowDom && l && r.map((e => {
  698. e && l.appendChild(e);
  699. })), s();
  700. })(e, o.$tagName$, n, t);
  701. }
  702. if (BUILD.slotRelocation && !n && (BUILD.hydrateServerSide || (BUILD.slot || BUILD.shadowDom) && 12 & o.$flags$) && setContentReference(e),
  703. BUILD.asyncLoading) {
  704. let o = e;
  705. for (;o = o.parentNode || o.host; ) if (BUILD.hydrateClientSide && 1 === o.nodeType && o.hasAttribute("s-id") && o["s-p"] || o["s-p"]) {
  706. attachToAncestor(t, t.$ancestorComponent$ = o);
  707. break;
  708. }
  709. }
  710. BUILD.prop && !BUILD.hydrateServerSide && o.$members$ && Object.entries(o.$members$).map((([t, [o]]) => {
  711. if (31 & o && e.hasOwnProperty(t)) {
  712. const o = e[t];
  713. delete e[t], e[t] = o;
  714. }
  715. })), BUILD.initializeNextTick ? nextTick((() => initializeComponent(e, t, o))) : initializeComponent(e, t, o);
  716. }
  717. n();
  718. }
  719. }, setContentReference = e => {
  720. const t = e["s-cr"] = doc.createComment(BUILD.isDebug ? `content-ref (host=${e.localName})` : "");
  721. t["s-cn"] = !0, e.insertBefore(t, e.firstChild);
  722. }, disconnectedCallback = e => {
  723. if (0 == (1 & plt.$flags$)) {
  724. const t = getHostRef(e), o = BUILD.lazyLoad ? t.$lazyInstance$ : e;
  725. BUILD.hostListener && t.$rmListeners$ && (t.$rmListeners$.map((e => e())), t.$rmListeners$ = void 0),
  726. BUILD.cssVarShim && plt.$cssShim$ && plt.$cssShim$.removeHost(e), BUILD.lazyLoad && BUILD.disconnectedCallback && safeCall(o, "disconnectedCallback"),
  727. BUILD.cmpDidUnload && safeCall(o, "componentDidUnload");
  728. }
  729. }, defineCustomElement = (e, t) => {
  730. customElements.define(t[1], proxyCustomElement(e, t));
  731. }, proxyCustomElement = (e, t) => {
  732. const o = {
  733. $flags$: t[0],
  734. $tagName$: t[1]
  735. };
  736. BUILD.member && (o.$members$ = t[2]), BUILD.hostListener && (o.$listeners$ = t[3]),
  737. BUILD.watchCallback && (o.$watchers$ = e.$watchers$), BUILD.reflect && (o.$attrsToReflect$ = []),
  738. BUILD.shadowDom && !supportsShadow && 1 & o.$flags$ && (o.$flags$ |= 8);
  739. const n = e.prototype.connectedCallback, s = e.prototype.disconnectedCallback;
  740. return Object.assign(e.prototype, {
  741. __registerHost() {
  742. registerHost(this, o);
  743. },
  744. connectedCallback() {
  745. connectedCallback(this), BUILD.connectedCallback && n && n.call(this);
  746. },
  747. disconnectedCallback() {
  748. disconnectedCallback(this), BUILD.disconnectedCallback && s && s.call(this);
  749. },
  750. __attachShadow() {
  751. this.shadowRoot = this;
  752. }
  753. }), e.is = o.$tagName$, proxyComponent(e, o, 3);
  754. }, forceModeUpdate = e => {
  755. if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
  756. const t = computeMode(e), o = getHostRef(e);
  757. if (o.$modeName$ !== t) {
  758. const n = o.$cmpMeta$, s = e["s-sc"], l = getScopeId(n, t), a = e.constructor.style[t];
  759. n.$flags$, a && (styles.has(l) || registerStyle(l, a), o.$modeName$ = t, e.classList.remove(s + "-h", s + "-s"),
  760. attachStyles(o), forceUpdate$1(e));
  761. }
  762. }
  763. }, patchCloneNode = e => {
  764. const t = e.cloneNode;
  765. e.cloneNode = function(e) {
  766. const o = this, n = !!BUILD.shadowDom && o.shadowRoot && supportsShadow, s = t.call(o, !!n && e);
  767. if (BUILD.slot && !n && e) {
  768. let e, t, n = 0, l = [ "s-id", "s-cr", "s-lr", "s-rc", "s-sc", "s-p", "s-cn", "s-sr", "s-sn", "s-hn", "s-ol", "s-nr", "s-si" ];
  769. for (;n < o.childNodes.length; n++) e = o.childNodes[n]["s-nr"], t = l.every((e => !o.childNodes[n][e])),
  770. e && (BUILD.appendChildSlotFix && s.__appendChild ? s.__appendChild(e.cloneNode(!0)) : s.appendChild(e.cloneNode(!0))),
  771. t && s.appendChild(o.childNodes[n].cloneNode(!0));
  772. }
  773. return s;
  774. };
  775. }, patchSlotAppendChild = e => {
  776. e.__appendChild = e.appendChild, e.appendChild = function(e) {
  777. const t = e["s-sn"] = getSlotName(e), o = getHostSlotNode(this.childNodes, t);
  778. if (o) {
  779. const n = getHostSlotChildNodes(o, t), s = n[n.length - 1];
  780. return s.parentNode.insertBefore(e, s.nextSibling);
  781. }
  782. return this.__appendChild(e);
  783. };
  784. }, patchTextContent = (e, t) => {
  785. if (BUILD.scoped && 2 & t.$flags$) {
  786. const t = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
  787. Object.defineProperty(e, "__textContent", t), Object.defineProperty(e, "textContent", {
  788. get() {
  789. var e;
  790. const t = getHostSlotNode(this.childNodes, "");
  791. return 3 === (null === (e = null == t ? void 0 : t.nextSibling) || void 0 === e ? void 0 : e.nodeType) ? t.nextSibling.textContent : t ? t.textContent : this.__textContent;
  792. },
  793. set(e) {
  794. var t;
  795. const o = getHostSlotNode(this.childNodes, "");
  796. if (3 === (null === (t = null == o ? void 0 : o.nextSibling) || void 0 === t ? void 0 : t.nodeType)) o.nextSibling.textContent = e; else if (o) o.textContent = e; else {
  797. this.__textContent = e;
  798. const t = this["s-cr"];
  799. t && this.insertBefore(t, this.firstChild);
  800. }
  801. }
  802. });
  803. }
  804. }, patchChildSlotNodes = (e, t) => {
  805. class o extends Array {
  806. item(e) {
  807. return this[e];
  808. }
  809. }
  810. if (8 & t.$flags$) {
  811. const t = e.__lookupGetter__("childNodes");
  812. Object.defineProperty(e, "children", {
  813. get() {
  814. return this.childNodes.map((e => 1 === e.nodeType));
  815. }
  816. }), Object.defineProperty(e, "childElementCount", {
  817. get: () => e.children.length
  818. }), Object.defineProperty(e, "childNodes", {
  819. get() {
  820. const e = t.call(this);
  821. if (0 == (1 & plt.$flags$) && 2 & getHostRef(this).$flags$) {
  822. const t = new o;
  823. for (let o = 0; o < e.length; o++) {
  824. const n = e[o]["s-nr"];
  825. n && t.push(n);
  826. }
  827. return t;
  828. }
  829. return o.from(e);
  830. }
  831. });
  832. }
  833. }, getSlotName = e => e["s-sn"] || 1 === e.nodeType && e.getAttribute("slot") || "", getHostSlotNode = (e, t) => {
  834. let o, n = 0;
  835. for (;n < e.length; n++) {
  836. if (o = e[n], o["s-sr"] && o["s-sn"] === t) return o;
  837. if (o = getHostSlotNode(o.childNodes, t), o) return o;
  838. }
  839. return null;
  840. }, getHostSlotChildNodes = (e, t) => {
  841. const o = [ e ];
  842. for (;(e = e.nextSibling) && e["s-sn"] === t; ) o.push(e);
  843. return o;
  844. }, bootstrapLazy = (e, t = {}) => {
  845. BUILD.profile && performance.mark && performance.mark("st:app:start"), (() => {
  846. if (BUILD.devTools) {
  847. const e = win.stencil = win.stencil || {}, t = e.inspect;
  848. e.inspect = e => {
  849. let o = (e => {
  850. const t = getHostRef(e);
  851. if (!t) return;
  852. const o = t.$flags$, n = t.$hostElement$;
  853. return {
  854. renderCount: t.$renderCount$,
  855. flags: {
  856. hasRendered: !!(2 & o),
  857. hasConnected: !!(1 & o),
  858. isWaitingForChildren: !!(4 & o),
  859. isConstructingInstance: !!(8 & o),
  860. isQueuedForUpdate: !!(16 & o),
  861. hasInitializedComponent: !!(32 & o),
  862. hasLoadedComponent: !!(64 & o),
  863. isWatchReady: !!(128 & o),
  864. isListenReady: !!(256 & o),
  865. needsRerender: !!(512 & o)
  866. },
  867. instanceValues: t.$instanceValues$,
  868. ancestorComponent: t.$ancestorComponent$,
  869. hostElement: n,
  870. lazyInstance: t.$lazyInstance$,
  871. vnode: t.$vnode$,
  872. modeName: t.$modeName$,
  873. onReadyPromise: t.$onReadyPromise$,
  874. onReadyResolve: t.$onReadyResolve$,
  875. onInstancePromise: t.$onInstancePromise$,
  876. onInstanceResolve: t.$onInstanceResolve$,
  877. onRenderResolve: t.$onRenderResolve$,
  878. queuedListeners: t.$queuedListeners$,
  879. rmListeners: t.$rmListeners$,
  880. "s-id": n["s-id"],
  881. "s-cr": n["s-cr"],
  882. "s-lr": n["s-lr"],
  883. "s-p": n["s-p"],
  884. "s-rc": n["s-rc"],
  885. "s-sc": n["s-sc"]
  886. };
  887. })(e);
  888. return o || "function" != typeof t || (o = t(e)), o;
  889. };
  890. }
  891. })();
  892. const o = createTime("bootstrapLazy"), n = [], s = t.exclude || [], l = win.customElements, a = doc.head, r = a.querySelector("meta[charset]"), i = doc.createElement("style"), d = [], c = doc.querySelectorAll("[sty-id]");
  893. let $, m = !0, p = 0;
  894. if (Object.assign(plt, t), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
  895. BUILD.asyncQueue && t.syncQueue && (plt.$flags$ |= 4), BUILD.hydrateClientSide && (plt.$flags$ |= 2),
  896. BUILD.hydrateClientSide && BUILD.shadowDom) for (;p < c.length; p++) registerStyle(c[p].getAttribute("sty-id"), c[p].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
  897. e.map((e => {
  898. e[1].map((o => {
  899. const a = {
  900. $flags$: o[0],
  901. $tagName$: o[1],
  902. $members$: o[2],
  903. $listeners$: o[3]
  904. };
  905. BUILD.member && (a.$members$ = o[2]), BUILD.hostListener && (a.$listeners$ = o[3]),
  906. BUILD.reflect && (a.$attrsToReflect$ = []), BUILD.watchCallback && (a.$watchers$ = {}),
  907. BUILD.shadowDom && !supportsShadow && 1 & a.$flags$ && (a.$flags$ |= 8);
  908. const r = BUILD.transformTagName && t.transformTagName ? t.transformTagName(a.$tagName$) : a.$tagName$, i = class extends HTMLElement {
  909. constructor(e) {
  910. super(e), registerHost(e = this, a), BUILD.shadowDom && 1 & a.$flags$ && (BUILD.hydrateServerSide || "shadowRoot" in e || (e.shadowRoot = e)),
  911. BUILD.slotChildNodesFix && patchChildSlotNodes(e, a);
  912. }
  913. connectedCallback() {
  914. $ && (clearTimeout($), $ = null), m ? d.push(this) : plt.jmp((() => connectedCallback(this)));
  915. }
  916. disconnectedCallback() {
  917. plt.jmp((() => disconnectedCallback(this)));
  918. }
  919. componentOnReady() {
  920. return getHostRef(this).$onReadyPromise$;
  921. }
  922. };
  923. BUILD.cloneNodeFix && patchCloneNode(i.prototype), BUILD.appendChildSlotFix && patchSlotAppendChild(i.prototype),
  924. BUILD.hotModuleReplacement && (i.prototype["s-hmr"] = function(e) {
  925. ((e, t, o) => {
  926. const n = getHostRef(e);
  927. n.$flags$ = 1, e["s-hmr-load"] = () => {
  928. delete e["s-hmr-load"];
  929. }, initializeComponent(e, n, t);
  930. })(this, a);
  931. }), BUILD.scopedSlotTextContentFix && patchTextContent(i.prototype, a), a.$lazyBundleId$ = e[0],
  932. s.includes(r) || l.get(r) || (n.push(r), l.define(r, proxyComponent(i, a, 1)));
  933. }));
  934. })), BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute) && (i.innerHTML = n + "{visibility:hidden}.hydrated{visibility:inherit}",
  935. i.setAttribute("data-styles", ""), a.insertBefore(i, r ? r.nextSibling : a.firstChild)),
  936. m = !1, d.length ? d.map((e => e.connectedCallback())) : BUILD.profile ? plt.jmp((() => $ = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => $ = setTimeout(appDidLoad, 30))),
  937. o();
  938. }, getAssetPath = e => {
  939. const t = new URL(e, plt.$resourcesUrl$);
  940. return t.origin !== win.location.origin ? t.href : t.pathname;
  941. }, setAssetPath = e => plt.$resourcesUrl$ = e, getConnect = (e, t) => {
  942. const o = () => {
  943. let e = doc.querySelector(t);
  944. return e || (e = doc.createElement(t), doc.body.appendChild(e)), "function" == typeof e.componentOnReady ? e.componentOnReady() : Promise.resolve(e);
  945. };
  946. return {
  947. create: (...e) => o().then((t => t.create(...e))),
  948. componentOnReady: o
  949. };
  950. }, getContext = (e, t) => t in Context ? Context[t] : "window" === t ? win : "document" === t ? doc : "isServer" === t || "isPrerender" === t ? !!BUILD.hydrateServerSide : "isClient" === t ? !BUILD.hydrateServerSide : "resourcesUrl" === t || "publicPath" === t ? getAssetPath(".") : "queue" === t ? {
  951. write: writeTask,
  952. read: readTask,
  953. tick: {
  954. then: e => nextTick(e)
  955. }
  956. } : void 0, insertVdomAnnotations = (e, t) => {
  957. if (null != e) {
  958. const o = {
  959. hostIds: 0,
  960. rootLevelIds: 0,
  961. staticComponents: new Set(t)
  962. }, n = [];
  963. parseVNodeAnnotations(e, e.body, o, n), n.forEach((t => {
  964. if (null != t) {
  965. const n = t["s-nr"];
  966. let s = n["s-host-id"], l = n["s-node-id"], a = `${s}.${l}`;
  967. if (null == s) if (s = 0, o.rootLevelIds++, l = o.rootLevelIds, a = `${s}.${l}`,
  968. 1 === n.nodeType) n.setAttribute("c-id", a); else if (3 === n.nodeType) {
  969. if (0 === s && "" === n.nodeValue.trim()) return void t.remove();
  970. const o = e.createComment(a);
  971. o.nodeValue = `t.${a}`, n.parentNode.insertBefore(o, n);
  972. }
  973. let r = `o.${a}`;
  974. const i = t.parentElement;
  975. i && ("" === i["s-en"] ? r += "." : "c" === i["s-en"] && (r += ".c")), t.nodeValue = r;
  976. }
  977. }));
  978. }
  979. }, parseVNodeAnnotations = (e, t, o, n) => {
  980. null != t && (null != t["s-nr"] && n.push(t), 1 === t.nodeType && t.childNodes.forEach((t => {
  981. const s = getHostRef(t);
  982. if (null != s && !o.staticComponents.has(t.nodeName.toLowerCase())) {
  983. const n = {
  984. nodeIds: 0
  985. };
  986. insertVNodeAnnotations(e, t, s.$vnode$, o, n);
  987. }
  988. parseVNodeAnnotations(e, t, o, n);
  989. })));
  990. }, insertVNodeAnnotations = (e, t, o, n, s) => {
  991. if (null != o) {
  992. const l = ++n.hostIds;
  993. if (t.setAttribute("s-id", l), null != t["s-cr"] && (t["s-cr"].nodeValue = `r.${l}`),
  994. null != o.$children$) {
  995. const t = 0;
  996. o.$children$.forEach(((o, n) => {
  997. insertChildVNodeAnnotations(e, o, s, l, t, n);
  998. }));
  999. }
  1000. if (t && o && o.$elm$ && !t.hasAttribute("c-id")) {
  1001. const e = t.parentElement;
  1002. if (e && e.childNodes) {
  1003. const n = Array.from(e.childNodes), s = n.find((e => 8 === e.nodeType && e["s-sr"]));
  1004. if (s) {
  1005. const e = n.indexOf(t) - 1;
  1006. o.$elm$.setAttribute("c-id", `${s["s-host-id"]}.${s["s-node-id"]}.0.${e}`);
  1007. }
  1008. }
  1009. }
  1010. }
  1011. }, insertChildVNodeAnnotations = (e, t, o, n, s, l) => {
  1012. const a = t.$elm$;
  1013. if (null == a) return;
  1014. const r = o.nodeIds++, i = `${n}.${r}.${s}.${l}`;
  1015. if (a["s-host-id"] = n, a["s-node-id"] = r, 1 === a.nodeType) a.setAttribute("c-id", i); else if (3 === a.nodeType) {
  1016. const t = a.parentNode, o = t.nodeName;
  1017. if ("STYLE" !== o && "SCRIPT" !== o) {
  1018. const o = `t.${i}`, n = e.createComment(o);
  1019. t.insertBefore(n, a);
  1020. }
  1021. } else if (8 === a.nodeType && a["s-sr"]) {
  1022. const e = `s.${i}.${a["s-sn"] || ""}`;
  1023. a.nodeValue = e;
  1024. }
  1025. if (null != t.$children$) {
  1026. const l = s + 1;
  1027. t.$children$.forEach(((t, s) => {
  1028. insertChildVNodeAnnotations(e, t, o, n, l, s);
  1029. }));
  1030. }
  1031. }, Fragment = (e, t) => t, NO_HYDRATE_TAGS = new Set([ "CODE", "HEAD", "IFRAME", "INPUT", "OBJECT", "OUTPUT", "NOSCRIPT", "PRE", "SCRIPT", "SELECT", "STYLE", "TEMPLATE", "TEXTAREA" ]), hAsync = (e, t, ...o) => {
  1032. if (Array.isArray(o) && o.length > 0) {
  1033. const n = o.flat(1 / 0);
  1034. return n.some(isPromise) ? Promise.all(n).then((o => h(e, t, ...o))).catch((o => h(e, t))) : h(e, t, ...o);
  1035. }
  1036. return h(e, t);
  1037. };
  1038. let customError;
  1039. const cmpModules = new Map, getModule = e => {
  1040. if ("string" == typeof e) {
  1041. e = e.toLowerCase();
  1042. const t = cmpModules.get(e);
  1043. if (null != t) return t[e];
  1044. }
  1045. return null;
  1046. }, loadModule = (e, t, o) => getModule(e.$tagName$), isMemberInElement = (e, t) => {
  1047. if (null != e) {
  1048. if (t in e) return !0;
  1049. const o = getModule(e.nodeName);
  1050. if (null != o) {
  1051. const e = o;
  1052. if (null != e && null != e.cmpMeta && null != e.cmpMeta.$members$) return t in e.cmpMeta.$members$;
  1053. }
  1054. }
  1055. return !1;
  1056. }, registerComponents = e => {
  1057. for (const t of e) {
  1058. const e = t.cmpMeta.$tagName$;
  1059. cmpModules.set(e, {
  1060. [e]: t
  1061. });
  1062. }
  1063. }, win = window, doc = win.document, readTask = e => {
  1064. process.nextTick((() => {
  1065. try {
  1066. e();
  1067. } catch (e) {
  1068. consoleError(e);
  1069. }
  1070. }));
  1071. }, writeTask = e => {
  1072. process.nextTick((() => {
  1073. try {
  1074. e();
  1075. } catch (e) {
  1076. consoleError(e);
  1077. }
  1078. }));
  1079. }, resolved = Promise.resolve(), nextTick = e => resolved.then(e), defaultConsoleError = e => {
  1080. null != e && console.error(e.stack || e.message || e);
  1081. }, consoleError = (e, t) => (customError || defaultConsoleError)(e, t), consoleDevError = (...e) => {}, consoleDevWarn = (...e) => {}, consoleDevInfo = (...e) => {}, setErrorHandler = e => customError = e, Context = {}, plt = {
  1082. $flags$: 0,
  1083. $resourcesUrl$: "",
  1084. jmp: e => e(),
  1085. raf: e => requestAnimationFrame(e),
  1086. ael: (e, t, o, n) => e.addEventListener(t, o, n),
  1087. rel: (e, t, o, n) => e.removeEventListener(t, o, n),
  1088. ce: (e, t) => new win.CustomEvent(e, t)
  1089. }, setPlatformHelpers = e => {
  1090. Object.assign(plt, e);
  1091. }, supportsShadow = !1, supportsListenerOptions = !1, supportsConstructibleStylesheets = !1, hostRefs = new WeakMap, getHostRef = e => hostRefs.get(e), registerInstance = (e, t) => hostRefs.set(t.$lazyInstance$ = e, t), registerHost = (e, t) => {
  1092. const o = {
  1093. $flags$: 0,
  1094. $cmpMeta$: t,
  1095. $hostElement$: e,
  1096. $instanceValues$: new Map,
  1097. $renderCount$: 0
  1098. };
  1099. return o.$onInstancePromise$ = new Promise((e => o.$onInstanceResolve$ = e)), o.$onReadyPromise$ = new Promise((e => o.$onReadyResolve$ = e)),
  1100. e["s-p"] = [], e["s-rc"] = [], addHostEventListeners(e, o, t.$listeners$, !1), hostRefs.set(e, o);
  1101. }, Build = {
  1102. isDev: !1,
  1103. isBrowser: !1,
  1104. isServer: !0,
  1105. isTesting: !1
  1106. }, styles = new Map, modeResolutionChain = [];
  1107. export { Build, Context, Fragment, Host, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate$1 as forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, hAsync as h, hydrateApp, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setValue, styles, supportsConstructibleStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };