@syntrologie/runtime-sdk 2.17.0 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3723,1726 +3723,1728 @@ var AppRegistry = class {
3723
3723
  };
3724
3724
  var appRegistry = new AppRegistry();
3725
3725
 
3726
- // ../adaptives/adaptive-faq/dist/runtime.js
3727
- import { html as html2, LitElement as LitElement2, nothing as nothing2 } from "lit";
3728
- import { styleMap as styleMap2 } from "lit/directives/style-map.js";
3729
- import { unsafeHTML } from "lit/directives/unsafe-html.js";
3730
-
3731
- // ../../node_modules/marked/lib/marked.esm.js
3732
- function M() {
3733
- return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
3734
- }
3735
- var T = M();
3736
- function G(u3) {
3737
- T = u3;
3738
- }
3739
- var _ = { exec: () => null };
3740
- function k(u3, e = "") {
3741
- let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
3742
- let s = typeof i == "string" ? i : i.source;
3743
- return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
3744
- }, getRegex: () => new RegExp(t, e) };
3745
- return n;
3746
- }
3747
- var Re = (() => {
3748
- try {
3749
- return !!new RegExp("(?<=1)(?<!1)");
3750
- } catch {
3751
- return false;
3752
- }
3753
- })();
3754
- var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}>`) };
3755
- var Te = /^(?:[ \t]*(?:\n|$))+/;
3756
- var Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
3757
- var we = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
3758
- var A = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
3759
- var ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
3760
- var N = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
3761
- var re = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
3762
- var se = k(re).replace(/bull/g, N).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
3763
- var Pe = k(re).replace(/bull/g, N).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
3764
- var Q = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
3765
- var Se = /^[^\n]+/;
3766
- var j = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
3767
- var $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", j).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
3768
- var _e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, N).getRegex();
3769
- var q = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
3770
- var F = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
3771
- var Le = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", F).replace("tag", q).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
3772
- var ie = k(Q).replace("hr", A).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", q).getRegex();
3773
- var Me = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ie).getRegex();
3774
- var U = { blockquote: Me, code: Oe, def: $e, fences: we, heading: ye, hr: A, html: Le, lheading: se, list: _e, newline: Te, paragraph: ie, table: _, text: Se };
3775
- var te = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", A).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", q).getRegex();
3776
- var ze = { ...U, lheading: Pe, table: te, paragraph: k(Q).replace("hr", A).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", te).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", q).getRegex() };
3777
- var Ee = { ...U, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", F).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(Q).replace("hr", A).replace("heading", ` *#{1,6} *[^
3778
- ]`).replace("lheading", se).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
3779
- var Ie = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
3780
- var Ae = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
3781
- var oe = /^( {2,}|\\)\n(?!\s*$)/;
3782
- var Ce = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
3783
- var v = /[\p{P}\p{S}]/u;
3784
- var K = /[\s\p{P}\p{S}]/u;
3785
- var ae = /[^\s\p{P}\p{S}]/u;
3786
- var Be = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, K).getRegex();
3787
- var le = /(?!~)[\p{P}\p{S}]/u;
3788
- var De = /(?!~)[\s\p{P}\p{S}]/u;
3789
- var qe = /(?:[^\s\p{P}\p{S}]|~)/u;
3790
- var ue = /(?![*_])[\p{P}\p{S}]/u;
3791
- var ve = /(?![*_])[\s\p{P}\p{S}]/u;
3792
- var He = /(?:[^\s\p{P}\p{S}]|[*_])/u;
3793
- var Ge = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Re ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
3794
- var pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
3795
- var Ze = k(pe, "u").replace(/punct/g, v).getRegex();
3796
- var Ne = k(pe, "u").replace(/punct/g, le).getRegex();
3797
- var ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
3798
- var Qe = k(ce, "gu").replace(/notPunctSpace/g, ae).replace(/punctSpace/g, K).replace(/punct/g, v).getRegex();
3799
- var je = k(ce, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, De).replace(/punct/g, le).getRegex();
3800
- var Fe = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ae).replace(/punctSpace/g, K).replace(/punct/g, v).getRegex();
3801
- var Ue = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ue).getRegex();
3802
- var Ke = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
3803
- var We = k(Ke, "gu").replace(/notPunctSpace/g, He).replace(/punctSpace/g, ve).replace(/punct/g, ue).getRegex();
3804
- var Xe = k(/\\(punct)/, "gu").replace(/punct/g, v).getRegex();
3805
- var Je = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
3806
- var Ve = k(F).replace("(?:-->|$)", "-->").getRegex();
3807
- var Ye = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ve).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
3808
- var D = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/;
3809
- var et = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", D).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
3810
- var he = k(/^!?\[(label)\]\[(ref)\]/).replace("label", D).replace("ref", j).getRegex();
3811
- var ke = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", j).getRegex();
3812
- var tt = k("reflink|nolink(?!\\()", "g").replace("reflink", he).replace("nolink", ke).getRegex();
3813
- var ne = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
3814
- var W = { _backpedal: _, anyPunctuation: Xe, autolink: Je, blockSkip: Ge, br: oe, code: Ae, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: Ze, emStrongRDelimAst: Qe, emStrongRDelimUnd: Fe, escape: Ie, link: et, nolink: ke, punctuation: Be, reflink: he, reflinkSearch: tt, tag: Ye, text: Ce, url: _ };
3815
- var nt = { ...W, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", D).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", D).getRegex() };
3816
- var Z = { ...W, emStrongRDelimAst: je, emStrongLDelim: Ne, delLDelim: Ue, delRDelim: We, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ne).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ne).getRegex() };
3817
- var rt = { ...Z, br: k(oe).replace("{2,}", "*").getRegex(), text: k(Z.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
3818
- var C = { normal: U, gfm: ze, pedantic: Ee };
3819
- var z = { normal: W, gfm: Z, breaks: rt, pedantic: nt };
3820
- var st = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
3821
- var de = (u3) => st[u3];
3822
- function O(u3, e) {
3823
- if (e) {
3824
- if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, de);
3825
- } else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, de);
3826
- return u3;
3827
- }
3828
- function X(u3) {
3829
- try {
3830
- u3 = encodeURI(u3).replace(m.percentDecode, "%");
3831
- } catch {
3832
- return null;
3833
- }
3834
- return u3;
3835
- }
3836
- function J(u3, e) {
3837
- var _a3;
3838
- let t = u3.replace(m.findPipe, (i, s, a) => {
3839
- let o = false, l = s;
3840
- for (; --l >= 0 && a[l] === "\\"; ) o = !o;
3841
- return o ? "|" : " |";
3842
- }), n = t.split(m.splitPipe), r = 0;
3843
- if (n[0].trim() || n.shift(), n.length > 0 && !((_a3 = n.at(-1)) == null ? void 0 : _a3.trim()) && n.pop(), e) if (n.length > e) n.splice(e);
3844
- else for (; n.length < e; ) n.push("");
3845
- for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
3846
- return n;
3847
- }
3848
- function E(u3, e, t) {
3849
- let n = u3.length;
3850
- if (n === 0) return "";
3851
- let r = 0;
3852
- for (; r < n; ) {
3853
- let i = u3.charAt(n - r - 1);
3854
- if (i === e && !t) r++;
3855
- else if (i !== e && t) r++;
3856
- else break;
3857
- }
3858
- return u3.slice(0, n - r);
3859
- }
3860
- function ge(u3, e) {
3861
- if (u3.indexOf(e[1]) === -1) return -1;
3862
- let t = 0;
3863
- for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
3864
- else if (u3[n] === e[0]) t++;
3865
- else if (u3[n] === e[1] && (t--, t < 0)) return n;
3866
- return t > 0 ? -2 : -1;
3867
- }
3868
- function fe(u3, e = 0) {
3869
- let t = e, n = "";
3870
- for (let r of u3) if (r === " ") {
3871
- let i = 4 - t % 4;
3872
- n += " ".repeat(i), t += i;
3873
- } else n += r, t++;
3874
- return n;
3875
- }
3876
- function me(u3, e, t, n, r) {
3877
- let i = e.href, s = e.title || null, a = u3[1].replace(r.other.outputLinkReplace, "$1");
3878
- n.state.inLink = true;
3879
- let o = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
3880
- return n.state.inLink = false, o;
3881
- }
3882
- function it(u3, e, t) {
3883
- let n = u3.match(t.other.indentCodeCompensation);
3884
- if (n === null) return e;
3885
- let r = n[1];
3886
- return e.split(`
3887
- `).map((i) => {
3888
- let s = i.match(t.other.beginningSpace);
3889
- if (s === null) return i;
3890
- let [a] = s;
3891
- return a.length >= r.length ? i.slice(r.length) : i;
3892
- }).join(`
3893
- `);
3894
- }
3895
- var w = class {
3896
- constructor(e) {
3897
- __publicField(this, "options");
3898
- __publicField(this, "rules");
3899
- __publicField(this, "lexer");
3900
- this.options = e || T;
3901
- }
3902
- space(e) {
3903
- let t = this.rules.block.newline.exec(e);
3904
- if (t && t[0].length > 0) return { type: "space", raw: t[0] };
3905
- }
3906
- code(e) {
3907
- let t = this.rules.block.code.exec(e);
3908
- if (t) {
3909
- let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
3910
- return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : E(n, `
3911
- `) };
3912
- }
3913
- }
3914
- fences(e) {
3915
- let t = this.rules.block.fences.exec(e);
3916
- if (t) {
3917
- let n = t[0], r = it(n, t[3] || "", this.rules);
3918
- return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
3919
- }
3920
- }
3921
- heading(e) {
3922
- let t = this.rules.block.heading.exec(e);
3923
- if (t) {
3924
- let n = t[2].trim();
3925
- if (this.rules.other.endingHash.test(n)) {
3926
- let r = E(n, "#");
3927
- (this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
3928
- }
3929
- return { type: "heading", raw: t[0], depth: t[1].length, text: n, tokens: this.lexer.inline(n) };
3930
- }
3931
- }
3932
- hr(e) {
3933
- let t = this.rules.block.hr.exec(e);
3934
- if (t) return { type: "hr", raw: E(t[0], `
3935
- `) };
3936
- }
3937
- blockquote(e) {
3938
- let t = this.rules.block.blockquote.exec(e);
3939
- if (t) {
3940
- let n = E(t[0], `
3941
- `).split(`
3942
- `), r = "", i = "", s = [];
3943
- for (; n.length > 0; ) {
3944
- let a = false, o = [], l;
3945
- for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) o.push(n[l]), a = true;
3946
- else if (!a) o.push(n[l]);
3947
- else break;
3948
- n = n.slice(l);
3949
- let p = o.join(`
3950
- `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
3951
- $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
3952
- r = r ? `${r}
3953
- ${p}` : p, i = i ? `${i}
3954
- ${c}` : c;
3955
- let d = this.lexer.state.top;
3956
- if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = d, n.length === 0) break;
3957
- let h = s.at(-1);
3958
- if ((h == null ? void 0 : h.type) === "code") break;
3959
- if ((h == null ? void 0 : h.type) === "blockquote") {
3960
- let R = h, f = R.raw + `
3961
- ` + n.join(`
3962
- `), S = this.blockquote(f);
3963
- s[s.length - 1] = S, r = r.substring(0, r.length - R.raw.length) + S.raw, i = i.substring(0, i.length - R.text.length) + S.text;
3964
- break;
3965
- } else if ((h == null ? void 0 : h.type) === "list") {
3966
- let R = h, f = R.raw + `
3967
- ` + n.join(`
3968
- `), S = this.list(f);
3969
- s[s.length - 1] = S, r = r.substring(0, r.length - h.raw.length) + S.raw, i = i.substring(0, i.length - R.raw.length) + S.raw, n = f.substring(s.at(-1).raw.length).split(`
3970
- `);
3971
- continue;
3972
- }
3973
- }
3974
- return { type: "blockquote", raw: r, tokens: s, text: i };
3975
- }
3976
- }
3977
- list(e) {
3978
- var _a3, _b;
3979
- let t = this.rules.block.list.exec(e);
3980
- if (t) {
3981
- let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
3982
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
3983
- let s = this.rules.other.listItemRegex(n), a = false;
3984
- for (; e; ) {
3985
- let l = false, p = "", c = "";
3986
- if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
3987
- p = t[0], e = e.substring(p.length);
3988
- let d = fe(t[2].split(`
3989
- `, 1)[0], t[1].length), h = e.split(`
3990
- `, 1)[0], R = !d.trim(), f = 0;
3991
- if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
3992
- `, e = e.substring(h.length + 1), l = true), !l) {
3993
- let S = this.rules.other.nextBulletRegex(f), V2 = this.rules.other.hrRegex(f), Y = this.rules.other.fencesBeginRegex(f), ee = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f), be = this.rules.other.blockquoteBeginRegex(f);
3994
- for (; e; ) {
3995
- let H = e.split(`
3996
- `, 1)[0], I;
3997
- if (h = H, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), I = h) : I = h.replace(this.rules.other.tabCharGlobal, " "), Y.test(h) || ee.test(h) || xe.test(h) || be.test(h) || S.test(h) || V2.test(h)) break;
3998
- if (I.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
3999
- ` + I.slice(f);
4000
- else {
4001
- if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Y.test(d) || ee.test(d) || V2.test(d)) break;
4002
- c += `
4003
- ` + h;
4004
- }
4005
- R = !h.trim(), p += H + `
4006
- `, e = e.substring(H.length + 1), d = I.slice(f);
4007
- }
4008
- }
4009
- i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (a = true)), i.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), i.raw += p;
4010
- }
4011
- let o = i.items.at(-1);
4012
- if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
4013
- else return;
4014
- i.raw = i.raw.trimEnd();
4015
- for (let l of i.items) {
4016
- if (this.lexer.state.top = false, l.tokens = this.lexer.blockTokens(l.text, []), l.task) {
4017
- if (l.text = l.text.replace(this.rules.other.listReplaceTask, ""), ((_a3 = l.tokens[0]) == null ? void 0 : _a3.type) === "text" || ((_b = l.tokens[0]) == null ? void 0 : _b.type) === "paragraph") {
4018
- l.tokens[0].raw = l.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), l.tokens[0].text = l.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
4019
- for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
4020
- this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
4021
- break;
4022
- }
4023
- }
4024
- let p = this.rules.other.listTaskCheckbox.exec(l.raw);
4025
- if (p) {
4026
- let c = { type: "checkbox", raw: p[0] + " ", checked: p[0] !== "[ ]" };
4027
- l.checked = c.checked, i.loose ? l.tokens[0] && ["paragraph", "text"].includes(l.tokens[0].type) && "tokens" in l.tokens[0] && l.tokens[0].tokens ? (l.tokens[0].raw = c.raw + l.tokens[0].raw, l.tokens[0].text = c.raw + l.tokens[0].text, l.tokens[0].tokens.unshift(c)) : l.tokens.unshift({ type: "paragraph", raw: c.raw, text: c.raw, tokens: [c] }) : l.tokens.unshift(c);
4028
- }
4029
- }
4030
- if (!i.loose) {
4031
- let p = l.tokens.filter((d) => d.type === "space"), c = p.length > 0 && p.some((d) => this.rules.other.anyLine.test(d.raw));
4032
- i.loose = c;
4033
- }
4034
- }
4035
- if (i.loose) for (let l of i.items) {
4036
- l.loose = true;
4037
- for (let p of l.tokens) p.type === "text" && (p.type = "paragraph");
4038
- }
4039
- return i;
4040
- }
4041
- }
4042
- html(e) {
4043
- let t = this.rules.block.html.exec(e);
4044
- if (t) return { type: "html", block: true, raw: t[0], pre: t[1] === "pre" || t[1] === "script" || t[1] === "style", text: t[0] };
4045
- }
4046
- def(e) {
4047
- let t = this.rules.block.def.exec(e);
4048
- if (t) {
4049
- let n = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
4050
- return { type: "def", tag: n, raw: t[0], href: r, title: i };
4051
- }
4052
- }
4053
- table(e) {
4054
- var _a3;
4055
- let t = this.rules.block.table.exec(e);
4056
- if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
4057
- let n = J(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = ((_a3 = t[3]) == null ? void 0 : _a3.trim()) ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
4058
- `) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
4059
- if (n.length === r.length) {
4060
- for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
4061
- for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
4062
- for (let a of i) s.rows.push(J(a, s.header.length).map((o, l) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[l] })));
4063
- return s;
4064
- }
4065
- }
4066
- lheading(e) {
4067
- let t = this.rules.block.lheading.exec(e);
4068
- if (t) return { type: "heading", raw: t[0], depth: t[2].charAt(0) === "=" ? 1 : 2, text: t[1], tokens: this.lexer.inline(t[1]) };
4069
- }
4070
- paragraph(e) {
4071
- let t = this.rules.block.paragraph.exec(e);
4072
- if (t) {
4073
- let n = t[1].charAt(t[1].length - 1) === `
4074
- ` ? t[1].slice(0, -1) : t[1];
4075
- return { type: "paragraph", raw: t[0], text: n, tokens: this.lexer.inline(n) };
4076
- }
4077
- }
4078
- text(e) {
4079
- let t = this.rules.block.text.exec(e);
4080
- if (t) return { type: "text", raw: t[0], text: t[0], tokens: this.lexer.inline(t[0]) };
4081
- }
4082
- escape(e) {
4083
- let t = this.rules.inline.escape.exec(e);
4084
- if (t) return { type: "escape", raw: t[0], text: t[1] };
4085
- }
4086
- tag(e) {
4087
- let t = this.rules.inline.tag.exec(e);
4088
- if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t[0] };
4089
- }
4090
- link(e) {
4091
- let t = this.rules.inline.link.exec(e);
4092
- if (t) {
4093
- let n = t[2].trim();
4094
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
4095
- if (!this.rules.other.endAngleBracket.test(n)) return;
4096
- let s = E(n.slice(0, -1), "\\");
4097
- if ((n.length - s.length) % 2 === 0) return;
4098
- } else {
4099
- let s = ge(t[2], "()");
4100
- if (s === -2) return;
4101
- if (s > -1) {
4102
- let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
4103
- t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
4104
- }
4105
- }
4106
- let r = t[2], i = "";
4107
- if (this.options.pedantic) {
4108
- let s = this.rules.other.pedanticHrefTitle.exec(r);
4109
- s && (r = s[1], i = s[3]);
4110
- } else i = t[3] ? t[3].slice(1, -1) : "";
4111
- return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
4112
- }
4113
- }
4114
- reflink(e, t) {
4115
- let n;
4116
- if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
4117
- let r = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = t[r.toLowerCase()];
4118
- if (!i) {
4119
- let s = n[0].charAt(0);
4120
- return { type: "text", raw: s, text: s };
4121
- }
4122
- return me(n, i, n[0], this.lexer, this.rules);
4123
- }
4124
- }
4125
- emStrong(e, t, n = "") {
4126
- let r = this.rules.inline.emStrongLDelim.exec(e);
4127
- if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
4128
- if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
4129
- let s = [...r[0]].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
4130
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
4131
- if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
4132
- if (o = [...a].length, r[3] || r[4]) {
4133
- l += o;
4134
- continue;
4135
- } else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
4136
- p += o;
4137
- continue;
4138
- }
4139
- if (l -= o, l > 0) continue;
4140
- o = Math.min(o, o + l + p);
4141
- let d = [...r[0]][0].length, h = e.slice(0, s + r.index + d + o);
4142
- if (Math.min(s, o) % 2) {
4143
- let f = h.slice(1, -1);
4144
- return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
4145
- }
4146
- let R = h.slice(2, -2);
4147
- return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
4148
- }
4149
- }
4150
- }
4151
- codespan(e) {
4152
- let t = this.rules.inline.code.exec(e);
4153
- if (t) {
4154
- let n = t[2].replace(this.rules.other.newLineCharGlobal, " "), r = this.rules.other.nonSpaceChar.test(n), i = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
4155
- return r && i && (n = n.substring(1, n.length - 1)), { type: "codespan", raw: t[0], text: n };
4156
- }
4157
- }
4158
- br(e) {
4159
- let t = this.rules.inline.br.exec(e);
4160
- if (t) return { type: "br", raw: t[0] };
4161
- }
4162
- del(e, t, n = "") {
4163
- let r = this.rules.inline.delLDelim.exec(e);
4164
- if (!r) return;
4165
- if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
4166
- let s = [...r[0]].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
4167
- for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null; ) {
4168
- if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
4169
- if (r[3] || r[4]) {
4170
- l += o;
4171
- continue;
4172
- }
4173
- if (l -= o, l > 0) continue;
4174
- o = Math.min(o, o + l);
4175
- let c = [...r[0]][0].length, d = e.slice(0, s + r.index + c + o), h = d.slice(s, -s);
4176
- return { type: "del", raw: d, text: h, tokens: this.lexer.inlineTokens(h) };
4177
- }
4178
- }
4179
- }
4180
- autolink(e) {
4181
- let t = this.rules.inline.autolink.exec(e);
4182
- if (t) {
4183
- let n, r;
4184
- return t[2] === "@" ? (n = t[1], r = "mailto:" + n) : (n = t[1], r = n), { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
4185
- }
4186
- }
4187
- url(e) {
4188
- var _a3, _b;
4189
- let t;
4190
- if (t = this.rules.inline.url.exec(e)) {
4191
- let n, r;
4192
- if (t[2] === "@") n = t[0], r = "mailto:" + n;
4193
- else {
4194
- let i;
4195
- do
4196
- i = t[0], t[0] = (_b = (_a3 = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : _a3[0]) != null ? _b : "";
4197
- while (i !== t[0]);
4198
- n = t[0], t[1] === "www." ? r = "http://" + t[0] : r = t[0];
4199
- }
4200
- return { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
4201
- }
4202
- }
4203
- inlineText(e) {
4204
- let t = this.rules.inline.text.exec(e);
4205
- if (t) {
4206
- let n = this.lexer.state.inRawBlock;
4207
- return { type: "text", raw: t[0], text: t[0], escaped: n };
4208
- }
4209
- }
4210
- };
4211
- var x = class u {
4212
- constructor(e) {
4213
- __publicField(this, "tokens");
4214
- __publicField(this, "options");
4215
- __publicField(this, "state");
4216
- __publicField(this, "inlineQueue");
4217
- __publicField(this, "tokenizer");
4218
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
4219
- let t = { other: m, block: C.normal, inline: z.normal };
4220
- this.options.pedantic ? (t.block = C.pedantic, t.inline = z.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = z.breaks : t.inline = z.gfm), this.tokenizer.rules = t;
4221
- }
4222
- static get rules() {
4223
- return { block: C, inline: z };
4224
- }
4225
- static lex(e, t) {
4226
- return new u(t).lex(e);
4227
- }
4228
- static lexInline(e, t) {
4229
- return new u(t).inlineTokens(e);
4230
- }
4231
- lex(e) {
4232
- e = e.replace(m.carriageReturn, `
4233
- `), this.blockTokens(e, this.tokens);
4234
- for (let t = 0; t < this.inlineQueue.length; t++) {
4235
- let n = this.inlineQueue[t];
4236
- this.inlineTokens(n.src, n.tokens);
4237
- }
4238
- return this.inlineQueue = [], this.tokens;
4239
- }
4240
- blockTokens(e, t = [], n = false) {
4241
- var _a3, _b, _c;
4242
- for (this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
4243
- let r;
4244
- if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.block) == null ? void 0 : _b.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), true) : false)) continue;
4245
- if (r = this.tokenizer.space(e)) {
4246
- e = e.substring(r.raw.length);
4247
- let s = t.at(-1);
4248
- r.raw.length === 1 && s !== void 0 ? s.raw += `
4249
- ` : t.push(r);
4250
- continue;
4251
- }
4252
- if (r = this.tokenizer.code(e)) {
4253
- e = e.substring(r.raw.length);
4254
- let s = t.at(-1);
4255
- (s == null ? void 0 : s.type) === "paragraph" || (s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
4256
- `) ? "" : `
4257
- `) + r.raw, s.text += `
4258
- ` + r.text, this.inlineQueue.at(-1).src = s.text) : t.push(r);
4259
- continue;
4260
- }
4261
- if (r = this.tokenizer.fences(e)) {
4262
- e = e.substring(r.raw.length), t.push(r);
4263
- continue;
4264
- }
4265
- if (r = this.tokenizer.heading(e)) {
4266
- e = e.substring(r.raw.length), t.push(r);
4267
- continue;
4268
- }
4269
- if (r = this.tokenizer.hr(e)) {
4270
- e = e.substring(r.raw.length), t.push(r);
4271
- continue;
4272
- }
4273
- if (r = this.tokenizer.blockquote(e)) {
4274
- e = e.substring(r.raw.length), t.push(r);
4275
- continue;
4276
- }
4277
- if (r = this.tokenizer.list(e)) {
4278
- e = e.substring(r.raw.length), t.push(r);
4279
- continue;
4280
- }
4281
- if (r = this.tokenizer.html(e)) {
4282
- e = e.substring(r.raw.length), t.push(r);
4283
- continue;
4284
- }
4285
- if (r = this.tokenizer.def(e)) {
4286
- e = e.substring(r.raw.length);
4287
- let s = t.at(-1);
4288
- (s == null ? void 0 : s.type) === "paragraph" || (s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
4289
- `) ? "" : `
4290
- `) + r.raw, s.text += `
4291
- ` + r.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = { href: r.href, title: r.title }, t.push(r));
4292
- continue;
4293
- }
4294
- if (r = this.tokenizer.table(e)) {
4295
- e = e.substring(r.raw.length), t.push(r);
4296
- continue;
4297
- }
4298
- if (r = this.tokenizer.lheading(e)) {
4299
- e = e.substring(r.raw.length), t.push(r);
4300
- continue;
4301
- }
4302
- let i = e;
4303
- if ((_c = this.options.extensions) == null ? void 0 : _c.startBlock) {
4304
- let s = 1 / 0, a = e.slice(1), o;
4305
- this.options.extensions.startBlock.forEach((l) => {
4306
- o = l.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
4307
- }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
4308
- }
4309
- if (this.state.top && (r = this.tokenizer.paragraph(i))) {
4310
- let s = t.at(-1);
4311
- n && (s == null ? void 0 : s.type) === "paragraph" ? (s.raw += (s.raw.endsWith(`
4312
- `) ? "" : `
4313
- `) + r.raw, s.text += `
4314
- ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
4315
- continue;
4316
- }
4317
- if (r = this.tokenizer.text(e)) {
4318
- e = e.substring(r.raw.length);
4319
- let s = t.at(-1);
4320
- (s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
4321
- `) ? "" : `
4322
- `) + r.raw, s.text += `
4323
- ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r);
4324
- continue;
4325
- }
4326
- if (e) {
4327
- let s = "Infinite loop on byte: " + e.charCodeAt(0);
4328
- if (this.options.silent) {
4329
- console.error(s);
4330
- break;
4331
- } else throw new Error(s);
4332
- }
4333
- }
4334
- return this.state.top = true, t;
4335
- }
4336
- inline(e, t = []) {
4337
- return this.inlineQueue.push({ src: e, tokens: t }), t;
4338
- }
4339
- inlineTokens(e, t = []) {
4340
- var _a3, _b, _c, _d, _e2, _f;
4341
- let n = e, r = null;
4342
- if (this.tokens.links) {
4343
- let o = Object.keys(this.tokens.links);
4344
- if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
4345
- }
4346
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
4347
- let i;
4348
- for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
4349
- n = (_c = (_b = (_a3 = this.options.hooks) == null ? void 0 : _a3.emStrongMask) == null ? void 0 : _b.call({ lexer: this }, n)) != null ? _c : n;
4350
- let s = false, a = "";
4351
- for (; e; ) {
4352
- s || (a = ""), s = false;
4353
- let o;
4354
- if ((_e2 = (_d = this.options.extensions) == null ? void 0 : _d.inline) == null ? void 0 : _e2.some((p) => (o = p.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
4355
- if (o = this.tokenizer.escape(e)) {
4356
- e = e.substring(o.raw.length), t.push(o);
4357
- continue;
4358
- }
4359
- if (o = this.tokenizer.tag(e)) {
4360
- e = e.substring(o.raw.length), t.push(o);
4361
- continue;
4362
- }
4363
- if (o = this.tokenizer.link(e)) {
4364
- e = e.substring(o.raw.length), t.push(o);
4365
- continue;
4366
- }
4367
- if (o = this.tokenizer.reflink(e, this.tokens.links)) {
4368
- e = e.substring(o.raw.length);
4369
- let p = t.at(-1);
4370
- o.type === "text" && (p == null ? void 0 : p.type) === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
4371
- continue;
4372
- }
4373
- if (o = this.tokenizer.emStrong(e, n, a)) {
4374
- e = e.substring(o.raw.length), t.push(o);
4375
- continue;
4376
- }
4377
- if (o = this.tokenizer.codespan(e)) {
4378
- e = e.substring(o.raw.length), t.push(o);
4379
- continue;
4380
- }
4381
- if (o = this.tokenizer.br(e)) {
4382
- e = e.substring(o.raw.length), t.push(o);
4383
- continue;
4384
- }
4385
- if (o = this.tokenizer.del(e, n, a)) {
4386
- e = e.substring(o.raw.length), t.push(o);
4387
- continue;
4388
- }
4389
- if (o = this.tokenizer.autolink(e)) {
4390
- e = e.substring(o.raw.length), t.push(o);
4391
- continue;
4392
- }
4393
- if (!this.state.inLink && (o = this.tokenizer.url(e))) {
4394
- e = e.substring(o.raw.length), t.push(o);
4395
- continue;
4396
- }
4397
- let l = e;
4398
- if ((_f = this.options.extensions) == null ? void 0 : _f.startInline) {
4399
- let p = 1 / 0, c = e.slice(1), d;
4400
- this.options.extensions.startInline.forEach((h) => {
4401
- d = h.call({ lexer: this }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
4402
- }), p < 1 / 0 && p >= 0 && (l = e.substring(0, p + 1));
4403
- }
4404
- if (o = this.tokenizer.inlineText(l)) {
4405
- e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
4406
- let p = t.at(-1);
4407
- (p == null ? void 0 : p.type) === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
4408
- continue;
4409
- }
4410
- if (e) {
4411
- let p = "Infinite loop on byte: " + e.charCodeAt(0);
4412
- if (this.options.silent) {
4413
- console.error(p);
4414
- break;
4415
- } else throw new Error(p);
4416
- }
4417
- }
4418
- return t;
4419
- }
3726
+ // ../adaptives/adaptive-faq/dist/chunk-S6WIENQP.js
3727
+ var base2 = {
3728
+ white: "#ffffff",
3729
+ black: "#000000"
4420
3730
  };
4421
- var y = class {
4422
- constructor(e) {
4423
- __publicField(this, "options");
4424
- __publicField(this, "parser");
4425
- this.options = e || T;
4426
- }
4427
- space(e) {
4428
- return "";
4429
- }
4430
- code({ text: e, lang: t, escaped: n }) {
4431
- var _a3;
4432
- let r = (_a3 = (t || "").match(m.notSpaceStart)) == null ? void 0 : _a3[0], i = e.replace(m.endingNewline, "") + `
4433
- `;
4434
- return r ? '<pre><code class="language-' + O(r) + '">' + (n ? i : O(i, true)) + `</code></pre>
4435
- ` : "<pre><code>" + (n ? i : O(i, true)) + `</code></pre>
4436
- `;
4437
- }
4438
- blockquote({ tokens: e }) {
4439
- return `<blockquote>
4440
- ${this.parser.parse(e)}</blockquote>
4441
- `;
4442
- }
4443
- html({ text: e }) {
4444
- return e;
4445
- }
4446
- def(e) {
4447
- return "";
4448
- }
4449
- heading({ tokens: e, depth: t }) {
4450
- return `<h${t}>${this.parser.parseInline(e)}</h${t}>
4451
- `;
4452
- }
4453
- hr(e) {
4454
- return `<hr>
4455
- `;
4456
- }
4457
- list(e) {
4458
- let t = e.ordered, n = e.start, r = "";
4459
- for (let a = 0; a < e.items.length; a++) {
4460
- let o = e.items[a];
4461
- r += this.listitem(o);
4462
- }
4463
- let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
4464
- return "<" + i + s + `>
4465
- ` + r + "</" + i + `>
4466
- `;
4467
- }
4468
- listitem(e) {
4469
- return `<li>${this.parser.parse(e.tokens)}</li>
4470
- `;
4471
- }
4472
- checkbox({ checked: e }) {
4473
- return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox"> ';
4474
- }
4475
- paragraph({ tokens: e }) {
4476
- return `<p>${this.parser.parseInline(e)}</p>
4477
- `;
4478
- }
4479
- table(e) {
4480
- let t = "", n = "";
4481
- for (let i = 0; i < e.header.length; i++) n += this.tablecell(e.header[i]);
4482
- t += this.tablerow({ text: n });
4483
- let r = "";
4484
- for (let i = 0; i < e.rows.length; i++) {
4485
- let s = e.rows[i];
4486
- n = "";
4487
- for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
4488
- r += this.tablerow({ text: n });
4489
- }
4490
- return r && (r = `<tbody>${r}</tbody>`), `<table>
4491
- <thead>
4492
- ` + t + `</thead>
4493
- ` + r + `</table>
4494
- `;
4495
- }
4496
- tablerow({ text: e }) {
4497
- return `<tr>
4498
- ${e}</tr>
4499
- `;
4500
- }
4501
- tablecell(e) {
4502
- let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
4503
- return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
4504
- `;
4505
- }
4506
- strong({ tokens: e }) {
4507
- return `<strong>${this.parser.parseInline(e)}</strong>`;
4508
- }
4509
- em({ tokens: e }) {
4510
- return `<em>${this.parser.parseInline(e)}</em>`;
4511
- }
4512
- codespan({ text: e }) {
4513
- return `<code>${O(e, true)}</code>`;
4514
- }
4515
- br(e) {
4516
- return "<br>";
4517
- }
4518
- del({ tokens: e }) {
4519
- return `<del>${this.parser.parseInline(e)}</del>`;
4520
- }
4521
- link({ href: e, title: t, tokens: n }) {
4522
- let r = this.parser.parseInline(n), i = X(e);
4523
- if (i === null) return r;
4524
- e = i;
4525
- let s = '<a href="' + e + '"';
4526
- return t && (s += ' title="' + O(t) + '"'), s += ">" + r + "</a>", s;
4527
- }
4528
- image({ href: e, title: t, text: n, tokens: r }) {
4529
- r && (n = this.parser.parseInline(r, this.parser.textRenderer));
4530
- let i = X(e);
4531
- if (i === null) return O(n);
4532
- e = i;
4533
- let s = `<img src="${e}" alt="${O(n)}"`;
4534
- return t && (s += ` title="${O(t)}"`), s += ">", s;
4535
- }
4536
- text(e) {
4537
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : O(e.text);
4538
- }
3731
+ var brand2 = {
3732
+ 0: "#2c0b0a",
3733
+ 1: "#5b1715",
3734
+ 2: "#89221f",
3735
+ 3: "#b72e2a",
3736
+ 4: "#d44844",
3737
+ 5: "#dd6d69",
3738
+ 6: "#e5918f",
3739
+ 7: "#eeb6b4",
3740
+ 8: "#f6dada",
3741
+ 9: "#faebea"
3742
+ };
3743
+ var slateGrey2 = {
3744
+ 0: "#07080a",
3745
+ 1: "#0f1318",
3746
+ 2: "#0e1114",
3747
+ 3: "#1c222a",
3748
+ 4: "#2b333f",
3749
+ 5: "#394454",
3750
+ 6: "#475569",
3751
+ 7: "#677384",
3752
+ 8: "#87919f",
3753
+ 9: "#a8afba",
3754
+ 10: "#cbd0d7",
3755
+ 11: "#e8eaee",
3756
+ 12: "#f6f7f9"
3757
+ };
3758
+ var green2 = {
3759
+ 0: "#07230a",
3760
+ 1: "#0e4514",
3761
+ 2: "#16681e",
3762
+ 3: "#1d8a28",
3763
+ 4: "#24ad32",
3764
+ 5: "#4fbd5a",
3765
+ 6: "#7acd82",
3766
+ 7: "#a5deab",
3767
+ 8: "#d0eed3",
3768
+ 9: "#e5f6e7"
4539
3769
  };
