storybook
Version:
Storybook framework-agnostic API
1,627 lines (1,584 loc) • 419 kB
JavaScript
var gp = Object.create;
var An = Object.defineProperty;
var vp = Object.getOwnPropertyDescriptor;
var wp = Object.getOwnPropertyNames;
var bp = Object.getPrototypeOf, Rp = Object.prototype.hasOwnProperty;
var o = (e, t) => An(e, "name", { value: t, configurable: !0 }), Gr = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
"u" ? new Proxy(e, {
get: (t, r) => (typeof require < "u" ? require : t)[r]
}) : e)(function(e) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error('Dynamic require of "' + e + '" is not supported');
});
var C = (e, t) => () => (e && (t = e(e = 0)), t);
var H = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Xr = (e, t) => {
for (var r in t)
An(e, r, { get: t[r], enumerable: !0 });
}, yp = (e, t, r, n) => {
if (t && typeof t == "object" || typeof t == "function")
for (let a of wp(t))
!Rp.call(e, a) && a !== r && An(e, a, { get: () => t[a], enumerable: !(n = vp(t, a)) || n.enumerable });
return e;
};
var me = (e, t, r) => (r = e != null ? gp(bp(e)) : {}, yp(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
t || !e || !e.__esModule ? An(r, "default", { value: e, enumerable: !0 }) : r,
e
));
// ../node_modules/@babel/runtime/helpers/esm/extends.js
function W() {
return W = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
}
return e;
}, W.apply(null, arguments);
}
var Yr = C(() => {
o(W, "_extends");
});
// ../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
function Tl(e) {
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
var Hl = C(() => {
o(Tl, "_assertThisInitialized");
});
// ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function ht(e, t) {
return ht = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
return r.__proto__ = n, r;
}, ht(e, t);
}
var In = C(() => {
o(ht, "_setPrototypeOf");
});
// ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
function zn(e) {
return zn = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
return t.__proto__ || Object.getPrototypeOf(t);
}, zn(e);
}
var kl = C(() => {
o(zn, "_getPrototypeOf");
});
// ../node_modules/memoizerific/memoizerific.js
var Kr = H((Ul, ea) => {
(function(e) {
if (typeof Ul == "object" && typeof ea < "u")
ea.exports = e();
else if (typeof define == "function" && define.amd)
define([], e);
else {
var t;
typeof window < "u" ? t = window : typeof global < "u" ? t = global : typeof self < "u" ? t = self : t = this, t.memoizerific = e();
}
})(function() {
var e, t, r;
return (/* @__PURE__ */ o(function n(a, i, c) {
function l(f, d) {
if (!i[f]) {
if (!a[f]) {
var m = typeof Gr == "function" && Gr;
if (!d && m) return m(f, !0);
if (s) return s(f, !0);
var v = new Error("Cannot find module '" + f + "'");
throw v.code = "MODULE_NOT_FOUND", v;
}
var R = i[f] = { exports: {} };
a[f][0].call(R.exports, function(p) {
var h = a[f][1][p];
return l(h || p);
}, R, R.exports, n, a, i, c);
}
return i[f].exports;
}
o(l, "s");
for (var s = typeof Gr == "function" && Gr, u = 0; u < c.length; u++) l(c[u]);
return l;
}, "e"))({ 1: [function(n, a, i) {
a.exports = function(c) {
if (typeof Map != "function" || c) {
var l = n("./similar");
return new l();
} else
return /* @__PURE__ */ new Map();
};
}, { "./similar": 2 }], 2: [function(n, a, i) {
function c() {
return this.list = [], this.lastItem = void 0, this.size = 0, this;
}
o(c, "Similar"), c.prototype.get = function(l) {
var s;
if (this.lastItem && this.isEqual(this.lastItem.key, l))
return this.lastItem.val;
if (s = this.indexOf(l), s >= 0)
return this.lastItem = this.list[s], this.list[s].val;
}, c.prototype.set = function(l, s) {
var u;
return this.lastItem && this.isEqual(this.lastItem.key, l) ? (this.lastItem.val = s, this) : (u = this.indexOf(l), u >= 0 ? (this.lastItem =
this.list[u], this.list[u].val = s, this) : (this.lastItem = { key: l, val: s }, this.list.push(this.lastItem), this.size++, this));
}, c.prototype.delete = function(l) {
var s;
if (this.lastItem && this.isEqual(this.lastItem.key, l) && (this.lastItem = void 0), s = this.indexOf(l), s >= 0)
return this.size--, this.list.splice(s, 1)[0];
}, c.prototype.has = function(l) {
var s;
return this.lastItem && this.isEqual(this.lastItem.key, l) ? !0 : (s = this.indexOf(l), s >= 0 ? (this.lastItem = this.list[s], !0) :
!1);
}, c.prototype.forEach = function(l, s) {
var u;
for (u = 0; u < this.size; u++)
l.call(s || this, this.list[u].val, this.list[u].key, this);
}, c.prototype.indexOf = function(l) {
var s;
for (s = 0; s < this.size; s++)
if (this.isEqual(this.list[s].key, l))
return s;
return -1;
}, c.prototype.isEqual = function(l, s) {
return l === s || l !== l && s !== s;
}, a.exports = c;
}, {}], 3: [function(n, a, i) {
var c = n("map-or-similar");
a.exports = function(f) {
var d = new c(!1), m = [];
return function(v) {
var R = /* @__PURE__ */ o(function() {
var p = d, h, g, w = arguments.length - 1, b = Array(w + 1), x = !0, E;
if ((R.numArgs || R.numArgs === 0) && R.numArgs !== w + 1)
throw new Error("Memoizerific functions should always be called with the same number of arguments");
for (E = 0; E < w; E++) {
if (b[E] = {
cacheItem: p,
arg: arguments[E]
}, p.has(arguments[E])) {
p = p.get(arguments[E]);
continue;
}
x = !1, h = new c(!1), p.set(arguments[E], h), p = h;
}
return x && (p.has(arguments[w]) ? g = p.get(arguments[w]) : x = !1), x || (g = v.apply(null, arguments), p.set(arguments[w], g)),
f > 0 && (b[w] = {
cacheItem: p,
arg: arguments[w]
}, x ? l(m, b) : m.push(b), m.length > f && s(m.shift())), R.wasMemoized = x, R.numArgs = w + 1, g;
}, "memoizerific");
return R.limit = f, R.wasMemoized = !1, R.cache = d, R.lru = m, R;
};
};
function l(f, d) {
var m = f.length, v = d.length, R, p, h;
for (p = 0; p < m; p++) {
for (R = !0, h = 0; h < v; h++)
if (!u(f[p][h].arg, d[h].arg)) {
R = !1;
break;
}
if (R)
break;
}
f.push(f.splice(p, 1)[0]);
}
o(l, "moveToMostRecentLru");
function s(f) {
var d = f.length, m = f[d - 1], v, R;
for (m.cacheItem.delete(m.arg), R = d - 2; R >= 0 && (m = f[R], v = m.cacheItem.get(m.arg), !v || !v.size); R--)
m.cacheItem.delete(m.arg);
}
o(s, "removeCachedResult");
function u(f, d) {
return f === d || f !== f && d !== d;
}
o(u, "isEqual");
}, { "map-or-similar": 1 }] }, {}, [3])(3);
});
});
// ../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
function ur(e, t) {
if (e == null) return {};
var r = {};
for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) !== -1) continue;
r[n] = e[n];
}
return r;
}
var Pn = C(() => {
o(ur, "_objectWithoutPropertiesLoose");
});
// ../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
function ql(e, t) {
if (e == null) return {};
var r, n, a = ur(e, t);
if (Object.getOwnPropertySymbols) {
var i = Object.getOwnPropertySymbols(e);
for (n = 0; n < i.length; n++) r = i[n], t.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
}
return a;
}
var Gl = C(() => {
Pn();
o(ql, "_objectWithoutProperties");
});
// ../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function Jr(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
return n;
}
var ta = C(() => {
o(Jr, "_arrayLikeToArray");
});
// ../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function Xl(e) {
if (Array.isArray(e)) return Jr(e);
}
var Yl = C(() => {
ta();
o(Xl, "_arrayWithoutHoles");
});
// ../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
function Zl(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
}
var Kl = C(() => {
o(Zl, "_iterableToArray");
});
// ../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
function Jl(e, t) {
if (e) {
if (typeof e == "string") return Jr(e, t);
var r = {}.toString.call(e).slice(8, -1);
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.
test(r) ? Jr(e, t) : void 0;
}
}
var Ql = C(() => {
ta();
o(Jl, "_unsupportedIterableToArray");
});
// ../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function ec() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var tc = C(() => {
o(ec, "_nonIterableSpread");
});
// ../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function kn(e) {
return Xl(e) || Zl(e) || Jl(e) || ec();
}
var rc = C(() => {
Yl();
Kl();
Ql();
tc();
o(kn, "_toConsumableArray");
});
// ../node_modules/@babel/runtime/helpers/esm/typeof.js
function Ft(e) {
"@babel/helpers - typeof";
return Ft = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
return typeof t;
} : function(t) {
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, Ft(e);
}
var ra = C(() => {
o(Ft, "_typeof");
});
// ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
function nc(e, t) {
if (Ft(e) != "object" || !e) return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Ft(n) != "object") return n;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
var oc = C(() => {
ra();
o(nc, "toPrimitive");
});
// ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
function ac(e) {
var t = nc(e, "string");
return Ft(t) == "symbol" ? t : t + "";
}
var ic = C(() => {
ra();
oc();
o(ac, "toPropertyKey");
});
// ../node_modules/@babel/runtime/helpers/esm/defineProperty.js
function On(e, t, r) {
return (t = ac(t)) in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e;
}
var na = C(() => {
ic();
o(On, "_defineProperty");
});
// ../node_modules/react-syntax-highlighter/dist/esm/create-element.js
import f2 from "react";
function lc(e, t) {
var r = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
t && (n = n.filter(function(a) {
return Object.getOwnPropertyDescriptor(e, a).enumerable;
})), r.push.apply(r, n);
}
return r;
}
function fr(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? lc(Object(r), !0).forEach(function(n) {
On(e, n, r[n]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : lc(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
});
}
return e;
}
function d2(e) {
var t = e.length;
if (t === 0 || t === 1) return e;
if (t === 2)
return [e[0], e[1], "".concat(e[0], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0])];
if (t === 3)
return [e[0], e[1], e[2], "".concat(e[0], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0]), "".concat(
e[1], ".").concat(e[2]), "".concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[1], ".").concat(
e[2]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(
e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0])];
if (t >= 4)
return [e[0], e[1], e[2], e[3], "".concat(e[0], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2]), "".concat(e[0], ".").concat(e[3]),
"".concat(e[1], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2]), "".concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[0]),
"".concat(e[2], ".").concat(e[1]), "".concat(e[2], ".").concat(e[3]), "".concat(e[3], ".").concat(e[0]), "".concat(e[3], ".").concat(e[1]),
"".concat(e[3], ".").concat(e[2]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(e[1], ".").concat(e[3]),
"".concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2], ".").concat(e[3]), "".concat(e[0], ".").concat(e[3],
".").concat(e[1]), "".concat(e[0], ".").concat(e[3], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1],
".").concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2], ".").concat(
e[3]), "".concat(e[1], ".").concat(e[3], ".").concat(e[0]), "".concat(e[1], ".").concat(e[3], ".").concat(e[2]), "".concat(e[2], ".").concat(
e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[0], ".").concat(e[3]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0]), "".concat(
e[2], ".").concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[3], ".").concat(e[0]), "".concat(e[2], ".").concat(e[3], ".").concat(
e[1]), "".concat(e[3], ".").concat(e[0], ".").concat(e[1]), "".concat(e[3], ".").concat(e[0], ".").concat(e[2]), "".concat(e[3], ".").concat(
e[1], ".").concat(e[0]), "".concat(e[3], ".").concat(e[1], ".").concat(e[2]), "".concat(e[3], ".").concat(e[2], ".").concat(e[0]), "".concat(
e[3], ".").concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2], ".").concat(e[3]), "".concat(e[0], ".").concat(
e[1], ".").concat(e[3], ".").concat(e[2]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1], ".").concat(e[3]), "".concat(e[0], ".").concat(
e[2], ".").concat(e[3], ".").concat(e[1]), "".concat(e[0], ".").concat(e[3], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(
e[3], ".").concat(e[2], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2], ".").concat(e[3]), "".concat(e[1], ".").concat(
e[0], ".").concat(e[3], ".").concat(e[2]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(
e[2], ".").concat(e[3], ".").concat(e[0]), "".concat(e[1], ".").concat(e[3], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(
e[3], ".").concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(
e[0], ".").concat(e[3], ".").concat(e[1]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0], ".").concat(e[3]), "".concat(e[2], ".").concat(
e[1], ".").concat(e[3], ".").concat(e[0]), "".concat(e[2], ".").concat(e[3], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(
e[3], ".").concat(e[1], ".").concat(e[0]), "".concat(e[3], ".").concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[3], ".").concat(
e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[3], ".").concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[3], ".").concat(
e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[3], ".").concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[3], ".").concat(
e[2], ".").concat(e[1], ".").concat(e[0])];
}
function p2(e) {
if (e.length === 0 || e.length === 1) return e;
var t = e.join(".");
return oa[t] || (oa[t] = d2(e)), oa[t];
}
function m2(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 ? arguments[2] : void 0, n = e.filter(
function(i) {
return i !== "token";
}), a = p2(n);
return a.reduce(function(i, c) {
return fr(fr({}, i), r[c]);
}, t);
}
function cc(e) {
return e.join(" ");
}
function h2(e, t) {
var r = 0;
return function(n) {
return r += 1, n.map(function(a, i) {
return _t({
node: a,
stylesheet: e,
useInlineStyles: t,
key: "code-segment-".concat(r, "-").concat(i)
});
});
};
}
function _t(e) {
var t = e.node, r = e.stylesheet, n = e.style, a = n === void 0 ? {} : n, i = e.useInlineStyles, c = e.key, l = t.properties, s = t.type, u = t.
tagName, f = t.value;
if (s === "text")
return f;
if (u) {
var d = h2(r, i), m;
if (!i)
m = fr(fr({}, l), {}, {
className: cc(l.className)
});
else {
var v = Object.keys(r).reduce(function(g, w) {
return w.split(".").forEach(function(b) {
g.includes(b) || g.push(b);
}), g;
}, []), R = l.className && l.className.includes("token") ? ["token"] : [], p = l.className && R.concat(l.className.filter(function(g) {
return !v.includes(g);
}));
m = fr(fr({}, l), {}, {
className: cc(p) || void 0,
style: m2(l.className, Object.assign({}, l.style, a), r)
});
}
var h = d(t.children);
return /* @__PURE__ */ f2.createElement(u, W({
key: c
}, m), h);
}
}
var oa, aa = C(() => {
Yr();
na();
o(lc, "ownKeys");
o(fr, "_objectSpread");
o(d2, "powerSetPermutations");
oa = {};
o(p2, "getClassNameCombinations");
o(m2, "createStyleObject");
o(cc, "createClassNameString");
o(h2, "createChildren");
o(_t, "createElement");
});
// ../node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js
var sc, uc = C(() => {
sc = /* @__PURE__ */ o(function(e, t) {
var r = e.listLanguages();
return r.indexOf(t) !== -1;
}, "default");
});
// ../node_modules/react-syntax-highlighter/dist/esm/highlight.js
import $t from "react";
function fc(e, t) {
var r = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
t && (n = n.filter(function(a) {
return Object.getOwnPropertyDescriptor(e, a).enumerable;
})), r.push.apply(r, n);
}
return r;
}
function bt(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? fc(Object(r), !0).forEach(function(n) {
On(e, n, r[n]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : fc(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
});
}
return e;
}
function w2(e) {
return e.match(v2);
}
function b2(e) {
var t = e.lines, r = e.startingLineNumber, n = e.style;
return t.map(function(a, i) {
var c = i + r;
return /* @__PURE__ */ $t.createElement("span", {
key: "line-".concat(i),
className: "react-syntax-highlighter-line-number",
style: typeof n == "function" ? n(c) : n
}, "".concat(c, `
`));
});
}
function R2(e) {
var t = e.codeString, r = e.codeStyle, n = e.containerStyle, a = n === void 0 ? {
float: "left",
paddingRight: "10px"
} : n, i = e.numberStyle, c = i === void 0 ? {} : i, l = e.startingLineNumber;
return /* @__PURE__ */ $t.createElement("code", {
style: Object.assign({}, r, a)
}, b2({
lines: t.replace(/\n$/, "").split(`
`),
style: c,
startingLineNumber: l
}));
}
function y2(e) {
return "".concat(e.toString().length, ".25em");
}
function dc(e, t) {
return {
type: "element",
tagName: "span",
properties: {
key: "line-number--".concat(e),
className: ["comment", "linenumber", "react-syntax-highlighter-line-number"],
style: t
},
children: [{
type: "text",
value: e
}]
};
}
function pc(e, t, r) {
var n = {
display: "inline-block",
minWidth: y2(r),
paddingRight: "1em",
textAlign: "right",
userSelect: "none"
}, a = typeof e == "function" ? e(t) : e, i = bt(bt({}, n), a);
return i;
}
function Bn(e) {
var t = e.children, r = e.lineNumber, n = e.lineNumberStyle, a = e.largestLineNumber, i = e.showInlineLineNumbers, c = e.lineProps, l = c ===
void 0 ? {} : c, s = e.className, u = s === void 0 ? [] : s, f = e.showLineNumbers, d = e.wrapLongLines, m = e.wrapLines, v = m === void 0 ?
!1 : m, R = v ? bt({}, typeof l == "function" ? l(r) : l) : {};
if (R.className = R.className ? [].concat(kn(R.className.trim().split(/\s+/)), kn(u)) : u, r && i) {
var p = pc(n, r, a);
t.unshift(dc(r, p));
}
return d & f && (R.style = bt({
display: "flex"
}, R.style)), {
type: "element",
tagName: "span",
properties: R,
children: t
};
}
function mc(e) {
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
[], n = 0; n < e.length; n++) {
var a = e[n];
if (a.type === "text")
r.push(Bn({
children: [a],
className: kn(new Set(t))
}));
else if (a.children) {
var i = t.concat(a.properties.className);
mc(a.children, i).forEach(function(c) {
return r.push(c);
});
}
}
return r;
}
function x2(e, t, r, n, a, i, c, l, s) {
var u, f = mc(e.value), d = [], m = -1, v = 0;
function R(E, y) {
var S = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
return Bn({
children: E,
lineNumber: y,
lineNumberStyle: l,
largestLineNumber: c,
showInlineLineNumbers: a,
lineProps: r,
className: S,
showLineNumbers: n,
wrapLongLines: s,
wrapLines: t
});
}
o(R, "createWrappedLine");
function p(E, y) {
if (n && y && a) {
var S = pc(l, y, c);
E.unshift(dc(y, S));
}
return E;
}
o(p, "createUnwrappedLine");
function h(E, y) {
var S = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
return t || S.length > 0 ? R(E, y, S) : p(E, y);
}
o(h, "createLine");
for (var g = /* @__PURE__ */ o(function() {
var y = f[v], S = y.children[0].value, L = w2(S);
if (L) {
var M = S.split(`
`);
M.forEach(function(A, P) {
var _ = n && d.length + i, F = {
type: "text",
value: "".concat(A, `
`)
};
if (P === 0) {
var K = f.slice(m + 1, v).concat(Bn({
children: [F],
className: y.properties.className
})), T = h(K, _);
d.push(T);
} else if (P === M.length - 1) {
var z = f[v + 1] && f[v + 1].children && f[v + 1].children[0], k = {
type: "text",
value: "".concat(A)
};
if (z) {
var V = Bn({
children: [k],
className: y.properties.className
});
f.splice(v + 1, 0, V);
} else {
var D = [k], j = h(D, _, y.properties.className);
d.push(j);
}
} else {
var O = [F], G = h(O, _, y.properties.className);
d.push(G);
}
}), m = v;
}
v++;
}, "_loop"); v < f.length; )
g();
if (m !== f.length - 1) {
var w = f.slice(m + 1, f.length);
if (w && w.length) {
var b = n && d.length + i, x = h(w, b);
d.push(x);
}
}
return t ? d : (u = []).concat.apply(u, d);
}
function E2(e) {
var t = e.rows, r = e.stylesheet, n = e.useInlineStyles;
return t.map(function(a, i) {
return _t({
node: a,
stylesheet: r,
useInlineStyles: n,
key: "code-segement".concat(i)
});
});
}
function hc(e) {
return e && typeof e.highlightAuto < "u";
}
function S2(e) {
var t = e.astGenerator, r = e.language, n = e.code, a = e.defaultCodeValue;
if (hc(t)) {
var i = sc(t, r);
return r === "text" ? {
value: a,
language: "text"
} : i ? t.highlight(r, n) : t.highlightAuto(n);
}
try {
return r && r !== "text" ? {
value: t.highlight(n, r)
} : {
value: a
};
} catch {
return {
value: a
};
}
}
function ia(e, t) {
return /* @__PURE__ */ o(function(n) {
var a = n.language, i = n.children, c = n.style, l = c === void 0 ? t : c, s = n.customStyle, u = s === void 0 ? {} : s, f = n.codeTagProps,
d = f === void 0 ? {
className: a ? "language-".concat(a) : void 0,
style: bt(bt({}, l['code[class*="language-"]']), l['code[class*="language-'.concat(a, '"]')])
} : f, m = n.useInlineStyles, v = m === void 0 ? !0 : m, R = n.showLineNumbers, p = R === void 0 ? !1 : R, h = n.showInlineLineNumbers, g = h ===
void 0 ? !0 : h, w = n.startingLineNumber, b = w === void 0 ? 1 : w, x = n.lineNumberContainerStyle, E = n.lineNumberStyle, y = E === void 0 ?
{} : E, S = n.wrapLines, L = n.wrapLongLines, M = L === void 0 ? !1 : L, A = n.lineProps, P = A === void 0 ? {} : A, _ = n.renderer, F = n.
PreTag, K = F === void 0 ? "pre" : F, T = n.CodeTag, z = T === void 0 ? "code" : T, k = n.code, V = k === void 0 ? (Array.isArray(i) ? i[0] :
i) || "" : k, D = n.astGenerator, j = ql(n, g2);
D = D || e;
var O = p ? /* @__PURE__ */ $t.createElement(R2, {
containerStyle: x,
codeStyle: d.style || {},
numberStyle: y,
startingLineNumber: b,
codeString: V
}) : null, G = l.hljs || l['pre[class*="language-"]'] || {
backgroundColor: "#fff"
}, Ee = hc(D) ? "hljs" : "prismjs", pe = v ? Object.assign({}, j, {
style: Object.assign({}, G, u)
}) : Object.assign({}, j, {
className: j.className ? "".concat(Ee, " ").concat(j.className) : Ee,
style: Object.assign({}, u)
});
if (M ? d.style = bt({
whiteSpace: "pre-wrap"
}, d.style) : d.style = bt({
whiteSpace: "pre"
}, d.style), !D)
return /* @__PURE__ */ $t.createElement(K, pe, O, /* @__PURE__ */ $t.createElement(z, d, V));
(S === void 0 && _ || M) && (S = !0), _ = _ || E2;
var se = [{
type: "text",
value: V
}], ue = S2({
astGenerator: D,
language: a,
code: V,
defaultCodeValue: se
});
ue.language === null && (ue.value = se);
var ve = ue.value.length;
ve === 1 && ue.value[0].type === "text" && (ve = ue.value[0].value.split(`
`).length);
var Se = ve + b, Ot = x2(ue, S, P, p, g, b, Se, y, M);
return /* @__PURE__ */ $t.createElement(K, pe, /* @__PURE__ */ $t.createElement(z, d, !g && O, _({
rows: Ot,
stylesheet: l,
useInlineStyles: v
})));
}, "SyntaxHighlighter");
}
var g2, v2, gc = C(() => {
Gl();
rc();
na();
aa();
uc();
g2 = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "star\
tingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "\
code", "astGenerator"];
o(fc, "ownKeys");
o(bt, "_objectSpread");
v2 = /\n/g;
o(w2, "getNewLines");
o(b2, "getAllLineNumbers");
o(R2, "AllLineNumbers");
o(y2, "getEmWidthOfNumber");
o(dc, "getInlineLineNumber");
o(pc, "assembleLineNumberStyles");
o(Bn, "createLineElement");
o(mc, "flattenCodeTree");
o(x2, "processLines");
o(E2, "defaultRenderer");
o(hc, "isHighlightJs");
o(S2, "getCodeTree");
o(ia, "default");
});
// ../node_modules/xtend/immutable.js
var wc = H((yb, vc) => {
vc.exports = M2;
var C2 = Object.prototype.hasOwnProperty;
function M2() {
for (var e = {}, t = 0; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r)
C2.call(r, n) && (e[n] = r[n]);
}
return e;
}
o(M2, "extend");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/schema.js
var ca = H((Eb, Rc) => {
"use strict";
Rc.exports = bc;
var la = bc.prototype;
la.space = null;
la.normal = {};
la.property = {};
function bc(e, t, r) {
this.property = e, this.normal = t, r && (this.space = r);
}
o(bc, "Schema");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/merge.js
var Ec = H((Cb, xc) => {
"use strict";
var yc = wc(), L2 = ca();
xc.exports = A2;
function A2(e) {
for (var t = e.length, r = [], n = [], a = -1, i, c; ++a < t; )
i = e[a], r.push(i.property), n.push(i.normal), c = i.space;
return new L2(
yc.apply(null, r),
yc.apply(null, n),
c
);
}
o(A2, "merge");
});
// ../node_modules/hastscript/node_modules/property-information/normalize.js
var Nn = H((Lb, Sc) => {
"use strict";
Sc.exports = I2;
function I2(e) {
return e.toLowerCase();
}
o(I2, "normalize");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/info.js
var sa = H((Ib, Mc) => {
"use strict";
Mc.exports = Cc;
var De = Cc.prototype;
De.space = null;
De.attribute = null;
De.property = null;
De.boolean = !1;
De.booleanish = !1;
De.overloadedBoolean = !1;
De.number = !1;
De.commaSeparated = !1;
De.spaceSeparated = !1;
De.commaOrSpaceSeparated = !1;
De.mustUseProperty = !1;
De.defined = !1;
function Cc(e, t) {
this.property = e, this.attribute = t;
}
o(Cc, "Info");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/types.js
var Dn = H((Rt) => {
"use strict";
var z2 = 0;
Rt.boolean = Vt();
Rt.booleanish = Vt();
Rt.overloadedBoolean = Vt();
Rt.number = Vt();
Rt.spaceSeparated = Vt();
Rt.commaSeparated = Vt();
Rt.commaOrSpaceSeparated = Vt();
function Vt() {
return Math.pow(2, ++z2);
}
o(Vt, "increment");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/defined-info.js
var fa = H((Pb, Tc) => {
"use strict";
var Ic = sa(), Lc = Dn();
Tc.exports = ua;
ua.prototype = new Ic();
ua.prototype.defined = !0;
var zc = [
"boolean",
"booleanish",
"overloadedBoolean",
"number",
"commaSeparated",
"spaceSeparated",
"commaOrSpaceSeparated"
], T2 = zc.length;
function ua(e, t, r, n) {
var a = -1, i;
for (Ac(this, "space", n), Ic.call(this, e, t); ++a < T2; )
i = zc[a], Ac(this, i, (r & Lc[i]) === Lc[i]);
}
o(ua, "DefinedInfo");
function Ac(e, t, r) {
r && (e[t] = r);
}
o(Ac, "mark");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/create.js
var dr = H((Ob, Pc) => {
"use strict";
var Hc = Nn(), H2 = ca(), P2 = fa();
Pc.exports = k2;
function k2(e) {
var t = e.space, r = e.mustUseProperty || [], n = e.attributes || {}, a = e.properties, i = e.transform, c = {}, l = {}, s, u;
for (s in a)
u = new P2(
s,
i(n, s),
a[s],
t
), r.indexOf(s) !== -1 && (u.mustUseProperty = !0), c[s] = u, l[Hc(s)] = s, l[Hc(u.attribute)] = s;
return new H2(c, l, t);
}
o(k2, "create");
});
// ../node_modules/hastscript/node_modules/property-information/lib/xlink.js
var Oc = H((Nb, kc) => {
"use strict";
var O2 = dr();
kc.exports = O2({
space: "xlink",
transform: B2,
properties: {
xLinkActuate: null,
xLinkArcRole: null,
xLinkHref: null,
xLinkRole: null,
xLinkShow: null,
xLinkTitle: null,
xLinkType: null
}
});
function B2(e, t) {
return "xlink:" + t.slice(5).toLowerCase();
}
o(B2, "xlinkTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/xml.js
var Nc = H((Fb, Bc) => {
"use strict";
var N2 = dr();
Bc.exports = N2({
space: "xml",
transform: D2,
properties: {
xmlLang: null,
xmlBase: null,
xmlSpace: null
}
});
function D2(e, t) {
return "xml:" + t.slice(3).toLowerCase();
}
o(D2, "xmlTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/case-sensitive-transform.js
var Fc = H(($b, Dc) => {
"use strict";
Dc.exports = F2;
function F2(e, t) {
return t in e ? e[t] : t;
}
o(F2, "caseSensitiveTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/case-insensitive-transform.js
var da = H((jb, _c) => {
"use strict";
var _2 = Fc();
_c.exports = $2;
function $2(e, t) {
return _2(e, t.toLowerCase());
}
o($2, "caseInsensitiveTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/xmlns.js
var Vc = H((Ub, $c) => {
"use strict";
var V2 = dr(), j2 = da();
$c.exports = V2({
space: "xmlns",
attributes: {
xmlnsxlink: "xmlns:xlink"
},
transform: j2,
properties: {
xmlns: null,
xmlnsXLink: null
}
});
});
// ../node_modules/hastscript/node_modules/property-information/lib/aria.js
var Wc = H((qb, jc) => {
"use strict";
var pa = Dn(), W2 = dr(), Le = pa.booleanish, Fe = pa.number, jt = pa.spaceSeparated;
jc.exports = W2({
transform: U2,
properties: {
ariaActiveDescendant: null,
ariaAtomic: Le,
ariaAutoComplete: null,
ariaBusy: Le,
ariaChecked: Le,
ariaColCount: Fe,
ariaColIndex: Fe,
ariaColSpan: Fe,
ariaControls: jt,
ariaCurrent: null,
ariaDescribedBy: jt,
ariaDetails: null,
ariaDisabled: Le,
ariaDropEffect: jt,
ariaErrorMessage: null,
ariaExpanded: Le,
ariaFlowTo: jt,
ariaGrabbed: Le,
ariaHasPopup: null,
ariaHidden: Le,
ariaInvalid: null,
ariaKeyShortcuts: null,
ariaLabel: null,
ariaLabelledBy: jt,
ariaLevel: Fe,
ariaLive: null,
ariaModal: Le,
ariaMultiLine: Le,
ariaMultiSelectable: Le,
ariaOrientation: null,
ariaOwns: jt,
ariaPlaceholder: null,
ariaPosInSet: Fe,
ariaPressed: Le,
ariaReadOnly: Le,
ariaRelevant: null,
ariaRequired: Le,
ariaRoleDescription: jt,
ariaRowCount: Fe,
ariaRowIndex: Fe,
ariaRowSpan: Fe,
ariaSelected: Le,
ariaSetSize: Fe,
ariaSort: null,
ariaValueMax: Fe,
ariaValueMin: Fe,
ariaValueNow: Fe,
ariaValueText: null,
role: null
}
});
function U2(e, t) {
return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
}
o(U2, "ariaTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/html.js
var qc = H((Xb, Uc) => {
"use strict";
var pr = Dn(), q2 = dr(), G2 = da(), B = pr.boolean, X2 = pr.overloadedBoolean, Qr = pr.booleanish, X = pr.number, Re = pr.spaceSeparated,
Fn = pr.commaSeparated;
Uc.exports = q2({
space: "html",
attributes: {
acceptcharset: "accept-charset",
classname: "class",
htmlfor: "for",
httpequiv: "http-equiv"
},
transform: G2,
mustUseProperty: ["checked", "multiple", "muted", "selected"],
properties: {
// Standard Properties.
abbr: null,
accept: Fn,
acceptCharset: Re,
accessKey: Re,
action: null,
allow: null,
allowFullScreen: B,
allowPaymentRequest: B,
allowUserMedia: B,
alt: null,
as: null,
async: B,
autoCapitalize: null,
autoComplete: Re,
autoFocus: B,
autoPlay: B,
capture: B,
charSet: null,
checked: B,
cite: null,
className: Re,
cols: X,
colSpan: null,
content: null,
contentEditable: Qr,
controls: B,
controlsList: Re,
coords: X | Fn,
crossOrigin: null,
data: null,
dateTime: null,
decoding: null,
default: B,
defer: B,
dir: null,
dirName: null,
disabled: B,
download: X2,
draggable: Qr,
encType: null,
enterKeyHint: null,
form: null,
formAction: null,
formEncType: null,
formMethod: null,
formNoValidate: B,
formTarget: null,
headers: Re,
height: X,
hidden: B,
high: X,
href: null,
hrefLang: null,
htmlFor: Re,
httpEquiv: Re,
id: null,
imageSizes: null,
imageSrcSet: Fn,
inputMode: null,
integrity: null,
is: null,
isMap: B,
itemId: null,
itemProp: Re,
itemRef: Re,
itemScope: B,
itemType: Re,
kind: null,
label: null,
lang: null,
language: null,
list: null,
loading: null,
loop: B,
low: X,
manifest: null,
max: null,
maxLength: X,
media: null,
method: null,
min: null,
minLength: X,
multiple: B,
muted: B,
name: null,
nonce: null,
noModule: B,
noValidate: B,
onAbort: null,
onAfterPrint: null,
onAuxClick: null,
onBeforePrint: null,
onBeforeUnload: null,
onBlur: null,
onCancel: null,
onCanPlay: null,
onCanPlayThrough: null,
onChange: null,
onClick: null,
onClose: null,
onContextMenu: 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,
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: B,
optimum: X,
pattern: null,
ping: Re,
placeholder: null,
playsInline: B,
poster: null,
preload: null,
readOnly: B,
referrerPolicy: null,
rel: Re,
required: B,
reversed: B,
rows: X,
rowSpan: X,
sandbox: Re,
scope: null,
scoped: B,
seamless: B,
selected: B,
shape: null,
size: X,
sizes: null,
slot: null,
span: X,
spellCheck: Qr,
src: null,
srcDoc: null,
srcLang: null,
srcSet: Fn,
start: X,
step: null,
style: null,
tabIndex: X,
target: null,
title: null,
translate: null,
type: null,
typeMustMatch: B,
useMap: null,
value: Qr,
width: X,
wrap: null,
// Legacy.
// See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
align: null,
// Several. Use CSS `text-align` instead,
aLink: null,
// `<body>`. Use CSS `a:active {color}` instead
archive: Re,
// `<object>`. List of URIs to archives
axis: null,
// `<td>` and `<th>`. Use `scope` on `<th>`
background: null,
// `<body>`. Use CSS `background-image` instead
bgColor: null,
// `<body>` and table elements. Use CSS `background-color` instead
border: X,
// `<table>`. Use CSS `border-width` instead,
borderColor: null,
// `<table>`. Use CSS `border-color` instead,
bottomMargin: X,
// `<body>`
cellPadding: null,
// `<table>`
cellSpacing: null,
// `<table>`
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,
// `<object>`
clear: null,
// `<br>`. Use CSS `clear` instead
code: null,
// `<object>`
codeBase: null,
// `<object>`
codeType: null,
// `<object>`
color: null,
// `<font>` and `<hr>`. Use CSS instead
compact: B,
// Lists. Use CSS to reduce space between items instead
declare: B,
// `<object>`
event: null,
// `<script>`
face: null,
// `<font>`. Use CSS instead
frame: null,
// `<table>`
frameBorder: null,
// `<iframe>`. Use CSS `border` instead
hSpace: X,
// `<img>` and `<object>`
leftMargin: X,
// `<body>`
link: null,
// `<body>`. Use CSS `a:link {color: *}` instead
longDesc: null,
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
lowSrc: null,
// `<img>`. Use a `<picture>`
marginHeight: X,
// `<body>`
marginWidth: X,
// `<body>`
noResize: B,
// `<frame>`
noHref: B,
// `<area>`. Use no href instead of an explicit `nohref`
noShade: B,
// `<hr>`. Use background-color and height instead of borders
noWrap: B,
// `<td>` and `<th>`
object: null,
// `<applet>`
profile: null,
// `<head>`
prompt: null,
// `<isindex>`
rev: null,
// `<link>`
rightMargin: X,
// `<body>`
rules: null,
// `<table>`
scheme: null,
// `<meta>`
scrolling: Qr,
// `<frame>`. Use overflow in the child context
standby: null,
// `<object>`
summary: null,
// `<table>`
text: null,
// `<body>`. Use CSS `color` instead
topMargin: X,
// `<body>`
valueType: null,
// `<param>`
version: null,
// `<html>`. Use a doctype.
vAlign: null,
// Several. Use CSS `vertical-align` instead
vLink: null,
// `<body>`. Use CSS `a:visited {color}` instead
vSpace: X,
// `<img>` and `<object>`
// Non-standard Properties.
allowTransparency: null,
autoCorrect: null,
autoSave: null,
disablePictureInPicture: B,
disableRemotePlayback: B,
prefix: null,
property: null,
results: X,
security: null,
unselectable: null
}
});
});
// ../node_modules/hastscript/node_modules/property-information/html.js
var Xc = H((Yb, Gc) => {
"use strict";
var Y2 = Ec(), Z2 = Oc(), K2 = Nc(), J2 = Vc(), Q2 = Wc(), e4 = qc();
Gc.exports = Y2([K2, Z2, J2, Q2, e4]);
});
// ../node_modules/hastscript/node_modules/property-information/find.js
var Kc = H((Zb, Zc) => {
"use strict";
var t4 = Nn(), r4 = fa(), n4 = sa(), ma = "data";
Zc.exports = i4;
var o4 = /^data[-\w.:]+$/i, Yc = /-[a-z]/g, a4 = /[A-Z]/g;
function i4(e, t) {
var r = t4(t), n = t, a = n4;
return r in e.normal ? e.property[e.normal[r]] : (r.length > 4 && r.slice(0, 4) === ma && o4.test(t) && (t.charAt(4) === "-" ? n = l4(t) :
t = c4(t), a = r4), new a(n, t));
}
o(i4, "find");
function l4(e) {
var t = e.slice(5).replace(Yc, u4);
return ma + t.charAt(0).toUpperCase() + t.slice(1);
}
o(l4, "datasetToProperty");
function c4(e) {
var t = e.slice(4);
return Yc.test(t) ? e : (t = t.replace(a4, s4), t.charAt(0) !== "-" && (t = "-" + t), ma + t);
}
o(c4, "datasetToAttribute");
function s4(e) {
return "-" + e.toLowerCase();
}
o(s4, "kebab");
function u4(e) {
return e.charAt(1).toUpperCase();
}
o(u4, "camelcase");
});
// ../node_modules/hast-util-parse-selector/index.js
var es = H((Jb, Qc) => {
"use strict";
Qc.exports = f4;
var Jc = /[#.]/g;
function f4(e, t) {
for (var r = e || "", n = t || "div", a = {}, i = 0, c, l, s; i < r.length; )
Jc.lastIndex = i, s = Jc.exec(r), c = r.slice(i, s ? s.index : r.length), c && (l ? l === "#" ? a.id = c : a.className ? a.className.push(
c) : a.className = [c] : n = c, i += c.length), s && (l = s[0], i++);
return { type: "element", tagName: n, properties: a, children: [] };
}
o(f4, "parse");
});
// ../node_modules/hastscript/node_modules/space-separated-tokens/index.js
var rs = H((ha) => {
"use strict";
ha.parse = m4;
ha.stringify = h4;
var ts = "", d4 = " ", p4 = /[ \t\n\r\f]+/g;
function m4(e) {
var t = String(e || ts).trim();
return t === ts ? [] : t.split(p4);
}
o(m4, "parse");
function h4(e) {
return e.join(d4).trim();
}
o(h4, "stringify");
});
// ../node_modules/hastscript/node_modules/comma-separated-tokens/index.js
var os = H((va) => {
"use strict";
va.parse = g4;
va.stringify = v4;
var ga = ",", ns = " ", en = "";
function g4(e) {
for (var t = [], r = String(e || en), n = r.indexOf(ga), a = 0, i = !1, c; !i; )
n === -1 && (n = r.length, i = !0), c = r.slice(a, n).trim(), (c || !i) && t.push(c), a = n + 1, n = r.indexOf(ga, a);
return t;
}
o(g4, "parse");
function v4(e, t) {
var r = t || {}, n = r.padLeft === !1 ? en : ns, a = r.padRight ? ns : en;
return e[e.length - 1] === en && (e = e.concat(en)), e.join(a + ga + n).trim();
}
o(v4, "stringify");
});
// ../node_modules/hastscript/factory.js
var fs = H((o9, us) => {
"use strict";
var w4 = Kc(), as = Nn(), b4 = es(), is = rs().parse, ls = os().parse;
us.exports = y4;
var R4 = {}.hasOwnProperty;
function y4(e, t, r) {
var n = r ? M4(r) : null;
return a;
function a(c, l) {
var s = b4(c, t), u = Array.prototype.slice.call(arguments, 2), f = s.tagName.toLowerCase(), d;
if (s.tagName = n && R4.call(n, f) ? n[f] : f, l && x4(l, s) && (u.unshift(l), l = null), l)
for (d in l)
i(s.properties, d, l[d]);
return ss(s.children, u), s.tagName === "template" && (s.content = { type: "root", children: s.children }, s.children = []), s;
}
function i(c, l, s) {
var u, f, d;
s == null || s !== s || (u = w4(e, l), f = u.property, d = s, typeof d == "string" && (u.spaceSeparated ? d = is(d) : u.commaSeparated ?
d = ls(d) : u.commaOrSpaceSeparated && (d = is(ls(d).join(" ")))), f === "style" && typeof s != "string" && (d = C4(d)), f === "classN\
ame" && c.className && (d = c.className.concat(d)), c[f] = S4(u, f, d));
}
}
o(y4, "factory");
function x4(e, t) {
return typeof e == "string" || "length" in e || E4(t.tagName, e);
}
o(x4, "isChildren");
function E4(e, t) {
var r = t.type;
return e === "input" || !r || typeof r != "string" ? !1 : typeof t.children == "object" && "length" in t.children ? !0 : (r = r.toLowerCase(),
e === "button" ? r !== "menu" && r !== "submit" && r !== "reset" && r !== "button" : "value" in t);
}
o(E4, "isNode");
function ss(e, t) {
var r, n;
if (typeof t == "string" || typeof t == "number") {
e.push({ type: "text", value: String(t) });
return;
}
if (typeof t == "object" && "length" in t) {
for (r = -1, n = t.length; ++r < n; )
ss(e, t[r]);
return;
}
if (typeof t != "object" || !("type" in t))
throw new Error("Expected node, nodes, or string, got `" + t + "`");
e.push(t);
}
o(ss, "addChild");
function S4(e, t, r) {
var n, a, i;
if (typeof r != "object" || !("length" in r))
return cs(e, t, r);
for (a = r.length, n = -1, i = []; ++n < a; )
i[n] = cs(e, t, r[n]);
return i;
}
o(S4, "parsePrimitives");
function cs(e, t, r) {
var n = r;
return e.number || e.positiveNumber ? !isNaN(n) && n !== "" && (n = Number(n)) : (e.boolean || e.overloadedBoolean) && typeof n == "stri\
ng" && (n === "" || as(r) === as(t)) && (n = !0), n;
}
o(cs, "parsePrimitive");
function C4(e) {
var t = [], r;
for (r in e)
t.push([r, e[r]].join(": "));
return t.join("; ");
}
o(C4, "style");
function M4(e) {
for (var t = e.length, r = -1, n = {}, a; ++r < t; )
a = e[r], n[a.toLowerCase()] = a;
return n;
}
o(M4, "createAdjustMap");
});
// ../node_modules/hastscript/html.js
var ms = H((i9, ps) => {
"use strict";
var L4 = Xc(), A4 = fs(), ds = A4(L4, "div");
ds.displayName = "html";
ps.exports = ds;
});
// ../node_modules/hastscript/index.js
var gs = H((l9, hs) => {
"us