@deijose/nix-ionic 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +135 -28
  2. package/dist/favicon.ico +0 -0
  3. package/dist/index.cjs +2612 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.js +2602 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib/index.d.ts +2 -3
  8. package/dist/nix-js-logo.png +0 -0
  9. package/dist/p-9VcRUwdB-BZDASSRz.js +323 -0
  10. package/dist/p-9VcRUwdB-BZDASSRz.js.map +1 -0
  11. package/dist/p-9VcRUwdB-Bw8gCHlL.cjs +340 -0
  12. package/dist/p-9VcRUwdB-Bw8gCHlL.cjs.map +1 -0
  13. package/dist/p-BJoMtgfR-DP5flT_f.js +1206 -0
  14. package/dist/p-BJoMtgfR-DP5flT_f.js.map +1 -0
  15. package/dist/p-BJoMtgfR-DyzhC2Uw.cjs +1319 -0
  16. package/dist/p-BJoMtgfR-DyzhC2Uw.cjs.map +1 -0
  17. package/dist/p-BgwEQWW6-BM87vVU5.cjs +72 -0
  18. package/dist/p-BgwEQWW6-BM87vVU5.cjs.map +1 -0
  19. package/dist/p-BgwEQWW6-DIo2-ASC.js +72 -0
  20. package/dist/p-BgwEQWW6-DIo2-ASC.js.map +1 -0
  21. package/dist/p-BmVRXR1y-BsLZqRc0.cjs +41 -0
  22. package/dist/p-BmVRXR1y-BsLZqRc0.cjs.map +1 -0
  23. package/dist/p-BmVRXR1y-t-R4bYc1.js +41 -0
  24. package/dist/p-BmVRXR1y-t-R4bYc1.js.map +1 -0
  25. package/dist/p-C59ryAuS-CFciP5mq.cjs +42 -0
  26. package/dist/p-C59ryAuS-CFciP5mq.cjs.map +1 -0
  27. package/dist/p-C59ryAuS-DazlzUfi.js +19 -0
  28. package/dist/p-C59ryAuS-DazlzUfi.js.map +1 -0
  29. package/dist/p-CBzELu-H-DlS7IGlS.cjs +292 -0
  30. package/dist/p-CBzELu-H-DlS7IGlS.cjs.map +1 -0
  31. package/dist/p-CBzELu-H-bk38lWXh.js +287 -0
  32. package/dist/p-CBzELu-H-bk38lWXh.js.map +1 -0
  33. package/dist/p-CU1SSH8_-1VQUU8Zi.js +27 -0
  34. package/dist/p-CU1SSH8_-1VQUU8Zi.js.map +1 -0
  35. package/dist/p-CU1SSH8_-D56vgRhd.cjs +32 -0
  36. package/dist/p-CU1SSH8_-D56vgRhd.cjs.map +1 -0
  37. package/dist/p-Cl0B-RWe-CaQPWG_o.js +258 -0
  38. package/dist/p-Cl0B-RWe-CaQPWG_o.js.map +1 -0
  39. package/dist/p-Cl0B-RWe-CsujC7rr.cjs +269 -0
  40. package/dist/p-Cl0B-RWe-CsujC7rr.cjs.map +1 -0
  41. package/dist/p-CneGxKsZ-C5qTtPZx.cjs +26 -0
  42. package/dist/p-CneGxKsZ-C5qTtPZx.cjs.map +1 -0
  43. package/dist/p-CneGxKsZ-DghQx9uV.js +26 -0
  44. package/dist/p-CneGxKsZ-DghQx9uV.js.map +1 -0
  45. package/dist/p-Cwv-vmkN-CEJtqyzO.js +141 -0
  46. package/dist/p-Cwv-vmkN-CEJtqyzO.js.map +1 -0
  47. package/dist/p-Cwv-vmkN-_Ll5IGJb.cjs +141 -0
  48. package/dist/p-Cwv-vmkN-_Ll5IGJb.cjs.map +1 -0
  49. package/dist/p-Cz5nLPGT-CCHjKH-2.cjs +45 -0
  50. package/dist/p-Cz5nLPGT-CCHjKH-2.cjs.map +1 -0
  51. package/dist/p-Cz5nLPGT-mbB7NqG3.js +45 -0
  52. package/dist/p-Cz5nLPGT-mbB7NqG3.js.map +1 -0
  53. package/dist/p-D13Eaw-8-CkhHu_JZ.js +35 -0
  54. package/dist/p-D13Eaw-8-CkhHu_JZ.js.map +1 -0
  55. package/dist/p-D13Eaw-8-DwZ_qr-I.cjs +46 -0
  56. package/dist/p-D13Eaw-8-DwZ_qr-I.cjs.map +1 -0
  57. package/dist/p-D6Ynv7Xh-CQpbvraJ.cjs +41 -0
  58. package/dist/p-D6Ynv7Xh-CQpbvraJ.cjs.map +1 -0
  59. package/dist/p-D6Ynv7Xh-bzjdXLwD.js +41 -0
  60. package/dist/p-D6Ynv7Xh-bzjdXLwD.js.map +1 -0
  61. package/dist/p-DgbT0exM-BY3-DNWX.cjs +178 -0
  62. package/dist/p-DgbT0exM-BY3-DNWX.cjs.map +1 -0
  63. package/dist/p-DgbT0exM-Bjp0vDlM.js +107 -0
  64. package/dist/p-DgbT0exM-Bjp0vDlM.js.map +1 -0
  65. package/dist/p-ZjP4CjeZ-BpWsQNNL.cjs +20 -0
  66. package/dist/p-ZjP4CjeZ-BpWsQNNL.cjs.map +1 -0
  67. package/dist/p-ZjP4CjeZ-iNpKbiw2.js +9 -0
  68. package/dist/p-ZjP4CjeZ-iNpKbiw2.js.map +1 -0
  69. package/dist/p-vEbVo2hO-Bo4CY69w.cjs +80 -0
  70. package/dist/p-vEbVo2hO-Bo4CY69w.cjs.map +1 -0
  71. package/dist/p-vEbVo2hO-CpCOqZ3z.js +69 -0
  72. package/dist/p-vEbVo2hO-CpCOqZ3z.js.map +1 -0
  73. package/dist/rolldown-runtime-CYJQ3TkU.cjs +18 -0
  74. package/dist/rolldown-runtime-CiIaOW0V.js +13 -0
  75. package/package.json +94 -2
  76. package/dist/lib/IonRouterOutlet.d.ts +0 -23
  77. package/dist/lib/lifecycle.d.ts +0 -36
  78. package/dist/lib/nix-ionic.cjs +0 -1
  79. package/dist/lib/nix-ionic.cjs.map +0 -1
  80. package/dist/lib/nix-ionic.js +0 -1
  81. package/dist/lib/nix-ionic.js.map +0 -1
  82. package/dist/lib/setup.d.ts +0 -5
