UNPKG

@storybook/core

Version:

Storybook framework-agnostic API

1,630 lines (1,586 loc) • 925 kB
var V3 = Object.create; var oi = Object.defineProperty; var j3 = Object.getOwnPropertyDescriptor; var W3 = Object.getOwnPropertyNames; var q3 = Object.getPrototypeOf, U3 = Object.prototype.hasOwnProperty; var o = (e, t) => oi(e, "name", { value: t, configurable: !0 }), oo = /* @__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 S = (e, t) => () => (e && (t = e(e = 0)), t); var M = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), fn = (e, t) => { for (var r in t) oi(e, r, { get: t[r], enumerable: !0 }); }, G3 = (e, t, r, n) => { if (t && typeof t == "object" || typeof t == "function") for (let a of W3(t)) !U3.call(e, a) && a !== r && oi(e, a, { get: () => t[a], enumerable: !(n = j3(t, a)) || n.enumerable }); return e; }; var Re = (e, t, r) => (r = e != null ? V3(q3(e)) : {}, G3( // 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 ? oi(r, "default", { value: e, enumerable: !0 }) : r, e )); // ../node_modules/@babel/runtime/helpers/esm/extends.js function we() { return we = 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; }, we.apply(null, arguments); } var io = S(() => { o(we, "_extends"); }); // ../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js function mp(e) { if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } var gp = S(() => { o(mp, "_assertThisInitialized"); }); // ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js function er(e, t) { return er = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) { return r.__proto__ = n, r; }, er(e, t); } var ii = S(() => { o(er, "_setPrototypeOf"); }); // ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js function li(e) { return li = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, li(e); } var wp = S(() => { o(li, "_getPrototypeOf"); }); // ../node_modules/@storybook/global/dist/index.mjs var hn, ci = S(() => { hn = (() => { let e; return typeof window < "u" ? e = window : typeof globalThis < "u" ? e = globalThis : typeof global < "u" ? e = global : typeof self < "u" ? e = self : e = {}, e; })(); }); // ../node_modules/memoizerific/memoizerific.js var uo = M((Ap, ws) => { (function(e) { if (typeof Ap == "object" && typeof ws < "u") ws.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, l) { function u(d, h) { if (!i[d]) { if (!a[d]) { var f = typeof oo == "function" && oo; if (!h && f) return f(d, !0); if (c) return c(d, !0); var g = new Error("Cannot find module '" + d + "'"); throw g.code = "MODULE_NOT_FOUND", g; } var w = i[d] = { exports: {} }; a[d][0].call(w.exports, function(m) { var v = a[d][1][m]; return u(v || m); }, w, w.exports, n, a, i, l); } return i[d].exports; } o(u, "s"); for (var c = typeof oo == "function" && oo, p = 0; p < l.length; p++) u(l[p]); return u; }, "e"))({ 1: [function(n, a, i) { a.exports = function(l) { if (typeof Map != "function" || l) { var u = n("./similar"); return new u(); } else return /* @__PURE__ */ new Map(); }; }, { "./similar": 2 }], 2: [function(n, a, i) { function l() { return this.list = [], this.lastItem = void 0, this.size = 0, this; } o(l, "Similar"), l.prototype.get = function(u) { var c; if (this.lastItem && this.isEqual(this.lastItem.key, u)) return this.lastItem.val; if (c = this.indexOf(u), c >= 0) return this.lastItem = this.list[c], this.list[c].val; }, l.prototype.set = function(u, c) { var p; return this.lastItem && this.isEqual(this.lastItem.key, u) ? (this.lastItem.val = c, this) : (p = this.indexOf(u), p >= 0 ? (this.lastItem = this.list[p], this.list[p].val = c, this) : (this.lastItem = { key: u, val: c }, this.list.push(this.lastItem), this.size++, this)); }, l.prototype.delete = function(u) { var c; if (this.lastItem && this.isEqual(this.lastItem.key, u) && (this.lastItem = void 0), c = this.indexOf(u), c >= 0) return this.size--, this.list.splice(c, 1)[0]; }, l.prototype.has = function(u) { var c; return this.lastItem && this.isEqual(this.lastItem.key, u) ? !0 : (c = this.indexOf(u), c >= 0 ? (this.lastItem = this.list[c], !0) : !1); }, l.prototype.forEach = function(u, c) { var p; for (p = 0; p < this.size; p++) u.call(c || this, this.list[p].val, this.list[p].key, this); }, l.prototype.indexOf = function(u) { var c; for (c = 0; c < this.size; c++) if (this.isEqual(this.list[c].key, u)) return c; return -1; }, l.prototype.isEqual = function(u, c) { return u === c || u !== u && c !== c; }, a.exports = l; }, {}], 3: [function(n, a, i) { var l = n("map-or-similar"); a.exports = function(d) { var h = new l(!1), f = []; return function(g) { var w = /* @__PURE__ */ o(function() { var m = h, v, y, b = arguments.length - 1, D = Array(b + 1), x = !0, C; if ((w.numArgs || w.numArgs === 0) && w.numArgs !== b + 1) throw new Error("Memoizerific functions should always be called with the same number of arguments"); for (C = 0; C < b; C++) { if (D[C] = { cacheItem: m, arg: arguments[C] }, m.has(arguments[C])) { m = m.get(arguments[C]); continue; } x = !1, v = new l(!1), m.set(arguments[C], v), m = v; } return x && (m.has(arguments[b]) ? y = m.get(arguments[b]) : x = !1), x || (y = g.apply(null, arguments), m.set(arguments[b], y)), d > 0 && (D[b] = { cacheItem: m, arg: arguments[b] }, x ? u(f, D) : f.push(D), f.length > d && c(f.shift())), w.wasMemoized = x, w.numArgs = b + 1, y; }, "memoizerific"); return w.limit = d, w.wasMemoized = !1, w.cache = h, w.lru = f, w; }; }; function u(d, h) { var f = d.length, g = h.length, w, m, v; for (m = 0; m < f; m++) { for (w = !0, v = 0; v < g; v++) if (!p(d[m][v].arg, h[v].arg)) { w = !1; break; } if (w) break; } d.push(d.splice(m, 1)[0]); } o(u, "moveToMostRecentLru"); function c(d) { var h = d.length, f = d[h - 1], g, w; for (f.cacheItem.delete(f.arg), w = h - 2; w >= 0 && (f = d[w], g = f.cacheItem.get(f.arg), !g || !g.size); w--) f.cacheItem.delete(f.arg); } o(c, "removeCachedResult"); function p(d, h) { return d === h || d !== d && h !== h; } o(p, "isEqual"); }, { "map-or-similar": 1 }] }, {}, [3])(3); }); }); // ../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js function mn(e, t) { if (e == null) return {}; var r = {}; for (var n in e) if ({}.hasOwnProperty.call(e, n)) { if (t.indexOf(n) >= 0) continue; r[n] = e[n]; } return r; } var pi = S(() => { o(mn, "_objectWithoutPropertiesLoose"); }); // ../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js function Fp(e, t) { if (e == null) return {}; var r, n, a = mn(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (n = 0; n < i.length; n++) r = i[n], t.indexOf(r) >= 0 || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]); } return a; } var kp = S(() => { pi(); o(Fp, "_objectWithoutProperties"); }); // ../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js function co(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 bs = S(() => { o(co, "_arrayLikeToArray"); }); // ../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js function Lp(e) { if (Array.isArray(e)) return co(e); } var Tp = S(() => { bs(); o(Lp, "_arrayWithoutHoles"); }); // ../node_modules/@babel/runtime/helpers/esm/iterableToArray.js function Ip(e) { if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e); } var Bp = S(() => { o(Ip, "_iterableToArray"); }); // ../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js function Mp(e, t) { if (e) { if (typeof e == "string") return co(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) ? co(e, t) : void 0; } } var _p = S(() => { bs(); o(Mp, "_unsupportedIterableToArray"); }); // ../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js function Pp() { 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 Hp = S(() => { o(Pp, "_nonIterableSpread"); }); // ../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js function zp(e) { return Lp(e) || Ip(e) || Mp(e) || Pp(); } var Op = S(() => { Tp(); Bp(); _p(); Hp(); o(zp, "_toConsumableArray"); }); // ../node_modules/@babel/runtime/helpers/esm/typeof.js function Rr(e) { "@babel/helpers - typeof"; return Rr = 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; }, Rr(e); } var ys = S(() => { o(Rr, "_typeof"); }); // ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js function Np(e, t) { if (Rr(e) != "object" || !e) return e; var r = e[Symbol.toPrimitive]; if (r !== void 0) { var n = r.call(e, t || "default"); if (Rr(n) != "object") return n; throw new TypeError("@@toPrimitive must return a primitive value."); } return (t === "string" ? String : Number)(e); } var $p = S(() => { ys(); o(Np, "toPrimitive"); }); // ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js function Vp(e) { var t = Np(e, "string"); return Rr(t) == "symbol" ? t : t + ""; } var jp = S(() => { ys(); $p(); o(Vp, "toPropertyKey"); }); // ../node_modules/@babel/runtime/helpers/esm/defineProperty.js function di(e, t, r) { return (t = Vp(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e; } var Ds = S(() => { jp(); o(di, "_defineProperty"); }); // ../node_modules/react-syntax-highlighter/dist/esm/create-element.js import E7 from "react"; function Wp(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 gn(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t] != null ? arguments[t] : {}; t % 2 ? Wp(Object(r), !0).forEach(function(n) { di(e, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Wp(Object(r)).forEach(function(n) { Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n)); }); } return e; } function R7(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 S7(e) { if (e.length === 0 || e.length === 1) return e; var t = e.join("."); return xs[t] || (xs[t] = R7(e)), xs[t]; } function A7(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 = S7(n); return a.reduce(function(i, l) { return gn(gn({}, i), r[l]); }, t); } function qp(e) { return e.join(" "); } function F7(e, t) { var r = 0; return function(n) { return r += 1, n.map(function(a, i) { return Sr({ node: a, stylesheet: e, useInlineStyles: t, key: "code-segment-".concat(r, "-").concat(i) }); }); }; } function Sr(e) { var t = e.node, r = e.stylesheet, n = e.style, a = n === void 0 ? {} : n, i = e.useInlineStyles, l = e.key, u = t.properties, c = t.type, p = t. tagName, d = t.value; if (c === "text") return d; if (p) { var h = F7(r, i), f; if (!i) f = gn(gn({}, u), {}, { className: qp(u.className) }); else { var g = Object.keys(r).reduce(function(y, b) { return b.split(".").forEach(function(D) { y.includes(D) || y.push(D); }), y; }, []), w = u.className && u.className.includes("token") ? ["token"] : [], m = u.className && w.concat(u.className.filter(function(y) { return !g.includes(y); })); f = gn(gn({}, u), {}, { className: qp(m) || void 0, style: A7(u.className, Object.assign({}, u.style, a), r) }); } var v = h(t.children); return /* @__PURE__ */ E7.createElement(p, we({ key: l }, f), v); } } var xs, Cs = S(() => { io(); Ds(); o(Wp, "ownKeys"); o(gn, "_objectSpread"); o(R7, "powerSetPermutations"); xs = {}; o(S7, "getClassNameCombinations"); o(A7, "createStyleObject"); o(qp, "createClassNameString"); o(F7, "createChildren"); o(Sr, "createElement"); }); // ../node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js var Up, Gp = S(() => { Up = /* @__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 Ar from "react"; function Yp(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 Rt(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t] != null ? arguments[t] : {}; t % 2 ? Yp(Object(r), !0).forEach(function(n) { di(e, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Yp(Object(r)).forEach(function(n) { Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n)); }); } return e; } function T7(e) { return e.match(L7); } function I7(e) { var t = e.lines, r = e.startingLineNumber, n = e.style; return t.map(function(a, i) { var l = i + r; return /* @__PURE__ */ Ar.createElement("span", { key: "line-".concat(i), className: "react-syntax-highlighter-line-number", style: typeof n == "function" ? n(l) : n }, "".concat(l, ` `)); }); } function B7(e) { var t = e.codeString, r = e.codeStyle, n = e.containerStyle, a = n === void 0 ? { float: "left", paddingRight: "10px" } : n, i = e.numberStyle, l = i === void 0 ? {} : i, u = e.startingLineNumber; return /* @__PURE__ */ Ar.createElement("code", { style: Object.assign({}, r, a) }, I7({ lines: t.replace(/\n$/, "").split(` `), style: l, startingLineNumber: u })); } function M7(e) { return "".concat(e.toString().length, ".25em"); } function Xp(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 Kp(e, t, r) { var n = { display: "inline-block", minWidth: M7(r), paddingRight: "1em", textAlign: "right", userSelect: "none" }, a = typeof e == "function" ? e(t) : e, i = Rt(Rt({}, n), a); return i; } function fi(e) { var t = e.children, r = e.lineNumber, n = e.lineNumberStyle, a = e.largestLineNumber, i = e.showInlineLineNumbers, l = e.lineProps, u = l === void 0 ? {} : l, c = e.className, p = c === void 0 ? [] : c, d = e.showLineNumbers, h = e.wrapLongLines, f = typeof u == "function" ? u(r) : u; if (f.className = p, r && i) { var g = Kp(n, r, a); t.unshift(Xp(r, g)); } return h & d && (f.style = Rt(Rt({}, f.style), {}, { display: "flex" })), { type: "element", tagName: "span", properties: f, children: t }; } function Zp(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(fi({ children: [a], className: zp(new Set(t)) })); else if (a.children) { var i = t.concat(a.properties.className); Zp(a.children, i).forEach(function(l) { return r.push(l); }); } } return r; } function _7(e, t, r, n, a, i, l, u, c) { var p, d = Zp(e.value), h = [], f = -1, g = 0; function w(C, E) { var R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : []; return fi({ children: C, lineNumber: E, lineNumberStyle: u, largestLineNumber: l, showInlineLineNumbers: a, lineProps: r, className: R, showLineNumbers: n, wrapLongLines: c }); } o(w, "createWrappedLine"); function m(C, E) { if (n && E && a) { var R = Kp(u, E, l); C.unshift(Xp(E, R)); } return C; } o(m, "createUnwrappedLine"); function v(C, E) { var R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : []; return t || R.length > 0 ? w(C, E, R) : m(C, E); } o(v, "createLine"); for (var y = /* @__PURE__ */ o(function() { var E = d[g], R = E.children[0].value, F = T7(R); if (F) { var A = R.split(` `); A.forEach(function(k, B) { var j = n && h.length + i, V = { type: "text", value: "".concat(k, ` `) }; if (B === 0) { var ee = d.slice(f + 1, g).concat(fi({ children: [V], className: E.properties.className })), I = v(ee, j); h.push(I); } else if (B === A.length - 1) { var T = d[g + 1] && d[g + 1].children && d[g + 1].children[0], P = { type: "text", value: "".concat(k) }; if (T) { var q = fi({ children: [P], className: E.properties.className }); d.splice(g + 1, 0, q); } else { var $ = [P], U = v($, j, E.properties.className); h.push(U); } } else { var H = [V], X = v(H, j, E.properties.className); h.push(X); } }), f = g; } g++; }, "_loop"); g < d.length; ) y(); if (f !== d.length - 1) { var b = d.slice(f + 1, d.length); if (b && b.length) { var D = n && h.length + i, x = v(b, D); h.push(x); } } return t ? h : (p = []).concat.apply(p, h); } function P7(e) { var t = e.rows, r = e.stylesheet, n = e.useInlineStyles; return t.map(function(a, i) { return Sr({ node: a, stylesheet: r, useInlineStyles: n, key: "code-segement".concat(i) }); }); } function Jp(e) { return e && typeof e.highlightAuto < "u"; } function H7(e) { var t = e.astGenerator, r = e.language, n = e.code, a = e.defaultCodeValue; if (Jp(t)) { var i = Up(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 Es(e, t) { return /* @__PURE__ */ o(function(n) { var a = n.language, i = n.children, l = n.style, u = l === void 0 ? t : l, c = n.customStyle, p = c === void 0 ? {} : c, d = n.codeTagProps, h = d === void 0 ? { className: a ? "language-".concat(a) : void 0, style: Rt(Rt({}, u['code[class*="language-"]']), u['code[class*="language-'.concat(a, '"]')]) } : d, f = n.useInlineStyles, g = f === void 0 ? !0 : f, w = n.showLineNumbers, m = w === void 0 ? !1 : w, v = n.showInlineLineNumbers, y = v === void 0 ? !0 : v, b = n.startingLineNumber, D = b === void 0 ? 1 : b, x = n.lineNumberContainerStyle, C = n.lineNumberStyle, E = C === void 0 ? {} : C, R = n.wrapLines, F = n.wrapLongLines, A = F === void 0 ? !1 : F, k = n.lineProps, B = k === void 0 ? {} : k, j = n.renderer, V = n. PreTag, ee = V === void 0 ? "pre" : V, I = n.CodeTag, T = I === void 0 ? "code" : I, P = n.code, q = P === void 0 ? (Array.isArray(i) ? i[0] : i) || "" : P, $ = n.astGenerator, U = Fp(n, k7); $ = $ || e; var H = m ? /* @__PURE__ */ Ar.createElement(B7, { containerStyle: x, codeStyle: h.style || {}, numberStyle: E, startingLineNumber: D, codeString: q }) : null, X = u.hljs || u['pre[class*="language-"]'] || { backgroundColor: "#fff" }, ze = Jp($) ? "hljs" : "prismjs", Ee = g ? Object.assign({}, U, { style: Object.assign({}, X, p) }) : Object.assign({}, U, { className: U.className ? "".concat(ze, " ").concat(U.className) : ze, style: Object.assign({}, p) }); if (A ? h.style = Rt(Rt({}, h.style), {}, { whiteSpace: "pre-wrap" }) : h.style = Rt(Rt({}, h.style), {}, { whiteSpace: "pre" }), !$) return /* @__PURE__ */ Ar.createElement(ee, Ee, H, /* @__PURE__ */ Ar.createElement(T, h, q)); (R === void 0 && j || A) && (R = !0), j = j || P7; var ve = [{ type: "text", value: q }], Le = H7({ astGenerator: $, language: a, code: q, defaultCodeValue: ve }); Le.language === null && (Le.value = ve); var Oe = Le.value.length + D, Ne = _7(Le, R, B, m, y, D, Oe, E, A); return /* @__PURE__ */ Ar.createElement(ee, Ee, /* @__PURE__ */ Ar.createElement(T, h, !y && H, j({ rows: Ne, stylesheet: u, useInlineStyles: g }))); }, "SyntaxHighlighter"); } var k7, L7, Qp = S(() => { kp(); Op(); Ds(); Cs(); Gp(); k7 = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "star\ tingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "\ code", "astGenerator"]; o(Yp, "ownKeys"); o(Rt, "_objectSpread"); L7 = /\n/g; o(T7, "getNewLines"); o(I7, "getAllLineNumbers"); o(B7, "AllLineNumbers"); o(M7, "getEmWidthOfNumber"); o(Xp, "getInlineLineNumber"); o(Kp, "assembleLineNumberStyles"); o(fi, "createLineElement"); o(Zp, "flattenCodeTree"); o(_7, "processLines"); o(P7, "defaultRenderer"); o(Jp, "isHighlightJs"); o(H7, "getCodeTree"); o(Es, "default"); }); // ../node_modules/xtend/immutable.js var td = M((cH, ed) => { ed.exports = O7; var z7 = Object.prototype.hasOwnProperty; function O7() { for (var e = {}, t = 0; t < arguments.length; t++) { var r = arguments[t]; for (var n in r) z7.call(r, n) && (e[n] = r[n]); } return e; } o(O7, "extend"); }); // ../node_modules/hastscript/node_modules/property-information/lib/util/schema.js var Ss = M((dH, nd) => { "use strict"; nd.exports = rd; var Rs = rd.prototype; Rs.space = null; Rs.normal = {}; Rs.property = {}; function rd(e, t, r) { this.property = e, this.normal = t, r && (this.space = r); } o(rd, "Schema"); }); // ../node_modules/hastscript/node_modules/property-information/lib/util/merge.js var id = M((hH, od) => { "use strict"; var ad = td(), N7 = Ss(); od.exports = $7; function $7(e) { for (var t = e.length, r = [], n = [], a = -1, i, l; ++a < t; ) i = e[a], r.push(i.property), n.push(i.normal), l = i.space; return new N7( ad.apply(null, r), ad.apply(null, n), l ); } o($7, "merge"); }); // ../node_modules/hastscript/node_modules/property-information/normalize.js var hi = M((gH, ld) => { "use strict"; ld.exports = V7; function V7(e) { return e.toLowerCase(); } o(V7, "normalize"); }); // ../node_modules/hastscript/node_modules/property-information/lib/util/info.js var As = M((wH, ud) => { "use strict"; ud.exports = sd; var et = sd.prototype; et.space = null; et.attribute = null; et.property = null; et.boolean = !1; et.booleanish = !1; et.overloadedBoolean = !1; et.number = !1; et.commaSeparated = !1; et.spaceSeparated = !1; et.commaOrSpaceSeparated = !1; et.mustUseProperty = !1; et.defined = !1; function sd(e, t) { this.property = e, this.attribute = t; } o(sd, "Info"); }); // ../node_modules/hastscript/node_modules/property-information/lib/util/types.js var mi = M((rr) => { "use strict"; var j7 = 0; rr.boolean = Fr(); rr.booleanish = Fr(); rr.overloadedBoolean = Fr(); rr.number = Fr(); rr.spaceSeparated = Fr(); rr.commaSeparated = Fr(); rr.commaOrSpaceSeparated = Fr(); function Fr() { return Math.pow(2, ++j7); } o(Fr, "increment"); }); // ../node_modules/hastscript/node_modules/property-information/lib/util/defined-info.js var ks = M((xH, hd) => { "use strict"; var dd = As(), cd = mi(); hd.exports = Fs; Fs.prototype = new dd(); Fs.prototype.defined = !0; var fd = [ "boolean", "booleanish", "overloadedBoolean", "number", "commaSeparated", "spaceSeparated", "commaOrSpaceSeparated" ], W7 = fd.length; function Fs(e, t, r, n) { var a = -1, i; for (pd(this, "space", n), dd.call(this, e, t); ++a < W7; ) i = fd[a], pd(this, i, (r & cd[i]) === cd[i]); } o(Fs, "DefinedInfo"); function pd(e, t, r) { r && (e[t] = r); } o(pd, "mark"); }); // ../node_modules/hastscript/node_modules/property-information/lib/util/create.js var vn = M((EH, gd) => { "use strict"; var md = hi(), q7 = Ss(), U7 = ks(); gd.exports = G7; function G7(e) { var t = e.space, r = e.mustUseProperty || [], n = e.attributes || {}, a = e.properties, i = e.transform, l = {}, u = {}, c, p; for (c in a) p = new U7( c, i(n, c), a[c], t ), r.indexOf(c) !== -1 && (p.mustUseProperty = !0), l[c] = p, u[md(c)] = c, u[md(p.attribute)] = c; return new q7(l, u, t); } o(G7, "create"); }); // ../node_modules/hastscript/node_modules/property-information/lib/xlink.js var wd = M((SH, vd) => { "use strict"; var Y7 = vn(); vd.exports = Y7({ space: "xlink", transform: X7, properties: { xLinkActuate: null, xLinkArcRole: null, xLinkHref: null, xLinkRole: null, xLinkShow: null, xLinkTitle: null, xLinkType: null } }); function X7(e, t) { return "xlink:" + t.slice(5).toLowerCase(); } o(X7, "xlinkTransform"); }); // ../node_modules/hastscript/node_modules/property-information/lib/xml.js var yd = M((FH, bd) => { "use strict"; var K7 = vn(); bd.exports = K7({ space: "xml", transform: Z7, properties: { xmlLang: null, xmlBase: null, xmlSpace: null } }); function Z7(e, t) { return "xml:" + t.slice(3).toLowerCase(); } o(Z7, "xmlTransform"); }); // ../node_modules/hastscript/node_modules/property-information/lib/util/case-sensitive-transform.js var xd = M((LH, Dd) => { "use strict"; Dd.exports = J7; function J7(e, t) { return t in e ? e[t] : t; } o(J7, "caseSensitiveTransform"); }); // ../node_modules/hastscript/node_modules/property-information/lib/util/case-insensitive-transform.js var Ls = M((IH, Cd) => { "use strict"; var Q7 = xd(); Cd.exports = ew; function ew(e, t) { return Q7(e, t.toLowerCase()); } o(ew, "caseInsensitiveTransform"); }); // ../node_modules/hastscript/node_modules/property-information/lib/xmlns.js var Rd = M((MH, Ed) => { "use strict"; var tw = vn(), rw = Ls(); Ed.exports = tw({ space: "xmlns", attributes: { xmlnsxlink: "xmlns:xlink" }, transform: rw, properties: { xmlns: null, xmlnsXLink: null } }); }); // ../node_modules/hastscript/node_modules/property-information/lib/aria.js var Ad = M((_H, Sd) => { "use strict"; var Ts = mi(), nw = vn(), Ve = Ts.booleanish, tt = Ts.number, kr = Ts.spaceSeparated; Sd.exports = nw({ transform: aw, properties: { ariaActiveDescendant: null, ariaAtomic: Ve, ariaAutoComplete: null, ariaBusy: Ve, ariaChecked: Ve, ariaColCount: tt, ariaColIndex: tt, ariaColSpan: tt, ariaControls: kr, ariaCurrent: null, ariaDescribedBy: kr, ariaDetails: null, ariaDisabled: Ve, ariaDropEffect: kr, ariaErrorMessage: null, ariaExpanded: Ve, ariaFlowTo: kr, ariaGrabbed: Ve, ariaHasPopup: null, ariaHidden: Ve, ariaInvalid: null, ariaKeyShortcuts: null, ariaLabel: null, ariaLabelledBy: kr, ariaLevel: tt, ariaLive: null, ariaModal: Ve, ariaMultiLine: Ve, ariaMultiSelectable: Ve, ariaOrientation: null, ariaOwns: kr, ariaPlaceholder: null, ariaPosInSet: tt, ariaPressed: Ve, ariaReadOnly: Ve, ariaRelevant: null, ariaRequired: Ve, ariaRoleDescription: kr, ariaRowCount: tt, ariaRowIndex: tt, ariaRowSpan: tt, ariaSelected: Ve, ariaSetSize: tt, ariaSort: null, ariaValueMax: tt, ariaValueMin: tt, ariaValueNow: tt, ariaValueText: null, role: null } }); function aw(e, t) { return t === "role" ? t : "aria-" + t.slice(4).toLowerCase(); } o(aw, "ariaTransform"); }); // ../node_modules/hastscript/node_modules/property-information/lib/html.js var kd = M((HH, Fd) => { "use strict"; var wn = mi(), ow = vn(), iw = Ls(), O = wn.boolean, lw = wn.overloadedBoolean, po = wn.booleanish, K = wn.number, Me = wn.spaceSeparated, gi = wn.commaSeparated; Fd.exports = ow({ space: "html", attributes: { acceptcharset: "accept-charset", classname: "class", htmlfor: "for", httpequiv: "http-equiv" }, transform: iw, mustUseProperty: ["checked", "multiple", "muted", "selected"], properties: { // Standard Properties. abbr: null, accept: gi, acceptCharset: Me, accessKey: Me, action: null, allow: null, allowFullScreen: O, allowPaymentRequest: O, allowUserMedia: O, alt: null, as: null, async: O, autoCapitalize: null, autoComplete: Me, autoFocus: O, autoPlay: O, capture: O, charSet: null, checked: O, cite: null, className: Me, cols: K, colSpan: null, content: null, contentEditable: po, controls: O, controlsList: Me, coords: K | gi, crossOrigin: null, data: null, dateTime: null, decoding: null, default: O, defer: O, dir: null, dirName: null, disabled: O, download: lw, draggable: po, encType: null, enterKeyHint: null, form: null, formAction: null, formEncType: null, formMethod: null, formNoValidate: O, formTarget: null, headers: Me, height: K, hidden: O, high: K, href: null, hrefLang: null, htmlFor: Me, httpEquiv: Me, id: null, imageSizes: null, imageSrcSet: gi, inputMode: null, integrity: null, is: null, isMap: O, itemId: null, itemProp: Me, itemRef: Me, itemScope: O, itemType: Me, kind: null, label: null, lang: null, language: null, list: null, loading: null, loop: O, low: K, manifest: null, max: null, maxLength: K, media: null, method: null, min: null, minLength: K, multiple: O, muted: O, name: null, nonce: null, noModule: O, noValidate: O, 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: O, optimum: K, pattern: null, ping: Me, placeholder: null, playsInline: O, poster: null, preload: null, readOnly: O, referrerPolicy: null, rel: Me, required: O, reversed: O, rows: K, rowSpan: K, sandbox: Me, scope: null, scoped: O, seamless: O, selected: O, shape: null, size: K, sizes: null, slot: null, span: K, spellCheck: po, src: null, srcDoc: null, srcLang: null, srcSet: gi, start: K, step: null, style: null, tabIndex: K, target: null, title: null, translate: null, type: null, typeMustMatch: O, useMap: null, value: po, width: K, 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: Me, // `<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: K, // `<table>`. Use CSS `border-width` instead, borderColor: null, // `<table>`. Use CSS `border-color` instead, bottomMargin: K, // `<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: O, // Lists. Use CSS to reduce space between items instead declare: O, // `<object>` event: null, // `<script>` face: null, // `<font>`. Use CSS instead frame: null, // `<table>` frameBorder: null, // `<iframe>`. Use CSS `border` instead hSpace: K, // `<img>` and `<object>` leftMargin: K, // `<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: K, // `<body>` marginWidth: K, // `<body>` noResize: O, // `<frame>` noHref: O, // `<area>`. Use no href instead of an explicit `nohref` noShade: O, // `<hr>`. Use background-color and height instead of borders noWrap: O, // `<td>` and `<th>` object: null, // `<applet>` profile: null, // `<head>` prompt: null, // `<isindex>` rev: null, // `<link>` rightMargin: K, // `<body>` rules: null, // `<table>` scheme: null, // `<meta>` scrolling: po, // `<frame>`. Use overflow in the child context standby: null, // `<object>` summary: null, // `<table>` text: null, // `<body>`. Use CSS `color` instead topMargin: K, // `<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: K, // `<img>` and `<object>` // Non-standard Properties. allowTransparency: null, autoCorrect: null, autoSave: null, disablePictureInPicture: O, disableRemotePlayback: O, prefix: null, property: null, results: K, security: null, unselectable: null } }); }); // ../node_modules/hastscript/node_modules/property-information/html.js var Td = M((zH, Ld) => { "use strict"; var sw = id(), uw = wd(), cw = yd(), pw = Rd(), dw = Ad(), fw = kd(); Ld.exports = sw([cw, uw, pw, dw, fw]); }); // ../node_modules/hastscript/node_modules/property-information/find.js var Md = M((OH, Bd) => { "use strict"; var hw = hi(), mw = ks(), gw = As(), Is = "data"; Bd.exports = bw; var vw = /^data[-\w.:]+$/i, Id = /-[a-z]/g, ww = /[A-Z]/g; function bw(e, t) { var r = hw(t), n = t, a = gw; return r in e.normal ? e.property[e.normal[r]] : (r.length > 4 && r.slice(0, 4) === Is && vw.test(t) && (t.charAt(4) === "-" ? n = yw(t) : t = Dw(t), a = mw), new a(n, t)); } o(bw, "find"); function yw(e) { var t = e.slice(5).replace(Id, Cw); return Is + t.charAt(0).toUpperCase() + t.slice(1); } o(yw, "datasetToProperty"); function Dw(e) { var t = e.slice(4); return Id.test(t) ? e : (t = t.replace(ww, xw), t.charAt(0) !== "-" && (t = "-" + t), Is + t); } o(Dw, "datasetToAttribute"); function xw(e) { return "-" + e.toLowerCase(); } o(xw, "kebab"); function Cw(e) { return e.charAt(1).toUpperCase(); } o(Cw, "camelcase"); }); // ../node_modules/hast-util-parse-selector/index.js var Hd = M(($H, Pd) => { "use strict"; Pd.exports = Ew; var _d = /[#.]/g; function Ew(e, t) { for (var r = e || "", n = t || "div", a = {}, i = 0, l, u, c; i < r.length; ) _d.lastIndex = i, c = _d.exec(r), l = r.slice(i, c ? c.index : r.length), l && (u ? u === "#" ? a.id = l : a.className ? a.className.push( l) : a.className = [l] : n = l, i += l.length), c && (u = c[0], i++); return { type: "element", tagName: n, properties: a, children: [] }; } o(Ew, "parse"); }); // ../node_modules/hastscript/node_modules/space-separated-tokens/index.js var Od = M((Bs) => { "use strict"; Bs.parse = Aw; Bs.stringify = Fw; var zd = "", Rw = " ", Sw = /[ \t\n\r\f]+/g; function Aw(e) { var t = String(e || zd).trim(); return t === zd ? [] : t.split(Sw); } o(Aw, "parse"); function Fw(e) { return e.join(Rw).trim(); } o(Fw, "stringify"); }); // ../node_modules/hastscript/node_modules/comma-separated-tokens/index.js var $d = M((_s) => { "use strict"; _s.parse = kw; _s.stringify = Lw; var Ms = ",", Nd = " ", fo = ""; function kw(e) { for (var t = [], r = String(e || fo), n = r.indexOf(Ms), a = 0, i = !1, l; !i; ) n === -1 && (n = r.length, i = !0), l = r.slice(a, n).trim(), (l || !i) && t.push(l), a = n + 1, n = r.indexOf(Ms, a); return t; } o(kw, "parse"); function Lw(e, t) { var r = t || {}, n = r.padLeft === !1 ? fo : Nd, a = r.padRight ? Nd : fo; return e[e.length - 1] === fo && (e = e.concat(fo)), e.join(a + Ms + n).trim(); } o(Lw, "stringify"); }); // ../node_modules/hastscript/factory.js var Yd = M((GH, Gd) => { "use strict"; var Tw = Md(), Vd = hi(), Iw = Hd(), jd = Od().parse, Wd = $d().parse; Gd.exports = Mw; var Bw = {}.hasOwnProperty; function Mw(e, t, r) { var n = r ? Ow(r) : null; return a; function a(l, u) { var c = Iw(l, t), p = Array.prototype.slice.call(arguments, 2), d = c.tagName.toLowerCase(), h; if (c.tagName = n && Bw.call(n, d) ? n[d] : d, u && _w(u, c) && (p.unshift(u), u = null), u) for (h in u) i(c.properties, h, u[h]); return Ud(c.children, p), c.tagName === "template" && (c.content = { type: "root", children: c.children }, c.children = []), c; } function i(l, u, c) { var p, d, h; c == null || c !== c || (p = Tw(e, u), d = p.property, h = c, typeof h == "string" && (p.spaceSeparated ? h = jd(h) : p.commaSeparated ? h = Wd(h) : p.commaOrSpaceSeparated && (h = jd(Wd(h).join(" ")))), d === "style" && typeof c != "string" && (h = zw(h)), d === "classN\ ame" && l.className && (h = l.className.concat(h)), l[d] = Hw(p, d, h)); } } o(Mw, "factory"); function _w(e, t) { return typeof e == "string" || "length" in e || Pw(t.tagName, e); } o(_w, "isChildren"); function Pw(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(Pw, "isNode"); function Ud(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; ) Ud(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(Ud, "addChild"); function Hw(e, t, r) { var n, a, i; if (typeof r != "object" || !("length" in r)) return qd(e, t, r); for (a = r.length, n = -1, i = []; ++n < a; ) i[n] = qd(e, t, r[n]); return i; } o(Hw, "parsePrimitives"); function qd(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 === "" || Vd(r) === Vd(t)) && (n = !0), n; } o(qd, "parsePrimitive"); function zw(e) { var t = [], r; for (r in e) t.push([r, e[r]].join(": ")); return t.join("; "); } o(zw, "style"); function Ow(e) { for (var t = e.length, r = -1, n = {}, a; ++r < t; ) a = e[r], n[a.toLowerCase()] = a; return n; } o(Ow, "createAdjustMap"); }); // ../node_modules/hastscript/html.js var Zd = M((XH, Kd) => { "use strict"; var Nw = Td(), $w = Yd(), Xd = $w(Nw, "div"); Xd.displayName = "html"; Kd.exports = Xd; }); /