4540
- var $ = class {
4541
- strong({ text: e }) {
4542
- return e;
3770
+ var yellow2 = {
3771
+ 0: "#301f09",
3772
+ 1: "#5f3e12",
3773
+ 2: "#8f5e1b",
3774
+ 3: "#be7d24",
3775
+ 4: "#ee9c2d",
3776
+ 5: "#f1b057",
3777
+ 6: "#f5c481",
3778
+ 7: "#f8d7ab",
3779
+ 8: "#fcebd5",
3780
+ 9: "#fdf5ea"
3781
+ };
3782
+ var red2 = {
3783
+ 0: "#330707",
3784
+ 1: "#660f0e",
3785
+ 2: "#991616",
3786
+ 3: "#cc1e1d",
3787
+ 4: "#ff2524",
3788
+ 5: "#ff5150",
3789
+ 6: "#ff7c7c",
3790
+ 7: "#ffa8a7",
3791
+ 8: "#ffd3d3",
3792
+ 9: "#ffe9e9"
3793
+ };
3794
+ var blue2 = {
3795
+ 0: "#051533",
3796
+ 1: "#0a2a66",
3797
+ 2: "#0f3f98",
3798
+ 3: "#1454cb",
3799
+ 4: "#1969fe",
3800
+ 5: "#4787fe",
3801
+ 6: "#75a5fe",
3802
+ 7: "#a3c3ff",
3803
+ 8: "#d1e1ff",
3804
+ 9: "#e8f0ff"
3805
+ };
3806
+ var orange2 = {
3807
+ 0: "#662500",
3808
+ 1: "#993d00",
3809
+ 2: "#cc5800",
3810
+ 3: "#ff7700",
3811
+ 4: "#fea85d",
3812
+ 5: "#fec58f",
3813
+ 6: "#ffd6ae",
3814
+ 7: "#fee6cd",
3815
+ 8: "#fff1e1",
3816
+ 9: "#fff8f0"
3817
+ };
3818
+ var purple2 = {
3819
+ 0: "#151229",
3820
+ 1: "#2a2452",
3821
+ 2: "#40357c",
3822
+ 3: "#5547a5",
3823
+ 4: "#6a59ce",
3824
+ 5: "#887ad8",
3825
+ 6: "#a69be2",
3826
+ 7: "#c3bdeb",
3827
+ 8: "#e1def5",
3828
+ 9: "#f0eefa"
3829
+ };
3830
+ var pink2 = {
3831
+ 0: "#37091f",
3832
+ 1: "#69123c",
3833
+ 2: "#9b1c58",
3834
+ 3: "#cd2575",
3835
+ 4: "#ff2e92",
3836
+ 5: "#ff58a8",
3837
+ 6: "#ff82be",
3838
+ 7: "#ffabd3",
3839
+ 8: "#ffd5e9",
3840
+ 9: "#ffeaf4"
3841
+ };
3842
+ var text2 = {
3843
+ primary: slateGrey2[10],
3844
+ secondary: slateGrey2[9],
3845
+ tertiary: slateGrey2[8]
3846
+ };
3847
+ var background2 = {
3848
+ primary: slateGrey2[2],
3849
+ secondary: slateGrey2[0]
3850
+ };
3851
+ var border2 = {
3852
+ primary: slateGrey2[4],
3853
+ secondary: slateGrey2[3]
3854
+ };
3855
+ var button2 = {
3856
+ primary: {
3857
+ text: base2.white,
3858
+ icon: base2.white,
3859
+ border: brand2[3],
3860
+ backgroundDefault: brand2[3],
3861
+ backgroundHover: brand2[2]
3862
+ },
3863
+ neutral: {
3864
+ text: slateGrey2[10],
3865
+ textHover: base2.white,
3866
+ icon: slateGrey2[10],
3867
+ iconHover: base2.white,
3868
+ border: slateGrey2[4],
3869
+ background: slateGrey2[2]
3870
+ },
3871
+ link: {
3872
+ text: base2.white,
3873
+ icon: base2.white,
3874
+ hover: brand2[5]
3875
+ },
3876
+ error: {
3877
+ text: red2[5],
3878
+ hover: red2[6]
3879
+ },
3880
+ success: {
3881
+ text: green2[5],
3882
+ hover: green2[6]
4543
3883
  }
4544
- em({ text: e }) {
4545
- return e;
3884
+ };
3885
+ var badge2 = {
3886
+ slateGrey: {
3887
+ content: slateGrey2[10],
3888
+ pillOutline: slateGrey2[10],
3889
+ borderPrimary: slateGrey2[5],
3890
+ borderSecondary: slateGrey2[5],
3891
+ background: slateGrey2[3]
3892
+ },
3893
+ brand: {
3894
+ content: brand2[9],
3895
+ pillOutline: brand2[9],
3896
+ borderPrimary: brand2[6],
3897
+ borderSecondary: brand2[6],
3898
+ background: brand2[0]
3899
+ },
3900
+ red: {
3901
+ content: red2[8],
3902
+ pillOutline: red2[4],
3903
+ borderPrimary: red2[2],
3904
+ borderSecondary: red2[2],
3905
+ background: red2[0]
3906
+ },
3907
+ yellow: {
3908
+ content: yellow2[8],
3909
+ pillOutline: yellow2[4],
3910
+ borderPrimary: yellow2[2],
3911
+ borderSecondary: yellow2[2],
3912
+ background: yellow2[0]
3913
+ },
3914
+ green: {
3915
+ content: green2[8],
3916
+ pillOutline: green2[4],
3917
+ borderPrimary: green2[2],
3918
+ borderSecondary: green2[2],
3919
+ background: green2[0]
3920
+ },
3921
+ purple: {
3922
+ content: purple2[8],
3923
+ pillOutline: purple2[4],
3924
+ borderPrimary: purple2[2],
3925
+ borderSecondary: purple2[2],
3926
+ background: purple2[0]
3927
+ },
3928
+ blue: {
3929
+ content: blue2[8],
3930
+ pillOutline: blue2[4],
3931
+ borderPrimary: blue2[2],
3932
+ borderSecondary: blue2[2],
3933
+ background: blue2[0]
3934
+ },
3935
+ orange: {
3936
+ content: orange2[8],
3937
+ pillOutline: orange2[4],
3938
+ borderPrimary: orange2[2],
3939
+ borderSecondary: orange2[2],
3940
+ background: orange2[0]
3941
+ },
3942
+ pink: {
3943
+ content: pink2[8],
3944
+ pillOutline: pink2[4],
3945
+ borderPrimary: pink2[2],
3946
+ borderSecondary: pink2[2],
3947
+ background: pink2[0]
4546
3948
  }
4547
- codespan({ text: e }) {
4548
- return e;
3949
+ };
3950
+ var badgeBanner2 = {
3951
+ green: {
3952
+ content: green2[8],
3953
+ border: green2[2],
3954
+ background: green2[0]
3955
+ },
3956
+ yellow: {
3957
+ content: yellow2[8],
3958
+ border: yellow2[2],
3959
+ background: yellow2[0]
3960
+ },
3961
+ red: {
3962
+ content: red2[8],
3963
+ border: red2[2],
3964
+ background: red2[0]
4549
3965
  }
4550
- del({ text: e }) {
4551
- return e;
3966
+ };
3967
+ var alert2 = {
3968
+ green: {
3969
+ content: green2[1],
3970
+ background: green2[9]
3971
+ },
3972
+ yellow: {
3973
+ content: yellow2[1],
3974
+ background: yellow2[9]
3975
+ },
3976
+ red: {
3977
+ content: red2[1],
3978
+ background: red2[9]
4552
3979
  }
4553
- html({ text: e }) {
4554
- return e;
3980
+ };
3981
+ var tag2 = {
3982
+ content: slateGrey2[10],
3983
+ border: slateGrey2[4],
3984
+ background: slateGrey2[3]
3985
+ };
3986
+ var menu2 = {
3987
+ backgroundDefault: slateGrey2[2],
3988
+ backgroundHover: slateGrey2[1],
3989
+ selected: slateGrey2[3]
3990
+ };
3991
+ var inputDropdown2 = {
3992
+ background: slateGrey2[2],
3993
+ icon: slateGrey2[10],
3994
+ borderDefault: slateGrey2[4],
3995
+ borderSelected: brand2[3],
3996
+ textLabel: slateGrey2[9],
3997
+ textPlaceholder: slateGrey2[8],
3998
+ textHint: slateGrey2[8]
3999
+ };
4000
+ var inputField2 = {
4001
+ backgroundDefault: slateGrey2[2],
4002
+ backgroundDisabled: slateGrey2[0],
4003
+ textLabel: slateGrey2[9],
4004
+ textPlaceholder: slateGrey2[8],
4005
+ textHint: slateGrey2[8],
4006
+ textError: red2[5],
4007
+ iconDefault: slateGrey2[9],
4008
+ iconPlaceholder: slateGrey2[10],
4009
+ iconError: red2[5],
4010
+ borderDefault: slateGrey2[4],
4011
+ borderSelected: brand2[3],
4012
+ borderError: red2[5]
4013
+ };
4014
+ var toggle2 = {
4015
+ handleDefault: base2.white,
4016
+ handleDisabled: slateGrey2[10],
4017
+ off: {
4018
+ backgroundDefault: slateGrey2[4],
4019
+ backgroundHover: slateGrey2[5],
4020
+ backgroundDisabled: slateGrey2[4]
4021
+ },
4022
+ on: {
4023
+ backgroundDefault: green2[3],
4024
+ backgroundHover: green2[2],
4025
+ backgroundDisabled: slateGrey2[4]
4555
4026
  }
4556
- text({ text: e }) {
4557
- return e;
4027
+ };
4028
+ var checkbox2 = {
4029
+ off: {
4030
+ backgroundDefault: "#00000000",
4031
+ backgroundHover: slateGrey2[5],
4032
+ backgroundDisabled: slateGrey2[2],
4033
+ border: slateGrey2[6]
4034
+ },
4035
+ on: {
4036
+ backgroundDefault: green2[0],
4037
+ backgroundHover: green2[1],
4038
+ backgroundDisabled: slateGrey2[2],
4039
+ border: green2[3]
4558
4040
  }
4559
- link({ text: e }) {
4560
- return "" + e;
4041
+ };
4042
+ var avatar2 = {
4043
+ content: slateGrey2[10],
4044
+ background: slateGrey2[4]
4045
+ };
4046
+ var progressBarSlider2 = {
4047
+ background: slateGrey2[4],
4048
+ active: green2[3]
4049
+ };
4050
+ var card2 = {
4051
+ background: slateGrey2[1],
4052
+ content: slateGrey2[9],
4053
+ border: slateGrey2[4]
4054
+ };
4055
+ var sidebar2 = {
4056
+ backgroundDefault: slateGrey2[1],
4057
+ backgroundHover: slateGrey2[3],
4058
+ backgroundActive: slateGrey2[4],
4059
+ border: slateGrey2[4],
4060
+ contentPrimary: slateGrey2[10],
4061
+ contentSecondary: slateGrey2[9],
4062
+ contentTertiary: slateGrey2[8]
4063
+ };
4064
+ var modal2 = {
4065
+ background: slateGrey2[1],
4066
+ content: slateGrey2[9],
4067
+ border: slateGrey2[4]
4068
+ };
4069
+ var tab2 = {
4070
+ activeBackground: slateGrey2[3],
4071
+ activeContent: brand2[5],
4072
+ inactiveContent: slateGrey2[9],
4073
+ border: slateGrey2[4]
4074
+ };
4075
+ var table2 = {
4076
+ header: {
4077
+ textDefault: slateGrey2[9],
4078
+ textHover: slateGrey2[8],
4079
+ backgroundDefault: slateGrey2[1]
4080
+ },
4081
+ border: slateGrey2[4],
4082
+ cell: {
4083
+ textPrimary: slateGrey2[10],
4084
+ textSecondary: slateGrey2[9],
4085
+ backgroundDefault: slateGrey2[2],
4086
+ backgroundHover: slateGrey2[1]
4561
4087
  }
4562
- image({ text: e }) {
4563
- return "" + e;
4088
+ };
4089
+ var breadcrumbs2 = {
4090
+ textPrimaryDefault: slateGrey2[10],
4091
+ textPrimaryHover: slateGrey2[10],
4092
+ textSecondaryDefault: slateGrey2[8],
4093
+ textSecondaryHover: slateGrey2[9],
4094
+ iconPrimary: slateGrey2[10],
4095
+ iconSecondary: slateGrey2[8]
4096
+ };
4097
+ var loadingIndicator2 = {
4098
+ background: green2[1],
4099
+ active: green2[5]
4100
+ };
4101
+ var datePicker2 = {
4102
+ textDefault: slateGrey2[10],
4103
+ textSelected: base2.white,
4104
+ textDisabled: slateGrey2[7],
4105
+ backgroundDefault: slateGrey2[2],
4106
+ backgroundMiddle: slateGrey2[3],
4107
+ backgroundSelected: brand2[3],
4108
+ border: slateGrey2[4]
4109
+ };
4110
+ var scroll2 = slateGrey2[9];
4111
+ var fab2 = {
4112
+ /** Diameter in pixels. */
4113
+ size: 56,
4114
+ /** Inset from the panel's top-left corner in pixels. */
4115
+ inset: 12,
4116
+ /** Background color (always the brand black). */
4117
+ background: base2.black,
4118
+ /** Icon / logo color. */
4119
+ color: base2.white,
4120
+ /** Border — 2px brand red ring. */
4121
+ border: `2px solid ${brand2[3]}`,
4122
+ /** Shadow when the panel is open (inner ring for "active" state). */
4123
+ shadowOpen: "0 4px 24px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.08)",
4124
+ /** Shadow when the panel is closed. */
4125
+ shadowClosed: "0 4px 24px rgba(0,0,0,0.6)"
4126
+ };
4127
+
4128
+ // ../adaptives/adaptive-faq/dist/runtime.js
4129
+ import { html as html2, LitElement as LitElement2, nothing as nothing2 } from "lit";
4130
+ import { styleMap as styleMap2 } from "lit/directives/style-map.js";
4131
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
4132
+
4133
+ // ../../node_modules/marked/lib/marked.esm.js
4134
+ function M() {
4135
+ return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
4136
+ }
4137
+ var T = M();
4138
+ function G(u3) {
4139
+ T = u3;
4140
+ }
4141
+ var _ = { exec: () => null };
4142
+ function k(u3, e = "") {
4143
+ let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
4144
+ let s = typeof i == "string" ? i : i.source;
4145
+ return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
4146
+ }, getRegex: () => new RegExp(t, e) };
4147
+ return n;
4148
+ }
4149
+ var Re = (() => {
4150
+ try {
4151
+ return !!new RegExp("(?<=1)(?<!1)");
4152
+ } catch {
4153
+ return false;
4564
4154
  }
4565
- br() {
4566
- return "";
4155
+ })();
4156
+ var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}>`) };
4157
+ var Te = /^(?:[ \t]*(?:\n|$))+/;
4158
+ var Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
4159
+ var we = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
4160
+ var A = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
4161
+ var ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
4162
+ var N = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
4163
+ var re = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
4164
+ var se = k(re).replace(/bull/g, N).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
4165
+ var Pe = k(re).replace(/bull/g, N).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
4166
+ var Q = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
4167
+ var Se = /^[^\n]+/;
4168
+ var j = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
4169
+ var $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", j).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
4170
+ var _e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, N).getRegex();
4171
+ var q = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
4172
+ var F = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
4173
+ var Le = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", F).replace("tag", q).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
4174
+ var ie = k(Q).replace("hr", A).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", q).getRegex();
4175
+ var Me = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ie).getRegex();
4176
+ var U = { blockquote: Me, code: Oe, def: $e, fences: we, heading: ye, hr: A, html: Le, lheading: se, list: _e, newline: Te, paragraph: ie, table: _, text: Se };
4177
+ var te = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", A).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", q).getRegex();
4178
+ var ze = { ...U, lheading: Pe, table: te, paragraph: k(Q).replace("hr", A).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", te).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", q).getRegex() };
4179
+ var Ee = { ...U, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", F).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(Q).replace("hr", A).replace("heading", ` *#{1,6} *[^
4180
+ ]`).replace("lheading", se).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
4181
+ var Ie = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
4182
+ var Ae = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
4183
+ var oe = /^( {2,}|\\)\n(?!\s*$)/;
4184
+ var Ce = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
4185
+ var v = /[\p{P}\p{S}]/u;
4186
+ var K = /[\s\p{P}\p{S}]/u;
4187
+ var ae = /[^\s\p{P}\p{S}]/u;
4188
+ var Be = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, K).getRegex();
4189
+ var le = /(?!~)[\p{P}\p{S}]/u;
4190
+ var De = /(?!~)[\s\p{P}\p{S}]/u;
4191
+ var qe = /(?:[^\s\p{P}\p{S}]|~)/u;
4192
+ var ue = /(?![*_])[\p{P}\p{S}]/u;
4193
+ var ve = /(?![*_])[\s\p{P}\p{S}]/u;
4194
+ var He = /(?:[^\s\p{P}\p{S}]|[*_])/u;
4195
+ var Ge = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Re ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
4196
+ var pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
4197
+ var Ze = k(pe, "u").replace(/punct/g, v).getRegex();
4198
+ var Ne = k(pe, "u").replace(/punct/g, le).getRegex();
4199
+ var ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
4200
+ var Qe = k(ce, "gu").replace(/notPunctSpace/g, ae).replace(/punctSpace/g, K).replace(/punct/g, v).getRegex();
4201
+ var je = k(ce, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, De).replace(/punct/g, le).getRegex();
4202
+ var Fe = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ae).replace(/punctSpace/g, K).replace(/punct/g, v).getRegex();
4203
+ var Ue = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ue).getRegex();
4204
+ var Ke = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
4205
+ var We = k(Ke, "gu").replace(/notPunctSpace/g, He).replace(/punctSpace/g, ve).replace(/punct/g, ue).getRegex();
4206
+ var Xe = k(/\\(punct)/, "gu").replace(/punct/g, v).getRegex();
4207
+ var Je = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
4208
+ var Ve = k(F).replace("(?:-->|$)", "-->").getRegex();
4209
+ var Ye = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ve).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
4210
+ var D = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/;
4211
+ var et = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", D).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
4212
+ var he = k(/^!?\[(label)\]\[(ref)\]/).replace("label", D).replace("ref", j).getRegex();
4213
+ var ke = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", j).getRegex();
4214
+ var tt = k("reflink|nolink(?!\\()", "g").replace("reflink", he).replace("nolink", ke).getRegex();
4215
+ var ne = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
4216
+ var W = { _backpedal: _, anyPunctuation: Xe, autolink: Je, blockSkip: Ge, br: oe, code: Ae, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: Ze, emStrongRDelimAst: Qe, emStrongRDelimUnd: Fe, escape: Ie, link: et, nolink: ke, punctuation: Be, reflink: he, reflinkSearch: tt, tag: Ye, text: Ce, url: _ };
4217
+ var nt = { ...W, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", D).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", D).getRegex() };
4218
+ var Z = { ...W, emStrongRDelimAst: je, emStrongLDelim: Ne, delLDelim: Ue, delRDelim: We, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ne).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ne).getRegex() };
4219
+ var rt = { ...Z, br: k(oe).replace("{2,}", "*").getRegex(), text: k(Z.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
4220
+ var C = { normal: U, gfm: ze, pedantic: Ee };
4221
+ var z = { normal: W, gfm: Z, breaks: rt, pedantic: nt };
4222
+ var st = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
4223
+ var de = (u3) => st[u3];
4224
+ function O(u3, e) {
4225
+ if (e) {
4226
+ if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, de);
4227
+ } else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, de);
4228
+ return u3;
4229
+ }
4230
+ function X(u3) {
4231
+ try {
4232
+ u3 = encodeURI(u3).replace(m.percentDecode, "%");
4233
+ } catch {
4234
+ return null;
4567
4235
  }
4568
- checkbox({ raw: e }) {
4569
- return e;
4236
+ return u3;
4237
+ }
4238
+ function J(u3, e) {
4239
+ var _a3;
4240
+ let t = u3.replace(m.findPipe, (i, s, a) => {
4241
+ let o = false, l = s;
4242
+ for (; --l >= 0 && a[l] === "\\"; ) o = !o;
4243
+ return o ? "|" : " |";
4244
+ }), n = t.split(m.splitPipe), r = 0;
4245
+ if (n[0].trim() || n.shift(), n.length > 0 && !((_a3 = n.at(-1)) == null ? void 0 : _a3.trim()) && n.pop(), e) if (n.length > e) n.splice(e);
4246
+ else for (; n.length < e; ) n.push("");
4247
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
4248
+ return n;
4249
+ }
4250
+ function E(u3, e, t) {
4251
+ let n = u3.length;
4252
+ if (n === 0) return "";
4253
+ let r = 0;
4254
+ for (; r < n; ) {
4255
+ let i = u3.charAt(n - r - 1);
4256
+ if (i === e && !t) r++;
4257
+ else if (i !== e && t) r++;
4258
+ else break;
4570
4259
  }
4571
- };
4572
- var b = class u2 {
4260
+ return u3.slice(0, n - r);
4261
+ }
4262
+ function ge(u3, e) {
4263
+ if (u3.indexOf(e[1]) === -1) return -1;
4264
+ let t = 0;
4265
+ for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
4266
+ else if (u3[n] === e[0]) t++;
4267
+ else if (u3[n] === e[1] && (t--, t < 0)) return n;
4268
+ return t > 0 ? -2 : -1;
4269
+ }
4270
+ function fe(u3, e = 0) {
4271
+ let t = e, n = "";
4272
+ for (let r of u3) if (r === " ") {
4273
+ let i = 4 - t % 4;
4274
+ n += " ".repeat(i), t += i;
4275
+ } else n += r, t++;
4276
+ return n;
4277
+ }
4278
+ function me(u3, e, t, n, r) {
4279
+ let i = e.href, s = e.title || null, a = u3[1].replace(r.other.outputLinkReplace, "$1");
4280
+ n.state.inLink = true;
4281
+ let o = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
4282
+ return n.state.inLink = false, o;
4283
+ }
4284
+ function it(u3, e, t) {
4285
+ let n = u3.match(t.other.indentCodeCompensation);
4286
+ if (n === null) return e;
4287
+ let r = n[1];
4288
+ return e.split(`
4289
+ `).map((i) => {
4290
+ let s = i.match(t.other.beginningSpace);
4291
+ if (s === null) return i;
4292
+ let [a] = s;
4293
+ return a.length >= r.length ? i.slice(r.length) : i;
4294
+ }).join(`
4295
+ `);
4296
+ }
4297
+ var w = class {
4573
4298
  constructor(e) {
4574
4299
  __publicField(this, "options");
4575
- __publicField(this, "renderer");
4576
- __publicField(this, "textRenderer");
4577
- this.options = e || T, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
4300
+ __publicField(this, "rules");
4301
+ __publicField(this, "lexer");
4302
+ this.options = e || T;
4578
4303
  }
4579
- static parse(e, t) {
4580
- return new u2(t).parse(e);
4304
+ space(e) {
4305
+ let t = this.rules.block.newline.exec(e);
4306
+ if (t && t[0].length > 0) return { type: "space", raw: t[0] };
4581
4307
  }
4582
- static parseInline(e, t) {
4583
- return new u2(t).parseInline(e);
4308
+ code(e) {
4309
+ let t = this.rules.block.code.exec(e);
4310
+ if (t) {
4311
+ let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
4312
+ return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : E(n, `
4313
+ `) };
4314
+ }
4584
4315
  }
4585
- parse(e) {
4586
- var _a3, _b;
4587
- let t = "";
4588
- for (let n = 0; n < e.length; n++) {
4589
- let r = e[n];
4590
- if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.renderers) == null ? void 0 : _b[r.type]) {
4591
- let s = r, a = this.options.extensions.renderers[s.type].call({ parser: this }, s);
4592
- if (a !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(s.type)) {
4593
- t += a || "";
4594
- continue;
4595
- }
4316
+ fences(e) {
4317
+ let t = this.rules.block.fences.exec(e);
4318
+ if (t) {
4319
+ let n = t[0], r = it(n, t[3] || "", this.rules);
4320
+ return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
4321
+ }
4322
+ }
4323
+ heading(e) {
4324
+ let t = this.rules.block.heading.exec(e);
4325
+ if (t) {
4326
+ let n = t[2].trim();
4327
+ if (this.rules.other.endingHash.test(n)) {
4328
+ let r = E(n, "#");
4329
+ (this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
4596
4330
  }
4597
- let i = r;
4598
- switch (i.type) {
4599
- case "space": {
4600
- t += this.renderer.space(i);
4601
- break;
4602
- }
4603
- case "hr": {
4604
- t += this.renderer.hr(i);
4605
- break;
4606
- }
4607
- case "heading": {
4608
- t += this.renderer.heading(i);
4609
- break;
4610
- }
4611
- case "code": {
4612
- t += this.renderer.code(i);
4613
- break;
4614
- }
4615
- case "table": {
4616
- t += this.renderer.table(i);
4617
- break;
4618
- }
4619
- case "blockquote": {
4620
- t += this.renderer.blockquote(i);
4621
- break;
4622
- }
4623
- case "list": {
4624
- t += this.renderer.list(i);
4625
- break;
4626
- }
4627
- case "checkbox": {
4628
- t += this.renderer.checkbox(i);
4629
- break;
4630
- }
4631
- case "html": {
4632
- t += this.renderer.html(i);
4633
- break;
4634
- }
4635
- case "def": {
4636
- t += this.renderer.def(i);
4637
- break;
4638
- }
4639
- case "paragraph": {
4640
- t += this.renderer.paragraph(i);
4641
- break;
4642
- }
4643
- case "text": {
4644
- t += this.renderer.text(i);
4331
+ return { type: "heading", raw: t[0], depth: t[1].length, text: n, tokens: this.lexer.inline(n) };
4332
+ }
4333
+ }
4334
+ hr(e) {
4335
+ let t = this.rules.block.hr.exec(e);
4336
+ if (t) return { type: "hr", raw: E(t[0], `
4337
+ `) };
4338
+ }
4339
+ blockquote(e) {
4340
+ let t = this.rules.block.blockquote.exec(e);
4341
+ if (t) {
4342
+ let n = E(t[0], `
4343
+ `).split(`
4344
+ `), r = "", i = "", s = [];
4345
+ for (; n.length > 0; ) {
4346
+ let a = false, o = [], l;
4347
+ for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) o.push(n[l]), a = true;
4348
+ else if (!a) o.push(n[l]);
4349
+ else break;
4350
+ n = n.slice(l);
4351
+ let p = o.join(`
4352
+ `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
4353
+ $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
4354
+ r = r ? `${r}
4355
+ ${p}` : p, i = i ? `${i}
4356
+ ${c}` : c;
4357
+ let d = this.lexer.state.top;
4358
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = d, n.length === 0) break;
4359
+ let h = s.at(-1);
4360
+ if ((h == null ? void 0 : h.type) === "code") break;
4361
+ if ((h == null ? void 0 : h.type) === "blockquote") {
4362
+ let R = h, f = R.raw + `
4363
+ ` + n.join(`
4364
+ `), S = this.blockquote(f);
4365
+ s[s.length - 1] = S, r = r.substring(0, r.length - R.raw.length) + S.raw, i = i.substring(0, i.length - R.text.length) + S.text;
4645
4366
  break;
4646
- }
4647
- default: {
4648
- let s = 'Token with "' + i.type + '" type was not found.';
4649
- if (this.options.silent) return console.error(s), "";
4650
- throw new Error(s);
4367
+ } else if ((h == null ? void 0 : h.type) === "list") {
4368
+ let R = h, f = R.raw + `
4369
+ ` + n.join(`
4370
+ `), S = this.list(f);
4371
+ s[s.length - 1] = S, r = r.substring(0, r.length - h.raw.length) + S.raw, i = i.substring(0, i.length - R.raw.length) + S.raw, n = f.substring(s.at(-1).raw.length).split(`
4372
+ `);
4373
+ continue;
4651
4374
  }
4652
4375
  }
4376
+ return { type: "blockquote", raw: r, tokens: s, text: i };
4653
4377
  }
4654
- return t;
4655
4378
  }
4656
- parseInline(e, t = this.renderer) {
4379
+ list(e) {
4657
4380
  var _a3, _b;
4658
- let n = "";
4659
- for (let r = 0; r < e.length; r++) {
4660
- let i = e[r];
4661
- if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.renderers) == null ? void 0 : _b[i.type]) {
4662
- let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
4663
- if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
4664
- n += a || "";
4665
- continue;
4381
+ let t = this.rules.block.list.exec(e);
4382
+ if (t) {
4383
+ let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
4384
+ n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
4385
+ let s = this.rules.other.listItemRegex(n), a = false;
4386
+ for (; e; ) {
4387
+ let l = false, p = "", c = "";
4388
+ if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
4389
+ p = t[0], e = e.substring(p.length);
4390
+ let d = fe(t[2].split(`
4391
+ `, 1)[0], t[1].length), h = e.split(`
4392
+ `, 1)[0], R = !d.trim(), f = 0;
4393
+ if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
4394
+ `, e = e.substring(h.length + 1), l = true), !l) {
4395
+ let S = this.rules.other.nextBulletRegex(f), V2 = this.rules.other.hrRegex(f), Y = this.rules.other.fencesBeginRegex(f), ee = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f), be = this.rules.other.blockquoteBeginRegex(f);
4396
+ for (; e; ) {
4397
+ let H = e.split(`
4398
+ `, 1)[0], I;
4399
+ if (h = H, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), I = h) : I = h.replace(this.rules.other.tabCharGlobal, " "), Y.test(h) || ee.test(h) || xe.test(h) || be.test(h) || S.test(h) || V2.test(h)) break;
4400
+ if (I.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
4401
+ ` + I.slice(f);
4402
+ else {
4403
+ if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Y.test(d) || ee.test(d) || V2.test(d)) break;
4404
+ c += `
4405
+ ` + h;
4406
+ }
4407
+ R = !h.trim(), p += H + `
4408
+ `, e = e.substring(H.length + 1), d = I.slice(f);
4409
+ }
4666
4410
  }
4411
+ i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (a = true)), i.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), i.raw += p;
4667
4412
  }
4668
- let s = i;
4669
- switch (s.type) {
4670
- case "escape": {
4671
- n += t.text(s);
4672
- break;
4673
- }
4674
- case "html": {
4675
- n += t.html(s);
4676
- break;
4677
- }
4678
- case "link": {
4679
- n += t.link(s);
4680
- break;
4681
- }
4682
- case "image": {
4683
- n += t.image(s);
4684
- break;
4685
- }
4686
- case "checkbox": {
4687
- n += t.checkbox(s);
4688
- break;
4689
- }
4690
- case "strong": {
4691
- n += t.strong(s);
4692
- break;
4693
- }
4694
- case "em": {
4695
- n += t.em(s);
4696
- break;
4697
- }
4698
- case "codespan": {
4699
- n += t.codespan(s);
4700
- break;
4701
- }
4702
- case "br": {
4703
- n += t.br(s);
4704
- break;
4705
- }
4706
- case "del": {
4707
- n += t.del(s);
4708
- break;
4709
- }
4710
- case "text": {
4711
- n += t.text(s);
4712
- break;
4413
+ let o = i.items.at(-1);
4414
+ if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
4415
+ else return;
4416
+ i.raw = i.raw.trimEnd();
4417
+ for (let l of i.items) {
4418
+ if (this.lexer.state.top = false, l.tokens = this.lexer.blockTokens(l.text, []), l.task) {
4419
+ if (l.text = l.text.replace(this.rules.other.listReplaceTask, ""), ((_a3 = l.tokens[0]) == null ? void 0 : _a3.type) === "text" || ((_b = l.tokens[0]) == null ? void 0 : _b.type) === "paragraph") {
4420
+ l.tokens[0].raw = l.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), l.tokens[0].text = l.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
4421
+ for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
4422
+ this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
4423
+ break;
4424
+ }
4425
+ }
4426
+ let p = this.rules.other.listTaskCheckbox.exec(l.raw);
4427
+ if (p) {
4428
+ let c = { type: "checkbox", raw: p[0] + " ", checked: p[0] !== "[ ]" };
4429
+ l.checked = c.checked, i.loose ? l.tokens[0] && ["paragraph", "text"].includes(l.tokens[0].type) && "tokens" in l.tokens[0] && l.tokens[0].tokens ? (l.tokens[0].raw = c.raw + l.tokens[0].raw, l.tokens[0].text = c.raw + l.tokens[0].text, l.tokens[0].tokens.unshift(c)) : l.tokens.unshift({ type: "paragraph", raw: c.raw, text: c.raw, tokens: [c] }) : l.tokens.unshift(c);
4430
+ }
4713
4431
  }
4714
- default: {
4715
- let a = 'Token with "' + s.type + '" type was not found.';
4716
- if (this.options.silent) return console.error(a), "";
4717
- throw new Error(a);
4432
+ if (!i.loose) {
4433
+ let p = l.tokens.filter((d) => d.type === "space"), c = p.length > 0 && p.some((d) => this.rules.other.anyLine.test(d.raw));
4434
+ i.loose = c;
4718
4435
  }
4719
4436
  }
4437
+ if (i.loose) for (let l of i.items) {
4438
+ l.loose = true;
4439
+ for (let p of l.tokens) p.type === "text" && (p.type = "paragraph");
4440
+ }
4441
+ return i;
4720
4442
  }
4721
- return n;
4722
4443
  }
4723
- };
4724
- var _a2;
4725
- var P = (_a2 = class {
4726
- constructor(e) {
4727
- __publicField(this, "options");
4728
- __publicField(this, "block");
4729
- this.options = e || T;
4444
+ html(e) {
4445
+ let t = this.rules.block.html.exec(e);
4446
+ if (t) return { type: "html", block: true, raw: t[0], pre: t[1] === "pre" || t[1] === "script" || t[1] === "style", text: t[0] };
4730
4447
  }
4731
- preprocess(e) {
4732
- return e;
4448
+ def(e) {
4449
+ let t = this.rules.block.def.exec(e);
4450
+ if (t) {
4451
+ let n = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
4452
+ return { type: "def", tag: n, raw: t[0], href: r, title: i };
4453
+ }
4733
4454
  }
4734
- postprocess(e) {
4735
- return e;
4455
+ table(e) {
4456
+ var _a3;
4457
+ let t = this.rules.block.table.exec(e);
4458
+ if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
4459
+ let n = J(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = ((_a3 = t[3]) == null ? void 0 : _a3.trim()) ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
4460
+ `) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
4461
+ if (n.length === r.length) {
4462
+ for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
4463
+ for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
4464
+ for (let a of i) s.rows.push(J(a, s.header.length).map((o, l) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[l] })));
4465
+ return s;
4466
+ }
4736
4467
  }
