@contentstack/live-preview-utils 4.3.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -30
- package/dist/legacy/chunk-HZF5SLJ7.js +625 -0
- package/dist/legacy/chunk-HZF5SLJ7.js.map +1 -0
- package/dist/legacy/index.d.cts +1 -1
- package/dist/legacy/index.d.ts +1 -1
- package/dist/legacy/light-sdk.cjs +1 -1
- package/dist/legacy/light-sdk.cjs.map +1 -1
- package/dist/legacy/light-sdk.js +1 -1
- package/dist/legacy/light-sdk.js.map +1 -1
- package/dist/legacy/livePreview/editButton/editButton.cjs +2 -0
- package/dist/legacy/livePreview/editButton/editButton.cjs.map +1 -1
- package/dist/legacy/livePreview/editButton/editButton.js +2 -0
- package/dist/legacy/livePreview/editButton/editButton.js.map +1 -1
- package/dist/legacy/livePreview/eventManager/livePreviewEventManager.cjs +172 -432
- package/dist/legacy/livePreview/eventManager/livePreviewEventManager.cjs.map +1 -1
- package/dist/legacy/livePreview/eventManager/livePreviewEventManager.js +1 -1
- package/dist/legacy/livePreview/eventManager/postMessageEvent.hooks.cjs +1 -1
- package/dist/legacy/livePreview/eventManager/postMessageEvent.hooks.js +1 -1
- package/dist/legacy/preview/contentstack-live-preview-HOC.cjs +1 -1
- package/dist/legacy/preview/contentstack-live-preview-HOC.js +1 -1
- package/dist/legacy/timeline/timelinePostMessage/timelinePostMessage.cjs +172 -432
- package/dist/legacy/timeline/timelinePostMessage/timelinePostMessage.cjs.map +1 -1
- package/dist/legacy/timeline/timelinePostMessage/timelinePostMessage.js +1 -1
- package/dist/legacy/visualBuilder/components/fieldLabelWrapper.cjs +111 -27
- package/dist/legacy/visualBuilder/components/fieldLabelWrapper.cjs.map +1 -1
- package/dist/legacy/visualBuilder/components/fieldLabelWrapper.js +112 -28
- package/dist/legacy/visualBuilder/components/fieldLabelWrapper.js.map +1 -1
- package/dist/legacy/visualBuilder/utils/getWorkflowStageDetails.cjs +4 -0
- package/dist/legacy/visualBuilder/utils/getWorkflowStageDetails.cjs.map +1 -1
- package/dist/legacy/visualBuilder/utils/getWorkflowStageDetails.d.cts +8 -1
- package/dist/legacy/visualBuilder/utils/getWorkflowStageDetails.d.ts +8 -1
- package/dist/legacy/visualBuilder/utils/getWorkflowStageDetails.js +4 -0
- package/dist/legacy/visualBuilder/utils/getWorkflowStageDetails.js.map +1 -1
- package/dist/legacy/visualBuilder/utils/isFieldDisabled.cjs +41 -6
- package/dist/legacy/visualBuilder/utils/isFieldDisabled.cjs.map +1 -1
- package/dist/legacy/visualBuilder/utils/isFieldDisabled.d.cts +9 -1
- package/dist/legacy/visualBuilder/utils/isFieldDisabled.d.ts +9 -1
- package/dist/legacy/visualBuilder/utils/isFieldDisabled.js +41 -6
- package/dist/legacy/visualBuilder/utils/isFieldDisabled.js.map +1 -1
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.cjs +1 -0
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.cjs.map +1 -1
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.d.cts +1 -0
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.d.ts +1 -0
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.js +1 -0
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.js.map +1 -1
- package/dist/legacy/visualBuilder/utils/visualBuilderPostMessage.cjs +172 -432
- package/dist/legacy/visualBuilder/utils/visualBuilderPostMessage.cjs.map +1 -1
- package/dist/legacy/visualBuilder/utils/visualBuilderPostMessage.js +1 -1
- package/dist/legacy/visualBuilder/visualBuilder.style.cjs +30 -0
- package/dist/legacy/visualBuilder/visualBuilder.style.cjs.map +1 -1
- package/dist/legacy/visualBuilder/visualBuilder.style.d.cts +5 -0
- package/dist/legacy/visualBuilder/visualBuilder.style.d.ts +5 -0
- package/dist/legacy/visualBuilder/visualBuilder.style.js +30 -0
- package/dist/legacy/visualBuilder/visualBuilder.style.js.map +1 -1
- package/dist/modern/chunk-4RUJZCI2.js +625 -0
- package/dist/modern/chunk-4RUJZCI2.js.map +1 -0
- package/dist/modern/light-sdk.cjs +1 -1
- package/dist/modern/light-sdk.cjs.map +1 -1
- package/dist/modern/light-sdk.js +1 -1
- package/dist/modern/light-sdk.js.map +1 -1
- package/dist/modern/livePreview/editButton/editButton.cjs +2 -0
- package/dist/modern/livePreview/editButton/editButton.cjs.map +1 -1
- package/dist/modern/livePreview/editButton/editButton.js +2 -0
- package/dist/modern/livePreview/editButton/editButton.js.map +1 -1
- package/dist/modern/livePreview/eventManager/livePreviewEventManager.cjs +172 -432
- package/dist/modern/livePreview/eventManager/livePreviewEventManager.cjs.map +1 -1
- package/dist/modern/livePreview/eventManager/livePreviewEventManager.js +1 -1
- package/dist/modern/livePreview/eventManager/postMessageEvent.hooks.cjs +1 -1
- package/dist/modern/livePreview/eventManager/postMessageEvent.hooks.js +1 -1
- package/dist/modern/preview/contentstack-live-preview-HOC.cjs +1 -1
- package/dist/modern/preview/contentstack-live-preview-HOC.js +1 -1
- package/dist/modern/timeline/timelinePostMessage/timelinePostMessage.cjs +172 -432
- package/dist/modern/timeline/timelinePostMessage/timelinePostMessage.cjs.map +1 -1
- package/dist/modern/timeline/timelinePostMessage/timelinePostMessage.js +1 -1
- package/dist/modern/visualBuilder/components/fieldLabelWrapper.cjs +110 -27
- package/dist/modern/visualBuilder/components/fieldLabelWrapper.cjs.map +1 -1
- package/dist/modern/visualBuilder/components/fieldLabelWrapper.js +111 -28
- package/dist/modern/visualBuilder/components/fieldLabelWrapper.js.map +1 -1
- package/dist/modern/visualBuilder/utils/getWorkflowStageDetails.cjs +4 -0
- package/dist/modern/visualBuilder/utils/getWorkflowStageDetails.cjs.map +1 -1
- package/dist/modern/visualBuilder/utils/getWorkflowStageDetails.d.cts +8 -1
- package/dist/modern/visualBuilder/utils/getWorkflowStageDetails.d.ts +8 -1
- package/dist/modern/visualBuilder/utils/getWorkflowStageDetails.js +4 -0
- package/dist/modern/visualBuilder/utils/getWorkflowStageDetails.js.map +1 -1
- package/dist/modern/visualBuilder/utils/isFieldDisabled.cjs +40 -6
- package/dist/modern/visualBuilder/utils/isFieldDisabled.cjs.map +1 -1
- package/dist/modern/visualBuilder/utils/isFieldDisabled.d.cts +9 -1
- package/dist/modern/visualBuilder/utils/isFieldDisabled.d.ts +9 -1
- package/dist/modern/visualBuilder/utils/isFieldDisabled.js +40 -6
- package/dist/modern/visualBuilder/utils/isFieldDisabled.js.map +1 -1
- package/dist/modern/visualBuilder/utils/types/postMessage.types.cjs +1 -0
- package/dist/modern/visualBuilder/utils/types/postMessage.types.cjs.map +1 -1
- package/dist/modern/visualBuilder/utils/types/postMessage.types.d.cts +1 -0
- package/dist/modern/visualBuilder/utils/types/postMessage.types.d.ts +1 -0
- package/dist/modern/visualBuilder/utils/types/postMessage.types.js +1 -0
- package/dist/modern/visualBuilder/utils/types/postMessage.types.js.map +1 -1
- package/dist/modern/visualBuilder/utils/visualBuilderPostMessage.cjs +172 -432
- package/dist/modern/visualBuilder/utils/visualBuilderPostMessage.cjs.map +1 -1
- package/dist/modern/visualBuilder/utils/visualBuilderPostMessage.js +1 -1
- package/dist/modern/visualBuilder/visualBuilder.style.cjs +30 -0
- package/dist/modern/visualBuilder/visualBuilder.style.cjs.map +1 -1
- package/dist/modern/visualBuilder/visualBuilder.style.d.cts +5 -0
- package/dist/modern/visualBuilder/visualBuilder.style.d.ts +5 -0
- package/dist/modern/visualBuilder/visualBuilder.style.js +30 -0
- package/dist/modern/visualBuilder/visualBuilder.style.js.map +1 -1
- package/package.json +9 -9
- package/dist/legacy/chunk-7SRLYDRL.js +0 -885
- package/dist/legacy/chunk-7SRLYDRL.js.map +0 -1
- package/dist/modern/chunk-JYE4G3PN.js +0 -885
- package/dist/modern/chunk-JYE4G3PN.js.map +0 -1
|
@@ -1,885 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__commonJS
|
|
3
|
-
} from "./chunk-5WRI5ZAA.js";
|
|
4
|
-
|
|
5
|
-
// node_modules/@contentstack/advanced-post-message/dist/index.js
|
|
6
|
-
var require_dist = __commonJS({
|
|
7
|
-
"node_modules/@contentstack/advanced-post-message/dist/index.js"(exports, module) {
|
|
8
|
-
"use strict";
|
|
9
|
-
!(function(e, t) {
|
|
10
|
-
"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.ContentstackAdvPostMessage = t() : e.ContentstackAdvPostMessage = t();
|
|
11
|
-
})(exports, (() => {
|
|
12
|
-
return e = { 706: (e2, t2, r) => {
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.Config = void 0;
|
|
15
|
-
var n = r(450), o = r(666), i = r(628), s = (function() {
|
|
16
|
-
function e3() {
|
|
17
|
-
this.config = (0, o.getDefaultConfig)();
|
|
18
|
-
}
|
|
19
|
-
return e3.prototype.replace = function(e4) {
|
|
20
|
-
!(function(e5, t3) {
|
|
21
|
-
var r2, o2, s2, u;
|
|
22
|
-
if (t3.debug = null !== (r2 = e5.debug) && void 0 !== r2 ? r2 : t3.debug, "" === e5.channelId) throw new Error((0, i.getErrorMessage)(n.ERROR_MESSAGES.common.channelIdRequired));
|
|
23
|
-
t3.channelId = null !== (o2 = e5.channelId) && void 0 !== o2 ? o2 : t3.channelId, t3.suppressErrors = null !== (s2 = e5.suppressErrors) && void 0 !== s2 ? s2 : t3.suppressErrors, t3.targetOrigin = null !== (u = e5.targetOrigin) && void 0 !== u ? u : t3.targetOrigin, e5.target ? t3.targetWindow = e5.target : window ? t3.targetWindow = window : t3.targetWindow = { postMessage: function() {
|
|
24
|
-
} };
|
|
25
|
-
})(e4, this.config);
|
|
26
|
-
}, e3.prototype.set = function(e4, t3) {
|
|
27
|
-
this.config[e4] = t3;
|
|
28
|
-
}, e3.prototype.get = function(e4) {
|
|
29
|
-
return this.config[e4];
|
|
30
|
-
}, e3.prototype.getAll = function() {
|
|
31
|
-
return this.config;
|
|
32
|
-
}, e3.prototype.reset = function() {
|
|
33
|
-
this.config = (0, o.getDefaultConfig)();
|
|
34
|
-
}, e3;
|
|
35
|
-
})();
|
|
36
|
-
t2.Config = s;
|
|
37
|
-
}, 851: (e2, t2) => {
|
|
38
|
-
"use strict";
|
|
39
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.ERROR_CODES = t2.ERROR_MESSAGES = void 0, t2.ERROR_MESSAGES = { common: { windowClosed: "The window closed before the response was received", windowNotFound: "The window was not found.", channelIdRequired: "The channelId is required" }, sendEvent: { receiverReturnedError: "The receiver returned an error", eventCancelled: "The event was cancelled", noAckReceived: "The ACK was not received" }, receiveEvent: { noRequestListenerFound: function(e3) {
|
|
40
|
-
return 'No request listener found for event "'.concat(e3, '"');
|
|
41
|
-
}, codeReturnedError: "The code returned an error", noResponseListenerFound: function(e3) {
|
|
42
|
-
return 'No response listener found for hash "'.concat(e3, '"');
|
|
43
|
-
}, noAckListenerFound: function(e3) {
|
|
44
|
-
return 'No ack listener found for hash "'.concat(e3, '"');
|
|
45
|
-
}, unknownNature: function(e3) {
|
|
46
|
-
return 'The nature "'.concat(e3, '" is unknown');
|
|
47
|
-
} }, registerEvent: { eventAlreadyRegistered: function(e3) {
|
|
48
|
-
return 'The event "'.concat(e3, '" is already registered');
|
|
49
|
-
} }, unregisterEvent: { eventDoesNotExist: function(e3) {
|
|
50
|
-
return 'The event "'.concat(e3, '" does not exist');
|
|
51
|
-
} } }, t2.ERROR_CODES = { common: { windowClosed: "WINDOW_CLOSED", windowNotFound: "WINDOW_NOT_FOUND" }, sendEvent: { receiverReturnedError: "RECEIVER_RETURNED_ERROR", eventCancelled: "EVENT_CANCELLED", noAckReceived: "NO_ACK_RECEIVED" }, receiveEvent: { noRequestListenerFound: "NO_REQUEST_LISTENER_FOUND", codeReturnedError: "CODE_RETURNED_ERROR", noResponseListenerFound: "NO_RESPONSE_LISTENER_FOUND", noAckListenerFound: "NO_ACK_LISTENER_FOUND", unknownNature: "UNKNOWN_NATURE" }, registerEvent: { eventAlreadyRegistered: "EVENT_ALREADY_REGISTERED" }, unregisterEvent: { eventDoesNotExist: "EVENT_DOES_NOT_EXIST" } };
|
|
52
|
-
}, 450: function(e2, t2, r) {
|
|
53
|
-
"use strict";
|
|
54
|
-
var n = this && this.__createBinding || (Object.create ? function(e3, t3, r2, n2) {
|
|
55
|
-
void 0 === n2 && (n2 = r2);
|
|
56
|
-
var o2 = Object.getOwnPropertyDescriptor(t3, r2);
|
|
57
|
-
o2 && !("get" in o2 ? !t3.__esModule : o2.writable || o2.configurable) || (o2 = { enumerable: true, get: function() {
|
|
58
|
-
return t3[r2];
|
|
59
|
-
} }), Object.defineProperty(e3, n2, o2);
|
|
60
|
-
} : function(e3, t3, r2, n2) {
|
|
61
|
-
void 0 === n2 && (n2 = r2), e3[n2] = t3[r2];
|
|
62
|
-
}), o = this && this.__exportStar || function(e3, t3) {
|
|
63
|
-
for (var r2 in e3) "default" === r2 || Object.prototype.hasOwnProperty.call(t3, r2) || n(t3, e3, r2);
|
|
64
|
-
};
|
|
65
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.EVENT_MANAGER_NAME = t2.ANY_ORIGIN = t2.RESPONSE_CYCLE = void 0, t2.RESPONSE_CYCLE = 500, t2.ANY_ORIGIN = "*", t2.EVENT_MANAGER_NAME = "contentstack-adv-post-message", o(r(851), t2);
|
|
66
|
-
}, 666: (e2, t2, r) => {
|
|
67
|
-
"use strict";
|
|
68
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.getDefaultConfig = void 0;
|
|
69
|
-
var n = r(450);
|
|
70
|
-
t2.getDefaultConfig = function() {
|
|
71
|
-
return { targetOrigin: n.ANY_ORIGIN, targetWindow: { postMessage: function() {
|
|
72
|
-
} }, debug: false, channelId: "", suppressErrors: false };
|
|
73
|
-
};
|
|
74
|
-
}, 156: function(e2, t2, r) {
|
|
75
|
-
"use strict";
|
|
76
|
-
var n = this && this.__assign || function() {
|
|
77
|
-
return n = Object.assign || function(e3) {
|
|
78
|
-
for (var t3, r2 = 1, n2 = arguments.length; r2 < n2; r2++) for (var o2 in t3 = arguments[r2]) Object.prototype.hasOwnProperty.call(t3, o2) && (e3[o2] = t3[o2]);
|
|
79
|
-
return e3;
|
|
80
|
-
}, n.apply(this, arguments);
|
|
81
|
-
}, o = this && this.__createBinding || (Object.create ? function(e3, t3, r2, n2) {
|
|
82
|
-
void 0 === n2 && (n2 = r2);
|
|
83
|
-
var o2 = Object.getOwnPropertyDescriptor(t3, r2);
|
|
84
|
-
o2 && !("get" in o2 ? !t3.__esModule : o2.writable || o2.configurable) || (o2 = { enumerable: true, get: function() {
|
|
85
|
-
return t3[r2];
|
|
86
|
-
} }), Object.defineProperty(e3, n2, o2);
|
|
87
|
-
} : function(e3, t3, r2, n2) {
|
|
88
|
-
void 0 === n2 && (n2 = r2), e3[n2] = t3[r2];
|
|
89
|
-
}), i = this && this.__exportStar || function(e3, t3) {
|
|
90
|
-
for (var r2 in e3) "default" === r2 || Object.prototype.hasOwnProperty.call(t3, r2) || o(t3, e3, r2);
|
|
91
|
-
}, s = this && this.__awaiter || function(e3, t3, r2, n2) {
|
|
92
|
-
return new (r2 || (r2 = Promise))((function(o2, i2) {
|
|
93
|
-
function s2(e4) {
|
|
94
|
-
try {
|
|
95
|
-
a2(n2.next(e4));
|
|
96
|
-
} catch (e5) {
|
|
97
|
-
i2(e5);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function u2(e4) {
|
|
101
|
-
try {
|
|
102
|
-
a2(n2.throw(e4));
|
|
103
|
-
} catch (e5) {
|
|
104
|
-
i2(e5);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function a2(e4) {
|
|
108
|
-
var t4;
|
|
109
|
-
e4.done ? o2(e4.value) : (t4 = e4.value, t4 instanceof r2 ? t4 : new r2((function(e5) {
|
|
110
|
-
e5(t4);
|
|
111
|
-
}))).then(s2, u2);
|
|
112
|
-
}
|
|
113
|
-
a2((n2 = n2.apply(e3, t3 || [])).next());
|
|
114
|
-
}));
|
|
115
|
-
}, u = this && this.__generator || function(e3, t3) {
|
|
116
|
-
var r2, n2, o2, i2, s2 = { label: 0, sent: function() {
|
|
117
|
-
if (1 & o2[0]) throw o2[1];
|
|
118
|
-
return o2[1];
|
|
119
|
-
}, trys: [], ops: [] };
|
|
120
|
-
return i2 = { next: u2(0), throw: u2(1), return: u2(2) }, "function" == typeof Symbol && (i2[Symbol.iterator] = function() {
|
|
121
|
-
return this;
|
|
122
|
-
}), i2;
|
|
123
|
-
function u2(u3) {
|
|
124
|
-
return function(a2) {
|
|
125
|
-
return (function(u4) {
|
|
126
|
-
if (r2) throw new TypeError("Generator is already executing.");
|
|
127
|
-
for (; i2 && (i2 = 0, u4[0] && (s2 = 0)), s2; ) try {
|
|
128
|
-
if (r2 = 1, n2 && (o2 = 2 & u4[0] ? n2.return : u4[0] ? n2.throw || ((o2 = n2.return) && o2.call(n2), 0) : n2.next) && !(o2 = o2.call(n2, u4[1])).done) return o2;
|
|
129
|
-
switch (n2 = 0, o2 && (u4 = [2 & u4[0], o2.value]), u4[0]) {
|
|
130
|
-
case 0:
|
|
131
|
-
case 1:
|
|
132
|
-
o2 = u4;
|
|
133
|
-
break;
|
|
134
|
-
case 4:
|
|
135
|
-
return s2.label++, { value: u4[1], done: false };
|
|
136
|
-
case 5:
|
|
137
|
-
s2.label++, n2 = u4[1], u4 = [0];
|
|
138
|
-
continue;
|
|
139
|
-
case 7:
|
|
140
|
-
u4 = s2.ops.pop(), s2.trys.pop();
|
|
141
|
-
continue;
|
|
142
|
-
default:
|
|
143
|
-
if (!((o2 = (o2 = s2.trys).length > 0 && o2[o2.length - 1]) || 6 !== u4[0] && 2 !== u4[0])) {
|
|
144
|
-
s2 = 0;
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
if (3 === u4[0] && (!o2 || u4[1] > o2[0] && u4[1] < o2[3])) {
|
|
148
|
-
s2.label = u4[1];
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
if (6 === u4[0] && s2.label < o2[1]) {
|
|
152
|
-
s2.label = o2[1], o2 = u4;
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
if (o2 && s2.label < o2[2]) {
|
|
156
|
-
s2.label = o2[2], s2.ops.push(u4);
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
o2[2] && s2.ops.pop(), s2.trys.pop();
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
u4 = t3.call(e3, s2);
|
|
163
|
-
} catch (e4) {
|
|
164
|
-
u4 = [6, e4], n2 = 0;
|
|
165
|
-
} finally {
|
|
166
|
-
r2 = o2 = 0;
|
|
167
|
-
}
|
|
168
|
-
if (5 & u4[0]) throw u4[1];
|
|
169
|
-
return { value: u4[0] ? u4[1] : void 0, done: true };
|
|
170
|
-
})([u3, a2]);
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.EventManager = void 0;
|
|
175
|
-
var a = r(834), c = r(706), d = r(450), l = r(897), f = r(628), h = r(768), g = r(610), p = r(574), v = (function() {
|
|
176
|
-
function e3(e4, t3) {
|
|
177
|
-
if (void 0 === t3 && (t3 = {}), this.requestMessageHandlers = /* @__PURE__ */ new Map(), this.responseMessageHandlers = /* @__PURE__ */ new Map(), !e4) throw new Error((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.channelIdRequired));
|
|
178
|
-
this.config = new c.Config(), this.config.replace(n(n({}, t3), { channelId: e4 })), this.logger = new f.Logger(this.config), this.postMessage = new l.PostMessage(this.logger, this.config), this.handleIncomingMessage = this.handleIncomingMessage.bind(this), this.send = this.send.bind(this), this.on = this.on.bind(this), this.unregisterEvent = this.unregisterEvent.bind(this), window ? window.addEventListener("message", this.handleIncomingMessage) : this.logger.debug((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.windowNotFound));
|
|
179
|
-
}
|
|
180
|
-
return e3.prototype.handleIncomingMessage = function(e4) {
|
|
181
|
-
return s(this, void 0, void 0, (function() {
|
|
182
|
-
var t3, r2, n2, o2, i2, s2, c2, l2, h2, g2, v2, E, y = this;
|
|
183
|
-
return u(this, (function(u2) {
|
|
184
|
-
if (t3 = e4.data, r2 = t3.type, n2 = t3.channel, o2 = t3.payload, i2 = t3.eventManager, s2 = t3.metadata, c2 = t3.error, i2 !== d.EVENT_MANAGER_NAME || n2 !== this.config.get("channelId")) return [2];
|
|
185
|
-
switch (l2 = s2.hash, h2 = s2.nature) {
|
|
186
|
-
case p.EditorPostMessageNature.REQUEST:
|
|
187
|
-
return this.logger.debug("REQUEST received", e4.data), this.config.get("targetWindow").closed && this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.windowClosed)), this.postMessage.sendAck({ type: r2, hash: l2 }), this.requestMessageHandlers.has(r2) ? (g2 = this.requestMessageHandlers.get(r2).handler, v2 = { data: o2 }, [2, a.ZalgoPromise.all([a.ZalgoPromise.try((function() {
|
|
188
|
-
return g2(v2);
|
|
189
|
-
})).then((function(e5) {
|
|
190
|
-
y.postMessage.sendResponse({ type: r2, hash: l2, payload: e5, error: void 0 });
|
|
191
|
-
})).catch((function(e5) {
|
|
192
|
-
y.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.codeReturnedError), e5);
|
|
193
|
-
}))])]) : (this.logger.debug((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noRequestListenerFound(r2))), this.postMessage.sendResponse({ type: r2, hash: l2, payload: void 0, error: { code: d.ERROR_CODES.receiveEvent.noRequestListenerFound, message: (0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noRequestListenerFound(r2)) } }), [2]);
|
|
194
|
-
case p.EditorPostMessageNature.RESPONSE:
|
|
195
|
-
if (this.logger.debug("RESPONSE received", e4.data), !this.responseMessageHandlers.has(l2)) return this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noResponseListenerFound(l2))), [2];
|
|
196
|
-
E = this.responseMessageHandlers.get(l2), c2 ? E.promise.reject(c2) : E.promise.resolve(o2);
|
|
197
|
-
break;
|
|
198
|
-
case p.EditorPostMessageNature.ACK:
|
|
199
|
-
if (this.logger.debug("ACK received", e4.data), !this.responseMessageHandlers.has(l2)) return this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noAckListenerFound(l2))), [2];
|
|
200
|
-
(E = this.responseMessageHandlers.get(l2)).hasReceivedAck = true;
|
|
201
|
-
break;
|
|
202
|
-
default:
|
|
203
|
-
this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.unknownNature(h2)), e4.data);
|
|
204
|
-
}
|
|
205
|
-
return [2];
|
|
206
|
-
}));
|
|
207
|
-
}));
|
|
208
|
-
}, e3.prototype.send = function(e4, t3) {
|
|
209
|
-
return s(this, void 0, void 0, (function() {
|
|
210
|
-
var r2, n2, o2, i2, s2, c2 = this;
|
|
211
|
-
return u(this, (function(u2) {
|
|
212
|
-
return r2 = new a.ZalgoPromise(), n2 = (0, g.uniqueId)(e4), o2 = { type: e4, promise: r2, hasCancelled: false, hasReceivedAck: false }, this.responseMessageHandlers.set(n2, o2), i2 = 1e3, s2 = (0, h.safeInterval)((function() {
|
|
213
|
-
return c2.config.get("targetWindow").closed ? r2.reject(new Error((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.windowClosed))) : (i2 = Math.max(i2 - d.RESPONSE_CYCLE, 0), !o2.hasReceivedAck && i2 <= 0 ? r2.reject((0, f.getErrorMessage)(d.ERROR_MESSAGES.sendEvent.noAckReceived)) : void 0);
|
|
214
|
-
}), d.RESPONSE_CYCLE), r2.finally((function() {
|
|
215
|
-
c2.responseMessageHandlers.delete(n2), s2.cancel();
|
|
216
|
-
})).catch((function(e5) {
|
|
217
|
-
c2.logger.debug((0, f.getErrorMessage)(d.ERROR_MESSAGES.sendEvent.receiverReturnedError), e5);
|
|
218
|
-
})), this.postMessage.sendRequest({ type: e4, hash: n2, error: void 0, payload: t3 }), [2, r2];
|
|
219
|
-
}));
|
|
220
|
-
}));
|
|
221
|
-
}, e3.prototype.on = function(e4, t3) {
|
|
222
|
-
var r2 = this;
|
|
223
|
-
this.requestMessageHandlers.has(e4) && this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.registerEvent.eventAlreadyRegistered(e4)));
|
|
224
|
-
var n2 = { handler: t3 };
|
|
225
|
-
return this.requestMessageHandlers.set(e4, n2), { unregister: function() {
|
|
226
|
-
r2.unregisterEvent(e4);
|
|
227
|
-
} };
|
|
228
|
-
}, e3.prototype.unregisterEvent = function(e4) {
|
|
229
|
-
this.requestMessageHandlers.has(e4) ? (this.logger.debug("Unregistering event", e4), this.requestMessageHandlers.delete(e4)) : this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.unregisterEvent.eventDoesNotExist(e4)));
|
|
230
|
-
}, e3.prototype.updateConfig = function(e4) {
|
|
231
|
-
this.config.replace(e4);
|
|
232
|
-
}, e3.prototype.destroy = function(e4) {
|
|
233
|
-
this.requestMessageHandlers.clear(), this.responseMessageHandlers.clear(), (null == e4 ? void 0 : e4.soft) || window.removeEventListener("message", this.handleIncomingMessage);
|
|
234
|
-
}, e3;
|
|
235
|
-
})();
|
|
236
|
-
t2.EventManager = v, i(r(574), t2);
|
|
237
|
-
}, 897: function(e2, t2, r) {
|
|
238
|
-
"use strict";
|
|
239
|
-
var n = this && this.__assign || function() {
|
|
240
|
-
return n = Object.assign || function(e3) {
|
|
241
|
-
for (var t3, r2 = 1, n2 = arguments.length; r2 < n2; r2++) for (var o2 in t3 = arguments[r2]) Object.prototype.hasOwnProperty.call(t3, o2) && (e3[o2] = t3[o2]);
|
|
242
|
-
return e3;
|
|
243
|
-
}, n.apply(this, arguments);
|
|
244
|
-
};
|
|
245
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.PostMessage = void 0;
|
|
246
|
-
var o = r(574), i = (function() {
|
|
247
|
-
function e3(e4, t3) {
|
|
248
|
-
this.logger = e4, this.sendResponse = this.sendResponse.bind(this), this.sendRequest = this.sendRequest.bind(this), this.sendAck = this.sendAck.bind(this), this.getMessage = this.getMessage.bind(this), this.config = t3.getAll();
|
|
249
|
-
}
|
|
250
|
-
return e3.prototype.sendRequest = function(e4) {
|
|
251
|
-
var t3 = n(n({}, e4), { nature: o.EditorPostMessageNature.REQUEST });
|
|
252
|
-
this.logger.debug("Sending REQUEST", t3);
|
|
253
|
-
var r2 = this.getMessage(t3);
|
|
254
|
-
this.config.targetWindow.postMessage(r2, this.config.targetOrigin);
|
|
255
|
-
}, e3.prototype.sendResponse = function(e4) {
|
|
256
|
-
var t3 = n(n({}, e4), { nature: o.EditorPostMessageNature.RESPONSE });
|
|
257
|
-
this.logger.debug("Sending RESPONSE", t3);
|
|
258
|
-
var r2 = this.getMessage(t3);
|
|
259
|
-
this.config.targetWindow.postMessage(r2, this.config.targetOrigin);
|
|
260
|
-
}, e3.prototype.sendAck = function(e4) {
|
|
261
|
-
var t3 = n(n({}, e4), { payload: void 0, error: void 0, nature: o.EditorPostMessageNature.ACK });
|
|
262
|
-
this.logger.debug("Sending ACK", t3);
|
|
263
|
-
var r2 = this.getMessage(t3);
|
|
264
|
-
this.config.targetWindow.postMessage(r2, this.config.targetOrigin);
|
|
265
|
-
}, e3.prototype.getMessage = function(e4) {
|
|
266
|
-
var t3 = e4.nature, r2 = e4.hash, n2 = e4.payload, o2 = e4.type, i2 = e4.error;
|
|
267
|
-
return { eventManager: "contentstack-adv-post-message", metadata: { hash: r2, nature: t3 }, channel: this.config.channelId, error: i2, payload: n2, type: o2 };
|
|
268
|
-
}, e3;
|
|
269
|
-
})();
|
|
270
|
-
t2.PostMessage = i;
|
|
271
|
-
}, 255: (e2, t2) => {
|
|
272
|
-
"use strict";
|
|
273
|
-
Object.defineProperty(t2, "__esModule", { value: true });
|
|
274
|
-
}, 884: (e2, t2) => {
|
|
275
|
-
"use strict";
|
|
276
|
-
Object.defineProperty(t2, "__esModule", { value: true });
|
|
277
|
-
}, 574: function(e2, t2, r) {
|
|
278
|
-
"use strict";
|
|
279
|
-
var n = this && this.__createBinding || (Object.create ? function(e3, t3, r2, n2) {
|
|
280
|
-
void 0 === n2 && (n2 = r2);
|
|
281
|
-
var o2 = Object.getOwnPropertyDescriptor(t3, r2);
|
|
282
|
-
o2 && !("get" in o2 ? !t3.__esModule : o2.writable || o2.configurable) || (o2 = { enumerable: true, get: function() {
|
|
283
|
-
return t3[r2];
|
|
284
|
-
} }), Object.defineProperty(e3, n2, o2);
|
|
285
|
-
} : function(e3, t3, r2, n2) {
|
|
286
|
-
void 0 === n2 && (n2 = r2), e3[n2] = t3[r2];
|
|
287
|
-
}), o = this && this.__exportStar || function(e3, t3) {
|
|
288
|
-
for (var r2 in e3) "default" === r2 || Object.prototype.hasOwnProperty.call(t3, r2) || n(t3, e3, r2);
|
|
289
|
-
};
|
|
290
|
-
Object.defineProperty(t2, "__esModule", { value: true }), o(r(884), t2), o(r(145), t2), o(r(255), t2);
|
|
291
|
-
}, 145: (e2, t2) => {
|
|
292
|
-
"use strict";
|
|
293
|
-
var r;
|
|
294
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.EditorPostMessageNature = void 0, (function(e3) {
|
|
295
|
-
e3.ACK = "ACK", e3.RESPONSE = "RESPONSE", e3.REQUEST = "REQUEST";
|
|
296
|
-
})(r || (t2.EditorPostMessageNature = r = {}));
|
|
297
|
-
}, 628: function(e2, t2, r) {
|
|
298
|
-
"use strict";
|
|
299
|
-
var n = this && this.__spreadArray || function(e3, t3, r2) {
|
|
300
|
-
if (r2 || 2 === arguments.length) for (var n2, o2 = 0, i2 = t3.length; o2 < i2; o2++) !n2 && o2 in t3 || (n2 || (n2 = Array.prototype.slice.call(t3, 0, o2)), n2[o2] = t3[o2]);
|
|
301
|
-
return e3.concat(n2 || Array.prototype.slice.call(t3));
|
|
302
|
-
};
|
|
303
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.getErrorMessage = t2.Logger = void 0;
|
|
304
|
-
var o = r(450), i = (function() {
|
|
305
|
-
function e3(e4) {
|
|
306
|
-
this.config = e4, this.prefix = o.EVENT_MANAGER_NAME, this.log = this.log.bind(this), this.info = this.info.bind(this), this.debug = this.debug.bind(this), this.error = this.error.bind(this);
|
|
307
|
-
}
|
|
308
|
-
return e3.prototype.log = function() {
|
|
309
|
-
for (var e4 = [], t3 = 0; t3 < arguments.length; t3++) e4[t3] = arguments[t3];
|
|
310
|
-
console.log.apply(console, n([this.prefix], e4, false));
|
|
311
|
-
}, e3.prototype.info = function() {
|
|
312
|
-
for (var e4 = [], t3 = 0; t3 < arguments.length; t3++) e4[t3] = arguments[t3];
|
|
313
|
-
console.info.apply(console, n([this.prefix], e4, false));
|
|
314
|
-
}, e3.prototype.debug = function() {
|
|
315
|
-
for (var e4 = [], t3 = 0; t3 < arguments.length; t3++) e4[t3] = arguments[t3];
|
|
316
|
-
this.config.get("debug") && console.debug.apply(console, n(n([this.prefix, "DEBUG:"], e4, false), [this.getDebugOptions()], false));
|
|
317
|
-
}, e3.prototype.error = function() {
|
|
318
|
-
for (var e4 = [], t3 = 0; t3 < arguments.length; t3++) e4[t3] = arguments[t3];
|
|
319
|
-
this.config.get("suppressErrors") || console.error.apply(console, n([this.prefix], e4, false));
|
|
320
|
-
}, e3.prototype.getDebugOptions = function() {
|
|
321
|
-
return { targetOrigin: this.config.get("targetOrigin"), targetWindow: this.config.get("targetWindow") };
|
|
322
|
-
}, e3;
|
|
323
|
-
})();
|
|
324
|
-
t2.Logger = i, t2.getErrorMessage = function(e3) {
|
|
325
|
-
return o.EVENT_MANAGER_NAME + ": " + e3;
|
|
326
|
-
};
|
|
327
|
-
}, 768: (e2, t2) => {
|
|
328
|
-
"use strict";
|
|
329
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.safeInterval = void 0, t2.safeInterval = function(e3, t3) {
|
|
330
|
-
var r;
|
|
331
|
-
return (function n() {
|
|
332
|
-
r = setTimeout((function() {
|
|
333
|
-
e3(), n();
|
|
334
|
-
}), t3);
|
|
335
|
-
})(), { cancel: function() {
|
|
336
|
-
clearTimeout(r);
|
|
337
|
-
} };
|
|
338
|
-
};
|
|
339
|
-
}, 610: (e2, t2, r) => {
|
|
340
|
-
"use strict";
|
|
341
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.uniqueId = void 0;
|
|
342
|
-
var n = r(831);
|
|
343
|
-
t2.uniqueId = function(e3) {
|
|
344
|
-
var t3 = (0, n.v4)().split("-")[0];
|
|
345
|
-
return e3 ? "".concat(e3, "-").concat(t3) : t3;
|
|
346
|
-
};
|
|
347
|
-
}, 831: (e2, t2, r) => {
|
|
348
|
-
"use strict";
|
|
349
|
-
Object.defineProperty(t2, "__esModule", { value: true }), Object.defineProperty(t2, "NIL", { enumerable: true, get: function() {
|
|
350
|
-
return u.default;
|
|
351
|
-
} }), Object.defineProperty(t2, "parse", { enumerable: true, get: function() {
|
|
352
|
-
return l.default;
|
|
353
|
-
} }), Object.defineProperty(t2, "stringify", { enumerable: true, get: function() {
|
|
354
|
-
return d.default;
|
|
355
|
-
} }), Object.defineProperty(t2, "v1", { enumerable: true, get: function() {
|
|
356
|
-
return n.default;
|
|
357
|
-
} }), Object.defineProperty(t2, "v3", { enumerable: true, get: function() {
|
|
358
|
-
return o.default;
|
|
359
|
-
} }), Object.defineProperty(t2, "v4", { enumerable: true, get: function() {
|
|
360
|
-
return i.default;
|
|
361
|
-
} }), Object.defineProperty(t2, "v5", { enumerable: true, get: function() {
|
|
362
|
-
return s.default;
|
|
363
|
-
} }), Object.defineProperty(t2, "validate", { enumerable: true, get: function() {
|
|
364
|
-
return c.default;
|
|
365
|
-
} }), Object.defineProperty(t2, "version", { enumerable: true, get: function() {
|
|
366
|
-
return a.default;
|
|
367
|
-
} });
|
|
368
|
-
var n = f(r(518)), o = f(r(948)), i = f(r(73)), s = f(r(186)), u = f(r(808)), a = f(r(775)), c = f(r(37)), d = f(r(910)), l = f(r(792));
|
|
369
|
-
function f(e3) {
|
|
370
|
-
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
371
|
-
}
|
|
372
|
-
}, 311: (e2, t2) => {
|
|
373
|
-
"use strict";
|
|
374
|
-
function r(e3) {
|
|
375
|
-
return 14 + (e3 + 64 >>> 9 << 4) + 1;
|
|
376
|
-
}
|
|
377
|
-
function n(e3, t3) {
|
|
378
|
-
const r2 = (65535 & e3) + (65535 & t3);
|
|
379
|
-
return (e3 >> 16) + (t3 >> 16) + (r2 >> 16) << 16 | 65535 & r2;
|
|
380
|
-
}
|
|
381
|
-
function o(e3, t3, r2, o2, i2, s2) {
|
|
382
|
-
return n((u2 = n(n(t3, e3), n(o2, s2))) << (a2 = i2) | u2 >>> 32 - a2, r2);
|
|
383
|
-
var u2, a2;
|
|
384
|
-
}
|
|
385
|
-
function i(e3, t3, r2, n2, i2, s2, u2) {
|
|
386
|
-
return o(t3 & r2 | ~t3 & n2, e3, t3, i2, s2, u2);
|
|
387
|
-
}
|
|
388
|
-
function s(e3, t3, r2, n2, i2, s2, u2) {
|
|
389
|
-
return o(t3 & n2 | r2 & ~n2, e3, t3, i2, s2, u2);
|
|
390
|
-
}
|
|
391
|
-
function u(e3, t3, r2, n2, i2, s2, u2) {
|
|
392
|
-
return o(t3 ^ r2 ^ n2, e3, t3, i2, s2, u2);
|
|
393
|
-
}
|
|
394
|
-
function a(e3, t3, r2, n2, i2, s2, u2) {
|
|
395
|
-
return o(r2 ^ (t3 | ~n2), e3, t3, i2, s2, u2);
|
|
396
|
-
}
|
|
397
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
398
|
-
t2.default = function(e3) {
|
|
399
|
-
if ("string" == typeof e3) {
|
|
400
|
-
const t3 = unescape(encodeURIComponent(e3));
|
|
401
|
-
e3 = new Uint8Array(t3.length);
|
|
402
|
-
for (let r2 = 0; r2 < t3.length; ++r2) e3[r2] = t3.charCodeAt(r2);
|
|
403
|
-
}
|
|
404
|
-
return (function(e4) {
|
|
405
|
-
const t3 = [], r2 = 32 * e4.length, n2 = "0123456789abcdef";
|
|
406
|
-
for (let o2 = 0; o2 < r2; o2 += 8) {
|
|
407
|
-
const r3 = e4[o2 >> 5] >>> o2 % 32 & 255, i2 = parseInt(n2.charAt(r3 >>> 4 & 15) + n2.charAt(15 & r3), 16);
|
|
408
|
-
t3.push(i2);
|
|
409
|
-
}
|
|
410
|
-
return t3;
|
|
411
|
-
})((function(e4, t3) {
|
|
412
|
-
e4[t3 >> 5] |= 128 << t3 % 32, e4[r(t3) - 1] = t3;
|
|
413
|
-
let o2 = 1732584193, c = -271733879, d = -1732584194, l = 271733878;
|
|
414
|
-
for (let t4 = 0; t4 < e4.length; t4 += 16) {
|
|
415
|
-
const r2 = o2, f = c, h = d, g = l;
|
|
416
|
-
o2 = i(o2, c, d, l, e4[t4], 7, -680876936), l = i(l, o2, c, d, e4[t4 + 1], 12, -389564586), d = i(d, l, o2, c, e4[t4 + 2], 17, 606105819), c = i(c, d, l, o2, e4[t4 + 3], 22, -1044525330), o2 = i(o2, c, d, l, e4[t4 + 4], 7, -176418897), l = i(l, o2, c, d, e4[t4 + 5], 12, 1200080426), d = i(d, l, o2, c, e4[t4 + 6], 17, -1473231341), c = i(c, d, l, o2, e4[t4 + 7], 22, -45705983), o2 = i(o2, c, d, l, e4[t4 + 8], 7, 1770035416), l = i(l, o2, c, d, e4[t4 + 9], 12, -1958414417), d = i(d, l, o2, c, e4[t4 + 10], 17, -42063), c = i(c, d, l, o2, e4[t4 + 11], 22, -1990404162), o2 = i(o2, c, d, l, e4[t4 + 12], 7, 1804603682), l = i(l, o2, c, d, e4[t4 + 13], 12, -40341101), d = i(d, l, o2, c, e4[t4 + 14], 17, -1502002290), c = i(c, d, l, o2, e4[t4 + 15], 22, 1236535329), o2 = s(o2, c, d, l, e4[t4 + 1], 5, -165796510), l = s(l, o2, c, d, e4[t4 + 6], 9, -1069501632), d = s(d, l, o2, c, e4[t4 + 11], 14, 643717713), c = s(c, d, l, o2, e4[t4], 20, -373897302), o2 = s(o2, c, d, l, e4[t4 + 5], 5, -701558691), l = s(l, o2, c, d, e4[t4 + 10], 9, 38016083), d = s(d, l, o2, c, e4[t4 + 15], 14, -660478335), c = s(c, d, l, o2, e4[t4 + 4], 20, -405537848), o2 = s(o2, c, d, l, e4[t4 + 9], 5, 568446438), l = s(l, o2, c, d, e4[t4 + 14], 9, -1019803690), d = s(d, l, o2, c, e4[t4 + 3], 14, -187363961), c = s(c, d, l, o2, e4[t4 + 8], 20, 1163531501), o2 = s(o2, c, d, l, e4[t4 + 13], 5, -1444681467), l = s(l, o2, c, d, e4[t4 + 2], 9, -51403784), d = s(d, l, o2, c, e4[t4 + 7], 14, 1735328473), c = s(c, d, l, o2, e4[t4 + 12], 20, -1926607734), o2 = u(o2, c, d, l, e4[t4 + 5], 4, -378558), l = u(l, o2, c, d, e4[t4 + 8], 11, -2022574463), d = u(d, l, o2, c, e4[t4 + 11], 16, 1839030562), c = u(c, d, l, o2, e4[t4 + 14], 23, -35309556), o2 = u(o2, c, d, l, e4[t4 + 1], 4, -1530992060), l = u(l, o2, c, d, e4[t4 + 4], 11, 1272893353), d = u(d, l, o2, c, e4[t4 + 7], 16, -155497632), c = u(c, d, l, o2, e4[t4 + 10], 23, -1094730640), o2 = u(o2, c, d, l, e4[t4 + 13], 4, 681279174), l = u(l, o2, c, d, e4[t4], 11, -358537222), d = u(d, l, o2, c, e4[t4 + 3], 16, -722521979), c = u(c, d, l, o2, e4[t4 + 6], 23, 76029189), o2 = u(o2, c, d, l, e4[t4 + 9], 4, -640364487), l = u(l, o2, c, d, e4[t4 + 12], 11, -421815835), d = u(d, l, o2, c, e4[t4 + 15], 16, 530742520), c = u(c, d, l, o2, e4[t4 + 2], 23, -995338651), o2 = a(o2, c, d, l, e4[t4], 6, -198630844), l = a(l, o2, c, d, e4[t4 + 7], 10, 1126891415), d = a(d, l, o2, c, e4[t4 + 14], 15, -1416354905), c = a(c, d, l, o2, e4[t4 + 5], 21, -57434055), o2 = a(o2, c, d, l, e4[t4 + 12], 6, 1700485571), l = a(l, o2, c, d, e4[t4 + 3], 10, -1894986606), d = a(d, l, o2, c, e4[t4 + 10], 15, -1051523), c = a(c, d, l, o2, e4[t4 + 1], 21, -2054922799), o2 = a(o2, c, d, l, e4[t4 + 8], 6, 1873313359), l = a(l, o2, c, d, e4[t4 + 15], 10, -30611744), d = a(d, l, o2, c, e4[t4 + 6], 15, -1560198380), c = a(c, d, l, o2, e4[t4 + 13], 21, 1309151649), o2 = a(o2, c, d, l, e4[t4 + 4], 6, -145523070), l = a(l, o2, c, d, e4[t4 + 11], 10, -1120210379), d = a(d, l, o2, c, e4[t4 + 2], 15, 718787259), c = a(c, d, l, o2, e4[t4 + 9], 21, -343485551), o2 = n(o2, r2), c = n(c, f), d = n(d, h), l = n(l, g);
|
|
417
|
-
}
|
|
418
|
-
return [o2, c, d, l];
|
|
419
|
-
})((function(e4) {
|
|
420
|
-
if (0 === e4.length) return [];
|
|
421
|
-
const t3 = 8 * e4.length, n2 = new Uint32Array(r(t3));
|
|
422
|
-
for (let r2 = 0; r2 < t3; r2 += 8) n2[r2 >> 5] |= (255 & e4[r2 / 8]) << r2 % 32;
|
|
423
|
-
return n2;
|
|
424
|
-
})(e3), 8 * e3.length));
|
|
425
|
-
};
|
|
426
|
-
}, 140: (e2, t2) => {
|
|
427
|
-
"use strict";
|
|
428
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
429
|
-
var r = { randomUUID: "undefined" != typeof crypto && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
430
|
-
t2.default = r;
|
|
431
|
-
}, 808: (e2, t2) => {
|
|
432
|
-
"use strict";
|
|
433
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0, t2.default = "00000000-0000-0000-0000-000000000000";
|
|
434
|
-
}, 792: (e2, t2, r) => {
|
|
435
|
-
"use strict";
|
|
436
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
437
|
-
var n, o = (n = r(37)) && n.__esModule ? n : { default: n };
|
|
438
|
-
t2.default = function(e3) {
|
|
439
|
-
if (!(0, o.default)(e3)) throw TypeError("Invalid UUID");
|
|
440
|
-
let t3;
|
|
441
|
-
const r2 = new Uint8Array(16);
|
|
442
|
-
return r2[0] = (t3 = parseInt(e3.slice(0, 8), 16)) >>> 24, r2[1] = t3 >>> 16 & 255, r2[2] = t3 >>> 8 & 255, r2[3] = 255 & t3, r2[4] = (t3 = parseInt(e3.slice(9, 13), 16)) >>> 8, r2[5] = 255 & t3, r2[6] = (t3 = parseInt(e3.slice(14, 18), 16)) >>> 8, r2[7] = 255 & t3, r2[8] = (t3 = parseInt(e3.slice(19, 23), 16)) >>> 8, r2[9] = 255 & t3, r2[10] = (t3 = parseInt(e3.slice(24, 36), 16)) / 1099511627776 & 255, r2[11] = t3 / 4294967296 & 255, r2[12] = t3 >>> 24 & 255, r2[13] = t3 >>> 16 & 255, r2[14] = t3 >>> 8 & 255, r2[15] = 255 & t3, r2;
|
|
443
|
-
};
|
|
444
|
-
}, 656: (e2, t2) => {
|
|
445
|
-
"use strict";
|
|
446
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0, t2.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
447
|
-
}, 858: (e2, t2) => {
|
|
448
|
-
"use strict";
|
|
449
|
-
let r;
|
|
450
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = function() {
|
|
451
|
-
if (!r && (r = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !r)) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
452
|
-
return r(n);
|
|
453
|
-
};
|
|
454
|
-
const n = new Uint8Array(16);
|
|
455
|
-
}, 42: (e2, t2) => {
|
|
456
|
-
"use strict";
|
|
457
|
-
function r(e3, t3, r2, n2) {
|
|
458
|
-
switch (e3) {
|
|
459
|
-
case 0:
|
|
460
|
-
return t3 & r2 ^ ~t3 & n2;
|
|
461
|
-
case 1:
|
|
462
|
-
case 3:
|
|
463
|
-
return t3 ^ r2 ^ n2;
|
|
464
|
-
case 2:
|
|
465
|
-
return t3 & r2 ^ t3 & n2 ^ r2 & n2;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
function n(e3, t3) {
|
|
469
|
-
return e3 << t3 | e3 >>> 32 - t3;
|
|
470
|
-
}
|
|
471
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
472
|
-
t2.default = function(e3) {
|
|
473
|
-
const t3 = [1518500249, 1859775393, 2400959708, 3395469782], o = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
474
|
-
if ("string" == typeof e3) {
|
|
475
|
-
const t4 = unescape(encodeURIComponent(e3));
|
|
476
|
-
e3 = [];
|
|
477
|
-
for (let r2 = 0; r2 < t4.length; ++r2) e3.push(t4.charCodeAt(r2));
|
|
478
|
-
} else Array.isArray(e3) || (e3 = Array.prototype.slice.call(e3));
|
|
479
|
-
e3.push(128);
|
|
480
|
-
const i = e3.length / 4 + 2, s = Math.ceil(i / 16), u = new Array(s);
|
|
481
|
-
for (let t4 = 0; t4 < s; ++t4) {
|
|
482
|
-
const r2 = new Uint32Array(16);
|
|
483
|
-
for (let n2 = 0; n2 < 16; ++n2) r2[n2] = e3[64 * t4 + 4 * n2] << 24 | e3[64 * t4 + 4 * n2 + 1] << 16 | e3[64 * t4 + 4 * n2 + 2] << 8 | e3[64 * t4 + 4 * n2 + 3];
|
|
484
|
-
u[t4] = r2;
|
|
485
|
-
}
|
|
486
|
-
u[s - 1][14] = 8 * (e3.length - 1) / Math.pow(2, 32), u[s - 1][14] = Math.floor(u[s - 1][14]), u[s - 1][15] = 8 * (e3.length - 1) & 4294967295;
|
|
487
|
-
for (let e4 = 0; e4 < s; ++e4) {
|
|
488
|
-
const i2 = new Uint32Array(80);
|
|
489
|
-
for (let t4 = 0; t4 < 16; ++t4) i2[t4] = u[e4][t4];
|
|
490
|
-
for (let e5 = 16; e5 < 80; ++e5) i2[e5] = n(i2[e5 - 3] ^ i2[e5 - 8] ^ i2[e5 - 14] ^ i2[e5 - 16], 1);
|
|
491
|
-
let s2 = o[0], a = o[1], c = o[2], d = o[3], l = o[4];
|
|
492
|
-
for (let e5 = 0; e5 < 80; ++e5) {
|
|
493
|
-
const o2 = Math.floor(e5 / 20), u2 = n(s2, 5) + r(o2, a, c, d) + l + t3[o2] + i2[e5] >>> 0;
|
|
494
|
-
l = d, d = c, c = n(a, 30) >>> 0, a = s2, s2 = u2;
|
|
495
|
-
}
|
|
496
|
-
o[0] = o[0] + s2 >>> 0, o[1] = o[1] + a >>> 0, o[2] = o[2] + c >>> 0, o[3] = o[3] + d >>> 0, o[4] = o[4] + l >>> 0;
|
|
497
|
-
}
|
|
498
|
-
return [o[0] >> 24 & 255, o[0] >> 16 & 255, o[0] >> 8 & 255, 255 & o[0], o[1] >> 24 & 255, o[1] >> 16 & 255, o[1] >> 8 & 255, 255 & o[1], o[2] >> 24 & 255, o[2] >> 16 & 255, o[2] >> 8 & 255, 255 & o[2], o[3] >> 24 & 255, o[3] >> 16 & 255, o[3] >> 8 & 255, 255 & o[3], o[4] >> 24 & 255, o[4] >> 16 & 255, o[4] >> 8 & 255, 255 & o[4]];
|
|
499
|
-
};
|
|
500
|
-
}, 910: (e2, t2, r) => {
|
|
501
|
-
"use strict";
|
|
502
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0, t2.unsafeStringify = s;
|
|
503
|
-
var n, o = (n = r(37)) && n.__esModule ? n : { default: n };
|
|
504
|
-
const i = [];
|
|
505
|
-
for (let e3 = 0; e3 < 256; ++e3) i.push((e3 + 256).toString(16).slice(1));
|
|
506
|
-
function s(e3, t3 = 0) {
|
|
507
|
-
return (i[e3[t3 + 0]] + i[e3[t3 + 1]] + i[e3[t3 + 2]] + i[e3[t3 + 3]] + "-" + i[e3[t3 + 4]] + i[e3[t3 + 5]] + "-" + i[e3[t3 + 6]] + i[e3[t3 + 7]] + "-" + i[e3[t3 + 8]] + i[e3[t3 + 9]] + "-" + i[e3[t3 + 10]] + i[e3[t3 + 11]] + i[e3[t3 + 12]] + i[e3[t3 + 13]] + i[e3[t3 + 14]] + i[e3[t3 + 15]]).toLowerCase();
|
|
508
|
-
}
|
|
509
|
-
t2.default = function(e3, t3 = 0) {
|
|
510
|
-
const r2 = s(e3, t3);
|
|
511
|
-
if (!(0, o.default)(r2)) throw TypeError("Stringified UUID is invalid");
|
|
512
|
-
return r2;
|
|
513
|
-
};
|
|
514
|
-
}, 518: (e2, t2, r) => {
|
|
515
|
-
"use strict";
|
|
516
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
517
|
-
var n, o = (n = r(858)) && n.__esModule ? n : { default: n }, i = r(910);
|
|
518
|
-
let s, u, a = 0, c = 0;
|
|
519
|
-
t2.default = function(e3, t3, r2) {
|
|
520
|
-
let n2 = t3 && r2 || 0;
|
|
521
|
-
const d = t3 || new Array(16);
|
|
522
|
-
let l = (e3 = e3 || {}).node || s, f = void 0 !== e3.clockseq ? e3.clockseq : u;
|
|
523
|
-
if (null == l || null == f) {
|
|
524
|
-
const t4 = e3.random || (e3.rng || o.default)();
|
|
525
|
-
null == l && (l = s = [1 | t4[0], t4[1], t4[2], t4[3], t4[4], t4[5]]), null == f && (f = u = 16383 & (t4[6] << 8 | t4[7]));
|
|
526
|
-
}
|
|
527
|
-
let h = void 0 !== e3.msecs ? e3.msecs : Date.now(), g = void 0 !== e3.nsecs ? e3.nsecs : c + 1;
|
|
528
|
-
const p = h - a + (g - c) / 1e4;
|
|
529
|
-
if (p < 0 && void 0 === e3.clockseq && (f = f + 1 & 16383), (p < 0 || h > a) && void 0 === e3.nsecs && (g = 0), g >= 1e4) throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
530
|
-
a = h, c = g, u = f, h += 122192928e5;
|
|
531
|
-
const v = (1e4 * (268435455 & h) + g) % 4294967296;
|
|
532
|
-
d[n2++] = v >>> 24 & 255, d[n2++] = v >>> 16 & 255, d[n2++] = v >>> 8 & 255, d[n2++] = 255 & v;
|
|
533
|
-
const E = h / 4294967296 * 1e4 & 268435455;
|
|
534
|
-
d[n2++] = E >>> 8 & 255, d[n2++] = 255 & E, d[n2++] = E >>> 24 & 15 | 16, d[n2++] = E >>> 16 & 255, d[n2++] = f >>> 8 | 128, d[n2++] = 255 & f;
|
|
535
|
-
for (let e4 = 0; e4 < 6; ++e4) d[n2 + e4] = l[e4];
|
|
536
|
-
return t3 || (0, i.unsafeStringify)(d);
|
|
537
|
-
};
|
|
538
|
-
}, 948: (e2, t2, r) => {
|
|
539
|
-
"use strict";
|
|
540
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
541
|
-
var n = i(r(25)), o = i(r(311));
|
|
542
|
-
function i(e3) {
|
|
543
|
-
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
544
|
-
}
|
|
545
|
-
var s = (0, n.default)("v3", 48, o.default);
|
|
546
|
-
t2.default = s;
|
|
547
|
-
}, 25: (e2, t2, r) => {
|
|
548
|
-
"use strict";
|
|
549
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.URL = t2.DNS = void 0, t2.default = function(e3, t3, r2) {
|
|
550
|
-
function n2(e4, n3, s2, u2) {
|
|
551
|
-
var a;
|
|
552
|
-
if ("string" == typeof e4 && (e4 = (function(e5) {
|
|
553
|
-
e5 = unescape(encodeURIComponent(e5));
|
|
554
|
-
const t4 = [];
|
|
555
|
-
for (let r3 = 0; r3 < e5.length; ++r3) t4.push(e5.charCodeAt(r3));
|
|
556
|
-
return t4;
|
|
557
|
-
})(e4)), "string" == typeof n3 && (n3 = (0, i.default)(n3)), 16 !== (null === (a = n3) || void 0 === a ? void 0 : a.length)) throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
558
|
-
let c = new Uint8Array(16 + e4.length);
|
|
559
|
-
if (c.set(n3), c.set(e4, n3.length), c = r2(c), c[6] = 15 & c[6] | t3, c[8] = 63 & c[8] | 128, s2) {
|
|
560
|
-
u2 = u2 || 0;
|
|
561
|
-
for (let e5 = 0; e5 < 16; ++e5) s2[u2 + e5] = c[e5];
|
|
562
|
-
return s2;
|
|
563
|
-
}
|
|
564
|
-
return (0, o.unsafeStringify)(c);
|
|
565
|
-
}
|
|
566
|
-
try {
|
|
567
|
-
n2.name = e3;
|
|
568
|
-
} catch (e4) {
|
|
569
|
-
}
|
|
570
|
-
return n2.DNS = s, n2.URL = u, n2;
|
|
571
|
-
};
|
|
572
|
-
var n, o = r(910), i = (n = r(792)) && n.__esModule ? n : { default: n };
|
|
573
|
-
const s = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
574
|
-
t2.DNS = s;
|
|
575
|
-
const u = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
576
|
-
t2.URL = u;
|
|
577
|
-
}, 73: (e2, t2, r) => {
|
|
578
|
-
"use strict";
|
|
579
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
580
|
-
var n = s(r(140)), o = s(r(858)), i = r(910);
|
|
581
|
-
function s(e3) {
|
|
582
|
-
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
583
|
-
}
|
|
584
|
-
t2.default = function(e3, t3, r2) {
|
|
585
|
-
if (n.default.randomUUID && !t3 && !e3) return n.default.randomUUID();
|
|
586
|
-
const s2 = (e3 = e3 || {}).random || (e3.rng || o.default)();
|
|
587
|
-
if (s2[6] = 15 & s2[6] | 64, s2[8] = 63 & s2[8] | 128, t3) {
|
|
588
|
-
r2 = r2 || 0;
|
|
589
|
-
for (let e4 = 0; e4 < 16; ++e4) t3[r2 + e4] = s2[e4];
|
|
590
|
-
return t3;
|
|
591
|
-
}
|
|
592
|
-
return (0, i.unsafeStringify)(s2);
|
|
593
|
-
};
|
|
594
|
-
}, 186: (e2, t2, r) => {
|
|
595
|
-
"use strict";
|
|
596
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
597
|
-
var n = i(r(25)), o = i(r(42));
|
|
598
|
-
function i(e3) {
|
|
599
|
-
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
600
|
-
}
|
|
601
|
-
var s = (0, n.default)("v5", 80, o.default);
|
|
602
|
-
t2.default = s;
|
|
603
|
-
}, 37: (e2, t2, r) => {
|
|
604
|
-
"use strict";
|
|
605
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
606
|
-
var n, o = (n = r(656)) && n.__esModule ? n : { default: n };
|
|
607
|
-
t2.default = function(e3) {
|
|
608
|
-
return "string" == typeof e3 && o.default.test(e3);
|
|
609
|
-
};
|
|
610
|
-
}, 775: (e2, t2, r) => {
|
|
611
|
-
"use strict";
|
|
612
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.default = void 0;
|
|
613
|
-
var n, o = (n = r(37)) && n.__esModule ? n : { default: n };
|
|
614
|
-
t2.default = function(e3) {
|
|
615
|
-
if (!(0, o.default)(e3)) throw TypeError("Invalid UUID");
|
|
616
|
-
return parseInt(e3.slice(14, 15), 16);
|
|
617
|
-
};
|
|
618
|
-
}, 994: function(e2) {
|
|
619
|
-
"undefined" != typeof self && self, e2.exports = (function(e3) {
|
|
620
|
-
var t2 = {};
|
|
621
|
-
function r(n) {
|
|
622
|
-
if (t2[n]) return t2[n].exports;
|
|
623
|
-
var o = t2[n] = { i: n, l: false, exports: {} };
|
|
624
|
-
return e3[n].call(o.exports, o, o.exports, r), o.l = true, o.exports;
|
|
625
|
-
}
|
|
626
|
-
return r.m = e3, r.c = t2, r.d = function(e4, t3, n) {
|
|
627
|
-
r.o(e4, t3) || Object.defineProperty(e4, t3, { enumerable: true, get: n });
|
|
628
|
-
}, r.r = function(e4) {
|
|
629
|
-
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e4, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e4, "__esModule", { value: true });
|
|
630
|
-
}, r.t = function(e4, t3) {
|
|
631
|
-
if (1 & t3 && (e4 = r(e4)), 8 & t3) return e4;
|
|
632
|
-
if (4 & t3 && "object" == typeof e4 && e4 && e4.__esModule) return e4;
|
|
633
|
-
var n = /* @__PURE__ */ Object.create(null);
|
|
634
|
-
if (r.r(n), Object.defineProperty(n, "default", { enumerable: true, value: e4 }), 2 & t3 && "string" != typeof e4) for (var o in e4) r.d(n, o, function(t4) {
|
|
635
|
-
return e4[t4];
|
|
636
|
-
}.bind(null, o));
|
|
637
|
-
return n;
|
|
638
|
-
}, r.n = function(e4) {
|
|
639
|
-
var t3 = e4 && e4.__esModule ? function() {
|
|
640
|
-
return e4.default;
|
|
641
|
-
} : function() {
|
|
642
|
-
return e4;
|
|
643
|
-
};
|
|
644
|
-
return r.d(t3, "a", t3), t3;
|
|
645
|
-
}, r.o = function(e4, t3) {
|
|
646
|
-
return {}.hasOwnProperty.call(e4, t3);
|
|
647
|
-
}, r.p = "", r(r.s = 0);
|
|
648
|
-
})([function(e3, t2, r) {
|
|
649
|
-
"use strict";
|
|
650
|
-
function n(e4) {
|
|
651
|
-
try {
|
|
652
|
-
if (!e4) return false;
|
|
653
|
-
if ("undefined" != typeof Promise && e4 instanceof Promise) return true;
|
|
654
|
-
if ("undefined" != typeof window && "function" == typeof window.Window && e4 instanceof window.Window) return false;
|
|
655
|
-
if ("undefined" != typeof window && "function" == typeof window.constructor && e4 instanceof window.constructor) return false;
|
|
656
|
-
var t3 = {}.toString;
|
|
657
|
-
if (t3) {
|
|
658
|
-
var r2 = t3.call(e4);
|
|
659
|
-
if ("[object Window]" === r2 || "[object global]" === r2 || "[object DOMWindow]" === r2) return false;
|
|
660
|
-
}
|
|
661
|
-
if ("function" == typeof e4.then) return true;
|
|
662
|
-
} catch (e5) {
|
|
663
|
-
return false;
|
|
664
|
-
}
|
|
665
|
-
return false;
|
|
666
|
-
}
|
|
667
|
-
r.r(t2), r.d(t2, "ZalgoPromise", (function() {
|
|
668
|
-
return l;
|
|
669
|
-
}));
|
|
670
|
-
var o, i = [], s = [], u = 0;
|
|
671
|
-
function a() {
|
|
672
|
-
if (!u && o) {
|
|
673
|
-
var e4 = o;
|
|
674
|
-
o = null, e4.resolve();
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
function c() {
|
|
678
|
-
u += 1;
|
|
679
|
-
}
|
|
680
|
-
function d() {
|
|
681
|
-
u -= 1, a();
|
|
682
|
-
}
|
|
683
|
-
var l = (function() {
|
|
684
|
-
function e4(e5) {
|
|
685
|
-
var t4 = this;
|
|
686
|
-
if (this.resolved = void 0, this.rejected = void 0, this.errorHandled = void 0, this.value = void 0, this.error = void 0, this.handlers = void 0, this.dispatching = void 0, this.stack = void 0, this.resolved = false, this.rejected = false, this.errorHandled = false, this.handlers = [], e5) {
|
|
687
|
-
var r2, n2, o2 = false, i2 = false, s2 = false;
|
|
688
|
-
c();
|
|
689
|
-
try {
|
|
690
|
-
e5((function(e6) {
|
|
691
|
-
s2 ? t4.resolve(e6) : (o2 = true, r2 = e6);
|
|
692
|
-
}), (function(e6) {
|
|
693
|
-
s2 ? t4.reject(e6) : (i2 = true, n2 = e6);
|
|
694
|
-
}));
|
|
695
|
-
} catch (e6) {
|
|
696
|
-
return d(), void this.reject(e6);
|
|
697
|
-
}
|
|
698
|
-
d(), s2 = true, o2 ? this.resolve(r2) : i2 && this.reject(n2);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
var t3 = e4.prototype;
|
|
702
|
-
return t3.resolve = function(e5) {
|
|
703
|
-
if (this.resolved || this.rejected) return this;
|
|
704
|
-
if (n(e5)) throw new Error("Can not resolve promise with another promise");
|
|
705
|
-
return this.resolved = true, this.value = e5, this.dispatch(), this;
|
|
706
|
-
}, t3.reject = function(e5) {
|
|
707
|
-
var t4 = this;
|
|
708
|
-
if (this.resolved || this.rejected) return this;
|
|
709
|
-
if (n(e5)) throw new Error("Can not reject promise with another promise");
|
|
710
|
-
if (!e5) {
|
|
711
|
-
var r2 = e5 && "function" == typeof e5.toString ? e5.toString() : {}.toString.call(e5);
|
|
712
|
-
e5 = new Error("Expected reject to be called with Error, got " + r2);
|
|
713
|
-
}
|
|
714
|
-
return this.rejected = true, this.error = e5, this.errorHandled || setTimeout((function() {
|
|
715
|
-
t4.errorHandled || (function(e6, t5) {
|
|
716
|
-
if (-1 === i.indexOf(e6)) {
|
|
717
|
-
i.push(e6), setTimeout((function() {
|
|
718
|
-
throw e6;
|
|
719
|
-
}), 1);
|
|
720
|
-
for (var r3 = 0; r3 < s.length; r3++) s[r3](e6, t5);
|
|
721
|
-
}
|
|
722
|
-
})(e5, t4);
|
|
723
|
-
}), 1), this.dispatch(), this;
|
|
724
|
-
}, t3.asyncReject = function(e5) {
|
|
725
|
-
return this.errorHandled = true, this.reject(e5), this;
|
|
726
|
-
}, t3.dispatch = function() {
|
|
727
|
-
var t4 = this.resolved, r2 = this.rejected, o2 = this.handlers;
|
|
728
|
-
if (!this.dispatching && (t4 || r2)) {
|
|
729
|
-
this.dispatching = true, c();
|
|
730
|
-
for (var i2 = function(e5, t5) {
|
|
731
|
-
return e5.then((function(e6) {
|
|
732
|
-
t5.resolve(e6);
|
|
733
|
-
}), (function(e6) {
|
|
734
|
-
t5.reject(e6);
|
|
735
|
-
}));
|
|
736
|
-
}, s2 = 0; s2 < o2.length; s2++) {
|
|
737
|
-
var u2 = o2[s2], a2 = u2.onSuccess, l2 = u2.onError, f = u2.promise, h = void 0;
|
|
738
|
-
if (t4) try {
|
|
739
|
-
h = a2 ? a2(this.value) : this.value;
|
|
740
|
-
} catch (e5) {
|
|
741
|
-
f.reject(e5);
|
|
742
|
-
continue;
|
|
743
|
-
}
|
|
744
|
-
else if (r2) {
|
|
745
|
-
if (!l2) {
|
|
746
|
-
f.reject(this.error);
|
|
747
|
-
continue;
|
|
748
|
-
}
|
|
749
|
-
try {
|
|
750
|
-
h = l2(this.error);
|
|
751
|
-
} catch (e5) {
|
|
752
|
-
f.reject(e5);
|
|
753
|
-
continue;
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
if (h instanceof e4 && (h.resolved || h.rejected)) {
|
|
757
|
-
var g = h;
|
|
758
|
-
g.resolved ? f.resolve(g.value) : f.reject(g.error), g.errorHandled = true;
|
|
759
|
-
} else n(h) ? h instanceof e4 && (h.resolved || h.rejected) ? h.resolved ? f.resolve(h.value) : f.reject(h.error) : i2(h, f) : f.resolve(h);
|
|
760
|
-
}
|
|
761
|
-
o2.length = 0, this.dispatching = false, d();
|
|
762
|
-
}
|
|
763
|
-
}, t3.then = function(t4, r2) {
|
|
764
|
-
if (t4 && "function" != typeof t4 && !t4.call) throw new Error("Promise.then expected a function for success handler");
|
|
765
|
-
if (r2 && "function" != typeof r2 && !r2.call) throw new Error("Promise.then expected a function for error handler");
|
|
766
|
-
var n2 = new e4();
|
|
767
|
-
return this.handlers.push({ promise: n2, onSuccess: t4, onError: r2 }), this.errorHandled = true, this.dispatch(), n2;
|
|
768
|
-
}, t3.catch = function(e5) {
|
|
769
|
-
return this.then(void 0, e5);
|
|
770
|
-
}, t3.finally = function(t4) {
|
|
771
|
-
if (t4 && "function" != typeof t4 && !t4.call) throw new Error("Promise.finally expected a function");
|
|
772
|
-
return this.then((function(r2) {
|
|
773
|
-
return e4.try(t4).then((function() {
|
|
774
|
-
return r2;
|
|
775
|
-
}));
|
|
776
|
-
}), (function(r2) {
|
|
777
|
-
return e4.try(t4).then((function() {
|
|
778
|
-
throw r2;
|
|
779
|
-
}));
|
|
780
|
-
}));
|
|
781
|
-
}, t3.timeout = function(e5, t4) {
|
|
782
|
-
var r2 = this;
|
|
783
|
-
if (this.resolved || this.rejected) return this;
|
|
784
|
-
var n2 = setTimeout((function() {
|
|
785
|
-
r2.resolved || r2.rejected || r2.reject(t4 || new Error("Promise timed out after " + e5 + "ms"));
|
|
786
|
-
}), e5);
|
|
787
|
-
return this.then((function(e6) {
|
|
788
|
-
return clearTimeout(n2), e6;
|
|
789
|
-
}));
|
|
790
|
-
}, t3.toPromise = function() {
|
|
791
|
-
if ("undefined" == typeof Promise) throw new TypeError("Could not find Promise");
|
|
792
|
-
return Promise.resolve(this);
|
|
793
|
-
}, t3.lazy = function() {
|
|
794
|
-
return this.errorHandled = true, this;
|
|
795
|
-
}, e4.resolve = function(t4) {
|
|
796
|
-
return t4 instanceof e4 ? t4 : n(t4) ? new e4((function(e5, r2) {
|
|
797
|
-
return t4.then(e5, r2);
|
|
798
|
-
})) : new e4().resolve(t4);
|
|
799
|
-
}, e4.reject = function(t4) {
|
|
800
|
-
return new e4().reject(t4);
|
|
801
|
-
}, e4.asyncReject = function(t4) {
|
|
802
|
-
return new e4().asyncReject(t4);
|
|
803
|
-
}, e4.all = function(t4) {
|
|
804
|
-
var r2 = new e4(), o2 = t4.length, i2 = [].slice();
|
|
805
|
-
if (!o2) return r2.resolve(i2), r2;
|
|
806
|
-
for (var s2 = function(e5, t5, n2) {
|
|
807
|
-
return t5.then((function(t6) {
|
|
808
|
-
i2[e5] = t6, 0 == (o2 -= 1) && r2.resolve(i2);
|
|
809
|
-
}), (function(e6) {
|
|
810
|
-
n2.reject(e6);
|
|
811
|
-
}));
|
|
812
|
-
}, u2 = 0; u2 < t4.length; u2++) {
|
|
813
|
-
var a2 = t4[u2];
|
|
814
|
-
if (a2 instanceof e4) {
|
|
815
|
-
if (a2.resolved) {
|
|
816
|
-
i2[u2] = a2.value, o2 -= 1;
|
|
817
|
-
continue;
|
|
818
|
-
}
|
|
819
|
-
} else if (!n(a2)) {
|
|
820
|
-
i2[u2] = a2, o2 -= 1;
|
|
821
|
-
continue;
|
|
822
|
-
}
|
|
823
|
-
s2(u2, e4.resolve(a2), r2);
|
|
824
|
-
}
|
|
825
|
-
return 0 === o2 && r2.resolve(i2), r2;
|
|
826
|
-
}, e4.hash = function(t4) {
|
|
827
|
-
var r2 = {}, o2 = [], i2 = function(e5) {
|
|
828
|
-
if (t4.hasOwnProperty(e5)) {
|
|
829
|
-
var i3 = t4[e5];
|
|
830
|
-
n(i3) ? o2.push(i3.then((function(t5) {
|
|
831
|
-
r2[e5] = t5;
|
|
832
|
-
}))) : r2[e5] = i3;
|
|
833
|
-
}
|
|
834
|
-
};
|
|
835
|
-
for (var s2 in t4) i2(s2);
|
|
836
|
-
return e4.all(o2).then((function() {
|
|
837
|
-
return r2;
|
|
838
|
-
}));
|
|
839
|
-
}, e4.map = function(t4, r2) {
|
|
840
|
-
return e4.all(t4.map(r2));
|
|
841
|
-
}, e4.onPossiblyUnhandledException = function(e5) {
|
|
842
|
-
return (function(e6) {
|
|
843
|
-
return s.push(e6), { cancel: function() {
|
|
844
|
-
s.splice(s.indexOf(e6), 1);
|
|
845
|
-
} };
|
|
846
|
-
})(e5);
|
|
847
|
-
}, e4.try = function(t4, r2, n2) {
|
|
848
|
-
if (t4 && "function" != typeof t4 && !t4.call) throw new Error("Promise.try expected a function");
|
|
849
|
-
var o2;
|
|
850
|
-
c();
|
|
851
|
-
try {
|
|
852
|
-
o2 = t4.apply(r2, n2 || []);
|
|
853
|
-
} catch (t5) {
|
|
854
|
-
return d(), e4.reject(t5);
|
|
855
|
-
}
|
|
856
|
-
return d(), e4.resolve(o2);
|
|
857
|
-
}, e4.delay = function(t4) {
|
|
858
|
-
return new e4((function(e5) {
|
|
859
|
-
setTimeout(e5, t4);
|
|
860
|
-
}));
|
|
861
|
-
}, e4.isPromise = function(t4) {
|
|
862
|
-
return !!(t4 && t4 instanceof e4) || n(t4);
|
|
863
|
-
}, e4.flush = function() {
|
|
864
|
-
return t4 = o = o || new e4(), a(), t4;
|
|
865
|
-
var t4;
|
|
866
|
-
}, e4;
|
|
867
|
-
})();
|
|
868
|
-
}]);
|
|
869
|
-
}, 834: (e2, t2, r) => {
|
|
870
|
-
e2.exports = r(994);
|
|
871
|
-
} }, t = {}, (function r(n) {
|
|
872
|
-
var o = t[n];
|
|
873
|
-
if (void 0 !== o) return o.exports;
|
|
874
|
-
var i = t[n] = { exports: {} };
|
|
875
|
-
return e[n].call(i.exports, i, i.exports, r), i.exports;
|
|
876
|
-
})(156);
|
|
877
|
-
var e, t;
|
|
878
|
-
}));
|
|
879
|
-
}
|
|
880
|
-
});
|
|
881
|
-
|
|
882
|
-
export {
|
|
883
|
-
require_dist
|
|
884
|
-
};
|
|
885
|
-
//# sourceMappingURL=chunk-7SRLYDRL.js.map
|