@myop/vue 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent as Q, useSlots as X, computed as y, createElementBlock as A, openBlock as b, normalizeStyle as W, renderSlot as M, unref as ge, ref as p, shallowRef as lt, watch as ae, onMounted as Re, onUnmounted as at, createElementVNode as $e, createBlock as ke, createCommentVNode as pe, withCtx as Ve, markRaw as Ie, useAttrs as ct, getCurrentInstance as ut, reactive as ft, watchEffect as pt, Fragment as dt, mergeProps as mt } from "vue";
2
- import { containerStyleObject as ht, loaderStyleObject as gt, getMyopLogoHtml as xe, fallbackStyleObject as yt, hostSDK as Te } from "@myop/sdk/host";
1
+ import { defineComponent as Q, useSlots as X, computed as y, createElementBlock as A, openBlock as b, normalizeStyle as W, renderSlot as M, unref as he, ref as d, shallowRef as it, watch as le, onMounted as Fe, onUnmounted as lt, createElementVNode as Re, createBlock as Oe, createCommentVNode as fe, withCtx as ke, markRaw as Ve, useAttrs as at, getCurrentInstance as ct, reactive as ut, watchEffect as ft, Fragment as pt, mergeProps as dt } from "vue";
2
+ import { containerStyleObject as mt, loaderStyleObject as ht, getMyopLogoHtml as $e, fallbackStyleObject as gt, hostSDK as xe } from "@myop/sdk/host";
3
3
  import { CloudRepository as Z } from "@myop/sdk/helpers";
4
- const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
4
+ const yt = ["innerHTML"], _t = /* @__PURE__ */ Q({
5
5
  __name: "MyopLoader",
6
6
  props: {
7
7
  opacity: { default: 1 },
@@ -14,14 +14,14 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
14
14
  const c = l();
15
15
  return o(c);
16
16
  }), r = y(() => ({
17
- ...ht,
17
+ ...mt,
18
18
  opacity: t.opacity,
19
19
  transition: `opacity ${t.fadeDuration}ms ease-out`
20
20
  })), i = y(() => ({
21
- ...gt,
21
+ ...ht,
22
22
  opacity: t.opacity,
23
23
  transition: `opacity ${t.fadeDuration}ms ease-out`
24
- })), a = xe();
24
+ })), a = $e();
25
25
  return (l, c) => s.value ? (b(), A("div", {
26
26
  key: 0,
27
27
  style: W(r.value)
@@ -30,10 +30,10 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
30
30
  ], 4)) : (b(), A("div", {
31
31
  key: 1,
32
32
  style: W(i.value),
33
- innerHTML: ge(a)
34
- }, null, 12, _t));
33
+ innerHTML: he(a)
34
+ }, null, 12, yt));
35
35
  }
36
- }), vt = ["innerHTML"], Et = /* @__PURE__ */ Q({
36
+ }), Ct = ["innerHTML"], Et = /* @__PURE__ */ Q({
37
37
  __name: "MyopFallback",
38
38
  setup(e) {
39
39
  const t = X(), n = (a) => !a || a.length === 0 ? !1 : a.some((l) => typeof l.children == "string" ? l.children.trim() !== "" : Array.isArray(l.children) ? n(l.children) : !!(l.type && typeof l.type != "symbol" || l.children)), o = y(() => {
@@ -48,8 +48,8 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
48
48
  right: "0",
49
49
  bottom: "0"
50
50
  }, r = {
51
- ...yt
52
- }, i = xe();
51
+ ...gt
52
+ }, i = $e();
53
53
  return (a, l) => o.value ? (b(), A("div", {
54
54
  key: 0,
55
55
  style: s
@@ -58,8 +58,8 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
58
58
  ])) : (b(), A("div", {
59
59
  key: 1,
60
60
  style: r,
61
- innerHTML: ge(i)
62
- }, null, 8, vt));
61
+ innerHTML: he(i)
62
+ }, null, 8, Ct));
63
63
  }
64
64
  }), En = /* @__PURE__ */ Q({
65
65
  name: "MyopComponent",
@@ -88,15 +88,15 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
88
88
  const f = u();
89
89
  return s(f);
90
90
  });
91
- const i = e, a = n, l = p(null), c = lt(null), d = i.componentId ? yn(i.componentId) : !1, g = p(!d), V = p(1), E = p(!1), F = p(!1), I = p(void 0), oe = p(!1), P = p(null), re = p(!1);
91
+ const i = e, a = n, l = d(null), c = it(null), p = i.componentId ? gn(i.componentId) : !1, g = d(!p), V = d(1), v = d(!1), F = d(!1), I = d(void 0), oe = d(!1), P = d(null);
92
92
  let R = null;
93
- const se = () => {
93
+ const re = () => {
94
94
  V.value = 0, setTimeout(() => {
95
95
  g.value = !1;
96
96
  }, i.fadeDuration);
97
- }, ie = (u) => {
98
- console.error("[MyopComponent] Error:", u), se(), E.value = !0, a("error", u);
99
- }, le = async (u) => {
97
+ }, se = (u) => {
98
+ console.error("[MyopComponent] Error:", u), re(), v.value = !0, a("error", u);
99
+ }, ie = async (u) => {
100
100
  var N, L;
101
101
  oe.value = !0;
102
102
  let f = !1;
@@ -109,33 +109,33 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
109
109
  autoSize: u.autoSize
110
110
  }));
111
111
  if (!m.componentId && !u.componentConfig) {
112
- ie("No component configuration provided");
112
+ se("No component configuration provided");
113
113
  return;
114
114
  }
115
- const rt = m.preview === !0 ? !0 : void 0, st = u.componentConfig ? JSON.parse(JSON.stringify(u.componentConfig)) : await gn().fetchComponentV2(
115
+ const ot = m.preview === !0 ? !0 : void 0, rt = u.componentConfig ? JSON.parse(JSON.stringify(u.componentConfig)) : await hn().fetchComponentV2(
116
116
  m.componentId,
117
117
  m.environment,
118
- rt
118
+ ot
119
119
  );
120
120
  if (!l.value) {
121
- ie("Container element not found");
121
+ se("Container element not found");
122
122
  return;
123
123
  }
124
- const it = Ie({
124
+ const st = Ve({
125
125
  data: m.data,
126
126
  _environment: {
127
127
  props: m
128
128
  }
129
- }), we = await Te.loadComponent(
130
- st,
129
+ }), be = await xe.loadComponent(
130
+ rt,
131
131
  l.value,
132
- it
132
+ st
133
133
  );
134
134
  if (f) {
135
- we.dispose();
135
+ be.dispose();
136
136
  return;
137
137
  }
138
- if (c.value = Ie(we), await c.value.initiated(), f) {
138
+ if (c.value = Ve(be), await c.value.initiated(), f) {
139
139
  (N = c.value) == null || N.dispose();
140
140
  return;
141
141
  }
@@ -143,21 +143,21 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
143
143
  c.value && !c.value.markedForDisposed && c.value.dispose();
144
144
  return;
145
145
  }
146
- F.value = !0, i.autoSize || se(), (L = c.value) != null && L.props && (c.value.props.myop_cta_handler = (j, Oe) => {
147
- i.on && i.on(j, Oe), a("cta", j, Oe);
146
+ F.value = !0, i.autoSize || re(), (L = c.value) != null && L.props && (c.value.props.myop_cta_handler = (j, we) => {
147
+ i.on && i.on(j, we), a("cta", j, we);
148
148
  }), a("load", c.value);
149
149
  } catch (m) {
150
- f || ie((m == null ? void 0 : m.message) || "Unknown error");
150
+ f || se((m == null ? void 0 : m.message) || "Unknown error");
151
151
  } finally {
152
152
  if (oe.value = !1, P.value !== null && !f) {
153
153
  const m = P.value;
154
- P.value = null, await le(m);
154
+ P.value = null, await ie(m);
155
155
  }
156
156
  }
157
157
  return () => {
158
158
  f = !0;
159
159
  };
160
- }, tt = () => {
160
+ }, et = () => {
161
161
  var f;
162
162
  if (!F.value || !((f = c.value) != null && f.observeAutoSize))
163
163
  return;
@@ -168,24 +168,20 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
168
168
  forceAutoSize: i.autoSize,
169
169
  loaderMinHeight: 50,
170
170
  onSizeChange: (N) => {
171
- a("sizeChange", N), I.value = N, u && (u = !1, se());
171
+ a("sizeChange", N), I.value = N, u && (u = !1, re());
172
172
  }
173
173
  });
174
174
  };
