@nside/wefa 0.3.0 → 0.4.1
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/README.md +46 -3
- package/dist/LegalConsent-9nOroDoA.cjs +1 -0
- package/dist/LegalConsent-CrPVZOxx.js +151 -0
- package/dist/LegalDocument-CVJiGmPJ.cjs +109 -0
- package/dist/{LegalDocument-BhoEpJ2O.js → LegalDocument-DwVhwjIf.js} +236 -215
- package/dist/{LoginView-kH440cCh.js → LoginView-DUPa_PsC.js} +3 -3
- package/dist/{LoginView-IIkXXw3R.cjs → LoginView-Dihs8n_X.cjs} +1 -1
- package/dist/{LogoutView-DGqh4bP7.js → LogoutView-DAh7MrFi.js} +3 -3
- package/dist/{LogoutView-B90MA-_Q.cjs → LogoutView-Fl3nfeJ0.cjs} +1 -1
- package/dist/{apiClient-DJdAL3tN.cjs → apiClient-BUS5ZclN.cjs} +1 -1
- package/dist/{apiClient-D-kcx_S1.js → apiClient-BbJl566D.js} +1 -1
- package/dist/axios-CZvsFspN.js +1887 -0
- package/dist/axios-DMqeKDaq.cjs +6 -0
- package/dist/containers.cjs +590 -5
- package/dist/containers.d.ts +39 -0
- package/dist/containers.js +3803 -977
- package/dist/{index-Coos428-.js → index--_rUTrqU.js} +308 -282
- package/dist/{index-B4vneBZh.cjs → index-B4oFnh1T.cjs} +6 -6
- package/dist/index-BHSxFTgZ.js +49 -0
- package/dist/{index-BSfhC_wu.cjs → index-BaA_oL1s.cjs} +1 -1
- package/dist/{index-CJmnkrIs.cjs → index-Becfy0pF.cjs} +1 -1
- package/dist/{index-Dj5oTSEE.js → index-C09d0pI4.js} +15 -15
- package/dist/{index-BXrnPbjr.cjs → index-CbQWytWd.cjs} +4 -4
- package/dist/{index-DmVIgb18.js → index-CgAb-gZi.js} +11 -11
- package/dist/{index-B53YL3vD.cjs → index-DFOQKDki.cjs} +2 -2
- package/dist/index-DFSkcsx-.cjs +943 -0
- package/dist/{index-CEz0St1t.js → index-DQFN7qxo.js} +7 -7
- package/dist/index-DRozw3P8.js +167 -0
- package/dist/index-DfCQoHSf.cjs +146 -0
- package/dist/index-DkuJMEY1.js +6731 -0
- package/dist/{index-bRjoenrr.js → index-Dv6jyKbT.js} +12 -12
- package/dist/{index-Bl3JVLei.cjs → index-EDm9-cRY.cjs} +1 -1
- package/dist/index-IGN7_cyg.cjs +2 -0
- package/dist/{index-DGvdYnh3.js → index-lFl6UsTa.js} +7 -7
- package/dist/index-lQmq7gxp.cjs +54 -0
- package/dist/{index-FS8xE7Mo.js → index-xUb0UC07.js} +5 -5
- package/dist/lib-C3DWunRS.js +26376 -0
- package/dist/lib-COvHzA2Y.cjs +2104 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +160 -7
- package/dist/lib.js +33 -30
- package/dist/libRoutes-B-H3e9wZ.js +22 -0
- package/dist/libRoutes-Cl3TklhN.cjs +1 -0
- package/dist/network.cjs +1 -1
- package/dist/network.d.ts +19 -0
- package/dist/network.js +3 -3
- package/dist/router.cjs +1 -1
- package/dist/router.d.ts +26 -4
- package/dist/router.js +10 -10
- package/package.json +55 -48
- package/src/assets/main.css +2 -2
- package/src/components/AutoroutedBreadcrumb/AutoroutedBreadcrumb.mdx +8 -8
- package/src/components/AutoroutedBreadcrumb/AutoroutedBreadcrumb.spec.ts +86 -45
- package/src/components/AutoroutedBreadcrumb/AutoroutedBreadcrumb.vue +29 -21
- package/src/components/AvatarComponent/AvatarComponent.mdx +63 -0
- package/src/components/AvatarComponent/AvatarComponent.stories.ts +98 -0
- package/src/components/AvatarComponent/AvatarComponent.vue +115 -0
- package/src/components/GanttChartComponent/GanttChartComponent.mdx +143 -0
- package/src/components/GanttChartComponent/GanttChartComponent.spec.ts +257 -0
- package/src/components/GanttChartComponent/GanttChartComponent.stories.ts +253 -0
- package/src/components/GanttChartComponent/GanttChartComponent.vue +220 -0
- package/src/components/GanttChartComponent/GanttChartGrid.vue +66 -0
- package/src/components/GanttChartComponent/GanttChartHeaderGrid.vue +167 -0
- package/src/components/GanttChartComponent/GanttChartHeaderLabel.vue +23 -0
- package/src/components/GanttChartComponent/GanttChartLinksOverlay.vue +105 -0
- package/src/components/GanttChartComponent/GanttChartRowGrid.vue +288 -0
- package/src/components/GanttChartComponent/GanttChartRowLabel.vue +32 -0
- package/src/components/GanttChartComponent/composables/useGanttLinks.ts +212 -0
- package/src/components/GanttChartComponent/composables/useGanttSizing.ts +42 -0
- package/src/components/GanttChartComponent/ganttChartLayout.ts +211 -0
- package/src/components/GanttChartComponent/ganttChartTypes.ts +24 -0
- package/src/components/GanttChartComponent/index.ts +1 -0
- package/src/components/NetworkButton/ApiMutationButton.vue +7 -5
- package/src/components/NetworkButton/ApiQueryButton.vue +6 -4
- package/src/components/PlotlyComponent/PlotlyComponent.stories.ts +74 -45
- package/src/containers/BareContainer/BareContainer.mdx +1 -1
- package/src/containers/LayoutContainer/LayoutContainer.mdx +128 -0
- package/src/containers/LayoutContainer/LayoutContainer.spec.ts +151 -0
- package/src/containers/LayoutContainer/LayoutContainer.stories.ts +292 -0
- package/src/containers/LayoutContainer/LayoutContainer.vue +53 -0
- package/src/containers/LayoutContainer/MobileNavigationComponent/MobileNavigationComponent.spec.ts +139 -0
- package/src/containers/LayoutContainer/MobileNavigationComponent/MobileNavigationComponent.vue +63 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/BottomComponent/BottomComponent.spec.ts +39 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/BottomComponent/BottomComponent.vue +9 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/MainComponent/MainComponent.spec.ts +175 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/MainComponent/MainComponent.vue +163 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/MainComponent/NavigationLinkComponent.spec.ts +105 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/MainComponent/NavigationLinkComponent.vue +45 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/SideNavigationComponent.spec.ts +78 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/SideNavigationComponent.vue +29 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/TopComponent/TopComponent.spec.ts +60 -0
- package/src/containers/LayoutContainer/SideNavigationComponent/TopComponent/TopComponent.vue +56 -0
- package/src/containers/LayoutContainer/UserMenuTriggerComponent/UserMenuTriggerComponent.spec.ts +96 -0
- package/src/containers/LayoutContainer/UserMenuTriggerComponent/UserMenuTriggerComponent.vue +80 -0
- package/src/containers/LayoutContainer/index.ts +1 -0
- package/src/containers/NavbarContainer/NavbarContainer.mdx +1 -1
- package/src/containers/RoutedTabsComponent/RoutedTabsComponent.mdx +3 -3
- package/src/containers/SideMenuContainer/SideMenuContainer.mdx +1 -1
- package/src/containers/helpers.ts +6 -3
- package/src/containers/index.ts +2 -0
- package/src/containers/storybook/PlaceholderView.vue +1 -1
- package/src/containers/storybook/PrimeComponents.stories.ts +17 -0
- package/src/containers/storybook/PrimeComponentsShowcase.vue +587 -0
- package/src/containers/storybook/overview.mdx +36 -36
- package/src/demo/App.vue +7 -0
- package/src/{demo.ts → demo/main.ts} +8 -9
- package/src/demo/router.ts +65 -19
- package/src/demo/views/PlaygroundView.vue +86 -0
- package/src/demo/views/ShowcaseView.vue +41 -0
- package/src/lib.ts +3 -1
- package/src/locales/Translation.mdx +2 -2
- package/src/locales/en/avatar.json +3 -0
- package/src/locales/en/gantt_chart.json +6 -0
- package/src/locales/en/navigation.json +3 -1
- package/src/locales/index.ts +0 -4
- package/src/plugins/legalConsent/views/__tests__/LegalConsent.test.ts +12 -7
- package/src/router/guards.ts +4 -4
- package/src/router/libRoutes.ts +6 -2
- package/src/router/router.mdx +107 -66
- package/src/router/types.ts +24 -3
- package/src/stores/__tests__/backend/jwt.test.ts +4 -4
- package/src/stores/__tests__/backend/oauth.test.ts +104 -0
- package/src/stores/__tests__/backend/token.test.ts +4 -4
- package/src/stores/authentication.mdx +138 -0
- package/src/stores/backend/common.ts +89 -0
- package/src/stores/backend/constants.ts +22 -0
- package/src/stores/backend/schemes/jwt.ts +208 -0
- package/src/stores/backend/schemes/oauth.ts +142 -0
- package/src/stores/backend/schemes/token.ts +122 -0
- package/src/stores/backend/types.ts +96 -0
- package/src/stores/backend.ts +21 -427
- package/src/stores/index.ts +6 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/nside.ts +157 -0
- package/src/utils/color.spec.ts +24 -0
- package/src/utils/color.ts +100 -0
- package/src/utils/translations.ts +0 -4
- package/dist/LegalConsent-CEcXZml6.cjs +0 -1
- package/dist/LegalConsent-Dzq3fdnt.js +0 -277
- package/dist/LegalDocument-CS3MnOcV.cjs +0 -109
- package/dist/axios-ClRPr3Xn.js +0 -1777
- package/dist/axios-Dcidtc2l.cjs +0 -6
- package/dist/index-Bc699sOR.js +0 -4997
- package/dist/index-CL_OJMNr.cjs +0 -55
- package/dist/index-CTNsucOq.cjs +0 -147
- package/dist/index-CwLAV8WF.js +0 -210
- package/dist/index-FrfvunRp.cjs +0 -146
- package/dist/lib-BBJH9d11.cjs +0 -2792
- package/dist/lib-Y8FPgwH4.js +0 -20886
- package/dist/libRoutes-BsneoQ4G.js +0 -18
- package/dist/libRoutes-BzeZrIaK.cjs +0 -1
- package/src/demo/DemoApp.vue +0 -13
- package/src/demo/ShowcaseView.vue +0 -39
- package/src/demo/demo.css +0 -15
- /package/src/demo/{DemoContent.vue → views/DemoContent.vue} +0 -0
- /package/src/demo/{DemoView.vue → views/DemoView.vue} +0 -0
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./axios-
|
|
3
|
-
import { b as
|
|
4
|
-
import { u as Ce, a as
|
|
5
|
-
import { B as
|
|
6
|
-
import { f as
|
|
7
|
-
function
|
|
1
|
+
import { openBlock as D, createElementBlock as ae, mergeProps as $e, defineComponent as Re, useTemplateRef as Te, ref as ze, watch as Ae, onMounted as ve, unref as ee, createBlock as Pe, createCommentVNode as _e, createElementVNode as Ie, normalizeClass as Le } from "vue";
|
|
2
|
+
import "./axios-CZvsFspN.js";
|
|
3
|
+
import { b as Be } from "./apiClient-BbJl566D.js";
|
|
4
|
+
import { u as Ce, a as Ee } from "./lib-C3DWunRS.js";
|
|
5
|
+
import { B as qe, d as Ze } from "./index--_rUTrqU.js";
|
|
6
|
+
import { f as De } from "./index-DkuJMEY1.js";
|
|
7
|
+
function j() {
|
|
8
8
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
9
9
|
}
|
|
10
|
-
var
|
|
10
|
+
var R = j();
|
|
11
11
|
function oe(n) {
|
|
12
|
-
|
|
12
|
+
R = n;
|
|
13
13
|
}
|
|
14
|
-
var
|
|
15
|
-
function
|
|
14
|
+
var S = { exec: () => null };
|
|
15
|
+
function h(n, e = "") {
|
|
16
16
|
let r = typeof n == "string" ? n : n.source, s = { replace: (t, i) => {
|
|
17
17
|
let l = typeof i == "string" ? i : i.source;
|
|
18
|
-
return l = l.replace(
|
|
18
|
+
return l = l.replace(x.caret, "$1"), r = r.replace(t, l), s;
|
|
19
19
|
}, getRegex: () => new RegExp(r, e) };
|
|
20
20
|
return s;
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var Me = (() => {
|
|
23
23
|
try {
|
|
24
24
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
25
25
|
} catch {
|
|
26
26
|
return !1;
|
|
27
27
|
}
|
|
28
|
-
})(),
|
|
29
|
-
]`).replace("lheading",
|
|
30
|
-
function
|
|
28
|
+
})(), x = { 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: (n) => new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`), htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}>`) }, Qe = /^(?:[ \t]*(?:\n|$))+/, Ne = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, je = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, _ = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, He = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, H = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ce = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, pe = h(ce).replace(/bull/g, H).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(), Oe = h(ce).replace(/bull/g, H).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(), O = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Xe = /^[^\n]+/, X = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ge = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", X).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), We = h(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, H).getRegex(), E = "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", G = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Fe = h("^ {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", G).replace("tag", E).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), he = h(O).replace("hr", _).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", E).getRegex(), Ue = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", he).getRegex(), W = { blockquote: Ue, code: Ne, def: Ge, fences: je, heading: He, hr: _, html: Fe, lheading: pe, list: We, newline: Qe, paragraph: he, table: S, text: Xe }, te = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", _).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", E).getRegex(), Ve = { ...W, lheading: Oe, table: te, paragraph: h(O).replace("hr", _).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", E).getRegex() }, Ke = { ...W, html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", G).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: S, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(O).replace("hr", _).replace("heading", ` *#{1,6} *[^
|
|
29
|
+
]`).replace("lheading", pe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Je = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ye = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ue = /^( {2,}|\\)\n(?!\s*$)/, et = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, q = /[\p{P}\p{S}]/u, F = /[\s\p{P}\p{S}]/u, ge = /[^\s\p{P}\p{S}]/u, tt = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, F).getRegex(), ke = /(?!~)[\p{P}\p{S}]/u, rt = /(?!~)[\s\p{P}\p{S}]/u, nt = /(?:[^\s\p{P}\p{S}]|~)/u, de = /(?![*_])[\p{P}\p{S}]/u, st = /(?![*_])[\s\p{P}\p{S}]/u, lt = /(?:[^\s\p{P}\p{S}]|[*_])/u, it = h(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Me ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), fe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, at = h(fe, "u").replace(/punct/g, q).getRegex(), ot = h(fe, "u").replace(/punct/g, ke).getRegex(), xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ct = h(xe, "gu").replace(/notPunctSpace/g, ge).replace(/punctSpace/g, F).replace(/punct/g, q).getRegex(), pt = h(xe, "gu").replace(/notPunctSpace/g, nt).replace(/punctSpace/g, rt).replace(/punct/g, ke).getRegex(), ht = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ge).replace(/punctSpace/g, F).replace(/punct/g, q).getRegex(), ut = h(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, de).getRegex(), gt = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", kt = h(gt, "gu").replace(/notPunctSpace/g, lt).replace(/punctSpace/g, st).replace(/punct/g, de).getRegex(), dt = h(/\\(punct)/, "gu").replace(/punct/g, q).getRegex(), ft = h(/^<(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(), xt = h(G).replace("(?:-->|$)", "-->").getRegex(), bt = h("^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", xt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), L = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, mt = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", L).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), be = h(/^!?\[(label)\]\[(ref)\]/).replace("label", L).replace("ref", X).getRegex(), me = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", X).getRegex(), wt = h("reflink|nolink(?!\\()", "g").replace("reflink", be).replace("nolink", me).getRegex(), re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, U = { _backpedal: S, anyPunctuation: dt, autolink: ft, blockSkip: it, br: ue, code: Ye, del: S, delLDelim: S, delRDelim: S, emStrongLDelim: at, emStrongRDelimAst: ct, emStrongRDelimUnd: ht, escape: Je, link: mt, nolink: me, punctuation: tt, reflink: be, reflinkSearch: wt, tag: bt, text: et, url: S }, yt = { ...U, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", L).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", L).getRegex() }, M = { ...U, emStrongRDelimAst: pt, emStrongLDelim: ot, delLDelim: ut, delRDelim: kt, url: h(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", re).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: h(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", re).getRegex() }, St = { ...M, br: h(ue).replace("{2,}", "*").getRegex(), text: h(M.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: W, gfm: Ve, pedantic: Ke }, z = { normal: U, gfm: M, breaks: St, pedantic: yt }, $t = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ne = (n) => $t[n];
|
|
30
|
+
function w(n, e) {
|
|
31
31
|
if (e) {
|
|
32
|
-
if (
|
|
33
|
-
} else if (
|
|
32
|
+
if (x.escapeTest.test(n)) return n.replace(x.escapeReplace, ne);
|
|
33
|
+
} else if (x.escapeTestNoEncode.test(n)) return n.replace(x.escapeReplaceNoEncode, ne);
|
|
34
34
|
return n;
|
|
35
35
|
}
|
|
36
36
|
function se(n) {
|
|
37
37
|
try {
|
|
38
|
-
n = encodeURI(n).replace(
|
|
38
|
+
n = encodeURI(n).replace(x.percentDecode, "%");
|
|
39
39
|
} catch {
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
return n;
|
|
43
43
|
}
|
|
44
44
|
function le(n, e) {
|
|
45
|
-
let r = n.replace(
|
|
46
|
-
let a = !1,
|
|
47
|
-
for (; --
|
|
45
|
+
let r = n.replace(x.findPipe, (i, l, o) => {
|
|
46
|
+
let a = !1, p = l;
|
|
47
|
+
for (; --p >= 0 && o[p] === "\\"; ) a = !a;
|
|
48
48
|
return a ? "|" : " |";
|
|
49
|
-
}), s = r.split(
|
|
49
|
+
}), s = r.split(x.splitPipe), t = 0;
|
|
50
50
|
if (s[0].trim() || s.shift(), s.length > 0 && !s.at(-1)?.trim() && s.pop(), e) if (s.length > e) s.splice(e);
|
|
51
51
|
else for (; s.length < e; ) s.push("");
|
|
52
|
-
for (; t < s.length; t++) s[t] = s[t].trim().replace(
|
|
52
|
+
for (; t < s.length; t++) s[t] = s[t].trim().replace(x.slashPipe, "|");
|
|
53
53
|
return s;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function A(n, e, r) {
|
|
56
56
|
let s = n.length;
|
|
57
57
|
if (s === 0) return "";
|
|
58
58
|
let t = 0;
|
|
@@ -60,7 +60,7 @@ function z(n, e, r) {
|
|
|
60
60
|
t++;
|
|
61
61
|
return n.slice(0, s - t);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Rt(n, e) {
|
|
64
64
|
if (n.indexOf(e[1]) === -1) return -1;
|
|
65
65
|
let r = 0;
|
|
66
66
|
for (let s = 0; s < n.length; s++) if (n[s] === "\\") s++;
|
|
@@ -68,13 +68,21 @@ function bt(n, e) {
|
|
|
68
68
|
else if (n[s] === e[1] && (r--, r < 0)) return s;
|
|
69
69
|
return r > 0 ? -2 : -1;
|
|
70
70
|
}
|
|
71
|
+
function Tt(n, e = 0) {
|
|
72
|
+
let r = e, s = "";
|
|
73
|
+
for (let t of n) if (t === " ") {
|
|
74
|
+
let i = 4 - r % 4;
|
|
75
|
+
s += " ".repeat(i), r += i;
|
|
76
|
+
} else s += t, r++;
|
|
77
|
+
return s;
|
|
78
|
+
}
|
|
71
79
|
function ie(n, e, r, s, t) {
|
|
72
80
|
let i = e.href, l = e.title || null, o = n[1].replace(t.other.outputLinkReplace, "$1");
|
|
73
81
|
s.state.inLink = !0;
|
|
74
82
|
let a = { type: n[0].charAt(0) === "!" ? "image" : "link", raw: r, href: i, title: l, text: o, tokens: s.inlineTokens(o) };
|
|
75
83
|
return s.state.inLink = !1, a;
|
|
76
84
|
}
|
|
77
|
-
function
|
|
85
|
+
function zt(n, e, r) {
|
|
78
86
|
let s = n.match(r.other.indentCodeCompensation);
|
|
79
87
|
if (s === null) return e;
|
|
80
88
|
let t = s[1];
|
|
@@ -87,12 +95,12 @@ function xt(n, e, r) {
|
|
|
87
95
|
}).join(`
|
|
88
96
|
`);
|
|
89
97
|
}
|
|
90
|
-
var
|
|
98
|
+
var B = class {
|
|
91
99
|
options;
|
|
92
100
|
rules;
|
|
93
101
|
lexer;
|
|
94
102
|
constructor(n) {
|
|
95
|
-
this.options = n ||
|
|
103
|
+
this.options = n || R;
|
|
96
104
|
}
|
|
97
105
|
space(n) {
|
|
98
106
|
let e = this.rules.block.newline.exec(n);
|
|
@@ -102,14 +110,14 @@ var L = class {
|
|
|
102
110
|
let e = this.rules.block.code.exec(n);
|
|
103
111
|
if (e) {
|
|
104
112
|
let r = e[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
105
|
-
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? r :
|
|
113
|
+
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : A(r, `
|
|
106
114
|
`) };
|
|
107
115
|
}
|
|
108
116
|
}
|
|
109
117
|
fences(n) {
|
|
110
118
|
let e = this.rules.block.fences.exec(n);
|
|
111
119
|
if (e) {
|
|
112
|
-
let r = e[0], s =
|
|
120
|
+
let r = e[0], s = zt(r, e[3] || "", this.rules);
|
|
113
121
|
return { type: "code", raw: r, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
|
|
114
122
|
}
|
|
115
123
|
}
|
|
@@ -118,7 +126,7 @@ var L = class {
|
|
|
118
126
|
if (e) {
|
|
119
127
|
let r = e[2].trim();
|
|
120
128
|
if (this.rules.other.endingHash.test(r)) {
|
|
121
|
-
let s =
|
|
129
|
+
let s = A(r, "#");
|
|
122
130
|
(this.options.pedantic || !s || this.rules.other.endingSpaceChar.test(s)) && (r = s.trim());
|
|
123
131
|
}
|
|
124
132
|
return { type: "heading", raw: e[0], depth: e[1].length, text: r, tokens: this.lexer.inline(r) };
|
|
@@ -126,13 +134,13 @@ var L = class {
|
|
|
126
134
|
}
|
|
127
135
|
hr(n) {
|
|
128
136
|
let e = this.rules.block.hr.exec(n);
|
|
129
|
-
if (e) return { type: "hr", raw:
|
|
137
|
+
if (e) return { type: "hr", raw: A(e[0], `
|
|
130
138
|
`) };
|
|
131
139
|
}
|
|
132
140
|
blockquote(n) {
|
|
133
141
|
let e = this.rules.block.blockquote.exec(n);
|
|
134
142
|
if (e) {
|
|
135
|
-
let r =
|
|
143
|
+
let r = A(e[0], `
|
|
136
144
|
`).split(`
|
|
137
145
|
`), s = "", t = "", i = [];
|
|
138
146
|
for (; r.length > 0; ) {
|
|
@@ -141,27 +149,27 @@ var L = class {
|
|
|
141
149
|
else if (!l) o.push(r[a]);
|
|
142
150
|
else break;
|
|
143
151
|
r = r.slice(a);
|
|
144
|
-
let
|
|
145
|
-
`), c =
|
|
152
|
+
let p = o.join(`
|
|
153
|
+
`), c = p.replace(this.rules.other.blockquoteSetextReplace, `
|
|
146
154
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
147
155
|
s = s ? `${s}
|
|
148
|
-
${
|
|
156
|
+
${p}` : p, t = t ? `${t}
|
|
149
157
|
${c}` : c;
|
|
150
|
-
let
|
|
151
|
-
if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top =
|
|
158
|
+
let g = this.lexer.state.top;
|
|
159
|
+
if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = g, r.length === 0) break;
|
|
152
160
|
let u = i.at(-1);
|
|
153
161
|
if (u?.type === "code") break;
|
|
154
162
|
if (u?.type === "blockquote") {
|
|
155
|
-
let
|
|
163
|
+
let f = u, d = f.raw + `
|
|
156
164
|
` + r.join(`
|
|
157
|
-
`),
|
|
158
|
-
i[i.length - 1] =
|
|
165
|
+
`), y = this.blockquote(d);
|
|
166
|
+
i[i.length - 1] = y, s = s.substring(0, s.length - f.raw.length) + y.raw, t = t.substring(0, t.length - f.text.length) + y.text;
|
|
159
167
|
break;
|
|
160
168
|
} else if (u?.type === "list") {
|
|
161
|
-
let
|
|
169
|
+
let f = u, d = f.raw + `
|
|
162
170
|
` + r.join(`
|
|
163
|
-
`),
|
|
164
|
-
i[i.length - 1] =
|
|
171
|
+
`), y = this.list(d);
|
|
172
|
+
i[i.length - 1] = y, s = s.substring(0, s.length - u.raw.length) + y.raw, t = t.substring(0, t.length - f.raw.length) + y.raw, r = d.substring(i.at(-1).raw.length).split(`
|
|
165
173
|
`);
|
|
166
174
|
continue;
|
|
167
175
|
}
|
|
@@ -176,31 +184,31 @@ ${c}` : c;
|
|
|
176
184
|
r = s ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = s ? r : "[*+-]");
|
|
177
185
|
let i = this.rules.other.listItemRegex(r), l = !1;
|
|
178
186
|
for (; n; ) {
|
|
179
|
-
let a = !1,
|
|
187
|
+
let a = !1, p = "", c = "";
|
|
180
188
|
if (!(e = i.exec(n)) || this.rules.block.hr.test(n)) break;
|
|
181
|
-
|
|
182
|
-
let
|
|
183
|
-
`, 1)[0]
|
|
184
|
-
`, 1)[0],
|
|
185
|
-
if (this.options.pedantic ? (
|
|
189
|
+
p = e[0], n = n.substring(p.length);
|
|
190
|
+
let g = Tt(e[2].split(`
|
|
191
|
+
`, 1)[0], e[1].length), u = n.split(`
|
|
192
|
+
`, 1)[0], f = !g.trim(), d = 0;
|
|
193
|
+
if (this.options.pedantic ? (d = 2, c = g.trimStart()) : f ? d = e[1].length + 1 : (d = g.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, c = g.slice(d), d += e[1].length), f && this.rules.other.blankLine.test(u) && (p += u + `
|
|
186
194
|
`, n = n.substring(u.length + 1), a = !0), !a) {
|
|
187
|
-
let
|
|
195
|
+
let y = this.rules.other.nextBulletRegex(d), K = this.rules.other.hrRegex(d), J = this.rules.other.fencesBeginRegex(d), Y = this.rules.other.headingBeginRegex(d), ye = this.rules.other.htmlBeginRegex(d), Se = this.rules.other.blockquoteBeginRegex(d);
|
|
188
196
|
for (; n; ) {
|
|
189
197
|
let Z = n.split(`
|
|
190
|
-
`, 1)[0],
|
|
191
|
-
if (u = Z, this.options.pedantic ? (u = u.replace(this.rules.other.listReplaceNesting, " "),
|
|
192
|
-
if (
|
|
193
|
-
` +
|
|
198
|
+
`, 1)[0], T;
|
|
199
|
+
if (u = Z, this.options.pedantic ? (u = u.replace(this.rules.other.listReplaceNesting, " "), T = u) : T = u.replace(this.rules.other.tabCharGlobal, " "), J.test(u) || Y.test(u) || ye.test(u) || Se.test(u) || y.test(u) || K.test(u)) break;
|
|
200
|
+
if (T.search(this.rules.other.nonSpaceChar) >= d || !u.trim()) c += `
|
|
201
|
+
` + T.slice(d);
|
|
194
202
|
else {
|
|
195
|
-
if (
|
|
203
|
+
if (f || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || J.test(g) || Y.test(g) || K.test(g)) break;
|
|
196
204
|
c += `
|
|
197
205
|
` + u;
|
|
198
206
|
}
|
|
199
|
-
|
|
200
|
-
`, n = n.substring(Z.length + 1),
|
|
207
|
+
f = !u.trim(), p += Z + `
|
|
208
|
+
`, n = n.substring(Z.length + 1), g = T.slice(d);
|
|
201
209
|
}
|
|
202
210
|
}
|
|
203
|
-
t.loose || (l ? t.loose = !0 : this.rules.other.doubleBlankLine.test(
|
|
211
|
+
t.loose || (l ? t.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (l = !0)), t.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: !1, text: c, tokens: [] }), t.raw += p;
|
|
204
212
|
}
|
|
205
213
|
let o = t.items.at(-1);
|
|
206
214
|
if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
|
|
@@ -215,20 +223,20 @@ ${c}` : c;
|
|
|
215
223
|
break;
|
|
216
224
|
}
|
|
217
225
|
}
|
|
218
|
-
let
|
|
219
|
-
if (
|
|
220
|
-
let c = { type: "checkbox", raw:
|
|
226
|
+
let p = this.rules.other.listTaskCheckbox.exec(a.raw);
|
|
227
|
+
if (p) {
|
|
228
|
+
let c = { type: "checkbox", raw: p[0] + " ", checked: p[0] !== "[ ]" };
|
|
221
229
|
a.checked = c.checked, t.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = c.raw + a.tokens[0].raw, a.tokens[0].text = c.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(c)) : a.tokens.unshift({ type: "paragraph", raw: c.raw, text: c.raw, tokens: [c] }) : a.tokens.unshift(c);
|
|
222
230
|
}
|
|
223
231
|
}
|
|
224
232
|
if (!t.loose) {
|
|
225
|
-
let
|
|
233
|
+
let p = a.tokens.filter((g) => g.type === "space"), c = p.length > 0 && p.some((g) => this.rules.other.anyLine.test(g.raw));
|
|
226
234
|
t.loose = c;
|
|
227
235
|
}
|
|
228
236
|
}
|
|
229
237
|
if (t.loose) for (let a of t.items) {
|
|
230
238
|
a.loose = !0;
|
|
231
|
-
for (let
|
|
239
|
+
for (let p of a.tokens) p.type === "text" && (p.type = "paragraph");
|
|
232
240
|
}
|
|
233
241
|
return t;
|
|
234
242
|
}
|
|
@@ -286,10 +294,10 @@ ${c}` : c;
|
|
|
286
294
|
let r = e[2].trim();
|
|
287
295
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
|
|
288
296
|
if (!this.rules.other.endAngleBracket.test(r)) return;
|
|
289
|
-
let i =
|
|
297
|
+
let i = A(r.slice(0, -1), "\\");
|
|
290
298
|
if ((r.length - i.length) % 2 === 0) return;
|
|
291
299
|
} else {
|
|
292
|
-
let i =
|
|
300
|
+
let i = Rt(e[2], "()");
|
|
293
301
|
if (i === -2) return;
|
|
294
302
|
if (i > -1) {
|
|
295
303
|
let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
|
|
@@ -318,8 +326,8 @@ ${c}` : c;
|
|
|
318
326
|
emStrong(n, e, r = "") {
|
|
319
327
|
let s = this.rules.inline.emStrongLDelim.exec(n);
|
|
320
328
|
if (!(!s || s[3] && r.match(this.rules.other.unicodeAlphaNumeric)) && (!(s[1] || s[2]) || !r || this.rules.inline.punctuation.exec(r))) {
|
|
321
|
-
let t = [...s[0]].length - 1, i, l, o = t, a = 0,
|
|
322
|
-
for (
|
|
329
|
+
let t = [...s[0]].length - 1, i, l, o = t, a = 0, p = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
330
|
+
for (p.lastIndex = 0, e = e.slice(-1 * n.length + t); (s = p.exec(e)) != null; ) {
|
|
323
331
|
if (i = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !i) continue;
|
|
324
332
|
if (l = [...i].length, s[3] || s[4]) {
|
|
325
333
|
o += l;
|
|
@@ -330,13 +338,13 @@ ${c}` : c;
|
|
|
330
338
|
}
|
|
331
339
|
if (o -= l, o > 0) continue;
|
|
332
340
|
l = Math.min(l, l + o + a);
|
|
333
|
-
let c = [...s[0]][0].length,
|
|
341
|
+
let c = [...s[0]][0].length, g = n.slice(0, t + s.index + c + l);
|
|
334
342
|
if (Math.min(t, l) % 2) {
|
|
335
|
-
let
|
|
336
|
-
return { type: "em", raw:
|
|
343
|
+
let f = g.slice(1, -1);
|
|
344
|
+
return { type: "em", raw: g, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
337
345
|
}
|
|
338
|
-
let u =
|
|
339
|
-
return { type: "strong", raw:
|
|
346
|
+
let u = g.slice(2, -2);
|
|
347
|
+
return { type: "strong", raw: g, text: u, tokens: this.lexer.inlineTokens(u) };
|
|
340
348
|
}
|
|
341
349
|
}
|
|
342
350
|
}
|
|
@@ -351,9 +359,22 @@ ${c}` : c;
|
|
|
351
359
|
let e = this.rules.inline.br.exec(n);
|
|
352
360
|
if (e) return { type: "br", raw: e[0] };
|
|
353
361
|
}
|
|
354
|
-
del(n) {
|
|
355
|
-
let
|
|
356
|
-
if (
|
|
362
|
+
del(n, e, r = "") {
|
|
363
|
+
let s = this.rules.inline.delLDelim.exec(n);
|
|
364
|
+
if (s && (!s[1] || !r || this.rules.inline.punctuation.exec(r))) {
|
|
365
|
+
let t = [...s[0]].length - 1, i, l, o = t, a = this.rules.inline.delRDelim;
|
|
366
|
+
for (a.lastIndex = 0, e = e.slice(-1 * n.length + t); (s = a.exec(e)) != null; ) {
|
|
367
|
+
if (i = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !i || (l = [...i].length, l !== t)) continue;
|
|
368
|
+
if (s[3] || s[4]) {
|
|
369
|
+
o += l;
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
if (o -= l, o > 0) continue;
|
|
373
|
+
l = Math.min(l, l + o);
|
|
374
|
+
let p = [...s[0]][0].length, c = n.slice(0, t + s.index + p + l), g = c.slice(t, -t);
|
|
375
|
+
return { type: "del", raw: c, text: g, tokens: this.lexer.inlineTokens(g) };
|
|
376
|
+
}
|
|
377
|
+
}
|
|
357
378
|
}
|
|
358
379
|
autolink(n) {
|
|
359
380
|
let e = this.rules.inline.autolink.exec(n);
|
|
@@ -384,19 +405,19 @@ ${c}` : c;
|
|
|
384
405
|
return { type: "text", raw: e[0], text: e[0], escaped: r };
|
|
385
406
|
}
|
|
386
407
|
}
|
|
387
|
-
},
|
|
408
|
+
}, b = class Q {
|
|
388
409
|
tokens;
|
|
389
410
|
options;
|
|
390
411
|
state;
|
|
391
412
|
inlineQueue;
|
|
392
413
|
tokenizer;
|
|
393
414
|
constructor(e) {
|
|
394
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
395
|
-
let r = { other:
|
|
396
|
-
this.options.pedantic ? (r.block = I.pedantic, r.inline =
|
|
415
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || R, this.options.tokenizer = this.options.tokenizer || new B(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
416
|
+
let r = { other: x, block: I.normal, inline: z.normal };
|
|
417
|
+
this.options.pedantic ? (r.block = I.pedantic, r.inline = z.pedantic) : this.options.gfm && (r.block = I.gfm, this.options.breaks ? r.inline = z.breaks : r.inline = z.gfm), this.tokenizer.rules = r;
|
|
397
418
|
}
|
|
398
419
|
static get rules() {
|
|
399
|
-
return { block: I, inline:
|
|
420
|
+
return { block: I, inline: z };
|
|
400
421
|
}
|
|
401
422
|
static lex(e, r) {
|
|
402
423
|
return new Q(r).lex(e);
|
|
@@ -405,7 +426,7 @@ ${c}` : c;
|
|
|
405
426
|
return new Q(r).inlineTokens(e);
|
|
406
427
|
}
|
|
407
428
|
lex(e) {
|
|
408
|
-
e = e.replace(
|
|
429
|
+
e = e.replace(x.carriageReturn, `
|
|
409
430
|
`), this.blockTokens(e, this.tokens);
|
|
410
431
|
for (let r = 0; r < this.inlineQueue.length; r++) {
|
|
411
432
|
let s = this.inlineQueue[r];
|
|
@@ -414,7 +435,7 @@ ${c}` : c;
|
|
|
414
435
|
return this.inlineQueue = [], this.tokens;
|
|
415
436
|
}
|
|
416
437
|
blockTokens(e, r = [], s = !1) {
|
|
417
|
-
for (this.options.pedantic && (e = e.replace(
|
|
438
|
+
for (this.options.pedantic && (e = e.replace(x.tabCharGlobal, " ").replace(x.spaceLine, "")); e; ) {
|
|
418
439
|
let t;
|
|
419
440
|
if (this.options.extensions?.block?.some((l) => (t = l.call({ lexer: this }, e, r)) ? (e = e.substring(t.raw.length), r.push(t), !0) : !1)) continue;
|
|
420
441
|
if (t = this.tokenizer.space(e)) {
|
|
@@ -477,8 +498,8 @@ ${c}` : c;
|
|
|
477
498
|
let i = e;
|
|
478
499
|
if (this.options.extensions?.startBlock) {
|
|
479
500
|
let l = 1 / 0, o = e.slice(1), a;
|
|
480
|
-
this.options.extensions.startBlock.forEach((
|
|
481
|
-
a =
|
|
501
|
+
this.options.extensions.startBlock.forEach((p) => {
|
|
502
|
+
a = p.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (l = Math.min(l, a));
|
|
482
503
|
}), l < 1 / 0 && l >= 0 && (i = e.substring(0, l + 1));
|
|
483
504
|
}
|
|
484
505
|
if (this.state.top && (t = this.tokenizer.paragraph(i))) {
|
|
@@ -556,7 +577,7 @@ ${c}` : c;
|
|
|
556
577
|
e = e.substring(a.raw.length), r.push(a);
|
|
557
578
|
continue;
|
|
558
579
|
}
|
|
559
|
-
if (a = this.tokenizer.del(e)) {
|
|
580
|
+
if (a = this.tokenizer.del(e, s, o)) {
|
|
560
581
|
e = e.substring(a.raw.length), r.push(a);
|
|
561
582
|
continue;
|
|
562
583
|
}
|
|
@@ -568,14 +589,14 @@ ${c}` : c;
|
|
|
568
589
|
e = e.substring(a.raw.length), r.push(a);
|
|
569
590
|
continue;
|
|
570
591
|
}
|
|
571
|
-
let
|
|
592
|
+
let p = e;
|
|
572
593
|
if (this.options.extensions?.startInline) {
|
|
573
|
-
let c = 1 / 0,
|
|
574
|
-
this.options.extensions.startInline.forEach((
|
|
575
|
-
u =
|
|
576
|
-
}), c < 1 / 0 && c >= 0 && (
|
|
594
|
+
let c = 1 / 0, g = e.slice(1), u;
|
|
595
|
+
this.options.extensions.startInline.forEach((f) => {
|
|
596
|
+
u = f.call({ lexer: this }, g), typeof u == "number" && u >= 0 && (c = Math.min(c, u));
|
|
597
|
+
}), c < 1 / 0 && c >= 0 && (p = e.substring(0, c + 1));
|
|
577
598
|
}
|
|
578
|
-
if (a = this.tokenizer.inlineText(
|
|
599
|
+
if (a = this.tokenizer.inlineText(p)) {
|
|
579
600
|
e = e.substring(a.raw.length), a.raw.slice(-1) !== "_" && (o = a.raw.slice(-1)), l = !0;
|
|
580
601
|
let c = r.at(-1);
|
|
581
602
|
c?.type === "text" ? (c.raw += a.raw, c.text += a.text) : r.push(a);
|
|
@@ -591,20 +612,20 @@ ${c}` : c;
|
|
|
591
612
|
}
|
|
592
613
|
return r;
|
|
593
614
|
}
|
|
594
|
-
},
|
|
615
|
+
}, C = class {
|
|
595
616
|
options;
|
|
596
617
|
parser;
|
|
597
618
|
constructor(n) {
|
|
598
|
-
this.options = n ||
|
|
619
|
+
this.options = n || R;
|
|
599
620
|
}
|
|
600
621
|
space(n) {
|
|
601
622
|
return "";
|
|
602
623
|
}
|
|
603
624
|
code({ text: n, lang: e, escaped: r }) {
|
|
604
|
-
let s = (e || "").match(
|
|
625
|
+
let s = (e || "").match(x.notSpaceStart)?.[0], t = n.replace(x.endingNewline, "") + `
|
|
605
626
|
`;
|
|
606
|
-
return s ? '<pre><code class="language-' +
|
|
607
|
-
` : "<pre><code>" + (r ? t :
|
|
627
|
+
return s ? '<pre><code class="language-' + w(s) + '">' + (r ? t : w(t, !0)) + `</code></pre>
|
|
628
|
+
` : "<pre><code>" + (r ? t : w(t, !0)) + `</code></pre>
|
|
608
629
|
`;
|
|
609
630
|
}
|
|
610
631
|
blockquote({ tokens: n }) {
|
|
@@ -682,7 +703,7 @@ ${n}</tr>
|
|
|
682
703
|
return `<em>${this.parser.parseInline(n)}</em>`;
|
|
683
704
|
}
|
|
684
705
|
codespan({ text: n }) {
|
|
685
|
-
return `<code>${
|
|
706
|
+
return `<code>${w(n, !0)}</code>`;
|
|
686
707
|
}
|
|
687
708
|
br(n) {
|
|
688
709
|
return "<br>";
|
|
@@ -695,20 +716,20 @@ ${n}</tr>
|
|
|
695
716
|
if (t === null) return s;
|
|
696
717
|
n = t;
|
|
697
718
|
let i = '<a href="' + n + '"';
|
|
698
|
-
return e && (i += ' title="' +
|
|
719
|
+
return e && (i += ' title="' + w(e) + '"'), i += ">" + s + "</a>", i;
|
|
699
720
|
}
|
|
700
721
|
image({ href: n, title: e, text: r, tokens: s }) {
|
|
701
722
|
s && (r = this.parser.parseInline(s, this.parser.textRenderer));
|
|
702
723
|
let t = se(n);
|
|
703
|
-
if (t === null) return
|
|
724
|
+
if (t === null) return w(r);
|
|
704
725
|
n = t;
|
|
705
|
-
let i = `<img src="${n}" alt="${r}"`;
|
|
706
|
-
return e && (i += ` title="${
|
|
726
|
+
let i = `<img src="${n}" alt="${w(r)}"`;
|
|
727
|
+
return e && (i += ` title="${w(e)}"`), i += ">", i;
|
|
707
728
|
}
|
|
708
729
|
text(n) {
|
|
709
|
-
return "tokens" in n && n.tokens ? this.parser.parseInline(n.tokens) : "escaped" in n && n.escaped ? n.text :
|
|
730
|
+
return "tokens" in n && n.tokens ? this.parser.parseInline(n.tokens) : "escaped" in n && n.escaped ? n.text : w(n.text);
|
|
710
731
|
}
|
|
711
|
-
},
|
|
732
|
+
}, V = class {
|
|
712
733
|
strong({ text: n }) {
|
|
713
734
|
return n;
|
|
714
735
|
}
|
|
@@ -739,12 +760,12 @@ ${n}</tr>
|
|
|
739
760
|
checkbox({ raw: n }) {
|
|
740
761
|
return n;
|
|
741
762
|
}
|
|
742
|
-
},
|
|
763
|
+
}, m = class N {
|
|
743
764
|
options;
|
|
744
765
|
renderer;
|
|
745
766
|
textRenderer;
|
|
746
767
|
constructor(e) {
|
|
747
|
-
this.options = e ||
|
|
768
|
+
this.options = e || R, this.options.renderer = this.options.renderer || new C(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new V();
|
|
748
769
|
}
|
|
749
770
|
static parse(e, r) {
|
|
750
771
|
return new N(r).parse(e);
|
|
@@ -888,11 +909,11 @@ ${n}</tr>
|
|
|
888
909
|
}
|
|
889
910
|
return s;
|
|
890
911
|
}
|
|
891
|
-
},
|
|
912
|
+
}, v = class {
|
|
892
913
|
options;
|
|
893
914
|
block;
|
|
894
915
|
constructor(n) {
|
|
895
|
-
this.options = n ||
|
|
916
|
+
this.options = n || R;
|
|
896
917
|
}
|
|
897
918
|
static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
|
|
898
919
|
static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
@@ -909,22 +930,22 @@ ${n}</tr>
|
|
|
909
930
|
return n;
|
|
910
931
|
}
|
|
911
932
|
provideLexer() {
|
|
912
|
-
return this.block ?
|
|
933
|
+
return this.block ? b.lex : b.lexInline;
|
|
913
934
|
}
|
|
914
935
|
provideParser() {
|
|
915
|
-
return this.block ?
|
|
936
|
+
return this.block ? m.parse : m.parseInline;
|
|
916
937
|
}
|
|
917
|
-
},
|
|
918
|
-
defaults =
|
|
938
|
+
}, At = class {
|
|
939
|
+
defaults = j();
|
|
919
940
|
options = this.setOptions;
|
|
920
941
|
parse = this.parseMarkdown(!0);
|
|
921
942
|
parseInline = this.parseMarkdown(!1);
|
|
922
|
-
Parser =
|
|
923
|
-
Renderer =
|
|
924
|
-
TextRenderer =
|
|
925
|
-
Lexer =
|
|
926
|
-
Tokenizer =
|
|
927
|
-
Hooks =
|
|
943
|
+
Parser = m;
|
|
944
|
+
Renderer = C;
|
|
945
|
+
TextRenderer = V;
|
|
946
|
+
Lexer = b;
|
|
947
|
+
Tokenizer = B;
|
|
948
|
+
Hooks = v;
|
|
928
949
|
constructor(...n) {
|
|
929
950
|
this.use(...n);
|
|
930
951
|
}
|
|
@@ -972,51 +993,51 @@ ${n}</tr>
|
|
|
972
993
|
}
|
|
973
994
|
"childTokens" in t && t.childTokens && (e.childTokens[t.name] = t.childTokens);
|
|
974
995
|
}), s.extensions = e), r.renderer) {
|
|
975
|
-
let t = this.defaults.renderer || new
|
|
996
|
+
let t = this.defaults.renderer || new C(this.defaults);
|
|
976
997
|
for (let i in r.renderer) {
|
|
977
998
|
if (!(i in t)) throw new Error(`renderer '${i}' does not exist`);
|
|
978
999
|
if (["options", "parser"].includes(i)) continue;
|
|
979
1000
|
let l = i, o = r.renderer[l], a = t[l];
|
|
980
|
-
t[l] = (...
|
|
981
|
-
let c = o.apply(t,
|
|
982
|
-
return c === !1 && (c = a.apply(t,
|
|
1001
|
+
t[l] = (...p) => {
|
|
1002
|
+
let c = o.apply(t, p);
|
|
1003
|
+
return c === !1 && (c = a.apply(t, p)), c || "";
|
|
983
1004
|
};
|
|
984
1005
|
}
|
|
985
1006
|
s.renderer = t;
|
|
986
1007
|
}
|
|
987
1008
|
if (r.tokenizer) {
|
|
988
|
-
let t = this.defaults.tokenizer || new
|
|
1009
|
+
let t = this.defaults.tokenizer || new B(this.defaults);
|
|
989
1010
|
for (let i in r.tokenizer) {
|
|
990
1011
|
if (!(i in t)) throw new Error(`tokenizer '${i}' does not exist`);
|
|
991
1012
|
if (["options", "rules", "lexer"].includes(i)) continue;
|
|
992
1013
|
let l = i, o = r.tokenizer[l], a = t[l];
|
|
993
|
-
t[l] = (...
|
|
994
|
-
let c = o.apply(t,
|
|
995
|
-
return c === !1 && (c = a.apply(t,
|
|
1014
|
+
t[l] = (...p) => {
|
|
1015
|
+
let c = o.apply(t, p);
|
|
1016
|
+
return c === !1 && (c = a.apply(t, p)), c;
|
|
996
1017
|
};
|
|
997
1018
|
}
|
|
998
1019
|
s.tokenizer = t;
|
|
999
1020
|
}
|
|
1000
1021
|
if (r.hooks) {
|
|
1001
|
-
let t = this.defaults.hooks || new
|
|
1022
|
+
let t = this.defaults.hooks || new v();
|
|
1002
1023
|
for (let i in r.hooks) {
|
|
1003
1024
|
if (!(i in t)) throw new Error(`hook '${i}' does not exist`);
|
|
1004
1025
|
if (["options", "block"].includes(i)) continue;
|
|
1005
1026
|
let l = i, o = r.hooks[l], a = t[l];
|
|
1006
|
-
|
|
1007
|
-
if (this.defaults.async &&
|
|
1008
|
-
let
|
|
1009
|
-
return a.call(t,
|
|
1027
|
+
v.passThroughHooks.has(i) ? t[l] = (p) => {
|
|
1028
|
+
if (this.defaults.async && v.passThroughHooksRespectAsync.has(i)) return (async () => {
|
|
1029
|
+
let g = await o.call(t, p);
|
|
1030
|
+
return a.call(t, g);
|
|
1010
1031
|
})();
|
|
1011
|
-
let c = o.call(t,
|
|
1032
|
+
let c = o.call(t, p);
|
|
1012
1033
|
return a.call(t, c);
|
|
1013
|
-
} : t[l] = (...
|
|
1034
|
+
} : t[l] = (...p) => {
|
|
1014
1035
|
if (this.defaults.async) return (async () => {
|
|
1015
|
-
let
|
|
1016
|
-
return
|
|
1036
|
+
let g = await o.apply(t, p);
|
|
1037
|
+
return g === !1 && (g = await a.apply(t, p)), g;
|
|
1017
1038
|
})();
|
|
1018
|
-
let c = o.apply(t,
|
|
1019
|
-
return c === !1 && (c = a.apply(t,
|
|
1039
|
+
let c = o.apply(t, p);
|
|
1040
|
+
return c === !1 && (c = a.apply(t, p)), c;
|
|
1020
1041
|
};
|
|
1021
1042
|
}
|
|
1022
1043
|
s.hooks = t;
|
|
@@ -1035,10 +1056,10 @@ ${n}</tr>
|
|
|
1035
1056
|
return this.defaults = { ...this.defaults, ...n }, this;
|
|
1036
1057
|
}
|
|
1037
1058
|
lexer(n, e) {
|
|
1038
|
-
return
|
|
1059
|
+
return b.lex(n, e ?? this.defaults);
|
|
1039
1060
|
}
|
|
1040
1061
|
parser(n, e) {
|
|
1041
|
-
return
|
|
1062
|
+
return m.parse(n, e ?? this.defaults);
|
|
1042
1063
|
}
|
|
1043
1064
|
parseMarkdown(n) {
|
|
1044
1065
|
return (e, r) => {
|
|
@@ -1047,16 +1068,16 @@ ${n}</tr>
|
|
|
1047
1068
|
if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
|
|
1048
1069
|
if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1049
1070
|
if (t.hooks && (t.hooks.options = t, t.hooks.block = n), t.async) return (async () => {
|
|
1050
|
-
let l = t.hooks ? await t.hooks.preprocess(e) : e, o = await (t.hooks ? await t.hooks.provideLexer() : n ?
|
|
1071
|
+
let l = t.hooks ? await t.hooks.preprocess(e) : e, o = await (t.hooks ? await t.hooks.provideLexer() : n ? b.lex : b.lexInline)(l, t), a = t.hooks ? await t.hooks.processAllTokens(o) : o;
|
|
1051
1072
|
t.walkTokens && await Promise.all(this.walkTokens(a, t.walkTokens));
|
|
1052
|
-
let
|
|
1053
|
-
return t.hooks ? await t.hooks.postprocess(
|
|
1073
|
+
let p = await (t.hooks ? await t.hooks.provideParser() : n ? m.parse : m.parseInline)(a, t);
|
|
1074
|
+
return t.hooks ? await t.hooks.postprocess(p) : p;
|
|
1054
1075
|
})().catch(i);
|
|
1055
1076
|
try {
|
|
1056
1077
|
t.hooks && (e = t.hooks.preprocess(e));
|
|
1057
|
-
let l = (t.hooks ? t.hooks.provideLexer() : n ?
|
|
1078
|
+
let l = (t.hooks ? t.hooks.provideLexer() : n ? b.lex : b.lexInline)(e, t);
|
|
1058
1079
|
t.hooks && (l = t.hooks.processAllTokens(l)), t.walkTokens && this.walkTokens(l, t.walkTokens);
|
|
1059
|
-
let o = (t.hooks ? t.hooks.provideParser() : n ?
|
|
1080
|
+
let o = (t.hooks ? t.hooks.provideParser() : n ? m.parse : m.parseInline)(l, t);
|
|
1060
1081
|
return t.hooks && (o = t.hooks.postprocess(o)), o;
|
|
1061
1082
|
} catch (l) {
|
|
1062
1083
|
return i(l);
|
|
@@ -1067,46 +1088,46 @@ ${n}</tr>
|
|
|
1067
1088
|
return (r) => {
|
|
1068
1089
|
if (r.message += `
|
|
1069
1090
|
Please report this to https://github.com/markedjs/marked.`, n) {
|
|
1070
|
-
let s = "<p>An error occurred:</p><pre>" +
|
|
1091
|
+
let s = "<p>An error occurred:</p><pre>" + w(r.message + "", !0) + "</pre>";
|
|
1071
1092
|
return e ? Promise.resolve(s) : s;
|
|
1072
1093
|
}
|
|
1073
1094
|
if (e) return Promise.reject(r);
|
|
1074
1095
|
throw r;
|
|
1075
1096
|
};
|
|
1076
1097
|
}
|
|
1077
|
-
},
|
|
1078
|
-
function
|
|
1079
|
-
return
|
|
1098
|
+
}, $ = new At();
|
|
1099
|
+
function k(n, e) {
|
|
1100
|
+
return $.parse(n, e);
|
|
1080
1101
|
}
|
|
1081
|
-
|
|
1082
|
-
return
|
|
1102
|
+
k.options = k.setOptions = function(n) {
|
|
1103
|
+
return $.setOptions(n), k.defaults = $.defaults, oe(k.defaults), k;
|
|
1083
1104
|
};
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
return
|
|
1105
|
+
k.getDefaults = j;
|
|
1106
|
+
k.defaults = R;
|
|
1107
|
+
k.use = function(...n) {
|
|
1108
|
+
return $.use(...n), k.defaults = $.defaults, oe(k.defaults), k;
|
|
1088
1109
|
};
|
|
1089
|
-
|
|
1090
|
-
return
|
|
1110
|
+
k.walkTokens = function(n, e) {
|
|
1111
|
+
return $.walkTokens(n, e);
|
|
1091
1112
|
};
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
var
|
|
1113
|
+
k.parseInline = $.parseInline;
|
|
1114
|
+
k.Parser = m;
|
|
1115
|
+
k.parser = m.parse;
|
|
1116
|
+
k.Renderer = C;
|
|
1117
|
+
k.TextRenderer = V;
|
|
1118
|
+
k.Lexer = b;
|
|
1119
|
+
k.lexer = b.lex;
|
|
1120
|
+
k.Tokenizer = B;
|
|
1121
|
+
k.Hooks = v;
|
|
1122
|
+
k.parse = k;
|
|
1123
|
+
k.options;
|
|
1124
|
+
k.setOptions;
|
|
1125
|
+
k.use;
|
|
1126
|
+
k.walkTokens;
|
|
1127
|
+
k.parseInline;
|
|
1128
|
+
m.parse;
|
|
1129
|
+
b.lex;
|
|
1130
|
+
var vt = `
|
|
1110
1131
|
.p-skeleton {
|
|
1111
1132
|
display: block;
|
|
1112
1133
|
overflow: hidden;
|
|
@@ -1156,11 +1177,11 @@ var wt = `
|
|
|
1156
1177
|
transform: translateX(-100%);
|
|
1157
1178
|
}
|
|
1158
1179
|
}
|
|
1159
|
-
`,
|
|
1180
|
+
`, Pt = {
|
|
1160
1181
|
root: {
|
|
1161
1182
|
position: "relative"
|
|
1162
1183
|
}
|
|
1163
|
-
},
|
|
1184
|
+
}, _t = {
|
|
1164
1185
|
root: function(e) {
|
|
1165
1186
|
var r = e.props;
|
|
1166
1187
|
return ["p-skeleton p-component", {
|
|
@@ -1168,14 +1189,14 @@ var wt = `
|
|
|
1168
1189
|
"p-skeleton-animation-none": r.animation === "none"
|
|
1169
1190
|
}];
|
|
1170
1191
|
}
|
|
1171
|
-
},
|
|
1192
|
+
}, It = qe.extend({
|
|
1172
1193
|
name: "skeleton",
|
|
1173
|
-
style:
|
|
1174
|
-
classes:
|
|
1175
|
-
inlineStyles:
|
|
1176
|
-
}),
|
|
1194
|
+
style: vt,
|
|
1195
|
+
classes: _t,
|
|
1196
|
+
inlineStyles: Pt
|
|
1197
|
+
}), Lt = {
|
|
1177
1198
|
name: "BaseSkeleton",
|
|
1178
|
-
extends:
|
|
1199
|
+
extends: Ze,
|
|
1179
1200
|
props: {
|
|
1180
1201
|
shape: {
|
|
1181
1202
|
type: String,
|
|
@@ -1202,7 +1223,7 @@ var wt = `
|
|
|
1202
1223
|
default: "wave"
|
|
1203
1224
|
}
|
|
1204
1225
|
},
|
|
1205
|
-
style:
|
|
1226
|
+
style: It,
|
|
1206
1227
|
provide: function() {
|
|
1207
1228
|
return {
|
|
1208
1229
|
$pcSkeleton: this,
|
|
@@ -1210,34 +1231,34 @@ var wt = `
|
|
|
1210
1231
|
};
|
|
1211
1232
|
}
|
|
1212
1233
|
};
|
|
1213
|
-
function
|
|
1234
|
+
function P(n) {
|
|
1214
1235
|
"@babel/helpers - typeof";
|
|
1215
|
-
return
|
|
1236
|
+
return P = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1216
1237
|
return typeof e;
|
|
1217
1238
|
} : function(e) {
|
|
1218
1239
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1219
|
-
},
|
|
1240
|
+
}, P(n);
|
|
1220
1241
|
}
|
|
1221
|
-
function
|
|
1222
|
-
return (e =
|
|
1242
|
+
function Bt(n, e, r) {
|
|
1243
|
+
return (e = Ct(e)) in n ? Object.defineProperty(n, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = r, n;
|
|
1223
1244
|
}
|
|
1224
|
-
function
|
|
1225
|
-
var e =
|
|
1226
|
-
return
|
|
1245
|
+
function Ct(n) {
|
|
1246
|
+
var e = Et(n, "string");
|
|
1247
|
+
return P(e) == "symbol" ? e : e + "";
|
|
1227
1248
|
}
|
|
1228
|
-
function
|
|
1229
|
-
if (
|
|
1249
|
+
function Et(n, e) {
|
|
1250
|
+
if (P(n) != "object" || !n) return n;
|
|
1230
1251
|
var r = n[Symbol.toPrimitive];
|
|
1231
1252
|
if (r !== void 0) {
|
|
1232
1253
|
var s = r.call(n, e);
|
|
1233
|
-
if (
|
|
1254
|
+
if (P(s) != "object") return s;
|
|
1234
1255
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1235
1256
|
}
|
|
1236
1257
|
return (e === "string" ? String : Number)(n);
|
|
1237
1258
|
}
|
|
1238
|
-
var
|
|
1259
|
+
var we = {
|
|
1239
1260
|
name: "Skeleton",
|
|
1240
|
-
extends:
|
|
1261
|
+
extends: Lt,
|
|
1241
1262
|
inheritAttrs: !1,
|
|
1242
1263
|
computed: {
|
|
1243
1264
|
containerStyle: function() {
|
|
@@ -1252,52 +1273,52 @@ var me = {
|
|
|
1252
1273
|
};
|
|
1253
1274
|
},
|
|
1254
1275
|
dataP: function() {
|
|
1255
|
-
return
|
|
1276
|
+
return De(Bt({}, this.shape, this.shape));
|
|
1256
1277
|
}
|
|
1257
1278
|
}
|
|
1258
|
-
},
|
|
1259
|
-
function
|
|
1260
|
-
return
|
|
1279
|
+
}, qt = ["data-p"];
|
|
1280
|
+
function Zt(n, e, r, s, t, i) {
|
|
1281
|
+
return D(), ae("div", $e({
|
|
1261
1282
|
class: n.cx("root"),
|
|
1262
1283
|
style: [n.sx("root"), i.containerStyle],
|
|
1263
1284
|
"aria-hidden": "true"
|
|
1264
1285
|
}, n.ptmi("root"), {
|
|
1265
1286
|
"data-p": i.dataP
|
|
1266
|
-
}), null, 16,
|
|
1287
|
+
}), null, 16, qt);
|
|
1267
1288
|
}
|
|
1268
|
-
|
|
1269
|
-
const
|
|
1289
|
+
we.render = Zt;
|
|
1290
|
+
const Ot = /* @__PURE__ */ Re({
|
|
1270
1291
|
__name: "LegalDocument",
|
|
1271
1292
|
props: {
|
|
1272
1293
|
classes: { default: "" },
|
|
1273
1294
|
documentEndpoint: {}
|
|
1274
1295
|
},
|
|
1275
1296
|
setup(n) {
|
|
1276
|
-
const e = Ce(), r =
|
|
1277
|
-
|
|
1297
|
+
const e = Ce(), r = Te("legal-document"), { data: s, isLoading: t } = Be.query(
|
|
1298
|
+
ze(`${e.legalEndpoint}/${n.documentEndpoint}`)
|
|
1278
1299
|
);
|
|
1279
|
-
|
|
1300
|
+
Ae(s, () => {
|
|
1280
1301
|
i(s);
|
|
1281
|
-
}),
|
|
1302
|
+
}), ve(() => {
|
|
1282
1303
|
i(s);
|
|
1283
1304
|
});
|
|
1284
1305
|
function i(l) {
|
|
1285
|
-
l.value && (r.value.innerHTML =
|
|
1306
|
+
l.value && (r.value.innerHTML = k.parse(l.value), Ee(r.value));
|
|
1286
1307
|
}
|
|
1287
|
-
return (l, o) => (
|
|
1288
|
-
ee(t) ? (
|
|
1308
|
+
return (l, o) => (D(), ae("section", null, [
|
|
1309
|
+
ee(t) ? (D(), Pe(ee(we), {
|
|
1289
1310
|
key: 0,
|
|
1290
1311
|
width: "100%",
|
|
1291
1312
|
height: "10rem"
|
|
1292
|
-
})) :
|
|
1293
|
-
|
|
1313
|
+
})) : _e("", !0),
|
|
1314
|
+
Ie("div", {
|
|
1294
1315
|
id: "legal-document",
|
|
1295
1316
|
ref: "legal-document",
|
|
1296
|
-
class:
|
|
1317
|
+
class: Le(["m-1 items-center gap-x-4 rounded-xl bg-white dark:bg-gray-900 p-6 shadow-lg outline outline-black/5 dark:outline-white/10", n.classes])
|
|
1297
1318
|
}, null, 2)
|
|
1298
1319
|
]));
|
|
1299
1320
|
}
|
|
1300
1321
|
});
|
|
1301
1322
|
export {
|
|
1302
|
-
|
|
1323
|
+
Ot as default
|
|
1303
1324
|
};
|