sanity-plugin-seofields 1.2.4 → 1.2.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.
Files changed (49) hide show
  1. package/dist/index.cjs +2604 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +422 -0
  4. package/dist/index.d.ts +339 -492
  5. package/dist/index.js +1284 -2013
  6. package/dist/index.js.map +1 -1
  7. package/dist/next.cjs +182 -0
  8. package/dist/next.cjs.map +1 -0
  9. package/dist/next.d.cts +241 -0
  10. package/dist/next.d.ts +202 -295
  11. package/dist/next.js +110 -70
  12. package/dist/next.js.map +1 -1
  13. package/dist/types-B91ena4g.d.cts +89 -0
  14. package/dist/types-B91ena4g.d.ts +89 -0
  15. package/package.json +37 -18
  16. package/dist/index.d.mts +0 -575
  17. package/dist/index.mjs +0 -3292
  18. package/dist/index.mjs.map +0 -1
  19. package/dist/next.d.mts +0 -334
  20. package/dist/next.mjs +0 -102
  21. package/dist/next.mjs.map +0 -1
  22. package/sanity.json +0 -8
  23. package/src/components/SeoHealthDashboard.tsx +0 -1568
  24. package/src/components/SeoHealthPane.tsx +0 -81
  25. package/src/components/SeoHealthTool.tsx +0 -11
  26. package/src/components/SeoPreview.tsx +0 -178
  27. package/src/components/meta/MetaDescription.tsx +0 -39
  28. package/src/components/meta/MetaTitle.tsx +0 -44
  29. package/src/components/openGraph/OgDescription.tsx +0 -46
  30. package/src/components/openGraph/OgTitle.tsx +0 -45
  31. package/src/components/twitter/twitterDescription.tsx +0 -45
  32. package/src/components/twitter/twitterTitle.tsx +0 -45
  33. package/src/helpers/SeoMetaTags.tsx +0 -154
  34. package/src/helpers/seoMeta.ts +0 -283
  35. package/src/index.ts +0 -26
  36. package/src/next.ts +0 -12
  37. package/src/plugin.ts +0 -344
  38. package/src/schemas/index.ts +0 -121
  39. package/src/schemas/types/index.ts +0 -20
  40. package/src/schemas/types/metaAttribute/index.ts +0 -60
  41. package/src/schemas/types/metaTag/index.ts +0 -17
  42. package/src/schemas/types/openGraph/index.ts +0 -114
  43. package/src/schemas/types/robots/index.ts +0 -26
  44. package/src/schemas/types/twitter/index.ts +0 -108
  45. package/src/types.ts +0 -108
  46. package/src/utils/fieldsUtils.ts +0 -160
  47. package/src/utils/seoUtils.ts +0 -423
  48. package/src/utils/utils.ts +0 -9
  49. package/v2-incompatible.js +0 -11