175
- ae(
175
+ le(
176
176
  () => i.componentId,
177
177
  async (u, f) => {
178
- u !== f && (re.value = !1, F.value = !1, E.value = !1, g.value = !0, V.value = 1, c.value && (c.value.dispose(), c.value = null), R && (R(), R = null), oe.value ? P.value = { ...i } : await le(i));
178
+ u !== f && (F.value = !1, v.value = !1, g.value = !0, V.value = 1, c.value && (c.value.dispose(), c.value = null), R && (R(), R = null), oe.value ? P.value = { ...i } : await ie(i));
179
179
  }
180
- ), ae(
180
+ ), le(
181
181
  () => i.data,
182
182
  (u) => {
183
183
  var f;
184
184
  if (F.value && u !== void 0 && c.value) {
185
- if (!re.value) {
186
- re.value = !0;
187
- return;
188
- }
189
185
  const N = (f = c.value.props) == null ? void 0 : f.myop_init_interface;
190
186
  if (N) {
191
187
  const L = JSON.parse(JSON.stringify(u));
@@ -194,62 +190,62 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
194
190
  }
195
191
  },
196
192
  { deep: !0 }
197
- ), ae(
193
+ ), le(
198
194
  () => F.value,
199
195
  (u) => {
200
- u && i.autoSize && tt();
196
+ u && i.autoSize && et();
201
197
  }
202
- ), Re(async () => {
203
- (i.componentId || i.componentConfig) && await le(i);
204
- }), at(() => {
198
+ ), Fe(async () => {
199
+ (i.componentId || i.componentConfig) && await ie(i);
200
+ }), lt(() => {
205
201
  R && R(), c.value && c.value.dispose();
206
202
  });
207
- const Se = y(
203
+ const Ne = y(
208
204
  () => {
209
205
  var u, f;
210
206
  return ((u = I.value) == null ? void 0 : u.autoSizingWidth) || ((f = I.value) == null ? void 0 : f.autoSizingHeight);
211
207
  }
212
- ), be = y(() => g.value ? 50 : void 0), nt = y(() => {
208
+ ), Se = y(() => g.value ? 50 : void 0), tt = y(() => {
213
209
  var u, f;
214
210
  return {
215
211
  position: "relative",
216
212
  width: (u = I.value) != null && u.autoSizingWidth ? `${I.value.width}px` : "100%",
217
213
  height: (f = I.value) != null && f.autoSizingHeight ? `${I.value.height}px` : "100%",
218
- minHeight: be.value ? `${be.value}px` : void 0,
219
- overflow: Se.value ? "hidden" : "inherit"
214
+ minHeight: Se.value ? `${Se.value}px` : void 0,
215
+ overflow: Ne.value ? "hidden" : "inherit"
220
216
  };
221
- }), ot = y(() => ({
217
+ }), nt = y(() => ({
222
218
  position: "absolute",
223
219
  inset: "0",
224
- overflow: Se.value ? "hidden" : void 0
220
+ overflow: Ne.value ? "hidden" : void 0
225
221
  }));
226
222
  return t({
227
223
  myopComponent: c,
228
224
  isLoaded: F
229
225
  }), (u, f) => (b(), A("div", {
230
- style: W(nt.value)
226
+ style: W(tt.value)
231
227
  }, [
232
- $e("div", {
228
+ Re("div", {
233
229
  ref_key: "myopContainer",
234
230
  ref: l,
235
- style: W(ot.value)
231
+ style: W(nt.value)
236
232
  }, null, 4),
237
- g.value && r.value ? (b(), ke(Ct, {
233
+ g.value && r.value ? (b(), Oe(_t, {
238
234
  key: 0,
239
235
  opacity: V.value,
240
236
  "fade-duration": e.fadeDuration
241
237
  }, {
242
- default: Ve(() => [
238
+ default: ke(() => [
243
239
  M(u.$slots, "loader")
244
240
  ]),
245
241
  _: 3
246
- }, 8, ["opacity", "fade-duration"])) : pe("", !0),
247
- E.value ? (b(), ke(Et, { key: 1 }, {
248
- default: Ve(() => [
242
+ }, 8, ["opacity", "fade-duration"])) : fe("", !0),
243
+ v.value ? (b(), Oe(Et, { key: 1 }, {
244
+ default: ke(() => [
249
245
  M(u.$slots, "fallback")
250
246
  ]),
251
247
  _: 3
252
- })) : pe("", !0)
248
+ })) : fe("", !0)
253
249
  ], 4));
254
250
  }
255
251
  });
@@ -258,23 +254,23 @@ const _t = ["innerHTML"], Ct = /* @__PURE__ */ Q({
258
254
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
259
255
  * @license MIT
260
256
  **/
261
- const Nt = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
257
+ const vt = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
262
258
  process.env.NODE_ENV !== "production" && Object.freeze([]);
263
- const Ae = () => {
264
- }, St = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
265
- (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), ye = Object.assign, C = Array.isArray, _ = (e) => typeof e == "function", w = (e) => typeof e == "string", bt = (e) => typeof e == "symbol", H = (e) => e !== null && typeof e == "object", wt = (e) => (H(e) || _(e)) && _(e.then) && _(e.catch), Me = (e) => {
259
+ const Te = () => {
260
+ }, Nt = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
261
+ (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), ge = Object.assign, C = Array.isArray, _ = (e) => typeof e == "function", w = (e) => typeof e == "string", St = (e) => typeof e == "symbol", H = (e) => e !== null && typeof e == "object", bt = (e) => (H(e) || _(e)) && _(e.then) && _(e.catch), Ae = (e) => {
266
262
  const t = /* @__PURE__ */ Object.create(null);
267
263
  return ((n) => t[n] || (t[n] = e(n)));
268
- }, Ot = Me((e) => e.charAt(0).toUpperCase() + e.slice(1)), kt = Me(
269
- (e) => e ? `on${Ot(e)}` : ""
264
+ }, wt = Ae((e) => e.charAt(0).toUpperCase() + e.slice(1)), Ot = Ae(
265
+ (e) => e ? `on${wt(e)}` : ""
270
266
  );
271
- let De;
272
- const ee = () => De || (De = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
273
- function _e(e) {
267
+ let Ie;
268
+ const ee = () => Ie || (Ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
269
+ function ye(e) {
274
270
  if (C(e)) {
275
271
  const t = {};
276
272
  for (let n = 0; n < e.length; n++) {
277
- const o = e[n], s = w(o) ? Ft(o) : _e(o);
273
+ const o = e[n], s = w(o) ? Dt(o) : ye(o);
278
274
  if (s)
279
275
  for (const r in s)
280
276
  t[r] = s[r];
@@ -283,23 +279,23 @@ function _e(e) {
283
279
  } else if (w(e) || H(e))
284
280
  return e;
285
281
  }
286
- const Vt = /;(?![^(]*\))/g, It = /:([^]+)/, Dt = /\/\*[^]*?\*\//g;
287
- function Ft(e) {
282
+ const kt = /;(?![^(]*\))/g, Vt = /:([^]+)/, It = /\/\*[^]*?\*\//g;
283
+ function Dt(e) {
288
284
  const t = {};
289
- return e.replace(Dt, "").split(Vt).forEach((n) => {
285
+ return e.replace(It, "").split(kt).forEach((n) => {
290
286
  if (n) {
291
- const o = n.split(It);
287
+ const o = n.split(Vt);
292
288
  o.length > 1 && (t[o[0].trim()] = o[1].trim());
293
289
  }
294
290
  }), t;
295
291
  }
296
- function Ce(e) {
292
+ function _e(e) {
297
293
  let t = "";
298
294
  if (w(e))
299
295
  t = e;
300
296
  else if (C(e))
301
297
  for (let n = 0; n < e.length; n++) {
302
- const o = Ce(e[n]);
298
+ const o = _e(e[n]);
303
299
  o && (t += o + " ");
304
300
  }
305
301
  else if (H(e))
@@ -316,10 +312,10 @@ process.env.NODE_ENV;
316
312
  process.env.NODE_ENV;
317
313
  process.env.NODE_ENV;
318
314
  new Set(
319
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(bt)
315
+ /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(St)
320
316
  );
321
317
  // @__NO_SIDE_EFFECTS__
322
- function de(e) {
318
+ function pe(e) {
323
319
  return e ? !!e.__v_raw : !1;
324
320
  }
325
321
  // @__NO_SIDE_EFFECTS__
@@ -328,7 +324,7 @@ function q(e) {
328
324
  return t ? /* @__PURE__ */ q(t) : e;
329
325
  }
330
326
  // @__NO_SIDE_EFFECTS__
331
- function He(e) {
327
+ function Me(e) {
332
328
  return e ? e.__v_isRef === !0 : !1;
333
329
  }
334
330
  /**
@@ -337,17 +333,17 @@ function He(e) {
337
333
  * @license MIT
338
334
  **/
339
335
  const D = [];
340
- function Rt(e) {
336
+ function Ft(e) {
341
337
  D.push(e);
342
338
  }
343
- function $t() {
339
+ function Rt() {
344
340
  D.pop();
345
341
  }
346
- let ce = !1;
342
+ let ae = !1;
347
343
  function O(e, ...t) {
348
- if (ce) return;
349
- ce = !0;
350
- const n = D.length ? D[D.length - 1].component : null, o = n && n.appContext.config.warnHandler, s = xt();
344
+ if (ae) return;
345
+ ae = !0;
346
+ const n = D.length ? D[D.length - 1].component : null, o = n && n.appContext.config.warnHandler, s = $t();
351
347
  if (o)
352
348
  te(
353
349
  o,
@@ -361,7 +357,7 @@ function O(e, ...t) {
361
357
  }).join(""),
362
358
  n && n.proxy,
363
359
  s.map(
364
- ({ vnode: r }) => `at <${Ze(n, r.type)}>`
360
+ ({ vnode: r }) => `at <${Xe(n, r.type)}>`
365
361
  ).join(`
366
362
  `),
367
363
  s
@@ -370,11 +366,11 @@ function O(e, ...t) {
370
366
  else {
371
367
  const r = [`[Vue warn]: ${e}`, ...t];
372
368
  s.length && r.push(`
373
- `, ...Tt(s)), console.warn(...r);
369
+ `, ...xt(s)), console.warn(...r);
374
370
  }
375
- ce = !1;
371
+ ae = !1;
376
372
  }
377
- function xt() {
373
+ function $t() {
378
374
  let e = D[D.length - 1];
379
375
  if (!e)
380
376
  return [];
@@ -390,31 +386,31 @@ function xt() {
390
386
  }
391
387
  return t;
392
388
  }
393
- function Tt(e) {
389
+ function xt(e) {
394
390
  const t = [];
395
391
  return e.forEach((n, o) => {
396
392
  t.push(...o === 0 ? [] : [`
397
- `], ...At(n));
393
+ `], ...Tt(n));
398
394
  }), t;
399
395
  }
400
- function At({ vnode: e, recurseCount: t }) {
401
- const n = t > 0 ? `... (${t} recursive calls)` : "", o = e.component ? e.component.parent == null : !1, s = ` at <${Ze(
396
+ function Tt({ vnode: e, recurseCount: t }) {
397
+ const n = t > 0 ? `... (${t} recursive calls)` : "", o = e.component ? e.component.parent == null : !1, s = ` at <${Xe(
402
398
  e.component,
403
399
  e.type,
404
400
  o
405
401
  )}`, r = ">" + n;
406
- return e.props ? [s, ...Mt(e.props), r] : [s + r];
402
+ return e.props ? [s, ...At(e.props), r] : [s + r];
407
403
  }
408
- function Mt(e) {
404
+ function At(e) {
409
405
  const t = [], n = Object.keys(e);
410
406
  return n.slice(0, 3).forEach((o) => {
411
- t.push(...ze(o, e[o]));
407
+ t.push(...He(o, e[o]));
412
408
  }), n.length > 3 && t.push(" ..."), t;
413
409
  }
414
- function ze(e, t, n) {
415
- return w(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : /* @__PURE__ */ He(t) ? (t = ze(e, /* @__PURE__ */ q(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : _(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = /* @__PURE__ */ q(t), n ? t : [`${e}=`, t]);
410
+ function He(e, t, n) {
411
+ return w(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : /* @__PURE__ */ Me(t) ? (t = He(e, /* @__PURE__ */ q(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : _(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = /* @__PURE__ */ q(t), n ? t : [`${e}=`, t]);
416
412
  }
417
- const ve = {
413
+ const Ce = {
418
414
  sp: "serverPrefetch hook",
419
415
  bc: "beforeCreate hook",
420
416
  c: "created hook",
@@ -454,32 +450,32 @@ function te(e, t, n, o) {
454
450
  Ee(s, t, n);
455
451
  }
456
452
  }
457
- function Pe(e, t, n, o) {
453
+ function ze(e, t, n, o) {
458
454
  if (_(e)) {
459
455
  const s = te(e, t, n, o);
460
- return s && wt(s) && s.catch((r) => {
456
+ return s && bt(s) && s.catch((r) => {
461
457
  Ee(r, t, n);
462
458
  }), s;
463
459
  }
464
460
  if (C(e)) {
465
461
  const s = [];
466
462
  for (let r = 0; r < e.length; r++)
467
- s.push(Pe(e[r], t, n, o));
463
+ s.push(ze(e[r], t, n, o));
468
464
  return s;
469
465
  } else process.env.NODE_ENV !== "production" && O(
470
466
  `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`
471
467
  );
472
468
  }
473
469
  function Ee(e, t, n, o = !0) {
474
- const s = t ? t.vnode : null, { errorHandler: r, throwUnhandledErrorInProduction: i } = t && t.appContext.config || Nt;
470
+ const s = t ? t.vnode : null, { errorHandler: r, throwUnhandledErrorInProduction: i } = t && t.appContext.config || vt;
475
471
  if (t) {
476
472
  let a = t.parent;
477
- const l = t.proxy, c = process.env.NODE_ENV !== "production" ? ve[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
473
+ const l = t.proxy, c = process.env.NODE_ENV !== "production" ? Ce[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
478
474
  for (; a; ) {
479
- const d = a.ec;
480
- if (d) {
481
- for (let g = 0; g < d.length; g++)
482
- if (d[g](e, l, c) === !1)
475
+ const p = a.ec;
476
+ if (p) {
477
+ for (let g = 0; g < p.length; g++)
478
+ if (p[g](e, l, c) === !1)
483
479
  return;
484
480
  }
485
481
  a = a.parent;
@@ -493,12 +489,12 @@ function Ee(e, t, n, o = !0) {
493
489
  return;
494
490
  }
495
491
  }
496
- Ht(e, n, s, o, i);
492
+ Mt(e, n, s, o, i);
497
493
  }
498
- function Ht(e, t, n, o = !0, s = !1) {
494
+ function Mt(e, t, n, o = !0, s = !1) {
499
495
  if (process.env.NODE_ENV !== "production") {
500
- const r = ve[t];
501
- if (n && Rt(n), O(`Unhandled error${r ? ` during execution of ${r}` : ""}`), n && $t(), o)
496
+ const r = Ce[t];
497
+ if (n && Ft(n), O(`Unhandled error${r ? ` during execution of ${r}` : ""}`), n && Rt(), o)
502
498
  throw e;
503
499
  console.error(e);
504
500
  } else {
@@ -508,34 +504,34 @@ function Ht(e, t, n, o = !0, s = !1) {
508
504
  }
509
505
  }
510
506
  const h = [];
511
- let v = -1;
507
+ let E = -1;
512
508
  const T = [];
513
509
  let S = null, $ = 0;
514
- const zt = /* @__PURE__ */ Promise.resolve();
515
- let me = null;
516
- const Pt = 100;
517
- function Lt(e) {
518
- let t = v + 1, n = h.length;
510
+ const Ht = /* @__PURE__ */ Promise.resolve();
511
+ let de = null;
512
+ const zt = 100;
513
+ function Pt(e) {
514
+ let t = E + 1, n = h.length;
519
515
  for (; t < n; ) {
520
516
  const o = t + n >>> 1, s = h[o], r = z(s);
521
517
  r < e || r === e && s.flags & 2 ? t = o + 1 : n = o;
522
518
  }
523
519
  return t;
524
520
  }
525
- function jt(e) {
521
+ function Lt(e) {
526
522
  if (!(e.flags & 1)) {
527
523
  const t = z(e), n = h[h.length - 1];
528
524
  !n || // fast path when the job id is larger than the tail
529
- !(e.flags & 2) && t >= z(n) ? h.push(e) : h.splice(Lt(t), 0, e), e.flags |= 1, Le();
525
+ !(e.flags & 2) && t >= z(n) ? h.push(e) : h.splice(Pt(t), 0, e), e.flags |= 1, Pe();
530
526
  }
531
527
  }
532
- function Le() {
533
- me || (me = zt.then(je));
528
+ function Pe() {
529
+ de || (de = Ht.then(Le));
534
530
  }
535
- function Ut(e) {
536
- C(e) ? T.push(...e) : S && e.id === -1 ? S.splice($ + 1, 0, e) : e.flags & 1 || (T.push(e), e.flags |= 1), Le();
531
+ function jt(e) {
532
+ C(e) ? T.push(...e) : S && e.id === -1 ? S.splice($ + 1, 0, e) : e.flags & 1 || (T.push(e), e.flags |= 1), Pe();
537
533
  }
538
- function Jt(e) {
534
+ function Ut(e) {
539
535
  if (T.length) {
540
536
  const t = [...new Set(T)].sort(
541
537
  (n, o) => z(n) - z(o)
@@ -546,18 +542,18 @@ function Jt(e) {
546
542
  }
547
543
  for (S = t, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), $ = 0; $ < S.length; $++) {
548
544
  const n = S[$];
549
- process.env.NODE_ENV !== "production" && Ue(e, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
545
+ process.env.NODE_ENV !== "production" && je(e, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
550
546
  }
551
547
  S = null, $ = 0;
552
548
  }
553
549
  }
554
550
  const z = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
555
- function je(e) {
551
+ function Le(e) {
556
552
  process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
557
- const t = process.env.NODE_ENV !== "production" ? (n) => Ue(e, n) : Ae;
553
+ const t = process.env.NODE_ENV !== "production" ? (n) => je(e, n) : Te;
558
554
  try {
559
- for (v = 0; v < h.length; v++) {
560
- const n = h[v];
555
+ for (E = 0; E < h.length; E++) {
556
+ const n = h[E];
561
557
  if (n && !(n.flags & 8)) {
562
558
  if (process.env.NODE_ENV !== "production" && t(n))
563
559
  continue;
@@ -569,17 +565,17 @@ function je(e) {
569
565
  }
570
566
  }
571
567
  } finally {
572
- for (; v < h.length; v++) {
573
- const n = h[v];
568
+ for (; E < h.length; E++) {
569
+ const n = h[E];
574
570
  n && (n.flags &= -2);
575
571
  }
576
- v = -1, h.length = 0, Jt(e), me = null, (h.length || T.length) && je(e);
572
+ E = -1, h.length = 0, Ut(e), de = null, (h.length || T.length) && Le(e);
577
573
  }
578
574
  }
579
- function Ue(e, t) {
575
+ function je(e, t) {
580
576
  const n = e.get(t) || 0;
581
- if (n > Pt) {
582
- const o = t.i, s = o && Xe(o.type);
577
+ if (n > zt) {
578
+ const o = t.i, s = o && Qe(o.type);
583
579
  return Ee(
584
580
  `Maximum recursive updates exceeded${s ? ` in component <${s}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
585
581
  null,
@@ -588,52 +584,52 @@ function Ue(e, t) {
588
584
  }
589
585
  return e.set(t, n + 1), !1;
590
586
  }
591
- const ue = /* @__PURE__ */ new Map();
587
+ const ce = /* @__PURE__ */ new Map();
592
588
  process.env.NODE_ENV !== "production" && (ee().__VUE_HMR_RUNTIME__ = {
593
- createRecord: fe(Wt),
594
- rerender: fe(qt),
595
- reload: fe(Bt)
589
+ createRecord: ue(Jt),
590
+ rerender: ue(Wt),
591
+ reload: ue(qt)
596
592
  });
597
593
  const B = /* @__PURE__ */ new Map();
598
- function Wt(e, t) {
594
+ function Jt(e, t) {
599
595
  return B.has(e) ? !1 : (B.set(e, {
600
596
  initialDef: K(t),
601
597
  instances: /* @__PURE__ */ new Set()
602
598
  }), !0);
603
599
  }
604
600
  function K(e) {
605
- return et(e) ? e.__vccOpts : e;
601
+ return Ze(e) ? e.__vccOpts : e;
606
602
  }
607
- function qt(e, t) {
603
+ function Wt(e, t) {
608
604
  const n = B.get(e);
609
605
  n && (n.initialDef.render = t, [...n.instances].forEach((o) => {
610
606
  t && (o.render = t, K(o.type).render = t), o.renderCache = [], o.job.flags & 8 || o.update();
611
607
  }));
612
608
  }
613
- function Bt(e, t) {
609
+ function qt(e, t) {
614
610
  const n = B.get(e);
615
611
  if (!n) return;
616
- t = K(t), Fe(n.initialDef, t);
612
+ t = K(t), De(n.initialDef, t);
617
613
  const o = [...n.instances];
618
614
  for (let s = 0; s < o.length; s++) {
619
615
  const r = o[s], i = K(r.type);
620
- let a = ue.get(i);
621
- a || (i !== n.initialDef && Fe(i, t), ue.set(i, a = /* @__PURE__ */ new Set())), a.add(r), r.appContext.propsCache.delete(r.type), r.appContext.emitsCache.delete(r.type), r.appContext.optionsCache.delete(r.type), r.ceReload ? (a.add(r), r.ceReload(t.styles), a.delete(r)) : r.parent ? jt(() => {
616
+ let a = ce.get(i);
617
+ a || (i !== n.initialDef && De(i, t), ce.set(i, a = /* @__PURE__ */ new Set())), a.add(r), r.appContext.propsCache.delete(r.type), r.appContext.emitsCache.delete(r.type), r.appContext.optionsCache.delete(r.type), r.ceReload ? (a.add(r), r.ceReload(t.styles), a.delete(r)) : r.parent ? Lt(() => {
622
618
  r.job.flags & 8 || (r.parent.update(), a.delete(r));
623
619
  }) : r.appContext.reload ? r.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
624
620
  "[HMR] Root or manually mounted instance modified. Full reload required."
625
621
  ), r.root.ce && r !== r.root && r.root.ce._removeChildStyle(i);
626
622
  }
627
- Ut(() => {
628
- ue.clear();
623
+ jt(() => {
624
+ ce.clear();
629
625
  });
630
626
  }
631
- function Fe(e, t) {
632
- ye(e, t);
627
+ function De(e, t) {
628
+ ge(e, t);
633
629
  for (const n in e)
634
630
  n !== "__file" && !(n in t) && delete e[n];
635
631
  }
636
- function fe(e) {
632
+ function ue(e) {
637
633
  return (t, n) => {
638
634
  try {
639
635
  return e(t, n);
@@ -645,64 +641,64 @@ function fe(e) {
645
641
  };
646
642
  }
647
643
  let x, U = [];
648
- function Je(e, t) {
644
+ function Ue(e, t) {
649
645
  var n, o;
650
646
  x = e, x ? (x.enabled = !0, U.forEach(({ event: s, args: r }) => x.emit(s, ...r)), U = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
651
647
  window.HTMLElement && // also exclude jsdom
652
648
  // eslint-disable-next-line no-restricted-syntax
653
649
  !((o = (n = window.navigator) == null ? void 0 : n.userAgent) != null && o.includes("jsdom")) ? ((t.__VUE_DEVTOOLS_HOOK_REPLAY__ = t.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((r) => {
654
- Je(r, t);
650
+ Ue(r, t);
655
651
  }), setTimeout(() => {
656
652
  x || (t.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, U = []);
657
653
  }, 3e3)) : U = [];
658
654
  }
659
- let Y = null, Kt = null;
660
- const Yt = (e) => e.__isTeleport;
661
- function We(e, t) {
662
- e.shapeFlag & 6 && e.component ? (e.transition = t, We(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
655
+ let Y = null, Bt = null;
656
+ const Kt = (e) => e.__isTeleport;
657
+ function Je(e, t) {
658
+ e.shapeFlag & 6 && e.component ? (e.transition = t, Je(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
663
659
  }
664
660
  ee().requestIdleCallback;
665
661
  ee().cancelIdleCallback;
666
- function Gt(e, t, n = ne, o = !1) {
662
+ function Yt(e, t, n = ne, o = !1) {
667
663
  if (n) {
668
664
  const s = n[e] || (n[e] = []), r = t.__weh || (t.__weh = (...i) => {
669
- const a = dn(n), l = Pe(t, n, e, i);
665
+ const a = pn(n), l = ze(t, n, e, i);
670
666
  return a(), l;
671
667
  });
672
668
  return o ? s.unshift(r) : s.push(r), r;
673
669
  } else if (process.env.NODE_ENV !== "production") {
674
- const s = kt(ve[e].replace(/ hook$/, ""));
670
+ const s = Ot(Ce[e].replace(/ hook$/, ""));
675
671
  O(
676
672
  `${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
677
673
  );
678
674
  }
679
675
  }
680
- const Qt = (e) => (t, n = ne) => {
681
- (!Qe || e === "sp") && Gt(e, (...o) => t(...o), n);
682
- }, Xt = Qt("u"), Zt = /* @__PURE__ */ Symbol.for("v-ndc"), en = {};
683
- process.env.NODE_ENV !== "production" && (en.ownKeys = (e) => (O(
676
+ const Gt = (e) => (t, n = ne) => {
677
+ (!Ge || e === "sp") && Yt(e, (...o) => t(...o), n);
678
+ }, Qt = Gt("u"), Xt = /* @__PURE__ */ Symbol.for("v-ndc"), Zt = {};
679
+ process.env.NODE_ENV !== "production" && (Zt.ownKeys = (e) => (O(
684
680
  "Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
685
681
  ), Reflect.ownKeys(e)));
686
- const tn = {}, qe = (e) => Object.getPrototypeOf(e) === tn, nn = (e) => e.__isSuspense, Be = /* @__PURE__ */ Symbol.for("v-fgt"), on = /* @__PURE__ */ Symbol.for("v-txt"), rn = /* @__PURE__ */ Symbol.for("v-cmt");
687
- function sn(e) {
682
+ const en = {}, We = (e) => Object.getPrototypeOf(e) === en, tn = (e) => e.__isSuspense, qe = /* @__PURE__ */ Symbol.for("v-fgt"), nn = /* @__PURE__ */ Symbol.for("v-txt"), on = /* @__PURE__ */ Symbol.for("v-cmt");
683
+ function rn(e) {
688
684
  return e ? e.__v_isVNode === !0 : !1;
689
685
  }
690
- const ln = (...e) => Ye(
686
+ const sn = (...e) => Ke(
691
687
  ...e
692
- ), Ke = ({ key: e }) => e ?? null, J = ({
688
+ ), Be = ({ key: e }) => e ?? null, J = ({
693
689
  ref: e,
694
690
  ref_key: t,
695
691
  ref_for: n
696
- }) => (typeof e == "number" && (e = "" + e), e != null ? w(e) || /* @__PURE__ */ He(e) || _(e) ? { i: Y, r: e, k: t, f: !!n } : e : null);
697
- function an(e, t = null, n = null, o = 0, s = null, r = e === Be ? 0 : 1, i = !1, a = !1) {
692
+ }) => (typeof e == "number" && (e = "" + e), e != null ? w(e) || /* @__PURE__ */ Me(e) || _(e) ? { i: Y, r: e, k: t, f: !!n } : e : null);
693
+ function ln(e, t = null, n = null, o = 0, s = null, r = e === qe ? 0 : 1, i = !1, a = !1) {
698
694
  const l = {
699
695
  __v_isVNode: !0,
700
696
  __v_skip: !0,
701
697
  type: e,
702
698
  props: t,
703
- key: t && Ke(t),
699
+ key: t && Be(t),
704
700
  ref: t && J(t),
705
- scopeId: Kt,
701
+ scopeId: Bt,
706
702
  slotScopeIds: null,
707
703
  children: n,
708
704
  component: null,
@@ -724,31 +720,31 @@ function an(e, t = null, n = null, o = 0, s = null, r = e === Be ? 0 : 1, i = !1
724
720
  appContext: null,
725
721
  ctx: Y
726
722
  };
727
- return a ? (Ne(l, n), r & 128 && e.normalize(l)) : n && (l.shapeFlag |= w(n) ? 8 : 16), process.env.NODE_ENV !== "production" && l.key !== l.key && O("VNode created with invalid key (NaN). VNode type:", l.type), l;
723
+ return a ? (ve(l, n), r & 128 && e.normalize(l)) : n && (l.shapeFlag |= w(n) ? 8 : 16), process.env.NODE_ENV !== "production" && l.key !== l.key && O("VNode created with invalid key (NaN). VNode type:", l.type), l;
728
724
  }
729
- const cn = process.env.NODE_ENV !== "production" ? ln : Ye;
730
- function Ye(e, t = null, n = null, o = 0, s = null, r = !1) {
731
- if ((!e || e === Zt) && (process.env.NODE_ENV !== "production" && !e && O(`Invalid vnode type when creating vnode: ${e}.`), e = rn), sn(e)) {
725
+ const an = process.env.NODE_ENV !== "production" ? sn : Ke;
726
+ function Ke(e, t = null, n = null, o = 0, s = null, r = !1) {
727
+ if ((!e || e === Xt) && (process.env.NODE_ENV !== "production" && !e && O(`Invalid vnode type when creating vnode: ${e}.`), e = on), rn(e)) {
732
728
  const a = G(
733
729
  e,
734
730
  t,
735
731
  !0
736
732
  /* mergeRef: true */
737
733
  );
738
- return n && Ne(a, n), a.patchFlag = -2, a;
734
+ return n && ve(a, n), a.patchFlag = -2, a;
739
735
  }
740
- if (et(e) && (e = e.__vccOpts), t) {
741
- t = un(t);
736
+ if (Ze(e) && (e = e.__vccOpts), t) {
737
+ t = cn(t);
742
738
  let { class: a, style: l } = t;
743
- a && !w(a) && (t.class = Ce(a)), H(l) && (/* @__PURE__ */ de(l) && !C(l) && (l = ye({}, l)), t.style = _e(l));
739
+ a && !w(a) && (t.class = _e(a)), H(l) && (/* @__PURE__ */ pe(l) && !C(l) && (l = ge({}, l)), t.style = ye(l));
744
740
  }
745
- const i = w(e) ? 1 : nn(e) ? 128 : Yt(e) ? 64 : H(e) ? 4 : _(e) ? 2 : 0;
746
- return process.env.NODE_ENV !== "production" && i & 4 && /* @__PURE__ */ de(e) && (e = /* @__PURE__ */ q(e), O(
741
+ const i = w(e) ? 1 : tn(e) ? 128 : Kt(e) ? 64 : H(e) ? 4 : _(e) ? 2 : 0;
742
+ return process.env.NODE_ENV !== "production" && i & 4 && /* @__PURE__ */ pe(e) && (e = /* @__PURE__ */ q(e), O(
747
743
  "Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
748
744
  `
749
745
  Component that was made reactive: `,
750
746
  e
751
- )), an(
747
+ )), ln(
752
748
  e,
753
749
  t,
754
750
  n,
@@ -759,16 +755,16 @@ Component that was made reactive: `,
759
755
  !0
760
756
  );
761
757
  }
762
- function un(e) {
763
- return e ? /* @__PURE__ */ de(e) || qe(e) ? ye({}, e) : e : null;
758
+ function cn(e) {
759
+ return e ? /* @__PURE__ */ pe(e) || We(e) ? ge({}, e) : e : null;
764
760
  }
765
761
  function G(e, t, n = !1, o = !1) {
766
- const { props: s, ref: r, patchFlag: i, children: a, transition: l } = e, c = t ? pn(s || {}, t) : s, d = {
762
+ const { props: s, ref: r, patchFlag: i, children: a, transition: l } = e, c = t ? fn(s || {}, t) : s, p = {
767
763
  __v_isVNode: !0,
768
764
  __v_skip: !0,
769
765
  type: e.type,
770
766
  props: c,
771
- key: c && Ke(c),
767
+ key: c && Be(c),
772
768
  ref: t && t.ref ? (
773
769
  // #2078 in the case of <component :is="vnode" ref="extra"/>
774
770
  // if the vnode itself already has a ref, cloneVNode will need to merge
@@ -777,7 +773,7 @@ function G(e, t, n = !1, o = !1) {
777
773
  ) : r,
778
774
  scopeId: e.scopeId,
779
775
  slotScopeIds: e.slotScopeIds,
780
- children: process.env.NODE_ENV !== "production" && i === -1 && C(a) ? a.map(Ge) : a,
776
+ children: process.env.NODE_ENV !== "production" && i === -1 && C(a) ? a.map(Ye) : a,
781
777
  target: e.target,
782
778
  targetStart: e.targetStart,
783
779
  targetAnchor: e.targetAnchor,
@@ -787,7 +783,7 @@ function G(e, t, n = !1, o = !1) {
787
783
  // existing patch flag to be reliable and need to add the FULL_PROPS flag.
788
784
  // note: preserve flag for fragments since they use the flag for children
789
785
  // fast paths only.
790
- patchFlag: t && e.type !== Be ? i === -1 ? 16 : i | 16 : i,
786
+ patchFlag: t && e.type !== qe ? i === -1 ? 16 : i | 16 : i,
791
787
  dynamicProps: e.dynamicProps,
792
788
  dynamicChildren: e.dynamicChildren,
793
789
  appContext: e.appContext,
@@ -807,19 +803,19 @@ function G(e, t, n = !1, o = !1) {
807
803
  ctx: e.ctx,
808
804
  ce: e.ce
809
805
  };
810
- return l && o && We(
811
- d,
812
- l.clone(d)
813
- ), d;
806
+ return l && o && Je(
807
+ p,
808
+ l.clone(p)
809
+ ), p;
814
810
  }
815
- function Ge(e) {
811
+ function Ye(e) {
816
812
  const t = G(e);
817
- return C(e.children) && (t.children = e.children.map(Ge)), t;
813
+ return C(e.children) && (t.children = e.children.map(Ye)), t;
818
814
  }
819
- function fn(e = " ", t = 0) {
820
- return cn(on, null, e, t);
815
+ function un(e = " ", t = 0) {
816
+ return an(nn, null, e, t);
821
817
  }
822
- function Ne(e, t) {
818
+ function ve(e, t) {
823
819
  let n = 0;
824
820
  const { shapeFlag: o } = e;
825
821
  if (t == null)
@@ -829,30 +825,30 @@ function Ne(e, t) {
829
825
  else if (typeof t == "object")
830
826
  if (o & 65) {
831
827
  const s = t.default;
832
- s && (s._c && (s._d = !1), Ne(e, s()), s._c && (s._d = !0));
828
+ s && (s._c && (s._d = !1), ve(e, s()), s._c && (s._d = !0));
833
829
  return;
834
830
  } else
835
- n = 32, !t._ && !qe(t) && (t._ctx = Y);
836
- else _(t) ? (t = { default: t, _ctx: Y }, n = 32) : (t = String(t), o & 64 ? (n = 16, t = [fn(t)]) : n = 8);
831
+ n = 32, !t._ && !We(t) && (t._ctx = Y);
832
+ else _(t) ? (t = { default: t, _ctx: Y }, n = 32) : (t = String(t), o & 64 ? (n = 16, t = [un(t)]) : n = 8);
837
833
  e.children = t, e.shapeFlag |= n;
838
834
  }
839
- function pn(...e) {
835
+ function fn(...e) {
840
836
  const t = {};
841
837
  for (let n = 0; n < e.length; n++) {
842
838
  const o = e[n];
843
839
  for (const s in o)
844
840
  if (s === "class")
845
- t.class !== o.class && (t.class = Ce([t.class, o.class]));
841
+ t.class !== o.class && (t.class = _e([t.class, o.class]));
846
842
  else if (s === "style")
847
- t.style = _e([t.style, o.style]);
848
- else if (St(s)) {
843
+ t.style = ye([t.style, o.style]);
844
+ else if (Nt(s)) {
849
845
  const r = t[s], i = o[s];
850
846
  i && r !== i && !(C(r) && r.includes(i)) && (t[s] = r ? [].concat(r, i) : i);
851
847
  } else s !== "" && (t[s] = o[s]);
852
848
  }
853
849
  return t;
854
850
  }
855
- let ne = null, he;
851
+ let ne = null, me;
856
852
  {
857
853
  const e = ee(), t = (n, o) => {
858
854
  let s;
@@ -860,28 +856,28 @@ let ne = null, he;
860
856
  s.length > 1 ? s.forEach((i) => i(r)) : s[0](r);
861
857
  };
862
858
  };
863
- he = t(
859
+ me = t(
864
860
  "__VUE_INSTANCE_SETTERS__",
865
861
  (n) => ne = n
866
862
  ), t(
867
863
  "__VUE_SSR_SETTERS__",
868
- (n) => Qe = n
864
+ (n) => Ge = n
869
865
  );
870
866
  }
871
- const dn = (e) => {
867
+ const pn = (e) => {
872
868
  const t = ne;
873
- return he(e), e.scope.on(), () => {
874
- e.scope.off(), he(t);
869
+ return me(e), e.scope.on(), () => {
870
+ e.scope.off(), me(t);
875
871
  };
876
872
  };
877
- let Qe = !1;
873
+ let Ge = !1;
878
874
  process.env.NODE_ENV;
879
- const mn = /(?:^|[-_])\w/g, hn = (e) => e.replace(mn, (t) => t.toUpperCase()).replace(/[-_]/g, "");
880
- function Xe(e, t = !0) {
875
+ const dn = /(?:^|[-_])\w/g, mn = (e) => e.replace(dn, (t) => t.toUpperCase()).replace(/[-_]/g, "");
876
+ function Qe(e, t = !0) {
881
877
  return _(e) ? e.displayName || e.name : e.name || t && e.__name;
882
878
  }
883
- function Ze(e, t, n = !1) {
884
- let o = Xe(t);
879
+ function Xe(e, t, n = !1) {
880
+ let o = Qe(t);
885
881
  if (!o && t.__file) {
886
882
  const s = t.__file.match(/([^/\\]+)\.\w+$/);
887
883
  s && (o = s[1]);
@@ -896,15 +892,15 @@ function Ze(e, t, n = !1) {
896
892
  e.parent.type.components
897
893
  ) || s(e.appContext.components);
898
894
  }
899
- return o ? hn(o) : n ? "App" : "Anonymous";
895
+ return o ? mn(o) : n ? "App" : "Anonymous";
900
896
  }
901
- function et(e) {
897
+ function Ze(e) {
902
898
  return _(e) && "__vccOpts" in e;
903
899
  }
904
900
  process.env.NODE_ENV;
905
901
  process.env.NODE_ENV;
906
902
  process.env.NODE_ENV;
907
- const Nn = /* @__PURE__ */ Q({
903
+ const vn = /* @__PURE__ */ Q({
908
904
  inheritAttrs: !0,
909
905
  __name: "MyopVueComponent",
910
906
  props: {
@@ -913,13 +909,13 @@ const Nn = /* @__PURE__ */ Q({
913
909
  onReady: { type: Function }
914
910
  },
915
911
  setup(e, { expose: t }) {
916
- const n = e, o = ct(), s = X(), r = p(null), i = p(!0), a = p(null), l = p(null), c = ut(), d = p(null);
917
- Xt(() => {
912
+ const n = e, o = at(), s = X(), r = d(null), i = d(!0), a = d(null), l = d(null), c = ct(), p = d(null);
913
+ Qt(() => {
918
914
  l && l.value && l.value(o);
919
- }), Re(async () => {
915
+ }), Fe(async () => {
920
916
  if (r.value) {
921
917
  const V = await Z.Main.fetchComponent(n.componentId, n.flowId);
922
- a.value = await Te.loadComponent(
918
+ a.value = await xe.loadComponent(
923
919
  V,
924
920
  r == null ? void 0 : r.value,
925
921
  {
@@ -930,53 +926,53 @@ const Nn = /* @__PURE__ */ Q({
930
926
  context: c == null ? void 0 : c.appContext,
931
927
  vueContainerRef: r,
932
928
  //@ts-ignore
933
- defineUpdater: (E) => {
934
- l.value = E;
929
+ defineUpdater: (v) => {
930
+ l.value = v;
935
931
  },
936
932
  //@ts-ignore
937
- defineInnerVueComponentRef: (E) => {
938
- d.value = E.value;
933
+ defineInnerVueComponentRef: (v) => {
934
+ p.value = v.value;
939
935
  }
940
936
  }
941
937
  }
942
- ), i.value = !1, n.onReady && n.onReady(a.value, d.value);
938
+ ), i.value = !1, n.onReady && n.onReady(a.value, p.value);
943
939
  }
944
940
  });
945
- const g = ft({});
946
- return t(g), pt(() => {
947
- Object.assign(g, d.value);
948
- }), (V, E) => (b(), A(dt, null, [
949
- $e("div", mt(ge(o), {
941
+ const g = ut({});
942
+ return t(g), ft(() => {
943
+ Object.assign(g, p.value);
944
+ }), (V, v) => (b(), A(pt, null, [
945
+ Re("div", dt(he(o), {
950
946
  ref_key: "myopContainer",
951
947
  ref: r
952
948
  }), null, 16),
953
- i.value ? M(V.$slots, "loading", { key: 0 }) : pe("", !0)
949
+ i.value ? M(V.$slots, "loading", { key: 0 }) : fe("", !0)
954
950
  ], 64));
955
951
  }
956
952
  });
957
953
  let k = Z.Main;
958
- const gn = () => k, yn = (e, t, n) => k.isPreloaded(e, t, n), Sn = (e) => k.getPreloadedParams(e), bn = () => {
954
+ const hn = () => k, gn = (e, t, n) => k.isPreloaded(e, t, n), Nn = (e) => k.getPreloadedParams(e), Sn = () => {
959
955
  k = new Z("http://localhost:9292");
960
- }, wn = (e) => {
956
+ }, bn = (e) => {
961
957
  k = new Z(e);
962
- }, On = (e) => {
958
+ }, wn = (e) => {
963
959
  k = e;
964
- }, kn = (e) => {
960
+ }, On = (e) => {
965
961
  k.setEnvironment(e);
966
- }, Vn = async (e, t, n) => Promise.allSettled(
962
+ }, kn = async (e, t, n) => Promise.allSettled(
967
963
  e.map((o) => k.fetchComponentV2(o, t, n))
968
964
  );
969
965
  export {
970
966
  En as MyopComponent,
971
- Nn as MyopContainer,
967
+ vn as MyopContainer,
972
968
  Et as MyopFallback,
973
- Ct as MyopLoader,
974
- bn as enableLocalDev,
975
- gn as getCloudRepository,
976
- Sn as getPreloadedParams,
977
- yn as isPreloaded,
978
- Vn as preloadComponents,
979
- On as setCloudRepository,
980
- wn as setCloudRepositoryUrl,
981
- kn as setEnvironment
969
+ _t as MyopLoader,
970
+ Sn as enableLocalDev,
971
+ hn as getCloudRepository,
972
+ Nn as getPreloadedParams,
973
+ gn as isPreloaded,
974
+ kn as preloadComponents,
975
+ wn as setCloudRepository,
976
+ bn as setCloudRepositoryUrl,
977
+ On as setEnvironment
982
978
  };
@@ -1,17 +1,17 @@
1
- (function(d,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("@myop/sdk/host"),require("@myop/sdk/helpers")):typeof define=="function"&&define.amd?define(["exports","vue","@myop/sdk/host","@myop/sdk/helpers"],l):(d=typeof globalThis<"u"?globalThis:d||self,l(d["@myop/vue"]={},d.Vue,d.host,d.helpers))})(this,(function(d,l,V,P){"use strict";const Be=["innerHTML"],he=l.defineComponent({__name:"MyopLoader",props:{opacity:{default:1},fadeDuration:{default:200}},setup(e){const t=e,n=l.useSlots(),o=a=>!a||a.length===0?!1:a.some(u=>typeof u.children=="string"?u.children.trim()!=="":Array.isArray(u.children)?o(u.children):!!(u.type&&typeof u.type!="symbol"||u.children)),s=l.computed(()=>{const a=n.default;if(!a)return!1;const u=a();return o(u)}),r=l.computed(()=>({...V.containerStyleObject,opacity:t.opacity,transition:`opacity ${t.fadeDuration}ms ease-out`})),i=l.computed(()=>({...V.loaderStyleObject,opacity:t.opacity,transition:`opacity ${t.fadeDuration}ms ease-out`})),c=V.getMyopLogoHtml();return(a,u)=>s.value?(l.openBlock(),l.createElementBlock("div",{key:0,style:l.normalizeStyle(r.value)},[l.renderSlot(a.$slots,"default")],4)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle(i.value),innerHTML:l.unref(c)},null,12,Be))}}),Je=["innerHTML"],ye=l.defineComponent({__name:"MyopFallback",setup(e){const t=l.useSlots(),n=c=>!c||c.length===0?!1:c.some(a=>typeof a.children=="string"?a.children.trim()!=="":Array.isArray(a.children)?n(a.children):!!(a.type&&typeof a.type!="symbol"||a.children)),o=l.computed(()=>{const c=t.default;if(!c)return!1;const a=c();return n(a)}),s={position:"absolute",top:"0",left:"0",right:"0",bottom:"0"},r={...V.fallbackStyleObject},i=V.getMyopLogoHtml();return(c,a)=>o.value?(l.openBlock(),l.createElementBlock("div",{key:0,style:s},[l.renderSlot(c.$slots,"default")])):(l.openBlock(),l.createElementBlock("div",{key:1,style:r,innerHTML:l.unref(i)},null,8,Je))}}),We=l.defineComponent({name:"MyopComponent",__name:"MyopComponent",props:{componentId:{},componentConfig:{},data:{},fadeDuration:{default:200},autoSize:{type:Boolean,default:!1},environment:{},preview:{type:Boolean},on:{}},emits:["load","error","sizeChange","cta"],setup(e,{expose:t,emit:n}){const o=l.useSlots(),s=f=>!f||f.length===0?!1:f.some(p=>typeof p.children=="string"?p.children.trim()!=="":Array.isArray(p.children)?s(p.children):!!(p.type&&typeof p.type!="symbol"||p.children)),r=l.computed(()=>{const f=o.loader;if(!f)return!1;const p=f();return s(p)});l.computed(()=>{const f=o.fallback;if(!f)return!1;const p=f();return s(p)});const i=e,c=n,a=l.ref(null),u=l.shallowRef(null),m=i.componentId?xe(i.componentId):!1,g=l.ref(!m),R=l.ref(1),b=l.ref(!1),A=l.ref(!1),D=l.ref(void 0),ue=l.ref(!1),Y=l.ref(null),fe=l.ref(!1);let M=null;const pe=()=>{R.value=0,setTimeout(()=>{g.value=!1},i.fadeDuration)},de=f=>{console.error("[MyopComponent] Error:",f),pe(),b.value=!0,c("error",f)},me=async f=>{var O,G;ue.value=!0;let p=!1;try{const y=JSON.parse(JSON.stringify({componentId:f.componentId,data:f.data,environment:f.environment,preview:f.preview,autoSize:f.autoSize}));if(!y.componentId&&!f.componentConfig){de("No component configuration provided");return}const Yt=y.preview===!0?!0:void 0,Gt=f.componentConfig?JSON.parse(JSON.stringify(f.componentConfig)):await Pe().fetchComponentV2(y.componentId,y.environment,Yt);if(!a.value){de("Container element not found");return}const Qt=l.markRaw({data:y.data,_environment:{props:y}}),Ue=await V.hostSDK.loadComponent(Gt,a.value,Qt);if(p){Ue.dispose();return}if(u.value=l.markRaw(Ue),await u.value.initiated(),p){(O=u.value)==null||O.dispose();return}if(await new Promise(Q=>requestAnimationFrame(Q)),p||!u.value||u.value.markedForDisposed){u.value&&!u.value.markedForDisposed&&u.value.dispose();return}A.value=!0,i.autoSize||pe(),(G=u.value)!=null&&G.props&&(u.value.props.myop_cta_handler=(Q,ve)=>{i.on&&i.on(Q,ve),c("cta",Q,ve)}),c("load",u.value)}catch(y){p||de((y==null?void 0:y.message)||"Unknown error")}finally{if(ue.value=!1,Y.value!==null&&!p){const y=Y.value;Y.value=null,await me(y)}}return()=>{p=!0}},Wt=()=>{var p;if(!A.value||!((p=u.value)!=null&&p.observeAutoSize))return;let f=!0;M=u.value.observeAutoSize({explicitWidth:void 0,explicitHeight:void 0,forceAutoSize:i.autoSize,loaderMinHeight:50,onSizeChange:O=>{c("sizeChange",O),D.value=O,f&&(f=!1,pe())}})};l.watch(()=>i.componentId,async(f,p)=>{f!==p&&(fe.value=!1,A.value=!1,b.value=!1,g.value=!0,R.value=1,u.value&&(u.value.dispose(),u.value=null),M&&(M(),M=null),ue.value?Y.value={...i}:await me(i))}),l.watch(()=>i.data,f=>{var p;if(A.value&&f!==void 0&&u.value){if(!fe.value){fe.value=!0;return}const O=(p=u.value.props)==null?void 0:p.myop_init_interface;if(O){const G=JSON.parse(JSON.stringify(f));O(G)}}},{deep:!0}),l.watch(()=>A.value,f=>{f&&i.autoSize&&Wt()}),l.onMounted(async()=>{(i.componentId||i.componentConfig)&&await me(i)}),l.onUnmounted(()=>{M&&M(),u.value&&u.value.dispose()});const Le=l.computed(()=>{var f,p;return((f=D.value)==null?void 0:f.autoSizingWidth)||((p=D.value)==null?void 0:p.autoSizingHeight)}),je=l.computed(()=>g.value?50:void 0),qt=l.computed(()=>{var f,p;return{position:"relative",width:(f=D.value)!=null&&f.autoSizingWidth?`${D.value.width}px`:"100%",height:(p=D.value)!=null&&p.autoSizingHeight?`${D.value.height}px`:"100%",minHeight:je.value?`${je.value}px`:void 0,overflow:Le.value?"hidden":"inherit"}}),Kt=l.computed(()=>({position:"absolute",inset:"0",overflow:Le.value?"hidden":void 0}));return t({myopComponent:u,isLoaded:A}),(f,p)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(qt.value)},[l.createElementVNode("div",{ref_key:"myopContainer",ref:a,style:l.normalizeStyle(Kt.value)},null,4),g.value&&r.value?(l.openBlock(),l.createBlock(he,{key:0,opacity:R.value,"fade-duration":e.fadeDuration},{default:l.withCtx(()=>[l.renderSlot(f.$slots,"loader")]),_:3},8,["opacity","fade-duration"])):l.createCommentVNode("",!0),b.value?(l.openBlock(),l.createBlock(ye,{key:1},{default:l.withCtx(()=>[l.renderSlot(f.$slots,"fallback")]),_:3})):l.createCommentVNode("",!0)],4))}});/**
1
+ (function(d,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("@myop/sdk/host"),require("@myop/sdk/helpers")):typeof define=="function"&&define.amd?define(["exports","vue","@myop/sdk/host","@myop/sdk/helpers"],i):(d=typeof globalThis<"u"?globalThis:d||self,i(d["@myop/vue"]={},d.Vue,d.host,d.helpers))})(this,(function(d,i,V,P){"use strict";const Be=["innerHTML"],me=i.defineComponent({__name:"MyopLoader",props:{opacity:{default:1},fadeDuration:{default:200}},setup(e){const t=e,n=i.useSlots(),o=a=>!a||a.length===0?!1:a.some(u=>typeof u.children=="string"?u.children.trim()!=="":Array.isArray(u.children)?o(u.children):!!(u.type&&typeof u.type!="symbol"||u.children)),s=i.computed(()=>{const a=n.default;if(!a)return!1;const u=a();return o(u)}),r=i.computed(()=>({...V.containerStyleObject,opacity:t.opacity,transition:`opacity ${t.fadeDuration}ms ease-out`})),l=i.computed(()=>({...V.loaderStyleObject,opacity:t.opacity,transition:`opacity ${t.fadeDuration}ms ease-out`})),c=V.getMyopLogoHtml();return(a,u)=>s.value?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(r.value)},[i.renderSlot(a.$slots,"default")],4)):(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle(l.value),innerHTML:i.unref(c)},null,12,Be))}}),ve=["innerHTML"],he=i.defineComponent({__name:"MyopFallback",setup(e){const t=i.useSlots(),n=c=>!c||c.length===0?!1:c.some(a=>typeof a.children=="string"?a.children.trim()!=="":Array.isArray(a.children)?n(a.children):!!(a.type&&typeof a.type!="symbol"||a.children)),o=i.computed(()=>{const c=t.default;if(!c)return!1;const a=c();return n(a)}),s={position:"absolute",top:"0",left:"0",right:"0",bottom:"0"},r={...V.fallbackStyleObject},l=V.getMyopLogoHtml();return(c,a)=>o.value?(i.openBlock(),i.createElementBlock("div",{key:0,style:s},[i.renderSlot(c.$slots,"default")])):(i.openBlock(),i.createElementBlock("div",{key:1,style:r,innerHTML:i.unref(l)},null,8,ve))}}),Je=i.defineComponent({name:"MyopComponent",__name:"MyopComponent",props:{componentId:{},componentConfig:{},data:{},fadeDuration:{default:200},autoSize:{type:Boolean,default:!1},environment:{},preview:{type:Boolean},on:{}},emits:["load","error","sizeChange","cta"],setup(e,{expose:t,emit:n}){const o=i.useSlots(),s=f=>!f||f.length===0?!1:f.some(p=>typeof p.children=="string"?p.children.trim()!=="":Array.isArray(p.children)?s(p.children):!!(p.type&&typeof p.type!="symbol"||p.children)),r=i.computed(()=>{const f=o.loader;if(!f)return!1;const p=f();return s(p)});i.computed(()=>{const f=o.fallback;if(!f)return!1;const p=f();return s(p)});const l=e,c=n,a=i.ref(null),u=i.shallowRef(null),m=l.componentId?Pe(l.componentId):!1,g=i.ref(!m),R=i.ref(1),b=i.ref(!1),A=i.ref(!1),D=i.ref(void 0),ue=i.ref(!1),Y=i.ref(null);let M=null;const fe=()=>{R.value=0,setTimeout(()=>{g.value=!1},l.fadeDuration)},pe=f=>{console.error("[MyopComponent] Error:",f),fe(),b.value=!0,c("error",f)},de=async f=>{var O,G;ue.value=!0;let p=!1;try{const y=JSON.parse(JSON.stringify({componentId:f.componentId,data:f.data,environment:f.environment,preview:f.preview,autoSize:f.autoSize}));if(!y.componentId&&!f.componentConfig){pe("No component configuration provided");return}const Kt=y.preview===!0?!0:void 0,Yt=f.componentConfig?JSON.parse(JSON.stringify(f.componentConfig)):await ze().fetchComponentV2(y.componentId,y.environment,Kt);if(!a.value){pe("Container element not found");return}const Gt=i.markRaw({data:y.data,_environment:{props:y}}),je=await V.hostSDK.loadComponent(Yt,a.value,Gt);if(p){je.dispose();return}if(u.value=i.markRaw(je),await u.value.initiated(),p){(O=u.value)==null||O.dispose();return}if(await new Promise(Q=>requestAnimationFrame(Q)),p||!u.value||u.value.markedForDisposed){u.value&&!u.value.markedForDisposed&&u.value.dispose();return}A.value=!0,l.autoSize||fe(),(G=u.value)!=null&&G.props&&(u.value.props.myop_cta_handler=(Q,Ue)=>{l.on&&l.on(Q,Ue),c("cta",Q,Ue)}),c("load",u.value)}catch(y){p||pe((y==null?void 0:y.message)||"Unknown error")}finally{if(ue.value=!1,Y.value!==null&&!p){const y=Y.value;Y.value=null,await de(y)}}return()=>{p=!0}},Jt=()=>{var p;if(!A.value||!((p=u.value)!=null&&p.observeAutoSize))return;let f=!0;M=u.value.observeAutoSize({explicitWidth:void 0,explicitHeight:void 0,forceAutoSize:l.autoSize,loaderMinHeight:50,onSizeChange:O=>{c("sizeChange",O),D.value=O,f&&(f=!1,fe())}})};i.watch(()=>l.componentId,async(f,p)=>{f!==p&&(A.value=!1,b.value=!1,g.value=!0,R.value=1,u.value&&(u.value.dispose(),u.value=null),M&&(M(),M=null),ue.value?Y.value={...l}:await de(l))}),i.watch(()=>l.data,f=>{var p;if(A.value&&f!==void 0&&u.value){const O=(p=u.value.props)==null?void 0:p.myop_init_interface;if(O){const G=JSON.parse(JSON.stringify(f));O(G)}}},{deep:!0}),i.watch(()=>A.value,f=>{f&&l.autoSize&&Jt()}),i.onMounted(async()=>{(l.componentId||l.componentConfig)&&await de(l)}),i.onUnmounted(()=>{M&&M(),u.value&&u.value.dispose()});const xe=i.computed(()=>{var f,p;return((f=D.value)==null?void 0:f.autoSizingWidth)||((p=D.value)==null?void 0:p.autoSizingHeight)}),Le=i.computed(()=>g.value?50:void 0),Wt=i.computed(()=>{var f,p;return{position:"relative",width:(f=D.value)!=null&&f.autoSizingWidth?`${D.value.width}px`:"100%",height:(p=D.value)!=null&&p.autoSizingHeight?`${D.value.height}px`:"100%",minHeight:Le.value?`${Le.value}px`:void 0,overflow:xe.value?"hidden":"inherit"}}),qt=i.computed(()=>({position:"absolute",inset:"0",overflow:xe.value?"hidden":void 0}));return t({myopComponent:u,isLoaded:A}),(f,p)=>(i.openBlock(),i.createElementBlock("div",{style:i.normalizeStyle(Wt.value)},[i.createElementVNode("div",{ref_key:"myopContainer",ref:a,style:i.normalizeStyle(qt.value)},null,4),g.value&&r.value?(i.openBlock(),i.createBlock(me,{key:0,opacity:R.value,"fade-duration":e.fadeDuration},{default:i.withCtx(()=>[i.renderSlot(f.$slots,"loader")]),_:3},8,["opacity","fade-duration"])):i.createCommentVNode("",!0),b.value?(i.openBlock(),i.createBlock(he,{key:1},{default:i.withCtx(()=>[i.renderSlot(f.$slots,"fallback")]),_:3})):i.createCommentVNode("",!0)],4))}});/**
2
2
  * @vue/shared v3.5.27
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/const qe=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const ge=()=>{},Ke=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),X=Object.assign,_=Array.isArray,C=e=>typeof e=="function",S=e=>typeof e=="string",Ye=e=>typeof e=="symbol",H=e=>e!==null&&typeof e=="object",Ge=e=>(H(e)||C(e))&&C(e.then)&&C(e.catch),_e=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Qe=_e(e=>e.charAt(0).toUpperCase()+e.slice(1)),Xe=_e(e=>e?`on${Qe(e)}`:"");let Ce;const x=()=>Ce||(Ce=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Z(e){if(_(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=S(o)?nt(o):Z(o);if(s)for(const r in s)t[r]=s[r]}return t}else if(S(e)||H(e))return e}const Ze=/;(?![^(]*\))/g,et=/:([^]+)/,tt=/\/\*[^]*?\*\//g;function nt(e){const t={};return e.replace(tt,"").split(Ze).forEach(n=>{if(n){const o=n.split(et);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ee(e){let t="";if(S(e))t=e;else if(_(e))for(let n=0;n<e.length;n++){const o=ee(e[n]);o&&(t+=o+" ")}else if(H(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}/**
5
+ **/const We=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const ye=()=>{},qe=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),X=Object.assign,_=Array.isArray,C=e=>typeof e=="function",S=e=>typeof e=="string",Ke=e=>typeof e=="symbol",H=e=>e!==null&&typeof e=="object",Ye=e=>(H(e)||C(e))&&C(e.then)&&C(e.catch),ge=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Ge=ge(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qe=ge(e=>e?`on${Ge(e)}`:"");let _e;const x=()=>_e||(_e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Z(e){if(_(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=S(o)?tt(o):Z(o);if(s)for(const r in s)t[r]=s[r]}return t}else if(S(e)||H(e))return e}const Xe=/;(?![^(]*\))/g,Ze=/:([^]+)/,et=/\/\*[^]*?\*\//g;function tt(e){const t={};return e.replace(et,"").split(Xe).forEach(n=>{if(n){const o=n.split(Ze);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ee(e){let t="";if(S(e))t=e;else if(_(e))for(let n=0;n<e.length;n++){const o=ee(e[n]);o&&(t+=o+" ")}else if(H(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}/**
6
6
  * @vue/reactivity v3.5.27
7
7
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
8
  * @license MIT
9
- **/process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ye));function te(e){return e?!!e.__v_raw:!1}function L(e){const t=e&&e.__v_raw;return t?L(t):e}function Ee(e){return e?e.__v_isRef===!0:!1}/**
9
+ **/process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ke));function te(e){return e?!!e.__v_raw:!1}function L(e){const t=e&&e.__v_raw;return t?L(t):e}function Ce(e){return e?e.__v_isRef===!0:!1}/**
10
10
  * @vue/runtime-core v3.5.27
11
11
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
12
  * @license MIT
13
- **/const I=[];function ot(e){I.push(e)}function rt(){I.pop()}let ne=!1;function N(e,...t){if(ne)return;ne=!0;const n=I.length?I[I.length-1].component:null,o=n&&n.appContext.config.warnHandler,s=st();if(o)j(o,n,11,[e+t.map(r=>{var i,c;return(c=(i=r.toString)==null?void 0:i.call(r))!=null?c:JSON.stringify(r)}).join(""),n&&n.proxy,s.map(({vnode:r})=>`at <${He(n,r.type)}>`).join(`
13
+ **/const I=[];function nt(e){I.push(e)}function ot(){I.pop()}let ne=!1;function N(e,...t){if(ne)return;ne=!0;const n=I.length?I[I.length-1].component:null,o=n&&n.appContext.config.warnHandler,s=rt();if(o)j(o,n,11,[e+t.map(r=>{var l,c;return(c=(l=r.toString)==null?void 0:l.call(r))!=null?c:JSON.stringify(r)}).join(""),n&&n.proxy,s.map(({vnode:r})=>`at <${Me(n,r.type)}>`).join(`
14
14
  `),s]);else{const r=[`[Vue warn]: ${e}`,...t];s.length&&r.push(`
15
- `,...lt(s)),console.warn(...r)}ne=!1}function st(){let e=I[I.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function lt(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
16
- `],...it(n))}),t}function it({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,s=` at <${He(e.component,e.type,o)}`,r=">"+n;return e.props?[s,...at(e.props),r]:[s+r]}function at(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...Se(o,e[o]))}),n.length>3&&t.push(" ..."),t}function Se(e,t,n){return S(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ee(t)?(t=Se(e,L(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):C(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=L(t),n?t:[`${e}=`,t])}const oe={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function j(e,t,n,o){try{return o?e(...o):e()}catch(s){re(s,t,n)}}function Ne(e,t,n,o){if(C(e)){const s=j(e,t,n,o);return s&&Ge(s)&&s.catch(r=>{re(r,t,n)}),s}if(_(e)){const s=[];for(let r=0;r<e.length;r++)s.push(Ne(e[r],t,n,o));return s}else process.env.NODE_ENV!=="production"&&N(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function re(e,t,n,o=!0){const s=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||qe;if(t){let c=t.parent;const a=t.proxy,u=process.env.NODE_ENV!=="production"?oe[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const m=c.ec;if(m){for(let g=0;g<m.length;g++)if(m[g](e,a,u)===!1)return}c=c.parent}if(r){j(r,null,10,[e,a,u]);return}}ct(e,n,s,o,i)}function ct(e,t,n,o=!0,s=!1){if(process.env.NODE_ENV!=="production"){const r=oe[t];if(n&&ot(n),N(`Unhandled error${r?` during execution of ${r}`:""}`),n&&rt(),o)throw e;console.error(e)}else{if(s)throw e;console.error(e)}}const h=[];let E=-1;const F=[];let w=null,T=0;const ut=Promise.resolve();let se=null;const ft=100;function pt(e){let t=E+1,n=h.length;for(;t<n;){const o=t+n>>>1,s=h[o],r=z(s);r<e||r===e&&s.flags&2?t=o+1:n=o}return t}function dt(e){if(!(e.flags&1)){const t=z(e),n=h[h.length-1];!n||!(e.flags&2)&&t>=z(n)?h.push(e):h.splice(pt(t),0,e),e.flags|=1,we()}}function we(){se||(se=ut.then(ke))}function mt(e){_(e)?F.push(...e):w&&e.id===-1?w.splice(T+1,0,e):e.flags&1||(F.push(e),e.flags|=1),we()}function ht(e){if(F.length){const t=[...new Set(F)].sort((n,o)=>z(n)-z(o));if(F.length=0,w){w.push(...t);return}for(w=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),T=0;T<w.length;T++){const n=w[T];process.env.NODE_ENV!=="production"&&be(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}w=null,T=0}}const z=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ke(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>be(e,n):ge;try{for(E=0;E<h.length;E++){const n=h[E];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),j(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;E<h.length;E++){const n=h[E];n&&(n.flags&=-2)}E=-1,h.length=0,ht(e),se=null,(h.length||F.length)&&ke(e)}}function be(e,t){const n=e.get(t)||0;if(n>ft){const o=t.i,s=o&&Me(o.type);return re(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const le=new Map;process.env.NODE_ENV!=="production"&&(x().__VUE_HMR_RUNTIME__={createRecord:ie(yt),rerender:ie(gt),reload:ie(_t)});const U=new Map;function yt(e,t){return U.has(e)?!1:(U.set(e,{initialDef:v(t),instances:new Set}),!0)}function v(e){return ze(e)?e.__vccOpts:e}function gt(e,t){const n=U.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(o=>{t&&(o.render=t,v(o.type).render=t),o.renderCache=[],o.job.flags&8||o.update()}))}function _t(e,t){const n=U.get(e);if(!n)return;t=v(t),Oe(n.initialDef,t);const o=[...n.instances];for(let s=0;s<o.length;s++){const r=o[s],i=v(r.type);let c=le.get(i);c||(i!==n.initialDef&&Oe(i,t),le.set(i,c=new Set)),c.add(r),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(c.add(r),r.ceReload(t.styles),c.delete(r)):r.parent?dt(()=>{r.job.flags&8||(r.parent.update(),c.delete(r))}):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),r.root.ce&&r!==r.root&&r.root.ce._removeChildStyle(i)}mt(()=>{le.clear()})}function Oe(e,t){X(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function ie(e){return(t,n)=>{try{return e(t,n)}catch(o){console.error(o),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let $,B=[];function Ve(e,t){var n,o;$=e,$?($.enabled=!0,B.forEach(({event:s,args:r})=>$.emit(s,...r)),B=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{Ve(r,t)}),setTimeout(()=>{$||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,B=[])},3e3)):B=[]}let J=null,Ct=null;const Et=e=>e.__isTeleport;function Ie(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ie(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}x().requestIdleCallback,x().cancelIdleCallback;function St(e,t,n=K,o=!1){if(n){const s=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{const c=Ht(n),a=Ne(t,n,e,i);return c(),a});return o?s.unshift(r):s.push(r),r}else if(process.env.NODE_ENV!=="production"){const s=Xe(oe[e].replace(/ hook$/,""));N(`${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Nt=(e=>(t,n=K)=>{(!Ae||e==="sp")&&St(e,(...o)=>t(...o),n)})("u"),wt=Symbol.for("v-ndc"),kt={};process.env.NODE_ENV!=="production"&&(kt.ownKeys=e=>(N("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));const bt={},Re=e=>Object.getPrototypeOf(e)===bt,Ot=e=>e.__isSuspense,De=Symbol.for("v-fgt"),Vt=Symbol.for("v-txt"),It=Symbol.for("v-cmt");function Rt(e){return e?e.__v_isVNode===!0:!1}const Dt=(...e)=>Te(...e),Fe=({key:e})=>e??null,W=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?S(e)||Ee(e)||C(e)?{i:J,r:e,k:t,f:!!n}:e:null);function Ft(e,t=null,n=null,o=0,s=null,r=e===De?0:1,i=!1,c=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Fe(t),ref:t&&W(t),scopeId:Ct,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:J};return c?(ae(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=S(n)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&N("VNode created with invalid key (NaN). VNode type:",a.type),a}const Tt=process.env.NODE_ENV!=="production"?Dt:Te;function Te(e,t=null,n=null,o=0,s=null,r=!1){if((!e||e===wt)&&(process.env.NODE_ENV!=="production"&&!e&&N(`Invalid vnode type when creating vnode: ${e}.`),e=It),Rt(e)){const c=q(e,t,!0);return n&&ae(c,n),c.patchFlag=-2,c}if(ze(e)&&(e=e.__vccOpts),t){t=$t(t);let{class:c,style:a}=t;c&&!S(c)&&(t.class=ee(c)),H(a)&&(te(a)&&!_(a)&&(a=X({},a)),t.style=Z(a))}const i=S(e)?1:Ot(e)?128:Et(e)?64:H(e)?4:C(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&te(e)&&(e=L(e),N("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
17
- Component that was made reactive: `,e)),Ft(e,t,n,o,s,i,r,!0)}function $t(e){return e?te(e)||Re(e)?X({},e):e:null}function q(e,t,n=!1,o=!1){const{props:s,ref:r,patchFlag:i,children:c,transition:a}=e,u=t?Mt(s||{},t):s,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Fe(u),ref:t&&t.ref?n&&r?_(r)?r.concat(W(t)):[r,W(t)]:W(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&i===-1&&_(c)?c.map($e):c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==De?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&q(e.ssContent),ssFallback:e.ssFallback&&q(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ie(m,a.clone(m)),m}function $e(e){const t=q(e);return _(e.children)&&(t.children=e.children.map($e)),t}function At(e=" ",t=0){return Tt(Vt,null,e,t)}function ae(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(_(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),ae(e,s()),s._c&&(s._d=!0));return}else n=32,!t._&&!Re(t)&&(t._ctx=J);else C(t)?(t={default:t,_ctx:J},n=32):(t=String(t),o&64?(n=16,t=[At(t)]):n=8);e.children=t,e.shapeFlag|=n}function Mt(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const s in o)if(s==="class")t.class!==o.class&&(t.class=ee([t.class,o.class]));else if(s==="style")t.style=Z([t.style,o.style]);else if(Ke(s)){const r=t[s],i=o[s];i&&r!==i&&!(_(r)&&r.includes(i))&&(t[s]=r?[].concat(r,i):i)}else s!==""&&(t[s]=o[s])}return t}let K=null,ce;{const e=x(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),r=>{s.length>1?s.forEach(i=>i(r)):s[0](r)}};ce=t("__VUE_INSTANCE_SETTERS__",n=>K=n),t("__VUE_SSR_SETTERS__",n=>Ae=n)}const Ht=e=>{const t=K;return ce(e),e.scope.on(),()=>{e.scope.off(),ce(t)}};let Ae=!1;process.env.NODE_ENV;const zt=/(?:^|[-_])\w/g,Pt=e=>e.replace(zt,t=>t.toUpperCase()).replace(/[-_]/g,"");function Me(e,t=!0){return C(e)?e.displayName||e.name:e.name||t&&e.__name}function He(e,t,n=!1){let o=Me(t);if(!o&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(o=s[1])}if(!o&&e){const s=r=>{for(const i in r)if(r[i]===t)return i};o=s(e.components)||e.parent&&s(e.parent.type.components)||s(e.appContext.components)}return o?Pt(o):n?"App":"Anonymous"}function ze(e){return C(e)&&"__vccOpts"in e}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;const xt=l.defineComponent({inheritAttrs:!0,__name:"MyopVueComponent",props:{flowId:{},componentId:{},onReady:{type:Function}},setup(e,{expose:t}){const n=e,o=l.useAttrs(),s=l.useSlots(),r=l.ref(null),i=l.ref(!0),c=l.ref(null),a=l.ref(null),u=l.getCurrentInstance(),m=l.ref(null);Nt(()=>{a&&a.value&&a.value(o)}),l.onMounted(async()=>{if(r.value){const R=await P.CloudRepository.Main.fetchComponent(n.componentId,n.flowId);c.value=await V.hostSDK.loadComponent(R,r==null?void 0:r.value,{_environment:{props:o,slots:s,context:u==null?void 0:u.appContext,vueContainerRef:r,defineUpdater:b=>{a.value=b},defineInnerVueComponentRef:b=>{m.value=b.value}}}),i.value=!1,n.onReady&&n.onReady(c.value,m.value)}});const g=l.reactive({});return t(g),l.watchEffect(()=>{Object.assign(g,m.value)}),(R,b)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",l.mergeProps(l.unref(o),{ref_key:"myopContainer",ref:r}),null,16),i.value?l.renderSlot(R.$slots,"loading",{key:0}):l.createCommentVNode("",!0)],64))}});let k=P.CloudRepository.Main;const Pe=()=>k,xe=(e,t,n)=>k.isPreloaded(e,t,n),Lt=e=>k.getPreloadedParams(e),jt=()=>{k=new P.CloudRepository("http://localhost:9292")},Ut=e=>{k=new P.CloudRepository(e)},vt=e=>{k=e},Bt=e=>{k.setEnvironment(e)},Jt=async(e,t,n)=>Promise.allSettled(e.map(o=>k.fetchComponentV2(o,t,n)));d.MyopComponent=We,d.MyopContainer=xt,d.MyopFallback=ye,d.MyopLoader=he,d.enableLocalDev=jt,d.getCloudRepository=Pe,d.getPreloadedParams=Lt,d.isPreloaded=xe,d.preloadComponents=Jt,d.setCloudRepository=vt,d.setCloudRepositoryUrl=Ut,d.setEnvironment=Bt,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
15
+ `,...st(s)),console.warn(...r)}ne=!1}function rt(){let e=I[I.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function st(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
16
+ `],...it(n))}),t}function it({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,s=` at <${Me(e.component,e.type,o)}`,r=">"+n;return e.props?[s,...lt(e.props),r]:[s+r]}function lt(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...Ee(o,e[o]))}),n.length>3&&t.push(" ..."),t}function Ee(e,t,n){return S(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ce(t)?(t=Ee(e,L(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):C(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=L(t),n?t:[`${e}=`,t])}const oe={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function j(e,t,n,o){try{return o?e(...o):e()}catch(s){re(s,t,n)}}function Se(e,t,n,o){if(C(e)){const s=j(e,t,n,o);return s&&Ye(s)&&s.catch(r=>{re(r,t,n)}),s}if(_(e)){const s=[];for(let r=0;r<e.length;r++)s.push(Se(e[r],t,n,o));return s}else process.env.NODE_ENV!=="production"&&N(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function re(e,t,n,o=!0){const s=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||We;if(t){let c=t.parent;const a=t.proxy,u=process.env.NODE_ENV!=="production"?oe[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const m=c.ec;if(m){for(let g=0;g<m.length;g++)if(m[g](e,a,u)===!1)return}c=c.parent}if(r){j(r,null,10,[e,a,u]);return}}at(e,n,s,o,l)}function at(e,t,n,o=!0,s=!1){if(process.env.NODE_ENV!=="production"){const r=oe[t];if(n&&nt(n),N(`Unhandled error${r?` during execution of ${r}`:""}`),n&&ot(),o)throw e;console.error(e)}else{if(s)throw e;console.error(e)}}const h=[];let E=-1;const F=[];let w=null,T=0;const ct=Promise.resolve();let se=null;const ut=100;function ft(e){let t=E+1,n=h.length;for(;t<n;){const o=t+n>>>1,s=h[o],r=z(s);r<e||r===e&&s.flags&2?t=o+1:n=o}return t}function pt(e){if(!(e.flags&1)){const t=z(e),n=h[h.length-1];!n||!(e.flags&2)&&t>=z(n)?h.push(e):h.splice(ft(t),0,e),e.flags|=1,Ne()}}function Ne(){se||(se=ct.then(we))}function dt(e){_(e)?F.push(...e):w&&e.id===-1?w.splice(T+1,0,e):e.flags&1||(F.push(e),e.flags|=1),Ne()}function mt(e){if(F.length){const t=[...new Set(F)].sort((n,o)=>z(n)-z(o));if(F.length=0,w){w.push(...t);return}for(w=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),T=0;T<w.length;T++){const n=w[T];process.env.NODE_ENV!=="production"&&ke(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}w=null,T=0}}const z=e=>e.id==null?e.flags&2?-1:1/0:e.id;function we(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>ke(e,n):ye;try{for(E=0;E<h.length;E++){const n=h[E];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),j(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;E<h.length;E++){const n=h[E];n&&(n.flags&=-2)}E=-1,h.length=0,mt(e),se=null,(h.length||F.length)&&we(e)}}function ke(e,t){const n=e.get(t)||0;if(n>ut){const o=t.i,s=o&&Ae(o.type);return re(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const ie=new Map;process.env.NODE_ENV!=="production"&&(x().__VUE_HMR_RUNTIME__={createRecord:le(ht),rerender:le(yt),reload:le(gt)});const U=new Map;function ht(e,t){return U.has(e)?!1:(U.set(e,{initialDef:B(t),instances:new Set}),!0)}function B(e){return He(e)?e.__vccOpts:e}function yt(e,t){const n=U.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(o=>{t&&(o.render=t,B(o.type).render=t),o.renderCache=[],o.job.flags&8||o.update()}))}function gt(e,t){const n=U.get(e);if(!n)return;t=B(t),be(n.initialDef,t);const o=[...n.instances];for(let s=0;s<o.length;s++){const r=o[s],l=B(r.type);let c=ie.get(l);c||(l!==n.initialDef&&be(l,t),ie.set(l,c=new Set)),c.add(r),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(c.add(r),r.ceReload(t.styles),c.delete(r)):r.parent?pt(()=>{r.job.flags&8||(r.parent.update(),c.delete(r))}):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),r.root.ce&&r!==r.root&&r.root.ce._removeChildStyle(l)}dt(()=>{ie.clear()})}function be(e,t){X(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function le(e){return(t,n)=>{try{return e(t,n)}catch(o){console.error(o),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let $,v=[];function Oe(e,t){var n,o;$=e,$?($.enabled=!0,v.forEach(({event:s,args:r})=>$.emit(s,...r)),v=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{Oe(r,t)}),setTimeout(()=>{$||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,v=[])},3e3)):v=[]}let J=null,_t=null;const Ct=e=>e.__isTeleport;function Ve(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ve(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}x().requestIdleCallback,x().cancelIdleCallback;function Et(e,t,n=K,o=!1){if(n){const s=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...l)=>{const c=Mt(n),a=Se(t,n,e,l);return c(),a});return o?s.unshift(r):s.push(r),r}else if(process.env.NODE_ENV!=="production"){const s=Qe(oe[e].replace(/ hook$/,""));N(`${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const St=(e=>(t,n=K)=>{(!$e||e==="sp")&&Et(e,(...o)=>t(...o),n)})("u"),Nt=Symbol.for("v-ndc"),wt={};process.env.NODE_ENV!=="production"&&(wt.ownKeys=e=>(N("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));const kt={},Ie=e=>Object.getPrototypeOf(e)===kt,bt=e=>e.__isSuspense,Re=Symbol.for("v-fgt"),Ot=Symbol.for("v-txt"),Vt=Symbol.for("v-cmt");function It(e){return e?e.__v_isVNode===!0:!1}const Rt=(...e)=>Fe(...e),De=({key:e})=>e??null,W=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?S(e)||Ce(e)||C(e)?{i:J,r:e,k:t,f:!!n}:e:null);function Dt(e,t=null,n=null,o=0,s=null,r=e===Re?0:1,l=!1,c=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&De(t),ref:t&&W(t),scopeId:_t,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:J};return c?(ae(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=S(n)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&N("VNode created with invalid key (NaN). VNode type:",a.type),a}const Ft=process.env.NODE_ENV!=="production"?Rt:Fe;function Fe(e,t=null,n=null,o=0,s=null,r=!1){if((!e||e===Nt)&&(process.env.NODE_ENV!=="production"&&!e&&N(`Invalid vnode type when creating vnode: ${e}.`),e=Vt),It(e)){const c=q(e,t,!0);return n&&ae(c,n),c.patchFlag=-2,c}if(He(e)&&(e=e.__vccOpts),t){t=Tt(t);let{class:c,style:a}=t;c&&!S(c)&&(t.class=ee(c)),H(a)&&(te(a)&&!_(a)&&(a=X({},a)),t.style=Z(a))}const l=S(e)?1:bt(e)?128:Ct(e)?64:H(e)?4:C(e)?2:0;return process.env.NODE_ENV!=="production"&&l&4&&te(e)&&(e=L(e),N("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
17
+ Component that was made reactive: `,e)),Dt(e,t,n,o,s,l,r,!0)}function Tt(e){return e?te(e)||Ie(e)?X({},e):e:null}function q(e,t,n=!1,o=!1){const{props:s,ref:r,patchFlag:l,children:c,transition:a}=e,u=t?At(s||{},t):s,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&De(u),ref:t&&t.ref?n&&r?_(r)?r.concat(W(t)):[r,W(t)]:W(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&l===-1&&_(c)?c.map(Te):c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Re?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&q(e.ssContent),ssFallback:e.ssFallback&&q(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ve(m,a.clone(m)),m}function Te(e){const t=q(e);return _(e.children)&&(t.children=e.children.map(Te)),t}function $t(e=" ",t=0){return Ft(Ot,null,e,t)}function ae(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(_(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),ae(e,s()),s._c&&(s._d=!0));return}else n=32,!t._&&!Ie(t)&&(t._ctx=J);else C(t)?(t={default:t,_ctx:J},n=32):(t=String(t),o&64?(n=16,t=[$t(t)]):n=8);e.children=t,e.shapeFlag|=n}function At(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const s in o)if(s==="class")t.class!==o.class&&(t.class=ee([t.class,o.class]));else if(s==="style")t.style=Z([t.style,o.style]);else if(qe(s)){const r=t[s],l=o[s];l&&r!==l&&!(_(r)&&r.includes(l))&&(t[s]=r?[].concat(r,l):l)}else s!==""&&(t[s]=o[s])}return t}let K=null,ce;{const e=x(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),r=>{s.length>1?s.forEach(l=>l(r)):s[0](r)}};ce=t("__VUE_INSTANCE_SETTERS__",n=>K=n),t("__VUE_SSR_SETTERS__",n=>$e=n)}const Mt=e=>{const t=K;return ce(e),e.scope.on(),()=>{e.scope.off(),ce(t)}};let $e=!1;process.env.NODE_ENV;const Ht=/(?:^|[-_])\w/g,zt=e=>e.replace(Ht,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ae(e,t=!0){return C(e)?e.displayName||e.name:e.name||t&&e.__name}function Me(e,t,n=!1){let o=Ae(t);if(!o&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(o=s[1])}if(!o&&e){const s=r=>{for(const l in r)if(r[l]===t)return l};o=s(e.components)||e.parent&&s(e.parent.type.components)||s(e.appContext.components)}return o?zt(o):n?"App":"Anonymous"}function He(e){return C(e)&&"__vccOpts"in e}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;const Pt=i.defineComponent({inheritAttrs:!0,__name:"MyopVueComponent",props:{flowId:{},componentId:{},onReady:{type:Function}},setup(e,{expose:t}){const n=e,o=i.useAttrs(),s=i.useSlots(),r=i.ref(null),l=i.ref(!0),c=i.ref(null),a=i.ref(null),u=i.getCurrentInstance(),m=i.ref(null);St(()=>{a&&a.value&&a.value(o)}),i.onMounted(async()=>{if(r.value){const R=await P.CloudRepository.Main.fetchComponent(n.componentId,n.flowId);c.value=await V.hostSDK.loadComponent(R,r==null?void 0:r.value,{_environment:{props:o,slots:s,context:u==null?void 0:u.appContext,vueContainerRef:r,defineUpdater:b=>{a.value=b},defineInnerVueComponentRef:b=>{m.value=b.value}}}),l.value=!1,n.onReady&&n.onReady(c.value,m.value)}});const g=i.reactive({});return t(g),i.watchEffect(()=>{Object.assign(g,m.value)}),(R,b)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",i.mergeProps(i.unref(o),{ref_key:"myopContainer",ref:r}),null,16),l.value?i.renderSlot(R.$slots,"loading",{key:0}):i.createCommentVNode("",!0)],64))}});let k=P.CloudRepository.Main;const ze=()=>k,Pe=(e,t,n)=>k.isPreloaded(e,t,n),xt=e=>k.getPreloadedParams(e),Lt=()=>{k=new P.CloudRepository("http://localhost:9292")},jt=e=>{k=new P.CloudRepository(e)},Ut=e=>{k=e},Bt=e=>{k.setEnvironment(e)},vt=async(e,t,n)=>Promise.allSettled(e.map(o=>k.fetchComponentV2(o,t,n)));d.MyopComponent=Je,d.MyopContainer=Pt,d.MyopFallback=he,d.MyopLoader=me,d.enableLocalDev=Lt,d.getCloudRepository=ze,d.getPreloadedParams=xt,d.isPreloaded=Pe,d.preloadComponents=vt,d.setCloudRepository=Ut,d.setCloudRepositoryUrl=jt,d.setEnvironment=Bt,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myop/vue",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",