@tunghtml/strapi-plugin-composite-field 1.1.9 → 1.2.0
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/package.json +3 -3
- package/dist/_chunks/CompositeInput-B27rDvur.js +0 -1071
- package/dist/_chunks/CompositeInput-L5-14cJV.mjs +0 -1054
- package/dist/admin/index.js +0 -125
- package/dist/admin/index.mjs +0 -124
- package/dist/server/index.js +0 -17
- package/dist/server/index.mjs +0 -18
|
@@ -1,1071 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const designSystem = require("@strapi/design-system");
|
|
5
|
-
const icons = require("@strapi/icons");
|
|
6
|
-
const admin = require("@strapi/strapi/admin");
|
|
7
|
-
const React = require("react");
|
|
8
|
-
function _interopNamespace(e) {
|
|
9
|
-
if (e && e.__esModule) return e;
|
|
10
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
11
|
-
if (e) {
|
|
12
|
-
for (const k in e) {
|
|
13
|
-
if (k !== "default") {
|
|
14
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: () => e[k]
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
n.default = e;
|
|
23
|
-
return Object.freeze(n);
|
|
24
|
-
}
|
|
25
|
-
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
26
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
27
|
-
function getDefaultExportFromCjs(x) {
|
|
28
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
29
|
-
}
|
|
30
|
-
var isArray$3 = Array.isArray;
|
|
31
|
-
var isArray_1 = isArray$3;
|
|
32
|
-
var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
33
|
-
var _freeGlobal = freeGlobal$1;
|
|
34
|
-
var freeGlobal = _freeGlobal;
|
|
35
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
36
|
-
var root$3 = freeGlobal || freeSelf || Function("return this")();
|
|
37
|
-
var _root = root$3;
|
|
38
|
-
var root$2 = _root;
|
|
39
|
-
var Symbol$4 = root$2.Symbol;
|
|
40
|
-
var _Symbol = Symbol$4;
|
|
41
|
-
var Symbol$3 = _Symbol;
|
|
42
|
-
var objectProto$4 = Object.prototype;
|
|
43
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
44
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
45
|
-
var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : void 0;
|
|
46
|
-
function getRawTag$1(value) {
|
|
47
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
48
|
-
try {
|
|
49
|
-
value[symToStringTag$1] = void 0;
|
|
50
|
-
var unmasked = true;
|
|
51
|
-
} catch (e) {
|
|
52
|
-
}
|
|
53
|
-
var result = nativeObjectToString$1.call(value);
|
|
54
|
-
if (unmasked) {
|
|
55
|
-
if (isOwn) {
|
|
56
|
-
value[symToStringTag$1] = tag;
|
|
57
|
-
} else {
|
|
58
|
-
delete value[symToStringTag$1];
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
var _getRawTag = getRawTag$1;
|
|
64
|
-
var objectProto$3 = Object.prototype;
|
|
65
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
66
|
-
function objectToString$1(value) {
|
|
67
|
-
return nativeObjectToString.call(value);
|
|
68
|
-
}
|
|
69
|
-
var _objectToString = objectToString$1;
|
|
70
|
-
var Symbol$2 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
|
|
71
|
-
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
72
|
-
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
73
|
-
function baseGetTag$2(value) {
|
|
74
|
-
if (value == null) {
|
|
75
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
76
|
-
}
|
|
77
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
78
|
-
}
|
|
79
|
-
var _baseGetTag = baseGetTag$2;
|
|
80
|
-
function isObjectLike$1(value) {
|
|
81
|
-
return value != null && typeof value == "object";
|
|
82
|
-
}
|
|
83
|
-
var isObjectLike_1 = isObjectLike$1;
|
|
84
|
-
var baseGetTag$1 = _baseGetTag, isObjectLike = isObjectLike_1;
|
|
85
|
-
var symbolTag = "[object Symbol]";
|
|
86
|
-
function isSymbol$3(value) {
|
|
87
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag$1(value) == symbolTag;
|
|
88
|
-
}
|
|
89
|
-
var isSymbol_1 = isSymbol$3;
|
|
90
|
-
var isArray$2 = isArray_1, isSymbol$2 = isSymbol_1;
|
|
91
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
92
|
-
function isKey$1(value, object) {
|
|
93
|
-
if (isArray$2(value)) {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
var type = typeof value;
|
|
97
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol$2(value)) {
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
101
|
-
}
|
|
102
|
-
var _isKey = isKey$1;
|
|
103
|
-
function isObject$2(value) {
|
|
104
|
-
var type = typeof value;
|
|
105
|
-
return value != null && (type == "object" || type == "function");
|
|
106
|
-
}
|
|
107
|
-
var isObject_1 = isObject$2;
|
|
108
|
-
var baseGetTag = _baseGetTag, isObject$1 = isObject_1;
|
|
109
|
-
var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
110
|
-
function isFunction$1(value) {
|
|
111
|
-
if (!isObject$1(value)) {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
var tag = baseGetTag(value);
|
|
115
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
116
|
-
}
|
|
117
|
-
var isFunction_1 = isFunction$1;
|
|
118
|
-
var root$1 = _root;
|
|
119
|
-
var coreJsData$1 = root$1["__core-js_shared__"];
|
|
120
|
-
var _coreJsData = coreJsData$1;
|
|
121
|
-
var coreJsData = _coreJsData;
|
|
122
|
-
var maskSrcKey = function() {
|
|
123
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
124
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
125
|
-
}();
|
|
126
|
-
function isMasked$1(func) {
|
|
127
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
128
|
-
}
|
|
129
|
-
var _isMasked = isMasked$1;
|
|
130
|
-
var funcProto$1 = Function.prototype;
|
|
131
|
-
var funcToString$1 = funcProto$1.toString;
|
|
132
|
-
function toSource$1(func) {
|
|
133
|
-
if (func != null) {
|
|
134
|
-
try {
|
|
135
|
-
return funcToString$1.call(func);
|
|
136
|
-
} catch (e) {
|
|
137
|
-
}
|
|
138
|
-
try {
|
|
139
|
-
return func + "";
|
|
140
|
-
} catch (e) {
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return "";
|
|
144
|
-
}
|
|
145
|
-
var _toSource = toSource$1;
|
|
146
|
-
var isFunction = isFunction_1, isMasked = _isMasked, isObject = isObject_1, toSource = _toSource;
|
|
147
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
148
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
149
|
-
var funcProto = Function.prototype, objectProto$2 = Object.prototype;
|
|
150
|
-
var funcToString = funcProto.toString;
|
|
151
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
152
|
-
var reIsNative = RegExp(
|
|
153
|
-
"^" + funcToString.call(hasOwnProperty$2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
154
|
-
);
|
|
155
|
-
function baseIsNative$1(value) {
|
|
156
|
-
if (!isObject(value) || isMasked(value)) {
|
|
157
|
-
return false;
|
|
158
|
-
}
|
|
159
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
160
|
-
return pattern.test(toSource(value));
|
|
161
|
-
}
|
|
162
|
-
var _baseIsNative = baseIsNative$1;
|
|
163
|
-
function getValue$1(object, key) {
|
|
164
|
-
return object == null ? void 0 : object[key];
|
|
165
|
-
}
|
|
166
|
-
var _getValue = getValue$1;
|
|
167
|
-
var baseIsNative = _baseIsNative, getValue = _getValue;
|
|
168
|
-
function getNative$2(object, key) {
|
|
169
|
-
var value = getValue(object, key);
|
|
170
|
-
return baseIsNative(value) ? value : void 0;
|
|
171
|
-
}
|
|
172
|
-
var _getNative = getNative$2;
|
|
173
|
-
var getNative$1 = _getNative;
|
|
174
|
-
var nativeCreate$4 = getNative$1(Object, "create");
|
|
175
|
-
var _nativeCreate = nativeCreate$4;
|
|
176
|
-
var nativeCreate$3 = _nativeCreate;
|
|
177
|
-
function hashClear$1() {
|
|
178
|
-
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
179
|
-
this.size = 0;
|
|
180
|
-
}
|
|
181
|
-
var _hashClear = hashClear$1;
|
|
182
|
-
function hashDelete$1(key) {
|
|
183
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
184
|
-
this.size -= result ? 1 : 0;
|
|
185
|
-
return result;
|
|
186
|
-
}
|
|
187
|
-
var _hashDelete = hashDelete$1;
|
|
188
|
-
var nativeCreate$2 = _nativeCreate;
|
|
189
|
-
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
190
|
-
var objectProto$1 = Object.prototype;
|
|
191
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
192
|
-
function hashGet$1(key) {
|
|
193
|
-
var data = this.__data__;
|
|
194
|
-
if (nativeCreate$2) {
|
|
195
|
-
var result = data[key];
|
|
196
|
-
return result === HASH_UNDEFINED$1 ? void 0 : result;
|
|
197
|
-
}
|
|
198
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
199
|
-
}
|
|
200
|
-
var _hashGet = hashGet$1;
|
|
201
|
-
var nativeCreate$1 = _nativeCreate;
|
|
202
|
-
var objectProto = Object.prototype;
|
|
203
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
204
|
-
function hashHas$1(key) {
|
|
205
|
-
var data = this.__data__;
|
|
206
|
-
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
207
|
-
}
|
|
208
|
-
var _hashHas = hashHas$1;
|
|
209
|
-
var nativeCreate = _nativeCreate;
|
|
210
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
211
|
-
function hashSet$1(key, value) {
|
|
212
|
-
var data = this.__data__;
|
|
213
|
-
this.size += this.has(key) ? 0 : 1;
|
|
214
|
-
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
215
|
-
return this;
|
|
216
|
-
}
|
|
217
|
-
var _hashSet = hashSet$1;
|
|
218
|
-
var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet;
|
|
219
|
-
function Hash$1(entries) {
|
|
220
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
221
|
-
this.clear();
|
|
222
|
-
while (++index < length) {
|
|
223
|
-
var entry = entries[index];
|
|
224
|
-
this.set(entry[0], entry[1]);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
Hash$1.prototype.clear = hashClear;
|
|
228
|
-
Hash$1.prototype["delete"] = hashDelete;
|
|
229
|
-
Hash$1.prototype.get = hashGet;
|
|
230
|
-
Hash$1.prototype.has = hashHas;
|
|
231
|
-
Hash$1.prototype.set = hashSet;
|
|
232
|
-
var _Hash = Hash$1;
|
|
233
|
-
function listCacheClear$1() {
|
|
234
|
-
this.__data__ = [];
|
|
235
|
-
this.size = 0;
|
|
236
|
-
}
|
|
237
|
-
var _listCacheClear = listCacheClear$1;
|
|
238
|
-
function eq$1(value, other) {
|
|
239
|
-
return value === other || value !== value && other !== other;
|
|
240
|
-
}
|
|
241
|
-
var eq_1 = eq$1;
|
|
242
|
-
var eq = eq_1;
|
|
243
|
-
function assocIndexOf$4(array, key) {
|
|
244
|
-
var length = array.length;
|
|
245
|
-
while (length--) {
|
|
246
|
-
if (eq(array[length][0], key)) {
|
|
247
|
-
return length;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return -1;
|
|
251
|
-
}
|
|
252
|
-
var _assocIndexOf = assocIndexOf$4;
|
|
253
|
-
var assocIndexOf$3 = _assocIndexOf;
|
|
254
|
-
var arrayProto = Array.prototype;
|
|
255
|
-
var splice = arrayProto.splice;
|
|
256
|
-
function listCacheDelete$1(key) {
|
|
257
|
-
var data = this.__data__, index = assocIndexOf$3(data, key);
|
|
258
|
-
if (index < 0) {
|
|
259
|
-
return false;
|
|
260
|
-
}
|
|
261
|
-
var lastIndex = data.length - 1;
|
|
262
|
-
if (index == lastIndex) {
|
|
263
|
-
data.pop();
|
|
264
|
-
} else {
|
|
265
|
-
splice.call(data, index, 1);
|
|
266
|
-
}
|
|
267
|
-
--this.size;
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
var _listCacheDelete = listCacheDelete$1;
|
|
271
|
-
var assocIndexOf$2 = _assocIndexOf;
|
|
272
|
-
function listCacheGet$1(key) {
|
|
273
|
-
var data = this.__data__, index = assocIndexOf$2(data, key);
|
|
274
|
-
return index < 0 ? void 0 : data[index][1];
|
|
275
|
-
}
|
|
276
|
-
var _listCacheGet = listCacheGet$1;
|
|
277
|
-
var assocIndexOf$1 = _assocIndexOf;
|
|
278
|
-
function listCacheHas$1(key) {
|
|
279
|
-
return assocIndexOf$1(this.__data__, key) > -1;
|
|
280
|
-
}
|
|
281
|
-
var _listCacheHas = listCacheHas$1;
|
|
282
|
-
var assocIndexOf = _assocIndexOf;
|
|
283
|
-
function listCacheSet$1(key, value) {
|
|
284
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
285
|
-
if (index < 0) {
|
|
286
|
-
++this.size;
|
|
287
|
-
data.push([key, value]);
|
|
288
|
-
} else {
|
|
289
|
-
data[index][1] = value;
|
|
290
|
-
}
|
|
291
|
-
return this;
|
|
292
|
-
}
|
|
293
|
-
var _listCacheSet = listCacheSet$1;
|
|
294
|
-
var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet;
|
|
295
|
-
function ListCache$1(entries) {
|
|
296
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
297
|
-
this.clear();
|
|
298
|
-
while (++index < length) {
|
|
299
|
-
var entry = entries[index];
|
|
300
|
-
this.set(entry[0], entry[1]);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
ListCache$1.prototype.clear = listCacheClear;
|
|
304
|
-
ListCache$1.prototype["delete"] = listCacheDelete;
|
|
305
|
-
ListCache$1.prototype.get = listCacheGet;
|
|
306
|
-
ListCache$1.prototype.has = listCacheHas;
|
|
307
|
-
ListCache$1.prototype.set = listCacheSet;
|
|
308
|
-
var _ListCache = ListCache$1;
|
|
309
|
-
var getNative = _getNative, root = _root;
|
|
310
|
-
var Map$1 = getNative(root, "Map");
|
|
311
|
-
var _Map = Map$1;
|
|
312
|
-
var Hash = _Hash, ListCache = _ListCache, Map = _Map;
|
|
313
|
-
function mapCacheClear$1() {
|
|
314
|
-
this.size = 0;
|
|
315
|
-
this.__data__ = {
|
|
316
|
-
"hash": new Hash(),
|
|
317
|
-
"map": new (Map || ListCache)(),
|
|
318
|
-
"string": new Hash()
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
var _mapCacheClear = mapCacheClear$1;
|
|
322
|
-
function isKeyable$1(value) {
|
|
323
|
-
var type = typeof value;
|
|
324
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
325
|
-
}
|
|
326
|
-
var _isKeyable = isKeyable$1;
|
|
327
|
-
var isKeyable = _isKeyable;
|
|
328
|
-
function getMapData$4(map, key) {
|
|
329
|
-
var data = map.__data__;
|
|
330
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
331
|
-
}
|
|
332
|
-
var _getMapData = getMapData$4;
|
|
333
|
-
var getMapData$3 = _getMapData;
|
|
334
|
-
function mapCacheDelete$1(key) {
|
|
335
|
-
var result = getMapData$3(this, key)["delete"](key);
|
|
336
|
-
this.size -= result ? 1 : 0;
|
|
337
|
-
return result;
|
|
338
|
-
}
|
|
339
|
-
var _mapCacheDelete = mapCacheDelete$1;
|
|
340
|
-
var getMapData$2 = _getMapData;
|
|
341
|
-
function mapCacheGet$1(key) {
|
|
342
|
-
return getMapData$2(this, key).get(key);
|
|
343
|
-
}
|
|
344
|
-
var _mapCacheGet = mapCacheGet$1;
|
|
345
|
-
var getMapData$1 = _getMapData;
|
|
346
|
-
function mapCacheHas$1(key) {
|
|
347
|
-
return getMapData$1(this, key).has(key);
|
|
348
|
-
}
|
|
349
|
-
var _mapCacheHas = mapCacheHas$1;
|
|
350
|
-
var getMapData = _getMapData;
|
|
351
|
-
function mapCacheSet$1(key, value) {
|
|
352
|
-
var data = getMapData(this, key), size = data.size;
|
|
353
|
-
data.set(key, value);
|
|
354
|
-
this.size += data.size == size ? 0 : 1;
|
|
355
|
-
return this;
|
|
356
|
-
}
|
|
357
|
-
var _mapCacheSet = mapCacheSet$1;
|
|
358
|
-
var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet;
|
|
359
|
-
function MapCache$1(entries) {
|
|
360
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
361
|
-
this.clear();
|
|
362
|
-
while (++index < length) {
|
|
363
|
-
var entry = entries[index];
|
|
364
|
-
this.set(entry[0], entry[1]);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
MapCache$1.prototype.clear = mapCacheClear;
|
|
368
|
-
MapCache$1.prototype["delete"] = mapCacheDelete;
|
|
369
|
-
MapCache$1.prototype.get = mapCacheGet;
|
|
370
|
-
MapCache$1.prototype.has = mapCacheHas;
|
|
371
|
-
MapCache$1.prototype.set = mapCacheSet;
|
|
372
|
-
var _MapCache = MapCache$1;
|
|
373
|
-
var MapCache = _MapCache;
|
|
374
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
375
|
-
function memoize$1(func, resolver) {
|
|
376
|
-
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
377
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
378
|
-
}
|
|
379
|
-
var memoized = function() {
|
|
380
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
381
|
-
if (cache.has(key)) {
|
|
382
|
-
return cache.get(key);
|
|
383
|
-
}
|
|
384
|
-
var result = func.apply(this, args);
|
|
385
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
386
|
-
return result;
|
|
387
|
-
};
|
|
388
|
-
memoized.cache = new (memoize$1.Cache || MapCache)();
|
|
389
|
-
return memoized;
|
|
390
|
-
}
|
|
391
|
-
memoize$1.Cache = MapCache;
|
|
392
|
-
var memoize_1 = memoize$1;
|
|
393
|
-
var memoize = memoize_1;
|
|
394
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
395
|
-
function memoizeCapped$1(func) {
|
|
396
|
-
var result = memoize(func, function(key) {
|
|
397
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
398
|
-
cache.clear();
|
|
399
|
-
}
|
|
400
|
-
return key;
|
|
401
|
-
});
|
|
402
|
-
var cache = result.cache;
|
|
403
|
-
return result;
|
|
404
|
-
}
|
|
405
|
-
var _memoizeCapped = memoizeCapped$1;
|
|
406
|
-
var memoizeCapped = _memoizeCapped;
|
|
407
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
408
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
409
|
-
var stringToPath$1 = memoizeCapped(function(string) {
|
|
410
|
-
var result = [];
|
|
411
|
-
if (string.charCodeAt(0) === 46) {
|
|
412
|
-
result.push("");
|
|
413
|
-
}
|
|
414
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
415
|
-
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
416
|
-
});
|
|
417
|
-
return result;
|
|
418
|
-
});
|
|
419
|
-
var _stringToPath = stringToPath$1;
|
|
420
|
-
function arrayMap$1(array, iteratee) {
|
|
421
|
-
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
422
|
-
while (++index < length) {
|
|
423
|
-
result[index] = iteratee(array[index], index, array);
|
|
424
|
-
}
|
|
425
|
-
return result;
|
|
426
|
-
}
|
|
427
|
-
var _arrayMap = arrayMap$1;
|
|
428
|
-
var Symbol$1 = _Symbol, arrayMap = _arrayMap, isArray$1 = isArray_1, isSymbol$1 = isSymbol_1;
|
|
429
|
-
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
430
|
-
function baseToString$1(value) {
|
|
431
|
-
if (typeof value == "string") {
|
|
432
|
-
return value;
|
|
433
|
-
}
|
|
434
|
-
if (isArray$1(value)) {
|
|
435
|
-
return arrayMap(value, baseToString$1) + "";
|
|
436
|
-
}
|
|
437
|
-
if (isSymbol$1(value)) {
|
|
438
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
439
|
-
}
|
|
440
|
-
var result = value + "";
|
|
441
|
-
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
442
|
-
}
|
|
443
|
-
var _baseToString = baseToString$1;
|
|
444
|
-
var baseToString = _baseToString;
|
|
445
|
-
function toString$1(value) {
|
|
446
|
-
return value == null ? "" : baseToString(value);
|
|
447
|
-
}
|
|
448
|
-
var toString_1 = toString$1;
|
|
449
|
-
var isArray = isArray_1, isKey = _isKey, stringToPath = _stringToPath, toString = toString_1;
|
|
450
|
-
function castPath$1(value, object) {
|
|
451
|
-
if (isArray(value)) {
|
|
452
|
-
return value;
|
|
453
|
-
}
|
|
454
|
-
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
455
|
-
}
|
|
456
|
-
var _castPath = castPath$1;
|
|
457
|
-
var isSymbol = isSymbol_1;
|
|
458
|
-
function toKey$1(value) {
|
|
459
|
-
if (typeof value == "string" || isSymbol(value)) {
|
|
460
|
-
return value;
|
|
461
|
-
}
|
|
462
|
-
var result = value + "";
|
|
463
|
-
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
464
|
-
}
|
|
465
|
-
var _toKey = toKey$1;
|
|
466
|
-
var castPath = _castPath, toKey = _toKey;
|
|
467
|
-
function baseGet$1(object, path) {
|
|
468
|
-
path = castPath(path, object);
|
|
469
|
-
var index = 0, length = path.length;
|
|
470
|
-
while (object != null && index < length) {
|
|
471
|
-
object = object[toKey(path[index++])];
|
|
472
|
-
}
|
|
473
|
-
return index && index == length ? object : void 0;
|
|
474
|
-
}
|
|
475
|
-
var _baseGet = baseGet$1;
|
|
476
|
-
var baseGet = _baseGet;
|
|
477
|
-
function get(object, path, defaultValue) {
|
|
478
|
-
var result = object == null ? void 0 : baseGet(object, path);
|
|
479
|
-
return result === void 0 ? defaultValue : result;
|
|
480
|
-
}
|
|
481
|
-
var get_1 = get;
|
|
482
|
-
const get$1 = /* @__PURE__ */ getDefaultExportFromCjs(get_1);
|
|
483
|
-
var __assign = function() {
|
|
484
|
-
__assign = Object.assign || function __assign2(t) {
|
|
485
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
486
|
-
s = arguments[i];
|
|
487
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
488
|
-
}
|
|
489
|
-
return t;
|
|
490
|
-
};
|
|
491
|
-
return __assign.apply(this, arguments);
|
|
492
|
-
};
|
|
493
|
-
function __rest(s, e) {
|
|
494
|
-
var t = {};
|
|
495
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
496
|
-
t[p] = s[p];
|
|
497
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
498
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
499
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
500
|
-
t[p[i]] = s[p[i]];
|
|
501
|
-
}
|
|
502
|
-
return t;
|
|
503
|
-
}
|
|
504
|
-
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
505
|
-
var e = new Error(message);
|
|
506
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
507
|
-
};
|
|
508
|
-
var reactIs$1 = { exports: {} };
|
|
509
|
-
var reactIs_production_min = {};
|
|
510
|
-
/** @license React v16.13.1
|
|
511
|
-
* react-is.production.min.js
|
|
512
|
-
*
|
|
513
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
514
|
-
*
|
|
515
|
-
* This source code is licensed under the MIT license found in the
|
|
516
|
-
* LICENSE file in the root directory of this source tree.
|
|
517
|
-
*/
|
|
518
|
-
var hasRequiredReactIs_production_min;
|
|
519
|
-
function requireReactIs_production_min() {
|
|
520
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
521
|
-
hasRequiredReactIs_production_min = 1;
|
|
522
|
-
var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
523
|
-
function z(a) {
|
|
524
|
-
if ("object" === typeof a && null !== a) {
|
|
525
|
-
var u = a.$$typeof;
|
|
526
|
-
switch (u) {
|
|
527
|
-
case c:
|
|
528
|
-
switch (a = a.type, a) {
|
|
529
|
-
case l:
|
|
530
|
-
case m:
|
|
531
|
-
case e:
|
|
532
|
-
case g:
|
|
533
|
-
case f:
|
|
534
|
-
case p:
|
|
535
|
-
return a;
|
|
536
|
-
default:
|
|
537
|
-
switch (a = a && a.$$typeof, a) {
|
|
538
|
-
case k:
|
|
539
|
-
case n:
|
|
540
|
-
case t:
|
|
541
|
-
case r:
|
|
542
|
-
case h:
|
|
543
|
-
return a;
|
|
544
|
-
default:
|
|
545
|
-
return u;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
case d:
|
|
549
|
-
return u;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
function A(a) {
|
|
554
|
-
return z(a) === m;
|
|
555
|
-
}
|
|
556
|
-
reactIs_production_min.AsyncMode = l;
|
|
557
|
-
reactIs_production_min.ConcurrentMode = m;
|
|
558
|
-
reactIs_production_min.ContextConsumer = k;
|
|
559
|
-
reactIs_production_min.ContextProvider = h;
|
|
560
|
-
reactIs_production_min.Element = c;
|
|
561
|
-
reactIs_production_min.ForwardRef = n;
|
|
562
|
-
reactIs_production_min.Fragment = e;
|
|
563
|
-
reactIs_production_min.Lazy = t;
|
|
564
|
-
reactIs_production_min.Memo = r;
|
|
565
|
-
reactIs_production_min.Portal = d;
|
|
566
|
-
reactIs_production_min.Profiler = g;
|
|
567
|
-
reactIs_production_min.StrictMode = f;
|
|
568
|
-
reactIs_production_min.Suspense = p;
|
|
569
|
-
reactIs_production_min.isAsyncMode = function(a) {
|
|
570
|
-
return A(a) || z(a) === l;
|
|
571
|
-
};
|
|
572
|
-
reactIs_production_min.isConcurrentMode = A;
|
|
573
|
-
reactIs_production_min.isContextConsumer = function(a) {
|
|
574
|
-
return z(a) === k;
|
|
575
|
-
};
|
|
576
|
-
reactIs_production_min.isContextProvider = function(a) {
|
|
577
|
-
return z(a) === h;
|
|
578
|
-
};
|
|
579
|
-
reactIs_production_min.isElement = function(a) {
|
|
580
|
-
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
581
|
-
};
|
|
582
|
-
reactIs_production_min.isForwardRef = function(a) {
|
|
583
|
-
return z(a) === n;
|
|
584
|
-
};
|
|
585
|
-
reactIs_production_min.isFragment = function(a) {
|
|
586
|
-
return z(a) === e;
|
|
587
|
-
};
|
|
588
|
-
reactIs_production_min.isLazy = function(a) {
|
|
589
|
-
return z(a) === t;
|
|
590
|
-
};
|
|
591
|
-
reactIs_production_min.isMemo = function(a) {
|
|
592
|
-
return z(a) === r;
|
|
593
|
-
};
|
|
594
|
-
reactIs_production_min.isPortal = function(a) {
|
|
595
|
-
return z(a) === d;
|
|
596
|
-
};
|
|
597
|
-
reactIs_production_min.isProfiler = function(a) {
|
|
598
|
-
return z(a) === g;
|
|
599
|
-
};
|
|
600
|
-
reactIs_production_min.isStrictMode = function(a) {
|
|
601
|
-
return z(a) === f;
|
|
602
|
-
};
|
|
603
|
-
reactIs_production_min.isSuspense = function(a) {
|
|
604
|
-
return z(a) === p;
|
|
605
|
-
};
|
|
606
|
-
reactIs_production_min.isValidElementType = function(a) {
|
|
607
|
-
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
608
|
-
};
|
|
609
|
-
reactIs_production_min.typeOf = z;
|
|
610
|
-
return reactIs_production_min;
|
|
611
|
-
}
|
|
612
|
-
var reactIs_development = {};
|
|
613
|
-
/** @license React v16.13.1
|
|
614
|
-
* react-is.development.js
|
|
615
|
-
*
|
|
616
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
617
|
-
*
|
|
618
|
-
* This source code is licensed under the MIT license found in the
|
|
619
|
-
* LICENSE file in the root directory of this source tree.
|
|
620
|
-
*/
|
|
621
|
-
var hasRequiredReactIs_development;
|
|
622
|
-
function requireReactIs_development() {
|
|
623
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
624
|
-
hasRequiredReactIs_development = 1;
|
|
625
|
-
if (process.env.NODE_ENV !== "production") {
|
|
626
|
-
(function() {
|
|
627
|
-
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
628
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
629
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
630
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
631
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
632
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
633
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
634
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
635
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
636
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
637
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
638
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
639
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
640
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
641
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
642
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
643
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
644
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
645
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
646
|
-
function isValidElementType(type) {
|
|
647
|
-
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
648
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
649
|
-
}
|
|
650
|
-
function typeOf(object) {
|
|
651
|
-
if (typeof object === "object" && object !== null) {
|
|
652
|
-
var $$typeof = object.$$typeof;
|
|
653
|
-
switch ($$typeof) {
|
|
654
|
-
case REACT_ELEMENT_TYPE:
|
|
655
|
-
var type = object.type;
|
|
656
|
-
switch (type) {
|
|
657
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
658
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
659
|
-
case REACT_FRAGMENT_TYPE:
|
|
660
|
-
case REACT_PROFILER_TYPE:
|
|
661
|
-
case REACT_STRICT_MODE_TYPE:
|
|
662
|
-
case REACT_SUSPENSE_TYPE:
|
|
663
|
-
return type;
|
|
664
|
-
default:
|
|
665
|
-
var $$typeofType = type && type.$$typeof;
|
|
666
|
-
switch ($$typeofType) {
|
|
667
|
-
case REACT_CONTEXT_TYPE:
|
|
668
|
-
case REACT_FORWARD_REF_TYPE:
|
|
669
|
-
case REACT_LAZY_TYPE:
|
|
670
|
-
case REACT_MEMO_TYPE:
|
|
671
|
-
case REACT_PROVIDER_TYPE:
|
|
672
|
-
return $$typeofType;
|
|
673
|
-
default:
|
|
674
|
-
return $$typeof;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
case REACT_PORTAL_TYPE:
|
|
678
|
-
return $$typeof;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
return void 0;
|
|
682
|
-
}
|
|
683
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
684
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
685
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
686
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
687
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
688
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
689
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
690
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
691
|
-
var Memo = REACT_MEMO_TYPE;
|
|
692
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
693
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
694
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
695
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
696
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
697
|
-
function isAsyncMode(object) {
|
|
698
|
-
{
|
|
699
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
700
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
701
|
-
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
705
|
-
}
|
|
706
|
-
function isConcurrentMode(object) {
|
|
707
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
708
|
-
}
|
|
709
|
-
function isContextConsumer(object) {
|
|
710
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
711
|
-
}
|
|
712
|
-
function isContextProvider(object) {
|
|
713
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
714
|
-
}
|
|
715
|
-
function isElement(object) {
|
|
716
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
717
|
-
}
|
|
718
|
-
function isForwardRef(object) {
|
|
719
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
720
|
-
}
|
|
721
|
-
function isFragment(object) {
|
|
722
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
723
|
-
}
|
|
724
|
-
function isLazy(object) {
|
|
725
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
726
|
-
}
|
|
727
|
-
function isMemo(object) {
|
|
728
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
729
|
-
}
|
|
730
|
-
function isPortal(object) {
|
|
731
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
732
|
-
}
|
|
733
|
-
function isProfiler(object) {
|
|
734
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
735
|
-
}
|
|
736
|
-
function isStrictMode(object) {
|
|
737
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
738
|
-
}
|
|
739
|
-
function isSuspense(object) {
|
|
740
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
741
|
-
}
|
|
742
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
743
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
744
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
745
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
746
|
-
reactIs_development.Element = Element;
|
|
747
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
748
|
-
reactIs_development.Fragment = Fragment;
|
|
749
|
-
reactIs_development.Lazy = Lazy;
|
|
750
|
-
reactIs_development.Memo = Memo;
|
|
751
|
-
reactIs_development.Portal = Portal;
|
|
752
|
-
reactIs_development.Profiler = Profiler;
|
|
753
|
-
reactIs_development.StrictMode = StrictMode;
|
|
754
|
-
reactIs_development.Suspense = Suspense;
|
|
755
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
756
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
757
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
758
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
759
|
-
reactIs_development.isElement = isElement;
|
|
760
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
761
|
-
reactIs_development.isFragment = isFragment;
|
|
762
|
-
reactIs_development.isLazy = isLazy;
|
|
763
|
-
reactIs_development.isMemo = isMemo;
|
|
764
|
-
reactIs_development.isPortal = isPortal;
|
|
765
|
-
reactIs_development.isProfiler = isProfiler;
|
|
766
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
767
|
-
reactIs_development.isSuspense = isSuspense;
|
|
768
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
769
|
-
reactIs_development.typeOf = typeOf;
|
|
770
|
-
})();
|
|
771
|
-
}
|
|
772
|
-
return reactIs_development;
|
|
773
|
-
}
|
|
774
|
-
if (process.env.NODE_ENV === "production") {
|
|
775
|
-
reactIs$1.exports = requireReactIs_production_min();
|
|
776
|
-
} else {
|
|
777
|
-
reactIs$1.exports = requireReactIs_development();
|
|
778
|
-
}
|
|
779
|
-
var reactIsExports = reactIs$1.exports;
|
|
780
|
-
var reactIs = reactIsExports;
|
|
781
|
-
var FORWARD_REF_STATICS = {
|
|
782
|
-
"$$typeof": true,
|
|
783
|
-
render: true,
|
|
784
|
-
defaultProps: true,
|
|
785
|
-
displayName: true,
|
|
786
|
-
propTypes: true
|
|
787
|
-
};
|
|
788
|
-
var MEMO_STATICS = {
|
|
789
|
-
"$$typeof": true,
|
|
790
|
-
compare: true,
|
|
791
|
-
defaultProps: true,
|
|
792
|
-
displayName: true,
|
|
793
|
-
propTypes: true,
|
|
794
|
-
type: true
|
|
795
|
-
};
|
|
796
|
-
var TYPE_STATICS = {};
|
|
797
|
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
798
|
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
799
|
-
function invariant(condition, message, Err) {
|
|
800
|
-
if (Err === void 0) {
|
|
801
|
-
Err = Error;
|
|
802
|
-
}
|
|
803
|
-
if (!condition) {
|
|
804
|
-
throw new Err(message);
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
var defaultErrorHandler = function(error) {
|
|
808
|
-
if (process.env.NODE_ENV !== "production") {
|
|
809
|
-
console.error(error);
|
|
810
|
-
}
|
|
811
|
-
};
|
|
812
|
-
var defaultWarnHandler = function(warning) {
|
|
813
|
-
if (process.env.NODE_ENV !== "production") {
|
|
814
|
-
console.warn(warning);
|
|
815
|
-
}
|
|
816
|
-
};
|
|
817
|
-
var DEFAULT_INTL_CONFIG = {
|
|
818
|
-
formats: {},
|
|
819
|
-
messages: {},
|
|
820
|
-
timeZone: void 0,
|
|
821
|
-
defaultLocale: "en",
|
|
822
|
-
defaultFormats: {},
|
|
823
|
-
fallbackOnEmptyString: true,
|
|
824
|
-
onError: defaultErrorHandler,
|
|
825
|
-
onWarn: defaultWarnHandler
|
|
826
|
-
};
|
|
827
|
-
function invariantIntlContext(intl) {
|
|
828
|
-
invariant(intl, "[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.");
|
|
829
|
-
}
|
|
830
|
-
__assign(__assign({}, DEFAULT_INTL_CONFIG), { textComponent: React__namespace.Fragment });
|
|
831
|
-
var IntlContext = typeof window !== "undefined" && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__ ? window.__REACT_INTL_CONTEXT__ || (window.__REACT_INTL_CONTEXT__ = React__namespace.createContext(null)) : React__namespace.createContext(null);
|
|
832
|
-
IntlContext.Consumer;
|
|
833
|
-
IntlContext.Provider;
|
|
834
|
-
var Context = IntlContext;
|
|
835
|
-
function useIntl() {
|
|
836
|
-
var intl = React__namespace.useContext(Context);
|
|
837
|
-
invariantIntlContext(intl);
|
|
838
|
-
return intl;
|
|
839
|
-
}
|
|
840
|
-
var DisplayName;
|
|
841
|
-
(function(DisplayName2) {
|
|
842
|
-
DisplayName2["formatDate"] = "FormattedDate";
|
|
843
|
-
DisplayName2["formatTime"] = "FormattedTime";
|
|
844
|
-
DisplayName2["formatNumber"] = "FormattedNumber";
|
|
845
|
-
DisplayName2["formatList"] = "FormattedList";
|
|
846
|
-
DisplayName2["formatDisplayName"] = "FormattedDisplayName";
|
|
847
|
-
})(DisplayName || (DisplayName = {}));
|
|
848
|
-
var DisplayNameParts;
|
|
849
|
-
(function(DisplayNameParts2) {
|
|
850
|
-
DisplayNameParts2["formatDate"] = "FormattedDateParts";
|
|
851
|
-
DisplayNameParts2["formatTime"] = "FormattedTimeParts";
|
|
852
|
-
DisplayNameParts2["formatNumber"] = "FormattedNumberParts";
|
|
853
|
-
DisplayNameParts2["formatList"] = "FormattedListParts";
|
|
854
|
-
})(DisplayNameParts || (DisplayNameParts = {}));
|
|
855
|
-
function createFormattedDateTimePartsComponent(name) {
|
|
856
|
-
var ComponentParts = function(props) {
|
|
857
|
-
var intl = useIntl();
|
|
858
|
-
var value = props.value, children = props.children, formatProps = __rest(props, ["value", "children"]);
|
|
859
|
-
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
860
|
-
var formattedParts = name === "formatDate" ? intl.formatDateToParts(date, formatProps) : intl.formatTimeToParts(date, formatProps);
|
|
861
|
-
return children(formattedParts);
|
|
862
|
-
};
|
|
863
|
-
ComponentParts.displayName = DisplayNameParts[name];
|
|
864
|
-
return ComponentParts;
|
|
865
|
-
}
|
|
866
|
-
function createFormattedComponent(name) {
|
|
867
|
-
var Component = function(props) {
|
|
868
|
-
var intl = useIntl();
|
|
869
|
-
var value = props.value, children = props.children, formatProps = __rest(
|
|
870
|
-
props,
|
|
871
|
-
["value", "children"]
|
|
872
|
-
);
|
|
873
|
-
var formattedValue = intl[name](value, formatProps);
|
|
874
|
-
if (typeof children === "function") {
|
|
875
|
-
return children(formattedValue);
|
|
876
|
-
}
|
|
877
|
-
var Text = intl.textComponent || React__namespace.Fragment;
|
|
878
|
-
return React__namespace.createElement(Text, null, formattedValue);
|
|
879
|
-
};
|
|
880
|
-
Component.displayName = DisplayName[name];
|
|
881
|
-
return Component;
|
|
882
|
-
}
|
|
883
|
-
createFormattedComponent("formatDate");
|
|
884
|
-
createFormattedComponent("formatTime");
|
|
885
|
-
createFormattedComponent("formatNumber");
|
|
886
|
-
createFormattedComponent("formatList");
|
|
887
|
-
createFormattedComponent("formatDisplayName");
|
|
888
|
-
createFormattedDateTimePartsComponent("formatDate");
|
|
889
|
-
createFormattedDateTimePartsComponent("formatTime");
|
|
890
|
-
const CompositeInput = (props) => {
|
|
891
|
-
const {
|
|
892
|
-
attribute,
|
|
893
|
-
name,
|
|
894
|
-
value,
|
|
895
|
-
onChange,
|
|
896
|
-
disabled,
|
|
897
|
-
required,
|
|
898
|
-
error,
|
|
899
|
-
description,
|
|
900
|
-
labelAction,
|
|
901
|
-
label,
|
|
902
|
-
intlLabel
|
|
903
|
-
} = props;
|
|
904
|
-
const { formatMessage } = useIntl();
|
|
905
|
-
const { form } = admin.unstable_useContentManagerContext();
|
|
906
|
-
const { values } = form;
|
|
907
|
-
const [localValue, setLocalValue] = React__namespace.default.useState(value || "");
|
|
908
|
-
const lastGeneratedVal = React__namespace.default.useRef(value || "");
|
|
909
|
-
React__namespace.default.useEffect(() => {
|
|
910
|
-
const validValue = value || "";
|
|
911
|
-
setLocalValue(validValue);
|
|
912
|
-
lastGeneratedVal.current = validValue;
|
|
913
|
-
}, [value]);
|
|
914
|
-
const fieldsConfig = attribute?.options?.fields || "";
|
|
915
|
-
const separator = attribute?.options?.separator || " - ";
|
|
916
|
-
const editable = attribute?.options?.editable !== false;
|
|
917
|
-
const autoGenerate = attribute?.options?.autoGenerate === true;
|
|
918
|
-
const fields = React__namespace.default.useMemo(() => {
|
|
919
|
-
if (typeof fieldsConfig === "string") {
|
|
920
|
-
return fieldsConfig.split("\n").map((f) => f.trim()).filter(Boolean);
|
|
921
|
-
}
|
|
922
|
-
return [];
|
|
923
|
-
}, [fieldsConfig]);
|
|
924
|
-
const handleChange = (e) => {
|
|
925
|
-
const newValue = e.target.value;
|
|
926
|
-
setLocalValue(newValue);
|
|
927
|
-
lastGeneratedVal.current = newValue;
|
|
928
|
-
if (onChange) {
|
|
929
|
-
onChange({ target: { name, value: newValue, type: "text" } });
|
|
930
|
-
}
|
|
931
|
-
};
|
|
932
|
-
const formatFieldValue = React__namespace.default.useCallback((val) => {
|
|
933
|
-
if (val === null || val === void 0) return "";
|
|
934
|
-
if (val instanceof Date) {
|
|
935
|
-
return val.toLocaleTimeString([], {
|
|
936
|
-
hour: "2-digit",
|
|
937
|
-
minute: "2-digit",
|
|
938
|
-
hour12: false
|
|
939
|
-
});
|
|
940
|
-
}
|
|
941
|
-
const stringVal = String(val);
|
|
942
|
-
const timeRegex = /^(\d{2}):(\d{2}):(\d{2})(\.\d{3})?$/;
|
|
943
|
-
const match = stringVal.match(timeRegex);
|
|
944
|
-
if (match) {
|
|
945
|
-
return `${match[1]}:${match[2]}`;
|
|
946
|
-
}
|
|
947
|
-
return stringVal;
|
|
948
|
-
}, []);
|
|
949
|
-
const handleGenerate = React__namespace.default.useCallback(() => {
|
|
950
|
-
const parts = name.split(".");
|
|
951
|
-
parts.pop();
|
|
952
|
-
const parentPath = parts.join(".");
|
|
953
|
-
const generatedParts = [];
|
|
954
|
-
fields.forEach((fieldName) => {
|
|
955
|
-
const fullPath = parentPath ? `${parentPath}.${fieldName}` : fieldName;
|
|
956
|
-
let rawValue = get$1(values, fullPath);
|
|
957
|
-
if (rawValue !== null && rawValue !== void 0) {
|
|
958
|
-
let stringValue = "";
|
|
959
|
-
if (typeof rawValue === "object" && !(rawValue instanceof Date)) {
|
|
960
|
-
if (rawValue.name) stringValue = String(rawValue.name);
|
|
961
|
-
else if (rawValue.title) stringValue = String(rawValue.title);
|
|
962
|
-
else if (rawValue.label) stringValue = String(rawValue.label);
|
|
963
|
-
} else {
|
|
964
|
-
stringValue = formatFieldValue(rawValue);
|
|
965
|
-
}
|
|
966
|
-
if (stringValue) {
|
|
967
|
-
generatedParts.push(stringValue);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
});
|
|
971
|
-
const cleanSeparator = separator.trim();
|
|
972
|
-
const result = generatedParts.join(` ${cleanSeparator} `).trim();
|
|
973
|
-
if (result !== lastGeneratedVal.current) {
|
|
974
|
-
setLocalValue(result);
|
|
975
|
-
lastGeneratedVal.current = result;
|
|
976
|
-
if (onChange) {
|
|
977
|
-
onChange({ target: { name, value: result, type: "text" } });
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
}, [fields, separator, onChange, name, values, formatFieldValue]);
|
|
981
|
-
const watchedValues = React__namespace.default.useMemo(() => {
|
|
982
|
-
const parts = name.split(".");
|
|
983
|
-
parts.pop();
|
|
984
|
-
const parentPath = parts.join(".");
|
|
985
|
-
return fields.map((fieldName) => {
|
|
986
|
-
const fullPath = parentPath ? `${parentPath}.${fieldName}` : fieldName;
|
|
987
|
-
return get$1(values, fullPath);
|
|
988
|
-
});
|
|
989
|
-
}, [fields, name, values]);
|
|
990
|
-
React__namespace.default.useEffect(() => {
|
|
991
|
-
if (!autoGenerate || fields.length === 0) return;
|
|
992
|
-
const timeoutId = setTimeout(() => {
|
|
993
|
-
handleGenerate();
|
|
994
|
-
}, 300);
|
|
995
|
-
return () => clearTimeout(timeoutId);
|
|
996
|
-
}, [autoGenerate, fields, handleGenerate, watchedValues, name]);
|
|
997
|
-
if (!props) {
|
|
998
|
-
return null;
|
|
999
|
-
}
|
|
1000
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1001
|
-
designSystem.Field.Root,
|
|
1002
|
-
{
|
|
1003
|
-
name,
|
|
1004
|
-
id: name,
|
|
1005
|
-
error,
|
|
1006
|
-
hint: description?.id ? formatMessage(description) : description,
|
|
1007
|
-
required,
|
|
1008
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
1009
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label || intlLabel?.defaultMessage || name }) }),
|
|
1010
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative" }, children: [
|
|
1011
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1012
|
-
designSystem.Field.Input,
|
|
1013
|
-
{
|
|
1014
|
-
type: "text",
|
|
1015
|
-
value: localValue,
|
|
1016
|
-
onChange: handleChange,
|
|
1017
|
-
disabled: disabled || !editable,
|
|
1018
|
-
placeholder: autoGenerate ? "Auto-generated from fields" : "Click button to generate",
|
|
1019
|
-
style: { paddingRight: "40px" }
|
|
1020
|
-
}
|
|
1021
|
-
),
|
|
1022
|
-
!autoGenerate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1023
|
-
"div",
|
|
1024
|
-
{
|
|
1025
|
-
style: {
|
|
1026
|
-
position: "absolute",
|
|
1027
|
-
right: "8px",
|
|
1028
|
-
top: "50%",
|
|
1029
|
-
transform: "translateY(-50%)",
|
|
1030
|
-
display: "flex",
|
|
1031
|
-
alignItems: "center",
|
|
1032
|
-
justifyContent: "center"
|
|
1033
|
-
},
|
|
1034
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1035
|
-
designSystem.Button,
|
|
1036
|
-
{
|
|
1037
|
-
type: "button",
|
|
1038
|
-
onClick: handleGenerate,
|
|
1039
|
-
disabled: disabled || fields.length === 0,
|
|
1040
|
-
variant: "tertiary",
|
|
1041
|
-
"aria-label": "Generate composite value",
|
|
1042
|
-
style: {
|
|
1043
|
-
width: "28px",
|
|
1044
|
-
height: "28px",
|
|
1045
|
-
padding: "0",
|
|
1046
|
-
minWidth: "auto",
|
|
1047
|
-
border: "none",
|
|
1048
|
-
background: "transparent",
|
|
1049
|
-
display: "flex",
|
|
1050
|
-
alignItems: "center",
|
|
1051
|
-
justifyContent: "center",
|
|
1052
|
-
color: "#8e8ea9"
|
|
1053
|
-
},
|
|
1054
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Play, { style: { width: "14px", height: "14px" } })
|
|
1055
|
-
}
|
|
1056
|
-
)
|
|
1057
|
-
}
|
|
1058
|
-
)
|
|
1059
|
-
] }),
|
|
1060
|
-
fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: [
|
|
1061
|
-
"Combines: ",
|
|
1062
|
-
fields.join(", "),
|
|
1063
|
-
autoGenerate && " (auto-generated)",
|
|
1064
|
-
!editable && " (read-only)"
|
|
1065
|
-
] }) }),
|
|
1066
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
|
|
1067
|
-
] })
|
|
1068
|
-
}
|
|
1069
|
-
);
|
|
1070
|
-
};
|
|
1071
|
-
exports.default = CompositeInput;
|