@myop/vue 0.0.23 → 0.0.24
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 +773 -665
- package/dist/index.umd.cjs +19 -14
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
var
|
|
3
|
-
var o = (
|
|
1
|
+
import { defineComponent as Gt, useAttrs as Jt, useSlots as Yt, ref as K, getCurrentInstance as Xt, onMounted as Qt, reactive as Zt, watchEffect as es, createElementBlock as ts, openBlock as ss, Fragment as ns, createElementVNode as is, renderSlot as os, createCommentVNode as rs, mergeProps as as, unref as ls } from "vue";
|
|
2
|
+
var cs = Object.defineProperty, ds = (e, t, s) => t in e ? cs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, p = (e, t, s) => ds(e, typeof t != "symbol" ? t + "" : t, s), U = (e, t, s) => new Promise((n, i) => {
|
|
3
|
+
var o = (c) => {
|
|
4
4
|
try {
|
|
5
|
-
|
|
5
|
+
l(s.next(c));
|
|
6
6
|
} catch (d) {
|
|
7
7
|
i(d);
|
|
8
8
|
}
|
|
9
|
-
}, r = (
|
|
9
|
+
}, r = (c) => {
|
|
10
10
|
try {
|
|
11
|
-
|
|
11
|
+
l(s.throw(c));
|
|
12
12
|
} catch (d) {
|
|
13
13
|
i(d);
|
|
14
14
|
}
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
}),
|
|
15
|
+
}, l = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(o, r);
|
|
16
|
+
l((s = s.apply(e, t)).next());
|
|
17
|
+
}), D = () => "10000000-1000-4000-8000-100000000000".replace(
|
|
18
18
|
/[018]/g,
|
|
19
19
|
(e) => (+e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +e / 4).toString(16)
|
|
20
|
-
),
|
|
20
|
+
), us = class {
|
|
21
21
|
constructor() {
|
|
22
|
-
p(this, "id",
|
|
22
|
+
p(this, "id", D()), p(this, "myop", !0), p(this, "content"), p(this, "source"), p(this, "destination"), p(this, "route"), p(this, "ref"), p(this, "direction"), p(this, "cleanable", !1);
|
|
23
23
|
}
|
|
24
24
|
static create(...t) {
|
|
25
25
|
return new this(...t);
|
|
@@ -27,36 +27,36 @@ var os = Object.defineProperty, rs = (e, t, s) => t in e ? os(e, t, { enumerable
|
|
|
27
27
|
isTypeof(t) {
|
|
28
28
|
return t.messageType === this.messageType;
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, hs = class extends us {
|
|
31
31
|
constructor(t) {
|
|
32
|
-
super(), this.handler = t, p(this, "handlerUniqueId",
|
|
32
|
+
super(), this.handler = t, p(this, "handlerUniqueId", D());
|
|
33
33
|
}
|
|
34
|
-
},
|
|
35
|
-
let t = e.match(
|
|
34
|
+
}, ps = "ExecuteScriptReplyMessage", fs = /(?:function\s*\w*\s*\([^)]*\)\s*\{([\s\S]*?)\}|(\([^)]*\)\s*=>\s*\{([\s\S]*?)\}))\s*$/, ms = /\(\s*[^)]+\s*\)\s*=>\s*(.+)/, gs = (e) => {
|
|
35
|
+
let t = e.match(fs);
|
|
36
36
|
if (t)
|
|
37
37
|
return t[1] || t[3];
|
|
38
38
|
{
|
|
39
|
-
let s = e.match(
|
|
39
|
+
let s = e.match(ms);
|
|
40
40
|
if (s)
|
|
41
41
|
return s[1].trim();
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, qe = class extends hs {
|
|
44
44
|
constructor(t, s = () => {
|
|
45
45
|
}, n) {
|
|
46
|
-
super(s), this.scriptInputs = n, p(this, "replyMessageKey",
|
|
46
|
+
super(s), this.scriptInputs = n, p(this, "replyMessageKey", ps), p(this, "messageType", "ExecuteScriptMessage"), p(this, "script", ""), this.script = t.toString(), this.content = t.toString(), this.content = gs(this.content);
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
p(
|
|
50
|
-
p(
|
|
51
|
-
var
|
|
49
|
+
p(qe, "replierKey", "send");
|
|
50
|
+
p(qe, "completeStreamKey", "completeStream");
|
|
51
|
+
var Pe = class {
|
|
52
52
|
constructor() {
|
|
53
|
-
p(this, "_runTimeInstanceId", "runtime-instance-id-" +
|
|
53
|
+
p(this, "_runTimeInstanceId", "runtime-instance-id-" + D()), p(this, "_runTimeId", "runtime-id-" + D()), p(this, "_runTimeName", "runtime-name-" + D()), p(this, "id", this._runTimeId), p(this, "name", this._runTimeName), p(this, "description", ""), p(this, "loader", null), p(this, "withLoader", (t) => (this.loader = t, this)), p(this, "withHTMLLoader", (t) => (t.type = "HTMLLoader", this.loader = t, this)), p(this, "build", () => this);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
p(
|
|
57
|
-
var
|
|
56
|
+
p(Pe, "create", () => new Pe());
|
|
57
|
+
var Le = class {
|
|
58
58
|
constructor() {
|
|
59
|
-
p(this, "_runTimeInstanceId", "runtime-instance-id-" +
|
|
59
|
+
p(this, "_runTimeInstanceId", "runtime-instance-id-" + D()), p(this, "_runTimeId", "runtime-id-" + D()), p(this, "_runTimeName", "runtime-name-" + D()), p(this, "instance", {
|
|
60
60
|
id: this._runTimeInstanceId,
|
|
61
61
|
componentId: this._runTimeId,
|
|
62
62
|
componentName: this._runTimeName,
|
|
@@ -89,21 +89,21 @@ var $e = class {
|
|
|
89
89
|
}), p(this, "build", () => JSON.parse(JSON.stringify(this)));
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
p(
|
|
92
|
+
p(Le, "create", () => new Le());
|
|
93
93
|
var pe = class {
|
|
94
94
|
// private components: Record<string, Promise<IUserFlow>> = {};
|
|
95
95
|
constructor(t = "https://cloud.myop.dev") {
|
|
96
96
|
this._baseUrl = t, p(this, "userFlows", {});
|
|
97
97
|
}
|
|
98
98
|
fetchComponent(t, s) {
|
|
99
|
-
return
|
|
99
|
+
return U(this, null, function* () {
|
|
100
100
|
return s ? (yield this.fetchFlow(s)).components.find((i) => i.type.id === t) : (yield this.fetchAutoFlow(t)).components[0];
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
fetchAutoFlow(t) {
|
|
104
|
-
return
|
|
104
|
+
return U(this, null, function* () {
|
|
105
105
|
return this.userFlows[t] || (this.userFlows[t] = new Promise(
|
|
106
|
-
(s, n) =>
|
|
106
|
+
(s, n) => U(this, null, function* () {
|
|
107
107
|
try {
|
|
108
108
|
const o = yield (yield fetch(
|
|
109
109
|
`${this._baseUrl}/flow?id=${t}&auto=true`
|
|
@@ -117,9 +117,9 @@ var pe = class {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
fetchFlow(t) {
|
|
120
|
-
return
|
|
120
|
+
return U(this, null, function* () {
|
|
121
121
|
return this.userFlows[t] || (this.userFlows[t] = new Promise(
|
|
122
|
-
(s, n) =>
|
|
122
|
+
(s, n) => U(this, null, function* () {
|
|
123
123
|
try {
|
|
124
124
|
const o = yield (yield fetch(
|
|
125
125
|
`${this._baseUrl}/flow?id=${t}&resolve=components`
|
|
@@ -134,34 +134,34 @@ var pe = class {
|
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
p(pe, "Main", new pe());
|
|
137
|
-
var
|
|
137
|
+
var ys = pe, je = Object.defineProperty, vs = Object.defineProperties, ws = Object.getOwnPropertyDescriptors, Ae = Object.getOwnPropertySymbols, Ms = Object.prototype.hasOwnProperty, _s = Object.prototype.propertyIsEnumerable, fe = (e, t, s) => t in e ? je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, v = (e, t) => {
|
|
138
138
|
for (var s in t || (t = {}))
|
|
139
|
-
|
|
140
|
-
if (
|
|
141
|
-
for (var s of
|
|
142
|
-
|
|
139
|
+
Ms.call(t, s) && fe(e, s, t[s]);
|
|
140
|
+
if (Ae)
|
|
141
|
+
for (var s of Ae(t))
|
|
142
|
+
_s.call(t, s) && fe(e, s, t[s]);
|
|
143
143
|
return e;
|
|
144
|
-
}, G = (e, t) =>
|
|
144
|
+
}, G = (e, t) => vs(e, ws(t)), Es = (e, t) => {
|
|
145
145
|
for (var s in t)
|
|
146
|
-
|
|
147
|
-
}, a = (e, t, s) => fe(e, typeof t != "symbol" ? t + "" : t, s),
|
|
148
|
-
var o = (
|
|
146
|
+
je(e, s, { get: t[s], enumerable: !0 });
|
|
147
|
+
}, a = (e, t, s) => fe(e, typeof t != "symbol" ? t + "" : t, s), m = (e, t, s) => new Promise((n, i) => {
|
|
148
|
+
var o = (c) => {
|
|
149
149
|
try {
|
|
150
|
-
|
|
150
|
+
l(s.next(c));
|
|
151
151
|
} catch (d) {
|
|
152
152
|
i(d);
|
|
153
153
|
}
|
|
154
|
-
}, r = (
|
|
154
|
+
}, r = (c) => {
|
|
155
155
|
try {
|
|
156
|
-
|
|
156
|
+
l(s.throw(c));
|
|
157
157
|
} catch (d) {
|
|
158
158
|
i(d);
|
|
159
159
|
}
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
}), J = "__federation__",
|
|
163
|
-
window[J] && window[J][e] && window[J][e][
|
|
164
|
-
},
|
|
160
|
+
}, l = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(o, r);
|
|
161
|
+
l((s = s.apply(e, t)).next());
|
|
162
|
+
}), J = "__federation__", Be = "onLoad", We = (e, t) => {
|
|
163
|
+
window[J] && window[J][e] && window[J][e][Be] && window[J][e][Be]({ [e]: t });
|
|
164
|
+
}, g = {
|
|
165
165
|
//host to component
|
|
166
166
|
InitRequest: "InitRequest",
|
|
167
167
|
InitResponse: "InitResponse",
|
|
@@ -186,55 +186,76 @@ var ps = pe, ze = Object.defineProperty, fs = Object.defineProperties, ms = Obje
|
|
|
186
186
|
ResizeObserverMessage: "ResizeObserverMessage"
|
|
187
187
|
}
|
|
188
188
|
}, me = {};
|
|
189
|
-
|
|
190
|
-
AddEventListenerMessage: () =>
|
|
191
|
-
BaseMyopMessage: () =>
|
|
192
|
-
BindClickMessage: () =>
|
|
193
|
-
ChangeTextMessage: () =>
|
|
194
|
-
CleanupMessage: () =>
|
|
195
|
-
CleanupReplayMessage: () =>
|
|
196
|
-
ClickReplayMessage: () =>
|
|
197
|
-
CreateRefComponentMessage: () =>
|
|
189
|
+
Es(me, {
|
|
190
|
+
AddEventListenerMessage: () => Ds,
|
|
191
|
+
BaseMyopMessage: () => w,
|
|
192
|
+
BindClickMessage: () => xs,
|
|
193
|
+
ChangeTextMessage: () => Rs,
|
|
194
|
+
CleanupMessage: () => pt,
|
|
195
|
+
CleanupReplayMessage: () => ft,
|
|
196
|
+
ClickReplayMessage: () => Ye,
|
|
197
|
+
CreateRefComponentMessage: () => at,
|
|
198
198
|
CustomRefMessage: () => ge,
|
|
199
|
-
DetectMyopRefsMessage: () =>
|
|
200
|
-
DetectedMyopRefsMessage: () =>
|
|
201
|
-
DisposeMessage: () =>
|
|
202
|
-
ElementValueReplayMessage: () =>
|
|
203
|
-
EnvelopedMessage: () =>
|
|
204
|
-
EventListenerCallbackMessage: () =>
|
|
205
|
-
ExecuteComponentMethod: () =>
|
|
199
|
+
DetectMyopRefsMessage: () => Fs,
|
|
200
|
+
DetectedMyopRefsMessage: () => dt,
|
|
201
|
+
DisposeMessage: () => mt,
|
|
202
|
+
ElementValueReplayMessage: () => nt,
|
|
203
|
+
EnvelopedMessage: () => lt,
|
|
204
|
+
EventListenerCallbackMessage: () => tt,
|
|
205
|
+
ExecuteComponentMethod: () => R,
|
|
206
206
|
ExecuteScriptMessage: () => H,
|
|
207
|
-
ExecuteScriptReplyMessage: () =>
|
|
208
|
-
GetAttributeMessage: () =>
|
|
209
|
-
GetAttributeReplayMessage: () =>
|
|
210
|
-
GetElementValueMessage: () =>
|
|
211
|
-
InitMessage: () =>
|
|
212
|
-
InitRequest: () =>
|
|
213
|
-
InitResponse: () =>
|
|
214
|
-
MessageDirection: () =>
|
|
215
|
-
MutationObserverMessage: () =>
|
|
216
|
-
MyopBindMessage: () =>
|
|
217
|
-
MyopBindReplayMessage: () =>
|
|
218
|
-
MyopElementMessage: () =>
|
|
219
|
-
Ref: () =>
|
|
207
|
+
ExecuteScriptReplyMessage: () => Ze,
|
|
208
|
+
GetAttributeMessage: () => Ps,
|
|
209
|
+
GetAttributeReplayMessage: () => Ls,
|
|
210
|
+
GetElementValueMessage: () => $s,
|
|
211
|
+
InitMessage: () => Ce,
|
|
212
|
+
InitRequest: () => ot,
|
|
213
|
+
InitResponse: () => it,
|
|
214
|
+
MessageDirection: () => b,
|
|
215
|
+
MutationObserverMessage: () => Bs,
|
|
216
|
+
MyopBindMessage: () => T,
|
|
217
|
+
MyopBindReplayMessage: () => I,
|
|
218
|
+
MyopElementMessage: () => Ts,
|
|
219
|
+
Ref: () => z,
|
|
220
220
|
RefComponentCreatedMessage: () => ye,
|
|
221
|
-
ResizeObserverMessage: () =>
|
|
222
|
-
SetAttributeMessage: () =>
|
|
223
|
-
SetInnerHtml: () =>
|
|
224
|
-
SetMutationObserverMessage: () =>
|
|
225
|
-
SetResizeObserverMessage: () =>
|
|
226
|
-
stripFunction: () =>
|
|
221
|
+
ResizeObserverMessage: () => Ks,
|
|
222
|
+
SetAttributeMessage: () => Os,
|
|
223
|
+
SetInnerHtml: () => Ns,
|
|
224
|
+
SetMutationObserverMessage: () => As,
|
|
225
|
+
SetResizeObserverMessage: () => Vs,
|
|
226
|
+
stripFunction: () => Qe
|
|
227
227
|
});
|
|
228
|
-
var
|
|
228
|
+
var B = () => "10000000-1000-4000-8000-100000000000".replace(
|
|
229
229
|
/[018]/g,
|
|
230
230
|
(e) => (+e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +e / 4).toString(16)
|
|
231
|
-
),
|
|
231
|
+
), bs = (e) => {
|
|
232
|
+
const t = [...e].map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
233
|
+
return [
|
|
234
|
+
t.slice(0, 8),
|
|
235
|
+
t.slice(8, 12),
|
|
236
|
+
t.slice(12, 16),
|
|
237
|
+
t.slice(16, 20),
|
|
238
|
+
t.slice(20)
|
|
239
|
+
].join("-");
|
|
240
|
+
}, Cs = (e) => {
|
|
241
|
+
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
242
|
+
for (; t.length % 4; ) t += "=";
|
|
243
|
+
const s = atob(t);
|
|
244
|
+
return Uint8Array.from(s, (n) => n.charCodeAt(0));
|
|
245
|
+
}, Ss = (e) => {
|
|
246
|
+
const t = Cs(e);
|
|
247
|
+
if (t.length % 16 !== 0) throw new Error("Invalid input length");
|
|
248
|
+
const s = [];
|
|
249
|
+
for (let n = 0; n < t.length; n += 16)
|
|
250
|
+
s.push(bs(t.slice(n, n + 16)));
|
|
251
|
+
return s;
|
|
252
|
+
}, Is = (e) => new Promise((t) => setTimeout(t, e)), b = class {
|
|
232
253
|
};
|
|
233
|
-
a(
|
|
234
|
-
a(
|
|
235
|
-
var
|
|
254
|
+
a(b, "down", "down");
|
|
255
|
+
a(b, "up", "up");
|
|
256
|
+
var w = class {
|
|
236
257
|
constructor() {
|
|
237
|
-
a(this, "id",
|
|
258
|
+
a(this, "id", B()), a(this, "myop", !0), a(this, "content"), a(this, "source"), a(this, "destination"), a(this, "route"), a(this, "ref"), a(this, "direction"), a(this, "cleanable", !1);
|
|
238
259
|
}
|
|
239
260
|
static create(...e) {
|
|
240
261
|
return new this(...e);
|
|
@@ -242,21 +263,21 @@ var v = class {
|
|
|
242
263
|
isTypeof(e) {
|
|
243
264
|
return e.messageType === this.messageType;
|
|
244
265
|
}
|
|
245
|
-
},
|
|
266
|
+
}, Ts = class extends w {
|
|
246
267
|
constructor(e) {
|
|
247
268
|
super(), this.ref = e;
|
|
248
269
|
}
|
|
249
|
-
},
|
|
270
|
+
}, I = class extends w {
|
|
250
271
|
constructor(e) {
|
|
251
272
|
super(), this.replayToHandler = e;
|
|
252
273
|
}
|
|
253
|
-
},
|
|
274
|
+
}, T = class extends w {
|
|
254
275
|
constructor(e) {
|
|
255
|
-
super(), this.handler = e, a(this, "handlerUniqueId",
|
|
276
|
+
super(), this.handler = e, a(this, "handlerUniqueId", B());
|
|
256
277
|
}
|
|
257
|
-
},
|
|
278
|
+
}, z = class Ge {
|
|
258
279
|
constructor(t, s) {
|
|
259
|
-
this.refConfig = t, this.component = s, a(this, "myop", !0), a(this, "__nonProxied"), this.__nonProxied = G(
|
|
280
|
+
this.refConfig = t, this.component = s, a(this, "myop", !0), a(this, "__nonProxied"), this.__nonProxied = G(v({}, this), {
|
|
260
281
|
component: null
|
|
261
282
|
// in order to be serializable
|
|
262
283
|
});
|
|
@@ -272,163 +293,163 @@ var v = class {
|
|
|
272
293
|
behavior: {
|
|
273
294
|
type: "code"
|
|
274
295
|
}
|
|
275
|
-
}), new
|
|
296
|
+
}), new Ge(i, n);
|
|
276
297
|
}
|
|
277
|
-
},
|
|
298
|
+
}, Je = "ClickReplayMessage", xs = class extends T {
|
|
278
299
|
constructor(e, t) {
|
|
279
|
-
super(t), this.ref = e, a(this, "replyMessageKey",
|
|
300
|
+
super(t), this.ref = e, a(this, "replyMessageKey", Je), a(this, "messageType", "BindClickMessage"), a(this, "cleanable", !0);
|
|
280
301
|
}
|
|
281
|
-
},
|
|
302
|
+
}, Ye = class extends I {
|
|
282
303
|
constructor() {
|
|
283
|
-
super(...arguments), a(this, "messageType",
|
|
304
|
+
super(...arguments), a(this, "messageType", Je);
|
|
284
305
|
}
|
|
285
|
-
},
|
|
306
|
+
}, Rs = class extends w {
|
|
286
307
|
constructor(e, t) {
|
|
287
308
|
super(), this.ref = e, a(this, "messageType", "ChangeTextMessage"), this.content = t;
|
|
288
309
|
}
|
|
289
|
-
},
|
|
290
|
-
let t = e.match(
|
|
310
|
+
}, Xe = "ExecuteScriptReplyMessage", ks = /(?:function\s*\w*\s*\([^)]*\)\s*\{([\s\S]*?)\}|(\([^)]*\)\s*=>\s*\{([\s\S]*?)\}))\s*$/, Hs = /\(\s*[^)]+\s*\)\s*=>\s*(.+)/, Qe = (e) => {
|
|
311
|
+
let t = e.match(ks);
|
|
291
312
|
if (t)
|
|
292
313
|
return t[1] || t[3];
|
|
293
314
|
{
|
|
294
|
-
let s = e.match(
|
|
315
|
+
let s = e.match(Hs);
|
|
295
316
|
if (s)
|
|
296
317
|
return s[1].trim();
|
|
297
318
|
}
|
|
298
|
-
}, H = class extends
|
|
319
|
+
}, H = class extends T {
|
|
299
320
|
constructor(e, t = () => {
|
|
300
321
|
}, s) {
|
|
301
|
-
super(t), this.scriptInputs = s, a(this, "replyMessageKey",
|
|
322
|
+
super(t), this.scriptInputs = s, a(this, "replyMessageKey", Xe), a(this, "messageType", "ExecuteScriptMessage"), a(this, "script", ""), this.script = e.toString(), this.content = e.toString(), this.content = Qe(this.content);
|
|
302
323
|
}
|
|
303
324
|
};
|
|
304
325
|
a(H, "replierKey", "send");
|
|
305
326
|
a(H, "completeStreamKey", "completeStream");
|
|
306
|
-
var
|
|
327
|
+
var Ze = class extends I {
|
|
307
328
|
constructor(e, t) {
|
|
308
|
-
super(e), this.replayToHandler = e, this.content = t, a(this, "messageType",
|
|
329
|
+
super(e), this.replayToHandler = e, this.content = t, a(this, "messageType", Xe);
|
|
309
330
|
}
|
|
310
331
|
}, ge = class extends H {
|
|
311
332
|
constructor(e, t, s = () => {
|
|
312
333
|
}) {
|
|
313
334
|
super(({ rootRef: n, elementId: i, _script: o, __scriptInputs: r }) => {
|
|
314
|
-
const
|
|
315
|
-
return
|
|
316
|
-
}, s), this.scriptInputs = t, this.scriptInputs = G(
|
|
335
|
+
const l = (n.shadowRoot || n.container).querySelectorAll(`[myop-id='${i}']`);
|
|
336
|
+
return l.length ? (r.ref = l[0], new Function(`return (${o})(...arguments)`)(r)) : null;
|
|
337
|
+
}, s), this.scriptInputs = t, this.scriptInputs = G(v({}, t), {
|
|
317
338
|
//_script: stripFunction(script.toString()),
|
|
318
339
|
_script: e.toString()
|
|
319
340
|
});
|
|
320
341
|
}
|
|
321
|
-
},
|
|
342
|
+
}, et = "EventListenerCallbackMessage", Ds = class extends T {
|
|
322
343
|
// {} // empty
|
|
323
344
|
constructor(e, t, s) {
|
|
324
|
-
super(s), this.ref = e, this.type = t, this.handler = s, a(this, "replyMessageKey",
|
|
345
|
+
super(s), this.ref = e, this.type = t, this.handler = s, a(this, "replyMessageKey", et), a(this, "messageType", "AddEventListenerMessage"), a(this, "cleanable", !0), a(this, "serializableSkeleton", !1);
|
|
325
346
|
}
|
|
326
347
|
withSerializableSkeleton(e) {
|
|
327
348
|
return this.serializableSkeleton = e, this;
|
|
328
349
|
}
|
|
329
|
-
},
|
|
350
|
+
}, tt = class extends I {
|
|
330
351
|
constructor(e, t) {
|
|
331
|
-
super(e), this.replayToHandler = e, this.e = t, a(this, "messageType",
|
|
352
|
+
super(e), this.replayToHandler = e, this.e = t, a(this, "messageType", et), this.content = {
|
|
332
353
|
e: t
|
|
333
354
|
};
|
|
334
355
|
}
|
|
335
|
-
},
|
|
356
|
+
}, Os = class extends w {
|
|
336
357
|
constructor(e, t, s) {
|
|
337
358
|
super(), this.ref = e, this.name = t, this.value = s, a(this, "messageType", "SetAttributeMessage");
|
|
338
359
|
}
|
|
339
|
-
},
|
|
360
|
+
}, st = "ElementValueReplayMessage", $s = class extends T {
|
|
340
361
|
constructor(e, t) {
|
|
341
|
-
super(t), this.ref = e, a(this, "replyMessageKey",
|
|
362
|
+
super(t), this.ref = e, a(this, "replyMessageKey", st), a(this, "messageType", "GetElementValueMessage");
|
|
342
363
|
}
|
|
343
|
-
},
|
|
364
|
+
}, nt = class extends I {
|
|
344
365
|
constructor(e) {
|
|
345
|
-
super(), this.content = e, a(this, "messageType",
|
|
366
|
+
super(), this.content = e, a(this, "messageType", st);
|
|
346
367
|
}
|
|
347
|
-
},
|
|
368
|
+
}, Ns = class extends w {
|
|
348
369
|
constructor(e, t) {
|
|
349
370
|
super(), this.ref = e, a(this, "messageType", "SetInnerHtml"), this.content = t;
|
|
350
371
|
}
|
|
351
|
-
},
|
|
372
|
+
}, Ce = class extends w {
|
|
352
373
|
constructor(e) {
|
|
353
374
|
super(), a(this, "messageType", "InitMessage"), this.content = { id: e };
|
|
354
375
|
}
|
|
355
376
|
isTypeof(e) {
|
|
356
377
|
return e.messageType === this.messageType;
|
|
357
378
|
}
|
|
358
|
-
},
|
|
379
|
+
}, it = class extends Ce {
|
|
359
380
|
constructor() {
|
|
360
381
|
super(...arguments), a(this, "messageType", "InitResponse");
|
|
361
382
|
}
|
|
362
|
-
},
|
|
383
|
+
}, ot = class extends w {
|
|
363
384
|
constructor() {
|
|
364
385
|
super(...arguments), a(this, "messageType", "InitRequest");
|
|
365
386
|
}
|
|
366
|
-
},
|
|
387
|
+
}, rt = "RefComponentCreatedMessage", at = class extends T {
|
|
367
388
|
constructor(e, t, s, n) {
|
|
368
|
-
super(n), this.refConfig = e, this.nestedComponentConfig = t, this.options = s, a(this, "replyMessageKey",
|
|
389
|
+
super(n), this.refConfig = e, this.nestedComponentConfig = t, this.options = s, a(this, "replyMessageKey", rt), a(this, "messageType", "CreateRefComponentMessage");
|
|
369
390
|
}
|
|
370
|
-
}, ye = class extends
|
|
391
|
+
}, ye = class extends I {
|
|
371
392
|
constructor(e, t, s) {
|
|
372
|
-
super(e), this.replayToHandler = e, this.nestedRefs = t, this.failed = s, a(this, "messageType",
|
|
393
|
+
super(e), this.replayToHandler = e, this.nestedRefs = t, this.failed = s, a(this, "messageType", rt);
|
|
373
394
|
}
|
|
374
|
-
},
|
|
395
|
+
}, lt = class extends w {
|
|
375
396
|
constructor(e, t) {
|
|
376
397
|
super(), this.destination = e, this.message = t, a(this, "messageType", "EnvelopedMessage");
|
|
377
398
|
const s = t;
|
|
378
399
|
this.route = [e, ...s.route ? s.route : []];
|
|
379
400
|
}
|
|
380
|
-
},
|
|
401
|
+
}, ct = "DetectedMyopRefsMessage", Fs = class extends T {
|
|
381
402
|
constructor() {
|
|
382
|
-
super(...arguments), a(this, "messageType", "DetectMyopRefsMessage"), a(this, "replyMessageKey",
|
|
403
|
+
super(...arguments), a(this, "messageType", "DetectMyopRefsMessage"), a(this, "replyMessageKey", ct);
|
|
383
404
|
}
|
|
384
|
-
},
|
|
405
|
+
}, dt = class extends I {
|
|
385
406
|
constructor(e, t) {
|
|
386
|
-
super(e), this.replayToHandler = e, a(this, "messageType",
|
|
407
|
+
super(e), this.replayToHandler = e, a(this, "messageType", ct), this.content = t;
|
|
387
408
|
}
|
|
388
409
|
isTypeof(e) {
|
|
389
410
|
return e.messageType === this.messageType;
|
|
390
411
|
}
|
|
391
|
-
},
|
|
412
|
+
}, ut = "GetAttributeReplayMessage", Ps = class extends T {
|
|
392
413
|
constructor(e, t, s) {
|
|
393
|
-
super(s), this.ref = e, this.name = t, a(this, "replyMessageKey",
|
|
414
|
+
super(s), this.ref = e, this.name = t, a(this, "replyMessageKey", ut), a(this, "messageType", "GetAttributeMessage");
|
|
394
415
|
}
|
|
395
|
-
},
|
|
416
|
+
}, Ls = class extends I {
|
|
396
417
|
constructor(e) {
|
|
397
|
-
super(), this.content = e, a(this, "messageType",
|
|
418
|
+
super(), this.content = e, a(this, "messageType", ut);
|
|
398
419
|
}
|
|
399
|
-
},
|
|
420
|
+
}, R = class extends w {
|
|
400
421
|
constructor(e) {
|
|
401
422
|
super(), this.method = e, a(this, "messageType", "ExecuteComponentMethod");
|
|
402
423
|
}
|
|
403
|
-
},
|
|
424
|
+
}, As = class extends w {
|
|
404
425
|
constructor() {
|
|
405
426
|
super(...arguments), a(this, "messageType", "SetMutationObserverMessage");
|
|
406
427
|
}
|
|
407
|
-
},
|
|
428
|
+
}, Bs = class extends w {
|
|
408
429
|
constructor() {
|
|
409
430
|
super(...arguments), a(this, "messageType", "MutationObserverMessage");
|
|
410
431
|
}
|
|
411
|
-
},
|
|
432
|
+
}, ht = "CleanupReplayMessage", pt = class extends T {
|
|
412
433
|
constructor(e, t) {
|
|
413
|
-
super(t), this.cleanupForMessageId = e, a(this, "replyMessageKey",
|
|
434
|
+
super(t), this.cleanupForMessageId = e, a(this, "replyMessageKey", ht), a(this, "messageType", "CleanupMessage");
|
|
414
435
|
}
|
|
415
|
-
},
|
|
436
|
+
}, ft = class extends I {
|
|
416
437
|
constructor(e) {
|
|
417
|
-
super(), this.customCleanup = e, a(this, "messageType",
|
|
438
|
+
super(), this.customCleanup = e, a(this, "messageType", ht);
|
|
418
439
|
}
|
|
419
|
-
},
|
|
440
|
+
}, mt = class extends w {
|
|
420
441
|
constructor() {
|
|
421
442
|
super(...arguments), a(this, "messageType", "DisposeMessage");
|
|
422
443
|
}
|
|
423
|
-
},
|
|
444
|
+
}, Vs = class extends w {
|
|
424
445
|
constructor() {
|
|
425
446
|
super(...arguments), a(this, "cleanable", !0), a(this, "messageType", "SetResizeObserverMessage");
|
|
426
447
|
}
|
|
427
|
-
},
|
|
448
|
+
}, Ks = class extends w {
|
|
428
449
|
constructor() {
|
|
429
450
|
super(...arguments), a(this, "messageType", "ResizeObserverMessage");
|
|
430
451
|
}
|
|
431
|
-
},
|
|
452
|
+
}, Se = class {
|
|
432
453
|
constructor(e, t, s) {
|
|
433
454
|
this.componentDefinition = e, this.container = t, a(this, "id", ""), a(this, "messageHandlers", {}), a(this, "element"), a(this, "_markedForDisposed", !1), a(this, "bind", (i, o) => {
|
|
434
455
|
this.messageHandlers[i] || (this.messageHandlers[i] = []), this.messageHandlers[i].includes(o) || this.messageHandlers[i].push(o);
|
|
@@ -436,16 +457,16 @@ var Ye = class extends S {
|
|
|
436
457
|
if (!r)
|
|
437
458
|
throw new Error("can't use component.bindWhen without an handler");
|
|
438
459
|
this.messageHandlers[i] || (this.messageHandlers[i] = []);
|
|
439
|
-
const
|
|
440
|
-
return
|
|
441
|
-
const d =
|
|
442
|
-
d > -1 &&
|
|
460
|
+
const l = this.messageHandlers[i], c = (d) => o(d) ? (r(d), !0) : !1;
|
|
461
|
+
return l.push(c), () => {
|
|
462
|
+
const d = l.indexOf(c);
|
|
463
|
+
d > -1 && l.splice(d, 1);
|
|
443
464
|
};
|
|
444
465
|
}), a(this, "setInitiated", () => {
|
|
445
466
|
this.isInitiated = !0, this._whenInitiatedResolve && this._whenInitiatedResolve();
|
|
446
467
|
}), a(this, "isInitiated", !1), a(this, "_whenInitiatedResolve"), a(this, "_whenInitiatedReject"), a(this, "_whenInitiated", new Promise((i, o) => {
|
|
447
468
|
this._whenInitiatedResolve = i, this._whenInitiatedReject = o;
|
|
448
|
-
})), a(this, "initiated", () => this._whenInitiated), a(this, "props", {}), a(this, "refs", {}), this.id = (s == null ? void 0 : s.id) ||
|
|
469
|
+
})), a(this, "initiated", () => this._whenInitiated), a(this, "props", {}), a(this, "refs", {}), this.id = (s == null ? void 0 : s.id) || oe.Instance().assignId(e);
|
|
449
470
|
const n = s != null && s.timeout ? s == null ? void 0 : s.timeout : 5 * 1e3;
|
|
450
471
|
setTimeout(() => {
|
|
451
472
|
!this.isInitiated && this._whenInitiatedReject && !this._markedForDisposed && this._whenInitiatedReject(`timeout_${n} ${this.id}`);
|
|
@@ -462,7 +483,7 @@ var Ye = class extends S {
|
|
|
462
483
|
this._markedForDisposed = e;
|
|
463
484
|
}
|
|
464
485
|
onMessageReceived(e) {
|
|
465
|
-
if (e.messageType ===
|
|
486
|
+
if (e.messageType === g.ExecuteComponentMethod) {
|
|
466
487
|
const s = e;
|
|
467
488
|
return this[s.method] ? this[s.method](s.content) : console.log(`method not found ${s.method} on component`, this), !0;
|
|
468
489
|
}
|
|
@@ -476,21 +497,21 @@ var Ye = class extends S {
|
|
|
476
497
|
return !1;
|
|
477
498
|
}
|
|
478
499
|
sendCleanupMessage(e) {
|
|
479
|
-
e.source = this.id, e.destination = this.id, e.direction =
|
|
500
|
+
e.source = this.id, e.destination = this.id, e.direction = b.down;
|
|
480
501
|
const t = this.bindWhen(e.replyMessageKey, (n) => n.replayToHandler === e.handlerUniqueId, (n) => {
|
|
481
502
|
e.handler(n), t();
|
|
482
503
|
}), s = e.handler;
|
|
483
504
|
delete e.handler, this.send(e), e.handler = s;
|
|
484
505
|
}
|
|
485
506
|
send(e) {
|
|
486
|
-
e.source || (e.source = this.id), e.destination || (e.destination = this.id), e.direction =
|
|
507
|
+
e.source || (e.source = this.id), e.destination || (e.destination = this.id), e.direction = b.down;
|
|
487
508
|
let t;
|
|
488
509
|
if (e.handler) {
|
|
489
510
|
const s = e;
|
|
490
511
|
t = this.bindWhen(s.replyMessageKey, (n) => n.replayToHandler === s.handlerUniqueId, s.handler), delete e.handler;
|
|
491
512
|
}
|
|
492
513
|
return e.ref && (e.ref = e.ref.__nonProxied || e.ref), e.cleanable ? () => {
|
|
493
|
-
this.sendCleanupMessage(new
|
|
514
|
+
this.sendCleanupMessage(new pt(e.id, (s) => {
|
|
494
515
|
})), t && t();
|
|
495
516
|
} : () => {
|
|
496
517
|
};
|
|
@@ -498,39 +519,39 @@ var Ye = class extends S {
|
|
|
498
519
|
dispose() {
|
|
499
520
|
if (this.markedForDisposed = !0, !this.isInitiated)
|
|
500
521
|
return;
|
|
501
|
-
console.log("disposing component", this.id), this.send(new
|
|
522
|
+
console.log("disposing component", this.id), this.send(new mt());
|
|
502
523
|
const e = this.messageHandlers.onDispose;
|
|
503
524
|
e && e.forEach((t) => {
|
|
504
525
|
t(null);
|
|
505
526
|
}), this.messageHandlers = {}, this.id += "_disposed", this.isInitiated = !1;
|
|
506
527
|
}
|
|
507
|
-
},
|
|
528
|
+
}, Us = class {
|
|
508
529
|
constructor(e, t, s, n, i) {
|
|
509
530
|
this.myopId = e, this.htmlTagName = t, this.BoundingRect = s, this.offsetTop = n, this.offsetLeft = i, a(this, "type", "MyopElementRef");
|
|
510
531
|
}
|
|
511
|
-
},
|
|
532
|
+
}, zs = (e) => m(void 0, null, function* () {
|
|
512
533
|
if (typeof e == "function")
|
|
513
534
|
e();
|
|
514
535
|
else if (e instanceof Promise) {
|
|
515
536
|
const t = yield e;
|
|
516
537
|
typeof t == "function" && t();
|
|
517
538
|
}
|
|
518
|
-
}),
|
|
539
|
+
}), qs = class {
|
|
519
540
|
//TODO : add dispose method
|
|
520
541
|
constructor(e) {
|
|
521
542
|
this.messageToHost = e;
|
|
522
543
|
}
|
|
523
|
-
},
|
|
544
|
+
}, js = class extends qs {
|
|
524
545
|
constructor(e, t) {
|
|
525
546
|
super(e), this.messageToHost = e, this.context = t;
|
|
526
547
|
}
|
|
527
|
-
},
|
|
548
|
+
}, Ws = class {
|
|
528
549
|
//onMessageReceived: (msg: IMyopMessage) => void;
|
|
529
550
|
constructor(e, t) {
|
|
530
551
|
this.id = e, this.context = t, a(this, "send", (s) => {
|
|
531
552
|
});
|
|
532
553
|
}
|
|
533
|
-
},
|
|
554
|
+
}, Gs = class {
|
|
534
555
|
constructor() {
|
|
535
556
|
a(this, "messageToHandleAfterInit", []), a(this, "components", {}), a(this, "alwaysPassEnvelopesToHost", !1), a(this, "messageCleanupCache", {});
|
|
536
557
|
}
|
|
@@ -538,28 +559,28 @@ var Ye = class extends S {
|
|
|
538
559
|
const t = e.data ? e.data : e.detail;
|
|
539
560
|
if (!(!t || !t.myop)) {
|
|
540
561
|
let s = t;
|
|
541
|
-
if (s.direction !==
|
|
562
|
+
if (s.direction !== b.down)
|
|
542
563
|
return;
|
|
543
|
-
if (s.messageType ===
|
|
564
|
+
if (s.messageType === g.DisposeMessage) {
|
|
544
565
|
s.destination && delete this.components[s.destination];
|
|
545
566
|
return;
|
|
546
567
|
}
|
|
547
|
-
if (s.messageType ===
|
|
568
|
+
if (s.messageType === g.InitMessage) {
|
|
548
569
|
const n = s.content.id;
|
|
549
570
|
if (this.components[n])
|
|
550
571
|
return;
|
|
551
|
-
this.components[n] = new
|
|
572
|
+
this.components[n] = new Ws(n), this.messageToHost(new it(n));
|
|
552
573
|
return;
|
|
553
574
|
}
|
|
554
|
-
if (s.messageType ===
|
|
575
|
+
if (s.messageType === g.EnvelopedMessage) {
|
|
555
576
|
const n = s, i = n.message;
|
|
556
577
|
if (s = i, this.alwaysPassEnvelopesToHost || this.components[s.destination]) {
|
|
557
|
-
const o = myop.hostSDK.components.find((
|
|
578
|
+
const o = myop.hostSDK.components.find((l) => l.id === i.destination);
|
|
558
579
|
if (o) {
|
|
559
580
|
o.send(i);
|
|
560
581
|
return;
|
|
561
582
|
}
|
|
562
|
-
const r = myop.hostSDK.components.find((
|
|
583
|
+
const r = myop.hostSDK.components.find((l) => l.id === n.destination);
|
|
563
584
|
if (r) {
|
|
564
585
|
r.send(i);
|
|
565
586
|
return;
|
|
@@ -568,9 +589,9 @@ var Ye = class extends S {
|
|
|
568
589
|
return;
|
|
569
590
|
}
|
|
570
591
|
if (s.messageType) {
|
|
571
|
-
if (s.messageType ===
|
|
572
|
-
const n = s, i = this.messageCleanupCache[n.cleanupForMessageId], o = new
|
|
573
|
-
o.destination = s.destination, i ? (delete this.messageCleanupCache[n.cleanupForMessageId],
|
|
592
|
+
if (s.messageType === g.CleanupMessage) {
|
|
593
|
+
const n = s, i = this.messageCleanupCache[n.cleanupForMessageId], o = new ft(!!i);
|
|
594
|
+
o.destination = s.destination, i ? (delete this.messageCleanupCache[n.cleanupForMessageId], zs(i).then(() => {
|
|
574
595
|
this.messageToHost(o, n);
|
|
575
596
|
}).catch(() => {
|
|
576
597
|
})) : this.messageToHost(o, n);
|
|
@@ -597,7 +618,7 @@ To ensure cleanup properly set 'cleanable' true at message definition and return
|
|
|
597
618
|
console.log("unsupported message type");
|
|
598
619
|
}
|
|
599
620
|
}
|
|
600
|
-
},
|
|
621
|
+
}, Ie = {
|
|
601
622
|
IframeLoader: "IframeLoader",
|
|
602
623
|
WebComponentLoader: "WebComponentLoader",
|
|
603
624
|
HTMLLoader: "HTMLLoader"
|
|
@@ -605,28 +626,37 @@ To ensure cleanup properly set 'cleanable' true at message definition and return
|
|
|
605
626
|
open: "open",
|
|
606
627
|
none: "none",
|
|
607
628
|
localFrame: "localFrame"
|
|
608
|
-
},
|
|
629
|
+
}, Te = class {
|
|
609
630
|
};
|
|
610
|
-
a(
|
|
611
|
-
a(
|
|
612
|
-
var
|
|
631
|
+
a(Te, "code", "code");
|
|
632
|
+
a(Te, "component", "component");
|
|
633
|
+
var Q = {
|
|
613
634
|
Segmented: "Segmented",
|
|
614
|
-
Dedicated: "Dedicated"
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
635
|
+
Dedicated: "Dedicated",
|
|
636
|
+
/**
|
|
637
|
+
* This Selector Type is not yet supported but will be added in a future release.
|
|
638
|
+
* Please check the documentation for updates.
|
|
639
|
+
*
|
|
640
|
+
* @type {string}
|
|
641
|
+
*/
|
|
642
|
+
Default: "Default"
|
|
643
|
+
}, gt = {
|
|
644
|
+
Segment: "Segment",
|
|
645
|
+
Promo: "Promo",
|
|
646
|
+
AB: "AB"
|
|
647
|
+
}, Js = class {
|
|
618
648
|
constructor(e, t) {
|
|
619
649
|
this.container = e, this.shadowRoot = t, a(this, "getRootDiv", () => (this.shadowRoot || this.container).querySelector("div")), a(this, "getRoot", () => this.shadowRoot || this.container);
|
|
620
650
|
}
|
|
621
|
-
}, we = (e) => e !== Object(e),
|
|
651
|
+
}, we = (e) => e !== Object(e), Ys = (e) => typeof e == "function", yt = (e) => {
|
|
622
652
|
if (we(e))
|
|
623
653
|
return !0;
|
|
624
|
-
if (
|
|
654
|
+
if (Ys(e) || Object.getPrototypeOf(e))
|
|
625
655
|
return !1;
|
|
626
656
|
for (const t in e) {
|
|
627
657
|
const s = e[t];
|
|
628
658
|
if (typeof s == "object") {
|
|
629
|
-
if (!
|
|
659
|
+
if (!yt(s))
|
|
630
660
|
return !1;
|
|
631
661
|
} else {
|
|
632
662
|
if (we(s))
|
|
@@ -661,7 +691,7 @@ var ce = {
|
|
|
661
691
|
return i;
|
|
662
692
|
}
|
|
663
693
|
return {};
|
|
664
|
-
},
|
|
694
|
+
}, Xs = {
|
|
665
695
|
notSerializableRefCall: (e, t) => {
|
|
666
696
|
throw new Error(`
|
|
667
697
|
The input provided to '${e.toString()}' is not serializable. Serialization is required to ensure that the data can be safely transferred to the skin implementation.
|
|
@@ -695,59 +725,59 @@ For more details on serialization and Myop message examples, refer to https://do
|
|
|
695
725
|
|
|
696
726
|
`);
|
|
697
727
|
}
|
|
698
|
-
},
|
|
728
|
+
}, Ve = class extends Se {
|
|
699
729
|
constructor(e, t, s) {
|
|
700
730
|
super(e, t.container, s), this.componentDefinition = e, this.parent = t, a(this, "send", (n) => {
|
|
701
731
|
const i = n.handler, o = super.send(n);
|
|
702
|
-
return this.parent.send(new
|
|
732
|
+
return this.parent.send(new lt(this.id, n)), n.handler = i, o;
|
|
703
733
|
}), a(this, "dispose", () => {
|
|
704
|
-
this.isInitiated && this.send(new
|
|
734
|
+
this.isInitiated && this.send(new R("dispose")), super.dispose();
|
|
705
735
|
});
|
|
706
736
|
}
|
|
707
737
|
hide() {
|
|
708
|
-
this.send(new
|
|
738
|
+
this.send(new R("hide"));
|
|
709
739
|
}
|
|
710
740
|
show() {
|
|
711
|
-
this.send(new
|
|
741
|
+
this.send(new R("show"));
|
|
712
742
|
}
|
|
713
743
|
inspect() {
|
|
714
|
-
return this.send(new
|
|
744
|
+
return this.send(new R("inspect"));
|
|
715
745
|
}
|
|
716
746
|
setHeightBasedOnDocumentElement() {
|
|
717
|
-
this.send(new
|
|
747
|
+
this.send(new R("setHeightBasedOnDocumentElement"));
|
|
718
748
|
}
|
|
719
749
|
setHeightBasedOnScrollHeight() {
|
|
720
|
-
this.send(new
|
|
750
|
+
this.send(new R("setHeightBasedOnScrollHeight"));
|
|
721
751
|
}
|
|
722
752
|
onMessageReceived(e) {
|
|
723
753
|
return super.onMessageReceived(e);
|
|
724
754
|
}
|
|
725
|
-
},
|
|
755
|
+
}, Qs = (e, t, s) => {
|
|
726
756
|
const n = document.createElement("a");
|
|
727
757
|
return n.textContent = e, n.style.position = "relative", n.style.padding = "0 5px", n.style.fontSize = "14px", n.style.top = "0", n.style.top = `${t}px`, n.style.transform = "translateX(-50%)", n.target = "_blank", n.href = `https://dashboard.myop.dev/dashboard/component/${s.id}`, n;
|
|
728
|
-
},
|
|
729
|
-
const r =
|
|
758
|
+
}, vt = (e, t, s, n, i, o) => {
|
|
759
|
+
const r = Qs(`${o.name} : ${t}`, s, o);
|
|
730
760
|
return n.insertBefore(r, i), i.style.border = "1px solid #007BFF", i.style.display = "block", () => {
|
|
731
761
|
i.style.border = "unset", n.removeChild(r);
|
|
732
762
|
};
|
|
733
|
-
},
|
|
734
|
-
const s = t.reduce((i, o) => G(
|
|
735
|
-
[o.name]:
|
|
763
|
+
}, Zs = (e, t) => {
|
|
764
|
+
const s = t.reduce((i, o) => G(v({}, i), {
|
|
765
|
+
[o.name]: v({}, o)
|
|
736
766
|
}), {}), n = {
|
|
737
767
|
get: (i, o) => {
|
|
738
768
|
const r = s[o];
|
|
739
|
-
return r.mode === "output" ? new Promise((
|
|
740
|
-
const
|
|
741
|
-
r.behavior.ref &&
|
|
742
|
-
|
|
743
|
-
}), r.behavior.params &&
|
|
769
|
+
return r.mode === "output" ? new Promise((l) => {
|
|
770
|
+
const c = [];
|
|
771
|
+
r.behavior.ref && c.push(z.create(r.behavior.ref)), c.push((u) => {
|
|
772
|
+
l(u);
|
|
773
|
+
}), r.behavior.params && c.push(...r.behavior.params);
|
|
744
774
|
const d = me[r.behavior.message];
|
|
745
|
-
e.send(new d(...
|
|
775
|
+
e.send(new d(...c));
|
|
746
776
|
}) : null;
|
|
747
777
|
},
|
|
748
778
|
set: (i, o, r) => {
|
|
749
|
-
const
|
|
750
|
-
if (!
|
|
779
|
+
const l = s[o];
|
|
780
|
+
if (!l)
|
|
751
781
|
throw new Error(
|
|
752
782
|
`Error: Undefined Prop
|
|
753
783
|
|
|
@@ -759,12 +789,12 @@ Component: ${e.componentDefinition.name}, ID: ${e.componentDefinition.id}
|
|
|
759
789
|
|
|
760
790
|
For more information, refer to the component page https://dashboard.myop.dev/dashboard/component/${e.componentDefinition.id} or consult the developer guide.`
|
|
761
791
|
);
|
|
762
|
-
if (
|
|
763
|
-
if (
|
|
764
|
-
const
|
|
765
|
-
|
|
766
|
-
const d = me[
|
|
767
|
-
return e.send(new d(...
|
|
792
|
+
if (l.mode === "input")
|
|
793
|
+
if (l.behavior.type === "message") {
|
|
794
|
+
const c = [];
|
|
795
|
+
l.behavior.ref && c.push(z.create(l.behavior.ref)), c.push(r), l.behavior.params && c.push(...l.behavior.params);
|
|
796
|
+
const d = me[l.behavior.message];
|
|
797
|
+
return e.send(new d(...c)), !0;
|
|
768
798
|
} else
|
|
769
799
|
throw new Error(
|
|
770
800
|
`Error: Unsupported Behavior
|
|
@@ -773,7 +803,7 @@ The 'behavior' field provided is not supported.
|
|
|
773
803
|
Component: ${e.componentDefinition.name}, ID: ${e.componentDefinition.id}
|
|
774
804
|
|
|
775
805
|
Prop Name: ${o}
|
|
776
|
-
Behavior Field: ${
|
|
806
|
+
Behavior Field: ${l.behavior.type}
|
|
777
807
|
|
|
778
808
|
Check the documentation for valid behavior options.`
|
|
779
809
|
);
|
|
@@ -781,16 +811,16 @@ Check the documentation for valid behavior options.`
|
|
|
781
811
|
}
|
|
782
812
|
};
|
|
783
813
|
return e.props = {}, e.props = new Proxy(e.props, n), e;
|
|
784
|
-
},
|
|
814
|
+
}, en = (e, t) => new Proxy(e, {
|
|
785
815
|
get(s, n) {
|
|
786
816
|
return s[n] ? s[n] : (...o) => new Promise((r) => {
|
|
787
|
-
o.forEach((
|
|
788
|
-
|
|
817
|
+
o.forEach((l) => {
|
|
818
|
+
yt(l) || Xs.notSerializableRefCall(n, l);
|
|
789
819
|
}), t.send(new ge(
|
|
790
|
-
({ ref:
|
|
791
|
-
if (
|
|
792
|
-
const h = c
|
|
793
|
-
return u(typeof h == "function" ? c
|
|
820
|
+
({ ref: l, propName: c, functionArgs: d, makeSerializable: u }) => {
|
|
821
|
+
if (l) {
|
|
822
|
+
const h = l[c];
|
|
823
|
+
return u(typeof h == "function" ? l[c](...d) : h, !0);
|
|
794
824
|
}
|
|
795
825
|
return null;
|
|
796
826
|
},
|
|
@@ -800,16 +830,16 @@ Check the documentation for valid behavior options.`
|
|
|
800
830
|
propName: n,
|
|
801
831
|
functionArgs: o
|
|
802
832
|
},
|
|
803
|
-
(
|
|
804
|
-
r(
|
|
833
|
+
(l) => {
|
|
834
|
+
r(l.content);
|
|
805
835
|
}
|
|
806
836
|
));
|
|
807
837
|
});
|
|
808
838
|
},
|
|
809
839
|
set(s, n, i) {
|
|
810
840
|
return t.send(new ge(
|
|
811
|
-
({ ref: o, propName: r, propValue:
|
|
812
|
-
o && (o[r] =
|
|
841
|
+
({ ref: o, propName: r, propValue: l }) => {
|
|
842
|
+
o && (o[r] = l);
|
|
813
843
|
},
|
|
814
844
|
{
|
|
815
845
|
//TODO : fix that
|
|
@@ -821,71 +851,71 @@ Check the documentation for valid behavior options.`
|
|
|
821
851
|
}
|
|
822
852
|
)), !0;
|
|
823
853
|
}
|
|
824
|
-
}),
|
|
854
|
+
}), wt = (e, t, s, n) => m(void 0, null, function* () {
|
|
825
855
|
const i = e.component;
|
|
826
856
|
if (!i)
|
|
827
857
|
throw new Error("cant createRefComponent with detached ref");
|
|
828
|
-
return new Promise((o, r) =>
|
|
829
|
-
const
|
|
830
|
-
s.push(
|
|
831
|
-
const
|
|
858
|
+
return new Promise((o, r) => m(void 0, null, function* () {
|
|
859
|
+
const l = new Ve(t.type, i, n);
|
|
860
|
+
s.push(l), yield i.initiated();
|
|
861
|
+
const c = setTimeout(() => {
|
|
832
862
|
r("timeout");
|
|
833
863
|
}, 5e3);
|
|
834
|
-
i.send(new
|
|
864
|
+
i.send(new at(
|
|
835
865
|
e.refConfig,
|
|
836
866
|
t,
|
|
837
|
-
G(
|
|
838
|
-
id:
|
|
867
|
+
G(v({}, n || {}), {
|
|
868
|
+
id: l.id,
|
|
839
869
|
_hasParent: !0
|
|
840
870
|
}),
|
|
841
|
-
(d) =>
|
|
842
|
-
if (clearTimeout(
|
|
871
|
+
(d) => m(void 0, null, function* () {
|
|
872
|
+
if (clearTimeout(c), d.failed) {
|
|
843
873
|
r("CreateRefComponentMessage failed");
|
|
844
874
|
return;
|
|
845
875
|
}
|
|
846
|
-
const u = s.find((h) => h.id ==
|
|
847
|
-
if (u !==
|
|
876
|
+
const u = s.find((h) => h.id == l.id);
|
|
877
|
+
if (u !== l) {
|
|
848
878
|
i.refs[e.refConfig.name] = u, o(u);
|
|
849
879
|
return;
|
|
850
880
|
} else
|
|
851
|
-
|
|
881
|
+
l.setInitiated(), i.refs[e.refConfig.name] = l;
|
|
852
882
|
d.nestedRefs.forEach((h) => {
|
|
853
|
-
const
|
|
854
|
-
|
|
883
|
+
const f = t.instance.resolvedNestedComponents.find((M) => M.type.id === h.componentDefinitionId).type, y = new Ve(f, l);
|
|
884
|
+
y.setInitiated(), l.refs[h.refName] = y, s.push(y);
|
|
855
885
|
});
|
|
856
886
|
try {
|
|
857
|
-
yield
|
|
887
|
+
yield Mt(l, t, s, !0), i.setHeightBasedOnScrollHeight && i.setHeightBasedOnScrollHeight(), o(l);
|
|
858
888
|
} catch (h) {
|
|
859
889
|
r(h);
|
|
860
890
|
}
|
|
861
891
|
})
|
|
862
892
|
));
|
|
863
893
|
}));
|
|
864
|
-
}),
|
|
894
|
+
}), Mt = (e, t, s, n = !1) => m(void 0, null, function* () {
|
|
865
895
|
e.refs || (e.refs = {});
|
|
866
|
-
const i = Object.values(e.componentDefinition.refs).map((o) => new Promise((r,
|
|
867
|
-
var
|
|
868
|
-
if (o.behavior.type ==
|
|
896
|
+
const i = Object.values(e.componentDefinition.refs).map((o) => new Promise((r, l) => m(void 0, null, function* () {
|
|
897
|
+
var c;
|
|
898
|
+
if (o.behavior.type == Te.component) {
|
|
869
899
|
if (n) {
|
|
870
900
|
r();
|
|
871
901
|
return;
|
|
872
902
|
}
|
|
873
903
|
let d = o.behavior.componentId;
|
|
874
904
|
d || (d = o.behavior.instance.componentId);
|
|
875
|
-
const u = (
|
|
905
|
+
const u = (c = t.instance.resolvedNestedComponents) == null ? void 0 : c.find((f) => f.type.id === d);
|
|
876
906
|
if (!u)
|
|
877
907
|
throw new Error("componentConfig provided without nestedComponentConfig check the config object");
|
|
878
|
-
const h =
|
|
908
|
+
const h = z.create("", o, e);
|
|
879
909
|
try {
|
|
880
|
-
const
|
|
881
|
-
e.refs[o.name] =
|
|
882
|
-
} catch (
|
|
883
|
-
|
|
910
|
+
const f = yield wt(h, u, s);
|
|
911
|
+
e.refs[o.name] = f, r();
|
|
912
|
+
} catch (f) {
|
|
913
|
+
l(f);
|
|
884
914
|
}
|
|
885
915
|
} else
|
|
886
916
|
try {
|
|
887
|
-
const d =
|
|
888
|
-
e.refs[o.name] =
|
|
917
|
+
const d = z.create("", o, e);
|
|
918
|
+
e.refs[o.name] = en(d, e), r();
|
|
889
919
|
} catch {
|
|
890
920
|
}
|
|
891
921
|
})));
|
|
@@ -894,7 +924,7 @@ Check the documentation for valid behavior options.`
|
|
|
894
924
|
} catch (o) {
|
|
895
925
|
throw o;
|
|
896
926
|
}
|
|
897
|
-
}),
|
|
927
|
+
}), _t = class extends Se {
|
|
898
928
|
constructor(e, t, s, n, i) {
|
|
899
929
|
super(e, s, i), this.componentConfig = e, this.container = s, this.IframeElement = n, a(this, "cleanupInspect"), a(this, "setHeightBasedOnDocumentElement", () => {
|
|
900
930
|
const o = this.send(new H(() => window.document.documentElement.scrollHeight, (r) => {
|
|
@@ -902,43 +932,43 @@ Check the documentation for valid behavior options.`
|
|
|
902
932
|
}));
|
|
903
933
|
}), a(this, "observeSizeBasedOnDocumentElement", () => {
|
|
904
934
|
this.send(new H(({ send: o }) => {
|
|
905
|
-
const { height: r, width:
|
|
935
|
+
const { height: r, width: l } = document.documentElement.getBoundingClientRect(), c = new ResizeObserver(() => {
|
|
906
936
|
const { height: d, width: u } = document.documentElement.getBoundingClientRect();
|
|
907
937
|
o({ height: d, width: u });
|
|
908
938
|
});
|
|
909
|
-
return
|
|
939
|
+
return c.observe(document.documentElement), c.observe(document.body), { height: r, width: l };
|
|
910
940
|
}, (o) => {
|
|
911
941
|
this.IframeElement.style.width = `${o.content.width}px`, this.IframeElement.style.height = `${o.content.height}px`;
|
|
912
942
|
}));
|
|
913
943
|
}), a(this, "setSizeBasedOnDocumentElement", () => {
|
|
914
944
|
const o = this.send(new H(() => {
|
|
915
|
-
const { height: r, width:
|
|
916
|
-
return { height: r, width:
|
|
945
|
+
const { height: r, width: l } = document.documentElement.getBoundingClientRect();
|
|
946
|
+
return { height: r, width: l };
|
|
917
947
|
}, (r) => {
|
|
918
948
|
this.IframeElement.style.width = `${r.content.width}px`, this.IframeElement.style.height = `${r.content.height}px`, o();
|
|
919
949
|
}));
|
|
920
950
|
}), a(this, "setHeightBasedOnScrollHeight", () => {
|
|
921
951
|
const o = this.send(new H(() => {
|
|
922
|
-
let
|
|
923
|
-
return
|
|
952
|
+
let l = 0;
|
|
953
|
+
return l++, l--, Math.max(
|
|
924
954
|
Math.max(
|
|
925
955
|
window.document.body.clientHeight,
|
|
926
956
|
window.document.body.scrollHeight
|
|
927
957
|
),
|
|
928
958
|
window.document.body.offsetHeight
|
|
929
|
-
) +
|
|
959
|
+
) + l + "px";
|
|
930
960
|
}, (r) => {
|
|
931
961
|
this.IframeElement.style.height = r.content, o();
|
|
932
962
|
}));
|
|
933
963
|
}), a(this, "send", (o) => {
|
|
934
|
-
var r,
|
|
935
|
-
let
|
|
936
|
-
if (
|
|
937
|
-
return this[
|
|
964
|
+
var r, l;
|
|
965
|
+
let c = v({}, o);
|
|
966
|
+
if (c.messageType === g.ExecuteComponentMethod)
|
|
967
|
+
return this[c.method](), () => {
|
|
938
968
|
};
|
|
939
|
-
|
|
940
|
-
const d = super.send(
|
|
941
|
-
return (
|
|
969
|
+
c.direction = b.down;
|
|
970
|
+
const d = super.send(c);
|
|
971
|
+
return (l = (r = this.IframeElement) == null ? void 0 : r.contentWindow) == null || l.postMessage(c, "*"), d;
|
|
942
972
|
}), a(this, "dispose", () => {
|
|
943
973
|
this.cleanupInspect && this.cleanupInspect(), super.dispose(), this.IframeElement.parentNode.removeChild(this.IframeElement);
|
|
944
974
|
}), t.loader.autoHeight && this.initiated().then(() => {
|
|
@@ -946,7 +976,7 @@ Check the documentation for valid behavior options.`
|
|
|
946
976
|
}), this.element = this.IframeElement;
|
|
947
977
|
}
|
|
948
978
|
inspect() {
|
|
949
|
-
return this.cleanupInspect ? this.cleanupInspect : (this.cleanupInspect =
|
|
979
|
+
return this.cleanupInspect ? this.cleanupInspect : (this.cleanupInspect = vt(this.id, "MyopIframeComponent", 10, this.container, this.IframeElement, this.componentDefinition), () => {
|
|
950
980
|
this.cleanupInspect(), this.cleanupInspect = void 0;
|
|
951
981
|
});
|
|
952
982
|
}
|
|
@@ -957,9 +987,9 @@ Check the documentation for valid behavior options.`
|
|
|
957
987
|
this.IframeElement.style.opacity = "1", this.IframeElement.style.position = "unset", this.IframeElement.style.pointerEvents = "all", this.IframeElement.style.visibility = "visible";
|
|
958
988
|
}
|
|
959
989
|
onMessageReceived(e) {
|
|
960
|
-
return e.messageType ===
|
|
990
|
+
return e.messageType === g.In.MutationObserverMessage || e.messageType === g.In.ResizeObserverMessage ? (this.setHeightBasedOnScrollHeight(), !0) : super.onMessageReceived(e);
|
|
961
991
|
}
|
|
962
|
-
},
|
|
992
|
+
}, xe = class {
|
|
963
993
|
constructor() {
|
|
964
994
|
a(this, "appendChild", (e, t, s) => {
|
|
965
995
|
var n;
|
|
@@ -974,24 +1004,24 @@ Check the documentation for valid behavior options.`
|
|
|
974
1004
|
return e.appendChild(t);
|
|
975
1005
|
});
|
|
976
1006
|
}
|
|
977
|
-
},
|
|
1007
|
+
}, tn = (e, t, s) => {
|
|
978
1008
|
const n = new URL(e);
|
|
979
1009
|
return n.searchParams.append(t, s), n.toString();
|
|
980
|
-
},
|
|
1010
|
+
}, sn = class extends xe {
|
|
981
1011
|
constructor() {
|
|
982
|
-
super(...arguments), a(this, "type",
|
|
1012
|
+
super(...arguments), a(this, "type", Ie.IframeLoader), a(this, "load", (e, t, s, n) => m(this, null, function* () {
|
|
983
1013
|
let i;
|
|
984
1014
|
const o = t.loader;
|
|
985
1015
|
if ((s == null ? void 0 : s.nodeName) === "IFRAME")
|
|
986
1016
|
console.log("needs to load into an exsisting Iframe...", o.url, s), i = s, i.src = o.url;
|
|
987
1017
|
else {
|
|
988
|
-
const r =
|
|
1018
|
+
const r = B(), l = `myop-comp-${r}`;
|
|
989
1019
|
i = document.createElement("iframe"), s.querySelector('[id^="myop-comp-"]') || (s.innerHTML = ""), n != null && n.hidden && (i.style.visibility = "hidden"), i = this.appendChild(s, i, n);
|
|
990
|
-
let
|
|
991
|
-
n != null && n._hasParent && (
|
|
1020
|
+
let c = t.loader.url;
|
|
1021
|
+
n != null && n._hasParent && (c = tn(c, "_myop-comp", r));
|
|
992
1022
|
let d = "";
|
|
993
1023
|
n != null && n.elementAttributes && (d = Object.entries(n == null ? void 0 : n.elementAttributes).map(([u, h]) => h === "" || h === null || h === void 0 ? u : `${u}="${String(h)}"`).join(" ")), i.outerHTML = `<iframe
|
|
994
|
-
id="${
|
|
1024
|
+
id="${l}"
|
|
995
1025
|
style="
|
|
996
1026
|
padding: 0;
|
|
997
1027
|
margin: 0;
|
|
@@ -1003,21 +1033,21 @@ Check the documentation for valid behavior options.`
|
|
|
1003
1033
|
position: ${n != null && n.hidden ? "absolute" : "static"};
|
|
1004
1034
|
pointer-events: ${n != null && n.hidden ? "none" : "all"};
|
|
1005
1035
|
"
|
|
1006
|
-
src="${
|
|
1036
|
+
src="${c}"
|
|
1007
1037
|
${d}
|
|
1008
|
-
></iframe>`, i = s.querySelector(`#${
|
|
1038
|
+
></iframe>`, i = s.querySelector(`#${l}`);
|
|
1009
1039
|
}
|
|
1010
|
-
return new
|
|
1040
|
+
return new _t(e, t, s, i, n);
|
|
1011
1041
|
}));
|
|
1012
1042
|
}
|
|
1013
|
-
},
|
|
1043
|
+
}, Et = {
|
|
1014
1044
|
webcomponent_message_key: "myop_webcomponent_message"
|
|
1015
|
-
},
|
|
1045
|
+
}, bt = class extends Se {
|
|
1016
1046
|
constructor(e, t, s, n, i) {
|
|
1017
1047
|
super(e, s, i), this.container = s, this.customElement = n, a(this, "cleanupInspect", () => {
|
|
1018
1048
|
}), a(this, "send", (o) => {
|
|
1019
|
-
let r =
|
|
1020
|
-
const
|
|
1049
|
+
let r = v({}, o);
|
|
1050
|
+
const l = super.send(r), c = new CustomEvent(Et.webcomponent_message_key, {
|
|
1021
1051
|
// @ts-ignore
|
|
1022
1052
|
detail: r
|
|
1023
1053
|
// bubbles: true,
|
|
@@ -1025,18 +1055,18 @@ Check the documentation for valid behavior options.`
|
|
|
1025
1055
|
// composed: true
|
|
1026
1056
|
});
|
|
1027
1057
|
try {
|
|
1028
|
-
this.customElement.dispatchEvent(
|
|
1058
|
+
this.customElement.dispatchEvent(c);
|
|
1029
1059
|
} catch (d) {
|
|
1030
1060
|
console.log("error while trying to dispatchEvent", d);
|
|
1031
1061
|
}
|
|
1032
|
-
return
|
|
1062
|
+
return l;
|
|
1033
1063
|
}), a(this, "dispose", () => {
|
|
1034
1064
|
var o;
|
|
1035
1065
|
super.dispose(), (o = this.customElement.parentNode) == null || o.removeChild(this.customElement);
|
|
1036
1066
|
}), this.element = n;
|
|
1037
1067
|
}
|
|
1038
1068
|
inspect() {
|
|
1039
|
-
return this.cleanupInspect =
|
|
1069
|
+
return this.cleanupInspect = vt(this.id, "MyopWebComponent", 0, this.container, this.customElement, this.componentDefinition), this.cleanupInspect;
|
|
1040
1070
|
}
|
|
1041
1071
|
hide() {
|
|
1042
1072
|
this.customElement.style.opacity = "0", this.customElement.style.position = "absolute", this.customElement.style.pointerEvents = "none", this.customElement.style.visibility = "hidden", this.customElement.style.height = "0", this.customElement.style.width = "0";
|
|
@@ -1044,31 +1074,31 @@ Check the documentation for valid behavior options.`
|
|
|
1044
1074
|
show() {
|
|
1045
1075
|
this.customElement.style.opacity = "1", this.customElement.style.position = "unset", this.customElement.style.pointerEvents = "all", this.customElement.style.visibility = "visible", this.customElement.style.height = "", this.customElement.style.width = "";
|
|
1046
1076
|
}
|
|
1047
|
-
},
|
|
1077
|
+
}, ce = {}, nn = class extends xe {
|
|
1048
1078
|
constructor() {
|
|
1049
|
-
super(...arguments), a(this, "type",
|
|
1079
|
+
super(...arguments), a(this, "type", Ie.WebComponentLoader), a(this, "load", (e, t, s, n) => m(this, null, function* () {
|
|
1050
1080
|
const i = t.loader;
|
|
1051
|
-
|
|
1081
|
+
ce[i.url] ? console.log("Module alreday loaded or in loading process") : ce[i.url] = new Promise((l, c) => {
|
|
1052
1082
|
const d = i.url, u = document.createElement("script");
|
|
1053
1083
|
u.type = "module", u.src = d, u.onload = () => {
|
|
1054
|
-
c();
|
|
1055
|
-
}, u.onerror = () => {
|
|
1056
1084
|
l();
|
|
1085
|
+
}, u.onerror = () => {
|
|
1086
|
+
c();
|
|
1057
1087
|
}, document.head.appendChild(u);
|
|
1058
|
-
}), yield
|
|
1059
|
-
let o = `myop-comp-${
|
|
1088
|
+
}), yield ce[i.url], yield Is(1);
|
|
1089
|
+
let o = `myop-comp-${B()}`;
|
|
1060
1090
|
const r = document.createElement(i.tag);
|
|
1061
|
-
return s.querySelector('[id^="myop-comp-"]') || (s.innerHTML = ""), r.id = o, n != null && n.hidden && (r.style.opacity = "0", r.style.position = "absolute", r.style.height = "0", r.style.width = "0", r.style.pointerEvents = "none", r.style.visibility = "hidden"), n != null && n._environment && (r._myopEnvironment = n == null ? void 0 : n._environment), this.appendChild(s, r, n), new
|
|
1091
|
+
return s.querySelector('[id^="myop-comp-"]') || (s.innerHTML = ""), r.id = o, n != null && n.hidden && (r.style.opacity = "0", r.style.position = "absolute", r.style.height = "0", r.style.width = "0", r.style.pointerEvents = "none", r.style.visibility = "hidden"), n != null && n._environment && (r._myopEnvironment = n == null ? void 0 : n._environment), this.appendChild(s, r, n), new bt(e, t, s, r, n);
|
|
1062
1092
|
}));
|
|
1063
1093
|
}
|
|
1064
|
-
},
|
|
1094
|
+
}, on = "0.1.42", x = class extends js {
|
|
1065
1095
|
constructor(e, t) {
|
|
1066
1096
|
super(e), this.context = t, a(this, "executor", (s) => {
|
|
1067
1097
|
if (s.destination) {
|
|
1068
1098
|
const n = s.destination;
|
|
1069
1099
|
if (this.context[n].context) {
|
|
1070
1100
|
const i = (o, r) => {
|
|
1071
|
-
this.messageToHost(G(
|
|
1101
|
+
this.messageToHost(G(v({}, o), {
|
|
1072
1102
|
source: s.destination ? s.destination : s.source,
|
|
1073
1103
|
destination: s.source ? s.source : s.destination
|
|
1074
1104
|
}), r);
|
|
@@ -1082,13 +1112,13 @@ Check the documentation for valid behavior options.`
|
|
|
1082
1112
|
}
|
|
1083
1113
|
}, q = {
|
|
1084
1114
|
id: "myop-id"
|
|
1085
|
-
}, V = (e, t) => t.querySelectorAll(`[${q.id}='${e.refConfig.selector}']`),
|
|
1115
|
+
}, V = (e, t) => t.querySelectorAll(`[${q.id}='${e.refConfig.selector}']`), rn = class extends x {
|
|
1086
1116
|
constructor() {
|
|
1087
|
-
super(...arguments), a(this, "messageType",
|
|
1117
|
+
super(...arguments), a(this, "messageType", g.BindClickMessage), a(this, "innerExecutor", (e, t, s) => {
|
|
1088
1118
|
const n = V(e.ref, t.shadowRoot), i = [];
|
|
1089
1119
|
return n.forEach((o) => {
|
|
1090
1120
|
const r = () => {
|
|
1091
|
-
s(new
|
|
1121
|
+
s(new Ye(e.handlerUniqueId));
|
|
1092
1122
|
};
|
|
1093
1123
|
o.addEventListener("click", r), i.push(() => {
|
|
1094
1124
|
o.removeEventListener("click", r);
|
|
@@ -1098,44 +1128,44 @@ Check the documentation for valid behavior options.`
|
|
|
1098
1128
|
};
|
|
1099
1129
|
});
|
|
1100
1130
|
}
|
|
1101
|
-
},
|
|
1131
|
+
}, an = class extends x {
|
|
1102
1132
|
constructor() {
|
|
1103
|
-
super(...arguments), a(this, "messageType",
|
|
1133
|
+
super(...arguments), a(this, "messageType", g.ChangeTextMessage), a(this, "innerExecutor", (e, t) => {
|
|
1104
1134
|
V(e.ref, t.shadowRoot).forEach((n) => {
|
|
1105
1135
|
n.textContent = e.content;
|
|
1106
1136
|
});
|
|
1107
1137
|
});
|
|
1108
1138
|
}
|
|
1109
|
-
},
|
|
1139
|
+
}, ln = class extends Js {
|
|
1110
1140
|
constructor(e, t) {
|
|
1111
1141
|
super(e, t), this.container = e, this.shadowRoot = t;
|
|
1112
1142
|
}
|
|
1113
|
-
},
|
|
1143
|
+
}, cn = class extends x {
|
|
1114
1144
|
constructor() {
|
|
1115
1145
|
super(...arguments), a(this, "innerExecutor", (e, t) => {
|
|
1116
1146
|
const s = t.shadowRoot.querySelectorAll(`[${q.id}]`);
|
|
1117
1147
|
let n = [];
|
|
1118
1148
|
s.forEach((i) => {
|
|
1119
1149
|
const o = i.getAttribute(q.id);
|
|
1120
|
-
o && n.push(new
|
|
1121
|
-
}), this.messageToHost(new
|
|
1122
|
-
}), a(this, "messageType",
|
|
1150
|
+
o && n.push(new Us(o, i.tagName, i.getBoundingClientRect(), i.offsetTop, i.offsetLeft));
|
|
1151
|
+
}), this.messageToHost(new dt(e.handlerUniqueId, n));
|
|
1152
|
+
}), a(this, "messageType", g.DetectMyopRefsMessage);
|
|
1123
1153
|
}
|
|
1124
|
-
},
|
|
1154
|
+
}, dn = class extends x {
|
|
1125
1155
|
constructor() {
|
|
1126
|
-
super(...arguments), a(this, "messageType",
|
|
1156
|
+
super(...arguments), a(this, "messageType", g.SetAttributeMessage), a(this, "innerExecutor", (e, t) => {
|
|
1127
1157
|
V(e.ref, t.shadowRoot).forEach((n) => {
|
|
1128
1158
|
n.setAttribute(e.name, e.value);
|
|
1129
1159
|
});
|
|
1130
1160
|
});
|
|
1131
1161
|
}
|
|
1132
|
-
},
|
|
1162
|
+
}, un = class extends x {
|
|
1133
1163
|
constructor() {
|
|
1134
|
-
super(...arguments), a(this, "messageType",
|
|
1164
|
+
super(...arguments), a(this, "messageType", g.AddEventListenerMessage), a(this, "innerExecutor", (e, t, s) => {
|
|
1135
1165
|
const n = V(e.ref, t.shadowRoot), i = [];
|
|
1136
1166
|
return n.forEach((o) => {
|
|
1137
|
-
const r = (
|
|
1138
|
-
s(new
|
|
1167
|
+
const r = (l) => {
|
|
1168
|
+
s(new tt(e.handlerUniqueId, L(l, e.serializableSkeleton)));
|
|
1139
1169
|
};
|
|
1140
1170
|
o.addEventListener(e.type, r), i.push(() => {
|
|
1141
1171
|
o.removeEventListener(e.type, r);
|
|
@@ -1145,23 +1175,23 @@ Check the documentation for valid behavior options.`
|
|
|
1145
1175
|
};
|
|
1146
1176
|
});
|
|
1147
1177
|
}
|
|
1148
|
-
},
|
|
1178
|
+
}, hn = class extends x {
|
|
1149
1179
|
constructor() {
|
|
1150
|
-
super(...arguments), a(this, "messageType",
|
|
1151
|
-
|
|
1180
|
+
super(...arguments), a(this, "messageType", g.CreateRefComponentMessage), a(this, "innerExecutor", (e, t, s) => {
|
|
1181
|
+
m(this, null, function* () {
|
|
1152
1182
|
const i = t.shadowRoot.querySelectorAll(`[${q.id}='${e.refConfig.selector}']`);
|
|
1153
1183
|
if (i.length === 1) {
|
|
1154
|
-
const o =
|
|
1184
|
+
const o = oe.Instance(), r = o.components.find((u) => u.id === e.options.id);
|
|
1155
1185
|
r && r.dispose();
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1158
|
-
const
|
|
1186
|
+
const l = o.components.indexOf(r);
|
|
1187
|
+
l !== -1 && o.components.splice(l, 1);
|
|
1188
|
+
const c = yield o.loadComponent(
|
|
1159
1189
|
e.nestedComponentConfig,
|
|
1160
1190
|
i.item(0),
|
|
1161
1191
|
e.options
|
|
1162
1192
|
), d = [];
|
|
1163
|
-
Object.keys(
|
|
1164
|
-
let h =
|
|
1193
|
+
Object.keys(c.refs).forEach((u) => {
|
|
1194
|
+
let h = c.refs[u];
|
|
1165
1195
|
h = h.__nonProxied || h, h.componentDefinition && d.push({
|
|
1166
1196
|
refName: u,
|
|
1167
1197
|
componentDefinitionId: h.componentDefinition.id
|
|
@@ -1174,20 +1204,20 @@ Check the documentation for valid behavior options.`
|
|
|
1174
1204
|
}).then();
|
|
1175
1205
|
});
|
|
1176
1206
|
}
|
|
1177
|
-
},
|
|
1207
|
+
}, pn = (e, t, s) => {
|
|
1178
1208
|
const n = e.scriptInputs ? e.scriptInputs : {};
|
|
1179
1209
|
n.makeSerializable = L, n.send = t, n.rootRef = s, n.__scriptInputs = n;
|
|
1180
1210
|
const o = new Function(`return (${e.script})(...arguments)`)(n);
|
|
1181
1211
|
t(o);
|
|
1182
|
-
},
|
|
1212
|
+
}, fn = class extends x {
|
|
1183
1213
|
constructor() {
|
|
1184
|
-
super(...arguments), a(this, "messageType",
|
|
1185
|
-
|
|
1186
|
-
s(new
|
|
1214
|
+
super(...arguments), a(this, "messageType", g.ExecuteScriptMessage), a(this, "innerExecutor", (e, t, s) => {
|
|
1215
|
+
pn(e, (i) => {
|
|
1216
|
+
s(new Ze(e.handlerUniqueId, i));
|
|
1187
1217
|
}, t);
|
|
1188
1218
|
});
|
|
1189
1219
|
}
|
|
1190
|
-
},
|
|
1220
|
+
}, Ct = (e) => {
|
|
1191
1221
|
if (!e) return null;
|
|
1192
1222
|
if (e.tagName === "FORM") {
|
|
1193
1223
|
new FormData(e);
|
|
@@ -1202,7 +1232,7 @@ Check the documentation for valid behavior options.`
|
|
|
1202
1232
|
const r = {
|
|
1203
1233
|
id: n.id,
|
|
1204
1234
|
name: o,
|
|
1205
|
-
value:
|
|
1235
|
+
value: Ct(n),
|
|
1206
1236
|
required: n.required,
|
|
1207
1237
|
validity: L(n.validity, !0),
|
|
1208
1238
|
myopId: i
|
|
@@ -1212,82 +1242,82 @@ Check the documentation for valid behavior options.`
|
|
|
1212
1242
|
}), t;
|
|
1213
1243
|
}
|
|
1214
1244
|
return e.type === "checkbox" || e.type === "radio" ? e.checked ? e.value : null : e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.tagName === "SELECT" ? e.value : e.isContentEditable ? e.innerText || e.textContent : null;
|
|
1215
|
-
},
|
|
1245
|
+
}, mn = class extends x {
|
|
1216
1246
|
constructor() {
|
|
1217
|
-
super(...arguments), a(this, "messageType",
|
|
1247
|
+
super(...arguments), a(this, "messageType", g.GetElementValueMessage), a(this, "innerExecutor", (e, t, s) => {
|
|
1218
1248
|
V(e.ref, t.shadowRoot).forEach((i) => {
|
|
1219
|
-
s(new
|
|
1249
|
+
s(new nt(Ct(i)), e);
|
|
1220
1250
|
});
|
|
1221
1251
|
});
|
|
1222
1252
|
}
|
|
1223
|
-
},
|
|
1253
|
+
}, gn = class extends x {
|
|
1224
1254
|
constructor() {
|
|
1225
|
-
super(...arguments), a(this, "messageType",
|
|
1255
|
+
super(...arguments), a(this, "messageType", g.SetInnerHtml), a(this, "innerExecutor", (e, t) => {
|
|
1226
1256
|
V(e.ref, t.shadowRoot).forEach((n) => {
|
|
1227
1257
|
n.innerHTML = e.content;
|
|
1228
1258
|
});
|
|
1229
1259
|
});
|
|
1230
1260
|
}
|
|
1231
|
-
},
|
|
1261
|
+
}, St = class extends Gs {
|
|
1232
1262
|
constructor() {
|
|
1233
1263
|
super(...arguments), a(this, "alwaysPassEnvelopesToHost", !0), a(this, "connectedCallback", (e, t) => {
|
|
1234
|
-
e.addEventListener(
|
|
1264
|
+
e.addEventListener(Et.webcomponent_message_key, (s) => {
|
|
1235
1265
|
const n = s.data ? s.data : s.detail;
|
|
1236
1266
|
if (!n || !n.myop) {
|
|
1237
1267
|
debugger;
|
|
1238
1268
|
throw new Error("recvied webcomponent_message with wrong type");
|
|
1239
1269
|
} else {
|
|
1240
1270
|
const i = n;
|
|
1241
|
-
if (this.handleIncomeMessages(s), i.messageType ===
|
|
1271
|
+
if (this.handleIncomeMessages(s), i.messageType === g.InitMessage) {
|
|
1242
1272
|
const o = i.content.id;
|
|
1243
|
-
this.components[o].context = new
|
|
1273
|
+
this.components[o].context = new ln(e, t);
|
|
1244
1274
|
}
|
|
1245
1275
|
}
|
|
1246
1276
|
}), setTimeout(() => {
|
|
1247
|
-
this.messageToHost(new
|
|
1277
|
+
this.messageToHost(new ot());
|
|
1248
1278
|
}, 1);
|
|
1249
1279
|
}), a(this, "messageToHost", (e, t) => {
|
|
1250
|
-
e.direction =
|
|
1280
|
+
e.direction = b.up, !e.replayToHandler && (t != null && t.handlerUniqueId) && (e.replayToHandler = t.handlerUniqueId), window.myop.hostSDK.send(e);
|
|
1251
1281
|
}), a(this, "supportedHandlers", [
|
|
1252
|
-
new
|
|
1253
|
-
new
|
|
1254
|
-
new
|
|
1255
|
-
new sn(this.messageToHost, this.components),
|
|
1256
|
-
new nn(this.messageToHost, this.components),
|
|
1257
|
-
new on(this.messageToHost, this.components),
|
|
1282
|
+
new an(this.messageToHost, this.components),
|
|
1283
|
+
new gn(this.messageToHost, this.components),
|
|
1284
|
+
new rn(this.messageToHost, this.components),
|
|
1258
1285
|
new cn(this.messageToHost, this.components),
|
|
1259
|
-
new
|
|
1286
|
+
new dn(this.messageToHost, this.components),
|
|
1287
|
+
new un(this.messageToHost, this.components),
|
|
1288
|
+
new fn(this.messageToHost, this.components),
|
|
1289
|
+
new mn(this.messageToHost, this.components),
|
|
1260
1290
|
//
|
|
1261
|
-
new
|
|
1291
|
+
new hn(this.messageToHost, this.components)
|
|
1262
1292
|
]), a(this, "init", () => {
|
|
1263
1293
|
});
|
|
1264
1294
|
}
|
|
1265
1295
|
};
|
|
1266
|
-
|
|
1267
|
-
var
|
|
1268
|
-
return Y || (Y = new
|
|
1296
|
+
We("WebComponentSDK", St);
|
|
1297
|
+
var Ke = [], Y, It = () => m(void 0, null, function* () {
|
|
1298
|
+
return Y || (Y = new St(), Y.init()), Y;
|
|
1269
1299
|
});
|
|
1270
|
-
function
|
|
1300
|
+
function yn(e, t) {
|
|
1271
1301
|
return class extends HTMLElement {
|
|
1272
1302
|
connectedCallback() {
|
|
1273
1303
|
const s = t === ve.open ? "open" : "closed", n = this.attachShadow({ mode: s });
|
|
1274
|
-
|
|
1304
|
+
It().then((i) => {
|
|
1275
1305
|
i.connectedCallback(this, n), n.innerHTML = e;
|
|
1276
1306
|
});
|
|
1277
1307
|
}
|
|
1278
1308
|
};
|
|
1279
1309
|
}
|
|
1280
|
-
var
|
|
1281
|
-
customElements.define(e,
|
|
1282
|
-
},
|
|
1310
|
+
var vn = (e, t, s) => {
|
|
1311
|
+
customElements.define(e, yn(t, s)), console.log(`define('${e}') was called, web component ready to use`);
|
|
1312
|
+
}, wn = (e) => e.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/(\d+)/g, "-$1").toLowerCase(), Mn = (e) => (e = wn(e), e.replace(/_/g, "-")), _n = class extends xe {
|
|
1283
1313
|
constructor() {
|
|
1284
|
-
super(...arguments), a(this, "type",
|
|
1314
|
+
super(...arguments), a(this, "type", Ie.HTMLLoader), a(this, "load", (e, t, s, n) => m(this, null, function* () {
|
|
1285
1315
|
const i = t.loader;
|
|
1286
|
-
let o = `myop-comp-${
|
|
1316
|
+
let o = `myop-comp-${B()}`, r;
|
|
1287
1317
|
if (i.shadowRootMode === ve.localFrame) {
|
|
1288
|
-
const
|
|
1318
|
+
const c = `myop-comp-${B()}`;
|
|
1289
1319
|
let d = document.createElement("iframe");
|
|
1290
|
-
s.querySelector('[id^="myop-comp-"]') || (s.innerHTML = ""), n != null && n.hidden && (d.style.visibility = "hidden"), d = this.appendChild(s, d, n), d.id =
|
|
1320
|
+
s.querySelector('[id^="myop-comp-"]') || (s.innerHTML = ""), n != null && n.hidden && (d.style.visibility = "hidden"), d = this.appendChild(s, d, n), d.id = c, d.setAttribute("style", `
|
|
1291
1321
|
padding: 0;
|
|
1292
1322
|
margin: 0;
|
|
1293
1323
|
overflow: hidden;
|
|
@@ -1299,7 +1329,20 @@ var hn = (e, t, s) => {
|
|
|
1299
1329
|
pointer-events: ${n != null && n.hidden ? "none" : "all"};
|
|
1300
1330
|
`), s.appendChild(d);
|
|
1301
1331
|
const u = d.contentDocument || d.contentWindow.document;
|
|
1302
|
-
u.open()
|
|
1332
|
+
u.open();
|
|
1333
|
+
let h = i.HTML;
|
|
1334
|
+
if (n != null && n._inspection) {
|
|
1335
|
+
const M = new DOMParser().parseFromString(i.HTML, "text/html"), Ne = M.implementation.createHTMLDocument();
|
|
1336
|
+
Ne.body.innerHTML = `<script>
|
|
1337
|
+
const beforeKeysWindow = new Set(Object.keys(window));
|
|
1338
|
+
window.myopState = {
|
|
1339
|
+
beforeKeysWindow,
|
|
1340
|
+
};
|
|
1341
|
+
<\/script>`;
|
|
1342
|
+
const Fe = Ne.body.firstChild;
|
|
1343
|
+
Fe && M.head && M.head.insertBefore(M.importNode(Fe, !0), M.head.firstChild), h = M.documentElement.outerHTML;
|
|
1344
|
+
}
|
|
1345
|
+
u.writeln(h), u.writeln(`<script src="${window.myop.__ROOT_SDK_PUBLIC_URL__}"><\/script>
|
|
1303
1346
|
<script>
|
|
1304
1347
|
window.__federation__ =
|
|
1305
1348
|
{ ...window.__federation__,
|
|
@@ -1318,41 +1361,102 @@ var hn = (e, t, s) => {
|
|
|
1318
1361
|
}
|
|
1319
1362
|
init().then();
|
|
1320
1363
|
<\/script>`), u.close();
|
|
1321
|
-
const
|
|
1364
|
+
const f = new _t(e, t, s, d, n);
|
|
1322
1365
|
return d.onload = () => {
|
|
1323
|
-
|
|
1324
|
-
},
|
|
1366
|
+
f.observeSizeBasedOnDocumentElement();
|
|
1367
|
+
}, f;
|
|
1325
1368
|
}
|
|
1326
1369
|
if (i.shadowRootMode === ve.none) {
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1329
|
-
|
|
1370
|
+
const l = document.createElement("template");
|
|
1371
|
+
l.innerHTML = i.HTML, r = l.content.firstElementChild, It().then((c) => {
|
|
1372
|
+
c.connectedCallback(r, r);
|
|
1330
1373
|
});
|
|
1331
1374
|
} else {
|
|
1332
|
-
const
|
|
1333
|
-
|
|
1375
|
+
const l = Mn(e.name + t.id);
|
|
1376
|
+
Ke.includes(l) || (vn(l, i.HTML, i.shadowRootMode), Ke.push(l)), r = document.createElement(l);
|
|
1334
1377
|
}
|
|
1335
|
-
return s.querySelector('[id^="myop-comp-"]') || (s.innerHTML = ""), r.id = o, n != null && n.hidden && (r.style.opacity = "0", r.style.position = "absolute", r.style.height = "0", r.style.width = "0", r.style.pointerEvents = "none", r.style.visibility = "hidden"), this.appendChild(s, r, n), new
|
|
1378
|
+
return s.querySelector('[id^="myop-comp-"]') || (s.innerHTML = ""), r.id = o, n != null && n.hidden && (r.style.opacity = "0", r.style.position = "absolute", r.style.height = "0", r.style.width = "0", r.style.pointerEvents = "none", r.style.visibility = "hidden"), this.appendChild(s, r, n), new bt(e, t, s, r, n);
|
|
1336
1379
|
}));
|
|
1337
1380
|
}
|
|
1338
|
-
},
|
|
1381
|
+
}, Me = class {
|
|
1382
|
+
// private components: Record<string, Promise<IUserFlow>> = {};
|
|
1383
|
+
constructor(t = "https://cloud.myop.dev") {
|
|
1384
|
+
this._baseUrl = t, a(this, "userFlows", {});
|
|
1385
|
+
}
|
|
1386
|
+
fetchComponent(t, s) {
|
|
1387
|
+
return m(this, null, function* () {
|
|
1388
|
+
return s ? (yield this.fetchFlow(s)).components.find((i) => i.type.id === t) : (yield this.fetchAutoFlow(t)).components[0];
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
fetchAutoFlow(t) {
|
|
1392
|
+
return m(this, null, function* () {
|
|
1393
|
+
return this.userFlows[t] || (this.userFlows[t] = new Promise(
|
|
1394
|
+
(s, n) => m(this, null, function* () {
|
|
1395
|
+
try {
|
|
1396
|
+
const o = yield (yield fetch(
|
|
1397
|
+
`${this._baseUrl}/flow?id=${t}&auto=true`
|
|
1398
|
+
)).json();
|
|
1399
|
+
s(o.item);
|
|
1400
|
+
} catch (i) {
|
|
1401
|
+
n(i);
|
|
1402
|
+
}
|
|
1403
|
+
})
|
|
1404
|
+
)), yield this.userFlows[t];
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
fetchFlow(t) {
|
|
1408
|
+
return m(this, null, function* () {
|
|
1409
|
+
return this.userFlows[t] || (this.userFlows[t] = new Promise(
|
|
1410
|
+
(s, n) => m(this, null, function* () {
|
|
1411
|
+
try {
|
|
1412
|
+
const o = yield (yield fetch(
|
|
1413
|
+
`${this._baseUrl}/flow?id=${t}&resolve=components`
|
|
1414
|
+
)).json();
|
|
1415
|
+
s(o.item);
|
|
1416
|
+
} catch (i) {
|
|
1417
|
+
n(i);
|
|
1418
|
+
}
|
|
1419
|
+
})
|
|
1420
|
+
)), yield this.userFlows[t];
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
};
|
|
1424
|
+
a(Me, "Main", new Me());
|
|
1425
|
+
var En = Me, bn = (e) => m(void 0, null, function* () {
|
|
1426
|
+
try {
|
|
1427
|
+
const t = new URL(window.location.href), n = new URLSearchParams(t.search).get("myopOverride");
|
|
1428
|
+
if (n) {
|
|
1429
|
+
const [i, o] = Ss(n), l = (yield En.Main.fetchFlow(i)).components.find((c) => c.type.id === e.type.id);
|
|
1430
|
+
if (l && l.instance.skinSelector.type === Q.Segmented && l.instance.resolvedExperiences) {
|
|
1431
|
+
const c = l.instance.resolvedExperiences.find((d) => d.id === o);
|
|
1432
|
+
if ((c == null ? void 0 : c.type) === gt.Segment) {
|
|
1433
|
+
const d = c, h = l.instance.skinSelector.segments.find((f) => f.segmentId === d.segment.id);
|
|
1434
|
+
if (h)
|
|
1435
|
+
return l.instance.skinSelector = h == null ? void 0 : h.skinSelector, l;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
} catch {
|
|
1440
|
+
return null;
|
|
1441
|
+
}
|
|
1442
|
+
}), Tt = "https://cdn.myop.dev/sdk/next/myop_sdk.min.js", oe = class {
|
|
1339
1443
|
constructor() {
|
|
1340
|
-
a(this, "components2init", []), a(this, "components", []), a(this, "componentsLoaders", []), a(this, "initiated", !1), a(this, "version",
|
|
1444
|
+
a(this, "components2init", []), a(this, "components", []), a(this, "componentsLoaders", []), a(this, "initiated", !1), a(this, "version", on), a(this, "type2InstanceCount", {}), a(this, "assignId", (e) => (this.type2InstanceCount[e.id] || (this.type2InstanceCount[e.id] = 0), `${e.id}_${++this.type2InstanceCount[e.id]}`)), a(this, "inspected", !1), a(this, "inspect", () => {
|
|
1341
1445
|
this.inspected || (this.inspected = !0, this.components.forEach((e) => {
|
|
1342
1446
|
e.inspect && e.inspect();
|
|
1343
1447
|
}));
|
|
1344
1448
|
}), a(this, "incomingMessageHandler", (e) => {
|
|
1345
1449
|
if (e.origin, document.location.origin, e.data.myop) {
|
|
1346
|
-
if (e.data.direction !==
|
|
1450
|
+
if (e.data.direction !== b.up && e.data.messageType !== g.EnvelopedMessage)
|
|
1347
1451
|
return;
|
|
1348
1452
|
const t = e.data;
|
|
1349
|
-
if (t.messageType ===
|
|
1453
|
+
if (t.messageType === g.InitRequest) {
|
|
1350
1454
|
this.components2init.forEach((n) => {
|
|
1351
|
-
n.send(new
|
|
1455
|
+
n.send(new Ce(n.id));
|
|
1352
1456
|
});
|
|
1353
1457
|
return;
|
|
1354
1458
|
}
|
|
1355
|
-
if (t.messageType ===
|
|
1459
|
+
if (t.messageType === g.InitResponse) {
|
|
1356
1460
|
this.components2init = this.components2init.filter((i) => i.id !== t.content.id);
|
|
1357
1461
|
const n = this.components.find((i) => {
|
|
1358
1462
|
var o;
|
|
@@ -1361,11 +1465,11 @@ var hn = (e, t, s) => {
|
|
|
1361
1465
|
n == null || n.setInitiated();
|
|
1362
1466
|
return;
|
|
1363
1467
|
}
|
|
1364
|
-
if (t.messageType ===
|
|
1468
|
+
if (t.messageType === g.EnvelopedMessage) {
|
|
1365
1469
|
const n = t, i = this.components.find((o) => o.id === n.destination);
|
|
1366
1470
|
if (i) {
|
|
1367
|
-
if (n.direction ===
|
|
1368
|
-
n.message.messageType ===
|
|
1471
|
+
if (n.direction === b.down) {
|
|
1472
|
+
n.message.messageType === R.name ? i.onMessageReceived(n.message) : (n.message.route = n.route, i.send(n.message));
|
|
1369
1473
|
return;
|
|
1370
1474
|
}
|
|
1371
1475
|
} else {
|
|
@@ -1395,9 +1499,9 @@ var hn = (e, t, s) => {
|
|
|
1395
1499
|
if (this.initiated)
|
|
1396
1500
|
throw new Error("hostSDK already initiated");
|
|
1397
1501
|
const t = [
|
|
1398
|
-
new
|
|
1399
|
-
new
|
|
1400
|
-
new
|
|
1502
|
+
new sn(),
|
|
1503
|
+
new nn(),
|
|
1504
|
+
new _n()
|
|
1401
1505
|
];
|
|
1402
1506
|
if (this.componentsLoaders = [
|
|
1403
1507
|
...t
|
|
@@ -1415,32 +1519,34 @@ var hn = (e, t, s) => {
|
|
|
1415
1519
|
this.incomingMessageHandler,
|
|
1416
1520
|
!1
|
|
1417
1521
|
), console.log("myop hostSDK initiated", document.location.href), this.initiated = !0;
|
|
1418
|
-
}), a(this, "_getSkinIdBySkinSelector", (e, ...t) =>
|
|
1522
|
+
}), a(this, "_getSkinIdBySkinSelector", (e, ...t) => m(this, [e, ...t], function* (s, n = [], i) {
|
|
1419
1523
|
var o;
|
|
1420
|
-
function r(
|
|
1421
|
-
return
|
|
1422
|
-
for (const d of
|
|
1423
|
-
if (yield
|
|
1524
|
+
function r(l, c) {
|
|
1525
|
+
return m(this, null, function* () {
|
|
1526
|
+
for (const d of l)
|
|
1527
|
+
if (yield c(d))
|
|
1424
1528
|
return d;
|
|
1425
1529
|
});
|
|
1426
1530
|
}
|
|
1427
1531
|
switch (s.type) {
|
|
1532
|
+
// @ts-ignore
|
|
1428
1533
|
case "DedicatedSkin":
|
|
1429
|
-
|
|
1534
|
+
//backward compatibility
|
|
1535
|
+
case Q.Dedicated:
|
|
1430
1536
|
return ((o = s.skin) == null ? void 0 : o.id) || s.skins[0].id;
|
|
1431
|
-
case
|
|
1537
|
+
case Q.Segmented:
|
|
1432
1538
|
{
|
|
1433
|
-
const
|
|
1539
|
+
const c = yield r(s.segments, (d) => m(this, null, function* () {
|
|
1434
1540
|
if (d.segmentId === "Default")
|
|
1435
1541
|
return !0;
|
|
1436
|
-
const u = n.find((
|
|
1542
|
+
const u = n.find((M) => M.type === gt.Segment ? M.segment.id === d.segmentId : !1);
|
|
1437
1543
|
if (!u)
|
|
1438
1544
|
throw new Error("experience not found");
|
|
1439
|
-
const
|
|
1440
|
-
return
|
|
1545
|
+
const f = u.segment, y = (i || {})[f.function];
|
|
1546
|
+
return y ? yield y() : (console.warn(`segmentId:${d.segmentId}, ${f.function} function not provided !`), !1);
|
|
1441
1547
|
}));
|
|
1442
|
-
if (
|
|
1443
|
-
return this._getSkinIdBySkinSelector(
|
|
1548
|
+
if (c)
|
|
1549
|
+
return this._getSkinIdBySkinSelector(c.skinSelector, n);
|
|
1444
1550
|
debugger;
|
|
1445
1551
|
}
|
|
1446
1552
|
break;
|
|
@@ -1448,60 +1554,62 @@ var hn = (e, t, s) => {
|
|
|
1448
1554
|
debugger;
|
|
1449
1555
|
}
|
|
1450
1556
|
return "";
|
|
1451
|
-
})), a(this, "runSkinSelector", (e, t) =>
|
|
1557
|
+
})), a(this, "runSkinSelector", (e, t) => m(this, null, function* () {
|
|
1452
1558
|
const s = yield this._getSkinIdBySkinSelector(e.instance.skinSelector, e.instance.resolvedExperiences, t);
|
|
1453
1559
|
return e.type.skins.find((n) => n.id === s);
|
|
1454
|
-
})), a(this, "loaderHooks"), a(this, "loadComponent", (e, t, s) =>
|
|
1560
|
+
})), a(this, "loaderHooks"), a(this, "loadComponent", (e, t, s) => m(this, null, function* () {
|
|
1455
1561
|
var n, i, o, r;
|
|
1456
1562
|
if (!t) {
|
|
1457
1563
|
debugger;
|
|
1458
1564
|
throw new Error("no container was found for this component");
|
|
1459
1565
|
}
|
|
1566
|
+
const l = yield bn(e);
|
|
1567
|
+
l && (e = l);
|
|
1460
1568
|
const c = t;
|
|
1461
1569
|
if (c.myop)
|
|
1462
1570
|
if (c.component) {
|
|
1463
|
-
e =
|
|
1464
|
-
const
|
|
1465
|
-
let
|
|
1466
|
-
if (!
|
|
1571
|
+
e = v({}, e), e.instance = v({}, e.instance);
|
|
1572
|
+
const f = v(v({}, (n = this.loaderHooks) != null ? n : {}), (i = s == null ? void 0 : s.hooks) != null ? i : {});
|
|
1573
|
+
let y = yield this.runSkinSelector(e, f);
|
|
1574
|
+
if (!y)
|
|
1467
1575
|
throw new Error("runSkinSelector failed to choose skin, check the provided config");
|
|
1468
|
-
return (o = s == null ? void 0 : s.hooks) != null && o.afterSkinSelected && (
|
|
1469
|
-
type:
|
|
1470
|
-
skin:
|
|
1576
|
+
return (o = s == null ? void 0 : s.hooks) != null && o.afterSkinSelected && (y = yield s.hooks.afterSkinSelected(v({}, y))), e.instance.skinSelector = {
|
|
1577
|
+
type: Q.Dedicated,
|
|
1578
|
+
skin: y
|
|
1471
1579
|
// skins: [selectedSkin]
|
|
1472
|
-
}, s && (s =
|
|
1580
|
+
}, s && (s = v({}, s), delete s.hooks), yield wt(c, e, this.components, s);
|
|
1473
1581
|
} else
|
|
1474
1582
|
throw new Error("load component got a detached ref.");
|
|
1475
1583
|
t = t;
|
|
1476
|
-
let
|
|
1477
|
-
if (!
|
|
1584
|
+
let d = yield this.runSkinSelector(e, s == null ? void 0 : s.hooks);
|
|
1585
|
+
if (!d)
|
|
1478
1586
|
throw new Error("runSkinSelector failed to choose skin, check the provided config");
|
|
1479
|
-
(r = s == null ? void 0 : s.hooks) != null && r.afterSkinSelected && (
|
|
1480
|
-
const
|
|
1481
|
-
if (!
|
|
1587
|
+
(r = s == null ? void 0 : s.hooks) != null && r.afterSkinSelected && (d = yield s.hooks.afterSkinSelected(v({}, d)));
|
|
1588
|
+
const u = this.componentsLoaders.find((f) => f.type === d.loader.type);
|
|
1589
|
+
if (!u) {
|
|
1482
1590
|
debugger;
|
|
1483
|
-
throw new Error(`no loader "${
|
|
1591
|
+
throw new Error(`no loader "${d.loader.type}" was found for component`);
|
|
1484
1592
|
}
|
|
1485
|
-
let
|
|
1486
|
-
|
|
1593
|
+
let h = yield u.load(e.type, d, t, s);
|
|
1594
|
+
h.isInitiated || this.components2init.push(h), h.bind("onDispose", () => (this.components = this.components.filter((f) => f !== h), this.components2init = this.components2init.filter((f) => f !== h), !0)), this.components.push(h), s != null && s.connectProps && (h = Zs(h, e.type.props));
|
|
1487
1595
|
try {
|
|
1488
|
-
yield
|
|
1489
|
-
} catch (
|
|
1490
|
-
throw
|
|
1596
|
+
yield Mt(h, e, this.components);
|
|
1597
|
+
} catch (f) {
|
|
1598
|
+
throw f;
|
|
1491
1599
|
}
|
|
1492
|
-
return s != null && s.skipInit || (yield
|
|
1493
|
-
})), a(this, "navigate", (e, t, s) =>
|
|
1600
|
+
return s != null && s.skipInit || (yield h.initiated()), h;
|
|
1601
|
+
})), a(this, "navigate", (e, t, s) => m(this, null, function* () {
|
|
1494
1602
|
if (e.parent)
|
|
1495
1603
|
throw new Error("Navigating on remote ref components is not implemented yet");
|
|
1496
1604
|
if (s != null && s.staged) {
|
|
1497
|
-
let n = yield this.loadComponent(t, e.container,
|
|
1605
|
+
let n = yield this.loadComponent(t, e.container, v({
|
|
1498
1606
|
hidden: !0,
|
|
1499
1607
|
relative: { direction: "after", child: e.element }
|
|
1500
1608
|
}, s));
|
|
1501
1609
|
return s.init && (yield s.init(n)), n.show(), e.dispose(), n;
|
|
1502
1610
|
} else {
|
|
1503
1611
|
const n = e.element.nextSibling;
|
|
1504
|
-
return e.dispose(), this.loadComponent(t, e.container,
|
|
1612
|
+
return e.dispose(), this.loadComponent(t, e.container, v({
|
|
1505
1613
|
relative: {
|
|
1506
1614
|
direction: "before",
|
|
1507
1615
|
child: n
|
|
@@ -1511,68 +1619,68 @@ var hn = (e, t, s) => {
|
|
|
1511
1619
|
}));
|
|
1512
1620
|
}
|
|
1513
1621
|
};
|
|
1514
|
-
a(
|
|
1622
|
+
a(oe, "Instance", () => window.myop.hostSDK);
|
|
1515
1623
|
window.myop || (window.myop = {
|
|
1516
|
-
__ROOT_SDK_PUBLIC_URL__:
|
|
1624
|
+
__ROOT_SDK_PUBLIC_URL__: Tt
|
|
1517
1625
|
});
|
|
1518
1626
|
if (!window.myop.hostSDK) {
|
|
1519
|
-
const e = new
|
|
1627
|
+
const e = new oe();
|
|
1520
1628
|
e.init(), window.myop || (window.myop = {
|
|
1521
|
-
__ROOT_SDK_PUBLIC_URL__:
|
|
1629
|
+
__ROOT_SDK_PUBLIC_URL__: Tt
|
|
1522
1630
|
}), window.myop.hostSDK = e;
|
|
1523
1631
|
}
|
|
1524
|
-
var
|
|
1525
|
-
|
|
1632
|
+
var xt = window.myop.hostSDK;
|
|
1633
|
+
We("hostSDK", xt);
|
|
1526
1634
|
/**
|
|
1527
1635
|
* @vue/shared v3.5.17
|
|
1528
1636
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1529
1637
|
* @license MIT
|
|
1530
1638
|
**/
|
|
1531
|
-
const
|
|
1639
|
+
const Cn = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
1532
1640
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
1533
|
-
const
|
|
1534
|
-
},
|
|
1535
|
-
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97),
|
|
1641
|
+
const Rt = () => {
|
|
1642
|
+
}, Sn = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
|
|
1643
|
+
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Re = Object.assign, C = Array.isArray, E = (e) => typeof e == "function", O = (e) => typeof e == "string", In = (e) => typeof e == "symbol", j = (e) => e !== null && typeof e == "object", Tn = (e) => (j(e) || E(e)) && E(e.then) && E(e.catch), kt = (e) => {
|
|
1536
1644
|
const t = /* @__PURE__ */ Object.create(null);
|
|
1537
1645
|
return (s) => t[s] || (t[s] = e(s));
|
|
1538
|
-
},
|
|
1539
|
-
(e) => e ? `on${
|
|
1646
|
+
}, xn = kt((e) => e.charAt(0).toUpperCase() + e.slice(1)), Rn = kt(
|
|
1647
|
+
(e) => e ? `on${xn(e)}` : ""
|
|
1540
1648
|
);
|
|
1541
|
-
let
|
|
1542
|
-
const
|
|
1543
|
-
function
|
|
1544
|
-
if (
|
|
1649
|
+
let Ue;
|
|
1650
|
+
const re = () => Ue || (Ue = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
1651
|
+
function ke(e) {
|
|
1652
|
+
if (C(e)) {
|
|
1545
1653
|
const t = {};
|
|
1546
1654
|
for (let s = 0; s < e.length; s++) {
|
|
1547
|
-
const n = e[s], i =
|
|
1655
|
+
const n = e[s], i = O(n) ? On(n) : ke(n);
|
|
1548
1656
|
if (i)
|
|
1549
1657
|
for (const o in i)
|
|
1550
1658
|
t[o] = i[o];
|
|
1551
1659
|
}
|
|
1552
1660
|
return t;
|
|
1553
|
-
} else if (
|
|
1661
|
+
} else if (O(e) || j(e))
|
|
1554
1662
|
return e;
|
|
1555
1663
|
}
|
|
1556
|
-
const
|
|
1557
|
-
function
|
|
1664
|
+
const kn = /;(?![^(]*\))/g, Hn = /:([^]+)/, Dn = /\/\*[^]*?\*\//g;
|
|
1665
|
+
function On(e) {
|
|
1558
1666
|
const t = {};
|
|
1559
|
-
return e.replace(
|
|
1667
|
+
return e.replace(Dn, "").split(kn).forEach((s) => {
|
|
1560
1668
|
if (s) {
|
|
1561
|
-
const n = s.split(
|
|
1669
|
+
const n = s.split(Hn);
|
|
1562
1670
|
n.length > 1 && (t[n[0].trim()] = n[1].trim());
|
|
1563
1671
|
}
|
|
1564
1672
|
}), t;
|
|
1565
1673
|
}
|
|
1566
1674
|
function He(e) {
|
|
1567
1675
|
let t = "";
|
|
1568
|
-
if (
|
|
1676
|
+
if (O(e))
|
|
1569
1677
|
t = e;
|
|
1570
|
-
else if (
|
|
1678
|
+
else if (C(e))
|
|
1571
1679
|
for (let s = 0; s < e.length; s++) {
|
|
1572
1680
|
const n = He(e[s]);
|
|
1573
1681
|
n && (t += n + " ");
|
|
1574
1682
|
}
|
|
1575
|
-
else if (
|
|
1683
|
+
else if (j(e))
|
|
1576
1684
|
for (const s in e)
|
|
1577
1685
|
e[s] && (t += s + " ");
|
|
1578
1686
|
return t.trim();
|
|
@@ -1592,16 +1700,16 @@ Symbol(
|
|
|
1592
1700
|
process.env.NODE_ENV !== "production" ? "Array iterate" : ""
|
|
1593
1701
|
);
|
|
1594
1702
|
new Set(
|
|
1595
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(
|
|
1703
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(In)
|
|
1596
1704
|
);
|
|
1597
|
-
function
|
|
1705
|
+
function _e(e) {
|
|
1598
1706
|
return e ? !!e.__v_raw : !1;
|
|
1599
1707
|
}
|
|
1600
|
-
function
|
|
1708
|
+
function ee(e) {
|
|
1601
1709
|
const t = e && e.__v_raw;
|
|
1602
|
-
return t ?
|
|
1710
|
+
return t ? ee(t) : e;
|
|
1603
1711
|
}
|
|
1604
|
-
function
|
|
1712
|
+
function Ht(e) {
|
|
1605
1713
|
return e ? e.__v_isRef === !0 : !1;
|
|
1606
1714
|
}
|
|
1607
1715
|
/**
|
|
@@ -1610,31 +1718,31 @@ function Tt(e) {
|
|
|
1610
1718
|
* @license MIT
|
|
1611
1719
|
**/
|
|
1612
1720
|
const N = [];
|
|
1613
|
-
function
|
|
1721
|
+
function $n(e) {
|
|
1614
1722
|
N.push(e);
|
|
1615
1723
|
}
|
|
1616
|
-
function
|
|
1724
|
+
function Nn() {
|
|
1617
1725
|
N.pop();
|
|
1618
1726
|
}
|
|
1619
1727
|
let de = !1;
|
|
1620
|
-
function
|
|
1728
|
+
function $(e, ...t) {
|
|
1621
1729
|
if (de) return;
|
|
1622
1730
|
de = !0;
|
|
1623
|
-
const s = N.length ? N[N.length - 1].component : null, n = s && s.appContext.config.warnHandler, i =
|
|
1731
|
+
const s = N.length ? N[N.length - 1].component : null, n = s && s.appContext.config.warnHandler, i = Fn();
|
|
1624
1732
|
if (n)
|
|
1625
|
-
|
|
1733
|
+
ae(
|
|
1626
1734
|
n,
|
|
1627
1735
|
s,
|
|
1628
1736
|
11,
|
|
1629
1737
|
[
|
|
1630
1738
|
// eslint-disable-next-line no-restricted-syntax
|
|
1631
1739
|
e + t.map((o) => {
|
|
1632
|
-
var r,
|
|
1633
|
-
return (
|
|
1740
|
+
var r, l;
|
|
1741
|
+
return (l = (r = o.toString) == null ? void 0 : r.call(o)) != null ? l : JSON.stringify(o);
|
|
1634
1742
|
}).join(""),
|
|
1635
1743
|
s && s.proxy,
|
|
1636
1744
|
i.map(
|
|
1637
|
-
({ vnode: o }) => `at <${
|
|
1745
|
+
({ vnode: o }) => `at <${jt(s, o.type)}>`
|
|
1638
1746
|
).join(`
|
|
1639
1747
|
`),
|
|
1640
1748
|
i
|
|
@@ -1643,11 +1751,11 @@ function O(e, ...t) {
|
|
|
1643
1751
|
else {
|
|
1644
1752
|
const o = [`[Vue warn]: ${e}`, ...t];
|
|
1645
1753
|
i.length && o.push(`
|
|
1646
|
-
`, ...
|
|
1754
|
+
`, ...Pn(i)), console.warn(...o);
|
|
1647
1755
|
}
|
|
1648
1756
|
de = !1;
|
|
1649
1757
|
}
|
|
1650
|
-
function
|
|
1758
|
+
function Fn() {
|
|
1651
1759
|
let e = N[N.length - 1];
|
|
1652
1760
|
if (!e)
|
|
1653
1761
|
return [];
|
|
@@ -1663,31 +1771,31 @@ function xn() {
|
|
|
1663
1771
|
}
|
|
1664
1772
|
return t;
|
|
1665
1773
|
}
|
|
1666
|
-
function
|
|
1774
|
+
function Pn(e) {
|
|
1667
1775
|
const t = [];
|
|
1668
1776
|
return e.forEach((s, n) => {
|
|
1669
1777
|
t.push(...n === 0 ? [] : [`
|
|
1670
|
-
`], ...
|
|
1778
|
+
`], ...Ln(s));
|
|
1671
1779
|
}), t;
|
|
1672
1780
|
}
|
|
1673
|
-
function
|
|
1674
|
-
const s = t > 0 ? `... (${t} recursive calls)` : "", n = e.component ? e.component.parent == null : !1, i = ` at <${
|
|
1781
|
+
function Ln({ vnode: e, recurseCount: t }) {
|
|
1782
|
+
const s = t > 0 ? `... (${t} recursive calls)` : "", n = e.component ? e.component.parent == null : !1, i = ` at <${jt(
|
|
1675
1783
|
e.component,
|
|
1676
1784
|
e.type,
|
|
1677
1785
|
n
|
|
1678
1786
|
)}`, o = ">" + s;
|
|
1679
|
-
return e.props ? [i, ...
|
|
1787
|
+
return e.props ? [i, ...An(e.props), o] : [i + o];
|
|
1680
1788
|
}
|
|
1681
|
-
function
|
|
1789
|
+
function An(e) {
|
|
1682
1790
|
const t = [], s = Object.keys(e);
|
|
1683
1791
|
return s.slice(0, 3).forEach((n) => {
|
|
1684
|
-
t.push(...
|
|
1792
|
+
t.push(...Dt(n, e[n]));
|
|
1685
1793
|
}), s.length > 3 && t.push(" ..."), t;
|
|
1686
1794
|
}
|
|
1687
|
-
function
|
|
1688
|
-
return
|
|
1795
|
+
function Dt(e, t, s) {
|
|
1796
|
+
return O(t) ? (t = JSON.stringify(t), s ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? s ? t : [`${e}=${t}`] : Ht(t) ? (t = Dt(e, ee(t.value), !0), s ? t : [`${e}=Ref<`, t, ">"]) : E(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = ee(t), s ? t : [`${e}=`, t]);
|
|
1689
1797
|
}
|
|
1690
|
-
const
|
|
1798
|
+
const De = {
|
|
1691
1799
|
sp: "serverPrefetch hook",
|
|
1692
1800
|
bc: "beforeCreate hook",
|
|
1693
1801
|
c: "created hook",
|
|
@@ -1720,58 +1828,58 @@ const ke = {
|
|
|
1720
1828
|
15: "component update",
|
|
1721
1829
|
16: "app unmount cleanup function"
|
|
1722
1830
|
};
|
|
1723
|
-
function
|
|
1831
|
+
function ae(e, t, s, n) {
|
|
1724
1832
|
try {
|
|
1725
1833
|
return n ? e(...n) : e();
|
|
1726
1834
|
} catch (i) {
|
|
1727
|
-
|
|
1835
|
+
Oe(i, t, s);
|
|
1728
1836
|
}
|
|
1729
1837
|
}
|
|
1730
|
-
function
|
|
1731
|
-
if (
|
|
1732
|
-
const i =
|
|
1733
|
-
return i &&
|
|
1734
|
-
|
|
1838
|
+
function Ot(e, t, s, n) {
|
|
1839
|
+
if (E(e)) {
|
|
1840
|
+
const i = ae(e, t, s, n);
|
|
1841
|
+
return i && Tn(i) && i.catch((o) => {
|
|
1842
|
+
Oe(o, t, s);
|
|
1735
1843
|
}), i;
|
|
1736
1844
|
}
|
|
1737
|
-
if (
|
|
1845
|
+
if (C(e)) {
|
|
1738
1846
|
const i = [];
|
|
1739
1847
|
for (let o = 0; o < e.length; o++)
|
|
1740
|
-
i.push(
|
|
1848
|
+
i.push(Ot(e[o], t, s, n));
|
|
1741
1849
|
return i;
|
|
1742
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
1850
|
+
} else process.env.NODE_ENV !== "production" && $(
|
|
1743
1851
|
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`
|
|
1744
1852
|
);
|
|
1745
1853
|
}
|
|
1746
|
-
function
|
|
1747
|
-
const i = t ? t.vnode : null, { errorHandler: o, throwUnhandledErrorInProduction: r } = t && t.appContext.config ||
|
|
1854
|
+
function Oe(e, t, s, n = !0) {
|
|
1855
|
+
const i = t ? t.vnode : null, { errorHandler: o, throwUnhandledErrorInProduction: r } = t && t.appContext.config || Cn;
|
|
1748
1856
|
if (t) {
|
|
1749
|
-
let
|
|
1750
|
-
const
|
|
1751
|
-
for (;
|
|
1752
|
-
const u =
|
|
1857
|
+
let l = t.parent;
|
|
1858
|
+
const c = t.proxy, d = process.env.NODE_ENV !== "production" ? De[s] : `https://vuejs.org/error-reference/#runtime-${s}`;
|
|
1859
|
+
for (; l; ) {
|
|
1860
|
+
const u = l.ec;
|
|
1753
1861
|
if (u) {
|
|
1754
1862
|
for (let h = 0; h < u.length; h++)
|
|
1755
|
-
if (u[h](e,
|
|
1863
|
+
if (u[h](e, c, d) === !1)
|
|
1756
1864
|
return;
|
|
1757
1865
|
}
|
|
1758
|
-
|
|
1866
|
+
l = l.parent;
|
|
1759
1867
|
}
|
|
1760
1868
|
if (o) {
|
|
1761
|
-
|
|
1869
|
+
ae(o, null, 10, [
|
|
1762
1870
|
e,
|
|
1763
|
-
|
|
1871
|
+
c,
|
|
1764
1872
|
d
|
|
1765
1873
|
]);
|
|
1766
1874
|
return;
|
|
1767
1875
|
}
|
|
1768
1876
|
}
|
|
1769
|
-
|
|
1877
|
+
Bn(e, s, i, n, r);
|
|
1770
1878
|
}
|
|
1771
|
-
function
|
|
1879
|
+
function Bn(e, t, s, n = !0, i = !1) {
|
|
1772
1880
|
if (process.env.NODE_ENV !== "production") {
|
|
1773
|
-
const o =
|
|
1774
|
-
if (s &&
|
|
1881
|
+
const o = De[t];
|
|
1882
|
+
if (s && $n(s), $(`Unhandled error${o ? ` during execution of ${o}` : ""}`), s && Nn(), n)
|
|
1775
1883
|
throw e;
|
|
1776
1884
|
console.error(e);
|
|
1777
1885
|
} else {
|
|
@@ -1780,61 +1888,61 @@ function Dn(e, t, s, n = !0, i = !1) {
|
|
|
1780
1888
|
console.error(e);
|
|
1781
1889
|
}
|
|
1782
1890
|
}
|
|
1783
|
-
const
|
|
1784
|
-
let
|
|
1785
|
-
const
|
|
1786
|
-
let
|
|
1787
|
-
const
|
|
1788
|
-
let
|
|
1789
|
-
const
|
|
1790
|
-
function
|
|
1791
|
-
let t =
|
|
1891
|
+
const _ = [];
|
|
1892
|
+
let S = -1;
|
|
1893
|
+
const A = [];
|
|
1894
|
+
let k = null, F = 0;
|
|
1895
|
+
const Vn = /* @__PURE__ */ Promise.resolve();
|
|
1896
|
+
let Ee = null;
|
|
1897
|
+
const Kn = 100;
|
|
1898
|
+
function Un(e) {
|
|
1899
|
+
let t = S + 1, s = _.length;
|
|
1792
1900
|
for (; t < s; ) {
|
|
1793
|
-
const n = t + s >>> 1, i =
|
|
1901
|
+
const n = t + s >>> 1, i = _[n], o = W(i);
|
|
1794
1902
|
o < e || o === e && i.flags & 2 ? t = n + 1 : s = n;
|
|
1795
1903
|
}
|
|
1796
1904
|
return t;
|
|
1797
1905
|
}
|
|
1798
|
-
function
|
|
1906
|
+
function zn(e) {
|
|
1799
1907
|
if (!(e.flags & 1)) {
|
|
1800
|
-
const t =
|
|
1908
|
+
const t = W(e), s = _[_.length - 1];
|
|
1801
1909
|
!s || // fast path when the job id is larger than the tail
|
|
1802
|
-
!(e.flags & 2) && t >=
|
|
1910
|
+
!(e.flags & 2) && t >= W(s) ? _.push(e) : _.splice(Un(t), 0, e), e.flags |= 1, $t();
|
|
1803
1911
|
}
|
|
1804
1912
|
}
|
|
1805
|
-
function
|
|
1806
|
-
|
|
1913
|
+
function $t() {
|
|
1914
|
+
Ee || (Ee = Vn.then(Nt));
|
|
1807
1915
|
}
|
|
1808
|
-
function
|
|
1809
|
-
|
|
1916
|
+
function qn(e) {
|
|
1917
|
+
C(e) ? A.push(...e) : k && e.id === -1 ? k.splice(F + 1, 0, e) : e.flags & 1 || (A.push(e), e.flags |= 1), $t();
|
|
1810
1918
|
}
|
|
1811
|
-
function
|
|
1812
|
-
if (
|
|
1813
|
-
const t = [...new Set(
|
|
1814
|
-
(s, n) =>
|
|
1919
|
+
function jn(e) {
|
|
1920
|
+
if (A.length) {
|
|
1921
|
+
const t = [...new Set(A)].sort(
|
|
1922
|
+
(s, n) => W(s) - W(n)
|
|
1815
1923
|
);
|
|
1816
|
-
if (
|
|
1817
|
-
|
|
1924
|
+
if (A.length = 0, k) {
|
|
1925
|
+
k.push(...t);
|
|
1818
1926
|
return;
|
|
1819
1927
|
}
|
|
1820
|
-
for (
|
|
1821
|
-
const s =
|
|
1822
|
-
process.env.NODE_ENV !== "production" &&
|
|
1928
|
+
for (k = t, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), F = 0; F < k.length; F++) {
|
|
1929
|
+
const s = k[F];
|
|
1930
|
+
process.env.NODE_ENV !== "production" && Ft(e, s) || (s.flags & 4 && (s.flags &= -2), s.flags & 8 || s(), s.flags &= -2);
|
|
1823
1931
|
}
|
|
1824
|
-
|
|
1932
|
+
k = null, F = 0;
|
|
1825
1933
|
}
|
|
1826
1934
|
}
|
|
1827
|
-
const
|
|
1828
|
-
function
|
|
1935
|
+
const W = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
|
|
1936
|
+
function Nt(e) {
|
|
1829
1937
|
process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
|
|
1830
|
-
const t = process.env.NODE_ENV !== "production" ? (s) =>
|
|
1938
|
+
const t = process.env.NODE_ENV !== "production" ? (s) => Ft(e, s) : Rt;
|
|
1831
1939
|
try {
|
|
1832
|
-
for (
|
|
1833
|
-
const s =
|
|
1940
|
+
for (S = 0; S < _.length; S++) {
|
|
1941
|
+
const s = _[S];
|
|
1834
1942
|
if (s && !(s.flags & 8)) {
|
|
1835
1943
|
if (process.env.NODE_ENV !== "production" && t(s))
|
|
1836
1944
|
continue;
|
|
1837
|
-
s.flags & 4 && (s.flags &= -2),
|
|
1945
|
+
s.flags & 4 && (s.flags &= -2), ae(
|
|
1838
1946
|
s,
|
|
1839
1947
|
s.i,
|
|
1840
1948
|
s.i ? 15 : 14
|
|
@@ -1842,18 +1950,18 @@ function kt(e) {
|
|
|
1842
1950
|
}
|
|
1843
1951
|
}
|
|
1844
1952
|
} finally {
|
|
1845
|
-
for (;
|
|
1846
|
-
const s =
|
|
1953
|
+
for (; S < _.length; S++) {
|
|
1954
|
+
const s = _[S];
|
|
1847
1955
|
s && (s.flags &= -2);
|
|
1848
1956
|
}
|
|
1849
|
-
|
|
1957
|
+
S = -1, _.length = 0, jn(e), Ee = null, (_.length || A.length) && Nt(e);
|
|
1850
1958
|
}
|
|
1851
1959
|
}
|
|
1852
|
-
function
|
|
1960
|
+
function Ft(e, t) {
|
|
1853
1961
|
const s = e.get(t) || 0;
|
|
1854
|
-
if (s >
|
|
1855
|
-
const n = t.i, i = n &&
|
|
1856
|
-
return
|
|
1962
|
+
if (s > Kn) {
|
|
1963
|
+
const n = t.i, i = n && qt(n.type);
|
|
1964
|
+
return Oe(
|
|
1857
1965
|
`Maximum recursive updates exceeded${i ? ` in component <${i}>` : ""}. 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.`,
|
|
1858
1966
|
null,
|
|
1859
1967
|
10
|
|
@@ -1862,47 +1970,47 @@ function Dt(e, t) {
|
|
|
1862
1970
|
return e.set(t, s + 1), !1;
|
|
1863
1971
|
}
|
|
1864
1972
|
const ue = /* @__PURE__ */ new Map();
|
|
1865
|
-
process.env.NODE_ENV !== "production" && (
|
|
1866
|
-
createRecord: he(
|
|
1867
|
-
rerender: he(
|
|
1868
|
-
reload: he(
|
|
1973
|
+
process.env.NODE_ENV !== "production" && (re().__VUE_HMR_RUNTIME__ = {
|
|
1974
|
+
createRecord: he(Wn),
|
|
1975
|
+
rerender: he(Gn),
|
|
1976
|
+
reload: he(Jn)
|
|
1869
1977
|
});
|
|
1870
|
-
const
|
|
1871
|
-
function
|
|
1872
|
-
return
|
|
1873
|
-
initialDef:
|
|
1978
|
+
const te = /* @__PURE__ */ new Map();
|
|
1979
|
+
function Wn(e, t) {
|
|
1980
|
+
return te.has(e) ? !1 : (te.set(e, {
|
|
1981
|
+
initialDef: se(t),
|
|
1874
1982
|
instances: /* @__PURE__ */ new Set()
|
|
1875
1983
|
}), !0);
|
|
1876
1984
|
}
|
|
1877
|
-
function
|
|
1878
|
-
return
|
|
1985
|
+
function se(e) {
|
|
1986
|
+
return Wt(e) ? e.__vccOpts : e;
|
|
1879
1987
|
}
|
|
1880
|
-
function
|
|
1881
|
-
const s =
|
|
1988
|
+
function Gn(e, t) {
|
|
1989
|
+
const s = te.get(e);
|
|
1882
1990
|
s && (s.initialDef.render = t, [...s.instances].forEach((n) => {
|
|
1883
|
-
t && (n.render = t,
|
|
1991
|
+
t && (n.render = t, se(n.type).render = t), n.renderCache = [], n.update();
|
|
1884
1992
|
}));
|
|
1885
1993
|
}
|
|
1886
|
-
function
|
|
1887
|
-
const s =
|
|
1994
|
+
function Jn(e, t) {
|
|
1995
|
+
const s = te.get(e);
|
|
1888
1996
|
if (!s) return;
|
|
1889
|
-
t =
|
|
1997
|
+
t = se(t), ze(s.initialDef, t);
|
|
1890
1998
|
const n = [...s.instances];
|
|
1891
1999
|
for (let i = 0; i < n.length; i++) {
|
|
1892
|
-
const o = n[i], r =
|
|
1893
|
-
let
|
|
1894
|
-
|
|
1895
|
-
o.parent.update(),
|
|
2000
|
+
const o = n[i], r = se(o.type);
|
|
2001
|
+
let l = ue.get(r);
|
|
2002
|
+
l || (r !== s.initialDef && ze(r, t), ue.set(r, l = /* @__PURE__ */ new Set())), l.add(o), o.appContext.propsCache.delete(o.type), o.appContext.emitsCache.delete(o.type), o.appContext.optionsCache.delete(o.type), o.ceReload ? (l.add(o), o.ceReload(t.styles), l.delete(o)) : o.parent ? zn(() => {
|
|
2003
|
+
o.parent.update(), l.delete(o);
|
|
1896
2004
|
}) : o.appContext.reload ? o.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
|
|
1897
2005
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
1898
2006
|
), o.root.ce && o !== o.root && o.root.ce._removeChildStyle(r);
|
|
1899
2007
|
}
|
|
1900
|
-
|
|
2008
|
+
qn(() => {
|
|
1901
2009
|
ue.clear();
|
|
1902
2010
|
});
|
|
1903
2011
|
}
|
|
1904
|
-
function
|
|
1905
|
-
|
|
2012
|
+
function ze(e, t) {
|
|
2013
|
+
Re(e, t);
|
|
1906
2014
|
for (const s in e)
|
|
1907
2015
|
s !== "__file" && !(s in t) && delete e[s];
|
|
1908
2016
|
}
|
|
@@ -1918,64 +2026,64 @@ function he(e) {
|
|
|
1918
2026
|
};
|
|
1919
2027
|
}
|
|
1920
2028
|
let P, X = [];
|
|
1921
|
-
function
|
|
2029
|
+
function Pt(e, t) {
|
|
1922
2030
|
var s, n;
|
|
1923
2031
|
P = e, P ? (P.enabled = !0, X.forEach(({ event: i, args: o }) => P.emit(i, ...o)), X = []) : /* 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
|
|
1924
2032
|
window.HTMLElement && // also exclude jsdom
|
|
1925
2033
|
// eslint-disable-next-line no-restricted-syntax
|
|
1926
2034
|
!((n = (s = window.navigator) == null ? void 0 : s.userAgent) != null && n.includes("jsdom")) ? ((t.__VUE_DEVTOOLS_HOOK_REPLAY__ = t.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((o) => {
|
|
1927
|
-
|
|
2035
|
+
Pt(o, t);
|
|
1928
2036
|
}), setTimeout(() => {
|
|
1929
2037
|
P || (t.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, X = []);
|
|
1930
2038
|
}, 3e3)) : X = [];
|
|
1931
2039
|
}
|
|
1932
|
-
let
|
|
1933
|
-
const
|
|
1934
|
-
function
|
|
1935
|
-
e.shapeFlag & 6 && e.component ? (e.transition = t,
|
|
2040
|
+
let ne = null, Yn = null;
|
|
2041
|
+
const Xn = (e) => e.__isTeleport;
|
|
2042
|
+
function Lt(e, t) {
|
|
2043
|
+
e.shapeFlag & 6 && e.component ? (e.transition = t, Lt(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
|
|
1936
2044
|
}
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
function
|
|
2045
|
+
re().requestIdleCallback;
|
|
2046
|
+
re().cancelIdleCallback;
|
|
2047
|
+
function Qn(e, t, s = le, n = !1) {
|
|
1940
2048
|
if (s) {
|
|
1941
2049
|
const i = s[e] || (s[e] = []), o = t.__weh || (t.__weh = (...r) => {
|
|
1942
|
-
const
|
|
1943
|
-
return
|
|
2050
|
+
const l = fi(s), c = Ot(t, s, e, r);
|
|
2051
|
+
return l(), c;
|
|
1944
2052
|
});
|
|
1945
2053
|
return n ? i.unshift(o) : i.push(o), o;
|
|
1946
2054
|
} else if (process.env.NODE_ENV !== "production") {
|
|
1947
|
-
const i =
|
|
1948
|
-
|
|
2055
|
+
const i = Rn(De[e].replace(/ hook$/, ""));
|
|
2056
|
+
$(
|
|
1949
2057
|
`${i} 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.`
|
|
1950
2058
|
);
|
|
1951
2059
|
}
|
|
1952
2060
|
}
|
|
1953
|
-
const
|
|
1954
|
-
(!
|
|
1955
|
-
},
|
|
1956
|
-
process.env.NODE_ENV !== "production" && (
|
|
2061
|
+
const Zn = (e) => (t, s = le) => {
|
|
2062
|
+
(!zt || e === "sp") && Qn(e, (...n) => t(...n), s);
|
|
2063
|
+
}, ei = Zn("u"), ti = Symbol.for("v-ndc"), si = {};
|
|
2064
|
+
process.env.NODE_ENV !== "production" && (si.ownKeys = (e) => ($(
|
|
1957
2065
|
"Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
|
|
1958
2066
|
), Reflect.ownKeys(e)));
|
|
1959
|
-
const
|
|
1960
|
-
function
|
|
2067
|
+
const ni = {}, At = (e) => Object.getPrototypeOf(e) === ni, ii = (e) => e.__isSuspense, Bt = Symbol.for("v-fgt"), oi = Symbol.for("v-txt"), ri = Symbol.for("v-cmt");
|
|
2068
|
+
function ai(e) {
|
|
1961
2069
|
return e ? e.__v_isVNode === !0 : !1;
|
|
1962
2070
|
}
|
|
1963
|
-
const
|
|
2071
|
+
const li = (...e) => Kt(
|
|
1964
2072
|
...e
|
|
1965
|
-
),
|
|
2073
|
+
), Vt = ({ key: e }) => e ?? null, Z = ({
|
|
1966
2074
|
ref: e,
|
|
1967
2075
|
ref_key: t,
|
|
1968
2076
|
ref_for: s
|
|
1969
|
-
}) => (typeof e == "number" && (e = "" + e), e != null ?
|
|
1970
|
-
function
|
|
1971
|
-
const
|
|
2077
|
+
}) => (typeof e == "number" && (e = "" + e), e != null ? O(e) || Ht(e) || E(e) ? { i: ne, r: e, k: t, f: !!s } : e : null);
|
|
2078
|
+
function ci(e, t = null, s = null, n = 0, i = null, o = e === Bt ? 0 : 1, r = !1, l = !1) {
|
|
2079
|
+
const c = {
|
|
1972
2080
|
__v_isVNode: !0,
|
|
1973
2081
|
__v_skip: !0,
|
|
1974
2082
|
type: e,
|
|
1975
2083
|
props: t,
|
|
1976
|
-
key: t &&
|
|
1977
|
-
ref: t &&
|
|
1978
|
-
scopeId:
|
|
2084
|
+
key: t && Vt(t),
|
|
2085
|
+
ref: t && Z(t),
|
|
2086
|
+
scopeId: Yn,
|
|
1979
2087
|
slotScopeIds: null,
|
|
1980
2088
|
children: s,
|
|
1981
2089
|
component: null,
|
|
@@ -1995,33 +2103,33 @@ function ti(e, t = null, s = null, n = 0, i = null, o = e === Pt ? 0 : 1, r = !1
|
|
|
1995
2103
|
dynamicProps: i,
|
|
1996
2104
|
dynamicChildren: null,
|
|
1997
2105
|
appContext: null,
|
|
1998
|
-
ctx:
|
|
2106
|
+
ctx: ne
|
|
1999
2107
|
};
|
|
2000
|
-
return
|
|
2108
|
+
return l ? ($e(c, s), o & 128 && e.normalize(c)) : s && (c.shapeFlag |= O(s) ? 8 : 16), process.env.NODE_ENV !== "production" && c.key !== c.key && $("VNode created with invalid key (NaN). VNode type:", c.type), c;
|
|
2001
2109
|
}
|
|
2002
|
-
const
|
|
2003
|
-
function
|
|
2004
|
-
if ((!e || e ===
|
|
2005
|
-
const
|
|
2110
|
+
const di = process.env.NODE_ENV !== "production" ? li : Kt;
|
|
2111
|
+
function Kt(e, t = null, s = null, n = 0, i = null, o = !1) {
|
|
2112
|
+
if ((!e || e === ti) && (process.env.NODE_ENV !== "production" && !e && $(`Invalid vnode type when creating vnode: ${e}.`), e = ri), ai(e)) {
|
|
2113
|
+
const l = ie(
|
|
2006
2114
|
e,
|
|
2007
2115
|
t,
|
|
2008
2116
|
!0
|
|
2009
2117
|
/* mergeRef: true */
|
|
2010
2118
|
);
|
|
2011
|
-
return s &&
|
|
2119
|
+
return s && $e(l, s), l.patchFlag = -2, l;
|
|
2012
2120
|
}
|
|
2013
|
-
if (
|
|
2014
|
-
t =
|
|
2015
|
-
let { class:
|
|
2016
|
-
|
|
2121
|
+
if (Wt(e) && (e = e.__vccOpts), t) {
|
|
2122
|
+
t = ui(t);
|
|
2123
|
+
let { class: l, style: c } = t;
|
|
2124
|
+
l && !O(l) && (t.class = He(l)), j(c) && (_e(c) && !C(c) && (c = Re({}, c)), t.style = ke(c));
|
|
2017
2125
|
}
|
|
2018
|
-
const r =
|
|
2019
|
-
return process.env.NODE_ENV !== "production" && r & 4 &&
|
|
2126
|
+
const r = O(e) ? 1 : ii(e) ? 128 : Xn(e) ? 64 : j(e) ? 4 : E(e) ? 2 : 0;
|
|
2127
|
+
return process.env.NODE_ENV !== "production" && r & 4 && _e(e) && (e = ee(e), $(
|
|
2020
2128
|
"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`.",
|
|
2021
2129
|
`
|
|
2022
2130
|
Component that was made reactive: `,
|
|
2023
2131
|
e
|
|
2024
|
-
)),
|
|
2132
|
+
)), ci(
|
|
2025
2133
|
e,
|
|
2026
2134
|
t,
|
|
2027
2135
|
s,
|
|
@@ -2032,25 +2140,25 @@ Component that was made reactive: `,
|
|
|
2032
2140
|
!0
|
|
2033
2141
|
);
|
|
2034
2142
|
}
|
|
2035
|
-
function
|
|
2036
|
-
return e ?
|
|
2143
|
+
function ui(e) {
|
|
2144
|
+
return e ? _e(e) || At(e) ? Re({}, e) : e : null;
|
|
2037
2145
|
}
|
|
2038
|
-
function
|
|
2039
|
-
const { props: i, ref: o, patchFlag: r, children:
|
|
2146
|
+
function ie(e, t, s = !1, n = !1) {
|
|
2147
|
+
const { props: i, ref: o, patchFlag: r, children: l, transition: c } = e, d = t ? pi(i || {}, t) : i, u = {
|
|
2040
2148
|
__v_isVNode: !0,
|
|
2041
2149
|
__v_skip: !0,
|
|
2042
2150
|
type: e.type,
|
|
2043
2151
|
props: d,
|
|
2044
|
-
key: d &&
|
|
2152
|
+
key: d && Vt(d),
|
|
2045
2153
|
ref: t && t.ref ? (
|
|
2046
2154
|
// #2078 in the case of <component :is="vnode" ref="extra"/>
|
|
2047
2155
|
// if the vnode itself already has a ref, cloneVNode will need to merge
|
|
2048
2156
|
// the refs so the single vnode can be set on multiple refs
|
|
2049
|
-
s && o ?
|
|
2157
|
+
s && o ? C(o) ? o.concat(Z(t)) : [o, Z(t)] : Z(t)
|
|
2050
2158
|
) : o,
|
|
2051
2159
|
scopeId: e.scopeId,
|
|
2052
2160
|
slotScopeIds: e.slotScopeIds,
|
|
2053
|
-
children: process.env.NODE_ENV !== "production" && r === -1 &&
|
|
2161
|
+
children: process.env.NODE_ENV !== "production" && r === -1 && C(l) ? l.map(Ut) : l,
|
|
2054
2162
|
target: e.target,
|
|
2055
2163
|
targetStart: e.targetStart,
|
|
2056
2164
|
targetAnchor: e.targetAnchor,
|
|
@@ -2060,55 +2168,55 @@ function ne(e, t, s = !1, n = !1) {
|
|
|
2060
2168
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
2061
2169
|
// note: preserve flag for fragments since they use the flag for children
|
|
2062
2170
|
// fast paths only.
|
|
2063
|
-
patchFlag: t && e.type !==
|
|
2171
|
+
patchFlag: t && e.type !== Bt ? r === -1 ? 16 : r | 16 : r,
|
|
2064
2172
|
dynamicProps: e.dynamicProps,
|
|
2065
2173
|
dynamicChildren: e.dynamicChildren,
|
|
2066
2174
|
appContext: e.appContext,
|
|
2067
2175
|
dirs: e.dirs,
|
|
2068
|
-
transition:
|
|
2176
|
+
transition: c,
|
|
2069
2177
|
// These should technically only be non-null on mounted VNodes. However,
|
|
2070
2178
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
2071
2179
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
2072
2180
|
// they will simply be overwritten.
|
|
2073
2181
|
component: e.component,
|
|
2074
2182
|
suspense: e.suspense,
|
|
2075
|
-
ssContent: e.ssContent &&
|
|
2076
|
-
ssFallback: e.ssFallback &&
|
|
2183
|
+
ssContent: e.ssContent && ie(e.ssContent),
|
|
2184
|
+
ssFallback: e.ssFallback && ie(e.ssFallback),
|
|
2077
2185
|
el: e.el,
|
|
2078
2186
|
anchor: e.anchor,
|
|
2079
2187
|
ctx: e.ctx,
|
|
2080
2188
|
ce: e.ce
|
|
2081
2189
|
};
|
|
2082
|
-
return
|
|
2190
|
+
return c && n && Lt(
|
|
2083
2191
|
u,
|
|
2084
|
-
|
|
2192
|
+
c.clone(u)
|
|
2085
2193
|
), u;
|
|
2086
2194
|
}
|
|
2087
|
-
function
|
|
2088
|
-
const t =
|
|
2089
|
-
return
|
|
2195
|
+
function Ut(e) {
|
|
2196
|
+
const t = ie(e);
|
|
2197
|
+
return C(e.children) && (t.children = e.children.map(Ut)), t;
|
|
2090
2198
|
}
|
|
2091
|
-
function
|
|
2092
|
-
return
|
|
2199
|
+
function hi(e = " ", t = 0) {
|
|
2200
|
+
return di(oi, null, e, t);
|
|
2093
2201
|
}
|
|
2094
|
-
function
|
|
2202
|
+
function $e(e, t) {
|
|
2095
2203
|
let s = 0;
|
|
2096
2204
|
const { shapeFlag: n } = e;
|
|
2097
2205
|
if (t == null)
|
|
2098
2206
|
t = null;
|
|
2099
|
-
else if (
|
|
2207
|
+
else if (C(t))
|
|
2100
2208
|
s = 16;
|
|
2101
2209
|
else if (typeof t == "object")
|
|
2102
2210
|
if (n & 65) {
|
|
2103
2211
|
const i = t.default;
|
|
2104
|
-
i && (i._c && (i._d = !1),
|
|
2212
|
+
i && (i._c && (i._d = !1), $e(e, i()), i._c && (i._d = !0));
|
|
2105
2213
|
return;
|
|
2106
2214
|
} else
|
|
2107
|
-
s = 32, !t._ &&
|
|
2108
|
-
else
|
|
2215
|
+
s = 32, !t._ && !At(t) && (t._ctx = ne);
|
|
2216
|
+
else E(t) ? (t = { default: t, _ctx: ne }, s = 32) : (t = String(t), n & 64 ? (s = 16, t = [hi(t)]) : s = 8);
|
|
2109
2217
|
e.children = t, e.shapeFlag |= s;
|
|
2110
2218
|
}
|
|
2111
|
-
function
|
|
2219
|
+
function pi(...e) {
|
|
2112
2220
|
const t = {};
|
|
2113
2221
|
for (let s = 0; s < e.length; s++) {
|
|
2114
2222
|
const n = e[s];
|
|
@@ -2116,44 +2224,44 @@ function oi(...e) {
|
|
|
2116
2224
|
if (i === "class")
|
|
2117
2225
|
t.class !== n.class && (t.class = He([t.class, n.class]));
|
|
2118
2226
|
else if (i === "style")
|
|
2119
|
-
t.style =
|
|
2120
|
-
else if (
|
|
2227
|
+
t.style = ke([t.style, n.style]);
|
|
2228
|
+
else if (Sn(i)) {
|
|
2121
2229
|
const o = t[i], r = n[i];
|
|
2122
|
-
r && o !== r && !(
|
|
2230
|
+
r && o !== r && !(C(o) && o.includes(r)) && (t[i] = o ? [].concat(o, r) : r);
|
|
2123
2231
|
} else i !== "" && (t[i] = n[i]);
|
|
2124
2232
|
}
|
|
2125
2233
|
return t;
|
|
2126
2234
|
}
|
|
2127
|
-
let
|
|
2235
|
+
let le = null, be;
|
|
2128
2236
|
{
|
|
2129
|
-
const e =
|
|
2237
|
+
const e = re(), t = (s, n) => {
|
|
2130
2238
|
let i;
|
|
2131
2239
|
return (i = e[s]) || (i = e[s] = []), i.push(n), (o) => {
|
|
2132
2240
|
i.length > 1 ? i.forEach((r) => r(o)) : i[0](o);
|
|
2133
2241
|
};
|
|
2134
2242
|
};
|
|
2135
|
-
|
|
2243
|
+
be = t(
|
|
2136
2244
|
"__VUE_INSTANCE_SETTERS__",
|
|
2137
|
-
(s) =>
|
|
2245
|
+
(s) => le = s
|
|
2138
2246
|
), t(
|
|
2139
2247
|
"__VUE_SSR_SETTERS__",
|
|
2140
|
-
(s) =>
|
|
2248
|
+
(s) => zt = s
|
|
2141
2249
|
);
|
|
2142
2250
|
}
|
|
2143
|
-
const
|
|
2144
|
-
const t =
|
|
2145
|
-
return
|
|
2146
|
-
e.scope.off(),
|
|
2251
|
+
const fi = (e) => {
|
|
2252
|
+
const t = le;
|
|
2253
|
+
return be(e), e.scope.on(), () => {
|
|
2254
|
+
e.scope.off(), be(t);
|
|
2147
2255
|
};
|
|
2148
2256
|
};
|
|
2149
|
-
let
|
|
2257
|
+
let zt = !1;
|
|
2150
2258
|
process.env.NODE_ENV;
|
|
2151
|
-
const
|
|
2152
|
-
function
|
|
2153
|
-
return
|
|
2259
|
+
const mi = /(?:^|[-_])(\w)/g, gi = (e) => e.replace(mi, (t) => t.toUpperCase()).replace(/[-_]/g, "");
|
|
2260
|
+
function qt(e, t = !0) {
|
|
2261
|
+
return E(e) ? e.displayName || e.name : e.name || t && e.__name;
|
|
2154
2262
|
}
|
|
2155
|
-
function
|
|
2156
|
-
let n =
|
|
2263
|
+
function jt(e, t, s = !1) {
|
|
2264
|
+
let n = qt(t);
|
|
2157
2265
|
if (!n && t.__file) {
|
|
2158
2266
|
const i = t.__file.match(/([^/\\]+)\.\w+$/);
|
|
2159
2267
|
i && (n = i[1]);
|
|
@@ -2168,15 +2276,15 @@ function Kt(e, t, s = !1) {
|
|
|
2168
2276
|
e.components || e.parent.type.components
|
|
2169
2277
|
) || i(e.appContext.components);
|
|
2170
2278
|
}
|
|
2171
|
-
return n ?
|
|
2279
|
+
return n ? gi(n) : s ? "App" : "Anonymous";
|
|
2172
2280
|
}
|
|
2173
|
-
function
|
|
2174
|
-
return
|
|
2281
|
+
function Wt(e) {
|
|
2282
|
+
return E(e) && "__vccOpts" in e;
|
|
2175
2283
|
}
|
|
2176
2284
|
process.env.NODE_ENV;
|
|
2177
2285
|
process.env.NODE_ENV;
|
|
2178
2286
|
process.env.NODE_ENV;
|
|
2179
|
-
const
|
|
2287
|
+
const Si = /* @__PURE__ */ Gt({
|
|
2180
2288
|
inheritAttrs: !0,
|
|
2181
2289
|
__name: "MyopVueComponent",
|
|
2182
2290
|
props: {
|
|
@@ -2185,14 +2293,14 @@ const gi = /* @__PURE__ */ Ut({
|
|
|
2185
2293
|
onReady: { type: Function }
|
|
2186
2294
|
},
|
|
2187
2295
|
setup(e, { expose: t }) {
|
|
2188
|
-
const s = e, n =
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
}),
|
|
2296
|
+
const s = e, n = Jt(), i = Yt(), o = K(null), r = K(!0), l = K(null), c = K(null), d = Xt(), u = K(null);
|
|
2297
|
+
ei(() => {
|
|
2298
|
+
c && c.value && c.value(n);
|
|
2299
|
+
}), Qt(async () => {
|
|
2192
2300
|
if (o.value) {
|
|
2193
|
-
const
|
|
2194
|
-
|
|
2195
|
-
|
|
2301
|
+
const f = await ys.Main.fetchComponent(s.componentId, s.flowId);
|
|
2302
|
+
l.value = await xt.loadComponent(
|
|
2303
|
+
f,
|
|
2196
2304
|
o == null ? void 0 : o.value,
|
|
2197
2305
|
{
|
|
2198
2306
|
_environment: {
|
|
@@ -2202,30 +2310,30 @@ const gi = /* @__PURE__ */ Ut({
|
|
|
2202
2310
|
context: d == null ? void 0 : d.appContext,
|
|
2203
2311
|
vueContainerRef: o,
|
|
2204
2312
|
//@ts-ignore
|
|
2205
|
-
defineUpdater: (
|
|
2206
|
-
|
|
2313
|
+
defineUpdater: (y) => {
|
|
2314
|
+
c.value = y;
|
|
2207
2315
|
},
|
|
2208
2316
|
//@ts-ignore
|
|
2209
|
-
defineInnerVueComponentRef: (
|
|
2210
|
-
u.value =
|
|
2317
|
+
defineInnerVueComponentRef: (y) => {
|
|
2318
|
+
u.value = y.value;
|
|
2211
2319
|
}
|
|
2212
2320
|
}
|
|
2213
2321
|
}
|
|
2214
|
-
), r.value = !1, s.onReady && s.onReady(
|
|
2322
|
+
), r.value = !1, s.onReady && s.onReady(l.value, u.value);
|
|
2215
2323
|
}
|
|
2216
2324
|
});
|
|
2217
|
-
const h =
|
|
2218
|
-
return t(h),
|
|
2325
|
+
const h = Zt({});
|
|
2326
|
+
return t(h), es(() => {
|
|
2219
2327
|
Object.assign(h, u.value);
|
|
2220
|
-
}), (
|
|
2221
|
-
|
|
2328
|
+
}), (f, y) => (ss(), ts(ns, null, [
|
|
2329
|
+
is("div", as(ls(n), {
|
|
2222
2330
|
ref_key: "myopContainer",
|
|
2223
2331
|
ref: o
|
|
2224
2332
|
}), null, 16),
|
|
2225
|
-
r.value ?
|
|
2333
|
+
r.value ? os(f.$slots, "loading", { key: 0 }) : rs("", !0)
|
|
2226
2334
|
], 64));
|
|
2227
2335
|
}
|
|
2228
2336
|
});
|
|
2229
2337
|
export {
|
|
2230
|
-
|
|
2338
|
+
Si as MyopContainer
|
|
2231
2339
|
};
|