@devx-labs/strapi-preview 1.0.4 → 1.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.
@@ -0,0 +1,1412 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import t, { createElement, useState, useEffect } from "react";
3
+ import { Modal, Typography, Flex, Box, Button } from "@strapi/design-system";
4
+ import { unstable_useContentManagerContext } from "@strapi/content-manager/strapi-admin";
5
+ import { useForm, useFetchClient } from "@strapi/strapi/admin";
6
+ import { ExternalLink } from "@strapi/icons";
7
+ function memoize(fn) {
8
+ var cache = /* @__PURE__ */ Object.create(null);
9
+ return function(arg) {
10
+ if (cache[arg] === void 0) cache[arg] = fn(arg);
11
+ return cache[arg];
12
+ };
13
+ }
14
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
15
+ var isPropValid = /* @__PURE__ */ memoize(
16
+ function(prop) {
17
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
18
+ }
19
+ /* Z+1 */
20
+ );
21
+ var MS = "-ms-";
22
+ var MOZ = "-moz-";
23
+ var WEBKIT = "-webkit-";
24
+ var COMMENT = "comm";
25
+ var RULESET = "rule";
26
+ var DECLARATION = "decl";
27
+ var IMPORT = "@import";
28
+ var NAMESPACE = "@namespace";
29
+ var KEYFRAMES = "@keyframes";
30
+ var LAYER = "@layer";
31
+ var abs = Math.abs;
32
+ var from = String.fromCharCode;
33
+ var assign = Object.assign;
34
+ function hash(value, length2) {
35
+ return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
36
+ }
37
+ function trim(value) {
38
+ return value.trim();
39
+ }
40
+ function match(value, pattern) {
41
+ return (value = pattern.exec(value)) ? value[0] : value;
42
+ }
43
+ function replace(value, pattern, replacement) {
44
+ return value.replace(pattern, replacement);
45
+ }
46
+ function indexof(value, search, position2) {
47
+ return value.indexOf(search, position2);
48
+ }
49
+ function charat(value, index2) {
50
+ return value.charCodeAt(index2) | 0;
51
+ }
52
+ function substr(value, begin, end) {
53
+ return value.slice(begin, end);
54
+ }
55
+ function strlen(value) {
56
+ return value.length;
57
+ }
58
+ function sizeof(value) {
59
+ return value.length;
60
+ }
61
+ function append(value, array) {
62
+ return array.push(value), value;
63
+ }
64
+ function combine(array, callback) {
65
+ return array.map(callback).join("");
66
+ }
67
+ function filter(array, pattern) {
68
+ return array.filter(function(value) {
69
+ return !match(value, pattern);
70
+ });
71
+ }
72
+ var line = 1;
73
+ var column = 1;
74
+ var length = 0;
75
+ var position = 0;
76
+ var character = 0;
77
+ var characters = "";
78
+ function node(value, root, parent, type, props, children, length2, siblings) {
79
+ return { value, root, parent, type, props, children, line, column, length: length2, return: "", siblings };
80
+ }
81
+ function copy(root, props) {
82
+ return assign(node("", null, null, "", null, null, 0, root.siblings), root, { length: -root.length }, props);
83
+ }
84
+ function lift(root) {
85
+ while (root.root)
86
+ root = copy(root.root, { children: [root] });
87
+ append(root, root.siblings);
88
+ }
89
+ function char() {
90
+ return character;
91
+ }
92
+ function prev() {
93
+ character = position > 0 ? charat(characters, --position) : 0;
94
+ if (column--, character === 10)
95
+ column = 1, line--;
96
+ return character;
97
+ }
98
+ function next() {
99
+ character = position < length ? charat(characters, position++) : 0;
100
+ if (column++, character === 10)
101
+ column = 1, line++;
102
+ return character;
103
+ }
104
+ function peek() {
105
+ return charat(characters, position);
106
+ }
107
+ function caret() {
108
+ return position;
109
+ }
110
+ function slice(begin, end) {
111
+ return substr(characters, begin, end);
112
+ }
113
+ function token(type) {
114
+ switch (type) {
115
+ case 0:
116
+ case 9:
117
+ case 10:
118
+ case 13:
119
+ case 32:
120
+ return 5;
121
+ case 33:
122
+ case 43:
123
+ case 44:
124
+ case 47:
125
+ case 62:
126
+ case 64:
127
+ case 126:
128
+ case 59:
129
+ case 123:
130
+ case 125:
131
+ return 4;
132
+ case 58:
133
+ return 3;
134
+ case 34:
135
+ case 39:
136
+ case 40:
137
+ case 91:
138
+ return 2;
139
+ case 41:
140
+ case 93:
141
+ return 1;
142
+ }
143
+ return 0;
144
+ }
145
+ function alloc(value) {
146
+ return line = column = 1, length = strlen(characters = value), position = 0, [];
147
+ }
148
+ function dealloc(value) {
149
+ return characters = "", value;
150
+ }
151
+ function delimit(type) {
152
+ return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
153
+ }
154
+ function whitespace(type) {
155
+ while (character = peek())
156
+ if (character < 33)
157
+ next();
158
+ else
159
+ break;
160
+ return token(type) > 2 || token(character) > 3 ? "" : " ";
161
+ }
162
+ function escaping(index2, count) {
163
+ while (--count && next())
164
+ if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
165
+ break;
166
+ return slice(index2, caret() + (count < 6 && peek() == 32 && next() == 32));
167
+ }
168
+ function delimiter(type) {
169
+ while (next())
170
+ switch (character) {
171
+ case type:
172
+ return position;
173
+ case 34:
174
+ case 39:
175
+ if (type !== 34 && type !== 39)
176
+ delimiter(character);
177
+ break;
178
+ case 40:
179
+ if (type === 41)
180
+ delimiter(type);
181
+ break;
182
+ case 92:
183
+ next();
184
+ break;
185
+ }
186
+ return position;
187
+ }
188
+ function commenter(type, index2) {
189
+ while (next())
190
+ if (type + character === 47 + 10)
191
+ break;
192
+ else if (type + character === 42 + 42 && peek() === 47)
193
+ break;
194
+ return "/*" + slice(index2, position - 1) + "*" + from(type === 47 ? type : next());
195
+ }
196
+ function identifier(index2) {
197
+ while (!token(peek()))
198
+ next();
199
+ return slice(index2, position);
200
+ }
201
+ function compile(value) {
202
+ return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
203
+ }
204
+ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
205
+ var index2 = 0;
206
+ var offset = 0;
207
+ var length2 = pseudo;
208
+ var atrule = 0;
209
+ var property = 0;
210
+ var previous = 0;
211
+ var variable = 1;
212
+ var scanning = 1;
213
+ var ampersand = 1;
214
+ var character2 = 0;
215
+ var type = "";
216
+ var props = rules;
217
+ var children = rulesets;
218
+ var reference = rule;
219
+ var characters2 = type;
220
+ while (scanning)
221
+ switch (previous = character2, character2 = next()) {
222
+ case 40:
223
+ if (previous != 108 && charat(characters2, length2 - 1) == 58) {
224
+ if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index2 ? points[index2 - 1] : 0)) != -1)
225
+ ampersand = -1;
226
+ break;
227
+ }
228
+ case 34:
229
+ case 39:
230
+ case 91:
231
+ characters2 += delimit(character2);
232
+ break;
233
+ case 9:
234
+ case 10:
235
+ case 13:
236
+ case 32:
237
+ characters2 += whitespace(previous);
238
+ break;
239
+ case 92:
240
+ characters2 += escaping(caret() - 1, 7);
241
+ continue;
242
+ case 47:
243
+ switch (peek()) {
244
+ case 42:
245
+ case 47:
246
+ append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
247
+ if ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters2) && substr(characters2, -1, void 0) !== " ") characters2 += " ";
248
+ break;
249
+ default:
250
+ characters2 += "/";
251
+ }
252
+ break;
253
+ case 123 * variable:
254
+ points[index2++] = strlen(characters2) * ampersand;
255
+ case 125 * variable:
256
+ case 59:
257
+ case 0:
258
+ switch (character2) {
259
+ case 0:
260
+ case 125:
261
+ scanning = 0;
262
+ case 59 + offset:
263
+ if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
264
+ if (property > 0 && (strlen(characters2) - length2 || variable === 0 && previous === 47))
265
+ append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
266
+ break;
267
+ case 59:
268
+ characters2 += ";";
269
+ default:
270
+ append(reference = ruleset(characters2, root, parent, index2, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
271
+ if (character2 === 123)
272
+ if (offset === 0)
273
+ parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
274
+ else {
275
+ switch (atrule) {
276
+ case 99:
277
+ if (charat(characters2, 3) === 110) break;
278
+ case 108:
279
+ if (charat(characters2, 2) === 97) break;
280
+ default:
281
+ offset = 0;
282
+ case 100:
283
+ case 109:
284
+ case 115:
285
+ }
286
+ if (offset) parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children);
287
+ else parse(characters2, reference, reference, reference, [""], children, 0, points, children);
288
+ }
289
+ }
290
+ index2 = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
291
+ break;
292
+ case 58:
293
+ length2 = 1 + strlen(characters2), property = previous;
294
+ default:
295
+ if (variable < 1) {
296
+ if (character2 == 123)
297
+ --variable;
298
+ else if (character2 == 125 && variable++ == 0 && prev() == 125)
299
+ continue;
300
+ }
301
+ switch (characters2 += from(character2), character2 * variable) {
302
+ case 38:
303
+ ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
304
+ break;
305
+ case 44:
306
+ points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
307
+ break;
308
+ case 64:
309
+ if (peek() === 45)
310
+ characters2 += delimit(next());
311
+ atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
312
+ break;
313
+ case 45:
314
+ if (previous === 45 && strlen(characters2) == 2)
315
+ variable = 0;
316
+ }
317
+ }
318
+ return rulesets;
319
+ }
320
+ function ruleset(value, root, parent, index2, offset, rules, points, type, props, children, length2, siblings) {
321
+ var post = offset - 1;
322
+ var rule = offset === 0 ? rules : [""];
323
+ var size = sizeof(rule);
324
+ for (var i2 = 0, j2 = 0, k2 = 0; i2 < index2; ++i2)
325
+ for (var x2 = 0, y = substr(value, post + 1, post = abs(j2 = points[i2])), z2 = value; x2 < size; ++x2)
326
+ if (z2 = trim(j2 > 0 ? rule[x2] + " " + y : replace(y, /&\f/g, rule[x2])))
327
+ props[k2++] = z2;
328
+ return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2, siblings);
329
+ }
330
+ function comment(value, root, parent, siblings) {
331
+ return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
332
+ }
333
+ function declaration(value, root, parent, length2, siblings) {
334
+ return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
335
+ }
336
+ function prefix(value, length2, children) {
337
+ switch (hash(value, length2)) {
338
+ case 5103:
339
+ return WEBKIT + "print-" + value + value;
340
+ case 5737:
341
+ case 4201:
342
+ case 3177:
343
+ case 3433:
344
+ case 1641:
345
+ case 4457:
346
+ case 2921:
347
+ case 5572:
348
+ case 6356:
349
+ case 5844:
350
+ case 3191:
351
+ case 6645:
352
+ case 3005:
353
+ case 4215:
354
+ case 6389:
355
+ case 5109:
356
+ case 5365:
357
+ case 5621:
358
+ case 3829:
359
+ case 6391:
360
+ case 5879:
361
+ case 5623:
362
+ case 6135:
363
+ case 4599:
364
+ return WEBKIT + value + value;
365
+ case 4855:
366
+ return WEBKIT + value.replace("add", "source-over").replace("substract", "source-out").replace("intersect", "source-in").replace("exclude", "xor") + value;
367
+ case 4789:
368
+ return MOZ + value + value;
369
+ case 5349:
370
+ case 4246:
371
+ case 4810:
372
+ case 6968:
373
+ case 2756:
374
+ return WEBKIT + value + MOZ + value + MS + value + value;
375
+ case 5936:
376
+ switch (charat(value, length2 + 11)) {
377
+ case 114:
378
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
379
+ case 108:
380
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
381
+ case 45:
382
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
383
+ }
384
+ case 6828:
385
+ case 4268:
386
+ case 2903:
387
+ return WEBKIT + value + MS + value + value;
388
+ case 6165:
389
+ return WEBKIT + value + MS + "flex-" + value + value;
390
+ case 5187:
391
+ return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
392
+ case 5443:
393
+ return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/g, "") + (!match(value, /flex-|baseline/) ? MS + "grid-row-" + replace(value, /flex-|-self/g, "") : "") + value;
394
+ case 4675:
395
+ return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/g, "") + value;
396
+ case 5548:
397
+ return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
398
+ case 5292:
399
+ return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
400
+ case 6060:
401
+ return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
402
+ case 4554:
403
+ return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
404
+ case 6187:
405
+ return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
406
+ case 5495:
407
+ case 3959:
408
+ return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
409
+ case 4968:
410
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /space-between/, "justify") + WEBKIT + value + value;
411
+ case 4200:
412
+ if (!match(value, /flex-|baseline/)) return MS + "grid-column-align" + substr(value, length2) + value;
413
+ break;
414
+ case 2592:
415
+ case 3360:
416
+ return MS + replace(value, "template-", "") + value;
417
+ case 4384:
418
+ case 3616:
419
+ if (children && children.some(function(element, index2) {
420
+ return length2 = index2, match(element.props, /grid-\w+-end/);
421
+ })) {
422
+ return ~indexof(value + (children = children[length2].value), "span", 0) ? value : MS + replace(value, "-start", "") + value + MS + "grid-row-span:" + (~indexof(children, "span", 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ";";
423
+ }
424
+ return MS + replace(value, "-start", "") + value;
425
+ case 4896:
426
+ case 4128:
427
+ return children && children.some(function(element) {
428
+ return match(element.props, /grid-\w+-start/);
429
+ }) ? value : MS + replace(replace(value, "-end", "-span"), "span ", "") + value;
430
+ case 4095:
431
+ case 3583:
432
+ case 4068:
433
+ case 2532:
434
+ return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
435
+ case 8116:
436
+ case 7059:
437
+ case 5753:
438
+ case 5535:
439
+ case 5445:
440
+ case 5701:
441
+ case 4933:
442
+ case 4677:
443
+ case 5533:
444
+ case 5789:
445
+ case 5021:
446
+ case 4765:
447
+ if (strlen(value) - 1 - length2 > 6)
448
+ switch (charat(value, length2 + 1)) {
449
+ case 109:
450
+ if (charat(value, length2 + 4) !== 45)
451
+ break;
452
+ case 102:
453
+ return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
454
+ case 115:
455
+ return ~indexof(value, "stretch", 0) ? prefix(replace(value, "stretch", "fill-available"), length2, children) + value : value;
456
+ }
457
+ break;
458
+ case 5152:
459
+ case 5920:
460
+ return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a2, b2, c2, d2, e, f2) {
461
+ return MS + a2 + ":" + b2 + f2 + (c2 ? MS + a2 + "-span:" + (d2 ? e : +e - +b2) + f2 : "") + value;
462
+ });
463
+ case 4949:
464
+ if (charat(value, length2 + 6) === 121)
465
+ return replace(value, ":", ":" + WEBKIT) + value;
466
+ break;
467
+ case 6444:
468
+ switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
469
+ case 120:
470
+ return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
471
+ case 100:
472
+ return replace(value, ":", ":" + MS) + value;
473
+ }
474
+ break;
475
+ case 5719:
476
+ case 2647:
477
+ case 2135:
478
+ case 3927:
479
+ case 2391:
480
+ return replace(value, "scroll-", "scroll-snap-") + value;
481
+ }
482
+ return value;
483
+ }
484
+ function serialize(children, callback) {
485
+ var output = "";
486
+ for (var i2 = 0; i2 < children.length; i2++)
487
+ output += callback(children[i2], i2, children, callback) || "";
488
+ return output;
489
+ }
490
+ function stringify(element, index2, children, callback) {
491
+ switch (element.type) {
492
+ case LAYER:
493
+ if (element.children.length) break;
494
+ case IMPORT:
495
+ case NAMESPACE:
496
+ case DECLARATION:
497
+ return element.return = element.return || element.value;
498
+ case COMMENT:
499
+ return "";
500
+ case KEYFRAMES:
501
+ return element.return = element.value + "{" + serialize(element.children, callback) + "}";
502
+ case RULESET:
503
+ if (!strlen(element.value = element.props.join(","))) return "";
504
+ }
505
+ return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
506
+ }
507
+ function middleware(collection) {
508
+ var length2 = sizeof(collection);
509
+ return function(element, index2, children, callback) {
510
+ var output = "";
511
+ for (var i2 = 0; i2 < length2; i2++)
512
+ output += collection[i2](element, index2, children, callback) || "";
513
+ return output;
514
+ };
515
+ }
516
+ function rulesheet(callback) {
517
+ return function(element) {
518
+ if (!element.root) {
519
+ if (element = element.return)
520
+ callback(element);
521
+ }
522
+ };
523
+ }
524
+ function prefixer(element, index2, children, callback) {
525
+ if (element.length > -1) {
526
+ if (!element.return)
527
+ switch (element.type) {
528
+ case DECLARATION:
529
+ element.return = prefix(element.value, element.length, children);
530
+ return;
531
+ case KEYFRAMES:
532
+ return serialize([copy(element, { value: replace(element.value, "@", "@" + WEBKIT) })], callback);
533
+ case RULESET:
534
+ if (element.length)
535
+ return combine(children = element.props, function(value) {
536
+ switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
537
+ case ":read-only":
538
+ case ":read-write":
539
+ lift(copy(element, { props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")] }));
540
+ lift(copy(element, { props: [value] }));
541
+ assign(element, { props: filter(children, callback) });
542
+ break;
543
+ case "::placeholder":
544
+ lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")] }));
545
+ lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")] }));
546
+ lift(copy(element, { props: [replace(value, /:(plac\w+)/, MS + "input-$1")] }));
547
+ lift(copy(element, { props: [value] }));
548
+ assign(element, { props: filter(children, callback) });
549
+ break;
550
+ }
551
+ return "";
552
+ });
553
+ }
554
+ }
555
+ }
556
+ var r, i;
557
+ const c = "undefined" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", a = "active", l = "data-styled-version", u = "6.4.1", h = "/*!sc*/\n", d = "undefined" != typeof window && "undefined" != typeof document;
558
+ function p(e) {
559
+ if ("undefined" != typeof process && void 0 !== process.env) {
560
+ const t2 = process.env[e];
561
+ if (void 0 !== t2 && "" !== t2) return "false" !== t2;
562
+ }
563
+ }
564
+ const f = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : null !== (i = null !== (r = p("REACT_APP_SC_DISABLE_SPEEDY")) && void 0 !== r ? r : p("SC_DISABLE_SPEEDY")) && void 0 !== i ? i : "undefined" == typeof process || void 0 === process.env || "production" !== process.env.NODE_ENV), m = "sc-keyframes-", g = "production" !== process.env.NODE_ENV ? { 1: "Cannot create styled-component for component: %s.\n\n", 2: "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n", 3: "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", 4: "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n", 5: "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n", 6: "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n", 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: 'ThemeProvider: Please make your "theme" prop an object.\n\n', 9: "Missing document `<head>`\n\n", 10: "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", 11: "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n", 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://styled-components.com/docs/api#css\n\n", 13: "%s is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n", 14: 'ThemeProvider: "theme" prop is required.\n\n', 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n", 17: "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n\n", 18: "Accessing `useTheme` hook outside of a `<ThemeProvider>` element.\n\n```jsx\nimport { useTheme } from 'styled-components';\nexport function StyledCompoent({ children }) {\n const theme = useTheme();\n return <div style={{ width: theme.sizes.full }}>{children}</div>;\n}\n\nimport { StyledComponent } from './StyledComponent';\nimport { theme } from './theme';\nexport function App() {\n return (\n <ThemeProvider theme={theme}>\n <StyledComponent />\n </ThemeProvider>\n );\n}\n```\n\nIf you need access to the theme in an uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there is no `ThemeProvider` ancestor.\n" } : {};
565
+ function v(e, ...t2) {
566
+ return "production" === process.env.NODE_ENV ? new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t2.length > 0 ? ` Args: ${t2.join(", ")}` : ""}`) : new Error(function(...e2) {
567
+ let t3 = e2[0];
568
+ const n = [];
569
+ for (let t4 = 1, o = e2.length; t4 < o; t4 += 1) n.push(e2[t4]);
570
+ return n.forEach((e3) => {
571
+ t3 = t3.replace(/%[a-z]/, e3);
572
+ }), t3;
573
+ }(g[e], ...t2).trim());
574
+ }
575
+ const S = 1 << 30;
576
+ let b = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), N = 1;
577
+ const C = (e) => {
578
+ if (b.has(e)) return b.get(e);
579
+ for (; w.has(N); ) N++;
580
+ const t2 = N++;
581
+ if ("production" !== process.env.NODE_ENV && ((0 | t2) < 0 || t2 > S)) throw v(16, `${t2}`);
582
+ return b.set(e, t2), w.set(t2, e), t2;
583
+ }, O = (e) => w.get(e), E = (e, t2) => {
584
+ N = t2 + 1, b.set(e, t2), w.set(t2, e);
585
+ }, A = /invalid hook call/i, P = /* @__PURE__ */ new Set(), _ = (e, n) => {
586
+ if ("production" !== process.env.NODE_ENV) {
587
+ const o = `The component ${e}${n ? ` with the id of "${n}"` : ""} has been created dynamically.
588
+ You may see this warning because you've called styled inside another component.
589
+ To resolve this only create new StyledComponents outside of any render method and function component.
590
+ See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
591
+ `, s = console.error;
592
+ try {
593
+ let e2 = true;
594
+ console.error = (t2, ...n2) => {
595
+ A.test(t2) ? (e2 = false, P.delete(o)) : s(t2, ...n2);
596
+ }, "function" == typeof t.useState && t.useState(null), e2 && !P.has(o) && (console.warn(o), P.add(o));
597
+ } catch (e2) {
598
+ A.test(e2.message) && P.delete(o);
599
+ } finally {
600
+ console.error = s;
601
+ }
602
+ }
603
+ }, I = Object.freeze([]), $ = Object.freeze({});
604
+ function R(e, t2, n = $) {
605
+ return e.theme !== n.theme && e.theme || t2 || n.theme;
606
+ }
607
+ const j = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, x = /(^-|-$)/g;
608
+ function T(e) {
609
+ return e.replace(j, "-").replace(x, "");
610
+ }
611
+ const k = /(a)(d)/gi, D = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97));
612
+ function V(e) {
613
+ let t2, n = "";
614
+ for (t2 = Math.abs(e); t2 > 52; t2 = t2 / 52 | 0) n = D(t2 % 52) + n;
615
+ return (D(t2 % 52) + n).replace(k, "$1-$2");
616
+ }
617
+ const M = 5381, G = (e, t2) => {
618
+ let n = t2.length;
619
+ for (; n; ) e = 33 * e ^ t2.charCodeAt(--n);
620
+ return e;
621
+ }, F = (e) => G(M, e);
622
+ function z(e) {
623
+ return V(F(e) >>> 0);
624
+ }
625
+ function W(e) {
626
+ return "production" !== process.env.NODE_ENV && "string" == typeof e && e || e.displayName || e.name || "Component";
627
+ }
628
+ function L(e) {
629
+ return "string" == typeof e && ("production" === process.env.NODE_ENV || e.charAt(0) === e.charAt(0).toLowerCase());
630
+ }
631
+ function B(e) {
632
+ return L(e) ? `styled.${e}` : `Styled(${W(e)})`;
633
+ }
634
+ const q = Symbol.for("react.memo"), H = Symbol.for("react.forward_ref"), Y = { contextType: true, defaultProps: true, displayName: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, propTypes: true, type: true }, U = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }, J = { $$typeof: true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }, X = { [H]: { $$typeof: true, render: true, defaultProps: true, displayName: true, propTypes: true }, [q]: J };
635
+ function K(e) {
636
+ return ("type" in (t2 = e) && t2.type.$$typeof) === q ? J : "$$typeof" in e ? X[e.$$typeof] : Y;
637
+ var t2;
638
+ }
639
+ const Q = Object.defineProperty, Z = Object.getOwnPropertyNames, ee = Object.getOwnPropertySymbols, te = Object.getOwnPropertyDescriptor, ne = Object.getPrototypeOf, oe = Object.prototype;
640
+ function se(e, t2, n) {
641
+ if ("string" != typeof t2) {
642
+ const o = ne(t2);
643
+ o && o !== oe && se(e, o, n);
644
+ const s = Z(t2).concat(ee(t2)), r2 = K(e), i2 = K(t2);
645
+ for (let o2 = 0; o2 < s.length; ++o2) {
646
+ const c2 = s[o2];
647
+ if (!(c2 in U || n && n[c2] || i2 && c2 in i2 || r2 && c2 in r2)) {
648
+ const n2 = te(t2, c2);
649
+ try {
650
+ Q(e, c2, n2);
651
+ } catch (e2) {
652
+ }
653
+ }
654
+ }
655
+ }
656
+ return e;
657
+ }
658
+ function re(e) {
659
+ return "function" == typeof e;
660
+ }
661
+ function ie(e) {
662
+ return "object" == typeof e && "styledComponentId" in e;
663
+ }
664
+ function ce(e, t2) {
665
+ return e && t2 ? e + " " + t2 : e || t2 || "";
666
+ }
667
+ function ae(e, t2) {
668
+ return e.join("");
669
+ }
670
+ function le(e) {
671
+ return null !== e && "object" == typeof e && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
672
+ }
673
+ function ue(e, t2, n = false) {
674
+ if (!n && !le(e) && !Array.isArray(e)) return t2;
675
+ if (Array.isArray(t2)) for (let n2 = 0; n2 < t2.length; n2++) e[n2] = ue(e[n2], t2[n2]);
676
+ else if (le(t2)) for (const n2 in t2) e[n2] = ue(e[n2], t2[n2]);
677
+ return e;
678
+ }
679
+ function he(e, t2) {
680
+ Object.defineProperty(e, "toString", { value: t2 });
681
+ }
682
+ const de = class {
683
+ constructor(e) {
684
+ this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e, this._cGroup = 0, this._cIndex = 0;
685
+ }
686
+ indexOfGroup(e) {
687
+ if (e === this._cGroup) return this._cIndex;
688
+ let t2 = this._cIndex;
689
+ if (e > this._cGroup) for (let n = this._cGroup; n < e; n++) t2 += this.groupSizes[n];
690
+ else for (let n = this._cGroup - 1; n >= e; n--) t2 -= this.groupSizes[n];
691
+ return this._cGroup = e, this._cIndex = t2, t2;
692
+ }
693
+ insertRules(e, t2) {
694
+ if (e >= this.groupSizes.length) {
695
+ const t3 = this.groupSizes, n2 = t3.length;
696
+ let o2 = n2;
697
+ for (; e >= o2; ) if (o2 <<= 1, o2 < 0) throw v(16, `${e}`);
698
+ this.groupSizes = new Uint32Array(o2), this.groupSizes.set(t3), this.length = o2;
699
+ for (let e2 = n2; e2 < o2; e2++) this.groupSizes[e2] = 0;
700
+ }
701
+ let n = this.indexOfGroup(e + 1), o = 0;
702
+ for (let s = 0, r2 = t2.length; s < r2; s++) this.tag.insertRule(n, t2[s]) && (this.groupSizes[e]++, n++, o++);
703
+ o > 0 && this._cGroup > e && (this._cIndex += o);
704
+ }
705
+ clearGroup(e) {
706
+ if (e < this.length) {
707
+ const t2 = this.groupSizes[e], n = this.indexOfGroup(e), o = n + t2;
708
+ this.groupSizes[e] = 0;
709
+ for (let e2 = n; e2 < o; e2++) this.tag.deleteRule(n);
710
+ t2 > 0 && this._cGroup > e && (this._cIndex -= t2);
711
+ }
712
+ }
713
+ getGroup(e) {
714
+ let t2 = "";
715
+ if (e >= this.length || 0 === this.groupSizes[e]) return t2;
716
+ const n = this.groupSizes[e], o = this.indexOfGroup(e), s = o + n;
717
+ for (let e2 = o; e2 < s; e2++) t2 += this.tag.getRule(e2) + h;
718
+ return t2;
719
+ }
720
+ }, pe = `style[${c}][${l}="${u}"]`, fe = new RegExp(`^${c}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`), me = (e) => "undefined" != typeof ShadowRoot && e instanceof ShadowRoot || "host" in e && 11 === e.nodeType, ye = (e) => {
721
+ if (!e) return document;
722
+ if (me(e)) return e;
723
+ if ("getRootNode" in e) {
724
+ const t2 = e.getRootNode();
725
+ if (me(t2)) return t2;
726
+ }
727
+ return document;
728
+ }, ge = (e, t2, n) => {
729
+ const o = n.split(",");
730
+ let s;
731
+ for (let n2 = 0, r2 = o.length; n2 < r2; n2++) (s = o[n2]) && e.registerName(t2, s);
732
+ }, ve = (e, t2) => {
733
+ var n;
734
+ const o = (null !== (n = t2.textContent) && void 0 !== n ? n : "").split(h), s = [];
735
+ for (let t3 = 0, n2 = o.length; t3 < n2; t3++) {
736
+ const n3 = o[t3].trim();
737
+ if (!n3) continue;
738
+ const r2 = n3.match(fe);
739
+ if (r2) {
740
+ const t4 = 0 | parseInt(r2[1], 10), n4 = r2[2];
741
+ 0 !== t4 && (E(n4, t4), ge(e, n4, r2[3]), e.getTag().insertRules(t4, s)), s.length = 0;
742
+ } else s.push(n3);
743
+ }
744
+ }, Se = (e) => {
745
+ const t2 = ye(e.options.target).querySelectorAll(pe);
746
+ for (let n = 0, o = t2.length; n < o; n++) {
747
+ const o2 = t2[n];
748
+ o2 && o2.getAttribute(c) !== a && (ve(e, o2), o2.parentNode && o2.parentNode.removeChild(o2));
749
+ }
750
+ };
751
+ let be = false;
752
+ function we() {
753
+ if (false !== be) return be;
754
+ if ("undefined" != typeof document) {
755
+ const e = document.head.querySelector('meta[property="csp-nonce"]');
756
+ if (e) return be = e.nonce || e.getAttribute("content") || void 0;
757
+ const t2 = document.head.querySelector('meta[name="sc-nonce"]');
758
+ if (t2) return be = t2.getAttribute("content") || void 0;
759
+ }
760
+ return be = "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : void 0;
761
+ }
762
+ const Ne = (e, t2) => {
763
+ const n = document.head, o = e || n, s = document.createElement("style"), r2 = ((e2) => {
764
+ const t3 = Array.from(e2.querySelectorAll(`style[${c}]`));
765
+ return t3[t3.length - 1];
766
+ })(o), i2 = void 0 !== r2 ? r2.nextSibling : null;
767
+ s.setAttribute(c, a), s.setAttribute(l, u);
768
+ const h2 = t2 || we();
769
+ return h2 && s.setAttribute("nonce", h2), o.insertBefore(s, i2), s;
770
+ }, Ce = class {
771
+ constructor(e, t2) {
772
+ this.element = Ne(e, t2), this.element.appendChild(document.createTextNode("")), this.sheet = ((e2) => {
773
+ var t3;
774
+ if (e2.sheet) return e2.sheet;
775
+ const n = null !== (t3 = e2.getRootNode().styleSheets) && void 0 !== t3 ? t3 : document.styleSheets;
776
+ for (let t4 = 0, o = n.length; t4 < o; t4++) {
777
+ const o2 = n[t4];
778
+ if (o2.ownerNode === e2) return o2;
779
+ }
780
+ throw v(17);
781
+ })(this.element), this.length = 0;
782
+ }
783
+ insertRule(e, t2) {
784
+ try {
785
+ return this.sheet.insertRule(t2, e), this.length++, true;
786
+ } catch (e2) {
787
+ return false;
788
+ }
789
+ }
790
+ deleteRule(e) {
791
+ this.sheet.deleteRule(e), this.length--;
792
+ }
793
+ getRule(e) {
794
+ const t2 = this.sheet.cssRules[e];
795
+ return t2 && t2.cssText ? t2.cssText : "";
796
+ }
797
+ }, Oe = class {
798
+ constructor(e, t2) {
799
+ this.element = Ne(e, t2), this.nodes = this.element.childNodes, this.length = 0;
800
+ }
801
+ insertRule(e, t2) {
802
+ if (e <= this.length && e >= 0) {
803
+ const n = document.createTextNode(t2);
804
+ return this.element.insertBefore(n, this.nodes[e] || null), this.length++, true;
805
+ }
806
+ return false;
807
+ }
808
+ deleteRule(e) {
809
+ this.element.removeChild(this.nodes[e]), this.length--;
810
+ }
811
+ getRule(e) {
812
+ return e < this.length ? this.nodes[e].textContent : "";
813
+ }
814
+ };
815
+ let Ee = d;
816
+ const Ae = { isServer: !d, useCSSOMInjection: !f };
817
+ class Pe {
818
+ static registerId(e) {
819
+ return C(e);
820
+ }
821
+ constructor(e = $, t2 = {}, n) {
822
+ this.options = Object.assign(Object.assign({}, Ae), e), this.gs = t2, this.keyframeIds = /* @__PURE__ */ new Set(), this.names = new Map(n), this.server = !!e.isServer, !this.server && d && Ee && (Ee = false, Se(this)), he(this, () => ((e2) => {
823
+ const t3 = e2.getTag(), { length: n2 } = t3;
824
+ let o = "";
825
+ for (let s = 0; s < n2; s++) {
826
+ const n3 = O(s);
827
+ if (void 0 === n3) continue;
828
+ const r2 = e2.names.get(n3);
829
+ if (void 0 === r2 || !r2.size) continue;
830
+ const i2 = t3.getGroup(s);
831
+ if (0 === i2.length) continue;
832
+ const a2 = c + ".g" + s + '[id="' + n3 + '"]';
833
+ let l2 = "";
834
+ for (const e3 of r2) e3.length > 0 && (l2 += e3 + ",");
835
+ o += i2 + a2 + '{content:"' + l2 + '"}' + h;
836
+ }
837
+ return o;
838
+ })(this));
839
+ }
840
+ rehydrate() {
841
+ !this.server && d && Se(this);
842
+ }
843
+ reconstructWithOptions(e, t2 = true) {
844
+ const n = new Pe(Object.assign(Object.assign({}, this.options), e), this.gs, t2 && this.names || void 0);
845
+ return n.keyframeIds = new Set(this.keyframeIds), !this.server && d && e.target !== this.options.target && ye(this.options.target) !== ye(e.target) && Se(n), n;
846
+ }
847
+ allocateGSInstance(e) {
848
+ return this.gs[e] = (this.gs[e] || 0) + 1;
849
+ }
850
+ getTag() {
851
+ return this.tag || (this.tag = (e = (({ useCSSOMInjection: e2, target: t2, nonce: n }) => e2 ? new Ce(t2, n) : new Oe(t2, n))(this.options), new de(e)));
852
+ var e;
853
+ }
854
+ hasNameForId(e, t2) {
855
+ var n, o;
856
+ return null !== (o = null === (n = this.names.get(e)) || void 0 === n ? void 0 : n.has(t2)) && void 0 !== o && o;
857
+ }
858
+ registerName(e, t2) {
859
+ C(e), e.startsWith(m) && this.keyframeIds.add(e);
860
+ const n = this.names.get(e);
861
+ n ? n.add(t2) : this.names.set(e, /* @__PURE__ */ new Set([t2]));
862
+ }
863
+ insertRules(e, t2, n) {
864
+ this.registerName(e, t2), this.getTag().insertRules(C(e), n);
865
+ }
866
+ clearNames(e) {
867
+ this.names.has(e) && this.names.get(e).clear();
868
+ }
869
+ clearRules(e) {
870
+ this.getTag().clearGroup(C(e)), this.clearNames(e);
871
+ }
872
+ clearTag() {
873
+ this.tag = void 0;
874
+ }
875
+ }
876
+ const _e = /* @__PURE__ */ new WeakSet(), Ie = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexShrink: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, scale: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 };
877
+ function $e(e, t2) {
878
+ return null == t2 || "boolean" == typeof t2 || "" === t2 ? "" : "number" != typeof t2 || 0 === t2 || e in Ie || e.startsWith("--") ? String(t2).trim() : t2 + "px";
879
+ }
880
+ const Re = 47;
881
+ function je(e) {
882
+ if (45 === e.charCodeAt(0) && 45 === e.charCodeAt(1)) return e;
883
+ let t2 = "";
884
+ for (let n = 0; n < e.length; n++) {
885
+ const o = e.charCodeAt(n);
886
+ t2 += o >= 65 && o <= 90 ? "-" + String.fromCharCode(o + 32) : e[n];
887
+ }
888
+ return t2.startsWith("ms-") ? "-" + t2 : t2;
889
+ }
890
+ const xe = Symbol.for("sc-keyframes");
891
+ function Te(e) {
892
+ return "object" == typeof e && null !== e && xe in e;
893
+ }
894
+ function ke(e) {
895
+ return re(e) && !(e.prototype && e.prototype.isReactComponent);
896
+ }
897
+ const De = (e) => null == e || false === e || "" === e, Ve = Symbol.for("react.client.reference");
898
+ function Me(e) {
899
+ return e.$$typeof === Ve;
900
+ }
901
+ function Ge(e) {
902
+ const t2 = e.$$id, n = (t2 && t2.includes("#") ? t2.split("#").pop() : t2) || e.name || "unknown";
903
+ console.warn(`Interpolating a client component (${n}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`);
904
+ }
905
+ function Fe(e, t2) {
906
+ for (const n in e) {
907
+ const o = e[n];
908
+ e.hasOwnProperty(n) && !De(o) && (Array.isArray(o) && _e.has(o) || re(o) ? t2.push(je(n) + ":", o, ";") : le(o) ? (t2.push(n + " {"), Fe(o, t2), t2.push("}")) : t2.push(je(n) + ": " + $e(n, o) + ";"));
909
+ }
910
+ }
911
+ function ze(e, t2, n, o, s = []) {
912
+ if (De(e)) return s;
913
+ const r2 = typeof e;
914
+ if ("string" === r2) return s.push(e), s;
915
+ if ("function" === r2) {
916
+ if (Me(e)) return "production" !== process.env.NODE_ENV && Ge(e), s;
917
+ if (ke(e) && t2) {
918
+ const r3 = e(t2);
919
+ return "production" === process.env.NODE_ENV || "object" != typeof r3 || Array.isArray(r3) || Te(r3) || le(r3) || null === r3 || console.error(`${W(e)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`), ze(r3, t2, n, o, s);
920
+ }
921
+ return s.push(e), s;
922
+ }
923
+ if (Array.isArray(e)) {
924
+ for (let r3 = 0; r3 < e.length; r3++) ze(e[r3], t2, n, o, s);
925
+ return s;
926
+ }
927
+ return ie(e) ? (s.push(`.${e.styledComponentId}`), s) : Te(e) ? (n ? (e.inject(n, o), s.push(e.getName(o))) : s.push(e), s) : Me(e) ? ("production" !== process.env.NODE_ENV && Ge(e), s) : le(e) ? (Fe(e, s), s) : (s.push(e.toString()), s);
928
+ }
929
+ const We = F(u);
930
+ class Le {
931
+ constructor(e, t2, n) {
932
+ this.rules = e, this.componentId = t2, this.baseHash = G(We, t2), this.baseStyle = n, Pe.registerId(t2);
933
+ }
934
+ generateAndInjectStyles(e, t2, n) {
935
+ let o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, t2, n) : "";
936
+ {
937
+ let s = "";
938
+ for (let o2 = 0; o2 < this.rules.length; o2++) {
939
+ const r2 = this.rules[o2];
940
+ if ("string" == typeof r2) s += r2;
941
+ else if (r2) if (ke(r2)) {
942
+ const o3 = r2(e);
943
+ "string" == typeof o3 ? s += o3 : null != o3 && false !== o3 && ("production" === process.env.NODE_ENV || "object" != typeof o3 || Array.isArray(o3) || Te(o3) || le(o3) || console.error(`${W(r2)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`), s += ae(ze(o3, e, t2, n)));
944
+ } else s += ae(ze(r2, e, t2, n));
945
+ }
946
+ if (s) {
947
+ this.dynamicNameCache || (this.dynamicNameCache = /* @__PURE__ */ new Map());
948
+ const e2 = n.hash ? n.hash + s : s;
949
+ let r2 = this.dynamicNameCache.get(e2);
950
+ if (!r2) {
951
+ if (r2 = V(G(G(this.baseHash, n.hash), s) >>> 0), this.dynamicNameCache.size >= 200) {
952
+ const e3 = this.dynamicNameCache.keys().next().value;
953
+ void 0 !== e3 && this.dynamicNameCache.delete(e3);
954
+ }
955
+ this.dynamicNameCache.set(e2, r2);
956
+ }
957
+ if (!t2.hasNameForId(this.componentId, r2)) {
958
+ const e3 = n(s, "." + r2, void 0, this.componentId);
959
+ t2.insertRules(this.componentId, r2, e3);
960
+ }
961
+ o = ce(o, r2);
962
+ }
963
+ }
964
+ return o;
965
+ }
966
+ }
967
+ const Be = /&/g;
968
+ function qe(e, t2) {
969
+ let n = 0;
970
+ for (; --t2 >= 0 && 92 === e.charCodeAt(t2); ) n++;
971
+ return !(1 & ~n);
972
+ }
973
+ function He(e) {
974
+ const t2 = e.length;
975
+ let n = "", o = 0, s = 0, r2 = 0, i2 = false, c2 = false;
976
+ for (let a2 = 0; a2 < t2; a2++) {
977
+ const l2 = e.charCodeAt(a2);
978
+ if (0 !== r2 || i2 || l2 !== Re || 42 !== e.charCodeAt(a2 + 1)) if (i2) 42 === l2 && e.charCodeAt(a2 + 1) === Re && (i2 = false, a2++);
979
+ else if (34 !== l2 && 39 !== l2 || qe(e, a2)) {
980
+ if (0 === r2) if (123 === l2) s++;
981
+ else if (125 === l2) {
982
+ if (s--, s < 0) {
983
+ c2 = true;
984
+ let n2 = a2 + 1;
985
+ for (; n2 < t2; ) {
986
+ const t3 = e.charCodeAt(n2);
987
+ if (59 === t3 || 10 === t3) break;
988
+ n2++;
989
+ }
990
+ n2 < t2 && 59 === e.charCodeAt(n2) && n2++, s = 0, a2 = n2 - 1, o = n2;
991
+ continue;
992
+ }
993
+ 0 === s && (n += e.substring(o, a2 + 1), o = a2 + 1);
994
+ } else 59 === l2 && 0 === s && (n += e.substring(o, a2 + 1), o = a2 + 1);
995
+ } else 0 === r2 ? r2 = l2 : r2 === l2 && (r2 = 0);
996
+ else i2 = true, a2++;
997
+ }
998
+ return c2 || 0 !== s || 0 !== r2 ? (o < t2 && 0 === s && 0 === r2 && (n += e.substring(o)), n) : e;
999
+ }
1000
+ function Ye(e, t2) {
1001
+ const n = t2 + " ", o = "," + n;
1002
+ for (let s = 0; s < e.length; s++) {
1003
+ const r2 = e[s];
1004
+ if ("rule" === r2.type) {
1005
+ r2.value = (n + r2.value).replaceAll(",", o);
1006
+ const e2 = r2.props, t3 = [];
1007
+ for (let o2 = 0; o2 < e2.length; o2++) t3[o2] = n + e2[o2];
1008
+ r2.props = t3;
1009
+ }
1010
+ Array.isArray(r2.children) && "@keyframes" !== r2.type && Ye(r2.children, t2);
1011
+ }
1012
+ return e;
1013
+ }
1014
+ function Ue({ options: e = $, plugins: t2 = I } = $) {
1015
+ let n, s, r2;
1016
+ const i2 = (e2, t3, o) => o.startsWith(s) && o.endsWith(s) && o.replaceAll(s, "").length > 0 ? `.${n}` : e2, c2 = t2.slice();
1017
+ c2.push((e2) => {
1018
+ e2.type === RULESET && e2.value.includes("&") && (r2 || (r2 = new RegExp(`\\${s}\\b`, "g")), e2.props[0] = e2.props[0].replace(Be, s).replace(r2, i2));
1019
+ }), e.prefix && c2.push(prefixer), c2.push(stringify);
1020
+ let a2 = [];
1021
+ const l2 = middleware(c2.concat(rulesheet((e2) => a2.push(e2)))), u2 = (t3, i3 = "", c3 = "", u3 = "&") => {
1022
+ n = u3, s = i3, r2 = void 0;
1023
+ const h3 = function(e2) {
1024
+ const t4 = -1 !== e2.indexOf("//"), n2 = -1 !== e2.indexOf("}");
1025
+ if (!t4 && !n2) return e2;
1026
+ if (!t4) return He(e2);
1027
+ const o = e2.length;
1028
+ let s2 = "", r3 = 0, i4 = 0, c4 = 0, a3 = 0, l3 = 0, u4 = false;
1029
+ for (; i4 < o; ) {
1030
+ const t5 = e2.charCodeAt(i4);
1031
+ if (34 !== t5 && 39 !== t5 || qe(e2, i4)) if (0 === c4) if (t5 === Re && i4 + 1 < o && 42 === e2.charCodeAt(i4 + 1)) {
1032
+ for (i4 += 2; i4 + 1 < o && (42 !== e2.charCodeAt(i4) || e2.charCodeAt(i4 + 1) !== Re); ) i4++;
1033
+ i4 += 2;
1034
+ } else if (40 !== t5) if (41 !== t5) if (a3 > 0) i4++;
1035
+ else if (42 === t5 && i4 + 1 < o && e2.charCodeAt(i4 + 1) === Re) s2 += e2.substring(r3, i4), i4 += 2, r3 = i4, u4 = true;
1036
+ else if (t5 === Re && i4 + 1 < o && e2.charCodeAt(i4 + 1) === Re) {
1037
+ for (s2 += e2.substring(r3, i4); i4 < o && 10 !== e2.charCodeAt(i4); ) i4++;
1038
+ r3 = i4, u4 = true;
1039
+ } else 123 === t5 ? l3++ : 125 === t5 && l3--, i4++;
1040
+ else a3 > 0 && a3--, i4++;
1041
+ else a3++, i4++;
1042
+ else i4++;
1043
+ else 0 === c4 ? c4 = t5 : c4 === t5 && (c4 = 0), i4++;
1044
+ }
1045
+ return u4 ? (r3 < o && (s2 += e2.substring(r3)), 0 === l3 ? s2 : He(s2)) : 0 === l3 ? e2 : He(e2);
1046
+ }(t3);
1047
+ let d3 = compile(c3 || i3 ? c3 + " " + i3 + " { " + h3 + " }" : h3);
1048
+ return e.namespace && (d3 = Ye(d3, e.namespace)), a2 = [], serialize(d3, l2), a2;
1049
+ }, h2 = e;
1050
+ let d2 = M;
1051
+ for (let e2 = 0; e2 < t2.length; e2++) t2[e2].name || v(15), d2 = G(d2, t2[e2].name);
1052
+ return (null == h2 ? void 0 : h2.namespace) && (d2 = G(d2, h2.namespace)), (null == h2 ? void 0 : h2.prefix) && (d2 = G(d2, "p")), u2.hash = d2 !== M ? d2.toString() : "", u2;
1053
+ }
1054
+ const Je = new Pe(), Xe = Ue(), Ke = t.createContext({ shouldForwardProp: void 0, styleSheet: Je, stylis: Xe, stylisPlugins: void 0 });
1055
+ Ke.Consumer;
1056
+ function Ze() {
1057
+ return t.useContext(Ke);
1058
+ }
1059
+ const tt = t.createContext(void 0);
1060
+ tt.Consumer;
1061
+ const rt = Object.prototype.hasOwnProperty, it = {};
1062
+ function ct(e, t2) {
1063
+ const n = "string" != typeof e ? "sc" : T(e);
1064
+ it[n] = (it[n] || 0) + 1;
1065
+ const o = n + "-" + z(u + n + it[n]);
1066
+ return t2 ? t2 + "-" + o : o;
1067
+ }
1068
+ let at;
1069
+ function lt(o, s, r2) {
1070
+ const i2 = ie(o), c2 = o, a2 = !L(o), { attrs: l2 = I, componentId: u2 = ct(s.displayName, s.parentComponentId), displayName: h2 = B(o) } = s, d2 = s.displayName && s.componentId ? T(s.displayName) + "-" + s.componentId : s.componentId || u2, p2 = i2 && c2.attrs ? c2.attrs.concat(l2).filter(Boolean) : l2;
1071
+ let { shouldForwardProp: f2 } = s;
1072
+ if (i2 && c2.shouldForwardProp) {
1073
+ const e = c2.shouldForwardProp;
1074
+ if (s.shouldForwardProp) {
1075
+ const t2 = s.shouldForwardProp;
1076
+ f2 = (n, o2) => e(n, o2) && t2(n, o2);
1077
+ } else f2 = e;
1078
+ }
1079
+ const m2 = new Le(r2, d2, i2 ? c2.componentStyle : void 0);
1080
+ function y(o2, s2) {
1081
+ return function(o3, s3, r3) {
1082
+ const { attrs: i3, componentStyle: c3, defaultProps: a3, foldedComponentIds: l3, styledComponentId: u3, target: h3 } = o3, d3 = t.useContext(tt), p3 = Ze(), f3 = o3.shouldForwardProp || p3.shouldForwardProp;
1083
+ "production" !== process.env.NODE_ENV && t.useDebugValue && t.useDebugValue(u3);
1084
+ const m3 = R(s3, d3, a3) || $;
1085
+ let y2, g3;
1086
+ {
1087
+ const e = t.useRef(null), n = e.current;
1088
+ if (null !== n && n[1] === m3 && n[2] === p3.styleSheet && n[3] === p3.stylis && n[7] === c3 && function(e2, t2, n2) {
1089
+ const o4 = e2, s4 = t2;
1090
+ let r4 = 0;
1091
+ for (const e3 in s4) if (rt.call(s4, e3) && (r4++, o4[e3] !== s4[e3])) return false;
1092
+ return r4 === n2;
1093
+ }(n[0], s3, n[4])) y2 = n[5], g3 = n[6];
1094
+ else {
1095
+ y2 = function(e2, t2, n3) {
1096
+ const o4 = Object.assign(Object.assign({}, t2), { className: void 0, theme: n3 }), s4 = e2.length > 1;
1097
+ for (let n4 = 0; n4 < e2.length; n4++) {
1098
+ const r4 = e2[n4], i4 = re(r4) ? r4(s4 ? Object.assign({}, o4) : o4) : r4;
1099
+ for (const e3 in i4) "className" === e3 ? o4.className = ce(o4.className, i4[e3]) : "style" === e3 ? o4.style = Object.assign(Object.assign({}, o4.style), i4[e3]) : e3 in t2 && void 0 === t2[e3] || (o4[e3] = i4[e3]);
1100
+ }
1101
+ return "className" in t2 && "string" == typeof t2.className && (o4.className = ce(o4.className, t2.className)), o4;
1102
+ }(i3, s3, m3), g3 = function(e2, n3, o4, s4) {
1103
+ const r4 = e2.generateAndInjectStyles(n3, o4, s4);
1104
+ return "production" !== process.env.NODE_ENV && t.useDebugValue && t.useDebugValue(r4), r4;
1105
+ }(c3, y2, p3.styleSheet, p3.stylis);
1106
+ let n2 = 0;
1107
+ for (const e2 in s3) rt.call(s3, e2) && n2++;
1108
+ e.current = [s3, m3, p3.styleSheet, p3.stylis, n2, y2, g3, c3];
1109
+ }
1110
+ }
1111
+ "production" !== process.env.NODE_ENV && o3.warnTooManyClasses && o3.warnTooManyClasses(g3);
1112
+ const v2 = y2.as || h3, S2 = function(t2, n, o4, s4) {
1113
+ const r4 = {};
1114
+ for (const i4 in t2) void 0 === t2[i4] || "$" === i4[0] || "as" === i4 || "theme" === i4 && t2.theme === o4 || ("forwardedAs" === i4 ? r4.as = t2.forwardedAs : s4 && !s4(i4, n) || (r4[i4] = t2[i4], s4 || "development" !== process.env.NODE_ENV || isPropValid(i4) || (at || (at = /* @__PURE__ */ new Set())).has(i4) || !L(n) || n.includes("-") || (at.add(i4), console.warn(`styled-components: it looks like an unknown prop "${i4}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));
1115
+ return r4;
1116
+ }(y2, v2, m3, f3);
1117
+ let b2 = ce(l3, u3);
1118
+ return g3 && (b2 += " " + g3), y2.className && (b2 += " " + y2.className), S2[L(v2) && v2.includes("-") ? "class" : "className"] = b2, r3 && (S2.ref = r3), createElement(v2, S2);
1119
+ }(g2, o2, s2);
1120
+ }
1121
+ y.displayName = h2;
1122
+ let g2 = t.forwardRef(y);
1123
+ return g2.attrs = p2, g2.componentStyle = m2, g2.displayName = h2, g2.shouldForwardProp = f2, g2.foldedComponentIds = i2 ? ce(c2.foldedComponentIds, c2.styledComponentId) : "", g2.styledComponentId = d2, g2.target = i2 ? c2.target : o, Object.defineProperty(g2, "defaultProps", { get() {
1124
+ return this._foldedDefaultProps;
1125
+ }, set(e) {
1126
+ this._foldedDefaultProps = i2 ? function(e2, ...t2) {
1127
+ for (const n of t2) ue(e2, n, true);
1128
+ return e2;
1129
+ }({}, c2.defaultProps, e) : e;
1130
+ } }), "production" !== process.env.NODE_ENV && (_(h2, d2), g2.warnTooManyClasses = /* @__PURE__ */ ((e, t2) => {
1131
+ let n = {}, o2 = false;
1132
+ return (s2) => {
1133
+ !o2 && (n[s2] = true, Object.keys(n).length >= 200) && (console.warn(`Over 200 classes were generated for component ${e}${t2 ? ` with the id of "${t2}"` : ""}.
1134
+ Consider using the attrs method, together with a style object for frequently changed styles.
1135
+ Example:
1136
+ const Component = styled.div.attrs(props => ({
1137
+ style: {
1138
+ background: props.background,
1139
+ },
1140
+ }))\`width: 100%;\`
1141
+
1142
+ <Component />`), o2 = true, n = {});
1143
+ };
1144
+ })(h2, d2)), he(g2, () => `.${g2.styledComponentId}`), a2 && se(g2, o, { attrs: true, componentStyle: true, displayName: true, foldedComponentIds: true, shouldForwardProp: true, styledComponentId: true, target: true }), g2;
1145
+ }
1146
+ var ut = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "blockquote", "body", "button", "br", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "menu", "meter", "nav", "object", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "slot", "small", "span", "strong", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "u", "ul", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "switch", "symbol", "text", "textPath", "tspan", "use"]);
1147
+ function ht(e, t2) {
1148
+ const n = [e[0]];
1149
+ for (let o = 0, s = t2.length; o < s; o += 1) n.push(t2[o], e[o + 1]);
1150
+ return n;
1151
+ }
1152
+ const dt = (e) => (_e.add(e), e);
1153
+ function pt(e, ...t2) {
1154
+ if (re(e) || le(e)) return dt(ze(ht(I, [e, ...t2])));
1155
+ const n = e;
1156
+ return 0 === t2.length && 1 === n.length && "string" == typeof n[0] ? ze(n) : dt(ze(ht(n, t2)));
1157
+ }
1158
+ function ft(e, t2, n = $) {
1159
+ if (!t2) throw v(1, t2);
1160
+ const o = (o2, ...s) => e(t2, n, pt(o2, ...s));
1161
+ return o.attrs = (o2) => ft(e, t2, Object.assign(Object.assign({}, n), { attrs: Array.prototype.concat(n.attrs, o2).filter(Boolean) })), o.withConfig = (o2) => ft(e, t2, Object.assign(Object.assign({}, n), o2)), o;
1162
+ }
1163
+ const mt = (e) => ft(lt, e), yt = mt;
1164
+ ut.forEach((e) => {
1165
+ yt[e] = mt(e);
1166
+ });
1167
+ "production" !== process.env.NODE_ENV && "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://styled-components.com/docs/basics#react-native");
1168
+ const _t = `__sc-${c}__`;
1169
+ "production" !== process.env.NODE_ENV && "test" !== process.env.NODE_ENV && "undefined" != typeof window && (window[_t] || (window[_t] = 0), 1 === window[_t] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."), window[_t] += 1);
1170
+ const PreviewModalContent = yt(Modal.Content)`
1171
+ width: 100vw !important;
1172
+ height: 100vh !important;
1173
+ max-width: 100% !important;
1174
+ max-height: 100% !important;
1175
+ `;
1176
+ const collectPreviewItems = (value, attributes, componentSchemas, optionsMap) => {
1177
+ const items = [];
1178
+ if (!value || !attributes || typeof value !== "object") return items;
1179
+ const pushItem = (componentUid, tempKey) => {
1180
+ const opts = optionsMap[componentUid];
1181
+ if (!opts) return;
1182
+ const schema = componentSchemas[componentUid];
1183
+ items.push({
1184
+ uid: componentUid,
1185
+ displayName: schema?.info?.displayName ?? componentUid,
1186
+ previewUrl: opts.url,
1187
+ previewName: opts.name,
1188
+ count: 1,
1189
+ tempKey,
1190
+ disableIframe: opts.disableIframe
1191
+ });
1192
+ };
1193
+ for (const [attributeName, attribute] of Object.entries(attributes)) {
1194
+ const attributeValue = value[attributeName];
1195
+ if (!attributeValue) continue;
1196
+ if (attribute.type === "dynamiczone" && Array.isArray(attributeValue)) {
1197
+ for (const item of attributeValue) {
1198
+ if (!item || typeof item !== "object") continue;
1199
+ const componentUid = item.__component;
1200
+ const tempKey = item.__temp_key__;
1201
+ if (componentUid) pushItem(componentUid, tempKey);
1202
+ }
1203
+ continue;
1204
+ }
1205
+ if (attribute.type === "component" && attribute.component) {
1206
+ const componentUid = attribute.component;
1207
+ if (attribute.repeatable && Array.isArray(attributeValue)) {
1208
+ for (let i2 = 0; i2 < attributeValue.length; i2++) {
1209
+ const item = attributeValue[i2];
1210
+ pushItem(componentUid, item?.__temp_key__);
1211
+ }
1212
+ } else {
1213
+ pushItem(componentUid);
1214
+ }
1215
+ }
1216
+ }
1217
+ return items;
1218
+ };
1219
+ const ComponentPreviewPanel = () => {
1220
+ const { components, contentType, isCreatingEntry } = unstable_useContentManagerContext();
1221
+ const values = useForm("ComponentPreviewPanel", (state) => state.values);
1222
+ const { get } = useFetchClient();
1223
+ const [optionsMap, setOptionsMap] = useState({});
1224
+ useEffect(() => {
1225
+ let cancelled = false;
1226
+ get("/api/component-preview-image/options").then(({ data }) => {
1227
+ if (!cancelled) setOptionsMap(data ?? {});
1228
+ }).catch(() => {
1229
+ if (!cancelled) setOptionsMap({});
1230
+ });
1231
+ return () => {
1232
+ cancelled = true;
1233
+ };
1234
+ }, []);
1235
+ const previewItems = collectPreviewItems(
1236
+ values,
1237
+ contentType?.attributes,
1238
+ components,
1239
+ optionsMap
1240
+ );
1241
+ if (isCreatingEntry) {
1242
+ return {
1243
+ title: "Component previews",
1244
+ content: /* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "neutral600", children: "Save this entry once to load component previews." })
1245
+ };
1246
+ }
1247
+ if (previewItems.length === 0) {
1248
+ return {
1249
+ title: "Component previews",
1250
+ content: /* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "neutral600", children: "No component previews are available for this entry yet." })
1251
+ };
1252
+ }
1253
+ return {
1254
+ title: "Component previews",
1255
+ content: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: 4, alignItems: "stretch", children: previewItems.map((item, index2) => /* @__PURE__ */ jsx(
1256
+ Box,
1257
+ {
1258
+ borderColor: "neutral200",
1259
+ background: "neutral0",
1260
+ hasRadius: true,
1261
+ padding: 3,
1262
+ shadow: "tableShadow",
1263
+ width: "100%",
1264
+ overflow: "hidden",
1265
+ style: { boxSizing: "border-box" },
1266
+ children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 3, alignItems: "stretch", children: [
1267
+ /* @__PURE__ */ jsx(
1268
+ "img",
1269
+ {
1270
+ src: item.previewUrl,
1271
+ alt: item.previewName || item.displayName,
1272
+ style: {
1273
+ width: "100%",
1274
+ maxWidth: "100%",
1275
+ display: "block",
1276
+ borderRadius: "8px",
1277
+ border: "1px solid #dcdce4",
1278
+ objectFit: "cover",
1279
+ boxSizing: "border-box"
1280
+ }
1281
+ }
1282
+ ),
1283
+ /* @__PURE__ */ jsxs(
1284
+ Flex,
1285
+ {
1286
+ justifyContent: "space-between",
1287
+ alignItems: "flex-start",
1288
+ gap: 2,
1289
+ width: "100%",
1290
+ children: [
1291
+ /* @__PURE__ */ jsxs(Box, { style: { minWidth: 0, flex: 1 }, children: [
1292
+ /* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral800", children: item.previewName || item.displayName }),
1293
+ /* @__PURE__ */ jsx(
1294
+ Typography,
1295
+ {
1296
+ variant: "pi",
1297
+ textColor: "neutral600",
1298
+ style: {
1299
+ display: "block",
1300
+ overflowWrap: "anywhere",
1301
+ wordBreak: "break-word"
1302
+ },
1303
+ children: item.uid
1304
+ }
1305
+ )
1306
+ ] }),
1307
+ item.disableIframe ? /* @__PURE__ */ jsx(
1308
+ Button,
1309
+ {
1310
+ variant: "tertiary",
1311
+ size: "S",
1312
+ tag: "a",
1313
+ href: item.previewUrl,
1314
+ target: "_blank",
1315
+ rel: "noreferrer",
1316
+ endIcon: /* @__PURE__ */ jsx(ExternalLink, {}),
1317
+ style: { flexShrink: 0 },
1318
+ children: "Open"
1319
+ }
1320
+ ) : /* @__PURE__ */ jsxs(Modal.Root, { children: [
1321
+ /* @__PURE__ */ jsx(Modal.Trigger, { children: /* @__PURE__ */ jsx(
1322
+ Button,
1323
+ {
1324
+ variant: "tertiary",
1325
+ size: "S",
1326
+ endIcon: /* @__PURE__ */ jsx(ExternalLink, {}),
1327
+ style: { flexShrink: 0 },
1328
+ children: "Open"
1329
+ }
1330
+ ) }),
1331
+ /* @__PURE__ */ jsxs(PreviewModalContent, { children: [
1332
+ /* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsx(Modal.Title, { children: item.previewName || item.displayName }) }),
1333
+ /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Box, { padding: 4, background: "neutral100", hasRadius: true, style: { height: "80vh" }, children: /* @__PURE__ */ jsx(
1334
+ "iframe",
1335
+ {
1336
+ src: item.previewUrl,
1337
+ title: item.previewName || item.displayName,
1338
+ width: "100%",
1339
+ height: "100%",
1340
+ style: { border: "none" }
1341
+ }
1342
+ ) }) }),
1343
+ /* @__PURE__ */ jsx(Modal.Footer, { children: /* @__PURE__ */ jsx(Modal.Close, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", children: "Close" }) }) })
1344
+ ] })
1345
+ ] })
1346
+ ]
1347
+ }
1348
+ )
1349
+ ] })
1350
+ },
1351
+ item.tempKey ?? `${index2}-${item.uid}`
1352
+ )) })
1353
+ };
1354
+ };
1355
+ const index = {
1356
+ register(app) {
1357
+ app.customFields.register({
1358
+ name: "preview-image",
1359
+ pluginId: "component-preview-image",
1360
+ type: "string",
1361
+ inputSize: { default: 12, isResizable: false },
1362
+ intlLabel: {
1363
+ id: "component-preview-image.preview-image.label",
1364
+ defaultMessage: "Preview Image"
1365
+ },
1366
+ intlDescription: {
1367
+ id: "component-preview-image.preview-image.description",
1368
+ defaultMessage: "Schema-level preview image — set the image URL once in the Content-Type Builder, shown in the edit-view side panel"
1369
+ },
1370
+ components: {
1371
+ Input: async () => import("./PreviewImageInput-Bg9tFBc4.mjs").then((mod) => ({
1372
+ default: mod.PreviewImageInput
1373
+ }))
1374
+ },
1375
+ options: {
1376
+ base: [
1377
+ {
1378
+ name: "options.url",
1379
+ type: "text",
1380
+ intlLabel: {
1381
+ id: "component-preview-image.options.url.label",
1382
+ defaultMessage: "Preview Image URL"
1383
+ },
1384
+ description: {
1385
+ id: "component-preview-image.options.url.description",
1386
+ defaultMessage: "Direct URL of the image to display in the preview panel"
1387
+ }
1388
+ },
1389
+ {
1390
+ name: "options.disableIframe",
1391
+ type: "checkbox",
1392
+ intlLabel: {
1393
+ id: "component-preview-image.options.disableIframe.label",
1394
+ defaultMessage: "Disable Iframe?"
1395
+ },
1396
+ description: {
1397
+ id: "component-preview-image.options.disableIframe.description",
1398
+ defaultMessage: "Disables iframe modal and opens the image in a new tab"
1399
+ }
1400
+ }
1401
+ ]
1402
+ }
1403
+ });
1404
+ },
1405
+ bootstrap(app) {
1406
+ app.getPlugin("content-manager").apis.addEditViewSidePanel([ComponentPreviewPanel]);
1407
+ }
1408
+ };
1409
+ export {
1410
+ index as i,
1411
+ yt as y
1412
+ };