4737
- processAllTokens(e) {
4738
- return e;
4468
+ lheading(e) {
4469
+ let t = this.rules.block.lheading.exec(e);
4470
+ if (t) return { type: "heading", raw: t[0], depth: t[2].charAt(0) === "=" ? 1 : 2, text: t[1], tokens: this.lexer.inline(t[1]) };
4739
4471
  }
4740
- emStrongMask(e) {
4741
- return e;
4472
+ paragraph(e) {
4473
+ let t = this.rules.block.paragraph.exec(e);
4474
+ if (t) {
4475
+ let n = t[1].charAt(t[1].length - 1) === `
4476
+ ` ? t[1].slice(0, -1) : t[1];
4477
+ return { type: "paragraph", raw: t[0], text: n, tokens: this.lexer.inline(n) };
4478
+ }
4742
4479
  }
4743
- provideLexer() {
4744
- return this.block ? x.lex : x.lexInline;
4480
+ text(e) {
4481
+ let t = this.rules.block.text.exec(e);
4482
+ if (t) return { type: "text", raw: t[0], text: t[0], tokens: this.lexer.inline(t[0]) };
4745
4483
  }
4746
- provideParser() {
4747
- return this.block ? b.parse : b.parseInline;
4484
+ escape(e) {
4485
+ let t = this.rules.inline.escape.exec(e);
4486
+ if (t) return { type: "escape", raw: t[0], text: t[1] };
4748
4487
  }
4749
- }, __publicField(_a2, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a2, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a2);
4750
- var B = class {
4751
- constructor(...e) {
4752
- __publicField(this, "defaults", M());
4753
- __publicField(this, "options", this.setOptions);
4754
- __publicField(this, "parse", this.parseMarkdown(true));
4755
- __publicField(this, "parseInline", this.parseMarkdown(false));
4756
- __publicField(this, "Parser", b);
4757
- __publicField(this, "Renderer", y);
4758
- __publicField(this, "TextRenderer", $);
4759
- __publicField(this, "Lexer", x);
4760
- __publicField(this, "Tokenizer", w);
4761
- __publicField(this, "Hooks", P);
4762
- this.use(...e);
4488
+ tag(e) {
4489
+ let t = this.rules.inline.tag.exec(e);
4490
+ if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t[0] };
4763
4491
  }
4764
- walkTokens(e, t) {
4765
- var _a3, _b;
4766
- let n = [];
4767
- for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
4768
- case "table": {
4769
- let i = r;
4770
- for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
4771
- for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
4772
- break;
4773
- }
4774
- case "list": {
4775
- let i = r;
4776
- n = n.concat(this.walkTokens(i.items, t));
4777
- break;
4778
- }
4779
- default: {
4780
- let i = r;
4781
- ((_b = (_a3 = this.defaults.extensions) == null ? void 0 : _a3.childTokens) == null ? void 0 : _b[i.type]) ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
4782
- let a = i[s].flat(1 / 0);
4783
- n = n.concat(this.walkTokens(a, t));
4784
- }) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
4492
+ link(e) {
4493
+ let t = this.rules.inline.link.exec(e);
4494
+ if (t) {
4495
+ let n = t[2].trim();
4496
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
4497
+ if (!this.rules.other.endAngleBracket.test(n)) return;
4498
+ let s = E(n.slice(0, -1), "\\");
4499
+ if ((n.length - s.length) % 2 === 0) return;
4500
+ } else {
4501
+ let s = ge(t[2], "()");
4502
+ if (s === -2) return;
4503
+ if (s > -1) {
4504
+ let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
4505
+ t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
4506
+ }
4785
4507
  }
4508
+ let r = t[2], i = "";
4509
+ if (this.options.pedantic) {
4510
+ let s = this.rules.other.pedanticHrefTitle.exec(r);
4511
+ s && (r = s[1], i = s[3]);
4512
+ } else i = t[3] ? t[3].slice(1, -1) : "";
4513
+ return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
4786
4514
  }
4787
- return n;
4788
4515
  }
4789
- use(...e) {
4790
- let t = this.defaults.extensions || { renderers: {}, childTokens: {} };
4791
- return e.forEach((n) => {
4792
- let r = { ...n };
4793
- if (r.async = this.defaults.async || r.async || false, n.extensions && (n.extensions.forEach((i) => {
4794
- if (!i.name) throw new Error("extension name required");
4795
- if ("renderer" in i) {
4796
- let s = t.renderers[i.name];
4797
- s ? t.renderers[i.name] = function(...a) {
4798
- let o = i.renderer.apply(this, a);
4799
- return o === false && (o = s.apply(this, a)), o;
4800
- } : t.renderers[i.name] = i.renderer;
4801
- }
4802
- if ("tokenizer" in i) {
4803
- if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
4804
- let s = t[i.level];
4805
- s ? s.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
4806
- }
4807
- "childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
4808
- }), r.extensions = t), n.renderer) {
4809
- let i = this.defaults.renderer || new y(this.defaults);
4810
- for (let s in n.renderer) {
4811
- if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
4812
- if (["options", "parser"].includes(s)) continue;
4813
- let a = s, o = n.renderer[a], l = i[a];
4814
- i[a] = (...p) => {
4815
- let c = o.apply(i, p);
4816
- return c === false && (c = l.apply(i, p)), c || "";
4817
- };
4818
- }
4819
- r.renderer = i;
4516
+ reflink(e, t) {
4517
+ let n;
4518
+ if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
4519
+ let r = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = t[r.toLowerCase()];
4520
+ if (!i) {
4521
+ let s = n[0].charAt(0);
4522
+ return { type: "text", raw: s, text: s };
4820
4523
  }
4821
- if (n.tokenizer) {
4822
- let i = this.defaults.tokenizer || new w(this.defaults);
4823
- for (let s in n.tokenizer) {
4824
- if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
4825
- if (["options", "rules", "lexer"].includes(s)) continue;
4826
- let a = s, o = n.tokenizer[a], l = i[a];
4827
- i[a] = (...p) => {
4828
- let c = o.apply(i, p);
4829
- return c === false && (c = l.apply(i, p)), c;
4830
- };
4524
+ return me(n, i, n[0], this.lexer, this.rules);
4525
+ }
4526
+ }
4527
+ emStrong(e, t, n = "") {
4528
+ let r = this.rules.inline.emStrongLDelim.exec(e);
4529
+ if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
4530
+ if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
4531
+ let s = [...r[0]].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
4532
+ for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
4533
+ if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
4534
+ if (o = [...a].length, r[3] || r[4]) {
4535
+ l += o;
4536
+ continue;
4537
+ } else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
4538
+ p += o;
4539
+ continue;
4831
4540
  }
4832
- r.tokenizer = i;
4833
- }
4834
- if (n.hooks) {
4835
- let i = this.defaults.hooks || new P();
4836
- for (let s in n.hooks) {
4837
- if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
4838
- if (["options", "block"].includes(s)) continue;
4839
- let a = s, o = n.hooks[a], l = i[a];
4840
- P.passThroughHooks.has(s) ? i[a] = (p) => {
4841
- if (this.defaults.async && P.passThroughHooksRespectAsync.has(s)) return (async () => {
4842
- let d = await o.call(i, p);
4843
- return l.call(i, d);
4844
- })();
4845
- let c = o.call(i, p);
4846
- return l.call(i, c);
4847
- } : i[a] = (...p) => {
4848
- if (this.defaults.async) return (async () => {
4849
- let d = await o.apply(i, p);
4850
- return d === false && (d = await l.apply(i, p)), d;
4851
- })();
4852
- let c = o.apply(i, p);
4853
- return c === false && (c = l.apply(i, p)), c;
4854
- };
4541
+ if (l -= o, l > 0) continue;
4542
+ o = Math.min(o, o + l + p);
4543
+ let d = [...r[0]][0].length, h = e.slice(0, s + r.index + d + o);
4544
+ if (Math.min(s, o) % 2) {
4545
+ let f = h.slice(1, -1);
4546
+ return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
4855
4547
  }
4856
- r.hooks = i;
4857
- }
4858
- if (n.walkTokens) {
4859
- let i = this.defaults.walkTokens, s = n.walkTokens;
4860
- r.walkTokens = function(a) {
4861
- let o = [];
4862
- return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
4863
- };
4548
+ let R = h.slice(2, -2);
4549
+ return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
4864
4550
  }
4865
- this.defaults = { ...this.defaults, ...r };
4866
- }), this;
4867
- }
4868
- setOptions(e) {
4869
- return this.defaults = { ...this.defaults, ...e }, this;
4551
+ }
4870
4552
  }
4871
- lexer(e, t) {
4872
- return x.lex(e, t != null ? t : this.defaults);
4553
+ codespan(e) {
4554
+ let t = this.rules.inline.code.exec(e);
4555
+ if (t) {
4556
+ let n = t[2].replace(this.rules.other.newLineCharGlobal, " "), r = this.rules.other.nonSpaceChar.test(n), i = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
4557
+ return r && i && (n = n.substring(1, n.length - 1)), { type: "codespan", raw: t[0], text: n };
4558
+ }
4873
4559
  }
4874
- parser(e, t) {
4875
- return b.parse(e, t != null ? t : this.defaults);
4560
+ br(e) {
4561
+ let t = this.rules.inline.br.exec(e);
4562
+ if (t) return { type: "br", raw: t[0] };
4876
4563
  }
4877
- parseMarkdown(e) {
4878
- return (n, r) => {
4879
- let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
4880
- if (this.defaults.async === true && i.async === false) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
4881
- if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
4882
- if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
4883
- if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
4884
- let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
4885
- s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
4886
- let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
4887
- return s.hooks ? await s.hooks.postprocess(h) : h;
4888
- })().catch(a);
4889
- try {
4890
- s.hooks && (n = s.hooks.preprocess(n));
4891
- let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
4892
- s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
4893
- let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
4894
- return s.hooks && (c = s.hooks.postprocess(c)), c;
4895
- } catch (o) {
4896
- return a(o);
4564
+ del(e, t, n = "") {
4565
+ let r = this.rules.inline.delLDelim.exec(e);
4566
+ if (!r) return;
4567
+ if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
4568
+ let s = [...r[0]].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
4569
+ for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null; ) {
4570
+ if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
4571
+ if (r[3] || r[4]) {
4572
+ l += o;
4573
+ continue;
4574
+ }
4575
+ if (l -= o, l > 0) continue;
4576
+ o = Math.min(o, o + l);
4577
+ let c = [...r[0]][0].length, d = e.slice(0, s + r.index + c + o), h = d.slice(s, -s);
4578
+ return { type: "del", raw: d, text: h, tokens: this.lexer.inlineTokens(h) };
4897
4579
  }
4898
- };
4580
+ }
4899
4581
  }
4900
- onError(e, t) {
4901
- return (n) => {
4902
- if (n.message += `
4903
- Please report this to https://github.com/markedjs/marked.`, e) {
4904
- let r = "<p>An error occurred:</p><pre>" + O(n.message + "", true) + "</pre>";
4905
- return t ? Promise.resolve(r) : r;
4582
+ autolink(e) {
4583
+ let t = this.rules.inline.autolink.exec(e);
4584
+ if (t) {
4585
+ let n, r;
4586
+ return t[2] === "@" ? (n = t[1], r = "mailto:" + n) : (n = t[1], r = n), { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
4587
+ }
4588
+ }
4589
+ url(e) {
4590
+ var _a3, _b;
4591
+ let t;
4592
+ if (t = this.rules.inline.url.exec(e)) {
4593
+ let n, r;
4594
+ if (t[2] === "@") n = t[0], r = "mailto:" + n;
4595
+ else {
4596
+ let i;
4597
+ do
4598
+ i = t[0], t[0] = (_b = (_a3 = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : _a3[0]) != null ? _b : "";
4599
+ while (i !== t[0]);
4600
+ n = t[0], t[1] === "www." ? r = "http://" + t[0] : r = t[0];
4906
4601
  }
4907
- if (t) return Promise.reject(n);
4908
- throw n;
4909
- };
4602
+ return { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
4603
+ }
4604
+ }
4605
+ inlineText(e) {
4606
+ let t = this.rules.inline.text.exec(e);
4607
+ if (t) {
4608
+ let n = this.lexer.state.inRawBlock;
4609
+ return { type: "text", raw: t[0], text: t[0], escaped: n };
4610
+ }
4910
4611
  }
4911
4612
  };
4912
- var L = new B();
4913
- function g(u3, e) {
4914
- return L.parse(u3, e);
4915
- }
4916
- g.options = g.setOptions = function(u3) {
4917
- return L.setOptions(u3), g.defaults = L.defaults, G(g.defaults), g;
4918
- };
4919
- g.getDefaults = M;
4920
- g.defaults = T;
4921
- g.use = function(...u3) {
4922
- return L.use(...u3), g.defaults = L.defaults, G(g.defaults), g;
4923
- };
4924
- g.walkTokens = function(u3, e) {
4925
- return L.walkTokens(u3, e);
4926
- };
4927
- g.parseInline = L.parseInline;
4928
- g.Parser = b;
4929
- g.parser = b.parse;
4930
- g.Renderer = y;
4931
- g.TextRenderer = $;
4932
- g.Lexer = x;
4933
- g.lexer = x.lex;
4934
- g.Tokenizer = w;
4935
- g.Hooks = P;
4936
- g.parse = g;
4937
- var Ut = g.options;
4938
- var Kt = g.setOptions;
4939
- var Wt = g.use;
4940
- var Xt = g.walkTokens;
4941
- var Jt = g.parseInline;
4942
- var Yt = b.parse;
4943
- var en = x.lex;
4944
-
4945
- // ../adaptives/adaptive-faq/dist/runtime.js
4946
- function resolveItem(store, itemId, itemQuestion) {
4947
- if (itemId) {
4948
- const found = store.getState().items.find((i) => i.config.id === itemId);
4949
- if (found) return found;
4613
+ var x = class u {
4614
+ constructor(e) {
4615
+ __publicField(this, "tokens");
4616
+ __publicField(this, "options");
4617
+ __publicField(this, "state");
4618
+ __publicField(this, "inlineQueue");
4619
+ __publicField(this, "tokenizer");
4620
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
4621
+ let t = { other: m, block: C.normal, inline: z.normal };
4622
+ this.options.pedantic ? (t.block = C.pedantic, t.inline = z.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = z.breaks : t.inline = z.gfm), this.tokenizer.rules = t;
4950
4623
  }
4951
- if (itemQuestion) {
4952
- const found = store.findByQuestion(itemQuestion);
4953
- if (found) return found;
4624
+ static get rules() {
4625
+ return { block: C, inline: z };
4954
4626
  }
4955
- throw new Error("FAQ item not found");
4956
- }
4957
- async function executeScrollToFaq(action, context, store) {
4958
- var _a3;
4959
- const item = resolveItem(store, action.itemId, action.itemQuestion);
4960
- const { id } = item.config;
4961
- if (action.expand !== false) {
4962
- store.expand(id);
4627
+ static lex(e, t) {
4628
+ return new u(t).lex(e);
4963
4629
  }
4964
- const el = document.querySelector(`[data-faq-item-id="${id}"]`);
4965
- if (el) {
4966
- el.scrollIntoView({
4967
- behavior: (_a3 = action.behavior) != null ? _a3 : "smooth"
4968
- });
4630
+ static lexInline(e, t) {
4631
+ return new u(t).inlineTokens(e);
4969
4632
  }
4970
- context.publishEvent("faq:scroll_to", { itemId: id });
4971
- return {
4972
- cleanup: () => {
4973
- }
4974
- };
4975
- }
4976
- async function executeToggleFaqItem(action, context, store) {
4977
- var _a3;
4978
- const item = resolveItem(store, action.itemId, action.itemQuestion);
4979
- const { id } = item.config;
4980
- const desiredState = (_a3 = action.state) != null ? _a3 : "toggle";
4981
- let newState;
4982
- switch (desiredState) {
4983
- case "open":
4984
- store.expand(id);
4985
- newState = "open";
4986
- break;
4987
- case "closed":
4988
- store.collapse(id);
4989
- newState = "closed";
4990
- break;
4991
- default: {
4992
- const wasExpanded = store.getState().expandedItems.has(id);
4993
- store.toggle(id);
4994
- newState = wasExpanded ? "closed" : "open";
4995
- break;
4633
+ lex(e) {
4634
+ e = e.replace(m.carriageReturn, `
4635
+ `), this.blockTokens(e, this.tokens);
4636
+ for (let t = 0; t < this.inlineQueue.length; t++) {
4637
+ let n = this.inlineQueue[t];
4638
+ this.inlineTokens(n.src, n.tokens);
4996
4639
  }
4640
+ return this.inlineQueue = [], this.tokens;
4997
4641
  }
4998
- context.publishEvent("faq:toggle", { itemId: id, newState });
4999
- return {
5000
- cleanup: () => {
5001
- }
5002
- };
5003
- }
5004
- async function executeUpdateFaq(action, context, store) {
5005
- var _a3, _b, _c;
5006
- switch (action.operation) {
5007
- case "add": {
5008
- const items = (_a3 = action.items) != null ? _a3 : [];
5009
- const position = action.position === "prepend" ? "prepend" : "append";
5010
- store.addItems(items, position);
5011
- break;
5012
- }
5013
- case "remove": {
5014
- if (!action.itemId) {
5015
- throw new Error("FAQ item not found");
4642
+ blockTokens(e, t = [], n = false) {
4643
+ var _a3, _b, _c;
4644
+ for (this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
4645
+ let r;
4646
+ if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.block) == null ? void 0 : _b.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), true) : false)) continue;
4647
+ if (r = this.tokenizer.space(e)) {
4648
+ e = e.substring(r.raw.length);
4649
+ let s = t.at(-1);
4650
+ r.raw.length === 1 && s !== void 0 ? s.raw += `
4651
+ ` : t.push(r);
4652
+ continue;
4653
+ }
4654
+ if (r = this.tokenizer.code(e)) {
4655
+ e = e.substring(r.raw.length);
4656
+ let s = t.at(-1);
4657
+ (s == null ? void 0 : s.type) === "paragraph" || (s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
4658
+ `) ? "" : `
4659
+ `) + r.raw, s.text += `
4660
+ ` + r.text, this.inlineQueue.at(-1).src = s.text) : t.push(r);
4661
+ continue;
4662
+ }
4663
+ if (r = this.tokenizer.fences(e)) {
4664
+ e = e.substring(r.raw.length), t.push(r);
4665
+ continue;
4666
+ }
4667
+ if (r = this.tokenizer.heading(e)) {
4668
+ e = e.substring(r.raw.length), t.push(r);
4669
+ continue;
4670
+ }
4671
+ if (r = this.tokenizer.hr(e)) {
4672
+ e = e.substring(r.raw.length), t.push(r);
4673
+ continue;
4674
+ }
4675
+ if (r = this.tokenizer.blockquote(e)) {
4676
+ e = e.substring(r.raw.length), t.push(r);
4677
+ continue;
4678
+ }
4679
+ if (r = this.tokenizer.list(e)) {
4680
+ e = e.substring(r.raw.length), t.push(r);
4681
+ continue;
4682
+ }
4683
+ if (r = this.tokenizer.html(e)) {
4684
+ e = e.substring(r.raw.length), t.push(r);
4685
+ continue;
4686
+ }
4687
+ if (r = this.tokenizer.def(e)) {
4688
+ e = e.substring(r.raw.length);
4689
+ let s = t.at(-1);
4690
+ (s == null ? void 0 : s.type) === "paragraph" || (s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
4691
+ `) ? "" : `
4692
+ `) + r.raw, s.text += `
4693
+ ` + r.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = { href: r.href, title: r.title }, t.push(r));
4694
+ continue;
5016
4695
  }
5017
- const exists = store.getState().items.some((i) => i.config.id === action.itemId);
5018
- if (!exists) {
5019
- throw new Error("FAQ item not found");
4696
+ if (r = this.tokenizer.table(e)) {
4697
+ e = e.substring(r.raw.length), t.push(r);
4698
+ continue;
4699
+ }
4700
+ if (r = this.tokenizer.lheading(e)) {
4701
+ e = e.substring(r.raw.length), t.push(r);
4702
+ continue;
4703
+ }
4704
+ let i = e;
4705
+ if ((_c = this.options.extensions) == null ? void 0 : _c.startBlock) {
4706
+ let s = 1 / 0, a = e.slice(1), o;
4707
+ this.options.extensions.startBlock.forEach((l) => {
4708
+ o = l.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
4709
+ }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
4710
+ }
4711
+ if (this.state.top && (r = this.tokenizer.paragraph(i))) {
4712
+ let s = t.at(-1);
4713
+ n && (s == null ? void 0 : s.type) === "paragraph" ? (s.raw += (s.raw.endsWith(`
4714
+ `) ? "" : `
4715
+ `) + r.raw, s.text += `
4716
+ ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
4717
+ continue;
4718
+ }
4719
+ if (r = this.tokenizer.text(e)) {
4720
+ e = e.substring(r.raw.length);
4721
+ let s = t.at(-1);
4722
+ (s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
4723
+ `) ? "" : `
4724
+ `) + r.raw, s.text += `
4725
+ ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r);
4726
+ continue;
4727
+ }
4728
+ if (e) {
4729
+ let s = "Infinite loop on byte: " + e.charCodeAt(0);
4730
+ if (this.options.silent) {
4731
+ console.error(s);
4732
+ break;
4733
+ } else throw new Error(s);
5020
4734
  }
5021
- store.removeItem(action.itemId);
5022
- break;
5023
- }
5024
- case "reorder": {
5025
- const order = (_b = action.order) != null ? _b : [];
5026
- store.reorderItems(order);
5027
- break;
5028
- }
5029
- case "replace": {
5030
- const items = (_c = action.items) != null ? _c : [];
5031
- store.replaceItems(items);
5032
- break;
5033
4735
  }
4736
+ return this.state.top = true, t;
5034
4737
  }
5035
- context.publishEvent("faq:update", { operation: action.operation });
5036
- return {
5037
- cleanup: () => {
4738
+ inline(e, t = []) {
4739
+ return this.inlineQueue.push({ src: e, tokens: t }), t;
4740
+ }
4741
+ inlineTokens(e, t = []) {
4742
+ var _a3, _b, _c, _d, _e2, _f;
4743
+ let n = e, r = null;
4744
+ if (this.tokens.links) {
4745
+ let o = Object.keys(this.tokens.links);
4746
+ if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
5038
4747
  }
5039
- };
5040
- }
5041
- var executorDefinitions = [
5042
- { kind: "faq:scroll_to", executor: executeScrollToFaq },
5043
- { kind: "faq:toggle_item", executor: executeToggleFaqItem },
5044
- { kind: "faq:update", executor: executeUpdateFaq }
5045
- ];
5046
- var base2 = {
5047
- white: "#ffffff",
5048
- black: "#000000"
5049
- };
5050
- var brand2 = {
5051
- 0: "#2c0b0a",
5052
- 1: "#5b1715",
5053
- 2: "#89221f",
5054
- 3: "#b72e2a",
5055
- 4: "#d44844",
5056
- 5: "#dd6d69",
5057
- 6: "#e5918f",
5058
- 7: "#eeb6b4",
5059
- 8: "#f6dada",
5060
- 9: "#faebea"
5061
- };
5062
- var slateGrey2 = {
5063
- 0: "#07080a",
5064
- 1: "#0f1318",
5065
- 2: "#0e1114",
5066
- 3: "#1c222a",
5067
- 4: "#2b333f",
5068
- 5: "#394454",
5069
- 6: "#475569",
5070
- 7: "#677384",
5071
- 8: "#87919f",
5072
- 9: "#a8afba",
5073
- 10: "#cbd0d7",
5074
- 11: "#e8eaee",
5075
- 12: "#f6f7f9"
5076
- };
5077
- var green2 = {
5078
- 0: "#07230a",
5079
- 1: "#0e4514",
5080
- 2: "#16681e",
5081
- 3: "#1d8a28",
5082
- 4: "#24ad32",
5083
- 5: "#4fbd5a",
5084
- 6: "#7acd82",
5085
- 7: "#a5deab",
5086
- 8: "#d0eed3",
5087
- 9: "#e5f6e7"
5088
- };
5089
- var yellow2 = {
5090
- 0: "#301f09",
5091
- 1: "#5f3e12",
5092
- 2: "#8f5e1b",
5093
- 3: "#be7d24",
5094
- 4: "#ee9c2d",
5095
- 5: "#f1b057",
5096
- 6: "#f5c481",
5097
- 7: "#f8d7ab",
5098
- 8: "#fcebd5",
5099
- 9: "#fdf5ea"
5100
- };
5101
- var red2 = {
5102
- 0: "#330707",
5103
- 1: "#660f0e",
5104
- 2: "#991616",
5105
- 3: "#cc1e1d",
5106
- 4: "#ff2524",
5107
- 5: "#ff5150",
5108
- 6: "#ff7c7c",
5109
- 7: "#ffa8a7",
5110
- 8: "#ffd3d3",
5111
- 9: "#ffe9e9"
5112
- };
5113
- var blue2 = {
5114
- 0: "#051533",
5115
- 1: "#0a2a66",
5116
- 2: "#0f3f98",
5117
- 3: "#1454cb",
5118
- 4: "#1969fe",
5119
- 5: "#4787fe",
5120
- 6: "#75a5fe",
5121
- 7: "#a3c3ff",
5122
- 8: "#d1e1ff",
5123
- 9: "#e8f0ff"
5124
- };
5125
- var orange2 = {
5126
- 0: "#662500",
5127
- 1: "#993d00",
5128
- 2: "#cc5800",
5129
- 3: "#ff7700",
5130
- 4: "#fea85d",
5131
- 5: "#fec58f",
5132
- 6: "#ffd6ae",
5133
- 7: "#fee6cd",
5134
- 8: "#fff1e1",
5135
- 9: "#fff8f0"
5136
- };
5137
- var purple2 = {
5138
- 0: "#151229",
5139
- 1: "#2a2452",
5140
- 2: "#40357c",
5141
- 3: "#5547a5",
5142
- 4: "#6a59ce",
5143
- 5: "#887ad8",
5144
- 6: "#a69be2",
5145
- 7: "#c3bdeb",
5146
- 8: "#e1def5",
5147
- 9: "#f0eefa"
5148
- };
5149
- var pink2 = {
5150
- 0: "#37091f",
5151
- 1: "#69123c",
5152
- 2: "#9b1c58",
5153
- 3: "#cd2575",
5154
- 4: "#ff2e92",
5155
- 5: "#ff58a8",
5156
- 6: "#ff82be",
5157
- 7: "#ffabd3",
5158
- 8: "#ffd5e9",
5159
- 9: "#ffeaf4"
5160
- };
5161
- var text2 = {
5162
- primary: slateGrey2[10],
5163
- secondary: slateGrey2[9],
5164
- tertiary: slateGrey2[8]
4748
+ for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
4749
+ let i;
4750
+ for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
4751
+ n = (_c = (_b = (_a3 = this.options.hooks) == null ? void 0 : _a3.emStrongMask) == null ? void 0 : _b.call({ lexer: this }, n)) != null ? _c : n;
4752
+ let s = false, a = "";
4753
+ for (; e; ) {
4754
+ s || (a = ""), s = false;
4755
+ let o;
4756
+ if ((_e2 = (_d = this.options.extensions) == null ? void 0 : _d.inline) == null ? void 0 : _e2.some((p) => (o = p.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
4757
+ if (o = this.tokenizer.escape(e)) {
4758
+ e = e.substring(o.raw.length), t.push(o);
4759
+ continue;
4760
+ }
4761
+ if (o = this.tokenizer.tag(e)) {
4762
+ e = e.substring(o.raw.length), t.push(o);
4763
+ continue;
4764
+ }
4765
+ if (o = this.tokenizer.link(e)) {
4766
+ e = e.substring(o.raw.length), t.push(o);
4767
+ continue;
4768
+ }
4769
+ if (o = this.tokenizer.reflink(e, this.tokens.links)) {
4770
+ e = e.substring(o.raw.length);
4771
+ let p = t.at(-1);
4772
+ o.type === "text" && (p == null ? void 0 : p.type) === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
4773
+ continue;
4774
+ }
4775
+ if (o = this.tokenizer.emStrong(e, n, a)) {
4776
+ e = e.substring(o.raw.length), t.push(o);
4777
+ continue;
4778
+ }
4779
+ if (o = this.tokenizer.codespan(e)) {
4780
+ e = e.substring(o.raw.length), t.push(o);
4781
+ continue;
4782
+ }
4783
+ if (o = this.tokenizer.br(e)) {
4784
+ e = e.substring(o.raw.length), t.push(o);
4785
+ continue;
4786
+ }
4787
+ if (o = this.tokenizer.del(e, n, a)) {
4788
+ e = e.substring(o.raw.length), t.push(o);
4789
+ continue;
4790
+ }
4791
+ if (o = this.tokenizer.autolink(e)) {
4792
+ e = e.substring(o.raw.length), t.push(o);
4793
+ continue;
4794
+ }
4795
+ if (!this.state.inLink && (o = this.tokenizer.url(e))) {
4796
+ e = e.substring(o.raw.length), t.push(o);
4797
+ continue;
4798
+ }
4799
+ let l = e;
4800
+ if ((_f = this.options.extensions) == null ? void 0 : _f.startInline) {
4801
+ let p = 1 / 0, c = e.slice(1), d;
4802
+ this.options.extensions.startInline.forEach((h) => {
4803
+ d = h.call({ lexer: this }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
4804
+ }), p < 1 / 0 && p >= 0 && (l = e.substring(0, p + 1));
4805
+ }
4806
+ if (o = this.tokenizer.inlineText(l)) {
4807
+ e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
4808
+ let p = t.at(-1);
4809
+ (p == null ? void 0 : p.type) === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
4810
+ continue;
4811
+ }
4812
+ if (e) {
4813
+ let p = "Infinite loop on byte: " + e.charCodeAt(0);
4814
+ if (this.options.silent) {
4815
+ console.error(p);
4816
+ break;
4817
+ } else throw new Error(p);
4818
+ }
4819
+ }
4820
+ return t;
4821
+ }
5165
4822
  };
5166
- var background2 = {
5167
- primary: slateGrey2[2],
5168
- secondary: slateGrey2[0]
4823
+ var y = class {
4824
+ constructor(e) {
4825
+ __publicField(this, "options");
4826
+ __publicField(this, "parser");
4827
+ this.options = e || T;
4828
+ }
4829
+ space(e) {
4830
+ return "";
4831
+ }
4832
+ code({ text: e, lang: t, escaped: n }) {
4833
+ var _a3;
4834
+ let r = (_a3 = (t || "").match(m.notSpaceStart)) == null ? void 0 : _a3[0], i = e.replace(m.endingNewline, "") + `
4835
+ `;
4836
+ return r ? '<pre><code class="language-' + O(r) + '">' + (n ? i : O(i, true)) + `</code></pre>
4837
+ ` : "<pre><code>" + (n ? i : O(i, true)) + `</code></pre>
4838
+ `;
4839
+ }
4840
+ blockquote({ tokens: e }) {
4841
+ return `<blockquote>
4842
+ ${this.parser.parse(e)}</blockquote>
4843
+ `;
4844
+ }
4845
+ html({ text: e }) {
4846
+ return e;
4847
+ }
4848
+ def(e) {
4849
+ return "";
4850
+ }
4851
+ heading({ tokens: e, depth: t }) {
4852
+ return `<h${t}>${this.parser.parseInline(e)}</h${t}>
4853
+ `;
4854
+ }
4855
+ hr(e) {
4856
+ return `<hr>
4857
+ `;
4858
+ }
4859
+ list(e) {
4860
+ let t = e.ordered, n = e.start, r = "";
4861
+ for (let a = 0; a < e.items.length; a++) {
4862
+ let o = e.items[a];
4863
+ r += this.listitem(o);
4864
+ }
4865
+ let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
4866
+ return "<" + i + s + `>
4867
+ ` + r + "</" + i + `>
4868
+ `;
4869
+ }
4870
+ listitem(e) {
4871
+ return `<li>${this.parser.parse(e.tokens)}</li>
4872
+ `;
4873
+ }
4874
+ checkbox({ checked: e }) {
4875
+ return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox"> ';
4876
+ }
4877
+ paragraph({ tokens: e }) {
4878
+ return `<p>${this.parser.parseInline(e)}</p>
4879
+ `;
4880
+ }
4881
+ table(e) {
4882
+ let t = "", n = "";
4883
+ for (let i = 0; i < e.header.length; i++) n += this.tablecell(e.header[i]);
4884
+ t += this.tablerow({ text: n });
4885
+ let r = "";
4886
+ for (let i = 0; i < e.rows.length; i++) {
4887
+ let s = e.rows[i];
4888
+ n = "";
4889
+ for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
4890
+ r += this.tablerow({ text: n });
4891
+ }
4892
+ return r && (r = `<tbody>${r}</tbody>`), `<table>
4893
+ <thead>
4894
+ ` + t + `</thead>
4895
+ ` + r + `</table>
4896
+ `;
4897
+ }
4898
+ tablerow({ text: e }) {
4899
+ return `<tr>
4900
+ ${e}</tr>
4901
+ `;
4902
+ }
4903
+ tablecell(e) {
4904
+ let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
4905
+ return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
4906
+ `;
4907
+ }
4908
+ strong({ tokens: e }) {
4909
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
4910
+ }
4911
+ em({ tokens: e }) {
4912
+ return `<em>${this.parser.parseInline(e)}</em>`;
4913
+ }
4914
+ codespan({ text: e }) {
4915
+ return `<code>${O(e, true)}</code>`;
4916
+ }
4917
+ br(e) {
4918
+ return "<br>";
4919
+ }
4920
+ del({ tokens: e }) {
4921
+ return `<del>${this.parser.parseInline(e)}</del>`;
4922
+ }
4923
+ link({ href: e, title: t, tokens: n }) {
4924
+ let r = this.parser.parseInline(n), i = X(e);
4925
+ if (i === null) return r;
4926
+ e = i;
4927
+ let s = '<a href="' + e + '"';
4928
+ return t && (s += ' title="' + O(t) + '"'), s += ">" + r + "</a>", s;
4929
+ }
4930
+ image({ href: e, title: t, text: n, tokens: r }) {
4931
+ r && (n = this.parser.parseInline(r, this.parser.textRenderer));
4932
+ let i = X(e);
4933
+ if (i === null) return O(n);
4934
+ e = i;
4935
+ let s = `<img src="${e}" alt="${O(n)}"`;
4936
+ return t && (s += ` title="${O(t)}"`), s += ">", s;
4937
+ }
4938
+ text(e) {
4939
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : O(e.text);
4940
+ }
5169
4941
  };
5170
- var border2 = {
5171
- primary: slateGrey2[4],
5172
- secondary: slateGrey2[3]
4942
+ var $ = class {
4943
+ strong({ text: e }) {
4944
+ return e;
4945
+ }
4946
+ em({ text: e }) {
4947
+ return e;
4948
+ }
4949
+ codespan({ text: e }) {
4950
+ return e;
4951
+ }
4952
+ del({ text: e }) {
4953
+ return e;
4954
+ }
4955
+ html({ text: e }) {
4956
+ return e;
4957
+ }
4958
+ text({ text: e }) {
4959
+ return e;
4960
+ }
4961
+ link({ text: e }) {
4962
+ return "" + e;
4963
+ }
4964
+ image({ text: e }) {
4965
+ return "" + e;
4966
+ }
4967
+ br() {
4968
+ return "";
4969
+ }
4970
+ checkbox({ raw: e }) {
4971
+ return e;
4972
+ }
5173
4973
  };
5174
- var button2 = {
5175
- primary: {
5176
- text: base2.white,
5177
- icon: base2.white,
5178
- border: brand2[3],
5179
- backgroundDefault: brand2[3],
5180
- backgroundHover: brand2[2]
5181
- },
5182
- neutral: {
5183
- text: slateGrey2[10],
5184
- textHover: base2.white,
5185
- icon: slateGrey2[10],
5186
- iconHover: base2.white,
5187
- border: slateGrey2[4],
5188
- background: slateGrey2[2]
5189
- },
5190
- link: {
5191
- text: base2.white,
5192
- icon: base2.white,
5193
- hover: brand2[5]
5194
- },
5195
- error: {
5196
- text: red2[5],
5197
- hover: red2[6]
5198
- },
5199
- success: {
5200
- text: green2[5],
5201
- hover: green2[6]
4974
+ var b = class u2 {
4975
+ constructor(e) {
4976
+ __publicField(this, "options");
4977
+ __publicField(this, "renderer");
4978
+ __publicField(this, "textRenderer");
4979
+ this.options = e || T, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
4980
+ }
4981
+ static parse(e, t) {
4982
+ return new u2(t).parse(e);
4983
+ }
4984
+ static parseInline(e, t) {
4985
+ return new u2(t).parseInline(e);
4986
+ }
4987
+ parse(e) {
4988
+ var _a3, _b;
4989
+ let t = "";
4990
+ for (let n = 0; n < e.length; n++) {
4991
+ let r = e[n];
4992
+ if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.renderers) == null ? void 0 : _b[r.type]) {
4993
+ let s = r, a = this.options.extensions.renderers[s.type].call({ parser: this }, s);
4994
+ if (a !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(s.type)) {
4995
+ t += a || "";
4996
+ continue;
4997
+ }
4998
+ }
4999
+ let i = r;
5000
+ switch (i.type) {
5001
+ case "space": {
5002
+ t += this.renderer.space(i);
5003
+ break;
5004
+ }
5005
+ case "hr": {
5006
+ t += this.renderer.hr(i);
5007
+ break;
5008
+ }
5009
+ case "heading": {
5010
+ t += this.renderer.heading(i);
5011
+ break;
5012
+ }
5013
+ case "code": {
5014
+ t += this.renderer.code(i);
5015
+ break;
5016
+ }
5017
+ case "table": {
5018
+ t += this.renderer.table(i);
5019
+ break;
5020
+ }
5021
+ case "blockquote": {
5022
+ t += this.renderer.blockquote(i);
5023
+ break;
5024
+ }
5025
+ case "list": {
5026
+ t += this.renderer.list(i);
5027
+ break;
5028
+ }
5029
+ case "checkbox": {
5030
+ t += this.renderer.checkbox(i);
5031
+ break;
5032
+ }
5033
+ case "html": {
5034
+ t += this.renderer.html(i);
5035
+ break;
5036
+ }
5037
+ case "def": {
5038
+ t += this.renderer.def(i);
5039
+ break;
5040
+ }
5041
+ case "paragraph": {
5042
+ t += this.renderer.paragraph(i);
5043
+ break;
5044
+ }
5045
+ case "text": {
5046
+ t += this.renderer.text(i);
5047
+ break;
5048
+ }
5049
+ default: {
5050
+ let s = 'Token with "' + i.type + '" type was not found.';
5051
+ if (this.options.silent) return console.error(s), "";
5052
+ throw new Error(s);
5053
+ }
5054
+ }
5055
+ }
5056
+ return t;
5057
+ }
5058
+ parseInline(e, t = this.renderer) {
5059
+ var _a3, _b;
5060
+ let n = "";
5061
+ for (let r = 0; r < e.length; r++) {
5062
+ let i = e[r];
5063
+ if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.renderers) == null ? void 0 : _b[i.type]) {
5064
+ let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
5065
+ if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
5066
+ n += a || "";
5067
+ continue;
5068
+ }
5069
+ }
5070
+ let s = i;
5071
+ switch (s.type) {
5072
+ case "escape": {
5073
+ n += t.text(s);
5074
+ break;
5075
+ }
5076
+ case "html": {
5077
+ n += t.html(s);
5078
+ break;
5079
+ }
5080
+ case "link": {
5081
+ n += t.link(s);
5082
+ break;
5083
+ }
5084
+ case "image": {
5085
+ n += t.image(s);
5086
+ break;
5087
+ }
5088
+ case "checkbox": {
5089
+ n += t.checkbox(s);
5090
+ break;
5091
+ }
5092
+ case "strong": {
5093
+ n += t.strong(s);
5094
+ break;
5095
+ }
5096
+ case "em": {
5097
+ n += t.em(s);
5098
+ break;
5099
+ }
5100
+ case "codespan": {
5101
+ n += t.codespan(s);
5102
+ break;
5103
+ }
5104
+ case "br": {
5105
+ n += t.br(s);
5106
+ break;
5107
+ }
5108
+ case "del": {
5109
+ n += t.del(s);
5110
+ break;
5111
+ }
5112
+ case "text": {
5113
+ n += t.text(s);
5114
+ break;
5115
+ }
5116
+ default: {
5117
+ let a = 'Token with "' + s.type + '" type was not found.';
5118
+ if (this.options.silent) return console.error(a), "";
5119
+ throw new Error(a);
5120
+ }
5121
+ }
5122
+ }
5123
+ return n;
5202
5124
  }
5203
5125
  };
5204
- var badge2 = {
5205
- slateGrey: {
5206
- content: slateGrey2[10],
5207
- pillOutline: slateGrey2[10],
5208
- borderPrimary: slateGrey2[5],
5209
- borderSecondary: slateGrey2[5],
5210
- background: slateGrey2[3]
5211
- },
5212
- brand: {
5213
- content: brand2[9],
5214
- pillOutline: brand2[9],
5215
- borderPrimary: brand2[6],
5216
- borderSecondary: brand2[6],
5217
- background: brand2[0]
5218
- },
5219
- red: {
5220
- content: red2[8],
5221
- pillOutline: red2[4],
5222
- borderPrimary: red2[2],
5223
- borderSecondary: red2[2],
5224
- background: red2[0]
5225
- },
5226
- yellow: {
5227
- content: yellow2[8],
5228
- pillOutline: yellow2[4],
5229
- borderPrimary: yellow2[2],
5230
- borderSecondary: yellow2[2],
5231
- background: yellow2[0]
5232
- },
5233
- green: {
5234
- content: green2[8],
5235
- pillOutline: green2[4],
5236
- borderPrimary: green2[2],
5237
- borderSecondary: green2[2],
5238
- background: green2[0]
5239
- },
5240
- purple: {
5241
- content: purple2[8],
5242
- pillOutline: purple2[4],
5243
- borderPrimary: purple2[2],
5244
- borderSecondary: purple2[2],
5245
- background: purple2[0]
5246
- },
5247
- blue: {
5248
- content: blue2[8],
5249
- pillOutline: blue2[4],
5250
- borderPrimary: blue2[2],
5251
- borderSecondary: blue2[2],
5252
- background: blue2[0]
5253
- },
5254
- orange: {
5255
- content: orange2[8],
5256
- pillOutline: orange2[4],
5257
- borderPrimary: orange2[2],
5258
- borderSecondary: orange2[2],
5259
- background: orange2[0]
5260
- },
5261
- pink: {
5262
- content: pink2[8],
5263
- pillOutline: pink2[4],
5264
- borderPrimary: pink2[2],
5265
- borderSecondary: pink2[2],
5266
- background: pink2[0]
5126
+ var _a2;
5127
+ var P = (_a2 = class {
5128
+ constructor(e) {
5129
+ __publicField(this, "options");
5130
+ __publicField(this, "block");
5131
+ this.options = e || T;
5132
+ }
5133
+ preprocess(e) {
5134
+ return e;
5135
+ }
5136
+ postprocess(e) {
5137
+ return e;
5138
+ }
5139
+ processAllTokens(e) {
5140
+ return e;
5141
+ }
5142
+ emStrongMask(e) {
5143
+ return e;
5144
+ }
5145
+ provideLexer() {
5146
+ return this.block ? x.lex : x.lexInline;
5147
+ }
5148
+ provideParser() {
5149
+ return this.block ? b.parse : b.parseInline;
5150
+ }
5151
+ }, __publicField(_a2, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a2, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a2);
5152
+ var B = class {
5153
+ constructor(...e) {
5154
+ __publicField(this, "defaults", M());
5155
+ __publicField(this, "options", this.setOptions);
5156
+ __publicField(this, "parse", this.parseMarkdown(true));
5157
+ __publicField(this, "parseInline", this.parseMarkdown(false));
5158
+ __publicField(this, "Parser", b);
5159
+ __publicField(this, "Renderer", y);
5160
+ __publicField(this, "TextRenderer", $);
5161
+ __publicField(this, "Lexer", x);
5162
+ __publicField(this, "Tokenizer", w);
5163
+ __publicField(this, "Hooks", P);
5164
+ this.use(...e);
5165
+ }
5166
+ walkTokens(e, t) {
5167
+ var _a3, _b;
5168
+ let n = [];
5169
+ for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
5170
+ case "table": {
5171
+ let i = r;
5172
+ for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
5173
+ for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
5174
+ break;
5175
+ }
5176
+ case "list": {
5177
+ let i = r;
5178
+ n = n.concat(this.walkTokens(i.items, t));
5179
+ break;
5180
+ }
5181
+ default: {
5182
+ let i = r;
5183
+ ((_b = (_a3 = this.defaults.extensions) == null ? void 0 : _a3.childTokens) == null ? void 0 : _b[i.type]) ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
5184
+ let a = i[s].flat(1 / 0);
5185
+ n = n.concat(this.walkTokens(a, t));
5186
+ }) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
5187
+ }
5188
+ }
5189
+ return n;
5190
+ }
5191
+ use(...e) {
5192
+ let t = this.defaults.extensions || { renderers: {}, childTokens: {} };
5193
+ return e.forEach((n) => {
5194
+ let r = { ...n };
5195
+ if (r.async = this.defaults.async || r.async || false, n.extensions && (n.extensions.forEach((i) => {
5196
+ if (!i.name) throw new Error("extension name required");
5197
+ if ("renderer" in i) {
5198
+ let s = t.renderers[i.name];
5199
+ s ? t.renderers[i.name] = function(...a) {
5200
+ let o = i.renderer.apply(this, a);
5201
+ return o === false && (o = s.apply(this, a)), o;
5202
+ } : t.renderers[i.name] = i.renderer;
5203
+ }
5204
+ if ("tokenizer" in i) {
5205
+ if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
5206
+ let s = t[i.level];
5207
+ s ? s.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
5208
+ }
5209
+ "childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
5210
+ }), r.extensions = t), n.renderer) {
5211
+ let i = this.defaults.renderer || new y(this.defaults);
5212
+ for (let s in n.renderer) {
5213
+ if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
5214
+ if (["options", "parser"].includes(s)) continue;
5215
+ let a = s, o = n.renderer[a], l = i[a];
5216
+ i[a] = (...p) => {
5217
+ let c = o.apply(i, p);
5218
+ return c === false && (c = l.apply(i, p)), c || "";
5219
+ };
5220
+ }
5221
+ r.renderer = i;
5222
+ }
5223
+ if (n.tokenizer) {
5224
+ let i = this.defaults.tokenizer || new w(this.defaults);
5225
+ for (let s in n.tokenizer) {
5226
+ if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
5227
+ if (["options", "rules", "lexer"].includes(s)) continue;
5228
+ let a = s, o = n.tokenizer[a], l = i[a];
5229
+ i[a] = (...p) => {
5230
+ let c = o.apply(i, p);
5231
+ return c === false && (c = l.apply(i, p)), c;
5232
+ };
5233
+ }
5234
+ r.tokenizer = i;
5235
+ }
5236
+ if (n.hooks) {
5237
+ let i = this.defaults.hooks || new P();
5238
+ for (let s in n.hooks) {
5239
+ if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
5240
+ if (["options", "block"].includes(s)) continue;
5241
+ let a = s, o = n.hooks[a], l = i[a];
5242
+ P.passThroughHooks.has(s) ? i[a] = (p) => {
5243
+ if (this.defaults.async && P.passThroughHooksRespectAsync.has(s)) return (async () => {
5244
+ let d = await o.call(i, p);
5245
+ return l.call(i, d);
5246
+ })();
5247
+ let c = o.call(i, p);
5248
+ return l.call(i, c);
5249
+ } : i[a] = (...p) => {
5250
+ if (this.defaults.async) return (async () => {
5251
+ let d = await o.apply(i, p);
5252
+ return d === false && (d = await l.apply(i, p)), d;
5253
+ })();
5254
+ let c = o.apply(i, p);
5255
+ return c === false && (c = l.apply(i, p)), c;
5256
+ };
5257
+ }
5258
+ r.hooks = i;
5259
+ }
5260
+ if (n.walkTokens) {
5261
+ let i = this.defaults.walkTokens, s = n.walkTokens;
5262
+ r.walkTokens = function(a) {
5263
+ let o = [];
5264
+ return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
5265
+ };
5266
+ }
5267
+ this.defaults = { ...this.defaults, ...r };
5268
+ }), this;
5267
5269
  }
5268
- };
5269
- var badgeBanner2 = {
5270
- green: {
5271
- content: green2[8],
5272
- border: green2[2],
5273
- background: green2[0]
5274
- },
5275
- yellow: {
5276
- content: yellow2[8],
5277
- border: yellow2[2],
5278
- background: yellow2[0]
5279
- },
5280
- red: {
5281
- content: red2[8],
5282
- border: red2[2],
5283
- background: red2[0]
5270
+ setOptions(e) {
5271
+ return this.defaults = { ...this.defaults, ...e }, this;
5284
5272
  }
5285
- };
5286
- var alert2 = {
5287
- green: {
5288
- content: green2[1],
5289
- background: green2[9]
5290
- },
5291
- yellow: {
5292
- content: yellow2[1],
5293
- background: yellow2[9]
5294
- },
5295
- red: {
5296
- content: red2[1],
5297
- background: red2[9]
5273
+ lexer(e, t) {
5274
+ return x.lex(e, t != null ? t : this.defaults);
5298
5275
  }
5299
- };
5300
- var tag2 = {
5301
- content: slateGrey2[10],
5302
- border: slateGrey2[4],
5303
- background: slateGrey2[3]
5304
- };
5305
- var menu2 = {
5306
- backgroundDefault: slateGrey2[2],
5307
- backgroundHover: slateGrey2[1],
5308
- selected: slateGrey2[3]
5309
- };
5310
- var inputDropdown2 = {
5311
- background: slateGrey2[2],
5312
- icon: slateGrey2[10],
5313
- borderDefault: slateGrey2[4],
5314
- borderSelected: brand2[3],
5315
- textLabel: slateGrey2[9],
5316
- textPlaceholder: slateGrey2[8],
5317
- textHint: slateGrey2[8]
5318
- };
5319
- var inputField2 = {
5320
- backgroundDefault: slateGrey2[2],
5321
- backgroundDisabled: slateGrey2[0],
5322
- textLabel: slateGrey2[9],
5323
- textPlaceholder: slateGrey2[8],
5324
- textHint: slateGrey2[8],
5325
- textError: red2[5],
5326
- iconDefault: slateGrey2[9],
5327
- iconPlaceholder: slateGrey2[10],
5328
- iconError: red2[5],
5329
- borderDefault: slateGrey2[4],
5330
- borderSelected: brand2[3],
5331
- borderError: red2[5]
5332
- };
5333
- var toggle2 = {
5334
- handleDefault: base2.white,
5335
- handleDisabled: slateGrey2[10],
5336
- off: {
5337
- backgroundDefault: slateGrey2[4],
5338
- backgroundHover: slateGrey2[5],
5339
- backgroundDisabled: slateGrey2[4]
5340
- },
5341
- on: {
5342
- backgroundDefault: green2[3],
5343
- backgroundHover: green2[2],
5344
- backgroundDisabled: slateGrey2[4]
5276
+ parser(e, t) {
5277
+ return b.parse(e, t != null ? t : this.defaults);
5345
5278
  }
5346
- };
5347
- var checkbox2 = {
5348
- off: {
5349
- backgroundDefault: "#00000000",
5350
- backgroundHover: slateGrey2[5],
5351
- backgroundDisabled: slateGrey2[2],
5352
- border: slateGrey2[6]
5353
- },
5354
- on: {
5355
- backgroundDefault: green2[0],
5356
- backgroundHover: green2[1],
5357
- backgroundDisabled: slateGrey2[2],
5358
- border: green2[3]
5279
+ parseMarkdown(e) {
5280
+ return (n, r) => {
5281
+ let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
5282
+ if (this.defaults.async === true && i.async === false) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
5283
+ if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
5284
+ if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
5285
+ if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
5286
+ let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
5287
+ s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
5288
+ let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
5289
+ return s.hooks ? await s.hooks.postprocess(h) : h;
5290
+ })().catch(a);
5291
+ try {
5292
+ s.hooks && (n = s.hooks.preprocess(n));
5293
+ let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
5294
+ s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
5295
+ let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
5296
+ return s.hooks && (c = s.hooks.postprocess(c)), c;
5297
+ } catch (o) {
5298
+ return a(o);
5299
+ }
5300
+ };
5359
5301
  }
5360
- };
5361
- var avatar2 = {
5362
- content: slateGrey2[10],
5363
- background: slateGrey2[4]
5364
- };
5365
- var progressBarSlider2 = {
5366
- background: slateGrey2[4],
5367
- active: green2[3]
5368
- };
5369
- var card2 = {
5370
- background: slateGrey2[1],
5371
- content: slateGrey2[9],
5372
- border: slateGrey2[4]
5373
- };
5374
- var sidebar2 = {
5375
- backgroundDefault: slateGrey2[1],
5376
- backgroundHover: slateGrey2[3],
5377
- backgroundActive: slateGrey2[4],
5378
- border: slateGrey2[4],
5379
- contentPrimary: slateGrey2[10],
5380
- contentSecondary: slateGrey2[9],
5381
- contentTertiary: slateGrey2[8]
5382
- };
5383
- var modal2 = {
5384
- background: slateGrey2[1],
5385
- content: slateGrey2[9],
5386
- border: slateGrey2[4]
5387
- };
5388
- var tab2 = {
5389
- activeBackground: slateGrey2[3],
5390
- activeContent: brand2[5],
5391
- inactiveContent: slateGrey2[9],
5392
- border: slateGrey2[4]
5393
- };
5394
- var table2 = {
5395
- header: {
5396
- textDefault: slateGrey2[9],
5397
- textHover: slateGrey2[8],
5398
- backgroundDefault: slateGrey2[1]
5399
- },
5400
- border: slateGrey2[4],
5401
- cell: {
5402
- textPrimary: slateGrey2[10],
5403
- textSecondary: slateGrey2[9],
5404
- backgroundDefault: slateGrey2[2],
5405
- backgroundHover: slateGrey2[1]
5302
+ onError(e, t) {
5303
+ return (n) => {
5304
+ if (n.message += `
5305
+ Please report this to https://github.com/markedjs/marked.`, e) {
5306
+ let r = "<p>An error occurred:</p><pre>" + O(n.message + "", true) + "</pre>";
5307
+ return t ? Promise.resolve(r) : r;
5308
+ }
5309
+ if (t) return Promise.reject(n);
5310
+ throw n;
5311
+ };
5406
5312
  }
5407
5313
  };
5408
- var breadcrumbs2 = {
5409
- textPrimaryDefault: slateGrey2[10],
5410
- textPrimaryHover: slateGrey2[10],
5411
- textSecondaryDefault: slateGrey2[8],
5412
- textSecondaryHover: slateGrey2[9],
5413
- iconPrimary: slateGrey2[10],
5414
- iconSecondary: slateGrey2[8]
5415
- };
5416
- var loadingIndicator2 = {
5417
- background: green2[1],
5418
- active: green2[5]
5419
- };
5420
- var datePicker2 = {
5421
- textDefault: slateGrey2[10],
5422
- textSelected: base2.white,
5423
- textDisabled: slateGrey2[7],
5424
- backgroundDefault: slateGrey2[2],
5425
- backgroundMiddle: slateGrey2[3],
5426
- backgroundSelected: brand2[3],
5427
- border: slateGrey2[4]
5314
+ var L = new B();
5315
+ function g(u3, e) {
5316
+ return L.parse(u3, e);
5317
+ }
5318
+ g.options = g.setOptions = function(u3) {
5319
+ return L.setOptions(u3), g.defaults = L.defaults, G(g.defaults), g;
5428
5320
  };
5429
- var scroll2 = slateGrey2[9];
5430
- var fab2 = {
5431
- /** Diameter in pixels. */
5432
- size: 56,
5433
- /** Inset from the panel's top-left corner in pixels. */
5434
- inset: 12,
5435
- /** Background color (always the brand black). */
5436
- background: base2.black,
5437
- /** Icon / logo color. */
5438
- color: base2.white,
5439
- /** Border — 2px brand red ring. */
5440
- border: `2px solid ${brand2[3]}`,
5441
- /** Shadow when the panel is open (inner ring for "active" state). */
5442
- shadowOpen: "0 4px 24px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.08)",
5443
- /** Shadow when the panel is closed. */
5444
- shadowClosed: "0 4px 24px rgba(0,0,0,0.6)"
5321
+ g.getDefaults = M;
5322
+ g.defaults = T;
5323
+ g.use = function(...u3) {
5324
+ return L.use(...u3), g.defaults = L.defaults, G(g.defaults), g;
5445
5325
  };
5326
+ g.walkTokens = function(u3, e) {
5327
+ return L.walkTokens(u3, e);
5328
+ };
5329
+ g.parseInline = L.parseInline;
5330
+ g.Parser = b;
5331
+ g.parser = b.parse;
5332
+ g.Renderer = y;
5333
+ g.TextRenderer = $;
5334
+ g.Lexer = x;
5335
+ g.lexer = x.lex;
5336
+ g.Tokenizer = w;
5337
+ g.Hooks = P;
5338
+ g.parse = g;
5339
+ var Ut = g.options;
5340
+ var Kt = g.setOptions;
5341
+ var Wt = g.use;
5342
+ var Xt = g.walkTokens;
5343
+ var Jt = g.parseInline;
5344
+ var Yt = b.parse;
5345
+ var en = x.lex;
5346
+
5347
+ // ../adaptives/adaptive-faq/dist/runtime.js
5348
+ function resolveItem(store, itemId, itemQuestion) {
5349
+ if (itemId) {
5350
+ const found = store.getState().items.find((i) => i.config.id === itemId);
5351
+ if (found) return found;
5352
+ }
5353
+ if (itemQuestion) {
5354
+ const found = store.findByQuestion(itemQuestion);
5355
+ if (found) return found;
5356
+ }
5357
+ throw new Error("FAQ item not found");
5358
+ }
5359
+ async function executeScrollToFaq(action, context, store) {
5360
+ var _a3;
5361
+ const item = resolveItem(store, action.itemId, action.itemQuestion);
5362
+ const { id } = item.config;
5363
+ if (action.expand !== false) {
5364
+ store.expand(id);
5365
+ }
5366
+ const el = document.querySelector(`[data-faq-item-id="${id}"]`);
5367
+ if (el) {
5368
+ el.scrollIntoView({
5369
+ behavior: (_a3 = action.behavior) != null ? _a3 : "smooth"
5370
+ });
5371
+ }
5372
+ context.publishEvent("faq:scroll_to", { itemId: id });
5373
+ return {
5374
+ cleanup: () => {
5375
+ }
5376
+ };
5377
+ }
5378
+ async function executeToggleFaqItem(action, context, store) {
5379
+ var _a3;
5380
+ const item = resolveItem(store, action.itemId, action.itemQuestion);
5381
+ const { id } = item.config;
5382
+ const desiredState = (_a3 = action.state) != null ? _a3 : "toggle";
5383
+ let newState;
5384
+ switch (desiredState) {
5385
+ case "open":
5386
+ store.expand(id);
5387
+ newState = "open";
5388
+ break;
5389
+ case "closed":
5390
+ store.collapse(id);
5391
+ newState = "closed";
5392
+ break;
5393
+ default: {
5394
+ const wasExpanded = store.getState().expandedItems.has(id);
5395
+ store.toggle(id);
5396
+ newState = wasExpanded ? "closed" : "open";
5397
+ break;
5398
+ }
5399
+ }
5400
+ context.publishEvent("faq:toggle", { itemId: id, newState });
5401
+ return {
5402
+ cleanup: () => {
5403
+ }
5404
+ };
5405
+ }
5406
+ async function executeUpdateFaq(action, context, store) {
5407
+ var _a3, _b, _c;
5408
+ switch (action.operation) {
5409
+ case "add": {
5410
+ const items = (_a3 = action.items) != null ? _a3 : [];
5411
+ const position = action.position === "prepend" ? "prepend" : "append";
5412
+ store.addItems(items, position);
5413
+ break;
5414
+ }
5415
+ case "remove": {
5416
+ if (!action.itemId) {
5417
+ throw new Error("FAQ item not found");
5418
+ }
5419
+ const exists = store.getState().items.some((i) => i.config.id === action.itemId);
5420
+ if (!exists) {
5421
+ throw new Error("FAQ item not found");
5422
+ }
5423
+ store.removeItem(action.itemId);
5424
+ break;
5425
+ }
5426
+ case "reorder": {
5427
+ const order = (_b = action.order) != null ? _b : [];
5428
+ store.reorderItems(order);
5429
+ break;
5430
+ }
5431
+ case "replace": {
5432
+ const items = (_c = action.items) != null ? _c : [];
5433
+ store.replaceItems(items);
5434
+ break;
5435
+ }
5436
+ }
5437
+ context.publishEvent("faq:update", { operation: action.operation });
5438
+ return {
5439
+ cleanup: () => {
5440
+ }
5441
+ };
5442
+ }
5443
+ var executorDefinitions = [
5444
+ { kind: "faq:scroll_to", executor: executeScrollToFaq },
5445
+ { kind: "faq:toggle_item", executor: executeToggleFaqItem },
5446
+ { kind: "faq:update", executor: executeUpdateFaq }
5447
+ ];
5446
5448
  var baseStyles = {
5447
5449
  container: {
5448
5450
  fontFamily: "var(--sc-font-family, system-ui, -apple-system, sans-serif)",
@@ -6622,7 +6624,7 @@ function renderIcon2(emoji, options = {}) {
6622
6624
  return `${PREFIX} width="${size}" height="${size}" stroke="${stroke}">${paths.join("")}</svg>`;
6623
6625
  }
6624
6626
 
6625
- // ../adaptives/adaptive-nav/dist/chunk-HMLY7DHA.js
6627
+ // ../adaptives/adaptive-nav/dist/chunk-7DTOSQNC.js
6626
6628
  var __typeError2 = (msg) => {
6627
6629
  throw TypeError(msg);
6628
6630
  };
@@ -9576,8 +9578,332 @@ function error(prefix, message, data) {
9576
9578
  }
9577
9579
  }
9578
9580
 
9581
+ // src/observability/healthReporter.ts
9582
+ var HealthReporter = class {
9583
+ constructor(config) {
9584
+ this.config = config;
9585
+ __publicField(this, "resource");
9586
+ __publicField(this, "flushIntervalMs");
9587
+ __publicField(this, "counters", /* @__PURE__ */ new Map());
9588
+ __publicField(this, "histograms", /* @__PURE__ */ new Map());
9589
+ __publicField(this, "windowStartMs", Date.now());
9590
+ __publicField(this, "timer", null);
9591
+ __publicField(this, "pagehideHandler", null);
9592
+ __publicField(this, "runtime", null);
9593
+ /** Cleanup function for adapters that registered side effects (e.g. the
9594
+ * web-vitals long-task observer). Called from `stop()` so SPA re-init
9595
+ * via `initHealthReporter` doesn't accumulate observers. */
9596
+ __publicField(this, "adapterCleanup", null);
9597
+ var _a3;
9598
+ this.resource = config.resource;
9599
+ this.flushIntervalMs = (_a3 = config.flushIntervalMs) != null ? _a3 : 6e4;
9600
+ }
9601
+ /**
9602
+ * Bind runtime-derived attribute resolvers. Called after the canvas/telemetry
9603
+ * are fully initialized. Must never throw — resolvers are wrapped in
9604
+ * null-safe access at flush time.
9605
+ */
9606
+ bindRuntime(binding) {
9607
+ this.runtime = binding;
9608
+ }
9609
+ /**
9610
+ * Register a cleanup function to run on `stop()`. Used by adapters
9611
+ * (e.g. webVitalsAdapter) that need to release per-bind resources
9612
+ * like PerformanceObservers. Replaces any prior cleanup — only one
9613
+ * adapter cleanup is tracked.
9614
+ */
9615
+ attachAdapterCleanup(cleanup) {
9616
+ this.adapterCleanup = cleanup;
9617
+ }
9618
+ increment(signal, by = 1) {
9619
+ var _a3;
9620
+ this.counters.set(signal, ((_a3 = this.counters.get(signal)) != null ? _a3 : 0) + by);
9621
+ }
9622
+ /**
9623
+ * @internal — exposed for test inspection only. Mid-window state is intentionally
9624
+ * unstable; consumers should subscribe to flush payloads instead.
9625
+ */
9626
+ snapshotCounters() {
9627
+ const out = {};
9628
+ for (const [k2, v2] of this.counters) out[k2] = v2;
9629
+ return out;
9630
+ }
9631
+ recordHistogram(signal, valueMs) {
9632
+ var _a3;
9633
+ const arr = (_a3 = this.histograms.get(signal)) != null ? _a3 : [];
9634
+ arr.push(valueMs);
9635
+ this.histograms.set(signal, arr);
9636
+ }
9637
+ /**
9638
+ * @internal — exposed for test inspection only. Mid-window state is intentionally
9639
+ * unstable; consumers should subscribe to flush payloads instead.
9640
+ */
9641
+ snapshotHistograms() {
9642
+ const out = {};
9643
+ for (const [k2, samples] of this.histograms) {
9644
+ if (samples.length === 0) continue;
9645
+ const sorted = [...samples].sort((a, b2) => a - b2);
9646
+ out[k2] = {
9647
+ count: sorted.length,
9648
+ p50: percentile(sorted, 0.5),
9649
+ p95: percentile(sorted, 0.95)
9650
+ };
9651
+ }
9652
+ return out;
9653
+ }
9654
+ async flush() {
9655
+ var _a3, _b, _c, _d, _e2, _f, _g, _h;
9656
+ const counters = this.snapshotCounters();
9657
+ const histograms = this.snapshotHistograms();
9658
+ const hasData = Object.keys(counters).length > 0 || Object.keys(histograms).length > 0;
9659
+ if (!hasData) return;
9660
+ let surface = null;
9661
+ let sessionId = "";
9662
+ try {
9663
+ surface = (_b = (_a3 = this.runtime) == null ? void 0 : _a3.getSurface()) != null ? _b : null;
9664
+ } catch {
9665
+ }
9666
+ try {
9667
+ sessionId = (_d = (_c = this.runtime) == null ? void 0 : _c.getSessionId()) != null ? _d : "";
9668
+ } catch {
9669
+ }
9670
+ const payload = {
9671
+ resource: {
9672
+ ...this.resource,
9673
+ sessionId,
9674
+ surfaceType: (_e2 = surface == null ? void 0 : surface.type) != null ? _e2 : "unknown",
9675
+ surfaceHost: (_f = surface == null ? void 0 : surface.host) != null ? _f : "unknown",
9676
+ surfaceDevice: (_g = surface == null ? void 0 : surface.device) != null ? _g : "unknown",
9677
+ surfaceMode: (_h = surface == null ? void 0 : surface.mode) != null ? _h : "unknown"
9678
+ },
9679
+ windowSeconds: Math.max(1, Math.round((Date.now() - this.windowStartMs) / 1e3)),
9680
+ windowStartUnixMs: this.windowStartMs,
9681
+ counters,
9682
+ histograms
9683
+ };
9684
+ this.counters.clear();
9685
+ this.histograms.clear();
9686
+ this.windowStartMs = Date.now();
9687
+ try {
9688
+ await this.config.emit(payload);
9689
+ } catch {
9690
+ }
9691
+ }
9692
+ start() {
9693
+ if (this.timer !== null) return;
9694
+ this.timer = setInterval(() => {
9695
+ void this.flush();
9696
+ }, this.flushIntervalMs);
9697
+ if (typeof window !== "undefined") {
9698
+ this.pagehideHandler = () => {
9699
+ void this.flush();
9700
+ };
9701
+ window.addEventListener("pagehide", this.pagehideHandler);
9702
+ }
9703
+ }
9704
+ stop() {
9705
+ if (this.timer !== null) {
9706
+ clearInterval(this.timer);
9707
+ this.timer = null;
9708
+ }
9709
+ if (this.pagehideHandler !== null && typeof window !== "undefined") {
9710
+ window.removeEventListener("pagehide", this.pagehideHandler);
9711
+ this.pagehideHandler = null;
9712
+ }
9713
+ if (this.adapterCleanup !== null) {
9714
+ try {
9715
+ this.adapterCleanup();
9716
+ } catch {
9717
+ }
9718
+ this.adapterCleanup = null;
9719
+ }
9720
+ }
9721
+ };
9722
+ function percentile(sortedAsc, q2) {
9723
+ if (sortedAsc.length === 0) return 0;
9724
+ const pos = (sortedAsc.length - 1) * q2;
9725
+ const lo = Math.floor(pos);
9726
+ const hi = Math.ceil(pos);
9727
+ if (lo === hi) return sortedAsc[lo];
9728
+ return sortedAsc[lo] + (sortedAsc[hi] - sortedAsc[lo]) * (pos - lo);
9729
+ }
9730
+ var singleton = null;
9731
+ function initHealthReporter(config) {
9732
+ singleton == null ? void 0 : singleton.stop();
9733
+ singleton = new HealthReporter(config);
9734
+ singleton.start();
9735
+ return singleton;
9736
+ }
9737
+ function getHealthReporter() {
9738
+ return singleton;
9739
+ }
9740
+
9741
+ // src/observability/otlpEmitter.ts
9742
+ var stringAttr = (key, value) => ({ key, value: { stringValue: value } });
9743
+ var intAttr = (key, value) => ({
9744
+ key,
9745
+ value: { intValue: Math.round(value) }
9746
+ });
9747
+ var doubleAttr = (key, value) => ({ key, value: { doubleValue: value } });
9748
+ function buildOtlpPayload(flush) {
9749
+ const { resource, counters, histograms, windowSeconds, windowStartUnixMs } = flush;
9750
+ const resourceAttrs = [
9751
+ stringAttr("service.name", resource.serviceName),
9752
+ stringAttr("service.version", resource.serviceVersion),
9753
+ stringAttr("syntro.posthog_key", resource.posthogKey),
9754
+ stringAttr("syntro.session_id", resource.sessionId),
9755
+ stringAttr("syntro.surface_type", resource.surfaceType),
9756
+ stringAttr("syntro.surface_host", resource.surfaceHost),
9757
+ stringAttr("syntro.surface_device", resource.surfaceDevice),
9758
+ stringAttr("syntro.surface_mode", resource.surfaceMode),
9759
+ stringAttr("syntro.host_origin", resource.hostOrigin)
9760
+ ];
9761
+ const recordAttrs = [intAttr("window_seconds", windowSeconds)];
9762
+ for (const [k2, v2] of Object.entries(counters)) {
9763
+ if (v2 !== void 0) recordAttrs.push(intAttr(k2, v2));
9764
+ }
9765
+ for (const [k2, h] of Object.entries(histograms)) {
9766
+ if (h === void 0) continue;
9767
+ recordAttrs.push(intAttr(`${k2}_count`, h.count));
9768
+ recordAttrs.push(doubleAttr(`${k2}_p50`, h.p50));
9769
+ recordAttrs.push(doubleAttr(`${k2}_p95`, h.p95));
9770
+ }
9771
+ const nowNano = `${Date.now()}000000`;
9772
+ const startNano = `${windowStartUnixMs}000000`;
9773
+ return {
9774
+ resourceLogs: [
9775
+ {
9776
+ resource: { attributes: resourceAttrs },
9777
+ scopeLogs: [
9778
+ {
9779
+ scope: { name: "syntro.sdk.health" },
9780
+ logRecords: [
9781
+ {
9782
+ timeUnixNano: startNano,
9783
+ observedTimeUnixNano: nowNano,
9784
+ severityText: "INFO",
9785
+ body: { stringValue: "sdk_health_window" },
9786
+ attributes: recordAttrs
9787
+ }
9788
+ ]
9789
+ }
9790
+ ]
9791
+ }
9792
+ ]
9793
+ };
9794
+ }
9795
+ function createOtlpEmitter(cfg) {
9796
+ var _a3;
9797
+ const fetchImpl = (_a3 = cfg.fetchImpl) != null ? _a3 : fetch;
9798
+ return async (flush) => {
9799
+ const body = JSON.stringify(buildOtlpPayload(flush));
9800
+ const post = () => fetchImpl(cfg.endpoint, {
9801
+ method: "POST",
9802
+ headers: { "Content-Type": "application/json" },
9803
+ body,
9804
+ keepalive: true,
9805
+ mode: "cors"
9806
+ });
9807
+ try {
9808
+ const resp = await post();
9809
+ if (!resp.ok && resp.status >= 500) {
9810
+ try {
9811
+ await post();
9812
+ } catch {
9813
+ }
9814
+ }
9815
+ } catch {
9816
+ try {
9817
+ await post();
9818
+ } catch {
9819
+ }
9820
+ }
9821
+ };
9822
+ }
9823
+
9824
+ // src/observability/sdkScriptUrl.ts
9825
+ function detect() {
9826
+ var _a3;
9827
+ if (typeof document === "undefined") return void 0;
9828
+ const cs = document.currentScript;
9829
+ if (cs && cs.src) return cs.src;
9830
+ try {
9831
+ const scripts = Array.from(document.scripts);
9832
+ for (let i = scripts.length - 1; i >= 0; i -= 1) {
9833
+ const src = (_a3 = scripts[i]) == null ? void 0 : _a3.src;
9834
+ if (typeof src === "string" && (src.includes("runtime-sdk") || src.includes("smart-canvas"))) {
9835
+ return src;
9836
+ }
9837
+ }
9838
+ } catch {
9839
+ }
9840
+ return void 0;
9841
+ }
9842
+ var SDK_SCRIPT_URL = detect();
9843
+ function getSdkScriptUrlPrefix() {
9844
+ if (!SDK_SCRIPT_URL) return void 0;
9845
+ const lastSlash = SDK_SCRIPT_URL.lastIndexOf("/");
9846
+ if (lastSlash === -1) return void 0;
9847
+ return SDK_SCRIPT_URL.substring(0, lastSlash + 1);
9848
+ }
9849
+
9850
+ // src/observability/webVitalsAdapter.ts
9851
+ import { onCLS, onFCP, onINP, onLCP, onTTFB } from "web-vitals";
9852
+ var VITALS_BOUND_FLAG = "__syntro_vitals_bound";
9853
+ var VITALS_CURRENT_REPORTER = "__syntro_vitals_current_reporter";
9854
+ function bindWebVitals(reporter, options) {
9855
+ if (typeof window === "undefined") return () => {
9856
+ };
9857
+ const w2 = window;
9858
+ w2[VITALS_CURRENT_REPORTER] = reporter;
9859
+ let longTaskObserver = null;
9860
+ const prefix = options == null ? void 0 : options.attributedScriptUrlPrefix;
9861
+ if (prefix && "PerformanceObserver" in window) {
9862
+ try {
9863
+ longTaskObserver = new PerformanceObserver((list) => {
9864
+ const current = w2[VITALS_CURRENT_REPORTER];
9865
+ if (!current) return;
9866
+ for (const entry of list.getEntries()) {
9867
+ const attribution = entry.attribution;
9868
+ if (!attribution) continue;
9869
+ const matched = attribution.some((a) => {
9870
+ var _a3, _b;
9871
+ const src = (_b = (_a3 = a.containerSrc) != null ? _a3 : a.name) != null ? _b : "";
9872
+ return src.startsWith(prefix);
9873
+ });
9874
+ if (matched) {
9875
+ current.increment("longtasks_self_count");
9876
+ current.increment("longtasks_self_blocking_ms", Math.round(entry.duration));
9877
+ }
9878
+ }
9879
+ });
9880
+ longTaskObserver.observe({ type: "longtask", buffered: true });
9881
+ } catch {
9882
+ longTaskObserver = null;
9883
+ }
9884
+ }
9885
+ if (!w2[VITALS_BOUND_FLAG]) {
9886
+ w2[VITALS_BOUND_FLAG] = true;
9887
+ const recordMs = (signal) => (metric) => {
9888
+ const current = w2[VITALS_CURRENT_REPORTER];
9889
+ current == null ? void 0 : current.recordHistogram(signal, metric.value);
9890
+ };
9891
+ onLCP(recordMs("lcp_ms"));
9892
+ onINP(recordMs("inp_ms"));
9893
+ onFCP(recordMs("fcp_ms"));
9894
+ onTTFB(recordMs("ttfb_ms"));
9895
+ onCLS((metric) => {
9896
+ const current = w2[VITALS_CURRENT_REPORTER];
9897
+ current == null ? void 0 : current.recordHistogram("cls_score", metric.value);
9898
+ });
9899
+ }
9900
+ return () => {
9901
+ longTaskObserver == null ? void 0 : longTaskObserver.disconnect();
9902
+ };
9903
+ }
9904
+
9579
9905
  // src/version.ts
9580
- var SDK_VERSION = "2.17.0";
9906
+ var SDK_VERSION = "2.19.0";
9581
9907
 
9582
9908
  // src/types.ts
9583
9909
  var SDK_SCHEMA_VERSION = "2.0";
@@ -9696,7 +10022,7 @@ var createCanvasConfigFetcher = ({
9696
10022
  variantFlagPrefix,
9697
10023
  sdkVersion
9698
10024
  }) => async () => {
9699
- var _a3, _b;
10025
+ var _a3, _b, _c, _d, _e2, _f;
9700
10026
  if (experiments && configFeatureKey) {
9701
10027
  const directConfig = (_a3 = experiments.getFeatureValue) == null ? void 0 : _a3.call(experiments, configFeatureKey, null);
9702
10028
  if (directConfig && typeof directConfig === "object") {
@@ -9735,6 +10061,8 @@ var createCanvasConfigFetcher = ({
9735
10061
  throw new Error(`SmartCanvas: config URI not allowed: ${uri}`);
9736
10062
  }
9737
10063
  const effectiveCredentials = credentials != null ? credentials : isSameOrigin2(uri) ? "include" : "omit";
10064
+ const fetchStart = performance.now();
10065
+ let errorAlreadyCounted = false;
9738
10066
  try {
9739
10067
  const response = await fetch(uri, {
9740
10068
  credentials: effectiveCredentials,
@@ -9744,15 +10072,23 @@ var createCanvasConfigFetcher = ({
9744
10072
  }
9745
10073
  });
9746
10074
  if (!response.ok) {
10075
+ (_c = getHealthReporter()) == null ? void 0 : _c.increment("flag_fetch_errors");
10076
+ errorAlreadyCounted = true;
9747
10077
  throw new Error(`SmartCanvas: failed to fetch config (${response.status})`);
9748
10078
  }
9749
10079
  const config = await response.json();
10080
+ const latencyMs = performance.now() - fetchStart;
10081
+ (_d = getHealthReporter()) == null ? void 0 : _d.increment("flag_fetch_count");
10082
+ (_e2 = getHealthReporter()) == null ? void 0 : _e2.recordHistogram("flag_fetch_latency_ms", latencyMs);
9750
10083
  debug("SmartCanvas Config", "Fetched config from URI", config);
9751
10084
  if (sdkVersion) {
9752
10085
  cacheConfig(config, sdkVersion);
9753
10086
  }
9754
10087
  return config;
9755
10088
  } catch (error2) {
10089
+ if (!errorAlreadyCounted) {
10090
+ (_f = getHealthReporter()) == null ? void 0 : _f.increment("flag_fetch_errors");
10091
+ }
9756
10092
  if (sdkVersion) {
9757
10093
  const cached = getCachedConfig(sdkVersion);
9758
10094
  if (cached) {
@@ -17965,7 +18301,7 @@ function createTelemetryClient(provider, config) {
17965
18301
 
17966
18302
  // src/bootstrap-runtime.ts
17967
18303
  async function _initCore(options) {
17968
- var _a3, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l;
18304
+ var _a3, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n;
17969
18305
  initLogger();
17970
18306
  debug("Syntro Bootstrap", "====== INIT ======");
17971
18307
  debug("Syntro Bootstrap", "Options:", {
@@ -18029,11 +18365,31 @@ async function _initCore(options) {
18029
18365
  }
18030
18366
  const experimentHost = getEnvVar("NEXT_PUBLIC_SYNTRO_EXPERIMENT_HOST") || getEnvVar("VITE_SYNTRO_EXPERIMENT_HOST") || (payload == null ? void 0 : payload.eh);
18031
18367
  const telemetryHost = getEnvVar("NEXT_PUBLIC_SYNTRO_TELEMETRY_HOST") || getEnvVar("VITE_SYNTRO_TELEMETRY_HOST") || (payload == null ? void 0 : payload.th);
18032
- const editorUrl = getEnvVar("NEXT_PUBLIC_SYNTRO_EDITOR_URL") || getEnvVar("VITE_SYNTRO_EDITOR_URL") || ((_b = options.canvas) == null ? void 0 : _b.editorUrl);
18368
+ if (payload != null && payload.obd !== true && telemetryHost) {
18369
+ try {
18370
+ const otlpEndpoint = `${telemetryHost.replace(/\/$/, "")}/sdk-otel/v1/logs`;
18371
+ const reporter = initHealthReporter({
18372
+ resource: {
18373
+ serviceName: "syntro-runtime-sdk",
18374
+ serviceVersion: SDK_VERSION,
18375
+ // PostHog project SDK key — canonical workspace identifier for ops.
18376
+ // Telemetry lives in PostHog, so its primary key is the right join column.
18377
+ posthogKey: (_b = payload.t) != null ? _b : "",
18378
+ hostOrigin: typeof window !== "undefined" ? window.location.origin : ""
18379
+ },
18380
+ emit: createOtlpEmitter({ endpoint: otlpEndpoint })
18381
+ });
18382
+ const attributedScriptUrlPrefix = (_c = getSdkScriptUrlPrefix()) != null ? _c : "https://cdn.syntrologie.com/runtime-sdk/";
18383
+ const cleanup = bindWebVitals(reporter, { attributedScriptUrlPrefix });
18384
+ reporter.attachAdapterCleanup(cleanup);
18385
+ } catch {
18386
+ }
18387
+ }
18388
+ const editorUrl = getEnvVar("NEXT_PUBLIC_SYNTRO_EDITOR_URL") || getEnvVar("VITE_SYNTRO_EDITOR_URL") || ((_d = options.canvas) == null ? void 0 : _d.editorUrl);
18033
18389
  const geoHost = (payload == null ? void 0 : payload.g) || getEnvVar("NEXT_PUBLIC_SYNTRO_GEO_HOST") || getEnvVar("VITE_SYNTRO_GEO_HOST") || GEO_DEFAULT_HOST;
18034
18390
  const cachedSegmentAttrs = loadCachedSegmentAttributes();
18035
18391
  const browserMetadata = collectBrowserMetadata();
18036
- const appSignalsInit = (_c = options.appSignalsInit) != null ? _c : {};
18392
+ const appSignalsInit = (_e2 = options.appSignalsInit) != null ? _e2 : {};
18037
18393
  const phaseOneAttrs = { ...browserMetadata, ...cachedSegmentAttrs, ...appSignalsInit };
18038
18394
  debug("Syntro Bootstrap", "Phase 1: Browser metadata:", browserMetadata);
18039
18395
  debug("Syntro Bootstrap", "Phase 1: Cached segment attributes:", cachedSegmentAttrs);
@@ -18177,7 +18533,7 @@ async function _initCore(options) {
18177
18533
  });
18178
18534
  console.log(`[Syntro Bootstrap] Telemetry client created (${provider}) with EventBus wiring`);
18179
18535
  if (Object.keys(appSignalsInit).length > 0) {
18180
- (_d = telemetry.track) == null ? void 0 : _d.call(telemetry, "app_signals_init", appSignalsInit);
18536
+ (_f = telemetry.track) == null ? void 0 : _f.call(telemetry, "app_signals_init", appSignalsInit);
18181
18537
  debug("Syntro Bootstrap", "Tracked app signals event:", appSignalsInit);
18182
18538
  }
18183
18539
  const telemetryForCapture = telemetry;
@@ -18235,7 +18591,7 @@ async function _initCore(options) {
18235
18591
  if ((platformAdapter == null ? void 0 : platformAdapter.name) === "shopify" && telemetryHost) {
18236
18592
  try {
18237
18593
  shopifyPixelBridge = new ShopifyPixelBridge({
18238
- distinctId: (_f = (_e2 = telemetry.getDistinctId) == null ? void 0 : _e2.call(telemetry)) != null ? _f : "",
18594
+ distinctId: (_h = (_g = telemetry.getDistinctId) == null ? void 0 : _g.call(telemetry)) != null ? _h : "",
18239
18595
  telemetryHost,
18240
18596
  telemetryKey: payload.t
18241
18597
  });
@@ -18323,7 +18679,7 @@ async function _initCore(options) {
18323
18679
  debug("Syntro Bootstrap", "auto-load of adaptive-mcp failed (non-fatal):", err);
18324
18680
  });
18325
18681
  }
18326
- const registeredApps = (_i = (_h = (_g = runtime5.apps).list) == null ? void 0 : _h.call(_g)) != null ? _i : [];
18682
+ const registeredApps = (_k = (_j = (_i = runtime5.apps).list) == null ? void 0 : _j.call(_i)) != null ? _k : [];
18327
18683
  console.log(
18328
18684
  `[DIAG] Activation loop: ${registeredApps.length} apps in registry:`,
18329
18685
  registeredApps.map((a) => `${a.manifest.id}(${a.state})`).join(", ")
@@ -18354,13 +18710,13 @@ async function _initCore(options) {
18354
18710
  if (experiments && Object.keys(geoData).length > 0) {
18355
18711
  const mergedAttrs = { ...browserMetadata, ...geoData, ...appSignalsInit };
18356
18712
  debug("Syntro Bootstrap", "Merging geo data into GrowthBook attributes:", geoData);
18357
- (_j = experiments.setAttributes) == null ? void 0 : _j.call(experiments, mergedAttrs);
18713
+ (_l = experiments.setAttributes) == null ? void 0 : _l.call(experiments, mergedAttrs);
18358
18714
  }
18359
18715
  const mcpHost = await mcpPromise;
18360
18716
  if (mcpHost && experiments) {
18361
18717
  browserMetadata.surface_type = "mcp-app";
18362
18718
  browserMetadata.surface_host = mcpHost.name;
18363
- (_k = experiments.setAttributes) == null ? void 0 : _k.call(experiments, { ...browserMetadata, ...geoData });
18719
+ (_m = experiments.setAttributes) == null ? void 0 : _m.call(experiments, { ...browserMetadata, ...geoData });
18364
18720
  runtime5.context.setSurfaceType("mcp-app");
18365
18721
  runtime5.context.setSurfaceHost(mcpHost.name);
18366
18722
  debug("Syntro Bootstrap", "MCP App detected:", mcpHost.name);
@@ -18369,7 +18725,7 @@ async function _initCore(options) {
18369
18725
  if (options.fetcher) {
18370
18726
  baseFetcher = options.fetcher;
18371
18727
  } else if (payload == null ? void 0 : payload.f) {
18372
- const configFetcher = createConfigFetcher(payload.f, (_l = payload.o) != null ? _l : {});
18728
+ const configFetcher = createConfigFetcher(payload.f, (_n = payload.o) != null ? _n : {});
18373
18729
  baseFetcher = async () => {
18374
18730
  var _a4;
18375
18731
  const result = await configFetcher.fetch();
@@ -18383,7 +18739,7 @@ async function _initCore(options) {
18383
18739
  }
18384
18740
  const warnedAppFailures = /* @__PURE__ */ new Set();
18385
18741
  const appLoadingFetcher = baseFetcher ? async () => {
18386
- var _a4, _b2, _c2, _d2, _e3, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m;
18742
+ var _a4, _b2, _c2, _d2, _e3, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
18387
18743
  const config = await baseFetcher();
18388
18744
  const tileCount = (_b2 = (_a4 = config.tiles) == null ? void 0 : _a4.length) != null ? _b2 : 0;
18389
18745
  const actionCount = (_d2 = (_c2 = config.actions) == null ? void 0 : _c2.length) != null ? _d2 : 0;
@@ -18416,7 +18772,7 @@ async function _initCore(options) {
18416
18772
  `actions=${(_j2 = (_i2 = config.actions) == null ? void 0 : _i2.length) != null ? _j2 : 0},`,
18417
18773
  `theme=${(_l2 = (_k2 = config.theme) == null ? void 0 : _k2.name) != null ? _l2 : "none"}`
18418
18774
  );
18419
- if (((_m = config.actions) == null ? void 0 : _m.length) > 0) {
18775
+ if (((_m2 = config.actions) == null ? void 0 : _m2.length) > 0) {
18420
18776
  console.log(
18421
18777
  "[Syntro Bootstrap] Actions in config:",
18422
18778
  config.actions.map(
@@ -18509,19 +18865,47 @@ async function _initCore(options) {
18509
18865
  originalSetOverrideFetcher(wrappedFetcher);
18510
18866
  };
18511
18867
  }
18868
+ const healthReporter = getHealthReporter();
18869
+ if (healthReporter !== null) {
18870
+ try {
18871
+ const boundTelemetry = telemetry;
18872
+ const boundRuntime = runtime5;
18873
+ healthReporter.bindRuntime({
18874
+ getSessionId: () => {
18875
+ var _a4, _b2;
18876
+ try {
18877
+ return (_b2 = (_a4 = boundTelemetry == null ? void 0 : boundTelemetry.getSessionId) == null ? void 0 : _a4.call(boundTelemetry)) != null ? _b2 : "";
18878
+ } catch {
18879
+ return "";
18880
+ }
18881
+ },
18882
+ getSurface: () => {
18883
+ try {
18884
+ const surface = boundRuntime.context.get().surface;
18885
+ return surface ? { ...surface } : null;
18886
+ } catch {
18887
+ return null;
18888
+ }
18889
+ }
18890
+ });
18891
+ } catch {
18892
+ }
18893
+ }
18894
+ healthReporter == null ? void 0 : healthReporter.increment("bootstrap_ok");
18512
18895
  return { canvas, runtime: runtime5, experiments, telemetry, sessionMetrics, appLoader };
18513
18896
  }
18514
18897
 
18515
18898
  // src/bootstrap.ts
18516
18899
  async function init(options) {
18517
- var _a3;
18900
+ var _a3, _b;
18518
18901
  try {
18519
18902
  return await _initCore(options);
18520
18903
  } catch (err) {
18521
18904
  const message = err instanceof Error ? err.message : String(err);
18522
18905
  console.warn("[Syntrologie] SDK initialization failed:", message);
18906
+ (_a3 = getHealthReporter()) == null ? void 0 : _a3.increment("bootstrap_errors");
18523
18907
  if (typeof document !== "undefined") {
18524
- (_a3 = document.getElementById("syntrologie-anti-flicker")) == null ? void 0 : _a3.remove();
18908
+ (_b = document.getElementById("syntrologie-anti-flicker")) == null ? void 0 : _b.remove();
18525
18909
  }
18526
18910
  return void 0;
18527
18911
  }