intlayer-editor 9.8.0 → 9.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/CodeBlockShiki-CyWVZ3oS.js +2 -0
- package/client/dist/assets/MarkDownRender-BHBS5h7P.js +1 -0
- package/client/dist/assets/MarkDownRender-BZZ7WjHu.js +25 -0
- package/client/dist/assets/{MarkdownEditor-CGnq7P7F.js → MarkdownEditor-DByFY37d.js} +45 -45
- package/client/dist/assets/{index-DMdur3uE.js → index-D8eWx2dZ.js} +9 -9
- package/client/dist/assets/{index-CfrSXy49.css → index-nJs0PAgg.css} +1 -1
- package/client/dist/assets/purify.es-Dzkdzyfv.js +3 -0
- package/client/dist/assets/{shikiBundle-8uG1ilsY.js → shikiBundle-CniBYWJS.js} +2 -2
- package/client/dist/index.html +2 -2
- package/package.json +18 -18
- package/client/dist/assets/CodeBlockShiki-Tkm8JGKR.js +0 -2
- package/client/dist/assets/MarkDownRender-CgXsgAvz.js +0 -1
- package/client/dist/assets/MarkDownRender-CxfGVugb.js +0 -25
- package/client/dist/assets/purify.es-Dqk5qvad.js +0 -3
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-Tkm8JGKR.js","assets/compat-CQl9dCnI.js","assets/index-DMdur3uE.js","assets/index-CfrSXy49.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-DgaLhXQH.js","assets/html-BCy9P6D2.js","assets/html-DSw1lh5G.js","assets/javascript-CpIGwZ_Y.js","assets/json-C3WlssX3.js","assets/svelte-CdeT-Ich.js","assets/tsx-CGosfAUg.js","assets/typescript-Bb1J8qyy.js","assets/vue-jUI-lpPb.js","assets/shikiBundle-8uG1ilsY.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{A as e,G as t,K as n,M as r,N as i,X as a,Y as o,Z as s,_ as c,a as l,c as u,d,i as f,k as p,l as m,n as h,o as g,r as _,s as v,t as y,tt as b,u as x,v as S}from"./index-DMdur3uE.js";import{D as C,F as w,I as T,N as E,P as D,S as O,T as k,_ as A,g as ee,j,k as M,m as N,n as te,p as ne,t as re,w as ie,y as P}from"./compat-CQl9dCnI.js";var F={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`},I={MAX:0,HIGH:1,MED:2,LOW:3,MIN:4},ae={BLOCK:1,INLINE:2,BOTH:3},L=ae.BLOCK,R=ae.INLINE,z=ae.BOTH,oe=`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`}),se={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},ce=[`style`,`script`,`pre`],le=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],ue=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})|(?:\[[^\]]*\])))?/gi,de=/^[A-Z_:]/i,fe=/\n{2,}$/,pe=/^(\s*>[\s\S]*?)(?=\n\n|$)/,me=/^ *> ?/gm,he=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,ge=/^(?=( {2,}))\1\n/,_e=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,ve=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n((?:[^\n]*(?:\n|$))*?)(?:\1\n?|$)/,ye=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,be=/^([ \t]*)(`{3,}|~{3,})/,xe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Se=/^(?:\n *)*\n/,Ce=/\r\n?/g,we=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Te=/^\[\^([^\]]+)]/,Ee=/\f/g,De=/^---[ \t]*\n(.|\n)*?\n---[ \t]*\n/,Oe=/^\s*?\[(x|\s)\]/,ke=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ae=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,je=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Me=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Ne=/^<!--[\s\S]*?(?:-->)/,Pe=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Fe=/^\{.*\}$/,Ie=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Le=/^<([^ >]+[:@/][^ >]+)>/,Re=/-([a-z])?/gi,ze=/^(\|[^\n]*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:[^\n]*\|[^\n]*\n)*))?\n?/,Be=/(^ *\||\| *$)/g,Ve=/^ *:-+: *$/,He=/^ *:-+ *$/,Ue=/^ *-+: *$/,We=/^[^\n]+(?: {2}\n|\n{2,})/,Ge=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Ke=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,qe=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Je=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Ye=/\t/g,Xe=/^\n+/,Ze=/^\n*([ \t]*)/,Qe=`(?:\\d+\\.)`,$e=`(?:[*+-])`,et=/^\\([^0-9A-Za-z\s])/,tt=/\\([^0-9A-Za-z\s])/g,nt=/^(:[a-zA-Z0-9-_]+:)/,B=e=>`(?=[\\s\\S]+?\\1${e?`\\1`:``})`,V="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)",rt=RegExp(`^([*_])\\1${B(1)}${V}\\1\\1(?!\\1)`),it=RegExp(`^([*_])${B(0)}${V}\\1(?!\\1)`),at=RegExp(`^(==)${B(0)}${V}\\1`),ot=RegExp(`^(~~)${B(0)}${V}\\1`),st=e=>`( *)(`+(e===1?Qe:$e)+`) +`,ct=st(1),lt=st(2),ut=e=>RegExp(`^`+(e===1?ct:lt)),dt=ut(1),ft=ut(2),pt=e=>RegExp(`^`+(e===1?ct:lt)+`[^\\n]*(?:\\n(?!\\1`+(e===1?Qe:$e)+` )[^\\n]*)*(\\n|$)`,`gm`),mt=pt(1),ht=pt(2),gt=e=>{let t=e===1?Qe:$e;return RegExp(`^( *)(`+t+`) (?=[\\s\\S])(?:[^\\n]*(?:\\n|$))+?(?:\\n+(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*$)`)},_t=gt(1),vt=gt(2),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}else r++}return-1},bt=e=>e>=65&&e<=90?e+32:e,xt=(e,t,n)=>{for(let r=0;r<t.length;r++)if(bt(e.charCodeAt(n+r))!==bt(t.charCodeAt(r)))return!1;return!0},St=(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(xt(e,t,n))return n;o=n+1}return-1},Ct=(e,t,n,r,i)=>{let a=[e.slice(0,t),n,r,i];return a.index=0,a.input=e,a},wt=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57,Tt=e=>{let t=0;for(;e.charCodeAt(t)===32;)t++;return e.charCodeAt(t)===60?t:-1},Et=(e,t)=>{let n=Tt(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&&wt(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=St(e,u,f,!t,p);if(n===-1)return null;let r=St(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;else if(St(e,u,i,!t,p)===i&&e.charCodeAt(i+u.length)===62)d=1,f=i;else{m=n,h=i;break}}if(h===-1)return null;for(;e.charCodeAt(h)===10;)h++;return Ct(e,h,o,e.slice(i,s),e.slice(c,m))},Dt=e=>{let t=Tt(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&&(wt(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&&xt(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 Ct(e,u,c,o?e.slice(i+1,s):void 0,u>l?e.slice(l,u):void 0)},Ot=e=>Et(e,!1),kt=e=>Et(e,!0),At=e=>Ot(e)!==null,jt=e=>Dt(e)!==null,Mt=e=>kt(e)!==null,Nt=e=>At(e)||jt(e),H=e=>{let t=e.length;for(;t>0&&e.charCodeAt(t-1)<=32;)t--;return t===e.length?e:e.slice(0,t)},Pt=(e,t)=>e.startsWith(t),Ft=e=>{let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e},U=e=>e&&e.indexOf(`\\`)!==-1?e.replace(tt,`$1`):e,It=(...e)=>e.filter(Boolean).join(` `),Lt=(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},Rt=[[/[ÀÁÂÃÄÅàáâãä忯]/g,`a`],[/[çÇ]/g,`c`],[/[ðÐ]/g,`d`],[/[ÈÉÊËéèêë]/g,`e`],[/[ÏïÎîÍíÌì]/g,`i`],[/[Ññ]/g,`n`],[/[øØœŒÕõÔôÓóÒò]/g,`o`],[/[ÜüÛûÚúÙù]/g,`u`],[/[ŸÿÝý]/g,`y`]],zt=/[\u0080-\uffff]/,Bt=/[^\p{L}\p{N}\p{M} -]/gu,Vt=/ /g,Ht=e=>{let t=e;if(zt.test(t))for(let e=0;e<Rt.length;e++){let[n,r]=Rt[e];t=t.replace(n,r)}return t=t.replace(Bt,``).replace(Vt,`-`),t.toLowerCase()},Ut=/(javascript|vbscript|data(?!:image)):/i,Wt=/[^A-Za-z0-9/:]/g,Gt=e=>{if(e.indexOf(`:`)===-1&&e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(Wt,``);if(Ut.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},Kt=e=>{let t=e;return t.indexOf(` `)!==-1&&(t=t.replace(Ye,` `)),t.indexOf(`\r`)!==-1&&(t=t.replace(Ce,`
|
|
3
|
-
`)),t.indexOf(`\f`)!==-1&&(t=t.replace(Ee,``)),t},qt=(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(be);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
|
-
`)},Jt=e=>(e.indexOf(`-`)!==-1&&e.match(Pe)===null&&(e=e.replace(Re,(e,t)=>t.toUpperCase())),e),Yt=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},Xt=(e,t,n,r)=>t===`style`?Yt(n).reduce((t,[n,i])=>{let a=n.replace(/(-[a-z])/g,e=>e[1].toUpperCase());return t[a]=r(i,e,n),t},{}):le.indexOf(t)===-1?(n.match(Fe)&&(n=U(n.slice(1,n.length-1))),n===`true`||n!==`false`&&n):r(U(n),e,t),Zt=e=>e.indexOf(`:`)===-1?`left`:Ue.test(e)?`right`:Ve.test(e)?`center`:(He.test(e),`left`),Qt=e=>e.replace(Be,``).split(`|`).map(Zt),$t=(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;else 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++}}else s.push(d(l,u)),u++,l=u}return s.push(d(l,o)),n.inTable=i,s},en=(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($t(s,t,n,!0))}return r},tn=(e,t,n)=>{if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(Pt(e,n[t]))return!0;return!1}return n(e,t)},W=e=>(e.inline=1,e),G=e=>W((t,n)=>n.inline?e.exec(t):null),K=e=>W((t,n)=>n.inline||n.simple?e.exec(t):null),q=e=>(t,n)=>n.inline||n.simple?null:e.exec(t),J=e=>W((t,n)=>typeof e==`function`?e(t,n):e.exec(t)),Y=(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},nn=(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},rn=(e,t,n={})=>{let r=n.inline||!1;n.inline=!1;let i=H(t),a=e(/\n\n$/.test(i)===!1?i.endsWith(`
|
|
7
|
-
`)?`${i}\n`:`${i}\n\n`:i,n);return n.inline=r,a},an=(e,t,n)=>({children:Y(t,e[2]??``,n)}),X=()=>({}),on=()=>null,sn=(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},cn=(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;else{for(let t=0;t<i.length;t++)if(i.charCodeAt(t)!==32){e.prevCaptureIndent=void 0;return}e.prevCaptureIndent=i}},ln=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!==R,h=p!==L;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&&!tn(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);cn(n,f[0]);let i=r.type||t[c];r.type=i;let s=o.length;if(i===F.text){if(!r.text){d=!0;break}if(s>0&&o[s-1].type===F.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(Kt(e),t)},un=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},dn=(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}},fn=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,pn=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),mn=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=Lt(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?Lt(e,o):void 0)||r;return n.set(r,s),s}},hn=e=>t=>e.slugify?e.slugify(t,Ht):Ht(t),gn=(e,t)=>{let{runtime:n,components:r={}}=e,i=mn(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=It(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)}},_n=()=>({footnotes:[],references:{},slugCounts:new Map}),vn=8,Z=[],yn=(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,bn=(e,t,n)=>{for(let r=0;r<Z.length;r++){let i=Z[r];if(yn(i,e,t,n))return r>0&&(Z.splice(r,1),Z.unshift(i)),i}let r={current:_n()},i=n?Dn:gn(e,t),a=On(i,e,t,r),o={ctx:e,options:t,parseOnly:n,createElement:i,scope:r,parse:ln(a),emit:un(dn(a,t.renderRule))};return Z.unshift(o),Z.length>vn&&Z.pop(),o},xn=(e,t,n)=>{let r=e.current;e.current=t;try{return n()}finally{e.current=r}},Sn=(e,t,n,r,i,a,o)=>{let s=hn(t),c=t.sanitizer??Gt,l=t.namedCodesToUnicode?{...se,...t.namedCodesToUnicode}:se,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=z)=>({_scope:o,_firstChars:[60,32],_qualify:u,_match:J(t),_order:n,_parse(e,t,n){let o=e[3]??``,s=qt(o,o.match(Ze)?.[1]??``),c=a(s)?rn:Y,l=(e[1]??``).trim(),u=l.toLowerCase(),d=r&&ce.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?_t:vt,i=n?mt:ht,a=n?dt:ft;return{_scope:z,_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:W((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:I.HIGH,_parse(e,t,r){let o=e[2]??``,s=n?+o.slice(0,-1):void 0,c=(e.fullMatch??e[0]??``).replace(fe,`
|
|
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?Cn[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=`${H(u)}\n\n`):(r.inline=!0,h=H(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)&&sn(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=H(i);return a===``?null:[i,void 0,a]};return{[F.blockQuote]:{_scope:L,_qualify:[`>`],_match:q(pe),_order:I.HIGH,_parse(e,t,n){let r=(e[0]??``).replace(me,``).match(he),i=r?.[1],a=r?.[2]??``;return{alert:i,children:a.indexOf(`
|
|
17
|
-
`)===-1?Y(t,a,n):rn(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:F.text,text:t.alert}],noInnerParse:!0,type:F.htmlBlock,tag:`header`})),e(`blockquote`,i,n(t.children,r))}},[F.breakLine]:{_scope:z,_qualify:[` `],_match:J(ge),_order:I.HIGH,_parse:X,_render(t,n,r={}){return e(`br`,{key:r.key})}},[F.breakThematic]:{_scope:L,_qualify:[`--`,`__`,`**`,`- `,`* `,`_ `],_match:q(_e),_order:I.HIGH,_parse:X,_render(t,n,r={}){return e(`hr`,{key:r.key})}},[F.codeBlock]:{_scope:L,_qualify:[` `],_match:q(ye),_order:I.MAX,_parse(e){return{type:F.codeBlock,lang:void 0,text:U(H((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))}},[F.codeFenced]:{_scope:L,_qualify:["```",`~~~`],_match:q(ve),_order:I.MAX,_parse(e){return{attrs:i(`code`,e[3]??``),lang:e[2]||void 0,text:e[4]??``,type:F.codeBlock}}},[F.codeInline]:{_scope:R,_firstChars:[96],_qualify:e=>e.charCodeAt(0)===96&&e.indexOf("`",1)!==-1,_match:K(xe),_order:I.LOW,_parse(e){return{text:U(e[2]??``)}},_render(t,n,r={}){return e(`code`,{key:r.key},t.text)}},[F.footnote]:{_scope:R,_qualify:[`[^`],_match:q(we),_order:I.MAX,_parse(e){return r.current.footnotes.push({footnote:e[2]??``,identifier:e[1]??``}),{}},_render:on},[F.footnoteReference]:{_scope:R,_qualify:[`[^`],_match:G(Te),_order:I.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))}},[F.gfmTask]:{_scope:R,_qualify:[`[ ]`,`[x]`],_match:G(Oe),_order:I.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`})}},[F.heading]:{_scope:L,_qualify:[`#`],_match:q(n.enforceAtxHeadings?Ae:ke),_order:I.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:Y(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))}},[F.headingSetext]:{_scope:L,_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:q(je),_order:I.MAX,_parse(e,t,n){return{children:Y(t,e[1]??``,n),level:e[2]===`=`?1:2,type:F.heading}}},[F.htmlBlock]:d(Ot,I.HIGH,!0,z),[F.htmlComment]:{_scope:z,_qualify:[`<!`],_match:J(Ne),_order:I.HIGH,_parse:X,_render:on},[F.htmlSelfClosing]:{_scope:z,_qualify:[`<`],_match:J(Dt),_order:I.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??{}})}},[F.customComponent]:d(kt,I.MAX,!1,z),[F.paragraph]:{_scope:L,_qualify:(e,t)=>!t.inline&&!t.simple,_match:p,_order:I.LOW,_parse:an,_render(t,n,r={}){return e(`p`,{key:r.key},n(t.children,r))}},[F.image]:{_scope:R,_firstChars:[33],_qualify:e=>e.startsWith(`!==-1,_match:K(fn),_order:I.HIGH,_parse(e){return{alt:U(e[1]??``),target:U(e[2]??``),title:e[3]?U(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})}},[F.link]:{_scope:R,_firstChars:[91],_qualify:e=>e.charCodeAt(0)===91&&e.indexOf(`](`)!==-1,_match:G(pn),_order:I.LOW,_parse(e,t,n){return{children:nn(t,e[1]??``,n),target:U(e[2]??``),title:e[3]?U(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))}},[F.linkAngleBraceStyleDetector]:{_scope:R,_qualify:[`<`],_match:G(Le),_order:I.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:F.text}],target:n?`mailto:${t}`:t,type:F.link}}},[F.linkBareUrlDetector]:{_scope:R,_firstChars:[104],_qualify:(e,t)=>!(!t.inline||t.inAnchor||n.disableAutoLink||!Pt(e,`http://`)&&!Pt(e,`https://`)),_match:G(Ie),_order:I.MAX,_parse(e){let t=e[1]??``;return{children:[{text:t,type:F.text}],target:t,type:F.link}}},[F.newlineCoalescer]:{_scope:z,_qualify:[`
|
|
19
|
-
`],_match:q(Se),_order:I.LOW,_parse:X,_render(){return`
|
|
20
|
-
`}},[F.orderedList]:f(1),[F.unorderedList]:f(2),[F.ref]:{_scope:z,_qualify:[`[`],_match:J(Ge),_order:I.MAX,_parse(e){let t=e[1];return t!==void 0&&(r.current.references[t]={target:e[2]??``,title:e[4]}),{}},_render:on},[F.refImage]:{_scope:R,_firstChars:[33],_qualify:e=>e.startsWith(`===-1,_match:K(Ke),_order:I.MAX,_parse(e){return{alt:e[1]?U(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}},[F.refLink]:{_scope:R,_firstChars:[91],_qualify:e=>e.indexOf(`](`)===-1,_match:G(qe),_order:I.MAX,_parse(e,t,n){return{children:nn(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)}},[F.table]:{_scope:L,_qualify:[`|`],_match:q(ze),_order:I.HIGH,_parse(e,t,n){n.inline=!0;let r=e[2]?Qt(e[2]):[],i=e[3]?en(e[3],t,n):[],a=$t(e[1]??``,t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:F.table}:{children:a.flat(),type:F.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)))))))}},[F.tableSeparator]:{_scope:R,_qualify:[`|`],_match:(e,t)=>t.inTable?/^\|/.exec(e):null,_order:I.HIGH,_parse(){return{type:F.tableSeparator}},_render(){return` | `}},[F.text]:{_scope:R,_match:W((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=nt.exec(e);if(t)return t}return Tn.lastIndex=1,Tn.test(e),wn[0]=e.slice(0,En(e,Tn.lastIndex)),wn}),_order:I.MIN,_parse(e){let t=e[0]??``;return{type:F.text,text:t.charCodeAt(0)===38?t.replace(Me,(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}},[F.textBolded]:{_scope:R,_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:K(rt),_order:I.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))}},[F.textEmphasized]:{_scope:R,_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:K(it),_order:I.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))}},[F.textEscaped]:{_scope:R,_qualify:[`\\`],_match:K(et),_order:I.HIGH,_parse(e){return{text:e[1]??``,type:F.text}}},[F.textMarked]:{_scope:R,_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:K(at),_order:I.LOW,_parse(e,t,n){return{children:an(e,t,n).children}},_render(t,n,r={}){return e(`mark`,{key:r.key},n(t.children,r))}},[F.textStrikethroughed]:{_scope:R,_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:K(ot),_order:I.LOW,_parse(e,t,n){return{children:an(e,t,n).children}},_render(t,n,r={}){return e(`del`,{key:r.key},n(t.children,r))}}}},Cn=[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],wn=[``],Tn=/(?:[^\n&h!*:<=[\\_`~]+|h(?!ttp))*/y,En=(e,t)=>t>=3&&e.charCodeAt(t)===10&&e.charCodeAt(t-1)===32&&e.charCodeAt(t-2)===32?t-2:t,Dn=(e,t,...n)=>({children:n,props:t,type:e}),On=(e,t,n,r)=>{let i=(e,r)=>{if(!r?.trim())return null;let i=r.match(ue);return i?i.reduce((r,i)=>{let a=i.indexOf(`=`);if(a!==-1){let o=Jt(i.slice(0,a)).trim(),s=Ft(i.slice(a+1).trim()),c=oe[o]??o;if(c===`ref`)return r;r[c]=Xt(e,o,s,t.sanitizer??Gt),typeof r[c]==`string`&&Nt(r[c])&&(r[c]=jn(r[c].trim(),t,n).ast)}else i!==`style`&&de.test(i)&&(r[oe[i]??i]=!0);return r},{}):null},a=[pe,ve,ye,n.enforceAtxHeadings?Ae:ke,ze,_t,vt,Mt],o=n.disableParsingRawHTML?a:[...a,We,At,Ne,jt,Mt],s=Sn(e,t,n,r,i,e=>{let t=e.replace(Xe,``),n=t.length>2048?t.slice(0,2048):t;return n.indexOf(`
|
|
22
|
-
|
|
23
|
-
`)!==-1||sn(o,n)},a);return n.disableParsingRawHTML?Object.keys(s).reduce((e,t)=>(t!==F.htmlBlock&&t!==F.htmlSelfClosing&&(e[t]=s[t]),e),{}):s},kn=(e,t,n,r,i)=>{let a=!t.preserveFrontmatter&&e.charCodeAt(0)===45?e.replace(De,``):e,o=a.charCodeAt(0)===10?a.replace(Xe,``):a,s=t.forceInline||!t.forceBlock&&Je.test(o)===!1,c=n(s?a:`${H(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}},An=(e,t,n,r,i)=>{let a=t.components??{},o=hn(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=Lt(a,`p.props`,{})??{},r=It(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},jn=(e=``,t,n={})=>{let{parse:r,scope:i}=bn(t,n,!0),a=_n();return xn(i,a,()=>kn(e,n,r,a.footnotes,a.references))},Mn=(e,t,n={})=>{let{emit:r,createElement:i,scope:a}=bn(t,n,!1);return xn(a,{footnotes:e.footnotes??[],references:e.references??{}},()=>An(e,t,n,r,i))},Nn=(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}=bn(t,n,!1),s=_n();return xn(o,s,()=>An(kn(e,n,r,s.footnotes,s.references),t,n,i,a))},Pn=(e,t,n={})=>{let{components:r,namedCodesToUnicode:i,sanitizer:a,slugify:o,...s}=n;return Nn(e,{runtime:t,components:r,namedCodesToUnicode:i,sanitizer:a,slugify:o},s)},Fn={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`}]]};Fn.node;var In=t(Fn);w(),N();var Ln=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=O(null),[u,d]=k(!1),[f,p]=k(0),m=O({pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1}),h=O(!1),g=()=>{let e=l.current;return e?e.clientWidth:0},_=e=>{let t=i<=0,n=i>=a-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},v=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,h.current=!1,d(!1),p(0))},y=e=>{if(!t||m.current.pointerId!==e.pointerId)return;let n=g();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){h.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(_(a)),m.current.lastX=e.clientX},b=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=m.current.isHorizontal,i=f;d(!1),p(0),m.current.pointerId=null,m.current.axisLocked=!1,m.current.isHorizontal=!1,h.current?h.current=!1:t&&(i>o?r?.():i<-o&&n?.())};return P(()=>{p(0),d(!1)},[i]),{containerRef:l,isDragging:u,dragDeltaPct:f,containerProps:{ref:l,onPointerDown:v,onPointerMove:y,onPointerUp:e=>{t&&m.current.pointerId===e.pointerId&&b(e)},onPointerCancel:e=>{t&&m.current.pointerId===e.pointerId&&b(e)},style:{touchAction:s}}}};N();var Rn=({children:e})=>b(`div`,{className:`max-w-full min-w-0 overflow-x-auto`,children:b(`pre`,{className:`max-w-full min-w-0 [scrollbar-width:none] overflow-x-auto [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,children:b(`code`,{children:typeof e==`string`?e.split(`
|
|
24
|
-
`).map((e,t)=>b(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),zn=`[&_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]`,Bn=({html:e})=>b(`div`,{className:zn,children:b(`div`,{dangerouslySetInnerHTML:{__html:e}})}),Vn=ee(()=>s(()=>import(`./CodeBlockShiki-Tkm8JGKR.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1,2,3]))),Hn=({className:e,onChange:t,isEditable:n,isInverse:r=!1,isInverseColor:i,inverse:a,isDarkMode:s,children:c,lang:l,highlightedHtml:u,...d})=>{let f=r||i||a;return b(`div`,{className:o(`flex w-full max-w-full min-w-0 overflow-x-auto`,f&&`shiki-inverse text-text-opposite`,s===!0&&`shiki-dark`,s===!1&&`shiki-light`,e),"data-inverse":f?`true`:void 0,"data-shiki-theme":s===!0?`dark`:s===!1?`light`:void 0,...d,children:u?b(Bn,{html:u}):b(ne,{fallback:b(Rn,{children:c}),children:b(Vn,{lang:l,children:c})})})},Un={astro:()=>s(()=>import(`./astro-BZ97kZFP.js`),__vite__mapDeps([4,5,6,7,8,9,10])),bash:()=>s(()=>import(`./bash-CLZ0U2zV.js`),[]),css:()=>s(()=>import(`./css-DgaLhXQH.js`),__vite__mapDeps([11,8])),html:()=>s(()=>import(`./html-BCy9P6D2.js`),__vite__mapDeps([12,13,6,8])),javascript:()=>s(()=>import(`./javascript-CpIGwZ_Y.js`),__vite__mapDeps([14,6])),json:()=>s(()=>import(`./json-C3WlssX3.js`),__vite__mapDeps([15,5])),json5:()=>s(()=>import(`./json5-BR5RXkoi.js`),[]),jsonc:()=>s(()=>import(`./jsonc-CYpm1nAK.js`),[]),markdown:()=>s(()=>import(`./markdown-BYOwaDjH.js`),[]),svelte:()=>s(()=>import(`./svelte-CdeT-Ich.js`),__vite__mapDeps([16,6,7,8,9])),tsx:()=>s(()=>import(`./tsx-CGosfAUg.js`),__vite__mapDeps([17,10])),typescript:()=>s(()=>import(`./typescript-Bb1J8qyy.js`),__vite__mapDeps([18,7])),vue:()=>s(()=>import(`./vue-jUI-lpPb.js`),__vite__mapDeps([19,8,6,7,5,13])),xml:()=>s(()=>import(`./xml-DMbpbO54.js`),[]),yaml:()=>s(()=>import(`./yaml-rwi0_p6S.js`),[])};Object.keys(Un);var Wn={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`},Gn=`plaintext`,Kn=e=>{let t=(e??``).trim().toLowerCase(),n=Wn[t]??t,r=Un[n];return r?{id:n,loadGrammar:r}:{id:Gn,loadGrammar:null}},qn={light:`github-light`,dark:`github-dark`},Jn=e=>e?e.match(/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|shorts\/))([\w-]{11})/i)?.[1]??null:null,Yn=e=>`https://www.youtube.com/embed/${e}`,Xn=e=>`https://www.youtube.com/watch?v=${e}`;N();var Zn=`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,Qn=(e,t)=>{let n=Jn(e);return n?{isYoutubeVideo:!0,src:Yn(n),frameProps:{...t,allow:Zn,allowFullScreen:!0,referrerPolicy:`strict-origin-when-cross-origin`}}:{src:e,frameProps:t,isYoutubeVideo:!1}},$n=e=>{if(!e)return{href:``,label:``};let t=Jn(e);if(t)return{href:Xn(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}},er=()=>{let e=O(null),[t,n]=k(!1);return P(()=>{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}},tr=({src:e,title:t,className:n,frameProps:r})=>{let{elementRef:i,hasBecomeVisible:a}=er();return a?b(`iframe`,{...r,src:e,title:t,loading:`lazy`,className:n}):b(`div`,{ref:i,"aria-hidden":!0,className:n})},nr=t=>{let{src:n,className:r,title:a,...s}=t,[c,l]=k(!1),{src:u,frameProps:d,isYoutubeVideo:f}=Qn(n,s),{href:p,label:m}=$n(n);return b(e,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[b(tr,{src:u,title:a,frameProps:d,className:o(`block max-h-[80vh] min-h-[12rem] w-full border-0`,f&&`aspect-video`,r)}),b(`div`,{className:`flex items-center justify-between gap-3 px-3 py-1`,children:[p?b(x,{href:p,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex max-w-[calc(100%-3rem)] min-w-0 items-center gap-2 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,children:m}):b(`span`,{className:`text-sm text-neutral`,children:`Embedded frame`}),b(i,{variant:`hoverable`,size:`icon-md`,onClick:()=>l(!0),label:`Open embedded page in fullscreen`,Icon:In})]}),b(y,{isOpen:c,onClose:()=>l(!1),size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:c&&u?b(e,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:b(`iframe`,{...d,src:u,title:a??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},rr={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`};N();var ir=700,ar=({isRollable:e=!0,minHeight:t=ir,children:n,className:i})=>{let[s,c]=k(0),[l,u]=k(!0),d=O(null),{expandCollapseContent:f}=a(rr),p=s>t,m=ie(e=>{if(d.current?.disconnect(),d.current=null,!e)return;if(typeof ResizeObserver>`u`){c(e.clientHeight);return}let t=new ResizeObserver(([e])=>{e&&c(e.contentRect.height)});t.observe(e),d.current=t},[]);return P(()=>()=>d.current?.disconnect(),[]),e?p?b(r,{isHidden:l,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,style:{gridTemplateRows:l?`${t}px`:`${s}px`},children:[b(`div`,{className:o(`grid w-full`,i),ref:m,children:n}),b(`button`,{className:o(`text-md 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-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`,l?`w-full`:`w-32`),type:`button`,onClick:()=>u(e=>!e),children:f(l)})]}):b(`div`,{className:o(`grid w-full`,i),ref:m,children:n}):n};N();var or=({children:e,originalLang:t,targetFormat:n,initialHtml:r})=>{let[i,a]=k(r??null),o=O(r??null);P(()=>{if(r&&n===`typescript`){o.current=r,a(r);return}let i=!1;return(async()=>{try{let r=e,c=Kn(t).id;if(n!==`typescript`){let{transformCode:a,deriveLanguage:o}=await s(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-pmm6yJGh.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;r=a(String(e),n),c=Kn(o(t,n)).id}let{codeToHtml:l}=await s(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-8uG1ilsY.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([20,1,2,3]));if(i)return;let u=await l(String(r),{lang:c,themes:qn,defaultColor:!1});i||(o.current=u,a(u))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let c=i??o.current;return c?b(`div`,{dangerouslySetInnerHTML:{__html:c},style:{backgroundColor:`transparent`}}):b(`pre`,{className:`max-w-full min-w-0 overflow-x-auto`,children:b(`code`,{children:e})})};N();var sr=E({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),Q=()=>C(sr),cr=({children:e})=>{let[t,n]=p(`packageManager`,`npm`),[r,i]=p(`codeFormat`,`typescript`),[a,o]=p(`contentDeclarationFormat`,`typescript`);return b(sr,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:i,contentDeclarationFormat:a,setContentDeclarationFormat:o},children:e})};w();var lr=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]}},ur=({children:e,...t})=>{let{packageManager:n,codeFormat:r,contentDeclarationFormat:i}=Q(),a=t.packageManager===void 0,o=n===t.packageManager,s=lr(t.codeFormat),c=s===void 0,l=s?s.includes(r):!1,u=lr(t.contentDeclarationFormat),d=u===void 0,f=u?u.includes(i):!1;return(a||o)&&(c||l)&&(d||f)?e:b(j,{})},$={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{codeFormat:{label:`Select code format`,placeholder:`Code Format`},contentDeclarationFormat:{label:`Select dictionary format`,placeholder:`Dictionary Format`},packageManager:{label:`Select package manager`,placeholder:`Package Manager`}},"en-GB":{codeFormat:{label:`Select code format`,placeholder:`Code Format`},contentDeclarationFormat:{label:`Select dictionary format`,placeholder:`Dictionary Format`},packageManager:{label:`Select package manager`,placeholder:`Package Manager`}},fr:{codeFormat:{label:`Sélectionner le format de code`,placeholder:`Format de code`},contentDeclarationFormat:{label:`Sélectionner le format de dictionnaire`,placeholder:`Format de dictionnaire`},packageManager:{label:`Sélectionner le gestionnaire de paquets`,placeholder:`Gestionnaire de paquets`}},es:{codeFormat:{label:`Seleccionar formato de código`,placeholder:`Formato de código`},contentDeclarationFormat:{label:`Seleccionar formato de diccionario`,placeholder:`Formato de diccionario`},packageManager:{label:`Seleccionar gestor de paquetes`,placeholder:`Gestor de paquetes`}},de:{codeFormat:{label:`Code-Format auswählen`,placeholder:`Code-Format`},contentDeclarationFormat:{label:`Wörterbuchformat auswählen`,placeholder:`Wörterbuchformat`},packageManager:{label:`Paketmanager auswählen`,placeholder:`Paketmanager`}},ja:{codeFormat:{label:`コード形式を選択`,placeholder:`コード形式`},contentDeclarationFormat:{label:`辞書形式を選択`,placeholder:`辞書形式`},packageManager:{label:`パッケージマネージャーを選択`,placeholder:`パッケージマネージャー`}},ko:{codeFormat:{label:`코드 형식 선택`,placeholder:`코드 형식`},contentDeclarationFormat:{label:`사전 형식 선택`,placeholder:`사전 형식`},packageManager:{label:`패키지 관리자 선택`,placeholder:`패키지 관리자`}},zh:{codeFormat:{label:`选择代码格式`,placeholder:`代码格式`},contentDeclarationFormat:{label:`选择字典格式`,placeholder:`字典格式`},packageManager:{label:`选择包管理器`,placeholder:`包管理器`}},it:{codeFormat:{label:`Seleziona il formato del codice`,placeholder:`Formato del codice`},contentDeclarationFormat:{label:`Seleziona il formato del dizionario`,placeholder:`Formato del dizionario`},packageManager:{label:`Seleziona il gestore dei pacchetti`,placeholder:`Gestore dei pacchetti`}},pt:{codeFormat:{label:`Selecionar formato de código`,placeholder:`Formato de código`},contentDeclarationFormat:{label:`Selecionar formato de dicionário`,placeholder:`Formato de dicionário`},packageManager:{label:`Selecionar gerenciador de pacotes`,placeholder:`Gerenciador de pacotes`}},hi:{codeFormat:{label:`कोड प्रारूप चुनें`,placeholder:`कोड प्रारूप`},contentDeclarationFormat:{label:`शब्दकोश प्रारूप चुनें`,placeholder:`शब्दकोश प्रारूप`},packageManager:{label:`पैकेज प्रबंधक चुनें`,placeholder:`पैकेज प्रबंधक`}},ar:{codeFormat:{label:`اختر تنسيق الكود`,placeholder:`تنسيق الكود`},contentDeclarationFormat:{label:`اختر تنسيق القاموس`,placeholder:`تنسيق القاموس`},packageManager:{label:`اختر مدير الحزم`,placeholder:`مدير الحزم`}},ru:{codeFormat:{label:`Выбрать формат кода`,placeholder:`Формат кода`},contentDeclarationFormat:{label:`Выбрать формат словаря`,placeholder:`Формат словаря`},packageManager:{label:`Выбрать менеджер пакетов`,placeholder:`Менеджер пакетов`}}}},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}=Q(),i=a($),o=t=>!e||e.includes(t);return b(S,{value:t,onValueChange:e=>{n(e),r(e)},children:[b(S.Trigger,{className:`py-1!`,"aria-label":i.codeFormat.label.value,children:b(S.Value,{placeholder:i.codeFormat.placeholder.value})}),b(S.Content,{children:[o(`typescript`)&&b(S.Item,{value:`typescript`,children:`TypeScript`}),o(`esm`)&&b(S.Item,{value:`esm`,children:`ESM`}),o(`commonjs`)&&b(S.Item,{value:`commonjs`,children:`CommonJS`})]})]})},fr=()=>{let{contentDeclarationFormat:e,setContentDeclarationFormat:t}=Q(),n=a($);return b(S,{value:e,onValueChange:t,children:[b(S.Trigger,{className:`py-1!`,"aria-label":n.contentDeclarationFormat.label.value,children:b(S.Value,{placeholder:n.contentDeclarationFormat.placeholder.value})}),b(S.Content,{children:[b(S.Item,{value:`typescript`,children:`TypeScript`}),b(S.Item,{value:`commonjs`,children:`CommonJS`}),b(S.Item,{value:`esm`,children:`ESM`}),b(S.Item,{value:`json`,children:`JSON`})]})]})},pr={key:`code`,content:{nodeType:`translation`,translation:{en:{description:`Copy the code to the clipboard`,title:`Copy code`},"en-GB":{description:`Copy the code to the clipboard`,title:`Copy code`},fr:{description:`Copier le code dans le presse-papiers`,title:`Copier le code`},es:{description:`Copiar el código al portapapeles`,title:`Copiar código`},de:{description:`Kopieren Sie den Code in die Zwischenablage`,title:`Code kopieren`},ja:{description:`コードをクリップボードにコピー`,title:`コードをコピー`},ko:{description:`코드를 클립보드에 복사`,title:`코드 복사`},zh:{description:`复制代码到剪贴板`,title:`复制代码`},it:{description:`Copiare il codice nella clipboard`,title:`Copiare il codice`},pt:{description:`Copiar o código para a área de transferência`,title:`Copiar código`},hi:{description:`कोड को क्लिपबोर्ड पर कॉपी करें`,title:`कोड कॉपी करें`},ar:{description:`نسخ الكود إلى الحافظة`,title:`نسخ الكود`},ru:{description:`Копировать код в буфер обмена`,title:`Копировать код`}}},localIds:[`code::local::../@intlayer/design-system/dist/esm/components/IDE/copyCode.content.mjs`,`code::local::../@intlayer/design-system/dist/esm/components/IDE/code.content.mjs`]},mr=({code:e,...t})=>{let{title:n,description:r}=a(pr);return b(c,{identifier:`copy`,children:[b(u,{content:e,...t}),b(c.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[b(`strong`,{children:n}),b(`p`,{className:`text-neutral`,children:r})]})]})},hr=()=>{let{packageManager:e,setPackageManager:t}=Q(),n=a($);return a($),b(S,{value:e,onValueChange:t,children:[b(S.Trigger,{className:`py-1!`,"aria-label":n.packageManager.label.value,children:b(S.Value,{placeholder:n.packageManager.placeholder.value})}),b(S.Content,{children:[b(S.Item,{value:`npm`,children:`npm`}),b(S.Item,{value:`pnpm`,children:`pnpm`}),b(S.Item,{value:`yarn`,children:`yarn`}),b(S.Item,{value:`bun`,children:`bun`})]})]})};N(),w();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:c,fileName:l,packageManager:u,codeFormat:d,contentDeclarationFormat:f,isRollable:p=!0,lang:m,...h})=>{let{codeFormat:g,contentDeclarationFormat:_}=Q(),v=M(()=>br(d),[d]),y=M(()=>br(f),[f]),x=v!==void 0&&v.length>1&&v.includes(`typescript`),S=y!==void 0&&y.length>1&&y.includes(`typescript`),C=x||S,w=S?_:g,T=M(()=>{let e=S?y:v;if(!e)return;let t=e.filter(yr);return _r.has(n)?t.filter(e=>e!==`commonjs`):t},[S,y,v,n]),E=M(()=>!T||T.includes(w)?w:T[T.length-1]??`typescript`,[T,w]),[D,O]=k(l);P(()=>{if(!C||E===`typescript`){O(l);return}if(!l)return;let e=!1;return(async()=>{let{deriveFileName:t}=await s(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-pmm6yJGh.js`);return{deriveFileName:e}},[]);e||O(t(l,E))})(),()=>{e=!0}},[l,C,E]);let A=M(()=>{let e=Array.isArray(t)?t.join(``):String(t);return e.endsWith(`
|
|
25
|
-
`)?e.slice(0,-1):e},[t]),[ee,N]=k(A);P(()=>{if(!C||E===`typescript`){N(A);return}let e=!1;return(async()=>{let{transformCode:t}=await s(async()=>{let{transformCode:e}=await import(`./codeTransformer-pmm6yJGh.js`);return{transformCode:e}},[]);e||N(t(A,E))})(),()=>{e=!0}},[A,C,E]);let te=u||d||f;return b(ur,{packageManager:u,codeFormat:d,contentDeclarationFormat:f,children:b(e,{className:o(`relative max-w-full min-w-0 text-sm leading-6`,a&&`with-line-number ms-0`,c),transparency:`lg`,dir:`ltr`,...h,children:[i&&b(j,{children:[b(`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-xs text-muted-foreground`,children:[b(`span`,{className:`truncate`,children:D??n}),b(`div`,{className:`flex items-center gap-2`,children:[u&&b(hr,{}),d&&b(dr,{availableFormats:T}),f&&b(fr,{})]})]}),b(`div`,{className:`sticky top-46 z-20`,children:b(`div`,{className:o(`absolute inset-e-2 bottom-0 flex h-7 items-center`,te&&`h-11`),children:b(mr,{code:ee})})})]}),b(ar,{minHeight:gr,isRollable:p,className:`max-w-full min-w-0 overflow-x-auto p-2`,children:C?b(or,{originalLang:n,targetFormat:E,initialHtml:r,children:A}):b(Hn,{lang:n,highlightedHtml:r,children:A})})]})})};N();var Sr=E({tabsValues:{},setTabsValues:(()=>{})}),Cr=()=>C(Sr),wr=({children:e})=>{let[t,n]=k({}),r=M(()=>({tabsValues:t,setTabsValues:n}),[t]);return b(Sr,{value:r,children:e})};N();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=E(void 0),Or=n(`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})=>b(`div`,{...t,children:e});Ar.displayName=`TabItem`;var jr=Object.assign(({defaultTab:e,group:t,variant:n,children:r,className:i,headerClassName:a,fullHeight:s,...c})=>{let l=te.toArray(r).filter(e=>A(e)&&e.type===Ar).map((e,t)=>({...e.props,value:kr(e.props,t)})),u=l[0]?.value,f=e!==void 0&&l.some(t=>t.value===e),p=f?e:u,{tabsValues:m,setTabsValues:h}=Cr(),[g,_]=k(e??u??``),[v,y]=k(e);e!==v&&(y(e),f&&_(e));let x=!!(t&&typeof m==`object`),S=x&&t?m?.[t]:g,C=l.some(e=>e.value===S);!x&&!C&&p!==void 0&&g!==p&&_(p);let w=C?S:p??e??u??``,T=l.length===0?-1:Math.max(0,l.findIndex(e=>e.value===w)),E=l.length,D=Er(l.map(({value:e})=>e)),{containerProps:O,dragDeltaPct:ee,isDragging:j}=Ln({itemIndex:T,itemCount:E,onSwipeLeft:()=>{let e=Math.min(E-1,T+1),t=l[e]?.value;t&&N(t)},onSwipeRight:()=>{let e=Math.max(0,T-1),t=l[e]?.value;t&&N(t)}}),N=ie(e=>{_(e),t&&typeof h==`function`&&h(n=>({...n,[t]:e}))},[t,h]),ne=M(()=>({activeTab:w??``,setActiveTab:N}),[w,N]);return b(Dr.Provider,{value:ne,children:b(`div`,{className:o(Or({variant:n}),s&&`flex h-full flex-col overflow-hidden`,i),...c,children:[b(`div`,{className:o(`flex shrink-0 gap-3 p-3`,a),children:b(d,{selectedChoice:w,tabs:l.map(({label:e,value:t,disabled:n},r)=>{let i=w===t,a=D[r];return b(`button`,{className:o(`cursor-pointer rounded-md px-4 py-1 text-sm font-medium whitespace-nowrap transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:n,onClick:()=>!n&&N(t),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${a}`,id:`tab-${a}`,type:`button`,children:e??t},t)}),hoverable:!0,color:`text`})}),b(`div`,{className:o(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,s&&`min-h-0 flex-1`),...O,children:b(`div`,{className:o(`grid w-full min-w-0`,s&&`h-full`,j?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${l.length}, 100%)`,transform:`translateX(-${T*100-(j?ee:0)}%)`},children:l.map(({value:e,children:t,className:n},r)=>{let i=r===T,a=D[r];return b(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${a}`,id:`tabpanel-${a}`,inert:!i,tabIndex:i?0:-1,"data-active":i,className:o(`w-full min-w-0 p-3 opacity-100 transition-opacity duration-300 ease-in-out`,s&&`h-full overflow-y-auto`,!i&&`pointer-events-none opacity-0`,n),children:b(`div`,{className:o(`flex w-full min-w-0 flex-col items-stretch gap-6`,s&&`min-h-full`),children:t})},e)})})})]})})},{Item:Ar}),Mr=({className:e,...t})=>b(`th`,{className:o(`border border-b border-solid bg-neutral/10 p-4`,e),...t}),Nr=({className:e,...t})=>b(`tr`,{className:o(`hover:bg-neutral/10`,e),...t}),Pr=({className:e,...t})=>b(`td`,{className:o(`border border-b border-solid p-4`,e),...t}),Fr=({className:e,...t})=>b(`hr`,{className:o(`mx-6 mt-16 border-dashed text-neutral`,e),...t}),Ir={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{description:`Open the table in a modal to view all data content clearly`,title:`Show all table content`}},"en-GB":{modal:{description:`Open the table in a modal to view all data content clearly`,title:`Show all table content`}},fr:{modal:{description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`,title:`Afficher tout le contenu du tableau`}},es:{modal:{description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`,title:`Mostrar todo el contenido de la tabla`}},de:{modal:{description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`,title:`Alle Tabellendaten anzeigen`}},ja:{modal:{description:`テーブルをモーダルで開き、すべてのデータを明確に表示`,title:`テーブルのすべての内容を表示`}},ko:{modal:{description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`,title:`테이블의 모든 내용 표시`}},zh:{modal:{description:`在弹窗中打开表格以清晰地查看所有数据`,title:`显示表格的所有内容`}},it:{modal:{description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`,title:`Mostra tutto il contenuto della tabella`}},pt:{modal:{description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`,title:`Mostrar todo o conteúdo da tabela`}},hi:{modal:{description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`,title:`सभी तालिका सामग्री दिखाएं`}},ar:{modal:{description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`,title:`اظهار جميع محتويات الجدول`}},ru:{modal:{description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`,title:`Показать все данные таблицы`}}}},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`},Lr=({setIsModalOpen:e})=>{let{modal:t}=a(Ir);return b(`div`,{className:`pointer-events-none absolute inset-y-0 inset-e-4 z-10`,children:b(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:b(c,{identifier:`expand`,children:[b(i,{variant:`hoverable`,size:`icon-md`,onClick:()=>{e(!0)},label:t.title,Icon:In}),b(c.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[b(`strong`,{children:t.title}),b(`p`,{className:`text-neutral`,children:t.description})]})]})})})};N();var Rr=.55,zr=5,Br=30,Vr=(e,t,n)=>{P(()=>{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(Br,Math.max(zr,(n[t]??0)*Rr));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${Br}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)};N(),w();var Hr=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[s,c]=k(!1),[l,u]=k(null),d=O(null),f=O(null);Vr(d,f,[a.children,s]),P(()=>{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]),P(()=>{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 b(`div`,{className:`group relative`,children:[n&&b(Lr,{setIsModalOpen:c}),b(ar,{isRollable:t,className:`max-w-full overflow-x-auto bg-background text-start`,children:b(m,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),b(y,{isOpen:s,onClose:()=>c(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:s?b(`div`,{className:`grid`,children:b(m,{ref:f,className:o(`max-w-full min-w-full text-start`,e),isInteractive:r,...a})}):b(j,{})})]})},Ur={createElement:(e,t,...n)=>T(e,t,...n),cloneElement:(e,t,...n)=>D(e,t,...n),Fragment:j,normalizeProps:(e,t)=>t},Wr=(e=``,t={})=>{if(typeof e==`string`)return Pn(e,Ur,t);let{components:n,namedCodesToUnicode:r,sanitizer:i,slugify:a,...o}=t;return Mn(e,{runtime:Ur,components:n,namedCodesToUnicode:r,sanitizer:i,slugify:a},o)},Gr=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>Wr(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o});N(),w();var Kr=e=>b(h,{isClickable:!0,className:`mb-8 mb-16 text-foreground`,...e}),qr=e=>b(_,{isClickable:!0,className:`mt-16 text-foreground`,...e}),Jr=e=>b(f,{isClickable:!0,className:`mt-5 text-foreground`,...e}),Yr=e=>b(l,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Xr=e=>b(g,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Zr=e=>b(v,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Qr=e=>b(`strong`,{className:`text-foreground`,...e}),$r=re(({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 b(`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 b(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),ei=e=>b($r,{...e}),ti=({className:e,...t})=>b(`blockquote`,{className:o(`mt-5 gap-3 border-s-4 border-card ps-5 text-muted-foreground [&_strong]:text-neutral`,e),...t}),ni=({className:e,...t})=>b(`ul`,{className:o(`mt-5 flex list-disc flex-col gap-3 ps-5 marker:text-neutral/80`,e),...t}),ri=({className:e,...t})=>b(`ol`,{className:o(`mt-5 flex list-decimal flex-col gap-3 ps-5 marker:text-neutral/80`,e),...t}),ii=({className:e,alt:t,src:n,...r})=>b(`img`,{...r,alt:t??``,loading:`lazy`,decoding:`async`,className:o(`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}),ai=e=>t=>b(x,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),oi={h1:Kr,h2:qr,h3:Jr,h4:Yr,h5:Xr,h6:Zr,strong:Qr,blockquote:ti,ul:ni,ol:ri,img:ii,pre:e=>b(j,{children:e.children}),table:e=>b(Hr,{isRollable:!0,displayModal:!0,...e}),th:Mr,tr:Nr,td:Pr,hr:Fr,Tabs:e=>b(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})=>b(`div`,{className:o(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>b(`div`,{className:o(`flex-1`,e),...t}),iframe:e=>b(nr,{...e})},si=e=>({...oi,code:ei,a:ai(e)}),ci=({children:e,locale:t,forceBlock:n,preserveFrontmatter:r,tagfilter:i,components:a,wrapper:o})=>{let s=Gr(e,{components:M(()=>({...si(t),...a}),[t,a]),wrapper:o,forceBlock:n,preserveFrontmatter:r,tagfilter:i});return b(cr,{children:b(wr,{children:s})})};export{Xn as a,Un as c,zn as d,Jn as i,Kn as l,nr as n,qn as o,Yn as r,Wn as s,ci as t,Rn as u};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
function e(e,t){this.v=e,this.k=t}function t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e){if(Array.isArray(e))return e}function r(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function i(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(e,t){return n(e)||r(e,t)||o(e,t)||i()}function o(e,n){if(e){if(typeof e==`string`)return t(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function s(t){var n,r;function i(n,r){try{var o=t[n](r),s=o.value,c=s instanceof e;Promise.resolve(c?s.v:s).then(function(e){if(c){var r=n===`return`&&s.k?n:`next`;if(!s.k||e.done)return i(r,e);e=t[r](e).value}a(!!o.done,e)},function(e){i(`throw`,e)})}catch(e){a(2,e)}}function a(e,t){e===2?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?i(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(a,o){var s={key:e,arg:t,resolve:a,reject:o,next:null};r?r=r.next=s:(n=r=s,i(e,t))})},typeof t.return!=`function`&&(this.return=void 0)}s.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},s.prototype.next=function(e){return this._invoke(`next`,e)},s.prototype.throw=function(e){return this._invoke(`throw`,e)},s.prototype.return=function(e){return this._invoke(`return`,e)};var c=Object.entries,l=Object.setPrototypeOf,u=Object.isFrozen,d=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,p=Object.freeze,m=Object.seal,h=Object.create,ee=typeof Reflect<`u`&&Reflect,te=ee.apply,ne=ee.construct;p||=function(e){return e},m||=function(e){return e},te||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ne||=function(e){return new e(...[...arguments].slice(1))};var g=T(Array.prototype.forEach);Array.prototype.indexOf;var re=T(Array.prototype.lastIndexOf),ie=T(Array.prototype.pop),ae=T(Array.prototype.push),oe=T(Array.prototype.slice),se=T(Array.prototype.splice),_=Array.isArray,ce=E(Set),le=T(Set.prototype.add),ue=T(Set.prototype.has),v=T(String.prototype.toLowerCase),de=T(String.prototype.toString),fe=T(String.prototype.match),pe=T(String.prototype.replace),me=T(String.prototype.indexOf),he=T(String.prototype.trim),ge=T(Number.prototype.toString),y=T(Boolean.prototype.toString),b=typeof BigInt>`u`?null:T(BigInt.prototype.toString),_e=typeof Symbol>`u`?null:T(Symbol.prototype.toString),x=T(Object.prototype.hasOwnProperty),S=T(Object.prototype.toString),C=T(RegExp.prototype.test),w=E(TypeError);function T(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return te(e,t,n)}}function E(e){return function(){return ne(e,[...arguments])}}function D(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v;if(l&&l(e,null),!_(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(u(t)||(t[r]=e),i=e)}e[i]=!0}return e}function ve(e){for(let t=0;t<e.length;t++)x(e,t)||(e[t]=null);return e}function O(e){let t=h(null);for(let r of c(e)){var n=a(r,2);let i=n[0],o=n[1];x(e,i)&&(t[i]=_(o)?ve(o):o&&typeof o==`object`&&o.constructor===Object?O(o):o)}return t}function ye(e){switch(typeof e){case`string`:return e;case`number`:return ge(e);case`boolean`:return y(e);case`bigint`:return b?b(e):`0`;case`symbol`:return _e?_e(e):`Symbol()`;case`undefined`:return S(e);case`function`:case`object`:{if(e===null)return S(e);let t=e,n=k(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:S(e)}return S(e)}default:return S(e)}}function k(e,t){for(;e!==null;){let n=f(e,t);if(n){if(n.get)return T(n.get);if(typeof n.value==`function`)return T(n.value)}e=d(e)}function n(){return null}return n}function be(e,t){for(;e!==null;){let n=f(e,t);if(n)return n.get?T(n.get):null;e=d(e)}return null}function xe(e){try{return C(e,``),!0}catch{return!1}}var Se=p(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ce=p(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),we=p([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Te=p([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ee=p(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),De=p([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Oe=p([`#text`]),ke=p(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ae=p(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),je=p(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Me=p([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ne=m(/{{[\w\W]*|^[\w\W]*}}/g),Pe=m(/<%[\w\W]*|^[\w\W]*%>/g),Fe=m(/\${[\w\W]*/g),Ie=m(/^data-[\-\w.\u00B7-\uFFFF]+$/),Le=m(/^aria-[\-\w]+$/),Re=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ze=m(/^(?:\w+script|data):/i),Be=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ve=m(/^html$/i),He=m(/^[a-z][.\w]*(-[.\w]+)+$/i),Ue=m(/<[/\w!]/g),We=m(/<[/\w]/g),Ge=m(/<\/no(script|embed|frames)/i),Ke=m(/\/>/i),A={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},qe=p(D({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),Je=function(){return typeof window>`u`?null:window},Ye=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Xe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},j=function(e,t,n,r){return x(e,t)&&_(e[t])?D(r.base?O(r.base):{},e[t],r.transform):n},Ze=function(e,t,n){let r=x(e,t)?e[t]:void 0;return r&&typeof r==`object`?O(r):n()};function Qe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Je(),t=e=>Qe(e);if(t.version=`3.4.17`,t.removed=[],!e||!e.document||e.document.nodeType!==A.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,d=e.trustedTypes,f=s.prototype,ee=k(f,`cloneNode`),te=k(f,`remove`),ne=k(f,`removeAttributeNode`),ge=k(f,`nextSibling`),y=k(f,`childNodes`),b=k(f,`parentNode`),_e=k(f,`shadowRoot`),S=k(f,`attributes`),T=o&&o.prototype?k(o.prototype,`nodeType`):null,E=o&&o.prototype?k(o.prototype,`nodeName`):null,ve=o&&o.prototype?k(o.prototype,`ownerDocument`):null,M=function(e){return T?T(e):e.nodeType},$e=function(e){return E?E(e):e.nodeName},et=be(f,`namespaceURI`),tt=function(e){return et?et(e):e.namespaceURI};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let N,P=``,nt,rt=!1,it=0,at=function(){if(it>0)throw w(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},F=function(e){at(),it++;try{return N.createHTML(e)}finally{it--}},ot=function(e){at(),it++;try{return N.createScriptURL(e)}finally{it--}},st=function(){return rt||=(nt=Ye(d,i),!0),nt},ct=n,lt=ct.implementation,ut=ct.createNodeIterator,dt=ct.createDocumentFragment,ft=ct.getElementsByTagName,pt=r.importNode,I=Xe();t.isSupported=typeof c==`function`&&typeof b==`function`&<&<.createHTMLDocument!==void 0;let mt=Ne,ht=Pe,gt=Fe,_t=Ie,vt=Le,yt=ze,bt=Be,xt=He,St=Re,L=null,Ct=D({},[...Se,...Ce,...we,...Ee,...Oe]),R=null,wt=D({},[...ke,...Ae,...je,...Me]),z=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Tt=null,Et=null,B=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Dt=!0,Ot=!0,kt=!1,At=!0,V=!1,H=!0,U=!1,jt=!1,Mt=null,Nt=null,Pt=!1,W=!1,Ft=!1,It=!1,Lt=!0,Rt=!1,zt=`user-content-`,Bt=!0,Vt=!1,G=null,K={},q=null,Ht=D({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ut=null,Wt=D({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Gt=null,Kt=D({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),qt=`http://www.w3.org/1998/Math/MathML`,Jt=`http://www.w3.org/2000/svg`,J=`http://www.w3.org/1999/xhtml`,Y=J,Yt=!1,Xt=null,Zt=D({},[qt,Jt,J],de),Qt=p([`mi`,`mo`,`mn`,`ms`,`mtext`]),$t=D({},Qt),en=p([`annotation-xml`]),tn=D({},en),nn=D({},[`title`,`style`,`font`,`a`,`script`]),rn=null,an=[`application/xhtml+xml`,`text/html`],X=null,on=null,sn=n.createElement(`form`),cn=function(e){return e instanceof RegExp||e instanceof Function},ln=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(on&&on===e)return;e&&typeof e==`object`||(e={}),e=O(e),rn=an.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=rn===`application/xhtml+xml`?de:v,L=j(e,`ALLOWED_TAGS`,Ct,{transform:X}),R=j(e,`ALLOWED_ATTR`,wt,{transform:X}),Xt=j(e,`ALLOWED_NAMESPACES`,Zt,{transform:de}),Gt=j(e,`ADD_URI_SAFE_ATTR`,Kt,{transform:X,base:Kt}),Ut=j(e,`ADD_DATA_URI_TAGS`,Wt,{transform:X,base:Wt}),q=j(e,`FORBID_CONTENTS`,Ht,{transform:X}),Tt=j(e,`FORBID_TAGS`,O({}),{transform:X}),Et=j(e,`FORBID_ATTR`,O({}),{transform:X}),K=x(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?O(e.USE_PROFILES):e.USE_PROFILES:!1,Dt=e.ALLOW_ARIA_ATTR!==!1,Ot=e.ALLOW_DATA_ATTR!==!1,kt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,At=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,V=e.SAFE_FOR_TEMPLATES||!1,H=e.SAFE_FOR_XML!==!1,U=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,Ft=e.RETURN_DOM_FRAGMENT||!1,It=e.RETURN_TRUSTED_TYPE||!1,Pt=e.FORCE_BODY||!1,Lt=e.SANITIZE_DOM!==!1,Rt=e.SANITIZE_NAMED_PROPS||!1,Bt=e.KEEP_CONTENT!==!1,Vt=e.IN_PLACE||!1,St=xe(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Re,Y=typeof e.NAMESPACE==`string`?e.NAMESPACE:J,$t=Ze(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>D({},Qt)),tn=Ze(e,`HTML_INTEGRATION_POINTS`,()=>D({},en));let t=Ze(e,`CUSTOM_ELEMENT_HANDLING`,()=>h(null));if(z=h(null),x(t,`tagNameCheck`)&&cn(t.tagNameCheck)&&(z.tagNameCheck=t.tagNameCheck),x(t,`attributeNameCheck`)&&cn(t.attributeNameCheck)&&(z.attributeNameCheck=t.attributeNameCheck),x(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),m(z),V&&(Ot=!1),Ft&&(W=!0),K&&(L=D({},Oe),R=h(null),K.html===!0&&(D(L,Se),D(R,ke)),K.svg===!0&&(D(L,Ce),D(R,Ae),D(R,Me)),K.svgFilters===!0&&(D(L,we),D(R,Ae),D(R,Me)),K.mathMl===!0&&(D(L,Ee),D(R,je),D(R,Me))),B.tagCheck=null,B.attributeCheck=null,x(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?B.tagCheck=e.ADD_TAGS:_(e.ADD_TAGS)&&(L===Ct&&(L=O(L)),D(L,e.ADD_TAGS,X))),x(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?B.attributeCheck=e.ADD_ATTR:_(e.ADD_ATTR)&&(R===wt&&(R=O(R)),D(R,e.ADD_ATTR,X))),x(e,`ADD_FORBID_CONTENTS`)&&_(e.ADD_FORBID_CONTENTS)&&(q===Ht&&(q=O(q)),D(q,e.ADD_FORBID_CONTENTS,X)),Bt&&(L[`#text`]=!0),U&&D(L,[`html`,`head`,`body`]),L.table&&(D(L,[`tbody`]),delete Tt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw w(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw w(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=N;N=e.TRUSTED_TYPES_POLICY;try{P=F(``)}catch(e){throw N=t,e}}else e.TRUSTED_TYPES_POLICY===null?(N=void 0,P=``):(N===void 0&&(N=st()),N&&typeof P==`string`&&(P=F(``)));p&&p(e),on=e},un=D({},[...Ce,...we,...Te]),dn=D({},[...Ee,...De]),fn=function(e,t,n){return t.namespaceURI===J?e===`svg`:t.namespaceURI===qt?e===`svg`&&(n===`annotation-xml`||$t[n]):!!un[e]},pn=function(e,t,n){return t.namespaceURI===J?e===`math`:t.namespaceURI===Jt?e===`math`&&tn[n]:!!dn[e]},mn=function(e,t,n){return t.namespaceURI===Jt&&!tn[n]||t.namespaceURI===qt&&!$t[n]?!1:!dn[e]&&(nn[e]||!un[e])},hn=function(e){let t=tt(e),n=v($e(e)),r=b(e),i,a;return r&&M(r)===A.element?(i={namespaceURI:tt(r)},a=v($e(r))):(i={namespaceURI:Y},a=`template`),Xt[t]?t===Jt?fn(n,i,a):t===qt?pn(n,i,a):t===J?mn(n,i,a):!!(rn===`application/xhtml+xml`&&Xt[t]):!1},Z=function(e){ae(t.removed,{element:e});try{b(e).removeChild(e)}catch{if(te(e),!b(e))throw w(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},gn=function(e,t,n){try{ne(e,t)}catch{try{e.removeAttribute(n)}catch{}}},_n=function(e){xn(e);let t=y(e);t&&g(oe(t),e=>{try{te(e)}catch{}});let n=M(e)===A.element?S(e):null;if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&gn(e,r,i)}},vn=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}ae(t.removed,{attribute:r||null,from:n});try{r?ne(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(W||Ft)try{Z(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},yn=function(e){let t=S(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||R[X(i)]||gn(e,r,i)}},bn=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&M(e)===A.element){let t=_e(e);Q(t)&&r.push(t)}let i=y(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},xn=function(e){bn(e,e=>{M(e)===A.element&&yn(e)})},Sn=function(e){let t=[];return bn(e,e=>{t.push(e)},!0),t},Cn=function(e,t){let n=ce();g(Sn(e),e=>{M(e)===A.element&&le(n,e)}),g(t,e=>{M(e)===A.element&&!ue(n,e)&&yn(e)})},wn=function(e,n){let r=!1;return g(t.removed,t=>{t.element&&(r||=t.element===e,xn(t.element))}),Cn(e,n),r},Tn=function(e,t){let n=G,r=null,i=()=>(r||(r=ce(),g(t,e=>{le(r,e)})),r);for(let t=0;;t++){let r=Sn(e),a=[e],o=!1;if(g(r,e=>{M(e)===A.documentFragment?ae(a,e):!o&&!ue(n,e)&&(o=ue(i(),e))}),!o)return;if(t>=8)throw w(`the tree kept changing during in-place sanitization; refusing to return it`);g(a,(t,n)=>{En(t,n>0,e,i())})}},En=function(e,t,n,r){let i=jn(e),a;for(;a=i.nextNode();)ue(r,a)&&!ue(G,a)&&(t&&$(I.uponSanitizeShadowNode,a,null),Hn(a,n),Yn(a,n),Q(a.content)&&Xn(a.content))},Dn=function(e){G&&le(G,e)},On=function(e,t){return H?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},kn=function(e){H&&bn(e,e=>{let t=M(e);if(t===A.processingInstruction||t===A.comment&&C(We,e.data)){try{te(e)}catch{}return!1}if(t===A.element){let t=e,n=X($e(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&On(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},An=function(e){let t=null,r=null;if(Pt)e=`<remove></remove>`+e;else{let t=fe(e,/^[\r\n\t ]+/);r=t&&t[0]}rn===`application/xhtml+xml`&&Y===J&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=N?F(e):e;if(Y===J)try{t=new u().parseFromString(i,rn)}catch{}if(!t||!t.documentElement){t=lt.createDocument(Y,`template`,null);try{t.documentElement.innerHTML=Yt?P:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Y===J?ft.call(t,U?`html`:`body`)[0]:U?t.documentElement:a},jn=function(e){let t=ve?ve(e):e.ownerDocument;return ut.call(t||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Mn=function(e){return e=pe(e,mt,` `),e=pe(e,ht,` `),e=pe(e,gt,` `),e},Nn=function(e){Pn(e);let t=e.querySelectorAll?.call(e,`template`);t&&g(t,e=>{Q(e.content)&&Nn(e.content)})},Pn=function(e){e.normalize();let t=ve?ve(e):e.ownerDocument,n=ut.call(t||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Mn(r.data),r=n.nextNode()},Fn=function(e){let t=E?E(e):null;return typeof t!=`string`||X(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==S(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==T(e)||e.childNodes!==y(e)},Q=function(e){if(!T||typeof e!=`object`||!e)return!1;try{return T(e)===A.documentFragment}catch{return!1}},In=function(e){if(!T||typeof e!=`object`||!e)return!1;try{return typeof T(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&g(e,e=>{e.call(t,n,r,on)})}let Ln=function(e,t){return!!(H&&e.hasChildNodes()&&!In(e.firstElementChild)&&C(Ue,e.textContent)&&C(Ue,e.innerHTML)||H&&qe[t]&&M(e)===A.element&&tt(e)===J&&(In(e.firstElementChild)||typeof e.textContent==`string`&&C(Ue,e.textContent))||e.nodeType===A.processingInstruction||H&&e.nodeType===A.comment&&C(We,e.data))},Rn=function(e,t){return e instanceof RegExp?C(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},zn=function(e,t,n){if(!Tt[t]&&Gn(t)&&Rn(z.tagNameCheck,t))return!1;if(Bt&&!q[t]&&!q[v(t)]){let t=b(e),r=y(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?ee(r[a],!0):r[a];t.insertBefore(i,ge(e))}}}return Z(e),!0},Bn=function(e,t,n,r){return e.length===0?t:t===n||t===r?O(t):t},Vn=function(e,t){return e===t||b(e)!==null?!1:(Vt&&xn(e),!0)},Hn=function(e,n){if(Dn(e),$(I.beforeSanitizeElements,e,null),Vn(e,n))return!0;if(Fn(e))return Z(e),!0;let r=X($e(e));if(L=Bn(I.uponSanitizeElement,L,Ct,Mt),$(I.uponSanitizeElement,e,{tagName:r,allowedTags:L}),Vn(e,n))return!0;if(Ln(e,r))return Z(e),!0;if(Tt[r]||!(B.tagCheck instanceof Function&&B.tagCheck(r))&&!L[r]){let t=zn(e,r,n);return t===!1&&($(I.afterSanitizeElements,e,null),Vn(e,n))?!0:t}if(M(e)===A.element&&!hn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&C(Ge,e.innerHTML))return Z(e),!0;if(V&&e.nodeType===A.text){let n=Mn(e.textContent);e.textContent!==n&&(ae(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(I.afterSanitizeElements,e,null),Vn(e,n)},Un=function(e,t,r){if(Et[t]||On(t,e)||Lt&&(t===`id`||t===`name`)&&(r in n||r in sn))return!1;let i=R[t]||B.attributeCheck instanceof Function&&B.attributeCheck(t,e);return Ot&&C(_t,t)||Dt&&C(vt,t)?!0:i?Gt[t]||C(St,pe(r,bt,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&me(r,`data:`)===0&&Ut[e]||kt&&!C(yt,pe(r,bt,``))?!0:!r:Gn(e)&&Rn(z.tagNameCheck,e)&&Rn(z.attributeNameCheck,t,e)||t===`is`&&z.allowCustomizedBuiltInElements&&Rn(z.tagNameCheck,r)},Wn=D({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Gn=function(e){return!Wn[v(e)]&&C(xt,e)},Kn=function(e,t,n,r){if(N&&typeof d==`object`&&typeof d.getAttributeType==`function`&&!n)switch(d.getAttributeType(e,t)){case`TrustedHTML`:return F(r);case`TrustedScriptURL`:return ot(r)}return r},qn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Fn(e)||(Z(e),!1)}catch{return vn(t,e),!1}},Jn=function(e,t){return H&&C(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t)?!0:v(e)===`attributename`&&fe(t,`href`)!==null},Yn=function(e,n){if($(I.beforeSanitizeAttributes,e,null),Vn(e,n))return;let r=e.attributes;if(!r||Fn(e))return;R=Bn(I.uponSanitizeAttribute,R,wt,Nt);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},a=r.length,o=X(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=X(s),d=l,f=s===`value`?d:he(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,$(I.uponSanitizeAttribute,e,i),f=i.attrValue,Rt&&(u===`id`||u===`name`)&&me(f,zt)!==0&&(vn(s,e,n),f=zt+f,p=!0),Jn(s,f)?vn(s,e,n):i.forceKeepAttr||(i.keepAttr?!At&&C(Ke,f)?vn(s,e,n):(V&&(f=Mn(f)),Un(o,u,f)?(f=Kn(o,u,c,f),f!==d&&qn(e,s,c,f)&&p&&ie(t.removed)):vn(s,e,n)):vn(s,e,n))}$(I.afterSanitizeAttributes,e,null),Vn(e,n)},Xn=function(e){let t=null,n=jn(e);for($(I.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(I.uponSanitizeShadowNode,t,null),Hn(t,e),Yn(t,e),Q(t.content)&&Xn(t.content),M(t)===A.element){let e=_e(t);Q(e)&&(Zn(e),Xn(e))}V&&Pn(e),$(I.afterSanitizeShadowDOM,e,null)},Zn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Xn(e.shadow);continue}let n=e.node,r=M(n)===A.element,i=y(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=E?E(n):null;if(typeof e==`string`&&X(e)===`template`){let e=n.content;Q(e)&&t.push({node:e,shadow:null})}}if(r){let e=_e(n);Q(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Yt=!e,Yt&&(e=`<!-->`),typeof e!=`string`&&!In(e)&&(e=ye(e),typeof e!=`string`))throw w(`dirty is not a string, aborting`);if(!t.isSupported)return e;jt?(L=Mt,R=Nt):ln(n),(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&(L=O(L)),I.uponSanitizeAttribute.length>0&&(R=O(R)),t.removed=[];let c=Vt&&typeof e!=`string`&&In(e),l=[],u=G;if(c){kn(e);let t=$e(e);if(typeof t==`string`){let n=X(t);if(!L[n]||Tt[n])throw _n(e),w(`root node is forbidden and cannot be sanitized in-place`)}if(Fn(e))throw _n(e),w(`root node is clobbered and cannot be sanitized in-place`);l=Sn(e),G=ce()}else if(In(e))i=An(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===A.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Zn(i);else{if(!W&&!V&&!U&&e.indexOf(`<`)===-1)return N&&It?F(e):e;if(i=An(e),!i)return W?null:It?P:``}i&&Pt&&Z(i.firstChild);let d=c?e:i;try{c&&Zn(e);let t=jn(d);for(;o=t.nextNode();)Hn(o,d),Yn(o,d),Q(o.content)&&Xn(o.content);c&&Tn(e,l)}catch(t){throw c&&(_n(e),wn(e,l)),t}finally{G=u}if(c){if(wn(e,l))throw w(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return V&&Nn(e),e}if(W){if(V&&Nn(i),Ft)for(s=dt.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(R.shadowroot||R.shadowrootmode)&&(s=pt.call(r,s,!0)),s}let f=U?i.outerHTML:i.innerHTML;return U&&L[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&C(Ve,i.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
3
|
-
`+f),V&&(f=Mn(f)),N&&It?F(f):f},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ln(e),jt=!0,Mt=L,Nt=R},t.clearConfig=function(){on=null,jt=!1,Mt=null,Nt=null,N=nt,P=``},t.isValidAttribute=function(e,t,n){on||ln({});let r=X(e),i=X(t);return typeof n==`string`&&(Jn(t,n)||!At&&C(Ke,n))?!1:Un(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&x(I,e)&&ae(I[e],t)},t.removeHook=function(e,t){if(x(I,e)){if(t!==void 0){let n=re(I[e],t);return n===-1?void 0:se(I[e],n,1)[0]}return ie(I[e])}},t.removeHooks=function(e){x(I,e)&&(I[e]=[])},t.removeAllHooks=function(){I=Xe()},t}var M=Qe();export{M as default};
|