@quartz-community/folder-page 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2834 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __export = (target, all) => {
11
+ for (var name2 in all)
12
+ __defProp(target, name2, { get: all[name2], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
28
+ mod
29
+ ));
30
+
31
+ // node_modules/inline-style-parser/cjs/index.js
32
+ var require_cjs = __commonJS({
33
+ "node_modules/inline-style-parser/cjs/index.js"(exports$1, module) {
34
+ var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
35
+ var NEWLINE_REGEX = /\n/g;
36
+ var WHITESPACE_REGEX = /^\s*/;
37
+ var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
38
+ var COLON_REGEX = /^:\s*/;
39
+ var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
40
+ var SEMICOLON_REGEX = /^[;\s]*/;
41
+ var TRIM_REGEX = /^\s+|\s+$/g;
42
+ var NEWLINE = "\n";
43
+ var FORWARD_SLASH = "/";
44
+ var ASTERISK = "*";
45
+ var EMPTY_STRING = "";
46
+ var TYPE_COMMENT = "comment";
47
+ var TYPE_DECLARATION = "declaration";
48
+ function index2(style, options) {
49
+ if (typeof style !== "string") {
50
+ throw new TypeError("First argument must be a string");
51
+ }
52
+ if (!style) return [];
53
+ options = options || {};
54
+ var lineno = 1;
55
+ var column = 1;
56
+ function updatePosition(str) {
57
+ var lines = str.match(NEWLINE_REGEX);
58
+ if (lines) lineno += lines.length;
59
+ var i2 = str.lastIndexOf(NEWLINE);
60
+ column = ~i2 ? str.length - i2 : column + str.length;
61
+ }
62
+ function position3() {
63
+ var start2 = { line: lineno, column };
64
+ return function(node) {
65
+ node.position = new Position(start2);
66
+ whitespace2();
67
+ return node;
68
+ };
69
+ }
70
+ function Position(start2) {
71
+ this.start = start2;
72
+ this.end = { line: lineno, column };
73
+ this.source = options.source;
74
+ }
75
+ Position.prototype.content = style;
76
+ function error(msg) {
77
+ var err = new Error(
78
+ options.source + ":" + lineno + ":" + column + ": " + msg
79
+ );
80
+ err.reason = msg;
81
+ err.filename = options.source;
82
+ err.line = lineno;
83
+ err.column = column;
84
+ err.source = style;
85
+ if (options.silent) ;
86
+ else {
87
+ throw err;
88
+ }
89
+ }
90
+ function match(re2) {
91
+ var m2 = re2.exec(style);
92
+ if (!m2) return;
93
+ var str = m2[0];
94
+ updatePosition(str);
95
+ style = style.slice(str.length);
96
+ return m2;
97
+ }
98
+ function whitespace2() {
99
+ match(WHITESPACE_REGEX);
100
+ }
101
+ function comments(rules) {
102
+ var c2;
103
+ rules = rules || [];
104
+ while (c2 = comment()) {
105
+ if (c2 !== false) {
106
+ rules.push(c2);
107
+ }
108
+ }
109
+ return rules;
110
+ }
111
+ function comment() {
112
+ var pos = position3();
113
+ if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
114
+ var i2 = 2;
115
+ while (EMPTY_STRING != style.charAt(i2) && (ASTERISK != style.charAt(i2) || FORWARD_SLASH != style.charAt(i2 + 1))) {
116
+ ++i2;
117
+ }
118
+ i2 += 2;
119
+ if (EMPTY_STRING === style.charAt(i2 - 1)) {
120
+ return error("End of comment missing");
121
+ }
122
+ var str = style.slice(2, i2 - 2);
123
+ column += 2;
124
+ updatePosition(str);
125
+ style = style.slice(i2);
126
+ column += 2;
127
+ return pos({
128
+ type: TYPE_COMMENT,
129
+ comment: str
130
+ });
131
+ }
132
+ function declaration() {
133
+ var pos = position3();
134
+ var prop = match(PROPERTY_REGEX);
135
+ if (!prop) return;
136
+ comment();
137
+ if (!match(COLON_REGEX)) return error("property missing ':'");
138
+ var val = match(VALUE_REGEX);
139
+ var ret = pos({
140
+ type: TYPE_DECLARATION,
141
+ property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
142
+ value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
143
+ });
144
+ match(SEMICOLON_REGEX);
145
+ return ret;
146
+ }
147
+ function declarations() {
148
+ var decls = [];
149
+ comments(decls);
150
+ var decl;
151
+ while (decl = declaration()) {
152
+ if (decl !== false) {
153
+ decls.push(decl);
154
+ comments(decls);
155
+ }
156
+ }
157
+ return decls;
158
+ }
159
+ whitespace2();
160
+ return declarations();
161
+ }
162
+ function trim(str) {
163
+ return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
164
+ }
165
+ module.exports = index2;
166
+ }
167
+ });
168
+
169
+ // node_modules/style-to-object/cjs/index.js
170
+ var require_cjs2 = __commonJS({
171
+ "node_modules/style-to-object/cjs/index.js"(exports$1) {
172
+ var __importDefault = exports$1 && exports$1.__importDefault || function(mod) {
173
+ return mod && mod.__esModule ? mod : { "default": mod };
174
+ };
175
+ Object.defineProperty(exports$1, "__esModule", { value: true });
176
+ exports$1.default = StyleToObject;
177
+ var inline_style_parser_1 = __importDefault(require_cjs());
178
+ function StyleToObject(style, iterator) {
179
+ let styleObject = null;
180
+ if (!style || typeof style !== "string") {
181
+ return styleObject;
182
+ }
183
+ const declarations = (0, inline_style_parser_1.default)(style);
184
+ const hasIterator = typeof iterator === "function";
185
+ declarations.forEach((declaration) => {
186
+ if (declaration.type !== "declaration") {
187
+ return;
188
+ }
189
+ const { property, value } = declaration;
190
+ if (hasIterator) {
191
+ iterator(property, value, declaration);
192
+ } else if (value) {
193
+ styleObject = styleObject || {};
194
+ styleObject[property] = value;
195
+ }
196
+ });
197
+ return styleObject;
198
+ }
199
+ }
200
+ });
201
+
202
+ // node_modules/style-to-js/cjs/utilities.js
203
+ var require_utilities = __commonJS({
204
+ "node_modules/style-to-js/cjs/utilities.js"(exports$1) {
205
+ Object.defineProperty(exports$1, "__esModule", { value: true });
206
+ exports$1.camelCase = void 0;
207
+ var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
208
+ var HYPHEN_REGEX = /-([a-z])/g;
209
+ var NO_HYPHEN_REGEX = /^[^-]+$/;
210
+ var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
211
+ var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
212
+ var skipCamelCase = function(property) {
213
+ return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
214
+ };
215
+ var capitalize = function(match, character) {
216
+ return character.toUpperCase();
217
+ };
218
+ var trimHyphen = function(match, prefix) {
219
+ return "".concat(prefix, "-");
220
+ };
221
+ var camelCase = function(property, options) {
222
+ if (options === void 0) {
223
+ options = {};
224
+ }
225
+ if (skipCamelCase(property)) {
226
+ return property;
227
+ }
228
+ property = property.toLowerCase();
229
+ if (options.reactCompat) {
230
+ property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
231
+ } else {
232
+ property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
233
+ }
234
+ return property.replace(HYPHEN_REGEX, capitalize);
235
+ };
236
+ exports$1.camelCase = camelCase;
237
+ }
238
+ });
239
+
240
+ // node_modules/style-to-js/cjs/index.js
241
+ var require_cjs3 = __commonJS({
242
+ "node_modules/style-to-js/cjs/index.js"(exports$1, module) {
243
+ var __importDefault = exports$1 && exports$1.__importDefault || function(mod) {
244
+ return mod && mod.__esModule ? mod : { "default": mod };
245
+ };
246
+ var style_to_object_1 = __importDefault(require_cjs2());
247
+ var utilities_1 = require_utilities();
248
+ function StyleToJS(style, options) {
249
+ var output = {};
250
+ if (!style || typeof style !== "string") {
251
+ return output;
252
+ }
253
+ (0, style_to_object_1.default)(style, function(property, value) {
254
+ if (property && value) {
255
+ output[(0, utilities_1.camelCase)(property, options)] = value;
256
+ }
257
+ });
258
+ return output;
259
+ }
260
+ StyleToJS.default = StyleToJS;
261
+ module.exports = StyleToJS;
262
+ }
263
+ });
264
+
265
+ // node_modules/@quartz-community/utils/dist/sort.js
266
+ function getDate(data) {
267
+ const defaultDateType = data.defaultDateType;
268
+ if (!defaultDateType) {
269
+ return void 0;
270
+ }
271
+ const dates = data.dates;
272
+ return dates?.[defaultDateType];
273
+ }
274
+ function byDateAndAlphabetical() {
275
+ return (f1, f22) => {
276
+ const f1Date = getDate(f1);
277
+ const f2Date = getDate(f22);
278
+ if (f1Date && f2Date) {
279
+ return f2Date.getTime() - f1Date.getTime();
280
+ } else if (f1Date && !f2Date) {
281
+ return -1;
282
+ } else if (!f1Date && f2Date) {
283
+ return 1;
284
+ }
285
+ const f1Title = (f1.frontmatter?.title ?? "").toLowerCase();
286
+ const f2Title = (f22.frontmatter?.title ?? "").toLowerCase();
287
+ return f1Title.localeCompare(f2Title);
288
+ };
289
+ }
290
+
291
+ // node_modules/@quartz-community/utils/dist/path.js
292
+ function simplifySlug(fp) {
293
+ const res = stripSlashes(trimSuffix(fp, "index"), true);
294
+ return res.length === 0 ? "/" : res;
295
+ }
296
+ function joinSegments(...args) {
297
+ if (args.length === 0) {
298
+ return "";
299
+ }
300
+ let joined = args.filter((segment) => segment !== "" && segment !== "/").map((segment) => stripSlashes(segment)).join("/");
301
+ const first = args[0];
302
+ const last = args[args.length - 1];
303
+ if (first?.startsWith("/")) {
304
+ joined = "/" + joined;
305
+ }
306
+ if (last?.endsWith("/")) {
307
+ joined = joined + "/";
308
+ }
309
+ return joined;
310
+ }
311
+ function endsWith(s2, suffix) {
312
+ return s2 === suffix || s2.endsWith("/" + suffix);
313
+ }
314
+ function trimSuffix(s2, suffix) {
315
+ if (endsWith(s2, suffix)) {
316
+ s2 = s2.slice(0, -suffix.length);
317
+ }
318
+ return s2;
319
+ }
320
+ function stripSlashes(s2, onlyStripPrefix) {
321
+ if (s2.startsWith("/")) {
322
+ s2 = s2.substring(1);
323
+ }
324
+ if (!onlyStripPrefix && s2.endsWith("/")) {
325
+ s2 = s2.slice(0, -1);
326
+ }
327
+ return s2;
328
+ }
329
+ function isFolderPath(fplike) {
330
+ return fplike.endsWith("/") || endsWith(fplike, "index") || endsWith(fplike, "index.md") || endsWith(fplike, "index.html");
331
+ }
332
+ function pathToRoot(slug2) {
333
+ let rootPath = slug2.split("/").filter((x2) => x2 !== "").slice(0, -1).map((_2) => "..").join("/");
334
+ if (rootPath.length === 0) {
335
+ rootPath = ".";
336
+ }
337
+ return rootPath;
338
+ }
339
+ function resolveRelative(current, target) {
340
+ const res = joinSegments(pathToRoot(current), simplifySlug(target));
341
+ return res;
342
+ }
343
+
344
+ // node_modules/preact/dist/preact.mjs
345
+ var n;
346
+ var l;
347
+ var u;
348
+ var w = [];
349
+ function k(l2, u3, t2) {
350
+ var i2, r2, o2, e2 = {};
351
+ for (o2 in u3) "key" == o2 ? i2 = u3[o2] : "ref" == o2 ? r2 = u3[o2] : e2[o2] = u3[o2];
352
+ if (arguments.length > 2 && (e2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps) for (o2 in l2.defaultProps) void 0 === e2[o2] && (e2[o2] = l2.defaultProps[o2]);
353
+ return x(l2, e2, i2, r2, null);
354
+ }
355
+ function x(n2, t2, i2, r2, o2) {
356
+ var e2 = { type: n2, props: t2, key: i2, ref: r2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == o2 ? ++u : o2, __i: -1, __u: 0 };
357
+ return null != l.vnode && l.vnode(e2), e2;
358
+ }
359
+ function S(n2) {
360
+ return n2.children;
361
+ }
362
+ n = w.slice, l = { __e: function(n2, l2, u3, t2) {
363
+ for (var i2, r2, o2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try {
364
+ if ((r2 = i2.constructor) && null != r2.getDerivedStateFromError && (i2.setState(r2.getDerivedStateFromError(n2)), o2 = i2.__d), null != i2.componentDidCatch && (i2.componentDidCatch(n2, t2 || {}), o2 = i2.__d), o2) return i2.__E = i2;
365
+ } catch (l3) {
366
+ n2 = l3;
367
+ }
368
+ throw n2;
369
+ } }, u = 0, "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Math.random().toString(8);
370
+
371
+ // node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
372
+ var f2 = 0;
373
+ function u2(e2, t2, n2, o2, i2, u3) {
374
+ t2 || (t2 = {});
375
+ var a2, c2, p2 = t2;
376
+ if ("ref" in p2) for (c2 in p2 = {}, t2) "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
377
+ var l2 = { type: e2, props: p2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f2, __i: -1, __u: 0, __source: i2, __self: u3 };
378
+ if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
379
+ return l.vnode && l.vnode(l2), l2;
380
+ }
381
+
382
+ // src/components/PageList.tsx
383
+ function byDateAndAlphabeticalFolderFirst(_cfg) {
384
+ return (f1, f22) => {
385
+ const f1IsFolder = isFolderPath(f1.slug ?? "");
386
+ const f2IsFolder = isFolderPath(f22.slug ?? "");
387
+ if (f1IsFolder && !f2IsFolder) return -1;
388
+ if (!f1IsFolder && f2IsFolder) return 1;
389
+ if (f1.dates && f22.dates) {
390
+ return (getDate(f22)?.getTime() ?? 0) - (getDate(f1)?.getTime() ?? 0);
391
+ } else if (f1.dates && !f22.dates) {
392
+ return -1;
393
+ } else if (!f1.dates && f22.dates) {
394
+ return 1;
395
+ }
396
+ const f1Title = f1.frontmatter?.title?.toLowerCase() ?? "";
397
+ const f2Title = f22.frontmatter?.title?.toLowerCase() ?? "";
398
+ return f1Title.localeCompare(f2Title);
399
+ };
400
+ }
401
+ function DateDisplay({ date, locale }) {
402
+ return /* @__PURE__ */ u2("time", { dateTime: date.toISOString(), children: date.toLocaleDateString(locale, {
403
+ year: "numeric",
404
+ month: "short",
405
+ day: "2-digit"
406
+ }) });
407
+ }
408
+ var PageList = ({
409
+ cfg,
410
+ fileData,
411
+ allFiles,
412
+ limit,
413
+ sort
414
+ }) => {
415
+ const sorter = sort ?? byDateAndAlphabeticalFolderFirst();
416
+ let list = [...allFiles].sort(sorter);
417
+ if (limit) {
418
+ list = list.slice(0, limit);
419
+ }
420
+ const fileSlug = fileData?.slug;
421
+ return /* @__PURE__ */ u2("ul", { class: "section-ul", children: list.map((page) => {
422
+ const title = page.frontmatter?.title;
423
+ const tags = page.frontmatter?.tags ?? [];
424
+ return /* @__PURE__ */ u2("li", { class: "section-li", children: /* @__PURE__ */ u2("div", { class: "section", children: [
425
+ /* @__PURE__ */ u2("p", { class: "meta", children: page.dates && getDate(page) && /* @__PURE__ */ u2(
426
+ DateDisplay,
427
+ {
428
+ date: getDate(page),
429
+ locale: cfg?.locale ?? "en-US"
430
+ }
431
+ ) }),
432
+ /* @__PURE__ */ u2("div", { class: "desc", children: /* @__PURE__ */ u2("h3", { children: /* @__PURE__ */ u2(
433
+ "a",
434
+ {
435
+ href: resolveRelative(fileSlug ?? "", page.slug),
436
+ class: "internal",
437
+ children: title
438
+ }
439
+ ) }) }),
440
+ /* @__PURE__ */ u2("ul", { class: "tags", children: tags.map((tag) => /* @__PURE__ */ u2("li", { children: /* @__PURE__ */ u2(
441
+ "a",
442
+ {
443
+ class: "internal tag-link",
444
+ href: resolveRelative(
445
+ fileSlug ?? "",
446
+ `tags/${tag}`
447
+ ),
448
+ children: tag
449
+ }
450
+ ) })) })
451
+ ] }) });
452
+ }) });
453
+ };
454
+ PageList.css = `
455
+ .section h3 {
456
+ margin: 0;
457
+ }
458
+
459
+ .section > .tags {
460
+ margin: 0;
461
+ }
462
+ `;
463
+
464
+ // node_modules/comma-separated-tokens/index.js
465
+ function stringify(values, options) {
466
+ const settings = {};
467
+ const input = values[values.length - 1] === "" ? [...values, ""] : values;
468
+ return input.join(
469
+ (settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
470
+ ).trim();
471
+ }
472
+
473
+ // node_modules/devlop/lib/default.js
474
+ function ok() {
475
+ }
476
+
477
+ // node_modules/estree-util-is-identifier-name/lib/index.js
478
+ var nameRe = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u;
479
+ var nameReJsx = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u;
480
+ var emptyOptions = {};
481
+ function name(name2, options) {
482
+ const settings = emptyOptions;
483
+ const re2 = settings.jsx ? nameReJsx : nameRe;
484
+ return re2.test(name2);
485
+ }
486
+
487
+ // node_modules/hast-util-whitespace/lib/index.js
488
+ var re = /[ \t\n\f\r]/g;
489
+ function whitespace(thing) {
490
+ return typeof thing === "object" ? thing.type === "text" ? empty(thing.value) : false : empty(thing);
491
+ }
492
+ function empty(value) {
493
+ return value.replace(re, "") === "";
494
+ }
495
+
496
+ // node_modules/property-information/lib/util/schema.js
497
+ var Schema = class {
498
+ /**
499
+ * @param {SchemaType['property']} property
500
+ * Property.
501
+ * @param {SchemaType['normal']} normal
502
+ * Normal.
503
+ * @param {Space | undefined} [space]
504
+ * Space.
505
+ * @returns
506
+ * Schema.
507
+ */
508
+ constructor(property, normal, space) {
509
+ this.normal = normal;
510
+ this.property = property;
511
+ if (space) {
512
+ this.space = space;
513
+ }
514
+ }
515
+ };
516
+ Schema.prototype.normal = {};
517
+ Schema.prototype.property = {};
518
+ Schema.prototype.space = void 0;
519
+
520
+ // node_modules/property-information/lib/util/merge.js
521
+ function merge(definitions, space) {
522
+ const property = {};
523
+ const normal = {};
524
+ for (const definition of definitions) {
525
+ Object.assign(property, definition.property);
526
+ Object.assign(normal, definition.normal);
527
+ }
528
+ return new Schema(property, normal, space);
529
+ }
530
+
531
+ // node_modules/property-information/lib/normalize.js
532
+ function normalize(value) {
533
+ return value.toLowerCase();
534
+ }
535
+
536
+ // node_modules/property-information/lib/util/info.js
537
+ var Info = class {
538
+ /**
539
+ * @param {string} property
540
+ * Property.
541
+ * @param {string} attribute
542
+ * Attribute.
543
+ * @returns
544
+ * Info.
545
+ */
546
+ constructor(property, attribute) {
547
+ this.attribute = attribute;
548
+ this.property = property;
549
+ }
550
+ };
551
+ Info.prototype.attribute = "";
552
+ Info.prototype.booleanish = false;
553
+ Info.prototype.boolean = false;
554
+ Info.prototype.commaOrSpaceSeparated = false;
555
+ Info.prototype.commaSeparated = false;
556
+ Info.prototype.defined = false;
557
+ Info.prototype.mustUseProperty = false;
558
+ Info.prototype.number = false;
559
+ Info.prototype.overloadedBoolean = false;
560
+ Info.prototype.property = "";
561
+ Info.prototype.spaceSeparated = false;
562
+ Info.prototype.space = void 0;
563
+
564
+ // node_modules/property-information/lib/util/types.js
565
+ var types_exports = {};
566
+ __export(types_exports, {
567
+ boolean: () => boolean,
568
+ booleanish: () => booleanish,
569
+ commaOrSpaceSeparated: () => commaOrSpaceSeparated,
570
+ commaSeparated: () => commaSeparated,
571
+ number: () => number,
572
+ overloadedBoolean: () => overloadedBoolean,
573
+ spaceSeparated: () => spaceSeparated
574
+ });
575
+ var powers = 0;
576
+ var boolean = increment();
577
+ var booleanish = increment();
578
+ var overloadedBoolean = increment();
579
+ var number = increment();
580
+ var spaceSeparated = increment();
581
+ var commaSeparated = increment();
582
+ var commaOrSpaceSeparated = increment();
583
+ function increment() {
584
+ return 2 ** ++powers;
585
+ }
586
+
587
+ // node_modules/property-information/lib/util/defined-info.js
588
+ var checks = (
589
+ /** @type {ReadonlyArray<keyof typeof types>} */
590
+ Object.keys(types_exports)
591
+ );
592
+ var DefinedInfo = class extends Info {
593
+ /**
594
+ * @constructor
595
+ * @param {string} property
596
+ * Property.
597
+ * @param {string} attribute
598
+ * Attribute.
599
+ * @param {number | null | undefined} [mask]
600
+ * Mask.
601
+ * @param {Space | undefined} [space]
602
+ * Space.
603
+ * @returns
604
+ * Info.
605
+ */
606
+ constructor(property, attribute, mask, space) {
607
+ let index2 = -1;
608
+ super(property, attribute);
609
+ mark(this, "space", space);
610
+ if (typeof mask === "number") {
611
+ while (++index2 < checks.length) {
612
+ const check = checks[index2];
613
+ mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]);
614
+ }
615
+ }
616
+ }
617
+ };
618
+ DefinedInfo.prototype.defined = true;
619
+ function mark(values, key, value) {
620
+ if (value) {
621
+ values[key] = value;
622
+ }
623
+ }
624
+
625
+ // node_modules/property-information/lib/util/create.js
626
+ function create(definition) {
627
+ const properties = {};
628
+ const normals = {};
629
+ for (const [property, value] of Object.entries(definition.properties)) {
630
+ const info = new DefinedInfo(
631
+ property,
632
+ definition.transform(definition.attributes || {}, property),
633
+ value,
634
+ definition.space
635
+ );
636
+ if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) {
637
+ info.mustUseProperty = true;
638
+ }
639
+ properties[property] = info;
640
+ normals[normalize(property)] = property;
641
+ normals[normalize(info.attribute)] = property;
642
+ }
643
+ return new Schema(properties, normals, definition.space);
644
+ }
645
+
646
+ // node_modules/property-information/lib/aria.js
647
+ var aria = create({
648
+ properties: {
649
+ ariaActiveDescendant: null,
650
+ ariaAtomic: booleanish,
651
+ ariaAutoComplete: null,
652
+ ariaBusy: booleanish,
653
+ ariaChecked: booleanish,
654
+ ariaColCount: number,
655
+ ariaColIndex: number,
656
+ ariaColSpan: number,
657
+ ariaControls: spaceSeparated,
658
+ ariaCurrent: null,
659
+ ariaDescribedBy: spaceSeparated,
660
+ ariaDetails: null,
661
+ ariaDisabled: booleanish,
662
+ ariaDropEffect: spaceSeparated,
663
+ ariaErrorMessage: null,
664
+ ariaExpanded: booleanish,
665
+ ariaFlowTo: spaceSeparated,
666
+ ariaGrabbed: booleanish,
667
+ ariaHasPopup: null,
668
+ ariaHidden: booleanish,
669
+ ariaInvalid: null,
670
+ ariaKeyShortcuts: null,
671
+ ariaLabel: null,
672
+ ariaLabelledBy: spaceSeparated,
673
+ ariaLevel: number,
674
+ ariaLive: null,
675
+ ariaModal: booleanish,
676
+ ariaMultiLine: booleanish,
677
+ ariaMultiSelectable: booleanish,
678
+ ariaOrientation: null,
679
+ ariaOwns: spaceSeparated,
680
+ ariaPlaceholder: null,
681
+ ariaPosInSet: number,
682
+ ariaPressed: booleanish,
683
+ ariaReadOnly: booleanish,
684
+ ariaRelevant: null,
685
+ ariaRequired: booleanish,
686
+ ariaRoleDescription: spaceSeparated,
687
+ ariaRowCount: number,
688
+ ariaRowIndex: number,
689
+ ariaRowSpan: number,
690
+ ariaSelected: booleanish,
691
+ ariaSetSize: number,
692
+ ariaSort: null,
693
+ ariaValueMax: number,
694
+ ariaValueMin: number,
695
+ ariaValueNow: number,
696
+ ariaValueText: null,
697
+ role: null
698
+ },
699
+ transform(_2, property) {
700
+ return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
701
+ }
702
+ });
703
+
704
+ // node_modules/property-information/lib/util/case-sensitive-transform.js
705
+ function caseSensitiveTransform(attributes, attribute) {
706
+ return attribute in attributes ? attributes[attribute] : attribute;
707
+ }
708
+
709
+ // node_modules/property-information/lib/util/case-insensitive-transform.js
710
+ function caseInsensitiveTransform(attributes, property) {
711
+ return caseSensitiveTransform(attributes, property.toLowerCase());
712
+ }
713
+
714
+ // node_modules/property-information/lib/html.js
715
+ var html = create({
716
+ attributes: {
717
+ acceptcharset: "accept-charset",
718
+ classname: "class",
719
+ htmlfor: "for",
720
+ httpequiv: "http-equiv"
721
+ },
722
+ mustUseProperty: ["checked", "multiple", "muted", "selected"],
723
+ properties: {
724
+ // Standard Properties.
725
+ abbr: null,
726
+ accept: commaSeparated,
727
+ acceptCharset: spaceSeparated,
728
+ accessKey: spaceSeparated,
729
+ action: null,
730
+ allow: null,
731
+ allowFullScreen: boolean,
732
+ allowPaymentRequest: boolean,
733
+ allowUserMedia: boolean,
734
+ alt: null,
735
+ as: null,
736
+ async: boolean,
737
+ autoCapitalize: null,
738
+ autoComplete: spaceSeparated,
739
+ autoFocus: boolean,
740
+ autoPlay: boolean,
741
+ blocking: spaceSeparated,
742
+ capture: null,
743
+ charSet: null,
744
+ checked: boolean,
745
+ cite: null,
746
+ className: spaceSeparated,
747
+ cols: number,
748
+ colSpan: null,
749
+ content: null,
750
+ contentEditable: booleanish,
751
+ controls: boolean,
752
+ controlsList: spaceSeparated,
753
+ coords: number | commaSeparated,
754
+ crossOrigin: null,
755
+ data: null,
756
+ dateTime: null,
757
+ decoding: null,
758
+ default: boolean,
759
+ defer: boolean,
760
+ dir: null,
761
+ dirName: null,
762
+ disabled: boolean,
763
+ download: overloadedBoolean,
764
+ draggable: booleanish,
765
+ encType: null,
766
+ enterKeyHint: null,
767
+ fetchPriority: null,
768
+ form: null,
769
+ formAction: null,
770
+ formEncType: null,
771
+ formMethod: null,
772
+ formNoValidate: boolean,
773
+ formTarget: null,
774
+ headers: spaceSeparated,
775
+ height: number,
776
+ hidden: overloadedBoolean,
777
+ high: number,
778
+ href: null,
779
+ hrefLang: null,
780
+ htmlFor: spaceSeparated,
781
+ httpEquiv: spaceSeparated,
782
+ id: null,
783
+ imageSizes: null,
784
+ imageSrcSet: null,
785
+ inert: boolean,
786
+ inputMode: null,
787
+ integrity: null,
788
+ is: null,
789
+ isMap: boolean,
790
+ itemId: null,
791
+ itemProp: spaceSeparated,
792
+ itemRef: spaceSeparated,
793
+ itemScope: boolean,
794
+ itemType: spaceSeparated,
795
+ kind: null,
796
+ label: null,
797
+ lang: null,
798
+ language: null,
799
+ list: null,
800
+ loading: null,
801
+ loop: boolean,
802
+ low: number,
803
+ manifest: null,
804
+ max: null,
805
+ maxLength: number,
806
+ media: null,
807
+ method: null,
808
+ min: null,
809
+ minLength: number,
810
+ multiple: boolean,
811
+ muted: boolean,
812
+ name: null,
813
+ nonce: null,
814
+ noModule: boolean,
815
+ noValidate: boolean,
816
+ onAbort: null,
817
+ onAfterPrint: null,
818
+ onAuxClick: null,
819
+ onBeforeMatch: null,
820
+ onBeforePrint: null,
821
+ onBeforeToggle: null,
822
+ onBeforeUnload: null,
823
+ onBlur: null,
824
+ onCancel: null,
825
+ onCanPlay: null,
826
+ onCanPlayThrough: null,
827
+ onChange: null,
828
+ onClick: null,
829
+ onClose: null,
830
+ onContextLost: null,
831
+ onContextMenu: null,
832
+ onContextRestored: null,
833
+ onCopy: null,
834
+ onCueChange: null,
835
+ onCut: null,
836
+ onDblClick: null,
837
+ onDrag: null,
838
+ onDragEnd: null,
839
+ onDragEnter: null,
840
+ onDragExit: null,
841
+ onDragLeave: null,
842
+ onDragOver: null,
843
+ onDragStart: null,
844
+ onDrop: null,
845
+ onDurationChange: null,
846
+ onEmptied: null,
847
+ onEnded: null,
848
+ onError: null,
849
+ onFocus: null,
850
+ onFormData: null,
851
+ onHashChange: null,
852
+ onInput: null,
853
+ onInvalid: null,
854
+ onKeyDown: null,
855
+ onKeyPress: null,
856
+ onKeyUp: null,
857
+ onLanguageChange: null,
858
+ onLoad: null,
859
+ onLoadedData: null,
860
+ onLoadedMetadata: null,
861
+ onLoadEnd: null,
862
+ onLoadStart: null,
863
+ onMessage: null,
864
+ onMessageError: null,
865
+ onMouseDown: null,
866
+ onMouseEnter: null,
867
+ onMouseLeave: null,
868
+ onMouseMove: null,
869
+ onMouseOut: null,
870
+ onMouseOver: null,
871
+ onMouseUp: null,
872
+ onOffline: null,
873
+ onOnline: null,
874
+ onPageHide: null,
875
+ onPageShow: null,
876
+ onPaste: null,
877
+ onPause: null,
878
+ onPlay: null,
879
+ onPlaying: null,
880
+ onPopState: null,
881
+ onProgress: null,
882
+ onRateChange: null,
883
+ onRejectionHandled: null,
884
+ onReset: null,
885
+ onResize: null,
886
+ onScroll: null,
887
+ onScrollEnd: null,
888
+ onSecurityPolicyViolation: null,
889
+ onSeeked: null,
890
+ onSeeking: null,
891
+ onSelect: null,
892
+ onSlotChange: null,
893
+ onStalled: null,
894
+ onStorage: null,
895
+ onSubmit: null,
896
+ onSuspend: null,
897
+ onTimeUpdate: null,
898
+ onToggle: null,
899
+ onUnhandledRejection: null,
900
+ onUnload: null,
901
+ onVolumeChange: null,
902
+ onWaiting: null,
903
+ onWheel: null,
904
+ open: boolean,
905
+ optimum: number,
906
+ pattern: null,
907
+ ping: spaceSeparated,
908
+ placeholder: null,
909
+ playsInline: boolean,
910
+ popover: null,
911
+ popoverTarget: null,
912
+ popoverTargetAction: null,
913
+ poster: null,
914
+ preload: null,
915
+ readOnly: boolean,
916
+ referrerPolicy: null,
917
+ rel: spaceSeparated,
918
+ required: boolean,
919
+ reversed: boolean,
920
+ rows: number,
921
+ rowSpan: number,
922
+ sandbox: spaceSeparated,
923
+ scope: null,
924
+ scoped: boolean,
925
+ seamless: boolean,
926
+ selected: boolean,
927
+ shadowRootClonable: boolean,
928
+ shadowRootDelegatesFocus: boolean,
929
+ shadowRootMode: null,
930
+ shape: null,
931
+ size: number,
932
+ sizes: null,
933
+ slot: null,
934
+ span: number,
935
+ spellCheck: booleanish,
936
+ src: null,
937
+ srcDoc: null,
938
+ srcLang: null,
939
+ srcSet: null,
940
+ start: number,
941
+ step: null,
942
+ style: null,
943
+ tabIndex: number,
944
+ target: null,
945
+ title: null,
946
+ translate: null,
947
+ type: null,
948
+ typeMustMatch: boolean,
949
+ useMap: null,
950
+ value: booleanish,
951
+ width: number,
952
+ wrap: null,
953
+ writingSuggestions: null,
954
+ // Legacy.
955
+ // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
956
+ align: null,
957
+ // Several. Use CSS `text-align` instead,
958
+ aLink: null,
959
+ // `<body>`. Use CSS `a:active {color}` instead
960
+ archive: spaceSeparated,
961
+ // `<object>`. List of URIs to archives
962
+ axis: null,
963
+ // `<td>` and `<th>`. Use `scope` on `<th>`
964
+ background: null,
965
+ // `<body>`. Use CSS `background-image` instead
966
+ bgColor: null,
967
+ // `<body>` and table elements. Use CSS `background-color` instead
968
+ border: number,
969
+ // `<table>`. Use CSS `border-width` instead,
970
+ borderColor: null,
971
+ // `<table>`. Use CSS `border-color` instead,
972
+ bottomMargin: number,
973
+ // `<body>`
974
+ cellPadding: null,
975
+ // `<table>`
976
+ cellSpacing: null,
977
+ // `<table>`
978
+ char: null,
979
+ // Several table elements. When `align=char`, sets the character to align on
980
+ charOff: null,
981
+ // Several table elements. When `char`, offsets the alignment
982
+ classId: null,
983
+ // `<object>`
984
+ clear: null,
985
+ // `<br>`. Use CSS `clear` instead
986
+ code: null,
987
+ // `<object>`
988
+ codeBase: null,
989
+ // `<object>`
990
+ codeType: null,
991
+ // `<object>`
992
+ color: null,
993
+ // `<font>` and `<hr>`. Use CSS instead
994
+ compact: boolean,
995
+ // Lists. Use CSS to reduce space between items instead
996
+ declare: boolean,
997
+ // `<object>`
998
+ event: null,
999
+ // `<script>`
1000
+ face: null,
1001
+ // `<font>`. Use CSS instead
1002
+ frame: null,
1003
+ // `<table>`
1004
+ frameBorder: null,
1005
+ // `<iframe>`. Use CSS `border` instead
1006
+ hSpace: number,
1007
+ // `<img>` and `<object>`
1008
+ leftMargin: number,
1009
+ // `<body>`
1010
+ link: null,
1011
+ // `<body>`. Use CSS `a:link {color: *}` instead
1012
+ longDesc: null,
1013
+ // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
1014
+ lowSrc: null,
1015
+ // `<img>`. Use a `<picture>`
1016
+ marginHeight: number,
1017
+ // `<body>`
1018
+ marginWidth: number,
1019
+ // `<body>`
1020
+ noResize: boolean,
1021
+ // `<frame>`
1022
+ noHref: boolean,
1023
+ // `<area>`. Use no href instead of an explicit `nohref`
1024
+ noShade: boolean,
1025
+ // `<hr>`. Use background-color and height instead of borders
1026
+ noWrap: boolean,
1027
+ // `<td>` and `<th>`
1028
+ object: null,
1029
+ // `<applet>`
1030
+ profile: null,
1031
+ // `<head>`
1032
+ prompt: null,
1033
+ // `<isindex>`
1034
+ rev: null,
1035
+ // `<link>`
1036
+ rightMargin: number,
1037
+ // `<body>`
1038
+ rules: null,
1039
+ // `<table>`
1040
+ scheme: null,
1041
+ // `<meta>`
1042
+ scrolling: booleanish,
1043
+ // `<frame>`. Use overflow in the child context
1044
+ standby: null,
1045
+ // `<object>`
1046
+ summary: null,
1047
+ // `<table>`
1048
+ text: null,
1049
+ // `<body>`. Use CSS `color` instead
1050
+ topMargin: number,
1051
+ // `<body>`
1052
+ valueType: null,
1053
+ // `<param>`
1054
+ version: null,
1055
+ // `<html>`. Use a doctype.
1056
+ vAlign: null,
1057
+ // Several. Use CSS `vertical-align` instead
1058
+ vLink: null,
1059
+ // `<body>`. Use CSS `a:visited {color}` instead
1060
+ vSpace: number,
1061
+ // `<img>` and `<object>`
1062
+ // Non-standard Properties.
1063
+ allowTransparency: null,
1064
+ autoCorrect: null,
1065
+ autoSave: null,
1066
+ disablePictureInPicture: boolean,
1067
+ disableRemotePlayback: boolean,
1068
+ prefix: null,
1069
+ property: null,
1070
+ results: number,
1071
+ security: null,
1072
+ unselectable: null
1073
+ },
1074
+ space: "html",
1075
+ transform: caseInsensitiveTransform
1076
+ });
1077
+
1078
+ // node_modules/property-information/lib/svg.js
1079
+ var svg = create({
1080
+ attributes: {
1081
+ accentHeight: "accent-height",
1082
+ alignmentBaseline: "alignment-baseline",
1083
+ arabicForm: "arabic-form",
1084
+ baselineShift: "baseline-shift",
1085
+ capHeight: "cap-height",
1086
+ className: "class",
1087
+ clipPath: "clip-path",
1088
+ clipRule: "clip-rule",
1089
+ colorInterpolation: "color-interpolation",
1090
+ colorInterpolationFilters: "color-interpolation-filters",
1091
+ colorProfile: "color-profile",
1092
+ colorRendering: "color-rendering",
1093
+ crossOrigin: "crossorigin",
1094
+ dataType: "datatype",
1095
+ dominantBaseline: "dominant-baseline",
1096
+ enableBackground: "enable-background",
1097
+ fillOpacity: "fill-opacity",
1098
+ fillRule: "fill-rule",
1099
+ floodColor: "flood-color",
1100
+ floodOpacity: "flood-opacity",
1101
+ fontFamily: "font-family",
1102
+ fontSize: "font-size",
1103
+ fontSizeAdjust: "font-size-adjust",
1104
+ fontStretch: "font-stretch",
1105
+ fontStyle: "font-style",
1106
+ fontVariant: "font-variant",
1107
+ fontWeight: "font-weight",
1108
+ glyphName: "glyph-name",
1109
+ glyphOrientationHorizontal: "glyph-orientation-horizontal",
1110
+ glyphOrientationVertical: "glyph-orientation-vertical",
1111
+ hrefLang: "hreflang",
1112
+ horizAdvX: "horiz-adv-x",
1113
+ horizOriginX: "horiz-origin-x",
1114
+ horizOriginY: "horiz-origin-y",
1115
+ imageRendering: "image-rendering",
1116
+ letterSpacing: "letter-spacing",
1117
+ lightingColor: "lighting-color",
1118
+ markerEnd: "marker-end",
1119
+ markerMid: "marker-mid",
1120
+ markerStart: "marker-start",
1121
+ navDown: "nav-down",
1122
+ navDownLeft: "nav-down-left",
1123
+ navDownRight: "nav-down-right",
1124
+ navLeft: "nav-left",
1125
+ navNext: "nav-next",
1126
+ navPrev: "nav-prev",
1127
+ navRight: "nav-right",
1128
+ navUp: "nav-up",
1129
+ navUpLeft: "nav-up-left",
1130
+ navUpRight: "nav-up-right",
1131
+ onAbort: "onabort",
1132
+ onActivate: "onactivate",
1133
+ onAfterPrint: "onafterprint",
1134
+ onBeforePrint: "onbeforeprint",
1135
+ onBegin: "onbegin",
1136
+ onCancel: "oncancel",
1137
+ onCanPlay: "oncanplay",
1138
+ onCanPlayThrough: "oncanplaythrough",
1139
+ onChange: "onchange",
1140
+ onClick: "onclick",
1141
+ onClose: "onclose",
1142
+ onCopy: "oncopy",
1143
+ onCueChange: "oncuechange",
1144
+ onCut: "oncut",
1145
+ onDblClick: "ondblclick",
1146
+ onDrag: "ondrag",
1147
+ onDragEnd: "ondragend",
1148
+ onDragEnter: "ondragenter",
1149
+ onDragExit: "ondragexit",
1150
+ onDragLeave: "ondragleave",
1151
+ onDragOver: "ondragover",
1152
+ onDragStart: "ondragstart",
1153
+ onDrop: "ondrop",
1154
+ onDurationChange: "ondurationchange",
1155
+ onEmptied: "onemptied",
1156
+ onEnd: "onend",
1157
+ onEnded: "onended",
1158
+ onError: "onerror",
1159
+ onFocus: "onfocus",
1160
+ onFocusIn: "onfocusin",
1161
+ onFocusOut: "onfocusout",
1162
+ onHashChange: "onhashchange",
1163
+ onInput: "oninput",
1164
+ onInvalid: "oninvalid",
1165
+ onKeyDown: "onkeydown",
1166
+ onKeyPress: "onkeypress",
1167
+ onKeyUp: "onkeyup",
1168
+ onLoad: "onload",
1169
+ onLoadedData: "onloadeddata",
1170
+ onLoadedMetadata: "onloadedmetadata",
1171
+ onLoadStart: "onloadstart",
1172
+ onMessage: "onmessage",
1173
+ onMouseDown: "onmousedown",
1174
+ onMouseEnter: "onmouseenter",
1175
+ onMouseLeave: "onmouseleave",
1176
+ onMouseMove: "onmousemove",
1177
+ onMouseOut: "onmouseout",
1178
+ onMouseOver: "onmouseover",
1179
+ onMouseUp: "onmouseup",
1180
+ onMouseWheel: "onmousewheel",
1181
+ onOffline: "onoffline",
1182
+ onOnline: "ononline",
1183
+ onPageHide: "onpagehide",
1184
+ onPageShow: "onpageshow",
1185
+ onPaste: "onpaste",
1186
+ onPause: "onpause",
1187
+ onPlay: "onplay",
1188
+ onPlaying: "onplaying",
1189
+ onPopState: "onpopstate",
1190
+ onProgress: "onprogress",
1191
+ onRateChange: "onratechange",
1192
+ onRepeat: "onrepeat",
1193
+ onReset: "onreset",
1194
+ onResize: "onresize",
1195
+ onScroll: "onscroll",
1196
+ onSeeked: "onseeked",
1197
+ onSeeking: "onseeking",
1198
+ onSelect: "onselect",
1199
+ onShow: "onshow",
1200
+ onStalled: "onstalled",
1201
+ onStorage: "onstorage",
1202
+ onSubmit: "onsubmit",
1203
+ onSuspend: "onsuspend",
1204
+ onTimeUpdate: "ontimeupdate",
1205
+ onToggle: "ontoggle",
1206
+ onUnload: "onunload",
1207
+ onVolumeChange: "onvolumechange",
1208
+ onWaiting: "onwaiting",
1209
+ onZoom: "onzoom",
1210
+ overlinePosition: "overline-position",
1211
+ overlineThickness: "overline-thickness",
1212
+ paintOrder: "paint-order",
1213
+ panose1: "panose-1",
1214
+ pointerEvents: "pointer-events",
1215
+ referrerPolicy: "referrerpolicy",
1216
+ renderingIntent: "rendering-intent",
1217
+ shapeRendering: "shape-rendering",
1218
+ stopColor: "stop-color",
1219
+ stopOpacity: "stop-opacity",
1220
+ strikethroughPosition: "strikethrough-position",
1221
+ strikethroughThickness: "strikethrough-thickness",
1222
+ strokeDashArray: "stroke-dasharray",
1223
+ strokeDashOffset: "stroke-dashoffset",
1224
+ strokeLineCap: "stroke-linecap",
1225
+ strokeLineJoin: "stroke-linejoin",
1226
+ strokeMiterLimit: "stroke-miterlimit",
1227
+ strokeOpacity: "stroke-opacity",
1228
+ strokeWidth: "stroke-width",
1229
+ tabIndex: "tabindex",
1230
+ textAnchor: "text-anchor",
1231
+ textDecoration: "text-decoration",
1232
+ textRendering: "text-rendering",
1233
+ transformOrigin: "transform-origin",
1234
+ typeOf: "typeof",
1235
+ underlinePosition: "underline-position",
1236
+ underlineThickness: "underline-thickness",
1237
+ unicodeBidi: "unicode-bidi",
1238
+ unicodeRange: "unicode-range",
1239
+ unitsPerEm: "units-per-em",
1240
+ vAlphabetic: "v-alphabetic",
1241
+ vHanging: "v-hanging",
1242
+ vIdeographic: "v-ideographic",
1243
+ vMathematical: "v-mathematical",
1244
+ vectorEffect: "vector-effect",
1245
+ vertAdvY: "vert-adv-y",
1246
+ vertOriginX: "vert-origin-x",
1247
+ vertOriginY: "vert-origin-y",
1248
+ wordSpacing: "word-spacing",
1249
+ writingMode: "writing-mode",
1250
+ xHeight: "x-height",
1251
+ // These were camelcased in Tiny. Now lowercased in SVG 2
1252
+ playbackOrder: "playbackorder",
1253
+ timelineBegin: "timelinebegin"
1254
+ },
1255
+ properties: {
1256
+ about: commaOrSpaceSeparated,
1257
+ accentHeight: number,
1258
+ accumulate: null,
1259
+ additive: null,
1260
+ alignmentBaseline: null,
1261
+ alphabetic: number,
1262
+ amplitude: number,
1263
+ arabicForm: null,
1264
+ ascent: number,
1265
+ attributeName: null,
1266
+ attributeType: null,
1267
+ azimuth: number,
1268
+ bandwidth: null,
1269
+ baselineShift: null,
1270
+ baseFrequency: null,
1271
+ baseProfile: null,
1272
+ bbox: null,
1273
+ begin: null,
1274
+ bias: number,
1275
+ by: null,
1276
+ calcMode: null,
1277
+ capHeight: number,
1278
+ className: spaceSeparated,
1279
+ clip: null,
1280
+ clipPath: null,
1281
+ clipPathUnits: null,
1282
+ clipRule: null,
1283
+ color: null,
1284
+ colorInterpolation: null,
1285
+ colorInterpolationFilters: null,
1286
+ colorProfile: null,
1287
+ colorRendering: null,
1288
+ content: null,
1289
+ contentScriptType: null,
1290
+ contentStyleType: null,
1291
+ crossOrigin: null,
1292
+ cursor: null,
1293
+ cx: null,
1294
+ cy: null,
1295
+ d: null,
1296
+ dataType: null,
1297
+ defaultAction: null,
1298
+ descent: number,
1299
+ diffuseConstant: number,
1300
+ direction: null,
1301
+ display: null,
1302
+ dur: null,
1303
+ divisor: number,
1304
+ dominantBaseline: null,
1305
+ download: boolean,
1306
+ dx: null,
1307
+ dy: null,
1308
+ edgeMode: null,
1309
+ editable: null,
1310
+ elevation: number,
1311
+ enableBackground: null,
1312
+ end: null,
1313
+ event: null,
1314
+ exponent: number,
1315
+ externalResourcesRequired: null,
1316
+ fill: null,
1317
+ fillOpacity: number,
1318
+ fillRule: null,
1319
+ filter: null,
1320
+ filterRes: null,
1321
+ filterUnits: null,
1322
+ floodColor: null,
1323
+ floodOpacity: null,
1324
+ focusable: null,
1325
+ focusHighlight: null,
1326
+ fontFamily: null,
1327
+ fontSize: null,
1328
+ fontSizeAdjust: null,
1329
+ fontStretch: null,
1330
+ fontStyle: null,
1331
+ fontVariant: null,
1332
+ fontWeight: null,
1333
+ format: null,
1334
+ fr: null,
1335
+ from: null,
1336
+ fx: null,
1337
+ fy: null,
1338
+ g1: commaSeparated,
1339
+ g2: commaSeparated,
1340
+ glyphName: commaSeparated,
1341
+ glyphOrientationHorizontal: null,
1342
+ glyphOrientationVertical: null,
1343
+ glyphRef: null,
1344
+ gradientTransform: null,
1345
+ gradientUnits: null,
1346
+ handler: null,
1347
+ hanging: number,
1348
+ hatchContentUnits: null,
1349
+ hatchUnits: null,
1350
+ height: null,
1351
+ href: null,
1352
+ hrefLang: null,
1353
+ horizAdvX: number,
1354
+ horizOriginX: number,
1355
+ horizOriginY: number,
1356
+ id: null,
1357
+ ideographic: number,
1358
+ imageRendering: null,
1359
+ initialVisibility: null,
1360
+ in: null,
1361
+ in2: null,
1362
+ intercept: number,
1363
+ k: number,
1364
+ k1: number,
1365
+ k2: number,
1366
+ k3: number,
1367
+ k4: number,
1368
+ kernelMatrix: commaOrSpaceSeparated,
1369
+ kernelUnitLength: null,
1370
+ keyPoints: null,
1371
+ // SEMI_COLON_SEPARATED
1372
+ keySplines: null,
1373
+ // SEMI_COLON_SEPARATED
1374
+ keyTimes: null,
1375
+ // SEMI_COLON_SEPARATED
1376
+ kerning: null,
1377
+ lang: null,
1378
+ lengthAdjust: null,
1379
+ letterSpacing: null,
1380
+ lightingColor: null,
1381
+ limitingConeAngle: number,
1382
+ local: null,
1383
+ markerEnd: null,
1384
+ markerMid: null,
1385
+ markerStart: null,
1386
+ markerHeight: null,
1387
+ markerUnits: null,
1388
+ markerWidth: null,
1389
+ mask: null,
1390
+ maskContentUnits: null,
1391
+ maskUnits: null,
1392
+ mathematical: null,
1393
+ max: null,
1394
+ media: null,
1395
+ mediaCharacterEncoding: null,
1396
+ mediaContentEncodings: null,
1397
+ mediaSize: number,
1398
+ mediaTime: null,
1399
+ method: null,
1400
+ min: null,
1401
+ mode: null,
1402
+ name: null,
1403
+ navDown: null,
1404
+ navDownLeft: null,
1405
+ navDownRight: null,
1406
+ navLeft: null,
1407
+ navNext: null,
1408
+ navPrev: null,
1409
+ navRight: null,
1410
+ navUp: null,
1411
+ navUpLeft: null,
1412
+ navUpRight: null,
1413
+ numOctaves: null,
1414
+ observer: null,
1415
+ offset: null,
1416
+ onAbort: null,
1417
+ onActivate: null,
1418
+ onAfterPrint: null,
1419
+ onBeforePrint: null,
1420
+ onBegin: null,
1421
+ onCancel: null,
1422
+ onCanPlay: null,
1423
+ onCanPlayThrough: null,
1424
+ onChange: null,
1425
+ onClick: null,
1426
+ onClose: null,
1427
+ onCopy: null,
1428
+ onCueChange: null,
1429
+ onCut: null,
1430
+ onDblClick: null,
1431
+ onDrag: null,
1432
+ onDragEnd: null,
1433
+ onDragEnter: null,
1434
+ onDragExit: null,
1435
+ onDragLeave: null,
1436
+ onDragOver: null,
1437
+ onDragStart: null,
1438
+ onDrop: null,
1439
+ onDurationChange: null,
1440
+ onEmptied: null,
1441
+ onEnd: null,
1442
+ onEnded: null,
1443
+ onError: null,
1444
+ onFocus: null,
1445
+ onFocusIn: null,
1446
+ onFocusOut: null,
1447
+ onHashChange: null,
1448
+ onInput: null,
1449
+ onInvalid: null,
1450
+ onKeyDown: null,
1451
+ onKeyPress: null,
1452
+ onKeyUp: null,
1453
+ onLoad: null,
1454
+ onLoadedData: null,
1455
+ onLoadedMetadata: null,
1456
+ onLoadStart: null,
1457
+ onMessage: null,
1458
+ onMouseDown: null,
1459
+ onMouseEnter: null,
1460
+ onMouseLeave: null,
1461
+ onMouseMove: null,
1462
+ onMouseOut: null,
1463
+ onMouseOver: null,
1464
+ onMouseUp: null,
1465
+ onMouseWheel: null,
1466
+ onOffline: null,
1467
+ onOnline: null,
1468
+ onPageHide: null,
1469
+ onPageShow: null,
1470
+ onPaste: null,
1471
+ onPause: null,
1472
+ onPlay: null,
1473
+ onPlaying: null,
1474
+ onPopState: null,
1475
+ onProgress: null,
1476
+ onRateChange: null,
1477
+ onRepeat: null,
1478
+ onReset: null,
1479
+ onResize: null,
1480
+ onScroll: null,
1481
+ onSeeked: null,
1482
+ onSeeking: null,
1483
+ onSelect: null,
1484
+ onShow: null,
1485
+ onStalled: null,
1486
+ onStorage: null,
1487
+ onSubmit: null,
1488
+ onSuspend: null,
1489
+ onTimeUpdate: null,
1490
+ onToggle: null,
1491
+ onUnload: null,
1492
+ onVolumeChange: null,
1493
+ onWaiting: null,
1494
+ onZoom: null,
1495
+ opacity: null,
1496
+ operator: null,
1497
+ order: null,
1498
+ orient: null,
1499
+ orientation: null,
1500
+ origin: null,
1501
+ overflow: null,
1502
+ overlay: null,
1503
+ overlinePosition: number,
1504
+ overlineThickness: number,
1505
+ paintOrder: null,
1506
+ panose1: null,
1507
+ path: null,
1508
+ pathLength: number,
1509
+ patternContentUnits: null,
1510
+ patternTransform: null,
1511
+ patternUnits: null,
1512
+ phase: null,
1513
+ ping: spaceSeparated,
1514
+ pitch: null,
1515
+ playbackOrder: null,
1516
+ pointerEvents: null,
1517
+ points: null,
1518
+ pointsAtX: number,
1519
+ pointsAtY: number,
1520
+ pointsAtZ: number,
1521
+ preserveAlpha: null,
1522
+ preserveAspectRatio: null,
1523
+ primitiveUnits: null,
1524
+ propagate: null,
1525
+ property: commaOrSpaceSeparated,
1526
+ r: null,
1527
+ radius: null,
1528
+ referrerPolicy: null,
1529
+ refX: null,
1530
+ refY: null,
1531
+ rel: commaOrSpaceSeparated,
1532
+ rev: commaOrSpaceSeparated,
1533
+ renderingIntent: null,
1534
+ repeatCount: null,
1535
+ repeatDur: null,
1536
+ requiredExtensions: commaOrSpaceSeparated,
1537
+ requiredFeatures: commaOrSpaceSeparated,
1538
+ requiredFonts: commaOrSpaceSeparated,
1539
+ requiredFormats: commaOrSpaceSeparated,
1540
+ resource: null,
1541
+ restart: null,
1542
+ result: null,
1543
+ rotate: null,
1544
+ rx: null,
1545
+ ry: null,
1546
+ scale: null,
1547
+ seed: null,
1548
+ shapeRendering: null,
1549
+ side: null,
1550
+ slope: null,
1551
+ snapshotTime: null,
1552
+ specularConstant: number,
1553
+ specularExponent: number,
1554
+ spreadMethod: null,
1555
+ spacing: null,
1556
+ startOffset: null,
1557
+ stdDeviation: null,
1558
+ stemh: null,
1559
+ stemv: null,
1560
+ stitchTiles: null,
1561
+ stopColor: null,
1562
+ stopOpacity: null,
1563
+ strikethroughPosition: number,
1564
+ strikethroughThickness: number,
1565
+ string: null,
1566
+ stroke: null,
1567
+ strokeDashArray: commaOrSpaceSeparated,
1568
+ strokeDashOffset: null,
1569
+ strokeLineCap: null,
1570
+ strokeLineJoin: null,
1571
+ strokeMiterLimit: number,
1572
+ strokeOpacity: number,
1573
+ strokeWidth: null,
1574
+ style: null,
1575
+ surfaceScale: number,
1576
+ syncBehavior: null,
1577
+ syncBehaviorDefault: null,
1578
+ syncMaster: null,
1579
+ syncTolerance: null,
1580
+ syncToleranceDefault: null,
1581
+ systemLanguage: commaOrSpaceSeparated,
1582
+ tabIndex: number,
1583
+ tableValues: null,
1584
+ target: null,
1585
+ targetX: number,
1586
+ targetY: number,
1587
+ textAnchor: null,
1588
+ textDecoration: null,
1589
+ textRendering: null,
1590
+ textLength: null,
1591
+ timelineBegin: null,
1592
+ title: null,
1593
+ transformBehavior: null,
1594
+ type: null,
1595
+ typeOf: commaOrSpaceSeparated,
1596
+ to: null,
1597
+ transform: null,
1598
+ transformOrigin: null,
1599
+ u1: null,
1600
+ u2: null,
1601
+ underlinePosition: number,
1602
+ underlineThickness: number,
1603
+ unicode: null,
1604
+ unicodeBidi: null,
1605
+ unicodeRange: null,
1606
+ unitsPerEm: number,
1607
+ values: null,
1608
+ vAlphabetic: number,
1609
+ vMathematical: number,
1610
+ vectorEffect: null,
1611
+ vHanging: number,
1612
+ vIdeographic: number,
1613
+ version: null,
1614
+ vertAdvY: number,
1615
+ vertOriginX: number,
1616
+ vertOriginY: number,
1617
+ viewBox: null,
1618
+ viewTarget: null,
1619
+ visibility: null,
1620
+ width: null,
1621
+ widths: null,
1622
+ wordSpacing: null,
1623
+ writingMode: null,
1624
+ x: null,
1625
+ x1: null,
1626
+ x2: null,
1627
+ xChannelSelector: null,
1628
+ xHeight: number,
1629
+ y: null,
1630
+ y1: null,
1631
+ y2: null,
1632
+ yChannelSelector: null,
1633
+ z: null,
1634
+ zoomAndPan: null
1635
+ },
1636
+ space: "svg",
1637
+ transform: caseSensitiveTransform
1638
+ });
1639
+
1640
+ // node_modules/property-information/lib/xlink.js
1641
+ var xlink = create({
1642
+ properties: {
1643
+ xLinkActuate: null,
1644
+ xLinkArcRole: null,
1645
+ xLinkHref: null,
1646
+ xLinkRole: null,
1647
+ xLinkShow: null,
1648
+ xLinkTitle: null,
1649
+ xLinkType: null
1650
+ },
1651
+ space: "xlink",
1652
+ transform(_2, property) {
1653
+ return "xlink:" + property.slice(5).toLowerCase();
1654
+ }
1655
+ });
1656
+
1657
+ // node_modules/property-information/lib/xmlns.js
1658
+ var xmlns = create({
1659
+ attributes: { xmlnsxlink: "xmlns:xlink" },
1660
+ properties: { xmlnsXLink: null, xmlns: null },
1661
+ space: "xmlns",
1662
+ transform: caseInsensitiveTransform
1663
+ });
1664
+
1665
+ // node_modules/property-information/lib/xml.js
1666
+ var xml = create({
1667
+ properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
1668
+ space: "xml",
1669
+ transform(_2, property) {
1670
+ return "xml:" + property.slice(3).toLowerCase();
1671
+ }
1672
+ });
1673
+
1674
+ // node_modules/property-information/lib/hast-to-react.js
1675
+ var hastToReact = {
1676
+ classId: "classID",
1677
+ dataType: "datatype",
1678
+ itemId: "itemID",
1679
+ strokeDashArray: "strokeDasharray",
1680
+ strokeDashOffset: "strokeDashoffset",
1681
+ strokeLineCap: "strokeLinecap",
1682
+ strokeLineJoin: "strokeLinejoin",
1683
+ strokeMiterLimit: "strokeMiterlimit",
1684
+ typeOf: "typeof",
1685
+ xLinkActuate: "xlinkActuate",
1686
+ xLinkArcRole: "xlinkArcrole",
1687
+ xLinkHref: "xlinkHref",
1688
+ xLinkRole: "xlinkRole",
1689
+ xLinkShow: "xlinkShow",
1690
+ xLinkTitle: "xlinkTitle",
1691
+ xLinkType: "xlinkType",
1692
+ xmlnsXLink: "xmlnsXlink"
1693
+ };
1694
+
1695
+ // node_modules/property-information/lib/find.js
1696
+ var cap = /[A-Z]/g;
1697
+ var dash = /-[a-z]/g;
1698
+ var valid = /^data[-\w.:]+$/i;
1699
+ function find(schema, value) {
1700
+ const normal = normalize(value);
1701
+ let property = value;
1702
+ let Type = Info;
1703
+ if (normal in schema.normal) {
1704
+ return schema.property[schema.normal[normal]];
1705
+ }
1706
+ if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
1707
+ if (value.charAt(4) === "-") {
1708
+ const rest = value.slice(5).replace(dash, camelcase);
1709
+ property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
1710
+ } else {
1711
+ const rest = value.slice(4);
1712
+ if (!dash.test(rest)) {
1713
+ let dashes = rest.replace(cap, kebab);
1714
+ if (dashes.charAt(0) !== "-") {
1715
+ dashes = "-" + dashes;
1716
+ }
1717
+ value = "data" + dashes;
1718
+ }
1719
+ }
1720
+ Type = DefinedInfo;
1721
+ }
1722
+ return new Type(property, value);
1723
+ }
1724
+ function kebab($0) {
1725
+ return "-" + $0.toLowerCase();
1726
+ }
1727
+ function camelcase($0) {
1728
+ return $0.charAt(1).toUpperCase();
1729
+ }
1730
+
1731
+ // node_modules/property-information/index.js
1732
+ var html2 = merge([aria, html, xlink, xmlns, xml], "html");
1733
+ var svg2 = merge([aria, svg, xlink, xmlns, xml], "svg");
1734
+
1735
+ // node_modules/space-separated-tokens/index.js
1736
+ function stringify2(values) {
1737
+ return values.join(" ").trim();
1738
+ }
1739
+
1740
+ // node_modules/hast-util-to-jsx-runtime/lib/index.js
1741
+ var import_style_to_js = __toESM(require_cjs3());
1742
+ var pointStart = point("start");
1743
+ function point(type) {
1744
+ return point3;
1745
+ function point3(node) {
1746
+ const point4 = node && node.position && node.position[type] || {};
1747
+ if (typeof point4.line === "number" && point4.line > 0 && typeof point4.column === "number" && point4.column > 0) {
1748
+ return {
1749
+ line: point4.line,
1750
+ column: point4.column,
1751
+ offset: typeof point4.offset === "number" && point4.offset > -1 ? point4.offset : void 0
1752
+ };
1753
+ }
1754
+ }
1755
+ }
1756
+
1757
+ // node_modules/unist-util-stringify-position/lib/index.js
1758
+ function stringifyPosition(value) {
1759
+ if (!value || typeof value !== "object") {
1760
+ return "";
1761
+ }
1762
+ if ("position" in value || "type" in value) {
1763
+ return position2(value.position);
1764
+ }
1765
+ if ("start" in value || "end" in value) {
1766
+ return position2(value);
1767
+ }
1768
+ if ("line" in value || "column" in value) {
1769
+ return point2(value);
1770
+ }
1771
+ return "";
1772
+ }
1773
+ function point2(point3) {
1774
+ return index(point3 && point3.line) + ":" + index(point3 && point3.column);
1775
+ }
1776
+ function position2(pos) {
1777
+ return point2(pos && pos.start) + "-" + point2(pos && pos.end);
1778
+ }
1779
+ function index(value) {
1780
+ return value && typeof value === "number" ? value : 1;
1781
+ }
1782
+
1783
+ // node_modules/vfile-message/lib/index.js
1784
+ var VFileMessage = class extends Error {
1785
+ /**
1786
+ * Create a message for `reason`.
1787
+ *
1788
+ * > 🪦 **Note**: also has obsolete signatures.
1789
+ *
1790
+ * @overload
1791
+ * @param {string} reason
1792
+ * @param {Options | null | undefined} [options]
1793
+ * @returns
1794
+ *
1795
+ * @overload
1796
+ * @param {string} reason
1797
+ * @param {Node | NodeLike | null | undefined} parent
1798
+ * @param {string | null | undefined} [origin]
1799
+ * @returns
1800
+ *
1801
+ * @overload
1802
+ * @param {string} reason
1803
+ * @param {Point | Position | null | undefined} place
1804
+ * @param {string | null | undefined} [origin]
1805
+ * @returns
1806
+ *
1807
+ * @overload
1808
+ * @param {string} reason
1809
+ * @param {string | null | undefined} [origin]
1810
+ * @returns
1811
+ *
1812
+ * @overload
1813
+ * @param {Error | VFileMessage} cause
1814
+ * @param {Node | NodeLike | null | undefined} parent
1815
+ * @param {string | null | undefined} [origin]
1816
+ * @returns
1817
+ *
1818
+ * @overload
1819
+ * @param {Error | VFileMessage} cause
1820
+ * @param {Point | Position | null | undefined} place
1821
+ * @param {string | null | undefined} [origin]
1822
+ * @returns
1823
+ *
1824
+ * @overload
1825
+ * @param {Error | VFileMessage} cause
1826
+ * @param {string | null | undefined} [origin]
1827
+ * @returns
1828
+ *
1829
+ * @param {Error | VFileMessage | string} causeOrReason
1830
+ * Reason for message, should use markdown.
1831
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1832
+ * Configuration (optional).
1833
+ * @param {string | null | undefined} [origin]
1834
+ * Place in code where the message originates (example:
1835
+ * `'my-package:my-rule'` or `'my-rule'`).
1836
+ * @returns
1837
+ * Instance of `VFileMessage`.
1838
+ */
1839
+ // eslint-disable-next-line complexity
1840
+ constructor(causeOrReason, optionsOrParentOrPlace, origin) {
1841
+ super();
1842
+ if (typeof optionsOrParentOrPlace === "string") {
1843
+ origin = optionsOrParentOrPlace;
1844
+ optionsOrParentOrPlace = void 0;
1845
+ }
1846
+ let reason = "";
1847
+ let options = {};
1848
+ let legacyCause = false;
1849
+ if (optionsOrParentOrPlace) {
1850
+ if ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace) {
1851
+ options = { place: optionsOrParentOrPlace };
1852
+ } else if ("start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace) {
1853
+ options = { place: optionsOrParentOrPlace };
1854
+ } else if ("type" in optionsOrParentOrPlace) {
1855
+ options = {
1856
+ ancestors: [optionsOrParentOrPlace],
1857
+ place: optionsOrParentOrPlace.position
1858
+ };
1859
+ } else {
1860
+ options = { ...optionsOrParentOrPlace };
1861
+ }
1862
+ }
1863
+ if (typeof causeOrReason === "string") {
1864
+ reason = causeOrReason;
1865
+ } else if (!options.cause && causeOrReason) {
1866
+ legacyCause = true;
1867
+ reason = causeOrReason.message;
1868
+ options.cause = causeOrReason;
1869
+ }
1870
+ if (!options.ruleId && !options.source && typeof origin === "string") {
1871
+ const index2 = origin.indexOf(":");
1872
+ if (index2 === -1) {
1873
+ options.ruleId = origin;
1874
+ } else {
1875
+ options.source = origin.slice(0, index2);
1876
+ options.ruleId = origin.slice(index2 + 1);
1877
+ }
1878
+ }
1879
+ if (!options.place && options.ancestors && options.ancestors) {
1880
+ const parent = options.ancestors[options.ancestors.length - 1];
1881
+ if (parent) {
1882
+ options.place = parent.position;
1883
+ }
1884
+ }
1885
+ const start2 = options.place && "start" in options.place ? options.place.start : options.place;
1886
+ this.ancestors = options.ancestors || void 0;
1887
+ this.cause = options.cause || void 0;
1888
+ this.column = start2 ? start2.column : void 0;
1889
+ this.fatal = void 0;
1890
+ this.file = "";
1891
+ this.message = reason;
1892
+ this.line = start2 ? start2.line : void 0;
1893
+ this.name = stringifyPosition(options.place) || "1:1";
1894
+ this.place = options.place || void 0;
1895
+ this.reason = this.message;
1896
+ this.ruleId = options.ruleId || void 0;
1897
+ this.source = options.source || void 0;
1898
+ this.stack = legacyCause && options.cause && typeof options.cause.stack === "string" ? options.cause.stack : "";
1899
+ this.actual = void 0;
1900
+ this.expected = void 0;
1901
+ this.note = void 0;
1902
+ this.url = void 0;
1903
+ }
1904
+ };
1905
+ VFileMessage.prototype.file = "";
1906
+ VFileMessage.prototype.name = "";
1907
+ VFileMessage.prototype.reason = "";
1908
+ VFileMessage.prototype.message = "";
1909
+ VFileMessage.prototype.stack = "";
1910
+ VFileMessage.prototype.column = void 0;
1911
+ VFileMessage.prototype.line = void 0;
1912
+ VFileMessage.prototype.ancestors = void 0;
1913
+ VFileMessage.prototype.cause = void 0;
1914
+ VFileMessage.prototype.fatal = void 0;
1915
+ VFileMessage.prototype.place = void 0;
1916
+ VFileMessage.prototype.ruleId = void 0;
1917
+ VFileMessage.prototype.source = void 0;
1918
+
1919
+ // node_modules/hast-util-to-jsx-runtime/lib/index.js
1920
+ var own2 = {}.hasOwnProperty;
1921
+ var emptyMap = /* @__PURE__ */ new Map();
1922
+ var cap2 = /[A-Z]/g;
1923
+ var tableElements = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]);
1924
+ var tableCellElement = /* @__PURE__ */ new Set(["td", "th"]);
1925
+ var docs = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
1926
+ function toJsxRuntime(tree, options) {
1927
+ if (!options || options.Fragment === void 0) {
1928
+ throw new TypeError("Expected `Fragment` in options");
1929
+ }
1930
+ const filePath = options.filePath || void 0;
1931
+ let create2;
1932
+ if (options.development) {
1933
+ if (typeof options.jsxDEV !== "function") {
1934
+ throw new TypeError(
1935
+ "Expected `jsxDEV` in options when `development: true`"
1936
+ );
1937
+ }
1938
+ create2 = developmentCreate(filePath, options.jsxDEV);
1939
+ } else {
1940
+ if (typeof options.jsx !== "function") {
1941
+ throw new TypeError("Expected `jsx` in production options");
1942
+ }
1943
+ if (typeof options.jsxs !== "function") {
1944
+ throw new TypeError("Expected `jsxs` in production options");
1945
+ }
1946
+ create2 = productionCreate(filePath, options.jsx, options.jsxs);
1947
+ }
1948
+ const state = {
1949
+ Fragment: options.Fragment,
1950
+ ancestors: [],
1951
+ components: options.components || {},
1952
+ create: create2,
1953
+ elementAttributeNameCase: options.elementAttributeNameCase || "react",
1954
+ evaluater: options.createEvaluater ? options.createEvaluater() : void 0,
1955
+ filePath,
1956
+ ignoreInvalidStyle: options.ignoreInvalidStyle || false,
1957
+ passKeys: options.passKeys !== false,
1958
+ passNode: options.passNode || false,
1959
+ schema: options.space === "svg" ? svg2 : html2,
1960
+ stylePropertyNameCase: options.stylePropertyNameCase || "dom",
1961
+ tableCellAlignToStyle: options.tableCellAlignToStyle !== false
1962
+ };
1963
+ const result = one(state, tree, void 0);
1964
+ if (result && typeof result !== "string") {
1965
+ return result;
1966
+ }
1967
+ return state.create(
1968
+ tree,
1969
+ state.Fragment,
1970
+ { children: result || void 0 },
1971
+ void 0
1972
+ );
1973
+ }
1974
+ function one(state, node, key) {
1975
+ if (node.type === "element") {
1976
+ return element(state, node, key);
1977
+ }
1978
+ if (node.type === "mdxFlowExpression" || node.type === "mdxTextExpression") {
1979
+ return mdxExpression(state, node);
1980
+ }
1981
+ if (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") {
1982
+ return mdxJsxElement(state, node, key);
1983
+ }
1984
+ if (node.type === "mdxjsEsm") {
1985
+ return mdxEsm(state, node);
1986
+ }
1987
+ if (node.type === "root") {
1988
+ return root(state, node, key);
1989
+ }
1990
+ if (node.type === "text") {
1991
+ return text(state, node);
1992
+ }
1993
+ }
1994
+ function element(state, node, key) {
1995
+ const parentSchema = state.schema;
1996
+ let schema = parentSchema;
1997
+ if (node.tagName.toLowerCase() === "svg" && parentSchema.space === "html") {
1998
+ schema = svg2;
1999
+ state.schema = schema;
2000
+ }
2001
+ state.ancestors.push(node);
2002
+ const type = findComponentFromName(state, node.tagName, false);
2003
+ const props = createElementProps(state, node);
2004
+ let children = createChildren(state, node);
2005
+ if (tableElements.has(node.tagName)) {
2006
+ children = children.filter(function(child) {
2007
+ return typeof child === "string" ? !whitespace(child) : true;
2008
+ });
2009
+ }
2010
+ addNode(state, props, type, node);
2011
+ addChildren(props, children);
2012
+ state.ancestors.pop();
2013
+ state.schema = parentSchema;
2014
+ return state.create(node, type, props, key);
2015
+ }
2016
+ function mdxExpression(state, node) {
2017
+ if (node.data && node.data.estree && state.evaluater) {
2018
+ const program = node.data.estree;
2019
+ const expression = program.body[0];
2020
+ ok(expression.type === "ExpressionStatement");
2021
+ return (
2022
+ /** @type {Child | undefined} */
2023
+ state.evaluater.evaluateExpression(expression.expression)
2024
+ );
2025
+ }
2026
+ crashEstree(state, node.position);
2027
+ }
2028
+ function mdxEsm(state, node) {
2029
+ if (node.data && node.data.estree && state.evaluater) {
2030
+ return (
2031
+ /** @type {Child | undefined} */
2032
+ state.evaluater.evaluateProgram(node.data.estree)
2033
+ );
2034
+ }
2035
+ crashEstree(state, node.position);
2036
+ }
2037
+ function mdxJsxElement(state, node, key) {
2038
+ const parentSchema = state.schema;
2039
+ let schema = parentSchema;
2040
+ if (node.name === "svg" && parentSchema.space === "html") {
2041
+ schema = svg2;
2042
+ state.schema = schema;
2043
+ }
2044
+ state.ancestors.push(node);
2045
+ const type = node.name === null ? state.Fragment : findComponentFromName(state, node.name, true);
2046
+ const props = createJsxElementProps(state, node);
2047
+ const children = createChildren(state, node);
2048
+ addNode(state, props, type, node);
2049
+ addChildren(props, children);
2050
+ state.ancestors.pop();
2051
+ state.schema = parentSchema;
2052
+ return state.create(node, type, props, key);
2053
+ }
2054
+ function root(state, node, key) {
2055
+ const props = {};
2056
+ addChildren(props, createChildren(state, node));
2057
+ return state.create(node, state.Fragment, props, key);
2058
+ }
2059
+ function text(_2, node) {
2060
+ return node.value;
2061
+ }
2062
+ function addNode(state, props, type, node) {
2063
+ if (typeof type !== "string" && type !== state.Fragment && state.passNode) {
2064
+ props.node = node;
2065
+ }
2066
+ }
2067
+ function addChildren(props, children) {
2068
+ if (children.length > 0) {
2069
+ const value = children.length > 1 ? children : children[0];
2070
+ if (value) {
2071
+ props.children = value;
2072
+ }
2073
+ }
2074
+ }
2075
+ function productionCreate(_2, jsx, jsxs) {
2076
+ return create2;
2077
+ function create2(_3, type, props, key) {
2078
+ const isStaticChildren = Array.isArray(props.children);
2079
+ const fn = isStaticChildren ? jsxs : jsx;
2080
+ return key ? fn(type, props, key) : fn(type, props);
2081
+ }
2082
+ }
2083
+ function developmentCreate(filePath, jsxDEV) {
2084
+ return create2;
2085
+ function create2(node, type, props, key) {
2086
+ const isStaticChildren = Array.isArray(props.children);
2087
+ const point3 = pointStart(node);
2088
+ return jsxDEV(
2089
+ type,
2090
+ props,
2091
+ key,
2092
+ isStaticChildren,
2093
+ {
2094
+ columnNumber: point3 ? point3.column - 1 : void 0,
2095
+ fileName: filePath,
2096
+ lineNumber: point3 ? point3.line : void 0
2097
+ },
2098
+ void 0
2099
+ );
2100
+ }
2101
+ }
2102
+ function createElementProps(state, node) {
2103
+ const props = {};
2104
+ let alignValue;
2105
+ let prop;
2106
+ for (prop in node.properties) {
2107
+ if (prop !== "children" && own2.call(node.properties, prop)) {
2108
+ const result = createProperty(state, prop, node.properties[prop]);
2109
+ if (result) {
2110
+ const [key, value] = result;
2111
+ if (state.tableCellAlignToStyle && key === "align" && typeof value === "string" && tableCellElement.has(node.tagName)) {
2112
+ alignValue = value;
2113
+ } else {
2114
+ props[key] = value;
2115
+ }
2116
+ }
2117
+ }
2118
+ }
2119
+ if (alignValue) {
2120
+ const style = (
2121
+ /** @type {Style} */
2122
+ props.style || (props.style = {})
2123
+ );
2124
+ style[state.stylePropertyNameCase === "css" ? "text-align" : "textAlign"] = alignValue;
2125
+ }
2126
+ return props;
2127
+ }
2128
+ function createJsxElementProps(state, node) {
2129
+ const props = {};
2130
+ for (const attribute of node.attributes) {
2131
+ if (attribute.type === "mdxJsxExpressionAttribute") {
2132
+ if (attribute.data && attribute.data.estree && state.evaluater) {
2133
+ const program = attribute.data.estree;
2134
+ const expression = program.body[0];
2135
+ ok(expression.type === "ExpressionStatement");
2136
+ const objectExpression = expression.expression;
2137
+ ok(objectExpression.type === "ObjectExpression");
2138
+ const property = objectExpression.properties[0];
2139
+ ok(property.type === "SpreadElement");
2140
+ Object.assign(
2141
+ props,
2142
+ state.evaluater.evaluateExpression(property.argument)
2143
+ );
2144
+ } else {
2145
+ crashEstree(state, node.position);
2146
+ }
2147
+ } else {
2148
+ const name2 = attribute.name;
2149
+ let value;
2150
+ if (attribute.value && typeof attribute.value === "object") {
2151
+ if (attribute.value.data && attribute.value.data.estree && state.evaluater) {
2152
+ const program = attribute.value.data.estree;
2153
+ const expression = program.body[0];
2154
+ ok(expression.type === "ExpressionStatement");
2155
+ value = state.evaluater.evaluateExpression(expression.expression);
2156
+ } else {
2157
+ crashEstree(state, node.position);
2158
+ }
2159
+ } else {
2160
+ value = attribute.value === null ? true : attribute.value;
2161
+ }
2162
+ props[name2] = /** @type {Props[keyof Props]} */
2163
+ value;
2164
+ }
2165
+ }
2166
+ return props;
2167
+ }
2168
+ function createChildren(state, node) {
2169
+ const children = [];
2170
+ let index2 = -1;
2171
+ const countsByName = state.passKeys ? /* @__PURE__ */ new Map() : emptyMap;
2172
+ while (++index2 < node.children.length) {
2173
+ const child = node.children[index2];
2174
+ let key;
2175
+ if (state.passKeys) {
2176
+ const name2 = child.type === "element" ? child.tagName : child.type === "mdxJsxFlowElement" || child.type === "mdxJsxTextElement" ? child.name : void 0;
2177
+ if (name2) {
2178
+ const count = countsByName.get(name2) || 0;
2179
+ key = name2 + "-" + count;
2180
+ countsByName.set(name2, count + 1);
2181
+ }
2182
+ }
2183
+ const result = one(state, child, key);
2184
+ if (result !== void 0) children.push(result);
2185
+ }
2186
+ return children;
2187
+ }
2188
+ function createProperty(state, prop, value) {
2189
+ const info = find(state.schema, prop);
2190
+ if (value === null || value === void 0 || typeof value === "number" && Number.isNaN(value)) {
2191
+ return;
2192
+ }
2193
+ if (Array.isArray(value)) {
2194
+ value = info.commaSeparated ? stringify(value) : stringify2(value);
2195
+ }
2196
+ if (info.property === "style") {
2197
+ let styleObject = typeof value === "object" ? value : parseStyle(state, String(value));
2198
+ if (state.stylePropertyNameCase === "css") {
2199
+ styleObject = transformStylesToCssCasing(styleObject);
2200
+ }
2201
+ return ["style", styleObject];
2202
+ }
2203
+ return [
2204
+ state.elementAttributeNameCase === "react" && info.space ? hastToReact[info.property] || info.property : info.attribute,
2205
+ value
2206
+ ];
2207
+ }
2208
+ function parseStyle(state, value) {
2209
+ try {
2210
+ return (0, import_style_to_js.default)(value, { reactCompat: true });
2211
+ } catch (error) {
2212
+ if (state.ignoreInvalidStyle) {
2213
+ return {};
2214
+ }
2215
+ const cause = (
2216
+ /** @type {Error} */
2217
+ error
2218
+ );
2219
+ const message = new VFileMessage("Cannot parse `style` attribute", {
2220
+ ancestors: state.ancestors,
2221
+ cause,
2222
+ ruleId: "style",
2223
+ source: "hast-util-to-jsx-runtime"
2224
+ });
2225
+ message.file = state.filePath || void 0;
2226
+ message.url = docs + "#cannot-parse-style-attribute";
2227
+ throw message;
2228
+ }
2229
+ }
2230
+ function findComponentFromName(state, name2, allowExpression) {
2231
+ let result;
2232
+ if (!allowExpression) {
2233
+ result = { type: "Literal", value: name2 };
2234
+ } else if (name2.includes(".")) {
2235
+ const identifiers = name2.split(".");
2236
+ let index2 = -1;
2237
+ let node;
2238
+ while (++index2 < identifiers.length) {
2239
+ const prop = name(identifiers[index2]) ? { type: "Identifier", name: identifiers[index2] } : { type: "Literal", value: identifiers[index2] };
2240
+ node = node ? {
2241
+ type: "MemberExpression",
2242
+ object: node,
2243
+ property: prop,
2244
+ computed: Boolean(index2 && prop.type === "Literal"),
2245
+ optional: false
2246
+ } : prop;
2247
+ }
2248
+ result = node;
2249
+ } else {
2250
+ result = name(name2) && !/^[a-z]/.test(name2) ? { type: "Identifier", name: name2 } : { type: "Literal", value: name2 };
2251
+ }
2252
+ if (result.type === "Literal") {
2253
+ const name3 = (
2254
+ /** @type {string | number} */
2255
+ result.value
2256
+ );
2257
+ return own2.call(state.components, name3) ? state.components[name3] : name3;
2258
+ }
2259
+ if (state.evaluater) {
2260
+ return state.evaluater.evaluateExpression(result);
2261
+ }
2262
+ crashEstree(state);
2263
+ }
2264
+ function crashEstree(state, place) {
2265
+ const message = new VFileMessage(
2266
+ "Cannot handle MDX estrees without `createEvaluater`",
2267
+ {
2268
+ ancestors: state.ancestors,
2269
+ place,
2270
+ ruleId: "mdx-estree",
2271
+ source: "hast-util-to-jsx-runtime"
2272
+ }
2273
+ );
2274
+ message.file = state.filePath || void 0;
2275
+ message.url = docs + "#cannot-handle-mdx-estrees-without-createevaluater";
2276
+ throw message;
2277
+ }
2278
+ function transformStylesToCssCasing(domCasing) {
2279
+ const cssCasing = {};
2280
+ let from;
2281
+ for (from in domCasing) {
2282
+ if (own2.call(domCasing, from)) {
2283
+ cssCasing[transformStyleToCssCasing(from)] = domCasing[from];
2284
+ }
2285
+ }
2286
+ return cssCasing;
2287
+ }
2288
+ function transformStyleToCssCasing(from) {
2289
+ let to = from.replace(cap2, toDash);
2290
+ if (to.slice(0, 3) === "ms-") to = "-" + to;
2291
+ return to;
2292
+ }
2293
+ function toDash($0) {
2294
+ return "-" + $0.toLowerCase();
2295
+ }
2296
+
2297
+ // node_modules/@quartz-community/utils/dist/jsx.js
2298
+ function childrenToString(children) {
2299
+ if (typeof children === "string") return children;
2300
+ if (Array.isArray(children)) return children.map(childrenToString).join("");
2301
+ return String(children ?? "");
2302
+ }
2303
+ var builtinComponents = {
2304
+ table: (props) => /* @__PURE__ */ u2("div", {
2305
+ class: "table-container",
2306
+ children: /* @__PURE__ */ u2("table", { ...props })
2307
+ }),
2308
+ style: ({ children, ...rest }) => k("style", { ...rest, dangerouslySetInnerHTML: { __html: childrenToString(children) } }),
2309
+ script: ({ children, ...rest }) => k("script", { ...rest, dangerouslySetInnerHTML: { __html: childrenToString(children) } })
2310
+ };
2311
+ function htmlToJsx(tree, components) {
2312
+ return toJsxRuntime(tree, {
2313
+ Fragment: S,
2314
+ jsx: u2,
2315
+ jsxs: u2,
2316
+ elementAttributeNameCase: "html",
2317
+ components: { ...builtinComponents, ...components }
2318
+ });
2319
+ }
2320
+
2321
+ // src/i18n/locales/en-US.ts
2322
+ var en_US_default = {
2323
+ pages: {
2324
+ folderContent: {
2325
+ folder: "Folder",
2326
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item under this folder." : `${count} items under this folder.`
2327
+ }
2328
+ },
2329
+ components: {}
2330
+ };
2331
+
2332
+ // src/i18n/locales/ar-SA.ts
2333
+ var ar_SA_default = {
2334
+ pages: {
2335
+ folderContent: {
2336
+ folder: "\u0645\u062C\u0644\u062F",
2337
+ itemsUnderFolder: ({ count }) => count === 1 ? "\u064A\u0648\u062C\u062F \u0639\u0646\u0635\u0631 \u0648\u0627\u062D\u062F \u0641\u0642\u0637 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0645\u062C\u0644\u062F" : `\u064A\u0648\u062C\u062F ${count} \u0639\u0646\u0627\u0635\u0631 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0645\u062C\u0644\u062F.`
2338
+ }
2339
+ },
2340
+ components: {}
2341
+ };
2342
+
2343
+ // src/i18n/locales/ca-ES.ts
2344
+ var ca_ES_default = {
2345
+ pages: {
2346
+ folderContent: {
2347
+ folder: "Carpeta",
2348
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 article en aquesta carpeta." : `${count} articles en esta carpeta.`
2349
+ }
2350
+ },
2351
+ components: {}
2352
+ };
2353
+
2354
+ // src/i18n/locales/cs-CZ.ts
2355
+ var cs_CZ_default = {
2356
+ pages: {
2357
+ folderContent: {
2358
+ folder: "Slo\u017Eka",
2359
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 polo\u017Eka v t\xE9to slo\u017Ece." : `${count} polo\u017Eek v t\xE9to slo\u017Ece.`
2360
+ }
2361
+ },
2362
+ components: {}
2363
+ };
2364
+
2365
+ // src/i18n/locales/de-DE.ts
2366
+ var de_DE_default = {
2367
+ pages: {
2368
+ folderContent: {
2369
+ folder: "Ordner",
2370
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 Datei in diesem Ordner." : `${count} Dateien in diesem Ordner.`
2371
+ }
2372
+ },
2373
+ components: {}
2374
+ };
2375
+
2376
+ // src/i18n/locales/en-GB.ts
2377
+ var en_GB_default = {
2378
+ pages: {
2379
+ folderContent: {
2380
+ folder: "Folder",
2381
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item under this folder." : `${count} items under this folder.`
2382
+ }
2383
+ },
2384
+ components: {}
2385
+ };
2386
+
2387
+ // src/i18n/locales/es-ES.ts
2388
+ var es_ES_default = {
2389
+ pages: {
2390
+ folderContent: {
2391
+ folder: "Carpeta",
2392
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 art\xEDculo en esta carpeta." : `${count} art\xEDculos en esta carpeta.`
2393
+ }
2394
+ },
2395
+ components: {}
2396
+ };
2397
+
2398
+ // src/i18n/locales/fa-IR.ts
2399
+ var fa_IR_default = {
2400
+ pages: {
2401
+ folderContent: {
2402
+ folder: "\u067E\u0648\u0634\u0647",
2403
+ itemsUnderFolder: ({ count }) => count === 1 ? ".\u06CC\u06A9 \u0645\u0637\u0644\u0628 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0648\u0634\u0647 \u0627\u0633\u062A" : `${count} \u0645\u0637\u0644\u0628 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0648\u0634\u0647 \u0627\u0633\u062A.`
2404
+ }
2405
+ },
2406
+ components: {}
2407
+ };
2408
+
2409
+ // src/i18n/locales/fi-FI.ts
2410
+ var fi_FI_default = {
2411
+ pages: {
2412
+ folderContent: {
2413
+ folder: "Kansio",
2414
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 kohde t\xE4ss\xE4 kansiossa." : `${count} kohdetta t\xE4ss\xE4 kansiossa.`
2415
+ }
2416
+ },
2417
+ components: {}
2418
+ };
2419
+
2420
+ // src/i18n/locales/fr-FR.ts
2421
+ var fr_FR_default = {
2422
+ pages: {
2423
+ folderContent: {
2424
+ folder: "Dossier",
2425
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 \xE9l\xE9ment sous ce dossier." : `${count} \xE9l\xE9ments sous ce dossier.`
2426
+ }
2427
+ },
2428
+ components: {}
2429
+ };
2430
+
2431
+ // src/i18n/locales/he-IL.ts
2432
+ var he_IL_default = {
2433
+ pages: {
2434
+ folderContent: {
2435
+ folder: "\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4",
2436
+ itemsUnderFolder: ({ count }) => count === 1 ? "\u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3 \u05EA\u05D7\u05EA \u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D6\u05D5." : `${count} \u05E4\u05E8\u05D9\u05D8\u05D9\u05DD \u05EA\u05D7\u05EA \u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D6\u05D5.`
2437
+ }
2438
+ },
2439
+ components: {}
2440
+ };
2441
+
2442
+ // src/i18n/locales/hu-HU.ts
2443
+ var hu_HU_default = {
2444
+ pages: {
2445
+ folderContent: {
2446
+ folder: "Mappa",
2447
+ itemsUnderFolder: ({ count }) => `Ebben a mapp\xE1ban ${count} elem tal\xE1lhat\xF3.`
2448
+ }
2449
+ },
2450
+ components: {}
2451
+ };
2452
+
2453
+ // src/i18n/locales/id-ID.ts
2454
+ var id_ID_default = {
2455
+ pages: {
2456
+ folderContent: {
2457
+ folder: "Folder",
2458
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item di bawah folder ini." : `${count} item di bawah folder ini.`
2459
+ }
2460
+ },
2461
+ components: {}
2462
+ };
2463
+
2464
+ // src/i18n/locales/it-IT.ts
2465
+ var it_IT_default = {
2466
+ pages: {
2467
+ folderContent: {
2468
+ folder: "Cartella",
2469
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 oggetto in questa cartella." : `${count} oggetti in questa cartella.`
2470
+ }
2471
+ },
2472
+ components: {}
2473
+ };
2474
+
2475
+ // src/i18n/locales/ja-JP.ts
2476
+ var ja_JP_default = {
2477
+ pages: {
2478
+ folderContent: {
2479
+ folder: "\u30D5\u30A9\u30EB\u30C0",
2480
+ itemsUnderFolder: ({ count }) => `${count}\u4EF6\u306E\u30DA\u30FC\u30B8`
2481
+ }
2482
+ },
2483
+ components: {}
2484
+ };
2485
+
2486
+ // src/i18n/locales/kk-KZ.ts
2487
+ var kk_KZ_default = {
2488
+ pages: {
2489
+ folderContent: {
2490
+ folder: "\u049A\u0430\u043B\u0442\u0430",
2491
+ itemsUnderFolder: ({ count }) => count === 1 ? "\u0411\u04B1\u043B \u049B\u0430\u043B\u0442\u0430\u0434\u0430 1 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0431\u0430\u0440." : `\u0411\u04B1\u043B \u049B\u0430\u043B\u0442\u0430\u0434\u0430 ${count} \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0431\u0430\u0440.`
2492
+ }
2493
+ },
2494
+ components: {}
2495
+ };
2496
+
2497
+ // src/i18n/locales/ko-KR.ts
2498
+ var ko_KR_default = {
2499
+ pages: {
2500
+ folderContent: {
2501
+ folder: "\uD3F4\uB354",
2502
+ itemsUnderFolder: ({ count }) => `${count}\uAC74\uC758 \uD56D\uBAA9`
2503
+ }
2504
+ },
2505
+ components: {}
2506
+ };
2507
+
2508
+ // src/i18n/locales/lt-LT.ts
2509
+ var lt_LT_default = {
2510
+ pages: {
2511
+ folderContent: {
2512
+ folder: "Aplankas",
2513
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 elementas \u0161iame aplanke." : count < 10 ? `${count} elementai \u0161iame aplanke.` : `${count} element\u0173 \u0161iame aplanke.`
2514
+ }
2515
+ },
2516
+ components: {}
2517
+ };
2518
+
2519
+ // src/i18n/locales/nb-NO.ts
2520
+ var nb_NO_default = {
2521
+ pages: {
2522
+ folderContent: {
2523
+ folder: "Mappe",
2524
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 gjenstand i denne mappen." : `${count} gjenstander i denne mappen.`
2525
+ }
2526
+ },
2527
+ components: {}
2528
+ };
2529
+
2530
+ // src/i18n/locales/nl-NL.ts
2531
+ var nl_NL_default = {
2532
+ pages: {
2533
+ folderContent: {
2534
+ folder: "Map",
2535
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item in deze map." : `${count} items in deze map.`
2536
+ }
2537
+ },
2538
+ components: {}
2539
+ };
2540
+
2541
+ // src/i18n/locales/pl-PL.ts
2542
+ var pl_PL_default = {
2543
+ pages: {
2544
+ folderContent: {
2545
+ folder: "Folder",
2546
+ itemsUnderFolder: ({ count }) => count === 1 ? "W tym folderze jest 1 element." : `Element\xF3w w folderze: ${count}.`
2547
+ }
2548
+ },
2549
+ components: {}
2550
+ };
2551
+
2552
+ // src/i18n/locales/pt-BR.ts
2553
+ var pt_BR_default = {
2554
+ pages: {
2555
+ folderContent: {
2556
+ folder: "Arquivo",
2557
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item neste arquivo." : `${count} items neste arquivo.`
2558
+ }
2559
+ },
2560
+ components: {}
2561
+ };
2562
+
2563
+ // src/i18n/locales/ro-RO.ts
2564
+ var ro_RO_default = {
2565
+ pages: {
2566
+ folderContent: {
2567
+ folder: "Dosar",
2568
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 articol \xEEn acest dosar." : `${count} elemente \xEEn acest dosar.`
2569
+ }
2570
+ },
2571
+ components: {}
2572
+ };
2573
+
2574
+ // src/i18n/locales/ru-RU.ts
2575
+ var ru_RU_default = {
2576
+ pages: {
2577
+ folderContent: {
2578
+ folder: "\u041F\u0430\u043F\u043A\u0430",
2579
+ itemsUnderFolder: ({ count }) => `\u0432 \u044D\u0442\u043E\u0439 \u043F\u0430\u043F\u043A\u0435 ${count} \u044D\u043B\u0435\u043C\u0435\u043D\u0442${getForm(count, "", "\u0430", "\u043E\u0432")}`
2580
+ }
2581
+ },
2582
+ components: {}
2583
+ };
2584
+ function getForm(number2, form1, form2, form5) {
2585
+ const remainder100 = number2 % 100;
2586
+ const remainder10 = remainder100 % 10;
2587
+ if (remainder100 >= 10 && remainder100 <= 20) return form5;
2588
+ if (remainder10 > 1 && remainder10 < 5) return form2;
2589
+ if (remainder10 == 1) return form1;
2590
+ return form5;
2591
+ }
2592
+
2593
+ // src/i18n/locales/th-TH.ts
2594
+ var th_TH_default = {
2595
+ pages: {
2596
+ folderContent: {
2597
+ folder: "\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C",
2598
+ itemsUnderFolder: ({ count }) => `\u0E21\u0E35 ${count} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49`
2599
+ }
2600
+ },
2601
+ components: {}
2602
+ };
2603
+
2604
+ // src/i18n/locales/tr-TR.ts
2605
+ var tr_TR_default = {
2606
+ pages: {
2607
+ folderContent: {
2608
+ folder: "Klas\xF6r",
2609
+ itemsUnderFolder: ({ count }) => count === 1 ? "Bu klas\xF6r alt\u0131nda 1 \xF6\u011Fe." : `Bu klas\xF6r alt\u0131ndaki ${count} \xF6\u011Fe.`
2610
+ }
2611
+ },
2612
+ components: {}
2613
+ };
2614
+
2615
+ // src/i18n/locales/uk-UA.ts
2616
+ var uk_UA_default = {
2617
+ pages: {
2618
+ folderContent: {
2619
+ folder: "\u0422\u0435\u043A\u0430",
2620
+ itemsUnderFolder: ({ count }) => count === 1 ? "\u0423 \u0446\u0456\u0439 \u0442\u0435\u0446\u0456 1 \u0435\u043B\u0435\u043C\u0435\u043D\u0442." : `\u0415\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0443 \u0446\u0456\u0439 \u0442\u0435\u0446\u0456: ${count}.`
2621
+ }
2622
+ },
2623
+ components: {}
2624
+ };
2625
+
2626
+ // src/i18n/locales/vi-VN.ts
2627
+ var vi_VN_default = {
2628
+ pages: {
2629
+ folderContent: {
2630
+ folder: "Th\u01B0 m\u1EE5c",
2631
+ itemsUnderFolder: ({ count }) => `C\xF3 ${count} trang trong th\u01B0 m\u1EE5c n\xE0y.`
2632
+ }
2633
+ },
2634
+ components: {}
2635
+ };
2636
+
2637
+ // src/i18n/locales/zh-CN.ts
2638
+ var zh_CN_default = {
2639
+ pages: {
2640
+ folderContent: {
2641
+ folder: "\u6587\u4EF6\u5939",
2642
+ itemsUnderFolder: ({ count }) => `\u6B64\u6587\u4EF6\u5939\u4E0B\u6709${count}\u6761\u7B14\u8BB0\u3002`
2643
+ }
2644
+ },
2645
+ components: {}
2646
+ };
2647
+
2648
+ // src/i18n/locales/zh-TW.ts
2649
+ var zh_TW_default = {
2650
+ pages: {
2651
+ folderContent: {
2652
+ folder: "\u8CC7\u6599\u593E",
2653
+ itemsUnderFolder: ({ count }) => `\u6B64\u8CC7\u6599\u593E\u4E0B\u6709 ${count} \u689D\u7B46\u8A18\u3002`
2654
+ }
2655
+ },
2656
+ components: {}
2657
+ };
2658
+
2659
+ // src/i18n/index.ts
2660
+ var locales = {
2661
+ "en-US": en_US_default,
2662
+ "ar-SA": ar_SA_default,
2663
+ "ca-ES": ca_ES_default,
2664
+ "cs-CZ": cs_CZ_default,
2665
+ "de-DE": de_DE_default,
2666
+ "en-GB": en_GB_default,
2667
+ "es-ES": es_ES_default,
2668
+ "fa-IR": fa_IR_default,
2669
+ "fi-FI": fi_FI_default,
2670
+ "fr-FR": fr_FR_default,
2671
+ "he-IL": he_IL_default,
2672
+ "hu-HU": hu_HU_default,
2673
+ "id-ID": id_ID_default,
2674
+ "it-IT": it_IT_default,
2675
+ "ja-JP": ja_JP_default,
2676
+ "kk-KZ": kk_KZ_default,
2677
+ "ko-KR": ko_KR_default,
2678
+ "lt-LT": lt_LT_default,
2679
+ "nb-NO": nb_NO_default,
2680
+ "nl-NL": nl_NL_default,
2681
+ "pl-PL": pl_PL_default,
2682
+ "pt-BR": pt_BR_default,
2683
+ "ro-RO": ro_RO_default,
2684
+ "ru-RU": ru_RU_default,
2685
+ "th-TH": th_TH_default,
2686
+ "tr-TR": tr_TR_default,
2687
+ "uk-UA": uk_UA_default,
2688
+ "vi-VN": vi_VN_default,
2689
+ "zh-CN": zh_CN_default,
2690
+ "zh-TW": zh_TW_default
2691
+ };
2692
+ function i18n(locale) {
2693
+ return locales[locale] || en_US_default;
2694
+ }
2695
+
2696
+ // src/components/styles/listPage.scss
2697
+ var listPage_default = "ul.section-ul {\n list-style: none;\n margin-top: 2em;\n padding-left: 0;\n}\n\nli.section-li {\n margin-bottom: 1em;\n}\nli.section-li > .section {\n display: grid;\n grid-template-columns: fit-content(8em) 3fr 1fr;\n}\n@media all and (max-width: 600px) {\n li.section-li > .section > .tags {\n display: none;\n }\n}\nli.section-li > .section > .desc > h3 > a {\n background-color: transparent;\n}\nli.section-li > .section .meta {\n margin: 0 1em 0 0;\n opacity: 0.6;\n}\n\n.popover .section {\n grid-template-columns: fit-content(8em) 1fr !important;\n}\n.popover .section > .tags {\n display: none;\n}";
2698
+
2699
+ // src/components/FolderContent.tsx
2700
+ var defaultOptions = {
2701
+ showFolderCount: true,
2702
+ showSubfolders: true
2703
+ };
2704
+ function concatenateResources(...resources) {
2705
+ const result = resources.filter((r2) => r2 !== void 0).flat();
2706
+ return result.length === 0 ? void 0 : result;
2707
+ }
2708
+ function pagesFromTrie(folder, showSubfolders) {
2709
+ return folder.children.map((node) => {
2710
+ const nodeData = node.data;
2711
+ if (nodeData) {
2712
+ if (nodeData.unlisted === true) return void 0;
2713
+ return nodeData;
2714
+ }
2715
+ if (node.isFolder && showSubfolders) {
2716
+ return {
2717
+ slug: node.slug,
2718
+ dates: mostRecentDatesFromChildren(node.children),
2719
+ frontmatter: { title: node.displayName, tags: [] }
2720
+ };
2721
+ }
2722
+ return void 0;
2723
+ }).filter((page) => page !== void 0);
2724
+ }
2725
+ function pagesFromAllFiles(allFiles, folderSlug, showSubfolders) {
2726
+ const folderPrefix = folderSlug.endsWith("/index") ? folderSlug.slice(0, -"index".length) : folderSlug.endsWith("/") ? folderSlug : folderSlug + "/";
2727
+ const directChildren = [];
2728
+ const subfolderFiles = /* @__PURE__ */ new Map();
2729
+ for (const file of allFiles) {
2730
+ if (file.unlisted === true) continue;
2731
+ const fileSlug = file.slug;
2732
+ if (!fileSlug || !fileSlug.startsWith(folderPrefix)) continue;
2733
+ const relativePath = fileSlug.slice(folderPrefix.length);
2734
+ if (!relativePath || relativePath === "index") continue;
2735
+ const segments = relativePath.split("/");
2736
+ if (segments.length === 1) {
2737
+ directChildren.push(file);
2738
+ } else if (showSubfolders) {
2739
+ const subfolderName = segments[0];
2740
+ if (!subfolderFiles.has(subfolderName)) {
2741
+ subfolderFiles.set(subfolderName, []);
2742
+ }
2743
+ subfolderFiles.get(subfolderName).push(file);
2744
+ }
2745
+ }
2746
+ for (const [subfolderName, files] of subfolderFiles) {
2747
+ const indexFile = files.find((f3) => f3.slug === `${folderPrefix}${subfolderName}/index`);
2748
+ if (indexFile) continue;
2749
+ directChildren.push({
2750
+ slug: `${folderPrefix}${subfolderName}/index`,
2751
+ dates: mostRecentDatesFromEntries(files),
2752
+ frontmatter: { title: subfolderName, tags: [] }
2753
+ });
2754
+ }
2755
+ return directChildren;
2756
+ }
2757
+ function mostRecentDatesFromChildren(children) {
2758
+ let maybeDates;
2759
+ for (const child of children) {
2760
+ const childDates = child.data?.dates;
2761
+ if (childDates) {
2762
+ if (!maybeDates) {
2763
+ maybeDates = { ...childDates };
2764
+ } else {
2765
+ if (childDates.created > maybeDates.created) maybeDates.created = childDates.created;
2766
+ if (childDates.modified > maybeDates.modified) maybeDates.modified = childDates.modified;
2767
+ if (childDates.published > maybeDates.published)
2768
+ maybeDates.published = childDates.published;
2769
+ }
2770
+ }
2771
+ }
2772
+ return maybeDates ?? { created: /* @__PURE__ */ new Date(), modified: /* @__PURE__ */ new Date(), published: /* @__PURE__ */ new Date() };
2773
+ }
2774
+ function mostRecentDatesFromEntries(entries) {
2775
+ let maybeDates;
2776
+ for (const entry of entries) {
2777
+ if (entry.dates) {
2778
+ if (!maybeDates) {
2779
+ maybeDates = { ...entry.dates };
2780
+ } else {
2781
+ if (entry.dates.created > maybeDates.created) maybeDates.created = entry.dates.created;
2782
+ if (entry.dates.modified > maybeDates.modified) maybeDates.modified = entry.dates.modified;
2783
+ if (entry.dates.published > maybeDates.published)
2784
+ maybeDates.published = entry.dates.published;
2785
+ }
2786
+ }
2787
+ }
2788
+ return maybeDates ?? { created: /* @__PURE__ */ new Date(), modified: /* @__PURE__ */ new Date(), published: /* @__PURE__ */ new Date() };
2789
+ }
2790
+ var FolderContent_default = ((opts) => {
2791
+ const options = { ...defaultOptions, ...opts };
2792
+ const FolderContent = (props) => {
2793
+ const { tree, fileData, allFiles, cfg } = props;
2794
+ const ctx = props.ctx;
2795
+ const slug2 = fileData?.slug;
2796
+ if (!slug2) return null;
2797
+ const trie = ctx?.trie;
2798
+ let allPagesInFolder;
2799
+ if (trie) {
2800
+ const folder = trie.findNode(slug2.split("/"));
2801
+ if (!folder) return null;
2802
+ allPagesInFolder = pagesFromTrie(folder, options.showSubfolders);
2803
+ } else {
2804
+ allPagesInFolder = pagesFromAllFiles(allFiles ?? [], slug2, options.showSubfolders);
2805
+ }
2806
+ const cssClasses = fileData?.frontmatter?.cssclasses ?? [];
2807
+ const classes = cssClasses.join(" ");
2808
+ const listProps = {
2809
+ ...props,
2810
+ sort: options.sort,
2811
+ allFiles: allPagesInFolder
2812
+ };
2813
+ const hastRoot = tree;
2814
+ const content = hastRoot.children.length === 0 ? fileData?.description : htmlToJsx(hastRoot);
2815
+ const pageListContent = PageList(listProps);
2816
+ return /* @__PURE__ */ u2("div", { class: "popover-hint", children: [
2817
+ /* @__PURE__ */ u2("article", { class: classes, children: /* @__PURE__ */ u2("div", { class: "markdown-preview-view markdown-rendered", children: content }) }),
2818
+ /* @__PURE__ */ u2("div", { class: "page-listing", children: [
2819
+ options.showFolderCount && /* @__PURE__ */ u2("p", { children: i18n(
2820
+ cfg?.locale ?? "en-US"
2821
+ ).pages.folderContent.itemsUnderFolder({
2822
+ count: allPagesInFolder.length
2823
+ }) }),
2824
+ /* @__PURE__ */ u2("div", { children: pageListContent })
2825
+ ] })
2826
+ ] });
2827
+ };
2828
+ FolderContent.css = concatenateResources(listPage_default, PageList.css);
2829
+ return FolderContent;
2830
+ });
2831
+
2832
+ export { FolderContent_default as FolderContent, PageList, byDateAndAlphabetical, byDateAndAlphabeticalFolderFirst };
2833
+ //# sourceMappingURL=index.js.map
2834
+ //# sourceMappingURL=index.js.map