package/dist/index.js ADDED
@@ -0,0 +1,2602 @@
1
+ import { _ as qt, a as Jt, c as W$1, d as e$2, f as f$7, g as q$1, h as o$4, i as It, l as Zn, m as n$2, n as Dn, o as P$1, r as I$1, s as Pt, t as Ct, v as s$3, y as u$7 } from "./p-BJoMtgfR-DP5flT_f.js";
2
+ import { n as o$5 } from "./p-ZjP4CjeZ-iNpKbiw2.js";
3
+ import { r as r$3, t as v$6 } from "./p-9VcRUwdB-BZDASSRz.js";
4
+ import { a as e$3, l as s$4, o as h$7, t as _$1, u as t$5 } from "./p-DgbT0exM-Bjp0vDlM.js";
5
+ import "./p-CBzELu-H-bk38lWXh.js";
6
+ import "./p-CU1SSH8_-1VQUU8Zi.js";
7
+ import "./p-Cl0B-RWe-CaQPWG_o.js";
8
+ import { t as o$6 } from "./p-vEbVo2hO-CpCOqZ3z.js";
9
+ import { NixComponent, signal, watch } from "@deijose/nix-js";
10
+ //#region src/lifecycle.ts
11
+ /**
12
+ * ionic-nix/lifecycle.ts
13
+ *
14
+ * Sistema de ciclo de vida de navegación, análogo a los hooks de Ionic:
15
+ * ionViewWillEnter / ionViewDidEnter / ionViewWillLeave / ionViewDidLeave
16
+ *
17
+ * Cómo funciona (sin provide/inject):
18
+ * 1. IonRouterOutlet crea un `PageLifecycle` por cada ruta.
19
+ * 2. Lo pasa directamente al factory de la ruta como argumento.
20
+ * 3. El factory llama a `new MiPagina(lc)` o `MiPagina(lc)`.
21
+ * 4. IonPage/composables registran watchers sobre las señales del lc.
22
+ * 5. Cuando el router navega, incrementa las señales → watchers se disparan.
23
+ */
24
+ /** Crea un nuevo PageLifecycle con señales en 0. */
25
+ function createPageLifecycle() {
26
+ return {
27
+ willEnter: signal(0),
28
+ didEnter: signal(0),
29
+ willLeave: signal(0),
30
+ didLeave: signal(0)
31
+ };
32
+ }
33
+ var IonPage = class extends NixComponent {
34
+ __lc;
35
+ constructor(lc) {
36
+ super();
37
+ this.__lc = lc;
38
+ }
39
+ onInit() {
40
+ const lc = this.__lc;
41
+ if (this.ionViewWillEnter) watch(lc.willEnter, this.ionViewWillEnter.bind(this));
42
+ if (this.ionViewDidEnter) watch(lc.didEnter, this.ionViewDidEnter.bind(this));
43
+ if (this.ionViewWillLeave) watch(lc.willLeave, this.ionViewWillLeave.bind(this));
44
+ if (this.ionViewDidLeave) watch(lc.didLeave, this.ionViewDidLeave.bind(this));
45
+ }
46
+ };
47
+ function useIonViewWillEnter(lc, fn) {
48
+ watch(lc.willEnter, fn);
49
+ }
50
+ function useIonViewDidEnter(lc, fn) {
51
+ watch(lc.didEnter, fn);
52
+ }
53
+ function useIonViewWillLeave(lc, fn) {
54
+ watch(lc.willLeave, fn);
55
+ }
56
+ function useIonViewDidLeave(lc, fn) {
57
+ watch(lc.didLeave, fn);
58
+ }
59
+ //#endregion
60
+ //#region node_modules/@ionic/core/components/p-hHmYLOfE.js
61
+ /*!
62
+ * (C) Ionic http://ionicframework.com - MIT License
63
+ */
64
+ var t$4 = (t, M, r, n, e) => h$6(t[1], M[1], r[1], n[1], e).map(((h) => a$3(t[0], M[0], r[0], n[0], h))), a$3 = (t, a, h, M, r) => r * (3 * a * Math.pow(r - 1, 2) + r * (-3 * h * r + 3 * h + M * r)) - t * Math.pow(r - 1, 3), h$6 = (t, a, h, r, n) => M$2((r -= n) - 3 * (h -= n) + 3 * (a -= n) - (t -= n), 3 * h - 6 * a + 3 * t, 3 * a - 3 * t, t).filter(((t) => t >= 0 && t <= 1)), M$2 = (t, a, h, M) => {
65
+ if (0 === t) return ((t, a, h) => {
66
+ const M = a * a - 4 * t * h;
67
+ return M < 0 ? [] : [(-a + Math.sqrt(M)) / (2 * t), (-a - Math.sqrt(M)) / (2 * t)];
68
+ })(a, h, M);
69
+ const r = (3 * (h /= t) - (a /= t) * a) / 3, n = (2 * a * a * a - 9 * a * h + 27 * (M /= t)) / 27;
70
+ if (0 === r) return [Math.pow(-n, 1 / 3)];
71
+ if (0 === n) return [Math.sqrt(-r), -Math.sqrt(-r)];
72
+ const e = Math.pow(n / 2, 2) + Math.pow(r / 3, 3);
73
+ if (0 === e) return [Math.pow(n / 2, .5) - a / 3];
74
+ if (e > 0) return [Math.pow(-n / 2 + Math.sqrt(e), 1 / 3) - Math.pow(n / 2 + Math.sqrt(e), 1 / 3) - a / 3];
75
+ const u = Math.sqrt(Math.pow(-r / 3, 3)), o = Math.acos(-n / (2 * Math.sqrt(Math.pow(-r / 3, 3)))), s = 2 * Math.pow(u, 1 / 3);
76
+ return [
77
+ s * Math.cos(o / 3) - a / 3,
78
+ s * Math.cos((o + 2 * Math.PI) / 3) - a / 3,
79
+ s * Math.cos((o + 4 * Math.PI) / 3) - a / 3
80
+ ];
81
+ };
82
+ //#endregion
83
+ //#region node_modules/@ionic/core/components/p-CDfQnFrd.js
84
+ /*!
85
+ * (C) Ionic http://ionicframework.com - MIT License
86
+ */
87
+ var a$2 = (o) => l$6(o), s$2 = (o, i) => ("string" == typeof o && (i = o, o = void 0), a$2(o).includes(i)), l$6 = (o = window) => {
88
+ if (void 0 === o) return [];
89
+ o.Ionic = o.Ionic || {};
90
+ let i = o.Ionic.platforms;
91
+ return i ?? (i = o.Ionic.platforms = c$5(o), i.forEach(((i) => o.document.documentElement.classList.add(`plt-${i}`)))), i;
92
+ }, c$5 = (i) => {
93
+ const t = n$2.get("platform");
94
+ return Object.keys(j$3).filter(((o) => {
95
+ const n = null == t ? void 0 : t[o];
96
+ return "function" == typeof n ? n(i) : j$3[o](i);
97
+ }));
98
+ }, u$6 = (o) => !!h$5(o, /iPad/i) || !(!h$5(o, /Macintosh/i) || !m$6(o)), p$6 = (o) => h$5(o, /android|sink/i), m$6 = (o) => w$4(o, "(any-pointer:coarse)"), f$6 = (o) => v$5(o) || b$4(o), v$5 = (o) => !!(o.cordova || o.phonegap || o.PhoneGap), b$4 = (o) => {
99
+ const i = o.Capacitor;
100
+ return !!((null == i ? void 0 : i.isNative) || (null == i ? void 0 : i.isNativePlatform) && i.isNativePlatform());
101
+ }, h$5 = (o, i) => i.test(o.navigator.userAgent), w$4 = (o, i) => {
102
+ var t;
103
+ return null === (t = o.matchMedia) || void 0 === t ? void 0 : t.call(o, i).matches;
104
+ }, j$3 = {
105
+ ipad: u$6,
106
+ iphone: (o) => h$5(o, /iPhone/i),
107
+ ios: (o) => h$5(o, /iPhone|iPod/i) || u$6(o),
108
+ android: p$6,
109
+ phablet: (o) => {
110
+ const i = o.innerWidth, t = o.innerHeight, n = Math.min(i, t), e = Math.max(i, t);
111
+ return n > 390 && n < 520 && e > 620 && e < 800;
112
+ },
113
+ tablet: (o) => {
114
+ const i = o.innerWidth, t = o.innerHeight, n = Math.min(i, t), e = Math.max(i, t);
115
+ return u$6(o) || ((o) => p$6(o) && !h$5(o, /mobile/i))(o) || n > 460 && n < 820 && e > 780 && e < 1400;
116
+ },
117
+ cordova: v$5,
118
+ capacitor: b$4,
119
+ electron: (o) => h$5(o, /electron/i),
120
+ pwa: (o) => {
121
+ var i;
122
+ return !(!(null === (i = o.matchMedia) || void 0 === i ? void 0 : i.call(o, "(display-mode: standalone)").matches) && !o.navigator.standalone);
123
+ },
124
+ mobile: m$6,
125
+ mobileweb: (o) => m$6(o) && !f$6(o),
126
+ desktop: (o) => !m$6(o),
127
+ hybrid: f$6
128
+ };
129
+ var O$2;
130
+ var g$5 = (o) => o && qt(o) || O$2, y$3 = (e = {}) => {
131
+ if ("undefined" == typeof window) return;
132
+ const a = window.document, c = window, u = c.Ionic = c.Ionic || {}, p = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, e$2(c)), { persistConfig: !1 }), u.config), s$3(c)), e);
133
+ n$2.reset(p), n$2.getBoolean("persistConfig") && o$4(c, p), l$6(c), u.config = n$2, u.mode = O$2 = n$2.get("mode", a.documentElement.getAttribute("mode") || (s$2(c, "ios") ? "ios" : "md")), n$2.set("mode", O$2), a.documentElement.setAttribute("mode", O$2), a.documentElement.classList.add(O$2), n$2.getBoolean("_testing") && n$2.set("animated", !1);
134
+ const m = (o) => {
135
+ var i;
136
+ return null === (i = o.tagName) || void 0 === i ? void 0 : i.startsWith("ION-");
137
+ }, f = (o) => ["ios", "md"].includes(o);
138
+ Pt(((o) => {
139
+ for (; o;) {
140
+ const i = o.mode || o.getAttribute("mode");
141
+ if (i) {
142
+ if (f(i)) return i;
143
+ m(o) && u$7("Invalid ionic mode: \"" + i + "\", expected: \"ios\" or \"md\"");
144
+ }
145
+ o = o.parentElement;
146
+ }
147
+ return O$2;
148
+ }));
149
+ }, n$1 = (n, o) => null !== o.closest(n), o$3 = (n, o) => "string" == typeof n && n.length > 0 ? Object.assign({
150
+ "ion-color": !0,
151
+ [`ion-color-${n}`]: !0
152
+ }, o) : o, t$3 = /^[a-z][a-z0-9+\-.]*:/, l$5 = async (n, o, r, l) => {
153
+ if (null != n && "#" !== n[0] && !t$3.test(n)) {
154
+ const t = document.querySelector("ion-router");
155
+ if (t) return o?.preventDefault(), t.push(n, r, l);
156
+ }
157
+ return !1;
158
+ }, o$2 = (t) => r$3().duration(t ? 400 : 300), i$2 = (t) => {
159
+ let e, n;
160
+ const r = t.width + 8, i = r$3(), u = r$3();
161
+ t.isEndSide ? (e = r + "px", n = "0px") : (e = -r + "px", n = "0px"), i.addElement(t.menuInnerEl).fromTo("transform", `translateX(${e})`, `translateX(${n})`);
162
+ const c = "ios" === g$5(t), p = c ? .2 : .25;
163
+ return u.addElement(t.backdropEl).fromTo("opacity", .01, p), o$2(c).addAnimation([i, u]);
164
+ }, u$5 = (t) => {
165
+ let e, n;
166
+ const r = g$5(t), i = t.width;
167
+ t.isEndSide ? (e = -i + "px", n = i + "px") : (e = i + "px", n = -i + "px");
168
+ const u = r$3().addElement(t.menuInnerEl).fromTo("transform", `translateX(${n})`, "translateX(0px)"), c = r$3().addElement(t.contentEl).fromTo("transform", "translateX(0px)", `translateX(${e})`), p = r$3().addElement(t.backdropEl).fromTo("opacity", .01, .32);
169
+ return o$2("ios" === r).addAnimation([
170
+ u,
171
+ c,
172
+ p
173
+ ]);
174
+ }, c$4 = (t) => {
175
+ const e = g$5(t), n = t.width * (t.isEndSide ? -1 : 1) + "px", r = r$3().addElement(t.contentEl).fromTo("transform", "translateX(0px)", `translateX(${n})`);
176
+ return o$2("ios" === e).addAnimation(r);
177
+ };
178
+ (() => {
179
+ const s = /* @__PURE__ */ new Map(), a = [], o = async (t, e = !1) => {
180
+ if (await d(), "start" === t || "end" === t) {
181
+ const r = a.filter(((e) => e.side === t && !e.disabled));
182
+ if (r.length >= 1) return r.length > 1 && e && u$7(`menuController queried for a menu on the "${t}" side, but ${r.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, r.map(((t) => t.el))), r[0].el;
183
+ const s = a.filter(((e) => e.side === t));
184
+ if (s.length >= 1) return s.length > 1 && e && u$7(`menuController queried for a menu on the "${t}" side, but ${s.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, s.map(((t) => t.el))), s[0].el;
185
+ } else if (null != t) return w(((e) => e.menuId === t));
186
+ return w(((t) => !t.disabled)) || (a.length > 0 ? a[0].el : void 0);
187
+ }, p = async () => (await d(), m()), f = (t, e) => {
188
+ s.set(t, e);
189
+ }, m = () => w(((t) => t._isOpen)), l = () => a.some(((t) => t.isAnimating)), w = (t) => {
190
+ const e = a.find(t);
191
+ if (void 0 !== e) return e.el;
192
+ }, d = () => Promise.all(Array.from(document.querySelectorAll("ion-menu")).map(((t) => new Promise(((e) => e$3(t, e))))));
193
+ return f("reveal", c$4), f("push", u$5), f("overlay", i$2), o$5?.addEventListener("ionBackButton", ((t) => {
194
+ const n = m();
195
+ n && t.detail.register(99, (() => n.close()));
196
+ })), {
197
+ registerAnimation: f,
198
+ get: o,
199
+ getMenus: async () => (await d(), a.map(((t) => t.el))),
200
+ getOpen: p,
201
+ isEnabled: async (t) => {
202
+ const e = await o(t);
203
+ return !!e && !e.disabled;
204
+ },
205
+ swipeGesture: async (t, e) => {
206
+ const n = await o(e);
207
+ return n && (n.swipeGesture = t), n;
208
+ },
209
+ isAnimating: async () => (await d(), l()),
210
+ isOpen: async (t) => {
211
+ if (null != t) {
212
+ const e = await o(t);
213
+ return void 0 !== e && e.isOpen();
214
+ }
215
+ return void 0 !== await p();
216
+ },
217
+ enable: async (t, e) => {
218
+ const n = await o(e);
219
+ return n && (n.disabled = !t), n;
220
+ },
221
+ toggle: async (t) => {
222
+ const e = await o(t, !0);
223
+ return !!e && e.toggle();
224
+ },
225
+ close: async (t) => {
226
+ const e = await (void 0 !== t ? o(t, !0) : p());
227
+ return void 0 !== e && e.close();
228
+ },
229
+ open: async (t) => {
230
+ const e = await o(t, !0);
231
+ return !!e && e.open();
232
+ },
233
+ _getOpenSync: m,
234
+ _createAnimation: (t, e) => {
235
+ const n = s.get(t);
236
+ if (!n) throw new Error("animation not registered");
237
+ return n(e);
238
+ },
239
+ _register: (t) => {
240
+ a.indexOf(t) < 0 && a.push(t);
241
+ },
242
+ _unregister: (t) => {
243
+ const e = a.indexOf(t);
244
+ e > -1 && a.splice(e, 1);
245
+ },
246
+ _setOpen: async (t, e, n, r) => {
247
+ if (l()) return !1;
248
+ if (e) {
249
+ const e = await p();
250
+ e && t.el !== e && await e.setOpen(!1, !1);
251
+ }
252
+ return t._setOpen(e, n, r);
253
+ }
254
+ };
255
+ })();
256
+ //#endregion
257
+ //#region node_modules/@ionic/core/components/p-BR3tZJmu.js
258
+ /*!
259
+ * (C) Ionic http://ionicframework.com - MIT License
260
+ */
261
+ var o$1 = async (o, t, i, n, r, s) => {
262
+ var a;
263
+ if (o) return o.attachViewToDom(t, i, r, n);
264
+ if (!(s || "string" == typeof i || i instanceof HTMLElement)) throw new Error("framework delegate is missing");
265
+ const c = "string" == typeof i ? null === (a = t.ownerDocument) || void 0 === a ? void 0 : a.createElement(i) : i;
266
+ return n && n.forEach(((e) => c.classList.add(e))), r && Object.assign(c, r), t.appendChild(c), await new Promise(((o) => e$3(c, o))), c;
267
+ }, t$2 = (e, o) => {
268
+ if (o) {
269
+ if (e) return e.removeViewFromDom(o.parentElement, o);
270
+ o.remove();
271
+ }
272
+ return Promise.resolve();
273
+ }, T$1 = (n) => ({
274
+ create: (o) => S$1(n, o),
275
+ dismiss: (o, e, t) => E$1(document, o, e, n, t),
276
+ getTop: async () => V(document, n)
277
+ });
278
+ T$1("ion-alert");
279
+ T$1("ion-action-sheet");
280
+ T$1("ion-loading");
281
+ T$1("ion-modal");
282
+ T$1("ion-picker-legacy");
283
+ T$1("ion-popover");
284
+ T$1("ion-toast");
285
+ var S$1 = (n, o) => "undefined" != typeof window && void 0 !== window.customElements ? window.customElements.whenDefined(n).then((() => {
286
+ const t = document.createElement(n);
287
+ return t.classList.add("overlay-hidden"), Object.assign(t, Object.assign(Object.assign({}, o), { hasController: !0 })), L$1(document).appendChild(t), new Promise(((n) => e$3(t, n)));
288
+ })) : Promise.resolve(), E$1 = (n, o, e, t, i) => {
289
+ const a = V(n, t, i);
290
+ return a ? a.dismiss(o, e) : Promise.reject("overlay does not exist");
291
+ }, F = (n, o) => ((n, o) => (void 0 === o && (o = "ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"), Array.from(n.querySelectorAll(o)).filter(((n) => n.overlayIndex > 0))))(n, o).filter(((n) => !n.classList.contains("overlay-hidden"))), V = (n, o, e) => {
292
+ const t = F(n, o);
293
+ return (void 0 === e ? t : t.filter(((n) => n.id === e))).slice(-1)[0];
294
+ }, L$1 = (n) => n.querySelector("ion-app") || n.body, d$3 = Dn(class extends I$1 {
295
+ constructor(t) {
296
+ super(), !1 !== t && this.__registerHost();
297
+ }
298
+ componentDidLoad() {
299
+ this.rIC((async () => {
300
+ const t = s$2(window, "hybrid");
301
+ if (n$2.getBoolean("_testing") || import("./p-BgwEQWW6-DIo2-ASC.js").then(((t) => t.startTapClick(n$2))), n$2.getBoolean("statusTap", t) && import("./p-CneGxKsZ-DghQx9uV.js").then(((t) => t.startStatusTap())), n$2.getBoolean("inputShims", m$5())) {
302
+ const t = s$2(window, "ios") ? "ios" : "android";
303
+ import("./p-Cwv-vmkN-CEJtqyzO.js").then(((e) => e.startInputShims(n$2, t)));
304
+ }
305
+ const e = await import("./p-vEbVo2hO-CpCOqZ3z.js").then((n) => n.n), i = t || o$6();
306
+ n$2.getBoolean("hardwareBackButton", i) ? e.startHardwareBackButton() : (o$6() && u$7("[ion-app] - experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used."), e.blockHardwareBackButton()), "undefined" != typeof window && import("./p-D6Ynv7Xh-bzjdXLwD.js").then(((t) => t.startKeyboardAssist(window))), import("./p-BmVRXR1y-t-R4bYc1.js").then(((t) => this.focusVisible = t.startFocusVisible()));
307
+ }));
308
+ }
309
+ disconnectedCallback() {
310
+ this.loadTimeout && clearTimeout(this.loadTimeout);
311
+ }
312
+ async setFocus(t) {
313
+ this.focusVisible && this.focusVisible.setFocus(t);
314
+ }
315
+ rIC(t) {
316
+ "requestIdleCallback" in window ? window.requestIdleCallback(t) : this.loadTimeout = setTimeout(t, 32);
317
+ }
318
+ render() {
319
+ return Ct(It, {
320
+ key: "77a7459d3e42b3715a5a7e1cf468e2ebc99e54bb",
321
+ class: {
322
+ [g$5(this)]: !0,
323
+ "ion-page": !0,
324
+ "force-statusbar-padding": n$2.getBoolean("_forceStatusbarPadding")
325
+ }
326
+ });
327
+ }
328
+ get el() {
329
+ return this;
330
+ }
331
+ static get style() {
332
+ return "html.plt-mobile ion-app{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}html.plt-mobile ion-app [contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}";
333
+ }
334
+ }, [
335
+ 0,
336
+ "ion-app",
337
+ { setFocus: [64] }
338
+ ]), m$5 = () => !(!s$2(window, "ios") || !s$2(window, "mobile")) || !(!s$2(window, "android") || !s$2(window, "mobileweb")), l$4 = function() {
339
+ "undefined" != typeof customElements && ["ion-app"].forEach(((t) => {
340
+ "ion-app" === t && (customElements.get(Zn(t)) || customElements.define(Zn(t), d$3));
341
+ }));
342
+ };
343
+ //#endregion
344
+ //#region node_modules/@ionic/core/components/ion-router.js
345
+ /*!
346
+ * (C) Ionic http://ionicframework.com - MIT License
347
+ */
348
+ var c$3 = "root", u$3 = "forward", h$3 = (t) => "/" + t.filter(((t) => t.length > 0)).join("/"), l$3 = (t) => {
349
+ let n, o = [""];
350
+ if (null != t) {
351
+ const e = t.indexOf("?");
352
+ e > -1 && (n = t.substring(e + 1), t = t.substring(0, e)), o = t.split("/").map(((t) => t.trim())).filter(((t) => t.length > 0)), 0 === o.length && (o = [""]);
353
+ }
354
+ return {
355
+ segments: o,
356
+ queryString: n
357
+ };
358
+ }, f$4 = async (n, o, e, r, s = !1, a) => {
359
+ try {
360
+ const t = w$2(n);
361
+ if (r >= o.length || !t) return s;
362
+ await new Promise(((n) => e$3(t, n)));
363
+ const u = o[r], h = await t.setRouteId(u.id, u.params, e, a);
364
+ return h.changed && (e = c$3, s = !0), s = await f$4(h.element, o, e, r + 1, s, a), h.markVisible && await h.markVisible(), s;
365
+ } catch (n) {
366
+ return f$7("[ion-router] - Exception in writeNavState:", n), !1;
367
+ }
368
+ }, d$2 = ":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet", w$2 = (t) => {
369
+ if (!t) return;
370
+ if (t.matches(d$2)) return t;
371
+ const n = t.querySelector(d$2);
372
+ return null != n ? n : void 0;
373
+ }, m$4 = (t, n) => n.find(((n) => ((t, n) => {
374
+ const { from: o, to: e } = n;
375
+ if (void 0 === e) return !1;
376
+ if (o.length > t.length) return !1;
377
+ for (let n = 0; n < o.length; n++) {
378
+ const e = o[n];
379
+ if ("*" === e) return !0;
380
+ if (e !== t[n]) return !1;
381
+ }
382
+ return o.length === t.length;
383
+ })(t, n))), p$4 = (t, n) => {
384
+ const o = Math.min(t.length, n.length);
385
+ let e = 0;
386
+ for (let r = 0; r < o; r++) {
387
+ const o = t[r], s = n[r];
388
+ if (o.id.toLowerCase() !== s.id) break;
389
+ if (o.params) {
390
+ const t = Object.keys(o.params);
391
+ if (t.length === s.segments.length) {
392
+ const n = t.map(((t) => ":" + t));
393
+ for (let t = 0; t < n.length && n[t].toLowerCase() === s.segments[t]; t++) e++;
394
+ }
395
+ }
396
+ e++;
397
+ }
398
+ return e;
399
+ }, g$3 = (t, n) => {
400
+ const o = new R(t);
401
+ let e, r = !1;
402
+ for (let t = 0; t < n.length; t++) {
403
+ const s = n[t].segments;
404
+ if ("" === s[0]) r = !0;
405
+ else {
406
+ for (const n of s) {
407
+ const r = o.next();
408
+ if (":" === n[0]) {
409
+ if ("" === r) return null;
410
+ e = e || [], (e[t] || (e[t] = {}))[n.slice(1)] = r;
411
+ } else if (r !== n) return null;
412
+ }
413
+ r = !1;
414
+ }
415
+ }
416
+ return r && r !== ("" === o.next()) ? null : e ? n.map(((t, n) => ({
417
+ id: t.id,
418
+ segments: t.segments,
419
+ params: v$3(t.params, e[n]),
420
+ beforeEnter: t.beforeEnter,
421
+ beforeLeave: t.beforeLeave
422
+ }))) : n;
423
+ }, v$3 = (t, n) => t || n ? Object.assign(Object.assign({}, t), n) : void 0, b$2 = (t, n) => {
424
+ let o = null, e = 0;
425
+ for (const r of n) {
426
+ const n = g$3(t, r);
427
+ if (null !== n) {
428
+ const t = y$1(n);
429
+ t > e && (e = t, o = n);
430
+ }
431
+ }
432
+ return o;
433
+ }, y$1 = (t) => {
434
+ let n = 1, o = 1;
435
+ for (const e of t) for (const t of e.segments) ":" === t[0] ? n += Math.pow(1, o) : "" !== t && (n += Math.pow(2, o)), o++;
436
+ return n;
437
+ };
438
+ var R = class {
439
+ constructor(t) {
440
+ this.segments = t.slice();
441
+ }
442
+ next() {
443
+ return this.segments.length > 0 ? this.segments.shift() : "";
444
+ }
445
+ }, E = (t, n) => n in t ? t[n] : t.hasAttribute(n) ? t.getAttribute(n) : null, S = (t) => Array.from(t.children).filter(((t) => "ION-ROUTE-REDIRECT" === t.tagName)).map(((t) => {
446
+ const n = E(t, "to");
447
+ return {
448
+ from: l$3(E(t, "from")).segments,
449
+ to: null == n ? void 0 : l$3(n)
450
+ };
451
+ })), C = (t) => O(j$1(t)), j$1 = (t) => Array.from(t.children).filter(((t) => "ION-ROUTE" === t.tagName && t.component)).map(((t) => {
452
+ const n = E(t, "component");
453
+ return {
454
+ segments: l$3(E(t, "url")).segments,
455
+ id: n.toLowerCase(),
456
+ params: t.componentProps,
457
+ beforeLeave: t.beforeLeave,
458
+ beforeEnter: t.beforeEnter,
459
+ children: j$1(t)
460
+ };
461
+ })), O = (t) => {
462
+ const n = [];
463
+ for (const o of t) T([], n, o);
464
+ return n;
465
+ }, T = (t, n, o) => {
466
+ if (t = [...t, {
467
+ id: o.id,
468
+ segments: o.segments,
469
+ params: o.params,
470
+ beforeLeave: o.beforeLeave,
471
+ beforeEnter: o.beforeEnter
472
+ }], 0 !== o.children.length) for (const e of o.children) T(t, n, e);
473
+ else n.push(t);
474
+ }, k$1 = Dn(class extends I$1 {
475
+ constructor(t) {
476
+ super(), !1 !== t && this.__registerHost(), this.ionRouteWillChange = Jt(this, "ionRouteWillChange", 7), this.ionRouteDidChange = Jt(this, "ionRouteDidChange", 7), this.previousPath = null, this.busy = !1, this.state = 0, this.lastState = 0, this.root = "/", this.useHash = !0;
477
+ }
478
+ async componentWillLoad() {
479
+ await (w$2(document.body) ? Promise.resolve() : new Promise(((t) => {
480
+ window.addEventListener("ionNavWillLoad", (() => t()), { once: !0 });
481
+ })));
482
+ const t = await this.runGuards(this.getSegments());
483
+ if (!0 !== t) {
484
+ if ("object" == typeof t) {
485
+ const { redirect: n } = t, o = l$3(n);
486
+ this.setSegments(o.segments, c$3, o.queryString), await this.writeNavStateRoot(o.segments, c$3);
487
+ }
488
+ } else await this.onRoutesChanged();
489
+ }
490
+ componentDidLoad() {
491
+ window.addEventListener("ionRouteRedirectChanged", h$7(this.onRedirectChanged.bind(this), 10)), window.addEventListener("ionRouteDataChanged", h$7(this.onRoutesChanged.bind(this), 100));
492
+ }
493
+ async onPopState() {
494
+ const t = this.historyDirection();
495
+ let n = this.getSegments();
496
+ const o = await this.runGuards(n);
497
+ if (!0 !== o) {
498
+ if ("object" != typeof o) return !1;
499
+ n = l$3(o.redirect).segments;
500
+ }
501
+ return this.writeNavStateRoot(n, t);
502
+ }
503
+ onBackButton(t) {
504
+ t.detail.register(0, ((t) => {
505
+ this.back(), t();
506
+ }));
507
+ }
508
+ async canTransition() {
509
+ const t = await this.runGuards();
510
+ return !0 === t || "object" == typeof t && t.redirect;
511
+ }
512
+ async push(t, n = "forward", o) {
513
+ var e;
514
+ if (t.startsWith(".")) {
515
+ const n = null !== (e = this.previousPath) && void 0 !== e ? e : "/", o = new URL(t, "https://host/" + n);
516
+ t = o.pathname + o.search;
517
+ }
518
+ let r = l$3(t);
519
+ const s = await this.runGuards(r.segments);
520
+ if (!0 !== s) {
521
+ if ("object" != typeof s) return !1;
522
+ r = l$3(s.redirect);
523
+ }
524
+ return this.setSegments(r.segments, n, r.queryString), this.writeNavStateRoot(r.segments, n, o);
525
+ }
526
+ back() {
527
+ return window.history.back(), Promise.resolve(this.waitPromise);
528
+ }
529
+ async printDebug() {
530
+ ((t) => {
531
+ console.group(`[ion-core] ROUTES[${t.length}]`);
532
+ for (const n of t) {
533
+ const t = [];
534
+ n.forEach(((n) => t.push(...n.segments)));
535
+ const o = n.map(((t) => t.id));
536
+ console.debug("%c " + h$3(t), "font-weight: bold; padding-left: 20px", "=> ", `(${o.join(", ")})`);
537
+ }
538
+ console.groupEnd();
539
+ })(C(this.el)), ((t) => {
540
+ console.group(`[ion-core] REDIRECTS[${t.length}]`);
541
+ for (const n of t) n.to && console.debug("FROM: ", "$c " + h$3(n.from), "font-weight: bold", " TO: ", "$c " + h$3(n.to.segments), "font-weight: bold");
542
+ console.groupEnd();
543
+ })(S(this.el));
544
+ }
545
+ async navChanged(t) {
546
+ if (this.busy) return u$7("[ion-router] - Router is busy, navChanged was cancelled."), !1;
547
+ const { ids: n, outlet: o } = await (async () => {
548
+ const t = [];
549
+ let n, o = window.document.body;
550
+ for (; n = w$2(o);) {
551
+ const e = await n.getRouteId();
552
+ if (!e) break;
553
+ o = e.element, e.element = void 0, t.push(e);
554
+ }
555
+ return {
556
+ ids: t,
557
+ outlet: n
558
+ };
559
+ })(), e = ((t, n) => {
560
+ let o = null, e = 0;
561
+ for (const r of n) {
562
+ const n = p$4(t, r);
563
+ n > e && (o = r, e = n);
564
+ }
565
+ return o ? o.map(((n, o) => {
566
+ var e;
567
+ return {
568
+ id: n.id,
569
+ segments: n.segments,
570
+ params: v$3(n.params, null === (e = t[o]) || void 0 === e ? void 0 : e.params)
571
+ };
572
+ })) : null;
573
+ })(n, C(this.el));
574
+ if (!e) return u$7("[ion-router] - No matching URL for", n.map(((t) => t.id))), !1;
575
+ const s = ((t) => {
576
+ const n = [];
577
+ for (const o of t) for (const t of o.segments) if (":" === t[0]) {
578
+ const e = o.params && o.params[t.slice(1)];
579
+ if (!e) return null;
580
+ n.push(e);
581
+ } else "" !== t && n.push(t);
582
+ return n;
583
+ })(e);
584
+ return s ? (this.setSegments(s, t), await this.safeWriteNavState(o, e, c$3, s, null, n.length), !0) : (u$7("[ion-router] - Router could not match path because some required param is missing."), !1);
585
+ }
586
+ onRedirectChanged() {
587
+ const t = this.getSegments();
588
+ t && m$4(t, S(this.el)) && this.writeNavStateRoot(t, c$3);
589
+ }
590
+ onRoutesChanged() {
591
+ return this.writeNavStateRoot(this.getSegments(), c$3);
592
+ }
593
+ historyDirection() {
594
+ var t;
595
+ const n = window;
596
+ null === n.history.state && (this.state++, n.history.replaceState(this.state, n.document.title, null === (t = n.document.location) || void 0 === t ? void 0 : t.href));
597
+ const o = n.history.state, e = this.lastState;
598
+ return this.lastState = o, o > e || o >= e && e > 0 ? u$3 : o < e ? "back" : c$3;
599
+ }
600
+ async writeNavStateRoot(n, o, e) {
601
+ if (!n) return f$7("[ion-router] - URL is not part of the routing set."), !1;
602
+ const r = S(this.el), s = m$4(n, r);
603
+ let i = null;
604
+ if (s) {
605
+ const { segments: t, queryString: e } = s.to;
606
+ this.setSegments(t, o, e), i = s.from, n = t;
607
+ }
608
+ const a = C(this.el), c = b$2(n, a);
609
+ return c ? this.safeWriteNavState(document.body, c, o, n, i, 0, e) : (f$7("[ion-router] - The path does not match any route."), !1);
610
+ }
611
+ async safeWriteNavState(n, o, e, r, s, i = 0, a) {
612
+ const c = await this.lock();
613
+ let u = !1;
614
+ try {
615
+ u = await this.writeNavState(n, o, e, r, s, i, a);
616
+ } catch (n) {
617
+ f$7("[ion-router] - Exception in safeWriteNavState:", n);
618
+ }
619
+ return c(), u;
620
+ }
621
+ async lock() {
622
+ const t = this.waitPromise;
623
+ let n;
624
+ return this.waitPromise = new Promise(((t) => n = t)), void 0 !== t && await t, n;
625
+ }
626
+ async runGuards(t = this.getSegments(), n) {
627
+ if (void 0 === n && (n = l$3(this.previousPath).segments), !t || !n) return !0;
628
+ const o = C(this.el), e = b$2(n, o), r = e && e[e.length - 1].beforeLeave, s = !r || await r();
629
+ if (!1 === s || "object" == typeof s) return s;
630
+ const i = b$2(t, o), a = i && i[i.length - 1].beforeEnter;
631
+ return !a || a();
632
+ }
633
+ async writeNavState(t, n, o, e, s, i = 0, a) {
634
+ if (this.busy) return u$7("[ion-router] - Router is busy, transition was cancelled."), !1;
635
+ this.busy = !0;
636
+ const c = this.routeChangeEvent(e, s);
637
+ c && this.ionRouteWillChange.emit(c);
638
+ const u = await f$4(t, n, o, i, !1, a);
639
+ return this.busy = !1, c && this.ionRouteDidChange.emit(c), u;
640
+ }
641
+ setSegments(t, n, o) {
642
+ this.state++, ((t, n, o, e, r, s, i) => {
643
+ const a = ((t, n, o) => {
644
+ let e = h$3(t);
645
+ return n && (e = "#" + e), void 0 !== o && (e += "?" + o), e;
646
+ })([...l$3(n).segments, ...e], o, i);
647
+ r === u$3 ? t.pushState(s, "", a) : t.replaceState(s, "", a);
648
+ })(window.history, this.root, this.useHash, t, n, this.state, o);
649
+ }
650
+ getSegments() {
651
+ return ((t, n, o) => {
652
+ return ((t, n) => {
653
+ if (t.length > n.length) return null;
654
+ if (t.length <= 1 && "" === t[0]) return n;
655
+ for (let o = 0; o < t.length; o++) if (t[o] !== n[o]) return null;
656
+ return n.length === t.length ? [""] : n.slice(t.length);
657
+ })(l$3(this.root).segments, l$3(o ? t.hash.slice(1) : t.pathname).segments);
658
+ })(window.location, 0, this.useHash);
659
+ }
660
+ routeChangeEvent(t, n) {
661
+ const o = this.previousPath, e = h$3(t);
662
+ return this.previousPath = e, e === o ? null : {
663
+ from: o,
664
+ redirectedFrom: n ? h$3(n) : null,
665
+ to: e
666
+ };
667
+ }
668
+ get el() {
669
+ return this;
670
+ }
671
+ }, [
672
+ 0,
673
+ "ion-router",
674
+ {
675
+ root: [1],
676
+ useHash: [4, "use-hash"],
677
+ canTransition: [64],
678
+ push: [64],
679
+ back: [64],
680
+ printDebug: [64],
681
+ navChanged: [64]
682
+ },
683
+ [[
684
+ 8,
685
+ "popstate",
686
+ "onPopState"
687
+ ], [
688
+ 4,
689
+ "ionBackButton",
690
+ "onBackButton"
691
+ ]]
692
+ ]), L = function() {
693
+ "undefined" != typeof customElements && ["ion-router"].forEach(((t) => {
694
+ "ion-router" === t && (customElements.get(Zn(t)) || customElements.define(Zn(t), k$1));
695
+ }));
696
+ }, s$1 = Dn(class extends I$1 {
697
+ constructor(o) {
698
+ super(), !1 !== o && this.__registerHost(), this.ionRouteDataChanged = Jt(this, "ionRouteDataChanged", 7), this.url = "";
699
+ }
700
+ onUpdate(o) {
701
+ this.ionRouteDataChanged.emit(o);
702
+ }
703
+ onComponentProps(o, t) {
704
+ if (o === t) return;
705
+ const e = o ? Object.keys(o) : [];
706
+ if (e.length === (t ? Object.keys(t) : []).length) {
707
+ for (const n of e) if (o[n] !== t[n]) return void this.onUpdate(o);
708
+ } else this.onUpdate(o);
709
+ }
710
+ connectedCallback() {
711
+ this.ionRouteDataChanged.emit();
712
+ }
713
+ static get watchers() {
714
+ return {
715
+ url: [{ onUpdate: 0 }],
716
+ component: [{ onUpdate: 0 }],
717
+ componentProps: [{ onComponentProps: 0 }]
718
+ };
719
+ }
720
+ }, [
721
+ 0,
722
+ "ion-route",
723
+ {
724
+ url: [1],
725
+ component: [1],
726
+ componentProps: [16],
727
+ beforeLeave: [16],
728
+ beforeEnter: [16]
729
+ },
730
+ void 0,
731
+ {
732
+ url: [{ onUpdate: 0 }],
733
+ component: [{ onUpdate: 0 }],
734
+ componentProps: [{ onComponentProps: 0 }]
735
+ }
736
+ ]), p$3 = function() {
737
+ "undefined" != typeof customElements && ["ion-route"].forEach(((o) => {
738
+ "ion-route" === o && (customElements.get(Zn(o)) || customElements.define(Zn(o), s$1));
739
+ }));
740
+ };
741
+ //#endregion
742
+ //#region node_modules/@ionic/core/components/p-B-hirT0v.js
743
+ /*!
744
+ * (C) Ionic http://ionicframework.com - MIT License
745
+ */
746
+ var t$1 = () => {
747
+ let t;
748
+ return { lock: async () => {
749
+ const e = t;
750
+ let n;
751
+ return t = new Promise(((t) => n = t)), void 0 !== e && await e, n;
752
+ } };
753
+ }, b$1 = Dn(class extends I$1 {
754
+ constructor(t) {
755
+ super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.ionNavWillLoad = Jt(this, "ionNavWillLoad", 7), this.ionNavWillChange = Jt(this, "ionNavWillChange", 3), this.ionNavDidChange = Jt(this, "ionNavDidChange", 3), this.lockController = t$1(), this.gestureOrAnimationInProgress = !1, this.mode = g$5(this), this.animated = !0;
756
+ }
757
+ swipeHandlerChanged() {
758
+ this.gesture && this.gesture.enable(void 0 !== this.swipeHandler);
759
+ }
760
+ async connectedCallback() {
761
+ const t = () => {
762
+ this.gestureOrAnimationInProgress = !0, this.swipeHandler && this.swipeHandler.onStart();
763
+ };
764
+ this.gesture = (await import("./p-Cz5nLPGT-mbB7NqG3.js")).createSwipeBackGesture(this.el, (() => !this.gestureOrAnimationInProgress && !!this.swipeHandler && this.swipeHandler.canStart()), (() => t()), ((t) => {
765
+ var i;
766
+ return null === (i = this.ani) || void 0 === i ? void 0 : i.progressStep(t);
767
+ }), ((t, i, s) => {
768
+ if (this.ani) {
769
+ this.ani.onFinish((() => {
770
+ this.gestureOrAnimationInProgress = !1, this.swipeHandler && this.swipeHandler.onEnd(t);
771
+ }), { oneTimeCallback: !0 });
772
+ let e = t ? -.001 : .001;
773
+ t ? e += t$4([0, 0], [.32, .72], [0, 1], [1, 1], i)[0] : (this.ani.easing("cubic-bezier(1, 0, 0.68, 0.28)"), e += t$4([0, 0], [1, 0], [.68, .28], [1, 1], i)[0]), this.ani.progressEnd(t ? 1 : 0, e, s);
774
+ } else this.gestureOrAnimationInProgress = !1;
775
+ })), this.swipeHandlerChanged();
776
+ }
777
+ componentWillLoad() {
778
+ this.ionNavWillLoad.emit();
779
+ }
780
+ disconnectedCallback() {
781
+ this.gesture && (this.gesture.destroy(), this.gesture = void 0);
782
+ }
783
+ async commit(t, i, s) {
784
+ const a = await this.lockController.lock();
785
+ let o = !1;
786
+ try {
787
+ o = await this.transition(t, i, s);
788
+ } catch (t) {
789
+ f$7("[ion-router-outlet] - Exception in commit:", t);
790
+ }
791
+ return a(), o;
792
+ }
793
+ async setRouteId(t, i, s, e) {
794
+ return {
795
+ changed: await this.setRoot(t, i, {
796
+ duration: "root" === s ? 0 : void 0,
797
+ direction: "back" === s ? "back" : "forward",
798
+ animationBuilder: e
799
+ }),
800
+ element: this.activeEl
801
+ };
802
+ }
803
+ async getRouteId() {
804
+ const t = this.activeEl;
805
+ return t ? {
806
+ id: t.tagName,
807
+ element: t,
808
+ params: this.activeParams
809
+ } : void 0;
810
+ }
811
+ async setRoot(t, i, s) {
812
+ if (this.activeComponent === t && _$1(i, this.activeParams)) return !1;
813
+ const e = this.activeEl, a = await o$1(this.delegate, this.el, t, ["ion-page", "ion-page-invisible"], i);
814
+ return this.activeComponent = t, this.activeEl = a, this.activeParams = i, await this.commit(a, e, s), await t$2(this.delegate, e), !0;
815
+ }
816
+ async transition(t, i, s = {}) {
817
+ if (i === t) return !1;
818
+ this.ionNavWillChange.emit();
819
+ const { el: e, mode: o } = this, n = this.animated && n$2.getBoolean("animated", !0), h = s.animationBuilder || this.animation || n$2.get("navAnimation");
820
+ return await v$6(Object.assign(Object.assign({
821
+ mode: o,
822
+ animated: n,
823
+ enteringEl: t,
824
+ leavingEl: i,
825
+ baseEl: e,
826
+ deepWait: t$5(e),
827
+ progressCallback: s.progressAnimation ? (t) => {
828
+ void 0 === t || this.gestureOrAnimationInProgress ? this.ani = t : (this.gestureOrAnimationInProgress = !0, t.onFinish((() => {
829
+ this.gestureOrAnimationInProgress = !1, this.swipeHandler && this.swipeHandler.onEnd(!1);
830
+ }), { oneTimeCallback: !0 }), t.progressEnd(0, 0, 0));
831
+ } : void 0
832
+ }, s), { animationBuilder: h })), this.ionNavDidChange.emit(), !0;
833
+ }
834
+ render() {
835
+ return Ct("slot", { key: "386c41745b61daba161cf75063da97fe29ba36cb" });
836
+ }
837
+ get el() {
838
+ return this;
839
+ }
840
+ static get watchers() {
841
+ return { swipeHandler: [{ swipeHandlerChanged: 0 }] };
842
+ }
843
+ static get style() {
844
+ return ":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}";
845
+ }
846
+ }, [
847
+ 257,
848
+ "ion-router-outlet",
849
+ {
850
+ mode: [1025],
851
+ delegate: [16],
852
+ animated: [4],
853
+ animation: [16],
854
+ swipeHandler: [16],
855
+ commit: [64],
856
+ setRouteId: [64],
857
+ getRouteId: [64]
858
+ },
859
+ void 0,
860
+ { swipeHandler: [{ swipeHandlerChanged: 0 }] }
861
+ ]), f$3 = function() {
862
+ "undefined" != typeof customElements && ["ion-router-outlet"].forEach(((t) => {
863
+ "ion-router-outlet" === t && (customElements.get(Zn(t)) || customElements.define(Zn(t), b$1));
864
+ }));
865
+ }, s = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M244 400 100 256l144-144M120 256h292' stroke-linecap='square' stroke-miterlimit='10' stroke-width='48px' class='ionicon-fill-none'/></svg>", l$2 = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M328 112 184 256l144 144' stroke-linecap='round' stroke-linejoin='round' stroke-width='48px' class='ionicon-fill-none'/></svg>";
866
+ //#endregion
867
+ //#region node_modules/@ionic/core/components/p-YLXPWgVj.js
868
+ /*!
869
+ * (C) Ionic http://ionicframework.com - MIT License
870
+ */
871
+ var e;
872
+ var c$1 = (o, t, n, i, r) => (n = "ios" === (n && h$1(n)) ? "ios" : "md", i && "ios" === n ? o = h$1(i) : r && "md" === n ? o = h$1(r) : (o || !t || a(t) || (o = t), d(o) && (o = h$1(o))), d(o) && "" !== o.trim() ? "" !== o.replace(/[a-z]|-|\d/gi, "") ? null : o : null), l$1 = (o) => d(o) && (o = o.trim(), a(o)) ? o : null, a = (o) => o.length > 0 && /(\/|\.)/.test(o), d = (o) => "string" == typeof o, h$1 = (o) => o.toLowerCase(), f$1 = (o) => {
873
+ if (1 === o.nodeType) {
874
+ if ("script" === o.nodeName.toLowerCase()) return !1;
875
+ for (let t = 0; t < o.attributes.length; t++) {
876
+ const n = o.attributes[t].name;
877
+ if (d(n) && 0 === n.toLowerCase().indexOf("on")) return !1;
878
+ }
879
+ for (let t = 0; t < o.childNodes.length; t++) if (!f$1(o.childNodes[t])) return !1;
880
+ }
881
+ return !0;
882
+ }, u$1 = /* @__PURE__ */ new Map(), m$2 = /* @__PURE__ */ new Map();
883
+ var p$1;
884
+ function g(o) {
885
+ return u$1.set(o, ""), "";
886
+ }
887
+ var w = Dn(class extends I$1 {
888
+ constructor(o) {
889
+ super(), !1 !== o && this.__registerHost(), this.__attachShadow(), this.iconName = null, this.inheritedAttributes = {}, this.didLoadIcon = !1, this.isVisible = !1, this.mode = b(), this.lazy = !1, this.sanitize = !0;
890
+ }
891
+ componentWillLoad() {
892
+ this.inheritedAttributes = ((o, t = []) => {
893
+ const n = {};
894
+ return t.forEach(((t) => {
895
+ o.hasAttribute(t) && (null !== o.getAttribute(t) && (n[t] = o.getAttribute(t)), o.removeAttribute(t));
896
+ })), n;
897
+ })(this.el, ["aria-label"]);
898
+ }
899
+ connectedCallback() {
900
+ this.waitUntilVisible(this.el, "50px", (() => {
901
+ this.isVisible = !0, this.loadIcon();
902
+ }));
903
+ }
904
+ componentDidLoad() {
905
+ this.didLoadIcon || this.loadIcon();
906
+ }
907
+ disconnectedCallback() {
908
+ this.io && (this.io.disconnect(), this.io = void 0);
909
+ }
910
+ waitUntilVisible(o, t, n) {
911
+ if (!Boolean(this.lazy && "undefined" != typeof window && window.IntersectionObserver)) return n();
912
+ const i = this.io = new window.IntersectionObserver(((o) => {
913
+ o[0].isIntersecting && (i.disconnect(), this.io = void 0, n());
914
+ }), { rootMargin: t });
915
+ i.observe(o);
916
+ }
917
+ loadIcon() {
918
+ if (this.isVisible) {
919
+ const t = ((t) => {
920
+ let n = l$1(t.src);
921
+ if (n) return n;
922
+ if (n = c$1(t.name, t.icon, t.mode, t.ios, t.md), n) return ((t, n) => {
923
+ const i = (() => {
924
+ if ("undefined" == typeof window) return /* @__PURE__ */ new Map();
925
+ if (!e) {
926
+ const o = window;
927
+ o.Ionicons = o.Ionicons || {}, e = o.Ionicons.map = o.Ionicons.map || /* @__PURE__ */ new Map();
928
+ }
929
+ return e;
930
+ })().get(t);
931
+ if (i) return i;
932
+ try {
933
+ return q$1(`svg/${t}.svg`);
934
+ } catch (o) {
935
+ console.log("e", o), console.warn(`[Ionicons Warning]: Could not load icon with name "${t}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`, n);
936
+ }
937
+ })(n, t);
938
+ if (t.icon) {
939
+ if (n = l$1(t.icon), n) return n;
940
+ if (n = l$1(t.icon[t.mode]), n) return n;
941
+ }
942
+ return null;
943
+ })(this);
944
+ t && (u$1.has(t) ? this.svgContent = u$1.get(t) : ((o, t) => m$2.get(o) || ("undefined" != typeof fetch && "undefined" != typeof document ? ((o) => o.startsWith("data:image/svg+xml"))(o) && ((o) => -1 !== o.indexOf(";utf8,"))(o) ? Promise.resolve(function(o) {
945
+ p$1 || (p$1 = new DOMParser());
946
+ const t = p$1.parseFromString(o, "text/html").querySelector("svg");
947
+ if (t) return u$1.set(o, t.outerHTML), t.outerHTML;
948
+ throw new Error(`Could not parse svg from ${o}`);
949
+ }(o)) : function(o, t) {
950
+ const n = fetch(o).then(((n) => n.text().then(((n) => {
951
+ n && !1 !== t && (n = ((o) => {
952
+ const t = document.createElement("div");
953
+ t.innerHTML = o;
954
+ for (let o = t.childNodes.length - 1; o >= 0; o--) "svg" !== t.childNodes[o].nodeName.toLowerCase() && t.removeChild(t.childNodes[o]);
955
+ const n = t.firstElementChild;
956
+ if (n && "svg" === n.nodeName.toLowerCase()) {
957
+ const o = n.getAttribute("class") || "";
958
+ if (n.setAttribute("class", (o + " s-ion-icon").trim()), f$1(n)) return t.innerHTML;
959
+ }
960
+ return "";
961
+ })(n));
962
+ const i = n || "";
963
+ return u$1.set(o, i), i;
964
+ })).catch((() => g(o))))).catch((() => g(o)));
965
+ return m$2.set(o, n), n;
966
+ }(o, t) : Promise.resolve(g(o))))(t, this.sanitize).then((() => this.svgContent = u$1.get(t))), this.didLoadIcon = !0);
967
+ }
968
+ this.iconName = c$1(this.name, this.icon, this.mode, this.ios, this.md);
969
+ }
970
+ render() {
971
+ const { flipRtl: o, iconName: t, inheritedAttributes: n, el: s } = this, e = this.mode || "md", c = !!t && (t.includes("arrow") || t.includes("chevron")) && !1 !== o, l = o || c;
972
+ return Ct(It, Object.assign({
973
+ key: "0578c899781ca145dd8205acd9670af39b57cf2e",
974
+ role: "img",
975
+ class: Object.assign(Object.assign({ [e]: !0 }, v$1(this.color)), {
976
+ [`icon-${this.size}`]: !!this.size,
977
+ "flip-rtl": l,
978
+ "icon-rtl": l && (a = s, a && "" !== a.dir ? "rtl" === a.dir.toLowerCase() : "rtl" === (null === document || void 0 === document ? void 0 : document.dir.toLowerCase()))
979
+ })
980
+ }, n), Ct("div", this.svgContent ? {
981
+ class: "icon-inner",
982
+ innerHTML: this.svgContent
983
+ } : { class: "icon-inner" }));
984
+ var a;
985
+ }
986
+ static get assetsDirs() {
987
+ return ["svg"];
988
+ }
989
+ get el() {
990
+ return this;
991
+ }
992
+ static get watchers() {
993
+ return {
994
+ name: [{ loadIcon: 0 }],
995
+ src: [{ loadIcon: 0 }],
996
+ icon: [{ loadIcon: 0 }],
997
+ ios: [{ loadIcon: 0 }],
998
+ md: [{ loadIcon: 0 }]
999
+ };
1000
+ }
1001
+ static get style() {
1002
+ return ":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{-webkit-transform:scaleX(1);transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";
1003
+ }
1004
+ }, [
1005
+ 1,
1006
+ "ion-icon",
1007
+ {
1008
+ mode: [1025],
1009
+ color: [1],
1010
+ ios: [1],
1011
+ md: [1],
1012
+ flipRtl: [4, "flip-rtl"],
1013
+ name: [513],
1014
+ src: [1],
1015
+ icon: [8],
1016
+ size: [1],
1017
+ lazy: [4],
1018
+ sanitize: [4],
1019
+ svgContent: [32],
1020
+ isVisible: [32]
1021
+ },
1022
+ void 0,
1023
+ {
1024
+ name: [{ loadIcon: 0 }],
1025
+ src: [{ loadIcon: 0 }],
1026
+ icon: [{ loadIcon: 0 }],
1027
+ ios: [{ loadIcon: 0 }],
1028
+ md: [{ loadIcon: 0 }]
1029
+ }
1030
+ ]), b = () => "undefined" != typeof document && document.documentElement.getAttribute("mode") || "md", v$1 = (o) => o ? {
1031
+ "ion-color": !0,
1032
+ [`ion-color-${o}`]: !0
1033
+ } : null;
1034
+ function y() {
1035
+ "undefined" != typeof customElements && ["ion-icon"].forEach(((o) => {
1036
+ "ion-icon" === o && (customElements.get(Zn(o)) || customElements.define(Zn(o), w));
1037
+ }));
1038
+ }
1039
+ //#endregion
1040
+ //#region node_modules/@ionic/core/components/p-fpbh6w3f.js
1041
+ /*!
1042
+ * (C) Ionic http://ionicframework.com - MIT License
1043
+ */
1044
+ var m$1 = Dn(class extends I$1 {
1045
+ constructor(t) {
1046
+ super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.type = "bounded";
1047
+ }
1048
+ async addRipple(t, n) {
1049
+ return new Promise(((e) => {
1050
+ W$1((() => {
1051
+ const i = this.el.getBoundingClientRect(), o = i.width, r = i.height, s = Math.sqrt(o * o + r * r), m = Math.max(r, o), p = this.unbounded ? m : s + f, u = Math.floor(m * l), d = p / u;
1052
+ let b = t - i.left, k = n - i.top;
1053
+ this.unbounded && (b = .5 * o, k = .5 * r);
1054
+ const w = b - .5 * u, y = k - .5 * u, h = .5 * o - b, g = .5 * r - k;
1055
+ P$1((() => {
1056
+ const t = document.createElement("div");
1057
+ t.classList.add("ripple-effect");
1058
+ const n = t.style;
1059
+ n.top = y + "px", n.left = w + "px", n.width = n.height = u + "px", n.setProperty("--final-scale", `${d}`), n.setProperty("--translate-end", `${h}px, ${g}px`), (this.el.shadowRoot || this.el).appendChild(t), setTimeout((() => {
1060
+ e((() => {
1061
+ c(t);
1062
+ }));
1063
+ }), 325);
1064
+ }));
1065
+ }));
1066
+ }));
1067
+ }
1068
+ get unbounded() {
1069
+ return "unbounded" === this.type;
1070
+ }
1071
+ render() {
1072
+ return Ct(It, {
1073
+ key: "3b59cbb44741569a7350f9638b4392add673b6f1",
1074
+ role: "presentation",
1075
+ class: {
1076
+ [g$5(this)]: !0,
1077
+ unbounded: this.unbounded
1078
+ }
1079
+ });
1080
+ }
1081
+ get el() {
1082
+ return this;
1083
+ }
1084
+ static get style() {
1085
+ return ":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;-webkit-animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1));-webkit-animation:150ms fadeOutAnimation forwards;animation:150ms fadeOutAnimation forwards}@-webkit-keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@-webkit-keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@-webkit-keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}@keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}";
1086
+ }
1087
+ }, [
1088
+ 1,
1089
+ "ion-ripple-effect",
1090
+ {
1091
+ type: [1],
1092
+ addRipple: [64]
1093
+ }
1094
+ ]), c = (t) => {
1095
+ t.classList.add("fade-out"), setTimeout((() => {
1096
+ t.remove();
1097
+ }), 200);
1098
+ }, f = 10, l = .5;
1099
+ function p() {
1100
+ "undefined" != typeof customElements && ["ion-ripple-effect"].forEach(((t) => {
1101
+ "ion-ripple-effect" === t && (customElements.get(Zn(t)) || customElements.define(Zn(t), m$1));
1102
+ }));
1103
+ }
1104
+ //#endregion
1105
+ //#region node_modules/@ionic/core/components/ion-back-button.js
1106
+ /*!
1107
+ * (C) Ionic http://ionicframework.com - MIT License
1108
+ */
1109
+ var m = Dn(class extends I$1 {
1110
+ constructor(t) {
1111
+ super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.inheritedAttributes = {}, this.disabled = !1, this.type = "button", this.onClick = async (t) => {
1112
+ const n = this.el.closest("ion-nav");
1113
+ return t.preventDefault(), n && await n.canGoBack() ? n.pop({
1114
+ animationBuilder: this.routerAnimation,
1115
+ skipIfBusy: !0
1116
+ }) : l$5(this.defaultHref, t, "back", this.routerAnimation);
1117
+ };
1118
+ }
1119
+ componentWillLoad() {
1120
+ this.inheritedAttributes = s$4(this.el), void 0 === this.defaultHref && (this.defaultHref = n$2.get("backButtonDefaultHref"));
1121
+ }
1122
+ get backButtonIcon() {
1123
+ const t = this.icon;
1124
+ return null != t ? t : "ios" === g$5(this) ? n$2.get("backButtonIcon", l$2) : n$2.get("backButtonIcon", s);
1125
+ }
1126
+ get backButtonText() {
1127
+ const t = "ios" === g$5(this) ? "Back" : null;
1128
+ return null != this.text ? this.text : n$2.get("backButtonText", t);
1129
+ }
1130
+ get hasIconOnly() {
1131
+ return this.backButtonIcon && !this.backButtonText;
1132
+ }
1133
+ get rippleType() {
1134
+ return this.hasIconOnly ? "unbounded" : "bounded";
1135
+ }
1136
+ render() {
1137
+ const { color: t, defaultHref: n, disabled: o, type: a, hasIconOnly: r, backButtonIcon: d, backButtonText: l, icon: p, inheritedAttributes: b } = this, h = void 0 !== n, m = g$5(this), u = b["aria-label"] || l || "back";
1138
+ return Ct(It, {
1139
+ key: "5466624a10f1ab56f5469e6dc07080303880f2fe",
1140
+ onClick: this.onClick,
1141
+ class: o$3(t, {
1142
+ [m]: !0,
1143
+ button: !0,
1144
+ "back-button-disabled": o,
1145
+ "back-button-has-icon-only": r,
1146
+ "in-toolbar": n$1("ion-toolbar", this.el),
1147
+ "in-toolbar-color": n$1("ion-toolbar[color]", this.el),
1148
+ "ion-activatable": !0,
1149
+ "ion-focusable": !0,
1150
+ "show-back-button": h
1151
+ })
1152
+ }, Ct("button", {
1153
+ key: "63bc75ef0ad7cc9fb79e58217a3314b20acd73e3",
1154
+ type: a,
1155
+ disabled: o,
1156
+ class: "button-native",
1157
+ part: "native",
1158
+ "aria-label": u
1159
+ }, Ct("span", {
1160
+ key: "5d3eacbd11af2245c6e1151cab446a0d96559ad8",
1161
+ class: "button-inner"
1162
+ }, d && Ct("ion-icon", {
1163
+ key: "6439af0ae463764174e7d3207f02267811df666d",
1164
+ part: "icon",
1165
+ icon: d,
1166
+ "aria-hidden": "true",
1167
+ lazy: !1,
1168
+ "flip-rtl": void 0 === p
1169
+ }), l && Ct("span", {
1170
+ key: "8ee89fb18dfdb5b75948a8b197ff4cdbc008742f",
1171
+ part: "text",
1172
+ "aria-hidden": "true",
1173
+ class: "button-text"
1174
+ }, l)), "md" === m && Ct("ion-ripple-effect", {
1175
+ key: "63803a884998bc73bea5afe0b2a0a14e3fa4d6bf",
1176
+ type: this.rippleType
1177
+ })));
1178
+ }
1179
+ get el() {
1180
+ return this;
1181
+ }
1182
+ static get style() {
1183
+ return {
1184
+ ios: ":host{--background:transparent;--color-focused:currentColor;--color-hover:currentColor;--icon-margin-top:0;--icon-margin-bottom:0;--icon-padding-top:0;--icon-padding-end:0;--icon-padding-bottom:0;--icon-padding-start:0;--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--min-width:auto;--min-height:auto;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--opacity:1;--ripple-color:currentColor;--transition:background-color, opacity 100ms linear;display:none;min-width:var(--min-width);min-height:var(--min-height);color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-kerning:none;font-kerning:none}ion-ripple-effect{color:var(--ripple-color)}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.show-back-button){display:block}:host(.back-button-disabled){cursor:default;opacity:0.5;pointer-events:none}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;opacity:var(--opacity);overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}ion-icon{-webkit-padding-start:var(--icon-padding-start);padding-inline-start:var(--icon-padding-start);-webkit-padding-end:var(--icon-padding-end);padding-inline-end:var(--icon-padding-end);padding-top:var(--icon-padding-top);padding-bottom:var(--icon-padding-bottom);-webkit-margin-start:var(--icon-margin-start);margin-inline-start:var(--icon-margin-start);-webkit-margin-end:var(--icon-margin-end);margin-inline-end:var(--icon-margin-end);margin-top:var(--icon-margin-top);margin-bottom:var(--icon-margin-bottom);display:inherit;font-size:var(--icon-font-size);font-weight:var(--icon-font-weight);pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-color.ion-focused) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-hover:transparent;--background-hover-opacity:1;--background-focused:currentColor;--background-focused-opacity:.1;--border-radius:4px;--color:var(--ion-color-primary, #0054e9);--icon-margin-end:1px;--icon-margin-start:-4px;--icon-font-size:1.6em;--min-height:32px;font-size:clamp(17px, 1.0625rem, 21.998px)}.button-native{-webkit-transform:translateZ(0);transform:translateZ(0);overflow:visible;z-index:99}:host(.ion-activated) .button-native{opacity:0.4}@media (any-hover: hover){:host(:hover){opacity:0.6}}",
1185
+ md: ":host{--background:transparent;--color-focused:currentColor;--color-hover:currentColor;--icon-margin-top:0;--icon-margin-bottom:0;--icon-padding-top:0;--icon-padding-end:0;--icon-padding-bottom:0;--icon-padding-start:0;--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--min-width:auto;--min-height:auto;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--opacity:1;--ripple-color:currentColor;--transition:background-color, opacity 100ms linear;display:none;min-width:var(--min-width);min-height:var(--min-height);color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-kerning:none;font-kerning:none}ion-ripple-effect{color:var(--ripple-color)}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.show-back-button){display:block}:host(.back-button-disabled){cursor:default;opacity:0.5;pointer-events:none}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;opacity:var(--opacity);overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}ion-icon{-webkit-padding-start:var(--icon-padding-start);padding-inline-start:var(--icon-padding-start);-webkit-padding-end:var(--icon-padding-end);padding-inline-end:var(--icon-padding-end);padding-top:var(--icon-padding-top);padding-bottom:var(--icon-padding-bottom);-webkit-margin-start:var(--icon-margin-start);margin-inline-start:var(--icon-margin-start);-webkit-margin-end:var(--icon-margin-end);margin-inline-end:var(--icon-margin-end);margin-top:var(--icon-margin-top);margin-bottom:var(--icon-margin-bottom);display:inherit;font-size:var(--icon-font-size);font-weight:var(--icon-font-weight);pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-color.ion-focused) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--border-radius:4px;--background-focused:currentColor;--background-focused-opacity:.12;--background-hover:currentColor;--background-hover-opacity:0.04;--color:currentColor;--icon-margin-end:0;--icon-margin-start:0;--icon-font-size:1.5rem;--icon-font-weight:normal;--min-height:32px;--min-width:44px;--padding-start:12px;--padding-end:12px;font-size:0.875rem;font-weight:500;text-transform:uppercase}:host(.back-button-has-icon-only){--border-radius:50%;min-width:48px;min-height:48px;aspect-ratio:1/1}.button-native{-webkit-box-shadow:none;box-shadow:none}.button-text{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:0;padding-bottom:0}ion-icon{line-height:0.67;text-align:start}@media (any-hover: hover){:host(.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}:host(.ion-color.ion-focused) .button-native::after{background:var(--ion-color-base)}"
1186
+ };
1187
+ }
1188
+ }, [
1189
+ 33,
1190
+ "ion-back-button",
1191
+ {
1192
+ color: [513],
1193
+ defaultHref: [1025, "default-href"],
1194
+ disabled: [516],
1195
+ icon: [1],
1196
+ text: [1],
1197
+ type: [1],
1198
+ routerAnimation: [16]
1199
+ }
1200
+ ]), v = function() {
1201
+ "undefined" != typeof customElements && [
1202
+ "ion-back-button",
1203
+ "ion-icon",
1204
+ "ion-ripple-effect"
1205
+ ].forEach(((t) => {
1206
+ switch (t) {
1207
+ case "ion-back-button":
1208
+ customElements.get(Zn(t)) || customElements.define(Zn(t), m);
1209
+ break;
1210
+ case "ion-icon":
1211
+ customElements.get(Zn(t)) || y();
1212
+ break;
1213
+ case "ion-ripple-effect": customElements.get(Zn(t)) || p();
1214
+ }
1215
+ }));
1216
+ };
1217
+ //#endregion
1218
+ //#region node_modules/ionicons/components/index.js
1219
+ var NAMESPACE = "ionicons";
1220
+ var BUILD = {
1221
+ hydratedSelectorName: "hydrated",
1222
+ lazyLoad: false,
1223
+ updatable: true
1224
+ };
1225
+ var __defProp = Object.defineProperty;
1226
+ var __export = (target, all) => {
1227
+ for (var name in all) __defProp(target, name, {
1228
+ get: all[name],
1229
+ enumerable: true
1230
+ });
1231
+ };
1232
+ var getHostRef = (ref) => {
1233
+ if (ref.__stencil__getHostRef) return ref.__stencil__getHostRef();
1234
+ };
1235
+ var registerHost = (hostElement, cmpMeta) => {
1236
+ const hostRef = {
1237
+ $flags$: 0,
1238
+ $hostElement$: hostElement,
1239
+ $cmpMeta$: cmpMeta,
1240
+ $instanceValues$: /* @__PURE__ */ new Map()
1241
+ };
1242
+ hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
1243
+ hostElement["s-p"] = [];
1244
+ hostElement["s-rc"] = [];
1245
+ const ref = hostRef;
1246
+ hostElement.__stencil__getHostRef = () => ref;
1247
+ return ref;
1248
+ };
1249
+ var isMemberInElement = (elm, memberName) => memberName in elm;
1250
+ var consoleError = (e, el) => (0, console.error)(e, el);
1251
+ var styles = /* @__PURE__ */ new Map();
1252
+ var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
1253
+ var XLINK_NS = "http://www.w3.org/1999/xlink";
1254
+ var win = typeof window !== "undefined" ? window : {};
1255
+ var H = win.HTMLElement || class {};
1256
+ var plt = {
1257
+ $flags$: 0,
1258
+ $resourcesUrl$: "",
1259
+ jmp: (h2) => h2(),
1260
+ raf: (h2) => requestAnimationFrame(h2),
1261
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1262
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1263
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
1264
+ };
1265
+ var promiseResolve = (v) => Promise.resolve(v);
1266
+ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
1267
+ try {
1268
+ new CSSStyleSheet();
1269
+ return typeof new CSSStyleSheet().replaceSync === "function";
1270
+ } catch (e) {}
1271
+ return false;
1272
+ })();
1273
+ var queuePending = false;
1274
+ var queueDomReads = [];
1275
+ var queueDomWrites = [];
1276
+ var queueTask = (queue, write) => (cb) => {
1277
+ queue.push(cb);
1278
+ if (!queuePending) {
1279
+ queuePending = true;
1280
+ if (write && plt.$flags$ & 4) nextTick(flush);
1281
+ else plt.raf(flush);
1282
+ }
1283
+ };
1284
+ var consume = (queue) => {
1285
+ for (let i2 = 0; i2 < queue.length; i2++) try {
1286
+ queue[i2](performance.now());
1287
+ } catch (e) {
1288
+ consoleError(e);
1289
+ }
1290
+ queue.length = 0;
1291
+ };
1292
+ var flush = () => {
1293
+ consume(queueDomReads);
1294
+ consume(queueDomWrites);
1295
+ if (queuePending = queueDomReads.length > 0) plt.raf(flush);
1296
+ };
1297
+ var nextTick = (cb) => promiseResolve().then(cb);
1298
+ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
1299
+ var getAssetPath = (path) => {
1300
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
1301
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
1302
+ };
1303
+ var isComplexType = (o) => {
1304
+ o = typeof o;
1305
+ return o === "object" || o === "function";
1306
+ };
1307
+ function queryNonceMetaTagContent(doc) {
1308
+ var _a, _b, _c;
1309
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector("meta[name=\"csp-nonce\"]")) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
1310
+ }
1311
+ var escapeRegExpSpecialCharacters = (text) => {
1312
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1313
+ };
1314
+ __export({}, {
1315
+ err: () => err,
1316
+ map: () => map,
1317
+ ok: () => ok,
1318
+ unwrap: () => unwrap,
1319
+ unwrapErr: () => unwrapErr
1320
+ });
1321
+ var ok = (value) => ({
1322
+ isOk: true,
1323
+ isErr: false,
1324
+ value
1325
+ });
1326
+ var err = (value) => ({
1327
+ isOk: false,
1328
+ isErr: true,
1329
+ value
1330
+ });
1331
+ function map(result, fn) {
1332
+ if (result.isOk) {
1333
+ const val = fn(result.value);
1334
+ if (val instanceof Promise) return val.then((newVal) => ok(newVal));
1335
+ else return ok(val);
1336
+ }
1337
+ if (result.isErr) {
1338
+ const value = result.value;
1339
+ return err(value);
1340
+ }
1341
+ throw "should never get here";
1342
+ }
1343
+ var unwrap = (result) => {
1344
+ if (result.isOk) return result.value;
1345
+ else throw result.value;
1346
+ };
1347
+ var unwrapErr = (result) => {
1348
+ if (result.isErr) return result.value;
1349
+ else throw result.value;
1350
+ };
1351
+ function createStyleSheetIfNeededAndSupported(styles2) {}
1352
+ var globalStyleSheet;
1353
+ function createShadowRoot(cmpMeta) {
1354
+ var _a;
1355
+ const shadowRoot = this.attachShadow({ mode: "open" });
1356
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
1357
+ if (globalStyleSheet) shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
1358
+ }
1359
+ var createTime = (fnName, tagName = "") => {
1360
+ return () => {};
1361
+ };
1362
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1363
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1364
+ let style = styles.get(scopeId2);
1365
+ if (supportsConstructableStylesheets && allowCS) {
1366
+ style = style || new CSSStyleSheet();
1367
+ if (typeof style === "string") style = cssText;
1368
+ else style.replaceSync(cssText);
1369
+ } else style = cssText;
1370
+ styles.set(scopeId2, style);
1371
+ };
1372
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1373
+ var _a;
1374
+ const scopeId2 = getScopeId(cmpMeta);
1375
+ const style = styles.get(scopeId2);
1376
+ if (!win.document) return scopeId2;
1377
+ styleContainerNode = styleContainerNode.nodeType === 11 ? styleContainerNode : win.document;
1378
+ if (style) {
1379
+ if (typeof style === "string") {
1380
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1381
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1382
+ let styleElm;
1383
+ if (!appliedStyles) rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1384
+ if (!appliedStyles.has(scopeId2)) {
1385
+ {
1386
+ styleElm = win.document.createElement("style");
1387
+ styleElm.innerHTML = style;
1388
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1389
+ if (nonce != null) styleElm.setAttribute("nonce", nonce);
1390
+ if (!(cmpMeta.$flags$ & 1)) if (styleContainerNode.nodeName === "HEAD") {
1391
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1392
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1393
+ styleContainerNode.insertBefore(styleElm, (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null);
1394
+ } else if ("host" in styleContainerNode) if (supportsConstructableStylesheets) {
1395
+ const stylesheet = new CSSStyleSheet();
1396
+ stylesheet.replaceSync(style);
1397
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
1398
+ } else {
1399
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1400
+ if (existingStyleContainer) existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1401
+ else styleContainerNode.prepend(styleElm);
1402
+ }
1403
+ else styleContainerNode.append(styleElm);
1404
+ if (cmpMeta.$flags$ & 1) styleContainerNode.insertBefore(styleElm, null);
1405
+ }
1406
+ if (cmpMeta.$flags$ & 4) styleElm.innerHTML += SLOT_FB_CSS;
1407
+ if (appliedStyles) appliedStyles.add(scopeId2);
1408
+ }
1409
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) styleContainerNode.adoptedStyleSheets.push(style);
1410
+ }
1411
+ return scopeId2;
1412
+ };
1413
+ var attachStyles = (hostRef) => {
1414
+ const cmpMeta = hostRef.$cmpMeta$;
1415
+ const elm = hostRef.$hostElement$;
1416
+ const flags = cmpMeta.$flags$;
1417
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1418
+ const scopeId2 = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
1419
+ if (flags & 10) {
1420
+ elm["s-sc"] = scopeId2;
1421
+ elm.classList.add(scopeId2 + "-h");
1422
+ }
1423
+ endAttachStyles();
1424
+ };
1425
+ var getScopeId = (cmp, mode) => "sc-" + cmp.$tagName$;
1426
+ var h = (nodeName, vnodeData, ...children) => {
1427
+ let child = null;
1428
+ let key = null;
1429
+ let simple = false;
1430
+ let lastSimple = false;
1431
+ const vNodeChildren = [];
1432
+ const walk = (c) => {
1433
+ for (let i2 = 0; i2 < c.length; i2++) {
1434
+ child = c[i2];
1435
+ if (Array.isArray(child)) walk(child);
1436
+ else if (child != null && typeof child !== "boolean") {
1437
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) child = String(child);
1438
+ if (simple && lastSimple) vNodeChildren[vNodeChildren.length - 1].$text$ += child;
1439
+ else vNodeChildren.push(simple ? newVNode(null, child) : child);
1440
+ lastSimple = simple;
1441
+ }
1442
+ }
1443
+ };
1444
+ walk(children);
1445
+ if (vnodeData) {
1446
+ if (vnodeData.key) key = vnodeData.key;
1447
+ {
1448
+ const classData = vnodeData.className || vnodeData.class;
1449
+ if (classData) vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
1450
+ }
1451
+ }
1452
+ const vnode = newVNode(nodeName, null);
1453
+ vnode.$attrs$ = vnodeData;
1454
+ if (vNodeChildren.length > 0) vnode.$children$ = vNodeChildren;
1455
+ vnode.$key$ = key;
1456
+ return vnode;
1457
+ };
1458
+ var newVNode = (tag, text) => {
1459
+ const vnode = {
1460
+ $flags$: 0,
1461
+ $tag$: tag,
1462
+ $text$: text,
1463
+ $elm$: null,
1464
+ $children$: null
1465
+ };
1466
+ vnode.$attrs$ = null;
1467
+ vnode.$key$ = null;
1468
+ return vnode;
1469
+ };
1470
+ var Host = {};
1471
+ var isHost = (node) => node && node.$tag$ === Host;
1472
+ var createSupportsRuleRe = (selector) => {
1473
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
1474
+ return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`, "g");
1475
+ };
1476
+ createSupportsRuleRe("::slotted");
1477
+ createSupportsRuleRe(":host");
1478
+ createSupportsRuleRe(":host-context");
1479
+ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1480
+ if (propValue != null && !isComplexType(propValue)) {
1481
+ if (propType & 4) return propValue === "false" ? false : propValue === "" || !!propValue;
1482
+ if (propType & 1) return String(propValue);
1483
+ return propValue;
1484
+ }
1485
+ return propValue;
1486
+ };
1487
+ var emitEvent = (elm, name, opts) => {
1488
+ const ev = plt.ce(name, opts);
1489
+ elm.dispatchEvent(ev);
1490
+ return ev;
1491
+ };
1492
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
1493
+ if (oldValue === newValue) return;
1494
+ let isProp = isMemberInElement(elm, memberName);
1495
+ let ln = memberName.toLowerCase();
1496
+ if (memberName === "class") {
1497
+ const classList = elm.classList;
1498
+ const oldClasses = parseClassList(oldValue);
1499
+ let newClasses = parseClassList(newValue);
1500
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
1501
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
1502
+ } else if (memberName === "style") {
1503
+ for (const prop in oldValue) if (!newValue || newValue[prop] == null) if (prop.includes("-")) elm.style.removeProperty(prop);
1504
+ else elm.style[prop] = "";
1505
+ for (const prop in newValue) if (!oldValue || newValue[prop] !== oldValue[prop]) if (prop.includes("-")) elm.style.setProperty(prop, newValue[prop]);
1506
+ else elm.style[prop] = newValue[prop];
1507
+ } else if (memberName === "key");
1508
+ else if (memberName === "ref") {
1509
+ if (newValue) newValue(elm);
1510
+ } else if (!elm.__lookupSetter__(memberName) && memberName[0] === "o" && memberName[1] === "n") {
1511
+ if (memberName[2] === "-") memberName = memberName.slice(3);
1512
+ else if (isMemberInElement(win, ln)) memberName = ln.slice(2);
1513
+ else memberName = ln[2] + memberName.slice(3);
1514
+ if (oldValue || newValue) {
1515
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1516
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1517
+ if (oldValue) plt.rel(elm, memberName, oldValue, capture);
1518
+ if (newValue) plt.ael(elm, memberName, newValue, capture);
1519
+ }
1520
+ } else {
1521
+ const isComplex = isComplexType(newValue);
1522
+ if ((isProp || isComplex && newValue !== null) && true) try {
1523
+ if (!elm.tagName.includes("-")) {
1524
+ const n = newValue == null ? "" : newValue;
1525
+ if (memberName === "list") isProp = false;
1526
+ else if (oldValue == null || elm[memberName] != n) if (typeof elm.__lookupSetter__(memberName) === "function") elm[memberName] = n;
1527
+ else elm.setAttribute(memberName, n);
1528
+ } else if (elm[memberName] !== newValue) elm[memberName] = newValue;
1529
+ } catch (e) {}
1530
+ let xlink = false;
1531
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
1532
+ memberName = ln;
1533
+ xlink = true;
1534
+ }
1535
+ if (newValue == null || newValue === false) {
1536
+ if (newValue !== false || elm.getAttribute(memberName) === "") if (xlink) elm.removeAttributeNS(XLINK_NS, memberName);
1537
+ else elm.removeAttribute(memberName);
1538
+ } else if ((!isProp || flags & 4 || isSvg) && !isComplex && elm.nodeType === 1) {
1539
+ newValue = newValue === true ? "" : newValue;
1540
+ if (xlink) elm.setAttributeNS(XLINK_NS, memberName, newValue);
1541
+ else elm.setAttribute(memberName, newValue);
1542
+ }
1543
+ }
1544
+ };
1545
+ var parseClassListRegex = /\s/;
1546
+ var parseClassList = (value) => {
1547
+ if (typeof value === "object" && value && "baseVal" in value) value = value.baseVal;
1548
+ if (!value || typeof value !== "string") return [];
1549
+ return value.split(parseClassListRegex);
1550
+ };
1551
+ var CAPTURE_EVENT_SUFFIX = "Capture";
1552
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
1553
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
1554
+ const elm = newVnode.$elm$.nodeType === 11 && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
1555
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
1556
+ const newVnodeAttrs = newVnode.$attrs$ || {};
1557
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) if (!(memberName in newVnodeAttrs)) setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
1558
+ for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
1559
+ };
1560
+ function sortedAttrNames(attrNames) {
1561
+ return attrNames.includes("ref") ? [...attrNames.filter((attr) => attr !== "ref"), "ref"] : attrNames;
1562
+ }
1563
+ var hostTagName;
1564
+ var isSvgMode = false;
1565
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
1566
+ const newVNode2 = newParentVNode.$children$[childIndex];
1567
+ let i2 = 0;
1568
+ let elm;
1569
+ let childNode;
1570
+ if (newVNode2.$text$ !== null) elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
1571
+ else {
1572
+ if (!win.document) throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");
1573
+ elm = newVNode2.$elm$ = win.document.createElement(newVNode2.$tag$);
1574
+ updateElement(null, newVNode2, isSvgMode);
1575
+ if (newVNode2.$children$) for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
1576
+ childNode = createElm(oldParentVNode, newVNode2, i2);
1577
+ if (childNode) elm.appendChild(childNode);
1578
+ }
1579
+ }
1580
+ elm["s-hn"] = hostTagName;
1581
+ return elm;
1582
+ };
1583
+ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1584
+ let containerElm = parentElm;
1585
+ let childNode;
1586
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) containerElm = containerElm.shadowRoot;
1587
+ for (; startIdx <= endIdx; ++startIdx) if (vnodes[startIdx]) {
1588
+ childNode = createElm(null, parentVNode, startIdx);
1589
+ if (childNode) {
1590
+ vnodes[startIdx].$elm$ = childNode;
1591
+ insertBefore(containerElm, childNode, before);
1592
+ }
1593
+ }
1594
+ };
1595
+ var removeVnodes = (vnodes, startIdx, endIdx) => {
1596
+ for (let index = startIdx; index <= endIdx; ++index) {
1597
+ const vnode = vnodes[index];
1598
+ if (vnode) {
1599
+ const elm = vnode.$elm$;
1600
+ nullifyVNodeRefs(vnode);
1601
+ if (elm) elm.remove();
1602
+ }
1603
+ }
1604
+ };
1605
+ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
1606
+ let oldStartIdx = 0;
1607
+ let newStartIdx = 0;
1608
+ let idxInOld = 0;
1609
+ let i2 = 0;
1610
+ let oldEndIdx = oldCh.length - 1;
1611
+ let oldStartVnode = oldCh[0];
1612
+ let oldEndVnode = oldCh[oldEndIdx];
1613
+ let newEndIdx = newCh.length - 1;
1614
+ let newStartVnode = newCh[0];
1615
+ let newEndVnode = newCh[newEndIdx];
1616
+ let node;
1617
+ let elmToMove;
1618
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) if (oldStartVnode == null) oldStartVnode = oldCh[++oldStartIdx];
1619
+ else if (oldEndVnode == null) oldEndVnode = oldCh[--oldEndIdx];
1620
+ else if (newStartVnode == null) newStartVnode = newCh[++newStartIdx];
1621
+ else if (newEndVnode == null) newEndVnode = newCh[--newEndIdx];
1622
+ else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
1623
+ patch(oldStartVnode, newStartVnode, isInitialRender);
1624
+ oldStartVnode = oldCh[++oldStartIdx];
1625
+ newStartVnode = newCh[++newStartIdx];
1626
+ } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
1627
+ patch(oldEndVnode, newEndVnode, isInitialRender);
1628
+ oldEndVnode = oldCh[--oldEndIdx];
1629
+ newEndVnode = newCh[--newEndIdx];
1630
+ } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
1631
+ patch(oldStartVnode, newEndVnode, isInitialRender);
1632
+ insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1633
+ oldStartVnode = oldCh[++oldStartIdx];
1634
+ newEndVnode = newCh[--newEndIdx];
1635
+ } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
1636
+ patch(oldEndVnode, newStartVnode, isInitialRender);
1637
+ insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
1638
+ oldEndVnode = oldCh[--oldEndIdx];
1639
+ newStartVnode = newCh[++newStartIdx];
1640
+ } else {
1641
+ idxInOld = -1;
1642
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
1643
+ idxInOld = i2;
1644
+ break;
1645
+ }
1646
+ if (idxInOld >= 0) {
1647
+ elmToMove = oldCh[idxInOld];
1648
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1649
+ else {
1650
+ patch(elmToMove, newStartVnode, isInitialRender);
1651
+ oldCh[idxInOld] = void 0;
1652
+ node = elmToMove.$elm$;
1653
+ }
1654
+ newStartVnode = newCh[++newStartIdx];
1655
+ } else {
1656
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1657
+ newStartVnode = newCh[++newStartIdx];
1658
+ }
1659
+ if (node) insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
1660
+ }
1661
+ if (oldStartIdx > oldEndIdx) addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode2, newCh, newStartIdx, newEndIdx);
1662
+ else if (newStartIdx > newEndIdx) removeVnodes(oldCh, oldStartIdx, oldEndIdx);
1663
+ };
1664
+ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1665
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
1666
+ if (!isInitialRender) return leftVNode.$key$ === rightVNode.$key$;
1667
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) leftVNode.$key$ = rightVNode.$key$;
1668
+ return true;
1669
+ }
1670
+ return false;
1671
+ };
1672
+ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1673
+ const elm = newVNode2.$elm$ = oldVNode.$elm$;
1674
+ const oldChildren = oldVNode.$children$;
1675
+ const newChildren = newVNode2.$children$;
1676
+ const text = newVNode2.$text$;
1677
+ if (text === null) {
1678
+ updateElement(oldVNode, newVNode2, isSvgMode);
1679
+ if (oldChildren !== null && newChildren !== null) updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
1680
+ else if (newChildren !== null) {
1681
+ if (oldVNode.$text$ !== null) elm.textContent = "";
1682
+ addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
1683
+ } else if (!isInitialRender && BUILD.updatable && oldChildren !== null) removeVnodes(oldChildren, 0, oldChildren.length - 1);
1684
+ } else if (oldVNode.$text$ !== text) elm.data = text;
1685
+ };
1686
+ var nullifyVNodeRefs = (vNode) => {
1687
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1688
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1689
+ };
1690
+ var insertBefore = (parent, newNode, reference) => {
1691
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1692
+ };
1693
+ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1694
+ const hostElm = hostRef.$hostElement$;
1695
+ const cmpMeta = hostRef.$cmpMeta$;
1696
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1697
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1698
+ hostTagName = hostElm.tagName;
1699
+ if (cmpMeta.$attrsToReflect$) {
1700
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1701
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]);
1702
+ }
1703
+ if (isInitialLoad && rootVnode.$attrs$) {
1704
+ for (const key of Object.keys(rootVnode.$attrs$)) if (hostElm.hasAttribute(key) && ![
1705
+ "key",
1706
+ "ref",
1707
+ "style",
1708
+ "class"
1709
+ ].includes(key)) rootVnode.$attrs$[key] = hostElm[key];
1710
+ }
1711
+ rootVnode.$tag$ = null;
1712
+ rootVnode.$flags$ |= 4;
1713
+ hostRef.$vnode$ = rootVnode;
1714
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm;
1715
+ patch(oldVNode, rootVnode, isInitialLoad);
1716
+ };
1717
+ var attachToAncestor = (hostRef, ancestorComponent) => {
1718
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1719
+ const index = ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = () => {
1720
+ ancestorComponent["s-p"].splice(index - 1, 1);
1721
+ r();
1722
+ }));
1723
+ }
1724
+ };
1725
+ var scheduleUpdate = (hostRef, isInitialLoad) => {
1726
+ hostRef.$flags$ |= 16;
1727
+ if (hostRef.$flags$ & 4) {
1728
+ hostRef.$flags$ |= 512;
1729
+ return;
1730
+ }
1731
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1732
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1733
+ return writeTask(dispatch);
1734
+ };
1735
+ var dispatchHooks = (hostRef, isInitialLoad) => {
1736
+ const elm = hostRef.$hostElement$;
1737
+ const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1738
+ const instance = elm;
1739
+ if (!instance) throw new Error(`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`);
1740
+ let maybePromise;
1741
+ if (isInitialLoad) maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1742
+ else maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1743
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1744
+ endSchedule();
1745
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1746
+ };
1747
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
1748
+ console.error(err2);
1749
+ fn();
1750
+ }) : fn();
1751
+ var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1752
+ var updateComponent = async (hostRef, instance, isInitialLoad) => {
1753
+ var _a;
1754
+ const elm = hostRef.$hostElement$;
1755
+ const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1756
+ const rc = elm["s-rc"];
1757
+ if (isInitialLoad) attachStyles(hostRef);
1758
+ const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1759
+ callRender(hostRef, instance, elm, isInitialLoad);
1760
+ if (rc) {
1761
+ rc.map((cb) => cb());
1762
+ elm["s-rc"] = void 0;
1763
+ }
1764
+ endRender();
1765
+ endUpdate();
1766
+ {
1767
+ const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1768
+ const postUpdate = () => postUpdateComponent(hostRef);
1769
+ if (childrenPromises.length === 0) postUpdate();
1770
+ else {
1771
+ Promise.all(childrenPromises).then(postUpdate);
1772
+ hostRef.$flags$ |= 4;
1773
+ childrenPromises.length = 0;
1774
+ }
1775
+ }
1776
+ };
1777
+ var callRender = (hostRef, instance, elm, isInitialLoad) => {
1778
+ try {
1779
+ instance = instance.render();
1780
+ hostRef.$flags$ &= -17;
1781
+ hostRef.$flags$ |= 2;
1782
+ renderVdom(hostRef, instance, isInitialLoad);
1783
+ } catch (e) {
1784
+ consoleError(e, hostRef.$hostElement$);
1785
+ }
1786
+ return null;
1787
+ };
1788
+ var postUpdateComponent = (hostRef) => {
1789
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1790
+ const elm = hostRef.$hostElement$;
1791
+ const endPostUpdate = createTime("postUpdate", tagName);
1792
+ const instance = elm;
1793
+ const ancestorComponent = hostRef.$ancestorComponent$;
1794
+ safeCall(instance, "componentDidRender", void 0, elm);
1795
+ if (!(hostRef.$flags$ & 64)) {
1796
+ hostRef.$flags$ |= 64;
1797
+ addHydratedFlag(elm);
1798
+ safeCall(instance, "componentDidLoad", void 0, elm);
1799
+ endPostUpdate();
1800
+ hostRef.$onReadyResolve$(elm);
1801
+ if (!ancestorComponent) appDidLoad();
1802
+ } else {
1803
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1804
+ endPostUpdate();
1805
+ }
1806
+ if (hostRef.$onRenderResolve$) {
1807
+ hostRef.$onRenderResolve$();
1808
+ hostRef.$onRenderResolve$ = void 0;
1809
+ }
1810
+ if (hostRef.$flags$ & 512) nextTick(() => scheduleUpdate(hostRef, false));
1811
+ hostRef.$flags$ &= -517;
1812
+ };
1813
+ var appDidLoad = (who) => {
1814
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1815
+ };
1816
+ var safeCall = (instance, method, arg, elm) => {
1817
+ if (instance && instance[method]) try {
1818
+ return instance[method](arg);
1819
+ } catch (e) {
1820
+ consoleError(e, elm);
1821
+ }
1822
+ };
1823
+ var addHydratedFlag = (elm) => {
1824
+ var _a;
1825
+ return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated");
1826
+ };
1827
+ var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1828
+ var setValue = (ref, propName, newVal, cmpMeta) => {
1829
+ const hostRef = getHostRef(ref);
1830
+ const elm = ref;
1831
+ const oldVal = hostRef.$instanceValues$.get(propName);
1832
+ const flags = hostRef.$flags$;
1833
+ const instance = elm;
1834
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1835
+ if (newVal !== oldVal && !(Number.isNaN(oldVal) && Number.isNaN(newVal))) {
1836
+ hostRef.$instanceValues$.set(propName, newVal);
1837
+ if (cmpMeta.$watchers$ && flags & 128) {
1838
+ const watchMethods = cmpMeta.$watchers$[propName];
1839
+ if (watchMethods) watchMethods.map((watchMethodName) => {
1840
+ try {
1841
+ instance[watchMethodName](newVal, oldVal, propName);
1842
+ } catch (e) {
1843
+ consoleError(e, elm);
1844
+ }
1845
+ });
1846
+ }
1847
+ if ((flags & 18) === 2) {
1848
+ if (instance.componentShouldUpdate) {
1849
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) return;
1850
+ }
1851
+ scheduleUpdate(hostRef, false);
1852
+ }
1853
+ }
1854
+ };
1855
+ var proxyComponent = (Cstr, cmpMeta, flags) => {
1856
+ var _a, _b;
1857
+ const prototype = Cstr.prototype;
1858
+ if (cmpMeta.$members$ || cmpMeta.$watchers$ || Cstr.watchers) {
1859
+ if (Cstr.watchers && !cmpMeta.$watchers$) cmpMeta.$watchers$ = Cstr.watchers;
1860
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1861
+ members.map(([memberName, [memberFlags]]) => {
1862
+ if (memberFlags & 31 || memberFlags & 32) {
1863
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1864
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048;
1865
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096;
1866
+ Object.defineProperty(prototype, memberName, {
1867
+ get() {
1868
+ return origGetter ? origGetter.apply(this) : getValue(this, memberName);
1869
+ },
1870
+ configurable: true,
1871
+ enumerable: true
1872
+ });
1873
+ Object.defineProperty(prototype, memberName, { set(newValue) {
1874
+ const ref = getHostRef(this);
1875
+ if (origSetter) {
1876
+ const currentValue = memberFlags & 32 ? this[memberName] : ref.$hostElement$[memberName];
1877
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) newValue = ref.$instanceValues$.get(memberName);
1878
+ else if (!ref.$instanceValues$.get(memberName) && currentValue) ref.$instanceValues$.set(memberName, currentValue);
1879
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1880
+ newValue = memberFlags & 32 ? this[memberName] : ref.$hostElement$[memberName];
1881
+ setValue(this, memberName, newValue, cmpMeta);
1882
+ return;
1883
+ }
1884
+ setValue(this, memberName, newValue, cmpMeta);
1885
+ } });
1886
+ }
1887
+ });
1888
+ {
1889
+ const attrNameToPropName = /* @__PURE__ */ new Map();
1890
+ prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1891
+ plt.jmp(() => {
1892
+ var _a2;
1893
+ const propName = attrNameToPropName.get(attrName);
1894
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad);
1895
+ else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) return;
1896
+ else if (propName == null) {
1897
+ const hostRef = getHostRef(this);
1898
+ const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1899
+ if (flags2 && !(flags2 & 8) && flags2 & 128 && newValue !== oldValue) {
1900
+ const instance = this;
1901
+ ((_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName])?.forEach((callbackName) => {
1902
+ if (instance[callbackName] != null) instance[callbackName].call(instance, newValue, oldValue, attrName);
1903
+ });
1904
+ }
1905
+ return;
1906
+ }
1907
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1908
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1909
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) this[propName] = newValue;
1910
+ });
1911
+ };
1912
+ Cstr.observedAttributes = Array.from(/* @__PURE__ */ new Set([...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}), ...members.filter(([_, m]) => m[0] & 15).map(([propName, m]) => {
1913
+ var _a2;
1914
+ const attrName = m[1] || propName;
1915
+ attrNameToPropName.set(attrName, propName);
1916
+ if (m[0] & 512) (_a2 = cmpMeta.$attrsToReflect$) == null || _a2.push([propName, attrName]);
1917
+ return attrName;
1918
+ })]));
1919
+ }
1920
+ }
1921
+ return Cstr;
1922
+ };
1923
+ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1924
+ let Cstr;
1925
+ if ((hostRef.$flags$ & 32) === 0) {
1926
+ hostRef.$flags$ |= 32;
1927
+ {
1928
+ Cstr = elm.constructor;
1929
+ const cmpTag = elm.localName;
1930
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128);
1931
+ }
1932
+ if (Cstr && Cstr.style) {
1933
+ let style;
1934
+ if (typeof Cstr.style === "string") style = Cstr.style;
1935
+ const scopeId2 = getScopeId(cmpMeta);
1936
+ if (!styles.has(scopeId2)) {
1937
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1938
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1));
1939
+ endRegisterStyles();
1940
+ }
1941
+ }
1942
+ }
1943
+ const ancestorComponent = hostRef.$ancestorComponent$;
1944
+ const schedule = () => scheduleUpdate(hostRef, true);
1945
+ if (ancestorComponent && ancestorComponent["s-rc"]) ancestorComponent["s-rc"].push(schedule);
1946
+ else schedule();
1947
+ };
1948
+ var fireConnectedCallback = (instance, elm) => {};
1949
+ var connectedCallback = (elm) => {
1950
+ if ((plt.$flags$ & 1) === 0) {
1951
+ const hostRef = getHostRef(elm);
1952
+ const cmpMeta = hostRef.$cmpMeta$;
1953
+ const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1954
+ if (!(hostRef.$flags$ & 1)) {
1955
+ hostRef.$flags$ |= 1;
1956
+ {
1957
+ let ancestorComponent = elm;
1958
+ while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) if (ancestorComponent["s-p"]) {
1959
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1960
+ break;
1961
+ }
1962
+ }
1963
+ if (cmpMeta.$members$) Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1964
+ if (memberFlags & 31 && elm.hasOwnProperty(memberName)) {
1965
+ const value = elm[memberName];
1966
+ delete elm[memberName];
1967
+ elm[memberName] = value;
1968
+ }
1969
+ });
1970
+ if (BUILD.initializeNextTick) nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
1971
+ else initializeComponent(elm, hostRef, cmpMeta);
1972
+ } else if (hostRef == null ? void 0 : hostRef.$lazyInstance$);
1973
+ else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1974
+ endConnected();
1975
+ }
1976
+ };
1977
+ var disconnectedCallback = async (elm) => {
1978
+ if ((plt.$flags$ & 1) === 0) getHostRef(elm);
1979
+ if (rootAppliedStyles.has(elm)) rootAppliedStyles.delete(elm);
1980
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) rootAppliedStyles.delete(elm.shadowRoot);
1981
+ };
1982
+ var proxyCustomElement = (Cstr, compactMeta) => {
1983
+ const cmpMeta = {
1984
+ $flags$: compactMeta[0],
1985
+ $tagName$: compactMeta[1]
1986
+ };
1987
+ cmpMeta.$members$ = compactMeta[2];
1988
+ cmpMeta.$watchers$ = Cstr.$watchers$;
1989
+ cmpMeta.$attrsToReflect$ = [];
1990
+ const originalConnectedCallback = Cstr.prototype.connectedCallback;
1991
+ const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1992
+ Object.assign(Cstr.prototype, {
1993
+ __hasHostListenerAttached: false,
1994
+ __registerHost() {
1995
+ registerHost(this, cmpMeta);
1996
+ },
1997
+ connectedCallback() {
1998
+ if (!this.__hasHostListenerAttached) {
1999
+ getHostRef(this);
2000
+ this.__hasHostListenerAttached = true;
2001
+ }
2002
+ connectedCallback(this);
2003
+ if (originalConnectedCallback) originalConnectedCallback.call(this);
2004
+ },
2005
+ disconnectedCallback() {
2006
+ disconnectedCallback(this);
2007
+ if (originalDisconnectedCallback) originalDisconnectedCallback.call(this);
2008
+ },
2009
+ __attachShadow() {
2010
+ if (!this.shadowRoot) createShadowRoot.call(this, cmpMeta);
2011
+ else if (this.shadowRoot.mode !== "open") throw new Error(`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`);
2012
+ }
2013
+ });
2014
+ Cstr.is = cmpMeta.$tagName$;
2015
+ return proxyComponent(Cstr, cmpMeta);
2016
+ };
2017
+ var CACHED_MAP$1;
2018
+ var getIconMap$1 = () => {
2019
+ if (typeof window === "undefined") return /* @__PURE__ */ new Map();
2020
+ else {
2021
+ if (!CACHED_MAP$1) {
2022
+ const win = window;
2023
+ win.Ionicons = win.Ionicons || {};
2024
+ CACHED_MAP$1 = win.Ionicons.map = win.Ionicons.map || /* @__PURE__ */ new Map();
2025
+ }
2026
+ return CACHED_MAP$1;
2027
+ }
2028
+ };
2029
+ var getUrl = (i) => {
2030
+ let url = getSrc(i.src);
2031
+ if (url) return url;
2032
+ url = getName(i.name, i.icon, i.mode, i.ios, i.md);
2033
+ if (url) return getNamedUrl(url, i);
2034
+ if (i.icon) {
2035
+ url = getSrc(i.icon);
2036
+ if (url) return url;
2037
+ url = getSrc(i.icon[i.mode]);
2038
+ if (url) return url;
2039
+ }
2040
+ return null;
2041
+ };
2042
+ var getNamedUrl = (iconName, iconEl) => {
2043
+ const url = getIconMap$1().get(iconName);
2044
+ if (url) return url;
2045
+ try {
2046
+ return getAssetPath(`svg/${iconName}.svg`);
2047
+ } catch (e) {
2048
+ console.log("e", e);
2049
+ /**
2050
+ * In the custom elements build version of ionicons, referencing an icon
2051
+ * by name will throw an invalid URL error because the asset path is not defined.
2052
+ * This catches that error and logs something that is more developer-friendly.
2053
+ * We also include a reference to the ion-icon element so developers can
2054
+ * figure out which instance of ion-icon needs to be updated.
2055
+ */
2056
+ console.warn(`[Ionicons Warning]: Could not load icon with name "${iconName}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`, iconEl);
2057
+ }
2058
+ };
2059
+ var getName = (iconName, icon, mode, ios, md) => {
2060
+ mode = (mode && toLower(mode)) === "ios" ? "ios" : "md";
2061
+ if (ios && mode === "ios") iconName = toLower(ios);
2062
+ else if (md && mode === "md") iconName = toLower(md);
2063
+ else {
2064
+ if (!iconName && icon && !isSrc(icon)) iconName = icon;
2065
+ if (isStr(iconName)) iconName = toLower(iconName);
2066
+ }
2067
+ if (!isStr(iconName) || iconName.trim() === "") return null;
2068
+ if (iconName.replace(/[a-z]|-|\d/gi, "") !== "") return null;
2069
+ return iconName;
2070
+ };
2071
+ var getSrc = (src) => {
2072
+ if (isStr(src)) {
2073
+ src = src.trim();
2074
+ if (isSrc(src)) return src;
2075
+ }
2076
+ return null;
2077
+ };
2078
+ var isSrc = (str) => str.length > 0 && /(\/|\.)/.test(str);
2079
+ var isStr = (val) => typeof val === "string";
2080
+ var toLower = (val) => val.toLowerCase();
2081
+ /**
2082
+ * Elements inside of web components sometimes need to inherit global attributes
2083
+ * set on the host. For example, the inner input in `ion-input` should inherit
2084
+ * the `title` attribute that developers set directly on `ion-input`. This
2085
+ * helper function should be called in componentWillLoad and assigned to a variable
2086
+ * that is later used in the render function.
2087
+ *
2088
+ * This does not need to be reactive as changing attributes on the host element
2089
+ * does not trigger a re-render.
2090
+ */
2091
+ var inheritAttributes = (el, attributes = []) => {
2092
+ const attributeObject = {};
2093
+ attributes.forEach((attr) => {
2094
+ if (el.hasAttribute(attr)) {
2095
+ if (el.getAttribute(attr) !== null) attributeObject[attr] = el.getAttribute(attr);
2096
+ el.removeAttribute(attr);
2097
+ }
2098
+ });
2099
+ return attributeObject;
2100
+ };
2101
+ /**
2102
+ * Returns `true` if the document or host element
2103
+ * has a `dir` set to `rtl`. The host value will always
2104
+ * take priority over the root document value.
2105
+ */
2106
+ var isRTL = (hostEl) => {
2107
+ if (hostEl) {
2108
+ if (hostEl.dir !== "") return hostEl.dir.toLowerCase() === "rtl";
2109
+ }
2110
+ return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === "rtl";
2111
+ };
2112
+ //#endregion
2113
+ //#region node_modules/ionicons/components/ion-icon.js
2114
+ var validateContent = (svgContent) => {
2115
+ const div = document.createElement("div");
2116
+ div.innerHTML = svgContent;
2117
+ for (let i = div.childNodes.length - 1; i >= 0; i--) if (div.childNodes[i].nodeName.toLowerCase() !== "svg") div.removeChild(div.childNodes[i]);
2118
+ const svgElm = div.firstElementChild;
2119
+ if (svgElm && svgElm.nodeName.toLowerCase() === "svg") {
2120
+ const svgClass = svgElm.getAttribute("class") || "";
2121
+ svgElm.setAttribute("class", (svgClass + " s-ion-icon").trim());
2122
+ if (isValid(svgElm)) return div.innerHTML;
2123
+ }
2124
+ return "";
2125
+ };
2126
+ var isValid = (elm) => {
2127
+ if (elm.nodeType === 1) {
2128
+ if (elm.nodeName.toLowerCase() === "script") return false;
2129
+ for (let i = 0; i < elm.attributes.length; i++) {
2130
+ const name = elm.attributes[i].name;
2131
+ if (isStr(name) && name.toLowerCase().indexOf("on") === 0) return false;
2132
+ }
2133
+ for (let i = 0; i < elm.childNodes.length; i++) if (!isValid(elm.childNodes[i])) return false;
2134
+ }
2135
+ return true;
2136
+ };
2137
+ var isSvgDataUrl = (url) => url.startsWith("data:image/svg+xml");
2138
+ var isEncodedDataUrl = (url) => url.indexOf(";utf8,") !== -1;
2139
+ var ioniconContent = /* @__PURE__ */ new Map();
2140
+ var requests = /* @__PURE__ */ new Map();
2141
+ var parser;
2142
+ /**
2143
+ * Safely fallback to an empty svg
2144
+ */
2145
+ function safeFallback(url) {
2146
+ const svg = "";
2147
+ ioniconContent.set(url, svg);
2148
+ return svg;
2149
+ }
2150
+ var getSvgContent = (url, sanitize) => {
2151
+ /**
2152
+ * See if we already have a request for this url
2153
+ */
2154
+ const req = requests.get(url);
2155
+ if (req) return req;
2156
+ if (typeof fetch !== "undefined" && typeof document !== "undefined") {
2157
+ /**
2158
+ * If the url is a data url of an svg, then try to parse it
2159
+ * with the DOMParser. This works with content security policies enabled.
2160
+ */
2161
+ if (isSvgDataUrl(url) && isEncodedDataUrl(url)) return Promise.resolve(getSvgByUrl(url));
2162
+ return fetchSvg(url, sanitize);
2163
+ }
2164
+ return Promise.resolve(safeFallback(url));
2165
+ };
2166
+ function getSvgByUrl(url) {
2167
+ if (!parser)
2168
+ /**
2169
+ * Create an instance of the DOM parser. This creates a single
2170
+ * parser instance for the entire app, which is more efficient.
2171
+ */
2172
+ parser = new DOMParser();
2173
+ const svg = parser.parseFromString(url, "text/html").querySelector("svg");
2174
+ if (svg) {
2175
+ ioniconContent.set(url, svg.outerHTML);
2176
+ return svg.outerHTML;
2177
+ }
2178
+ throw new Error(`Could not parse svg from ${url}`);
2179
+ }
2180
+ function fetchSvg(url, sanitize) {
2181
+ /**
2182
+ * We don't already have a request
2183
+ */
2184
+ const req = fetch(url).then((rsp) => {
2185
+ /**
2186
+ * When fetching from a file:// URL, some browsers return
2187
+ * a 0 status code even when the request succeeds so don't
2188
+ * rely on rsp.ok as the only signal of success.
2189
+ */
2190
+ return rsp.text().then((svgContent) => {
2191
+ if (svgContent && sanitize !== false) svgContent = validateContent(svgContent);
2192
+ const svg = svgContent || "";
2193
+ ioniconContent.set(url, svg);
2194
+ return svg;
2195
+ }).catch(() => safeFallback(url));
2196
+ }).catch(() => safeFallback(url));
2197
+ /**
2198
+ * Cache for the same requests
2199
+ */
2200
+ requests.set(url, req);
2201
+ return req;
2202
+ }
2203
+ var iconCss = ":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";
2204
+ var Icon = /* @__PURE__ */ proxyCustomElement(class Icon extends H {
2205
+ constructor() {
2206
+ super();
2207
+ this.__registerHost();
2208
+ this.__attachShadow();
2209
+ this.iconName = null;
2210
+ this.inheritedAttributes = {};
2211
+ this.didLoadIcon = false;
2212
+ this.isVisible = false;
2213
+ /**
2214
+ * The mode determines which platform styles to use.
2215
+ */
2216
+ this.mode = getIonMode();
2217
+ /**
2218
+ * If enabled, ion-icon will be loaded lazily when it's visible in the viewport.
2219
+ * Default, `false`.
2220
+ */
2221
+ this.lazy = false;
2222
+ /**
2223
+ * When set to `false`, SVG content that is HTTP fetched will not be checked
2224
+ * if the response SVG content has any `<script>` elements, or any attributes
2225
+ * that start with `on`, such as `onclick`.
2226
+ * @default true
2227
+ */
2228
+ this.sanitize = true;
2229
+ }
2230
+ componentWillLoad() {
2231
+ this.inheritedAttributes = inheritAttributes(this.el, ["aria-label"]);
2232
+ }
2233
+ connectedCallback() {
2234
+ /**
2235
+ * purposely do not return the promise here because loading
2236
+ * the svg file should not hold up loading the app
2237
+ * only load the svg if it's visible
2238
+ */
2239
+ this.waitUntilVisible(this.el, "50px", () => {
2240
+ this.isVisible = true;
2241
+ this.loadIcon();
2242
+ });
2243
+ }
2244
+ /**
2245
+ * Loads the icon after the component has finished rendering.
2246
+ */
2247
+ componentDidLoad() {
2248
+ /**
2249
+ * Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.
2250
+ * This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.
2251
+ * This modification pertains to the usage of Angular's binding syntax:
2252
+ * `<ion-icon [name]="myIconName"></ion-icon>`
2253
+ */
2254
+ if (!this.didLoadIcon) this.loadIcon();
2255
+ }
2256
+ /**
2257
+ * Disconnect the IntersectionObserver.
2258
+ */
2259
+ disconnectedCallback() {
2260
+ if (this.io) {
2261
+ this.io.disconnect();
2262
+ this.io = void 0;
2263
+ }
2264
+ }
2265
+ /**
2266
+ * Wait until the icon is visible in the viewport.
2267
+ * @param el - The element to observe.
2268
+ * @param rootMargin - The root margin of the observer.
2269
+ * @param cb - The callback to call when the element is visible.
2270
+ */
2271
+ waitUntilVisible(el, rootMargin, cb) {
2272
+ /**
2273
+ * browser doesn't support IntersectionObserver
2274
+ * so just fallback to always show it
2275
+ */
2276
+ if (!Boolean(this.lazy && typeof window !== "undefined" && window.IntersectionObserver)) return cb();
2277
+ const io = this.io = new window.IntersectionObserver((data) => {
2278
+ if (data[0].isIntersecting) {
2279
+ io.disconnect();
2280
+ this.io = void 0;
2281
+ cb();
2282
+ }
2283
+ }, { rootMargin });
2284
+ io.observe(el);
2285
+ }
2286
+ /**
2287
+ * Watch for changes to the icon name, src, icon, ios, or md properties.
2288
+ * When a change is detected, the icon will be loaded.
2289
+ */
2290
+ loadIcon() {
2291
+ if (this.isVisible) {
2292
+ const url = getUrl(this);
2293
+ if (url) {
2294
+ if (ioniconContent.has(url)) this.svgContent = ioniconContent.get(url);
2295
+ else getSvgContent(url, this.sanitize).then(() => this.svgContent = ioniconContent.get(url));
2296
+ this.didLoadIcon = true;
2297
+ }
2298
+ }
2299
+ this.iconName = getName(this.name, this.icon, this.mode, this.ios, this.md);
2300
+ }
2301
+ render() {
2302
+ const { flipRtl, iconName, inheritedAttributes, el } = this;
2303
+ const mode = this.mode || "md";
2304
+ /**
2305
+ * we have designated that arrows & chevrons should automatically flip (unless flip-rtl
2306
+ * is set to false) because "back" is left in ltr and right in rtl, and "forward" is the opposite
2307
+ */
2308
+ const shouldAutoFlip = iconName ? (iconName.includes("arrow") || iconName.includes("chevron")) && flipRtl !== false : false;
2309
+ /**
2310
+ * if shouldBeFlippable is true, the icon should change direction when `dir` changes
2311
+ */
2312
+ const shouldBeFlippable = flipRtl || shouldAutoFlip;
2313
+ return h(Host, Object.assign({
2314
+ key: "0578c899781ca145dd8205acd9670af39b57cf2e",
2315
+ role: "img",
2316
+ class: Object.assign(Object.assign({ [mode]: true }, createColorClasses(this.color)), {
2317
+ [`icon-${this.size}`]: !!this.size,
2318
+ "flip-rtl": shouldBeFlippable,
2319
+ "icon-rtl": shouldBeFlippable && isRTL(el)
2320
+ })
2321
+ }, inheritedAttributes), this.svgContent ? h("div", {
2322
+ class: "icon-inner",
2323
+ innerHTML: this.svgContent
2324
+ }) : h("div", { class: "icon-inner" }));
2325
+ }
2326
+ static get assetsDirs() {
2327
+ return ["svg"];
2328
+ }
2329
+ get el() {
2330
+ return this;
2331
+ }
2332
+ static get watchers() {
2333
+ return {
2334
+ "name": ["loadIcon"],
2335
+ "src": ["loadIcon"],
2336
+ "icon": ["loadIcon"],
2337
+ "ios": ["loadIcon"],
2338
+ "md": ["loadIcon"]
2339
+ };
2340
+ }
2341
+ static get style() {
2342
+ return iconCss;
2343
+ }
2344
+ }, [
2345
+ 1,
2346
+ "ion-icon",
2347
+ {
2348
+ "mode": [1025],
2349
+ "color": [1],
2350
+ "ios": [1],
2351
+ "md": [1],
2352
+ "flipRtl": [4, "flip-rtl"],
2353
+ "name": [513],
2354
+ "src": [1],
2355
+ "icon": [8],
2356
+ "size": [1],
2357
+ "lazy": [4],
2358
+ "sanitize": [4],
2359
+ "svgContent": [32],
2360
+ "isVisible": [32]
2361
+ },
2362
+ void 0,
2363
+ {
2364
+ "name": ["loadIcon"],
2365
+ "src": ["loadIcon"],
2366
+ "icon": ["loadIcon"],
2367
+ "ios": ["loadIcon"],
2368
+ "md": ["loadIcon"]
2369
+ }
2370
+ ]);
2371
+ /**
2372
+ * Get the mode of the document.
2373
+ * @returns The mode of the document.
2374
+ */
2375
+ var getIonMode = () => typeof document !== "undefined" && document.documentElement.getAttribute("mode") || "md";
2376
+ /**
2377
+ * Create color classes for the icon.
2378
+ * @param color - The color of the icon.
2379
+ * @returns The color classes for the icon.
2380
+ */
2381
+ var createColorClasses = (color) => {
2382
+ return color ? {
2383
+ "ion-color": true,
2384
+ [`ion-color-${color}`]: true
2385
+ } : null;
2386
+ };
2387
+ function defineCustomElement$1() {
2388
+ if (typeof customElements === "undefined") return;
2389
+ ["ion-icon"].forEach((tagName) => {
2390
+ switch (tagName) {
2391
+ case "ion-icon":
2392
+ if (!customElements.get(tagName)) customElements.define(tagName, Icon);
2393
+ break;
2394
+ }
2395
+ });
2396
+ }
2397
+ var defineCustomElement = defineCustomElement$1;
2398
+ //#endregion
2399
+ //#region node_modules/ionicons/dist/esm/index-RzboMlQJ.js
2400
+ var CACHED_MAP;
2401
+ var getIconMap = () => {
2402
+ if (typeof window === "undefined") return /* @__PURE__ */ new Map();
2403
+ else {
2404
+ if (!CACHED_MAP) {
2405
+ const win = window;
2406
+ win.Ionicons = win.Ionicons || {};
2407
+ CACHED_MAP = win.Ionicons.map = win.Ionicons.map || /* @__PURE__ */ new Map();
2408
+ }
2409
+ return CACHED_MAP;
2410
+ }
2411
+ };
2412
+ var addIcons = (icons) => {
2413
+ Object.keys(icons).forEach((name) => {
2414
+ addToIconMap(name, icons[name]);
2415
+ /**
2416
+ * Developers can also pass in the SVG object directly
2417
+ * and Ionicons can map the object to a kebab case name.
2418
+ * Example: addIcons({ addCircleOutline });
2419
+ * This will create an "addCircleOutline" entry and
2420
+ * an "add-circle-outline" entry.
2421
+ * Usage: <ion-icon name="add-circle-outline"></ion-icon>
2422
+ * Using name="addCircleOutline" is valid too, but the
2423
+ * kebab case naming is preferred.
2424
+ */
2425
+ const toKebabCase = name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z0-9])/g, "$1-$2").toLowerCase();
2426
+ if (name !== toKebabCase) addToIconMap(toKebabCase, icons[name]);
2427
+ });
2428
+ };
2429
+ var addToIconMap = (name, data) => {
2430
+ const map = getIconMap();
2431
+ const existingIcon = map.get(name);
2432
+ if (existingIcon === void 0) map.set(name, data);
2433
+ else if (existingIcon !== data) console.warn(`[Ionicons Warning]: Multiple icons were mapped to name "${name}". Ensure that multiple icons are not mapped to the same icon name.`);
2434
+ };
2435
+ //#endregion
2436
+ //#region node_modules/ionicons/icons/index.mjs
2437
+ var arrowBack = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M244 400 100 256l144-144M120 256h292' stroke-linecap='round' stroke-linejoin='round' stroke-width='48px' class='ionicon-fill-none'/></svg>";
2438
+ var arrowBackSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M244 400 100 256l144-144M120 256h292' stroke-linecap='square' stroke-miterlimit='10' stroke-width='48px' class='ionicon-fill-none'/></svg>";
2439
+ var chevronBack = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M328 112 184 256l144 144' stroke-linecap='round' stroke-linejoin='round' stroke-width='48px' class='ionicon-fill-none'/></svg>";
2440
+ var chevronBackSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M328 112 184 256l144 144' stroke-linecap='square' stroke-miterlimit='10' stroke-width='48px' class='ionicon-fill-none'/></svg>";
2441
+ //#endregion
2442
+ //#region src/setup.ts
2443
+ var isInitialized = false;
2444
+ /**
2445
+ * Initialize Ionic Core for Nix.js.
2446
+ *
2447
+ * By default only the **minimal** components needed for routing are registered
2448
+ * (ion-app, ion-router, ion-route, ion-router-outlet, ion-back-button, ion-icon).
2449
+ *
2450
+ * Pass additional components via `options.components` to register only what you use:
2451
+ *
2452
+ * ```ts
2453
+ * import { setupNixIonic } from "@deijose/nix-ionic";
2454
+ * import { layoutComponents } from "@deijose/nix-ionic/bundles/layout";
2455
+ * import { defineIonButton } from "@deijose/nix-ionic/components";
2456
+ *
2457
+ * setupNixIonic({
2458
+ * components: [...layoutComponents, defineIonButton],
2459
+ * });
2460
+ * ```
2461
+ */
2462
+ function setupNixIonic(options = {}) {
2463
+ if (isInitialized) return;
2464
+ const assetPath = options.iconAssetPath || "https://unpkg.com/ionicons@latest/dist/ionicons/svg/";
2465
+ window.ionicons = { assets: assetPath };
2466
+ y$3();
2467
+ const coreComponents = [
2468
+ l$4,
2469
+ L,
2470
+ p$3,
2471
+ f$3,
2472
+ v,
2473
+ defineCustomElement
2474
+ ];
2475
+ for (let i = 0; i < coreComponents.length; i++) {
2476
+ const def = coreComponents[i];
2477
+ def();
2478
+ }
2479
+ if (options.components) for (let i = 0; i < options.components.length; i++) {
2480
+ const def = options.components[i];
2481
+ def();
2482
+ }
2483
+ addIcons({
2484
+ "arrow-back": arrowBack,
2485
+ "arrow-back-sharp": arrowBackSharp,
2486
+ "chevron-back": chevronBack,
2487
+ "chevron-back-sharp": chevronBackSharp
2488
+ });
2489
+ isInitialized = true;
2490
+ }
2491
+ //#endregion
2492
+ //#region src/IonRouterOutlet.ts
2493
+ function useRouter() {
2494
+ return {
2495
+ navigate: (path, direction = "forward") => {
2496
+ const router = document.querySelector("ion-router");
2497
+ if (router && typeof router.push === "function") router.push(path, direction);
2498
+ },
2499
+ replace: (path) => {
2500
+ const router = document.querySelector("ion-router");
2501
+ if (router && typeof router.push === "function") router.push(path, "root");
2502
+ },
2503
+ back: () => {
2504
+ const router = document.querySelector("ion-router");
2505
+ if (router && typeof router.back === "function") router.back();
2506
+ }
2507
+ };
2508
+ }
2509
+ function IonBackButton(defaultHref = "/") {
2510
+ return {
2511
+ __isNixTemplate: true,
2512
+ mount(container) {
2513
+ const el = typeof container === "string" ? document.querySelector(container) : container;
2514
+ return { unmount: this._render(el, null) };
2515
+ },
2516
+ _render(parent, before) {
2517
+ const btn = document.createElement("ion-back-button");
2518
+ if (defaultHref) btn.setAttribute("default-href", defaultHref);
2519
+ parent.insertBefore(btn, before);
2520
+ return () => btn.remove();
2521
+ }
2522
+ };
2523
+ }
2524
+ var IonRouterOutlet = class extends NixComponent {
2525
+ routes;
2526
+ constructor(routes) {
2527
+ super();
2528
+ this.routes = routes;
2529
+ }
2530
+ _pathToRouteId(path) {
2531
+ if (!path || path === "/") return "nix-route-home";
2532
+ return `nix-route-${path.replace(/\/:?[^/]+/g, (m) => "-" + m.replace(/\//g, "").replace(/:/g, "")).replace(/^\//, "").replace(/\//g, "-")}`;
2533
+ }
2534
+ render() {
2535
+ const self = this;
2536
+ return {
2537
+ __isNixTemplate: true,
2538
+ mount(container) {
2539
+ const el = typeof container === "string" ? document.querySelector(container) : container;
2540
+ return { unmount: this._render(el, null) };
2541
+ },
2542
+ _render(parent, before) {
2543
+ const routerEl = document.createElement("ion-router");
2544
+ routerEl.setAttribute("use-hash", "false");
2545
+ self.routes.filter((r) => r.path !== "*").forEach((r) => {
2546
+ const routeEl = document.createElement("ion-route");
2547
+ routeEl.setAttribute("url", r.path);
2548
+ routeEl.setAttribute("component", self._pathToRouteId(r.path));
2549
+ routerEl.appendChild(routeEl);
2550
+ });
2551
+ const outletEl = document.createElement("ion-router-outlet");
2552
+ outletEl.delegate = {
2553
+ attachViewToDom: async (container, componentTag, props, classes) => {
2554
+ const routeDef = self.routes.find((r) => self._pathToRouteId(r.path) === componentTag);
2555
+ const pageEl = document.createElement("ion-page");
2556
+ pageEl.classList.add("ion-page");
2557
+ if (classes && classes.length) pageEl.classList.add(...classes);
2558
+ const lc = createPageLifecycle();
2559
+ pageEl.addEventListener("ionViewWillEnter", () => lc.willEnter.update((n) => n + 1));
2560
+ pageEl.addEventListener("ionViewDidEnter", () => lc.didEnter.update((n) => n + 1));
2561
+ pageEl.addEventListener("ionViewWillLeave", () => lc.willLeave.update((n) => n + 1));
2562
+ pageEl.addEventListener("ionViewDidLeave", () => lc.didLeave.update((n) => n + 1));
2563
+ if (routeDef) {
2564
+ const params = props || {};
2565
+ const pageNode = routeDef.component({
2566
+ lc,
2567
+ params
2568
+ });
2569
+ if ("render" in pageNode && typeof pageNode.render === "function") {
2570
+ const comp = pageNode;
2571
+ comp.onInit?.();
2572
+ const renderCleanup = comp.render()._render(pageEl, null);
2573
+ const mountRet = comp.onMount?.();
2574
+ pageEl._nixCleanup = () => {
2575
+ comp.onUnmount?.();
2576
+ if (typeof mountRet === "function") mountRet();
2577
+ renderCleanup();
2578
+ };
2579
+ } else pageEl._nixCleanup = pageNode._render(pageEl, null);
2580
+ }
2581
+ container.appendChild(pageEl);
2582
+ return pageEl;
2583
+ },
2584
+ removeViewFromDom: async (_container, component) => {
2585
+ if (component._nixCleanup) component._nixCleanup();
2586
+ component.remove();
2587
+ }
2588
+ };
2589
+ parent.insertBefore(routerEl, before);
2590
+ parent.insertBefore(outletEl, before);
2591
+ return () => {
2592
+ routerEl.remove();
2593
+ outletEl.remove();
2594
+ };
2595
+ }
2596
+ };
2597
+ }
2598
+ };
2599
+ //#endregion
2600
+ export { IonBackButton, IonPage, IonRouterOutlet, createPageLifecycle, setupNixIonic, useIonViewDidEnter, useIonViewDidLeave, useIonViewWillEnter, useIonViewWillLeave, useRouter };
2601
+
2602
+ //# sourceMappingURL=index.js.map