@likec4/core 1.49.0 → 1.50.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/THIRD-PARTY-LICENSES.md +24 -2
- package/dist/_chunks/Builder.view-element.mjs +2 -2
- package/dist/_chunks/LikeC4Model.d.mts +3 -3
- package/dist/_chunks/_types.d.mts +1 -1
- package/dist/_chunks/_types2.d.mts +2 -2
- package/dist/_chunks/assignTagColors.mjs +1 -1
- package/dist/_chunks/geometry.mjs +1 -0
- package/dist/_chunks/index.d.mts +1964 -219
- package/dist/_chunks/{theme.d.mts → index3.d.mts} +1 -1
- package/dist/_chunks/index4.d.mts +288 -0
- package/dist/_chunks/{to-text.d.mts → index5.d.mts} +1 -1
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +2 -2
- package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -1
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -1
- package/dist/_chunks/libs/bail.mjs +1 -1
- package/dist/_chunks/libs/ccount.mjs +1 -1
- package/dist/_chunks/libs/character-entities-html4.mjs +1 -1
- package/dist/_chunks/libs/character-entities-legacy.mjs +1 -1
- package/dist/_chunks/libs/character-entities.mjs +2 -2
- package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -1
- package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -1
- package/dist/_chunks/libs/defu.mjs +1 -1
- package/dist/_chunks/libs/devlop.mjs +1 -1
- package/dist/_chunks/libs/escape-string-regexp.mjs +1 -1
- package/dist/_chunks/libs/extend.mjs +1 -1
- package/dist/_chunks/libs/graphology-dag.mjs +1 -1
- package/dist/_chunks/libs/graphology.mjs +1 -1
- package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -1
- package/dist/_chunks/libs/hast-util-to-html.mjs +2 -2
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -1
- package/dist/_chunks/libs/longest-streak.mjs +1 -1
- package/dist/_chunks/libs/markdown-table.mjs +2 -2
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -1
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +2 -2
- package/dist/_chunks/libs/mdast-util-gfm.mjs +9 -9
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +7 -7
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -1
- package/dist/_chunks/libs/mnemonist.mjs +1 -1
- package/dist/_chunks/libs/natural-compare-lite.mjs +2 -2
- package/dist/_chunks/libs/ohash.mjs +1 -1
- package/dist/_chunks/libs/rehype-sanitize.mjs +1 -1
- package/dist/_chunks/libs/rehype-stringify.mjs +1 -1
- package/dist/_chunks/libs/remark-gfm.mjs +1 -1
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +2 -2
- package/dist/_chunks/libs/remark-parse.mjs +1 -1
- package/dist/_chunks/libs/remark-rehype.mjs +1 -1
- package/dist/_chunks/libs/remeda.mjs +2 -1
- package/dist/_chunks/libs/trough.mjs +1 -1
- package/dist/_chunks/libs/unified.mjs +1 -1
- package/dist/_chunks/manual-layout.mjs +1 -0
- package/dist/_chunks/mnemonist.d.mts +1 -0
- package/dist/_chunks/model.mjs +4 -0
- package/dist/_chunks/rolldown-runtime.mjs +1 -1
- package/dist/_chunks/types.mjs +1 -0
- package/dist/_chunks/utils.mjs +1 -0
- package/dist/builder/index.d.mts +5 -2
- package/dist/builder/index.mjs +1 -1
- package/dist/compute-view/index.d.mts +6 -5
- package/dist/compute-view/index.mjs +2 -2
- package/dist/geometry/index.d.mts +1 -1
- package/dist/geometry/index.mjs +1 -1
- package/dist/index.d.mts +5 -7
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +7 -4
- package/dist/model/index.mjs +1 -1
- package/dist/styles/index.d.mts +3 -2
- package/dist/styles/index.mjs +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.mjs +1 -1
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +4 -2
- package/dist/utils/index.mjs +1 -1
- package/package.json +10 -10
- package/dist/_chunks/RichText.mjs +0 -1
- package/dist/_chunks/calcDriftsFromSnapshot.mjs +0 -1
- package/dist/_chunks/guards.d.mts +0 -2026
- package/dist/_chunks/guards.mjs +0 -4
- package/dist/_chunks/to-text.mjs +0 -1
- package/dist/_chunks/vector.mjs +0 -1
- /package/dist/_chunks/{vector.d.mts → index2.d.mts} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{t as
|
|
2
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?
|
|
3
|
-
`&&
|
|
4
|
-
`}function
|
|
1
|
+
import{t as e}from"./ccount.mjs";import"./devlop.mjs";import{d as t,l as n,u as r,v as i,y as a}from"./mdast-util-from-markdown.mjs";import{i as o,n as s,r as c,t as l}from"./mdast-util-find-and-replace.mjs";import{t as u}from"./markdown-table.mjs";import{t as d}from"./longest-streak.mjs";const f=`phrasing`,p=[`autolink`,`link`,`image`,`label`];function ee(){return{transforms:[ie],enter:{literalAutolink:ne,literalAutolinkEmail:m,literalAutolinkHttp:m,literalAutolinkWww:m},exit:{literalAutolink:re,literalAutolinkEmail:_,literalAutolinkHttp:h,literalAutolinkWww:g}}}function te(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:f,notInConstruct:p},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:f,notInConstruct:p},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:f,notInConstruct:p}]}}function ne(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function m(e){this.config.enter.autolinkProtocol.call(this,e)}function h(e){this.config.exit.autolinkProtocol.call(this,e)}function g(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function _(e){this.config.exit.autolinkEmail.call(this,e)}function re(e){this.exit(e)}function ie(e){l(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ae],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,oe]],{ignore:[`link`,`linkReference`]})}function ae(e,t,n,r,i){let a=``;if(!v(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!se(n)))return!1;let o=ce(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function oe(e,t,n,r){return!v(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function se(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ce(t){let n=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!n)return[t,void 0];t=t.slice(0,n.index);let r=n[0],i=r.indexOf(`)`),a=e(t,`(`),o=e(t,`)`);for(;i!==-1&&a>o;)t+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(`)`),o++;return[t,r]}function v(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||a(n)||i(n))&&(!t||n!==47)}y.peek=_e;function le(){this.buffer()}function ue(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function de(){this.buffer()}function fe(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function pe(e){let n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=t(this.sliceSerialize(e)).toLowerCase(),r.label=n}function me(e){this.exit(e)}function he(e){let n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=t(this.sliceSerialize(e)).toLowerCase(),r.label=n}function ge(e){this.exit(e)}function _e(){return`[`}function y(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function ve(){return{enter:{gfmFootnoteCallString:le,gfmFootnoteCall:ue,gfmFootnoteDefinitionLabelString:de,gfmFootnoteDefinition:fe},exit:{gfmFootnoteCallString:pe,gfmFootnoteCall:me,gfmFootnoteDefinitionLabelString:he,gfmFootnoteDefinition:ge}}}function ye(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:y},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
2
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?b:be))),s(),o}}function be(e,t,n){return t===0?e:b(e,t,n)}function b(e,t,n){return(n?``:` `)+e}const x=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];E.peek=D;function S(){return{canContainEols:[`delete`],enter:{strikethrough:w},exit:{strikethrough:T}}}function C(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:x}],handlers:{delete:E}}}function w(e){this.enter({type:`delete`,children:[]},e)}function T(e){this.exit(e)}function E(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function D(){return`~`}({}).hasOwnProperty;function O(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),k);return i(),o}function k(e,t,n){return`>`+(n?``:` `)+e}function A(e,t){return j(e,t.inConstruct,!0)&&!j(e,t.notInConstruct,!1)}function j(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function M(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
3
|
+
`&&A(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
4
|
+
`}function N(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function xe(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Se(e,t,n,r){let i=xe(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(N(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Ce);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(d(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
5
5
|
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
6
6
|
`),a&&(u+=s.move(a+`
|
|
7
|
-
`)),u+=s.move(c),l(),u}function
|
|
8
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function
|
|
7
|
+
`)),u+=s.move(c),l(),u}function Ce(e,t,n){return(n?``:` `)+e}function P(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function we(e,t,n,r){let i=P(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
8
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Te(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function F(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function I(e,t,n){let i=r(e),a=r(t);return i===void 0?a===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}L.peek=Ee;function L(e,t,n,r){let i=Te(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=I(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=F(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=I(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+F(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Ee(e,t,n){return n.options.emphasis||`*`}function R(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),c(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}function De(e,t){let r=!1;return R(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return r=!0,s}),!!((!e.depth||e.depth<3)&&n(e)&&(t.options.setext||r))}function Oe(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(De(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
9
9
|
`,after:`
|
|
10
10
|
`});return r(),t(),o+`
|
|
11
11
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
12
12
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
13
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=
|
|
14
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:p,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(
|
|
15
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return
|
|
13
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=F(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}z.peek=ke;function z(e){return e.value||``}function ke(){return`<`}B.peek=Ae;function B(e,t,n,r){let i=P(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Ae(){return`!`}V.peek=je;function V(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function je(){return`!`}H.peek=Me;function H(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Me(){return"`"}function U(e,t){let r=n(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(r===e.url||`mailto:`+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}W.peek=Ne;function W(e,t,n,r){let i=P(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(U(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ne(e,t,n){return U(e,n)?`<`:`[`}G.peek=Pe;function G(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Pe(){return`[`}function K(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Fe(e){let t=K(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Ie(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function q(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Le(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Ie(n):K(n),s=e.ordered?o===`.`?`)`:`.`:Fe(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),q(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Re(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ze(e,t,n,r){let i=Re(n),a=n.bulletCurrent||K(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Be(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}const Ve=o([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function He(e,t,n,r){return(e.children.some(function(e){return Ve(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ue(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}J.peek=We;function J(e,t,n,r){let i=Ue(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=I(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=F(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=I(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+F(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function We(e,t,n){return n.options.strong||`*`}function Ge(e,t,n,r){return n.safe(e.value,r)}function Ke(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function qe(e,t,n){let r=(q(n)+(n.options.ruleSpaces?` `:``)).repeat(Ke(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Y={blockquote:O,break:M,code:Se,definition:we,emphasis:L,hardBreak:M,heading:Oe,html:z,image:B,imageReference:V,inlineCode:H,link:W,linkReference:G,list:Le,listItem:ze,paragraph:Be,root:He,strong:J,text:Ge,thematicBreak:qe};function Je(){return{enter:{table:Ye,tableData:Z,tableHeader:Z,tableRow:Ze},exit:{codeText:Qe,table:Xe,tableData:X,tableHeader:X,tableRow:X}}}function Ye(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Xe(e){this.exit(e),this.data.inTable=void 0}function Ze(e){this.enter({type:`tableRow`,children:[]},e)}function X(e){this.exit(e)}function Z(e){this.enter({type:`tableCell`,children:[]},e)}function Qe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Q));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Q(e,t){return t===`|`?t:e}function $e(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
14
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:p,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(d(e,n,r),e.align)}function s(e,t,n,r){let i=l([f(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
15
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return u(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=f(r[i],t,n);return o(),a}function f(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function p(e,t,n){let r=Y.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function et(){return{exit:{taskListCheckValueChecked:$,taskListCheckValueUnchecked:$,paragraph:nt}}}function tt(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:rt}}}function $(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function nt(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rt(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Y.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function it(){return[ee(),ve(),S(),Je(),et()]}function at(e){return{extensions:[te(),ye(e),C(),$e(e),tt()]}}export{at as n,R as r,it as t};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{t as
|
|
2
|
-
`}]}function
|
|
3
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function
|
|
1
|
+
import{t as e}from"./@ungap/structured-clone.mjs";import{a as t,i as n,r}from"./hast-util-sanitize.mjs";import"./devlop.mjs";import{o as i}from"./mdast-util-from-markdown.mjs";import{r as a}from"./mdast-util-gfm.mjs";function o(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function s(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
2
|
+
`}]}function c(e,t){let n=t.value?t.value+`
|
|
3
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function l(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function u(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function d(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),a=i(r.toLowerCase()),o=e.footnoteOrder.indexOf(r),s,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,c+=1,e.footnoteCounts.set(r,c);let l={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+a,id:n+`fnref-`+a+(c>1?`-`+c:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(s)}]};e.patch(t,l);let u={type:`element`,tagName:`sup`,properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function f(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function p(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function m(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function h(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return m(e,t);let a={src:i(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);let o={type:`element`,tagName:`img`,properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function g(e,t){let n={src:i(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function _(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function v(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return m(e,t);let a={href:i(r.url||``)};r.title!==null&&r.title!==void 0&&(a.title=r.title);let o={type:`element`,tagName:`a`,properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function y(e,t){let n={href:i(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function b(e,t,n){let r=e.all(t),i=n?x(n):S(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
4
4
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
5
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
5
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function x(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=S(n[r])}return t}function S(e){return e.spread??e.children.length>1}function C(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function w(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function T(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function E(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function D(e,t){let i=e.all(t),a=i.shift(),o=[];if(a){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],n),o.push(n)}if(i.length>0){let a={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(i,!0)},s=n(t.children[1]),c=r(t.children[t.children.length-1]);s&&c&&(a.position={start:s,end:c}),o.push(a)}let s={type:`element`,tagName:`table`,properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function O(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function k(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(j(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(j(t.slice(i),i>0,!1)),a.join(``)}function j(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===9||t===32;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===9||t===32;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function M(e,t){let n={type:`text`,value:A(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function N(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const P={blockquote:o,break:s,code:c,delete:l,emphasis:u,footnoteReference:d,heading:f,html:p,imageReference:h,image:g,inlineCode:_,linkReference:v,link:y,listItem:b,list:C,paragraph:w,root:T,strong:E,table:D,tableCell:k,tableRow:O,text:M,thematicBreak:N,toml:F,yaml:F,definition:F,footnoteDefinition:F};function F(){}function I(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function L(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function R(t){let n=typeof t.options.clobberPrefix==`string`?t.options.clobberPrefix:`user-content-`,r=t.options.footnoteBackContent||I,a=t.options.footnoteBackLabel||L,o=t.options.footnoteLabel||`Footnotes`,s=t.options.footnoteLabelTagName||`h2`,c=t.options.footnoteLabelProperties||{className:[`sr-only`]},l=[],u=-1;for(;++u<t.footnoteOrder.length;){let e=t.footnoteById.get(t.footnoteOrder[u]);if(!e)continue;let o=t.all(e),s=String(e.identifier).toUpperCase(),c=i(s.toLowerCase()),d=0,f=[],p=t.footnoteCounts.get(s);for(;p!==void 0&&++d<=p;){f.length>0&&f.push({type:`text`,value:` `});let e=typeof r==`string`?r:r(u,d);typeof e==`string`&&(e={type:`text`,value:e}),f.push({type:`element`,tagName:`a`,properties:{href:`#`+n+`fnref-`+c+(d>1?`-`+d:``),dataFootnoteBackref:``,ariaLabel:typeof a==`string`?a:a(u,d),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let m=o[o.length-1];if(m&&m.type===`element`&&m.tagName===`p`){let e=m.children[m.children.length-1];e&&e.type===`text`?e.value+=` `:m.children.push({type:`text`,value:` `}),m.children.push(...f)}else o.push(...f);let h={type:`element`,tagName:`li`,properties:{id:n+`fn-`+c},children:t.wrap(o,!0)};t.patch(e,h),l.push(h)}if(l.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:s,properties:{...e(c),id:`footnote-label`},children:[{type:`text`,value:o}]},{type:`text`,value:`
|
|
6
6
|
`},{type:`element`,tagName:`ol`,properties:{},children:t.wrap(l,!0)},{type:`text`,value:`
|
|
7
|
-
`}]}}const
|
|
7
|
+
`}]}}const z={}.hasOwnProperty,B={};function V(t,n){let r=n||B,i=new Map,o=new Map,s={all:l,applyData:U,definitionById:i,footnoteById:o,footnoteCounts:new Map,footnoteOrder:[],handlers:{...P,...r.handlers},one:c,options:r,patch:H,wrap:G};return a(t,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s;function c(t,n){let r=t.type,i=s.handlers[r];if(z.call(s.handlers,r)&&i)return i(s,t,n);if(s.options.passThrough&&s.options.passThrough.includes(r)){if(`children`in t){let{children:n,...r}=t,i=e(r);return i.children=s.all(t),i}return e(t)}return(s.options.unknownHandler||W)(s,t,n)}function l(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=s.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=K(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=K(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function H(e,n){e.position&&(n.position=t(e))}function U(t,n){let r=n;if(t&&t.data){let n=t.data.hName,i=t.data.hChildren,a=t.data.hProperties;typeof n==`string`&&(r.type===`element`?r.tagName=n:r={type:`element`,tagName:n,properties:{},children:`children`in r?r.children:[r]}),r.type===`element`&&a&&Object.assign(r.properties,e(a)),`children`in r&&r.children&&i!=null&&(r.children=i)}return r}function W(e,t){let n=t.data||{},r=`value`in t&&!(z.call(n,`hProperties`)||z.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function G(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
8
8
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
9
9
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
10
|
-
`}),n}function
|
|
11
|
-
`},i)),a}export{
|
|
10
|
+
`}),n}function K(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function q(e,t){let n=V(e,t),r=n.one(e,void 0),i=R(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
11
|
+
`},i)),a}export{q as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as unicodePunctuation,a as resolveAll,d as asciiAlpha,f as asciiAlphanumeric,g as markdownSpace,h as markdownLineEndingOrSpace,i as factorySpace,l as classifyCharacter,m as markdownLineEnding,o as combineExtensions,p as asciiControl,r as blankLine,s as splice,u as normalizeIdentifier,v as unicodeWhitespace}from"./mdast-util-from-markdown.mjs";const wwwPrefix={tokenize:tokenizeWwwPrefix,partial:!0},domain={tokenize:tokenizeDomain,partial:!0},path={tokenize:tokenizePath,partial:!0},trail={tokenize:tokenizeTrail,partial:!0},emailDomainDotTrail={tokenize:tokenizeEmailDomainDotTrail,partial:!0},wwwAutolink={name:`wwwAutolink`,tokenize:tokenizeWwwAutolink,previous:previousWww},protocolAutolink={name:`protocolAutolink`,tokenize:tokenizeProtocolAutolink,previous:previousProtocol},emailAutolink={name:`emailAutolink`,tokenize:tokenizeEmailAutolink,previous:previousEmail},text={};function gfmAutolinkLiteral(){return{text}}let code=48;for(;code<123;)text[code]=emailAutolink,code++,code===58?code=65:code===91&&(code=97);text[43]=emailAutolink,text[45]=emailAutolink,text[46]=emailAutolink,text[95]=emailAutolink,text[72]=[emailAutolink,protocolAutolink],text[104]=[emailAutolink,protocolAutolink],text[87]=[emailAutolink,wwwAutolink],text[119]=[emailAutolink,wwwAutolink];function tokenizeEmailAutolink(e,t,i){let a=this,o,s;return c;function c(t){return!gfmAtext(t)||!previousEmail.call(a,a.previous)||previousUnbalanced(a.events)?i(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),l(t))}function l(t){return gfmAtext(t)?(e.consume(t),l):t===64?(e.consume(t),u):i(t)}function u(t){return t===46?e.check(emailDomainDotTrail,f,d)(t):t===45||t===95||asciiAlphanumeric(t)?(s=!0,e.consume(t),u):f(t)}function d(t){return e.consume(t),o=!0,u}function f(r){return s&&o&&asciiAlpha(a.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(r)):i(r)}}function tokenizeWwwAutolink(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!previousWww.call(r,r.previous)||previousUnbalanced(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(wwwPrefix,e.attempt(domain,e.attempt(path,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function tokenizeProtocolAutolink(t,r,i){let o=this,s=``,c=!1;return l;function l(e){return(e===72||e===104)&&previousProtocol.call(o,o.previous)&&!previousUnbalanced(o.events)?(t.enter(`literalAutolink`),t.enter(`literalAutolinkHttp`),s+=String.fromCodePoint(e),t.consume(e),d):i(e)}function d(e){if(asciiAlpha(e)&&s.length<5)return s+=String.fromCodePoint(e),t.consume(e),d;if(e===58){let n=s.toLowerCase();if(n===`http`||n===`https`)return t.consume(e),f}return i(e)}function f(e){return e===47?(t.consume(e),c?p:(c=!0,f)):i(e)}function p(n){return n===null||asciiControl(n)||markdownLineEndingOrSpace(n)||unicodeWhitespace(n)||unicodePunctuation(n)?i(n):t.attempt(domain,t.attempt(path,h),i)(n)}function h(e){return t.exit(`literalAutolinkHttp`),t.exit(`literalAutolink`),r(e)}}function tokenizeWwwPrefix(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function tokenizeDomain(t,n,r){let i,o,s;return c;function c(n){return n===46||n===95?t.check(trail,u,l)(n):n===null||markdownLineEndingOrSpace(n)||unicodeWhitespace(n)||n!==45&&unicodePunctuation(n)?u(n):(s=!0,t.consume(n),c)}function l(e){return e===95?i=!0:(o=i,i=void 0),t.consume(e),c}function u(e){return o||i||!s?r(e):n(e)}}function tokenizePath(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(trail,t,o)(s):s===null||markdownLineEndingOrSpace(s)||unicodeWhitespace(s)?t(s):(e.consume(s),i)}function o(t){return t===41&&r++,e.consume(t),i}}function tokenizeTrail(e,t,r){return i;function i(n){return n===33||n===34||n===39||n===41||n===42||n===44||n===46||n===58||n===59||n===63||n===95||n===126?(e.consume(n),i):n===38?(e.consume(n),s):n===93?(e.consume(n),o):n===60||n===null||markdownLineEndingOrSpace(n)||unicodeWhitespace(n)?t(n):r(n)}function o(e){return e===null||e===40||e===91||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?t(e):i(e)}function s(e){return asciiAlpha(e)?c(e):r(e)}function c(t){return t===59?(e.consume(t),i):asciiAlpha(t)?(e.consume(t),c):r(t)}}function tokenizeEmailDomainDotTrail(e,t,n){return i;function i(t){return e.consume(t),a}function a(e){return asciiAlphanumeric(e)?n(e):t(e)}}function previousWww(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||markdownLineEndingOrSpace(e)}function previousProtocol(e){return!asciiAlpha(e)}function previousEmail(e){return!(e===47||gfmAtext(e))}function gfmAtext(e){return e===43||e===45||e===46||e===95||asciiAlphanumeric(e)}function previousUnbalanced(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const indent={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation},exit:gfmFootnoteDefinitionEnd}},text:{91:{name:`gfmFootnoteCall`,tokenize:tokenizeGfmFootnoteCall},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=normalizeIdentifier(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function resolveToPotentialGfmFootnoteCall(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function tokenizeGfmFootnoteCall(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,s;return c;function c(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(c){if(o>999||c===93&&!s||c===null||c===91||markdownLineEndingOrSpace(c))return n(c);if(c===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(normalizeIdentifier(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(c),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(c)}return markdownLineEndingOrSpace(c)||(s=!0),o++,e.consume(c),c===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}}function tokenizeDefinitionStart(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s,c=0,l;return u;function u(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),d}function d(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,f):n(t)}function f(t){if(c>999||t===93&&!l||t===null||t===91||markdownLineEndingOrSpace(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return s=normalizeIdentifier(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),h}return markdownLineEndingOrSpace(t)||(l=!0),c++,e.consume(t),t===92?m:f}function m(t){return t===91||t===92||t===93?(e.consume(t),c++,f):f(t)}function h(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(s)||i.push(s),factorySpace(e,g,`gfmFootnoteDefinitionWhitespace`)):n(t)}function g(e){return t(e)}}function tokenizeDefinitionContinuation(e,t,n){return e.check(blankLine,t,e.attempt(indent,t,n))}function gfmFootnoteDefinitionEnd(e){e.exit(`gfmFootnoteDefinition`)}function tokenizeIndent(e,t,n){let r=this;return factorySpace(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function gfmStrikethrough(e){let n=(e||{}).singleTilde,r={name:`strikethrough`,tokenize:a,resolveAll:i};return n??=!0,{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(e,n){let r=-1;for(;++r<e.length;)if(e[r][0]===`enter`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._close){let i=r;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`strikethroughSequenceTemporary`&&e[i][1]._open&&e[r][1].end.offset-e[r][1].start.offset===e[i][1].end.offset-e[i][1].start.offset){e[r][1].type=`strikethroughSequence`,e[i][1].type=`strikethroughSequence`;let a={type:`strikethrough`,start:Object.assign({},e[i][1].start),end:Object.assign({},e[r][1].end)},o={type:`strikethroughText`,start:Object.assign({},e[i][1].end),end:Object.assign({},e[r][1].start)},s=[[`enter`,a,n],[`enter`,e[i][1],n],[`exit`,e[i][1],n],[`enter`,o,n]],c=n.parser.constructs.insideSpan.null;c&&splice(s,s.length,0,resolveAll(c,e.slice(i+1,r),n)),splice(s,s.length,0,[[`exit`,o,n],[`enter`,e[r][1],n],[`exit`,e[r][1],n],[`exit`,a,n]]),splice(e,i-1,r-i+3,s),r=i+s.length-2;break}}for(r=-1;++r<e.length;)e[r][1].type===`strikethroughSequenceTemporary`&&(e[r][1].type=`data`);return e}function a(e,t,r){let i=this.previous,a=this.events,o=0;return c;function c(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),l(t))}function l(a){let c=classifyCharacter(i);if(a===126)return o>1?r(a):(e.consume(a),o++,l);if(o<2&&!n)return r(a);let u=e.exit(`strikethroughSequenceTemporary`),d=classifyCharacter(a);return u._open=!d||d===2&&!!c,u._close=!c||c===2&&!!d,t(a)}}}var EditMap=class{constructor(){this.map=[]}add(e,t,n){addImplementation(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function addImplementation(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function gfmTableAlign(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function gfmTable(){return{flow:{null:{name:`table`,tokenize:tokenizeTable,resolveAll:resolveTable}}}}function tokenizeTable(e,t,n){let r=this,s=0,l=0,u;return d;function d(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?E:f;return a===E&&r.parser.lazy[r.now().line]?n(e):a(e)}function f(t){return e.enter(`tableHead`),e.enter(`tableRow`),p(t)}function p(e){return e===124?m(e):(u=!0,l+=1,m(e))}function m(t){return t===null?n(t):markdownLineEnding(t)?l>1?(l=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_):n(t):markdownSpace(t)?factorySpace(e,m,`whitespace`)(t):(l+=1,u&&(u=!1,s+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),u=!0,m):(e.enter(`data`),h(t)))}function h(t){return t===null||t===124||markdownLineEndingOrSpace(t)?(e.exit(`data`),m(t)):(e.consume(t),t===92?g:h)}function g(t){return t===92||t===124?(e.consume(t),h):h(t)}function _(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),u=!1,markdownSpace(t)?factorySpace(e,v,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):v(t))}function v(t){return t===45||t===58?b(t):t===124?(u=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),y):T(t)}function y(t){return markdownSpace(t)?factorySpace(e,b,`whitespace`)(t):b(t)}function b(t){return t===58?(l+=1,u=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),x):t===45?(l+=1,x(t)):t===null||markdownLineEnding(t)?w(t):T(t)}function x(t){return t===45?(e.enter(`tableDelimiterFiller`),S(t)):T(t)}function S(t){return t===45?(e.consume(t),S):t===58?(u=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),C):(e.exit(`tableDelimiterFiller`),C(t))}function C(t){return markdownSpace(t)?factorySpace(e,w,`whitespace`)(t):w(t)}function w(n){return n===124?v(n):n===null||markdownLineEnding(n)?!u||s!==l?T(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):T(n)}function T(e){return n(e)}function E(t){return e.enter(`tableRow`),D(t)}function D(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),D):n===null||markdownLineEnding(n)?(e.exit(`tableRow`),t(n)):markdownSpace(n)?factorySpace(e,D,`whitespace`)(n):(e.enter(`data`),O(n))}function O(t){return t===null||t===124||markdownLineEndingOrSpace(t)?(e.exit(`data`),D(t)):(e.consume(t),t===92?k:O)}function k(t){return t===92||t===124?(e.consume(t),O):O(t)}}function resolveTable(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new EditMap;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(flushTableEnd(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=flushCell(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=flushCell(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=flushCell(f,t,o,i,n,d)):(o[0]=o[1],d=flushCell(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&flushTableEnd(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=gfmTableAlign(t.events,n))}return e}function flushCell(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},getPoint(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=getPoint(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=getPoint(t.events,n[2]),a=getPoint(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},getPoint(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function flushTableEnd(e,t,n,r,i){let a=[],o=getPoint(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function getPoint(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}const tasklistCheck={name:`tasklistCheck`,tokenize:tokenizeTasklistCheck};function gfmTaskListItem(){return{text:{91:tasklistCheck}}}function tokenizeTasklistCheck(e,t,n){let r=this;return o;function o(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),s)}function s(t){return markdownLineEndingOrSpace(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),l):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),l):n(t)}function l(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),u):n(t)}function u(r){return markdownLineEnding(r)?t(r):markdownSpace(r)?e.check({tokenize:spaceThenNonSpace},t,n)(r):n(r)}}function spaceThenNonSpace(e,t,n){return factorySpace(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function gfm(e){return combineExtensions([gfmAutolinkLiteral(),gfmFootnote(),gfmStrikethrough(e),gfmTable(),gfmTaskListItem()])}export{gfm as t};
|
|
1
|
+
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,m as c,p as l,r as u,s as d,u as f,v as p,y as m}from"./mdast-util-from-markdown.mjs";const h={tokenize:k,partial:!0},g={tokenize:ee,partial:!0},_={tokenize:te,partial:!0},v={tokenize:ne,partial:!0},y={tokenize:A,partial:!0},b={name:`wwwAutolink`,tokenize:D,previous:j},x={name:`protocolAutolink`,tokenize:O,previous:M},S={name:`emailAutolink`,tokenize:E,previous:N},C={};function w(){return{text:C}}let T=48;for(;T<123;)C[T]=S,T++,T===58?T=65:T===91&&(T=97);C[43]=S,C[45]=S,C[46]=S,C[95]=S,C[72]=[S,x],C[104]=[S,x],C[87]=[S,b],C[119]=[S,b];function E(e,t,n){let r=this,a,o;return s;function s(t){return!P(t)||!N.call(r,r.previous)||F(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),c(t))}function c(t){return P(t)?(e.consume(t),c):t===64?(e.consume(t),u):n(t)}function u(t){return t===46?e.check(y,f,d)(t):t===45||t===95||l(t)?(o=!0,e.consume(t),u):f(t)}function d(t){return e.consume(t),a=!0,u}function f(s){return o&&a&&i(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(s)):n(s)}}function D(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!j.call(r,r.previous)||F(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(h,e.attempt(g,e.attempt(_,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function O(e,t,n){let r=this,o=``,s=!1;return l;function l(t){return(t===72||t===104)&&M.call(r,r.previous)&&!F(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),o+=String.fromCodePoint(t),e.consume(t),u):n(t)}function u(t){if(i(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),u;if(t===58){let n=o.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),d}return n(t)}function d(t){return t===47?(e.consume(t),s?f:(s=!0,d)):n(t)}function f(t){return t===null||c(t)||a(t)||m(t)||p(t)?n(t):e.attempt(g,e.attempt(_,h),n)(t)}function h(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function k(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function ee(e,t,n){let r,i,o;return s;function s(t){return t===46||t===95?e.check(v,l,c)(t):t===null||a(t)||m(t)||t!==45&&p(t)?l(t):(o=!0,e.consume(t),s)}function c(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),s}function l(e){return i||r||!o?n(e):t(e)}}function te(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(v,t,o)(s):s===null||a(s)||m(s)?t(s):(e.consume(s),i)}function o(t){return t===41&&r++,e.consume(t),i}}function ne(e,t,n){return r;function r(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===63||i===95||i===126?(e.consume(i),r):i===38?(e.consume(i),s):i===93?(e.consume(i),o):i===60||i===null||a(i)||m(i)?t(i):n(i)}function o(e){return e===null||e===40||e===91||a(e)||m(e)?t(e):r(e)}function s(e){return i(e)?c(e):n(e)}function c(t){return t===59?(e.consume(t),r):i(t)?(e.consume(t),c):n(t)}}function A(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return l(e)?n(e):t(e)}}function j(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||a(e)}function M(e){return!i(e)}function N(e){return!(e===47||P(e))}function P(e){return e===43||e===45||e===46||e===95||l(e)}function F(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const I={tokenize:W,partial:!0};function L(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:V,continuation:{tokenize:H},exit:U}},text:{91:{name:`gfmFootnoteCall`,tokenize:B},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:R,resolveTo:z}}}}function R(e,t,n){let i=this,a=i.events.length,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),s;for(;a--;){let e=i.events[a][1];if(e.type===`labelImage`){s=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return c;function c(a){if(!s||!s._balanced)return n(a);let c=r(i.sliceSerialize({start:s.end,end:i.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(a):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(a),e.exit(`gfmFootnoteCallLabelMarker`),t(a))}}function z(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function B(e,t,n){let i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),s=0,c;return l;function l(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),u}function u(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,d):n(t)}function d(l){if(s>999||l===93&&!c||l===null||l===91||a(l))return n(l);if(l===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return o.includes(r(i.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(l),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(l)}return a(l)||(c=!0),s++,e.consume(l),l===92?f:d}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function V(e,t,n){let i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),c,l=0,u;return d;function d(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),f}function f(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,p):n(t)}function p(t){if(l>999||t===93&&!u||t===null||t===91||a(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return c=r(i.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),h}return a(t)||(u=!0),l++,e.consume(t),t===92?m:p}function m(t){return t===91||t===92||t===93?(e.consume(t),l++,p):p(t)}function h(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),o.includes(c)||o.push(c),s(e,g,`gfmFootnoteDefinitionWhitespace`)):n(t)}function g(e){return t(e)}}function H(e,t,n){return e.check(u,t,e.attempt(I,t,n))}function U(e){e.exit(`gfmFootnoteDefinition`)}function W(e,t,n){let r=this;return s(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}({}).hasOwnProperty;function G(e){let r=(e||{}).singleTilde,i={name:`strikethrough`,tokenize:o,resolveAll:a};return r??=!0,{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function a(e,r){let i=-1;for(;++i<e.length;)if(e[i][0]===`enter`&&e[i][1].type===`strikethroughSequenceTemporary`&&e[i][1]._close){let a=i;for(;a--;)if(e[a][0]===`exit`&&e[a][1].type===`strikethroughSequenceTemporary`&&e[a][1]._open&&e[i][1].end.offset-e[i][1].start.offset===e[a][1].end.offset-e[a][1].start.offset){e[i][1].type=`strikethroughSequence`,e[a][1].type=`strikethroughSequence`;let o={type:`strikethrough`,start:Object.assign({},e[a][1].start),end:Object.assign({},e[i][1].end)},s={type:`strikethroughText`,start:Object.assign({},e[a][1].end),end:Object.assign({},e[i][1].start)},c=[[`enter`,o,r],[`enter`,e[a][1],r],[`exit`,e[a][1],r],[`enter`,s,r]],l=r.parser.constructs.insideSpan.null;l&&n(c,c.length,0,t(l,e.slice(a+1,i),r)),n(c,c.length,0,[[`exit`,s,r],[`enter`,e[i][1],r],[`exit`,e[i][1],r],[`exit`,o,r]]),n(e,a-1,i-a+3,c),i=a+c.length-2;break}}for(i=-1;++i<e.length;)e[i][1].type===`strikethroughSequenceTemporary`&&(e[i][1].type=`data`);return e}function o(e,t,n){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?n(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=f(i);if(a===126)return o>1?n(a):(e.consume(a),o++,c);if(o<2&&!r)return n(a);let l=e.exit(`strikethroughSequenceTemporary`),u=f(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,t(a)}}}var K=class{constructor(){this.map=[]}add(e,t,n){q(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function q(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function J(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Y(){return{flow:{null:{name:`table`,tokenize:X,resolveAll:re}}}}function X(t,n,r){let i=this,c=0,l=0,u;return d;function d(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let n=t>-1?i.events[t][1].type:null,a=n===`tableHead`||n===`tableRow`?E:f;return a===E&&i.parser.lazy[i.now().line]?r(e):a(e)}function f(e){return t.enter(`tableHead`),t.enter(`tableRow`),p(e)}function p(e){return e===124?m(e):(u=!0,l+=1,m(e))}function m(n){return n===null?r(n):o(n)?l>1?(l=0,i.interrupt=!0,t.exit(`tableRow`),t.enter(`lineEnding`),t.consume(n),t.exit(`lineEnding`),_):r(n):e(n)?s(t,m,`whitespace`)(n):(l+=1,u&&(u=!1,c+=1),n===124?(t.enter(`tableCellDivider`),t.consume(n),t.exit(`tableCellDivider`),u=!0,m):(t.enter(`data`),h(n)))}function h(e){return e===null||e===124||a(e)?(t.exit(`data`),m(e)):(t.consume(e),e===92?g:h)}function g(e){return e===92||e===124?(t.consume(e),h):h(e)}function _(n){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(n):(t.enter(`tableDelimiterRow`),u=!1,e(n)?s(t,v,`linePrefix`,i.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(n):v(n))}function v(e){return e===45||e===58?b(e):e===124?(u=!0,t.enter(`tableCellDivider`),t.consume(e),t.exit(`tableCellDivider`),y):T(e)}function y(n){return e(n)?s(t,b,`whitespace`)(n):b(n)}function b(e){return e===58?(l+=1,u=!0,t.enter(`tableDelimiterMarker`),t.consume(e),t.exit(`tableDelimiterMarker`),x):e===45?(l+=1,x(e)):e===null||o(e)?w(e):T(e)}function x(e){return e===45?(t.enter(`tableDelimiterFiller`),S(e)):T(e)}function S(e){return e===45?(t.consume(e),S):e===58?(u=!0,t.exit(`tableDelimiterFiller`),t.enter(`tableDelimiterMarker`),t.consume(e),t.exit(`tableDelimiterMarker`),C):(t.exit(`tableDelimiterFiller`),C(e))}function C(n){return e(n)?s(t,w,`whitespace`)(n):w(n)}function w(e){return e===124?v(e):e===null||o(e)?!u||c!==l?T(e):(t.exit(`tableDelimiterRow`),t.exit(`tableHead`),n(e)):T(e)}function T(e){return r(e)}function E(e){return t.enter(`tableRow`),D(e)}function D(r){return r===124?(t.enter(`tableCellDivider`),t.consume(r),t.exit(`tableCellDivider`),D):r===null||o(r)?(t.exit(`tableRow`),n(r)):e(r)?s(t,D,`whitespace`)(r):(t.enter(`data`),O(r))}function O(e){return e===null||e===124||a(e)?(t.exit(`data`),D(e)):(t.consume(e),e===92?k:O)}function k(e){return e===92||e===124?(t.consume(e),O):O(e)}}function re(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new K;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Q(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Z(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Z(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Z(f,t,o,i,n,d)):(o[0]=o[1],d=Z(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Q(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=J(t.events,n))}return e}function Z(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},$(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=$(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=$(t.events,n[2]),a=$(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},$(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Q(e,t,n,r,i){let a=[],o=$(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function $(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}const ie={name:`tasklistCheck`,tokenize:oe};function ae(){return{text:{91:ie}}}function oe(t,n,r){let i=this;return s;function s(e){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(e):(t.enter(`taskListCheck`),t.enter(`taskListCheckMarker`),t.consume(e),t.exit(`taskListCheckMarker`),c)}function c(e){return a(e)?(t.enter(`taskListCheckValueUnchecked`),t.consume(e),t.exit(`taskListCheckValueUnchecked`),l):e===88||e===120?(t.enter(`taskListCheckValueChecked`),t.consume(e),t.exit(`taskListCheckValueChecked`),l):r(e)}function l(e){return e===93?(t.enter(`taskListCheckMarker`),t.consume(e),t.exit(`taskListCheckMarker`),t.exit(`taskListCheck`),u):r(e)}function u(i){return o(i)?n(i):e(i)?t.check({tokenize:se},n,r)(i):r(i)}}function se(e,t,n){return s(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function ce(e){return d([w(),L(),G(e),Y(),ae()])}export{ce as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as __toESM,t as __commonJSMin}from"../rolldown-runtime.mjs";import{a as require_iterator,i as require_typed_arrays,o as require_foreach,r as require_iterables}from"./graphology-dag.mjs";var require_default_map=__commonJSMin(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultMap.constructor: expecting a function.`);this.items=new Map,this.factory=e,this.size=0}n.prototype.clear=function(){this.items.clear(),this.size=0},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e,this.size),this.items.set(e,t),this.size++),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this.size=this.items.size,this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){var t=this.items.delete(e);return this.size=this.items.size,t},n.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},n.prototype.entries=function(){return this.items.entries()},n.prototype.keys=function(){return this.items.keys()},n.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(n.prototype[Symbol.iterator]=n.prototype.entries),n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),n.autoIncrement=function(){var e=0;return function(){return e++}},t.exports=n})),require_default_weak_map=__commonJSMin(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultWeakMap.constructor: expecting a function.`);this.items=new WeakMap,this.factory=e}n.prototype.clear=function(){this.items=new WeakMap},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e),this.items.set(e,t)),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){return this.items.delete(e)},n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),t.exports=n})),require_linked_list=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},o.prototype.first=function(){return this.head?this.head.item:void 0},o.prototype.peek=o.prototype.first,o.prototype.last=function(){return this.tail?this.tail.item:void 0},o.prototype.push=function(e){var t={item:e,next:null};return this.head?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.unshift=function(e){var t={item:e,next:null};return this.head?(this.head.next||(this.tail=this.head),t.next=this.head,this.head=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.shift=function(){if(this.size){var e=this.head;return this.head=e.next,this.size--,e.item}},o.prototype.forEach=function(e,t){if(this.size){t=arguments.length>1?t:this;for(var n=this.head,r=0;n;)e.call(t,n.item,r,this),n=n.next,r++}},o.prototype.toArray=function(){if(!this.size)return[];for(var e=Array(this.size),t=0,n=this.size,r=this.head;t<n;t++)e[t]=r.item,r=r.next;return e},o.prototype.values=function(){var e=this.head;return new r(function(){if(!e)return{done:!0};var t=e.item;return e=e.next,{value:t,done:!1}})},o.prototype.entries=function(){var e=this.head,t=0;return new r(function(){if(!e)return{done:!0};var n=e.item;return e=e.next,t++,{value:[t-1,n],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},t.exports=o})),require_multi_map=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(e){this.Container=e||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,`constructor`,{value:o,enumerable:!1})}o.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},o.prototype.set=function(e,t){var n=this.items.get(e),r;return n||(this.dimension++,n=new this.Container,this.items.set(e,n)),this.Container===Set?(r=n.size,n.add(t),r<n.size&&this.size++):(n.push(t),this.size++),this},o.prototype.delete=function(e){var t=this.items.get(e);return t?(this.size-=this.Container===Set?t.size:t.length,this.dimension--,this.items.delete(e),!0):!1},o.prototype.remove=function(e,t){var n=this.items.get(e),r,i;return n?this.Container===Set?(r=n.delete(t),r&&this.size--,n.size===0&&(this.items.delete(e),this.dimension--),r):(i=n.indexOf(t),i===-1?!1:(this.size--,n.length===1?(this.items.delete(e),this.dimension--,!0):(n.splice(i,1),!0))):!1},o.prototype.has=function(e){return this.items.has(e)},o.prototype.get=function(e){return this.items.get(e)},o.prototype.multiplicity=function(e){var t=this.items.get(e);return t===void 0?0:this.Container===Set?t.size:t.length},o.prototype.count=o.prototype.multiplicity,o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;var n;function r(r){e.call(t,r,n)}this.items.forEach(function(e,t){n=t,e.forEach(r)})},o.prototype.forEachAssociation=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},o.prototype.keys=function(){return this.items.keys()},o.prototype.values=function(){var e=this.items.values(),t=!1,n,i,a,o;return this.Container===Set?new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,n=i.value.values()}return i=n.next(),i.done?(t=!1,r()):{done:!1,value:i.value}}):new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,n=i.value,a=0,o=n.length}return a>=o?(t=!1,r()):{done:!1,value:n[a++]}})},o.prototype.entries=function(){var e=this.items.entries(),t=!1,n,i,a,o,s;return this.Container===Set?new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,a=i.value[0],n=i.value[1].values()}return i=n.next(),i.done?(t=!1,r()):{done:!1,value:[a,i.value]}}):new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,a=i.value[0],n=i.value[1],o=0,s=n.length}return o>=s?(t=!1,r()):{done:!1,value:[a,n[o++]]}})},o.prototype.containers=function(){return this.items.values()},o.prototype.associations=function(){return this.items.entries()},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.entries),o.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.prototype.toJSON=function(){return this.items},o.from=function(e,t){var n=new o(t);return a(e,function(e,t){n.set(t,e)}),n},t.exports=o})),require_queue=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(e){return this.items.push(e),++this.size},o.prototype.dequeue=function(){if(this.size){var e=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,e}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.offset,r=0,i=this.items.length;n<i;n++,r++)e.call(t,this.items[n],r,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var e=this.items,t=this.offset;return new r(function(){if(t>=e.length)return{done:!0};var n=e[t];return t++,{value:n,done:!1}})},o.prototype.entries=function(){var e=this.items,t=this.offset,n=0;return new r(function(){if(t>=e.length)return{done:!0};var r=e[t];return t++,{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.enqueue(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),require_lru_cache=__commonJSMin(((e,t)=>{var o=require_iterator(),s=require_foreach(),c=require_typed_arrays(),l=require_iterables();function u(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-cache: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-cache: capacity should be a finite positive integer.`);var r=c.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items={}}u.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},u.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var n=this.backward[e],r=this.forward[e];return this.tail===e?this.tail=n:this.backward[r]=n,this.forward[n]=r,this.backward[t]=e,this.head=e,this.forward[e]=t,this},u.prototype.set=function(e,t){var n=this.items[e];if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},u.prototype.setpop=function(e,t){var n=null,r=null,i=this.items[e];return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],delete this.items[r]),this.items[e]=i,this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},u.prototype.has=function(e){return e in this.items},u.prototype.get=function(e){var t=this.items[e];if(t!==void 0)return this.splayOnTop(t),this.V[t]},u.prototype.peek=function(e){var t=this.items[e];if(t!==void 0)return this.V[t]},u.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.size,i=this.head,a=this.K,o=this.V,s=this.forward;n<r;)e.call(t,o[i],a[i],this),i=s[i],n++},u.prototype.keys=function(){var e=0,t=this.size,n=this.head,r=this.K,i=this.forward;return new o(function(){if(e>=t)return{done:!0};var a=r[n];return e++,e<t&&(n=i[n]),{done:!1,value:a}})},u.prototype.values=function(){var e=0,t=this.size,n=this.head,r=this.V,i=this.forward;return new o(function(){if(e>=t)return{done:!0};var a=r[n];return e++,e<t&&(n=i[n]),{done:!1,value:a}})},u.prototype.entries=function(){var e=0,t=this.size,n=this.head,r=this.K,i=this.V,a=this.forward;return new o(function(){if(e>=t)return{done:!0};var o=r[n],s=i[n];return e++,e<t&&(n=a[n]),{done:!1,value:[o,s]}})},typeof Symbol<`u`&&(u.prototype[Symbol.iterator]=u.prototype.entries),u.prototype.inspect=function(){for(var e=new Map,t=this.entries(),n;n=t.next(),!n.done;)e.set(n.value[0],n.value[1]);return Object.defineProperty(e,`constructor`,{value:u,enumerable:!1}),e},typeof Symbol<`u`&&(u.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=u.prototype.inspect),u.from=function(e,t,n,r){if(arguments.length<2){if(r=l.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new u(t,n,r);return s(e,function(e,t){i.set(t,e)}),i},t.exports=u})),require_lru_map=__commonJSMin(((e,t)=>{var n=require_lru_cache(),o=require_foreach(),s=require_typed_arrays(),c=require_iterables();function l(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-map: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-map: capacity should be a finite positive integer.`);var r=s.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items=new Map}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},l.prototype.set=function(e,t){var n=this.items.get(e);if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},l.prototype.setpop=function(e,t){var n=null,r=null,i=this.items.get(e);return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],this.items.delete(r)),this.items.set(e,i),this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},l.prototype.has=function(e){return this.items.has(e)},l.prototype.get=function(e){var t=this.items.get(e);if(t!==void 0)return this.splayOnTop(t),this.V[t]},l.prototype.peek=function(e){var t=this.items.get(e);if(t!==void 0)return this.V[t]},l.prototype.splayOnTop=n.prototype.splayOnTop,l.prototype.forEach=n.prototype.forEach,l.prototype.keys=n.prototype.keys,l.prototype.values=n.prototype.values,l.prototype.entries=n.prototype.entries,typeof Symbol<`u`&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=n.prototype.inspect,l.from=function(e,t,n,r){if(arguments.length<2){if(r=c.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new l(t,n,r);return o(e,function(e,t){i.set(t,e)}),i},t.exports=l})),require_set=__commonJSMin((e=>{e.intersection=function(){if(arguments.length<2)throw Error(`mnemonist/Set.intersection: needs at least two arguments.`);var e=new Set,t=1/0,n=null,r,i,a=arguments.length;for(i=0;i<a;i++){if(r=arguments[i],r.size===0)return e;r.size<t&&(t=r.size,n=r)}for(var o=n.values(),s,c,l,u;s=o.next(),!s.done;){for(c=s.value,l=!0,i=0;i<a;i++)if(u=arguments[i],u!==n&&!u.has(c)){l=!1;break}l&&e.add(c)}return e},e.union=function(){if(arguments.length<2)throw Error(`mnemonist/Set.union: needs at least two arguments.`);var e=new Set,t,n=arguments.length,r,i;for(t=0;t<n;t++)for(r=arguments[t].values();i=r.next(),!i.done;)e.add(i.value);return e},e.difference=function(e,t){if(!e.size)return new Set;if(!t.size)return new Set(e);for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);return n},e.symmetricDifference=function(e,t){for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);for(r=t.values();i=r.next(),!i.done;)e.has(i.value)||n.add(i.value);return n},e.isSubset=function(e,t){var n=e.values(),r;if(e===t)return!0;if(e.size>t.size)return!1;for(;r=n.next(),!r.done;)if(!t.has(r.value))return!1;return!0},e.isSuperset=function(t,n){return e.isSubset(n,t)},e.add=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.add(r.value)},e.subtract=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.delete(r.value)},e.intersect=function(e,t){for(var n=e.values(),r;r=n.next(),!r.done;)t.has(r.value)||e.delete(r.value)},e.disjunct=function(e,t){for(var n=e.values(),r,i=[];r=n.next(),!r.done;)t.has(r.value)&&i.push(r.value);for(n=t.values();r=n.next(),!r.done;)e.has(r.value)||e.add(r.value);for(var a=0,o=i.length;a<o;a++)e.delete(i[a])},e.intersectionSize=function(e,t){var n;if(e.size>t.size&&(n=e,e=t,t=n),e.size===0)return 0;if(e===t)return e.size;for(var r=e.values(),i,a=0;i=r.next(),!i.done;)t.has(i.value)&&a++;return a},e.unionSize=function(t,n){var r=e.intersectionSize(t,n);return t.size+n.size-r},e.jaccard=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/(t.size+n.size-r)},e.overlap=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/Math.min(t.size,n.size)}})),require_stack=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(e){return this.items.push(e),++this.size},o.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},o.prototype.peek=function(){return this.items[this.size-1]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},o.prototype.toArray=function(){for(var e=Array(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},o.prototype.values=function(){var e=this.items,t=e.length,n=0;return new r(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return n++,{value:r,done:!1}})},o.prototype.entries=function(){var e=this.items,t=e.length,n=0;return new r(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),import_default_map=__toESM(require_default_map(),1),import_default_weak_map=__toESM(require_default_weak_map(),1),import_linked_list=__toESM(require_linked_list(),1),import_multi_map=__toESM(require_multi_map(),1),import_queue=__toESM(require_queue(),1),import_lru_map=__toESM(require_lru_map(),1),import_set=require_set(),import_stack=__toESM(require_stack(),1);export{import_multi_map as a,import_stack as c,import_lru_map as i,import_default_weak_map as n,import_queue as o,import_linked_list as r,import_set as s,import_default_map as t};
|
|
1
|
+
import{r as e,t}from"../rolldown-runtime.mjs";import{a as n,i as r,o as i,r as a}from"./graphology-dag.mjs";var o=t(((e,t)=>{var n=i();function r(e){this.size=0,this.items=new Map,this.inverse=e}function a(){this.size=0,this.items=new Map,this.inverse=new r(this)}function o(){this.size=0,this.items.clear(),this.inverse.items.clear()}a.prototype.clear=o,r.prototype.clear=o;function s(e,t){if(this.items.has(e)){var n=this.items.get(e);if(n===t)return this;this.inverse.items.delete(n)}if(this.inverse.items.has(t)){var r=this.inverse.items.get(t);if(r===e)return this;this.items.delete(r)}return this.items.set(e,t),this.inverse.items.set(t,e),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}a.prototype.set=s,r.prototype.set=s;function c(e){if(this.items.has(e)){var t=this.items.get(e);return this.items.delete(e),this.inverse.items.delete(t),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}a.prototype.delete=c,r.prototype.delete=c,[`has`,`get`,`forEach`,`keys`,`values`,`entries`].forEach(function(e){a.prototype[e]=r.prototype[e]=function(){return Map.prototype[e].apply(this.items,arguments)}}),typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.entries,r.prototype[Symbol.iterator]=r.prototype.entries),a.prototype.inspect=function(){var e={left:this.items,right:this.inverse.items};return Object.defineProperty(e,`constructor`,{value:a,enumerable:!1}),e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),r.prototype.inspect=function(){var e={left:this.inverse.items,right:this.items};return Object.defineProperty(e,`constructor`,{value:r,enumerable:!1}),e},typeof Symbol<`u`&&(r.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=r.prototype.inspect),a.from=function(e){var t=new a;return n(e,function(e,n){t.set(n,e)}),t},t.exports=a})),s=t(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultMap.constructor: expecting a function.`);this.items=new Map,this.factory=e,this.size=0}n.prototype.clear=function(){this.items.clear(),this.size=0},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e,this.size),this.items.set(e,t),this.size++),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this.size=this.items.size,this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){var t=this.items.delete(e);return this.size=this.items.size,t},n.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},n.prototype.entries=function(){return this.items.entries()},n.prototype.keys=function(){return this.items.keys()},n.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(n.prototype[Symbol.iterator]=n.prototype.entries),n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),n.autoIncrement=function(){var e=0;return function(){return e++}},t.exports=n})),c=t(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultWeakMap.constructor: expecting a function.`);this.items=new WeakMap,this.factory=e}n.prototype.clear=function(){this.items=new WeakMap},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e),this.items.set(e,t)),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){return this.items.delete(e)},n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),t.exports=n})),l=t(((e,t)=>{var r=n(),a=i();function o(){this.clear()}o.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},o.prototype.first=function(){return this.head?this.head.item:void 0},o.prototype.peek=o.prototype.first,o.prototype.last=function(){return this.tail?this.tail.item:void 0},o.prototype.push=function(e){var t={item:e,next:null};return this.head?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.unshift=function(e){var t={item:e,next:null};return this.head?(this.head.next||(this.tail=this.head),t.next=this.head,this.head=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.shift=function(){if(this.size){var e=this.head;return this.head=e.next,this.size--,e.item}},o.prototype.forEach=function(e,t){if(this.size){t=arguments.length>1?t:this;for(var n=this.head,r=0;n;)e.call(t,n.item,r,this),n=n.next,r++}},o.prototype.toArray=function(){if(!this.size)return[];for(var e=Array(this.size),t=0,n=this.size,r=this.head;t<n;t++)e[t]=r.item,r=r.next;return e},o.prototype.values=function(){var e=this.head;return new r(function(){if(!e)return{done:!0};var t=e.item;return e=e.next,{value:t,done:!1}})},o.prototype.entries=function(){var e=this.head,t=0;return new r(function(){if(!e)return{done:!0};var n=e.item;return e=e.next,t++,{value:[t-1,n],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},t.exports=o})),u=t(((e,t)=>{var r=n(),a=i();function o(e){this.Container=e||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,`constructor`,{value:o,enumerable:!1})}o.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},o.prototype.set=function(e,t){var n=this.items.get(e),r;return n||(this.dimension++,n=new this.Container,this.items.set(e,n)),this.Container===Set?(r=n.size,n.add(t),r<n.size&&this.size++):(n.push(t),this.size++),this},o.prototype.delete=function(e){var t=this.items.get(e);return t?(this.size-=this.Container===Set?t.size:t.length,this.dimension--,this.items.delete(e),!0):!1},o.prototype.remove=function(e,t){var n=this.items.get(e),r,i;return n?this.Container===Set?(r=n.delete(t),r&&this.size--,n.size===0&&(this.items.delete(e),this.dimension--),r):(i=n.indexOf(t),i===-1?!1:(this.size--,n.length===1?(this.items.delete(e),this.dimension--,!0):(n.splice(i,1),!0))):!1},o.prototype.has=function(e){return this.items.has(e)},o.prototype.get=function(e){return this.items.get(e)},o.prototype.multiplicity=function(e){var t=this.items.get(e);return t===void 0?0:this.Container===Set?t.size:t.length},o.prototype.count=o.prototype.multiplicity,o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;var n;function r(r){e.call(t,r,n)}this.items.forEach(function(e,t){n=t,e.forEach(r)})},o.prototype.forEachAssociation=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},o.prototype.keys=function(){return this.items.keys()},o.prototype.values=function(){var e=this.items.values(),t=!1,n,i,a,o;return this.Container===Set?new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,n=i.value.values()}return i=n.next(),i.done?(t=!1,r()):{done:!1,value:i.value}}):new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,n=i.value,a=0,o=n.length}return a>=o?(t=!1,r()):{done:!1,value:n[a++]}})},o.prototype.entries=function(){var e=this.items.entries(),t=!1,n,i,a,o,s;return this.Container===Set?new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,a=i.value[0],n=i.value[1].values()}return i=n.next(),i.done?(t=!1,r()):{done:!1,value:[a,i.value]}}):new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,a=i.value[0],n=i.value[1],o=0,s=n.length}return o>=s?(t=!1,r()):{done:!1,value:[a,n[o++]]}})},o.prototype.containers=function(){return this.items.values()},o.prototype.associations=function(){return this.items.entries()},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.entries),o.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.prototype.toJSON=function(){return this.items},o.from=function(e,t){var n=new o(t);return a(e,function(e,t){n.set(t,e)}),n},t.exports=o})),d=t(((e,t)=>{var r=n(),a=i();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(e){return this.items.push(e),++this.size},o.prototype.dequeue=function(){if(this.size){var e=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,e}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.offset,r=0,i=this.items.length;n<i;n++,r++)e.call(t,this.items[n],r,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var e=this.items,t=this.offset;return new r(function(){if(t>=e.length)return{done:!0};var n=e[t];return t++,{value:n,done:!1}})},o.prototype.entries=function(){var e=this.items,t=this.offset,n=0;return new r(function(){if(t>=e.length)return{done:!0};var r=e[t];return t++,{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.enqueue(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),f=t(((e,t)=>{var o=n(),s=i(),c=r(),l=a();function u(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-cache: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-cache: capacity should be a finite positive integer.`);var r=c.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items={}}u.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},u.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var n=this.backward[e],r=this.forward[e];return this.tail===e?this.tail=n:this.backward[r]=n,this.forward[n]=r,this.backward[t]=e,this.head=e,this.forward[e]=t,this},u.prototype.set=function(e,t){var n=this.items[e];if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},u.prototype.setpop=function(e,t){var n=null,r=null,i=this.items[e];return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],delete this.items[r]),this.items[e]=i,this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},u.prototype.has=function(e){return e in this.items},u.prototype.get=function(e){var t=this.items[e];if(t!==void 0)return this.splayOnTop(t),this.V[t]},u.prototype.peek=function(e){var t=this.items[e];if(t!==void 0)return this.V[t]},u.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.size,i=this.head,a=this.K,o=this.V,s=this.forward;n<r;)e.call(t,o[i],a[i],this),i=s[i],n++},u.prototype.keys=function(){var e=0,t=this.size,n=this.head,r=this.K,i=this.forward;return new o(function(){if(e>=t)return{done:!0};var a=r[n];return e++,e<t&&(n=i[n]),{done:!1,value:a}})},u.prototype.values=function(){var e=0,t=this.size,n=this.head,r=this.V,i=this.forward;return new o(function(){if(e>=t)return{done:!0};var a=r[n];return e++,e<t&&(n=i[n]),{done:!1,value:a}})},u.prototype.entries=function(){var e=0,t=this.size,n=this.head,r=this.K,i=this.V,a=this.forward;return new o(function(){if(e>=t)return{done:!0};var o=r[n],s=i[n];return e++,e<t&&(n=a[n]),{done:!1,value:[o,s]}})},typeof Symbol<`u`&&(u.prototype[Symbol.iterator]=u.prototype.entries),u.prototype.inspect=function(){for(var e=new Map,t=this.entries(),n;n=t.next(),!n.done;)e.set(n.value[0],n.value[1]);return Object.defineProperty(e,`constructor`,{value:u,enumerable:!1}),e},typeof Symbol<`u`&&(u.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=u.prototype.inspect),u.from=function(e,t,n,r){if(arguments.length<2){if(r=l.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new u(t,n,r);return s(e,function(e,t){i.set(t,e)}),i},t.exports=u})),p=t(((e,t)=>{var n=f(),o=i(),s=r(),c=a();function l(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-map: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-map: capacity should be a finite positive integer.`);var r=s.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items=new Map}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},l.prototype.set=function(e,t){var n=this.items.get(e);if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},l.prototype.setpop=function(e,t){var n=null,r=null,i=this.items.get(e);return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],this.items.delete(r)),this.items.set(e,i),this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},l.prototype.has=function(e){return this.items.has(e)},l.prototype.get=function(e){var t=this.items.get(e);if(t!==void 0)return this.splayOnTop(t),this.V[t]},l.prototype.peek=function(e){var t=this.items.get(e);if(t!==void 0)return this.V[t]},l.prototype.splayOnTop=n.prototype.splayOnTop,l.prototype.forEach=n.prototype.forEach,l.prototype.keys=n.prototype.keys,l.prototype.values=n.prototype.values,l.prototype.entries=n.prototype.entries,typeof Symbol<`u`&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=n.prototype.inspect,l.from=function(e,t,n,r){if(arguments.length<2){if(r=c.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new l(t,n,r);return o(e,function(e,t){i.set(t,e)}),i},t.exports=l})),m=t(((e,t)=>{var n=p(),o=i(),s=r(),c=a();function l(e,t,r){arguments.length<2?n.call(this,e):n.call(this,e,t,r),this.deleted=new(s.getPointerArray(this.capacity))(this.capacity),this.deletedSize=0}for(var u in n.prototype)l.prototype[u]=n.prototype[u];typeof Symbol<`u`&&(l.prototype[Symbol.iterator]=n.prototype[Symbol.iterator]),l.prototype.clear=function(){n.prototype.clear.call(this),this.deletedSize=0},l.prototype.set=function(e,t){var n=this.items.get(e);if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?(n=this.deletedSize>0?this.deleted[--this.deletedSize]:this.size,this.size++):(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},l.prototype.setpop=function(e,t){var n=null,r=null,i=this.items.get(e);return i===void 0?(this.size<this.capacity?(i=this.deletedSize>0?this.deleted[--this.deletedSize]:this.size,this.size++):(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],this.items.delete(r)),this.items.set(e,i),this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},l.prototype.delete=function(e){var t=this.items.get(e);if(t===void 0)return!1;if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var n=this.backward[t],r=this.forward[t];return this.head===t&&(this.head=r),this.tail===t&&(this.tail=n),this.forward[n]=r,this.backward[r]=n,this.size--,this.deleted[this.deletedSize++]=t,!0},l.prototype.remove=function(e,t=void 0){var n=this.items.get(e);if(n===void 0)return t;var r=this.V[n];if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,r;var i=this.backward[n],a=this.forward[n];return this.head===n&&(this.head=a),this.tail===n&&(this.tail=i),this.forward[i]=a,this.backward[a]=i,this.size--,this.deleted[this.deletedSize++]=n,r},l.from=function(e,t,n,r){if(arguments.length<2){if(r=c.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new l(t,n,r);return o(e,function(e,t){i.set(t,e)}),i},t.exports=l})),h=t((e=>{e.intersection=function(){if(arguments.length<2)throw Error(`mnemonist/Set.intersection: needs at least two arguments.`);var e=new Set,t=1/0,n=null,r,i,a=arguments.length;for(i=0;i<a;i++){if(r=arguments[i],r.size===0)return e;r.size<t&&(t=r.size,n=r)}for(var o=n.values(),s,c,l,u;s=o.next(),!s.done;){for(c=s.value,l=!0,i=0;i<a;i++)if(u=arguments[i],u!==n&&!u.has(c)){l=!1;break}l&&e.add(c)}return e},e.union=function(){if(arguments.length<2)throw Error(`mnemonist/Set.union: needs at least two arguments.`);var e=new Set,t,n=arguments.length,r,i;for(t=0;t<n;t++)for(r=arguments[t].values();i=r.next(),!i.done;)e.add(i.value);return e},e.difference=function(e,t){if(!e.size)return new Set;if(!t.size)return new Set(e);for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);return n},e.symmetricDifference=function(e,t){for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);for(r=t.values();i=r.next(),!i.done;)e.has(i.value)||n.add(i.value);return n},e.isSubset=function(e,t){var n=e.values(),r;if(e===t)return!0;if(e.size>t.size)return!1;for(;r=n.next(),!r.done;)if(!t.has(r.value))return!1;return!0},e.isSuperset=function(t,n){return e.isSubset(n,t)},e.add=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.add(r.value)},e.subtract=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.delete(r.value)},e.intersect=function(e,t){for(var n=e.values(),r;r=n.next(),!r.done;)t.has(r.value)||e.delete(r.value)},e.disjunct=function(e,t){for(var n=e.values(),r,i=[];r=n.next(),!r.done;)t.has(r.value)&&i.push(r.value);for(n=t.values();r=n.next(),!r.done;)e.has(r.value)||e.add(r.value);for(var a=0,o=i.length;a<o;a++)e.delete(i[a])},e.intersectionSize=function(e,t){var n;if(e.size>t.size&&(n=e,e=t,t=n),e.size===0)return 0;if(e===t)return e.size;for(var r=e.values(),i,a=0;i=r.next(),!i.done;)t.has(i.value)&&a++;return a},e.unionSize=function(t,n){var r=e.intersectionSize(t,n);return t.size+n.size-r},e.jaccard=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/(t.size+n.size-r)},e.overlap=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/Math.min(t.size,n.size)}})),g=t(((e,t)=>{var r=n(),a=i();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(e){return this.items.push(e),++this.size},o.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},o.prototype.peek=function(){return this.items[this.size-1]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},o.prototype.toArray=function(){for(var e=Array(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},o.prototype.values=function(){var e=this.items,t=e.length,n=0;return new r(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return n++,{value:r,done:!1}})},o.prototype.entries=function(){var e=this.items,t=e.length,n=0;return new r(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o}));o();var _=e(s(),1),v=e(c(),1),y=e(l(),1),b=e(u(),1),x=e(d(),1),S=e(p(),1);m();var C=h(),w=e(g(),1);export{b as a,w as c,S as i,v as n,x as o,y as r,C as s,_ as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{
|
|
2
2
|
/*
|
|
3
3
|
* @version 1.4.0
|
|
4
4
|
* @date 2015-10-26
|
|
@@ -6,4 +6,4 @@ import{t as __commonJSMin}from"../rolldown-runtime.mjs";var require_natural_comp
|
|
|
6
6
|
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
7
7
|
* @license MIT License
|
|
8
8
|
*/
|
|
9
|
-
var n=function(e,t){var n,r,i=1,a=0,o=0,s=String.alphabet;function c(e,t,r){if(r){for(n=t;r=c(e,n),r<76&&r>65;)++n;return+e.slice(t-1,n)}return r=s&&s.indexOf(e.charAt(t)),r>-1?r+76:(r=e.charCodeAt(t)||0,r<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63)}if((e+=``)!=(t+=``)){for(;i;)if(r=c(e,a++),i=c(t,o++),r<76&&i<76&&r>66&&i>66&&(r=c(e,a,a),i=c(t,o,a=n),o=n),r!=i)return r<i?-1:1}return 0};try{t.exports=n}catch{String.naturalCompare=n}}));export{
|
|
9
|
+
var n=function(e,t){var n,r,i=1,a=0,o=0,s=String.alphabet;function c(e,t,r){if(r){for(n=t;r=c(e,n),r<76&&r>65;)++n;return+e.slice(t-1,n)}return r=s&&s.indexOf(e.charAt(t)),r>-1?r+76:(r=e.charCodeAt(t)||0,r<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63)}if((e+=``)!=(t+=``)){for(;i;)if(r=c(e,a++),i=c(t,o++),r<76&&i<76&&r>66&&i>66&&(r=c(e,a,a),i=c(t,o,a=n),o=n),r!=i)return r<i?-1:1}return 0};try{t.exports=n}catch{String.naturalCompare=n}}));export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function e(e){return typeof e==`string`?`'${e}'`:new t().serialize(e)}const t=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}(),n=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],i=[];var a=class{_data=new o;_hash=new o([...n]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,a=n[0],o=n[1],s=n[2],c=n[3],l=n[4],u=n[5],d=n[6],f=n[7];for(let n=0;n<64;n++){if(n<16)i[n]=e[t+n]|0;else{let e=i[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=i[n-2],a=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;i[n]=t+i[n-7]+a+i[n-16]}let p=l&u^~l&d,m=a&o^a&s^o&s,h=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),g=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),_=f+g+p+r[n]+i[n],v=h+m;f=d,d=u,u=l,l=c+_|0,c=s,s=o,o=a,a=_+v|0}n[0]=n[0]+a|0,n[1]=n[1]+o|0,n[2]=n[2]+s|0,n[3]=n[3]+c|0,n[4]=n[4]+l|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0}_append(e){typeof e==`string`&&(e=o.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new o(t,i)}},o=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function s(e){return new a().finalize(e).toBase64()}function c(t){return s(e(t))}export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as e}from"./hast-util-sanitize.mjs";function t(t){return function(n){return e(n,t)}}export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as e}from"./hast-util-to-html.mjs";function t(t){let n=this,r={...n.data(`settings`),...t};n.compiler=i;function i(t){return e(t,r)}}export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as
|
|
1
|
+
import{n as e,t}from"./mdast-util-gfm.mjs";import{t as n}from"./micromark-extension-gfm.mjs";const r={};function i(i){let a=this,o=i||r,s=a.data(),c=s.micromarkExtensions||=[],l=s.fromMarkdownExtensions||=[],u=s.toMarkdownExtensions||=[];c.push(n(o)),l.push(t()),u.push(e(o))}export{i as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as e}from"./mdast-util-gfm.mjs";const t=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,n=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,r=({legacyTitle:r=!1,tagName:a=`div`}={})=>o=>{e(o,`blockquote`,(e,o,s)=>{let c=``,l=``,u=!0,d=e.children.map(e=>{if(u&&e.type===`paragraph`){let i=e.children[0],a=i.type===`text`?i.value:``,o=r?n:t,s=a.match(o);if(s&&(u=!1,c=s[1].toLocaleLowerCase(),l=r&&s[2]||c.toLocaleUpperCase(),a.includes(`
|
|
2
2
|
`)&&(e.children[0]={type:`text`,value:a.replace(o,``).replace(/^\n+/,``)}),!a.includes(`
|
|
3
|
-
`))){let t=[];e.children.forEach((e,n)=>{n!=0&&(n==1&&e.type===`break`||t.push(e))}),e.children=[...t]}}return e});c&&(e.data={hName:a,hProperties:{className:[`markdown-alert`,`markdown-alert-${c}`],dir:`auto`}},d.unshift({type:`paragraph`,children:[
|
|
3
|
+
`))){let t=[];e.children.forEach((e,n)=>{n!=0&&(n==1&&e.type===`break`||t.push(e))}),e.children=[...t]}}return e});c&&(e.data={hName:a,hProperties:{className:[`markdown-alert`,`markdown-alert-${c}`],dir:`auto`}},d.unshift({type:`paragraph`,children:[i(c),{type:`text`,value:l.replace(/^\//,``)}],data:{hProperties:{className:`markdown-alert-title`,dir:`auto`}}})),e.children=[...d]})};function i(e){return{type:`emphasis`,data:{hName:`svg`,hProperties:{className:[`octicon`],viewBox:`0 0 16 16`,width:`16`,height:`16`,ariaHidden:`true`}},children:[{type:`emphasis`,data:{hName:`path`,hProperties:{d:a[e]??``}},children:[]}]}}const a={note:`M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`,tip:`M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z`,important:`M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z`,warning:`M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z`,caution:`M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`};export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as e}from"./mdast-util-from-markdown.mjs";function t(t){let n=this;n.parser=r;function r(r){return e(r,{...n.data(`settings`),...t,extensions:n.data(`micromarkExtensions`)||[],mdastExtensions:n.data(`fromMarkdownExtensions`)||[]})}}export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as e}from"./mdast-util-to-hast.mjs";function t(t,n){return t&&`run`in t?async function(r,i){let a=e(r,{file:i,...n});await t.run(a,i)}:function(r,i){return e(r,{file:i,...t||n})}}export{t};
|