diff --git a/demos/docs-ts/dist/assets/index-1f258931.js b/demos/docs-ts/dist/assets/index-aba47f88.js similarity index 99% rename from demos/docs-ts/dist/assets/index-1f258931.js rename to demos/docs-ts/dist/assets/index-aba47f88.js index 3858fa2..0dd310d 100644 --- a/demos/docs-ts/dist/assets/index-1f258931.js +++ b/demos/docs-ts/dist/assets/index-aba47f88.js @@ -271,7 +271,7 @@ img.ProseMirror-separator {
- `;this.template=e,this.registerClickListener()}onClick(e){const t=this.closest(".aie-container").querySelector(".aie-content").innerHTML,i=Array.from(document.querySelectorAll("style, link")).map(l=>l.outerHTML).join("")+t,s=document.createElement("iframe");s.id="aie-print-iframe",s.setAttribute("style","position: absolute; width: 0; height: 0; top: -10px; left: -10px;"),document.body.appendChild(s);const o=s.contentWindow,a=s.contentDocument||s.contentWindow&&s.contentWindow.document;a&&(a.open(),a.write(i),a.close()),o&&(s.onload=function(){try{setTimeout(()=>{o.focus();try{o.document.execCommand("print",!1)||o.print()}catch{o.print()}o.close()},10)}catch(l){console.error(l)}setTimeout(function(){document.body.removeChild(s)},100)})}}const FE=["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜†","๐Ÿ˜…","๐Ÿคฃ","๐Ÿ˜‚","๐Ÿ™‚","๐Ÿ™ƒ","๐Ÿ˜‰","๐Ÿ˜Š","๐Ÿ˜‡","๐Ÿฅฐ","๐Ÿ˜","๐Ÿคฉ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜š","๐Ÿ˜™","๐Ÿฅฒ","๐Ÿ˜‹","๐Ÿ˜›","๐Ÿ˜œ","๐Ÿคช","๐Ÿ˜","๐Ÿค‘","๐Ÿค—","๐Ÿคญ","๐Ÿคซ","๐Ÿค”","๐Ÿค","๐Ÿคจ","๐Ÿ˜","๐Ÿ˜‘","๐Ÿ˜ถ","๐Ÿ˜ถโ€๐ŸŒซ","๐Ÿ˜","๐Ÿ˜’","๐Ÿ™„","๐Ÿ˜ฌ","๐Ÿ˜ฎโ€๐Ÿ’จ","๐Ÿคฅ","๐Ÿ˜Œ","๐Ÿ˜”","๐Ÿ˜ช","๐Ÿคค","๐Ÿ˜ด","๐Ÿ˜ท","๐Ÿค’","๐Ÿค•","๐Ÿคข","๐Ÿคฎ","๐Ÿคง","๐Ÿฅต","๐Ÿฅถ","๐Ÿฅด","๐Ÿ˜ต","๐Ÿ˜ตโ€๐Ÿ’ซ","๐Ÿคฏ","๐Ÿค ","๐Ÿฅณ","๐Ÿฅธ","๐Ÿ˜Ž","๐Ÿค“","๐Ÿง","๐Ÿ˜•","๐Ÿ˜Ÿ","๐Ÿ™","๐Ÿ˜ฎ","๐Ÿ˜ฒ","๐Ÿ˜ณ","๐Ÿฅบ","๐Ÿ˜ฆ","๐Ÿ˜ง","๐Ÿ˜จ","๐Ÿ˜ฐ","๐Ÿ˜ฅ","๐Ÿ˜ข","๐Ÿ˜ญ","๐Ÿ˜ฑ","๐Ÿ˜–","๐Ÿ˜ฃ","๐Ÿ˜ž","๐Ÿ˜“","๐Ÿ˜ฉ","๐Ÿ˜ซ","๐Ÿฅฑ","๐Ÿ˜ค","๐Ÿ˜ก","๐Ÿ˜ ","๐Ÿคฌ","๐Ÿ˜ˆ","๐Ÿ‘ฟ","๐Ÿ’€","โ˜ ๏ธ","๐Ÿ’ฉ","๐Ÿคก","๐Ÿ‘น","๐Ÿ‘บ","๐Ÿ‘ป","๐Ÿ‘ฝ","๐Ÿ‘พ","๐Ÿค–","๐Ÿ˜บ","๐Ÿ˜ธ","๐Ÿ˜น","๐Ÿ˜ป","๐Ÿ˜ผ","๐Ÿ˜ฝ","๐Ÿ™€","๐Ÿ˜ฟ","๐Ÿ˜พ","๐Ÿ™ˆ","๐Ÿ™‰","๐Ÿ™Š","๐Ÿ’Œ","๐Ÿ’˜","๐Ÿ’","๐Ÿ’–","๐Ÿ’—","๐Ÿ’“","๐Ÿ’ž","๐Ÿ’•","๐Ÿ’Ÿ","โฃ๏ธ","๐Ÿ’”","๐Ÿ’‹","๐Ÿ’ฏ","๐Ÿ’ข","๐Ÿ’ฅ","๐Ÿ’ซ","๐Ÿ’ฆ","๐Ÿ’จ","๐Ÿ’ค"];class zE extends ge{constructor(){super();const e=` + `;this.template=e,this.registerClickListener()}onClick(e){let t=this.closest(".aie-container").querySelector(".aie-content").innerHTML;t=`
${t}
`;const i=Array.from(document.querySelectorAll("style, link")).map(l=>l.outerHTML).join("")+t,s=document.createElement("iframe");s.id="aie-print-iframe",s.setAttribute("style","position: absolute; width: 0; height: 0; top: -10px; left: -10px;"),document.body.appendChild(s);const o=s.contentWindow,a=s.contentDocument||s.contentWindow&&s.contentWindow.document;a&&(a.open(),a.write(i),a.close()),o&&(s.onload=function(){try{setTimeout(()=>{o.focus();try{o.document.execCommand("print",!1)||o.print()}catch{o.print()}o.close()},10)}catch(l){console.error(l)}setTimeout(function(){document.body.removeChild(s)},100)})}}const FE=["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜†","๐Ÿ˜…","๐Ÿคฃ","๐Ÿ˜‚","๐Ÿ™‚","๐Ÿ™ƒ","๐Ÿ˜‰","๐Ÿ˜Š","๐Ÿ˜‡","๐Ÿฅฐ","๐Ÿ˜","๐Ÿคฉ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜š","๐Ÿ˜™","๐Ÿฅฒ","๐Ÿ˜‹","๐Ÿ˜›","๐Ÿ˜œ","๐Ÿคช","๐Ÿ˜","๐Ÿค‘","๐Ÿค—","๐Ÿคญ","๐Ÿคซ","๐Ÿค”","๐Ÿค","๐Ÿคจ","๐Ÿ˜","๐Ÿ˜‘","๐Ÿ˜ถ","๐Ÿ˜ถโ€๐ŸŒซ","๐Ÿ˜","๐Ÿ˜’","๐Ÿ™„","๐Ÿ˜ฌ","๐Ÿ˜ฎโ€๐Ÿ’จ","๐Ÿคฅ","๐Ÿ˜Œ","๐Ÿ˜”","๐Ÿ˜ช","๐Ÿคค","๐Ÿ˜ด","๐Ÿ˜ท","๐Ÿค’","๐Ÿค•","๐Ÿคข","๐Ÿคฎ","๐Ÿคง","๐Ÿฅต","๐Ÿฅถ","๐Ÿฅด","๐Ÿ˜ต","๐Ÿ˜ตโ€๐Ÿ’ซ","๐Ÿคฏ","๐Ÿค ","๐Ÿฅณ","๐Ÿฅธ","๐Ÿ˜Ž","๐Ÿค“","๐Ÿง","๐Ÿ˜•","๐Ÿ˜Ÿ","๐Ÿ™","๐Ÿ˜ฎ","๐Ÿ˜ฒ","๐Ÿ˜ณ","๐Ÿฅบ","๐Ÿ˜ฆ","๐Ÿ˜ง","๐Ÿ˜จ","๐Ÿ˜ฐ","๐Ÿ˜ฅ","๐Ÿ˜ข","๐Ÿ˜ญ","๐Ÿ˜ฑ","๐Ÿ˜–","๐Ÿ˜ฃ","๐Ÿ˜ž","๐Ÿ˜“","๐Ÿ˜ฉ","๐Ÿ˜ซ","๐Ÿฅฑ","๐Ÿ˜ค","๐Ÿ˜ก","๐Ÿ˜ ","๐Ÿคฌ","๐Ÿ˜ˆ","๐Ÿ‘ฟ","๐Ÿ’€","โ˜ ๏ธ","๐Ÿ’ฉ","๐Ÿคก","๐Ÿ‘น","๐Ÿ‘บ","๐Ÿ‘ป","๐Ÿ‘ฝ","๐Ÿ‘พ","๐Ÿค–","๐Ÿ˜บ","๐Ÿ˜ธ","๐Ÿ˜น","๐Ÿ˜ป","๐Ÿ˜ผ","๐Ÿ˜ฝ","๐Ÿ™€","๐Ÿ˜ฟ","๐Ÿ˜พ","๐Ÿ™ˆ","๐Ÿ™‰","๐Ÿ™Š","๐Ÿ’Œ","๐Ÿ’˜","๐Ÿ’","๐Ÿ’–","๐Ÿ’—","๐Ÿ’“","๐Ÿ’ž","๐Ÿ’•","๐Ÿ’Ÿ","โฃ๏ธ","๐Ÿ’”","๐Ÿ’‹","๐Ÿ’ฏ","๐Ÿ’ข","๐Ÿ’ฅ","๐Ÿ’ซ","๐Ÿ’ฆ","๐Ÿ’จ","๐Ÿ’ค"];class zE extends ge{constructor(){super();const e=`
@@ -418,6 +418,6 @@ ${t.innerHTML} `),n.text(e.textContent,!1),n.ensureNewLine(),n.write("```"),n.closeBlock(e)},parse:{setup(n){var e;n.set({langPrefix:(e=this.options.languageClassPrefix)!==null&&e!==void 0?e:"language-"})},updateDOM(n){n.innerHTML=n.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),Oue=ae.create({name:"hardBreak"}),hb=Oue.extend({addStorage(){return{markdown:{serialize:It.nodes.hard_break,parse:{}}}}}),Lue=ae.create({name:"heading"}),Rue=Lue.extend({addStorage(){return{markdown:{serialize:It.nodes.heading,parse:{}}}}}),Due=ae.create({name:"horizontalRule"}),Iue=Due.extend({addStorage(){return{markdown:{serialize:It.nodes.horizontal_rule,parse:{}}}}}),Bue=ae.create({name:"image"}),Hue=Bue.extend({addStorage(){return{markdown:{serialize:It.nodes.image,parse:{}}}}}),Pue=ae.create({name:"listItem"}),$ue=Pue.extend({addStorage(){return{markdown:{serialize:It.nodes.list_item,parse:{}}}}}),Fue=ae.create({name:"orderedList"}),zue=Fue.extend({addStorage(){return{markdown:{serialize(n,e){const t=e.attrs.start||1,r=String(t+e.childCount-1).length,i=n.repeat(" ",r+2);n.renderList(e,i,s=>{const o=String(t+s);return n.repeat(" ",r-o.length)+o+". "})},parse:{}}}}}),Vue=ae.create({name:"paragraph"}),que=Vue.extend({addStorage(){return{markdown:{serialize:It.nodes.paragraph,parse:{}}}}});function nl(n){var e,t;return(e=n==null||(t=n.content)===null||t===void 0?void 0:t.content)!==null&&e!==void 0?e:[]}const Uue=ae.create({name:"table"}),Kue=Uue.extend({addStorage(){return{markdown:{serialize(n,e,t){if(!Wue(e)){su.storage.markdown.serialize.call(this,n,e,t);return}e.forEach((r,i,s)=>{if(n.write("| "),r.forEach((o,a,l)=>{l&&n.write(" | ");const c=o.firstChild;c.textContent.trim()&&n.renderInline(c)}),n.write(" |"),n.ensureNewLine(),!s){const o=Array.from({length:r.childCount}).map(()=>"---").join(" | ");n.write(`| ${o} |`),n.ensureNewLine()}}),n.closeBlock(e)},parse:{}}}}});function Dp(n){return n.attrs.colspan>1||n.attrs.rowspan>1}function Wue(n){const e=nl(n),t=e[0],r=e.slice(1);return!(nl(t).some(i=>i.type.name!=="tableHeader"||Dp(i)||i.childCount>1)||r.some(i=>nl(i).some(s=>s.type.name==="tableHeader"||Dp(s)||s.childCount>1)))}const Gue=ae.create({name:"taskItem"}),Zue=Gue.extend({addStorage(){return{markdown:{serialize(n,e){const t=e.attrs.checked?"[x]":"[ ]";n.write(`${t} `),n.renderContent(e)},parse:{updateDOM(n){[...n.querySelectorAll(".task-list-item")].forEach(e=>{const t=e.querySelector("input");e.setAttribute("data-type","taskItem"),t&&(e.setAttribute("data-checked",t.checked),t.remove())})}}}}}}),jue=ae.create({name:"taskList"}),Jue=jue.extend({addStorage(){return{markdown:{serialize:pb.storage.markdown.serialize,parse:{setup(n){n.use(pue)},updateDOM(n){[...n.querySelectorAll(".contains-task-list")].forEach(e=>{e.setAttribute("data-type","taskList")})}}}}}}),Yue=ae.create({name:"text"}),Xue=Yue.extend({addStorage(){return{markdown:{serialize(n,e){n.text(kue(e.text))},parse:{}}}}}),Que=Le.create({name:"bold"}),ede=Que.extend({addStorage(){return{markdown:{serialize:It.marks.strong,parse:{}}}}}),tde=Le.create({name:"code"}),nde=tde.extend({addStorage(){return{markdown:{serialize:It.marks.code,parse:{}}}}}),rde=Le.create({name:"italic"}),ide=rde.extend({addStorage(){return{markdown:{serialize:It.marks.em,parse:{}}}}}),sde=Le.create({name:"link"}),ode=sde.extend({addStorage(){return{markdown:{serialize:It.marks.link,parse:{}}}}}),ade=Le.create({name:"strike"}),lde=ade.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),cde=[Mue,pb,Nue,hb,Rue,Iue,su,Hue,$ue,zue,que,Kue,Zue,Jue,Xue,ede,nde,fb,ide,ode,lde];function vo(n){var e,t;const r=(e=n.storage)===null||e===void 0?void 0:e.markdown,i=(t=cde.find(s=>s.name===n.name))===null||t===void 0?void 0:t.storage.markdown;return r||i?{...i,...r}:null}class ude{constructor(e){ql(this,"editor",null),this.editor=e}serialize(e){const t=new wue(this.nodes,this.marks,{hardBreakNodeName:hb.name});return t.renderContent(e),t.out}get nodes(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(t=>[t,this.serializeNode(su)])),...Object.fromEntries((e=this.editor.extensionManager.extensions.filter(t=>t.type==="node"&&this.serializeNode(t)).map(t=>[t.name,this.serializeNode(t)]))!==null&&e!==void 0?e:[])}}get marks(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(t=>[t,this.serializeMark(fb)])),...Object.fromEntries((e=this.editor.extensionManager.extensions.filter(t=>t.type==="mark"&&this.serializeMark(t)).map(t=>[t.name,this.serializeMark(t)]))!==null&&e!==void 0?e:[])}}serializeNode(e){var t;return(t=vo(e))===null||t===void 0||(t=t.serialize)===null||t===void 0?void 0:t.bind({editor:this.editor,options:e.options})}serializeMark(e){var t;const r=(t=vo(e))===null||t===void 0?void 0:t.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:e.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:e.options}):r.close}:null}}class dde{constructor(e,t){ql(this,"editor",null),ql(this,"md",null);let{html:r,linkify:i,breaks:s}=t;this.editor=e,this.md=this.withPatchedRenderer(ru({html:r,linkify:i,breaks:s}))}parse(e){let{inline:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string"){this.editor.extensionManager.extensions.forEach(s=>{var o;return(o=vo(s))===null||o===void 0||(o=o.parse)===null||o===void 0||(o=o.setup)===null||o===void 0?void 0:o.call({editor:this.editor,options:s.options},this.md)});const r=this.md.render(e),i=iu(r);return this.editor.extensionManager.extensions.forEach(s=>{var o;return(o=vo(s))===null||o===void 0||(o=o.parse)===null||o===void 0||(o=o.updateDOM)===null||o===void 0?void 0:o.call({editor:this.editor,options:s.options},i)}),this.normalizeDOM(i,{inline:t,content:e}),i.innerHTML}return e}normalizeDOM(e,t){let{inline:r,content:i}=t;return this.normalizeBlocks(e),e.querySelectorAll("*").forEach(s=>{var o;((o=s.nextSibling)===null||o===void 0?void 0:o.nodeType)===Node.TEXT_NODE&&!s.closest("pre")&&(s.nextSibling.textContent=s.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(e,i),e}normalizeBlocks(e){const r=Object.values(this.editor.schema.nodes).filter(i=>i.isBlock).map(i=>{var s;return(s=i.spec.parseDOM)===null||s===void 0?void 0:s.map(o=>o.tag)}).flat().filter(Boolean).join(",");r&&[...e.querySelectorAll(r)].forEach(i=>{i.parentElement.matches("p")&&Eue(i)})}normalizeInline(e,t){var r;if((r=e.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var i,s,o,a;const l=e.firstElementChild,{nextElementSibling:c}=l,u=(i=(s=t.match(/^\s+/))===null||s===void 0?void 0:s[0])!==null&&i!==void 0?i:"",d=c?"":(o=(a=t.match(/\s+$/))===null||a===void 0?void 0:a[0])!==null&&o!==void 0?o:"";if(t.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}xue(l),e.innerHTML=`${u}${e.innerHTML}${d}`}}withPatchedRenderer(e){const t=r=>function(){const i=r(...arguments);return i===` `?i:i[i.length-1]===` `?i.slice(0,-1):i};return e.renderer.rules.hardbreak=t(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=t(e.renderer.rules.softbreak),e.renderer.rules.fence=t(e.renderer.rules.fence),e.renderer.rules.code_block=t(e.renderer.rules.code_block),e.renderer.renderToken=t(e.renderer.renderToken.bind(e.renderer)),e}}const fde=ke.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new Ce({key:new _e("markdownClipboard"),props:{clipboardTextParser:(n,e,t)=>{if(t||!this.options.transformPastedText)return null;const r=this.editor.storage.markdown.parser.parse(n,{inline:!0});return An.fromSchema(this.editor.schema).parseSlice(iu(r),{preserveWhitespace:!0,context:e})},clipboardTextSerializer:n=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(n.content):null}})]}}),pde=ke.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){const n=rg.Commands.config.addCommands();return{setContent:(e,t,r)=>i=>n.setContent(i.editor.storage.markdown.parser.parse(e),t,r)(i),insertContentAt:(e,t,r)=>i=>n.insertContentAt(e,i.editor.storage.markdown.parser.parse(t,{inline:!0}),r)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new dde(this.editor,this.options),serializer:new ude(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[mue.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),fde.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var hde=function(e,t,r){function i(p){return p.trim().split(" ",2)[0]===t}function s(p,h,g,m,v){return p[h].nesting===1&&p[h].attrJoin("class",t),v.renderToken(p,h,g,m,v)}r=r||{};var o=3,a=r.marker||":",l=a.charCodeAt(0),c=a.length,u=r.validate||i,d=r.render||s;function f(p,h,g,m){var v,y,k,b,x,w,S,T,M=!1,L=p.bMarks[h]+p.tShift[h],z=p.eMarks[h];if(l!==p.src.charCodeAt(L))return!1;for(v=L+1;v<=z&&a[(v-L)%c]===p.src[v];v++);if(k=Math.floor((v-L)/c),k=g||(L=p.bMarks[y]+p.tShift[y],z=p.eMarks[y],L=4)){for(v=L+1;v<=z&&a[(v-L)%c]===p.src[v];v++);if(!(Math.floor((v-L)/c){this.options.classes.forEach(e=>{n.use(gde,e)})}}}}},addAttributes(){return{containerClass:{default:null,parseHTML:n=>[...n.classList].find(e=>this.options.classes.includes(e)),renderHTML:n=>({class:n.containerClass})}}},parseHTML(){return[{tag:"div",getAttrs:n=>{const e=n,t=["container-wrapper"].concat(this.options.classes);return[...e.classList].find(r=>t.includes(r))?null:!1}}]},renderHTML({HTMLAttributes:n}){return["div",fe(this.options.HTMLAttributes,n),0]},addCommands(){return{setContainer:n=>({commands:e})=>e.wrapIn(this.name,{containerClass:n}),toggleContainer:n=>({commands:e})=>e.toggleWrap(this.name,{containerClass:n}),unsetContainer:()=>({commands:n})=>n.lift(this.name)}},addInputRules(){return[ir({find:mde,type:this.type,getAttributes:n=>({containerClass:n[1]})})]}}),yde=(n,e)=>{var r,i,s,o,a,l,c,u,d,f,p,h,g,m,v,y,k,b,x,w;const t=e.cbName&&e.cbUrl?[Wd.configure({history:!1,codeBlock:!1})]:[Wd.configure({codeBlock:!1})];return t.push(oC,aC,lC,fC.configure({uploadUrl:(r=e.attachment)==null?void 0:r.uploadUrl,uploadHeaders:(i=e.attachment)==null?void 0:i.uploadHeaders,uploader:((s=e.attachment)==null?void 0:s.uploader)||e.uploader,uploaderEvent:(o=e.attachment)==null?void 0:o.uploaderEvent}),pC,$A,mC.configure({multicolor:!0}),bC,yC,vC,wC.configure({types:["heading","paragraph"]}),kC,CC.configure({allowBase64:!0,uploadUrl:(a=e.image)==null?void 0:a.uploadUrl,uploadHeaders:(l=e.image)==null?void 0:l.uploadHeaders,uploader:((c=e.image)==null?void 0:c.uploader)||e.uploader,uploaderEvent:(u=e.image)==null?void 0:u.uploaderEvent}),SS.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0}),_S,MS,AS,TS,XS.configure({openOnClick:!1,autolink:typeof((d=e.link)==null?void 0:d.autolink)>"u"?!0:(f=e.link)==null?void 0:f.autolink,HTMLAttributes:{ref:(p=e==null?void 0:e.link)==null?void 0:p.rel,class:(h=e==null?void 0:e.link)==null?void 0:h.class}}),QS,e_,t_,r_.configure({nested:!0}),a2.configure({lowlight:yA(EM),defaultLanguage:"auto",languageClassPrefix:"language-",codeExplainAi:((m=(g=e.ai)==null?void 0:g.codeBlock)==null?void 0:m.codeExplain)||{model:"xinghuo",prompt:"ๅธฎๆˆ‘ๅฏน่ฟ™ไธชไปฃ็ ่ฟ›่กŒ่งฃ้‡Š๏ผŒ่ฟ”ๅ›žไปฃ็ ็š„่งฃ้‡Šๅ†…ๅฎน๏ผŒๆณจๆ„๏ผŒไธ้œ€่ฆๅฏนไปฃ็ ็š„ๆณจ้‡Š่ฟ›่กŒ่งฃ้‡Š"},codeCommentsAi:((y=(v=e.ai)==null?void 0:v.codeBlock)==null?void 0:y.codeComments)||{model:"xinghuo",prompt:"ๅธฎๆˆ‘ๅฏน่ฟ™ไธชไปฃ็ ๆทปๅŠ ไธ€ไบ›ๆณจ้‡Š๏ผŒๅนถ่ฟ”ๅ›žๆทปๅŠ ๆณจ้‡Š็š„ไปฃ็ ๏ผŒๅช่ฟ”ๅ›žไปฃ็ "}}),kA.configure({uploadUrl:(k=e.video)==null?void 0:k.uploadUrl,uploadHeaders:(b=e.video)==null?void 0:b.uploadHeaders,uploader:((x=e.video)==null?void 0:x.uploader)||e.uploader,uploaderEvent:(w=e.video)==null?void 0:w.uploaderEvent}),EA,pde.configure({html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!0,breaks:!0,transformPastedText:!0,transformCopiedText:!1}),bde,...NA(n)),e.placeholder&&t.push(OA.configure({placeholder:e.placeholder})),t.push(PA.configure({suggestion:{items:S=>{var M;return((M=e.ai)==null?void 0:M.commands)||HA}}})),e.onMentionQuery&&t.push(BA(e.onMentionQuery)),t};const vde={default:"้ป˜่ฎค",delete:"ๅˆ ้™ค",confirm:"็กฎๅฎš",undo:"ๆ’ค้”€",redo:"้‡ๅš",brush:"ๆ ผๅผๅˆท",container:"้ซ˜ไบฎๅ—",eraser:"ๆธ…้™คๆ ผๅผ",heading:"ๆญฃๆ–‡/ๆ ‡้ข˜","font-family":"ๅญ—ไฝ“","font-size":"ๅญ—ๅท",bold:"ๅŠ ็ฒ—",italic:"ๆ–œไฝ“",underline:"ไธ‹ๅˆ’็บฟ",strike:"ๅˆ ้™ค็บฟ",link:"้“พๆŽฅ",code:"่กŒๅ†…ไปฃ็ ",subscript:"ไธ‹ๆ ‡",superscript:"ไธŠๆ ‡",hr:"ๅˆ†ๅ‰ฒ็บฟ",todo:"ไปปๅŠกๅˆ—่กจ",emoji:"่กจๆƒ…",highlight:"้ซ˜ไบฎ","font-color":"ๅญ—ไฝ“้ขœ่‰ฒ",align:"ๅฏน้ฝ","line-height":"่กŒ้ซ˜","bullet-list":"ๆ— ๅบๅˆ—่กจ","ordered-list":"ๆœ‰ๅบๅˆ—่กจ","indent-decrease":"ๅ‡ๅฐ‘็ผฉ่ฟ›","indent-increase":"ๅขžๅŠ ็ผฉ่ฟ›",break:"ๅผบๅˆถๆข่กŒ",image:"ๅ›พ็‰‡",video:"่ง†้ข‘",attachment:"้™„ไปถ",quote:"ๅผ•็”จ","code-block":"ไปฃ็ ๅ—",table:"่กจๆ ผ",printer:"ๆ‰“ๅฐ",fullscreen:"ๅ…จๅฑ",ai:"ไบบๅทฅๆ™บ่ƒฝ",paragraph:"ๆญฃๆ–‡",h1:"ๆ ‡้ข˜ 1",h2:"ๆ ‡้ข˜ 2",h3:"ๆ ‡้ข˜ 3",h4:"ๆ ‡้ข˜ 4",h5:"ๆ ‡้ข˜ 5",h6:"ๆ ‡้ข˜ 6",standardColors:"ๆ ‡ๅ‡†่‰ฒ",historyColors:"ๆœ€่ฟ‘ไฝฟ็”จ",insertTable:"ๆ’ๅ…ฅ่กจๆ ผ",row:"่กŒ",column:"ๅˆ—","align-left":"ๅฑ…ๅทฆๅฏน้ฝ","align-right":"ๅฑ…ๅณๅฏน้ฝ","align-center":"ๅฑ…ไธญๅฏน้ฝ","align-justify":"ไธค็ซฏๅฏน้ฝ","insert-column-left":"ๅทฆไพงๆ’ๅ…ฅๅˆ—","insert-column-right":"ๅณไพงๆ’ๅ…ฅๅˆ—","insert-row-top":"ไธŠๆ–นๆ’ๅ…ฅ่กŒ","insert-row-bottom":"ไธ‹ๆ–นๆ’ๅ…ฅ่กŒ","delete-column":"ๅˆ ้™คๅฝ“ๅ‰ๅˆ—","delete-row":"ๅˆ ้™คๅฝ“ๅ‰่กŒ","merge-cells-horizontal":"ๅˆๅนถๅ•ๅ…ƒๆ ผ","merge-cells-vertical":"ๅˆๅนถๅ•ๅ…ƒๆ ผ","split-cells-horizontal":"่งฃ้™คๅˆๅนถๅ•ๅ…ƒๆ ผ","split-cells-vertical":"่งฃ้™คๅˆๅนถๅ•ๅ…ƒๆ ผ","delete-table":"ไธŠไผ ่กจๆ ผ","edit-link":"็ผ–่พ‘้“พๆŽฅ",unlink:"ๅ–ๆถˆ้“พๆŽฅ","visit-link":"่ฎฟ้—ฎ้“พๆŽฅ","link-address":"้“พๆŽฅๅœฐๅ€","link-open-type":"ๆ‰“ๅผ€ๆ–นๅผ","link-open-blank":"ๆ–ฐ็ช—ๅฃ","default-font-size":"ๅญ—ๅท","default-font-family":"้ป˜่ฎคๅญ—ไฝ“"},wde={default:"Default",delete:"Delete",confirm:"Confirm",undo:"Undo",redo:"Redo",brush:"Format Painter",container:"Highlight container",eraser:"clear format",heading:"Paragraph/Heading","font-family":"Font Family","font-size":"Font Size",bold:"Bold",italic:"Italics",underline:"Underline",strike:"Strikethrough",link:"Link",code:"Inline code",subscript:"Subscript",superscript:"Superscript",hr:"Dividing line",todo:"Task list",emoji:"Emoji expression",highlight:"Highlight","font-color":"Font color",align:"Alignment","line-height":"Line height","bullet-list":"Unordered list","ordered-list":"Ordered list","indent-decrease":"Decrease indent","indent-increase":"Increase indent",break:"Force line break",image:"Image",video:"video",attachment:"Attachment",quote:"Quote","code-block":"Code block",table:"Table",printer:"Print",fullscreen:"Full screen",ai:"AI",paragraph:"Paragraph",h1:"H1",h2:"H2",h3:"H3",h4:"H4",h5:"H5",h6:"H6",standardColors:"Standard colors",historyColors:"Recently used colors",insertTable:"Insert Table",row:"Row",column:"Column","align-left":"Align left","align-right":"Align right","align-center":"Align center","align-justify":"Align justify","insert-column-left":"Insert column left","insert-column-right":"Insert column right","insert-row-top":"Insert row top","insert-row-bottom":"Insert row bottom","delete-column":"Delete column","delete-row":"Delete row","merge-cells-horizontal":"Merge cells","merge-cells-vertical":"Merge cells","split-cells-horizontal":"Split cells","split-cells-vertical":"Split cells","delete-table":"Delete table","edit-link":"Edit link",unlink:"Unlink","visit-link":"Visit link","link-address":"Link address","link-open-type":"Open type","link-open-blank":"Blank","default-font-size":"Size","default-font-family":"Default font"};window.customElements.define("aie-header",ax);window.customElements.define("aie-footer",lx);const kde={theme:"light",lang:"zh",contentRetentionKey:"ai-editor-content",placeholder:""};class Ede extends nw{constructor(e,t={}){super(t),this.userOptions=e}parseHtml(e){function t(i){return new window.DOMParser().parseFromString(`${i}`,"text/html").body}return An.fromSchema(this.schema).parse(t(e),{}).content}parseMarkdown(e){var r,i,s;const t=(s=(i=(r=this.storage.markdown)==null?void 0:r.parser)==null?void 0:i.parse)==null?void 0:s.call(i,e,{inline:!1});return this.parseHtml(t)}}class xde{constructor(e){this.eventComponents=[],this.options=Object.assign(kde,e),this.initI18n()}initI18n(){const e=this.options.i18n||{},t={en:{translation:{...wde,...e.en}},zh:{translation:{...vde,...e.zh}}};for(let r of Object.keys(e))r!="en"&&r!="zh"&&(t[r]={translation:{...e[r]}});Ke.init({lng:this.options.lang,resources:t},(r,i)=>{this.initInnerEditor()})}initInnerEditor(){const e=typeof this.options.element=="string"?document.querySelector(this.options.element):this.options.element;e.classList.add(`aie-theme-${this.options.theme}`),this.container=e.querySelector(".aie-container"),this.container||(this.container=document.createElement("div"),this.container.classList.add("aie-container")),e.appendChild(this.container);const t=document.createElement("div");t.style.flexGrow="1",t.style.overflow="auto",this.header=document.createElement("aie-header"),this.footer=document.createElement("aie-footer"),this.eventComponents.push(this.header),this.eventComponents.push(this.footer);let r=this.options.content;if(this.options.contentRetention&&this.options.contentRetentionKey){const i=localStorage.getItem(this.options.contentRetentionKey);i&&(r=JSON.parse(i))}this.innerEditor=new Ede(this.options,{element:t,content:r,extensions:yde(this,this.options),onCreate:i=>this.onCreate(i,t),onTransaction:i=>this.onTransaction(i),onDestroy:()=>this.onDestroy,editorProps:{attributes:{class:"aie-content"}}})}onCreate(e,t){this.innerEditor.view.dom.style.height="calc(100% - 20px)",this.eventComponents.forEach(o=>{o.onCreate&&o.onCreate(e,this.options)}),(this.container.querySelector(".aie-container-header")||this.container).appendChild(this.header),(this.container.querySelector(".aie-container-main")||this.container).appendChild(t),(this.container.querySelector(".aie-container-footer")||this.container).appendChild(this.footer)}onTransaction(e){if(this.eventComponents.forEach(t=>{t.onTransaction&&t.onTransaction(e)}),e.transaction.docChanged&&this.options.onChange&&this.options.onChange(this),e.transaction.docChanged&&this.options.contentRetention&&this.options.contentRetentionKey){const t=this.innerEditor.getHTML();t==="

"||t===""?localStorage.removeItem(this.options.contentRetentionKey):localStorage.setItem(this.options.contentRetentionKey,JSON.stringify(this.innerEditor.getJSON()))}}onDestroy(){console.log("AiEditor has destroyed!")}getHtml(){return this.innerEditor.getHTML()}getJson(){return this.innerEditor.getJSON()}getText(){return this.innerEditor.getText()}getSelectedText(){const e=this.innerEditor.state.selection;return e.empty?"":oc(this.innerEditor.state.doc,{from:e.from,to:e.to})}getMarkdown(){return this.innerEditor.storage.markdown.getMarkdown()}getOptions(){return this.options}getOutline(){const e=this.innerEditor.state.doc,t=[];return e.descendants((r,i)=>{if(r.type.name==="heading"){let s="";r.descendants(o=>{o.text&&(s+=o.text)}),t.push({text:s,level:r.attrs.level,pos:i,size:r.nodeSize})}}),t}focus(){return this.innerEditor.commands.focus(),this}focusPos(e){return this.innerEditor.commands.focus(e),this}focusStart(){return this.innerEditor.commands.focus("start"),this}focusEnd(){return this.innerEditor.commands.focus("end"),this}isFocused(){return this.innerEditor.isFocused}blur(){return this.innerEditor.commands.blur(),this}insert(e){return this.innerEditor.commands.insertContent(e),this}clear(){return this.innerEditor.commands.clearContent(!0),this}isEmpty(){return this.innerEditor.isEmpty}changeLang(e){return this.destroy(),this.options.lang=e,Ke.changeLanguage(e),this.initInnerEditor(),this}removeRetention(){return this.options.contentRetentionKey&&localStorage.removeItem(this.options.contentRetentionKey),this}destroy(){this.innerEditor.destroy(),this.container.remove(),this.eventComponents=[]}isDestroyed(){return this.innerEditor.isDestroyed}}const Cde={appId:"9e868ce4",apiKey:"a15d512f688abe35982932ce2f294121",apiSecret:"N2Y5OTgwMDM4ODJkNWUxZjgwZWE1MzFj",version:"v2.1"},Sde=` +`),n.renderContent(e),n.flushClose(1),n.write(":::"),n.closeBlock(e)},parse:{setup:n=>{this.options.classes.forEach(e=>{n.use(gde,e)})}}}}},addAttributes(){return{containerClass:{default:null,parseHTML:n=>[...n.classList].find(e=>this.options.classes.includes(e)),renderHTML:n=>({class:n.containerClass})}}},parseHTML(){return[{tag:"div",getAttrs:n=>{const e=n,t=["container-wrapper"].concat(this.options.classes);return[...e.classList].find(r=>t.includes(r))?null:!1}}]},renderHTML({HTMLAttributes:n}){return["div",fe(this.options.HTMLAttributes,n),0]},addCommands(){return{setContainer:n=>({commands:e})=>e.wrapIn(this.name,{containerClass:n}),toggleContainer:n=>({commands:e})=>e.toggleWrap(this.name,{containerClass:n}),unsetContainer:()=>({commands:n})=>n.lift(this.name)}},addInputRules(){return[ir({find:mde,type:this.type,getAttributes:n=>({containerClass:n[1]})})]}}),yde=(n,e)=>{var r,i,s,o,a,l,c,u,d,f,p,h,g,m,v,y,k,b,x,w;const t=e.cbName&&e.cbUrl?[Wd.configure({history:!1,codeBlock:!1})]:[Wd.configure({codeBlock:!1})];return t.push(oC,aC,lC,fC.configure({uploadUrl:(r=e.attachment)==null?void 0:r.uploadUrl,uploadHeaders:(i=e.attachment)==null?void 0:i.uploadHeaders,uploader:((s=e.attachment)==null?void 0:s.uploader)||e.uploader,uploaderEvent:(o=e.attachment)==null?void 0:o.uploaderEvent}),pC,$A,mC.configure({multicolor:!0}),bC,yC,vC,wC.configure({types:["heading","paragraph"]}),kC,CC.configure({allowBase64:!0,uploadUrl:(a=e.image)==null?void 0:a.uploadUrl,uploadHeaders:(l=e.image)==null?void 0:l.uploadHeaders,uploader:((c=e.image)==null?void 0:c.uploader)||e.uploader,uploaderEvent:(u=e.image)==null?void 0:u.uploaderEvent}),SS.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0}),_S,MS,AS,TS,XS.configure({openOnClick:!1,autolink:typeof((d=e.link)==null?void 0:d.autolink)>"u"?!0:(f=e.link)==null?void 0:f.autolink,HTMLAttributes:{ref:(p=e==null?void 0:e.link)==null?void 0:p.rel,class:(h=e==null?void 0:e.link)==null?void 0:h.class}}),QS,e_,t_,r_.configure({nested:!0}),a2.configure({lowlight:yA(EM),defaultLanguage:"auto",languageClassPrefix:"language-",codeExplainAi:((m=(g=e.ai)==null?void 0:g.codeBlock)==null?void 0:m.codeExplain)||{model:"xinghuo",prompt:"ๅธฎๆˆ‘ๅฏน่ฟ™ไธชไปฃ็ ่ฟ›่กŒ่งฃ้‡Š๏ผŒ่ฟ”ๅ›žไปฃ็ ็š„่งฃ้‡Šๅ†…ๅฎน๏ผŒๆณจๆ„๏ผŒไธ้œ€่ฆๅฏนไปฃ็ ็š„ๆณจ้‡Š่ฟ›่กŒ่งฃ้‡Š"},codeCommentsAi:((y=(v=e.ai)==null?void 0:v.codeBlock)==null?void 0:y.codeComments)||{model:"xinghuo",prompt:"ๅธฎๆˆ‘ๅฏน่ฟ™ไธชไปฃ็ ๆทปๅŠ ไธ€ไบ›ๆณจ้‡Š๏ผŒๅนถ่ฟ”ๅ›žๆทปๅŠ ๆณจ้‡Š็š„ไปฃ็ ๏ผŒๅช่ฟ”ๅ›žไปฃ็ "}}),kA.configure({uploadUrl:(k=e.video)==null?void 0:k.uploadUrl,uploadHeaders:(b=e.video)==null?void 0:b.uploadHeaders,uploader:((x=e.video)==null?void 0:x.uploader)||e.uploader,uploaderEvent:(w=e.video)==null?void 0:w.uploaderEvent}),EA,pde.configure({html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!0,breaks:!0,transformPastedText:!0,transformCopiedText:!1}),bde,...NA(n)),e.placeholder&&t.push(OA.configure({placeholder:e.placeholder})),t.push(PA.configure({suggestion:{items:S=>{var M;return((M=e.ai)==null?void 0:M.commands)||HA}}})),e.onMentionQuery&&t.push(BA(e.onMentionQuery)),t};const vde={default:"้ป˜่ฎค",delete:"ๅˆ ้™ค",confirm:"็กฎๅฎš",undo:"ๆ’ค้”€",redo:"้‡ๅš",brush:"ๆ ผๅผๅˆท",container:"้ซ˜ไบฎๅ—",eraser:"ๆธ…้™คๆ ผๅผ",heading:"ๆญฃๆ–‡/ๆ ‡้ข˜","font-family":"ๅญ—ไฝ“","font-size":"ๅญ—ๅท",bold:"ๅŠ ็ฒ—",italic:"ๆ–œไฝ“",underline:"ไธ‹ๅˆ’็บฟ",strike:"ๅˆ ้™ค็บฟ",link:"้“พๆŽฅ",code:"่กŒๅ†…ไปฃ็ ",subscript:"ไธ‹ๆ ‡",superscript:"ไธŠๆ ‡",hr:"ๅˆ†ๅ‰ฒ็บฟ",todo:"ไปปๅŠกๅˆ—่กจ",emoji:"่กจๆƒ…",highlight:"้ซ˜ไบฎ","font-color":"ๅญ—ไฝ“้ขœ่‰ฒ",align:"ๅฏน้ฝ","line-height":"่กŒ้ซ˜","bullet-list":"ๆ— ๅบๅˆ—่กจ","ordered-list":"ๆœ‰ๅบๅˆ—่กจ","indent-decrease":"ๅ‡ๅฐ‘็ผฉ่ฟ›","indent-increase":"ๅขžๅŠ ็ผฉ่ฟ›",break:"ๅผบๅˆถๆข่กŒ",image:"ๅ›พ็‰‡",video:"่ง†้ข‘",attachment:"้™„ไปถ",quote:"ๅผ•็”จ","code-block":"ไปฃ็ ๅ—",table:"่กจๆ ผ",printer:"ๆ‰“ๅฐ",fullscreen:"ๅ…จๅฑ",ai:"ไบบๅทฅๆ™บ่ƒฝ",paragraph:"ๆญฃๆ–‡",h1:"ๆ ‡้ข˜ 1",h2:"ๆ ‡้ข˜ 2",h3:"ๆ ‡้ข˜ 3",h4:"ๆ ‡้ข˜ 4",h5:"ๆ ‡้ข˜ 5",h6:"ๆ ‡้ข˜ 6",standardColors:"ๆ ‡ๅ‡†่‰ฒ",historyColors:"ๆœ€่ฟ‘ไฝฟ็”จ",insertTable:"ๆ’ๅ…ฅ่กจๆ ผ",row:"่กŒ",column:"ๅˆ—","align-left":"ๅฑ…ๅทฆๅฏน้ฝ","align-right":"ๅฑ…ๅณๅฏน้ฝ","align-center":"ๅฑ…ไธญๅฏน้ฝ","align-justify":"ไธค็ซฏๅฏน้ฝ","insert-column-left":"ๅทฆไพงๆ’ๅ…ฅๅˆ—","insert-column-right":"ๅณไพงๆ’ๅ…ฅๅˆ—","insert-row-top":"ไธŠๆ–นๆ’ๅ…ฅ่กŒ","insert-row-bottom":"ไธ‹ๆ–นๆ’ๅ…ฅ่กŒ","delete-column":"ๅˆ ้™คๅฝ“ๅ‰ๅˆ—","delete-row":"ๅˆ ้™คๅฝ“ๅ‰่กŒ","merge-cells-horizontal":"ๅˆๅนถๅ•ๅ…ƒๆ ผ","merge-cells-vertical":"ๅˆๅนถๅ•ๅ…ƒๆ ผ","split-cells-horizontal":"่งฃ้™คๅˆๅนถๅ•ๅ…ƒๆ ผ","split-cells-vertical":"่งฃ้™คๅˆๅนถๅ•ๅ…ƒๆ ผ","delete-table":"ไธŠไผ ่กจๆ ผ","edit-link":"็ผ–่พ‘้“พๆŽฅ",unlink:"ๅ–ๆถˆ้“พๆŽฅ","visit-link":"่ฎฟ้—ฎ้“พๆŽฅ","link-address":"้“พๆŽฅๅœฐๅ€","link-open-type":"ๆ‰“ๅผ€ๆ–นๅผ","link-open-blank":"ๆ–ฐ็ช—ๅฃ","default-font-size":"ๅญ—ๅท","default-font-family":"้ป˜่ฎคๅญ—ไฝ“"},wde={default:"Default",delete:"Delete",confirm:"Confirm",undo:"Undo",redo:"Redo",brush:"Format Painter",container:"Highlight container",eraser:"clear format",heading:"Paragraph/Heading","font-family":"Font Family","font-size":"Font Size",bold:"Bold",italic:"Italics",underline:"Underline",strike:"Strikethrough",link:"Link",code:"Inline code",subscript:"Subscript",superscript:"Superscript",hr:"Dividing line",todo:"Task list",emoji:"Emoji expression",highlight:"Highlight","font-color":"Font color",align:"Alignment","line-height":"Line height","bullet-list":"Unordered list","ordered-list":"Ordered list","indent-decrease":"Decrease indent","indent-increase":"Increase indent",break:"Force line break",image:"Image",video:"video",attachment:"Attachment",quote:"Quote","code-block":"Code block",table:"Table",printer:"Print",fullscreen:"Full screen",ai:"AI",paragraph:"Paragraph",h1:"H1",h2:"H2",h3:"H3",h4:"H4",h5:"H5",h6:"H6",standardColors:"Standard colors",historyColors:"Recently used colors",insertTable:"Insert Table",row:"Row",column:"Column","align-left":"Align left","align-right":"Align right","align-center":"Align center","align-justify":"Align justify","insert-column-left":"Insert column left","insert-column-right":"Insert column right","insert-row-top":"Insert row top","insert-row-bottom":"Insert row bottom","delete-column":"Delete column","delete-row":"Delete row","merge-cells-horizontal":"Merge cells","merge-cells-vertical":"Merge cells","split-cells-horizontal":"Split cells","split-cells-vertical":"Split cells","delete-table":"Delete table","edit-link":"Edit link",unlink:"Unlink","visit-link":"Visit link","link-address":"Link address","link-open-type":"Open type","link-open-blank":"Blank","default-font-size":"Size","default-font-family":"Default font"};window.customElements.define("aie-header",ax);window.customElements.define("aie-footer",lx);const kde={theme:"light",lang:"zh",contentRetentionKey:"ai-editor-content",placeholder:""};class Ede extends nw{constructor(e,t={}){super(t),this.userOptions=e}parseHtml(e){function t(i){return new window.DOMParser().parseFromString(`${i}`,"text/html").body}return An.fromSchema(this.schema).parse(t(e),{}).content}parseMarkdown(e){var r,i,s;const t=(s=(i=(r=this.storage.markdown)==null?void 0:r.parser)==null?void 0:i.parse)==null?void 0:s.call(i,e,{inline:!1});return this.parseHtml(t)}}class xde{constructor(e){this.eventComponents=[],this.options=Object.assign(kde,e),this.initI18n()}initI18n(){const e=this.options.i18n||{},t={en:{translation:{...wde,...e.en}},zh:{translation:{...vde,...e.zh}}};for(let r of Object.keys(e))r!="en"&&r!="zh"&&(t[r]={translation:{...e[r]}});Ke.init({lng:this.options.lang,resources:t},(r,i)=>{this.initInnerEditor()})}initInnerEditor(){const e=typeof this.options.element=="string"?document.querySelector(this.options.element):this.options.element;e.classList.add(`aie-theme-${this.options.theme}`),this.container=e.querySelector(".aie-container"),this.container||(this.container=document.createElement("div"),this.container.classList.add("aie-container")),e.appendChild(this.container);const t=document.createElement("div");t.style.flexGrow="1",t.style.overflow="auto",this.header=document.createElement("aie-header"),this.footer=document.createElement("aie-footer"),this.eventComponents.push(this.header),this.eventComponents.push(this.footer);let r=this.options.content;if(this.options.contentRetention&&this.options.contentRetentionKey){const i=localStorage.getItem(this.options.contentRetentionKey);i&&(r=JSON.parse(i))}this.innerEditor=new Ede(this.options,{element:t,content:r,extensions:yde(this,this.options),onCreate:i=>this.onCreate(i,t),onTransaction:i=>this.onTransaction(i),onDestroy:()=>this.onDestroy,editorProps:{attributes:{class:"aie-content"}}})}onCreate(e,t){this.innerEditor.view.dom.style.height="calc(100% - 20px)",this.eventComponents.forEach(o=>{o.onCreate&&o.onCreate(e,this.options)}),(this.container.querySelector(".aie-container-header")||this.container).appendChild(this.header),(this.container.querySelector(".aie-container-main")||this.container).appendChild(t),(this.container.querySelector(".aie-container-footer")||this.container).appendChild(this.footer),this.options.onCreated&&this.options.onCreated(this)}onTransaction(e){if(this.eventComponents.forEach(t=>{t.onTransaction&&t.onTransaction(e)}),e.transaction.docChanged&&this.options.onChange&&this.options.onChange(this),e.transaction.docChanged&&this.options.contentRetention&&this.options.contentRetentionKey){const t=this.innerEditor.getHTML();t==="

"||t===""?localStorage.removeItem(this.options.contentRetentionKey):localStorage.setItem(this.options.contentRetentionKey,JSON.stringify(this.innerEditor.getJSON()))}}onDestroy(){console.log("AiEditor has destroyed!")}getHtml(){return this.innerEditor.getHTML()}getJson(){return this.innerEditor.getJSON()}getText(){return this.innerEditor.getText()}getSelectedText(){const e=this.innerEditor.state.selection;return e.empty?"":oc(this.innerEditor.state.doc,{from:e.from,to:e.to})}getMarkdown(){return this.innerEditor.storage.markdown.getMarkdown()}getOptions(){return this.options}getOutline(){const e=this.innerEditor.state.doc,t=[];return e.descendants((r,i)=>{if(r.type.name==="heading"){let s="";r.descendants(o=>{o.text&&(s+=o.text)}),t.push({text:s,level:r.attrs.level,pos:i,size:r.nodeSize})}}),t}focus(){return this.innerEditor.commands.focus(),this}focusPos(e){return this.innerEditor.commands.focus(e),this}focusStart(){return this.innerEditor.commands.focus("start"),this}focusEnd(){return this.innerEditor.commands.focus("end"),this}isFocused(){return this.innerEditor.isFocused}blur(){return this.innerEditor.commands.blur(),this}insert(e){return this.innerEditor.commands.insertContent(e),this}clear(){return this.innerEditor.commands.clearContent(!0),this}isEmpty(){return this.innerEditor.isEmpty}changeLang(e){return this.destroy(),this.options.lang=e,Ke.changeLanguage(e),this.initInnerEditor(),this}removeRetention(){return this.options.contentRetentionKey&&localStorage.removeItem(this.options.contentRetentionKey),this}destroy(){this.innerEditor.destroy(),this.container.remove(),this.eventComponents=[]}isDestroyed(){return this.innerEditor.isDestroyed}}const Cde={appId:"9e868ce4",apiKey:"a15d512f688abe35982932ce2f294121",apiSecret:"N2Y5OTgwMDM4ODJkNWUxZjgwZWE1MzFj",version:"v2.1"},Sde=` {"type":"doc","content":[{"type":"heading","attrs":{"level":2},"content":[{"type":"text","text":"AiEditor ๆ˜ฏไธ€ไธช้ขๅ‘ AI ็š„ไธ‹ไธ€ไปฃๅฏŒๆ–‡ๆœฌ็ผ–่พ‘ๅ™จใ€‚"}]},{"type":"paragraph","attrs":{"lineHeight":"100%","textAlign":"left","indent":0},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"ๆ็คบ๏ผš"},{"type":"text","text":" "}]},{"type":"orderedList","attrs":{"tight":true,"start":1},"content":[{"type":"listItem","attrs":{"indent":0},"content":[{"type":"paragraph","attrs":{"lineHeight":"100%","textAlign":"left","indent":0},"content":[{"type":"text","text":"่พ“ๅ…ฅ ็ฉบๆ ผ + \\"/\\" ๅฏไปฅๅฟซ้€Ÿๅผนๅ‡บ AI ่œๅ• "}]}]},{"type":"listItem","attrs":{"indent":0},"content":[{"type":"paragraph","attrs":{"lineHeight":"100%","textAlign":"left","indent":0},"content":[{"type":"text","text":"่พ“ๅ…ฅ ็ฉบๆ ผ + \\"@\\" ๅฏไปฅๆๅŠๆŸไบบ"}]}]}]},{"type":"paragraph","attrs":{"lineHeight":"100%","textAlign":"left","indent":0}},{"type":"paragraph","attrs":{"lineHeight":"100%","textAlign":"left","indent":0},"content":[{"type":"text","text":"่ฏทไฝฟ็”จ Java ๅธฎๆˆ‘ๅ†™ไธ€ไธช hello world๏ผŒๅช้œ€่ฆ่ฟ”ๅ›ž java ไปฃ็ ๅ†…ๅฎน"}]},{"type":"codeBlock","attrs":{"language":"java"},"content":[{"type":"text","text":"public class HelloWorld {\\n public static void main(String[] args) {\\n System.out.println(\\"Hello, World!\\");\\n }\\n}"}]},{"type":"paragraph","attrs":{"lineHeight":"100%","textAlign":"left","indent":0}}]} `;window.aiEditor=new xde({element:"#aiEditor",placeholder:"็‚นๅ‡ป่พ“ๅ…ฅๅ†…ๅฎน...",contentRetention:!0,content:JSON.parse(Sde),ai:{model:{xinghuo:{...Cde}}},onMentionQuery:n=>["Michael Yang","Jean Zhou","Tom Cruise","Madonna","Jerry Hall","Joan Collins","Winona Ryder","Christina Applegate","Alyssa Milano","Molly Ringwald","Ally Sheedy","Debbie Harry","Olivia Newton-John","Elton John","Michael J. Fox","Axl Rose","Emilio Estevez","Ralph Macchio","Rob Lowe","Jennifer Grey","Mickey Rourke","John Cusack","Matthew Broderick","Justine Bateman","Lisa Bonet"].filter(e=>e.toLowerCase().startsWith(n.toLowerCase())).slice(0,5)}); diff --git a/demos/docs-ts/dist/index.html b/demos/docs-ts/dist/index.html index 426bf2c..05e7b0d 100644 --- a/demos/docs-ts/dist/index.html +++ b/demos/docs-ts/dist/index.html @@ -23,6 +23,8 @@ height: 100%; min-height: 100vh; padding: 1rem; + z-index: 99; + } .page-header { @@ -38,8 +40,56 @@ justify-content: center; padding: 10px 0; } + .aie-main{ + position: relative; + } + .aie-directory{ + position: absolute; + top:30px; + left:10px; + min-width: 260px; + max-width: 280px; + z-index: 0; + } + + .aie-directory h5{ + color:#000000e0; + font-size: 16px; + text-indent: 4px; + line-height: 32px; + } + .aie-directory a{ + height: 30px; + font-size: 14px; + color:#000000a3; + text-indent: 4px; + line-height: 30px; + text-decoration: none; + width: 100%; + display: inline-block; + margin:0; + padding:0; + white-space: nowrap; + overflow: hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + + } + .aie-directory a:hover{ + cursor: pointer; + background-color: #334d660f; + border-radius: 4px; + } + .aie-title1{ + font-size: 14px; + font-weight: 500; + } + .aie-title2,.aie-title3,.aie-title4,.aie-title5,.aie-title6{ + font-size: 12px; + } + - + @@ -60,8 +110,14 @@
-
-
+
+ + + + +
+
+
diff --git a/dist/index.cjs b/dist/index.cjs index 6ae3c6c..8de8b40 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -291,7 +291,7 @@ img.ProseMirror-separator {
- `;this.template=e,this.registerClickListener()}onClick(e){const t=this.closest(".aie-container").querySelector(".aie-content").innerHTML,i=Array.from(document.querySelectorAll("style, link")).map(l=>l.outerHTML).join("")+t,s=document.createElement("iframe");s.id="aie-print-iframe",s.setAttribute("style","position: absolute; width: 0; height: 0; top: -10px; left: -10px;"),document.body.appendChild(s);const o=s.contentWindow,a=s.contentDocument||s.contentWindow&&s.contentWindow.document;a&&(a.open(),a.write(i),a.close()),o&&(s.onload=function(){try{setTimeout(()=>{o.focus();try{o.document.execCommand("print",!1)||o.print()}catch{o.print()}o.close()},10)}catch(l){console.error(l)}setTimeout(function(){document.body.removeChild(s)},100)})}}const nx=["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜†","๐Ÿ˜…","๐Ÿคฃ","๐Ÿ˜‚","๐Ÿ™‚","๐Ÿ™ƒ","๐Ÿ˜‰","๐Ÿ˜Š","๐Ÿ˜‡","๐Ÿฅฐ","๐Ÿ˜","๐Ÿคฉ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜š","๐Ÿ˜™","๐Ÿฅฒ","๐Ÿ˜‹","๐Ÿ˜›","๐Ÿ˜œ","๐Ÿคช","๐Ÿ˜","๐Ÿค‘","๐Ÿค—","๐Ÿคญ","๐Ÿคซ","๐Ÿค”","๐Ÿค","๐Ÿคจ","๐Ÿ˜","๐Ÿ˜‘","๐Ÿ˜ถ","๐Ÿ˜ถโ€๐ŸŒซ","๐Ÿ˜","๐Ÿ˜’","๐Ÿ™„","๐Ÿ˜ฌ","๐Ÿ˜ฎโ€๐Ÿ’จ","๐Ÿคฅ","๐Ÿ˜Œ","๐Ÿ˜”","๐Ÿ˜ช","๐Ÿคค","๐Ÿ˜ด","๐Ÿ˜ท","๐Ÿค’","๐Ÿค•","๐Ÿคข","๐Ÿคฎ","๐Ÿคง","๐Ÿฅต","๐Ÿฅถ","๐Ÿฅด","๐Ÿ˜ต","๐Ÿ˜ตโ€๐Ÿ’ซ","๐Ÿคฏ","๐Ÿค ","๐Ÿฅณ","๐Ÿฅธ","๐Ÿ˜Ž","๐Ÿค“","๐Ÿง","๐Ÿ˜•","๐Ÿ˜Ÿ","๐Ÿ™","๐Ÿ˜ฎ","๐Ÿ˜ฒ","๐Ÿ˜ณ","๐Ÿฅบ","๐Ÿ˜ฆ","๐Ÿ˜ง","๐Ÿ˜จ","๐Ÿ˜ฐ","๐Ÿ˜ฅ","๐Ÿ˜ข","๐Ÿ˜ญ","๐Ÿ˜ฑ","๐Ÿ˜–","๐Ÿ˜ฃ","๐Ÿ˜ž","๐Ÿ˜“","๐Ÿ˜ฉ","๐Ÿ˜ซ","๐Ÿฅฑ","๐Ÿ˜ค","๐Ÿ˜ก","๐Ÿ˜ ","๐Ÿคฌ","๐Ÿ˜ˆ","๐Ÿ‘ฟ","๐Ÿ’€","โ˜ ๏ธ","๐Ÿ’ฉ","๐Ÿคก","๐Ÿ‘น","๐Ÿ‘บ","๐Ÿ‘ป","๐Ÿ‘ฝ","๐Ÿ‘พ","๐Ÿค–","๐Ÿ˜บ","๐Ÿ˜ธ","๐Ÿ˜น","๐Ÿ˜ป","๐Ÿ˜ผ","๐Ÿ˜ฝ","๐Ÿ™€","๐Ÿ˜ฟ","๐Ÿ˜พ","๐Ÿ™ˆ","๐Ÿ™‰","๐Ÿ™Š","๐Ÿ’Œ","๐Ÿ’˜","๐Ÿ’","๐Ÿ’–","๐Ÿ’—","๐Ÿ’“","๐Ÿ’ž","๐Ÿ’•","๐Ÿ’Ÿ","โฃ๏ธ","๐Ÿ’”","๐Ÿ’‹","๐Ÿ’ฏ","๐Ÿ’ข","๐Ÿ’ฅ","๐Ÿ’ซ","๐Ÿ’ฆ","๐Ÿ’จ","๐Ÿ’ค"];class rx extends me{constructor(){super();const e=` + `;this.template=e,this.registerClickListener()}onClick(e){let t=this.closest(".aie-container").querySelector(".aie-content").innerHTML;t=`
${t}
`;const i=Array.from(document.querySelectorAll("style, link")).map(l=>l.outerHTML).join("")+t,s=document.createElement("iframe");s.id="aie-print-iframe",s.setAttribute("style","position: absolute; width: 0; height: 0; top: -10px; left: -10px;"),document.body.appendChild(s);const o=s.contentWindow,a=s.contentDocument||s.contentWindow&&s.contentWindow.document;a&&(a.open(),a.write(i),a.close()),o&&(s.onload=function(){try{setTimeout(()=>{o.focus();try{o.document.execCommand("print",!1)||o.print()}catch{o.print()}o.close()},10)}catch(l){console.error(l)}setTimeout(function(){document.body.removeChild(s)},100)})}}const nx=["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜†","๐Ÿ˜…","๐Ÿคฃ","๐Ÿ˜‚","๐Ÿ™‚","๐Ÿ™ƒ","๐Ÿ˜‰","๐Ÿ˜Š","๐Ÿ˜‡","๐Ÿฅฐ","๐Ÿ˜","๐Ÿคฉ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜š","๐Ÿ˜™","๐Ÿฅฒ","๐Ÿ˜‹","๐Ÿ˜›","๐Ÿ˜œ","๐Ÿคช","๐Ÿ˜","๐Ÿค‘","๐Ÿค—","๐Ÿคญ","๐Ÿคซ","๐Ÿค”","๐Ÿค","๐Ÿคจ","๐Ÿ˜","๐Ÿ˜‘","๐Ÿ˜ถ","๐Ÿ˜ถโ€๐ŸŒซ","๐Ÿ˜","๐Ÿ˜’","๐Ÿ™„","๐Ÿ˜ฌ","๐Ÿ˜ฎโ€๐Ÿ’จ","๐Ÿคฅ","๐Ÿ˜Œ","๐Ÿ˜”","๐Ÿ˜ช","๐Ÿคค","๐Ÿ˜ด","๐Ÿ˜ท","๐Ÿค’","๐Ÿค•","๐Ÿคข","๐Ÿคฎ","๐Ÿคง","๐Ÿฅต","๐Ÿฅถ","๐Ÿฅด","๐Ÿ˜ต","๐Ÿ˜ตโ€๐Ÿ’ซ","๐Ÿคฏ","๐Ÿค ","๐Ÿฅณ","๐Ÿฅธ","๐Ÿ˜Ž","๐Ÿค“","๐Ÿง","๐Ÿ˜•","๐Ÿ˜Ÿ","๐Ÿ™","๐Ÿ˜ฎ","๐Ÿ˜ฒ","๐Ÿ˜ณ","๐Ÿฅบ","๐Ÿ˜ฆ","๐Ÿ˜ง","๐Ÿ˜จ","๐Ÿ˜ฐ","๐Ÿ˜ฅ","๐Ÿ˜ข","๐Ÿ˜ญ","๐Ÿ˜ฑ","๐Ÿ˜–","๐Ÿ˜ฃ","๐Ÿ˜ž","๐Ÿ˜“","๐Ÿ˜ฉ","๐Ÿ˜ซ","๐Ÿฅฑ","๐Ÿ˜ค","๐Ÿ˜ก","๐Ÿ˜ ","๐Ÿคฌ","๐Ÿ˜ˆ","๐Ÿ‘ฟ","๐Ÿ’€","โ˜ ๏ธ","๐Ÿ’ฉ","๐Ÿคก","๐Ÿ‘น","๐Ÿ‘บ","๐Ÿ‘ป","๐Ÿ‘ฝ","๐Ÿ‘พ","๐Ÿค–","๐Ÿ˜บ","๐Ÿ˜ธ","๐Ÿ˜น","๐Ÿ˜ป","๐Ÿ˜ผ","๐Ÿ˜ฝ","๐Ÿ™€","๐Ÿ˜ฟ","๐Ÿ˜พ","๐Ÿ™ˆ","๐Ÿ™‰","๐Ÿ™Š","๐Ÿ’Œ","๐Ÿ’˜","๐Ÿ’","๐Ÿ’–","๐Ÿ’—","๐Ÿ’“","๐Ÿ’ž","๐Ÿ’•","๐Ÿ’Ÿ","โฃ๏ธ","๐Ÿ’”","๐Ÿ’‹","๐Ÿ’ฏ","๐Ÿ’ข","๐Ÿ’ฅ","๐Ÿ’ซ","๐Ÿ’ฆ","๐Ÿ’จ","๐Ÿ’ค"];class rx extends me{constructor(){super();const e=`
@@ -339,7 +339,7 @@ ${t}`)}createUrl(){const e=new Date().toUTCString().replace("GMT","+0000");let t `,Be.widget(n.pos,e,{id:n.id})},SC=n=>{const e=document.createElement("div");return e.classList.add("aie-loader-placeholder"),e.style.height="20px",e.style.display="inline-block",e.innerHTML=` ${n.text} - `,Be.widget(n.pos,e,{id:n.id})},_C=(n,e,t,r)=>{const i=new FormData;return i.append(r,n),new Promise((s,o)=>{fetch(e,{method:"post",headers:{Accept:"application/json",...t},body:i}).then(a=>a.json()).then(a=>{s(a)}).catch(a=>{o(a)})})},MC=(n,e,t,r)=>{let i=new FileReader;return new Promise((s,o)=>{i.onload=()=>s({errorCode:0,data:{src:i.result,href:n.name}}),i.onerror=()=>o(i.error),setTimeout(()=>i.readAsDataURL(n),5e3*Math.random())})},Nc=n=>n?_C:MC,Qd=new Me("aie-attachment-plugin"),oi="attachment_action",AC=Ee.create({name:"attachment",addOptions(){return{uploadUrl:"",uploadHeaders:{},HTMLAttributes:{}}},addCommands(){return{uploadAttachment:n=>()=>{const e=$o(),{state:{tr:t},view:r,schema:i}=this.editor;return t.selection.empty||t.deleteSelection(),r.dispatch(t.setMeta(oi,{type:"add",id:e,pos:t.selection.from,text:n.name})),(this.options.uploader||Nc(this.options.uploadUrl))(n,this.options.uploadUrl,this.options.uploadHeaders,"attachment").then(o=>{if(this.options.dataProcessor&&(o=this.options.dataProcessor(o)),o.errorCode===0&&o.data&&o.data.href){let l=Qd.getState(this.editor.state).find(void 0,void 0,u=>u.id==e);const c=o.data.fileName||n.name;r.dispatch(r.state.tr.insertText(` ${c} `,l[0].from).addMark(l[0].from+1,c.length+l[0].from+1,i.marks.link.create({href:o.data.href,target:"_blank"})).setMeta(oi,{type:"remove",id:e}))}else r.dispatch(t.setMeta(oi,{type:"remove",id:e}))}).catch(()=>{const{state:{tr:o},view:a}=this.editor;a.dispatch(o.setMeta(oi,{type:"remove",id:e}))}),!0}}},addProseMirrorPlugins(){const n=this.editor;return[new Se({key:Qd,state:{init:()=>ke.empty,apply:(e,t)=>{const r=e.getMeta(oi);return t=t.map(e.mapping,e.doc),r&&r.type==="add"?t=t.add(e.doc,[SC(r)]):r&&r.type==="remove"&&(t=t.remove(t.find(void 0,void 0,i=>i.id==r.id))),t}},props:{decorations(e){return this.getState(e)},handleDOMEvents:{drop(e,t){if(!(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length))return!1;const i=Array.from(t.dataTransfer.files).filter(s=>!/video/i.test(s.type)&&!/image/i.test(s.type));return t.preventDefault(),i.forEach(s=>{n.commands.uploadAttachment(s)}),!0}}}})]}}),TC=Ee.create({name:"painter",addCommands(){return{setPainter:n=>({view:{dispatch:e,state:{tr:t},dom:r}})=>(r.style.cursor="context-menu",e(t.setMeta("painterAction",{type:"start",marks:n})),!0)}},addProseMirrorPlugins(){return[new Se({key:new Me("aie-painter"),state:{init:()=>[],apply:(n,e)=>{const t=n.getMeta("painterAction");return t&&t.type==="start"?e=t.marks:t&&t.type==="end"&&(e=[]),e}},props:{handleDOMEvents:{mousedown(n,e){const t=this.getState(n.state);if(!t||t.length==0)return!1;const r=()=>{document.removeEventListener("mouseup",r);let{dispatch:i,state:{tr:s,selection:o},dom:a}=n;a.style.cursor="",s=s.removeMark(o.from,o.to);for(let l of t)l.type.name!="link"&&(s=s.addMark(o.from,o.to,l));i(s.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",r),!0}}}})]}}),NC=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,OC=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,LC=Re.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:n}){return["mark",pe(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[sr({find:NC,type:this.type})]},addPasteRules(){return[Ln({find:OC,type:this.type})]}}),RC=Ee.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:n=>{var e;return(e=n.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.color?{style:`color: ${n.color}`}:{}}}}]},addCommands(){return{setColor:n=>({chain:e})=>e().setMark("textStyle",{color:n}).run(),unsetColor:()=>({chain:n})=>n().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),DC=Ee.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:n=>{var e;return(e=n.style.fontSize)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.fontSize?{style:`font-size: ${n.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:n=>({chain:e})=>e().setMark("textStyle",{fontSize:n}).run(),unsetFontSize:()=>({chain:n})=>n().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),IC=Ee.create({name:"lineHeight",addOptions(){return{types:["heading","paragraph"],heights:["100%","125%","150%","200%","250%","300%"],defaultHeight:"100%"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:this.options.defaultHeight,parseHTML:n=>n.style.lineHeight||this.options.defaultHeight,renderHTML:n=>n.lineHeight===this.options.defaultHeight?{}:{style:`line-height: ${n.lineHeight}`}}}}]},addCommands(){return{setLineHeight:n=>({commands:e})=>this.options.heights.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{lineHeight:n})):!1,unsetLineHeight:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"lineHeight"))}}}),BC=Ee.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),HC=Ee.create({name:"indent",addOptions(){return{types:["listItem","paragraph"],minLevel:0,maxLevel:8}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:n=>{const e=Number(n.getAttribute("data-indent"));return e&&e>this.options.minLevel?e:null},renderHTML:n=>n.indent?{style:`text-indent: ${(n==null?void 0:n.indent)*10}px`,"data-indent":n==null?void 0:n.indent}:{}}}}]},addCommands(){const n=(r,i,s)=>{var a;const o=(a=r==null?void 0:r.doc)==null?void 0:a.nodeAt(i);if(o){const l=(o.attrs.indent||0)+s,{minLevel:c,maxLevel:u}=this.options,d=lu?u:l;if(d!==o.attrs.indent){const{indent:f,...p}=o.attrs,h=d>c?{...p,indent:d}:p;return r.setNodeMarkup(i,o.type,h,o.marks)}}return r},e=(r,i)=>{const{doc:s,selection:o}=r;if(s&&o&&(o instanceof X||o instanceof Ct)){const{from:a,to:l}=o;s.nodesBetween(a,l,(c,u)=>this.options.types.includes(c.type.name)?(r=n(r,u,i),!1):!0)}return r},t=r=>()=>({tr:i,state:s,dispatch:o})=>{const{selection:a}=s;return i=i.setSelection(a),i=e(i,r),i.docChanged?(o==null||o(i),!0):!1};return{indent:t(1),outdent:t(-1)}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}}),PC=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,$C=le.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",pe(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[vc({find:PC,type:this.type,getAttributes:n=>{const[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),Ug=(n,e,t)=>{const r=n.querySelector(".resize-obj"),i=10;let s,o,a,l;const c=f=>{f.preventDefault(),e.addEventListener("mousemove",u),e.addEventListener("mouseup",d),e.addEventListener("mouseleave",d),s=f.clientX,o=Number(r.getAttribute("data-with"))||r.clientWidth,a=f.target.getAttribute("data-position"),l=e.clientWidth-100},u=f=>{const p=f.clientX-s;if(p==0)return;const h=a==="right"?p>0:p<0;let g=o+Math.abs(p)*(h?1:-1);g>=l&&(g=l),g{e.removeEventListener("mousemove",u),e.removeEventListener("mouseup",d),e.removeEventListener("mouseleave",d);const f={width:Number(r.getAttribute("data-width"))};t(f)};for(let f of n.querySelector(".aie-resize").children)f.addEventListener("mousedown",c)},ef=new Me("aie-image-plugin"),ai="image_action",FC=$C.extend({name:"image",draggable:!0,selectable:!0,addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),uploadUrl:"",uploadHeaders:{},uploader:void 0}},allowGapCursor(){return!this.options.inline},addAttributes(){return{src:{default:"",parseHTML:n=>`${n.getAttribute("src")??""}`},alt:{default:""},title:{default:""},width:{default:350},height:{default:"auto"},align:{default:"left"}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",pe(this.options.HTMLAttributes,n)]},addCommands(){var n;return{...(n=this.parent)==null?void 0:n.call(this),uploadImage:e=>()=>{const t=$o(),{state:{tr:r},view:i,schema:s}=this.editor;return r.selection.empty||r.deleteSelection(),i.dispatch(r.setMeta(ai,{type:"add",id:t,pos:r.selection.from})),(this.options.uploader||Nc(this.options.uploadUrl))(e,this.options.uploadUrl,this.options.uploadHeaders,"image").then(a=>{if(this.options.dataProcessor&&(a=this.options.dataProcessor(a)),a.errorCode===0&&a.data&&a.data.src){let c=ef.getState(this.editor.state).find(void 0,void 0,u=>u.id==t);i.dispatch(i.state.tr.insert(c[0].from,s.nodes.image.create({src:a.data.src,alt:a.data.alt})).setMeta(ai,{type:"remove",id:t}))}else i.dispatch(r.setMeta(ai,{type:"remove",id:t}))}).catch(()=>{i.dispatch(r.setMeta(ai,{type:"remove",id:t}))}),!0}}},addNodeView(){return n=>{const e=document.createElement("div"),{src:t,width:r,height:i,align:s}=n.node.attrs;return e.classList.add(`align-${s}`),e.innerHTML=` + `,Be.widget(n.pos,e,{id:n.id})},_C=(n,e,t,r)=>{const i=new FormData;return i.append(r,n),new Promise((s,o)=>{fetch(e,{method:"post",headers:{Accept:"application/json",...t},body:i}).then(a=>a.json()).then(a=>{s(a)}).catch(a=>{o(a)})})},MC=(n,e,t,r)=>{let i=new FileReader;return new Promise((s,o)=>{i.onload=()=>s({errorCode:0,data:{src:i.result,href:n.name}}),i.onerror=()=>o(i.error),setTimeout(()=>i.readAsDataURL(n),5e3*Math.random())})},Nc=n=>n?_C:MC,Qd=new Me("aie-attachment-plugin"),oi="attachment_action",AC=Ee.create({name:"attachment",addOptions(){return{uploadUrl:"",uploadHeaders:{},HTMLAttributes:{}}},addCommands(){return{uploadAttachment:n=>()=>{const e=$o(),{state:{tr:t},view:r,schema:i}=this.editor;return t.selection.empty||t.deleteSelection(),r.dispatch(t.setMeta(oi,{type:"add",id:e,pos:t.selection.from,text:n.name})),this.options.uploaderEvent&&this.options.uploaderEvent.onBeforeUpload&&this.options.uploaderEvent.onBeforeUpload(n,this.options.uploadUrl,this.options.uploadHeaders),(this.options.uploader||Nc(this.options.uploadUrl))(n,this.options.uploadUrl,this.options.uploadHeaders,"attachment").then(o=>{if(this.options.uploaderEvent&&this.options.uploaderEvent.onSuccess){const a=this.options.uploaderEvent.onSuccess(n,o);if(typeof a=="boolean"&&!a)return;typeof a=="object"&&(o=a)}if(o.errorCode===0&&o.data&&o.data.href){let l=Qd.getState(this.editor.state).find(void 0,void 0,u=>u.id==e);const c=o.data.fileName||n.name;r.dispatch(r.state.tr.insertText(` ${c} `,l[0].from).addMark(l[0].from+1,c.length+l[0].from+1,i.marks.link.create({href:o.data.href,target:"_blank"})).setMeta(oi,{type:"remove",id:e}))}else r.dispatch(t.setMeta(oi,{type:"remove",id:e})),this.options.uploaderEvent&&this.options.uploaderEvent.onFailed&&this.options.uploaderEvent.onFailed(n,o)}).catch(o=>{const{state:{tr:a},view:l}=this.editor;l.dispatch(a.setMeta(oi,{type:"remove",id:e})),this.options.uploaderEvent&&this.options.uploaderEvent.onError&&this.options.uploaderEvent.onError(n,o)}),!0}}},addProseMirrorPlugins(){const n=this.editor;return[new Se({key:Qd,state:{init:()=>ke.empty,apply:(e,t)=>{const r=e.getMeta(oi);return t=t.map(e.mapping,e.doc),r&&r.type==="add"?t=t.add(e.doc,[SC(r)]):r&&r.type==="remove"&&(t=t.remove(t.find(void 0,void 0,i=>i.id==r.id))),t}},props:{decorations(e){return this.getState(e)},handleDOMEvents:{drop(e,t){if(!(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length))return!1;const i=Array.from(t.dataTransfer.files).filter(s=>!/video/i.test(s.type)&&!/image/i.test(s.type));return t.preventDefault(),i.forEach(s=>{n.commands.uploadAttachment(s)}),!0}}}})]}}),TC=Ee.create({name:"painter",addCommands(){return{setPainter:n=>({view:{dispatch:e,state:{tr:t},dom:r}})=>(r.style.cursor="context-menu",e(t.setMeta("painterAction",{type:"start",marks:n})),!0)}},addProseMirrorPlugins(){return[new Se({key:new Me("aie-painter"),state:{init:()=>[],apply:(n,e)=>{const t=n.getMeta("painterAction");return t&&t.type==="start"?e=t.marks:t&&t.type==="end"&&(e=[]),e}},props:{handleDOMEvents:{mousedown(n,e){const t=this.getState(n.state);if(!t||t.length==0)return!1;const r=()=>{document.removeEventListener("mouseup",r);let{dispatch:i,state:{tr:s,selection:o},dom:a}=n;a.style.cursor="",s=s.removeMark(o.from,o.to);for(let l of t)l.type.name!="link"&&(s=s.addMark(o.from,o.to,l));i(s.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",r),!0}}}})]}}),NC=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,OC=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,LC=Re.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:n}){return["mark",pe(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[sr({find:NC,type:this.type})]},addPasteRules(){return[Ln({find:OC,type:this.type})]}}),RC=Ee.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:n=>{var e;return(e=n.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.color?{style:`color: ${n.color}`}:{}}}}]},addCommands(){return{setColor:n=>({chain:e})=>e().setMark("textStyle",{color:n}).run(),unsetColor:()=>({chain:n})=>n().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),DC=Ee.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:n=>{var e;return(e=n.style.fontSize)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.fontSize?{style:`font-size: ${n.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:n=>({chain:e})=>e().setMark("textStyle",{fontSize:n}).run(),unsetFontSize:()=>({chain:n})=>n().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),IC=Ee.create({name:"lineHeight",addOptions(){return{types:["heading","paragraph"],heights:["100%","125%","150%","200%","250%","300%"],defaultHeight:"100%"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:this.options.defaultHeight,parseHTML:n=>n.style.lineHeight||this.options.defaultHeight,renderHTML:n=>n.lineHeight===this.options.defaultHeight?{}:{style:`line-height: ${n.lineHeight}`}}}}]},addCommands(){return{setLineHeight:n=>({commands:e})=>this.options.heights.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{lineHeight:n})):!1,unsetLineHeight:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"lineHeight"))}}}),BC=Ee.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),HC=Ee.create({name:"indent",addOptions(){return{types:["listItem","paragraph"],minLevel:0,maxLevel:8}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:n=>{const e=Number(n.getAttribute("data-indent"));return e&&e>this.options.minLevel?e:null},renderHTML:n=>n.indent?{style:`text-indent: ${(n==null?void 0:n.indent)*10}px`,"data-indent":n==null?void 0:n.indent}:{}}}}]},addCommands(){const n=(r,i,s)=>{var a;const o=(a=r==null?void 0:r.doc)==null?void 0:a.nodeAt(i);if(o){const l=(o.attrs.indent||0)+s,{minLevel:c,maxLevel:u}=this.options,d=lu?u:l;if(d!==o.attrs.indent){const{indent:f,...p}=o.attrs,h=d>c?{...p,indent:d}:p;return r.setNodeMarkup(i,o.type,h,o.marks)}}return r},e=(r,i)=>{const{doc:s,selection:o}=r;if(s&&o&&(o instanceof X||o instanceof Ct)){const{from:a,to:l}=o;s.nodesBetween(a,l,(c,u)=>this.options.types.includes(c.type.name)?(r=n(r,u,i),!1):!0)}return r},t=r=>()=>({tr:i,state:s,dispatch:o})=>{const{selection:a}=s;return i=i.setSelection(a),i=e(i,r),i.docChanged?(o==null||o(i),!0):!1};return{indent:t(1),outdent:t(-1)}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}}),PC=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,$C=le.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",pe(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[vc({find:PC,type:this.type,getAttributes:n=>{const[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),Ug=(n,e,t)=>{const r=n.querySelector(".resize-obj"),i=10;let s,o,a,l;const c=f=>{f.preventDefault(),e.addEventListener("mousemove",u),e.addEventListener("mouseup",d),e.addEventListener("mouseleave",d),s=f.clientX,o=Number(r.getAttribute("data-with"))||r.clientWidth,a=f.target.getAttribute("data-position"),l=e.clientWidth-100},u=f=>{const p=f.clientX-s;if(p==0)return;const h=a==="right"?p>0:p<0;let g=o+Math.abs(p)*(h?1:-1);g>=l&&(g=l),g{e.removeEventListener("mousemove",u),e.removeEventListener("mouseup",d),e.removeEventListener("mouseleave",d);const f={width:Number(r.getAttribute("data-width"))};t(f)};for(let f of n.querySelector(".aie-resize").children)f.addEventListener("mousedown",c)},ef=new Me("aie-image-plugin"),ai="image_action",FC=$C.extend({name:"image",draggable:!0,selectable:!0,addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),uploadUrl:"",uploadHeaders:{},uploader:void 0}},allowGapCursor(){return!this.options.inline},addAttributes(){return{src:{default:"",parseHTML:n=>`${n.getAttribute("src")??""}`},alt:{default:""},title:{default:""},width:{default:350},height:{default:"auto"},align:{default:"left"}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",pe(this.options.HTMLAttributes,n)]},addCommands(){var n;return{...(n=this.parent)==null?void 0:n.call(this),uploadImage:e=>()=>{const t=$o(),{state:{tr:r},view:i,schema:s}=this.editor;return r.selection.empty||r.deleteSelection(),i.dispatch(r.setMeta(ai,{type:"add",id:t,pos:r.selection.from})),this.options.uploaderEvent&&this.options.uploaderEvent.onBeforeUpload&&this.options.uploaderEvent.onBeforeUpload(e,this.options.uploadUrl,this.options.uploadHeaders),(this.options.uploader||Nc(this.options.uploadUrl))(e,this.options.uploadUrl,this.options.uploadHeaders,"image").then(a=>{if(this.options.uploaderEvent&&this.options.uploaderEvent.onSuccess){const l=this.options.uploaderEvent.onSuccess(e,a);if(typeof l=="boolean"&&!l)return;typeof l=="object"&&(a=l)}if(a.errorCode===0&&a.data&&a.data.src){let c=ef.getState(this.editor.state).find(void 0,void 0,u=>u.id==t);i.dispatch(i.state.tr.insert(c[0].from,s.nodes.image.create({src:a.data.src,alt:a.data.alt})).setMeta(ai,{type:"remove",id:t}))}else i.dispatch(r.setMeta(ai,{type:"remove",id:t})),this.options.uploaderEvent&&this.options.uploaderEvent.onFailed&&this.options.uploaderEvent.onFailed(e,a)}).catch(a=>{const{state:{tr:l},view:c}=this.editor;c.dispatch(l.setMeta(ai,{type:"remove",id:t})),this.options.uploaderEvent&&this.options.uploaderEvent.onError&&this.options.uploaderEvent.onError(e,a)}),!0}}},addNodeView(){return n=>{const e=document.createElement("div"),{src:t,width:r,height:i,align:s}=n.node.attrs;return e.classList.add(`align-${s}`),e.innerHTML=`
@@ -369,7 +369,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),P=C,D=E),_===void 0&&( ${this.options.languages.map(l=>`
${l.name}
`).join("")}`,a.addEventListener("click",l=>{const c=l.target.closest(".aie-codeblock-langs-item");if(c){const u=c.getAttribute("data-item");n.editor.chain().setCodeBlock({language:u}).run()}}),a},i=Je(e.querySelector(".aie-codeblock-tools-lang"),{content:r(),appendTo:n.editor.options.element,placement:"bottom-end",trigger:"click",interactive:!0,arrow:!1,aria:{content:null,expanded:!1}});return(s=e.querySelector(".aie-codeblock-tools-comments"))==null||s.addEventListener("click",a=>{const l=n.editor.view.posAtCoords({left:a.clientX,top:a.clientY}),c=n.editor.state.doc.resolve(l.pos).parent;n.editor.chain().addCodeComments(c,l.pos)}),(o=e.querySelector(".aie-codeblock-tools-explain"))==null||o.addEventListener("click",a=>{const l=n.editor.view.posAtCoords({left:a.clientX,top:a.clientY}),c=n.editor.state.doc.resolve(l.pos).parent;n.editor.chain().addCodeExplain(c,l.pos)}),{dom:e,contentDOM:e.querySelector("code"),destroy:()=>{i.destroy()}}}}});function C2(n){const e=n.regex,t=n.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="<[^<>]+>",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional(s)+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[n.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},n.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},n.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},t,n.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+n.IDENT_RE,relevance:0},p=e.optional(i)+n.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],b={type:g,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},x={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,n.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},w=[x,d,a,t,n.C_BLOCK_COMMENT_MODE,u,c],S={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:w.concat([{begin:/\(/,end:/\)/,keywords:b,contains:w.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[t,n.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",t,n.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,t,n.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:b,illegal:"",keywords:b,contains:["self",a]},{begin:n.IDENT_RE+"::",keywords:b},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function S2(n){const e={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},t=C2(n),r=t.keywords;return r.type=[...r.type,...e.type],r.literal=[...r.literal,...e.literal],r.built_in=[...r.built_in,...e.built_in],r._hints=e._hints,t.name="Arduino",t.aliases=["ino"],t.supersetOf="cpp",t}function _2(n){const e=n.regex,t={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{begin:e.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[n.BACKSLASH_ESCAPE]},s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,t,i]};i.contains.push(o);const a={match:/\\"/},l={className:"string",begin:/'/,end:/'/},c={match:/\\'/},u={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},n.NUMBER_MODE,t]},d=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=n.SHEBANG({binary:`(${d.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[n.inherit(n.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},h=["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],g=["true","false"],m={match:/(\/[a-z._-]+)+/},v=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias"],k=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],b=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:h,literal:g,built_in:[...v,...y,"set","shopt",...k,...b]},contains:[f,n.SHEBANG(),p,u,n.HASH_COMMENT_MODE,s,m,o,a,l,c,t]}}function M2(n){const e=n.regex,t=n.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="<[^<>]+>",o="("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional(s)+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[n.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},n.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},n.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},t,n.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+n.IDENT_RE,relevance:0},p=e.optional(i)+n.IDENT_RE+"\\s*\\(",m={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},v=[d,a,t,n.C_BLOCK_COMMENT_MODE,u,c],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:v.concat([{begin:/\(/,end:/\)/,keywords:m,contains:v.concat(["self"]),relevance:0}]),relevance:0},k={begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:m,relevance:0},{begin:p,returnBegin:!0,contains:[n.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[t,n.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",t,n.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,t,n.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:m,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},n.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:m}}}function A2(n){const e=n.regex,t=n.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="<[^<>]+>",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional(s)+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[n.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},n.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},n.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},t,n.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+n.IDENT_RE,relevance:0},p=e.optional(i)+n.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],b={type:g,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},x={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,n.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},w=[x,d,a,t,n.C_BLOCK_COMMENT_MODE,u,c],S={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:w.concat([{begin:/\(/,end:/\)/,keywords:b,contains:w.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[t,n.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",t,n.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,t,n.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:b,illegal:"",keywords:b,contains:["self",a]},{begin:n.IDENT_RE+"::",keywords:b},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function T2(n){const e=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],t=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:e,literal:r},a=n.inherit(n.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},u=n.inherit(c,{illegal:/\n/}),d={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=n.inherit(d,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},n.BACKSLASH_ESCAPE,f]},h={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},d]},g=n.inherit(h,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});d.contains=[h,p,c,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,l,n.C_BLOCK_COMMENT_MODE],f.contains=[g,p,u,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,l,n.inherit(n.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const m={variants:[h,p,c,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},v={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},y=n.IDENT_RE+"(<"+n.IDENT_RE+"(\\s*,\\s*"+n.IDENT_RE+")*>)?(\\[\\])?",k={begin:"@"+n.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[n.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},m,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,v,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,v,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+y+"\\s+)+"+n.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:t.join(" "),relevance:0},{begin:n.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[n.TITLE_MODE,v],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[m,l,n.C_BLOCK_COMMENT_MODE]},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},k]}}const N2=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),O2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],L2=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],R2=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],D2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],I2=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function B2(n){const e=n.regex,t=N2(n),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,r,t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+R2.join("|")+")"},{begin:":(:)?("+D2.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+I2.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:L2.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+O2.join("|")+")\\b"}]}}function H2(n){const e=n.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:e.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:e.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function P2(n){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"ym(n,e,t-1))}function z2(n){const e=n.regex,t="[ร€-สธa-zA-Z_$][ร€-สธa-zA-Z_$0-9]*",r=t+ym("(?:<"+t+"~~~(?:\\s*,\\s*"+t+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+t,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[n.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[n.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[n.BACKSLASH_ESCAPE]},n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,t],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[e.concat(/(?!else)/,t),/\s+/,t,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,t],className:{1:"keyword",3:"title.class"},contains:[u,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",n.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,Pf,n.C_BLOCK_COMMENT_MODE]},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},Pf,c]}}const $f="[A-Za-z$_][0-9A-Za-z$_]*",V2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],q2=["true","false","null","undefined","NaN","Infinity"],vm=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],wm=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],km=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],U2=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],K2=[].concat(km,vm,wm);function W2(n){const e=n.regex,t=(_,{after:D})=>{const P="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(_,D)=>{const P=_[0].length+_.index,W=_.input[P];if(W==="<"||W===","){D.ignoreMatch();return}W===">"&&(t(_,{after:P})||D.ignoreMatch());let ee;const he=_.input.substring(P);if(ee=he.match(/^\s*=/)){D.ignoreMatch();return}if((ee=he.match(/^\s+extends\s+/))&&ee.index===0){D.ignoreMatch();return}}},a={$pattern:$f,keyword:V2,literal:q2,built_in:K2,"variable.language":U2},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"css"}},g={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},k=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,p,h,g,m,{match:/\$\d+/},d];f.contains=k.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(k)});const b=[].concat(y,f.contains),x=b.concat([{begin:/\(/,end:/\)/,keywords:a,contains:["self"].concat(b)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,e.concat(r,"(",e.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...vm,...wm]}},M={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(_){return e.concat("(?!",_.join("|"),")")}const q={match:e.concat(/\b/,G([...km,"super","import"]),r,e.lookahead(/\(/)),className:"title.function",relevance:0},A={begin:e.concat(/\./,e.lookahead(e.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},C="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",E={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),M,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,p,h,g,m,y,{match:/\$\d+/},d,T,{className:"attr",begin:r+e.lookahead(":"),relevance:0},E,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,n.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,n.inherit(n.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},q,z,S,H,{match:/\$[(.]/}]}}function G2(n){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},t={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",keywords:{literal:r},contains:[e,t,n.QUOTE_STRING_MODE,i,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Ar="[0-9](_*[0-9])*",ws=`\\.(${Ar})`,ks="[0-9a-fA-F](_*[0-9a-fA-F])*",Z2={className:"number",variants:[{begin:`(\\b(${Ar})((${ws})|\\.)?|(${ws}))[eE][+-]?(${Ar})[fFdD]?\\b`},{begin:`\\b(${Ar})((${ws})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ws})[fFdD]?\\b`},{begin:`\\b(${Ar})[fFdD]\\b`},{begin:`\\b0[xX]((${ks})\\.?|(${ks})?\\.(${ks}))[pP][+-]?(${Ar})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ks})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function j2(n){const e={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},t={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[n.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+n.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[n.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[n.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+n.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+n.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[n.inherit(o,{className:"string"}),"self"]}]},c=Z2,u=n.COMMENT("/\\*","\\*/",{contains:[n.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:n.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:e,contains:[n.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),n.C_LINE_COMMENT_MODE,u,t,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:e,relevance:5,contains:[{begin:n.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[n.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,n.C_LINE_COMMENT_MODE,u],relevance:0},n.C_LINE_COMMENT_MODE,u,a,l,o,n.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,n.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},n.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` `},c]}}const J2=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Y2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],X2=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],Em=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],xm=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Q2=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),eM=Em.concat(xm);function tM(n){const e=J2(n),t=eM,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],a=[],l=function(k){return{className:"string",begin:"~?"+k+".*?"+k}},c=function(k,b,x){return{className:k,begin:b,relevance:x}},u={$pattern:/[a-z-]+/,keyword:r,attribute:X2.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:u,relevance:0};a.push(n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,l("'"),l('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},e.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},e.IMPORTANT,{beginKeywords:"and not"},e.FUNCTION_DISPATCH);const f=a.concat({begin:/\{/,end:/\}/,contains:o}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},h={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Q2.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:a,relevance:0}},m={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:f}},v={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,p,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+Y2.join("|")+")\\b",className:"selector-tag"},e.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Em.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+xm.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},e.FUNCTION_DISPATCH]},y={begin:i+`:(:)?(${t.join("|")})`,returnBegin:!0,contains:[v]};return o.push(n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,g,m,y,h,v,p,e.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function nM(n){const e="\\[=*\\[",t="\\]=*\\]",r={begin:e,end:t,contains:["self"]},i=[n.COMMENT("--(?!"+e+")","$"),n.COMMENT("--"+e,t,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:n.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[n.inherit(n.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},n.C_NUMBER_MODE,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,{className:"string",begin:e,end:t,contains:[r],relevance:5}])}}function rM(n){const e={className:"variable",variants:[{begin:"\\$\\("+n.UNDERSCORE_IDENT_RE+"\\)",contains:[n.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=n.inherit(c,{contains:[]}),f=n.inherit(u,{contains:[]});c.contains.push(f),u.contains.push(d);let p=[t,l];return[c,u,d,f].forEach(m=>{m.contains=m.contains.concat(p)}),p=p.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},t,s,c,u,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,r,l,o]}}function sM(n){const e={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},t=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"/,end:/$/,illegal:"\\n"},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[n.UNDERSCORE_TITLE_MODE]},{begin:"\\."+n.UNDERSCORE_IDENT_RE,relevance:0}]}}function oM(n){const e=n.regex,t=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:t.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},a={variants:[{begin:/\$\d/},{begin:e.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},l=[n.BACKSLASH_ESCAPE,s,a],c=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],u=(p,h,g="\\1")=>{const m=g==="\\1"?g:e.concat(g,h);return e.concat(e.concat("(?:",p,")"),h,/(?:\\.|[^\\\/])*?/,m,/(?:\\.|[^\\\/])*?/,g,r)},d=(p,h,g)=>e.concat(e.concat("(?:",p,")"),h,/(?:\\.|[^\\\/])*?/,g,r),f=[a,n.HASH_COMMENT_MODE,n.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:l,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[n.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+n.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[n.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:u("s|tr|y",e.either(...c,{capture:!0}))},{begin:u("s|tr|y","\\(","\\)")},{begin:u("s|tr|y","\\[","\\]")},{begin:u("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",e.either(...c,{capture:!0}),/\1/)},{begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[n.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=f,o.contains=f,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:f}}function aM(n){const e=n.regex,t=/(?![A-Za-z0-9])(?![$])/,r=e.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,t),i=e.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,t),s={scope:"variable",match:"\\$+"+r},o={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=n.inherit(n.APOS_STRING_MODE,{illegal:null}),c=n.inherit(n.QUOTE_STRING_MODE,{illegal:null,contains:n.QUOTE_STRING_MODE.contains.concat(a)}),u={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:n.QUOTE_STRING_MODE.contains.concat(a),"on:begin":(q,A)=>{A.data._beginMatch=q[1]||q[2]},"on:end":(q,A)=>{A.data._beginMatch!==q[1]&&A.ignoreMatch()}},d=n.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[ ]`,p={scope:"string",variants:[c,l,u,d]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},g=["false","null","true"],m=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],v=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],k={keyword:m,literal:(q=>{const A=[];return q.forEach(H=>{A.push(H),H.toLowerCase()===H?A.push(H.toUpperCase()):A.push(H.toLowerCase())}),A})(g),built_in:v},b=q=>q.map(A=>A.replace(/\|\d+$/,"")),x={variants:[{match:[/new/,e.concat(f,"+"),e.concat("(?!",b(v).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},w=e.concat(r,"\\b(?!\\()"),S={variants:[{match:[e.concat(/::/,e.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,e.concat(/::/,e.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[i,e.concat("::",e.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},T={scope:"attr",match:e.concat(r,e.lookahead(":"),e.lookahead(/(?!::)/))},M={relevance:0,begin:/\(/,end:/\)/,keywords:k,contains:[T,s,S,n.C_BLOCK_COMMENT_MODE,p,h,x]},L={relevance:0,match:[/\b/,e.concat("(?!fn\\b|function\\b|",b(m).join("\\b|"),"|",b(v).join("\\b|"),"\\b)"),r,e.concat(f,"*"),e.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[M]};M.contains.push(L);const z=[T,S,n.C_BLOCK_COMMENT_MODE,p,h,x],G={begin:e.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:g,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:["new","array"]},contains:["self",...z]},...z,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:k,contains:[G,n.HASH_COMMENT_MODE,n.COMMENT("//","$"),n.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:n.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},o,{scope:"variable.language",match:/\$this\b/},s,L,S,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},x,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},n.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:k,contains:["self",s,S,n.C_BLOCK_COMMENT_MODE,p,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},n.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[n.inherit(n.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},n.UNDERSCORE_TITLE_MODE]},p,h]}}function lM(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function cM(n){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function uM(n){const e=n.regex,t=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[n.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[n.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,u,c]},n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},m={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,g,d,n.HASH_COMMENT_MODE]}]};return c.contains=[d,g,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,g,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},d,m,n.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,t,/\s*/,/\(\s*/,t,/\s*\)/]},{match:[/\bclass/,/\s+/,t]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,v,d]}]}}function dM(n){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function fM(n){const e=n.regex,t=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=e.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=e.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:t,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[n.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:e.lookahead(e.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:t},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),n.HASH_COMMENT_MODE,{scope:"string",contains:[n.BACKSLASH_ESCAPE],variants:[n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[t,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function pM(n){const e=n.regex,t="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=e.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=e.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[n.COMMENT("#","$",{contains:[a]}),n.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),n.COMMENT("^__END__",n.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[n.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:e.concat(/<<[-~]?'?/,e.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[n.BACKSLASH_ESCAPE,u]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},w=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[g]},{begin:n.IDENT_RE+"::"},{className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:t}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+n.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[n.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=w,g.contains=w;const S="[>?]>",T="[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]",M="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",L=[{begin:/^\s*=>/,starts:{end:"$",contains:w}},{className:"meta.prompt",begin:"^("+S+"|"+T+"|"+M+")(?=[ ])",starts:{end:"$",keywords:o,contains:w}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[n.SHEBANG({binary:"ruby"})].concat(L).concat(c).concat(w)}}function hM(n){const e=n.regex,t={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let|for|while|if|else|match\b)/,n.IDENT_RE,e.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],s=["true","false","Some","None","Ok","Err"],o=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],a=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:n.IDENT_RE+"!?",type:a,keyword:i,literal:s,built_in:o},illegal:""},t]}}const gM=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),mM=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],bM=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],yM=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],vM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],wM=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function kM(n){const e=gM(n),t=vM,r=yM,i="@[a-z-]+",s="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,e.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+mM.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+t.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[e.CSS_NUMBER_MODE]},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+wM.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[e.BLOCK_COMMENT,a,e.HEXCOLOR,e.CSS_NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,e.IMPORTANT,e.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:bM.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,e.HEXCOLOR,e.CSS_NUMBER_MODE]},e.FUNCTION_DISPATCH]}}function EM(n){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function xM(n){const e=n.regex,t=n.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},i={begin:/"/,end:/"/,contains:[{begin:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=u,h=[...c,...l].filter(k=>!u.includes(k)),g={className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},m={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={begin:e.concat(/\b/,e.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function y(k,{exceptions:b,when:x}={}){const w=x;return b=b||[],k.map(S=>S.match(/\|\d+$/)||b.includes(S)?S:w(S)?`${S}|0`:S)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:y(h,{when:k=>k.length<3}),literal:s,type:a,built_in:d},contains:[{begin:e.either(...f),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:h.concat(f),literal:s,type:a}},{className:"type",begin:e.either(...o)},v,g,r,i,n.C_NUMBER_MODE,n.C_BLOCK_COMMENT_MODE,t,m]}}function Cm(n){return n?typeof n=="string"?n:n.source:null}function Es(n){return Ce("(?=",n,")")}function Ce(...n){return n.map(t=>Cm(t)).join("")}function CM(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function at(...n){return"("+(CM(n).capture?"":"?:")+n.map(r=>Cm(r)).join("|")+")"}const Kc=n=>Ce(/\b/,n,/\w$/.test(n)?/\b/:/\B/),SM=["Protocol","Type"].map(Kc),Ff=["init","self"].map(Kc),_M=["Any","Self"],Fa=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],zf=["false","nil","true"],MM=["assignment","associativity","higherThan","left","lowerThan","none","right"],AM=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Vf=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Sm=at(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),_m=at(Sm,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),za=Ce(Sm,_m,"*"),Mm=at(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),vo=at(Mm,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),rn=Ce(Mm,vo,"*"),Va=Ce(/[A-Z]/,vo,"*"),TM=["attached","autoclosure",Ce(/convention\(/,at("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ce(/objc\(/,rn,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],NM=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function OM(n){const e={match:/\s+/,relevance:0},t=n.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[n.C_LINE_COMMENT_MODE,t],i={match:[/\./,at(...SM,...Ff)],className:{2:"keyword"}},s={match:Ce(/\./,at(...Fa)),relevance:0},o=Fa.filter(de=>typeof de=="string").concat(["_|0"]),a=Fa.filter(de=>typeof de!="string").concat(_M).map(Kc),l={variants:[{className:"keyword",match:at(...a,...Ff)}]},c={$pattern:at(/\b\w+/,/#\w+/),keyword:o.concat(AM),literal:zf},u=[i,s,l],d={match:Ce(/\./,at(...Vf)),relevance:0},f={className:"built_in",match:Ce(/\b/,at(...Vf),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},g={className:"operator",relevance:0,variants:[{match:za},{match:`\\.(\\.|${_m})+`}]},m=[h,g],v="([0-9]_*)+",y="([0-9a-fA-F]_*)+",k={className:"number",relevance:0,variants:[{match:`\\b(${v})(\\.(${v}))?([eE][+-]?(${v}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${v}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},b=(de="")=>({className:"subst",variants:[{match:Ce(/\\/,de,/[0\\tnr"']/)},{match:Ce(/\\/,de,/u\{[0-9a-fA-F]{1,8}\}/)}]}),x=(de="")=>({className:"subst",match:Ce(/\\/,de,/[\t ]*(?:[\r\n]|\r\n)/)}),w=(de="")=>({className:"subst",label:"interpol",begin:Ce(/\\/,de,/\(/),end:/\)/}),S=(de="")=>({begin:Ce(de,/"""/),end:Ce(/"""/,de),contains:[b(de),x(de),w(de)]}),T=(de="")=>({begin:Ce(de,/"/),end:Ce(/"/,de),contains:[b(de),w(de)]}),M={className:"string",variants:[S(),S("#"),S("##"),S("###"),T(),T("#"),T("##"),T("###")]},L=[n.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[n.BACKSLASH_ESCAPE]}],z={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},G=de=>{const Ae=Ce(de,/\//),Qe=Ce(/\//,de);return{begin:Ae,end:Qe,contains:[...L,{scope:"comment",begin:`#(?!.*${Qe})`,end:/$/}]}},q={scope:"regexp",variants:[G("###"),G("##"),G("#"),z]},A={match:Ce(/`/,rn,/`/)},H={className:"variable",match:/\$\d+/},C={className:"variable",match:`\\$${vo}+`},E=[A,H,C],_={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:NM,contains:[...m,k,M]}]}},D={scope:"keyword",match:Ce(/@/,at(...TM))},P={scope:"meta",match:Ce(/@/,rn)},W=[_,D,P],ee={match:Es(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ce(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,vo,"+")},{className:"type",match:Va,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ce(/\s+&\s+/,Es(Va)),relevance:0}]},he={begin://,keywords:c,contains:[...r,...u,...W,h,ee]};ee.contains.push(he);const we={match:Ce(rn,/\s*:/),keywords:"_|0",relevance:0},ue={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",we,...r,q,...u,...p,...m,k,M,...E,...W,ee]},_e={begin://,keywords:"repeat each",contains:[...r,ee]},st={begin:at(Es(Ce(rn,/\s*:/)),Es(Ce(rn,/\s+/,rn,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:rn}]},ze={begin:/\(/,end:/\)/,keywords:c,contains:[st,...r,...u,...m,k,M,...W,ee,ue],endsParent:!0,illegal:/["']/},ft={match:[/(func|macro)/,/\s+/,at(A.match,rn,za)],className:{1:"keyword",3:"title.function"},contains:[_e,ze,e],illegal:[/\[/,/%/]},ot={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[_e,ze,e],illegal:/\[|%/},vt={match:[/operator/,/\s+/,za],className:{1:"keyword",3:"title"}},pt={begin:[/precedencegroup/,/\s+/,Va],className:{1:"keyword",3:"title"},contains:[ee],keywords:[...MM,...zf],end:/}/};for(const de of M.variants){const Ae=de.contains.find(Oe=>Oe.label==="interpol");Ae.keywords=c;const Qe=[...u,...p,...m,k,M,...E];Ae.contains=[...Qe,{begin:/\(/,end:/\)/,contains:["self",...Qe]}]}return{name:"Swift",keywords:c,contains:[...r,ft,ot,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:c,contains:[n.inherit(n.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...u]},vt,pt,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},q,...u,...p,...m,k,M,...E,...W,ee,ue]}}const wo="[A-Za-z$_][0-9A-Za-z$_]*",Am=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Tm=["true","false","null","undefined","NaN","Infinity"],Nm=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Om=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Lm=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Rm=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Dm=[].concat(Lm,Nm,Om);function LM(n){const e=n.regex,t=(_,{after:D})=>{const P="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(_,D)=>{const P=_[0].length+_.index,W=_.input[P];if(W==="<"||W===","){D.ignoreMatch();return}W===">"&&(t(_,{after:P})||D.ignoreMatch());let ee;const he=_.input.substring(P);if(ee=he.match(/^\s*=/)){D.ignoreMatch();return}if((ee=he.match(/^\s+extends\s+/))&&ee.index===0){D.ignoreMatch();return}}},a={$pattern:wo,keyword:Am,literal:Tm,built_in:Dm,"variable.language":Rm},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"css"}},g={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},k=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,p,h,g,m,{match:/\$\d+/},d];f.contains=k.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(k)});const b=[].concat(y,f.contains),x=b.concat([{begin:/\(/,end:/\)/,keywords:a,contains:["self"].concat(b)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,e.concat(r,"(",e.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Nm,...Om]}},M={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(_){return e.concat("(?!",_.join("|"),")")}const q={match:e.concat(/\b/,G([...Lm,"super","import"]),r,e.lookahead(/\(/)),className:"title.function",relevance:0},A={begin:e.concat(/\./,e.lookahead(e.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},C="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",E={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),M,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,p,h,g,m,y,{match:/\$\d+/},d,T,{className:"attr",begin:r+e.lookahead(":"),relevance:0},E,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,n.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,n.inherit(n.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},q,z,S,H,{match:/\$[(.]/}]}}function RM(n){const e=LM(n),t=wo,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[e.exports.CLASS_REFERENCE]},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[e.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:wo,keyword:Am.concat(a),literal:Tm,built_in:Dm.concat(r),"variable.language":Rm},c={className:"meta",begin:"@"+t},u=(f,p,h)=>{const g=f.contains.findIndex(m=>m.label===p);if(g===-1)throw new Error("can not find mode to replace");f.contains.splice(g,1,h)};Object.assign(e.keywords,l),e.exports.PARAMS_CONTAINS.push(c),e.contains=e.contains.concat([c,i,s]),u(e,"shebang",n.SHEBANG()),u(e,"use_strict",o);const d=e.contains.find(f=>f.label==="func.def");return d.relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),e}function DM(n){const e=n.regex,t={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:e.concat(/# */,e.either(s,i),/ *#/)},{begin:e.concat(/# */,a,/ *#/)},{begin:e.concat(/# */,o,/ *#/)},{begin:e.concat(/# */,e.either(s,i),/ +/,e.either(o,a),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=n.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=n.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[t,r,l,c,u,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function IM(n){n.regex;const e=n.COMMENT(/\(;/,/;\)/);e.contains.push("self");const t=n.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[t,e,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,i,n.QUOTE_STRING_MODE,l,c,a]}}function BM(n){const e=n.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=n.inherit(s,{begin:/\(/,end:/\)/}),a=n.inherit(n.APOS_STRING_MODE,{className:"string"}),l=n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[s,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[s,o,l,a]}]}]},n.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:c}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function HM(n){const e="true false yes no null",t="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[n.BACKSLASH_ESCAPE,i]},o=n.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),a="[0-9]{4}(-[0-9][0-9]){0,2}",l="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",c="(\\.[0-9]*)?",u="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",d={className:"number",begin:"\\b"+a+l+c+u+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},p={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},h={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},g=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+t},{className:"type",begin:"!<"+t+">"},{className:"type",begin:"!"+t},{className:"type",begin:"!!"+t},{className:"meta",begin:"&"+n.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+n.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},n.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},d,{className:"number",begin:n.C_NUMBER_RE+"\\b",relevance:0},p,h,s],m=[...g];return m.pop(),m.push(o),f.contains=m,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:g}}const PM={arduino:S2,bash:_2,c:M2,cpp:A2,csharp:T2,css:B2,diff:H2,go:P2,graphql:$2,ini:F2,java:z2,javascript:W2,json:G2,kotlin:j2,less:tM,lua:nM,makefile:rM,markdown:iM,objectivec:sM,perl:oM,php:aM,"php-template":lM,plaintext:cM,python:uM,"python-repl":dM,r:fM,ruby:pM,rust:hM,scss:kM,shell:EM,sql:xM,swift:OM,typescript:RM,vbnet:DM,wasm:IM,xml:BM,yaml:HM};function Im(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(e=>{const t=n[e],r=typeof t;(r==="object"||r==="function")&&!Object.isFrozen(t)&&Im(t)}),n}class qf{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Bm(n){return n.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Sn(n,...e){const t=Object.create(null);for(const r in n)t[r]=n[r];return e.forEach(function(r){for(const i in r)t[i]=r[i]}),t}const $M="",Uf=n=>!!n.scope,FM=(n,{prefix:e})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const t=n.split(".");return[`${e}${t.shift()}`,...t.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${e}${n}`};class zM{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Bm(e)}openNode(e){if(!Uf(e))return;const t=FM(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){Uf(e)&&(this.buffer+=$M)}value(){return this.buffer}span(e){this.buffer+=``}}const Kf=(n={})=>{const e={children:[]};return Object.assign(e,n),e};class Wc{constructor(){this.rootNode=Kf(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Kf({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(r=>this._walk(e,r)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{Wc._collapse(t)}))}}class VM extends Wc{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const r=e.root;t&&(r.scope=`language:${t}`),this.add(r)}toHTML(){return new zM(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function qi(n){return n?typeof n=="string"?n:n.source:null}function Hm(n){return dr("(?=",n,")")}function qM(n){return dr("(?:",n,")*")}function UM(n){return dr("(?:",n,")?")}function dr(...n){return n.map(t=>qi(t)).join("")}function KM(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function Gc(...n){return"("+(KM(n).capture?"":"?:")+n.map(r=>qi(r)).join("|")+")"}function Pm(n){return new RegExp(n.toString()+"|").exec("").length-1}function WM(n,e){const t=n&&n.exec(e);return t&&t.index===0}const GM=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Zc(n,{joinWith:e}){let t=0;return n.map(r=>{t+=1;const i=t;let s=qi(r),o="";for(;s.length>0;){const a=GM.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&t++)}return o}).map(r=>`(${r})`).join(e)}const ZM=/\b\B/,$m="[a-zA-Z]\\w*",jc="[a-zA-Z_]\\w*",Fm="\\b\\d+(\\.\\d+)?",zm="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Vm="\\b(0b[01]+)",jM="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",JM=(n={})=>{const e=/^#![ ]*\//;return n.binary&&(n.begin=dr(e,/.*\b/,n.binary,/\b.*/)),Sn({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,r)=>{t.index!==0&&r.ignoreMatch()}},n)},Ui={begin:"\\\\[\\s\\S]",relevance:0},YM={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ui]},XM={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ui]},QM={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Uo=function(n,e,t={}){const r=Sn({scope:"comment",begin:n,end:e,contains:[]},t);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Gc("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:dr(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},eA=Uo("//","$"),tA=Uo("/\\*","\\*/"),nA=Uo("#","$"),rA={scope:"number",begin:Fm,relevance:0},iA={scope:"number",begin:zm,relevance:0},sA={scope:"number",begin:Vm,relevance:0},oA={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ui,{begin:/\[/,end:/\]/,relevance:0,contains:[Ui]}]},aA={scope:"title",begin:$m,relevance:0},lA={scope:"title",begin:jc,relevance:0},cA={begin:"\\.\\s*"+jc,relevance:0},uA=function(n){return Object.assign(n,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var xs=Object.freeze({__proto__:null,APOS_STRING_MODE:YM,BACKSLASH_ESCAPE:Ui,BINARY_NUMBER_MODE:sA,BINARY_NUMBER_RE:Vm,COMMENT:Uo,C_BLOCK_COMMENT_MODE:tA,C_LINE_COMMENT_MODE:eA,C_NUMBER_MODE:iA,C_NUMBER_RE:zm,END_SAME_AS_BEGIN:uA,HASH_COMMENT_MODE:nA,IDENT_RE:$m,MATCH_NOTHING_RE:ZM,METHOD_GUARD:cA,NUMBER_MODE:rA,NUMBER_RE:Fm,PHRASAL_WORDS_MODE:QM,QUOTE_STRING_MODE:XM,REGEXP_MODE:oA,RE_STARTERS_RE:jM,SHEBANG:JM,TITLE_MODE:aA,UNDERSCORE_IDENT_RE:jc,UNDERSCORE_TITLE_MODE:lA});function dA(n,e){n.input[n.index-1]==="."&&e.ignoreMatch()}function fA(n,e){n.className!==void 0&&(n.scope=n.className,delete n.className)}function pA(n,e){e&&n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",n.__beforeBegin=dA,n.keywords=n.keywords||n.beginKeywords,delete n.beginKeywords,n.relevance===void 0&&(n.relevance=0))}function hA(n,e){Array.isArray(n.illegal)&&(n.illegal=Gc(...n.illegal))}function gA(n,e){if(n.match){if(n.begin||n.end)throw new Error("begin & end are not supported with match");n.begin=n.match,delete n.match}}function mA(n,e){n.relevance===void 0&&(n.relevance=1)}const bA=(n,e)=>{if(!n.beforeMatch)return;if(n.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},n);Object.keys(n).forEach(r=>{delete n[r]}),n.keywords=t.keywords,n.begin=dr(t.beforeMatch,Hm(t.begin)),n.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},n.relevance=0,delete t.beforeMatch},yA=["of","and","for","in","not","or","if","then","parent","list","value"],vA="keyword";function qm(n,e,t=vA){const r=Object.create(null);return typeof n=="string"?i(t,n.split(" ")):Array.isArray(n)?i(t,n):Object.keys(n).forEach(function(s){Object.assign(r,qm(n[s],e,s))}),r;function i(s,o){e&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,wA(l[0],l[1])]})}}function wA(n,e){return e?Number(e):kA(n)?0:1}function kA(n){return yA.includes(n.toLowerCase())}const Wf={},er=n=>{console.error(n)},Gf=(n,...e)=>{console.log(`WARN: ${n}`,...e)},kr=(n,e)=>{Wf[`${n}/${e}`]||(console.log(`Deprecated as of ${n}. ${e}`),Wf[`${n}/${e}`]=!0)},ko=new Error;function Um(n,e,{key:t}){let r=0;const i=n[t],s={},o={};for(let a=1;a<=e.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=Pm(e[a-1]);n[t]=o,n[t]._emit=s,n[t]._multi=!0}function EA(n){if(Array.isArray(n.begin)){if(n.skip||n.excludeBegin||n.returnBegin)throw er("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ko;if(typeof n.beginScope!="object"||n.beginScope===null)throw er("beginScope must be object"),ko;Um(n,n.begin,{key:"beginScope"}),n.begin=Zc(n.begin,{joinWith:""})}}function xA(n){if(Array.isArray(n.end)){if(n.skip||n.excludeEnd||n.returnEnd)throw er("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ko;if(typeof n.endScope!="object"||n.endScope===null)throw er("endScope must be object"),ko;Um(n,n.end,{key:"endScope"}),n.end=Zc(n.end,{joinWith:""})}}function CA(n){n.scope&&typeof n.scope=="object"&&n.scope!==null&&(n.beginScope=n.scope,delete n.scope)}function SA(n){CA(n),typeof n.beginScope=="string"&&(n.beginScope={_wrap:n.beginScope}),typeof n.endScope=="string"&&(n.endScope={_wrap:n.endScope}),EA(n),xA(n)}function _A(n){function e(o,a){return new RegExp(qi(o),"m"+(n.case_insensitive?"i":"")+(n.unicodeRegex?"u":"")+(a?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=Pm(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=e(Zc(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((d,f)=>f>0&&d!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new t;return this.rules.slice(a).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[fA,gA,SA,bA].forEach(u=>u(o,a)),n.compilerExtensions.forEach(u=>u(o,a)),o.__beforeBegin=null,[pA,hA,mA].forEach(u=>u(o,a)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=qm(o.keywords,n.case_insensitive)),l.keywordPatternRe=e(c,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=e(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=e(l.end)),l.terminatorEnd=qi(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=e(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(u){return MA(u==="self"?o:u)})),o.contains.forEach(function(u){s(u,l)}),o.starts&&s(o.starts,a),l.matcher=i(l),l}if(n.compilerExtensions||(n.compilerExtensions=[]),n.contains&&n.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return n.classNameAliases=Sn(n.classNameAliases||{}),s(n)}function Km(n){return n?n.endsWithParent||Km(n.starts):!1}function MA(n){return n.variants&&!n.cachedVariants&&(n.cachedVariants=n.variants.map(function(e){return Sn(n,{variants:null},e)})),n.cachedVariants?n.cachedVariants:Km(n)?Sn(n,{starts:n.starts?Sn(n.starts):null}):Object.isFrozen(n)?Sn(n):n}var AA="11.9.0";class TA extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const qa=Bm,Zf=Sn,jf=Symbol("nomatch"),NA=7,Wm=function(n){const e=Object.create(null),t=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:VM};function l(E){return a.noHighlightRe.test(E)}function c(E){let _=E.className+" ";_+=E.parentNode?E.parentNode.className:"";const D=a.languageDetectRe.exec(_);if(D){const P=M(D[1]);return P||(Gf(s.replace("{}",D[1])),Gf("Falling back to no-highlight mode for this block.",E)),P?D[1]:"no-highlight"}return _.split(/\s+/).find(P=>l(P)||M(P))}function u(E,_,D){let P="",W="";typeof _=="object"?(P=E,D=_.ignoreIllegals,W=_.language):(kr("10.7.0","highlight(lang, code, ...args) has been deprecated."),kr("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),W=E,P=_),D===void 0&&(D=!0);const ee={code:P,language:W};H("before:highlight",ee);const he=ee.result?ee.result:d(ee.language,ee.code,D);return he.code=ee.code,H("after:highlight",he),he}function d(E,_,D,P){const W=Object.create(null);function ee(O,I){return O.keywords[I]}function he(){if(!V.keywords){be.addText(oe);return}let O=0;V.keywordPatternRe.lastIndex=0;let I=V.keywordPatternRe.exec(oe),J="";for(;I;){J+=oe.substring(O,I.index);const se=Oe.case_insensitive?I[0].toLowerCase():I[0],De=ee(V,se);if(De){const[ht,ea]=De;if(be.addText(J),J="",W[se]=(W[se]||0)+1,W[se]<=NA&&(Ge+=ea),ht.startsWith("_"))J+=I[0];else{const N=Oe.classNameAliases[ht]||ht;_e(I[0],N)}}else J+=I[0];O=V.keywordPatternRe.lastIndex,I=V.keywordPatternRe.exec(oe)}J+=oe.substring(O),be.addText(J)}function we(){if(oe==="")return;let O=null;if(typeof V.subLanguage=="string"){if(!e[V.subLanguage]){be.addText(oe);return}O=d(V.subLanguage,oe,!0,ce[V.subLanguage]),ce[V.subLanguage]=O._top}else O=p(oe,V.subLanguage.length?V.subLanguage:null);V.relevance>0&&(Ge+=O.relevance),be.__addSublanguage(O._emitter,O.language)}function ue(){V.subLanguage!=null?we():he(),oe=""}function _e(O,I){O!==""&&(be.startScope(I),be.addText(O),be.endScope())}function st(O,I){let J=1;const se=I.length-1;for(;J<=se;){if(!O._emit[J]){J++;continue}const De=Oe.classNameAliases[O[J]]||O[J],ht=I[J];De?_e(ht,De):(oe=ht,he(),oe=""),J++}}function ze(O,I){return O.scope&&typeof O.scope=="string"&&be.openNode(Oe.classNameAliases[O.scope]||O.scope),O.beginScope&&(O.beginScope._wrap?(_e(oe,Oe.classNameAliases[O.beginScope._wrap]||O.beginScope._wrap),oe=""):O.beginScope._multi&&(st(O.beginScope,I),oe="")),V=Object.create(O,{parent:{value:V}}),V}function ft(O,I,J){let se=WM(O.endRe,J);if(se){if(O["on:end"]){const De=new qf(O);O["on:end"](I,De),De.isMatchIgnored&&(se=!1)}if(se){for(;O.endsParent&&O.parent;)O=O.parent;return O}}if(O.endsWithParent)return ft(O.parent,I,J)}function ot(O){return V.matcher.regexIndex===0?(oe+=O[0],1):(U=!0,0)}function vt(O){const I=O[0],J=O.rule,se=new qf(J),De=[J.__beforeBegin,J["on:begin"]];for(const ht of De)if(ht&&(ht(O,se),se.isMatchIgnored))return ot(I);return J.skip?oe+=I:(J.excludeBegin&&(oe+=I),ue(),!J.returnBegin&&!J.excludeBegin&&(oe=I)),ze(J,O),J.returnBegin?0:I.length}function pt(O){const I=O[0],J=_.substring(O.index),se=ft(V,O,J);if(!se)return jf;const De=V;V.endScope&&V.endScope._wrap?(ue(),_e(I,V.endScope._wrap)):V.endScope&&V.endScope._multi?(ue(),st(V.endScope,O)):De.skip?oe+=I:(De.returnEnd||De.excludeEnd||(oe+=I),ue(),De.excludeEnd&&(oe=I));do V.scope&&be.closeNode(),!V.skip&&!V.subLanguage&&(Ge+=V.relevance),V=V.parent;while(V!==se.parent);return se.starts&&ze(se.starts,O),De.returnEnd?0:I.length}function de(){const O=[];for(let I=V;I!==Oe;I=I.parent)I.scope&&O.unshift(I.scope);O.forEach(I=>be.openNode(I))}let Ae={};function Qe(O,I){const J=I&&I[0];if(oe+=O,J==null)return ue(),0;if(Ae.type==="begin"&&I.type==="end"&&Ae.index===I.index&&J===""){if(oe+=_.slice(I.index,I.index+1),!i){const se=new Error(`0 width match regex (${E})`);throw se.languageName=E,se.badRule=Ae.rule,se}return 1}if(Ae=I,I.type==="begin")return vt(I);if(I.type==="illegal"&&!D){const se=new Error('Illegal lexeme "'+J+'" for mode "'+(V.scope||"")+'"');throw se.mode=V,se}else if(I.type==="end"){const se=pt(I);if(se!==jf)return se}if(I.type==="illegal"&&J==="")return 1;if($>1e5&&$>I.index*3)throw new Error("potential infinite loop, way more iterations than matches");return oe+=J,J.length}const Oe=M(E);if(!Oe)throw er(s.replace("{}",E)),new Error('Unknown language: "'+E+'"');const te=_A(Oe);let Nt="",V=P||te;const ce={},be=new a.__emitter(a);de();let oe="",Ge=0,Ve=0,$=0,U=!1;try{if(Oe.__emitTokens)Oe.__emitTokens(_,be);else{for(V.matcher.considerAll();;){$++,U?U=!1:V.matcher.considerAll(),V.matcher.lastIndex=Ve;const O=V.matcher.exec(_);if(!O)break;const I=_.substring(Ve,O.index),J=Qe(I,O);Ve=O.index+J}Qe(_.substring(Ve))}return be.finalize(),Nt=be.toHTML(),{language:E,value:Nt,relevance:Ge,illegal:!1,_emitter:be,_top:V}}catch(O){if(O.message&&O.message.includes("Illegal"))return{language:E,value:qa(_),illegal:!0,relevance:0,_illegalBy:{message:O.message,index:Ve,context:_.slice(Ve-100,Ve+100),mode:O.mode,resultSoFar:Nt},_emitter:be};if(i)return{language:E,value:qa(_),illegal:!1,relevance:0,errorRaised:O,_emitter:be,_top:V};throw O}}function f(E){const _={value:qa(E),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return _._emitter.addText(E),_}function p(E,_){_=_||a.languages||Object.keys(e);const D=f(E),P=_.filter(M).filter(z).map(ue=>d(ue,E,!1));P.unshift(D);const W=P.sort((ue,_e)=>{if(ue.relevance!==_e.relevance)return _e.relevance-ue.relevance;if(ue.language&&_e.language){if(M(ue.language).supersetOf===_e.language)return 1;if(M(_e.language).supersetOf===ue.language)return-1}return 0}),[ee,he]=W,we=ee;return we.secondBest=he,we}function h(E,_,D){const P=_&&t[_]||D;E.classList.add("hljs"),E.classList.add(`language-${P}`)}function g(E){let _=null;const D=c(E);if(l(D))return;if(H("before:highlightElement",{el:E,language:D}),E.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",E);return}if(E.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(E)),a.throwUnescapedHTML))throw new TA("One of your code blocks includes unescaped HTML.",E.innerHTML);_=E;const P=_.textContent,W=D?u(P,{language:D,ignoreIllegals:!0}):p(P);E.innerHTML=W.value,E.dataset.highlighted="yes",h(E,D,W.language),E.result={language:W.language,re:W.relevance,relevance:W.relevance},W.secondBest&&(E.secondBest={language:W.secondBest.language,relevance:W.secondBest.relevance}),H("after:highlightElement",{el:E,result:W,text:P})}function m(E){a=Zf(a,E)}const v=()=>{b(),kr("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){b(),kr("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let k=!1;function b(){if(document.readyState==="loading"){k=!0;return}document.querySelectorAll(a.cssSelector).forEach(g)}function x(){k&&b()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",x,!1);function w(E,_){let D=null;try{D=_(n)}catch(P){if(er("Language definition for '{}' could not be registered.".replace("{}",E)),i)er(P);else throw P;D=o}D.name||(D.name=E),e[E]=D,D.rawDefinition=_.bind(null,n),D.aliases&&L(D.aliases,{languageName:E})}function S(E){delete e[E];for(const _ of Object.keys(t))t[_]===E&&delete t[_]}function T(){return Object.keys(e)}function M(E){return E=(E||"").toLowerCase(),e[E]||e[t[E]]}function L(E,{languageName:_}){typeof E=="string"&&(E=[E]),E.forEach(D=>{t[D.toLowerCase()]=_})}function z(E){const _=M(E);return _&&!_.disableAutodetect}function G(E){E["before:highlightBlock"]&&!E["before:highlightElement"]&&(E["before:highlightElement"]=_=>{E["before:highlightBlock"](Object.assign({block:_.el},_))}),E["after:highlightBlock"]&&!E["after:highlightElement"]&&(E["after:highlightElement"]=_=>{E["after:highlightBlock"](Object.assign({block:_.el},_))})}function q(E){G(E),r.push(E)}function A(E){const _=r.indexOf(E);_!==-1&&r.splice(_,1)}function H(E,_){const D=E;r.forEach(function(P){P[D]&&P[D](_)})}function C(E){return kr("10.7.0","highlightBlock will be removed entirely in v12.0"),kr("10.7.0","Please use highlightElement now."),g(E)}Object.assign(n,{highlight:u,highlightAuto:p,highlightAll:b,highlightElement:g,highlightBlock:C,configure:m,initHighlighting:v,initHighlightingOnLoad:y,registerLanguage:w,unregisterLanguage:S,listLanguages:T,getLanguage:M,registerAliases:L,autoDetection:z,inherit:Zf,addPlugin:q,removePlugin:A}),n.debugMode=function(){i=!1},n.safeMode=function(){i=!0},n.versionString=AA,n.regex={concat:dr,lookahead:Hm,either:Gc,optional:UM,anyNumberOfTimes:qM};for(const E in xs)typeof xs[E]=="object"&&Im(xs[E]);return Object.assign(n,xs),n},jr=Wm({});jr.newInstance=()=>Wm({});var OA=jr;jr.HighlightJS=jr;jr.default=jr;const LA=Xr(OA),Jf={},RA="hljs-";function DA(n){const e=LA.newInstance();return n&&s(n),{highlight:t,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:a};function t(l,c,u){const d=u||Jf,f=typeof d.prefix=="string"?d.prefix:RA;if(!e.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");e.configure({__emitter:IA,classPrefix:f});const p=e.highlight(c,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});const h=p._emitter.root,g=h.data;return g.language=p.language,g.relevance=p.relevance,h}function r(l,c){const d=(c||Jf).subset||i();let f=-1,p=0,h;for(;++fp&&(p=m.data.relevance,h=m)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function i(){return e.listLanguages()}function s(l,c){if(typeof l=="string")e.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&e.registerLanguage(u,l[u])}}function o(l,c){if(typeof l=="string")e.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const d=l[u];e.registerAliases(typeof d=="string"?d:[...d],{languageName:u})}}}function a(l){return!!e.getLanguage(l)}}class IA{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e==="")return;const t=this.stack[this.stack.length-1],r=t.children[t.children.length-1];r&&r.type==="text"?r.value+=e:t.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){const r=this.stack[this.stack.length-1],i=e.root.children;t?r.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):r.children.push(...i)}openNode(e){const t=this,r=e.split(".").map(function(o,a){return a?o+"_".repeat(a):t.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const BA=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/,Yf=new Me("aie-video-plugin"),li="video_action",HA=le.create({name:"video",group:"block",addAttributes(){return{src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:n.src})},poster:{default:null,parseHTML:n=>n.getAttribute("poster"),renderHTML:n=>({poster:n.poster})},width:{default:350},controls:{default:!0}}},parseHTML(){return[{tag:"video",getAttrs:n=>({src:n.getAttribute("src"),poster:n.getAttribute("poster")})}]},renderHTML({HTMLAttributes:n}){return["video",{controls:"true",...n,src:null},["source",{src:n.src}]]},addCommands(){return{setVideo:n=>({commands:e})=>e.insertContent(`