import { __export } from "./chunk-G3PMV62Z.js"; // node_modules/devlop/lib/development.js var AssertionError = class extends Error { name = ( /** @type {const} */ "Assertion" ); code = ( /** @type {const} */ "ERR_ASSERTION" ); /** * Create an assertion error. * * @param {string} message * Message explaining error. * @param {unknown} actual * Value. * @param {unknown} expected * Baseline. * @param {string} operator * Name of equality operation. * @param {boolean} generated * Whether `message` is a custom message or not * @returns * Instance. */ // eslint-disable-next-line max-params constructor(message, actual, expected, operator, generated) { super(message); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } this.actual = actual; this.expected = expected; this.generated = generated; this.operator = operator; } }; function ok(value, message) { assert( Boolean(value), false, true, "ok", "Expected value to be truthy", message ); } function unreachable(message) { assert(false, false, true, "ok", "Unreachable", message); } function assert(bool, actual, expected, operator, defaultMessage, userMessage) { if (!bool) { throw userMessage instanceof Error ? userMessage : new AssertionError( userMessage || defaultMessage, actual, expected, operator, !userMessage ); } } // node_modules/unist-util-is/lib/index.js var convert = ( // Note: overloads in JSDoc can’t yet use different `@template`s. /** * @type {( * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) & * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) & * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) & * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) & * ((test?: Test) => Check) * )} */ /** * @param {Test} [test] * @returns {Check} */ function(test) { if (test === null || test === void 0) { return ok2; } if (typeof test === "function") { return castFactory(test); } if (typeof test === "object") { return Array.isArray(test) ? anyFactory(test) : propsFactory(test); } if (typeof test === "string") { return typeFactory(test); } throw new Error("Expected function, string, or object as test"); } ); function anyFactory(tests) { const checks2 = []; let index = -1; while (++index < tests.length) { checks2[index] = convert(tests[index]); } return castFactory(any); function any(...parameters) { let index2 = -1; while (++index2 < checks2.length) { if (checks2[index2].apply(this, parameters)) return true; } return false; } } function propsFactory(check) { const checkAsRecord = ( /** @type {Record} */ check ); return castFactory(all); function all(node) { const nodeAsRecord = ( /** @type {Record} */ /** @type {unknown} */ node ); let key; for (key in check) { if (nodeAsRecord[key] !== checkAsRecord[key]) return false; } return true; } } function typeFactory(check) { return castFactory(type); function type(node) { return node && node.type === check; } } function castFactory(testFunction) { return check; function check(value, index, parent) { return Boolean( looksLikeANode(value) && testFunction.call( this, value, typeof index === "number" ? index : void 0, parent || void 0 ) ); } } function ok2() { return true; } function looksLikeANode(value) { return value !== null && typeof value === "object" && "type" in value; } // node_modules/unist-util-visit-parents/lib/color.js function color(d) { return d; } // node_modules/unist-util-visit-parents/lib/index.js var empty = []; var CONTINUE = true; var EXIT = false; var SKIP = "skip"; function visitParents(tree, test, visitor, reverse) { let check; if (typeof test === "function" && typeof visitor !== "function") { reverse = visitor; visitor = test; } else { check = test; } const is2 = convert(check); const step = reverse ? -1 : 1; factory(tree, void 0, [])(); function factory(node, index, parents) { const value = ( /** @type {Record} */ node && typeof node === "object" ? node : {} ); if (typeof value.type === "string") { const name = ( // `hast` typeof value.tagName === "string" ? value.tagName : ( // `xast` typeof value.name === "string" ? value.name : void 0 ) ); Object.defineProperty(visit2, "name", { value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")" }); } return visit2; function visit2() { let result = empty; let subresult; let offset; let grandparents; if (!test || is2(node, index, parents[parents.length - 1] || void 0)) { result = toResult(visitor(node, parents)); if (result[0] === EXIT) { return result; } } if ("children" in node && node.children) { const nodeAsParent = ( /** @type {UnistParent} */ node ); if (nodeAsParent.children && result[0] !== SKIP) { offset = (reverse ? nodeAsParent.children.length : -1) + step; grandparents = parents.concat(nodeAsParent); while (offset > -1 && offset < nodeAsParent.children.length) { const child = nodeAsParent.children[offset]; subresult = factory(child, offset, grandparents)(); if (subresult[0] === EXIT) { return subresult; } offset = typeof subresult[1] === "number" ? subresult[1] : offset + step; } } } return result; } } } function toResult(value) { if (Array.isArray(value)) { return value; } if (typeof value === "number") { return [CONTINUE, value]; } return value === null || value === void 0 ? empty : [value]; } // node_modules/unist-util-visit/lib/index.js function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) { let reverse; let test; let visitor; if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") { test = void 0; visitor = testOrVisitor; reverse = visitorOrReverse; } else { test = testOrVisitor; visitor = visitorOrReverse; reverse = maybeReverse; } visitParents(tree, test, overload, reverse); function overload(node, parents) { const parent = parents[parents.length - 1]; const index = parent ? parent.children.indexOf(node) : void 0; return visitor(node, index, parent); } } // node_modules/comma-separated-tokens/index.js function parse(value) { const tokens = []; const input = String(value || ""); let index = input.indexOf(","); let start = 0; let end = false; while (!end) { if (index === -1) { index = input.length; end = true; } const token = input.slice(start, index).trim(); if (token || !end) { tokens.push(token); } start = index + 1; index = input.indexOf(",", start); } return tokens; } function stringify(values, options) { const settings = options || {}; const input = values[values.length - 1] === "" ? [...values, ""] : values; return input.join( (settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ") ).trim(); } // node_modules/property-information/lib/hast-to-react.js var hastToReact = { classId: "classID", dataType: "datatype", itemId: "itemID", strokeDashArray: "strokeDasharray", strokeDashOffset: "strokeDashoffset", strokeLineCap: "strokeLinecap", strokeLineJoin: "strokeLinejoin", strokeMiterLimit: "strokeMiterlimit", typeOf: "typeof", xLinkActuate: "xlinkActuate", xLinkArcRole: "xlinkArcrole", xLinkHref: "xlinkHref", xLinkRole: "xlinkRole", xLinkShow: "xlinkShow", xLinkTitle: "xlinkTitle", xLinkType: "xlinkType", xmlnsXLink: "xmlnsXlink" }; // node_modules/property-information/lib/util/info.js var Info = class { /** * @param {string} property * Property. * @param {string} attribute * Attribute. * @returns * Info. */ constructor(property, attribute) { this.attribute = attribute; this.property = property; } }; Info.prototype.attribute = ""; Info.prototype.booleanish = false; Info.prototype.boolean = false; Info.prototype.commaOrSpaceSeparated = false; Info.prototype.commaSeparated = false; Info.prototype.defined = false; Info.prototype.mustUseProperty = false; Info.prototype.number = false; Info.prototype.overloadedBoolean = false; Info.prototype.property = ""; Info.prototype.spaceSeparated = false; Info.prototype.space = void 0; // node_modules/property-information/lib/util/types.js var types_exports = {}; __export(types_exports, { boolean: () => boolean, booleanish: () => booleanish, commaOrSpaceSeparated: () => commaOrSpaceSeparated, commaSeparated: () => commaSeparated, number: () => number, overloadedBoolean: () => overloadedBoolean, spaceSeparated: () => spaceSeparated }); var powers = 0; var boolean = increment(); var booleanish = increment(); var overloadedBoolean = increment(); var number = increment(); var spaceSeparated = increment(); var commaSeparated = increment(); var commaOrSpaceSeparated = increment(); function increment() { return 2 ** ++powers; } // node_modules/property-information/lib/util/defined-info.js var checks = ( /** @type {ReadonlyArray} */ Object.keys(types_exports) ); var DefinedInfo = class extends Info { /** * @constructor * @param {string} property * Property. * @param {string} attribute * Attribute. * @param {number | null | undefined} [mask] * Mask. * @param {Space | undefined} [space] * Space. * @returns * Info. */ constructor(property, attribute, mask, space) { let index = -1; super(property, attribute); mark(this, "space", space); if (typeof mask === "number") { while (++index < checks.length) { const check = checks[index]; mark(this, checks[index], (mask & types_exports[check]) === types_exports[check]); } } } }; DefinedInfo.prototype.defined = true; function mark(values, key, value) { if (value) { values[key] = value; } } // node_modules/property-information/lib/normalize.js function normalize(value) { return value.toLowerCase(); } // node_modules/property-information/lib/find.js var cap = /[A-Z]/g; var dash = /-[a-z]/g; var valid = /^data[-\w.:]+$/i; function find(schema, value) { const normal = normalize(value); let property = value; let Type = Info; if (normal in schema.normal) { return schema.property[schema.normal[normal]]; } if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) { if (value.charAt(4) === "-") { const rest = value.slice(5).replace(dash, camelcase); property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1); } else { const rest = value.slice(4); if (!dash.test(rest)) { let dashes = rest.replace(cap, kebab); if (dashes.charAt(0) !== "-") { dashes = "-" + dashes; } value = "data" + dashes; } } Type = DefinedInfo; } return new Type(property, value); } function kebab($0) { return "-" + $0.toLowerCase(); } function camelcase($0) { return $0.charAt(1).toUpperCase(); } // node_modules/property-information/lib/util/schema.js var Schema = class { /** * @param {SchemaType['property']} property * Property. * @param {SchemaType['normal']} normal * Normal. * @param {Space | undefined} [space] * Space. * @returns * Schema. */ constructor(property, normal, space) { this.normal = normal; this.property = property; if (space) { this.space = space; } } }; Schema.prototype.normal = {}; Schema.prototype.property = {}; Schema.prototype.space = void 0; // node_modules/property-information/lib/util/merge.js function merge(definitions, space) { const property = {}; const normal = {}; for (const definition of definitions) { Object.assign(property, definition.property); Object.assign(normal, definition.normal); } return new Schema(property, normal, space); } // node_modules/property-information/lib/util/create.js function create(definition) { const properties = {}; const normals = {}; for (const [property, value] of Object.entries(definition.properties)) { const info = new DefinedInfo( property, definition.transform(definition.attributes || {}, property), value, definition.space ); if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) { info.mustUseProperty = true; } properties[property] = info; normals[normalize(property)] = property; normals[normalize(info.attribute)] = property; } return new Schema(properties, normals, definition.space); } // node_modules/property-information/lib/aria.js var aria = create({ properties: { ariaActiveDescendant: null, ariaAtomic: booleanish, ariaAutoComplete: null, ariaBusy: booleanish, ariaChecked: booleanish, ariaColCount: number, ariaColIndex: number, ariaColSpan: number, ariaControls: spaceSeparated, ariaCurrent: null, ariaDescribedBy: spaceSeparated, ariaDetails: null, ariaDisabled: booleanish, ariaDropEffect: spaceSeparated, ariaErrorMessage: null, ariaExpanded: booleanish, ariaFlowTo: spaceSeparated, ariaGrabbed: booleanish, ariaHasPopup: null, ariaHidden: booleanish, ariaInvalid: null, ariaKeyShortcuts: null, ariaLabel: null, ariaLabelledBy: spaceSeparated, ariaLevel: number, ariaLive: null, ariaModal: booleanish, ariaMultiLine: booleanish, ariaMultiSelectable: booleanish, ariaOrientation: null, ariaOwns: spaceSeparated, ariaPlaceholder: null, ariaPosInSet: number, ariaPressed: booleanish, ariaReadOnly: booleanish, ariaRelevant: null, ariaRequired: booleanish, ariaRoleDescription: spaceSeparated, ariaRowCount: number, ariaRowIndex: number, ariaRowSpan: number, ariaSelected: booleanish, ariaSetSize: number, ariaSort: null, ariaValueMax: number, ariaValueMin: number, ariaValueNow: number, ariaValueText: null, role: null }, transform(_, property) { return property === "role" ? property : "aria-" + property.slice(4).toLowerCase(); } }); // node_modules/property-information/lib/util/case-sensitive-transform.js function caseSensitiveTransform(attributes, attribute) { return attribute in attributes ? attributes[attribute] : attribute; } // node_modules/property-information/lib/util/case-insensitive-transform.js function caseInsensitiveTransform(attributes, property) { return caseSensitiveTransform(attributes, property.toLowerCase()); } // node_modules/property-information/lib/html.js var html = create({ attributes: { acceptcharset: "accept-charset", classname: "class", htmlfor: "for", httpequiv: "http-equiv" }, mustUseProperty: ["checked", "multiple", "muted", "selected"], properties: { // Standard Properties. abbr: null, accept: commaSeparated, acceptCharset: spaceSeparated, accessKey: spaceSeparated, action: null, allow: null, allowFullScreen: boolean, allowPaymentRequest: boolean, allowUserMedia: boolean, alt: null, as: null, async: boolean, autoCapitalize: null, autoComplete: spaceSeparated, autoFocus: boolean, autoPlay: boolean, blocking: spaceSeparated, capture: null, charSet: null, checked: boolean, cite: null, className: spaceSeparated, cols: number, colSpan: null, content: null, contentEditable: booleanish, controls: boolean, controlsList: spaceSeparated, coords: number | commaSeparated, crossOrigin: null, data: null, dateTime: null, decoding: null, default: boolean, defer: boolean, dir: null, dirName: null, disabled: boolean, download: overloadedBoolean, draggable: booleanish, encType: null, enterKeyHint: null, fetchPriority: null, form: null, formAction: null, formEncType: null, formMethod: null, formNoValidate: boolean, formTarget: null, headers: spaceSeparated, height: number, hidden: overloadedBoolean, high: number, href: null, hrefLang: null, htmlFor: spaceSeparated, httpEquiv: spaceSeparated, id: null, imageSizes: null, imageSrcSet: null, inert: boolean, inputMode: null, integrity: null, is: null, isMap: boolean, itemId: null, itemProp: spaceSeparated, itemRef: spaceSeparated, itemScope: boolean, itemType: spaceSeparated, kind: null, label: null, lang: null, language: null, list: null, loading: null, loop: boolean, low: number, manifest: null, max: null, maxLength: number, media: null, method: null, min: null, minLength: number, multiple: boolean, muted: boolean, name: null, nonce: null, noModule: boolean, noValidate: boolean, onAbort: null, onAfterPrint: null, onAuxClick: null, onBeforeMatch: null, onBeforePrint: null, onBeforeToggle: null, onBeforeUnload: null, onBlur: null, onCancel: null, onCanPlay: null, onCanPlayThrough: null, onChange: null, onClick: null, onClose: null, onContextLost: null, onContextMenu: null, onContextRestored: null, onCopy: null, onCueChange: null, onCut: null, onDblClick: null, onDrag: null, onDragEnd: null, onDragEnter: null, onDragExit: null, onDragLeave: null, onDragOver: null, onDragStart: null, onDrop: null, onDurationChange: null, onEmptied: null, onEnded: null, onError: null, onFocus: null, onFormData: null, onHashChange: null, onInput: null, onInvalid: null, onKeyDown: null, onKeyPress: null, onKeyUp: null, onLanguageChange: null, onLoad: null, onLoadedData: null, onLoadedMetadata: null, onLoadEnd: null, onLoadStart: null, onMessage: null, onMessageError: null, onMouseDown: null, onMouseEnter: null, onMouseLeave: null, onMouseMove: null, onMouseOut: null, onMouseOver: null, onMouseUp: null, onOffline: null, onOnline: null, onPageHide: null, onPageShow: null, onPaste: null, onPause: null, onPlay: null, onPlaying: null, onPopState: null, onProgress: null, onRateChange: null, onRejectionHandled: null, onReset: null, onResize: null, onScroll: null, onScrollEnd: null, onSecurityPolicyViolation: null, onSeeked: null, onSeeking: null, onSelect: null, onSlotChange: null, onStalled: null, onStorage: null, onSubmit: null, onSuspend: null, onTimeUpdate: null, onToggle: null, onUnhandledRejection: null, onUnload: null, onVolumeChange: null, onWaiting: null, onWheel: null, open: boolean, optimum: number, pattern: null, ping: spaceSeparated, placeholder: null, playsInline: boolean, popover: null, popoverTarget: null, popoverTargetAction: null, poster: null, preload: null, readOnly: boolean, referrerPolicy: null, rel: spaceSeparated, required: boolean, reversed: boolean, rows: number, rowSpan: number, sandbox: spaceSeparated, scope: null, scoped: boolean, seamless: boolean, selected: boolean, shadowRootClonable: boolean, shadowRootDelegatesFocus: boolean, shadowRootMode: null, shape: null, size: number, sizes: null, slot: null, span: number, spellCheck: booleanish, src: null, srcDoc: null, srcLang: null, srcSet: null, start: number, step: null, style: null, tabIndex: number, target: null, title: null, translate: null, type: null, typeMustMatch: boolean, useMap: null, value: booleanish, width: number, wrap: null, writingSuggestions: null, // Legacy. // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis align: null, // Several. Use CSS `text-align` instead, aLink: null, // ``. Use CSS `a:active {color}` instead archive: spaceSeparated, // ``. List of URIs to archives axis: null, // `` and ``. Use `scope` on `` background: null, // ``. Use CSS `background-image` instead bgColor: null, // `` and table elements. Use CSS `background-color` instead border: number, // ``. Use CSS `border-width` instead, borderColor: null, // `
`. Use CSS `border-color` instead, bottomMargin: number, // `` cellPadding: null, // `
` cellSpacing: null, // `
` char: null, // Several table elements. When `align=char`, sets the character to align on charOff: null, // Several table elements. When `char`, offsets the alignment classId: null, // `` clear: null, // `
`. Use CSS `clear` instead code: null, // `` codeBase: null, // `` codeType: null, // `` color: null, // `` and `
`. Use CSS instead compact: boolean, // Lists. Use CSS to reduce space between items instead declare: boolean, // `` event: null, // `