@jrapps/my_tickets_chat_ui 0.0.4 → 0.0.6
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/cjs/components/SiteChatComponent/index.js +346 -3114
- package/dist/cjs/components/SiteChatComponent/index.js.map +4 -4
- package/dist/cjs/index.js +346 -3114
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/chunks/chunk-P3P4FPSX.js +971 -0
- package/dist/esm/chunks/chunk-P3P4FPSX.js.map +7 -0
- package/dist/esm/components/SiteChatComponent/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/components/SiteChatComponent/FabButton/FabButton.d.ts.map +1 -1
- package/dist/types/components/SiteChatComponent/FabButton/FabButton.types.d.ts +1 -1
- package/dist/types/components/SiteChatComponent/FabButton/FabButton.types.d.ts.map +1 -1
- package/dist/types/components/SiteChatComponent/Footer/Footer.d.ts.map +1 -1
- package/dist/types/components/SiteChatComponent/Footer/Footer.types.d.ts +10 -2
- package/dist/types/components/SiteChatComponent/Footer/Footer.types.d.ts.map +1 -1
- package/dist/types/components/SiteChatComponent/Footer/message-input/message-input.d.ts +5 -1
- package/dist/types/components/SiteChatComponent/Footer/message-input/message-input.d.ts.map +1 -1
- package/dist/types/components/SiteChatComponent/Footer/message-input/open-file-picker.d.ts +10 -0
- package/dist/types/components/SiteChatComponent/Footer/message-input/open-file-picker.d.ts.map +1 -0
- package/dist/types/components/SiteChatComponent/Header/Header.d.ts.map +1 -1
- package/dist/types/components/SiteChatComponent/MessageContainer/MessageContainer.d.ts.map +1 -1
- package/dist/types/components/SiteChatComponent/SiteChatComponent.d.ts +1 -1
- package/dist/types/components/SiteChatComponent/SiteChatComponent.d.ts.map +1 -1
- package/dist/types/components/SiteChatComponent/SiteChatComponent.types.d.ts +1 -9
- package/dist/types/components/SiteChatComponent/SiteChatComponent.types.d.ts.map +1 -1
- package/package.json +9 -2
- package/dist/esm/chunks/chunk-UB6ZZ4NT.js +0 -3762
- package/dist/esm/chunks/chunk-UB6ZZ4NT.js.map +0 -7
|
@@ -5,3011 +5,89 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
var __export = (target, all) => {
|
|
12
|
-
for (var name in all)
|
|
13
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
-
};
|
|
15
|
-
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
-
for (let key of __getOwnPropNames(from))
|
|
18
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
-
mod
|
|
30
|
-
));
|
|
31
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
-
|
|
33
|
-
// node_modules/react/cjs/react.development.js
|
|
34
|
-
var require_react_development = __commonJS({
|
|
35
|
-
"node_modules/react/cjs/react.development.js"(exports, module2) {
|
|
36
|
-
"use strict";
|
|
37
|
-
if (true) {
|
|
38
|
-
(function() {
|
|
39
|
-
"use strict";
|
|
40
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
41
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
42
|
-
}
|
|
43
|
-
var ReactVersion = "18.3.1";
|
|
44
|
-
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
|
|
45
|
-
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
46
|
-
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
47
|
-
var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
|
|
48
|
-
var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
|
|
49
|
-
var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
|
|
50
|
-
var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
|
|
51
|
-
var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
52
|
-
var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
|
|
53
|
-
var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
|
|
54
|
-
var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
|
|
55
|
-
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
56
|
-
var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
|
|
57
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
58
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
59
|
-
function getIteratorFn(maybeIterable) {
|
|
60
|
-
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
64
|
-
if (typeof maybeIterator === "function") {
|
|
65
|
-
return maybeIterator;
|
|
66
|
-
}
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
var ReactCurrentDispatcher = {
|
|
70
|
-
/**
|
|
71
|
-
* @internal
|
|
72
|
-
* @type {ReactComponent}
|
|
73
|
-
*/
|
|
74
|
-
current: null
|
|
75
|
-
};
|
|
76
|
-
var ReactCurrentBatchConfig = {
|
|
77
|
-
transition: null
|
|
78
|
-
};
|
|
79
|
-
var ReactCurrentActQueue = {
|
|
80
|
-
current: null,
|
|
81
|
-
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
|
|
82
|
-
isBatchingLegacy: false,
|
|
83
|
-
didScheduleLegacyUpdate: false
|
|
84
|
-
};
|
|
85
|
-
var ReactCurrentOwner = {
|
|
86
|
-
/**
|
|
87
|
-
* @internal
|
|
88
|
-
* @type {ReactComponent}
|
|
89
|
-
*/
|
|
90
|
-
current: null
|
|
91
|
-
};
|
|
92
|
-
var ReactDebugCurrentFrame = {};
|
|
93
|
-
var currentExtraStackFrame = null;
|
|
94
|
-
function setExtraStackFrame(stack) {
|
|
95
|
-
{
|
|
96
|
-
currentExtraStackFrame = stack;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
{
|
|
100
|
-
ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
|
|
101
|
-
{
|
|
102
|
-
currentExtraStackFrame = stack;
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
ReactDebugCurrentFrame.getCurrentStack = null;
|
|
106
|
-
ReactDebugCurrentFrame.getStackAddendum = function() {
|
|
107
|
-
var stack = "";
|
|
108
|
-
if (currentExtraStackFrame) {
|
|
109
|
-
stack += currentExtraStackFrame;
|
|
110
|
-
}
|
|
111
|
-
var impl = ReactDebugCurrentFrame.getCurrentStack;
|
|
112
|
-
if (impl) {
|
|
113
|
-
stack += impl() || "";
|
|
114
|
-
}
|
|
115
|
-
return stack;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
var enableScopeAPI = false;
|
|
119
|
-
var enableCacheElement = false;
|
|
120
|
-
var enableTransitionTracing = false;
|
|
121
|
-
var enableLegacyHidden = false;
|
|
122
|
-
var enableDebugTracing = false;
|
|
123
|
-
var ReactSharedInternals = {
|
|
124
|
-
ReactCurrentDispatcher,
|
|
125
|
-
ReactCurrentBatchConfig,
|
|
126
|
-
ReactCurrentOwner
|
|
127
|
-
};
|
|
128
|
-
{
|
|
129
|
-
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
|
|
130
|
-
ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
|
|
131
|
-
}
|
|
132
|
-
function warn(format) {
|
|
133
|
-
{
|
|
134
|
-
{
|
|
135
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
136
|
-
args[_key - 1] = arguments[_key];
|
|
137
|
-
}
|
|
138
|
-
printWarning("warn", format, args);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function error(format) {
|
|
143
|
-
{
|
|
144
|
-
{
|
|
145
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
146
|
-
args[_key2 - 1] = arguments[_key2];
|
|
147
|
-
}
|
|
148
|
-
printWarning("error", format, args);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function printWarning(level, format, args) {
|
|
153
|
-
{
|
|
154
|
-
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
155
|
-
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
|
156
|
-
if (stack !== "") {
|
|
157
|
-
format += "%s";
|
|
158
|
-
args = args.concat([stack]);
|
|
159
|
-
}
|
|
160
|
-
var argsWithFormat = args.map(function(item) {
|
|
161
|
-
return String(item);
|
|
162
|
-
});
|
|
163
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
164
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
var didWarnStateUpdateForUnmountedComponent = {};
|
|
168
|
-
function warnNoop(publicInstance, callerName) {
|
|
169
|
-
{
|
|
170
|
-
var _constructor = publicInstance.constructor;
|
|
171
|
-
var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
|
|
172
|
-
var warningKey = componentName + "." + callerName;
|
|
173
|
-
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName);
|
|
177
|
-
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
var ReactNoopUpdateQueue = {
|
|
181
|
-
/**
|
|
182
|
-
* Checks whether or not this composite component is mounted.
|
|
183
|
-
* @param {ReactClass} publicInstance The instance we want to test.
|
|
184
|
-
* @return {boolean} True if mounted, false otherwise.
|
|
185
|
-
* @protected
|
|
186
|
-
* @final
|
|
187
|
-
*/
|
|
188
|
-
isMounted: function(publicInstance) {
|
|
189
|
-
return false;
|
|
190
|
-
},
|
|
191
|
-
/**
|
|
192
|
-
* Forces an update. This should only be invoked when it is known with
|
|
193
|
-
* certainty that we are **not** in a DOM transaction.
|
|
194
|
-
*
|
|
195
|
-
* You may want to call this when you know that some deeper aspect of the
|
|
196
|
-
* component's state has changed but `setState` was not called.
|
|
197
|
-
*
|
|
198
|
-
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
199
|
-
* `componentWillUpdate` and `componentDidUpdate`.
|
|
200
|
-
*
|
|
201
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
202
|
-
* @param {?function} callback Called after component is updated.
|
|
203
|
-
* @param {?string} callerName name of the calling function in the public API.
|
|
204
|
-
* @internal
|
|
205
|
-
*/
|
|
206
|
-
enqueueForceUpdate: function(publicInstance, callback, callerName) {
|
|
207
|
-
warnNoop(publicInstance, "forceUpdate");
|
|
208
|
-
},
|
|
209
|
-
/**
|
|
210
|
-
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
211
|
-
* You should treat `this.state` as immutable.
|
|
212
|
-
*
|
|
213
|
-
* There is no guarantee that `this.state` will be immediately updated, so
|
|
214
|
-
* accessing `this.state` after calling this method may return the old value.
|
|
215
|
-
*
|
|
216
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
217
|
-
* @param {object} completeState Next state.
|
|
218
|
-
* @param {?function} callback Called after component is updated.
|
|
219
|
-
* @param {?string} callerName name of the calling function in the public API.
|
|
220
|
-
* @internal
|
|
221
|
-
*/
|
|
222
|
-
enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
|
|
223
|
-
warnNoop(publicInstance, "replaceState");
|
|
224
|
-
},
|
|
225
|
-
/**
|
|
226
|
-
* Sets a subset of the state. This only exists because _pendingState is
|
|
227
|
-
* internal. This provides a merging strategy that is not available to deep
|
|
228
|
-
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
229
|
-
* during the merge.
|
|
230
|
-
*
|
|
231
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
232
|
-
* @param {object} partialState Next partial state to be merged with state.
|
|
233
|
-
* @param {?function} callback Called after component is updated.
|
|
234
|
-
* @param {?string} Name of the calling function in the public API.
|
|
235
|
-
* @internal
|
|
236
|
-
*/
|
|
237
|
-
enqueueSetState: function(publicInstance, partialState, callback, callerName) {
|
|
238
|
-
warnNoop(publicInstance, "setState");
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
var assign = Object.assign;
|
|
242
|
-
var emptyObject = {};
|
|
243
|
-
{
|
|
244
|
-
Object.freeze(emptyObject);
|
|
245
|
-
}
|
|
246
|
-
function Component(props, context, updater) {
|
|
247
|
-
this.props = props;
|
|
248
|
-
this.context = context;
|
|
249
|
-
this.refs = emptyObject;
|
|
250
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
251
|
-
}
|
|
252
|
-
Component.prototype.isReactComponent = {};
|
|
253
|
-
Component.prototype.setState = function(partialState, callback) {
|
|
254
|
-
if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
|
|
255
|
-
throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
256
|
-
}
|
|
257
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
258
|
-
};
|
|
259
|
-
Component.prototype.forceUpdate = function(callback) {
|
|
260
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
261
|
-
};
|
|
262
|
-
{
|
|
263
|
-
var deprecatedAPIs = {
|
|
264
|
-
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
265
|
-
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
266
|
-
};
|
|
267
|
-
var defineDeprecationWarning = function(methodName, info) {
|
|
268
|
-
Object.defineProperty(Component.prototype, methodName, {
|
|
269
|
-
get: function() {
|
|
270
|
-
warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
|
|
271
|
-
return void 0;
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
};
|
|
275
|
-
for (var fnName in deprecatedAPIs) {
|
|
276
|
-
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
277
|
-
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
function ComponentDummy() {
|
|
282
|
-
}
|
|
283
|
-
ComponentDummy.prototype = Component.prototype;
|
|
284
|
-
function PureComponent(props, context, updater) {
|
|
285
|
-
this.props = props;
|
|
286
|
-
this.context = context;
|
|
287
|
-
this.refs = emptyObject;
|
|
288
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
289
|
-
}
|
|
290
|
-
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
291
|
-
pureComponentPrototype.constructor = PureComponent;
|
|
292
|
-
assign(pureComponentPrototype, Component.prototype);
|
|
293
|
-
pureComponentPrototype.isPureReactComponent = true;
|
|
294
|
-
function createRef() {
|
|
295
|
-
var refObject = {
|
|
296
|
-
current: null
|
|
297
|
-
};
|
|
298
|
-
{
|
|
299
|
-
Object.seal(refObject);
|
|
300
|
-
}
|
|
301
|
-
return refObject;
|
|
302
|
-
}
|
|
303
|
-
var isArrayImpl = Array.isArray;
|
|
304
|
-
function isArray(a) {
|
|
305
|
-
return isArrayImpl(a);
|
|
306
|
-
}
|
|
307
|
-
function typeName(value) {
|
|
308
|
-
{
|
|
309
|
-
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
|
310
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
311
|
-
return type;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
function willCoercionThrow(value) {
|
|
315
|
-
{
|
|
316
|
-
try {
|
|
317
|
-
testStringCoercion(value);
|
|
318
|
-
return false;
|
|
319
|
-
} catch (e) {
|
|
320
|
-
return true;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
function testStringCoercion(value) {
|
|
325
|
-
return "" + value;
|
|
326
|
-
}
|
|
327
|
-
function checkKeyStringCoercion(value) {
|
|
328
|
-
{
|
|
329
|
-
if (willCoercionThrow(value)) {
|
|
330
|
-
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
331
|
-
return testStringCoercion(value);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
336
|
-
var displayName = outerType.displayName;
|
|
337
|
-
if (displayName) {
|
|
338
|
-
return displayName;
|
|
339
|
-
}
|
|
340
|
-
var functionName = innerType.displayName || innerType.name || "";
|
|
341
|
-
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
342
|
-
}
|
|
343
|
-
function getContextName(type) {
|
|
344
|
-
return type.displayName || "Context";
|
|
345
|
-
}
|
|
346
|
-
function getComponentNameFromType(type) {
|
|
347
|
-
if (type == null) {
|
|
348
|
-
return null;
|
|
349
|
-
}
|
|
350
|
-
{
|
|
351
|
-
if (typeof type.tag === "number") {
|
|
352
|
-
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
if (typeof type === "function") {
|
|
356
|
-
return type.displayName || type.name || null;
|
|
357
|
-
}
|
|
358
|
-
if (typeof type === "string") {
|
|
359
|
-
return type;
|
|
360
|
-
}
|
|
361
|
-
switch (type) {
|
|
362
|
-
case REACT_FRAGMENT_TYPE:
|
|
363
|
-
return "Fragment";
|
|
364
|
-
case REACT_PORTAL_TYPE:
|
|
365
|
-
return "Portal";
|
|
366
|
-
case REACT_PROFILER_TYPE:
|
|
367
|
-
return "Profiler";
|
|
368
|
-
case REACT_STRICT_MODE_TYPE:
|
|
369
|
-
return "StrictMode";
|
|
370
|
-
case REACT_SUSPENSE_TYPE:
|
|
371
|
-
return "Suspense";
|
|
372
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
373
|
-
return "SuspenseList";
|
|
374
|
-
}
|
|
375
|
-
if (typeof type === "object") {
|
|
376
|
-
switch (type.$$typeof) {
|
|
377
|
-
case REACT_CONTEXT_TYPE:
|
|
378
|
-
var context = type;
|
|
379
|
-
return getContextName(context) + ".Consumer";
|
|
380
|
-
case REACT_PROVIDER_TYPE:
|
|
381
|
-
var provider = type;
|
|
382
|
-
return getContextName(provider._context) + ".Provider";
|
|
383
|
-
case REACT_FORWARD_REF_TYPE:
|
|
384
|
-
return getWrappedName(type, type.render, "ForwardRef");
|
|
385
|
-
case REACT_MEMO_TYPE:
|
|
386
|
-
var outerName = type.displayName || null;
|
|
387
|
-
if (outerName !== null) {
|
|
388
|
-
return outerName;
|
|
389
|
-
}
|
|
390
|
-
return getComponentNameFromType(type.type) || "Memo";
|
|
391
|
-
case REACT_LAZY_TYPE: {
|
|
392
|
-
var lazyComponent = type;
|
|
393
|
-
var payload = lazyComponent._payload;
|
|
394
|
-
var init = lazyComponent._init;
|
|
395
|
-
try {
|
|
396
|
-
return getComponentNameFromType(init(payload));
|
|
397
|
-
} catch (x) {
|
|
398
|
-
return null;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
return null;
|
|
404
|
-
}
|
|
405
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
406
|
-
var RESERVED_PROPS = {
|
|
407
|
-
key: true,
|
|
408
|
-
ref: true,
|
|
409
|
-
__self: true,
|
|
410
|
-
__source: true
|
|
411
|
-
};
|
|
412
|
-
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
|
|
413
|
-
{
|
|
414
|
-
didWarnAboutStringRefs = {};
|
|
415
|
-
}
|
|
416
|
-
function hasValidRef(config) {
|
|
417
|
-
{
|
|
418
|
-
if (hasOwnProperty.call(config, "ref")) {
|
|
419
|
-
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
420
|
-
if (getter && getter.isReactWarning) {
|
|
421
|
-
return false;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
return config.ref !== void 0;
|
|
426
|
-
}
|
|
427
|
-
function hasValidKey(config) {
|
|
428
|
-
{
|
|
429
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
430
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
431
|
-
if (getter && getter.isReactWarning) {
|
|
432
|
-
return false;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
return config.key !== void 0;
|
|
437
|
-
}
|
|
438
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
439
|
-
var warnAboutAccessingKey = function() {
|
|
440
|
-
{
|
|
441
|
-
if (!specialPropKeyWarningShown) {
|
|
442
|
-
specialPropKeyWarningShown = true;
|
|
443
|
-
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
448
|
-
Object.defineProperty(props, "key", {
|
|
449
|
-
get: warnAboutAccessingKey,
|
|
450
|
-
configurable: true
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
454
|
-
var warnAboutAccessingRef = function() {
|
|
455
|
-
{
|
|
456
|
-
if (!specialPropRefWarningShown) {
|
|
457
|
-
specialPropRefWarningShown = true;
|
|
458
|
-
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
463
|
-
Object.defineProperty(props, "ref", {
|
|
464
|
-
get: warnAboutAccessingRef,
|
|
465
|
-
configurable: true
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
function warnIfStringRefCannotBeAutoConverted(config) {
|
|
469
|
-
{
|
|
470
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
|
|
471
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
472
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
473
|
-
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
|
|
474
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
480
|
-
var element = {
|
|
481
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
482
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
483
|
-
// Built-in properties that belong on the element
|
|
484
|
-
type,
|
|
485
|
-
key,
|
|
486
|
-
ref,
|
|
487
|
-
props,
|
|
488
|
-
// Record the component responsible for creating this element.
|
|
489
|
-
_owner: owner
|
|
490
|
-
};
|
|
491
|
-
{
|
|
492
|
-
element._store = {};
|
|
493
|
-
Object.defineProperty(element._store, "validated", {
|
|
494
|
-
configurable: false,
|
|
495
|
-
enumerable: false,
|
|
496
|
-
writable: true,
|
|
497
|
-
value: false
|
|
498
|
-
});
|
|
499
|
-
Object.defineProperty(element, "_self", {
|
|
500
|
-
configurable: false,
|
|
501
|
-
enumerable: false,
|
|
502
|
-
writable: false,
|
|
503
|
-
value: self
|
|
504
|
-
});
|
|
505
|
-
Object.defineProperty(element, "_source", {
|
|
506
|
-
configurable: false,
|
|
507
|
-
enumerable: false,
|
|
508
|
-
writable: false,
|
|
509
|
-
value: source
|
|
510
|
-
});
|
|
511
|
-
if (Object.freeze) {
|
|
512
|
-
Object.freeze(element.props);
|
|
513
|
-
Object.freeze(element);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
return element;
|
|
517
|
-
};
|
|
518
|
-
function createElement(type, config, children) {
|
|
519
|
-
var propName;
|
|
520
|
-
var props = {};
|
|
521
|
-
var key = null;
|
|
522
|
-
var ref = null;
|
|
523
|
-
var self = null;
|
|
524
|
-
var source = null;
|
|
525
|
-
if (config != null) {
|
|
526
|
-
if (hasValidRef(config)) {
|
|
527
|
-
ref = config.ref;
|
|
528
|
-
{
|
|
529
|
-
warnIfStringRefCannotBeAutoConverted(config);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
if (hasValidKey(config)) {
|
|
533
|
-
{
|
|
534
|
-
checkKeyStringCoercion(config.key);
|
|
535
|
-
}
|
|
536
|
-
key = "" + config.key;
|
|
537
|
-
}
|
|
538
|
-
self = config.__self === void 0 ? null : config.__self;
|
|
539
|
-
source = config.__source === void 0 ? null : config.__source;
|
|
540
|
-
for (propName in config) {
|
|
541
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
542
|
-
props[propName] = config[propName];
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
var childrenLength = arguments.length - 2;
|
|
547
|
-
if (childrenLength === 1) {
|
|
548
|
-
props.children = children;
|
|
549
|
-
} else if (childrenLength > 1) {
|
|
550
|
-
var childArray = Array(childrenLength);
|
|
551
|
-
for (var i = 0; i < childrenLength; i++) {
|
|
552
|
-
childArray[i] = arguments[i + 2];
|
|
553
|
-
}
|
|
554
|
-
{
|
|
555
|
-
if (Object.freeze) {
|
|
556
|
-
Object.freeze(childArray);
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
props.children = childArray;
|
|
560
|
-
}
|
|
561
|
-
if (type && type.defaultProps) {
|
|
562
|
-
var defaultProps = type.defaultProps;
|
|
563
|
-
for (propName in defaultProps) {
|
|
564
|
-
if (props[propName] === void 0) {
|
|
565
|
-
props[propName] = defaultProps[propName];
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
{
|
|
570
|
-
if (key || ref) {
|
|
571
|
-
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
|
572
|
-
if (key) {
|
|
573
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
574
|
-
}
|
|
575
|
-
if (ref) {
|
|
576
|
-
defineRefPropWarningGetter(props, displayName);
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
581
|
-
}
|
|
582
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
583
|
-
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
584
|
-
return newElement;
|
|
585
|
-
}
|
|
586
|
-
function cloneElement(element, config, children) {
|
|
587
|
-
if (element === null || element === void 0) {
|
|
588
|
-
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
|
|
589
|
-
}
|
|
590
|
-
var propName;
|
|
591
|
-
var props = assign({}, element.props);
|
|
592
|
-
var key = element.key;
|
|
593
|
-
var ref = element.ref;
|
|
594
|
-
var self = element._self;
|
|
595
|
-
var source = element._source;
|
|
596
|
-
var owner = element._owner;
|
|
597
|
-
if (config != null) {
|
|
598
|
-
if (hasValidRef(config)) {
|
|
599
|
-
ref = config.ref;
|
|
600
|
-
owner = ReactCurrentOwner.current;
|
|
601
|
-
}
|
|
602
|
-
if (hasValidKey(config)) {
|
|
603
|
-
{
|
|
604
|
-
checkKeyStringCoercion(config.key);
|
|
605
|
-
}
|
|
606
|
-
key = "" + config.key;
|
|
607
|
-
}
|
|
608
|
-
var defaultProps;
|
|
609
|
-
if (element.type && element.type.defaultProps) {
|
|
610
|
-
defaultProps = element.type.defaultProps;
|
|
611
|
-
}
|
|
612
|
-
for (propName in config) {
|
|
613
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
614
|
-
if (config[propName] === void 0 && defaultProps !== void 0) {
|
|
615
|
-
props[propName] = defaultProps[propName];
|
|
616
|
-
} else {
|
|
617
|
-
props[propName] = config[propName];
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
var childrenLength = arguments.length - 2;
|
|
623
|
-
if (childrenLength === 1) {
|
|
624
|
-
props.children = children;
|
|
625
|
-
} else if (childrenLength > 1) {
|
|
626
|
-
var childArray = Array(childrenLength);
|
|
627
|
-
for (var i = 0; i < childrenLength; i++) {
|
|
628
|
-
childArray[i] = arguments[i + 2];
|
|
629
|
-
}
|
|
630
|
-
props.children = childArray;
|
|
631
|
-
}
|
|
632
|
-
return ReactElement(element.type, key, ref, self, source, owner, props);
|
|
633
|
-
}
|
|
634
|
-
function isValidElement(object) {
|
|
635
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
636
|
-
}
|
|
637
|
-
var SEPARATOR = ".";
|
|
638
|
-
var SUBSEPARATOR = ":";
|
|
639
|
-
function escape(key) {
|
|
640
|
-
var escapeRegex = /[=:]/g;
|
|
641
|
-
var escaperLookup = {
|
|
642
|
-
"=": "=0",
|
|
643
|
-
":": "=2"
|
|
644
|
-
};
|
|
645
|
-
var escapedString = key.replace(escapeRegex, function(match) {
|
|
646
|
-
return escaperLookup[match];
|
|
647
|
-
});
|
|
648
|
-
return "$" + escapedString;
|
|
649
|
-
}
|
|
650
|
-
var didWarnAboutMaps = false;
|
|
651
|
-
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
652
|
-
function escapeUserProvidedKey(text) {
|
|
653
|
-
return text.replace(userProvidedKeyEscapeRegex, "$&/");
|
|
654
|
-
}
|
|
655
|
-
function getElementKey(element, index) {
|
|
656
|
-
if (typeof element === "object" && element !== null && element.key != null) {
|
|
657
|
-
{
|
|
658
|
-
checkKeyStringCoercion(element.key);
|
|
659
|
-
}
|
|
660
|
-
return escape("" + element.key);
|
|
661
|
-
}
|
|
662
|
-
return index.toString(36);
|
|
663
|
-
}
|
|
664
|
-
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
665
|
-
var type = typeof children;
|
|
666
|
-
if (type === "undefined" || type === "boolean") {
|
|
667
|
-
children = null;
|
|
668
|
-
}
|
|
669
|
-
var invokeCallback = false;
|
|
670
|
-
if (children === null) {
|
|
671
|
-
invokeCallback = true;
|
|
672
|
-
} else {
|
|
673
|
-
switch (type) {
|
|
674
|
-
case "string":
|
|
675
|
-
case "number":
|
|
676
|
-
invokeCallback = true;
|
|
677
|
-
break;
|
|
678
|
-
case "object":
|
|
679
|
-
switch (children.$$typeof) {
|
|
680
|
-
case REACT_ELEMENT_TYPE:
|
|
681
|
-
case REACT_PORTAL_TYPE:
|
|
682
|
-
invokeCallback = true;
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
if (invokeCallback) {
|
|
687
|
-
var _child = children;
|
|
688
|
-
var mappedChild = callback(_child);
|
|
689
|
-
var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
|
|
690
|
-
if (isArray(mappedChild)) {
|
|
691
|
-
var escapedChildKey = "";
|
|
692
|
-
if (childKey != null) {
|
|
693
|
-
escapedChildKey = escapeUserProvidedKey(childKey) + "/";
|
|
694
|
-
}
|
|
695
|
-
mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
|
|
696
|
-
return c;
|
|
697
|
-
});
|
|
698
|
-
} else if (mappedChild != null) {
|
|
699
|
-
if (isValidElement(mappedChild)) {
|
|
700
|
-
{
|
|
701
|
-
if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
|
|
702
|
-
checkKeyStringCoercion(mappedChild.key);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
mappedChild = cloneAndReplaceKey(
|
|
706
|
-
mappedChild,
|
|
707
|
-
// Keep both the (mapped) and old keys if they differ, just as
|
|
708
|
-
// traverseAllChildren used to do for objects as children
|
|
709
|
-
escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
710
|
-
(mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
|
|
711
|
-
// $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
|
712
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
713
|
-
escapeUserProvidedKey("" + mappedChild.key) + "/"
|
|
714
|
-
) : "") + childKey
|
|
715
|
-
);
|
|
716
|
-
}
|
|
717
|
-
array.push(mappedChild);
|
|
718
|
-
}
|
|
719
|
-
return 1;
|
|
720
|
-
}
|
|
721
|
-
var child;
|
|
722
|
-
var nextName;
|
|
723
|
-
var subtreeCount = 0;
|
|
724
|
-
var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
725
|
-
if (isArray(children)) {
|
|
726
|
-
for (var i = 0; i < children.length; i++) {
|
|
727
|
-
child = children[i];
|
|
728
|
-
nextName = nextNamePrefix + getElementKey(child, i);
|
|
729
|
-
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
|
730
|
-
}
|
|
731
|
-
} else {
|
|
732
|
-
var iteratorFn = getIteratorFn(children);
|
|
733
|
-
if (typeof iteratorFn === "function") {
|
|
734
|
-
var iterableChildren = children;
|
|
735
|
-
{
|
|
736
|
-
if (iteratorFn === iterableChildren.entries) {
|
|
737
|
-
if (!didWarnAboutMaps) {
|
|
738
|
-
warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
|
|
739
|
-
}
|
|
740
|
-
didWarnAboutMaps = true;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
var iterator = iteratorFn.call(iterableChildren);
|
|
744
|
-
var step;
|
|
745
|
-
var ii = 0;
|
|
746
|
-
while (!(step = iterator.next()).done) {
|
|
747
|
-
child = step.value;
|
|
748
|
-
nextName = nextNamePrefix + getElementKey(child, ii++);
|
|
749
|
-
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
|
750
|
-
}
|
|
751
|
-
} else if (type === "object") {
|
|
752
|
-
var childrenString = String(children);
|
|
753
|
-
throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
return subtreeCount;
|
|
757
|
-
}
|
|
758
|
-
function mapChildren(children, func, context) {
|
|
759
|
-
if (children == null) {
|
|
760
|
-
return children;
|
|
761
|
-
}
|
|
762
|
-
var result = [];
|
|
763
|
-
var count = 0;
|
|
764
|
-
mapIntoArray(children, result, "", "", function(child) {
|
|
765
|
-
return func.call(context, child, count++);
|
|
766
|
-
});
|
|
767
|
-
return result;
|
|
768
|
-
}
|
|
769
|
-
function countChildren(children) {
|
|
770
|
-
var n = 0;
|
|
771
|
-
mapChildren(children, function() {
|
|
772
|
-
n++;
|
|
773
|
-
});
|
|
774
|
-
return n;
|
|
775
|
-
}
|
|
776
|
-
function forEachChildren(children, forEachFunc, forEachContext) {
|
|
777
|
-
mapChildren(children, function() {
|
|
778
|
-
forEachFunc.apply(this, arguments);
|
|
779
|
-
}, forEachContext);
|
|
780
|
-
}
|
|
781
|
-
function toArray(children) {
|
|
782
|
-
return mapChildren(children, function(child) {
|
|
783
|
-
return child;
|
|
784
|
-
}) || [];
|
|
785
|
-
}
|
|
786
|
-
function onlyChild(children) {
|
|
787
|
-
if (!isValidElement(children)) {
|
|
788
|
-
throw new Error("React.Children.only expected to receive a single React element child.");
|
|
789
|
-
}
|
|
790
|
-
return children;
|
|
791
|
-
}
|
|
792
|
-
function createContext(defaultValue) {
|
|
793
|
-
var context = {
|
|
794
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
795
|
-
// As a workaround to support multiple concurrent renderers, we categorize
|
|
796
|
-
// some renderers as primary and others as secondary. We only expect
|
|
797
|
-
// there to be two concurrent renderers at most: React Native (primary) and
|
|
798
|
-
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
799
|
-
// Secondary renderers store their context values on separate fields.
|
|
800
|
-
_currentValue: defaultValue,
|
|
801
|
-
_currentValue2: defaultValue,
|
|
802
|
-
// Used to track how many concurrent renderers this context currently
|
|
803
|
-
// supports within in a single renderer. Such as parallel server rendering.
|
|
804
|
-
_threadCount: 0,
|
|
805
|
-
// These are circular
|
|
806
|
-
Provider: null,
|
|
807
|
-
Consumer: null,
|
|
808
|
-
// Add these to use same hidden class in VM as ServerContext
|
|
809
|
-
_defaultValue: null,
|
|
810
|
-
_globalName: null
|
|
811
|
-
};
|
|
812
|
-
context.Provider = {
|
|
813
|
-
$$typeof: REACT_PROVIDER_TYPE,
|
|
814
|
-
_context: context
|
|
815
|
-
};
|
|
816
|
-
var hasWarnedAboutUsingNestedContextConsumers = false;
|
|
817
|
-
var hasWarnedAboutUsingConsumerProvider = false;
|
|
818
|
-
var hasWarnedAboutDisplayNameOnConsumer = false;
|
|
819
|
-
{
|
|
820
|
-
var Consumer = {
|
|
821
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
822
|
-
_context: context
|
|
823
|
-
};
|
|
824
|
-
Object.defineProperties(Consumer, {
|
|
825
|
-
Provider: {
|
|
826
|
-
get: function() {
|
|
827
|
-
if (!hasWarnedAboutUsingConsumerProvider) {
|
|
828
|
-
hasWarnedAboutUsingConsumerProvider = true;
|
|
829
|
-
error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
|
|
830
|
-
}
|
|
831
|
-
return context.Provider;
|
|
832
|
-
},
|
|
833
|
-
set: function(_Provider) {
|
|
834
|
-
context.Provider = _Provider;
|
|
835
|
-
}
|
|
836
|
-
},
|
|
837
|
-
_currentValue: {
|
|
838
|
-
get: function() {
|
|
839
|
-
return context._currentValue;
|
|
840
|
-
},
|
|
841
|
-
set: function(_currentValue) {
|
|
842
|
-
context._currentValue = _currentValue;
|
|
843
|
-
}
|
|
844
|
-
},
|
|
845
|
-
_currentValue2: {
|
|
846
|
-
get: function() {
|
|
847
|
-
return context._currentValue2;
|
|
848
|
-
},
|
|
849
|
-
set: function(_currentValue2) {
|
|
850
|
-
context._currentValue2 = _currentValue2;
|
|
851
|
-
}
|
|
852
|
-
},
|
|
853
|
-
_threadCount: {
|
|
854
|
-
get: function() {
|
|
855
|
-
return context._threadCount;
|
|
856
|
-
},
|
|
857
|
-
set: function(_threadCount) {
|
|
858
|
-
context._threadCount = _threadCount;
|
|
859
|
-
}
|
|
860
|
-
},
|
|
861
|
-
Consumer: {
|
|
862
|
-
get: function() {
|
|
863
|
-
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
|
864
|
-
hasWarnedAboutUsingNestedContextConsumers = true;
|
|
865
|
-
error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
|
|
866
|
-
}
|
|
867
|
-
return context.Consumer;
|
|
868
|
-
}
|
|
869
|
-
},
|
|
870
|
-
displayName: {
|
|
871
|
-
get: function() {
|
|
872
|
-
return context.displayName;
|
|
873
|
-
},
|
|
874
|
-
set: function(displayName) {
|
|
875
|
-
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
|
876
|
-
warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
|
|
877
|
-
hasWarnedAboutDisplayNameOnConsumer = true;
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
});
|
|
882
|
-
context.Consumer = Consumer;
|
|
883
|
-
}
|
|
884
|
-
{
|
|
885
|
-
context._currentRenderer = null;
|
|
886
|
-
context._currentRenderer2 = null;
|
|
887
|
-
}
|
|
888
|
-
return context;
|
|
889
|
-
}
|
|
890
|
-
var Uninitialized = -1;
|
|
891
|
-
var Pending = 0;
|
|
892
|
-
var Resolved = 1;
|
|
893
|
-
var Rejected = 2;
|
|
894
|
-
function lazyInitializer(payload) {
|
|
895
|
-
if (payload._status === Uninitialized) {
|
|
896
|
-
var ctor = payload._result;
|
|
897
|
-
var thenable = ctor();
|
|
898
|
-
thenable.then(function(moduleObject2) {
|
|
899
|
-
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
900
|
-
var resolved = payload;
|
|
901
|
-
resolved._status = Resolved;
|
|
902
|
-
resolved._result = moduleObject2;
|
|
903
|
-
}
|
|
904
|
-
}, function(error2) {
|
|
905
|
-
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
906
|
-
var rejected = payload;
|
|
907
|
-
rejected._status = Rejected;
|
|
908
|
-
rejected._result = error2;
|
|
909
|
-
}
|
|
910
|
-
});
|
|
911
|
-
if (payload._status === Uninitialized) {
|
|
912
|
-
var pending = payload;
|
|
913
|
-
pending._status = Pending;
|
|
914
|
-
pending._result = thenable;
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
if (payload._status === Resolved) {
|
|
918
|
-
var moduleObject = payload._result;
|
|
919
|
-
{
|
|
920
|
-
if (moduleObject === void 0) {
|
|
921
|
-
error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
{
|
|
925
|
-
if (!("default" in moduleObject)) {
|
|
926
|
-
error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
return moduleObject.default;
|
|
930
|
-
} else {
|
|
931
|
-
throw payload._result;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
function lazy(ctor) {
|
|
935
|
-
var payload = {
|
|
936
|
-
// We use these fields to store the result.
|
|
937
|
-
_status: Uninitialized,
|
|
938
|
-
_result: ctor
|
|
939
|
-
};
|
|
940
|
-
var lazyType = {
|
|
941
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
942
|
-
_payload: payload,
|
|
943
|
-
_init: lazyInitializer
|
|
944
|
-
};
|
|
945
|
-
{
|
|
946
|
-
var defaultProps;
|
|
947
|
-
var propTypes;
|
|
948
|
-
Object.defineProperties(lazyType, {
|
|
949
|
-
defaultProps: {
|
|
950
|
-
configurable: true,
|
|
951
|
-
get: function() {
|
|
952
|
-
return defaultProps;
|
|
953
|
-
},
|
|
954
|
-
set: function(newDefaultProps) {
|
|
955
|
-
error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
|
|
956
|
-
defaultProps = newDefaultProps;
|
|
957
|
-
Object.defineProperty(lazyType, "defaultProps", {
|
|
958
|
-
enumerable: true
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
},
|
|
962
|
-
propTypes: {
|
|
963
|
-
configurable: true,
|
|
964
|
-
get: function() {
|
|
965
|
-
return propTypes;
|
|
966
|
-
},
|
|
967
|
-
set: function(newPropTypes) {
|
|
968
|
-
error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
|
|
969
|
-
propTypes = newPropTypes;
|
|
970
|
-
Object.defineProperty(lazyType, "propTypes", {
|
|
971
|
-
enumerable: true
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
return lazyType;
|
|
978
|
-
}
|
|
979
|
-
function forwardRef(render) {
|
|
980
|
-
{
|
|
981
|
-
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
|
982
|
-
error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
|
|
983
|
-
} else if (typeof render !== "function") {
|
|
984
|
-
error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
|
|
985
|
-
} else {
|
|
986
|
-
if (render.length !== 0 && render.length !== 2) {
|
|
987
|
-
error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
if (render != null) {
|
|
991
|
-
if (render.defaultProps != null || render.propTypes != null) {
|
|
992
|
-
error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
var elementType = {
|
|
997
|
-
$$typeof: REACT_FORWARD_REF_TYPE,
|
|
998
|
-
render
|
|
999
|
-
};
|
|
1000
|
-
{
|
|
1001
|
-
var ownName;
|
|
1002
|
-
Object.defineProperty(elementType, "displayName", {
|
|
1003
|
-
enumerable: false,
|
|
1004
|
-
configurable: true,
|
|
1005
|
-
get: function() {
|
|
1006
|
-
return ownName;
|
|
1007
|
-
},
|
|
1008
|
-
set: function(name) {
|
|
1009
|
-
ownName = name;
|
|
1010
|
-
if (!render.name && !render.displayName) {
|
|
1011
|
-
render.displayName = name;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
});
|
|
1015
|
-
}
|
|
1016
|
-
return elementType;
|
|
1017
|
-
}
|
|
1018
|
-
var REACT_MODULE_REFERENCE;
|
|
1019
|
-
{
|
|
1020
|
-
REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
1021
|
-
}
|
|
1022
|
-
function isValidElementType(type) {
|
|
1023
|
-
if (typeof type === "string" || typeof type === "function") {
|
|
1024
|
-
return true;
|
|
1025
|
-
}
|
|
1026
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
1027
|
-
return true;
|
|
1028
|
-
}
|
|
1029
|
-
if (typeof type === "object" && type !== null) {
|
|
1030
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
1031
|
-
// types supported by any Flight configuration anywhere since
|
|
1032
|
-
// we don't know which Flight build this will end up being used
|
|
1033
|
-
// with.
|
|
1034
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
1035
|
-
return true;
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
return false;
|
|
1039
|
-
}
|
|
1040
|
-
function memo(type, compare) {
|
|
1041
|
-
{
|
|
1042
|
-
if (!isValidElementType(type)) {
|
|
1043
|
-
error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
var elementType = {
|
|
1047
|
-
$$typeof: REACT_MEMO_TYPE,
|
|
1048
|
-
type,
|
|
1049
|
-
compare: compare === void 0 ? null : compare
|
|
1050
|
-
};
|
|
1051
|
-
{
|
|
1052
|
-
var ownName;
|
|
1053
|
-
Object.defineProperty(elementType, "displayName", {
|
|
1054
|
-
enumerable: false,
|
|
1055
|
-
configurable: true,
|
|
1056
|
-
get: function() {
|
|
1057
|
-
return ownName;
|
|
1058
|
-
},
|
|
1059
|
-
set: function(name) {
|
|
1060
|
-
ownName = name;
|
|
1061
|
-
if (!type.name && !type.displayName) {
|
|
1062
|
-
type.displayName = name;
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
});
|
|
1066
|
-
}
|
|
1067
|
-
return elementType;
|
|
1068
|
-
}
|
|
1069
|
-
function resolveDispatcher() {
|
|
1070
|
-
var dispatcher = ReactCurrentDispatcher.current;
|
|
1071
|
-
{
|
|
1072
|
-
if (dispatcher === null) {
|
|
1073
|
-
error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
return dispatcher;
|
|
1077
|
-
}
|
|
1078
|
-
function useContext(Context) {
|
|
1079
|
-
var dispatcher = resolveDispatcher();
|
|
1080
|
-
{
|
|
1081
|
-
if (Context._context !== void 0) {
|
|
1082
|
-
var realContext = Context._context;
|
|
1083
|
-
if (realContext.Consumer === Context) {
|
|
1084
|
-
error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
|
|
1085
|
-
} else if (realContext.Provider === Context) {
|
|
1086
|
-
error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
return dispatcher.useContext(Context);
|
|
1091
|
-
}
|
|
1092
|
-
function useState2(initialState) {
|
|
1093
|
-
var dispatcher = resolveDispatcher();
|
|
1094
|
-
return dispatcher.useState(initialState);
|
|
1095
|
-
}
|
|
1096
|
-
function useReducer(reducer, initialArg, init) {
|
|
1097
|
-
var dispatcher = resolveDispatcher();
|
|
1098
|
-
return dispatcher.useReducer(reducer, initialArg, init);
|
|
1099
|
-
}
|
|
1100
|
-
function useRef2(initialValue) {
|
|
1101
|
-
var dispatcher = resolveDispatcher();
|
|
1102
|
-
return dispatcher.useRef(initialValue);
|
|
1103
|
-
}
|
|
1104
|
-
function useEffect3(create, deps) {
|
|
1105
|
-
var dispatcher = resolveDispatcher();
|
|
1106
|
-
return dispatcher.useEffect(create, deps);
|
|
1107
|
-
}
|
|
1108
|
-
function useInsertionEffect(create, deps) {
|
|
1109
|
-
var dispatcher = resolveDispatcher();
|
|
1110
|
-
return dispatcher.useInsertionEffect(create, deps);
|
|
1111
|
-
}
|
|
1112
|
-
function useLayoutEffect(create, deps) {
|
|
1113
|
-
var dispatcher = resolveDispatcher();
|
|
1114
|
-
return dispatcher.useLayoutEffect(create, deps);
|
|
1115
|
-
}
|
|
1116
|
-
function useCallback(callback, deps) {
|
|
1117
|
-
var dispatcher = resolveDispatcher();
|
|
1118
|
-
return dispatcher.useCallback(callback, deps);
|
|
1119
|
-
}
|
|
1120
|
-
function useMemo(create, deps) {
|
|
1121
|
-
var dispatcher = resolveDispatcher();
|
|
1122
|
-
return dispatcher.useMemo(create, deps);
|
|
1123
|
-
}
|
|
1124
|
-
function useImperativeHandle(ref, create, deps) {
|
|
1125
|
-
var dispatcher = resolveDispatcher();
|
|
1126
|
-
return dispatcher.useImperativeHandle(ref, create, deps);
|
|
1127
|
-
}
|
|
1128
|
-
function useDebugValue(value, formatterFn) {
|
|
1129
|
-
{
|
|
1130
|
-
var dispatcher = resolveDispatcher();
|
|
1131
|
-
return dispatcher.useDebugValue(value, formatterFn);
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
function useTransition() {
|
|
1135
|
-
var dispatcher = resolveDispatcher();
|
|
1136
|
-
return dispatcher.useTransition();
|
|
1137
|
-
}
|
|
1138
|
-
function useDeferredValue(value) {
|
|
1139
|
-
var dispatcher = resolveDispatcher();
|
|
1140
|
-
return dispatcher.useDeferredValue(value);
|
|
1141
|
-
}
|
|
1142
|
-
function useId() {
|
|
1143
|
-
var dispatcher = resolveDispatcher();
|
|
1144
|
-
return dispatcher.useId();
|
|
1145
|
-
}
|
|
1146
|
-
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
1147
|
-
var dispatcher = resolveDispatcher();
|
|
1148
|
-
return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
1149
|
-
}
|
|
1150
|
-
var disabledDepth = 0;
|
|
1151
|
-
var prevLog;
|
|
1152
|
-
var prevInfo;
|
|
1153
|
-
var prevWarn;
|
|
1154
|
-
var prevError;
|
|
1155
|
-
var prevGroup;
|
|
1156
|
-
var prevGroupCollapsed;
|
|
1157
|
-
var prevGroupEnd;
|
|
1158
|
-
function disabledLog() {
|
|
1159
|
-
}
|
|
1160
|
-
disabledLog.__reactDisabledLog = true;
|
|
1161
|
-
function disableLogs() {
|
|
1162
|
-
{
|
|
1163
|
-
if (disabledDepth === 0) {
|
|
1164
|
-
prevLog = console.log;
|
|
1165
|
-
prevInfo = console.info;
|
|
1166
|
-
prevWarn = console.warn;
|
|
1167
|
-
prevError = console.error;
|
|
1168
|
-
prevGroup = console.group;
|
|
1169
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
1170
|
-
prevGroupEnd = console.groupEnd;
|
|
1171
|
-
var props = {
|
|
1172
|
-
configurable: true,
|
|
1173
|
-
enumerable: true,
|
|
1174
|
-
value: disabledLog,
|
|
1175
|
-
writable: true
|
|
1176
|
-
};
|
|
1177
|
-
Object.defineProperties(console, {
|
|
1178
|
-
info: props,
|
|
1179
|
-
log: props,
|
|
1180
|
-
warn: props,
|
|
1181
|
-
error: props,
|
|
1182
|
-
group: props,
|
|
1183
|
-
groupCollapsed: props,
|
|
1184
|
-
groupEnd: props
|
|
1185
|
-
});
|
|
1186
|
-
}
|
|
1187
|
-
disabledDepth++;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
function reenableLogs() {
|
|
1191
|
-
{
|
|
1192
|
-
disabledDepth--;
|
|
1193
|
-
if (disabledDepth === 0) {
|
|
1194
|
-
var props = {
|
|
1195
|
-
configurable: true,
|
|
1196
|
-
enumerable: true,
|
|
1197
|
-
writable: true
|
|
1198
|
-
};
|
|
1199
|
-
Object.defineProperties(console, {
|
|
1200
|
-
log: assign({}, props, {
|
|
1201
|
-
value: prevLog
|
|
1202
|
-
}),
|
|
1203
|
-
info: assign({}, props, {
|
|
1204
|
-
value: prevInfo
|
|
1205
|
-
}),
|
|
1206
|
-
warn: assign({}, props, {
|
|
1207
|
-
value: prevWarn
|
|
1208
|
-
}),
|
|
1209
|
-
error: assign({}, props, {
|
|
1210
|
-
value: prevError
|
|
1211
|
-
}),
|
|
1212
|
-
group: assign({}, props, {
|
|
1213
|
-
value: prevGroup
|
|
1214
|
-
}),
|
|
1215
|
-
groupCollapsed: assign({}, props, {
|
|
1216
|
-
value: prevGroupCollapsed
|
|
1217
|
-
}),
|
|
1218
|
-
groupEnd: assign({}, props, {
|
|
1219
|
-
value: prevGroupEnd
|
|
1220
|
-
})
|
|
1221
|
-
});
|
|
1222
|
-
}
|
|
1223
|
-
if (disabledDepth < 0) {
|
|
1224
|
-
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
|
|
1229
|
-
var prefix;
|
|
1230
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
1231
|
-
{
|
|
1232
|
-
if (prefix === void 0) {
|
|
1233
|
-
try {
|
|
1234
|
-
throw Error();
|
|
1235
|
-
} catch (x) {
|
|
1236
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
1237
|
-
prefix = match && match[1] || "";
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
return "\n" + prefix + name;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
var reentry = false;
|
|
1244
|
-
var componentFrameCache;
|
|
1245
|
-
{
|
|
1246
|
-
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
|
1247
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
1248
|
-
}
|
|
1249
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
1250
|
-
if (!fn || reentry) {
|
|
1251
|
-
return "";
|
|
1252
|
-
}
|
|
1253
|
-
{
|
|
1254
|
-
var frame = componentFrameCache.get(fn);
|
|
1255
|
-
if (frame !== void 0) {
|
|
1256
|
-
return frame;
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
var control;
|
|
1260
|
-
reentry = true;
|
|
1261
|
-
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
1262
|
-
Error.prepareStackTrace = void 0;
|
|
1263
|
-
var previousDispatcher;
|
|
1264
|
-
{
|
|
1265
|
-
previousDispatcher = ReactCurrentDispatcher$1.current;
|
|
1266
|
-
ReactCurrentDispatcher$1.current = null;
|
|
1267
|
-
disableLogs();
|
|
1268
|
-
}
|
|
1269
|
-
try {
|
|
1270
|
-
if (construct) {
|
|
1271
|
-
var Fake = function() {
|
|
1272
|
-
throw Error();
|
|
1273
|
-
};
|
|
1274
|
-
Object.defineProperty(Fake.prototype, "props", {
|
|
1275
|
-
set: function() {
|
|
1276
|
-
throw Error();
|
|
1277
|
-
}
|
|
1278
|
-
});
|
|
1279
|
-
if (typeof Reflect === "object" && Reflect.construct) {
|
|
1280
|
-
try {
|
|
1281
|
-
Reflect.construct(Fake, []);
|
|
1282
|
-
} catch (x) {
|
|
1283
|
-
control = x;
|
|
1284
|
-
}
|
|
1285
|
-
Reflect.construct(fn, [], Fake);
|
|
1286
|
-
} else {
|
|
1287
|
-
try {
|
|
1288
|
-
Fake.call();
|
|
1289
|
-
} catch (x) {
|
|
1290
|
-
control = x;
|
|
1291
|
-
}
|
|
1292
|
-
fn.call(Fake.prototype);
|
|
1293
|
-
}
|
|
1294
|
-
} else {
|
|
1295
|
-
try {
|
|
1296
|
-
throw Error();
|
|
1297
|
-
} catch (x) {
|
|
1298
|
-
control = x;
|
|
1299
|
-
}
|
|
1300
|
-
fn();
|
|
1301
|
-
}
|
|
1302
|
-
} catch (sample) {
|
|
1303
|
-
if (sample && control && typeof sample.stack === "string") {
|
|
1304
|
-
var sampleLines = sample.stack.split("\n");
|
|
1305
|
-
var controlLines = control.stack.split("\n");
|
|
1306
|
-
var s = sampleLines.length - 1;
|
|
1307
|
-
var c = controlLines.length - 1;
|
|
1308
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
1309
|
-
c--;
|
|
1310
|
-
}
|
|
1311
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
1312
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
1313
|
-
if (s !== 1 || c !== 1) {
|
|
1314
|
-
do {
|
|
1315
|
-
s--;
|
|
1316
|
-
c--;
|
|
1317
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
1318
|
-
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
|
1319
|
-
if (fn.displayName && _frame.includes("<anonymous>")) {
|
|
1320
|
-
_frame = _frame.replace("<anonymous>", fn.displayName);
|
|
1321
|
-
}
|
|
1322
|
-
{
|
|
1323
|
-
if (typeof fn === "function") {
|
|
1324
|
-
componentFrameCache.set(fn, _frame);
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
return _frame;
|
|
1328
|
-
}
|
|
1329
|
-
} while (s >= 1 && c >= 0);
|
|
1330
|
-
}
|
|
1331
|
-
break;
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
} finally {
|
|
1336
|
-
reentry = false;
|
|
1337
|
-
{
|
|
1338
|
-
ReactCurrentDispatcher$1.current = previousDispatcher;
|
|
1339
|
-
reenableLogs();
|
|
1340
|
-
}
|
|
1341
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
1342
|
-
}
|
|
1343
|
-
var name = fn ? fn.displayName || fn.name : "";
|
|
1344
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
|
1345
|
-
{
|
|
1346
|
-
if (typeof fn === "function") {
|
|
1347
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
return syntheticFrame;
|
|
1351
|
-
}
|
|
1352
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
1353
|
-
{
|
|
1354
|
-
return describeNativeComponentFrame(fn, false);
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
function shouldConstruct(Component2) {
|
|
1358
|
-
var prototype = Component2.prototype;
|
|
1359
|
-
return !!(prototype && prototype.isReactComponent);
|
|
1360
|
-
}
|
|
1361
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
1362
|
-
if (type == null) {
|
|
1363
|
-
return "";
|
|
1364
|
-
}
|
|
1365
|
-
if (typeof type === "function") {
|
|
1366
|
-
{
|
|
1367
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
if (typeof type === "string") {
|
|
1371
|
-
return describeBuiltInComponentFrame(type);
|
|
1372
|
-
}
|
|
1373
|
-
switch (type) {
|
|
1374
|
-
case REACT_SUSPENSE_TYPE:
|
|
1375
|
-
return describeBuiltInComponentFrame("Suspense");
|
|
1376
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
1377
|
-
return describeBuiltInComponentFrame("SuspenseList");
|
|
1378
|
-
}
|
|
1379
|
-
if (typeof type === "object") {
|
|
1380
|
-
switch (type.$$typeof) {
|
|
1381
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1382
|
-
return describeFunctionComponentFrame(type.render);
|
|
1383
|
-
case REACT_MEMO_TYPE:
|
|
1384
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
1385
|
-
case REACT_LAZY_TYPE: {
|
|
1386
|
-
var lazyComponent = type;
|
|
1387
|
-
var payload = lazyComponent._payload;
|
|
1388
|
-
var init = lazyComponent._init;
|
|
1389
|
-
try {
|
|
1390
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
1391
|
-
} catch (x) {
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
return "";
|
|
1397
|
-
}
|
|
1398
|
-
var loggedTypeFailures = {};
|
|
1399
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1400
|
-
function setCurrentlyValidatingElement(element) {
|
|
1401
|
-
{
|
|
1402
|
-
if (element) {
|
|
1403
|
-
var owner = element._owner;
|
|
1404
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1405
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
1406
|
-
} else {
|
|
1407
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
1412
|
-
{
|
|
1413
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
1414
|
-
for (var typeSpecName in typeSpecs) {
|
|
1415
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
1416
|
-
var error$1 = void 0;
|
|
1417
|
-
try {
|
|
1418
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
1419
|
-
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1420
|
-
err.name = "Invariant Violation";
|
|
1421
|
-
throw err;
|
|
1422
|
-
}
|
|
1423
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1424
|
-
} catch (ex) {
|
|
1425
|
-
error$1 = ex;
|
|
1426
|
-
}
|
|
1427
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
1428
|
-
setCurrentlyValidatingElement(element);
|
|
1429
|
-
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
|
1430
|
-
setCurrentlyValidatingElement(null);
|
|
1431
|
-
}
|
|
1432
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
1433
|
-
loggedTypeFailures[error$1.message] = true;
|
|
1434
|
-
setCurrentlyValidatingElement(element);
|
|
1435
|
-
error("Failed %s type: %s", location, error$1.message);
|
|
1436
|
-
setCurrentlyValidatingElement(null);
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
1443
|
-
{
|
|
1444
|
-
if (element) {
|
|
1445
|
-
var owner = element._owner;
|
|
1446
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1447
|
-
setExtraStackFrame(stack);
|
|
1448
|
-
} else {
|
|
1449
|
-
setExtraStackFrame(null);
|
|
1450
|
-
}
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
var propTypesMisspellWarningShown;
|
|
1454
|
-
{
|
|
1455
|
-
propTypesMisspellWarningShown = false;
|
|
1456
|
-
}
|
|
1457
|
-
function getDeclarationErrorAddendum() {
|
|
1458
|
-
if (ReactCurrentOwner.current) {
|
|
1459
|
-
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
1460
|
-
if (name) {
|
|
1461
|
-
return "\n\nCheck the render method of `" + name + "`.";
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
return "";
|
|
1465
|
-
}
|
|
1466
|
-
function getSourceInfoErrorAddendum(source) {
|
|
1467
|
-
if (source !== void 0) {
|
|
1468
|
-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
|
1469
|
-
var lineNumber = source.lineNumber;
|
|
1470
|
-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
|
1471
|
-
}
|
|
1472
|
-
return "";
|
|
1473
|
-
}
|
|
1474
|
-
function getSourceInfoErrorAddendumForProps(elementProps) {
|
|
1475
|
-
if (elementProps !== null && elementProps !== void 0) {
|
|
1476
|
-
return getSourceInfoErrorAddendum(elementProps.__source);
|
|
1477
|
-
}
|
|
1478
|
-
return "";
|
|
1479
|
-
}
|
|
1480
|
-
var ownerHasKeyUseWarning = {};
|
|
1481
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1482
|
-
var info = getDeclarationErrorAddendum();
|
|
1483
|
-
if (!info) {
|
|
1484
|
-
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
|
1485
|
-
if (parentName) {
|
|
1486
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
return info;
|
|
1490
|
-
}
|
|
1491
|
-
function validateExplicitKey(element, parentType) {
|
|
1492
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
1493
|
-
return;
|
|
1494
|
-
}
|
|
1495
|
-
element._store.validated = true;
|
|
1496
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1497
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1498
|
-
return;
|
|
1499
|
-
}
|
|
1500
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
|
1501
|
-
var childOwner = "";
|
|
1502
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
|
1503
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
1504
|
-
}
|
|
1505
|
-
{
|
|
1506
|
-
setCurrentlyValidatingElement$1(element);
|
|
1507
|
-
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
1508
|
-
setCurrentlyValidatingElement$1(null);
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
function validateChildKeys(node, parentType) {
|
|
1512
|
-
if (typeof node !== "object") {
|
|
1513
|
-
return;
|
|
1514
|
-
}
|
|
1515
|
-
if (isArray(node)) {
|
|
1516
|
-
for (var i = 0; i < node.length; i++) {
|
|
1517
|
-
var child = node[i];
|
|
1518
|
-
if (isValidElement(child)) {
|
|
1519
|
-
validateExplicitKey(child, parentType);
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
|
-
} else if (isValidElement(node)) {
|
|
1523
|
-
if (node._store) {
|
|
1524
|
-
node._store.validated = true;
|
|
1525
|
-
}
|
|
1526
|
-
} else if (node) {
|
|
1527
|
-
var iteratorFn = getIteratorFn(node);
|
|
1528
|
-
if (typeof iteratorFn === "function") {
|
|
1529
|
-
if (iteratorFn !== node.entries) {
|
|
1530
|
-
var iterator = iteratorFn.call(node);
|
|
1531
|
-
var step;
|
|
1532
|
-
while (!(step = iterator.next()).done) {
|
|
1533
|
-
if (isValidElement(step.value)) {
|
|
1534
|
-
validateExplicitKey(step.value, parentType);
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
function validatePropTypes(element) {
|
|
1542
|
-
{
|
|
1543
|
-
var type = element.type;
|
|
1544
|
-
if (type === null || type === void 0 || typeof type === "string") {
|
|
1545
|
-
return;
|
|
1546
|
-
}
|
|
1547
|
-
var propTypes;
|
|
1548
|
-
if (typeof type === "function") {
|
|
1549
|
-
propTypes = type.propTypes;
|
|
1550
|
-
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1551
|
-
// Inner props are checked in the reconciler.
|
|
1552
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1553
|
-
propTypes = type.propTypes;
|
|
1554
|
-
} else {
|
|
1555
|
-
return;
|
|
1556
|
-
}
|
|
1557
|
-
if (propTypes) {
|
|
1558
|
-
var name = getComponentNameFromType(type);
|
|
1559
|
-
checkPropTypes(propTypes, element.props, "prop", name, element);
|
|
1560
|
-
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
1561
|
-
propTypesMisspellWarningShown = true;
|
|
1562
|
-
var _name = getComponentNameFromType(type);
|
|
1563
|
-
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
1564
|
-
}
|
|
1565
|
-
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
|
1566
|
-
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
function validateFragmentProps(fragment) {
|
|
1571
|
-
{
|
|
1572
|
-
var keys = Object.keys(fragment.props);
|
|
1573
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1574
|
-
var key = keys[i];
|
|
1575
|
-
if (key !== "children" && key !== "key") {
|
|
1576
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1577
|
-
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
1578
|
-
setCurrentlyValidatingElement$1(null);
|
|
1579
|
-
break;
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
if (fragment.ref !== null) {
|
|
1583
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1584
|
-
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
1585
|
-
setCurrentlyValidatingElement$1(null);
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
function createElementWithValidation(type, props, children) {
|
|
1590
|
-
var validType = isValidElementType(type);
|
|
1591
|
-
if (!validType) {
|
|
1592
|
-
var info = "";
|
|
1593
|
-
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
|
1594
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
1595
|
-
}
|
|
1596
|
-
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
|
|
1597
|
-
if (sourceInfo) {
|
|
1598
|
-
info += sourceInfo;
|
|
1599
|
-
} else {
|
|
1600
|
-
info += getDeclarationErrorAddendum();
|
|
1601
|
-
}
|
|
1602
|
-
var typeString;
|
|
1603
|
-
if (type === null) {
|
|
1604
|
-
typeString = "null";
|
|
1605
|
-
} else if (isArray(type)) {
|
|
1606
|
-
typeString = "array";
|
|
1607
|
-
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1608
|
-
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
|
1609
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
1610
|
-
} else {
|
|
1611
|
-
typeString = typeof type;
|
|
1612
|
-
}
|
|
1613
|
-
{
|
|
1614
|
-
error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
var element = createElement.apply(this, arguments);
|
|
1618
|
-
if (element == null) {
|
|
1619
|
-
return element;
|
|
1620
|
-
}
|
|
1621
|
-
if (validType) {
|
|
1622
|
-
for (var i = 2; i < arguments.length; i++) {
|
|
1623
|
-
validateChildKeys(arguments[i], type);
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
1627
|
-
validateFragmentProps(element);
|
|
1628
|
-
} else {
|
|
1629
|
-
validatePropTypes(element);
|
|
1630
|
-
}
|
|
1631
|
-
return element;
|
|
1632
|
-
}
|
|
1633
|
-
var didWarnAboutDeprecatedCreateFactory = false;
|
|
1634
|
-
function createFactoryWithValidation(type) {
|
|
1635
|
-
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
1636
|
-
validatedFactory.type = type;
|
|
1637
|
-
{
|
|
1638
|
-
if (!didWarnAboutDeprecatedCreateFactory) {
|
|
1639
|
-
didWarnAboutDeprecatedCreateFactory = true;
|
|
1640
|
-
warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
|
|
1641
|
-
}
|
|
1642
|
-
Object.defineProperty(validatedFactory, "type", {
|
|
1643
|
-
enumerable: false,
|
|
1644
|
-
get: function() {
|
|
1645
|
-
warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
|
|
1646
|
-
Object.defineProperty(this, "type", {
|
|
1647
|
-
value: type
|
|
1648
|
-
});
|
|
1649
|
-
return type;
|
|
1650
|
-
}
|
|
1651
|
-
});
|
|
1652
|
-
}
|
|
1653
|
-
return validatedFactory;
|
|
1654
|
-
}
|
|
1655
|
-
function cloneElementWithValidation(element, props, children) {
|
|
1656
|
-
var newElement = cloneElement.apply(this, arguments);
|
|
1657
|
-
for (var i = 2; i < arguments.length; i++) {
|
|
1658
|
-
validateChildKeys(arguments[i], newElement.type);
|
|
1659
|
-
}
|
|
1660
|
-
validatePropTypes(newElement);
|
|
1661
|
-
return newElement;
|
|
1662
|
-
}
|
|
1663
|
-
function startTransition(scope, options) {
|
|
1664
|
-
var prevTransition = ReactCurrentBatchConfig.transition;
|
|
1665
|
-
ReactCurrentBatchConfig.transition = {};
|
|
1666
|
-
var currentTransition = ReactCurrentBatchConfig.transition;
|
|
1667
|
-
{
|
|
1668
|
-
ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
|
|
1669
|
-
}
|
|
1670
|
-
try {
|
|
1671
|
-
scope();
|
|
1672
|
-
} finally {
|
|
1673
|
-
ReactCurrentBatchConfig.transition = prevTransition;
|
|
1674
|
-
{
|
|
1675
|
-
if (prevTransition === null && currentTransition._updatedFibers) {
|
|
1676
|
-
var updatedFibersCount = currentTransition._updatedFibers.size;
|
|
1677
|
-
if (updatedFibersCount > 10) {
|
|
1678
|
-
warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
|
|
1679
|
-
}
|
|
1680
|
-
currentTransition._updatedFibers.clear();
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
}
|
|
1684
|
-
}
|
|
1685
|
-
var didWarnAboutMessageChannel = false;
|
|
1686
|
-
var enqueueTaskImpl = null;
|
|
1687
|
-
function enqueueTask(task) {
|
|
1688
|
-
if (enqueueTaskImpl === null) {
|
|
1689
|
-
try {
|
|
1690
|
-
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
1691
|
-
var nodeRequire = module2 && module2[requireString];
|
|
1692
|
-
enqueueTaskImpl = nodeRequire.call(module2, "timers").setImmediate;
|
|
1693
|
-
} catch (_err) {
|
|
1694
|
-
enqueueTaskImpl = function(callback) {
|
|
1695
|
-
{
|
|
1696
|
-
if (didWarnAboutMessageChannel === false) {
|
|
1697
|
-
didWarnAboutMessageChannel = true;
|
|
1698
|
-
if (typeof MessageChannel === "undefined") {
|
|
1699
|
-
error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.");
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
var channel = new MessageChannel();
|
|
1704
|
-
channel.port1.onmessage = callback;
|
|
1705
|
-
channel.port2.postMessage(void 0);
|
|
1706
|
-
};
|
|
1707
|
-
}
|
|
1708
|
-
}
|
|
1709
|
-
return enqueueTaskImpl(task);
|
|
1710
|
-
}
|
|
1711
|
-
var actScopeDepth = 0;
|
|
1712
|
-
var didWarnNoAwaitAct = false;
|
|
1713
|
-
function act(callback) {
|
|
1714
|
-
{
|
|
1715
|
-
var prevActScopeDepth = actScopeDepth;
|
|
1716
|
-
actScopeDepth++;
|
|
1717
|
-
if (ReactCurrentActQueue.current === null) {
|
|
1718
|
-
ReactCurrentActQueue.current = [];
|
|
1719
|
-
}
|
|
1720
|
-
var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
|
|
1721
|
-
var result;
|
|
1722
|
-
try {
|
|
1723
|
-
ReactCurrentActQueue.isBatchingLegacy = true;
|
|
1724
|
-
result = callback();
|
|
1725
|
-
if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
|
|
1726
|
-
var queue = ReactCurrentActQueue.current;
|
|
1727
|
-
if (queue !== null) {
|
|
1728
|
-
ReactCurrentActQueue.didScheduleLegacyUpdate = false;
|
|
1729
|
-
flushActQueue(queue);
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1732
|
-
} catch (error2) {
|
|
1733
|
-
popActScope(prevActScopeDepth);
|
|
1734
|
-
throw error2;
|
|
1735
|
-
} finally {
|
|
1736
|
-
ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
|
|
1737
|
-
}
|
|
1738
|
-
if (result !== null && typeof result === "object" && typeof result.then === "function") {
|
|
1739
|
-
var thenableResult = result;
|
|
1740
|
-
var wasAwaited = false;
|
|
1741
|
-
var thenable = {
|
|
1742
|
-
then: function(resolve, reject) {
|
|
1743
|
-
wasAwaited = true;
|
|
1744
|
-
thenableResult.then(function(returnValue2) {
|
|
1745
|
-
popActScope(prevActScopeDepth);
|
|
1746
|
-
if (actScopeDepth === 0) {
|
|
1747
|
-
recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
|
|
1748
|
-
} else {
|
|
1749
|
-
resolve(returnValue2);
|
|
1750
|
-
}
|
|
1751
|
-
}, function(error2) {
|
|
1752
|
-
popActScope(prevActScopeDepth);
|
|
1753
|
-
reject(error2);
|
|
1754
|
-
});
|
|
1755
|
-
}
|
|
1756
|
-
};
|
|
1757
|
-
{
|
|
1758
|
-
if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
|
|
1759
|
-
Promise.resolve().then(function() {
|
|
1760
|
-
}).then(function() {
|
|
1761
|
-
if (!wasAwaited) {
|
|
1762
|
-
didWarnNoAwaitAct = true;
|
|
1763
|
-
error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);");
|
|
1764
|
-
}
|
|
1765
|
-
});
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
return thenable;
|
|
1769
|
-
} else {
|
|
1770
|
-
var returnValue = result;
|
|
1771
|
-
popActScope(prevActScopeDepth);
|
|
1772
|
-
if (actScopeDepth === 0) {
|
|
1773
|
-
var _queue = ReactCurrentActQueue.current;
|
|
1774
|
-
if (_queue !== null) {
|
|
1775
|
-
flushActQueue(_queue);
|
|
1776
|
-
ReactCurrentActQueue.current = null;
|
|
1777
|
-
}
|
|
1778
|
-
var _thenable = {
|
|
1779
|
-
then: function(resolve, reject) {
|
|
1780
|
-
if (ReactCurrentActQueue.current === null) {
|
|
1781
|
-
ReactCurrentActQueue.current = [];
|
|
1782
|
-
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
1783
|
-
} else {
|
|
1784
|
-
resolve(returnValue);
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
};
|
|
1788
|
-
return _thenable;
|
|
1789
|
-
} else {
|
|
1790
|
-
var _thenable2 = {
|
|
1791
|
-
then: function(resolve, reject) {
|
|
1792
|
-
resolve(returnValue);
|
|
1793
|
-
}
|
|
1794
|
-
};
|
|
1795
|
-
return _thenable2;
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
function popActScope(prevActScopeDepth) {
|
|
1801
|
-
{
|
|
1802
|
-
if (prevActScopeDepth !== actScopeDepth - 1) {
|
|
1803
|
-
error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
|
|
1804
|
-
}
|
|
1805
|
-
actScopeDepth = prevActScopeDepth;
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
1809
|
-
{
|
|
1810
|
-
var queue = ReactCurrentActQueue.current;
|
|
1811
|
-
if (queue !== null) {
|
|
1812
|
-
try {
|
|
1813
|
-
flushActQueue(queue);
|
|
1814
|
-
enqueueTask(function() {
|
|
1815
|
-
if (queue.length === 0) {
|
|
1816
|
-
ReactCurrentActQueue.current = null;
|
|
1817
|
-
resolve(returnValue);
|
|
1818
|
-
} else {
|
|
1819
|
-
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
1820
|
-
}
|
|
1821
|
-
});
|
|
1822
|
-
} catch (error2) {
|
|
1823
|
-
reject(error2);
|
|
1824
|
-
}
|
|
1825
|
-
} else {
|
|
1826
|
-
resolve(returnValue);
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
var isFlushing = false;
|
|
1831
|
-
function flushActQueue(queue) {
|
|
1832
|
-
{
|
|
1833
|
-
if (!isFlushing) {
|
|
1834
|
-
isFlushing = true;
|
|
1835
|
-
var i = 0;
|
|
1836
|
-
try {
|
|
1837
|
-
for (; i < queue.length; i++) {
|
|
1838
|
-
var callback = queue[i];
|
|
1839
|
-
do {
|
|
1840
|
-
callback = callback(true);
|
|
1841
|
-
} while (callback !== null);
|
|
1842
|
-
}
|
|
1843
|
-
queue.length = 0;
|
|
1844
|
-
} catch (error2) {
|
|
1845
|
-
queue = queue.slice(i + 1);
|
|
1846
|
-
throw error2;
|
|
1847
|
-
} finally {
|
|
1848
|
-
isFlushing = false;
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
var createElement$1 = createElementWithValidation;
|
|
1854
|
-
var cloneElement$1 = cloneElementWithValidation;
|
|
1855
|
-
var createFactory = createFactoryWithValidation;
|
|
1856
|
-
var Children = {
|
|
1857
|
-
map: mapChildren,
|
|
1858
|
-
forEach: forEachChildren,
|
|
1859
|
-
count: countChildren,
|
|
1860
|
-
toArray,
|
|
1861
|
-
only: onlyChild
|
|
1862
|
-
};
|
|
1863
|
-
exports.Children = Children;
|
|
1864
|
-
exports.Component = Component;
|
|
1865
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1866
|
-
exports.Profiler = REACT_PROFILER_TYPE;
|
|
1867
|
-
exports.PureComponent = PureComponent;
|
|
1868
|
-
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1869
|
-
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
1870
|
-
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
|
1871
|
-
exports.act = act;
|
|
1872
|
-
exports.cloneElement = cloneElement$1;
|
|
1873
|
-
exports.createContext = createContext;
|
|
1874
|
-
exports.createElement = createElement$1;
|
|
1875
|
-
exports.createFactory = createFactory;
|
|
1876
|
-
exports.createRef = createRef;
|
|
1877
|
-
exports.forwardRef = forwardRef;
|
|
1878
|
-
exports.isValidElement = isValidElement;
|
|
1879
|
-
exports.lazy = lazy;
|
|
1880
|
-
exports.memo = memo;
|
|
1881
|
-
exports.startTransition = startTransition;
|
|
1882
|
-
exports.unstable_act = act;
|
|
1883
|
-
exports.useCallback = useCallback;
|
|
1884
|
-
exports.useContext = useContext;
|
|
1885
|
-
exports.useDebugValue = useDebugValue;
|
|
1886
|
-
exports.useDeferredValue = useDeferredValue;
|
|
1887
|
-
exports.useEffect = useEffect3;
|
|
1888
|
-
exports.useId = useId;
|
|
1889
|
-
exports.useImperativeHandle = useImperativeHandle;
|
|
1890
|
-
exports.useInsertionEffect = useInsertionEffect;
|
|
1891
|
-
exports.useLayoutEffect = useLayoutEffect;
|
|
1892
|
-
exports.useMemo = useMemo;
|
|
1893
|
-
exports.useReducer = useReducer;
|
|
1894
|
-
exports.useRef = useRef2;
|
|
1895
|
-
exports.useState = useState2;
|
|
1896
|
-
exports.useSyncExternalStore = useSyncExternalStore;
|
|
1897
|
-
exports.useTransition = useTransition;
|
|
1898
|
-
exports.version = ReactVersion;
|
|
1899
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
1900
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
1901
|
-
}
|
|
1902
|
-
})();
|
|
1903
|
-
}
|
|
1904
|
-
}
|
|
1905
|
-
});
|
|
1906
|
-
|
|
1907
|
-
// node_modules/react/index.js
|
|
1908
|
-
var require_react = __commonJS({
|
|
1909
|
-
"node_modules/react/index.js"(exports, module2) {
|
|
1910
|
-
"use strict";
|
|
1911
|
-
if (false) {
|
|
1912
|
-
module2.exports = null;
|
|
1913
|
-
} else {
|
|
1914
|
-
module2.exports = require_react_development();
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
});
|
|
1918
|
-
|
|
1919
|
-
// node_modules/react/cjs/react-jsx-runtime.development.js
|
|
1920
|
-
var require_react_jsx_runtime_development = __commonJS({
|
|
1921
|
-
"node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
|
1922
|
-
"use strict";
|
|
1923
|
-
if (true) {
|
|
1924
|
-
(function() {
|
|
1925
|
-
"use strict";
|
|
1926
|
-
var React6 = require_react();
|
|
1927
|
-
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
|
|
1928
|
-
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
1929
|
-
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
1930
|
-
var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
|
|
1931
|
-
var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
|
|
1932
|
-
var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
|
|
1933
|
-
var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
|
|
1934
|
-
var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
1935
|
-
var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
|
|
1936
|
-
var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
|
|
1937
|
-
var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
|
|
1938
|
-
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
1939
|
-
var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
|
|
1940
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
1941
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
1942
|
-
function getIteratorFn(maybeIterable) {
|
|
1943
|
-
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
|
1944
|
-
return null;
|
|
1945
|
-
}
|
|
1946
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
1947
|
-
if (typeof maybeIterator === "function") {
|
|
1948
|
-
return maybeIterator;
|
|
1949
|
-
}
|
|
1950
|
-
return null;
|
|
1951
|
-
}
|
|
1952
|
-
var ReactSharedInternals = React6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1953
|
-
function error(format) {
|
|
1954
|
-
{
|
|
1955
|
-
{
|
|
1956
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
1957
|
-
args[_key2 - 1] = arguments[_key2];
|
|
1958
|
-
}
|
|
1959
|
-
printWarning("error", format, args);
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
function printWarning(level, format, args) {
|
|
1964
|
-
{
|
|
1965
|
-
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1966
|
-
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
|
1967
|
-
if (stack !== "") {
|
|
1968
|
-
format += "%s";
|
|
1969
|
-
args = args.concat([stack]);
|
|
1970
|
-
}
|
|
1971
|
-
var argsWithFormat = args.map(function(item) {
|
|
1972
|
-
return String(item);
|
|
1973
|
-
});
|
|
1974
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
1975
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
var enableScopeAPI = false;
|
|
1979
|
-
var enableCacheElement = false;
|
|
1980
|
-
var enableTransitionTracing = false;
|
|
1981
|
-
var enableLegacyHidden = false;
|
|
1982
|
-
var enableDebugTracing = false;
|
|
1983
|
-
var REACT_MODULE_REFERENCE;
|
|
1984
|
-
{
|
|
1985
|
-
REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
1986
|
-
}
|
|
1987
|
-
function isValidElementType(type) {
|
|
1988
|
-
if (typeof type === "string" || typeof type === "function") {
|
|
1989
|
-
return true;
|
|
1990
|
-
}
|
|
1991
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
1992
|
-
return true;
|
|
1993
|
-
}
|
|
1994
|
-
if (typeof type === "object" && type !== null) {
|
|
1995
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
1996
|
-
// types supported by any Flight configuration anywhere since
|
|
1997
|
-
// we don't know which Flight build this will end up being used
|
|
1998
|
-
// with.
|
|
1999
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
2000
|
-
return true;
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
return false;
|
|
2004
|
-
}
|
|
2005
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
2006
|
-
var displayName = outerType.displayName;
|
|
2007
|
-
if (displayName) {
|
|
2008
|
-
return displayName;
|
|
2009
|
-
}
|
|
2010
|
-
var functionName = innerType.displayName || innerType.name || "";
|
|
2011
|
-
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
2012
|
-
}
|
|
2013
|
-
function getContextName(type) {
|
|
2014
|
-
return type.displayName || "Context";
|
|
2015
|
-
}
|
|
2016
|
-
function getComponentNameFromType(type) {
|
|
2017
|
-
if (type == null) {
|
|
2018
|
-
return null;
|
|
2019
|
-
}
|
|
2020
|
-
{
|
|
2021
|
-
if (typeof type.tag === "number") {
|
|
2022
|
-
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
if (typeof type === "function") {
|
|
2026
|
-
return type.displayName || type.name || null;
|
|
2027
|
-
}
|
|
2028
|
-
if (typeof type === "string") {
|
|
2029
|
-
return type;
|
|
2030
|
-
}
|
|
2031
|
-
switch (type) {
|
|
2032
|
-
case REACT_FRAGMENT_TYPE:
|
|
2033
|
-
return "Fragment";
|
|
2034
|
-
case REACT_PORTAL_TYPE:
|
|
2035
|
-
return "Portal";
|
|
2036
|
-
case REACT_PROFILER_TYPE:
|
|
2037
|
-
return "Profiler";
|
|
2038
|
-
case REACT_STRICT_MODE_TYPE:
|
|
2039
|
-
return "StrictMode";
|
|
2040
|
-
case REACT_SUSPENSE_TYPE:
|
|
2041
|
-
return "Suspense";
|
|
2042
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
2043
|
-
return "SuspenseList";
|
|
2044
|
-
}
|
|
2045
|
-
if (typeof type === "object") {
|
|
2046
|
-
switch (type.$$typeof) {
|
|
2047
|
-
case REACT_CONTEXT_TYPE:
|
|
2048
|
-
var context = type;
|
|
2049
|
-
return getContextName(context) + ".Consumer";
|
|
2050
|
-
case REACT_PROVIDER_TYPE:
|
|
2051
|
-
var provider = type;
|
|
2052
|
-
return getContextName(provider._context) + ".Provider";
|
|
2053
|
-
case REACT_FORWARD_REF_TYPE:
|
|
2054
|
-
return getWrappedName(type, type.render, "ForwardRef");
|
|
2055
|
-
case REACT_MEMO_TYPE:
|
|
2056
|
-
var outerName = type.displayName || null;
|
|
2057
|
-
if (outerName !== null) {
|
|
2058
|
-
return outerName;
|
|
2059
|
-
}
|
|
2060
|
-
return getComponentNameFromType(type.type) || "Memo";
|
|
2061
|
-
case REACT_LAZY_TYPE: {
|
|
2062
|
-
var lazyComponent = type;
|
|
2063
|
-
var payload = lazyComponent._payload;
|
|
2064
|
-
var init = lazyComponent._init;
|
|
2065
|
-
try {
|
|
2066
|
-
return getComponentNameFromType(init(payload));
|
|
2067
|
-
} catch (x) {
|
|
2068
|
-
return null;
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
return null;
|
|
2074
|
-
}
|
|
2075
|
-
var assign = Object.assign;
|
|
2076
|
-
var disabledDepth = 0;
|
|
2077
|
-
var prevLog;
|
|
2078
|
-
var prevInfo;
|
|
2079
|
-
var prevWarn;
|
|
2080
|
-
var prevError;
|
|
2081
|
-
var prevGroup;
|
|
2082
|
-
var prevGroupCollapsed;
|
|
2083
|
-
var prevGroupEnd;
|
|
2084
|
-
function disabledLog() {
|
|
2085
|
-
}
|
|
2086
|
-
disabledLog.__reactDisabledLog = true;
|
|
2087
|
-
function disableLogs() {
|
|
2088
|
-
{
|
|
2089
|
-
if (disabledDepth === 0) {
|
|
2090
|
-
prevLog = console.log;
|
|
2091
|
-
prevInfo = console.info;
|
|
2092
|
-
prevWarn = console.warn;
|
|
2093
|
-
prevError = console.error;
|
|
2094
|
-
prevGroup = console.group;
|
|
2095
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
2096
|
-
prevGroupEnd = console.groupEnd;
|
|
2097
|
-
var props = {
|
|
2098
|
-
configurable: true,
|
|
2099
|
-
enumerable: true,
|
|
2100
|
-
value: disabledLog,
|
|
2101
|
-
writable: true
|
|
2102
|
-
};
|
|
2103
|
-
Object.defineProperties(console, {
|
|
2104
|
-
info: props,
|
|
2105
|
-
log: props,
|
|
2106
|
-
warn: props,
|
|
2107
|
-
error: props,
|
|
2108
|
-
group: props,
|
|
2109
|
-
groupCollapsed: props,
|
|
2110
|
-
groupEnd: props
|
|
2111
|
-
});
|
|
2112
|
-
}
|
|
2113
|
-
disabledDepth++;
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
function reenableLogs() {
|
|
2117
|
-
{
|
|
2118
|
-
disabledDepth--;
|
|
2119
|
-
if (disabledDepth === 0) {
|
|
2120
|
-
var props = {
|
|
2121
|
-
configurable: true,
|
|
2122
|
-
enumerable: true,
|
|
2123
|
-
writable: true
|
|
2124
|
-
};
|
|
2125
|
-
Object.defineProperties(console, {
|
|
2126
|
-
log: assign({}, props, {
|
|
2127
|
-
value: prevLog
|
|
2128
|
-
}),
|
|
2129
|
-
info: assign({}, props, {
|
|
2130
|
-
value: prevInfo
|
|
2131
|
-
}),
|
|
2132
|
-
warn: assign({}, props, {
|
|
2133
|
-
value: prevWarn
|
|
2134
|
-
}),
|
|
2135
|
-
error: assign({}, props, {
|
|
2136
|
-
value: prevError
|
|
2137
|
-
}),
|
|
2138
|
-
group: assign({}, props, {
|
|
2139
|
-
value: prevGroup
|
|
2140
|
-
}),
|
|
2141
|
-
groupCollapsed: assign({}, props, {
|
|
2142
|
-
value: prevGroupCollapsed
|
|
2143
|
-
}),
|
|
2144
|
-
groupEnd: assign({}, props, {
|
|
2145
|
-
value: prevGroupEnd
|
|
2146
|
-
})
|
|
2147
|
-
});
|
|
2148
|
-
}
|
|
2149
|
-
if (disabledDepth < 0) {
|
|
2150
|
-
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
2155
|
-
var prefix;
|
|
2156
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
2157
|
-
{
|
|
2158
|
-
if (prefix === void 0) {
|
|
2159
|
-
try {
|
|
2160
|
-
throw Error();
|
|
2161
|
-
} catch (x) {
|
|
2162
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
2163
|
-
prefix = match && match[1] || "";
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
return "\n" + prefix + name;
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
var reentry = false;
|
|
2170
|
-
var componentFrameCache;
|
|
2171
|
-
{
|
|
2172
|
-
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
|
2173
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
2174
|
-
}
|
|
2175
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
2176
|
-
if (!fn || reentry) {
|
|
2177
|
-
return "";
|
|
2178
|
-
}
|
|
2179
|
-
{
|
|
2180
|
-
var frame = componentFrameCache.get(fn);
|
|
2181
|
-
if (frame !== void 0) {
|
|
2182
|
-
return frame;
|
|
2183
|
-
}
|
|
2184
|
-
}
|
|
2185
|
-
var control;
|
|
2186
|
-
reentry = true;
|
|
2187
|
-
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
2188
|
-
Error.prepareStackTrace = void 0;
|
|
2189
|
-
var previousDispatcher;
|
|
2190
|
-
{
|
|
2191
|
-
previousDispatcher = ReactCurrentDispatcher.current;
|
|
2192
|
-
ReactCurrentDispatcher.current = null;
|
|
2193
|
-
disableLogs();
|
|
2194
|
-
}
|
|
2195
|
-
try {
|
|
2196
|
-
if (construct) {
|
|
2197
|
-
var Fake = function() {
|
|
2198
|
-
throw Error();
|
|
2199
|
-
};
|
|
2200
|
-
Object.defineProperty(Fake.prototype, "props", {
|
|
2201
|
-
set: function() {
|
|
2202
|
-
throw Error();
|
|
2203
|
-
}
|
|
2204
|
-
});
|
|
2205
|
-
if (typeof Reflect === "object" && Reflect.construct) {
|
|
2206
|
-
try {
|
|
2207
|
-
Reflect.construct(Fake, []);
|
|
2208
|
-
} catch (x) {
|
|
2209
|
-
control = x;
|
|
2210
|
-
}
|
|
2211
|
-
Reflect.construct(fn, [], Fake);
|
|
2212
|
-
} else {
|
|
2213
|
-
try {
|
|
2214
|
-
Fake.call();
|
|
2215
|
-
} catch (x) {
|
|
2216
|
-
control = x;
|
|
2217
|
-
}
|
|
2218
|
-
fn.call(Fake.prototype);
|
|
2219
|
-
}
|
|
2220
|
-
} else {
|
|
2221
|
-
try {
|
|
2222
|
-
throw Error();
|
|
2223
|
-
} catch (x) {
|
|
2224
|
-
control = x;
|
|
2225
|
-
}
|
|
2226
|
-
fn();
|
|
2227
|
-
}
|
|
2228
|
-
} catch (sample) {
|
|
2229
|
-
if (sample && control && typeof sample.stack === "string") {
|
|
2230
|
-
var sampleLines = sample.stack.split("\n");
|
|
2231
|
-
var controlLines = control.stack.split("\n");
|
|
2232
|
-
var s = sampleLines.length - 1;
|
|
2233
|
-
var c = controlLines.length - 1;
|
|
2234
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
2235
|
-
c--;
|
|
2236
|
-
}
|
|
2237
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
2238
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
2239
|
-
if (s !== 1 || c !== 1) {
|
|
2240
|
-
do {
|
|
2241
|
-
s--;
|
|
2242
|
-
c--;
|
|
2243
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
2244
|
-
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
|
2245
|
-
if (fn.displayName && _frame.includes("<anonymous>")) {
|
|
2246
|
-
_frame = _frame.replace("<anonymous>", fn.displayName);
|
|
2247
|
-
}
|
|
2248
|
-
{
|
|
2249
|
-
if (typeof fn === "function") {
|
|
2250
|
-
componentFrameCache.set(fn, _frame);
|
|
2251
|
-
}
|
|
2252
|
-
}
|
|
2253
|
-
return _frame;
|
|
2254
|
-
}
|
|
2255
|
-
} while (s >= 1 && c >= 0);
|
|
2256
|
-
}
|
|
2257
|
-
break;
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
}
|
|
2261
|
-
} finally {
|
|
2262
|
-
reentry = false;
|
|
2263
|
-
{
|
|
2264
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
2265
|
-
reenableLogs();
|
|
2266
|
-
}
|
|
2267
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
2268
|
-
}
|
|
2269
|
-
var name = fn ? fn.displayName || fn.name : "";
|
|
2270
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
|
2271
|
-
{
|
|
2272
|
-
if (typeof fn === "function") {
|
|
2273
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
return syntheticFrame;
|
|
2277
|
-
}
|
|
2278
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
2279
|
-
{
|
|
2280
|
-
return describeNativeComponentFrame(fn, false);
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
function shouldConstruct(Component) {
|
|
2284
|
-
var prototype = Component.prototype;
|
|
2285
|
-
return !!(prototype && prototype.isReactComponent);
|
|
2286
|
-
}
|
|
2287
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
2288
|
-
if (type == null) {
|
|
2289
|
-
return "";
|
|
2290
|
-
}
|
|
2291
|
-
if (typeof type === "function") {
|
|
2292
|
-
{
|
|
2293
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
if (typeof type === "string") {
|
|
2297
|
-
return describeBuiltInComponentFrame(type);
|
|
2298
|
-
}
|
|
2299
|
-
switch (type) {
|
|
2300
|
-
case REACT_SUSPENSE_TYPE:
|
|
2301
|
-
return describeBuiltInComponentFrame("Suspense");
|
|
2302
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
2303
|
-
return describeBuiltInComponentFrame("SuspenseList");
|
|
2304
|
-
}
|
|
2305
|
-
if (typeof type === "object") {
|
|
2306
|
-
switch (type.$$typeof) {
|
|
2307
|
-
case REACT_FORWARD_REF_TYPE:
|
|
2308
|
-
return describeFunctionComponentFrame(type.render);
|
|
2309
|
-
case REACT_MEMO_TYPE:
|
|
2310
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
2311
|
-
case REACT_LAZY_TYPE: {
|
|
2312
|
-
var lazyComponent = type;
|
|
2313
|
-
var payload = lazyComponent._payload;
|
|
2314
|
-
var init = lazyComponent._init;
|
|
2315
|
-
try {
|
|
2316
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
2317
|
-
} catch (x) {
|
|
2318
|
-
}
|
|
2319
|
-
}
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2322
|
-
return "";
|
|
2323
|
-
}
|
|
2324
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2325
|
-
var loggedTypeFailures = {};
|
|
2326
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2327
|
-
function setCurrentlyValidatingElement(element) {
|
|
2328
|
-
{
|
|
2329
|
-
if (element) {
|
|
2330
|
-
var owner = element._owner;
|
|
2331
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2332
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
2333
|
-
} else {
|
|
2334
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
2335
|
-
}
|
|
2336
|
-
}
|
|
2337
|
-
}
|
|
2338
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
2339
|
-
{
|
|
2340
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
2341
|
-
for (var typeSpecName in typeSpecs) {
|
|
2342
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
2343
|
-
var error$1 = void 0;
|
|
2344
|
-
try {
|
|
2345
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
2346
|
-
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
2347
|
-
err.name = "Invariant Violation";
|
|
2348
|
-
throw err;
|
|
2349
|
-
}
|
|
2350
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
2351
|
-
} catch (ex) {
|
|
2352
|
-
error$1 = ex;
|
|
2353
|
-
}
|
|
2354
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
2355
|
-
setCurrentlyValidatingElement(element);
|
|
2356
|
-
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
|
2357
|
-
setCurrentlyValidatingElement(null);
|
|
2358
|
-
}
|
|
2359
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
2360
|
-
loggedTypeFailures[error$1.message] = true;
|
|
2361
|
-
setCurrentlyValidatingElement(element);
|
|
2362
|
-
error("Failed %s type: %s", location, error$1.message);
|
|
2363
|
-
setCurrentlyValidatingElement(null);
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
}
|
|
2369
|
-
var isArrayImpl = Array.isArray;
|
|
2370
|
-
function isArray(a) {
|
|
2371
|
-
return isArrayImpl(a);
|
|
2372
|
-
}
|
|
2373
|
-
function typeName(value) {
|
|
2374
|
-
{
|
|
2375
|
-
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
|
2376
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
2377
|
-
return type;
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
function willCoercionThrow(value) {
|
|
2381
|
-
{
|
|
2382
|
-
try {
|
|
2383
|
-
testStringCoercion(value);
|
|
2384
|
-
return false;
|
|
2385
|
-
} catch (e) {
|
|
2386
|
-
return true;
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
function testStringCoercion(value) {
|
|
2391
|
-
return "" + value;
|
|
2392
|
-
}
|
|
2393
|
-
function checkKeyStringCoercion(value) {
|
|
2394
|
-
{
|
|
2395
|
-
if (willCoercionThrow(value)) {
|
|
2396
|
-
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
2397
|
-
return testStringCoercion(value);
|
|
2398
|
-
}
|
|
2399
|
-
}
|
|
2400
|
-
}
|
|
2401
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
2402
|
-
var RESERVED_PROPS = {
|
|
2403
|
-
key: true,
|
|
2404
|
-
ref: true,
|
|
2405
|
-
__self: true,
|
|
2406
|
-
__source: true
|
|
2407
|
-
};
|
|
2408
|
-
var specialPropKeyWarningShown;
|
|
2409
|
-
var specialPropRefWarningShown;
|
|
2410
|
-
var didWarnAboutStringRefs;
|
|
2411
|
-
{
|
|
2412
|
-
didWarnAboutStringRefs = {};
|
|
2413
|
-
}
|
|
2414
|
-
function hasValidRef(config) {
|
|
2415
|
-
{
|
|
2416
|
-
if (hasOwnProperty.call(config, "ref")) {
|
|
2417
|
-
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
2418
|
-
if (getter && getter.isReactWarning) {
|
|
2419
|
-
return false;
|
|
2420
|
-
}
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
return config.ref !== void 0;
|
|
2424
|
-
}
|
|
2425
|
-
function hasValidKey(config) {
|
|
2426
|
-
{
|
|
2427
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
2428
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
2429
|
-
if (getter && getter.isReactWarning) {
|
|
2430
|
-
return false;
|
|
2431
|
-
}
|
|
2432
|
-
}
|
|
2433
|
-
}
|
|
2434
|
-
return config.key !== void 0;
|
|
2435
|
-
}
|
|
2436
|
-
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
2437
|
-
{
|
|
2438
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
|
2439
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
2440
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
2441
|
-
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
|
2442
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
2443
|
-
}
|
|
2444
|
-
}
|
|
2445
|
-
}
|
|
2446
|
-
}
|
|
2447
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
2448
|
-
{
|
|
2449
|
-
var warnAboutAccessingKey = function() {
|
|
2450
|
-
if (!specialPropKeyWarningShown) {
|
|
2451
|
-
specialPropKeyWarningShown = true;
|
|
2452
|
-
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
2453
|
-
}
|
|
2454
|
-
};
|
|
2455
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
2456
|
-
Object.defineProperty(props, "key", {
|
|
2457
|
-
get: warnAboutAccessingKey,
|
|
2458
|
-
configurable: true
|
|
2459
|
-
});
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
2463
|
-
{
|
|
2464
|
-
var warnAboutAccessingRef = function() {
|
|
2465
|
-
if (!specialPropRefWarningShown) {
|
|
2466
|
-
specialPropRefWarningShown = true;
|
|
2467
|
-
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
2468
|
-
}
|
|
2469
|
-
};
|
|
2470
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
2471
|
-
Object.defineProperty(props, "ref", {
|
|
2472
|
-
get: warnAboutAccessingRef,
|
|
2473
|
-
configurable: true
|
|
2474
|
-
});
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
2478
|
-
var element = {
|
|
2479
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
2480
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
2481
|
-
// Built-in properties that belong on the element
|
|
2482
|
-
type,
|
|
2483
|
-
key,
|
|
2484
|
-
ref,
|
|
2485
|
-
props,
|
|
2486
|
-
// Record the component responsible for creating this element.
|
|
2487
|
-
_owner: owner
|
|
2488
|
-
};
|
|
2489
|
-
{
|
|
2490
|
-
element._store = {};
|
|
2491
|
-
Object.defineProperty(element._store, "validated", {
|
|
2492
|
-
configurable: false,
|
|
2493
|
-
enumerable: false,
|
|
2494
|
-
writable: true,
|
|
2495
|
-
value: false
|
|
2496
|
-
});
|
|
2497
|
-
Object.defineProperty(element, "_self", {
|
|
2498
|
-
configurable: false,
|
|
2499
|
-
enumerable: false,
|
|
2500
|
-
writable: false,
|
|
2501
|
-
value: self
|
|
2502
|
-
});
|
|
2503
|
-
Object.defineProperty(element, "_source", {
|
|
2504
|
-
configurable: false,
|
|
2505
|
-
enumerable: false,
|
|
2506
|
-
writable: false,
|
|
2507
|
-
value: source
|
|
2508
|
-
});
|
|
2509
|
-
if (Object.freeze) {
|
|
2510
|
-
Object.freeze(element.props);
|
|
2511
|
-
Object.freeze(element);
|
|
2512
|
-
}
|
|
2513
|
-
}
|
|
2514
|
-
return element;
|
|
2515
|
-
};
|
|
2516
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
2517
|
-
{
|
|
2518
|
-
var propName;
|
|
2519
|
-
var props = {};
|
|
2520
|
-
var key = null;
|
|
2521
|
-
var ref = null;
|
|
2522
|
-
if (maybeKey !== void 0) {
|
|
2523
|
-
{
|
|
2524
|
-
checkKeyStringCoercion(maybeKey);
|
|
2525
|
-
}
|
|
2526
|
-
key = "" + maybeKey;
|
|
2527
|
-
}
|
|
2528
|
-
if (hasValidKey(config)) {
|
|
2529
|
-
{
|
|
2530
|
-
checkKeyStringCoercion(config.key);
|
|
2531
|
-
}
|
|
2532
|
-
key = "" + config.key;
|
|
2533
|
-
}
|
|
2534
|
-
if (hasValidRef(config)) {
|
|
2535
|
-
ref = config.ref;
|
|
2536
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
2537
|
-
}
|
|
2538
|
-
for (propName in config) {
|
|
2539
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
2540
|
-
props[propName] = config[propName];
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
if (type && type.defaultProps) {
|
|
2544
|
-
var defaultProps = type.defaultProps;
|
|
2545
|
-
for (propName in defaultProps) {
|
|
2546
|
-
if (props[propName] === void 0) {
|
|
2547
|
-
props[propName] = defaultProps[propName];
|
|
2548
|
-
}
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
if (key || ref) {
|
|
2552
|
-
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
|
2553
|
-
if (key) {
|
|
2554
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
2555
|
-
}
|
|
2556
|
-
if (ref) {
|
|
2557
|
-
defineRefPropWarningGetter(props, displayName);
|
|
2558
|
-
}
|
|
2559
|
-
}
|
|
2560
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
2564
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2565
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
2566
|
-
{
|
|
2567
|
-
if (element) {
|
|
2568
|
-
var owner = element._owner;
|
|
2569
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2570
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
2571
|
-
} else {
|
|
2572
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
2573
|
-
}
|
|
2574
|
-
}
|
|
2575
|
-
}
|
|
2576
|
-
var propTypesMisspellWarningShown;
|
|
2577
|
-
{
|
|
2578
|
-
propTypesMisspellWarningShown = false;
|
|
2579
|
-
}
|
|
2580
|
-
function isValidElement(object) {
|
|
2581
|
-
{
|
|
2582
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
2583
|
-
}
|
|
2584
|
-
}
|
|
2585
|
-
function getDeclarationErrorAddendum() {
|
|
2586
|
-
{
|
|
2587
|
-
if (ReactCurrentOwner$1.current) {
|
|
2588
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
2589
|
-
if (name) {
|
|
2590
|
-
return "\n\nCheck the render method of `" + name + "`.";
|
|
2591
|
-
}
|
|
2592
|
-
}
|
|
2593
|
-
return "";
|
|
2594
|
-
}
|
|
2595
|
-
}
|
|
2596
|
-
function getSourceInfoErrorAddendum(source) {
|
|
2597
|
-
{
|
|
2598
|
-
if (source !== void 0) {
|
|
2599
|
-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
|
2600
|
-
var lineNumber = source.lineNumber;
|
|
2601
|
-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
|
2602
|
-
}
|
|
2603
|
-
return "";
|
|
2604
|
-
}
|
|
2605
|
-
}
|
|
2606
|
-
var ownerHasKeyUseWarning = {};
|
|
2607
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
2608
|
-
{
|
|
2609
|
-
var info = getDeclarationErrorAddendum();
|
|
2610
|
-
if (!info) {
|
|
2611
|
-
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
|
2612
|
-
if (parentName) {
|
|
2613
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
return info;
|
|
2617
|
-
}
|
|
2618
|
-
}
|
|
2619
|
-
function validateExplicitKey(element, parentType) {
|
|
2620
|
-
{
|
|
2621
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
2622
|
-
return;
|
|
2623
|
-
}
|
|
2624
|
-
element._store.validated = true;
|
|
2625
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
2626
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
2627
|
-
return;
|
|
2628
|
-
}
|
|
2629
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
|
2630
|
-
var childOwner = "";
|
|
2631
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
2632
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
2633
|
-
}
|
|
2634
|
-
setCurrentlyValidatingElement$1(element);
|
|
2635
|
-
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
2636
|
-
setCurrentlyValidatingElement$1(null);
|
|
2637
|
-
}
|
|
2638
|
-
}
|
|
2639
|
-
function validateChildKeys(node, parentType) {
|
|
2640
|
-
{
|
|
2641
|
-
if (typeof node !== "object") {
|
|
2642
|
-
return;
|
|
2643
|
-
}
|
|
2644
|
-
if (isArray(node)) {
|
|
2645
|
-
for (var i = 0; i < node.length; i++) {
|
|
2646
|
-
var child = node[i];
|
|
2647
|
-
if (isValidElement(child)) {
|
|
2648
|
-
validateExplicitKey(child, parentType);
|
|
2649
|
-
}
|
|
2650
|
-
}
|
|
2651
|
-
} else if (isValidElement(node)) {
|
|
2652
|
-
if (node._store) {
|
|
2653
|
-
node._store.validated = true;
|
|
2654
|
-
}
|
|
2655
|
-
} else if (node) {
|
|
2656
|
-
var iteratorFn = getIteratorFn(node);
|
|
2657
|
-
if (typeof iteratorFn === "function") {
|
|
2658
|
-
if (iteratorFn !== node.entries) {
|
|
2659
|
-
var iterator = iteratorFn.call(node);
|
|
2660
|
-
var step;
|
|
2661
|
-
while (!(step = iterator.next()).done) {
|
|
2662
|
-
if (isValidElement(step.value)) {
|
|
2663
|
-
validateExplicitKey(step.value, parentType);
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
}
|
|
2667
|
-
}
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
}
|
|
2671
|
-
function validatePropTypes(element) {
|
|
2672
|
-
{
|
|
2673
|
-
var type = element.type;
|
|
2674
|
-
if (type === null || type === void 0 || typeof type === "string") {
|
|
2675
|
-
return;
|
|
2676
|
-
}
|
|
2677
|
-
var propTypes;
|
|
2678
|
-
if (typeof type === "function") {
|
|
2679
|
-
propTypes = type.propTypes;
|
|
2680
|
-
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
2681
|
-
// Inner props are checked in the reconciler.
|
|
2682
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
2683
|
-
propTypes = type.propTypes;
|
|
2684
|
-
} else {
|
|
2685
|
-
return;
|
|
2686
|
-
}
|
|
2687
|
-
if (propTypes) {
|
|
2688
|
-
var name = getComponentNameFromType(type);
|
|
2689
|
-
checkPropTypes(propTypes, element.props, "prop", name, element);
|
|
2690
|
-
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
2691
|
-
propTypesMisspellWarningShown = true;
|
|
2692
|
-
var _name = getComponentNameFromType(type);
|
|
2693
|
-
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
2694
|
-
}
|
|
2695
|
-
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
|
2696
|
-
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
2697
|
-
}
|
|
2698
|
-
}
|
|
2699
|
-
}
|
|
2700
|
-
function validateFragmentProps(fragment) {
|
|
2701
|
-
{
|
|
2702
|
-
var keys = Object.keys(fragment.props);
|
|
2703
|
-
for (var i = 0; i < keys.length; i++) {
|
|
2704
|
-
var key = keys[i];
|
|
2705
|
-
if (key !== "children" && key !== "key") {
|
|
2706
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
2707
|
-
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
2708
|
-
setCurrentlyValidatingElement$1(null);
|
|
2709
|
-
break;
|
|
2710
|
-
}
|
|
2711
|
-
}
|
|
2712
|
-
if (fragment.ref !== null) {
|
|
2713
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
2714
|
-
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
2715
|
-
setCurrentlyValidatingElement$1(null);
|
|
2716
|
-
}
|
|
2717
|
-
}
|
|
2718
|
-
}
|
|
2719
|
-
var didWarnAboutKeySpread = {};
|
|
2720
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
2721
|
-
{
|
|
2722
|
-
var validType = isValidElementType(type);
|
|
2723
|
-
if (!validType) {
|
|
2724
|
-
var info = "";
|
|
2725
|
-
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
|
2726
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
2727
|
-
}
|
|
2728
|
-
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
2729
|
-
if (sourceInfo) {
|
|
2730
|
-
info += sourceInfo;
|
|
2731
|
-
} else {
|
|
2732
|
-
info += getDeclarationErrorAddendum();
|
|
2733
|
-
}
|
|
2734
|
-
var typeString;
|
|
2735
|
-
if (type === null) {
|
|
2736
|
-
typeString = "null";
|
|
2737
|
-
} else if (isArray(type)) {
|
|
2738
|
-
typeString = "array";
|
|
2739
|
-
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
2740
|
-
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
|
2741
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
2742
|
-
} else {
|
|
2743
|
-
typeString = typeof type;
|
|
2744
|
-
}
|
|
2745
|
-
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
2746
|
-
}
|
|
2747
|
-
var element = jsxDEV(type, props, key, source, self);
|
|
2748
|
-
if (element == null) {
|
|
2749
|
-
return element;
|
|
2750
|
-
}
|
|
2751
|
-
if (validType) {
|
|
2752
|
-
var children = props.children;
|
|
2753
|
-
if (children !== void 0) {
|
|
2754
|
-
if (isStaticChildren) {
|
|
2755
|
-
if (isArray(children)) {
|
|
2756
|
-
for (var i = 0; i < children.length; i++) {
|
|
2757
|
-
validateChildKeys(children[i], type);
|
|
2758
|
-
}
|
|
2759
|
-
if (Object.freeze) {
|
|
2760
|
-
Object.freeze(children);
|
|
2761
|
-
}
|
|
2762
|
-
} else {
|
|
2763
|
-
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
2764
|
-
}
|
|
2765
|
-
} else {
|
|
2766
|
-
validateChildKeys(children, type);
|
|
2767
|
-
}
|
|
2768
|
-
}
|
|
2769
|
-
}
|
|
2770
|
-
{
|
|
2771
|
-
if (hasOwnProperty.call(props, "key")) {
|
|
2772
|
-
var componentName = getComponentNameFromType(type);
|
|
2773
|
-
var keys = Object.keys(props).filter(function(k) {
|
|
2774
|
-
return k !== "key";
|
|
2775
|
-
});
|
|
2776
|
-
var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
2777
|
-
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
2778
|
-
var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
|
|
2779
|
-
error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
|
2780
|
-
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
2781
|
-
}
|
|
2782
|
-
}
|
|
2783
|
-
}
|
|
2784
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
2785
|
-
validateFragmentProps(element);
|
|
2786
|
-
} else {
|
|
2787
|
-
validatePropTypes(element);
|
|
2788
|
-
}
|
|
2789
|
-
return element;
|
|
2790
|
-
}
|
|
2791
|
-
}
|
|
2792
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
2793
|
-
{
|
|
2794
|
-
return jsxWithValidation(type, props, key, true);
|
|
2795
|
-
}
|
|
2796
|
-
}
|
|
2797
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
2798
|
-
{
|
|
2799
|
-
return jsxWithValidation(type, props, key, false);
|
|
2800
|
-
}
|
|
2801
|
-
}
|
|
2802
|
-
var jsx11 = jsxWithValidationDynamic;
|
|
2803
|
-
var jsxs10 = jsxWithValidationStatic;
|
|
2804
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
2805
|
-
exports.jsx = jsx11;
|
|
2806
|
-
exports.jsxs = jsxs10;
|
|
2807
|
-
})();
|
|
2808
|
-
}
|
|
2809
|
-
}
|
|
2810
|
-
});
|
|
2811
|
-
|
|
2812
|
-
// node_modules/react/jsx-runtime.js
|
|
2813
|
-
var require_jsx_runtime = __commonJS({
|
|
2814
|
-
"node_modules/react/jsx-runtime.js"(exports, module2) {
|
|
2815
|
-
"use strict";
|
|
2816
|
-
if (false) {
|
|
2817
|
-
module2.exports = null;
|
|
2818
|
-
} else {
|
|
2819
|
-
module2.exports = require_react_jsx_runtime_development();
|
|
2820
|
-
}
|
|
2821
|
-
}
|
|
2822
|
-
});
|
|
2823
|
-
|
|
2824
|
-
// src/components/SiteChatComponent/index.ts
|
|
2825
|
-
var SiteChatComponent_exports = {};
|
|
2826
|
-
__export(SiteChatComponent_exports, {
|
|
2827
|
-
SiteChatComponent: () => SiteChatComponent
|
|
2828
|
-
});
|
|
2829
|
-
module.exports = __toCommonJS(SiteChatComponent_exports);
|
|
2830
|
-
|
|
2831
|
-
// src/components/SiteChatComponent/SiteChatComponent.tsx
|
|
2832
|
-
var import_react7 = __toESM(require_react());
|
|
2833
|
-
|
|
2834
|
-
// src/components/SiteChatComponent/useSiteChatComponent.ts
|
|
2835
|
-
function useSiteChatComponent() {
|
|
2836
|
-
return {};
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2839
|
-
// src/components/SiteChatComponent/Header/Header.tsx
|
|
2840
|
-
var import_react = __toESM(require_react());
|
|
2841
|
-
var import_design_system = require("@wix/design-system");
|
|
2842
|
-
var import_jsx_runtime = __toESM(require_jsx_runtime());
|
|
2843
|
-
var Header = import_react.default.forwardRef(
|
|
2844
|
-
({
|
|
2845
|
-
className,
|
|
2846
|
-
children,
|
|
2847
|
-
title,
|
|
2848
|
-
subtitle,
|
|
2849
|
-
image,
|
|
2850
|
-
onClose,
|
|
2851
|
-
...rest
|
|
2852
|
-
}, ref) => {
|
|
2853
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, className: ["site-chat-header", className].filter(Boolean).join(" "), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design_system.Box, { className: "site-chat-component-header-container", verticalAlign: "middle", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design_system.Box, { width: "100%", direction: "horizontal", align: "center", gap: "10px", children: [
|
|
2854
|
-
image && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design_system.Box, { className: "site-chat-component-header-image", width: "60px", height: "50px", borderRadius: "999px", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { style: { borderRadius: "999px" }, width: "100%", height: "100%", src: "https://www.techsmith.com/wp-content/uploads/2023/08/What-are-High-Resolution-Images.png", alt: "Business Logo" }) }),
|
|
2855
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design_system.Box, { direction: "vertical", className: "site-chat-component-header-text-section", children: [
|
|
2856
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design_system.Box, { className: "site-chat-component-header-top-section", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design_system.Box, { className: "site-chat-component-header-top", verticalAlign: "middle", WebkitJustifyContent: "space-between", width: "100%", children: [
|
|
2857
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "site-chat-component-header-title", children: title }),
|
|
2858
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2859
|
-
"button",
|
|
2860
|
-
{
|
|
2861
|
-
onClick: onClose,
|
|
2862
|
-
"aria-label": "Close",
|
|
2863
|
-
className: "site-chat-component-header-close-button",
|
|
2864
|
-
children: "\u2715"
|
|
2865
|
-
}
|
|
2866
|
-
)
|
|
2867
|
-
] }) }),
|
|
2868
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design_system.Box, { className: "site-chat-component-header-bottom-section", children: subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "site-chat-component-header-subtitle", children: subtitle }) })
|
|
2869
|
-
] })
|
|
2870
|
-
] }) }) });
|
|
2871
|
-
}
|
|
2872
|
-
);
|
|
2873
|
-
Header.displayName = "SiteChatComponent.Header";
|
|
2874
|
-
|
|
2875
|
-
// src/components/SiteChatComponent/MessageContainer/MessageContainer.tsx
|
|
2876
|
-
var import_react3 = __toESM(require_react());
|
|
2877
|
-
var import_design_system4 = require("@wix/design-system");
|
|
2878
|
-
|
|
2879
|
-
// src/components/SiteChatComponent/MessageContainer/messages/messages-wrapper.tsx
|
|
2880
|
-
var import_react2 = __toESM(require_react());
|
|
2881
|
-
var import_design_system3 = require("@wix/design-system");
|
|
2882
|
-
|
|
2883
|
-
// src/components/SiteChatComponent/MessageContainer/messages/attachment.tsx
|
|
2884
|
-
var import_design_system2 = require("@wix/design-system");
|
|
2885
|
-
var import_wix_ui_icons_common = require("@wix/wix-ui-icons-common");
|
|
2886
|
-
var import_on_stage = require("@wix/wix-ui-icons-common/on-stage");
|
|
2887
|
-
var import_jsx_runtime2 = __toESM(require_jsx_runtime());
|
|
2888
|
-
var Attachment = ({ item }) => {
|
|
2889
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_design_system2.Box, { direction: "horizontal", maxWidth: "100%", boxSizing: "border-box", className: "site-chat-component-message-container-in-chat-file-item-wrapper-box", children: item && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "site-chat-component-message-container-in-chat-file-item-container", children: [
|
|
2890
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_wix_ui_icons_common.Page, { className: "site-chat-component-message-container-in-chat-file-icon", width: "20px", height: "20px" }),
|
|
2891
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "site-chat-component-message-container-in-chat-file-names-container", children: [
|
|
2892
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "site-chat-component-message-container-in-chat-file-name", children: item.name }),
|
|
2893
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "site-chat-component-message-container-in-chat-file-sub-name", children: "Attachment" })
|
|
2894
|
-
] }),
|
|
2895
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_design_system2.TextButton, { size: "tiny", onClick: () => window.open(item.url, "_blank"), suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_on_stage.ArrowTopRight, { size: "tiny" }), children: "Open" })
|
|
2896
|
-
] }, item.id) });
|
|
2897
|
-
};
|
|
2898
|
-
var attachment_default = Attachment;
|
|
2899
|
-
|
|
2900
|
-
// src/components/SiteChatComponent/MessageContainer/messages/messages-wrapper.tsx
|
|
2901
|
-
var import_jsx_runtime3 = __toESM(require_jsx_runtime());
|
|
2902
|
-
var AGENT_MESSAGE_GAP = "10px";
|
|
2903
|
-
var AGENT_MESSAGE_WIDTH = "75%";
|
|
2904
|
-
var AGENT_MESSAGE_INNER_GAP = "4px";
|
|
2905
|
-
var ONE_MINUTE_MS = 6e4;
|
|
2906
|
-
var ONE_DAY_MS = 864e5;
|
|
2907
|
-
var DAYS_IN_WEEK = 7;
|
|
2908
|
-
var formatTimestamp = (timestamp) => {
|
|
2909
|
-
if (!timestamp) return "";
|
|
2910
|
-
const date = new Date(timestamp);
|
|
2911
|
-
const now = /* @__PURE__ */ new Date();
|
|
2912
|
-
if (now.getTime() - date.getTime() < ONE_MINUTE_MS) return "Just now";
|
|
2913
|
-
const time = date.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
|
|
2914
|
-
const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
2915
|
-
const startOfDay = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
2916
|
-
const diffDays = Math.floor((startOfToday.getTime() - startOfDay.getTime()) / ONE_DAY_MS);
|
|
2917
|
-
if (diffDays === 0) return `Today at ${time}`;
|
|
2918
|
-
if (diffDays === 1) return `Yesterday at ${time}`;
|
|
2919
|
-
if (diffDays < DAYS_IN_WEEK && date.getDay() < now.getDay())
|
|
2920
|
-
return `${date.toLocaleDateString([], { weekday: "short" })} at ${time}`;
|
|
2921
|
-
return `${date.toLocaleDateString([], { month: "short", day: "numeric", year: "numeric" })} at ${time}`;
|
|
2922
|
-
};
|
|
2923
|
-
var MessagesWrapper = ({ messages = [] }) => {
|
|
2924
|
-
const wrapperRef = (0, import_react2.useRef)(null);
|
|
2925
|
-
(0, import_react2.useEffect)(() => {
|
|
2926
|
-
if (wrapperRef.current) {
|
|
2927
|
-
wrapperRef.current.scrollTop = wrapperRef.current.scrollHeight;
|
|
2928
|
-
}
|
|
2929
|
-
}, [messages]);
|
|
2930
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-messages-wrapper", ref: wrapperRef, children: messages.map(({ _id, message, attachment, timestamp, type, agentName }, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `message-item ${type}`, children: type === "agent" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AgentMessageWrapper, { message, attachment: attachment ? Array.isArray(attachment) ? attachment[0] : attachment : void 0, timestamp, agentName }) : type === "user" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(UserMessageWrapper, { message, attachment: attachment ? Array.isArray(attachment) ? attachment[0] : attachment : void 0, timestamp }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SystemMessageWrapper, { message, timestamp }) }, _id || index)) });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
2931
11
|
};
|
|
2932
|
-
var
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "An agent has left the chat." });
|
|
2938
|
-
case "USER_JOINED":
|
|
2939
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "A user has joined the chat." });
|
|
2940
|
-
case "USER_LEFT":
|
|
2941
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "A user has left the chat." });
|
|
2942
|
-
case "CHAT_ENDED":
|
|
2943
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "The chat has ended." });
|
|
2944
|
-
case "CHAT_REOPENED":
|
|
2945
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "The chat has been reopened." });
|
|
2946
|
-
case "CHAT_TRANSFERRED":
|
|
2947
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "The chat has been transferred to another agent." });
|
|
2948
|
-
case "WAITING_FOR_AGENT":
|
|
2949
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "Waiting for an agent to join the chat..." });
|
|
2950
|
-
default:
|
|
2951
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "System message" });
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
2952
17
|
}
|
|
18
|
+
return to;
|
|
2953
19
|
};
|
|
2954
|
-
var
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system3.Avatar, { size: "size24", className: "site-chat-component-message-container-agent-message-avatar", name: agentName }),
|
|
2964
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { width: AGENT_MESSAGE_WIDTH, gap: AGENT_MESSAGE_INNER_GAP, display: "flex", flexDirection: "column" }, children: [
|
|
2965
|
-
agentName && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "site-chat-component-message-container-agent-name-time-container", children: [
|
|
2966
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-agent-name", children: agentName }),
|
|
2967
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-agent-message-timestamp", children: formatTimestamp(timestamp) })
|
|
2968
|
-
] }),
|
|
2969
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `site-chat-component-message-container-agent-message-wrapper${attachment ? "-attachment" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "site-chat-component-message-container-agent-message", children: [
|
|
2970
|
-
message && message,
|
|
2971
|
-
attachment && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(attachment_default, { item: attachment })
|
|
2972
|
-
] }) })
|
|
2973
|
-
] })
|
|
2974
|
-
] });
|
|
2975
|
-
};
|
|
2976
|
-
var UserMessageWrapper = ({ message, attachment, timestamp }) => {
|
|
2977
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "4px" }, children: [
|
|
2978
|
-
!attachment && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "site-chat-component-message-container-user-name", children: "Me" }),
|
|
2979
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `site-chat-component-message-container-user-message-wrapper${attachment ? "-attachment" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "site-chat-component-message-container-user-message", children: [
|
|
2980
|
-
message && message,
|
|
2981
|
-
attachment && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(attachment_default, { item: attachment })
|
|
2982
|
-
] }) })
|
|
2983
|
-
] });
|
|
2984
|
-
};
|
|
2985
|
-
var messages_wrapper_default = MessagesWrapper;
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2986
29
|
|
|
2987
|
-
// src/components/SiteChatComponent/
|
|
2988
|
-
var
|
|
2989
|
-
|
|
2990
|
-
(
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
30
|
+
// src/components/SiteChatComponent/index.ts
|
|
31
|
+
var SiteChatComponent_exports = {};
|
|
32
|
+
__export(SiteChatComponent_exports, {
|
|
33
|
+
SiteChatComponent: () => SiteChatComponent
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(SiteChatComponent_exports);
|
|
36
|
+
|
|
37
|
+
// src/components/SiteChatComponent/SiteChatComponent.tsx
|
|
38
|
+
var import_react7 = __toESM(require("react"));
|
|
39
|
+
var import_design_system9 = require("@wix/design-system");
|
|
40
|
+
var import_styles_global = require("@wix/design-system/styles.global.css");
|
|
41
|
+
|
|
42
|
+
// src/components/SiteChatComponent/useSiteChatComponent.ts
|
|
43
|
+
function useSiteChatComponent() {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// src/components/SiteChatComponent/FabButton/FabButton.tsx
|
|
48
|
+
var import_react = __toESM(require("react"));
|
|
49
|
+
var import_design_system = require("@wix/design-system");
|
|
50
|
+
var import_wix_ui_icons_common = require("@wix/wix-ui-icons-common");
|
|
51
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
52
|
+
var FabButton = import_react.default.forwardRef(
|
|
53
|
+
({
|
|
54
|
+
className,
|
|
55
|
+
children,
|
|
56
|
+
onClick,
|
|
57
|
+
type = "textIcon",
|
|
58
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wix_ui_icons_common.WixChat, {}),
|
|
59
|
+
text,
|
|
60
|
+
...rest
|
|
61
|
+
}, ref) => {
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
63
|
+
"button",
|
|
64
|
+
{
|
|
65
|
+
className: "site-chat-component-fab",
|
|
66
|
+
onClick,
|
|
67
|
+
children: [
|
|
68
|
+
type === "textIcon" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "site-chat-component-fab-fab-button-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design_system.Box, { height: "100%", children: icon }) }) : null,
|
|
69
|
+
type === "textIcon" || type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "site-chat-component-fab-fab-button-text", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "site-chat-component-fab-fab-button-label", children: text }) }) : null,
|
|
70
|
+
type === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "site-chat-component-fab-fab-button-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design_system.Box, { height: "100%", width: "max-content", children: icon }) }) : null
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
) });
|
|
2996
74
|
}
|
|
2997
75
|
);
|
|
2998
|
-
|
|
76
|
+
FabButton.displayName = "SiteChatComponent.FabButton";
|
|
2999
77
|
|
|
3000
78
|
// src/components/SiteChatComponent/Footer/Footer.tsx
|
|
3001
|
-
var
|
|
3002
|
-
var
|
|
79
|
+
var import_react3 = __toESM(require("react"));
|
|
80
|
+
var import_design_system4 = require("@wix/design-system");
|
|
3003
81
|
|
|
3004
82
|
// src/components/SiteChatComponent/Footer/send-button/send-button.tsx
|
|
3005
|
-
var
|
|
83
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
3006
84
|
var SendButton = ({
|
|
3007
85
|
text = "Send",
|
|
3008
86
|
className = "",
|
|
3009
87
|
onClick,
|
|
3010
88
|
disabled = false
|
|
3011
89
|
}) => {
|
|
3012
|
-
return /* @__PURE__ */ (0,
|
|
90
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
3013
91
|
"button",
|
|
3014
92
|
{
|
|
3015
93
|
className: `site-chat-component-footer-my-tickets-chat-widget-send-button ${className}`,
|
|
@@ -3022,13 +100,13 @@ var SendButton = ({
|
|
|
3022
100
|
var send_button_default = SendButton;
|
|
3023
101
|
|
|
3024
102
|
// src/components/SiteChatComponent/Footer/attachment-list/attachment-list.tsx
|
|
3025
|
-
var
|
|
3026
|
-
var
|
|
103
|
+
var import_react2 = require("react");
|
|
104
|
+
var import_design_system2 = require("@wix/design-system");
|
|
3027
105
|
var import_wix_ui_icons_common2 = require("@wix/wix-ui-icons-common");
|
|
3028
|
-
var
|
|
106
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
3029
107
|
var AttachmentList = ({ items, onRemove, onClick, onFilesSent }) => {
|
|
3030
|
-
const [localItems, setLocalItems] = (0,
|
|
3031
|
-
(0,
|
|
108
|
+
const [localItems, setLocalItems] = (0, import_react2.useState)(items);
|
|
109
|
+
(0, import_react2.useEffect)(() => {
|
|
3032
110
|
setLocalItems(items);
|
|
3033
111
|
}, [items]);
|
|
3034
112
|
const handleOnRemove = (id) => {
|
|
@@ -3043,60 +121,137 @@ var AttachmentList = ({ items, onRemove, onClick, onFilesSent }) => {
|
|
|
3043
121
|
setLocalItems([]);
|
|
3044
122
|
}
|
|
3045
123
|
};
|
|
3046
|
-
return /* @__PURE__ */ (0,
|
|
3047
|
-
/* @__PURE__ */ (0,
|
|
3048
|
-
/* @__PURE__ */ (0,
|
|
3049
|
-
/* @__PURE__ */ (0,
|
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.Box, { direction: "horizontal", gap: 2, maxWidth: "100%", minWidth: "100%", overflowY: "hidden", boxSizing: "border-box", scrollbarWidth: "thin", overflowX: "auto", children: localItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "site-chat-component-footer-file-item-container", onClick: () => onClick && onClick(item.id, item.url), children: [
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_wix_ui_icons_common2.Page, { size: "15px" }),
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "site-chat-component-footer-file-name", children: item.name }),
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.IconButton, { size: "tiny", onClick: () => handleOnRemove(item.id), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_wix_ui_icons_common2.DismissSmall, {}) })
|
|
3050
128
|
] }, item.id)) });
|
|
3051
129
|
};
|
|
3052
130
|
var attachment_list_default = AttachmentList;
|
|
3053
131
|
|
|
3054
132
|
// src/components/SiteChatComponent/Footer/message-input/message-input.tsx
|
|
3055
|
-
var
|
|
133
|
+
var import_design_system3 = require("@wix/design-system");
|
|
134
|
+
var import_wix_ui_icons_common3 = require("@wix/wix-ui-icons-common");
|
|
135
|
+
|
|
136
|
+
// src/components/SiteChatComponent/Footer/message-input/open-file-picker.ts
|
|
137
|
+
var import_essentials = require("@wix/essentials");
|
|
138
|
+
var import_meta = {};
|
|
139
|
+
var uploadFile = async (file) => {
|
|
140
|
+
var _a;
|
|
141
|
+
try {
|
|
142
|
+
const baseApiUrl = new URL(import_meta.url).origin;
|
|
143
|
+
const response = await import_essentials.httpClient.fetchWithAuth(`${baseApiUrl}/api/widget/chat/upload-attachment`, {
|
|
144
|
+
method: "POST",
|
|
145
|
+
headers: {
|
|
146
|
+
"Content-Type": file.type || "application/octet-stream",
|
|
147
|
+
"x-file-name": encodeURIComponent(file.name),
|
|
148
|
+
"x-file-type": file.type || "application/octet-stream"
|
|
149
|
+
},
|
|
150
|
+
body: file
|
|
151
|
+
});
|
|
152
|
+
const data = await response.json();
|
|
153
|
+
if (!response.ok) {
|
|
154
|
+
throw new Error(data.error || "Failed to upload file");
|
|
155
|
+
}
|
|
156
|
+
if (!((_a = data.file) == null ? void 0 : _a.id) || !data.file.displayName || !data.file.url) {
|
|
157
|
+
throw new Error("Invalid response format from upload endpoint");
|
|
158
|
+
}
|
|
159
|
+
return data.file;
|
|
160
|
+
} catch (error) {
|
|
161
|
+
console.error("Error uploading file:", error);
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
var openFilePicker = async (options) => {
|
|
166
|
+
const win = window;
|
|
167
|
+
if (!win.showOpenFilePicker) {
|
|
168
|
+
console.error("File Picker API is not supported in this browser.");
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
const fileHandles = await win.showOpenFilePicker(options);
|
|
173
|
+
const fileHandle = fileHandles[0];
|
|
174
|
+
const file = await fileHandle.getFile();
|
|
175
|
+
const uploadedFile = await uploadFile(file);
|
|
176
|
+
if (!uploadedFile) {
|
|
177
|
+
console.error("Failed to upload file.");
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
id: uploadedFile.id,
|
|
182
|
+
name: uploadedFile.displayName,
|
|
183
|
+
url: uploadedFile.url
|
|
184
|
+
};
|
|
185
|
+
} catch (error) {
|
|
186
|
+
console.error("Error opening file picker:", error);
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// src/components/SiteChatComponent/Footer/message-input/message-input.tsx
|
|
192
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
3056
193
|
var MessageInput = ({
|
|
3057
194
|
placeholder = "Type a message...",
|
|
3058
195
|
disabled = false,
|
|
3059
196
|
className = "",
|
|
3060
|
-
suffix
|
|
197
|
+
suffix,
|
|
3061
198
|
value = "",
|
|
3062
199
|
onChange,
|
|
3063
200
|
onKeyDown,
|
|
3064
|
-
|
|
201
|
+
onAttachmentAdded
|
|
3065
202
|
}) => {
|
|
3066
|
-
|
|
3067
|
-
|
|
203
|
+
const handleAttachmentOnClick = async () => {
|
|
204
|
+
try {
|
|
205
|
+
await openFilePicker({ multiple: false }).then((file) => {
|
|
206
|
+
if (file && onAttachmentAdded) {
|
|
207
|
+
onAttachmentAdded(file);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
} catch (error) {
|
|
211
|
+
console.error("Error opening file picker:", error);
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: `site-chat-component-footer-input-wrapper ${className}`, children: [
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3068
216
|
"input",
|
|
3069
217
|
{
|
|
3070
218
|
name: "messageInput",
|
|
3071
|
-
className: "chat-input",
|
|
219
|
+
className: "site-chat-component-footer-chat-input",
|
|
3072
220
|
placeholder,
|
|
3073
221
|
disabled,
|
|
3074
222
|
value,
|
|
3075
223
|
onChange,
|
|
3076
|
-
onKeyDown
|
|
3077
|
-
readOnly: !onChange
|
|
224
|
+
onKeyDown
|
|
3078
225
|
}
|
|
3079
226
|
),
|
|
3080
|
-
|
|
227
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("sub", { className: "site-chat-component-footer-suffix", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system3.IconButton, { onClick: handleAttachmentOnClick, className: "attachment-icon-button", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_wix_ui_icons_common3.AttachmentSmall, {}) }) })
|
|
3081
228
|
] });
|
|
3082
229
|
};
|
|
3083
230
|
var message_input_default = MessageInput;
|
|
3084
231
|
|
|
3085
232
|
// src/components/SiteChatComponent/Footer/Footer.tsx
|
|
3086
|
-
var
|
|
3087
|
-
var Footer =
|
|
233
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
234
|
+
var Footer = import_react3.default.forwardRef(
|
|
3088
235
|
({
|
|
3089
236
|
className,
|
|
3090
237
|
children,
|
|
3091
238
|
sendButtonConfig,
|
|
3092
239
|
attachmentListConfig,
|
|
3093
240
|
messageInputConfig,
|
|
241
|
+
onAttachmentAdded,
|
|
3094
242
|
...rest
|
|
3095
243
|
}, ref) => {
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
244
|
+
const handleSendMessage = (text, messageType, attachment) => {
|
|
245
|
+
if (sendButtonConfig == null ? void 0 : sendButtonConfig.onClick) {
|
|
246
|
+
sendButtonConfig.onClick(text, messageType, attachment);
|
|
247
|
+
} else {
|
|
248
|
+
console.warn("handleSendMessage function is not provided in sendButtonConfig");
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system4.Box, { ref, className: "site-chat-component-footer-message-input-container", direction: "vertical", gap: 1, verticalAlign: "middle", children: [
|
|
252
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_design_system4.Box, { width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(attachment_list_default, { items: (attachmentListConfig == null ? void 0 : attachmentListConfig.items) || [], onRemove: attachmentListConfig == null ? void 0 : attachmentListConfig.onRemove, onClick: attachmentListConfig == null ? void 0 : attachmentListConfig.onClick, onFilesSent: attachmentListConfig == null ? void 0 : attachmentListConfig.onFilesSent }) }),
|
|
253
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system4.Box, { alignContent: "bottom", width: "100%", direction: "horizontal", gap: 2, verticalAlign: "middle", children: [
|
|
254
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3100
255
|
message_input_default,
|
|
3101
256
|
{
|
|
3102
257
|
placeholder: (messageInputConfig == null ? void 0 : messageInputConfig.placeholder) || "Type your message here...",
|
|
@@ -3105,56 +260,189 @@ var Footer = import_react5.default.forwardRef(
|
|
|
3105
260
|
onChange: messageInputConfig == null ? void 0 : messageInputConfig.onChange,
|
|
3106
261
|
onKeyDown: messageInputConfig == null ? void 0 : messageInputConfig.onKeyDown,
|
|
3107
262
|
disabled: messageInputConfig == null ? void 0 : messageInputConfig.disabled,
|
|
3108
|
-
|
|
263
|
+
onAttachmentAdded
|
|
3109
264
|
}
|
|
3110
265
|
),
|
|
3111
|
-
/* @__PURE__ */ (0,
|
|
266
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3112
267
|
send_button_default,
|
|
3113
268
|
{
|
|
3114
|
-
onClick:
|
|
269
|
+
onClick: () => handleSendMessage((messageInputConfig == null ? void 0 : messageInputConfig.value) || "", (attachmentListConfig == null ? void 0 : attachmentListConfig.items) ? "ATTACHMENT" : "TEXT"),
|
|
3115
270
|
disabled: sendButtonConfig == null ? void 0 : sendButtonConfig.disabled,
|
|
3116
271
|
text: (sendButtonConfig == null ? void 0 : sendButtonConfig.buttonText) || "Send"
|
|
3117
272
|
}
|
|
3118
273
|
)
|
|
3119
274
|
] })
|
|
3120
|
-
] })
|
|
275
|
+
] });
|
|
3121
276
|
}
|
|
3122
277
|
);
|
|
3123
278
|
Footer.displayName = "SiteChatComponent.Footer";
|
|
3124
279
|
|
|
3125
|
-
// src/components/SiteChatComponent/
|
|
3126
|
-
var
|
|
3127
|
-
var
|
|
3128
|
-
var
|
|
3129
|
-
var
|
|
280
|
+
// src/components/SiteChatComponent/Header/Header.tsx
|
|
281
|
+
var import_react4 = __toESM(require("react"));
|
|
282
|
+
var import_design_system5 = require("@wix/design-system");
|
|
283
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
284
|
+
var Header = import_react4.default.forwardRef(
|
|
3130
285
|
({
|
|
3131
286
|
className,
|
|
3132
287
|
children,
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
288
|
+
title,
|
|
289
|
+
subtitle,
|
|
290
|
+
image,
|
|
291
|
+
onClose,
|
|
3137
292
|
...rest
|
|
3138
293
|
}, ref) => {
|
|
3139
|
-
return /* @__PURE__ */ (0,
|
|
3140
|
-
"
|
|
3141
|
-
{
|
|
3142
|
-
className: "site-chat-component-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system5.Box, { ref, className: "site-chat-component-header-container", verticalAlign: "middle", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system5.Box, { width: "100%", direction: "horizontal", align: "center", gap: "10px", children: [
|
|
295
|
+
image && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system5.Box, { className: "site-chat-component-header-image", width: "60px", height: "50px", borderRadius: "999px", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { style: { borderRadius: "999px" }, width: "100%", height: "100%", src: String(image), alt: "Business Logo" }) }),
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system5.Box, { direction: "vertical", className: "site-chat-component-header-text-section", children: [
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system5.Box, { className: "site-chat-component-header-top-section", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system5.Box, { className: "site-chat-component-header-top", verticalAlign: "middle", WebkitJustifyContent: "space-between", width: "100%", children: [
|
|
298
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "site-chat-component-header-title", children: title }),
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
300
|
+
"button",
|
|
301
|
+
{
|
|
302
|
+
onClick: onClose,
|
|
303
|
+
"aria-label": "Close",
|
|
304
|
+
className: "site-chat-component-header-close-button",
|
|
305
|
+
children: "\u2715"
|
|
306
|
+
}
|
|
307
|
+
)
|
|
308
|
+
] }) }),
|
|
309
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system5.Box, { className: "site-chat-component-header-bottom-section", children: subtitle && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "site-chat-component-header-subtitle", children: subtitle }) })
|
|
310
|
+
] })
|
|
311
|
+
] }) });
|
|
3151
312
|
}
|
|
3152
313
|
);
|
|
3153
|
-
|
|
314
|
+
Header.displayName = "SiteChatComponent.Header";
|
|
3154
315
|
|
|
3155
|
-
// src/components/SiteChatComponent/
|
|
316
|
+
// src/components/SiteChatComponent/MessageContainer/MessageContainer.tsx
|
|
317
|
+
var import_react6 = __toESM(require("react"));
|
|
3156
318
|
var import_design_system8 = require("@wix/design-system");
|
|
3157
|
-
|
|
319
|
+
|
|
320
|
+
// src/components/SiteChatComponent/MessageContainer/messages/messages-wrapper.tsx
|
|
321
|
+
var import_react5 = require("react");
|
|
322
|
+
var import_design_system7 = require("@wix/design-system");
|
|
323
|
+
|
|
324
|
+
// src/components/SiteChatComponent/MessageContainer/messages/attachment.tsx
|
|
325
|
+
var import_design_system6 = require("@wix/design-system");
|
|
326
|
+
var import_wix_ui_icons_common4 = require("@wix/wix-ui-icons-common");
|
|
327
|
+
var import_on_stage = require("@wix/wix-ui-icons-common/on-stage");
|
|
328
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
329
|
+
var Attachment = ({ item }) => {
|
|
330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_design_system6.Box, { direction: "horizontal", maxWidth: "100%", boxSizing: "border-box", className: "site-chat-component-message-container-in-chat-file-item-wrapper-box", children: item && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "site-chat-component-message-container-in-chat-file-item-container", children: [
|
|
331
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_wix_ui_icons_common4.Page, { className: "site-chat-component-message-container-in-chat-file-icon", width: "20px", height: "20px" }),
|
|
332
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "site-chat-component-message-container-in-chat-file-names-container", children: [
|
|
333
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "site-chat-component-message-container-in-chat-file-name", children: item.name }),
|
|
334
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "site-chat-component-message-container-in-chat-file-sub-name", children: "Attachment" })
|
|
335
|
+
] }),
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_design_system6.TextButton, { size: "tiny", onClick: () => window.open(item.url, "_blank"), suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_on_stage.ArrowTopRight, { size: "tiny" }), children: "Open" })
|
|
337
|
+
] }, item.id) });
|
|
338
|
+
};
|
|
339
|
+
var attachment_default = Attachment;
|
|
340
|
+
|
|
341
|
+
// src/components/SiteChatComponent/MessageContainer/messages/messages-wrapper.tsx
|
|
342
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
343
|
+
var AGENT_MESSAGE_GAP = "10px";
|
|
344
|
+
var AGENT_MESSAGE_WIDTH = "75%";
|
|
345
|
+
var AGENT_MESSAGE_INNER_GAP = "4px";
|
|
346
|
+
var ONE_MINUTE_MS = 6e4;
|
|
347
|
+
var ONE_DAY_MS = 864e5;
|
|
348
|
+
var DAYS_IN_WEEK = 7;
|
|
349
|
+
var formatTimestamp = (timestamp) => {
|
|
350
|
+
if (!timestamp) return "";
|
|
351
|
+
const date = new Date(timestamp);
|
|
352
|
+
const now = /* @__PURE__ */ new Date();
|
|
353
|
+
if (now.getTime() - date.getTime() < ONE_MINUTE_MS) return "Just now";
|
|
354
|
+
const time = date.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
|
|
355
|
+
const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
356
|
+
const startOfDay = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
357
|
+
const diffDays = Math.floor((startOfToday.getTime() - startOfDay.getTime()) / ONE_DAY_MS);
|
|
358
|
+
if (diffDays === 0) return `Today at ${time}`;
|
|
359
|
+
if (diffDays === 1) return `Yesterday at ${time}`;
|
|
360
|
+
if (diffDays < DAYS_IN_WEEK && date.getDay() < now.getDay())
|
|
361
|
+
return `${date.toLocaleDateString([], { weekday: "short" })} at ${time}`;
|
|
362
|
+
return `${date.toLocaleDateString([], { month: "short", day: "numeric", year: "numeric" })} at ${time}`;
|
|
363
|
+
};
|
|
364
|
+
var MessagesWrapper = ({ messages = [] }) => {
|
|
365
|
+
const wrapperRef = (0, import_react5.useRef)(null);
|
|
366
|
+
(0, import_react5.useEffect)(() => {
|
|
367
|
+
if (wrapperRef.current) {
|
|
368
|
+
wrapperRef.current.scrollTop = wrapperRef.current.scrollHeight;
|
|
369
|
+
}
|
|
370
|
+
}, [messages]);
|
|
371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-messages-wrapper", ref: wrapperRef, children: messages.map(({ _id, message, attachment, timestamp, type, agentName }, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `message-item ${type}`, children: type === "agent" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AgentMessageWrapper, { message, attachment: attachment ? Array.isArray(attachment) ? attachment[0] : attachment : void 0, timestamp, agentName }) : type === "user" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(UserMessageWrapper, { message, attachment: attachment ? Array.isArray(attachment) ? attachment[0] : attachment : void 0, timestamp }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SystemMessageWrapper, { message, timestamp }) }, _id || index)) });
|
|
372
|
+
};
|
|
373
|
+
var GetSystemMessage = ({ type }) => {
|
|
374
|
+
switch (type) {
|
|
375
|
+
case "AGENT_JOINED":
|
|
376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "An agent has joined the chat." });
|
|
377
|
+
case "AGENT_LEFT":
|
|
378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "An agent has left the chat." });
|
|
379
|
+
case "USER_JOINED":
|
|
380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "A user has joined the chat." });
|
|
381
|
+
case "USER_LEFT":
|
|
382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "A user has left the chat." });
|
|
383
|
+
case "CHAT_ENDED":
|
|
384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "The chat has ended." });
|
|
385
|
+
case "CHAT_REOPENED":
|
|
386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "The chat has been reopened." });
|
|
387
|
+
case "CHAT_TRANSFERRED":
|
|
388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "The chat has been transferred to another agent." });
|
|
389
|
+
case "WAITING_FOR_AGENT":
|
|
390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "Waiting for an agent to join the chat..." });
|
|
391
|
+
default:
|
|
392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-message", children: "System message" });
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
var SystemMessageWrapper = ({ message, timestamp }) => {
|
|
396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-system-message-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "site-chat-component-message-container-system-message", children: [
|
|
397
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", { className: "dashed" }),
|
|
398
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(GetSystemMessage, { type: message }),
|
|
399
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", { className: "dashed" })
|
|
400
|
+
] }) });
|
|
401
|
+
};
|
|
402
|
+
var AgentMessageWrapper = ({ message, attachment, timestamp, agentName }) => {
|
|
403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", flexDirection: "row", gap: AGENT_MESSAGE_GAP }, children: [
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_design_system7.Avatar, { size: "size24", className: "site-chat-component-message-container-agent-message-avatar", name: agentName }),
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { width: AGENT_MESSAGE_WIDTH, gap: AGENT_MESSAGE_INNER_GAP, display: "flex", flexDirection: "column" }, children: [
|
|
406
|
+
agentName && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "site-chat-component-message-container-agent-name-time-container", children: [
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-agent-name", children: agentName }),
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-agent-message-timestamp", children: formatTimestamp(timestamp) })
|
|
409
|
+
] }),
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `site-chat-component-message-container-agent-message-wrapper${attachment ? "-attachment" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "site-chat-component-message-container-agent-message", children: [
|
|
411
|
+
message && message,
|
|
412
|
+
attachment && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(attachment_default, { item: attachment })
|
|
413
|
+
] }) })
|
|
414
|
+
] })
|
|
415
|
+
] });
|
|
416
|
+
};
|
|
417
|
+
var UserMessageWrapper = ({ message, attachment, timestamp }) => {
|
|
418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "4px" }, children: [
|
|
419
|
+
!attachment && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "site-chat-component-message-container-user-name", children: "Me" }),
|
|
420
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `site-chat-component-message-container-user-message-wrapper${attachment ? "-attachment" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "site-chat-component-message-container-user-message", children: [
|
|
421
|
+
message && message,
|
|
422
|
+
attachment && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(attachment_default, { item: attachment })
|
|
423
|
+
] }) })
|
|
424
|
+
] });
|
|
425
|
+
};
|
|
426
|
+
var messages_wrapper_default = MessagesWrapper;
|
|
427
|
+
|
|
428
|
+
// src/components/SiteChatComponent/MessageContainer/MessageContainer.tsx
|
|
429
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
430
|
+
var MessageContainer = import_react6.default.forwardRef(
|
|
431
|
+
({
|
|
432
|
+
className,
|
|
433
|
+
children,
|
|
434
|
+
messages,
|
|
435
|
+
loading,
|
|
436
|
+
...rest
|
|
437
|
+
}, ref) => {
|
|
438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_design_system8.Box, { ref, className: "site-chat-component-message-container", children: [
|
|
439
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system8.Box, { className: "site-chat-component-message-container-loading-state", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { children: "Loading messages..." }) }),
|
|
440
|
+
messages.length === 0 && !loading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system8.Box, { className: "site-chat-component-message-container-empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { children: "No messages yet. Start a conversation" }) }),
|
|
441
|
+
messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(messages_wrapper_default, { messages })
|
|
442
|
+
] });
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
MessageContainer.displayName = "SiteChatComponent.MessageContainer";
|
|
3158
446
|
|
|
3159
447
|
// src/components/SiteChatComponent/SiteChatComponent.css
|
|
3160
448
|
if (typeof document !== "undefined" && !document.getElementById("jrapps-style-3c48ccde")) {
|
|
@@ -3173,7 +461,7 @@ if (typeof document !== "undefined" && !document.getElementById("jrapps-style-3c
|
|
|
3173
461
|
border-top-left-radius: inherit;
|
|
3174
462
|
}
|
|
3175
463
|
|
|
3176
|
-
.site-chat-component-header-container .text-section {
|
|
464
|
+
.site-chat-component-header-container .site-chat-component-header-text-section {
|
|
3177
465
|
width: 100%;
|
|
3178
466
|
}
|
|
3179
467
|
|
|
@@ -3491,13 +779,13 @@ if (typeof document !== "undefined" && !document.getElementById("jrapps-style-3c
|
|
|
3491
779
|
gap: 0px;
|
|
3492
780
|
}
|
|
3493
781
|
|
|
3494
|
-
.site-chat-component-message-container-user-message-wrapper-attachment .in-chat-file-item-wrapper-box {
|
|
782
|
+
.site-chat-component-message-container-user-message-wrapper-attachment .site-chat-component-message-container-in-chat-file-item-wrapper-box {
|
|
3495
783
|
align-items: flex-end;
|
|
3496
784
|
display: flex;
|
|
3497
785
|
flex-direction: column;
|
|
3498
786
|
}
|
|
3499
787
|
|
|
3500
|
-
.site-chat-component-message-container-agent-message-wrapper-attachment .in-chat-file-item-wrapper-box {
|
|
788
|
+
.site-chat-component-message-container-agent-message-wrapper-attachment .site-chat-component-message-container-in-chat-file-item-wrapper-box {
|
|
3501
789
|
align-items: flex-start;
|
|
3502
790
|
display: flex;
|
|
3503
791
|
flex-direction: column;
|
|
@@ -3674,62 +962,30 @@ if (typeof document !== "undefined" && !document.getElementById("jrapps-style-3c
|
|
|
3674
962
|
}
|
|
3675
963
|
|
|
3676
964
|
// src/components/SiteChatComponent/SiteChatComponent.tsx
|
|
3677
|
-
var import_jsx_runtime10 =
|
|
965
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
3678
966
|
var SiteChatComponentRoot = import_react7.default.forwardRef(
|
|
3679
967
|
({
|
|
3680
|
-
className,
|
|
3681
968
|
children,
|
|
3682
969
|
viewMode,
|
|
3683
970
|
editorShowChatPanel,
|
|
3684
971
|
handleToggle,
|
|
3685
|
-
handleClose,
|
|
3686
972
|
buttonTextValue,
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
}, ref) => {
|
|
3694
|
-
const {} = useSiteChatComponent();
|
|
3695
|
-
const ToRender = ({ children: children2 }) => {
|
|
3696
|
-
if (viewMode === "Editor") {
|
|
3697
|
-
editorShowChatPanel = true;
|
|
3698
|
-
if (typeof editorShowChatPanel === "undefined") {
|
|
3699
|
-
console.error("Editor view mode detected but editorShowChatPanel prop is not provided. Please provide editorShowChatPanel prop to control the chat panel visibility in Editor mode.");
|
|
3700
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system8.Box, { align: "center", verticalAlign: "middle", height: "100%", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system8.Text, { children: "Editor view mode detected but editorShowChatPanel prop is not provided" }) });
|
|
3701
|
-
}
|
|
3702
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system8.Box, { children: [
|
|
3703
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FabButton, { onClick: handleToggle, text: buttonTextValue }),
|
|
3704
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
3705
|
-
import_design_system8.Box,
|
|
3706
|
-
{
|
|
3707
|
-
className: `site-chat-component-panel ${editorShowChatPanel ? "open" : ""}`,
|
|
3708
|
-
children: children2
|
|
3709
|
-
}
|
|
3710
|
-
)
|
|
3711
|
-
] });
|
|
973
|
+
isOpen
|
|
974
|
+
}, _ref) => {
|
|
975
|
+
useSiteChatComponent();
|
|
976
|
+
if (viewMode === "Editor") {
|
|
977
|
+
if (typeof editorShowChatPanel === "undefined") {
|
|
978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system9.Box, { align: "center", verticalAlign: "middle", height: "100%", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system9.Text, { children: "Editor view mode detected but editorShowChatPanel prop is not provided" }) });
|
|
3712
979
|
}
|
|
3713
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system9.Box, { children: [
|
|
3714
981
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FabButton, { onClick: handleToggle, text: buttonTextValue }),
|
|
3715
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
3716
|
-
import_design_system8.Box,
|
|
3717
|
-
{
|
|
3718
|
-
className: `site-chat-component-panel ${isOpen ? "open" : ""}`,
|
|
3719
|
-
children: children2
|
|
3720
|
-
}
|
|
3721
|
-
)
|
|
982
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system9.Box, { className: `site-chat-component-panel ${editorShowChatPanel ? "open" : ""}`, children })
|
|
3722
983
|
] });
|
|
3723
|
-
}
|
|
3724
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.
|
|
3725
|
-
|
|
3726
|
-
{
|
|
3727
|
-
|
|
3728
|
-
className: ["site-chat-component", className].filter(Boolean).join(" "),
|
|
3729
|
-
...rest,
|
|
3730
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToRender, { children })
|
|
3731
|
-
}
|
|
3732
|
-
);
|
|
984
|
+
}
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system9.Box, { children: [
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FabButton, { onClick: handleToggle, text: buttonTextValue }),
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system9.Box, { className: `site-chat-component-panel ${isOpen ? "open" : ""}`, children })
|
|
988
|
+
] });
|
|
3733
989
|
}
|
|
3734
990
|
);
|
|
3735
991
|
SiteChatComponentRoot.displayName = "SiteChatComponent";
|
|
@@ -3739,28 +995,4 @@ var SiteChatComponent = Object.assign(SiteChatComponentRoot, {
|
|
|
3739
995
|
Footer,
|
|
3740
996
|
FabButton
|
|
3741
997
|
});
|
|
3742
|
-
/*! Bundled license information:
|
|
3743
|
-
|
|
3744
|
-
react/cjs/react.development.js:
|
|
3745
|
-
(**
|
|
3746
|
-
* @license React
|
|
3747
|
-
* react.development.js
|
|
3748
|
-
*
|
|
3749
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3750
|
-
*
|
|
3751
|
-
* This source code is licensed under the MIT license found in the
|
|
3752
|
-
* LICENSE file in the root directory of this source tree.
|
|
3753
|
-
*)
|
|
3754
|
-
|
|
3755
|
-
react/cjs/react-jsx-runtime.development.js:
|
|
3756
|
-
(**
|
|
3757
|
-
* @license React
|
|
3758
|
-
* react-jsx-runtime.development.js
|
|
3759
|
-
*
|
|
3760
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3761
|
-
*
|
|
3762
|
-
* This source code is licensed under the MIT license found in the
|
|
3763
|
-
* LICENSE file in the root directory of this source tree.
|
|
3764
|
-
*)
|
|
3765
|
-
*/
|
|
3766
998
|
//# sourceMappingURL=index.js.map
|