package/dist/index.mjs DELETED
@@ -1,3292 +0,0 @@
1
- import r, { createElement, useState, useCallback, useEffect, useMemo } from "react";
2
- import { useClient, useWorkspace, useFormValue, defineType, defineField, definePlugin } from "sanity";
3
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
4
- import { useIntentLink } from "sanity/router";
5
- import { usePaneRouter } from "sanity/structure";
6
- import { Stack, Text, Box } from "@sanity/ui";
7
- var __assign = function() {
8
- return __assign = Object.assign || function(t) {
9
- for (var s, i = 1, n = arguments.length; i < n; i++) {
10
- s = arguments[i];
11
- for (var p2 in s) Object.prototype.hasOwnProperty.call(s, p2) && (t[p2] = s[p2]);
12
- }
13
- return t;
14
- }, __assign.apply(this, arguments);
15
- };
16
- function __spreadArray(to, from2, pack) {
17
- if (pack || arguments.length === 2) for (var i = 0, l2 = from2.length, ar; i < l2; i++)
18
- (ar || !(i in from2)) && (ar || (ar = Array.prototype.slice.call(from2, 0, i)), ar[i] = from2[i]);
19
- return to.concat(ar || Array.prototype.slice.call(from2));
20
- }
21
- function memoize(fn) {
22
- var cache = /* @__PURE__ */ Object.create(null);
23
- return function(arg) {
24
- return cache[arg] === void 0 && (cache[arg] = fn(arg)), cache[arg];
25
- };
26
- }
27
- 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)-.*))$/, isPropValid = /* @__PURE__ */ memoize(
28
- function(prop) {
29
- return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
30
- }
31
- /* Z+1 */
32
- ), MS = "-ms-", MOZ = "-moz-", WEBKIT = "-webkit-", COMMENT = "comm", RULESET = "rule", DECLARATION = "decl", IMPORT = "@import", NAMESPACE = "@namespace", KEYFRAMES = "@keyframes", LAYER = "@layer", abs = Math.abs, from = String.fromCharCode, assign = Object.assign;
33
- function hash(value, length2) {
34
- return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
35
- }
36
- function trim(value) {
37
- return value.trim();
38
- }
39
- function match(value, pattern) {
40
- return (value = pattern.exec(value)) ? value[0] : value;
41
- }
42
- function replace(value, pattern, replacement) {
43
- return value.replace(pattern, replacement);
44
- }
45
- function indexof(value, search, position2) {
46
- return value.indexOf(search, position2);
47
- }
48
- function charat(value, index) {
49
- return value.charCodeAt(index) | 0;
50
- }
51
- function substr(value, begin, end) {
52
- return value.slice(begin, end);
53
- }
54
- function strlen(value) {
55
- return value.length;
56
- }
57
- function sizeof(value) {
58
- return value.length;
59
- }
60
- function append(value, array) {
61
- return array.push(value), value;
62
- }
63
- function combine(array, callback) {
64
- return array.map(callback).join("");
65
- }
66
- function filter(array, pattern) {
67
- return array.filter(function(value) {
68
- return !match(value, pattern);
69
- });
70
- }
71
- var line = 1, column = 1, length = 0, position = 0, character = 0, characters = "";
72
- function node(value, root, parent, type, props, children, length2, siblings) {
73
- return { value, root, parent, type, props, children, line, column, length: length2, return: "", siblings };
74
- }
75
- function copy(root, props) {
76
- return assign(node("", null, null, "", null, null, 0, root.siblings), root, { length: -root.length }, props);
77
- }
78
- function lift(root) {
79
- for (; root.root; )
80
- root = copy(root.root, { children: [root] });
81
- append(root, root.siblings);
82
- }
83
- function char() {
84
- return character;
85
- }
86
- function prev() {
87
- return character = position > 0 ? charat(characters, --position) : 0, column--, character === 10 && (column = 1, line--), character;
88
- }
89
- function next() {
90
- return character = position < length ? charat(characters, position++) : 0, column++, character === 10 && (column = 1, line++), character;
91
- }
92
- function peek() {
93
- return charat(characters, position);
94
- }
95
- function caret() {
96
- return position;
97
- }
98
- function slice(begin, end) {
99
- return substr(characters, begin, end);
100
- }
101
- function token(type) {
102
- switch (type) {
103
- // \0 \t \n \r \s whitespace token
104
- case 0:
105
- case 9:
106
- case 10:
107
- case 13:
108
- case 32:
109
- return 5;
110
- // ! + , / > @ ~ isolate token
111
- case 33:
112
- case 43:
113
- case 44:
114
- case 47:
115
- case 62:
116
- case 64:
117
- case 126:
118
- // ; { } breakpoint token
119
- case 59:
120
- case 123:
121
- case 125:
122
- return 4;
123
- // : accompanied token
124
- case 58:
125
- return 3;
126
- // " ' ( [ opening delimit token
127
- case 34:
128
- case 39:
129
- case 40:
130
- case 91:
131
- return 2;
132
- // ) ] closing delimit token
133
- case 41:
134
- case 93:
135
- return 1;
136
- }
137
- return 0;
138
- }
139
- function alloc(value) {
140
- return line = column = 1, length = strlen(characters = value), position = 0, [];
141
- }
142
- function dealloc(value) {
143
- return characters = "", value;
144
- }
145
- function delimit(type) {
146
- return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
147
- }
148
- function whitespace(type) {
149
- for (; (character = peek()) && character < 33; )
150
- next();
151
- return token(type) > 2 || token(character) > 3 ? "" : " ";
152
- }
153
- function escaping(index, count) {
154
- for (; --count && next() && !(character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97); )
155
- ;
156
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
157
- }
158
- function delimiter(type) {
159
- for (; next(); )
160
- switch (character) {
161
- // ] ) " '
162
- case type:
163
- return position;
164
- // " '
165
- case 34:
166
- case 39:
167
- type !== 34 && type !== 39 && delimiter(character);
168
- break;
169
- // (
170
- case 40:
171
- type === 41 && delimiter(type);
172
- break;
173
- // \
174
- case 92:
175
- next();
176
- break;
177
- }
178
- return position;
179
- }
180
- function commenter(type, index) {
181
- for (; next() && type + character !== 57; )
182
- if (type + character === 84 && peek() === 47)
183
- break;
184
- return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
185
- }
186
- function identifier(index) {
187
- for (; !token(peek()); )
188
- next();
189
- return slice(index, position);
190
- }
191
- function compile(value) {
192
- return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
193
- }
194
- function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
195
- for (var index = 0, offset = 0, length2 = pseudo, atrule = 0, property = 0, previous = 0, variable = 1, scanning = 1, ampersand = 1, character2 = 0, type = "", props = rules, children = rulesets, reference = rule, characters2 = type; scanning; )
196
- switch (previous = character2, character2 = next()) {
197
- // (
198
- case 40:
199
- if (previous != 108 && charat(characters2, length2 - 1) == 58) {
200
- indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1 && (ampersand = -1);
201
- break;
202
- }
203
- // " ' [
204
- case 34:
205
- case 39:
206
- case 91:
207
- characters2 += delimit(character2);
208
- break;
209
- // \t \n \r \s
210
- case 9:
211
- case 10:
212
- case 13:
213
- case 32:
214
- characters2 += whitespace(previous);
215
- break;
216
- // \
217
- case 92:
218
- characters2 += escaping(caret() - 1, 7);
219
- continue;
220
- // /
221
- case 47:
222
- switch (peek()) {
223
- case 42:
224
- case 47:
225
- append(comment(commenter(next(), caret()), root, parent, declarations), declarations), (token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters2) && substr(characters2, -1, void 0) !== " " && (characters2 += " ");
226
- break;
227
- default:
228
- characters2 += "/";
229
- }
230
- break;
231
- // {
232
- case 123 * variable:
233
- points[index++] = strlen(characters2) * ampersand;
234
- // } ; \0
235
- case 125 * variable:
236
- case 59:
237
- case 0:
238
- switch (character2) {
239
- // \0 }
240
- case 0:
241
- case 125:
242
- scanning = 0;
243
- // ;
244
- case 59 + offset:
245
- ampersand == -1 && (characters2 = replace(characters2, /\f/g, "")), property > 0 && (strlen(characters2) - length2 || variable === 0 && previous === 47) && append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
246
- break;
247
- // @ ;
248
- case 59:
249
- characters2 += ";";
250
- // { rule/at-rule
251
- default:
252
- if (append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets), character2 === 123)
253
- if (offset === 0)
254
- parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
255
- else {
256
- switch (atrule) {
257
- // c(ontainer)
258
- case 99:
259
- if (charat(characters2, 3) === 110) break;
260
- // l(ayer)
261
- case 108:
262
- if (charat(characters2, 2) === 97) break;
263
- default:
264
- offset = 0;
265
- // d(ocument) m(edia) s(upports)
266
- case 100:
267
- case 109:
268
- case 115:
269
- }
270
- 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) : parse(characters2, reference, reference, reference, [""], children, 0, points, children);
271
- }
272
- }
273
- index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
274
- break;
275
- // :
276
- case 58:
277
- length2 = 1 + strlen(characters2), property = previous;
278
- default:
279
- if (variable < 1) {
280
- if (character2 == 123)
281
- --variable;
282
- else if (character2 == 125 && variable++ == 0 && prev() == 125)
283
- continue;
284
- }
285
- switch (characters2 += from(character2), character2 * variable) {
286
- // &
287
- case 38:
288
- ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
289
- break;
290
- // ,
291
- case 44:
292
- points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
293
- break;
294
- // @
295
- case 64:
296
- peek() === 45 && (characters2 += delimit(next())), atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
297
- break;
298
- // -
299
- case 45:
300
- previous === 45 && strlen(characters2) == 2 && (variable = 0);
301
- }
302
- }
303
- return rulesets;
304
- }
305
- function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2, siblings) {
306
- for (var post = offset - 1, rule = offset === 0 ? rules : [""], size = sizeof(rule), i = 0, j2 = 0, k2 = 0; i < index; ++i)
307
- for (var x2 = 0, y2 = substr(value, post + 1, post = abs(j2 = points[i])), z2 = value; x2 < size; ++x2)
308
- (z2 = trim(j2 > 0 ? rule[x2] + " " + y2 : replace(y2, /&\f/g, rule[x2]))) && (props[k2++] = z2);
309
- return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2, siblings);
310
- }
311
- function comment(value, root, parent, siblings) {
312
- return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
313
- }
314
- function declaration(value, root, parent, length2, siblings) {
315
- return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
316
- }
317
- function prefix(value, length2, children) {
318
- switch (hash(value, length2)) {
319
- // color-adjust
320
- case 5103:
321
- return WEBKIT + "print-" + value + value;
322
- // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
323
- case 5737:
324
- case 4201:
325
- case 3177:
326
- case 3433:
327
- case 1641:
328
- case 4457:
329
- case 2921:
330
- // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
331
- case 5572:
332
- case 6356:
333
- case 5844:
334
- case 3191:
335
- case 6645:
336
- case 3005:
337
- // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
338
- case 4215:
339
- case 6389:
340
- case 5109:
341
- case 5365:
342
- case 5621:
343
- case 3829:
344
- // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position
345
- case 6391:
346
- case 5879:
347
- case 5623:
348
- case 6135:
349
- case 4599:
350
- return WEBKIT + value + value;
351
- // mask-composite
352
- case 4855:
353
- return WEBKIT + value.replace("add", "source-over").replace("substract", "source-out").replace("intersect", "source-in").replace("exclude", "xor") + value;
354
- // tab-size
355
- case 4789:
356
- return MOZ + value + value;
357
- // appearance, user-select, transform, hyphens, text-size-adjust
358
- case 5349:
359
- case 4246:
360
- case 4810:
361
- case 6968:
362
- case 2756:
363
- return WEBKIT + value + MOZ + value + MS + value + value;
364
- // writing-mode
365
- case 5936:
366
- switch (charat(value, length2 + 11)) {
367
- // vertical-l(r)
368
- case 114:
369
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
370
- // vertical-r(l)
371
- case 108:
372
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
373
- // horizontal(-)tb
374
- case 45:
375
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
376
- }
377
- // flex, flex-direction, scroll-snap-type, writing-mode
378
- case 6828:
379
- case 4268:
380
- case 2903:
381
- return WEBKIT + value + MS + value + value;
382
- // order
383
- case 6165:
384
- return WEBKIT + value + MS + "flex-" + value + value;
385
- // align-items
386
- case 5187:
387
- return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
388
- // align-self
389
- case 5443:
390
- return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/g, "") + (match(value, /flex-|baseline/) ? "" : MS + "grid-row-" + replace(value, /flex-|-self/g, "")) + value;
391
- // align-content
392
- case 4675:
393
- return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/g, "") + value;
394
- // flex-shrink
395
- case 5548:
396
- return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
397
- // flex-basis
398
- case 5292:
399
- return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
400
- // flex-grow
401
- case 6060:
402
- return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
403
- // transition
404
- case 4554:
405
- return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
406
- // cursor
407
- case 6187:
408
- return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
409
- // background, background-image
410
- case 5495:
411
- case 3959:
412
- return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
413
- // justify-content
414
- case 4968:
415
- return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /space-between/, "justify") + WEBKIT + value + value;
416
- // justify-self
417
- case 4200:
418
- if (!match(value, /flex-|baseline/)) return MS + "grid-column-align" + substr(value, length2) + value;
419
- break;
420
- // grid-template-(columns|rows)
421
- case 2592:
422
- case 3360:
423
- return MS + replace(value, "template-", "") + value;
424
- // grid-(row|column)-start
425
- case 4384:
426
- case 3616:
427
- return children && children.some(function(element, index) {
428
- return length2 = index, match(element.props, /grid-\w+-end/);
429
- }) ? ~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+/)) + ";" : MS + replace(value, "-start", "") + value;
430
- // grid-(row|column)-end
431
- case 4896:
432
- case 4128:
433
- return children && children.some(function(element) {
434
- return match(element.props, /grid-\w+-start/);
435
- }) ? value : MS + replace(replace(value, "-end", "-span"), "span ", "") + value;
436
- // (margin|padding)-inline-(start|end)
437
- case 4095:
438
- case 3583:
439
- case 4068:
440
- case 2532:
441
- return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
442
- // (min|max)?(width|height|inline-size|block-size)
443
- case 8116:
444
- case 7059:
445
- case 5753:
446
- case 5535:
447
- case 5445:
448
- case 5701:
449
- case 4933:
450
- case 4677:
451
- case 5533:
452
- case 5789:
453
- case 5021:
454
- case 4765:
455
- if (strlen(value) - 1 - length2 > 6)
456
- switch (charat(value, length2 + 1)) {
457
- // (m)ax-content, (m)in-content
458
- case 109:
459
- if (charat(value, length2 + 4) !== 45)
460
- break;
461
- // (f)ill-available, (f)it-content
462
- case 102:
463
- return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
464
- // (s)tretch
465
- case 115:
466
- return ~indexof(value, "stretch", 0) ? prefix(replace(value, "stretch", "fill-available"), length2, children) + value : value;
467
- }
468
- break;
469
- // grid-(column|row)
470
- case 5152:
471
- case 5920:
472
- return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a2, b2, c2, d2, e, f2) {
473
- return MS + a2 + ":" + b2 + f2 + (c2 ? MS + a2 + "-span:" + (d2 ? e : +e - +b2) + f2 : "") + value;
474
- });
475
- // position: sticky
476
- case 4949:
477
- if (charat(value, length2 + 6) === 121)
478
- return replace(value, ":", ":" + WEBKIT) + value;
479
- break;
480
- // display: (flex|inline-flex|grid|inline-grid)
481
- case 6444:
482
- switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
483
- // (inline-)?fle(x)
484
- case 120:
485
- return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
486
- // (inline-)?gri(d)
487
- case 100:
488
- return replace(value, ":", ":" + MS) + value;
489
- }
490
- break;
491
- // scroll-margin, scroll-margin-(top|right|bottom|left)
492
- case 5719:
493
- case 2647:
494
- case 2135:
495
- case 3927:
496
- case 2391:
497
- return replace(value, "scroll-", "scroll-snap-") + value;
498
- }
499
- return value;
500
- }
501
- function serialize(children, callback) {
502
- for (var output = "", i = 0; i < children.length; i++)
503
- output += callback(children[i], i, children, callback) || "";
504
- return output;
505
- }
506
- function stringify(element, index, children, callback) {
507
- switch (element.type) {
508
- case LAYER:
509
- if (element.children.length) break;
510
- case IMPORT:
511
- case NAMESPACE:
512
- case DECLARATION:
513
- return element.return = element.return || element.value;
514
- case COMMENT:
515
- return "";
516
- case KEYFRAMES:
517
- return element.return = element.value + "{" + serialize(element.children, callback) + "}";
518
- case RULESET:
519
- if (!strlen(element.value = element.props.join(","))) return "";
520
- }
521
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
522
- }
523
- function middleware(collection) {
524
- var length2 = sizeof(collection);
525
- return function(element, index, children, callback) {
526
- for (var output = "", i = 0; i < length2; i++)
527
- output += collection[i](element, index, children, callback) || "";
528
- return output;
529
- };
530
- }
531
- function rulesheet(callback) {
532
- return function(element) {
533
- element.root || (element = element.return) && callback(element);
534
- };
535
- }
536
- function prefixer(element, index, children, callback) {
537
- if (element.length > -1 && !element.return)
538
- switch (element.type) {
539
- case DECLARATION:
540
- element.return = prefix(element.value, element.length, children);
541
- return;
542
- case KEYFRAMES:
543
- return serialize([copy(element, { value: replace(element.value, "@", "@" + WEBKIT) })], callback);
544
- case RULESET:
545
- if (element.length)
546
- return combine(children = element.props, function(value) {
547
- switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
548
- // :read-(only|write)
549
- case ":read-only":
550
- case ":read-write":
551
- lift(copy(element, { props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")] })), lift(copy(element, { props: [value] })), assign(element, { props: filter(children, callback) });
552
- break;
553
- // :placeholder
554
- case "::placeholder":
555
- lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")] })), lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")] })), lift(copy(element, { props: [replace(value, /:(plac\w+)/, MS + "input-$1")] })), lift(copy(element, { props: [value] })), assign(element, { props: filter(children, callback) });
556
- break;
557
- }
558
- return "";
559
- });
560
- }
561
- }
562
- var unitlessKeys = {
563
- animationIterationCount: 1,
564
- aspectRatio: 1,
565
- borderImageOutset: 1,
566
- borderImageSlice: 1,
567
- borderImageWidth: 1,
568
- boxFlex: 1,
569
- boxFlexGroup: 1,
570
- boxOrdinalGroup: 1,
571
- columnCount: 1,
572
- columns: 1,
573
- flex: 1,
574
- flexGrow: 1,
575
- flexPositive: 1,
576
- flexShrink: 1,
577
- flexNegative: 1,
578
- flexOrder: 1,
579
- gridRow: 1,
580
- gridRowEnd: 1,
581
- gridRowSpan: 1,
582
- gridRowStart: 1,
583
- gridColumn: 1,
584
- gridColumnEnd: 1,
585
- gridColumnSpan: 1,
586
- gridColumnStart: 1,
587
- msGridRow: 1,
588
- msGridRowSpan: 1,
589
- msGridColumn: 1,
590
- msGridColumnSpan: 1,
591
- fontWeight: 1,
592
- lineHeight: 1,
593
- opacity: 1,
594
- order: 1,
595
- orphans: 1,
596
- scale: 1,
597
- tabSize: 1,
598
- widows: 1,
599
- zIndex: 1,
600
- zoom: 1,
601
- WebkitLineClamp: 1,
602
- // SVG-related properties
603
- fillOpacity: 1,
604
- floodOpacity: 1,
605
- stopOpacity: 1,
606
- strokeDasharray: 1,
607
- strokeDashoffset: 1,
608
- strokeMiterlimit: 1,
609
- strokeOpacity: 1,
610
- strokeWidth: 1
611
- }, a = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", c = "active", u = "data-styled-version", l = "6.3.11", p = `/*!sc*/
612
- `, d = typeof window < "u" && typeof document < "u", h = r.createContext === void 0, f = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), y = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
613
-
614
- `, 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.
615
-
616
- - Are you trying to reuse it across renders?
617
- - Are you accidentally calling collectStyles twice?
618
-
619
- `, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
620
-
621
- `, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
622
-
623
- - Does this error occur on the client and is your target falsy?
624
- - Does this error occur on the server and is the sheet falsy?
625
-
626
- `, 5: `The clone method cannot be used on the client!
627
-
628
- - Are you running in a client-like environment on the server?
629
- - Are you trying to run SSR on the client?
630
-
631
- `, 6: `Trying to insert a new style tag, but the given Node is unmounted!
632
-
633
- - Are you using a custom target that isn't mounted?
634
- - Does your document not have a valid head element?
635
- - Have you accidentally removed a style tag manually?
636
-
637
- `, 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.
638
-
639
- `, 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
640
-
641
- `, 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.
642
-
643
- `, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.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://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
644
-
645
- `, 14: `ThemeProvider: "theme" prop is required.
646
-
647
- `, 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.
648
- You may only create up to 1,073,741,824 components. If you're creating components dynamically,
649
- as for instance in your render method then you may be running into this limitation.
650
-
651
- `, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
652
- Has styled-components' style tag been unmounted or altered by another script?
653
- `, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
654
- function v() {
655
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
656
- for (var n = e[0], r2 = [], o = 1, s = e.length; o < s; o += 1) r2.push(e[o]);
657
- return r2.forEach(function(e2) {
658
- n = n.replace(/%[a-z]/, e2);
659
- }), n;
660
- }
661
- function g(t) {
662
- for (var n = [], r2 = 1; r2 < arguments.length; r2++) n[r2 - 1] = arguments[r2];
663
- return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(n.length > 0 ? " Args: ".concat(n.join(", ")) : "")) : new Error(v.apply(void 0, __spreadArray([y[t]], n, !1)).trim());
664
- }
665
- var S = 1 << 30, w = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), N = 1, C = function(e) {
666
- if (w.has(e)) return w.get(e);
667
- for (; b.has(N); ) N++;
668
- var t = N++;
669
- if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > S)) throw g(16, "".concat(t));
670
- return w.set(e, t), b.set(t, e), t;
671
- }, E = function(e, t) {
672
- N = t + 1, w.set(e, t), b.set(t, e);
673
- }, _ = /invalid hook call/i, A = /* @__PURE__ */ new Set(), I = function(t, n) {
674
- if (process.env.NODE_ENV !== "production") {
675
- if (h) return;
676
- var o = n ? ' with the id of "'.concat(n, '"') : "", s = "The component ".concat(t).concat(o, ` has been created dynamically.
677
- `) + `You may see this warning because you've called styled inside another component.
678
- To resolve this only create new StyledComponents outside of any render method and function component.
679
- See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
680
- `, i = console.error;
681
- try {
682
- var a2 = !0;
683
- console.error = function(t2) {
684
- for (var n2 = [], r2 = 1; r2 < arguments.length; r2++) n2[r2 - 1] = arguments[r2];
685
- _.test(t2) ? (a2 = !1, A.delete(s)) : i.apply(void 0, __spreadArray([t2], n2, !1));
686
- }, typeof r.useState == "function" && r.useState(null), a2 && !A.has(s) && (console.warn(s), A.add(s));
687
- } catch (e) {
688
- _.test(e.message) && A.delete(s);
689
- } finally {
690
- console.error = i;
691
- }
692
- }
693
- }, P = Object.freeze([]), O = Object.freeze({});
694
- function D(e, t, n) {
695
- return n === void 0 && (n = O), e.theme !== n.theme && e.theme || t || n.theme;
696
- }
697
- var T = /* @__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"]), R = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, x = /(^-|-$)/g;
698
- function j(e) {
699
- return e.replace(R, "-").replace(x, "");
700
- }
701
- var k = /(a)(d)/gi, M = function(e) {
702
- return String.fromCharCode(e + (e > 25 ? 39 : 97));
703
- };
704
- function V(e) {
705
- var t, n = "";
706
- for (t = Math.abs(e); t > 52; t = t / 52 | 0) n = M(t % 52) + n;
707
- return (M(t % 52) + n).replace(k, "$1-$2");
708
- }
709
- var F, G = function(e, t) {
710
- for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n);
711
- return e;
712
- }, z = function(e) {
713
- return G(5381, e);
714
- };
715
- function B(e) {
716
- return V(z(e) >>> 0);
717
- }
718
- function L(e) {
719
- return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
720
- }
721
- function $(e) {
722
- return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
723
- }
724
- var Y = typeof Symbol == "function" && Symbol.for, W = Y ? Symbol.for("react.memo") : 60115, q = Y ? Symbol.for("react.forward_ref") : 60112, H = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, U = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, J = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, X = ((F = {})[q] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, F[W] = J, F);
725
- function Z(e) {
726
- return ("type" in (t = e) && t.type.$$typeof) === W ? J : "$$typeof" in e ? X[e.$$typeof] : H;
727
- var t;
728
- }
729
- var K = Object.defineProperty, Q = Object.getOwnPropertyNames, ee = Object.getOwnPropertySymbols, te = Object.getOwnPropertyDescriptor, ne = Object.getPrototypeOf, re = Object.prototype;
730
- function oe(e, t, n) {
731
- if (typeof t != "string") {
732
- if (re) {
733
- var r2 = ne(t);
734
- r2 && r2 !== re && oe(e, r2, n);
735
- }
736
- var o = Q(t);
737
- ee && (o = o.concat(ee(t)));
738
- for (var s = Z(e), i = Z(t), a2 = 0; a2 < o.length; ++a2) {
739
- var c2 = o[a2];
740
- if (!(c2 in U || n && n[c2] || i && c2 in i || s && c2 in s)) {
741
- var u2 = te(t, c2);
742
- try {
743
- K(e, c2, u2);
744
- } catch {
745
- }
746
- }
747
- }
748
- }
749
- return e;
750
- }
751
- function se(e) {
752
- return typeof e == "function";
753
- }
754
- function ie(e) {
755
- return typeof e == "object" && "styledComponentId" in e;
756
- }
757
- function ae(e, t) {
758
- return e && t ? "".concat(e, " ").concat(t) : e || t || "";
759
- }
760
- function ce(e, t) {
761
- return e.join("");
762
- }
763
- function ue(e) {
764
- return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
765
- }
766
- function le(e, t, n) {
767
- if (n === void 0 && (n = !1), !n && !ue(e) && !Array.isArray(e)) return t;
768
- if (Array.isArray(t)) for (var r2 = 0; r2 < t.length; r2++) e[r2] = le(e[r2], t[r2]);
769
- else if (ue(t)) for (var r2 in t) e[r2] = le(e[r2], t[r2]);
770
- return e;
771
- }
772
- function pe(e, t) {
773
- Object.defineProperty(e, "toString", { value: t });
774
- }
775
- var de = (function() {
776
- function e(e2) {
777
- this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e2, this._cGroup = 0, this._cIndex = 0;
778
- }
779
- return e.prototype.indexOfGroup = function(e2) {
780
- if (e2 === this._cGroup) return this._cIndex;
781
- var t = this._cIndex;
782
- if (e2 > this._cGroup) for (var n = this._cGroup; n < e2; n++) t += this.groupSizes[n];
783
- else for (n = this._cGroup - 1; n >= e2; n--) t -= this.groupSizes[n];
784
- return this._cGroup = e2, this._cIndex = t, t;
785
- }, e.prototype.insertRules = function(e2, t) {
786
- if (e2 >= this.groupSizes.length) {
787
- for (var n = this.groupSizes, r2 = n.length, o = r2; e2 >= o; ) if ((o <<= 1) < 0) throw g(16, "".concat(e2));
788
- this.groupSizes = new Uint32Array(o), this.groupSizes.set(n), this.length = o;
789
- for (var s = r2; s < o; s++) this.groupSizes[s] = 0;
790
- }
791
- for (var i = this.indexOfGroup(e2 + 1), a2 = 0, c2 = (s = 0, t.length); s < c2; s++) this.tag.insertRule(i, t[s]) && (this.groupSizes[e2]++, i++, a2++);
792
- a2 > 0 && this._cGroup > e2 && (this._cIndex += a2);
793
- }, e.prototype.clearGroup = function(e2) {
794
- if (e2 < this.length) {
795
- var t = this.groupSizes[e2], n = this.indexOfGroup(e2), r2 = n + t;
796
- this.groupSizes[e2] = 0;
797
- for (var o = n; o < r2; o++) this.tag.deleteRule(n);
798
- t > 0 && this._cGroup > e2 && (this._cIndex -= t);
799
- }
800
- }, e.prototype.getGroup = function(e2) {
801
- var t = "";
802
- if (e2 >= this.length || this.groupSizes[e2] === 0) return t;
803
- for (var n = this.groupSizes[e2], r2 = this.indexOfGroup(e2), o = r2 + n, s = r2; s < o; s++) t += this.tag.getRule(s) + p;
804
- return t;
805
- }, e;
806
- })(), he = "style[".concat(a, "][").concat(u, '="').concat(l, '"]'), fe = new RegExp("^".concat(a, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), me = function(e) {
807
- return typeof ShadowRoot < "u" && e instanceof ShadowRoot || "host" in e && e.nodeType === 11;
808
- }, ye = function(e) {
809
- if (!e) return document;
810
- if (me(e)) return e;
811
- if ("getRootNode" in e) {
812
- var t = e.getRootNode();
813
- if (me(t)) return t;
814
- }
815
- return document;
816
- }, ve = function(e, t, n) {
817
- for (var r2, o = n.split(","), s = 0, i = o.length; s < i; s++) (r2 = o[s]) && e.registerName(t, r2);
818
- }, ge = function(e, t) {
819
- for (var n, r2 = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(p), o = [], s = 0, i = r2.length; s < i; s++) {
820
- var a2 = r2[s].trim();
821
- if (a2) {
822
- var c2 = a2.match(fe);
823
- if (c2) {
824
- var u2 = 0 | parseInt(c2[1], 10), l2 = c2[2];
825
- u2 !== 0 && (E(l2, u2), ve(e, l2, c2[3]), e.getTag().insertRules(u2, o)), o.length = 0;
826
- } else o.push(a2);
827
- }
828
- }
829
- }, Se = function(e) {
830
- for (var t = ye(e.options.target).querySelectorAll(he), n = 0, r2 = t.length; n < r2; n++) {
831
- var o = t[n];
832
- o && o.getAttribute(a) !== c && (ge(e, o), o.parentNode && o.parentNode.removeChild(o));
833
- }
834
- };
835
- function we() {
836
- return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
837
- }
838
- var be = function(e) {
839
- var t = document.head, n = e || t, r2 = document.createElement("style"), o = (function(e2) {
840
- var t2 = Array.from(e2.querySelectorAll("style[".concat(a, "]")));
841
- return t2[t2.length - 1];
842
- })(n), s = o !== void 0 ? o.nextSibling : null;
843
- r2.setAttribute(a, c), r2.setAttribute(u, l);
844
- var i = we();
845
- return i && r2.setAttribute("nonce", i), n.insertBefore(r2, s), r2;
846
- }, Ne = (function() {
847
- function e(e2) {
848
- this.element = be(e2), this.element.appendChild(document.createTextNode("")), this.sheet = (function(e3) {
849
- var t;
850
- if (e3.sheet) return e3.sheet;
851
- for (var n = (t = e3.getRootNode().styleSheets) !== null && t !== void 0 ? t : document.styleSheets, r2 = 0, o = n.length; r2 < o; r2++) {
852
- var s = n[r2];
853
- if (s.ownerNode === e3) return s;
854
- }
855
- throw g(17);
856
- })(this.element), this.length = 0;
857
- }
858
- return e.prototype.insertRule = function(e2, t) {
859
- try {
860
- return this.sheet.insertRule(t, e2), this.length++, !0;
861
- } catch {
862
- return !1;
863
- }
864
- }, e.prototype.deleteRule = function(e2) {
865
- this.sheet.deleteRule(e2), this.length--;
866
- }, e.prototype.getRule = function(e2) {
867
- var t = this.sheet.cssRules[e2];
868
- return t && t.cssText ? t.cssText : "";
869
- }, e;
870
- })(), Ce = (function() {
871
- function e(e2) {
872
- this.element = be(e2), this.nodes = this.element.childNodes, this.length = 0;
873
- }
874
- return e.prototype.insertRule = function(e2, t) {
875
- if (e2 <= this.length && e2 >= 0) {
876
- var n = document.createTextNode(t);
877
- return this.element.insertBefore(n, this.nodes[e2] || null), this.length++, !0;
878
- }
879
- return !1;
880
- }, e.prototype.deleteRule = function(e2) {
881
- this.element.removeChild(this.nodes[e2]), this.length--;
882
- }, e.prototype.getRule = function(e2) {
883
- return e2 < this.length ? this.nodes[e2].textContent : "";
884
- }, e;
885
- })(), Ee = (function() {
886
- function e(e2) {
887
- this.rules = [], this.length = 0;
888
- }
889
- return e.prototype.insertRule = function(e2, t) {
890
- return e2 <= this.length && (e2 === this.length ? this.rules.push(t) : this.rules.splice(e2, 0, t), this.length++, !0);
891
- }, e.prototype.deleteRule = function(e2) {
892
- this.rules.splice(e2, 1), this.length--;
893
- }, e.prototype.getRule = function(e2) {
894
- return e2 < this.length ? this.rules[e2] : "";
895
- }, e;
896
- })(), _e = d, Ae = { isServer: !d, useCSSOMInjection: !f }, Ie = (function() {
897
- function e(e2, n, r2) {
898
- e2 === void 0 && (e2 = O), n === void 0 && (n = {});
899
- var o = this;
900
- this.options = __assign(__assign({}, Ae), e2), this.gs = n, this.names = new Map(r2), this.server = !!e2.isServer, !this.server && d && _e && (_e = !1, Se(this)), pe(this, function() {
901
- return (function(e3) {
902
- for (var t = e3.getTag(), n2 = t.length, r3 = "", o2 = function(n3) {
903
- var o3 = (function(e4) {
904
- return b.get(e4);
905
- })(n3);
906
- if (o3 === void 0) return "continue";
907
- var s2 = e3.names.get(o3);
908
- if (s2 === void 0 || !s2.size) return "continue";
909
- var i = t.getGroup(n3);
910
- if (i.length === 0) return "continue";
911
- var c2 = a + ".g" + n3 + '[id="' + o3 + '"]', u2 = "";
912
- s2.forEach(function(e4) {
913
- e4.length > 0 && (u2 += e4 + ",");
914
- }), r3 += i + c2 + '{content:"' + u2 + '"}' + p;
915
- }, s = 0; s < n2; s++) o2(s);
916
- return r3;
917
- })(o);
918
- });
919
- }
920
- return e.registerId = function(e2) {
921
- return C(e2);
922
- }, e.prototype.rehydrate = function() {
923
- !this.server && d && Se(this);
924
- }, e.prototype.reconstructWithOptions = function(n, r2) {
925
- r2 === void 0 && (r2 = !0);
926
- var o = new e(__assign(__assign({}, this.options), n), this.gs, r2 && this.names || void 0);
927
- return !this.server && d && n.target !== this.options.target && ye(this.options.target) !== ye(n.target) && Se(o), o;
928
- }, e.prototype.allocateGSInstance = function(e2) {
929
- return this.gs[e2] = (this.gs[e2] || 0) + 1;
930
- }, e.prototype.getTag = function() {
931
- return this.tag || (this.tag = (e2 = (function(e3) {
932
- var t = e3.useCSSOMInjection, n = e3.target;
933
- return e3.isServer ? new Ee(n) : t ? new Ne(n) : new Ce(n);
934
- })(this.options), new de(e2)));
935
- var e2;
936
- }, e.prototype.hasNameForId = function(e2, t) {
937
- var n, r2;
938
- return (r2 = (n = this.names.get(e2)) === null || n === void 0 ? void 0 : n.has(t)) !== null && r2 !== void 0 && r2;
939
- }, e.prototype.registerName = function(e2, t) {
940
- C(e2);
941
- var n = this.names.get(e2);
942
- n ? n.add(t) : this.names.set(e2, /* @__PURE__ */ new Set([t]));
943
- }, e.prototype.insertRules = function(e2, t, n) {
944
- this.registerName(e2, t), this.getTag().insertRules(C(e2), n);
945
- }, e.prototype.clearNames = function(e2) {
946
- this.names.has(e2) && this.names.get(e2).clear();
947
- }, e.prototype.clearRules = function(e2) {
948
- this.getTag().clearGroup(C(e2)), this.clearNames(e2);
949
- }, e.prototype.clearTag = function() {
950
- this.tag = void 0;
951
- }, e;
952
- })(), Pe = /&/g, Oe = 47, De = 42;
953
- function Te(e) {
954
- if (e.indexOf("}") === -1) return !1;
955
- for (var t = e.length, n = 0, r2 = 0, o = !1, s = 0; s < t; s++) {
956
- var i = e.charCodeAt(s);
957
- if (r2 !== 0 || o || i !== Oe || e.charCodeAt(s + 1) !== De) if (o) i === De && e.charCodeAt(s + 1) === Oe && (o = !1, s++);
958
- else if (i !== 34 && i !== 39 || s !== 0 && e.charCodeAt(s - 1) === 92) {
959
- if (r2 === 0) {
960
- if (i === 123) n++;
961
- else if (i === 125 && --n < 0) return !0;
962
- }
963
- } else r2 === 0 ? r2 = i : r2 === i && (r2 = 0);
964
- else o = !0, s++;
965
- }
966
- return n !== 0 || r2 !== 0;
967
- }
968
- function Re(e, t) {
969
- return e.map(function(e2) {
970
- return e2.type === "rule" && (e2.value = "".concat(t, " ").concat(e2.value), e2.value = e2.value.replaceAll(",", ",".concat(t, " ")), e2.props = e2.props.map(function(e3) {
971
- return "".concat(t, " ").concat(e3);
972
- })), Array.isArray(e2.children) && e2.type !== "@keyframes" && (e2.children = Re(e2.children, t)), e2;
973
- });
974
- }
975
- function xe(e) {
976
- var t, n, r2, o = O, i = o.options, a2 = i === void 0 ? O : i, c2 = o.plugins, u2 = c2 === void 0 ? P : c2, l2 = function(e2, r3, o2) {
977
- return o2.startsWith(n) && o2.endsWith(n) && o2.replaceAll(n, "").length > 0 ? ".".concat(t) : e2;
978
- }, p2 = u2.slice();
979
- p2.push(function(e2) {
980
- e2.type === RULESET && e2.value.includes("&") && (r2 || (r2 = new RegExp("\\".concat(n, "\\b"), "g")), e2.props[0] = e2.props[0].replace(Pe, n).replace(r2, l2));
981
- }), a2.prefix && p2.push(prefixer), p2.push(stringify);
982
- var d2 = [], h2 = middleware(p2.concat(rulesheet(function(e2) {
983
- return d2.push(e2);
984
- }))), f2 = function(e2, o2, i2, c3) {
985
- o2 === void 0 && (o2 = ""), i2 === void 0 && (i2 = ""), c3 === void 0 && (c3 = "&"), t = c3, n = o2, r2 = void 0;
986
- var u3 = (function(e3) {
987
- if (!Te(e3)) return e3;
988
- for (var t2 = e3.length, n2 = "", r3 = 0, o3 = 0, s = 0, i3 = !1, a3 = 0; a3 < t2; a3++) {
989
- var c4 = e3.charCodeAt(a3);
990
- if (s !== 0 || i3 || c4 !== Oe || e3.charCodeAt(a3 + 1) !== De) if (i3) c4 === De && e3.charCodeAt(a3 + 1) === Oe && (i3 = !1, a3++);
991
- else if (c4 !== 34 && c4 !== 39 || a3 !== 0 && e3.charCodeAt(a3 - 1) === 92) {
992
- if (s === 0) if (c4 === 123) o3++;
993
- else if (c4 === 125) {
994
- if (--o3 < 0) {
995
- for (var u4 = a3 + 1; u4 < t2; ) {
996
- var l4 = e3.charCodeAt(u4);
997
- if (l4 === 59 || l4 === 10) break;
998
- u4++;
999
- }
1000
- u4 < t2 && e3.charCodeAt(u4) === 59 && u4++, o3 = 0, a3 = u4 - 1, r3 = u4;
1001
- continue;
1002
- }
1003
- o3 === 0 && (n2 += e3.substring(r3, a3 + 1), r3 = a3 + 1);
1004
- } else c4 === 59 && o3 === 0 && (n2 += e3.substring(r3, a3 + 1), r3 = a3 + 1);
1005
- } else s === 0 ? s = c4 : s === c4 && (s = 0);
1006
- else i3 = !0, a3++;
1007
- }
1008
- if (r3 < t2) {
1009
- var p3 = e3.substring(r3);
1010
- Te(p3) || (n2 += p3);
1011
- }
1012
- return n2;
1013
- })((function(e3) {
1014
- if (e3.indexOf("//") === -1) return e3;
1015
- for (var t2 = e3.length, n2 = [], r3 = 0, o3 = 0, s = 0, i3 = 0; o3 < t2; ) {
1016
- var a3 = e3.charCodeAt(o3);
1017
- if (a3 !== 34 && a3 !== 39 || o3 !== 0 && e3.charCodeAt(o3 - 1) === 92) if (s === 0) if (a3 === Oe && o3 + 1 < t2 && e3.charCodeAt(o3 + 1) === De) {
1018
- for (o3 += 2; o3 + 1 < t2 && (e3.charCodeAt(o3) !== De || e3.charCodeAt(o3 + 1) !== Oe); ) o3++;
1019
- o3 += 2;
1020
- } else if (a3 === 40 && o3 >= 3 && (32 | e3.charCodeAt(o3 - 1)) == 108 && (32 | e3.charCodeAt(o3 - 2)) == 114 && (32 | e3.charCodeAt(o3 - 3)) == 117) i3 = 1, o3++;
1021
- else if (i3 > 0) a3 === 41 ? i3-- : a3 === 40 && i3++, o3++;
1022
- else if (a3 === De && o3 + 1 < t2 && e3.charCodeAt(o3 + 1) === Oe) o3 > r3 && n2.push(e3.substring(r3, o3)), r3 = o3 += 2;
1023
- else if (a3 === Oe && o3 + 1 < t2 && e3.charCodeAt(o3 + 1) === Oe) {
1024
- for (o3 > r3 && n2.push(e3.substring(r3, o3)); o3 < t2 && e3.charCodeAt(o3) !== 10; ) o3++;
1025
- r3 = o3;
1026
- } else o3++;
1027
- else o3++;
1028
- else s === 0 ? s = a3 : s === a3 && (s = 0), o3++;
1029
- }
1030
- return r3 === 0 ? e3 : (r3 < t2 && n2.push(e3.substring(r3)), n2.join(""));
1031
- })(e2)), l3 = compile(i2 || o2 ? "".concat(i2, " ").concat(o2, " { ").concat(u3, " }") : u3);
1032
- return a2.namespace && (l3 = Re(l3, a2.namespace)), d2 = [], serialize(l3, h2), d2;
1033
- };
1034
- return f2.hash = u2.length ? u2.reduce(function(e2, t2) {
1035
- return t2.name || g(15), G(e2, t2.name);
1036
- }, 5381).toString() : "", f2;
1037
- }
1038
- var je = new Ie(), ke = xe(), Me = { shouldForwardProp: void 0, styleSheet: je, stylis: ke }, Ve = h ? { Provider: function(e) {
1039
- return e.children;
1040
- }, Consumer: function(e) {
1041
- return (0, e.children)(Me);
1042
- } } : r.createContext(Me);
1043
- h || r.createContext(void 0);
1044
- function ze() {
1045
- return h ? Me : r.useContext(Ve);
1046
- }
1047
- var Le = (function() {
1048
- function e(e2, t) {
1049
- var n = this;
1050
- this.inject = function(e3, t2) {
1051
- t2 === void 0 && (t2 = ke);
1052
- var r2 = n.name + t2.hash;
1053
- e3.hasNameForId(n.id, r2) || e3.insertRules(n.id, r2, t2(n.rules, r2, "@keyframes"));
1054
- }, this.name = e2, this.id = "sc-keyframes-".concat(e2), this.rules = t, pe(this, function() {
1055
- throw g(12, String(n.name));
1056
- });
1057
- }
1058
- return e.prototype.getName = function(e2) {
1059
- return e2 === void 0 && (e2 = ke), this.name + e2.hash;
1060
- }, e;
1061
- })();
1062
- function $e(e, t) {
1063
- return t == null || typeof t == "boolean" || t === "" ? "" : typeof t != "number" || t === 0 || e in unitlessKeys || e.startsWith("--") ? String(t).trim() : "".concat(t, "px");
1064
- }
1065
- var Ye = function(e) {
1066
- return e >= "A" && e <= "Z";
1067
- };
1068
- function We(e) {
1069
- for (var t = "", n = 0; n < e.length; n++) {
1070
- var r2 = e[n];
1071
- if (n === 1 && r2 === "-" && e[0] === "-") return e;
1072
- Ye(r2) ? t += "-" + r2.toLowerCase() : t += r2;
1073
- }
1074
- return t.startsWith("ms-") ? "-" + t : t;
1075
- }
1076
- var qe = function(e) {
1077
- return e == null || e === !1 || e === "";
1078
- }, He = function(t) {
1079
- var n = [];
1080
- for (var r2 in t) {
1081
- var o = t[r2];
1082
- t.hasOwnProperty(r2) && !qe(o) && (Array.isArray(o) && o.isCss || se(o) ? n.push("".concat(We(r2), ":"), o, ";") : ue(o) ? n.push.apply(n, __spreadArray(__spreadArray(["".concat(r2, " {")], He(o), !1), ["}"], !1)) : n.push("".concat(We(r2), ": ").concat($e(r2, o), ";")));
1083
- }
1084
- return n;
1085
- };
1086
- function Ue(e, t, n, r2, o) {
1087
- if (o === void 0 && (o = []), typeof e == "string") return e && o.push(e), o;
1088
- if (qe(e)) return o;
1089
- if (ie(e)) return o.push(".".concat(e.styledComponentId)), o;
1090
- if (se(e)) {
1091
- if (!se(i = e) || i.prototype && i.prototype.isReactComponent || !t) return o.push(e), o;
1092
- var s = e(t);
1093
- return process.env.NODE_ENV === "production" || typeof s != "object" || Array.isArray(s) || s instanceof Le || ue(s) || s === null || console.error("".concat(L(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Ue(s, t, n, r2, o);
1094
- }
1095
- var i;
1096
- if (e instanceof Le) return n ? (e.inject(n, r2), o.push(e.getName(r2))) : o.push(e), o;
1097
- if (ue(e)) {
1098
- for (var a2 = He(e), c2 = 0; c2 < a2.length; c2++) o.push(a2[c2]);
1099
- return o;
1100
- }
1101
- if (!Array.isArray(e)) return o.push(e.toString()), o;
1102
- for (c2 = 0; c2 < e.length; c2++) Ue(e[c2], t, n, r2, o);
1103
- return o;
1104
- }
1105
- function Je(e) {
1106
- for (var t = 0; t < e.length; t += 1) {
1107
- var n = e[t];
1108
- if (se(n) && !ie(n)) return !1;
1109
- }
1110
- return !0;
1111
- }
1112
- var Xe = z(l), Ze = (function() {
1113
- function e(e2, t, n) {
1114
- this.rules = e2, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (n === void 0 || n.isStatic) && Je(e2), this.componentId = t, this.baseHash = G(Xe, t), this.baseStyle = n, Ie.registerId(t);
1115
- }
1116
- return e.prototype.generateAndInjectStyles = function(e2, t, n) {
1117
- var r2 = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e2, t, n).className : "";
1118
- if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) r2 = ae(r2, this.staticRulesId);
1119
- else {
1120
- var o = ce(Ue(this.rules, e2, t, n)), s = V(G(this.baseHash, o) >>> 0);
1121
- if (!t.hasNameForId(this.componentId, s)) {
1122
- var i = n(o, ".".concat(s), void 0, this.componentId);
1123
- t.insertRules(this.componentId, s, i);
1124
- }
1125
- r2 = ae(r2, s), this.staticRulesId = s;
1126
- }
1127
- else {
1128
- for (var a2 = G(this.baseHash, n.hash), c2 = "", u2 = 0; u2 < this.rules.length; u2++) {
1129
- var l2 = this.rules[u2];
1130
- if (typeof l2 == "string") c2 += l2, process.env.NODE_ENV !== "production" && (a2 = G(a2, l2));
1131
- else if (l2) {
1132
- var p2 = ce(Ue(l2, e2, t, n));
1133
- a2 = G(G(a2, String(u2)), p2), c2 += p2;
1134
- }
1135
- }
1136
- if (c2) {
1137
- var d2 = V(a2 >>> 0);
1138
- if (!t.hasNameForId(this.componentId, d2)) {
1139
- var h2 = n(c2, ".".concat(d2), void 0, this.componentId);
1140
- t.insertRules(this.componentId, d2, h2);
1141
- }
1142
- r2 = ae(r2, d2);
1143
- }
1144
- }
1145
- return { className: r2, css: typeof window > "u" ? t.getTag().getGroup(C(this.componentId)) : "" };
1146
- }, e;
1147
- })(), Ke = h ? { Provider: function(e) {
1148
- return e.children;
1149
- }, Consumer: function(e) {
1150
- return (0, e.children)(void 0);
1151
- } } : r.createContext(void 0), nt = {}, rt = /* @__PURE__ */ new Set();
1152
- function ot(s, i, a2) {
1153
- var c2 = ie(s), u2 = s, p2 = !$(s), d2 = i.attrs, f2 = d2 === void 0 ? P : d2, m = i.componentId, y2 = m === void 0 ? (function(e, t) {
1154
- var n = typeof e != "string" ? "sc" : j(e);
1155
- nt[n] = (nt[n] || 0) + 1;
1156
- var r2 = "".concat(n, "-").concat(B(l + n + nt[n]));
1157
- return t ? "".concat(t, "-").concat(r2) : r2;
1158
- })(i.displayName, i.parentComponentId) : m, v2 = i.displayName, g2 = v2 === void 0 ? (function(e) {
1159
- return $(e) ? "styled.".concat(e) : "Styled(".concat(L(e), ")");
1160
- })(s) : v2, S2 = i.displayName && i.componentId ? "".concat(j(i.displayName), "-").concat(i.componentId) : i.componentId || y2, w2 = c2 && u2.attrs ? u2.attrs.concat(f2).filter(Boolean) : f2, b2 = i.shouldForwardProp;
1161
- if (c2 && u2.shouldForwardProp) {
1162
- var N2 = u2.shouldForwardProp;
1163
- if (i.shouldForwardProp) {
1164
- var E2 = i.shouldForwardProp;
1165
- b2 = function(e, t) {
1166
- return N2(e, t) && E2(e, t);
1167
- };
1168
- } else b2 = N2;
1169
- }
1170
- var _2 = new Ze(a2, S2, c2 ? u2.componentStyle : void 0);
1171
- function A2(s2, i2) {
1172
- return (function(s3, i3, a3) {
1173
- var c3 = s3.attrs, u3 = s3.componentStyle, l2 = s3.defaultProps, p3 = s3.foldedComponentIds, d3 = s3.styledComponentId, f3 = s3.target, m2 = h ? void 0 : r.useContext(Ke), y3 = ze(), v3 = s3.shouldForwardProp || y3.shouldForwardProp;
1174
- process.env.NODE_ENV !== "production" && r.useDebugValue && r.useDebugValue(d3);
1175
- var g3 = D(i3, m2, l2) || (h ? void 0 : O), S3 = (function(e, n, r2) {
1176
- for (var o, s4 = __assign(__assign({}, n), { className: void 0, theme: r2 }), i4 = 0; i4 < e.length; i4 += 1) {
1177
- var a4 = se(o = e[i4]) ? o(s4) : o;
1178
- for (var c4 in a4) c4 === "className" ? s4.className = ae(s4.className, a4[c4]) : c4 === "style" ? s4.style = __assign(__assign({}, s4.style), a4[c4]) : s4[c4] = a4[c4];
1179
- }
1180
- return "className" in n && typeof n.className == "string" && (s4.className = ae(s4.className, n.className)), s4;
1181
- })(c3, i3, g3), w3 = S3.as || f3, b3 = {};
1182
- for (var N3 in S3) S3[N3] === void 0 || N3[0] === "$" || N3 === "as" || N3 === "theme" && S3.theme === g3 || (N3 === "forwardedAs" ? b3.as = S3.forwardedAs : v3 && !v3(N3, w3) || (b3[N3] = S3[N3], v3 || process.env.NODE_ENV !== "development" || isPropValid(N3) || rt.has(N3) || !T.has(w3) || (rt.add(N3), console.warn('styled-components: it looks like an unknown prop "'.concat(N3, '" 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.)')))));
1183
- var E3 = (function(e, t) {
1184
- var n = ze(), o = e.generateAndInjectStyles(t, n.styleSheet, n.stylis);
1185
- return process.env.NODE_ENV !== "production" && r.useDebugValue && r.useDebugValue(o.className), o;
1186
- })(u3, S3), _3 = E3.className;
1187
- process.env.NODE_ENV !== "production" && s3.warnTooManyClasses && s3.warnTooManyClasses(_3);
1188
- var A3 = ae(p3, d3);
1189
- _3 && (A3 += " " + _3), S3.className && (A3 += " " + S3.className), b3[$(w3) && !T.has(w3) ? "class" : "className"] = A3, a3 && (b3.ref = a3);
1190
- var I2 = createElement(w3, b3);
1191
- if (h) {
1192
- for (var P2 = [], R3 = u3, x2 = function() {
1193
- var e = y3.styleSheet.getTag().getGroup(C(R3.componentId));
1194
- if (e) {
1195
- var t = "", n = y3.styleSheet.names.get(R3.componentId);
1196
- n && n.forEach(function(e2) {
1197
- t && (t += "_"), t += e2;
1198
- }), P2.push(r.createElement("style", { key: "sc-".concat(R3.componentId), precedence: "styled-components", href: "sc-".concat(R3.componentId, "-").concat(t), children: e }));
1199
- }
1200
- R3 = R3.baseStyle;
1201
- }; R3; ) x2();
1202
- if (P2.length) return P2.reverse(), r.createElement.apply(r, __spreadArray(__spreadArray([r.Fragment, null], P2, !1), [I2], !1));
1203
- }
1204
- return I2;
1205
- })(R2, s2, i2);
1206
- }
1207
- A2.displayName = g2;
1208
- var R2 = r.forwardRef(A2);
1209
- return R2.attrs = w2, R2.componentStyle = _2, R2.displayName = g2, R2.shouldForwardProp = b2, R2.foldedComponentIds = c2 ? ae(u2.foldedComponentIds, u2.styledComponentId) : "", R2.styledComponentId = S2, R2.target = c2 ? u2.target : s, Object.defineProperty(R2, "defaultProps", { get: function() {
1210
- return this._foldedDefaultProps;
1211
- }, set: function(e) {
1212
- this._foldedDefaultProps = c2 ? (function(e2) {
1213
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
1214
- for (var r2 = 0, o = t; r2 < o.length; r2++) le(e2, o[r2], !0);
1215
- return e2;
1216
- })({}, u2.defaultProps, e) : e;
1217
- } }), process.env.NODE_ENV !== "production" && (I(g2, S2), R2.warnTooManyClasses = /* @__PURE__ */ (function(e, t) {
1218
- var n = {}, r2 = !1;
1219
- return function(o) {
1220
- if (!r2 && (n[o] = !0, Object.keys(n).length >= 200)) {
1221
- var s2 = t ? ' with the id of "'.concat(t, '"') : "";
1222
- console.warn("Over ".concat(200, " classes were generated for component ").concat(e).concat(s2, `.
1223
- `) + `Consider using the attrs method, together with a style object for frequently changed styles.
1224
- Example:
1225
- const Component = styled.div.attrs(props => ({
1226
- style: {
1227
- background: props.background,
1228
- },
1229
- }))\`width: 100%;\`
1230
-
1231
- <Component />`), r2 = !0, n = {};
1232
- }
1233
- };
1234
- })(g2, S2)), pe(R2, function() {
1235
- return ".".concat(R2.styledComponentId);
1236
- }), p2 && oe(R2, s, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), R2;
1237
- }
1238
- function st(e, t) {
1239
- for (var n = [e[0]], r2 = 0, o = t.length; r2 < o; r2 += 1) n.push(t[r2], e[r2 + 1]);
1240
- return n;
1241
- }
1242
- var it = function(e) {
1243
- return Object.assign(e, { isCss: !0 });
1244
- };
1245
- function at(t) {
1246
- for (var n = [], r2 = 1; r2 < arguments.length; r2++) n[r2 - 1] = arguments[r2];
1247
- if (se(t) || ue(t)) return it(Ue(st(P, __spreadArray([t], n, !0))));
1248
- var o = t;
1249
- return n.length === 0 && o.length === 1 && typeof o[0] == "string" ? Ue(o) : it(Ue(st(o, n)));
1250
- }
1251
- function ct(n, r2, o) {
1252
- if (o === void 0 && (o = O), !r2) throw g(1, r2);
1253
- var s = function(t) {
1254
- for (var s2 = [], i = 1; i < arguments.length; i++) s2[i - 1] = arguments[i];
1255
- return n(r2, o, at.apply(void 0, __spreadArray([t], s2, !1)));
1256
- };
1257
- return s.attrs = function(e) {
1258
- return ct(n, r2, __assign(__assign({}, o), { attrs: Array.prototype.concat(o.attrs, e).filter(Boolean) }));
1259
- }, s.withConfig = function(e) {
1260
- return ct(n, r2, __assign(__assign({}, o), e));
1261
- }, s;
1262
- }
1263
- var ut = function(e) {
1264
- return ct(ot, e);
1265
- }, lt = ut;
1266
- T.forEach(function(e) {
1267
- lt[e] = ut(e);
1268
- });
1269
- function ht(t) {
1270
- for (var n = [], r2 = 1; r2 < arguments.length; r2++) n[r2 - 1] = arguments[r2];
1271
- process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");
1272
- var o = ce(at.apply(void 0, __spreadArray([t], n, !1))), s = B(o);
1273
- return new Le(s, o);
1274
- }
1275
- process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
1276
- Perhaps you're looking to import 'styled-components/native'?
1277
- Read more about this at https://www.styled-components.com/docs/basics#react-native`);
1278
- var gt = "__sc-".concat(a, "__");
1279
- process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[gt] || (window[gt] = 0), window[gt] === 1 && 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.
1280
-
1281
- See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`), window[gt] += 1);
1282
- const DashboardContainer = lt.div`
1283
- width: 100%;
1284
- min-height: 100%;
1285
- background: #f0f2f5;
1286
- padding: 28px 32px;
1287
- box-sizing: border-box;
1288
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1289
- `, PageHeader = lt.div`
1290
- margin-bottom: 28px;
1291
- `, PageTitle = lt.h1`
1292
- margin: 0 0 6px 0;
1293
- font-size: 22px;
1294
- font-weight: 700;
1295
- color: #111827;
1296
- letter-spacing: -0.3px;
1297
- display: flex;
1298
- align-items: center;
1299
- gap: 10px;
1300
- `, PreviewBadge = lt.span`
1301
- display: inline-block;
1302
- background: #fef3c7;
1303
- color: #92400e;
1304
- font-size: 11px;
1305
- font-weight: 600;
1306
- padding: 4px 8px;
1307
- border-radius: 4px;
1308
- text-transform: uppercase;
1309
- letter-spacing: 0.5px;
1310
- margin-left: 8px;
1311
- `, PageSubtitle = lt.p`
1312
- margin: 0;
1313
- font-size: 13px;
1314
- color: #6b7280;
1315
- `, StatsGrid = lt.div`
1316
- display: grid;
1317
- grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
1318
- gap: 14px;
1319
- margin-bottom: 20px;
1320
- `, StatCard = lt.div`
1321
- background: #ffffff;
1322
- border-radius: 10px;
1323
- padding: 16px 18px;
1324
- box-shadow:
1325
- 0 1px 3px rgba(0, 0, 0, 0.07),
1326
- 0 1px 2px rgba(0, 0, 0, 0.05);
1327
- border-left: ${(p2) => p2.$accent ? `4px solid ${p2.$accent}` : "4px solid transparent"};
1328
- transition: box-shadow 0.15s ease;
1329
-
1330
- &:hover {
1331
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
1332
- }
1333
- `, StatLabel = lt.div`
1334
- font-size: 11px;
1335
- font-weight: 500;
1336
- color: #9ca3af;
1337
- text-transform: uppercase;
1338
- letter-spacing: 0.5px;
1339
- margin-bottom: 8px;
1340
- `, StatValue = lt.div`
1341
- font-size: 26px;
1342
- font-weight: 700;
1343
- color: #111827;
1344
- line-height: 1;
1345
- `, ControlsBar = lt.div`
1346
- background: #ffffff;
1347
- border-radius: 10px;
1348
- padding: 14px 18px;
1349
- display: flex;
1350
- align-items: center;
1351
- gap: 12px;
1352
- flex-wrap: wrap;
1353
- margin-bottom: 20px;
1354
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
1355
- `, SearchWrapper = lt.div`
1356
- position: relative;
1357
- flex: 1;
1358
- min-width: 220px;
1359
- `, SearchIconSvg = lt.span`
1360
- position: absolute;
1361
- left: 11px;
1362
- top: 50%;
1363
- transform: translateY(-50%);
1364
- color: #9ca3af;
1365
- display: flex;
1366
- align-items: center;
1367
- pointer-events: none;
1368
- `, SearchInput = lt.input`
1369
- width: 100%;
1370
- height: 36px;
1371
- padding: 0 12px 0 34px;
1372
- border: 1px solid #e5e7eb;
1373
- border-radius: 7px;
1374
- font-size: 13px;
1375
- color: #111827;
1376
- background: #f9fafb;
1377
- box-sizing: border-box;
1378
- outline: none;
1379
- transition:
1380
- border-color 0.15s,
1381
- background 0.15s;
1382
-
1383
- &::placeholder {
1384
- color: #9ca3af;
1385
- }
1386
-
1387
- &:focus {
1388
- border-color: #6366f1;
1389
- background: #fff;
1390
- box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
1391
- }
1392
- `, StyledSelect = lt.select`
1393
- height: 36px;
1394
- padding: 0 32px 0 12px;
1395
- border: 1px solid #e5e7eb;
1396
- border-radius: 7px;
1397
- font-size: 13px;
1398
- color: #374151;
1399
- background: #f9fafb
1400
- url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
1401
- no-repeat right 10px center;
1402
- appearance: none;
1403
- outline: none;
1404
- cursor: pointer;
1405
- transition: border-color 0.15s;
1406
-
1407
- &:focus {
1408
- border-color: #6366f1;
1409
- background-color: #fff;
1410
- box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
1411
- }
1412
- `, TableCard = lt.div`
1413
- background: #ffffff;
1414
- border-radius: 10px;
1415
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
1416
- overflow: hidden;
1417
- `, TableHeader = lt.div`
1418
- display: flex;
1419
- align-items: center;
1420
- padding: 11px 20px;
1421
- background: #f9fafb;
1422
- border-bottom: 1px solid #e5e7eb;
1423
- font-size: 11px;
1424
- font-weight: 600;
1425
- color: #6b7280;
1426
- text-transform: uppercase;
1427
- letter-spacing: 0.5px;
1428
- gap: 12px;
1429
- `, TableRow = lt.div`
1430
- display: flex;
1431
- align-items: center;
1432
- padding: 13px 20px;
1433
- border-bottom: 1px solid #f3f4f6;
1434
- gap: 12px;
1435
- transition: background 0.1s;
1436
-
1437
- &:last-child {
1438
- border-bottom: none;
1439
- }
1440
-
1441
- &:hover {
1442
- background: #fafafa;
1443
- }
1444
- `, ColTitle = lt.div`
1445
- flex: 2;
1446
- min-width: 0;
1447
- `, TitleWrapper = lt.div`
1448
- display: flex;
1449
- align-items: center;
1450
- gap: 4px;
1451
- flex-wrap: wrap;
1452
- min-width: 0;
1453
- `, TitleCell = lt.div`
1454
- min-width: 0;
1455
- overflow: hidden;
1456
- flex: 1;
1457
- `, ColType = lt.div`
1458
- flex: 0.8;
1459
- min-width: 80px;
1460
- `, ColScore = lt.div`
1461
- flex: 0.6;
1462
- min-width: 70px;
1463
- `, ColIssues = lt.div`
1464
- flex: 2;
1465
- min-width: 0;
1466
- `, DocTitleLink = lt.a`
1467
- font-size: 13px;
1468
- font-weight: 600;
1469
- color: #4f46e5;
1470
- white-space: nowrap;
1471
- overflow: hidden;
1472
- text-overflow: ellipsis;
1473
- text-decoration: none;
1474
- display: block;
1475
- transition: color 0.15s;
1476
-
1477
- &:hover {
1478
- color: #4338ca;
1479
- text-decoration: underline;
1480
- }
1481
- `, DocId = lt.div`
1482
- font-size: 11px;
1483
- color: #9ca3af;
1484
- margin-top: 2px;
1485
- white-space: nowrap;
1486
- overflow: hidden;
1487
- text-overflow: ellipsis;
1488
- `, TypeBadge = lt.span`
1489
- display: inline-block;
1490
- padding: 3px 8px;
1491
- border-radius: 5px;
1492
- font-size: 11px;
1493
- font-weight: 500;
1494
- background: ${(p2) => p2.$bgColor || "#ede9fe"};
1495
- color: ${(p2) => p2.$textColor || "#5b21b6"};
1496
- `, TypeText = lt.span`
1497
- font-size: 12px;
1498
- font-weight: 500;
1499
- color: #374151;
1500
- `, CustomBadge = lt.span`
1501
- display: inline-block;
1502
- padding: 2px 6px;
1503
- border-radius: 4px;
1504
- font-size: ${(p2) => p2.$fontSize || "10px"};
1505
- font-weight: 600;
1506
- margin-left: 6px;
1507
- background: ${(p2) => p2.$bgColor || "#e0e7ff"};
1508
- color: ${(p2) => p2.$textColor || "#3730a3"};
1509
- white-space: nowrap;
1510
- `, ScoreBadge = lt.span`
1511
- display: inline-block;
1512
- padding: 4px 10px;
1513
- border-radius: 6px;
1514
- font-size: 12px;
1515
- font-weight: 700;
1516
- background: ${(p2) => p2.$score >= 80 ? "#d1fae5" : p2.$score >= 60 ? "#fef3c7" : p2.$score >= 40 ? "#ffedd5" : "#fee2e2"};
1517
- color: ${(p2) => p2.$score >= 80 ? "#065f46" : p2.$score >= 60 ? "#92400e" : p2.$score >= 40 ? "#9a3412" : "#991b1b"};
1518
- `, IssueTag = lt.div`
1519
- font-size: 11px;
1520
- color: #ef4444;
1521
- line-height: 1.5;
1522
- white-space: nowrap;
1523
- overflow: hidden;
1524
- text-overflow: ellipsis;
1525
- `, MoreIssues = lt.div`
1526
- font-size: 11px;
1527
- color: #6b7280;
1528
- cursor: pointer;
1529
- transition: color 0.15s;
1530
-
1531
- &:hover {
1532
- color: #374151;
1533
- }
1534
- `, MoreIssuesWrapper = lt.div`
1535
- position: relative;
1536
- display: inline-block;
1537
- `, IssuesPopover = lt.div`
1538
- position: absolute;
1539
- bottom: auto;
1540
- left: 0;
1541
- transform: translateY(calc(-100% - 14px));
1542
- background: #1f2937;
1543
- color: #ffffff;
1544
- padding: 12px;
1545
- border-radius: 8px;
1546
- font-size: 12px;
1547
- z-index: 50;
1548
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
1549
- width: 280px;
1550
- word-break: break-word;
1551
- line-height: 1.5;
1552
-
1553
- &::after {
1554
- content: '';
1555
- position: absolute;
1556
- bottom: -6px;
1557
- left: 12px;
1558
- width: 0;
1559
- height: 0;
1560
- border-left: 6px solid transparent;
1561
- border-right: 6px solid transparent;
1562
- border-top: 6px solid #1f2937;
1563
- }
1564
- `, PopoverIssueItem = lt.div`
1565
- display: flex;
1566
- gap: 6px;
1567
- margin-bottom: 6px;
1568
-
1569
- &:last-child {
1570
- margin-bottom: 0;
1571
- }
1572
- `, UpgradeContainer = lt.div`
1573
- display: flex;
1574
- align-items: center;
1575
- justify-content: center;
1576
- min-height: 100%;
1577
- padding: 60px 24px;
1578
- `, UpgradeBox = lt.div`
1579
- background: #ffffff;
1580
- border-radius: 16px;
1581
- padding: 48px 40px;
1582
- max-width: 480px;
1583
- width: 100%;
1584
- text-align: center;
1585
- box-shadow:
1586
- 0 4px 24px rgba(0, 0, 0, 0.08),
1587
- 0 1px 4px rgba(0, 0, 0, 0.05);
1588
- border: 1px solid #e5e7eb;
1589
- `, UpgradeLock = lt.div`
1590
- font-size: 40px;
1591
- margin-bottom: 16px;
1592
- `, UpgradeTitle = lt.h2`
1593
- margin: 0 0 10px;
1594
- font-size: 20px;
1595
- font-weight: 700;
1596
- color: #111827;
1597
- `, UpgradeText = lt.p`
1598
- margin: 0 0 20px;
1599
- font-size: 14px;
1600
- color: #6b7280;
1601
- line-height: 1.6;
1602
- `, UpgradeCode = lt.pre`
1603
- background: #f3f4f6;
1604
- border-radius: 8px;
1605
- padding: 14px 16px;
1606
- font-size: 12px;
1607
- color: #374151;
1608
- text-align: left;
1609
- margin: 0 0 24px;
1610
- overflow-x: auto;
1611
- line-height: 1.6;
1612
- border: 1px solid #e5e7eb;
1613
- `, UpgradeButton = lt.a`
1614
- display: inline-block;
1615
- background: #4f46e5;
1616
- color: #ffffff;
1617
- font-size: 14px;
1618
- font-weight: 600;
1619
- padding: 10px 24px;
1620
- border-radius: 8px;
1621
- text-decoration: none;
1622
- transition: background 0.15s;
1623
-
1624
- &:hover {
1625
- background: #4338ca;
1626
- }
1627
- `, ReloadButton = lt.button`
1628
- display: inline-block;
1629
- background: transparent;
1630
- color: #6b7280;
1631
- font-size: 13px;
1632
- font-weight: 500;
1633
- padding: 8px 20px;
1634
- border-radius: 8px;
1635
- border: 1px solid #d1d5db;
1636
- cursor: pointer;
1637
- margin-top: 10px;
1638
- transition:
1639
- background 0.15s,
1640
- color 0.15s,
1641
- border-color 0.15s;
1642
-
1643
- &:hover {
1644
- background: #f3f4f6;
1645
- color: #374151;
1646
- border-color: #9ca3af;
1647
- }
1648
- `, DocTitleAnchor = ({ id, type, structureTool, children }) => {
1649
- const { basePath } = useWorkspace(), { onClick: intentOnClick, href: intentHref } = useIntentLink({ intent: "edit", params: { id, type } }), href = structureTool ? `${basePath}/${structureTool}/intent/edit/id=${id};type=${type}/` : intentHref;
1650
- return /* @__PURE__ */ jsx(DocTitleLink, { href, onClick: structureTool ? void 0 : intentOnClick, title: "Open document", children });
1651
- }, PaneLinkWrapper = lt.span`
1652
- display: block;
1653
- min-width: 0;
1654
- overflow: hidden;
1655
-
1656
- a {
1657
- font-size: 13px;
1658
- font-weight: 600;
1659
- color: #4f46e5;
1660
- white-space: nowrap;
1661
- overflow: hidden;
1662
- text-overflow: ellipsis;
1663
- text-decoration: none;
1664
- display: block;
1665
- transition: color 0.15s;
1666
-
1667
- &:hover {
1668
- color: #4338ca;
1669
- text-decoration: underline;
1670
- }
1671
- }
1672
- `, DocTitleAnchorPane = ({
1673
- id,
1674
- type,
1675
- children
1676
- }) => {
1677
- const { ChildLink } = usePaneRouter();
1678
- return /* @__PURE__ */ jsx(PaneLinkWrapper, { children: /* @__PURE__ */ jsx(ChildLink, { childId: id, childParameters: { type }, children }) });
1679
- }, DocBadgeRenderer = ({ doc, docBadge }) => {
1680
- const badge = docBadge(doc);
1681
- return badge ? /* @__PURE__ */ jsx(CustomBadge, { $bgColor: badge.bgColor, $textColor: badge.textColor, $fontSize: badge.fontSize, children: badge.label }) : null;
1682
- }, spin = ht`
1683
- to { transform: rotate(360deg); }
1684
- `, Spinner = lt.div`
1685
- width: 28px;
1686
- height: 28px;
1687
- border: 3px solid #e5e7eb;
1688
- border-top-color: #6366f1;
1689
- border-radius: 50%;
1690
- animation: ${spin} 0.7s linear infinite;
1691
- margin: 0 auto 12px;
1692
- `, LoadingState = lt.div`
1693
- padding: 48px 24px;
1694
- text-align: center;
1695
- color: #6b7280;
1696
- font-size: 13px;
1697
- `, EmptyState = lt.div`
1698
- padding: 48px 24px;
1699
- text-align: center;
1700
- color: #9ca3af;
1701
- font-size: 13px;
1702
- `, TYPE_COLOR_PALETTE = [
1703
- { bg: "#dbeafe", text: "#0c4a6e" },
1704
- // Blue
1705
- { bg: "#dcfce7", text: "#14532d" },
1706
- // Green
1707
- { bg: "#fce7f3", text: "#500724" },
1708
- // Pink
1709
- { bg: "#fed7aa", text: "#7c2d12" },
1710
- // Orange
1711
- { bg: "#e9d5ff", text: "#581c87" },
1712
- // Purple
1713
- { bg: "#f3e8ff", text: "#3f0f5c" },
1714
- // Deep Purple
1715
- { bg: "#ccfbf1", text: "#134e4a" },
1716
- // Teal
1717
- { bg: "#ddd6fe", text: "#3730a3" },
1718
- // Indigo
1719
- { bg: "#fca5a5", text: "#7f1d1d" },
1720
- // Red
1721
- { bg: "#a7f3d0", text: "#065f46" },
1722
- // Emerald
1723
- { bg: "#fbbf24", text: "#78350f" },
1724
- // Amber
1725
- { bg: "#c4b5fd", text: "#3b0764" },
1726
- // Violet
1727
- { bg: "#f0fdf4", text: "#15803d" },
1728
- // Light Green
1729
- { bg: "#fef2f2", text: "#991b1b" },
1730
- // Light Red
1731
- { bg: "#f5f3ff", text: "#5b21b6" },
1732
- // Light Purple
1733
- { bg: "#fffbeb", text: "#92400e" }
1734
- // Light Amber
1735
- ], getTypeColor = (type) => {
1736
- let hash2 = 0;
1737
- for (let i = 0; i < type.length; i += 1) {
1738
- const char2 = type.charCodeAt(i);
1739
- hash2 = Math.abs(hash2 * 31 + char2);
1740
- }
1741
- const colorIndex = hash2 % TYPE_COLOR_PALETTE.length;
1742
- return TYPE_COLOR_PALETTE[colorIndex];
1743
- }, getStatusCategory = (score) => score >= 80 ? "excellent" : score >= 60 ? "good" : score >= 40 ? "fair" : score > 0 ? "poor" : "missing", scoreMetaTitle = (title) => {
1744
- const issues = [];
1745
- let score = 0;
1746
- return title && title.length >= 50 && title.length <= 60 ? score = 15 : title && title.length > 0 ? (score = 10, title.length < 50 && issues.push("Meta title too short (< 50 chars)"), title.length > 60 && issues.push("Meta title too long (> 60 chars)")) : issues.push("Missing meta title"), { score, issues };
1747
- }, scoreMetaDescription = (description) => {
1748
- const issues = [];
1749
- let score = 0;
1750
- return description && description.length >= 120 && description.length <= 160 ? score = 15 : description && description.length > 0 ? (score = 10, description.length < 120 && issues.push("Meta description too short (< 120 chars)"), description.length > 160 && issues.push("Meta description too long (> 160 chars)")) : issues.push("Missing meta description"), { score, issues };
1751
- }, scoreOpenGraph = (openGraph2) => {
1752
- const issues = [];
1753
- let score = 0;
1754
- return openGraph2 ? (openGraph2.title ? score += 6 : issues.push("Missing OG title"), openGraph2.description ? score += 6 : issues.push("Missing OG description"), openGraph2.image ? score += 6 : issues.push("Missing OG image"), openGraph2.type ? score += 7 : issues.push("Missing OG type")) : issues.push("Open Graph not configured"), { score, issues };
1755
- }, scoreTwitterCard = (twitter2) => {
1756
- const issues = [];
1757
- let score = 0;
1758
- return twitter2 ? (twitter2.title ? score += 5 : issues.push("Missing Twitter title"), twitter2.description ? score += 5 : issues.push("Missing Twitter description"), twitter2.image ? score += 5 : issues.push("Missing Twitter image")) : issues.push("Twitter Card not configured"), { score, issues };
1759
- }, calculateHealthScore = (doc) => {
1760
- let totalScore = 0;
1761
- const allIssues = [];
1762
- if (!doc.seo)
1763
- return { score: 0, status: "missing", issues: ["SEO fields not configured"] };
1764
- const { title, description, metaImage, keywords, robots: robots2, openGraph: openGraph2, twitter: twitter2 } = doc.seo, titleScore = scoreMetaTitle(title);
1765
- totalScore += titleScore.score, allIssues.push(...titleScore.issues);
1766
- const descriptionScore = scoreMetaDescription(description);
1767
- totalScore += descriptionScore.score, allIssues.push(...descriptionScore.issues), metaImage ? totalScore += 10 : allIssues.push("Missing meta image"), keywords && keywords.length > 0 ? totalScore += 10 : allIssues.push("No keywords defined");
1768
- const ogScore = scoreOpenGraph(openGraph2);
1769
- totalScore += ogScore.score, allIssues.push(...ogScore.issues);
1770
- const twitterScore = scoreTwitterCard(twitter2);
1771
- totalScore += twitterScore.score, allIssues.push(...twitterScore.issues), robots2 && !robots2.noIndex && (totalScore += 5);
1772
- const status = getStatusCategory(totalScore);
1773
- return { score: totalScore, status, issues: allIssues };
1774
- }, resolveTypeLabel = (type, typeLabels) => typeLabels?.[type] ?? type, buildTitleProjection = (titleField) => !titleField || titleField === "title" ? "title" : typeof titleField == "string" ? `"title": ${titleField}` : `"title": select(${Object.entries(titleField).map(([type, field]) => `_type == "${type}" => ${field}`).join(", ")}, title)`, generateDummyData = () => [
1775
- {
1776
- _id: "preview-post-1",
1777
- _type: "post",
1778
- title: "Getting Started with SEO Best Practices",
1779
- slug: { current: "getting-started-seo" },
1780
- _updatedAt: new Date(Date.now() - 1728e5).toISOString(),
1781
- seo: {
1782
- title: "Getting Started with SEO Best Practices | My Blog",
1783
- description: "Learn the fundamentals of SEO optimization to improve your website visibility and search rankings.",
1784
- keywords: ["seo", "best practices", "optimization"],
1785
- metaImage: { _type: "image", asset: { _ref: "image-123", _type: "reference" } },
1786
- openGraph: {
1787
- title: "SEO Best Practices Guide",
1788
- description: "Master SEO optimization",
1789
- image: { _type: "image", asset: { _ref: "image-123", _type: "reference" }, alt: "SEO Guide" },
1790
- type: "article"
1791
- },
1792
- twitter: {
1793
- title: "SEO Best Practices",
1794
- description: "Learn SEO optimization",
1795
- image: { _type: "image", asset: { _ref: "image-123", _type: "reference" }, alt: "Guide" },
1796
- card: "summary_large_image"
1797
- }
1798
- }
1799
- },
1800
- {
1801
- _id: "preview-post-2",
1802
- _type: "post",
1803
- title: "Advanced Analytics Strategy",
1804
- slug: { current: "advanced-analytics" },
1805
- _updatedAt: new Date(Date.now() - 432e6).toISOString(),
1806
- seo: {
1807
- title: "Advanced Analytics",
1808
- description: "Strategy tips",
1809
- keywords: ["analytics", "data"],
1810
- openGraph: {
1811
- title: "Analytics Guide"
1812
- }
1813
- }
1814
- },
1815
- {
1816
- _id: "preview-page-1",
1817
- _type: "page",
1818
- title: "About Us",
1819
- slug: { current: "about" },
1820
- _updatedAt: new Date(Date.now() - 864e6).toISOString(),
1821
- seo: {
1822
- title: "About",
1823
- keywords: ["company", "team"],
1824
- metaImage: { _type: "image", asset: { _ref: "image-456", _type: "reference" } }
1825
- }
1826
- },
1827
- {
1828
- _id: "preview-post-3",
1829
- _type: "post",
1830
- title: "Content Marketing Trends for 2024",
1831
- slug: { current: "content-marketing-trends" },
1832
- _updatedAt: new Date(Date.now() - 864e5).toISOString(),
1833
- seo: {
1834
- title: "Content Marketing Trends 2024",
1835
- description: "Discover the latest content marketing trends and strategies to engage your audience effectively.",
1836
- keywords: ["content marketing", "trends", "strategy", "engagement"],
1837
- metaImage: { _type: "image", asset: { _ref: "image-789", _type: "reference" } },
1838
- openGraph: {
1839
- title: "Content Marketing Trends 2024",
1840
- description: "Latest trends in content marketing",
1841
- image: { _type: "image", asset: { _ref: "image-789", _type: "reference" }, alt: "Trends" },
1842
- type: "article"
1843
- },
1844
- twitter: {
1845
- title: "Content Marketing Trends",
1846
- description: "Discover the latest trends",
1847
- card: "summary"
1848
- }
1849
- }
1850
- },
1851
- {
1852
- _id: "preview-post-4",
1853
- _type: "product",
1854
- title: "Pro Plan",
1855
- slug: { current: "pro-plan" },
1856
- _updatedAt: new Date(Date.now() - 1296e6).toISOString(),
1857
- seo: {
1858
- title: "Pro",
1859
- keywords: ["pricing"]
1860
- }
1861
- },
1862
- {
1863
- _id: "preview-page-2",
1864
- _type: "page",
1865
- title: "Contact",
1866
- slug: { current: "contact" },
1867
- _updatedAt: new Date(Date.now() - 6912e5).toISOString(),
1868
- seo: {
1869
- openGraph: {
1870
- title: "Get in Touch"
1871
- }
1872
- }
1873
- },
1874
- {
1875
- _id: "preview-post-5",
1876
- _type: "post",
1877
- title: "Mobile Optimization Guide",
1878
- slug: { current: "mobile-optimization" },
1879
- _updatedAt: new Date(Date.now() - 2592e5).toISOString(),
1880
- seo: {
1881
- title: "Mobile Optimization Guide: Best Practices for Responsive Design",
1882
- description: "Complete guide to mobile optimization including responsive design, performance tips, and user experience best practices for modern web development.",
1883
- keywords: ["mobile", "optimization", "responsive", "performance"],
1884
- metaImage: { _type: "image", asset: { _ref: "image-mobile", _type: "reference" } },
1885
- openGraph: {
1886
- title: "Mobile Optimization Best Practices",
1887
- description: "Master mobile web optimization",
1888
- image: { _type: "image", asset: { _ref: "image-mobile", _type: "reference" }, alt: "Mobile" },
1889
- type: "article"
1890
- },
1891
- twitter: {
1892
- title: "Mobile Optimization Tips",
1893
- description: "Responsive design best practices",
1894
- image: { _type: "image", asset: { _ref: "image-mobile", _type: "reference" }, alt: "Mobile" },
1895
- card: "summary_large_image"
1896
- }
1897
- }
1898
- }
1899
- ].map((doc) => ({
1900
- ...doc,
1901
- health: calculateHealthScore(doc)
1902
- })), SeoHealthDashboard = ({
1903
- icon = "\u{1F4CA}",
1904
- title = "SEO Health Dashboard",
1905
- description = "Monitor and optimize SEO fields across all your documents",
1906
- showTypeColumn = !0,
1907
- showDocumentId = !0,
1908
- queryTypes,
1909
- queryRequireSeo = !0,
1910
- customQuery,
1911
- apiVersion = "2023-01-01",
1912
- licenseKey,
1913
- typeLabels,
1914
- typeColumnMode = "badge",
1915
- titleField,
1916
- docBadge,
1917
- loadingLicense,
1918
- loadingDocuments,
1919
- noDocuments,
1920
- previewMode = !1,
1921
- openInPane = !1,
1922
- structureTool
1923
- }) => {
1924
- const client = useClient({ apiVersion }), [licenseStatus, setLicenseStatus] = useState("loading"), [documents, setDocuments] = useState([]), [loading, setLoading] = useState(!0), [searchQuery, setSearchQuery] = useState(""), [filterStatus, setFilterStatus] = useState("all"), [filterType, setFilterType] = useState("all"), [sortBy, setSortBy] = useState("score"), [activePopover, setActivePopover] = useState(null), VALIDATION_ENDPOINT = "https://sanity-plugin-seofields.thehardik.in/api/validate-license", CACHE_TTL_MS = 3600 * 1e3, validateLicense = useCallback(
1925
- async (forceRefresh = !1) => {
1926
- if (previewMode) {
1927
- setLicenseStatus("valid");
1928
- return;
1929
- }
1930
- if (!licenseKey) {
1931
- setLicenseStatus("invalid");
1932
- return;
1933
- }
1934
- const projectId = client.config().projectId ?? "", cacheKey = `seofields_license_${projectId}`;
1935
- if (forceRefresh)
1936
- try {
1937
- sessionStorage.removeItem(cacheKey);
1938
- } catch {
1939
- }
1940
- if (!forceRefresh)
1941
- try {
1942
- const cached = sessionStorage.getItem(cacheKey);
1943
- if (cached) {
1944
- const { valid, ts } = JSON.parse(cached);
1945
- if (Date.now() - ts < CACHE_TTL_MS) {
1946
- setLicenseStatus(valid ? "valid" : "invalid");
1947
- return;
1948
- }
1949
- }
1950
- } catch {
1951
- }
1952
- setLicenseStatus("loading");
1953
- try {
1954
- const valid = (await fetch(VALIDATION_ENDPOINT, {
1955
- method: "POST",
1956
- headers: { "Content-Type": "application/json" },
1957
- body: JSON.stringify({ licenseKey, projectId })
1958
- })).ok;
1959
- setLicenseStatus(valid ? "valid" : "invalid");
1960
- try {
1961
- sessionStorage.setItem(cacheKey, JSON.stringify({ valid, ts: Date.now() }));
1962
- } catch {
1963
- }
1964
- } catch {
1965
- setLicenseStatus("valid");
1966
- }
1967
- },
1968
- // eslint-disable-next-line react-hooks/exhaustive-deps
1969
- [licenseKey, previewMode]
1970
- );
1971
- useEffect(() => {
1972
- validateLicense();
1973
- }, [licenseKey, previewMode]);
1974
- const handleMouseEnterIssues = (el, issues) => {
1975
- if (!el) return;
1976
- const rect = el.getBoundingClientRect(), popoverWidth = 280, viewportWidth = window.innerWidth;
1977
- let left = rect.left;
1978
- left + popoverWidth > viewportWidth - 10 && (left = viewportWidth - popoverWidth - 10), left < 10 && (left = 10), setActivePopover({ top: rect.top, left, issues });
1979
- };
1980
- useEffect(() => {
1981
- (async () => {
1982
- try {
1983
- if (setLoading(!0), previewMode) {
1984
- setDocuments(generateDummyData());
1985
- return;
1986
- }
1987
- let groqQuery, params = {};
1988
- if (customQuery)
1989
- groqQuery = customQuery;
1990
- else if (queryTypes && queryTypes.length > 0) {
1991
- const seoFilter = queryRequireSeo ? " && seo != null" : "", titleProj = buildTitleProjection(titleField);
1992
- groqQuery = `*[_type in $types${seoFilter} && !(_id in path("drafts.**"))]{
1993
- _id,
1994
- _type,
1995
- ${titleProj},
1996
- slug,
1997
- seo,
1998
- _updatedAt
1999
- }`, params = { types: queryTypes };
2000
- } else
2001
- groqQuery = `*[seo != null && !(_id in path("drafts.**"))]{
2002
- _id,
2003
- _type,
2004
- ${buildTitleProjection(titleField)},
2005
- slug,
2006
- seo,
2007
- _updatedAt
2008
- }`;
2009
- const docsWithHealth = (await client.fetch(groqQuery, params, { perspective: "published" })).map((doc) => ({
2010
- ...doc,
2011
- health: calculateHealthScore(doc)
2012
- }));
2013
- setDocuments(docsWithHealth);
2014
- } catch (error) {
2015
- console.error("Error fetching documents:", error);
2016
- } finally {
2017
- setLoading(!1);
2018
- }
2019
- })();
2020
- }, [
2021
- client,
2022
- customQuery,
2023
- queryRequireSeo,
2024
- // eslint-disable-next-line react-hooks/exhaustive-deps
2025
- JSON.stringify(queryTypes),
2026
- // eslint-disable-next-line react-hooks/exhaustive-deps
2027
- JSON.stringify(titleField),
2028
- previewMode
2029
- ]);
2030
- const uniqueDocumentTypes = useMemo(() => {
2031
- const types2 = new Set(documents.map((doc) => doc._type));
2032
- return Array.from(types2).sort();
2033
- }, [documents]), filteredAndSortedDocs = useMemo(() => {
2034
- let filtered = documents;
2035
- return searchQuery && (filtered = filtered.filter(
2036
- (doc) => doc.title?.toLowerCase().includes(searchQuery.toLowerCase()) || doc._id?.toLowerCase().includes(searchQuery.toLowerCase())
2037
- )), filterStatus !== "all" && (filtered = filtered.filter((doc) => doc.health.status === filterStatus)), filterType !== "all" && (filtered = filtered.filter((doc) => doc._type === filterType)), [...filtered].sort((a2, b2) => sortBy === "score" ? b2.health.score - a2.health.score : (a2.title || "").localeCompare(b2.title || ""));
2038
- }, [documents, searchQuery, filterStatus, filterType, sortBy]), stats = useMemo(() => {
2039
- const total = documents.length, excellent = documents.filter((d2) => d2.health.score >= 80).length, good = documents.filter((d2) => d2.health.score >= 60 && d2.health.score < 80).length, fair = documents.filter((d2) => d2.health.score >= 40 && d2.health.score < 60).length, poor = documents.filter((d2) => d2.health.score > 0 && d2.health.score < 40).length, missing = documents.filter((d2) => d2.health.score === 0).length, avgScore = total > 0 ? Math.round(documents.reduce((sum, d2) => sum + d2.health.score, 0) / total) : 0;
2040
- return { total, excellent, good, fair, poor, missing, avgScore };
2041
- }, [documents]), handleMouseLeave = useCallback(() => {
2042
- setActivePopover(null);
2043
- }, []);
2044
- return /* @__PURE__ */ jsxs(DashboardContainer, { children: [
2045
- licenseStatus === "loading" && /* @__PURE__ */ jsxs(LoadingState, { style: { padding: "80px 24px" }, children: [
2046
- /* @__PURE__ */ jsx(Spinner, {}),
2047
- loadingLicense ?? "Verifying license\u2026"
2048
- ] }),
2049
- licenseStatus === "invalid" && /* @__PURE__ */ jsx(UpgradeContainer, { children: /* @__PURE__ */ jsx(UpgradeBox, { children: licenseKey ? /* @__PURE__ */ jsxs(Fragment, { children: [
2050
- /* @__PURE__ */ jsx(UpgradeLock, { children: "\u274C" }),
2051
- /* @__PURE__ */ jsx(UpgradeTitle, { children: "Invalid License Key" }),
2052
- /* @__PURE__ */ jsx(UpgradeText, { children: "The license key you provided is invalid or has been revoked. Please check your key and update it in the plugin config." }),
2053
- /* @__PURE__ */ jsx(UpgradeCode, { children: `seofields({
2054
- healthDashboard: {
2055
- licenseKey: 'YOUR_LICENSE_KEY', // \u2190 replace with a valid key
2056
- },
2057
- })` }),
2058
- /* @__PURE__ */ jsx(
2059
- UpgradeButton,
2060
- {
2061
- href: "https://sanity-plugin-seofields.thehardik.in",
2062
- target: "_blank",
2063
- rel: "noopener noreferrer",
2064
- children: "Get a New License Key \u2192"
2065
- }
2066
- ),
2067
- /* @__PURE__ */ jsx("br", {}),
2068
- /* @__PURE__ */ jsx(ReloadButton, { onClick: () => validateLicense(!0), children: "Click here If You Just Updated Your Key" })
2069
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2070
- /* @__PURE__ */ jsx(UpgradeLock, { children: "\u{1F512}" }),
2071
- /* @__PURE__ */ jsx(UpgradeTitle, { children: "SEO Health Dashboard" }),
2072
- /* @__PURE__ */ jsx(UpgradeText, { children: "This feature requires a license key. Add your key to the plugin config to unlock the full dashboard." }),
2073
- /* @__PURE__ */ jsx(UpgradeCode, { children: `// sanity.config.ts
2074
- import { seofields } from 'sanity-plugin-seofields'
2075
-
2076
- export default defineConfig({
2077
- plugins: [
2078
- seofields({
2079
- healthDashboard: {
2080
- licenseKey: 'SEOF-XXXX-XXXX-XXXX',
2081
- },
2082
- }),
2083
- ],
2084
- })` }),
2085
- /* @__PURE__ */ jsx(
2086
- UpgradeButton,
2087
- {
2088
- href: "https://sanity-plugin-seofields.thehardik.in",
2089
- target: "_blank",
2090
- rel: "noopener noreferrer",
2091
- children: "Get a License Key \u2192"
2092
- }
2093
- )
2094
- ] }) }) }),
2095
- licenseStatus === "valid" && /* @__PURE__ */ jsxs(Fragment, { children: [
2096
- /* @__PURE__ */ jsxs(PageHeader, { children: [
2097
- /* @__PURE__ */ jsxs(PageTitle, { children: [
2098
- /* @__PURE__ */ jsxs("span", { children: [
2099
- icon,
2100
- " ",
2101
- title
2102
- ] }),
2103
- previewMode && /* @__PURE__ */ jsx(PreviewBadge, { children: "Preview Mode" })
2104
- ] }),
2105
- /* @__PURE__ */ jsx(PageSubtitle, { children: description })
2106
- ] }),
2107
- !loading && /* @__PURE__ */ jsxs(StatsGrid, { children: [
2108
- /* @__PURE__ */ jsxs(StatCard, { children: [
2109
- /* @__PURE__ */ jsx(StatLabel, { children: "Total Docs" }),
2110
- /* @__PURE__ */ jsx(StatValue, { children: stats.total })
2111
- ] }),
2112
- /* @__PURE__ */ jsxs(StatCard, { children: [
2113
- /* @__PURE__ */ jsx(StatLabel, { children: "Avg Score" }),
2114
- /* @__PURE__ */ jsxs(StatValue, { children: [
2115
- stats.avgScore,
2116
- "%"
2117
- ] })
2118
- ] }),
2119
- /* @__PURE__ */ jsxs(StatCard, { $accent: "#10b981", children: [
2120
- /* @__PURE__ */ jsx(StatLabel, { children: "Excellent (80+)" }),
2121
- /* @__PURE__ */ jsx(StatValue, { children: stats.excellent })
2122
- ] }),
2123
- /* @__PURE__ */ jsxs(StatCard, { $accent: "#f59e0b", children: [
2124
- /* @__PURE__ */ jsx(StatLabel, { children: "Good (60\u201379)" }),
2125
- /* @__PURE__ */ jsx(StatValue, { children: stats.good })
2126
- ] }),
2127
- /* @__PURE__ */ jsxs(StatCard, { $accent: "#f97316", children: [
2128
- /* @__PURE__ */ jsx(StatLabel, { children: "Fair (40\u201359)" }),
2129
- /* @__PURE__ */ jsx(StatValue, { children: stats.fair })
2130
- ] }),
2131
- /* @__PURE__ */ jsxs(StatCard, { $accent: "#ef4444", children: [
2132
- /* @__PURE__ */ jsx(StatLabel, { children: "Poor / Missing" }),
2133
- /* @__PURE__ */ jsx(StatValue, { children: stats.poor + stats.missing })
2134
- ] })
2135
- ] }),
2136
- /* @__PURE__ */ jsxs(ControlsBar, { children: [
2137
- /* @__PURE__ */ jsxs(SearchWrapper, { children: [
2138
- /* @__PURE__ */ jsx(SearchIconSvg, { children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx(
2139
- "path",
2140
- {
2141
- fillRule: "evenodd",
2142
- d: "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",
2143
- clipRule: "evenodd"
2144
- }
2145
- ) }) }),
2146
- /* @__PURE__ */ jsx(
2147
- SearchInput,
2148
- {
2149
- placeholder: "Search documents...",
2150
- value: searchQuery,
2151
- onChange: (e) => setSearchQuery(e.currentTarget.value)
2152
- }
2153
- )
2154
- ] }),
2155
- /* @__PURE__ */ jsxs(
2156
- StyledSelect,
2157
- {
2158
- value: filterStatus,
2159
- onChange: (e) => setFilterStatus(e.currentTarget.value),
2160
- children: [
2161
- /* @__PURE__ */ jsx("option", { value: "all", children: "All Status" }),
2162
- /* @__PURE__ */ jsx("option", { value: "excellent", children: "Excellent" }),
2163
- /* @__PURE__ */ jsx("option", { value: "good", children: "Good" }),
2164
- /* @__PURE__ */ jsx("option", { value: "fair", children: "Fair" }),
2165
- /* @__PURE__ */ jsx("option", { value: "poor", children: "Poor" }),
2166
- /* @__PURE__ */ jsx("option", { value: "missing", children: "Missing" })
2167
- ]
2168
- }
2169
- ),
2170
- uniqueDocumentTypes.length > 1 && /* @__PURE__ */ jsxs(
2171
- StyledSelect,
2172
- {
2173
- value: filterType,
2174
- onChange: (e) => setFilterType(e.currentTarget.value),
2175
- children: [
2176
- /* @__PURE__ */ jsx("option", { value: "all", children: "All Types" }),
2177
- uniqueDocumentTypes.map((type) => /* @__PURE__ */ jsx("option", { value: type, children: resolveTypeLabel(type, typeLabels) }, type))
2178
- ]
2179
- }
2180
- ),
2181
- /* @__PURE__ */ jsxs(
2182
- StyledSelect,
2183
- {
2184
- value: sortBy,
2185
- onChange: (e) => setSortBy(e.currentTarget.value),
2186
- children: [
2187
- /* @__PURE__ */ jsx("option", { value: "score", children: "Sort by Score" }),
2188
- /* @__PURE__ */ jsx("option", { value: "title", children: "Sort by Title" })
2189
- ]
2190
- }
2191
- )
2192
- ] }),
2193
- /* @__PURE__ */ jsxs(TableCard, { children: [
2194
- loading && /* @__PURE__ */ jsxs(LoadingState, { children: [
2195
- /* @__PURE__ */ jsx(Spinner, {}),
2196
- loadingDocuments ?? "Loading documents\u2026"
2197
- ] }),
2198
- !loading && (filteredAndSortedDocs.length === 0 ? /* @__PURE__ */ jsx(EmptyState, { children: noDocuments ?? "No documents found" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2199
- /* @__PURE__ */ jsxs(TableHeader, { children: [
2200
- /* @__PURE__ */ jsx(ColTitle, { children: "Title" }),
2201
- showTypeColumn && /* @__PURE__ */ jsx(ColType, { children: "Type" }),
2202
- /* @__PURE__ */ jsx(ColScore, { children: "Score" }),
2203
- /* @__PURE__ */ jsx(ColIssues, { children: "Top Issues" })
2204
- ] }),
2205
- filteredAndSortedDocs.map((doc) => /* @__PURE__ */ jsxs(TableRow, { children: [
2206
- /* @__PURE__ */ jsx(ColTitle, { children: /* @__PURE__ */ jsxs(TitleWrapper, { children: [
2207
- /* @__PURE__ */ jsxs(TitleCell, { children: [
2208
- openInPane ? /* @__PURE__ */ jsx(DocTitleAnchorPane, { id: doc._id, type: doc._type, children: doc.title || "Untitled" }) : /* @__PURE__ */ jsx(DocTitleAnchor, { id: doc._id, type: doc._type, structureTool, children: doc.title || "Untitled" }),
2209
- showDocumentId && /* @__PURE__ */ jsx(DocId, { children: doc._id })
2210
- ] }),
2211
- docBadge && /* @__PURE__ */ jsx(
2212
- DocBadgeRenderer,
2213
- {
2214
- doc,
2215
- docBadge
2216
- }
2217
- )
2218
- ] }) }),
2219
- showTypeColumn && /* @__PURE__ */ jsx(ColType, { children: typeColumnMode === "text" ? /* @__PURE__ */ jsx(TypeText, { children: resolveTypeLabel(doc._type, typeLabels) }) : (() => {
2220
- const typeColor = getTypeColor(doc._type);
2221
- return /* @__PURE__ */ jsx(TypeBadge, { $bgColor: typeColor.bg, $textColor: typeColor.text, children: resolveTypeLabel(doc._type, typeLabels) });
2222
- })() }),
2223
- /* @__PURE__ */ jsx(ColScore, { children: /* @__PURE__ */ jsxs(ScoreBadge, { $score: doc.health.score, children: [
2224
- doc.health.score,
2225
- "%"
2226
- ] }) }),
2227
- /* @__PURE__ */ jsxs(ColIssues, { children: [
2228
- doc.health.issues.slice(0, 2).map((issue) => /* @__PURE__ */ jsxs(IssueTag, { children: [
2229
- "\u2022 ",
2230
- issue
2231
- ] }, `issue-${doc._id}-${issue}`)),
2232
- doc.health.issues.length > 2 && /* @__PURE__ */ jsx(
2233
- MoreIssuesWrapper,
2234
- {
2235
- onMouseEnter: function(e) {
2236
- handleMouseEnterIssues(
2237
- e.currentTarget,
2238
- doc.health.issues
2239
- );
2240
- },
2241
- onMouseLeave: handleMouseLeave,
2242
- children: /* @__PURE__ */ jsxs(MoreIssues, { children: [
2243
- "+",
2244
- doc.health.issues.length - 2,
2245
- " more issues"
2246
- ] })
2247
- }
2248
- )
2249
- ] })
2250
- ] }, doc._id))
2251
- ] }))
2252
- ] }),
2253
- activePopover && /* @__PURE__ */ jsx(
2254
- IssuesPopover,
2255
- {
2256
- style: {
2257
- top: activePopover.top,
2258
- left: activePopover.left,
2259
- transform: "translateY(calc(-100% - 10px))"
2260
- },
2261
- children: activePopover.issues.map((issue) => /* @__PURE__ */ jsxs(PopoverIssueItem, { children: [
2262
- "\u26A0\uFE0F ",
2263
- issue
2264
- ] }, issue))
2265
- }
2266
- ),
2267
- " "
2268
- ] }),
2269
- " "
2270
- ] });
2271
- }, SeoHealthTool = (props) => /* @__PURE__ */ jsx(SeoHealthDashboard, { ...props }), stopWords = ["the", "a", "an", "and", "or", "but"], hasMatchingKeyword = (title, keywordList) => {
2272
- if (!title || keywordList.length === 0) return !1;
2273
- const lowerTitle = title.toLowerCase();
2274
- return keywordList.some((keyword) => keyword && lowerTitle.includes(keyword.toLowerCase()));
2275
- }, hasKeywordOveruse = (title, keywordList, maxOccurrences = 3) => {
2276
- if (!title || keywordList.length === 0) return !1;
2277
- const lowerTitle = title.toLowerCase();
2278
- return keywordList.some((keyword) => {
2279
- if (!keyword) return !1;
2280
- const matches = lowerTitle.match(new RegExp(keyword.toLowerCase(), "g"));
2281
- return matches ? matches.length > maxOccurrences : !1;
2282
- });
2283
- }, startsWithStopWord = (title) => {
2284
- if (!title) return !1;
2285
- const firstWord = title.trim().split(" ")[0].toLowerCase();
2286
- return stopWords.includes(firstWord);
2287
- }, truncate = (text, maxLength) => text.length > maxLength ? `${text.slice(0, maxLength)}\u2026` : text, hasExcessivePunctuation = (title) => /[!@#$%^&*]{2,}/.test(title), getMetaTitleValidationMessages = (title, keywords, isParentseoField) => {
2288
- const feedback = [], charCount = title?.length || 0;
2289
- if (!title?.trim())
2290
- return feedback.push({ text: "Meta Title is empty. Add content to improve SEO.", color: "red" }), feedback;
2291
- if (charCount < 50 ? feedback.push({
2292
- text: `Title is ${charCount} characters \u2014 below recommended 50.`,
2293
- color: "orange"
2294
- }) : charCount > 60 ? feedback.push({
2295
- text: `Title is ${charCount} characters \u2014 exceeds recommended 60.`,
2296
- color: "red"
2297
- }) : feedback.push({ text: `Title length (${charCount}) looks good for SEO.`, color: "green" }), isParentseoField)
2298
- if (keywords.length > 0) {
2299
- const hasKeyword = hasMatchingKeyword(title, keywords);
2300
- feedback.push({
2301
- text: hasKeyword ? "Keyword found in title \u2014 good job!" : "Keywords defined but missing in title.",
2302
- color: hasKeyword ? "green" : "red"
2303
- }), hasKeywordOveruse(title, keywords) && feedback.push({
2304
- text: "Keyword appears too many times \u2014 avoid keyword stuffing.",
2305
- color: "orange"
2306
- });
2307
- } else
2308
- feedback.push({
2309
- text: "No keywords defined. Consider adding relevant keywords.",
2310
- color: "orange"
2311
- });
2312
- return startsWithStopWord(title) && feedback.push({ text: "Title starts with a stop word \u2014 consider rephrasing.", color: "orange" }), hasExcessivePunctuation(title) && feedback.push({ text: "Title contains excessive punctuation \u2014 simplify it.", color: "orange" }), feedback;
2313
- }, getMetaDescriptionValidationMessages = (description, keywords, isParentseoField) => {
2314
- const feedback = [], charCount = description?.length || 0;
2315
- if (!description?.trim())
2316
- return feedback.push({ text: "Meta description is empty. Add content to improve SEO.", color: "red" }), feedback;
2317
- if (charCount < 120 ? feedback.push({
2318
- text: `Description is ${charCount} chars \u2014 below recommended 120.`,
2319
- color: "orange"
2320
- }) : charCount > 160 ? feedback.push({
2321
- text: `Description is ${charCount} chars \u2014 exceeds recommended 160.`,
2322
- color: "red"
2323
- }) : feedback.push({ text: `Description length (${charCount}) looks good for SEO.`, color: "green" }), isParentseoField)
2324
- if (keywords.length > 0) {
2325
- const hasKeyword = hasMatchingKeyword(description, keywords);
2326
- feedback.push({
2327
- text: hasKeyword ? "Keyword found in description \u2014 good job!" : "Keywords defined but missing in description.",
2328
- color: hasKeyword ? "green" : "red"
2329
- }), hasKeywordOveruse(description, keywords) && feedback.push({
2330
- text: "Keyword appears too many times \u2014 avoid keyword stuffing.",
2331
- color: "orange"
2332
- });
2333
- } else
2334
- feedback.push({
2335
- text: "No keywords defined. Consider adding relevant keywords.",
2336
- color: "orange"
2337
- });
2338
- return startsWithStopWord(description) && feedback.push({
2339
- text: "Description starts with a stop word \u2014 consider rephrasing.",
2340
- color: "orange"
2341
- }), hasExcessivePunctuation(description) && feedback.push({
2342
- text: "Description contains excessive punctuation \u2014 simplify it.",
2343
- color: "orange"
2344
- }), feedback;
2345
- }, getOgTitleValidation = (title, keywords = [], isParentseoField) => {
2346
- const feedback = [], count = title?.length || 0;
2347
- if (!title?.trim())
2348
- return feedback.push({ text: "OG Title is empty. Add content for better social preview.", color: "red" }), feedback;
2349
- if (count < 40 ? feedback.push({
2350
- text: `OG Title is ${count} chars \u2014 shorter than recommended 40.`,
2351
- color: "orange"
2352
- }) : count > 60 ? feedback.push({ text: `OG Title is ${count} chars \u2014 exceeds recommended 60.`, color: "red" }) : feedback.push({ text: `OG Title length (${count}) looks good.`, color: "green" }), isParentseoField)
2353
- if (keywords.length > 0) {
2354
- const hasKeyword = hasMatchingKeyword(title, keywords);
2355
- feedback.push({
2356
- text: hasKeyword ? "Keyword found in OG title \u2014 good job!" : "Keywords defined but missing in OG title.",
2357
- color: hasKeyword ? "green" : "red"
2358
- }), hasKeywordOveruse(title, keywords) && feedback.push({
2359
- text: "Keyword appears too many times in OG title \u2014 avoid keyword stuffing.",
2360
- color: "orange"
2361
- });
2362
- } else
2363
- feedback.push({
2364
- text: "No keywords defined. Consider adding relevant keywords.",
2365
- color: "orange"
2366
- });
2367
- return startsWithStopWord(title) && feedback.push({
2368
- text: "OG Title starts with a stop word \u2014 consider rephrasing.",
2369
- color: "orange"
2370
- }), hasExcessivePunctuation(title) && feedback.push({ text: "OG Title contains excessive punctuation \u2014 simplify it.", color: "orange" }), feedback;
2371
- }, getOgDescriptionValidation = (desc, keywords = [], isParentseoField) => {
2372
- const feedback = [], count = desc?.length || 0;
2373
- if (!desc?.trim())
2374
- return feedback.push({
2375
- text: "OG Description is empty. Add content for better social preview.",
2376
- color: "red"
2377
- }), feedback;
2378
- if (count < 90 ? feedback.push({
2379
- text: `OG Description is ${count} chars \u2014 shorter than recommended 90.`,
2380
- color: "orange"
2381
- }) : count > 120 ? feedback.push({
2382
- text: `OG Description is ${count} chars \u2014 exceeds recommended 120.`,
2383
- color: "red"
2384
- }) : feedback.push({ text: `OG Description length (${count}) looks good.`, color: "green" }), isParentseoField)
2385
- if (keywords.length > 0) {
2386
- const hasKeyword = hasMatchingKeyword(desc, keywords);
2387
- feedback.push({
2388
- text: hasKeyword ? "Keyword found in OG description \u2014 good job!" : "Keywords defined but missing in OG description.",
2389
- color: hasKeyword ? "green" : "red"
2390
- }), hasKeywordOveruse(desc, keywords) && feedback.push({
2391
- text: "Keyword appears too many times in OG description \u2014 avoid keyword stuffing.",
2392
- color: "orange"
2393
- });
2394
- } else
2395
- feedback.push({
2396
- text: "No keywords defined. Consider adding relevant keywords.",
2397
- color: "orange"
2398
- });
2399
- return startsWithStopWord(desc) && feedback.push({
2400
- text: "OG Description starts with a stop word \u2014 consider rephrasing.",
2401
- color: "orange"
2402
- }), hasExcessivePunctuation(desc) && feedback.push({
2403
- text: "OG Description contains excessive punctuation \u2014 simplify it.",
2404
- color: "orange"
2405
- }), feedback;
2406
- }, getTwitterTitleValidation = (title, keywords = [], isParentseoField) => {
2407
- const feedback = [], count = title?.length || 0;
2408
- if (!title?.trim())
2409
- return feedback.push({ text: "X Title is empty. Add content for better SEO.", color: "red" }), feedback;
2410
- if (count < 30 ? feedback.push({
2411
- text: `X Title is ${count} chars \u2014 shorter than recommended 30.`,
2412
- color: "orange"
2413
- }) : count > 70 ? feedback.push({
2414
- text: `X Title is ${count} chars \u2014 exceeds recommended 70.`,
2415
- color: "red"
2416
- }) : feedback.push({ text: `X Title length (${count}) looks good.`, color: "green" }), isParentseoField)
2417
- if (keywords.length > 0) {
2418
- const hasKeyword = hasMatchingKeyword(title, keywords);
2419
- feedback.push({
2420
- text: hasKeyword ? "Keyword found in X title \u2014 good job!" : "Keywords defined but missing in X title.",
2421
- color: hasKeyword ? "green" : "red"
2422
- });
2423
- } else
2424
- feedback.push({
2425
- text: "No keywords defined. Consider adding relevant keywords.",
2426
- color: "orange"
2427
- });
2428
- return /[!@#$%^&*]{2,}/.test(title) && feedback.push({ text: "X Title has excessive punctuation \u2014 simplify it.", color: "orange" }), feedback;
2429
- }, getTwitterDescriptionValidation = (desc, keywords = [], isParentseoField) => {
2430
- const feedback = [], count = desc?.length || 0;
2431
- if (!desc?.trim())
2432
- return feedback.push({ text: "X Description is empty. Add content for better SEO.", color: "red" }), feedback;
2433
- if (count < 50 ? feedback.push({
2434
- text: `X Description is ${count} chars \u2014 shorter than recommended 50.`,
2435
- color: "orange"
2436
- }) : count > 200 ? feedback.push({
2437
- text: `X Description is ${count} chars \u2014 exceeds recommended 200.`,
2438
- color: "red"
2439
- }) : feedback.push({ text: `X Description length (${count}) looks good.`, color: "green" }), isParentseoField)
2440
- if (keywords.length > 0) {
2441
- const hasKeyword = hasMatchingKeyword(desc, keywords);
2442
- feedback.push({
2443
- text: hasKeyword ? "Keyword found in X description \u2014 good job!" : "Keywords defined but missing in X description.",
2444
- color: hasKeyword ? "green" : "red"
2445
- });
2446
- } else
2447
- feedback.push({
2448
- text: "No keywords defined. Consider adding relevant keywords.",
2449
- color: "orange"
2450
- });
2451
- return /[!@#$%^&*]{2,}/.test(desc) && feedback.push({
2452
- text: "X Description has excessive punctuation \u2014 simplify it.",
2453
- color: "orange"
2454
- }), feedback;
2455
- }, MetaDescription = (props) => {
2456
- const { value, renderDefault, path } = props, parent = useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = useMemo(
2457
- () => getMetaDescriptionValidationMessages(value || "", keywords, isParentseoField),
2458
- [value, keywords, isParentseoField]
2459
- );
2460
- return /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
2461
- renderDefault(props),
2462
- /* @__PURE__ */ jsx(Stack, { space: 2, children: feedbackItems.map((item) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 7 }, children: [
2463
- /* @__PURE__ */ jsx(
2464
- "div",
2465
- {
2466
- style: { width: 10, height: 10, borderRadius: "50%", backgroundColor: item.color }
2467
- }
2468
- ),
2469
- /* @__PURE__ */ jsx(Text, { weight: "bold", muted: !0, size: 14, children: item.text })
2470
- ] }, item.text)) })
2471
- ] });
2472
- }, MetaTitle = (props) => {
2473
- const { value, renderDefault, path } = props, parent = useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = useMemo(
2474
- () => getMetaTitleValidationMessages(value || "", keywords, isParentseoField),
2475
- [value, keywords, isParentseoField]
2476
- );
2477
- return /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
2478
- renderDefault(props),
2479
- /* @__PURE__ */ jsx(Stack, { space: 2, children: feedbackItems.map((item) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 7 }, children: [
2480
- /* @__PURE__ */ jsx(
2481
- "div",
2482
- {
2483
- style: {
2484
- minWidth: 10,
2485
- height: 10,
2486
- borderRadius: "50%",
2487
- backgroundColor: item.color
2488
- }
2489
- }
2490
- ),
2491
- /* @__PURE__ */ jsx(Text, { weight: "bold", muted: !0, size: 14, children: item.text })
2492
- ] }, item.text)) })
2493
- ] });
2494
- }, PreviewContainer = lt.div`
2495
- max-width: 600px;
2496
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
2497
- background: #ffffff;
2498
- border: 1px solid #dadce0;
2499
- border-radius: 8px;
2500
- overflow: hidden;
2501
- `, PreviewHeader = lt.div`
2502
- background: #f8f9fa;
2503
- padding: 12px 16px;
2504
- border-bottom: 1px solid #dadce0;
2505
- display: flex;
2506
- align-items: center;
2507
- justify-content: space-between;
2508
- gap: 8px;
2509
- `, PreviewBody = lt.div`
2510
- padding: 16px;
2511
- `, SerpUrl = lt.p`
2512
- margin: 0 0 4px;
2513
- color: #006621;
2514
- font-size: 13px;
2515
- line-height: 1.4;
2516
- word-break: break-word;
2517
- `, SerpTitle = lt.h3`
2518
- margin: 0 0 8px;
2519
- color: #1a0dab;
2520
- font-size: 18px;
2521
- font-weight: 500;
2522
- line-height: 1.4;
2523
- word-break: break-word;
2524
-
2525
- &:hover {
2526
- text-decoration: underline;
2527
- }
2528
- `, SerpDescription = lt.p`
2529
- margin: 0;
2530
- color: #545454;
2531
- font-size: 14px;
2532
- line-height: 1.6;
2533
- word-break: break-word;
2534
- display: -webkit-box;
2535
- -webkit-line-clamp: 2;
2536
- -webkit-box-orient: vertical;
2537
- overflow: hidden;
2538
- `, LiveIndicator = lt.span`
2539
- display: inline-flex;
2540
- align-items: center;
2541
- gap: 4px;
2542
- font-size: 11px;
2543
- font-weight: 600;
2544
- text-transform: uppercase;
2545
- letter-spacing: 0.05em;
2546
- color: #4f46e5;
2547
- background: #f0f4ff;
2548
- padding: 4px 8px;
2549
- border-radius: 4px;
2550
- `, SeoPreview = (props) => {
2551
- const { path, schemaType } = props, { options } = schemaType, baseUrl = options?.baseUrl || "https://www.example.com", prefixFunction = options?.prefix, parent = useFormValue([path[0]]) || {
2552
- title: "",
2553
- description: "",
2554
- canonicalUrl: ""
2555
- }, rootDoc = useFormValue([]) || {
2556
- slug: { current: "" }
2557
- }, slug = rootDoc?.slug?.current || "", {
2558
- title,
2559
- description,
2560
- canonicalUrl: url
2561
- } = parent, base = (url || baseUrl)?.replace(/\/+$/, ""), slugStr = String(slug || "").replace(/^\/+/, ""), urlPath = [String(
2562
- prefixFunction ? prefixFunction(rootDoc) : ""
2563
- ).replace(/^\/+|\/+$/g, ""), slugStr].filter(Boolean).join("/"), finalUrl = urlPath ? `${base}/${urlPath}` : base, urlDisplay = `${(() => {
2564
- try {
2565
- return new URL(finalUrl || base).hostname;
2566
- } catch {
2567
- return "example.com";
2568
- }
2569
- })()}${urlPath ? ` \u203A ${urlPath.split("/").slice(-1)[0]}` : ""}`;
2570
- return /* @__PURE__ */ jsx(Box, { padding: 3, children: /* @__PURE__ */ jsxs(PreviewContainer, { children: [
2571
- /* @__PURE__ */ jsxs(PreviewHeader, { children: [
2572
- /* @__PURE__ */ jsx(
2573
- "span",
2574
- {
2575
- style: {
2576
- fontSize: "11px",
2577
- color: "#5f6368",
2578
- textTransform: "uppercase",
2579
- letterSpacing: "0.05em"
2580
- },
2581
- children: "Search Preview"
2582
- }
2583
- ),
2584
- /* @__PURE__ */ jsxs(LiveIndicator, { children: [
2585
- /* @__PURE__ */ jsx(
2586
- "span",
2587
- {
2588
- style: {
2589
- width: "4px",
2590
- height: "4px",
2591
- borderRadius: "50%",
2592
- backgroundColor: "#4f46e5",
2593
- display: "inline-block"
2594
- }
2595
- }
2596
- ),
2597
- "Live"
2598
- ] })
2599
- ] }),
2600
- /* @__PURE__ */ jsxs(PreviewBody, { children: [
2601
- /* @__PURE__ */ jsx(SerpUrl, { children: finalUrl ? urlDisplay : "example.com \u203A page-url" }),
2602
- /* @__PURE__ */ jsx(SerpTitle, { children: title && title.length > 0 ? truncate(title, 60) : "Your SEO Title will appear here" }),
2603
- /* @__PURE__ */ jsx(SerpDescription, { children: description && description.length > 0 ? truncate(description, 160) : "Your meta description will show up here. Make it compelling!" })
2604
- ] })
2605
- ] }) });
2606
- }, DEFAULT_FIELD_INFO = {
2607
- title: {
2608
- title: "Meta Title",
2609
- description: "The meta title is displayed in search engine results as the clickable headline for a given result. It should be concise and accurately reflect the content of the page."
2610
- },
2611
- description: {
2612
- title: "Meta Description",
2613
- description: "Provide a concise summary of the page content. This description may be used by search engines in search results."
2614
- },
2615
- metaImage: {
2616
- title: "Meta Image",
2617
- description: "Upload an image that represents the content of the page. This image may be used in social media previews and search engine results."
2618
- },
2619
- keywords: {
2620
- title: "Keywords",
2621
- description: "Add relevant keywords for this page. These keywords will be used for SEO purposes."
2622
- },
2623
- canonicalUrl: {
2624
- title: "Canonical URL",
2625
- description: "Specify the canonical URL for this page. This helps prevent duplicate content issues by indicating the preferred version of a page."
2626
- },
2627
- robots: {
2628
- title: "Robots Settings",
2629
- description: "Configure how search engine crawlers should index and follow links on this page."
2630
- },
2631
- metaAttributes: {
2632
- title: "Additional Meta Attributes",
2633
- description: "Add custom meta attributes to the head of the document for additional SEO and social media integration."
2634
- },
2635
- openGraphTitle: {
2636
- title: "Open Graph Title",
2637
- description: ""
2638
- },
2639
- openGraphUrl: {
2640
- title: "Open Graph URL",
2641
- description: "The canonical URL of the page. This should be the full URL including protocol (https://)."
2642
- },
2643
- openGraphDescription: {
2644
- title: "Open Graph Description",
2645
- description: ""
2646
- },
2647
- openGraphSiteName: {
2648
- title: "Open Graph Site Name",
2649
- description: "The name of your website. This is often the site title."
2650
- },
2651
- openGraphType: {
2652
- title: "Open Graph Type",
2653
- description: "Select the type of content for Open Graph."
2654
- },
2655
- openGraphImageType: {
2656
- title: "Image Type",
2657
- description: "Choose whether to upload an image or provide an image URL for Open Graph."
2658
- },
2659
- openGraphImage: {
2660
- title: "Open Graph Image",
2661
- description: "Recommended size: 1200x630px (minimum 600x315px). Max file size: 5MB. Aspect ratio 1.91:1."
2662
- },
2663
- openGraphImageUrl: {
2664
- title: "Open Graph Image URL",
2665
- description: "Enter the full URL of the image. Ensure the image is accessible and meets the recommended size of 1200x630px (minimum 600x315px)."
2666
- },
2667
- twitterCard: {
2668
- title: "X Card Type",
2669
- description: ""
2670
- },
2671
- twitterSite: {
2672
- title: "Site X Handle",
2673
- description: "The X (formerly Twitter) handle of the website (e.g., @example)"
2674
- },
2675
- twitterCreator: {
2676
- title: "X Creator Handle",
2677
- description: "The X (formerly Twitter) handle of the content creator (e.g., @creator)"
2678
- },
2679
- twitterTitle: {
2680
- title: "X Title",
2681
- description: "The title of the content as it should appear on X (formerly Twitter)."
2682
- },
2683
- twitterDescription: {
2684
- title: "X Description",
2685
- description: "A brief description of the content for X (formerly Twitter)."
2686
- },
2687
- twitterImageType: {
2688
- title: "X Image Type",
2689
- description: "Choose whether to upload an image or provide an image URL for X (formerly Twitter)."
2690
- },
2691
- twitterImage: {
2692
- title: "X Image",
2693
- description: 'An image URL which should be at least 120x120px for "summary" card and 280x150px for "summary_large_image" card.'
2694
- },
2695
- twitterImageUrl: {
2696
- title: "X Image URL",
2697
- description: "Enter the full URL of the image for X (formerly Twitter). Ensure the image is accessible and meets the recommended size."
2698
- }
2699
- }, getFieldInfo = (fieldName, fieldOverrides) => {
2700
- const fieldInfo = fieldOverrides && fieldOverrides[fieldName] || DEFAULT_FIELD_INFO[fieldName];
2701
- return fieldInfo ? { title: fieldInfo.title || "", description: fieldInfo.description || "" } : { title: "", description: "" };
2702
- }, isFieldHidden = (fieldName, config, documentType) => !!(config.defaultHiddenFields?.includes(fieldName) || documentType && config.fieldVisibility?.[documentType]?.hiddenFields?.includes(fieldName)), getFieldHiddenFunction = (fieldName, config) => ({
2703
- document: document2
2704
- }) => {
2705
- const documentType = document2?._type;
2706
- return isFieldHidden(fieldName, config, documentType);
2707
- }, isEmpty = (value) => value == null || typeof value == "string" && value.trim() === "" || Array.isArray(value) && value.length === 0 || typeof value == "object" && !Array.isArray(value) && Object.keys(value).length === 0, OgDescription = (props) => {
2708
- const { value, renderDefault, path } = props, parent = useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = useMemo(
2709
- () => getOgDescriptionValidation(value || "", keywords, isParentseoField),
2710
- [value, keywords, isParentseoField]
2711
- );
2712
- return /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
2713
- renderDefault(props),
2714
- /* @__PURE__ */ jsx(Stack, { space: 2, children: feedbackItems.map((item) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 7 }, children: [
2715
- /* @__PURE__ */ jsx(
2716
- "div",
2717
- {
2718
- style: {
2719
- minWidth: 10,
2720
- height: 10,
2721
- borderRadius: "50%",
2722
- backgroundColor: item.color
2723
- }
2724
- }
2725
- ),
2726
- /* @__PURE__ */ jsx(Text, { weight: "bold", muted: !0, size: 14, children: item.text })
2727
- ] }, item.text)) })
2728
- ] });
2729
- }, OgTitle = (props) => {
2730
- const { value, renderDefault, path } = props, parent = useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = useMemo(
2731
- () => getOgTitleValidation(value || "", keywords, isParentseoField),
2732
- [value, keywords, isParentseoField]
2733
- );
2734
- return /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
2735
- renderDefault(props),
2736
- /* @__PURE__ */ jsx(Stack, { space: 2, children: feedbackItems.map((item) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 7 }, children: [
2737
- /* @__PURE__ */ jsx(
2738
- "div",
2739
- {
2740
- style: {
2741
- minWidth: 10,
2742
- height: 10,
2743
- borderRadius: "50%",
2744
- backgroundColor: item.color
2745
- }
2746
- }
2747
- ),
2748
- /* @__PURE__ */ jsx(Text, { weight: "bold", muted: !0, size: 14, children: item.text })
2749
- ] }, item.text)) })
2750
- ] });
2751
- };
2752
- function openGraph(config = {}) {
2753
- return defineType({
2754
- name: "openGraph",
2755
- title: "Open Graph Settings",
2756
- type: "object",
2757
- fields: [
2758
- defineField({
2759
- name: "url",
2760
- type: "url",
2761
- ...getFieldInfo("openGraphUrl", config.fieldOverrides),
2762
- hidden: getFieldHiddenFunction("openGraphUrl", config),
2763
- description: "The canonical URL of the page. This should be the full URL including protocol (https://)."
2764
- }),
2765
- defineField({
2766
- name: "title",
2767
- ...getFieldInfo("openGraphTitle", config.fieldOverrides),
2768
- type: "string",
2769
- hidden: getFieldHiddenFunction("openGraphTitle", config),
2770
- components: {
2771
- input: OgTitle
2772
- // Can also wrap with a string input + preview
2773
- }
2774
- }),
2775
- defineField({
2776
- name: "description",
2777
- ...getFieldInfo("openGraphDescription", config.fieldOverrides),
2778
- type: "text",
2779
- rows: 3,
2780
- hidden: getFieldHiddenFunction("openGraphDescription", config),
2781
- components: {
2782
- input: OgDescription
2783
- // Can also wrap with a text area + preview
2784
- }
2785
- }),
2786
- defineField({
2787
- name: "siteName",
2788
- ...getFieldInfo("openGraphSiteName", config.fieldOverrides),
2789
- type: "string",
2790
- hidden: getFieldHiddenFunction("openGraphSiteName", config)
2791
- }),
2792
- defineField({
2793
- name: "type",
2794
- ...getFieldInfo("openGraphType", config.fieldOverrides),
2795
- type: "string",
2796
- options: {
2797
- list: [
2798
- { title: "Website", value: "website" },
2799
- { title: "Article", value: "article" },
2800
- { title: "Profile", value: "profile" },
2801
- { title: "Book", value: "book" },
2802
- { title: "Music", value: "music" },
2803
- { title: "Video", value: "video" },
2804
- { title: "Product", value: "product" }
2805
- ]
2806
- // layout: 'radio', // Display as radio buttons
2807
- },
2808
- hidden: getFieldHiddenFunction("openGraphType", config),
2809
- initialValue: "website"
2810
- }),
2811
- defineField({
2812
- name: "imageType",
2813
- ...getFieldInfo("openGraphImageType", config.fieldOverrides),
2814
- type: "string",
2815
- options: {
2816
- list: [
2817
- { title: "Upload Image", value: "upload" },
2818
- { title: "Image URL", value: "url" }
2819
- ]
2820
- },
2821
- hidden: getFieldHiddenFunction("openGraphImage", config),
2822
- initialValue: "upload"
2823
- }),
2824
- defineField({
2825
- name: "image",
2826
- ...getFieldInfo("openGraphImage", config.fieldOverrides),
2827
- type: "image",
2828
- options: {
2829
- hotspot: !0
2830
- },
2831
- fields: [
2832
- defineField({
2833
- name: "alt",
2834
- title: "Image Alt Text",
2835
- type: "string",
2836
- description: "A description of the image for accessibility purposes."
2837
- })
2838
- ],
2839
- hidden: (context) => {
2840
- const { parent } = context;
2841
- if (parent?.imageType !== "upload") return !0;
2842
- const hiddenFn = getFieldHiddenFunction("openGraphImage", config);
2843
- return typeof hiddenFn == "function" ? hiddenFn(context) : hiddenFn;
2844
- }
2845
- }),
2846
- defineField({
2847
- name: "imageUrl",
2848
- ...getFieldInfo("openGraphImageUrl", config.fieldOverrides),
2849
- type: "url",
2850
- hidden: (context) => {
2851
- const { parent } = context;
2852
- if (parent?.imageType !== "url") return !0;
2853
- const hiddenFn = getFieldHiddenFunction("openGraphImage", config);
2854
- return typeof hiddenFn == "function" ? hiddenFn(context) : hiddenFn;
2855
- }
2856
- })
2857
- ]
2858
- });
2859
- }
2860
- const TwitterDescription = (props) => {
2861
- const { value, renderDefault, path } = props, parent = useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = useMemo(
2862
- () => getTwitterDescriptionValidation(value || "", keywords, isParentseoField),
2863
- [value, keywords, isParentseoField]
2864
- );
2865
- return /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
2866
- renderDefault(props),
2867
- /* @__PURE__ */ jsx(Stack, { space: 2, children: feedbackItems.map((item) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 7 }, children: [
2868
- /* @__PURE__ */ jsx(
2869
- "div",
2870
- {
2871
- style: {
2872
- minWidth: 10,
2873
- height: 10,
2874
- borderRadius: "50%",
2875
- backgroundColor: item.color
2876
- }
2877
- }
2878
- ),
2879
- /* @__PURE__ */ jsx(Text, { weight: "bold", muted: !0, size: 14, children: item.text })
2880
- ] }, item.text)) })
2881
- ] });
2882
- }, TwitterTitle = (props) => {
2883
- const { value, renderDefault, path } = props, parent = useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = useMemo(
2884
- () => getTwitterTitleValidation(value || "", keywords, isParentseoField),
2885
- [value, keywords, isParentseoField]
2886
- );
2887
- return /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
2888
- renderDefault(props),
2889
- /* @__PURE__ */ jsx(Stack, { space: 2, children: feedbackItems.map((item) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 7 }, children: [
2890
- /* @__PURE__ */ jsx(
2891
- "div",
2892
- {
2893
- style: {
2894
- minWidth: 10,
2895
- height: 10,
2896
- borderRadius: "50%",
2897
- backgroundColor: item.color
2898
- }
2899
- }
2900
- ),
2901
- /* @__PURE__ */ jsx(Text, { weight: "bold", muted: !0, size: 14, children: item.text })
2902
- ] }, item.text)) })
2903
- ] });
2904
- };
2905
- function twitter(config = {}) {
2906
- return defineType({
2907
- name: "twitter",
2908
- title: "X (Formerly Twitter)",
2909
- type: "object",
2910
- fields: [
2911
- defineField({
2912
- name: "card",
2913
- ...getFieldInfo("twitterCard", config.fieldOverrides),
2914
- type: "string",
2915
- options: {
2916
- list: [
2917
- { title: "Summary", value: "summary" },
2918
- { title: "Summary with Large Image", value: "summary_large_image" },
2919
- { title: "App", value: "app" },
2920
- { title: "Player", value: "player" }
2921
- ]
2922
- },
2923
- hidden: getFieldHiddenFunction("twitterCard", config),
2924
- initialValue: "summary_large_image"
2925
- // good default
2926
- }),
2927
- defineField({
2928
- name: "site",
2929
- ...getFieldInfo("twitterSite", config.fieldOverrides),
2930
- type: "string",
2931
- hidden: getFieldHiddenFunction("twitterSite", config)
2932
- }),
2933
- defineField({
2934
- name: "creator",
2935
- type: "string",
2936
- ...getFieldInfo("twitterCreator", config.fieldOverrides),
2937
- hidden: getFieldHiddenFunction("twitterCreator", config)
2938
- }),
2939
- defineField({
2940
- name: "title",
2941
- type: "string",
2942
- ...getFieldInfo("twitterTitle", config.fieldOverrides),
2943
- hidden: getFieldHiddenFunction("twitterTitle", config),
2944
- components: {
2945
- input: TwitterTitle
2946
- }
2947
- }),
2948
- defineField({
2949
- name: "description",
2950
- type: "text",
2951
- rows: 3,
2952
- ...getFieldInfo("twitterDescription", config.fieldOverrides),
2953
- hidden: getFieldHiddenFunction("twitterDescription", config),
2954
- components: {
2955
- input: TwitterDescription
2956
- }
2957
- }),
2958
- defineField({
2959
- name: "imageType",
2960
- ...getFieldInfo("twitterImageType", config.fieldOverrides),
2961
- type: "string",
2962
- options: {
2963
- list: [
2964
- { title: "Upload Image", value: "upload" },
2965
- { title: "Image URL", value: "url" }
2966
- ]
2967
- },
2968
- hidden: getFieldHiddenFunction("twitterImage", config),
2969
- initialValue: "upload"
2970
- }),
2971
- defineField({
2972
- name: "image",
2973
- ...getFieldInfo("twitterImage", config.fieldOverrides),
2974
- type: "image",
2975
- options: {
2976
- hotspot: !0
2977
- },
2978
- fields: [
2979
- defineField({
2980
- name: "alt",
2981
- title: "Image Alt Text",
2982
- type: "string",
2983
- description: "A description of the image for accessibility purposes."
2984
- })
2985
- ],
2986
- hidden: (context) => {
2987
- const { parent } = context;
2988
- if (parent?.imageType !== "upload") return !0;
2989
- const hiddenFn = getFieldHiddenFunction("twitterImage", config);
2990
- return typeof hiddenFn == "function" ? hiddenFn(context) : hiddenFn;
2991
- }
2992
- }),
2993
- defineField({
2994
- name: "imageUrl",
2995
- ...getFieldInfo("twitterImageUrl", config.fieldOverrides),
2996
- type: "url",
2997
- hidden: (context) => {
2998
- const { parent } = context;
2999
- if (parent?.imageType !== "url") return !0;
3000
- const hiddenFn = getFieldHiddenFunction("twitterImage", config);
3001
- return typeof hiddenFn == "function" ? hiddenFn(context) : hiddenFn;
3002
- }
3003
- })
3004
- ]
3005
- });
3006
- }
3007
- function seoFieldsSchema(config = {}) {
3008
- return defineType({
3009
- name: "seoFields",
3010
- title: "SEO Fields",
3011
- type: "object",
3012
- fields: [
3013
- defineField({
3014
- name: "robots",
3015
- title: "Robots Settings",
3016
- type: "robots",
3017
- // Use the separate robots type here
3018
- hidden: getFieldHiddenFunction("robots", config)
3019
- }),
3020
- // 👇 conditionally spread preview field
3021
- ...typeof config.seoPreview == "boolean" && config.seoPreview || typeof config.seoPreview == "object" && !isEmpty(config.seoPreview) ? [
3022
- defineField({
3023
- name: "preview",
3024
- title: "SEO Preview",
3025
- type: "string",
3026
- components: { input: SeoPreview },
3027
- options: {
3028
- baseUrl: config.baseUrl || "https://www.example.com",
3029
- ...typeof config.seoPreview == "object" && config.seoPreview && config.seoPreview.prefix ? { prefix: config.seoPreview.prefix } : {}
3030
- },
3031
- // Use a readOnly field to prevent editing
3032
- // This field is just for preview purposes
3033
- initialValue: "",
3034
- // Set an initial value
3035
- readOnly: !0
3036
- })
3037
- ] : [],
3038
- defineField({
3039
- name: "title",
3040
- ...getFieldInfo("title", config.fieldOverrides),
3041
- // title: 'Meta Title',
3042
- type: "string",
3043
- // description:
3044
- // 'The meta title is displayed in search engine results as the clickable headline for a given result. It should be concise and accurately reflect the content of the page.',
3045
- components: {
3046
- input: MetaTitle
3047
- },
3048
- // validation: (Rule) => Rule.max(60).warning('Meta title should be under 60 characters.'),
3049
- hidden: getFieldHiddenFunction("title", config)
3050
- }),
3051
- defineField({
3052
- name: "description",
3053
- ...getFieldInfo("description", config.fieldOverrides),
3054
- // title: 'Meta Description',
3055
- // description:
3056
- // 'Provide a concise summary of the page content. This description may be used by search engines in search results.',
3057
- type: "text",
3058
- rows: 3,
3059
- components: {
3060
- input: MetaDescription
3061
- },
3062
- // validation: (Rule) => Rule.max(160).warning('Meta description should be under 160 characters.'),
3063
- hidden: getFieldHiddenFunction("description", config)
3064
- }),
3065
- defineField({
3066
- name: "metaImage",
3067
- ...getFieldInfo("metaImage", config.fieldOverrides),
3068
- // title: 'Meta Image',
3069
- // description:
3070
- // 'Upload an image that represents the content of the page. This image may be used in social media previews and search engine results.',
3071
- type: "image",
3072
- options: {
3073
- hotspot: !0
3074
- },
3075
- hidden: getFieldHiddenFunction("metaImage", config)
3076
- }),
3077
- defineField({
3078
- name: "metaAttributes",
3079
- // title: 'Additional Meta Attributes',
3080
- ...getFieldInfo("metaAttributes", config.fieldOverrides),
3081
- type: "array",
3082
- of: [{ type: "metaAttribute" }],
3083
- // description:
3084
- // 'Add custom meta attributes to the head of the document for additional SEO and social media integration.',
3085
- hidden: getFieldHiddenFunction("metaAttributes", config)
3086
- }),
3087
- defineField({
3088
- name: "keywords",
3089
- ...getFieldInfo("keywords", config.fieldOverrides),
3090
- title: "Keywords",
3091
- type: "array",
3092
- of: [{ type: "string" }],
3093
- description: "Add relevant keywords for this page. These keywords will be used for SEO purposes.",
3094
- hidden: getFieldHiddenFunction("keywords", config)
3095
- }),
3096
- defineField({
3097
- name: "canonicalUrl",
3098
- ...getFieldInfo("canonicalUrl", config.fieldOverrides),
3099
- title: "Canonical URL",
3100
- type: "url",
3101
- description: "Specify the canonical URL for this page. This helps prevent duplicate content issues by indicating the preferred version of a page.",
3102
- hidden: getFieldHiddenFunction("canonicalUrl", config)
3103
- }),
3104
- openGraph(config),
3105
- twitter(config)
3106
- ]
3107
- });
3108
- }
3109
- var metaAttribute = defineType({
3110
- name: "metaAttribute",
3111
- title: "Meta Attribute",
3112
- type: "object",
3113
- fields: [
3114
- defineField({
3115
- name: "key",
3116
- title: "Attribute Name",
3117
- type: "string"
3118
- }),
3119
- defineField({
3120
- name: "type",
3121
- title: "Attribute Value Type",
3122
- type: "string",
3123
- options: {
3124
- list: [
3125
- { title: "String", value: "string" },
3126
- { title: "Image", value: "image" }
3127
- ]
3128
- },
3129
- initialValue: "string"
3130
- }),
3131
- defineField({
3132
- name: "value",
3133
- title: "Attribute Value",
3134
- type: "string",
3135
- hidden: ({ parent }) => parent?.type === "image"
3136
- }),
3137
- defineField({
3138
- name: "image",
3139
- title: "Attribute Image Value",
3140
- type: "image",
3141
- hidden: ({ parent }) => parent?.type === "string"
3142
- })
3143
- ],
3144
- preview: {
3145
- select: {
3146
- attributeName: "key",
3147
- attributeValueString: "value",
3148
- attributeValueImage: "image"
3149
- },
3150
- prepare({ attributeName, attributeValueString, attributeValueImage }) {
3151
- let subtitle = "";
3152
- return attributeValueString ? subtitle = `Value: ${attributeValueString}` : attributeValueImage ? subtitle = "Value: [Image]" : subtitle = "No Attribute Value", {
3153
- title: attributeName || "No Attribute Name",
3154
- subtitle,
3155
- media: attributeValueImage
3156
- };
3157
- }
3158
- }
3159
- }), metaTag = defineType({
3160
- name: "metaTag",
3161
- title: "Meta Tag",
3162
- type: "object",
3163
- fields: [
3164
- {
3165
- name: "metaAttributes",
3166
- title: "Meta Attributes",
3167
- type: "array",
3168
- of: [{ type: "metaAttribute" }],
3169
- description: "Add custom meta attributes to the head of the document for additional SEO and social media integration."
3170
- }
3171
- ]
3172
- }), robots = defineType({
3173
- name: "robots",
3174
- title: "Robots Settings",
3175
- type: "object",
3176
- fields: [
3177
- defineField({
3178
- name: "noIndex",
3179
- title: "No Index",
3180
- type: "boolean",
3181
- initialValue: !1,
3182
- description: "Enable this to prevent search engines from indexing this page. The page will not appear in search results."
3183
- }),
3184
- defineField({
3185
- name: "noFollow",
3186
- title: "No Follow",
3187
- type: "boolean",
3188
- initialValue: !1,
3189
- description: "Enable this to prevent search engines from following links on this page. Links will not pass SEO value."
3190
- })
3191
- ],
3192
- description: "Select how search engines should index and follow links on this page."
3193
- });
3194
- function types(config = {}) {
3195
- return [
3196
- seoFieldsSchema(config),
3197
- // pass config here
3198
- openGraph(config),
3199
- // pass config here
3200
- twitter(config),
3201
- // pass config here
3202
- metaAttribute,
3203
- metaTag,
3204
- robots
3205
- ];
3206
- }
3207
- const resolveDashboardConfig = (healthDashboard) => {
3208
- const cfg = typeof healthDashboard == "object" ? healthDashboard : void 0;
3209
- return {
3210
- enabled: healthDashboard !== !1,
3211
- toolTitle: cfg?.tool?.title ?? "SEO Health",
3212
- toolName: cfg?.tool?.name ?? "seo-health-dashboard",
3213
- icon: cfg?.content?.icon,
3214
- title: cfg?.content?.title,
3215
- description: cfg?.content?.description,
3216
- showTypeColumn: cfg?.display?.typeColumn,
3217
- showDocumentId: cfg?.display?.documentId,
3218
- queryTypes: cfg?.query?.types,
3219
- queryRequireSeo: cfg?.query?.requireSeo,
3220
- queryGroq: cfg?.query?.groq,
3221
- apiVersion: cfg?.apiVersion,
3222
- licenseKey: cfg?.licenseKey,
3223
- typeLabels: cfg?.typeLabels,
3224
- typeColumnMode: cfg?.typeColumnMode,
3225
- titleField: cfg?.titleField,
3226
- docBadge: cfg?.docBadge,
3227
- loadingLicense: cfg?.content?.loadingLicense,
3228
- loadingDocuments: cfg?.content?.loadingDocuments,
3229
- noDocuments: cfg?.content?.noDocuments,
3230
- previewMode: cfg?.previewMode,
3231
- structureTool: cfg?.structureTool
3232
- };
3233
- }, seofields = definePlugin((config = {}) => {
3234
- const { healthDashboard = !0 } = config, dash = resolveDashboardConfig(healthDashboard), BoundSeoHealthTool = () => r.createElement(SeoHealthTool, {
3235
- icon: dash.icon,
3236
- title: dash.title,
3237
- description: dash.description,
3238
- showTypeColumn: dash.showTypeColumn,
3239
- showDocumentId: dash.showDocumentId,
3240
- queryTypes: dash.queryTypes,
3241
- queryRequireSeo: dash.queryRequireSeo,
3242
- customQuery: dash.queryGroq,
3243
- apiVersion: dash.apiVersion,
3244
- licenseKey: dash.licenseKey,
3245
- typeLabels: dash.typeLabels,
3246
- typeColumnMode: dash.typeColumnMode,
3247
- titleField: dash.titleField,
3248
- docBadge: dash.docBadge,
3249
- loadingLicense: dash.loadingLicense,
3250
- loadingDocuments: dash.loadingDocuments,
3251
- noDocuments: dash.noDocuments,
3252
- previewMode: dash.previewMode,
3253
- structureTool: dash.structureTool
3254
- });
3255
- return {
3256
- name: "sanity-plugin-seofields",
3257
- schema: {
3258
- types: types(config)
3259
- },
3260
- ...dash.enabled && {
3261
- tools: [
3262
- {
3263
- name: dash.toolName,
3264
- title: dash.toolTitle,
3265
- component: BoundSeoHealthTool,
3266
- icon: () => "\u{1F4CA}"
3267
- }
3268
- ]
3269
- }
3270
- };
3271
- });
3272
- function createSeoHealthPane(optionsOrS, optionsWhenS) {
3273
- const S2 = optionsOrS, { query, openInPane = !0, title: paneTitle, ...rest } = optionsWhenS ?? {}, SeoHealthPane = () => /* @__PURE__ */ jsx(SeoHealthDashboard, { customQuery: query, openInPane, title: paneTitle, ...rest });
3274
- return SeoHealthPane.displayName = "SeoHealthPane", S2.component(SeoHealthPane).title(paneTitle ?? "SEO Health").child((docId, { params }) => {
3275
- const builder = S2.document().documentId(docId);
3276
- return params?.type ? builder.schemaType(params.type) : builder;
3277
- });
3278
- }
3279
- export {
3280
- SeoHealthDashboard,
3281
- SeoHealthTool,
3282
- types as allSchemas,
3283
- createSeoHealthPane,
3284
- seofields as default,
3285
- metaAttribute as metaAttributeSchema,
3286
- metaTag as metaTagSchema,
3287
- openGraph as openGraphSchema,
3288
- robots as robotsSchema,
3289
- seoFieldsSchema,
3290
- twitter as twitterSchema
3291
- };
3292
- //# sourceMappingURL=index.mjs.map