intlayer-editor 9.5.12 → 9.7.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/bin/intlayer-editor.mjs +26 -6
- package/client/dist/assets/CodeBlockShiki-B-OcGOY1.js +2 -0
- package/client/dist/assets/MarkDownRender-BzY_8i9Z.js +1 -0
- package/client/dist/assets/MarkDownRender-CIkPpFUW.js +25 -0
- package/client/dist/assets/MarkdownEditor-BpbsoP4E.js +161 -0
- package/client/dist/assets/{astro-JHDYjn39.js → astro-BZ97kZFP.js} +1 -1
- package/client/dist/assets/codeTransformer-aP9a_qk2.js +9 -0
- package/client/dist/assets/compat-r4Owm_RW.js +1 -0
- package/client/dist/assets/css-BGIxQoYs.js +1 -0
- package/client/dist/assets/css-DUjzNfgv.js +1 -0
- package/client/dist/assets/dist-DRjLHkdX.js +11 -0
- package/client/dist/assets/extractUrlFromSitemap-Chj1JVpo.js +1 -0
- package/client/dist/assets/{html-B2cKP6UN.js → html-DSw1lh5G.js} +1 -1
- package/client/dist/assets/html-WQKKblVZ.js +1 -0
- package/client/dist/assets/index-C5SpC4ap.css +2 -0
- package/client/dist/assets/index-CmQV7Z_A.js +105 -0
- package/client/dist/assets/shikiBundle-BIG1bVgc.js +12 -0
- package/client/dist/assets/{svelte-tEuLYt3E.js → svelte-CdeT-Ich.js} +1 -1
- package/client/dist/assets/{vue-Bg0byEaI.js → vue-BqdMUtqy.js} +1 -1
- package/client/dist/index.html +3 -6
- package/package.json +28 -28
- package/server/dist/controllers/auth.controller.cjs +80 -0
- package/server/dist/controllers/auth.controller.cjs.map +1 -0
- package/server/dist/controllers/auth.controller.d.ts +36 -0
- package/server/dist/controllers/auth.controller.mjs +76 -0
- package/server/dist/controllers/auth.controller.mjs.map +1 -0
- package/server/dist/controllers/configuration.controller.cjs +5 -1
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/configuration.controller.mjs +5 -1
- package/server/dist/controllers/configuration.controller.mjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +2 -1
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.mjs +2 -1
- package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
- package/server/dist/index.cjs +41 -13
- package/server/dist/index.cjs.map +1 -1
- package/server/dist/index.mjs +45 -17
- package/server/dist/index.mjs.map +1 -1
- package/server/dist/routes/auth.routes.cjs +35 -0
- package/server/dist/routes/auth.routes.cjs.map +1 -0
- package/server/dist/routes/auth.routes.d.ts +22 -0
- package/server/dist/routes/auth.routes.mjs +33 -0
- package/server/dist/routes/auth.routes.mjs.map +1 -0
- package/server/dist/services/editorAuth.service.cjs +143 -0
- package/server/dist/services/editorAuth.service.cjs.map +1 -0
- package/server/dist/services/editorAuth.service.d.ts +43 -0
- package/server/dist/services/editorAuth.service.mjs +137 -0
- package/server/dist/services/editorAuth.service.mjs.map +1 -0
- package/server/dist/utils/checkPortAvailability.cjs +38 -12
- package/server/dist/utils/checkPortAvailability.cjs.map +1 -1
- package/server/dist/utils/checkPortAvailability.d.ts +14 -1
- package/server/dist/utils/checkPortAvailability.mjs +38 -13
- package/server/dist/utils/checkPortAvailability.mjs.map +1 -1
- package/client/dist/assets/CodeBlockShiki-df1uxmSd.js +0 -2
- package/client/dist/assets/MarkDownRender-DYcnaCQP.js +0 -1
- package/client/dist/assets/MarkDownRender-MV3lk0jo.js +0 -25
- package/client/dist/assets/MarkdownEditor-CWVj-dFt.js +0 -160
- package/client/dist/assets/codeTransformer-DVPQQcdP.js +0 -9
- package/client/dist/assets/css-CdtkT07m.js +0 -1
- package/client/dist/assets/css-LbU1hoFO.js +0 -1
- package/client/dist/assets/dist-BHukwvnD.js +0 -11
- package/client/dist/assets/dist-CcmWBeAo.js +0 -1
- package/client/dist/assets/dynamic-OZWF58s3.js +0 -41
- package/client/dist/assets/html-DYtkB_T1.js +0 -1
- package/client/dist/assets/index-D82ZIHVs.css +0 -2
- package/client/dist/assets/index-DPHRjaWO.js +0 -59
- package/client/dist/assets/react-Cvdyeg_0.js +0 -1
- package/client/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/client/dist/assets/shikiBundle-C3MOPHUk.js +0 -12
package/bin/intlayer-editor.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { exec } from 'node:child_process';
|
|
6
6
|
import { dirname, join } from 'node:path';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { EDITOR_SERVER_PORT_ENV_VAR } from '@intlayer/config/node';
|
|
8
9
|
import { runParallel } from '@intlayer/engine/utils';
|
|
9
10
|
|
|
10
11
|
// Get the current file's directory
|
|
@@ -23,16 +24,16 @@ let withCommand;
|
|
|
23
24
|
let parallelProcess = null;
|
|
24
25
|
|
|
25
26
|
// Check for --env or -e flag
|
|
26
|
-
const envIndex = args.findIndex(
|
|
27
|
-
|
|
27
|
+
const envIndex = args.findIndex((arg) =>
|
|
28
|
+
['--environment', '--env', '-e'].includes(arg)
|
|
28
29
|
);
|
|
29
30
|
if (envIndex !== -1 && args[envIndex + 1]) {
|
|
30
31
|
env = args[envIndex + 1]; // Get the next argument as the environment
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
// Check for --env-file or -f flag
|
|
34
|
-
const envFileIndex = args.findIndex(
|
|
35
|
-
|
|
35
|
+
const envFileIndex = args.findIndex((arg) =>
|
|
36
|
+
['--env-file', '-f'].includes(arg)
|
|
36
37
|
);
|
|
37
38
|
if (envFileIndex !== -1 && args[envFileIndex + 1]) {
|
|
38
39
|
envFile = args[envFileIndex + 1];
|
|
@@ -44,11 +45,23 @@ if (withIndex !== -1 && args[withIndex + 1]) {
|
|
|
44
45
|
withCommand = args[withIndex + 1];
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
// Line the editor server prints once listening (its port may be shifted)
|
|
49
|
+
const EDITOR_RUNNING_AT_PATTERN =
|
|
50
|
+
/Editor running at:\s+https?:\/\/[^:\s]+:(\d+)/;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Starts the `--with` command once the editor server listens: its port turns
|
|
54
|
+
* the editor on for the application, at the URL the server is served at,
|
|
55
|
+
* without editing the configuration file.
|
|
56
|
+
*/
|
|
57
|
+
const startWithCommand = (editorServerPort) => {
|
|
58
|
+
if (!withCommand || parallelProcess) return;
|
|
59
|
+
|
|
60
|
+
process.env[EDITOR_SERVER_PORT_ENV_VAR] = editorServerPort;
|
|
48
61
|
parallelProcess = runParallel(withCommand);
|
|
49
62
|
// Suppress unhandled rejection — lifecycle is managed by the editor server's close handler
|
|
50
63
|
parallelProcess.result.catch(() => {});
|
|
51
|
-
}
|
|
64
|
+
};
|
|
52
65
|
|
|
53
66
|
if (args[0] === 'start') {
|
|
54
67
|
// Start the server pointing to the package's 'dist' directory
|
|
@@ -64,6 +77,13 @@ if (args[0] === 'start') {
|
|
|
64
77
|
// Pipe child's stdout and stderr to the parent process
|
|
65
78
|
child.stdout.on('data', (data) => {
|
|
66
79
|
process.stdout.write(data);
|
|
80
|
+
|
|
81
|
+
const editorServerPort = EDITOR_RUNNING_AT_PATTERN.exec(
|
|
82
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: ANSI escapes
|
|
83
|
+
data.toString().replace(/\u001b\[[0-9;]*m/g, '')
|
|
84
|
+
)?.[1];
|
|
85
|
+
|
|
86
|
+
if (editorServerPort) startWithCommand(editorServerPort);
|
|
67
87
|
});
|
|
68
88
|
|
|
69
89
|
child.stderr.on('data', (data) => {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shikiBundle-BIG1bVgc.js","assets/compat-r4Owm_RW.js","assets/MarkDownRender-CIkPpFUW.js","assets/index-CmQV7Z_A.js","assets/index-C5SpC4ap.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{p as e,v as t,w as n}from"./compat-r4Owm_RW.js";import{d as r,l as i,o as a,u as o}from"./MarkDownRender-CIkPpFUW.js";import{G as s,U as c}from"./index-CmQV7Z_A.js";e();var l=async(e,t)=>{let{codeToHtml:n}=await c(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-BIG1bVgc.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([0,1,2,3,4]));return n(String(e),{lang:i(t).id,themes:a,defaultColor:!1})},u=({children:e,lang:i})=>{let[a,c]=n(null);return t(()=>{let t=!1;return l(e,i).then(e=>{t||c(e)}).catch(e=>{console.error(`Failed to highlight code:`,e),t||c(``)}),()=>{t=!0}},[e,i]),s(`div`,{className:r,children:a?s(`div`,{dangerouslySetInnerHTML:{__html:a}}):s(o,{children:e})})};export{u as CodeBlockShiki};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./MarkDownRender-CIkPpFUW.js";export{e as MarkdownRenderer};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-B-OcGOY1.js","assets/compat-r4Owm_RW.js","assets/index-CmQV7Z_A.js","assets/index-C5SpC4ap.css","assets/astro-BZ97kZFP.js","assets/json-B88Oqtu5.js","assets/javascript-BzbQS41l.js","assets/typescript-j_1H8WHN.js","assets/css-BGIxQoYs.js","assets/postcss-D_Wz94rJ.js","assets/tsx-BOvsFOI6.js","assets/css-DUjzNfgv.js","assets/html-WQKKblVZ.js","assets/html-DSw1lh5G.js","assets/javascript-Yelw-5ZN.js","assets/json-CaljABEy.js","assets/svelte-CdeT-Ich.js","assets/tsx-5f3ulCja.js","assets/typescript-Utq2Cl8c.js","assets/vue-BqdMUtqy.js","assets/shikiBundle-BIG1bVgc.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{C as e,E as t,F as n,I as r,O as i,P as a,R as o,_ as s,f as c,h as l,j as u,m as d,n as f,p,t as m,v as h,w as g,x as _}from"./compat-r4Owm_RW.js";import{A as v,B as y,F as b,G as x,H as S,O as C,U as w,V as T,_ as E,a as D,c as O,d as k,i as A,j,k as M,l as N,n as ee,o as P,r as te,s as ne,t as F,u as re}from"./index-CmQV7Z_A.js";var I={blockQuote:`0`,breakLine:`1`,breakThematic:`2`,codeBlock:`3`,codeFenced:`4`,codeInline:`5`,footnote:`6`,footnoteReference:`7`,gfmTask:`8`,heading:`9`,headingSetext:`10`,htmlBlock:`11`,htmlComment:`12`,htmlSelfClosing:`13`,customComponent:`34`,image:`14`,link:`15`,linkAngleBraceStyleDetector:`16`,linkBareUrlDetector:`17`,newlineCoalescer:`19`,orderedList:`20`,paragraph:`21`,ref:`22`,refImage:`23`,refLink:`24`,table:`25`,tableSeparator:`26`,text:`27`,textBolded:`28`,textEmphasized:`29`,textEscaped:`30`,textMarked:`31`,textStrikethroughed:`32`,unorderedList:`33`},L={MAX:0,HIGH:1,MED:2,LOW:3,MIN:4},ie={BLOCK:1,INLINE:2,BOTH:3},R=ie.BLOCK,z=ie.INLINE,B=ie.BOTH,ae=`allowFullScreen.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),oe={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},se=[`style`,`script`,`pre`],ce=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],le=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})|(?:\[[^\]]*\])))?/gi,ue=/^[A-Z_:]/i,de=/\n{2,}$/,fe=/^(\s*>[\s\S]*?)(?=\n\n|$)/,pe=/^ *> ?/gm,me=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,he=/^(?=( {2,}))\1\n/,ge=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,_e=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n((?:[^\n]*(?:\n|$))*?)(?:\1\n?|$)/,ve=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,ye=/^([ \t]*)(`{3,}|~{3,})/,be=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,xe=/^(?:\n *)*\n/,Se=/\r\n?/g,Ce=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,we=/^\[\^([^\]]+)]/,Te=/\f/g,Ee=/^---[ \t]*\n(.|\n)*?\n---[ \t]*\n/,De=/^\s*?\[(x|\s)\]/,Oe=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ke=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ae=/^([^\n]+)\n *(=|-)\2{2,} *\n/,je=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Me=/^<!--[\s\S]*?(?:-->)/,Ne=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Pe=/^\{.*\}$/,Fe=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Ie=/^<([^ >]+[:@/][^ >]+)>/,Le=/-([a-z])?/gi,Re=/^(\|[^\n]*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:[^\n]*\|[^\n]*\n)*))?\n?/,ze=/(^ *\||\| *$)/g,Be=/^ *:-+: *$/,Ve=/^ *:-+ *$/,He=/^ *-+: *$/,Ue=/^[^\n]+(?: {2}\n|\n{2,})/,We=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Ge=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Ke=/^\[([^\]]*)\] ?\[([^\]]*)\]/,qe=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Je=/\t/g,Ye=/^\n+/,Xe=/^\n*([ \t]*)/,Ze=`(?:\\d+\\.)`,Qe=`(?:[*+-])`,$e=/^\\([^0-9A-Za-z\s])/,et=/\\([^0-9A-Za-z\s])/g,tt=/^(:[a-zA-Z0-9-_]+:)/,V=e=>`(?=[\\s\\S]+?\\1${e?`\\1`:``})`,H="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)",nt=RegExp(`^([*_])\\1${V(1)}${H}\\1\\1(?!\\1)`),rt=RegExp(`^([*_])${V(0)}${H}\\1(?!\\1)`),it=RegExp(`^(==)${V(0)}${H}\\1`),at=RegExp(`^(~~)${V(0)}${H}\\1`),ot=e=>`( *)(`+(e===1?Ze:Qe)+`) +`,st=ot(1),ct=ot(2),lt=e=>RegExp(`^`+(e===1?st:ct)),ut=lt(1),dt=lt(2),ft=e=>RegExp(`^`+(e===1?st:ct)+`[^\\n]*(?:\\n(?!\\1`+(e===1?Ze:Qe)+` )[^\\n]*)*(\\n|$)`,`gm`),pt=ft(1),mt=ft(2),ht=e=>{let t=e===1?Ze:Qe;return RegExp(`^( *)(`+t+`) (?=[\\s\\S])(?:[^\\n]*(?:\\n|$))+?(?:\\n+(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*$)`)},gt=ht(1),_t=ht(2),U=e=>{let t=e.length;for(;t>0&&e.charCodeAt(t-1)<=32;)t--;return t===e.length?e:e.slice(0,t)},vt=(e,t)=>e.startsWith(t),yt=e=>{let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e},W=e=>e&&e.indexOf(`\\`)!==-1?e.replace(et,`$1`):e,bt=(...e)=>e.filter(Boolean).join(` `),xt=(e,t,n)=>{if(t.indexOf(`.`)===-1)return e?.[t]??n;let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r??n},St=[[/[ÀÁÂÃÄÅàáâãä忯]/g,`a`],[/[çÇ]/g,`c`],[/[ðÐ]/g,`d`],[/[ÈÉÊËéèêë]/g,`e`],[/[ÏïÎîÍíÌì]/g,`i`],[/[Ññ]/g,`n`],[/[øØœŒÕõÔôÓóÒò]/g,`o`],[/[ÜüÛûÚúÙù]/g,`u`],[/[ŸÿÝý]/g,`y`]],Ct=/[\u0080-\uffff]/,wt=/[^\p{L}\p{N}\p{M} -]/gu,Tt=/ /g,Et=e=>{let t=e;if(Ct.test(t))for(let e=0;e<St.length;e++){let[n,r]=St[e];t=t.replace(n,r)}return t=t.replace(wt,``).replace(Tt,`-`),t.toLowerCase()},Dt=/(javascript|vbscript|data(?!:image)):/i,Ot=/[^A-Za-z0-9/:]/g,kt=e=>{if(e.indexOf(`:`)===-1&&e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(Ot,``);if(Dt.test(t))return console.warn(`Input contains an unsafe JavaScript/VBScript/data expression, it will not be rendered.`,t),null}catch{return console.warn(`Input could not be decoded due to malformed syntax or characters, it will not be rendered.`,e),null}return e},At=e=>{let t=e;return t.indexOf(` `)!==-1&&(t=t.replace(Je,` `)),t.indexOf(`\r`)!==-1&&(t=t.replace(Se,`
|
|
3
|
+
`)),t.indexOf(`\f`)!==-1&&(t=t.replace(Te,``)),t},jt=(e,t)=>{if(!t)return e;let n=e.split(`
|
|
4
|
+
`),r=null,i=(e,t)=>t&&e.startsWith(t)?e.slice(t.length):e;return n.map(e=>{let n=e.match(ye);if(!r)return n&&(r={indentation:n[1],marker:n[2]}),i(e,t);let a=n?.[2]?.startsWith(r.marker),{indentation:o}=r;return a&&(r=null),i(e,o)}).join(`
|
|
5
|
+
`)},Mt=e=>(e.indexOf(`-`)!==-1&&e.match(Ne)===null&&(e=e.replace(Le,(e,t)=>t.toUpperCase())),e),Nt=e=>{let t=[],n=``,r=!1,i=!1,a=``;if(!e)return t;for(let o=0;o<e.length;o++){let s=e[o];if((s===`"`||s===`'`)&&!r&&(i?s===a&&(i=!1,a=``):(i=!0,a=s)),s===`(`&&n.endsWith(`url`)?r=!0:s===`)`&&r&&(r=!1),s===`;`&&!i&&!r){let e=n.trim();if(e){let n=e.indexOf(`:`);if(n>0){let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();t.push([r,i])}}n=``}else n+=s}let o=n.trim();if(o){let e=o.indexOf(`:`);if(e>0){let n=o.slice(0,e).trim(),r=o.slice(e+1).trim();t.push([n,r])}}return t},Pt=(e,t,n,r)=>t===`style`?Nt(n).reduce((t,[n,i])=>{let a=n.replace(/(-[a-z])/g,e=>e[1].toUpperCase());return t[a]=r(i,e,n),t},{}):ce.indexOf(t)===-1?(n.match(Pe)&&(n=W(n.slice(1,n.length-1))),n===`true`||n!==`false`&&n):r(W(n),e,t),Ft=e=>e.indexOf(`:`)===-1?`left`:He.test(e)?`right`:Be.test(e)?`center`:(Ve.test(e),`left`),It=e=>e.replace(ze,``).split(`|`).map(Ft),Lt=(e,t,n,r)=>{let i=n.inTable;n.inTable=!0;let a=0,o=e.length;for(;a<o;){let t=e.charCodeAt(a);if(t===32||t===9)a++;else break}for(;o>a;){let t=e.charCodeAt(o-1);if(t===32||t===9)o--;else break}if(a<o&&e.charCodeAt(a)===124&&a++,o>a&&e.charCodeAt(o-1)===124&&(o-2<a||e.charCodeAt(o-2)!==92)&&o--,!r){let r=t(e.slice(a,o),n);return n.inTable=i,[r]}let s=[],c=e.length,l=a,u=a,d=(r,i)=>{let a=e.slice(r,i).trim();return a===``?[]:t(a,n)},f=-1,p=-1,m=-1;for(;u<o;){if(f<u){let t=e.indexOf(`|`,u);f=t===-1?c:t}if(p<u){let t=e.indexOf(`\\`,u);p=t===-1?c:t}if(m<u){let t=e.indexOf("`",u);m=t===-1?c:t}if(u=Math.min(f,p,m),u>=o)break;if(u===p){u+=u+1<o?2:1;continue}if(u===m){let t=0;for(;u<o&&e.charCodeAt(u)===96;)t++,u++;let n=!1;for(;u<o&&!n;){let r=0;for(;u<o&&e.charCodeAt(u)===96;)r++,u++;r===t?n=!0:r===0&&u++}continue}s.push(d(l,u)),u++,l=u}return s.push(d(l,o)),n.inTable=i,s},Rt=(e,t,n)=>{if(!e)return[];let r=[],i=0,a=e.length;for(;i<a;){let o=e.indexOf(`
|
|
6
|
+
`,i);o===-1&&(o=a);let s=e.slice(i,o);i=o+1;let c=!1;for(let e=0;e<s.length;e++){let t=s.charCodeAt(e);if(t!==32&&t!==9&&t!==13){c=!0;break}}c&&r.push(Lt(s,t,n,!0))}return r},zt=(e,t,n)=>{if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(vt(e,n[t]))return!0;return!1}return n(e,t)},G=e=>(e.inline=1,e),K=e=>G((t,n)=>n.inline?e.exec(t):null),q=e=>G((t,n)=>n.inline||n.simple?e.exec(t):null),J=e=>(t,n)=>n.inline||n.simple?null:e.exec(t),Y=e=>G((t,n)=>typeof e==`function`?e(t,n):e.exec(t)),X=(e,t,n)=>{let r=n.inline??!1,i=n.simple??!1;n.inline=!0,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a},Bt=(e,t,n)=>{let r=n.inline??!1,i=n.simple??!1;n.inline=!1,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a},Vt=(e,t,n={})=>{let r=n.inline||!1;n.inline=!1;let i=U(t),a=e(/\n\n$/.test(i)===!1?i.endsWith(`
|
|
7
|
+
`)?`${i}\n`:`${i}\n\n`:i,n);return n.inline=r,a},Ht=(e,t,n)=>({children:X(t,e[2]??``,n)}),Z=()=>({}),Ut=()=>null,Wt=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`?r(t):r.test(t))return!0}return!1},Gt=(e,t)=>{let n=t.charCodeAt(t.length-1);if(e.prevCaptureHasBlankLine!==!0&&(e.prevCaptureHasBlankLine=t.indexOf(`
|
|
8
|
+
|
|
9
|
+
`)!==-1||e.prevCaptureHasBlankLine!==void 0&&t.charCodeAt(0)===10&&e.prevCaptureIndent===``),n!==32&&n!==10){e.prevCaptureIndent=void 0;return}let r=t.lastIndexOf(`
|
|
10
|
+
`),i=r===-1?e.prevCaptureIndent===void 0?void 0:e.prevCaptureIndent===``?t:e.prevCaptureIndent+t:t.slice(r+1);if(i===void 0||i===``){e.prevCaptureIndent=i;return}for(let t=0;t<i.length;t++)if(i.charCodeAt(t)!==32){e.prevCaptureIndent=void 0;return}e.prevCaptureIndent=i},Kt=e=>{let t=Object.keys(e).sort((t,n)=>e[t]._order-e[n]._order||+t-n),n=t.length,r=Array(n),i=Array(n),a=Array(n),o=Array(n),s=Array(n),c=Array(n),l=[],u=[];for(let d=0;d<n;d++){let n=e[t[d]],f=n._qualify;i[d]=n._match,a[d]=n._parse;let p=n._scope,m=p!==z,h=p!==R;s[d]=m,c[d]=h,n._firstChars&&n._firstChars.length>0?o[d]=n._firstChars:Array.isArray(f)&&f.length>0&&f.every(e=>e.length>0)?(o[d]=f.map(e=>e.charCodeAt(0)),f.every(e=>e.length===1)&&(f=void 0)):(o[d]=null,m&&l.push(d),h&&u.push(d)),r[d]=f}let d=Array(128),f=Array(128);for(let e=0;e<128;e++){let t=[],r=[];for(let i=0;i<n;i++){let n=s[i],a=c[i],l=o[i];n&&(!l||l.includes(e))&&t.push(i),a&&(!l||l.includes(e))&&r.push(i)}d[e]=t,f[e]=r}let p=(e,n={})=>{let o=[],s=!!(n.inline||n.simple);n.prevCaptureHasBlankLine===void 0&&(n.prevCaptureIndent=``);let c=!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==10&&n!==13){c=!0;break}}if(c){let c=s?f:d,m=s?u:l;for(;e;){let s=e.charCodeAt(0),l=s<128?c[s]:m,u=l.length,d=!1;for(let s=0;s<u;s++){let c=l[s],u=r[c];if(u&&!zt(e,n,u))continue;let f=i[c](e,n);if(f?.[0]){e=e.slice(f[0].length);let r=a[c](f,p,n);Gt(n,f[0]);let i=r.type||t[c];r.type=i;let s=o.length;if(i===I.text){if(!r.text){d=!0;break}if(s>0&&o[s-1].type===I.text){o[s-1].text+=r.text,d=!0;break}}o.push(r),d=!0;break}}if(!d)break}}return o};return(e,t)=>p(At(e),t)},qt=e=>{let t=(n,r={})=>{if(!Array.isArray(n))return e(n,t,r);let i=r.key,a=[],o=!1,s=0;for(let i=0;i<n.length;i++){r.key=s;let c=n[i],l=Array.isArray(c)?t(c,r):e(c,t,r),u=typeof l==`string`;u&&o?a[a.length-1]=a[a.length-1]+l:l!==null&&(a.push(l),s++),o=u}return r.key=i,a};return t},Jt=(e,t)=>{let n={};for(let t in e)n[t]=e[t]?._render;return t?(e,r,i)=>{let a=n[e.type];return t(()=>a?.(e,r,i),e,r,i)}:(e,t,r)=>{let i=n[e.type];return i?i(e,t,r):void 0}},Yt=(e,t)=>{let n=e.length,r=t;for(;r<n;){let t=e.charCodeAt(r);if(t===62)return r;if(t===34||t===39){let i=r+1;for(;i<n&&e.charCodeAt(i)!==t&&e.charCodeAt(i)!==10;)i++;r=e.charCodeAt(i)===t?i+1:r+1;continue}r++}return-1},Xt=e=>e>=65&&e<=90?e+32:e,Zt=(e,t,n)=>{for(let r=0;r<t.length;r++)if(Xt(e.charCodeAt(n+r))!==Xt(t.charCodeAt(r)))return!1;return!0},Qt=(e,t,n,r,i)=>{if(!r){let r=e.indexOf(t,n);return r===-1||r>=i?-1:r}let a=Math.min(i,e.length-t.length+1),o=n;for(;o<a;){let n=e.indexOf(`<`,o);if(n===-1||n>=a)return-1;if(Zt(e,t,n))return n;o=n+1}return-1},$t=(e,t,n,r,i)=>{let a=[e.slice(0,t),n,r,i];return a.index=0,a.input=e,a},en=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57,tn=e=>{let t=0;for(;e.charCodeAt(t)===32;)t++;return e.charCodeAt(t)===60?t:-1},nn=(e,t)=>{let n=tn(e);if(n===-1)return null;let r=n+1,i=r,a=e.charCodeAt(r);if(t){if(a<65||a>90)return null;for(;i<e.length&&en(e.charCodeAt(i));)i++}else{if(!(a>=65&&a<=90||a>=97&&a<=122))return null;for(;i<e.length;){let t=e.charCodeAt(i);if(t===32||t===9||t===10||t===13||t===62||t===47)break;i++}}let o=e.slice(r,i),s=Yt(e,i);if(s===-1||!t&&e.charCodeAt(s-1)===47)return null;let c=s+1;e.charCodeAt(c)===10&&c++;let l=`<${o}`,u=`</${o}`,d=1,f=c,p=e.length,m=-1,h=-1;for(;f<p;){let n=Qt(e,u,f,!t,p);if(n===-1)return null;let r=Qt(e,l,f,!t,n);if(r!==-1){let t=e.charCodeAt(r+l.length);if(t===32||t===9||t===10||t===13||t===62||t===47){let t=Yt(e,r+l.length);if(t===-1)return null;d++,f=t+1}else f=r+1;continue}if(e.charCodeAt(n+u.length)!==62){f=n+1;continue}let i=n+u.length+1;if(d--,d>0){f=i;continue}if(Qt(e,u,i,!t,p)===i&&e.charCodeAt(i+u.length)===62){d=1,f=i;continue}m=n,h=i;break}if(h===-1)return null;for(;e.charCodeAt(h)===10;)h++;return $t(e,h,o,e.slice(i,s),e.slice(c,m))},rn=e=>{let t=tn(e);if(t===-1)return null;let n=t+1,r=e.charCodeAt(n);if(!(r>=65&&r<=90||r>=97&&r<=122))return null;let i=n+1;for(;i<e.length&&(en(e.charCodeAt(i))||e.charCodeAt(i)===58);)i++;let a=e.charCodeAt(i),o=a===32||a===9||a===10||a===13,s;if(o){if(s=Yt(e,i),s===-1)return null}else if(s=e.charCodeAt(i)===47?i+1:i,e.charCodeAt(s)!==62)return null;let c=e.slice(n,i),l=s+1;if(e.charCodeAt(l)===60&&e.charCodeAt(l+1)===47&&Zt(e,c,l+2)&&e.charCodeAt(l+2+c.length)===62)return null;let u=l,d=l;for(;d<e.length;){let t=e.charCodeAt(d);if(t!==32&&t!==9&&t!==10&&t!==13)break;d++,e.charCodeAt(d-1)===10&&(u=d)}return $t(e,u,c,o?e.slice(i+1,s):void 0,u>l?e.slice(l,u):void 0)},an=e=>nn(e,!1),on=e=>nn(e,!0),sn=e=>an(e)!==null,cn=e=>rn(e)!==null,ln=e=>on(e)!==null,un=e=>sn(e)||cn(e),dn=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,fn=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),pn=e=>{let t=null;if(Object.keys(e).length===0)return e=>e;let n=new Map;return r=>{if(typeof r!=`string`)return r;let i=n.get(r);if(i!==void 0)return i;let a=xt(e,r);if(a)return n.set(r,a),a;if(!t){t=new Map;for(let n of Object.keys(e)){let e=n.toLowerCase();t.has(e)||t.set(e,n)}}let o=t.get(r.toLowerCase()),s=(o?xt(e,o):void 0)||r;return n.set(r,s),s}},mn=e=>t=>e.slugify?e.slugify(t,Et):Et(t),hn=(e,t)=>{let{runtime:n,components:r={}}=e,i=pn(r),a=t.tagfilter?new Set([`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]):null,o=e=>{if(`class`in e)return!0;for(let t in e)if(e[t]==null)return!0;return!1};return(e,t,...r)=>{let s=typeof e==`string`;if(a&&s&&(a.has(e)||a.has(e.toLowerCase())))return null;let c;if(!t)c={};else if(!o(t))c=t;else{let e=bt(t.className,t.class),n={},r=!1;for(let i in t){let a=t[i];a!=null&&(i===`className`||i===`class`?r||=(e&&(n.className=e),!0):n[i]=a)}!r&&e&&(n.className=e),c=n}n.normalizeProps&&s&&(c=n.normalizeProps(e,c));let l=i(e);return n.createElement(l,c,...r)}},gn=()=>({footnotes:[],references:{},slugCounts:new Map}),_n=8,Q=[],vn=(e,t,n,r)=>e.parseOnly===r&&e.ctx.runtime===t.runtime&&e.ctx.components===t.components&&e.ctx.namedCodesToUnicode===t.namedCodesToUnicode&&e.ctx.sanitizer===t.sanitizer&&e.ctx.slugify===t.slugify&&e.options.disableAutoLink===n.disableAutoLink&&e.options.disableParsingRawHTML===n.disableParsingRawHTML&&e.options.enforceAtxHeadings===n.enforceAtxHeadings&&e.options.tagfilter===n.tagfilter&&e.options.renderRule===n.renderRule,yn=(e,t,n)=>{for(let r=0;r<Q.length;r++){let i=Q[r];if(vn(i,e,t,n))return r>0&&(Q.splice(r,1),Q.unshift(i)),i}let r={current:gn()},i=n?En:hn(e,t),a=Dn(i,e,t,r),o={ctx:e,options:t,parseOnly:n,createElement:i,scope:r,parse:Kt(a),emit:qt(Jt(a,t.renderRule))};return Q.unshift(o),Q.length>_n&&Q.pop(),o},bn=(e,t,n)=>{let r=e.current;e.current=t;try{return n()}finally{e.current=r}},xn=(e,t,n,r,i,a,o)=>{let s=mn(t),c=t.sanitizer??kt,l=t.namedCodesToUnicode?{...oe,...t.namedCodesToUnicode}:oe,u=(e,t)=>{if(e.charCodeAt(0)===60)return!0;if(t.inline||t.simple||t.prevCaptureIndent===void 0)return!1;let n=0;for(;n<3&&e.charCodeAt(n)===32;)n++;return n>0&&e.charCodeAt(n)===60},d=(t,n,r,o=B)=>({_scope:o,_firstChars:[60,32],_qualify:u,_match:Y(t),_order:n,_parse(e,t,n){let o=e[3]??``,s=jt(o,o.match(Xe)?.[1]??``),c=a(s)?Vt:X,l=(e[1]??``).trim(),u=l.toLowerCase(),d=r&&se.indexOf(u)!==-1,f=d?u:l,p={attrs:i(f,e[2]??``),noInnerParse:d,tag:f};if(r&&(n.inAnchor=n.inAnchor||u===`a`),d)p.text=o;else{let e=n.inHTML;n.inHTML=!0,p.children=c(t,s,n),n.inHTML=e}return r&&(n.inAnchor=!1),p},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}}),f=t=>{let n=t===1,r=n?gt:_t,i=n?pt:mt,a=n?ut:dt;return{_scope:B,_firstChars:n?[32,9,48,49,50,51,52,53,54,55,56,57]:[32,9,42,43,45],_qualify:(e,t)=>t.prevCaptureIndent!==void 0&&!!(t.list??(!t.inline&&!t.simple))&&a.test(e),_match:G((e,t)=>{let n=t.prevCaptureIndent,i=n!==void 0,a=t.list??(!t.inline&&!t.simple);if(i&&a){let t=n?n+e:e,i=r.exec(t);if(!i)return null;if(n&&i[0].startsWith(n)){let e=[...i];return e[0]=i[0].slice(n.length),e.fullMatch=i[0],e}return i}return null}),_order:L.HIGH,_parse(e,t,r){let o=e[2]??``,s=n?+o.slice(0,-1):void 0,c=(e.fullMatch??e[0]??``).replace(de,`
|
|
11
|
+
`).match(i);if(!c)return{items:[],ordered:n,start:s};let l=!1;return{items:c.map((e,n)=>{let i=a.exec(e),o=i?i[0].length:0,s=o<=8?Sn[o]:RegExp(`^ {1,${o}}`,`gm`),u=e.slice(o).replace(s,``),d=n===c.length-1,f=u.indexOf(`
|
|
12
|
+
|
|
13
|
+
`)!==-1||d&&l;l=f;let p=r.inline,m=r.list;r.list=!0;let h;f?(r.inline=!1,h=`${U(u)}\n\n`):(r.inline=!0,h=U(u));let g=t(h,r);return r.inline=p,r.list=m,g}),ordered:n,start:s}},_render(t,r,i={}){return e(n?`ol`:`ul`,{key:i.key,start:t.start},...t.items.map((t,n)=>e(`li`,{key:n},r(t,i))))}}},p=(e,t)=>{if(t.inline||t.simple||t.inHTML&&e.indexOf(`
|
|
14
|
+
|
|
15
|
+
`)===-1&&!t.prevCaptureHasBlankLine)return null;let n=0,r=e.length;for(;n<r;){let t=e.indexOf(`
|
|
16
|
+
`,n),i=t===-1?r:t,a=n;for(;a<i&&(e.charCodeAt(a)===32||e.charCodeAt(a)===9);)a++;if(a>=i||a-n>=4||e.charCodeAt(n)===9)break;let s=e.charCodeAt(a);if((s===62||s===96||s===126||s===35||s===124||s===42||s===43||s===45||s===61||s===60||s>=48&&s<=57)&&Wt(o,e.slice(n,t===-1?void 0:t+1)))break;if(t===-1){n=r;break}n=t+1}let i=e.slice(0,n);if(i===``)return null;let a=U(i);return a===``?null:[i,void 0,a]};return{[I.blockQuote]:{_scope:R,_qualify:[`>`],_match:J(fe),_order:L.HIGH,_parse(e,t,n){let r=(e[0]??``).replace(pe,``).match(me),i=r?.[1],a=r?.[2]??``;return{alert:i,children:a.indexOf(`
|
|
17
|
+
`)===-1?X(t,a,n):Vt(t,a,n)}},_render(t,n,r={}){let i={key:r.key};return t.alert&&(i.className=`markdown-alert-${s(t.alert.toLowerCase())}`,t.children.unshift({attrs:{},children:[{type:I.text,text:t.alert}],noInnerParse:!0,type:I.htmlBlock,tag:`header`})),e(`blockquote`,i,n(t.children,r))}},[I.breakLine]:{_scope:B,_qualify:[` `],_match:Y(he),_order:L.HIGH,_parse:Z,_render(t,n,r={}){return e(`br`,{key:r.key})}},[I.breakThematic]:{_scope:R,_qualify:[`--`,`__`,`**`,`- `,`* `,`_ `],_match:J(ge),_order:L.HIGH,_parse:Z,_render(t,n,r={}){return e(`hr`,{key:r.key})}},[I.codeBlock]:{_scope:R,_qualify:[` `],_match:J(ve),_order:L.MAX,_parse(e){return{type:I.codeBlock,lang:void 0,text:W(U((e[0]??``).replace(/^ {4}/gm,``)))}},_render(t,n,r={}){let i={...t.attrs??{}},a=t.lang?`lang-${t.lang}`:`lang-plaintext`;return i.className=i.className?`${i.className} ${a}`:a,e(`pre`,{key:r.key},e(`code`,i,t.text))}},[I.codeFenced]:{_scope:R,_qualify:["```",`~~~`],_match:J(_e),_order:L.MAX,_parse(e){return{attrs:i(`code`,e[3]??``),lang:e[2]||void 0,text:e[4]??``,type:I.codeBlock}}},[I.codeInline]:{_scope:z,_firstChars:[96],_qualify:e=>e.charCodeAt(0)===96&&e.indexOf("`",1)!==-1,_match:q(be),_order:L.LOW,_parse(e){return{text:W(e[2]??``)}},_render(t,n,r={}){return e(`code`,{key:r.key},t.text)}},[I.footnote]:{_scope:z,_qualify:[`[^`],_match:J(Ce),_order:L.MAX,_parse(e){return r.current.footnotes.push({footnote:e[2]??``,identifier:e[1]??``}),{}},_render:Ut},[I.footnoteReference]:{_scope:z,_qualify:[`[^`],_match:K(we),_order:L.HIGH,_parse(e){let t=e[1]??``;return{target:`#${s(t)}`,text:t}},_render(t,n,r={}){return e(`a`,{key:r.key,href:c(t.target,`a`,`href`)??void 0},e(`sup`,{key:r.key},t.text))}},[I.gfmTask]:{_scope:z,_qualify:[`[ ]`,`[x]`],_match:K(De),_order:L.HIGH,_parse(e){return{completed:(e[1]??``).toLowerCase()===`x`}},_render(t,n,r={}){return e(`input`,{checked:t.completed,key:r.key,readOnly:!0,type:`checkbox`})}},[I.heading]:{_scope:R,_qualify:[`#`],_match:J(n.enforceAtxHeadings?ke:Oe),_order:L.HIGH,_parse(e,t,n){let i=e[2]??``,a=s(i)||`section`,o=r.current.slugCounts,c=a;if(o){let e=o.get(a)??0;o.set(a,e+1),e>0&&(c=`${a}-${e}`)}return{children:X(t,i,n),id:c,level:e[1]?.length??1}},_render(t,n,r={}){return e(`h${t.level}`,{id:t.id,key:r.key},n(t.children,r))}},[I.headingSetext]:{_scope:R,_qualify:(e,t)=>{if(t.prevCaptureIndent===void 0||t.inline||t.simple)return!1;let n=e.indexOf(`
|
|
18
|
+
`);return n>0&&n<e.length-1&&(e[n+1]===`=`||e[n+1]===`-`)},_match:J(Ae),_order:L.MAX,_parse(e,t,n){return{children:X(t,e[1]??``,n),level:e[2]===`=`?1:2,type:I.heading}}},[I.htmlBlock]:d(an,L.HIGH,!0,B),[I.htmlComment]:{_scope:B,_qualify:[`<!`],_match:Y(Me),_order:L.HIGH,_parse:Z,_render:Ut},[I.htmlSelfClosing]:{_scope:B,_qualify:[`<`],_match:Y(rn),_order:L.HIGH,_parse(e){let t=(e[1]??``).trim();return{attrs:i(t,e[2]||``),tag:t}},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}})}},[I.customComponent]:d(on,L.MAX,!1,B),[I.paragraph]:{_scope:R,_qualify:(e,t)=>!t.inline&&!t.simple,_match:p,_order:L.LOW,_parse:Ht,_render(t,n,r={}){return e(`p`,{key:r.key},n(t.children,r))}},[I.image]:{_scope:z,_firstChars:[33],_qualify:e=>e.startsWith(`!==-1,_match:q(dn),_order:L.HIGH,_parse(e){return{alt:W(e[1]??``),target:W(e[2]??``),title:e[3]?W(e[3]):void 0}},_render(t,n,r={}){return e(`img`,{key:r.key,alt:t.alt??void 0,title:t.title??void 0,src:c(t.target,`img`,`src`)??void 0})}},[I.link]:{_scope:z,_firstChars:[91],_qualify:e=>e.charCodeAt(0)===91&&e.indexOf(`](`)!==-1,_match:K(fn),_order:L.LOW,_parse(e,t,n){return{children:Bt(t,e[1]??``,n),target:W(e[2]??``),title:e[3]?W(e[3]):void 0}},_render(t,n,r={}){let i=c(t.target,`a`,`href`);return e(`a`,{key:r.key,href:i??void 0,title:t.title??void 0},n(t.children,r))}},[I.linkAngleBraceStyleDetector]:{_scope:z,_qualify:[`<`],_match:K(Ie),_order:L.MAX,_parse(e){let t=e[1]??``,n=!1;return t.indexOf(`@`)!==-1&&t.indexOf(`//`)===-1&&(n=!0,t=t.replace(`mailto:`,``)),{children:[{text:t,type:I.text}],target:n?`mailto:${t}`:t,type:I.link}}},[I.linkBareUrlDetector]:{_scope:z,_firstChars:[104],_qualify:(e,t)=>!(!t.inline||t.inAnchor||n.disableAutoLink||!vt(e,`http://`)&&!vt(e,`https://`)),_match:K(Fe),_order:L.MAX,_parse(e){let t=e[1]??``;return{children:[{text:t,type:I.text}],target:t,type:I.link}}},[I.newlineCoalescer]:{_scope:B,_qualify:[`
|
|
19
|
+
`],_match:J(xe),_order:L.LOW,_parse:Z,_render(){return`
|
|
20
|
+
`}},[I.orderedList]:f(1),[I.unorderedList]:f(2),[I.ref]:{_scope:B,_qualify:[`[`],_match:Y(We),_order:L.MAX,_parse(e){let t=e[1];return t!==void 0&&(r.current.references[t]={target:e[2]??``,title:e[4]}),{}},_render:Ut},[I.refImage]:{_scope:z,_firstChars:[33],_qualify:e=>e.startsWith(`===-1,_match:q(Ge),_order:L.MAX,_parse(e){return{alt:e[1]?W(e[1]):void 0,ref:e[2]??``}},_render(t,n,i={}){let a=r.current.references[t.ref];return a?e(`img`,{key:i.key,alt:t.alt,src:c(a.target,`img`,`src`)??void 0,title:a.title}):null}},[I.refLink]:{_scope:z,_firstChars:[91],_qualify:e=>e.indexOf(`](`)===-1,_match:K(Ke),_order:L.MAX,_parse(e,t,n){return{children:Bt(t,e[1]??``,n),fallbackChildren:e[0]??``,ref:e[2]??``}},_render(t,n,i={}){let a=r.current.references[t.ref];return a?e(`a`,{key:i.key,href:c(a.target,`a`,`href`)??void 0,title:a.title},n(t.children,i)):e(`span`,{key:i.key},t.fallbackChildren)}},[I.table]:{_scope:R,_qualify:[`|`],_match:J(Re),_order:L.HIGH,_parse(e,t,n){n.inline=!0;let r=e[2]?It(e[2]):[],i=e[3]?Rt(e[3],t,n):[],a=Lt(e[1]??``,t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:I.table}:{children:a.flat(),type:I.paragraph}},_render(t,n,r={}){let i=t,a=e=>i.align[e]&&i.align[e]!==`left`?{textAlign:i.align[e]}:{};return e(`table`,{key:r.key},e(`thead`,{key:`thead`},e(`tr`,null,...i.header.map((t,i)=>e(`th`,{key:i,style:a(i)},n(t,r))))),e(`tbody`,{key:`tbody`},...i.cells.map((t,i)=>e(`tr`,{key:i},...t.map((t,i)=>e(`td`,{key:i,style:a(i)},n(t,r)))))))}},[I.tableSeparator]:{_scope:z,_qualify:[`|`],_match:(e,t)=>t.inTable?/^\|/.exec(e):null,_order:L.HIGH,_parse(){return{type:I.tableSeparator}},_render(){return` | `}},[I.text]:{_scope:z,_match:G((e,t)=>{let n=e.length;if(e.charCodeAt(0)===10){let t=1;for(;t<n&&e.charCodeAt(t)===32;)t++;return t<n&&(e.charCodeAt(t)===42||e.charCodeAt(t)===43||e.charCodeAt(t)===45||e.charCodeAt(t)>=48&&e.charCodeAt(t)<=57)?[e.slice(0,t)]:[`
|
|
21
|
+
`]}if(e.charCodeAt(0)===58){let t=tt.exec(e);if(t)return t}return wn.lastIndex=1,wn.test(e),Cn[0]=e.slice(0,Tn(e,wn.lastIndex)),Cn}),_order:L.MIN,_parse(e){let t=e[0]??``;return{type:I.text,text:t.charCodeAt(0)===38?t.replace(je,(e,t)=>t.startsWith(`#x`)?String.fromCharCode(parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCharCode(parseInt(t.slice(1),10)):l[t]||e):t}},_render(e){return e.text}},[I.textBolded]:{_scope:z,_firstChars:[42,95],_qualify:e=>{let t=e.charCodeAt(0);if(t===42){let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===42&&e.indexOf(`**`,2)!==-1}if(t===95){let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===95&&e.indexOf(`__`,2)!==-1}return!1},_match:q(nt),_order:L.MED,_parse(e,t,n){return{children:t(e[2]??``,n)}},_render(t,n,r={}){return e(`strong`,{key:r.key},n(t.children,r))}},[I.textEmphasized]:{_scope:z,_firstChars:[42,95],_qualify:e=>{let t=e.charCodeAt(0),n=e.charCodeAt(1);return n===32||n===10||n===9?!1:t===42&&e.indexOf(`*`,1)!==-1||t===95&&e.indexOf(`_`,1)!==-1},_match:q(rt),_order:L.LOW,_parse(e,t,n){return{children:t(e[2]??``,n)}},_render(t,n,r={}){return e(`em`,{key:r.key},n(t.children,r))}},[I.textEscaped]:{_scope:z,_qualify:[`\\`],_match:q($e),_order:L.HIGH,_parse(e){return{text:e[1]??``,type:I.text}}},[I.textMarked]:{_scope:z,_firstChars:[61],_qualify:e=>{let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===61&&e.indexOf(`==`,2)!==-1},_match:q(it),_order:L.LOW,_parse(e,t,n){return{children:Ht(e,t,n).children}},_render(t,n,r={}){return e(`mark`,{key:r.key},n(t.children,r))}},[I.textStrikethroughed]:{_scope:z,_firstChars:[126],_qualify:e=>{let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===126&&e.indexOf(`~~`,2)!==-1},_match:q(at),_order:L.LOW,_parse(e,t,n){return{children:Ht(e,t,n).children}},_render(t,n,r={}){return e(`del`,{key:r.key},n(t.children,r))}}}},Sn=[null,/^ {1,1}/gm,/^ {1,2}/gm,/^ {1,3}/gm,/^ {1,4}/gm,/^ {1,5}/gm,/^ {1,6}/gm,/^ {1,7}/gm,/^ {1,8}/gm],Cn=[``],wn=/(?:[^\n&h!*:<=[\\_`~]+|h(?!ttp))*/y,Tn=(e,t)=>t>=3&&e.charCodeAt(t)===10&&e.charCodeAt(t-1)===32&&e.charCodeAt(t-2)===32?t-2:t,En=(e,t,...n)=>({children:n,props:t,type:e}),Dn=(e,t,n,r)=>{let i=(e,r)=>{if(!r?.trim())return null;let i=r.match(le);return i?i.reduce((r,i)=>{let a=i.indexOf(`=`);if(a!==-1){let o=Mt(i.slice(0,a)).trim(),s=yt(i.slice(a+1).trim()),c=ae[o]??o;if(c===`ref`)return r;r[c]=Pt(e,o,s,t.sanitizer??kt),typeof r[c]==`string`&&un(r[c])&&(r[c]=An(r[c].trim(),t,n).ast)}else i!==`style`&&ue.test(i)&&(r[ae[i]??i]=!0);return r},{}):null},a=[fe,_e,ve,n.enforceAtxHeadings?ke:Oe,Re,gt,_t,ln],o=n.disableParsingRawHTML?a:[...a,Ue,sn,Me,cn,ln],s=xn(e,t,n,r,i,e=>{let t=e.replace(Ye,``),n=t.length>2048?t.slice(0,2048):t;return n.indexOf(`
|
|
22
|
+
|
|
23
|
+
`)!==-1||Wt(o,n)},a);return n.disableParsingRawHTML?Object.keys(s).reduce((e,t)=>(t!==I.htmlBlock&&t!==I.htmlSelfClosing&&(e[t]=s[t]),e),{}):s},On=(e,t,n,r,i)=>{let a=!t.preserveFrontmatter&&e.charCodeAt(0)===45?e.replace(Ee,``):e,o=a.charCodeAt(0)===10?a.replace(Ye,``):a,s=t.forceInline||!t.forceBlock&&qe.test(o)===!1,c=n(s?a:`${U(o)}\n\n`,{inline:s});if(r.length>0)for(let e of r)e.parsedAst=n(e.footnote,{inline:!0});return{ast:c,footnotes:r,references:i,inline:s}},kn=(e,t,n,r,i)=>{let a=t.components??{},o=mn(t),s=e.footnotes||[],c=e.inline,l=r(e.ast,{inline:c});for(;typeof l[l.length-1]==`string`&&!l[l.length-1].trim();)l.pop();let u=(()=>{if(n.wrapper===null)return l;let e=n.wrapper??(c?`span`:`div`);if(l.length>1||n.forceWrapper)return i(e,{key:`outer`},l);if(l.length===1){let t=l[0];if(Array.isArray(t))return i(e,{key:`outer`},t);if(typeof t==`string`){let e={key:`outer`};if(!c&&a){let n=xt(a,`p.props`,{})??{},r=bt(e.className,n.className),o={...e,...n};return r&&(o.className=r),i(`span`,o,t)}return i(`span`,e,t)}return t}return i(e,{key:`outer`},null)})();return s.length?i(`div`,null,u,i(`footer`,{key:`footer`},...s.map(e=>i(`div`,{id:o(e.identifier),key:e.identifier},e.identifier,r(e.parsedAst||e.footnote,{inline:!0}))))):u},An=(e=``,t,n={})=>{let{parse:r,scope:i}=yn(t,n,!0),a=gn();return bn(i,a,()=>On(e,n,r,a.footnotes,a.references))},jn=(e,t,n={})=>{let{emit:r,createElement:i,scope:a}=yn(t,n,!1);return bn(a,{footnotes:e.footnotes??[],references:e.references??{}},()=>kn(e,t,n,r,i))},Mn=(e=``,t,n={})=>{if(typeof e!=`string`)throw Error(`intlayer: the first argument must be a string`);let{parse:r,emit:i,createElement:a,scope:o}=yn(t,n,!1),s=gn();return bn(o,s,()=>kn(On(e,n,r,s.footnotes,s.references),t,n,i,a))},Nn=(e,t,n={})=>{let{components:r,namedCodesToUnicode:i,sanitizer:a,slugify:o,...s}=n;return Mn(e,{runtime:t,components:r,namedCodesToUnicode:i,sanitizer:a,slugify:o},s)},Pn={name:`move-diagonal`,size:24,node:[[`path`,{d:`M11 19H5v-6`,key:`8awifj`}],[`path`,{d:`M13 5h6v6`,key:`7voy1q`}],[`path`,{d:`M19 5 5 19`,key:`wwaj1z`}]]};Pn.node;var Fn=y(Pn);a(),p();var In=e=>{let{enable:t=!0,onSwipeLeft:n,onSwipeRight:r,itemIndex:i,itemCount:a,thresholdPct:o=20,touchAction:s=`pan-y`,disableWhenSelectingText:c=!0}=e,l=_(null),[u,d]=g(!1),[f,p]=g(0),m=_({pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1}),v=_(!1),y=()=>{let e=l.current;return e?e.clientWidth:0},b=e=>{let t=i<=0,n=i>=a-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},x=e=>{t&&m.current.pointerId===null&&(m.current.pointerId=e.pointerId,m.current.startX=e.clientX,m.current.startY=e.clientY,m.current.lastX=e.clientX,m.current.axisLocked=!1,m.current.isHorizontal=!1,v.current=!1,d(!1),p(0))},S=e=>{if(!t||m.current.pointerId!==e.pointerId)return;let n=y();if(!n)return;let r=e.clientX-m.current.startX,i=e.clientY-m.current.startY;if(c){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){v.current=!0;return}}if(!m.current.axisLocked){let e=Math.abs(r),t=Math.abs(i);(e>6||t>6)&&(m.current.axisLocked=!0,m.current.isHorizontal=e>t)}if(!m.current.isHorizontal)return;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),u||d(!0);let a=r/n*100;p(b(a)),m.current.lastX=e.clientX},C=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=m.current.isHorizontal,i=f;if(d(!1),p(0),m.current.pointerId=null,m.current.axisLocked=!1,m.current.isHorizontal=!1,v.current){v.current=!1;return}t&&(i>o?r?.():i<-o&&n?.())};return h(()=>{p(0),d(!1)},[i]),{containerRef:l,isDragging:u,dragDeltaPct:f,containerProps:{ref:l,onPointerDown:x,onPointerMove:S,onPointerUp:e=>{t&&m.current.pointerId===e.pointerId&&C(e)},onPointerCancel:e=>{t&&m.current.pointerId===e.pointerId&&C(e)},style:{touchAction:s}}}};p();var Ln=({children:e})=>x(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:x(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:x(`code`,{children:typeof e==`string`?e.split(`
|
|
24
|
+
`).map((e,t)=>x(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),Rn=`[&_pre.shiki]:!bg-transparent min-w-0 max-w-full overflow-auto bg-transparent [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&_pre.shiki]:max-w-full [&_pre.shiki]:overflow-x-auto [&_pre::-webkit-scrollbar]:hidden [&_pre]:[-ms-overflow-style:none] [&_pre]:[scrollbar-width:none]`,zn=({html:e})=>x(`div`,{className:Rn,children:x(`div`,{dangerouslySetInnerHTML:{__html:e}})}),Bn=c(()=>w(()=>import(`./CodeBlockShiki-B-OcGOY1.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1,2,3]))),Vn=({className:e,onChange:t,isEditable:n,children:r,lang:i,highlightedHtml:a,...o})=>x(`div`,{className:T(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:a?x(zn,{html:a}):x(s,{fallback:x(Ln,{children:r}),children:x(Bn,{lang:i,children:r})})}),Hn={astro:()=>w(()=>import(`./astro-BZ97kZFP.js`),__vite__mapDeps([4,5,6,7,8,9,10])),bash:()=>w(()=>import(`./bash-CLZ0U2zV.js`),[]),css:()=>w(()=>import(`./css-DUjzNfgv.js`),__vite__mapDeps([11,8])),html:()=>w(()=>import(`./html-WQKKblVZ.js`),__vite__mapDeps([12,13,6,8])),javascript:()=>w(()=>import(`./javascript-Yelw-5ZN.js`),__vite__mapDeps([14,6])),json:()=>w(()=>import(`./json-CaljABEy.js`),__vite__mapDeps([15,5])),json5:()=>w(()=>import(`./json5-BR5RXkoi.js`),[]),jsonc:()=>w(()=>import(`./jsonc-CYpm1nAK.js`),[]),markdown:()=>w(()=>import(`./markdown-BYOwaDjH.js`),[]),svelte:()=>w(()=>import(`./svelte-CdeT-Ich.js`),__vite__mapDeps([16,6,7,8,9])),tsx:()=>w(()=>import(`./tsx-5f3ulCja.js`),__vite__mapDeps([17,10])),typescript:()=>w(()=>import(`./typescript-Utq2Cl8c.js`),__vite__mapDeps([18,7])),vue:()=>w(()=>import(`./vue-BqdMUtqy.js`),__vite__mapDeps([19,5,6,7,8,13])),xml:()=>w(()=>import(`./xml-DMbpbO54.js`),[]),yaml:()=>w(()=>import(`./yaml-rwi0_p6S.js`),[])};Object.keys(Hn);var Un={cjs:`javascript`,console:`bash`,cts:`typescript`,htm:`html`,js:`javascript`,jsonc:`json5`,jsx:`tsx`,md:`markdown`,mdx:`markdown`,mjs:`javascript`,mts:`typescript`,postcss:`css`,sh:`bash`,shell:`bash`,shellscript:`bash`,ts:`typescript`,yml:`yaml`,zsh:`bash`},Wn=`plaintext`,Gn=e=>{let t=(e??``).trim().toLowerCase(),n=Un[t]??t,r=Hn[n];return r?{id:n,loadGrammar:r}:{id:Wn,loadGrammar:null}},Kn={light:`github-light`,dark:`github-dark`},qn=e=>e?e.match(/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|shorts\/))([\w-]{11})/i)?.[1]??null:null,Jn=e=>`https://www.youtube.com/embed/${e}`,Yn=e=>`https://www.youtube.com/watch?v=${e}`;p();var Xn=`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,Zn=(e,t)=>{let n=qn(e);return n?{isYoutubeVideo:!0,src:Jn(n),frameProps:{...t,allow:Xn,allowFullScreen:!0,referrerPolicy:`strict-origin-when-cross-origin`}}:{src:e,frameProps:t,isYoutubeVideo:!1}},Qn=e=>{if(!e)return{href:``,label:``};let t=qn(e);if(t)return{href:Yn(t),label:`youtube.com`};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}},$n=()=>{let e=_(null),[t,n]=g(!1);return h(()=>{let r=e.current;if(!r||t)return;if(typeof IntersectionObserver>`u`){n(!0);return}let i=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(n(!0),i.disconnect())},{rootMargin:`200px`});return i.observe(r),()=>i.disconnect()},[t]),{elementRef:e,hasBecomeVisible:t}},er=({src:e,title:t,className:n,frameProps:r})=>{let{elementRef:i,hasBecomeVisible:a}=$n();return a?x(`iframe`,{...r,src:e,title:t,loading:`lazy`,className:n}):x(`div`,{ref:i,"aria-hidden":!0,className:n})},tr=e=>{let{src:t,className:n,title:r,...i}=e,[a,o]=g(!1),{src:s,frameProps:c,isYoutubeVideo:l}=Zn(t,i),{href:u,label:d}=Qn(t);return x(M,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[x(er,{src:s,title:r,frameProps:c,className:T(`block max-h-[80vh] min-h-[12rem] w-full border-0`,l&&`aspect-video`,n)}),x(`div`,{className:`flex items-center justify-between gap-3 px-3 py-1`,children:[u?x(k,{href:u,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-muted-foreground text-xs underline-offset-2 hover:text-foreground hover:underline`,children:d}):x(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),x(j,{variant:`hoverable`,size:`icon-md`,onClick:()=>o(!0),label:`Open embedded page in fullscreen`,Icon:Fn})]}),x(A,{isOpen:a,onClose:()=>o(!1),size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:a&&s?x(M,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:x(`iframe`,{...c,src:s,title:r??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})};p();var nr=u({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),$=()=>i(nr),rr=({children:e})=>{let[t,n]=C(`packageManager`,`npm`),[r,i]=C(`codeFormat`,`typescript`),[a,o]=C(`contentDeclarationFormat`,`typescript`);return x(nr,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:i,contentDeclarationFormat:a,setContentDeclarationFormat:o},children:e})},ir={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},title:`Expand collapse toggle`,description:`Content declaration for the expand/collapse toggle component, defining the labels shown when content is expanded or collapsed.`,tags:[`ui component`,`toggle`,`expand collapse`],location:`local`,localId:`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`};p();var ar=700,or=({isRollable:e=!0,minHeight:n=ar,children:r,className:i})=>{let[a,o]=g(0),[s,c]=g(!0),l=_(null),{expandCollapseContent:u}=S(ir),d=a>n,f=t(e=>{if(l.current?.disconnect(),l.current=null,!e)return;if(typeof ResizeObserver>`u`){o(e.clientHeight);return}let t=new ResizeObserver(([e])=>{e&&o(e.contentRect.height)});t.observe(e),l.current=t},[]);return h(()=>()=>l.current?.disconnect(),[]),e?d?x(v,{isHidden:s,minHeight:n,className:`w-full overflow-x-auto overflow-y-hidden`,style:{gridTemplateRows:s?`${n}px`:`${a}px`},children:[x(`div`,{className:T(`grid w-full`,i),ref:f,children:r}),x(`button`,{className:T(`absolute inset-e-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-linear-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,s?`w-full`:`w-32`),type:`button`,onClick:()=>c(e=>!e),children:u(s)})]}):x(`div`,{className:T(`grid w-full`,i),ref:f,children:r}):r};p();var sr=({children:e,originalLang:t,targetFormat:n,initialHtml:r})=>{let[i,a]=g(r??null),o=_(r??null);h(()=>{if(r&&n===`typescript`){o.current=r,a(r);return}let i=!1;return(async()=>{try{let r=e,s=Gn(t).id;if(n!==`typescript`){let{transformCode:a,deriveLanguage:o}=await w(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-aP9a_qk2.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;r=a(String(e),n),s=Gn(o(t,n)).id}let{codeToHtml:c}=await w(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-BIG1bVgc.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([20,1,2,3]));if(i)return;let l=await c(String(r),{lang:s,themes:Kn,defaultColor:!1});i||(o.current=l,a(l))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?x(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):x(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:x(`code`,{children:e})})};a();var cr=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},lr=({children:e,...t})=>{let{packageManager:n,codeFormat:r,contentDeclarationFormat:i}=$(),a=t.packageManager===void 0,s=n===t.packageManager,c=cr(t.codeFormat),l=c===void 0,u=c?c.includes(r):!1,d=cr(t.contentDeclarationFormat),f=d===void 0,p=d?d.includes(i):!1;return(a||s)&&(l||u)&&(f||p)?e:x(o,{})},ur={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},title:`Code selector accessibility labels`,description:`Accessible labels for code block selector buttons used by screen readers.`,tags:[`accessibility`,`code block`,`design system`],location:`local`,localId:`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`},dr=({availableFormats:e})=>{let{codeFormat:t,setCodeFormat:n,setContentDeclarationFormat:r}=$(),i=S(ur),a=t=>!e||e.includes(t);return x(E,{value:t,onValueChange:e=>{n(e),r(e)},children:[x(E.Trigger,{className:`py-1!`,"aria-label":i.codeFormat.label.value,children:x(E.Value,{placeholder:i.codeFormat.placeholder.value})}),x(E.Content,{children:[a(`typescript`)&&x(E.Item,{value:`typescript`,children:`TypeScript`}),a(`esm`)&&x(E.Item,{value:`esm`,children:`ESM`}),a(`commonjs`)&&x(E.Item,{value:`commonjs`,children:`CommonJS`})]})]})},fr=()=>{let{contentDeclarationFormat:e,setContentDeclarationFormat:t}=$(),n=S(ur);return x(E,{value:e,onValueChange:t,children:[x(E.Trigger,{className:`py-1!`,"aria-label":n.contentDeclarationFormat.label.value,children:x(E.Value,{placeholder:n.contentDeclarationFormat.placeholder.value})}),x(E.Content,{children:[x(E.Item,{value:`typescript`,children:`TypeScript`}),x(E.Item,{value:`commonjs`,children:`CommonJS`}),x(E.Item,{value:`esm`,children:`ESM`}),x(E.Item,{value:`json`,children:`JSON`})]})]})},pr={key:`code`,content:{nodeType:`translation`,translation:{en:{title:`Copy code`,description:`Copy the code to the clipboard`},"en-GB":{title:`Copy code`,description:`Copy the code to the clipboard`},fr:{title:`Copier le code`,description:`Copier le code dans le presse-papiers`},es:{title:`Copiar código`,description:`Copiar el código al portapapeles`},de:{title:`Code kopieren`,description:`Kopieren Sie den Code in die Zwischenablage`},ja:{title:`コードをコピー`,description:`コードをクリップボードにコピー`},ko:{title:`코드 복사`,description:`코드를 클립보드에 복사`},zh:{title:`复制代码`,description:`复制代码到剪贴板`},it:{title:`Copiare il codice`,description:`Copiare il codice nella clipboard`},pt:{title:`Copiar código`,description:`Copiar o código para a área de transferência`},hi:{title:`कोड कॉपी करें`,description:`कोड को क्लिपबोर्ड पर कॉपी करें`},ar:{title:`نسخ الكود`,description:`نسخ الكود إلى الحافظة`},ru:{title:`Копировать код`,description:`Копировать код в буфер обмена`}}},localIds:[`code::local::../@intlayer/design-system/dist/esm/components/IDE/code.content.mjs`,`code::local::../@intlayer/design-system/dist/esm/components/IDE/copyCode.content.mjs`]},mr=({code:e,...t})=>{let{title:n,description:r}=S(pr);return x(F,{identifier:`copy`,children:[x(ee,{content:e,...t}),x(F.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[x(`strong`,{children:n}),x(`p`,{className:`text-neutral`,children:r})]})]})},hr=()=>{let{packageManager:e,setPackageManager:t}=$(),n=S(ur);return S(ur),x(E,{value:e,onValueChange:t,children:[x(E.Trigger,{className:`py-1!`,"aria-label":n.packageManager.label.value,children:x(E.Value,{placeholder:n.packageManager.placeholder.value})}),x(E.Content,{children:[x(E.Item,{value:`npm`,children:`npm`}),x(E.Item,{value:`pnpm`,children:`pnpm`}),x(E.Item,{value:`yarn`,children:`yarn`}),x(E.Item,{value:`bun`,children:`bun`})]})]})};p(),a();var gr=700,_r=new Set([`tsx`,`jsx`]),vr=[`typescript`,`commonjs`,`esm`],yr=e=>vr.includes(e),br=e=>{if(Array.isArray(e))return e.map(String);if(typeof e==`string`&&e!==``){if(e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t.map(String)}catch{}return[e]}},xr=({children:t,language:n,highlightedHtml:r,showHeader:i=!0,showLineNumbers:a=!0,className:s,fileName:c,packageManager:l,codeFormat:u,contentDeclarationFormat:d,isRollable:f=!0,lang:p,...m})=>{let{codeFormat:_,contentDeclarationFormat:v}=$(),y=e(()=>br(u),[u]),b=e(()=>br(d),[d]),S=y!==void 0&&y.length>1&&y.includes(`typescript`),C=b!==void 0&&b.length>1&&b.includes(`typescript`),E=S||C,D=C?v:_,O=e(()=>{let e=C?b:y;if(!e)return;let t=e.filter(yr);return _r.has(n)?t.filter(e=>e!==`commonjs`):t},[C,b,y,n]),k=e(()=>!O||O.includes(D)?D:O[O.length-1]??`typescript`,[O,D]),[A,j]=g(c);h(()=>{if(!E||k===`typescript`){j(c);return}if(!c)return;let e=!1;return(async()=>{let{deriveFileName:t}=await w(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-aP9a_qk2.js`);return{deriveFileName:e}},[]);e||j(t(c,k))})(),()=>{e=!0}},[c,E,k]);let N=e(()=>{let e=Array.isArray(t)?t.join(``):String(t);return e.endsWith(`
|
|
25
|
+
`)?e.slice(0,-1):e},[t]),[ee,P]=g(N);h(()=>{if(!E||k===`typescript`){P(N);return}let e=!1;return(async()=>{let{transformCode:t}=await w(async()=>{let{transformCode:e}=await import(`./codeTransformer-aP9a_qk2.js`);return{transformCode:e}},[]);e||P(t(N,k))})(),()=>{e=!0}},[N,E,k]);let te=l||u||d;return x(lr,{packageManager:l,codeFormat:u,contentDeclarationFormat:d,children:x(M,{className:T(`relative min-w-0 max-w-full text-sm leading-6`,a&&`with-line-number ms-0`,s),transparency:`lg`,dir:`ltr`,...m,children:[i&&x(o,{children:[x(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl border-b bg-card/50 py-1.5 ps-4 pe-12 text-muted-foreground text-xs`,children:[x(`span`,{className:`truncate`,children:A??n}),x(`div`,{className:`flex items-center gap-2`,children:[l&&x(hr,{}),u&&x(dr,{availableFormats:O}),d&&x(fr,{})]})]}),x(`div`,{className:`sticky top-46 z-20`,children:x(`div`,{className:T(`absolute inset-e-2 bottom-0 flex h-7 items-center`,te&&`h-11`),children:x(mr,{code:ee})})})]}),x(or,{minHeight:gr,isRollable:f,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:E?x(sr,{originalLang:n,targetFormat:k,initialHtml:r,children:N}):x(Vn,{lang:n,highlightedHtml:r,children:N})})]})})};p();var Sr=u({tabsValues:{},setTabsValues:(()=>{})}),Cr=()=>i(Sr),wr=({children:t})=>{let[n,r]=g({}),i=e(()=>({tabsValues:n,setTabsValues:r}),[n]);return x(Sr,{value:i,children:t})};p();var Tr=e=>e.trim().replace(/\s+/g,`-`).replace(/[^\w-]/g,``),Er=e=>{let t=new Map;return e.map((e,n)=>{let r=Tr(e)||String(n),i=t.get(r)??0;return t.set(r,i+1),i===0?r:`${r}-${i+1}`})},Dr=u(void 0),Or=b(`relative w-full rounded-lg`,{variants:{background:{with:`border bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),kr=({value:e,label:t},n)=>{let r=e??t;return typeof r==`string`?r:String(n)},Ar=({children:e,...t})=>x(`div`,{...t,children:e});Ar.displayName=`TabItem`;var jr=Object.assign(({defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...u})=>{let d=f.toArray(a).filter(e=>l(e)&&e.type===Ar).map((e,t)=>({...e.props,value:kr(e.props,t)})),p=d[0]?.value,m=n!==void 0&&d.some(e=>e.value===n),h=m?n:p,{tabsValues:_,setTabsValues:v}=Cr(),[y,b]=g(n??p??``),[S,C]=g(n);n!==S&&(C(n),m&&b(n));let w=!!(r&&typeof _==`object`),E=w&&r?_?.[r]:y,D=d.some(e=>e.value===E);!w&&!D&&h!==void 0&&y!==h&&b(h);let O=D?E:h??n??p??``,k=d.length===0?-1:Math.max(0,d.findIndex(e=>e.value===O)),A=d.length,j=Er(d.map(({value:e})=>e)),{containerProps:M,dragDeltaPct:N,isDragging:ee}=In({itemIndex:k,itemCount:A,onSwipeLeft:()=>{let e=Math.min(A-1,k+1),t=d[e]?.value;t&&P(t)},onSwipeRight:()=>{let e=Math.max(0,k-1),t=d[e]?.value;t&&P(t)}}),P=t(e=>{b(e),r&&typeof v==`function`&&v(t=>({...t,[r]:e}))},[r,v]),ne=e(()=>({activeTab:O??``,setActiveTab:P}),[O,P]);return x(Dr.Provider,{value:ne,children:x(`div`,{className:T(Or({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...u,children:[x(`div`,{className:T(`flex shrink-0 gap-3 p-3`,s),children:x(te,{selectedChoice:O,tabs:d.map(({label:e,value:t,disabled:n},r)=>{let i=O===t,a=j[r];return x(`button`,{className:T(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:n,onClick:()=>!n&&P(t),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${a}`,id:`tab-${a}`,type:`button`,children:e??t},t)}),hoverable:!0,color:`text`})}),x(`div`,{className:T(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...M,children:x(`div`,{className:T(`grid w-full min-w-0`,c&&`h-full`,ee?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${d.length}, 100%)`,transform:`translateX(-${k*100-(ee?N:0)}%)`},children:d.map(({value:e,children:t,className:n},r)=>{let i=r===k,a=j[r];return x(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${a}`,id:`tabpanel-${a}`,inert:!i,tabIndex:i?0:-1,"data-active":i,className:T(`w-full min-w-0 p-3 opacity-100 transition-opacity duration-300 ease-in-out`,c&&`h-full overflow-y-auto`,!i&&`pointer-events-none opacity-0`,n),children:x(`div`,{className:T(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:t})},e)})})})]})})},{Item:Ar}),Mr={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},"en-GB":{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},fr:{modal:{title:`Afficher tout le contenu du tableau`,description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`}},es:{modal:{title:`Mostrar todo el contenido de la tabla`,description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`}},de:{modal:{title:`Alle Tabellendaten anzeigen`,description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`}},ja:{modal:{title:`テーブルのすべての内容を表示`,description:`テーブルをモーダルで開き、すべてのデータを明確に表示`}},ko:{modal:{title:`테이블의 모든 내용 표시`,description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`}},zh:{modal:{title:`显示表格的所有内容`,description:`在弹窗中打开表格以清晰地查看所有数据`}},it:{modal:{title:`Mostra tutto il contenuto della tabella`,description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`}},pt:{modal:{title:`Mostrar todo o conteúdo da tabela`,description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`}},hi:{modal:{title:`सभी तालिका सामग्री दिखाएं`,description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`}},ar:{modal:{title:`اظهار جميع محتويات الجدول`,description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`}},ru:{modal:{title:`Показать все данные таблицы`,description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`}}}},title:`Table component content`,description:`Content declaration related to the Table component, specifically for UI message to display all table content.`,tags:[`table`,`component content`,`design system`],location:`local`,localId:`table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`},Nr=({setIsModalOpen:e})=>{let{modal:t}=S(Mr);return x(`div`,{className:`pointer-events-none absolute inset-e-4 inset-y-0 z-10`,children:x(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:x(F,{identifier:`expand`,children:[x(j,{variant:`hoverable`,size:`icon-md`,onClick:()=>{e(!0)},label:t.title,Icon:Fn}),x(F.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[x(`strong`,{children:t.title}),x(`p`,{className:`text-neutral`,children:t.description})]})]})})})};p();var Pr=d(({className:e,isInteractive:t,...n},r)=>x(`table`,{ref:r,className:T(`w-full table-auto border-separate border-spacing-0 overflow-hidden rounded-2xl text-start text-sm`,`[&_thead_tr:first-child_th:first-child]:rounded-ss-2xl`,`[&_thead_tr:first-child_th:last-child]:rounded-se-2xl`,`[&_tbody_tr:last-child_td:first-child]:rounded-es-2xl`,`[&_tbody_tr:last-child_td:last-child]:rounded-ee-2xl`,`supports-[corner-shape:squircle]:rounded-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:first-child]:rounded-ss-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:last-child]:rounded-se-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:first-child]:rounded-es-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:last-child]:rounded-ee-3xl`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n}));p();var Fr=.55,Ir=5,Lr=30,Rr=(e,t,n)=>{h(()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(Lr,Math.max(Ir,(n[t]??0)*Fr));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${Lr}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},n)};p(),a();var zr=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[s,c]=g(!1),[l,u]=g(null),d=_(null),f=_(null);Rr(d,f,[a.children,s]),h(()=>{if(s&&l!==null&&f.current){let e=f.current.rows[l];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-card`),e.style.transition=`background-color 0.3s ease-in-out`)}},[s,l]),h(()=>{s||u(null)},[s]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(u(t.rowIndex),c(!0))}i?.(e)};return x(`div`,{className:`group relative`,children:[n&&x(Nr,{setIsModalOpen:c}),x(or,{isRollable:t,className:`max-w-full overflow-x-auto bg-background text-start`,children:x(Pr,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),x(A,{isOpen:s,onClose:()=>c(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:s?x(`div`,{className:`grid`,children:x(Pr,{ref:f,className:T(`min-w-full max-w-full text-start`,e),isInteractive:r,...a})}):x(o,{})})]})},Br=({className:e,...t})=>x(`th`,{className:T(`border border-b border-solid bg-neutral/10 p-4`,e),...t}),Vr=({className:e,...t})=>x(`tr`,{className:T(`hover:bg-neutral/10`,e),...t}),Hr=({className:e,...t})=>x(`td`,{className:T(`border border-b border-solid p-4`,e),...t}),Ur=({className:e,...t})=>x(`hr`,{className:T(`mx-6 mt-16 border-dashed text-neutral`,e),...t}),Wr={createElement:(e,t,...r)=>n(e,t,...r),cloneElement:(e,t,...n)=>r(e,t,...n),Fragment:o,normalizeProps:(e,t)=>t},Gr=(e=``,t={})=>{if(typeof e==`string`)return Nn(e,Wr,t);let{components:n,namedCodesToUnicode:r,sanitizer:i,slugify:a,...o}=t;return jn(e,{runtime:Wr,components:n,namedCodesToUnicode:r,sanitizer:i,slugify:a},o)},Kr=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>Gr(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o});p(),a();var qr=e=>x(D,{isClickable:!0,className:`mb-16 mb-8 text-foreground`,...e}),Jr=e=>x(P,{isClickable:!0,className:`mt-16 text-foreground`,...e}),Yr=e=>x(ne,{isClickable:!0,className:`mt-5 text-foreground`,...e}),Xr=e=>x(O,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Zr=e=>x(N,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Qr=e=>x(re,{isClickable:!0,className:`mt-3 text-foreground`,...e}),$r=e=>x(`strong`,{className:`text-foreground`,...e}),ei=m(({className:e,children:t,highlightedHtml:n,lang:r,...i})=>{let a=String(t??``).replace(/\n$/,``);if(!e){let e=a.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)));return x(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-[0.875em] leading-[inherit]`,children:e})}let o=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return x(xr,{...i,language:o,showHeader:!0,highlightedHtml:n,className:`border`,children:a})},(e,t)=>e.children===t.children&&e.className===t.className&&e.highlightedHtml===t.highlightedHtml),ti=e=>x(ei,{...e}),ni=({className:e,...t})=>x(`blockquote`,{className:T(`mt-5 gap-3 border-card border-s-4 ps-5 text-muted-foreground [&_strong]:text-neutral`,e),...t}),ri=({className:e,...t})=>x(`ul`,{className:T(`mt-5 flex list-disc flex-col gap-3 ps-5 marker:text-neutral/80`,e),...t}),ii=({className:e,...t})=>x(`ol`,{className:T(`mt-5 flex list-decimal flex-col gap-3 ps-5 marker:text-neutral/80`,e),...t}),ai=({className:e,alt:t,src:n,...r})=>x(`img`,{...r,alt:t??``,loading:`lazy`,decoding:`async`,className:T(`max-h-[80vh] max-w-full rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),oi=e=>t=>x(k,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),si={h1:qr,h2:Jr,h3:Yr,h4:Xr,h5:Zr,h6:Qr,strong:$r,blockquote:ni,ul:ri,ol:ii,img:ai,pre:e=>x(o,{children:e.children}),table:e=>x(zr,{isRollable:!0,displayModal:!0,...e}),th:Br,tr:Vr,td:Hr,hr:Ur,Tabs:e=>x(jr,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:jr.Item,Columns:({className:e,...t})=>x(`div`,{className:T(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>x(`div`,{className:T(`flex-1`,e),...t}),iframe:e=>x(tr,{...e})},ci=e=>({...si,code:ti,a:oi(e)}),li=({children:e,locale:t,forceBlock:n,preserveFrontmatter:r,tagfilter:i,components:a,wrapper:o})=>{let s=Kr(e,{components:{...ci(t),...a},wrapper:o,forceBlock:n,preserveFrontmatter:r,tagfilter:i});return x(rr,{children:x(wr,{children:s})})};export{Yn as a,Hn as c,Rn as d,qn as i,Gn as l,tr as n,Kn as o,Jn as r,Un as s,li as t,Ln as u};
|