@creaditor/newsletter-starterkit 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1719,7 +1719,7 @@
1719
1719
  .container {
1720
1720
  margin: auto;
1721
1721
  }
1722
- `),customElements.get("cdtr-table-cells-editor")||customElements.define("cdtr-table-cells-editor",yt);var At=n(88573),wt=n(27191),vt=n(64652);const xt=At.hj.create({name:"smilieReplacer",addInputRules:()=>[(0,At.DS)({find:/-___- $/,replace:"😑 "}),(0,At.DS)({find:/:'-\) $/,replace:"😂 "}),(0,At.DS)({find:/':-\) $/,replace:"😅 "}),(0,At.DS)({find:/':-D $/,replace:"😅 "}),(0,At.DS)({find:/>:-\) $/,replace:"😆 "}),(0,At.DS)({find:/-__- $/,replace:"😑 "}),(0,At.DS)({find:/':-\( $/,replace:"😓 "}),(0,At.DS)({find:/:'-\( $/,replace:"😢 "}),(0,At.DS)({find:/>:-\( $/,replace:"😠 "}),(0,At.DS)({find:/O:-\) $/,replace:"😇 "}),(0,At.DS)({find:/0:-3 $/,replace:"😇 "}),(0,At.DS)({find:/0:-\) $/,replace:"😇 "}),(0,At.DS)({find:/0;\^\) $/,replace:"😇 "}),(0,At.DS)({find:/O;-\) $/,replace:"😇 "}),(0,At.DS)({find:/0;-\) $/,replace:"😇 "}),(0,At.DS)({find:/O:-3 $/,replace:"😇 "}),(0,At.DS)({find:/:'\) $/,replace:"😂 "}),(0,At.DS)({find:/:-D $/,replace:"😃 "}),(0,At.DS)({find:/':\) $/,replace:"😅 "}),(0,At.DS)({find:/'=\) $/,replace:"😅 "}),(0,At.DS)({find:/':D $/,replace:"😅 "}),(0,At.DS)({find:/'=D $/,replace:"😅 "}),(0,At.DS)({find:/>:\) $/,replace:"😆 "}),(0,At.DS)({find:/>;\) $/,replace:"😆 "}),(0,At.DS)({find:/>=\) $/,replace:"😆 "}),(0,At.DS)({find:/;-\) $/,replace:"😉 "}),(0,At.DS)({find:/\*-\) $/,replace:"😉 "}),(0,At.DS)({find:/;-\] $/,replace:"😉 "}),(0,At.DS)({find:/;\^\) $/,replace:"😉 "}),(0,At.DS)({find:/B-\) $/,replace:"😎 "}),(0,At.DS)({find:/8-\) $/,replace:"😎 "}),(0,At.DS)({find:/B-D $/,replace:"😎 "}),(0,At.DS)({find:/8-D $/,replace:"😎 "}),(0,At.DS)({find:/:-\* $/,replace:"😘 "}),(0,At.DS)({find:/:\^\* $/,replace:"😘 "}),(0,At.DS)({find:/:-\) $/,replace:"🙂 "}),(0,At.DS)({find:/-_- $/,replace:"😑 "}),(0,At.DS)({find:/:-X $/,replace:"😶 "}),(0,At.DS)({find:/:-# $/,replace:"😶 "}),(0,At.DS)({find:/:-x $/,replace:"😶 "}),(0,At.DS)({find:/>.< $/,replace:"😣 "}),(0,At.DS)({find:/:-O $/,replace:"😮 "}),(0,At.DS)({find:/:-o $/,replace:"😮 "}),(0,At.DS)({find:/O_O $/,replace:"😮 "}),(0,At.DS)({find:/>:O $/,replace:"😮 "}),(0,At.DS)({find:/:-P $/,replace:"😛 "}),(0,At.DS)({find:/:-p $/,replace:"😛 "}),(0,At.DS)({find:/:-Þ $/,replace:"😛 "}),(0,At.DS)({find:/:-þ $/,replace:"😛 "}),(0,At.DS)({find:/:-b $/,replace:"😛 "}),(0,At.DS)({find:/>:P $/,replace:"😜 "}),(0,At.DS)({find:/X-P $/,replace:"😜 "}),(0,At.DS)({find:/x-p $/,replace:"😜 "}),(0,At.DS)({find:/':\( $/,replace:"😓 "}),(0,At.DS)({find:/'=\( $/,replace:"😓 "}),(0,At.DS)({find:/>:\\ $/,replace:"😕 "}),(0,At.DS)({find:/>:\/ $/,replace:"😕 "}),(0,At.DS)({find:/:-\/ $/,replace:"😕 "}),(0,At.DS)({find:/:-. $/,replace:"😕 "}),(0,At.DS)({find:/>:\[ $/,replace:"😞 "}),(0,At.DS)({find:/:-\( $/,replace:"😞 "}),(0,At.DS)({find:/:-\[ $/,replace:"😞 "}),(0,At.DS)({find:/:'\( $/,replace:"😢 "}),(0,At.DS)({find:/;-\( $/,replace:"😢 "}),(0,At.DS)({find:/#-\) $/,replace:"😵 "}),(0,At.DS)({find:/%-\) $/,replace:"😵 "}),(0,At.DS)({find:/X-\) $/,replace:"😵 "}),(0,At.DS)({find:/>:\( $/,replace:"😠 "}),(0,At.DS)({find:/0:3 $/,replace:"😇 "}),(0,At.DS)({find:/0:\) $/,replace:"😇 "}),(0,At.DS)({find:/O:\) $/,replace:"😇 "}),(0,At.DS)({find:/O=\) $/,replace:"😇 "}),(0,At.DS)({find:/O:3 $/,replace:"😇 "}),(0,At.DS)({find:/<\/3 $/,replace:"💔 "}),(0,At.DS)({find:/:D $/,replace:"😃 "}),(0,At.DS)({find:/=D $/,replace:"😃 "}),(0,At.DS)({find:/;\) $/,replace:"😉 "}),(0,At.DS)({find:/\*\) $/,replace:"😉 "}),(0,At.DS)({find:/;\] $/,replace:"😉 "}),(0,At.DS)({find:/;D $/,replace:"😉 "}),(0,At.DS)({find:/B\) $/,replace:"😎 "}),(0,At.DS)({find:/8\) $/,replace:"😎 "}),(0,At.DS)({find:/:\* $/,replace:"😘 "}),(0,At.DS)({find:/=\* $/,replace:"😘 "}),(0,At.DS)({find:/:\) $/,replace:"🙂 "}),(0,At.DS)({find:/=\] $/,replace:"🙂 "}),(0,At.DS)({find:/:\] $/,replace:"🙂 "}),(0,At.DS)({find:/:X $/,replace:"😶 "}),(0,At.DS)({find:/:# $/,replace:"😶 "}),(0,At.DS)({find:/=X $/,replace:"😶 "}),(0,At.DS)({find:/=x $/,replace:"😶 "}),(0,At.DS)({find:/:x $/,replace:"😶 "}),(0,At.DS)({find:/=# $/,replace:"😶 "}),(0,At.DS)({find:/:O $/,replace:"😮 "}),(0,At.DS)({find:/:o $/,replace:"😮 "}),(0,At.DS)({find:/:P $/,replace:"😛 "}),(0,At.DS)({find:/=P $/,replace:"😛 "}),(0,At.DS)({find:/:p $/,replace:"😛 "}),(0,At.DS)({find:/=p $/,replace:"😛 "}),(0,At.DS)({find:/:Þ $/,replace:"😛 "}),(0,At.DS)({find:/:þ $/,replace:"😛 "}),(0,At.DS)({find:/:b $/,replace:"😛 "}),(0,At.DS)({find:/d: $/,replace:"😛 "}),(0,At.DS)({find:/:\/ $/,replace:"😕 "}),(0,At.DS)({find:/:\\ $/,replace:"😕 "}),(0,At.DS)({find:/=\/ $/,replace:"😕 "}),(0,At.DS)({find:/=\\ $/,replace:"😕 "}),(0,At.DS)({find:/:L $/,replace:"😕 "}),(0,At.DS)({find:/=L $/,replace:"😕 "}),(0,At.DS)({find:/:\( $/,replace:"😞 "}),(0,At.DS)({find:/:\[ $/,replace:"😞 "}),(0,At.DS)({find:/=\( $/,replace:"😞 "}),(0,At.DS)({find:/;\( $/,replace:"😢 "}),(0,At.DS)({find:/D: $/,replace:"😨 "}),(0,At.DS)({find:/:\$ $/,replace:"😳 "}),(0,At.DS)({find:/=\$ $/,replace:"😳 "}),(0,At.DS)({find:/#\) $/,replace:"😵 "}),(0,At.DS)({find:/%\) $/,replace:"😵 "}),(0,At.DS)({find:/X\) $/,replace:"😵 "}),(0,At.DS)({find:/:@ $/,replace:"😠 "}),(0,At.DS)({find:/=\) $/,replace:"🙂 "}),(0,At.DS)({find:/<3 $/,replace:"❤️ "}),(0,At.DS)({find:/ש”ח $/,replace:"₪ "}),(0,At.DS)({find:/ש״ח $/,replace:"₪ "}),(0,At.DS)({find:/ש"ח $/,replace:"₪ "})]});var _t=n(52780);const kt=function(t){const e=/(#[0-9a-f]{3,6})\b/gi,n=[];return t.descendants(((t,r)=>{t.text&&Array.from(t.text.matchAll(e)).forEach((t=>{const e=t[0],i=t.index||0,o=r+i,s=o+e.length,a=_t.p.inline(o,s,{class:"color",style:`--color: ${e}`});n.push(a)}))})),_t.EH.create(t,n)},Ct=At.hj.create({name:"colorHighlighter",addProseMirrorPlugins:()=>[new wt.Sy({state:{init(t,e){let{doc:n}=e;return kt(n)},apply:(t,e)=>t.docChanged?kt(t.doc):e},props:{decorations(t){return this.getState(t)}}})]}),Et=At.vc.create({name:"textStyle",priority:101,addOptions:()=>({HTMLAttributes:{},mergeNestedSpanStyles:!1}),parseHTML(){return[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&(this.options.mergeNestedSpanStyles&&(t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach((t=>{var e,n;const r=t.getAttribute("style"),i=null===(n=null===(e=t.parentElement)||void 0===e?void 0:e.closest("span"))||void 0===n?void 0:n.getAttribute("style");t.setAttribute("style",`${i};${r}`)}))})(t),{})}]},renderHTML({HTMLAttributes:t}){return["span",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,((e,n)=>{if(e.isTextblock)return!0;e.marks.filter((t=>t.type===this.type)).some((t=>Object.values(t.attrs).some((t=>!!t))))||t.removeMark(n,n+e.nodeSize,this.type)})),!0}}}}),St=At.hj.create({name:"fontSize",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{if(t.style&&t.style.fontSize)return t.style.fontSize.replace(/['"]+/g,"");const e=window.getComputedStyle(t);return e&&e.fontSize?e.fontSize.replace(/['"]+/g,""):t.dataset&&t.dataset.fontSize?t.dataset.fontSize.replace(/['"]+/g,""):null},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands:()=>({setFontSize:t=>e=>{let{chain:n}=e;return n().setMark("textStyle",{fontSize:t+"px"}).run()},unsetFontSize:()=>t=>{let{chain:e}=t;return e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}),addKeyboardShortcuts(){return{"Mod-]":()=>{let t=parseInt(this.editor.getAttributes("textStyle").fontSize);t||(t=16),this.editor.commands.setFontSize(t+1)},"Mod-[":()=>{let t=parseInt(this.editor.getAttributes("textStyle").fontSize);t||(t=16),this.editor.commands.setFontSize(t-1)}}}});var Bt=n(42626);const Ot=At.NB.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML(t){let{node:e,HTMLAttributes:n}=t;const r=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0],i=document.createElement(`h${r}`);return i.style.cssText=n.style,i.style.fontFamily||(i.style.fontFamily="Arial, Helvetica, sans-serif"),n.style=i.style.cssText,[`h${r}`,(0,At.P1)(this.options.HTMLAttributes,n),0]},addCommands(){return{setHeading:t=>e=>{let{commands:n}=e;return!!this.options.levels.includes(t.level)&&n.setNode(this.name,t)},toggleHeading:t=>e=>{let{commands:n}=e;return!!this.options.levels.includes(t.level)&&n.toggleNode(this.name,"paragraph",t)}}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>(0,At.zK)({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}});var Mt=n(39615);const $t=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,It=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,Tt=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,Lt=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,Nt=At.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],renderHTML({HTMLAttributes:t}){return["strong",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,At.Cf)({find:$t,type:this.type}),(0,At.Cf)({find:Tt,type:this.type})]},addPasteRules(){return[(0,At.K9)({find:It,type:this.type}),(0,At.K9)({find:Lt,type:this.type})]}}),Rt=At.vc.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML({HTMLAttributes:t}){return["u",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Pt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Dt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,zt=At.vc.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,At.Cf)({find:Pt,type:this.type})]},addPasteRules(){return[(0,At.K9)({find:Dt,type:this.type})]}}),Ht=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,jt=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Ut=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Zt=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Ft=At.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,At.Cf)({find:Ht,type:this.type}),(0,At.Cf)({find:Ut,type:this.type})]},addPasteRules(){return[(0,At.K9)({find:jt,type:this.type}),(0,At.K9)({find:Zt,type:this.type})]}}),Vt=At.hj.create({name:"color",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return null===(e=t.style.color)||void 0===e?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands:()=>({setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()})}),Yt=At.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,At.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Wt=At.hj.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new wt.Sy({key:new wt.H$("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!n)return null;const o=this.editor.isEmpty;return t.descendants(((t,e)=>{const n=r>=e&&r<=e+t.nodeSize,s=!t.isLeaf&&(0,At.bR)(t);if((n||!this.options.showOnlyCurrent)&&s){const r=[this.options.emptyNodeClass];o&&r.push(this.options.emptyEditorClass);const s=_t.p.node(e,e+t.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:e,hasAnchor:n}):this.options.placeholder});i.push(s)}return this.options.includeChildren})),_t.EH.create(t,i)}}})]}});var qt=n(26151);function Xt(t={}){return new wt.Sy({view:e=>new Gt(e,t)})}class Gt{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map((e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}destroy(){this.handlers.forEach((({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e)))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r=this.editorView.dom,i=r.getBoundingClientRect(),o=i.width/r.offsetWidth,s=i.height/r.offsetHeight;if(n){let n=e.nodeBefore,r=e.nodeAfter;if(n||r){let e=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(e){let i=e.getBoundingClientRect(),o=n?i.bottom:i.top;n&&r&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*s;t={left:i.left,right:i.right,top:o-a,bottom:o+a}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*o;t={left:e.left-n,right:e.left+n,top:e.top,bottom:e.bottom}}let a,l,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!c||c==document.body&&"static"==getComputedStyle(c).position)a=-pageXOffset,l=-pageYOffset;else{let t=c.getBoundingClientRect(),e=t.width/c.offsetWidth,n=t.height/c.offsetHeight;a=t.left-c.scrollLeft*e,l=t.top-c.scrollTop*n}this.element.style.left=(t.left-a)/o+"px",this.element.style.top=(t.top-l)/s+"px",this.element.style.width=(t.right-t.left)/o+"px",this.element.style.height=(t.bottom-t.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,e,t):r;if(e&&!i){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,qt.nj)(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}const Kt=At.hj.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[Xt(this.options)]}}),Jt=At.hj.create({name:"direction",addOptions:()=>({types:[],directions:["rtl","ltr"],defaultDirection:"ltr"}),addGlobalAttributes(t){return[{types:this.options.types,attributes:{direction:{default:this.options.defaultDirection,parseHTML:t=>t.style.direction||this.options.defaultDirection,renderHTML:t=>({style:`direction: ${t.direction||this.options.defaultDirection}`})}}}]},addCommands(){return{setDirection:t=>e=>{let{commands:n}=e;return!!this.options.directions.includes(t)&&this.options.types.every((e=>n.updateAttributes(e,{direction:t})))},unsetDirection:()=>t=>{let{commands:e}=t;return this.options.types.every((t=>e.resetAttributes(t,"direction")))}}}}),Qt=At.hj.create({name:"lineHeight",addOptions:()=>({types:[],lineHeight:"1.4",defaultLineHeight:"1.4"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:this.options.defaultLineHeight,parseHTML:t=>t.style.lineHeight||this.options.defaultLineHeight,renderHTML:t=>({style:`line-height: ${t.lineHeight||this.options.defaultLineHeight}`})}}}]},addCommands(){return{setLineHeight:t=>e=>{let{commands:n}=e;return this.options.types.every((e=>n.updateAttributes(e,{lineHeight:t})))},unsetLineHeight:()=>t=>{let{commands:e}=t;return this.options.types.every((t=>e.resetAttributes(t,"lineHeight")))}}}}),te=At.hj.create({name:"letterSpacing",addOptions:()=>({types:[],letterSpacing:"",defaultLetterSpacing:""}),addGlobalAttributes(){return[{types:this.options.types,attributes:{letterSpacing:{default:this.options.defaultLetterSpacing,parseHTML:t=>t.style.letterSpacing||this.options.defaultLetterSpacing,renderHTML:t=>({style:`letter-spacing: ${t.letterSpacing||this.options.defaultLetterSpacing}`})}}}]},addCommands(){return{setLetterSpacing:t=>e=>{let{commands:n}=e;return this.options.types.every((e=>n.updateAttributes(e,{letterSpacing:t})))},unsetLetterSpacing:()=>t=>{let{commands:e}=t;return this.options.types.every((t=>e.resetAttributes(t,"letterSpacing")))}}}}),ee="textStyle",ne=/^(\d+)\.\s$/,re=At.NB.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return 1===e?["ol",(0,At.P1)(this.options.HTMLAttributes,n),0]:["ol",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(ee)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=(0,At.S0)({find:ne,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,At.S0)({find:ne,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(ee)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),ie="customBulletItem",oe=At.NB.create({name:ie,addOptions:()=>({nested:!0,HTMLAttributes:{},svgIcon:"",width:"",mt:0,height:"",fill:"",fontSize:""}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({svgIcon:{default:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zm-.692-2H20V5H4v13.385L5.763 17zm5.53-4.879l4.243-4.242 1.414 1.414-5.657 5.657-3.89-3.89 1.415-1.414 2.475 2.475z"/></svg>',parseHTML:t=>t.querySelector("svg")?.outerHTML},width:{default:24,parseHTML:t=>t.width},height:{default:24,parseHTML:t=>t.height},mt:{default:0,parseHTML:t=>t.style.marginTop},fill:{default:"#000",parseHTML:t=>t.style.fill}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML(t){let{node:e,HTMLAttributes:n}=t;return["li",(0,At.P1)(this.options.HTMLAttributes,n,{"data-type":this.name}),["div",["svg"],["span"]],["div",0]]},addCommands(){return{setCustomBulletIcon:t=>e=>{const{commands:n}=e;return n.updateAttributes(this.name,t),!0},setCustomBulletStyles:t=>e=>{const{commands:n,editor:r}=e;return n.updateAttributes(this.name,t),!0}}},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return t=>{let{HTMLAttributes:e}=t,n=e.svgIcon;if(n=n.replace(/&lt;/g,"<"),-1!==n.indexOf("<svg")){delete e.svgIcon;const t=document.createElement("li");t.classList.add("custom-bullet-item");const r=document.createElement("div");r.innerHTML=n;const i=document.createElement("div"),o=r.firstElementChild;return o.style.width=e.width,o.style.height=e.width,o.style.fill=e.fill,o.style.marginTop=e.mt,Object.entries(this.options.HTMLAttributes).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),t.append(r,i),Object.entries(e).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),{dom:t,contentDOM:i}}if(n.startsWith("http")){delete e.svgIcon;const t=document.createElement("li");t.classList.add("custom-bullet-item");const r=document.createElement("div");r.innerHTML=`<img src="${n}" height="auto" style="margin-top:${e.mt||"auto"}" width="${e.width}"\n />`;const i=document.createElement("div");r.firstElementChild;return Object.entries(this.options.HTMLAttributes).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),t.append(r,i),Object.entries(e).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),{dom:t,contentDOM:i}}{delete e.svgIcon;const t=document.createElement("li");t.classList.add("custom-bullet-item");const r=document.createElement("div");r.innerHTML=`<svg fill="${e.fill}" width="${e.width}"\n height="${e.width}"\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${n}</svg>`;const i=document.createElement("div"),o=r.firstElementChild;return o.style.width=e.width,o.style.height=e.width,o.style.marginTop=e.mt,o.style.fill=e.fill,Object.entries(this.options.HTMLAttributes).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),t.append(r,i),Object.entries(e).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),{dom:t,contentDOM:i}}}}}),se=At.NB.create({name:"customBulletList",addOptions:()=>({itemTypeName:ie,HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML(t){let{HTMLAttributes:e}=t;return["ul",(0,At.P1)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleCustomList:()=>t=>{let{commands:e}=t;return e.toggleList(this.name,this.options.itemTypeName)}}},addKeyboardShortcuts(){return{"Mod-Shift-6":()=>this.editor.commands.toggleCustomList()}}}),ae=At.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",(0,At.P1)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command((()=>{const{selection:t,storedMarks:i}=n;if(t.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command((({tr:t,dispatch:e})=>{if(e&&a&&o){const e=a.filter((t=>s.includes(t.type.name)));t.ensureMarks(e)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),le=/^\s*(\[([ |x])\])\s$/,ce=(At.NB.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{}}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:t=>"true"===t.getAttribute("data-checked"),renderHTML:t=>({"data-checked":t.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML(t){let{node:e,HTMLAttributes:n}=t;return["li",(0,At.P1)(this.options.HTMLAttributes,n,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return t=>{let{node:e,HTMLAttributes:n,getPos:r,editor:i}=t;const o=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input");o.style.display="flex",o.style.alignItems="center",l.style.width="50px";const c=document.createElement("div");return s.contentEditable="false",l.type="checkbox",l.addEventListener("change",(t=>{if(!i.isEditable)return void(l.checked=!l.checked);const{checked:e}=t.target;i.isEditable&&"function"==typeof r&&i.chain().focus(void 0,{scrollIntoView:!1}).command((t=>{let{tr:n}=t;const i=r(),o=n.doc.nodeAt(i);return n.setNodeMarkup(i,void 0,{...o?.attrs,checked:e}),!0})).run()})),Object.entries(this.options.HTMLAttributes).forEach((t=>{let[e,n]=t;o.setAttribute(e,n)})),o.dataset.checked=e.attrs.checked,e.attrs.checked&&l.setAttribute("checked","checked"),s.append(l,a),o.append(s,c),Object.entries(n).forEach((t=>{let[e,n]=t;o.setAttribute(e,n)})),{dom:o,contentDOM:c,update:t=>t.type===this.type&&(o.dataset.checked=t.attrs.checked,t.attrs.checked?l.setAttribute("checked","checked"):l.removeAttribute("checked"),!0)}}},addInputRules(){return[(0,At.S0)({find:le,type:this.type,getAttributes:t=>({checked:"x"===t[t.length-1]})})]}}),At.NB.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML(t){let{HTMLAttributes:e}=t;return["ul",(0,At.P1)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>t=>{let{commands:e}=t;return e.toggleList(this.name,this.options.itemTypeName)}}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),/^\s*>\s$/),de=At.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return["blockquote",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,At.S0)({find:ce,type:this.type})]}}),pe=/^```([a-z]+)?[\s\n]$/,he=/^~~~([a-z]+)?[\s\n]$/,ue=At.NB.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,r=[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter((t=>t.startsWith(n))).map((t=>t.replace(n,"")))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",(0,At.P1)(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!(!t||e.parent.type.name!==this.name)&&(!(!n&&e.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&t.chain().command((({tr:t})=>(t.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type)return!1;if(!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();if(void 0===s)return!1;return r.nodeAt(s)?t.commands.command((({tr:t})=>(t.setSelection(wt.Y1.near(r.resolve(s))),!0))):t.commands.exitCode()}}},addInputRules(){return[(0,At.zK)({find:pe,type:this.type,getAttributes:t=>({language:t[1]})}),(0,At.zK)({find:he,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new wt.Sy({key:new wt.H$("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;const{tr:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(wt.Bs.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}});function fe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function me(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((e=>{const n=t[e],r=typeof n;"object"!==r&&"function"!==r||Object.isFrozen(n)||me(n)})),t}class ge{constructor(t){void 0===t.data&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function be(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ye(t,...e){const n=Object.create(null);for(const e in t)n[e]=t[e];return e.forEach((function(t){for(const e in t)n[e]=t[e]})),n}const Ae=t=>!!t.scope;class we{constructor(t,e){this.buffer="",this.classPrefix=e.classPrefix,t.walk(this)}addText(t){this.buffer+=be(t)}openNode(t){if(!Ae(t))return;const e=((t,{prefix:e})=>{if(t.startsWith("language:"))return t.replace("language:","language-");if(t.includes(".")){const n=t.split(".");return[`${e}${n.shift()}`,...n.map(((t,e)=>`${t}${"_".repeat(e+1)}`))].join(" ")}return`${e}${t}`})(t.scope,{prefix:this.classPrefix});this.span(e)}closeNode(t){Ae(t)&&(this.buffer+="</span>")}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const ve=(t={})=>{const e={children:[]};return Object.assign(e,t),e};class xe{constructor(){this.rootNode=ve(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const e=ve({scope:t});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,e){return"string"==typeof e?t.addText(e):e.children&&(t.openNode(e),e.children.forEach((e=>this._walk(t,e))),t.closeNode(e)),t}static _collapse(t){"string"!=typeof t&&t.children&&(t.children.every((t=>"string"==typeof t))?t.children=[t.children.join("")]:t.children.forEach((t=>{xe._collapse(t)})))}}class _e extends xe{constructor(t){super(),this.options=t}addText(t){""!==t&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,e){const n=t.root;e&&(n.scope=`language:${e}`),this.add(n)}toHTML(){return new we(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function ke(t){return t?"string"==typeof t?t:t.source:null}function Ce(t){return Be("(?=",t,")")}function Ee(t){return Be("(?:",t,")*")}function Se(t){return Be("(?:",t,")?")}function Be(...t){return t.map((t=>ke(t))).join("")}function Oe(...t){const e=function(t){const e=t[t.length-1];return"object"==typeof e&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}(t);return"("+(e.capture?"":"?:")+t.map((t=>ke(t))).join("|")+")"}function Me(t){return new RegExp(t.toString()+"|").exec("").length-1}const $e=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ie(t,{joinWith:e}){let n=0;return t.map((t=>{n+=1;const e=n;let r=ke(t),i="";for(;r.length>0;){const t=$e.exec(r);if(!t){i+=r;break}i+=r.substring(0,t.index),r=r.substring(t.index+t[0].length),"\\"===t[0][0]&&t[1]?i+="\\"+String(Number(t[1])+e):(i+=t[0],"("===t[0]&&n++)}return i})).map((t=>`(${t})`)).join(e)}const Te="[a-zA-Z]\\w*",Le="[a-zA-Z_]\\w*",Ne="\\b\\d+(\\.\\d+)?",Re="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Pe="\\b(0b[01]+)",De={begin:"\\\\[\\s\\S]",relevance:0},ze={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[De]},He={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[De]},je=function(t,e,n={}){const r=ye({scope:"comment",begin:t,end:e,contains:[]},n);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=Oe("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:Be(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Ue=je("//","$"),Ze=je("/\\*","\\*/"),Fe=je("#","$"),Ve={scope:"number",begin:Ne,relevance:0},Ye={scope:"number",begin:Re,relevance:0},We={scope:"number",begin:Pe,relevance:0},qe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[De,{begin:/\[/,end:/\]/,relevance:0,contains:[De]}]},Xe={scope:"title",begin:Te,relevance:0},Ge={scope:"title",begin:Le,relevance:0},Ke={begin:"\\.\\s*"+Le,relevance:0};var Je=Object.freeze({__proto__:null,APOS_STRING_MODE:ze,BACKSLASH_ESCAPE:De,BINARY_NUMBER_MODE:We,BINARY_NUMBER_RE:Pe,COMMENT:je,C_BLOCK_COMMENT_MODE:Ze,C_LINE_COMMENT_MODE:Ue,C_NUMBER_MODE:Ye,C_NUMBER_RE:Re,END_SAME_AS_BEGIN:function(t){return Object.assign(t,{"on:begin":(t,e)=>{e.data._beginMatch=t[1]},"on:end":(t,e)=>{e.data._beginMatch!==t[1]&&e.ignoreMatch()}})},HASH_COMMENT_MODE:Fe,IDENT_RE:Te,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:Ke,NUMBER_MODE:Ve,NUMBER_RE:Ne,PHRASAL_WORDS_MODE:{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/},QUOTE_STRING_MODE:He,REGEXP_MODE:qe,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(t={})=>{const e=/^#![ ]*\//;return t.binary&&(t.begin=Be(e,/.*\b/,t.binary,/\b.*/)),ye({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,e)=>{0!==t.index&&e.ignoreMatch()}},t)},TITLE_MODE:Xe,UNDERSCORE_IDENT_RE:Le,UNDERSCORE_TITLE_MODE:Ge});function Qe(t,e){"."===t.input[t.index-1]&&e.ignoreMatch()}function tn(t,e){void 0!==t.className&&(t.scope=t.className,delete t.className)}function en(t,e){e&&t.beginKeywords&&(t.begin="\\b("+t.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",t.__beforeBegin=Qe,t.keywords=t.keywords||t.beginKeywords,delete t.beginKeywords,void 0===t.relevance&&(t.relevance=0))}function nn(t,e){Array.isArray(t.illegal)&&(t.illegal=Oe(...t.illegal))}function rn(t,e){if(t.match){if(t.begin||t.end)throw new Error("begin & end are not supported with match");t.begin=t.match,delete t.match}}function on(t,e){void 0===t.relevance&&(t.relevance=1)}const sn=(t,e)=>{if(!t.beforeMatch)return;if(t.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},t);Object.keys(t).forEach((e=>{delete t[e]})),t.keywords=n.keywords,t.begin=Be(n.beforeMatch,Ce(n.begin)),t.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},t.relevance=0,delete n.beforeMatch},an=["of","and","for","in","not","or","if","then","parent","list","value"],ln="keyword";function cn(t,e,n=ln){const r=Object.create(null);return"string"==typeof t?i(n,t.split(" ")):Array.isArray(t)?i(n,t):Object.keys(t).forEach((function(n){Object.assign(r,cn(t[n],e,n))})),r;function i(t,n){e&&(n=n.map((t=>t.toLowerCase()))),n.forEach((function(e){const n=e.split("|");r[n[0]]=[t,dn(n[0],n[1])]}))}}function dn(t,e){return e?Number(e):function(t){return an.includes(t.toLowerCase())}(t)?0:1}const pn={},hn=t=>{console.error(t)},un=(t,...e)=>{console.log(`WARN: ${t}`,...e)},fn=(t,e)=>{pn[`${t}/${e}`]||(console.log(`Deprecated as of ${t}. ${e}`),pn[`${t}/${e}`]=!0)},mn=new Error;function gn(t,e,{key:n}){let r=0;const i=t[n],o={},s={};for(let t=1;t<=e.length;t++)s[t+r]=i[t],o[t+r]=!0,r+=Me(e[t-1]);t[n]=s,t[n]._emit=o,t[n]._multi=!0}function bn(t){!function(t){t.scope&&"object"==typeof t.scope&&null!==t.scope&&(t.beginScope=t.scope,delete t.scope)}(t),"string"==typeof t.beginScope&&(t.beginScope={_wrap:t.beginScope}),"string"==typeof t.endScope&&(t.endScope={_wrap:t.endScope}),function(t){if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw hn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),mn;if("object"!=typeof t.beginScope||null===t.beginScope)throw hn("beginScope must be object"),mn;gn(t,t.begin,{key:"beginScope"}),t.begin=Ie(t.begin,{joinWith:""})}}(t),function(t){if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw hn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),mn;if("object"!=typeof t.endScope||null===t.endScope)throw hn("endScope must be object"),mn;gn(t,t.end,{key:"endScope"}),t.end=Ie(t.end,{joinWith:""})}}(t)}function yn(t){function e(e,n){return new RegExp(ke(e),"m"+(t.case_insensitive?"i":"")+(t.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(t,e){e.position=this.position++,this.matchIndexes[this.matchAt]=e,this.regexes.push([e,t]),this.matchAt+=Me(t)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const t=this.regexes.map((t=>t[1]));this.matcherRe=e(Ie(t,{joinWith:"|"}),!0),this.lastIndex=0}exec(t){this.matcherRe.lastIndex=this.lastIndex;const e=this.matcherRe.exec(t);if(!e)return null;const n=e.findIndex(((t,e)=>e>0&&void 0!==t)),r=this.matchIndexes[n];return e.splice(0,n),Object.assign(e,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(t){if(this.multiRegexes[t])return this.multiRegexes[t];const e=new n;return this.rules.slice(t).forEach((([t,n])=>e.addRule(t,n))),e.compile(),this.multiRegexes[t]=e,e}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(t,e){this.rules.push([t,e]),"begin"===e.type&&this.count++}exec(t){const e=this.getMatcher(this.regexIndex);e.lastIndex=this.lastIndex;let n=e.exec(t);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const e=this.getMatcher(0);e.lastIndex=this.lastIndex+1,n=e.exec(t)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(t.compilerExtensions||(t.compilerExtensions=[]),t.contains&&t.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return t.classNameAliases=ye(t.classNameAliases||{}),function n(i,o){const s=i;if(i.isCompiled)return s;[tn,rn,bn,sn].forEach((t=>t(i,o))),t.compilerExtensions.forEach((t=>t(i,o))),i.__beforeBegin=null,[en,nn,on].forEach((t=>t(i,o))),i.isCompiled=!0;let a=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),a=i.keywords.$pattern,delete i.keywords.$pattern),a=a||/\w+/,i.keywords&&(i.keywords=cn(i.keywords,t.case_insensitive)),s.keywordPatternRe=e(a,!0),o&&(i.begin||(i.begin=/\B|\b/),s.beginRe=e(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=e(s.end)),s.terminatorEnd=ke(s.end)||"",i.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(s.illegalRe=e(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(t){return function(t){t.variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map((function(e){return ye(t,{variants:null},e)})));if(t.cachedVariants)return t.cachedVariants;if(An(t))return ye(t,{starts:t.starts?ye(t.starts):null});if(Object.isFrozen(t))return ye(t);return t}("self"===t?i:t)}))),i.contains.forEach((function(t){n(t,s)})),i.starts&&n(i.starts,o),s.matcher=function(t){const e=new r;return t.contains.forEach((t=>e.addRule(t.begin,{rule:t,type:"begin"}))),t.terminatorEnd&&e.addRule(t.terminatorEnd,{type:"end"}),t.illegal&&e.addRule(t.illegal,{type:"illegal"}),e}(s),s}(t)}function An(t){return!!t&&(t.endsWithParent||An(t.starts))}class wn extends Error{constructor(t,e){super(t),this.name="HTMLInjectionError",this.html=e}}const vn=be,xn=ye,_n=Symbol("nomatch"),kn=7,Cn=function(t){const e=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={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:_e};function l(t){return a.noHighlightRe.test(t)}function c(t,e,n){let r="",i="";"object"==typeof e?(r=t,n=e.ignoreIllegals,i=e.language):(fn("10.7.0","highlight(lang, code, ...args) has been deprecated."),fn("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=t,r=e),void 0===n&&(n=!0);const o={code:r,language:i};y("before:highlight",o);const s=o.result?o.result:d(o.language,o.code,n);return s.code=o.code,y("after:highlight",s),s}function d(t,n,r,s){const l=Object.create(null);function c(){if(!C.keywords)return void S.addText(B);let t=0;C.keywordPatternRe.lastIndex=0;let e=C.keywordPatternRe.exec(B),n="";for(;e;){n+=B.substring(t,e.index);const i=x.case_insensitive?e[0].toLowerCase():e[0],o=(r=i,C.keywords[r]);if(o){const[t,r]=o;if(S.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=kn&&(O+=r),t.startsWith("_"))n+=e[0];else{const n=x.classNameAliases[t]||t;u(e[0],n)}}else n+=e[0];t=C.keywordPatternRe.lastIndex,e=C.keywordPatternRe.exec(B)}var r;n+=B.substring(t),S.addText(n)}function h(){null!=C.subLanguage?function(){if(""===B)return;let t=null;if("string"==typeof C.subLanguage){if(!e[C.subLanguage])return void S.addText(B);t=d(C.subLanguage,B,!0,E[C.subLanguage]),E[C.subLanguage]=t._top}else t=p(B,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(O+=t.relevance),S.__addSublanguage(t._emitter,t.language)}():c(),B=""}function u(t,e){""!==t&&(S.startScope(e),S.addText(t),S.endScope())}function f(t,e){let n=1;const r=e.length-1;for(;n<=r;){if(!t._emit[n]){n++;continue}const r=x.classNameAliases[t[n]]||t[n],i=e[n];r?u(i,r):(B=i,c(),B=""),n++}}function g(t,e){return t.scope&&"string"==typeof t.scope&&S.openNode(x.classNameAliases[t.scope]||t.scope),t.beginScope&&(t.beginScope._wrap?(u(B,x.classNameAliases[t.beginScope._wrap]||t.beginScope._wrap),B=""):t.beginScope._multi&&(f(t.beginScope,e),B="")),C=Object.create(t,{parent:{value:C}}),C}function b(t,e,n){let r=function(t,e){const n=t&&t.exec(e);return n&&0===n.index}(t.endRe,n);if(r){if(t["on:end"]){const n=new ge(t);t["on:end"](e,n),n.isMatchIgnored&&(r=!1)}if(r){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return b(t.parent,e,n)}function y(t){return 0===C.matcher.regexIndex?(B+=t[0],1):(I=!0,0)}function A(t){const e=t[0],r=n.substring(t.index),i=b(C,t,r);if(!i)return _n;const o=C;C.endScope&&C.endScope._wrap?(h(),u(e,C.endScope._wrap)):C.endScope&&C.endScope._multi?(h(),f(C.endScope,t)):o.skip?B+=e:(o.returnEnd||o.excludeEnd||(B+=e),h(),o.excludeEnd&&(B=e));do{C.scope&&S.closeNode(),C.skip||C.subLanguage||(O+=C.relevance),C=C.parent}while(C!==i.parent);return i.starts&&g(i.starts,t),o.returnEnd?0:e.length}let w={};function v(e,o){const s=o&&o[0];if(B+=e,null==s)return h(),0;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===s){if(B+=n.slice(o.index,o.index+1),!i){const e=new Error(`0 width match regex (${t})`);throw e.languageName=t,e.badRule=w.rule,e}return 1}if(w=o,"begin"===o.type)return function(t){const e=t[0],n=t.rule,r=new ge(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(t,r),r.isMatchIgnored))return y(e);return n.skip?B+=e:(n.excludeBegin&&(B+=e),h(),n.returnBegin||n.excludeBegin||(B=e)),g(n,t),n.returnBegin?0:e.length}(o);if("illegal"===o.type&&!r){const t=new Error('Illegal lexeme "'+s+'" for mode "'+(C.scope||"<unnamed>")+'"');throw t.mode=C,t}if("end"===o.type){const t=A(o);if(t!==_n)return t}if("illegal"===o.type&&""===s)return 1;if($>1e5&&$>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return B+=s,s.length}const x=m(t);if(!x)throw hn(o.replace("{}",t)),new Error('Unknown language: "'+t+'"');const _=yn(x);let k="",C=s||_;const E={},S=new a.__emitter(a);!function(){const t=[];for(let e=C;e!==x;e=e.parent)e.scope&&t.unshift(e.scope);t.forEach((t=>S.openNode(t)))}();let B="",O=0,M=0,$=0,I=!1;try{if(x.__emitTokens)x.__emitTokens(n,S);else{for(C.matcher.considerAll();;){$++,I?I=!1:C.matcher.considerAll(),C.matcher.lastIndex=M;const t=C.matcher.exec(n);if(!t)break;const e=v(n.substring(M,t.index),t);M=t.index+e}v(n.substring(M))}return S.finalize(),k=S.toHTML(),{language:t,value:k,relevance:O,illegal:!1,_emitter:S,_top:C}}catch(e){if(e.message&&e.message.includes("Illegal"))return{language:t,value:vn(n),illegal:!0,relevance:0,_illegalBy:{message:e.message,index:M,context:n.slice(M-100,M+100),mode:e.mode,resultSoFar:k},_emitter:S};if(i)return{language:t,value:vn(n),illegal:!1,relevance:0,errorRaised:e,_emitter:S,_top:C};throw e}}function p(t,n){n=n||a.languages||Object.keys(e);const r=function(t){const e={value:vn(t),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return e._emitter.addText(t),e}(t),i=n.filter(m).filter(b).map((e=>d(e,t,!1)));i.unshift(r);const o=i.sort(((t,e)=>{if(t.relevance!==e.relevance)return e.relevance-t.relevance;if(t.language&&e.language){if(m(t.language).supersetOf===e.language)return 1;if(m(e.language).supersetOf===t.language)return-1}return 0})),[l,c]=o,p=l;return p.secondBest=c,p}function h(t){let e=null;const r=function(t){let e=t.className+" ";e+=t.parentNode?t.parentNode.className:"";const n=a.languageDetectRe.exec(e);if(n){const e=m(n[1]);return e||(un(o.replace("{}",n[1])),un("Falling back to no-highlight mode for this block.",t)),e?n[1]:"no-highlight"}return e.split(/\s+/).find((t=>l(t)||m(t)))}(t);if(l(r))return;if(y("before:highlightElement",{el:t,language:r}),t.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",t);if(t.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(t)),a.throwUnescapedHTML)){throw new wn("One of your code blocks includes unescaped HTML.",t.innerHTML)}e=t;const i=e.textContent,s=r?c(i,{language:r,ignoreIllegals:!0}):p(i);t.innerHTML=s.value,t.dataset.highlighted="yes",function(t,e,r){const i=e&&n[e]||r;t.classList.add("hljs"),t.classList.add(`language-${i}`)}(t,r,s.language),t.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(t.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),y("after:highlightElement",{el:t,result:s,text:i})}let u=!1;function f(){if("loading"===document.readyState)return void(u=!0);document.querySelectorAll(a.cssSelector).forEach(h)}function m(t){return t=(t||"").toLowerCase(),e[t]||e[n[t]]}function g(t,{languageName:e}){"string"==typeof t&&(t=[t]),t.forEach((t=>{n[t.toLowerCase()]=e}))}function b(t){const e=m(t);return e&&!e.disableAutodetect}function y(t,e){const n=t;r.forEach((function(t){t[n]&&t[n](e)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){u&&f()}),!1),Object.assign(t,{highlight:c,highlightAuto:p,highlightAll:f,highlightElement:h,highlightBlock:function(t){return fn("10.7.0","highlightBlock will be removed entirely in v12.0"),fn("10.7.0","Please use highlightElement now."),h(t)},configure:function(t){a=xn(a,t)},initHighlighting:()=>{f(),fn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),fn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(t)}catch(t){if(hn("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw t;hn(t),o=s}o.name||(o.name=n),e[n]=o,o.rawDefinition=r.bind(null,t),o.aliases&&g(o.aliases,{languageName:n})},unregisterLanguage:function(t){delete e[t];for(const e of Object.keys(n))n[e]===t&&delete n[e]},listLanguages:function(){return Object.keys(e)},getLanguage:m,registerAliases:g,autoDetection:b,inherit:xn,addPlugin:function(t){!function(t){t["before:highlightBlock"]&&!t["before:highlightElement"]&&(t["before:highlightElement"]=e=>{t["before:highlightBlock"](Object.assign({block:e.el},e))}),t["after:highlightBlock"]&&!t["after:highlightElement"]&&(t["after:highlightElement"]=e=>{t["after:highlightBlock"](Object.assign({block:e.el},e))})}(t),r.push(t)},removePlugin:function(t){const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}),t.debugMode=function(){i=!1},t.safeMode=function(){i=!0},t.versionString="11.10.0",t.regex={concat:Be,lookahead:Ce,either:Oe,optional:Se,anyNumberOfTimes:Ee};for(const t in Je)"object"==typeof Je[t]&&me(Je[t]);return Object.assign(t,Je),t},En=Cn({});En.newInstance=()=>Cn({});var Sn=En;En.HighlightJS=En,En.default=En;var Bn=fe(Sn);function On(t,e=[]){return t.map((t=>{const n=[...e,...t.properties?t.properties.className:[]];return t.children?On(t.children,n):{text:t.value,classes:n}})).flat()}function Mn(t){return t.value||t.children||[]}function $n({doc:t,name:e,lowlight:n,defaultLanguage:r}){const i=[];return(0,At.N2)(t,(t=>t.type.name===e)).forEach((t=>{var e;let o=t.pos+1;const s=t.node.attrs.language||r,a=n.listLanguages();var l;On(s&&(a.includes(s)||(l=s,Boolean(Bn.getLanguage(l)))||(null===(e=n.registered)||void 0===e?void 0:e.call(n,s)))?Mn(n.highlight(s,t.node.textContent)):Mn(n.highlightAuto(t.node.textContent))).forEach((t=>{const e=o+t.text.length;if(t.classes.length){const n=_t.p.inline(o,e,{class:t.classes.join(" ")});i.push(n)}o=e}))})),_t.EH.create(t,i)}function In({name:t,lowlight:e,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every((t=>"function"==typeof e[t])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new wt.Sy({key:new wt.H$("lowlight"),state:{init:(r,{doc:i})=>$n({doc:i,name:t,lowlight:e,defaultLanguage:n}),apply:(r,i,o,s)=>{const a=o.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=(0,At.N2)(o.doc,(e=>e.type.name===t)),d=(0,At.N2)(s.doc,(e=>e.type.name===t));return r.docChanged&&([a,l].includes(t)||d.length!==c.length||r.steps.some((t=>void 0!==t.from&&void 0!==t.to&&c.some((e=>e.pos>=t.from&&e.pos+e.node.nodeSize<=t.to)))))?$n({doc:r.doc,name:t,lowlight:e,defaultLanguage:n}):i.map(r.mapping,r.doc)}},props:{decorations:t=>r.getState(t)}});return r}const Tn=ue.extend({addOptions(){var t;return{...null===(t=this.parent)||void 0===t?void 0:t.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},addProseMirrorPlugins(){var t;return[...(null===(t=this.parent)||void 0===t?void 0:t.call(this))||[],In({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),Ln={};const Nn=At.hj.create({name:"fontFamily",addOptions:()=>({types:["textStyle"],fonts:[]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily?.replace(/['"]+/g,""),renderHTML:t=>{if(!t.fontFamily)return{style:"font-family:Arial, Helvetica, sans-serif"};return function(t,e){if(!t||!t.length)return;const n=t.find((t=>t.cssRule.trim().replace('"',"").replace("'","")===e.trim().replace('"',"").replace("'","")));n&&!Ln[n.name]&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e),Ln[t.name]=!0}(n)}(this.options.fonts,t.fontFamily),{style:`font-family: ${t.fontFamily.replace(/;/g,"")}`,"data-cdtr-font-name":t.fontFamily}}}}}]},addCommands:()=>({setFontFamily:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=>{let{chain:n}=e;if(!t||"object"!=typeof t)return console.warn("setFontFamily should be { cssRule, name, id, url } "),"string"==typeof t?n().setMark("textStyle",{fontFamily:t}).run():void 0;const{cssRule:r,name:i,id:o,url:s}=t;return n().setMark("textStyle",{fontFamily:r}).run()}},unsetFontFamily:()=>t=>{let{chain:e}=t;return e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}})});const Rn=At.NB.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",draggable:!0,parseHTML:()=>[{tag:"hr"}],renderHTML(t){let{HTMLAttributes:e}=t;return["hr",(0,At.P1)(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>t=>{let{chain:e}=t;return e().insertContent({type:this.name}).command((t=>{let{tr:e,dispatch:n}=t;if(n){const{$to:t}=e.selection,n=t.end();if(t.nodeAfter)e.setSelection(wt.Bs.create(e.doc,t.pos));else{const r=t.parent.type.contentMatch.defaultType?.create();r&&(e.insert(n,r),e.setSelection(wt.Bs.create(e.doc,n)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[(0,At.x2)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var Pn=n(38404),Dn=n(52665);class zn extends wt.Y1{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return zn.valid(n)?new zn(n):wt.Y1.near(n)}content(){return Dn.p2.empty}eq(t){return t instanceof zn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new zn(t.resolve(e.pos))}getBookmark(){return new Hn(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0!=n)for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n!=r.childCount)for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&zn.valid(t))return t;let r=t.pos,i=null;for(let n=t.depth;;n--){let o=t.node(n);if(e>0?t.indexAfter(n)<o.childCount:t.index(n)>0){i=o.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let s=t.doc.resolve(r);if(zn.valid(s))return s}for(;;){let o=e>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!wt.qv.isSelectable(i)){t=t.doc.resolve(r+i.nodeSize*e),n=!1;continue t}break}i=o,r+=e;let s=t.doc.resolve(r);if(zn.valid(s))return s}return null}}}zn.prototype.visible=!1,zn.findFrom=zn.findGapCursorFrom,wt.Y1.jsonID("gapcursor",zn);class Hn{constructor(t){this.pos=t}map(t){return new Hn(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return zn.valid(e)?new zn(e):wt.Y1.near(e)}}const jn=(0,Pn.$)({ArrowLeft:Un("horiz",-1),ArrowRight:Un("horiz",1),ArrowUp:Un("vert",-1),ArrowDown:Un("vert",1)});function Un(t,e){const n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,i){let o=t.selection,s=e>0?o.$to:o.$from,a=o.empty;if(o instanceof wt.Bs){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=t.doc.resolve(e>0?s.after():s.before())}let l=zn.findGapCursorFrom(s,e,a);return!!l&&(r&&r(t.tr.setSelection(new zn(l))),!0)}}function Zn(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!zn.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&wt.qv.isSelectable(t.state.doc.nodeAt(i.inside)))&&(t.dispatch(t.state.tr.setSelection(new zn(r))),!0)}function Fn(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof zn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=Dn.HY.empty;for(let t=r.length-1;t>=0;t--)i=Dn.HY.from(r[t].createAndFill(null,i));let o=t.state.tr.replace(n.pos,n.pos,new Dn.p2(i,0,0));return o.setSelection(wt.Bs.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function Vn(t){if(!(t.selection instanceof zn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",_t.EH.create(t.doc,[_t.p.widget(t.selection.head,e,{key:"gapcursor"})])}const Yn=At.hj.create({name:"gapCursor",addProseMirrorPlugins:()=>[new wt.Sy({props:{decorations:Vn,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&zn.valid(n)?new zn(n):null,handleClick:Zn,handleKeyDown:jn,handleDOMEvents:{beforeinput:Fn}}})],extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=(0,At.nU)((0,At.Nl)(t,"allowGapCursor",n)))&&void 0!==e?e:null}}}),Wn=At.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML(t){const{HTMLAttributes:e}=t,n=document.createElement("p");n.style.cssText=e.style,n.style.fontSize||(n.style.fontSize="16px"),n.style.fontFamily||(n.style.fontFamily="Arial, Helvetica, sans-serif");const r=n.style.cssText;return["p",(0,At.P1)(this.options.HTMLAttributes,{style:r},{dir:"auto"}),0]},addCommands(){return{setParagraph:()=>t=>{let{commands:e}=t;return e.setNode(this.name)}}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),qn="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Xn="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Gn=(t,e)=>{for(const n in e)t[n]=e[n];return t},Kn="numeric",Jn="ascii",Qn="alpha",tr="asciinumeric",er="alphanumeric",nr="domain",rr="emoji",ir="scheme",or="slashscheme",sr="whitespace";function ar(t,e){return t in e||(e[t]=[]),e[t]}function lr(t,e,n){e[Kn]&&(e[tr]=!0,e[er]=!0),e[Jn]&&(e[tr]=!0,e[Qn]=!0),e[tr]&&(e[er]=!0),e[Qn]&&(e[er]=!0),e[er]&&(e[nr]=!0),e[rr]&&(e[nr]=!0);for(const r in e){const e=ar(r,n);e.indexOf(t)<0&&e.push(t)}}function cr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}cr.groups={},cr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let n=0;n<e.jr.length;n++){const r=e.jr[n][0],i=e.jr[n][1];if(i&&r.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){let i;return r=r||cr.groups,e&&e.j?i=e:(i=new cr(e),n&&r&&lr(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const o=t.length;if(!o)return i;for(let e=0;e<o-1;e++)i=i.tt(t[e]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){r=r||cr.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const o=e;let s,a=i.go(t);if(a?(s=new cr,Gn(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new cr,o){if(r)if(s.t&&"string"==typeof s.t){const t=Gn(function(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}(s.t,r),n);lr(o,t,r)}else n&&lr(o,n,r);s.t=o}return i.j[t]=s,s}};const dr=(t,e,n,r,i)=>t.ta(e,n,r,i),pr=(t,e,n,r,i)=>t.tr(e,n,r,i),hr=(t,e,n,r,i)=>t.ts(e,n,r,i),ur=(t,e,n,r,i)=>t.tt(e,n,r,i),fr="WORD",mr="UWORD",gr="ASCIINUMERICAL",br="ALPHANUMERICAL",yr="LOCALHOST",Ar="TLD",wr="UTLD",vr="SCHEME",xr="SLASH_SCHEME",_r="NUM",kr="WS",Cr="NL",Er="OPENBRACE",Sr="CLOSEBRACE",Br="OPENBRACKET",Or="CLOSEBRACKET",Mr="OPENPAREN",$r="CLOSEPAREN",Ir="OPENANGLEBRACKET",Tr="CLOSEANGLEBRACKET",Lr="FULLWIDTHLEFTPAREN",Nr="FULLWIDTHRIGHTPAREN",Rr="LEFTCORNERBRACKET",Pr="RIGHTCORNERBRACKET",Dr="LEFTWHITECORNERBRACKET",zr="RIGHTWHITECORNERBRACKET",Hr="FULLWIDTHLESSTHAN",jr="FULLWIDTHGREATERTHAN",Ur="AMPERSAND",Zr="APOSTROPHE",Fr="ASTERISK",Vr="AT",Yr="BACKSLASH",Wr="BACKTICK",qr="CARET",Xr="COLON",Gr="COMMA",Kr="DOLLAR",Jr="DOT",Qr="EQUALS",ti="EXCLAMATION",ei="HYPHEN",ni="PERCENT",ri="PIPE",ii="PLUS",oi="POUND",si="QUERY",ai="QUOTE",li="FULLWIDTHMIDDLEDOT",ci="SEMI",di="SLASH",pi="TILDE",hi="UNDERSCORE",ui="EMOJI",fi="SYM";var mi=Object.freeze({__proto__:null,WORD:fr,UWORD:mr,ASCIINUMERICAL:gr,ALPHANUMERICAL:br,LOCALHOST:yr,TLD:Ar,UTLD:wr,SCHEME:vr,SLASH_SCHEME:xr,NUM:_r,WS:kr,NL:Cr,OPENBRACE:Er,CLOSEBRACE:Sr,OPENBRACKET:Br,CLOSEBRACKET:Or,OPENPAREN:Mr,CLOSEPAREN:$r,OPENANGLEBRACKET:Ir,CLOSEANGLEBRACKET:Tr,FULLWIDTHLEFTPAREN:Lr,FULLWIDTHRIGHTPAREN:Nr,LEFTCORNERBRACKET:Rr,RIGHTCORNERBRACKET:Pr,LEFTWHITECORNERBRACKET:Dr,RIGHTWHITECORNERBRACKET:zr,FULLWIDTHLESSTHAN:Hr,FULLWIDTHGREATERTHAN:jr,AMPERSAND:Ur,APOSTROPHE:Zr,ASTERISK:Fr,AT:Vr,BACKSLASH:Yr,BACKTICK:Wr,CARET:qr,COLON:Xr,COMMA:Gr,DOLLAR:Kr,DOT:Jr,EQUALS:Qr,EXCLAMATION:ti,HYPHEN:ei,PERCENT:ni,PIPE:ri,PLUS:ii,POUND:oi,QUERY:si,QUOTE:ai,FULLWIDTHMIDDLEDOT:li,SEMI:ci,SLASH:di,TILDE:pi,UNDERSCORE:hi,EMOJI:ui,SYM:fi});const gi=/[a-z]/,bi=/\p{L}/u,yi=/\p{Emoji}/u,Ai=/\d/,wi=/\s/;const vi="\r",xi="\n",_i="️",ki="‍",Ci="";let Ei=null,Si=null;function Bi(t,e){const n=function(t){const e=[],n=t.length;let r=0;for(;r<n;){let i,o=t.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,(t=>t.toLowerCase()))),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=t,l=null,c=0,d=null,p=-1,h=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(p=0,h=0,d=a):p>=0&&(p+=n[s].length,h++),c+=n[s].length,o+=n[s].length,s++;o-=p,s-=h,c-=p,i.push({t:d.t,v:e.slice(o-c,o),s:o-c,e:o})}return i}function Oi(t,e,n,r,i){let o;const s=e.length;for(let n=0;n<s-1;n++){const s=e[n];t.j[s]?o=t.j[s]:(o=new cr(r),o.jr=i.slice(),t.j[s]=o),t=o}return o=new cr(n),o.jr=i.slice(),t.j[e[s-1]]=o,o}function Mi(t){const e=[],n=[];let r=0;for(;r<t.length;){let i=0;for(;"0123456789".indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+i),10);e>0;e--)n.pop();r+=i}else n.push(t[r]),r++}return e}const $i={defaultProtocol:"http",events:null,format:Ti,formatHref:Ti,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ii(t,e=null){let n=Gn({},$i);t&&(n=Gn(n,t instanceof Ii?t.o:t));const r=n.ignoreTags,i=[];for(let t=0;t<r.length;t++)i.push(r[t].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}function Ti(t){return t}Ii.prototype={o:$i,ignoreTags:[],defaultRender:t=>t,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=null!=e;let i=this.o[t];return i?("object"==typeof i?(i=n.t in i?i[n.t]:$i[t],"function"==typeof i&&r&&(i=i(e,n))):"function"==typeof i&&r&&(i=i(e,n.t,n)),i):i},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Li(t,e){this.t="token",this.v=t,this.tk=e}function Ni(t,e){class n extends Li{constructor(e,n){super(e,n),this.t=t}}for(const t in e)n.prototype[t]=e[t];return n.t=t,n}Li.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=$i.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),o=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),p=t.getObj("events",n,e);return s.href=r,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),d&&Gn(s,d),{tagName:i,attributes:s,content:o,eventListeners:p}}};const Ri=Ni("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Pi=Ni("text"),Di=Ni("nl"),zi=Ni("url",{isLink:!0,toHref(t=$i.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==yr&&t[1].t===Xr}});const Hi=t=>new cr(t);function ji(t,e,n){const r=n[0].s,i=n[n.length-1].e;return new t(e.slice(r,i),n)}const Ui="undefined"!=typeof console&&console&&console.warn||(()=>{}),Zi="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Fi={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Vi(t,e=!1){if(Fi.initialized&&Ui(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Zi}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');Fi.customSchemes.push([t,e])}function Yi(){Fi.scanner=function(t=[]){const e={};cr.groups=e;const n=new cr;null==Ei&&(Ei=Mi(qn)),null==Si&&(Si=Mi(Xn)),ur(n,"'",Zr),ur(n,"{",Er),ur(n,"}",Sr),ur(n,"[",Br),ur(n,"]",Or),ur(n,"(",Mr),ur(n,")",$r),ur(n,"<",Ir),ur(n,">",Tr),ur(n,"(",Lr),ur(n,")",Nr),ur(n,"「",Rr),ur(n,"」",Pr),ur(n,"『",Dr),ur(n,"』",zr),ur(n,"<",Hr),ur(n,">",jr),ur(n,"&",Ur),ur(n,"*",Fr),ur(n,"@",Vr),ur(n,"`",Wr),ur(n,"^",qr),ur(n,":",Xr),ur(n,",",Gr),ur(n,"$",Kr),ur(n,".",Jr),ur(n,"=",Qr),ur(n,"!",ti),ur(n,"-",ei),ur(n,"%",ni),ur(n,"|",ri),ur(n,"+",ii),ur(n,"#",oi),ur(n,"?",si),ur(n,'"',ai),ur(n,"/",di),ur(n,";",ci),ur(n,"~",pi),ur(n,"_",hi),ur(n,"\\",Yr),ur(n,"・",li);const r=pr(n,Ai,_r,{[Kn]:!0});pr(r,Ai,r);const i=pr(r,gi,gr,{[tr]:!0}),o=pr(r,bi,br,{[er]:!0}),s=pr(n,gi,fr,{[Jn]:!0});pr(s,Ai,i),pr(s,gi,s),pr(i,Ai,i),pr(i,gi,i);const a=pr(n,bi,mr,{[Qn]:!0});pr(a,gi),pr(a,Ai,o),pr(a,bi,a),pr(o,Ai,o),pr(o,gi),pr(o,bi,o);const l=ur(n,xi,Cr,{[sr]:!0}),c=ur(n,vi,kr,{[sr]:!0}),d=pr(n,wi,kr,{[sr]:!0});ur(n,Ci,d),ur(c,xi,l),ur(c,Ci,d),pr(c,wi,d),ur(d,vi),ur(d,xi),pr(d,wi,d),ur(d,Ci,d);const p=pr(n,yi,ui,{[rr]:!0});ur(p,"#"),pr(p,yi,p),ur(p,_i,p);const h=ur(p,ki);ur(h,"#"),pr(h,yi,p);const u=[[gi,s],[Ai,i]],f=[[gi,null],[bi,a],[Ai,o]];for(let t=0;t<Ei.length;t++)Oi(n,Ei[t],Ar,fr,u);for(let t=0;t<Si.length;t++)Oi(n,Si[t],wr,mr,f);lr(Ar,{tld:!0,ascii:!0},e),lr(wr,{utld:!0,alpha:!0},e),Oi(n,"file",vr,fr,u),Oi(n,"mailto",vr,fr,u),Oi(n,"http",xr,fr,u),Oi(n,"https",xr,fr,u),Oi(n,"ftp",xr,fr,u),Oi(n,"ftps",xr,fr,u),lr(vr,{scheme:!0,ascii:!0},e),lr(xr,{slashscheme:!0,ascii:!0},e),t=t.sort(((t,e)=>t[0]>e[0]?1:-1));for(let e=0;e<t.length;e++){const r=t[e][0],i=t[e][1]?{[ir]:!0}:{[or]:!0};r.indexOf("-")>=0?i[nr]=!0:gi.test(r)?Ai.test(r)?i[tr]=!0:i[Jn]=!0:i[Kn]=!0,hr(n,r,r,i)}return hr(n,"localhost",yr,{ascii:!0}),n.jd=new cr(fi),{start:n,tokens:Gn({groups:e},mi)}}(Fi.customSchemes);for(let t=0;t<Fi.tokenQueue.length;t++)Fi.tokenQueue[t][1]({scanner:Fi.scanner});Fi.parser=function({groups:t}){const e=t.domain.concat([Ur,Fr,Vr,Yr,Wr,qr,Kr,Qr,ei,_r,ni,ri,ii,oi,di,fi,pi,hi]),n=[Xr,Gr,Jr,ti,ni,si,ai,ci,Ir,Tr,Er,Sr,Or,Br,Mr,$r,Lr,Nr,Rr,Pr,Dr,zr,Hr,jr],r=[Ur,Zr,Fr,Yr,Wr,qr,Kr,Qr,ei,Er,Sr,ni,ri,ii,oi,si,di,fi,pi,hi],i=Hi(),o=ur(i,pi);dr(o,r,o),dr(o,t.domain,o);const s=Hi(),a=Hi(),l=Hi();dr(i,t.domain,s),dr(i,t.scheme,a),dr(i,t.slashscheme,l),dr(s,r,o),dr(s,t.domain,s);const c=ur(s,Vr);ur(o,Vr,c),ur(a,Vr,c),ur(l,Vr,c);const d=ur(o,Jr);dr(d,r,o),dr(d,t.domain,o);const p=Hi();dr(c,t.domain,p),dr(p,t.domain,p);const h=ur(p,Jr);dr(h,t.domain,p);const u=Hi(Ri);dr(h,t.tld,u),dr(h,t.utld,u),ur(c,yr,u);const f=ur(p,ei);ur(f,ei,f),dr(f,t.domain,p),dr(u,t.domain,p),ur(u,Jr,h),ur(u,ei,f);const m=ur(u,Xr);dr(m,t.numeric,Ri);const g=ur(s,ei),b=ur(s,Jr);ur(g,ei,g),dr(g,t.domain,s),dr(b,r,o),dr(b,t.domain,s);const y=Hi(zi);dr(b,t.tld,y),dr(b,t.utld,y),dr(y,t.domain,s),dr(y,r,o),ur(y,Jr,b),ur(y,ei,g),ur(y,Vr,c);const A=ur(y,Xr),w=Hi(zi);dr(A,t.numeric,w);const v=Hi(zi),x=Hi();dr(v,e,v),dr(v,n,x),dr(x,e,v),dr(x,n,x),ur(y,di,v),ur(w,di,v);const _=ur(a,Xr),k=ur(l,Xr),C=ur(k,di),E=ur(C,di);dr(a,t.domain,s),ur(a,Jr,b),ur(a,ei,g),dr(l,t.domain,s),ur(l,Jr,b),ur(l,ei,g),dr(_,t.domain,v),ur(_,di,v),ur(_,si,v),dr(E,t.domain,v),dr(E,e,v),ur(E,di,v);const S=[[Er,Sr],[Br,Or],[Mr,$r],[Ir,Tr],[Lr,Nr],[Rr,Pr],[Dr,zr],[Hr,jr]];for(let t=0;t<S.length;t++){const[r,i]=S[t],o=ur(v,r);ur(x,r,o),ur(o,i,v);const s=Hi(zi);dr(o,e,s);const a=Hi();dr(o,n),dr(s,e,s),dr(s,n,a),dr(a,e,s),dr(a,n,a),ur(s,i,v),ur(a,i,v)}return ur(i,yr,y),ur(i,Cr,Di),{start:i,tokens:mi}}(Fi.scanner.tokens);for(let t=0;t<Fi.pluginQueue.length;t++)Fi.pluginQueue[t][1]({scanner:Fi.scanner,parser:Fi.parser});return Fi.initialized=!0,Fi}function Wi(t){return Fi.initialized||Yi(),function(t,e,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=t,l=null,c=null,d=0,p=null,h=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,a=c,a.accepts()?(h=0,p=a):h>=0&&h++,i++,d++;if(h<0)i-=d,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(ji(Pi,e,s)),s=[]),i-=h,d-=h;const t=p.t,r=n.slice(i-d,i);o.push(ji(t,e,r))}}return s.length>0&&o.push(ji(Pi,e,s)),o}(Fi.parser.start,t,Bi(Fi.scanner.start,t))}function qi(t,e=null,n=null){if(e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Ii(n),i=Wi(t),o=[];for(let t=0;t<i.length;t++){const n=i[t];!n.isLink||e&&n.t!==e||!r.check(n)||o.push(n.toFormattedObject(r))}return o}Wi.scan=Bi;const Xi=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Gi(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach((t=>{const e="string"==typeof t?t:t.scheme;e&&n.push(e)})),!t||t.replace(Xi,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Ki=At.vc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach((t=>{"string"!=typeof t?Vi(t.scheme,t.optionalSlashes):Vi(t)}))},onDestroy(){cr.groups={},Fi.scanner=null,Fi.parser=null,Fi.tokenQueue=[],Fi.pluginQueue=[],Fi.customSchemes=[],Fi.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Gi(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}),addAttributes(){return{href:{default:null,parseHTML:t=>t.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!(!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,At.P1)(this.options.HTMLAttributes,t),0]:["a",(0,At.P1)(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().setMark(this.name,t).setMeta("preventAutolink",!0).run()},toggleLink:t=>({chain:e})=>{const{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,At.K9)({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,i=qi(t).filter((t=>t.isLink&&this.options.isAllowedUri(t.value,{defaultValidate:t=>!!Gi(t,n),protocols:n,defaultProtocol:r})));i.length&&i.forEach((t=>e.push({text:t.value,data:{href:t.href},index:t.start})))}return e},type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(function(t){return new wt.Sy({key:new wt.H$("autolink"),appendTransaction:(e,n,r)=>{const i=e.some((t=>t.docChanged))&&!n.doc.eq(r.doc),o=e.some((t=>t.getMeta("preventAutolink")));if(!i||o)return;const{tr:s}=r,a=(0,At.XP)(n.doc,[...e]);return(0,At.QC)(a).forEach((({newRange:e})=>{const n=(0,At.b5)(r.doc,e,(t=>t.isTextblock));let i,o;if(n.length>1?(i=n[0],o=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0," ")):n.length&&r.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(i=n[0],o=r.doc.textBetween(i.pos,e.to,void 0," ")),i&&o){const e=o.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],l=i.pos+o.lastIndexOf(n);if(!n)return!1;const c=Wi(n).map((e=>e.toObject(t.defaultProtocol)));if(!(1===(a=c).length?a[0].isLink:3===a.length&&a[1].isLink&&["()","[]"].includes(a[0].value+a[2].value)))return!1;c.filter((t=>t.isLink)).map((t=>({...t,from:l+t.start+1,to:l+t.end+1}))).filter((t=>!r.schema.marks.code||!r.doc.rangeHasMark(t.from,t.to,r.schema.marks.code))).filter((e=>t.validate(e.value))).filter((e=>t.shouldAutoLink(e.value))).forEach((e=>{(0,At.tI)(e.from,e.to,r.doc).some((e=>e.mark.type===t.type))||s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}var a})),s.steps.length?s:void 0}})}({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!Gi(t,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),!0===this.options.openOnClick&&t.push(function(t){return new wt.Sy({key:new wt.H$("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,o;if(0!==r.button)return!1;if(!e.editable)return!1;let s=r.target;const a=[];for(;"DIV"!==s.nodeName;)a.push(s),s=s.parentNode;if(!a.find((t=>"A"===t.nodeName)))return!1;const l=(0,At.u9)(e.state,t.type.name),c=r.target,d=null!==(i=null==c?void 0:c.href)&&void 0!==i?i:l.href,p=null!==(o=null==c?void 0:c.target)&&void 0!==o?o:l.target;return!(!c||!d||(window.open(d,p),0))}}})}({type:this.type})),this.options.linkOnPaste&&t.push(function(t){return new wt.Sy({key:new wt.H$("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:i}=e,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const l=qi(a,{defaultProtocol:t.defaultProtocol}).find((t=>t.isLink&&t.value===a));return!(!a||!l)&&t.editor.commands.setMark(t.type,{href:l.href})}}})}({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}});let Ji,Qi;if("undefined"!=typeof WeakMap){let t=new WeakMap;Ji=e=>t.get(e),Qi=(e,n)=>(t.set(e,n),n)}else{let t=[],e=10,n=0;Ji=e=>{for(let n=0;n<t.length;n+=2)if(t[n]==e)return t[n+1]},Qi=(r,i)=>(n==e&&(n=0),t[n++]=r,t[n++]=i)}class to{constructor(t,e,n,r){this.left=t,this.top=e,this.right=n,this.bottom=r}}class eo{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){let n=this.map[e];if(n!=t)continue;let r=e%this.width,i=e/this.width|0,o=r+1,s=i+1;for(let t=1;o<this.width&&this.map[e+t]==n;t++)o++;for(let t=1;s<this.height&&this.map[e+this.width*t]==n;t++)s++;return new to(r,i,o,s)}throw new RangeError("No cell with offset "+t+" found")}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError("No cell with offset "+t+" found")}nextCell(t,e,n){let{left:r,right:i,top:o,bottom:s}=this.findCell(t);return"horiz"==e?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(t,e){let{left:n,right:r,top:i,bottom:o}=this.findCell(t),{left:s,right:a,top:l,bottom:c}=this.findCell(e);return new to(Math.min(n,s),Math.min(i,l),Math.max(r,a),Math.max(o,c))}cellsInRect(t){let e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){let o=r*this.width+i,s=this.map[o];n[s]||(n[s]=!0,i==t.left&&i&&this.map[o-1]==s||r==t.top&&r&&this.map[o-this.width]==s||e.push(s))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){let o=i+n.child(r).nodeSize;if(r==t){let n=e+t*this.width,r=(t+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(t){return Ji(t)||Qi(t,function(t){if("table"!=t.type.spec.tableRole)throw new RangeError("Not a table node: "+t.type.name);let e=function(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){let i=t.child(r),o=0;if(n)for(let e=0;e<r;e++){let n=t.child(e);for(let t=0;t<n.childCount;t++){let i=n.child(t);e+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let t=0;t<i.childCount;t++){let e=i.child(t);o+=e.attrs.colspan,e.attrs.rowspan>1&&(n=!0)}-1==e?e=o:e!=o&&(e=Math.max(e,o))}return e}(t),n=t.childCount,r=[],i=0,o=null,s=[];for(let t=0,i=e*n;t<i;t++)r[t]=0;for(let a=0,l=0;a<n;a++){let c=t.child(a);l++;for(let t=0;;t++){for(;i<r.length&&0!=r[i];)i++;if(t==c.childCount)break;let d=c.child(t),{colspan:p,rowspan:h,colwidth:u}=d.attrs;for(let t=0;t<h;t++){if(t+a>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:h-t});break}let c=i+t*e;for(let t=0;t<p;t++){0==r[c+t]?r[c+t]=l:(o||(o=[])).push({type:"collision",row:a,pos:l,n:p-t});let n=u&&u[t];if(n){let r=(c+t)%e*2,i=s[r];null==i||i!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):i==n&&s[r+1]++}}}i+=p,l+=d.nodeSize}let d=(a+1)*e,p=0;for(;i<d;)0==r[i++]&&p++;p&&(o||(o=[])).push({type:"missing",row:a,n:p}),l++}let a=new eo(e,n,r,o),l=!1;for(let t=0;!l&&t<s.length;t+=2)null!=s[t]&&s[t+1]<n&&(l=!0);l&&function(t,e,n){t.problems||(t.problems=[]);for(let r=0,i={};r<t.map.length;r++){let o=t.map[r];if(i[o])continue;i[o]=!0;let s=n.nodeAt(o),a=null;for(let n=0;n<s.attrs.colspan;n++){let i=e[2*((r+n)%t.width)];null==i||s.attrs.colwidth&&s.attrs.colwidth[n]==i||((a||(a=no(s.attrs)))[n]=i)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}(a,s,t);return a}(t))}}function no(t){if(t.colwidth)return t.colwidth.slice();let e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function ro(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(let n in t.nodes){let r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}const io=new wt.H$("selectingCells");function oo(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function so(t){let e=t.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function ao(t){let e=t.selection;return e.$anchorCell?e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell:e.node&&"cell"==e.node.type.spec.tableRole?e.$anchor:oo(e.$head)||function(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){let r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){let r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n-e.nodeSize)}}(e.$head)}function lo(t){return"row"==t.parent.type.spec.tableRole&&t.nodeAfter}function co(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function po(t,e,n){let r=t.start(-1),i=eo.get(t.node(-1)).nextCell(t.pos-r,e,n);return null==i?null:t.node(0).resolve(r+i)}function ho(t,e,n){let r={};for(let e in t)r[e]=t[e];return r[e]=n,r}function uo(t,e,n=1){let r=ho(t,"colspan",t.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some((t=>t>0))||(r.colwidth=null)),r}function fo(t,e,n=1){let r=ho(t,"colspan",t.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(let t=0;t<n;t++)r.colwidth.splice(e,0,0)}return r}class mo extends wt.Y1{constructor(t,e=t){let n=t.node(-1),r=eo.get(n),i=t.start(-1),o=r.rectBetween(t.pos-i,e.pos-i),s=t.node(0),a=r.cellsInRect(o).filter((t=>t!=e.pos-i));a.unshift(e.pos-i);let l=a.map((t=>{let e=n.nodeAt(t),r=t+i+1;return new wt.xm(s.resolve(r),s.resolve(r+e.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=t,this.$headCell=e}map(t,e){let n=t.resolve(e.map(this.$anchorCell.pos)),r=t.resolve(e.map(this.$headCell.pos));if(lo(n)&&lo(r)&&co(n,r)){let t=this.$anchorCell.node(-1)!=n.node(-1);return t&&this.isRowSelection()?mo.rowSelection(n,r):t&&this.isColSelection()?mo.colSelection(n,r):new mo(n,r)}return wt.Bs.between(n,r)}content(){let t=this.$anchorCell.node(-1),e=eo.get(t),n=this.$anchorCell.start(-1),r=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let n=r.top;n<r.bottom;n++){let s=[];for(let o=n*e.width+r.left,a=r.left;a<r.right;a++,o++){let n=e.map[o];if(!i[n]){i[n]=!0;let o=e.findCell(n),a=t.nodeAt(n),l=r.left-o.left,c=o.right-r.right;if(l>0||c>0){let t=a.attrs;l>0&&(t=uo(t,0,l)),c>0&&(t=uo(t,t.colspan-c,c)),a=o.left<r.left?a.type.createAndFill(t):a.type.create(t,a.content)}if(o.top<r.top||o.bottom>r.bottom){let t=ho(a.attrs,"rowspan",Math.min(o.bottom,r.bottom)-Math.max(o.top,r.top));a=o.top<r.top?a.type.createAndFill(t):a.type.create(t,a.content)}s.push(a)}}o.push(t.child(n).copy(Dn.HY.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?t:o;return new Dn.p2(Dn.HY.from(s),1,1)}replace(t,e=Dn.p2.empty){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=t.mapping.slice(n);t.replace(a.map(o.pos),a.map(s.pos),i?Dn.p2.empty:e)}let i=wt.Y1.findFrom(t.doc.resolve(t.mapping.slice(n).map(this.to)),-1);i&&t.setSelection(i)}replaceWith(t,e){this.replace(t,new Dn.p2(Dn.HY.from(e),0,0))}forEachCell(t){let e=this.$anchorCell.node(-1),n=eo.get(e),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)t(e.nodeAt(i[n]),r+i[n])}isColSelection(){let t=this.$anchorCell.index(-1),e=this.$headCell.index(-1);if(Math.min(t,e)>0)return!1;let n=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,e=t){let n=eo.get(t.node(-1)),r=t.start(-1),i=n.findCell(t.pos-r),o=n.findCell(e.pos-r),s=t.node(0);return i.top<=o.top?(i.top>0&&(t=s.resolve(r+n.map[i.left])),o.bottom<n.height&&(e=s.resolve(r+n.map[n.width*(n.height-1)+o.right-1]))):(o.top>0&&(e=s.resolve(r+n.map[o.left])),i.bottom<n.height&&(t=s.resolve(r+n.map[n.width*(n.height-1)+i.right-1]))),new mo(t,e)}isRowSelection(){let t=eo.get(this.$anchorCell.node(-1)),e=this.$anchorCell.start(-1),n=t.colCount(this.$anchorCell.pos-e),r=t.colCount(this.$headCell.pos-e);if(Math.min(n,r)>0)return!1;let i=n+this.$anchorCell.nodeAfter.attrs.colspan,o=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,o)==t.width}eq(t){return t instanceof mo&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,e=t){let n=eo.get(t.node(-1)),r=t.start(-1),i=n.findCell(t.pos-r),o=n.findCell(e.pos-r),s=t.node(0);return i.left<=o.left?(i.left>0&&(t=s.resolve(r+n.map[i.top*n.width])),o.right<n.width&&(e=s.resolve(r+n.map[n.width*(o.top+1)-1]))):(o.left>0&&(e=s.resolve(r+n.map[o.top*n.width])),i.right<n.width&&(t=s.resolve(r+n.map[n.width*(i.top+1)-1]))),new mo(t,e)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,e){return new mo(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){return new mo(t.resolve(e),t.resolve(n))}getBookmark(){return new go(this.$anchorCell.pos,this.$headCell.pos)}}mo.prototype.visible=!1,wt.Y1.jsonID("cell",mo);class go{constructor(t,e){this.anchor=t,this.head=e}map(t){return new go(t.map(this.anchor),t.map(this.head))}resolve(t){let e=t.resolve(this.anchor),n=t.resolve(this.head);return"row"==e.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&e.index()<e.parent.childCount&&n.index()<n.parent.childCount&&co(e,n)?new mo(e,n):wt.Y1.near(n,1)}}function bo(t){if(!(t.selection instanceof mo))return null;let e=[];return t.selection.forEachCell(((t,n)=>{e.push(_t.p.node(n,n+t.nodeSize,{class:"selectedCell"}))})),_t.EH.create(t.doc,e)}function yo(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;1==e.childCount&&(n>0&&r>0||"table"==e.firstChild.type.spec.tableRole);)n--,r--,e=e.firstChild.content;let i=e.firstChild,o=i.type.spec.tableRole,s=i.type.schema,a=[];if("row"==o)for(let t=0;t<e.childCount;t++){let i=e.child(t).content,o=t?0:Math.max(0,n-1),l=t<e.childCount-1?0:Math.max(0,r-1);(o||l)&&(i=Ao(ro(s).row,new Dn.p2(i,o,l)).content),a.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;a.push(n||r?Ao(ro(s).row,new Dn.p2(e,n,r)).content:e)}return function(t,e){let n=[];for(let t=0;t<e.length;t++){let r=e[t];for(let e=r.childCount-1;e>=0;e--){let{rowspan:i,colspan:o}=r.child(e).attrs;for(let e=t;e<t+i;e++)n[e]=(n[e]||0)+o}}let r=0;for(let t=0;t<n.length;t++)r=Math.max(r,n[t]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(Dn.HY.empty),n[i]<r){let o=ro(t).cell.createAndFill(),s=[];for(let t=n[i];t<r;t++)s.push(o);e[i]=e[i].append(Dn.HY.from(s))}return{height:e.length,width:r,rows:e}}(s,a)}function Ao(t,e){let n=t.createAndFill();return new qt.wx(n).replace(0,n.content.size,e).doc}function wo(t,e,n,r,i,o,s,a){if(0==s||s==e.height)return!1;let l=!1;for(let c=i;c<o;c++){let i=s*e.width+c,o=e.map[i];if(e.map[i-e.width]==o){l=!0;let i=n.nodeAt(o),{top:d,left:p}=e.findCell(o);t.setNodeMarkup(t.mapping.slice(a).map(o+r),null,ho(i.attrs,"rowspan",s-d)),t.insert(t.mapping.slice(a).map(e.positionAt(s,p,n)),i.type.createAndFill(ho(i.attrs,"rowspan",d+i.attrs.rowspan-s))),c+=i.attrs.colspan-1}}return l}function vo(t,e,n,r,i,o,s,a){if(0==s||s==e.width)return!1;let l=!1;for(let c=i;c<o;c++){let i=c*e.width+s,o=e.map[i];if(e.map[i-1]==o){l=!0;let i=n.nodeAt(o),d=e.colCount(o),p=t.mapping.slice(a).map(o+r);t.setNodeMarkup(p,null,uo(i.attrs,s-d,i.attrs.colspan-(s-d))),t.insert(p+i.nodeSize,i.type.createAndFill(uo(i.attrs,0,s-d))),c+=i.attrs.rowspan-1}}return l}function xo(t,e,n,r,i){let o=n?t.doc.nodeAt(n-1):t.doc,s=eo.get(o),{top:a,left:l}=r,c=l+i.width,d=a+i.height,p=t.tr,h=0;function u(){o=n?p.doc.nodeAt(n-1):p.doc,s=eo.get(o),h=p.mapping.maps.length}(function(t,e,n,r,i,o,s){let a,l,c=ro(t.doc.type.schema);if(i>e.width)for(let o=0,d=0;o<e.height;o++){let p=n.child(o);d+=p.nodeSize;let h,u=[];h=null==p.lastChild||p.lastChild.type==c.cell?a||(a=c.cell.createAndFill()):l||(l=c.header_cell.createAndFill());for(let t=e.width;t<i;t++)u.push(h);t.insert(t.mapping.slice(s).map(d-1+r),u)}if(o>e.height){let d=[];for(let t=0,r=(e.height-1)*e.width;t<Math.max(e.width,i);t++){let i=!(t>=e.width)&&n.nodeAt(e.map[r+t]).type==c.header_cell;d.push(i?l||(l=c.header_cell.createAndFill()):a||(a=c.cell.createAndFill()))}let p=c.row.create(null,Dn.HY.from(d)),h=[];for(let t=e.height;t<o;t++)h.push(p);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),h)}return!(!a&&!l)})(p,s,o,n,c,d,h)&&u(),wo(p,s,o,n,l,c,a,h)&&u(),wo(p,s,o,n,l,c,d,h)&&u(),vo(p,s,o,n,a,d,l,h)&&u(),vo(p,s,o,n,a,d,c,h)&&u();for(let t=a;t<d;t++){let e=s.positionAt(t,l,o),r=s.positionAt(t,c,o);p.replace(p.mapping.slice(h).map(e+n),p.mapping.slice(h).map(r+n),new Dn.p2(i.rows[t-a],0,0))}u(),p.setSelection(new mo(p.doc.resolve(n+s.positionAt(a,l,o)),p.doc.resolve(n+s.positionAt(d-1,c-1,o)))),e(p)}const _o=(0,Pn.$)({ArrowLeft:Co("horiz",-1),ArrowRight:Co("horiz",1),ArrowUp:Co("vert",-1),ArrowDown:Co("vert",1),"Shift-ArrowLeft":Eo("horiz",-1),"Shift-ArrowRight":Eo("horiz",1),"Shift-ArrowUp":Eo("vert",-1),"Shift-ArrowDown":Eo("vert",1),Backspace:So,"Mod-Backspace":So,Delete:So,"Mod-Delete":So});function ko(t,e,n){return!n.eq(t.selection)&&(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Co(t,e){return(n,r,i)=>{let o=n.selection;if(o instanceof mo)return ko(n,r,wt.Y1.near(o.$headCell,e));if("horiz"!=t&&!o.empty)return!1;let s=$o(i,t,e);if(null==s)return!1;if("horiz"==t)return ko(n,r,wt.Y1.near(n.doc.resolve(o.head+e),e));{let i,o=n.doc.resolve(s),a=po(o,t,e);return i=a?wt.Y1.near(a,1):e<0?wt.Y1.near(n.doc.resolve(o.before(-1)),-1):wt.Y1.near(n.doc.resolve(o.after(-1)),1),ko(n,r,i)}}}function Eo(t,e){return(n,r,i)=>{let o=n.selection;if(!(o instanceof mo)){let r=$o(i,t,e);if(null==r)return!1;o=new mo(n.doc.resolve(r))}let s=po(o.$headCell,t,e);return!!s&&ko(n,r,new mo(o.$anchorCell,s))}}function So(t,e){let n=t.selection;if(!(n instanceof mo))return!1;if(e){let r=t.tr,i=ro(t.schema).cell.createAndFill().content;n.forEachCell(((t,e)=>{t.content.eq(i)||r.replace(r.mapping.map(e+1),r.mapping.map(e+t.nodeSize-1),new Dn.p2(i,0,0))})),r.docChanged&&e(r)}return!0}function Bo(t,e){let n=oo(t.state.doc.resolve(e));return!!n&&(t.dispatch(t.state.tr.setSelection(new mo(n))),!0)}function Oo(t,e,n){if(!so(t.state))return!1;let r=yo(n),i=t.state.selection;if(i instanceof mo){r||(r={width:1,height:1,rows:[Dn.HY.from(Ao(ro(t.state.schema).cell,n))]});let e=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=eo.get(e).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=function({width:t,height:e,rows:n},r,i){if(t!=r){let e=[],i=[];for(let t=0;t<n.length;t++){let o=n[t],s=[];for(let n=e[t]||0,i=0;n<r;i++){let a=o.child(i%o.childCount);n+a.attrs.colspan>r&&(a=a.type.create(uo(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)e[t+n]=(e[t+n]||0)+a.attrs.colspan}i.push(Dn.HY.from(s))}n=i,t=r}if(e!=i){let t=[];for(let r=0,o=0;r<i;r++,o++){let s=[],a=n[o%e];for(let t=0;t<a.childCount;t++){let e=a.child(t);r+e.attrs.rowspan>i&&(e=e.type.create(ho(e.attrs,"rowspan",Math.max(1,i-e.attrs.rowspan)),e.content)),s.push(e)}t.push(Dn.HY.from(s))}n=t,e=i}return{width:t,height:e,rows:n}}(r,s.right-s.left,s.bottom-s.top),xo(t.state,t.dispatch,o,s,r),!0}if(r){let e=ao(t.state),n=e.start(-1);return xo(t.state,t.dispatch,n,eo.get(e.node(-1)).findCell(e.pos-n),r),!0}return!1}function Mo(t,e){if(e.ctrlKey||e.metaKey)return;let n,r=Io(t,e.target);if(e.shiftKey&&t.state.selection instanceof mo)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&null!=(n=oo(t.state.selection.$anchor))&&To(t,e).pos!=n.pos)i(n,e),e.preventDefault();else if(!r)return;function i(e,n){let r=To(t,n),i=null==io.getState(t.state);if(!r||!co(e,r)){if(!i)return;r=e}let o=new mo(e,r);if(i||!t.state.selection.eq(o)){let n=t.state.tr.setSelection(o);i&&n.setMeta(io,e.pos),t.dispatch(n)}}function o(){t.root.removeEventListener("mouseup",o),t.root.removeEventListener("dragstart",o),t.root.removeEventListener("mousemove",s),null!=io.getState(t.state)&&t.dispatch(t.state.tr.setMeta(io,-1))}function s(n){let s,a=io.getState(t.state);if(null!=a)s=t.state.doc.resolve(a);else if(Io(t,n.target)!=r&&(s=To(t,e),!s))return o();s&&i(s,n)}t.root.addEventListener("mouseup",o),t.root.addEventListener("dragstart",o),t.root.addEventListener("mousemove",s)}function $o(t,e,n){if(!(t.state.selection instanceof wt.Bs))return null;let{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){let o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))return null;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){let o=r.before(i),s="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(s)?o:null}}return null}function Io(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e}function To(t,e){let n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?oo(t.state.doc.resolve(n.pos)):null}const Lo=new wt.H$("fix-tables");function No(t,e,n,r){let i=t.childCount,o=e.childCount;t:for(let s=0,a=0;s<o;s++){let o=e.child(s);for(let e=a,r=Math.min(i,s+3);e<r;e++)if(t.child(e)==o){a=e+1,n+=o.nodeSize;continue t}r(o,n),a<i&&t.child(a).sameMarkup(o)?No(t.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function Ro(t,e){let n,r=(e,r)=>{"table"==e.type.spec.tableRole&&(n=function(t,e,n,r){let i=eo.get(e);if(!i.problems)return r;r||(r=t.tr);let o,s,a=[];for(let t=0;t<i.height;t++)a.push(0);for(let t=0;t<i.problems.length;t++){let o=i.problems[t];if("collision"==o.type){let t=e.nodeAt(o.pos);for(let e=0;e<t.attrs.rowspan;e++)a[o.row+e]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,uo(t.attrs,t.attrs.colspan-o.n,o.n))}else if("missing"==o.type)a[o.row]+=o.n;else if("overlong_rowspan"==o.type){let t=e.nodeAt(o.pos);r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,ho(t.attrs,"rowspan",t.attrs.rowspan-o.n))}else if("colwidth mismatch"==o.type){let t=e.nodeAt(o.pos);r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,ho(t.attrs,"colwidth",o.colwidth))}}for(let t=0;t<a.length;t++)a[t]&&(null==o&&(o=t),s=t);for(let l=0,c=n+1;l<i.height;l++){let n=e.child(l),i=c+n.nodeSize,d=a[l];if(d>0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<d;n++)a.push(ro(t.schema)[e].createAndFill());let p=0!=l&&o!=l-1||s!=l?i-1:c+1;r.insert(r.mapping.map(p),a)}c=i}return r.setMeta(Lo,{fixTables:!0})}(t,e,r,n))};return e?e.doc!=t.doc&&No(e.doc,t.doc,0,r):t.doc.descendants(r),n}function Po(t){let e,n=t.selection,r=ao(t),i=r.node(-1),o=r.start(-1),s=eo.get(i);return e=n instanceof mo?s.rectBetween(n.$anchorCell.pos-o,n.$headCell.pos-o):s.findCell(r.pos-o),e.tableStart=o,e.map=s,e.table=i,e}function Do(t,{map:e,tableStart:n,table:r},i){let o=i>0?-1:0;(function(t,e,n){let r=ro(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0})(e,r,i+o)&&(o=0==i||i==e.width?null:0);for(let s=0;s<e.height;s++){let a=s*e.width+i;if(i>0&&i<e.width&&e.map[a-1]==e.map[a]){let o=e.map[a],l=r.nodeAt(o);t.setNodeMarkup(t.mapping.map(n+o),null,fo(l.attrs,i-e.colCount(o))),s+=l.attrs.rowspan-1}else{let l=null==o?ro(r.type.schema).cell:r.nodeAt(e.map[a+o]).type,c=e.positionAt(s,i,r);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function zo(t,{map:e,table:n,tableStart:r},i){let o=t.mapping.maps.length;for(let s=0;s<e.height;){let a=s*e.width+i,l=e.map[a],c=n.nodeAt(l);if(i>0&&e.map[a-1]==l||i<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(o).map(r+l),null,uo(c.attrs,i-e.colCount(l)));else{let e=t.mapping.slice(o).map(r+l);t.delete(e,e+c.nodeSize)}s+=c.attrs.rowspan}}function Ho(t,{map:e,tableStart:n,table:r},i){let o=n;for(let t=0;t<i;t++)o+=r.child(t).nodeSize;let s=[],a=i>0?-1:0;(function(t,e,n){let r=ro(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(e.nodeAt(t.map[i+n*t.width]).type!=r)return!1;return!0})(e,r,i+a)&&(a=0==i||i==e.height?null:0);for(let o=0,l=e.width*i;o<e.width;o++,l++)if(i>0&&i<e.height&&e.map[l]==e.map[l-e.width]){let i=e.map[l],s=r.nodeAt(i).attrs;t.setNodeMarkup(n+i,null,ho(s,"rowspan",s.rowspan+1)),o+=s.colspan-1}else{let t=null==a?ro(r.type.schema).cell:r.nodeAt(e.map[l+a*e.width]).type;s.push(t.createAndFill())}return t.insert(o,ro(r.type.schema).row.create(null,s)),t}function jo(t,{map:e,table:n,tableStart:r},i){let o=0;for(let t=0;t<i;t++)o+=n.child(t).nodeSize;let s=o+n.child(i).nodeSize,a=t.mapping.maps.length;t.delete(o+r,s+r);for(let o=0,s=i*e.width;o<e.width;o++,s++){let l=e.map[s];if(i>0&&l==e.map[s-e.width]){let e=n.nodeAt(l).attrs;t.setNodeMarkup(t.mapping.slice(a).map(l+r),null,ho(e,"rowspan",e.rowspan-1)),o+=e.colspan-1}else if(i<e.width&&l==e.map[s+e.width]){let s=n.nodeAt(l),c=s.type.create(ho(s.attrs,"rowspan",s.attrs.rowspan-1),s.content),d=e.positionAt(i+1,o,n);t.insert(t.mapping.slice(a).map(r+d),c),o+=s.attrs.colspan-1}}}function Uo(t){let e=t.content;return 1==e.childCount&&e.firstChild.isTextblock&&0==e.firstChild.childCount}function Zo(t,e){let n=t.selection;if(!(n instanceof mo)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=Po(t),{map:i}=r;if(function({width:t,height:e,map:n},r){let i=r.top*t+r.left,o=i,s=(r.bottom-1)*t+r.left,a=i+(r.right-r.left-1);for(let e=r.top;e<r.bottom;e++){if(r.left>0&&n[o]==n[o-1]||r.right<t&&n[a]==n[a+1])return!0;o+=t,a+=t}for(let o=r.left;o<r.right;o++){if(r.top>0&&n[i]==n[i-t]||r.bottom<e&&n[s]==n[s+t])return!0;i++,s++}return!1}(i,r))return!1;if(e){let n,o,s=t.tr,a={},l=Dn.HY.empty;for(let t=r.top;t<r.bottom;t++)for(let e=r.left;e<r.right;e++){let c=i.map[t*i.width+e],d=r.table.nodeAt(c);if(!a[c])if(a[c]=!0,null==n)n=c,o=d;else{Uo(d)||(l=l.append(d.content));let t=s.mapping.map(c+r.tableStart);s.delete(t,t+d.nodeSize)}}if(s.setNodeMarkup(n+r.tableStart,null,ho(fo(o.attrs,o.attrs.colspan,r.right-r.left-o.attrs.colspan),"rowspan",r.bottom-r.top)),l.size){let t=n+1+o.content.size,e=Uo(o)?n+1:t;s.replaceWith(e+r.tableStart,t+r.tableStart,l)}s.setSelection(new mo(s.doc.resolve(n+r.tableStart))),e(s)}return!0}function Fo(t,e){const n=ro(t.schema);return(r=({node:t})=>n[t.type.spec.tableRole],(t,e)=>{let n,i,o=t.selection;if(o instanceof mo){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;n=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{if(n=function(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}(o.$from),!n)return!1;i=oo(o.$from).pos}if(1==n.attrs.colspan&&1==n.attrs.rowspan)return!1;if(e){let s=n.attrs,a=[],l=s.colwidth;s.rowspan>1&&(s=ho(s,"rowspan",1)),s.colspan>1&&(s=ho(s,"colspan",1));let c,d=Po(t),p=t.tr;for(let t=0;t<d.right-d.left;t++)a.push(l?ho(s,"colwidth",l&&l[t]?[l[t]]:null):s);for(let t=d.top;t<d.bottom;t++){let e=d.map.positionAt(t,d.left,d.table);t==d.top&&(e+=n.nodeSize);for(let i=d.left,o=0;i<d.right;i++,o++)i==d.left&&t==d.top||p.insert(c=p.mapping.map(e+d.tableStart,1),r({node:n,row:t,col:i}).createAndFill(a[o]))}p.setNodeMarkup(i,r({node:n,row:d.top,col:d.left}),a[0]),o instanceof mo&&p.setSelection(new mo(p.doc.resolve(o.$anchorCell.pos),c&&p.doc.resolve(c))),e(p)}return!0})(t,e);var r}function Vo(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:"row"==t?e.map.width:1,bottom:"column"==t?e.map.height:1});for(let t=0;t<r.length;t++){const i=e.table.nodeAt(r[t]);if(i&&i.type!==n.header_cell)return!1}return!0}function Yo(t,e){return(e=e||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(t){return function(e,n){if(!so(e))return!1;if(n){let r=ro(e.schema),i=Po(e),o=e.tr,s=i.map.cellsInRect("column"==t?new to(i.left,0,i.right,i.map.height):"row"==t?new to(0,i.top,i.map.width,i.bottom):i),a=s.map((t=>i.table.nodeAt(t)));for(let t=0;t<s.length;t++)a[t].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[t],r.cell,a[t].attrs);if(0==o.steps.length)for(let t=0;t<s.length;t++)o.setNodeMarkup(i.tableStart+s[t],r.header_cell,a[t].attrs);n(o)}return!0}}(t):function(e,n){if(!so(e))return!1;if(n){let r=ro(e.schema),i=Po(e),o=e.tr,s=Vo("row",i,r),a=Vo("column",i,r),l=("column"===t?s:"row"===t&&a)?1:0,c="column"==t?new to(0,l,1,i.map.height):"row"==t?new to(l,0,i.map.width,1):i,d="column"==t?a?r.cell:r.header_cell:"row"==t?s?r.cell:r.header_cell:r.cell;i.map.cellsInRect(c).forEach((t=>{const e=t+i.tableStart,n=o.doc.nodeAt(e);n&&o.setNodeMarkup(e,d,n.attrs)})),n(o)}return!0}}Yo("row",{useDeprecatedLogic:!0}),Yo("column",{useDeprecatedLogic:!0});let Wo=Yo("cell",{useDeprecatedLogic:!0});function qo(t){return function(e,n){if(!so(e))return!1;let r=function(t,e){if(e<0){let e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let e=t.index(-1)-1,n=t.before();e>=0;e--){let r=t.node(-1).child(e);if(r.childCount)return n-1-r.lastChild.nodeSize;n-=r.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;let e=t.node(-1);for(let n=t.indexAfter(-1),r=t.after();n<e.childCount;n++){let t=e.child(n);if(t.childCount)return r+1;r+=t.nodeSize}}}(ao(e),t);if(null!=r){if(n){let t=e.doc.resolve(r);n(e.tr.setSelection(wt.Bs.between(t,(i=t,i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)))).scrollIntoView())}var i;return!0}}}class Xo{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Go(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,Go(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}}function Go(t,e,n,r,i,o){let s=0,a=!0,l=e.firstChild,c=t.firstChild;for(let t=0,n=0;t<c.childCount;t++){let{colspan:d,colwidth:p}=c.child(t).attrs;for(let t=0;t<d;t++,n++){let c=i==n?o:p&&p[t],d=c?c+"px":"";s+=c||r,c||(a=!1),l?(l.style.width!=d&&(l.style.width=d),l=l.nextSibling):e.appendChild(document.createElement("col")).style.width=d}}for(;l;){let t=l.nextSibling;l.parentNode.removeChild(l),l=t}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}const Ko=new wt.H$("tableColumnResizing");function Jo({handleWidth:t=5,cellMinWidth:e=25,View:n=Xo,lastColumnResizable:r=!0}={}){let i=new wt.Sy({key:Ko,state:{init(t,r){return this.spec.props.nodeViews[ro(r.schema).table.name]=(t,r)=>new n(t,e,r),new Qo(-1,!1)},apply:(t,e)=>e.apply(t)},props:{attributes:t=>Ko.getState(t).activeHandle>-1?{class:"resize-cursor"}:null,handleDOMEvents:{mousemove(e,n){!function(t,e,n,r,i){let o=Ko.getState(t.state);if(!o.dragging){let r=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target),s=-1;if(r){let{left:i,right:o}=r.getBoundingClientRect();e.clientX-i<=n?s=ts(t,e,"left"):o-e.clientX<=n&&(s=ts(t,e,"right"))}if(s!=o.activeHandle){if(!i&&-1!==s){let e=t.state.doc.resolve(s),n=e.node(-1),r=eo.get(n),i=e.start(-1);if(r.colCount(e.pos-i)+e.nodeAfter.attrs.colspan-1==r.width-1)return}ns(t,s)}}}(e,n,t,0,r)},mouseleave(t){!function(t){let e=Ko.getState(t.state);e.activeHandle>-1&&!e.dragging&&ns(t,-1)}(t)},mousedown(t,n){!function(t,e,n){let r=Ko.getState(t.state);if(-1==r.activeHandle||r.dragging)return!1;let i=t.state.doc.nodeAt(r.activeHandle),o=function(t,e,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let o=t.domAtPos(e),s=o.node.childNodes[o.offset].offsetWidth,a=n;if(r)for(let t=0;t<n;t++)r[t]&&(s-=r[t],a--);return s/a}(t,r.activeHandle,i.attrs);function s(e){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);let r=Ko.getState(t.state);r.dragging&&(!function(t,e,n){let r=t.state.doc.resolve(e),i=r.node(-1),o=eo.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let t=0;t<o.height;t++){let e=t*o.width+a;if(t&&o.map[e]==o.map[e-o.width])continue;let r=o.map[e],{attrs:c}=i.nodeAt(r),d=1==c.colspan?0:a-o.colCount(r);if(c.colwidth&&c.colwidth[d]==n)continue;let p=c.colwidth?c.colwidth.slice():rs(c.colspan);p[d]=n,l.setNodeMarkup(s+r,null,ho(c,"colwidth",p))}l.docChanged&&t.dispatch(l)}(t,r.activeHandle,es(r.dragging,e,n)),t.dispatch(t.state.tr.setMeta(Ko,{setDragging:null})))}function a(e){if(!e.which)return s(e);let r=Ko.getState(t.state),i=es(r.dragging,e,n);!function(t,e,n,r){let i=t.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),a=eo.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=t.domAtPos(i.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;Go(o,l.firstChild,l,r,a,n)}(t,r.activeHandle,i,n)}t.dispatch(t.state.tr.setMeta(Ko,{setDragging:{startX:e.clientX,startWidth:o}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),e.preventDefault()}(t,n,e)}},decorations(t){let e=Ko.getState(t);if(e.activeHandle>-1)return function(t,e){let n=[],r=t.doc.resolve(e),i=r.node(-1),o=eo.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let t=0;t<o.height;t++){let e=a+t*o.width-1;if(!(a!=o.width&&o.map[e]==o.map[e+1]||0!=t&&o.map[e-1]==o.map[e-1-o.width])){let t=o.map[e],r=s+t+i.nodeAt(t).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(_t.p.widget(r,a))}}return _t.EH.create(t.doc,n)}(t,e.activeHandle)},nodeViews:{}}});return i}class Qo{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(t){let e=this,n=t.getMeta(Ko);if(n&&null!=n.setHandle)return new Qo(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Qo(e.activeHandle,n.setDragging);if(e.activeHandle>-1&&t.docChanged){let n=t.mapping.map(e.activeHandle,-1);lo(t.doc.resolve(n))||(n=null),e=new Qo(n,e.dragging)}return e}}function ts(t,e,n){let r=t.posAtCoords({left:e.clientX,top:e.clientY});if(!r)return-1;let{pos:i}=r,o=oo(t.state.doc.resolve(i));if(!o)return-1;if("right"==n)return o.pos;let s=eo.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function es(t,e,n){let r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function ns(t,e){t.dispatch(t.state.tr.setMeta(Ko,{setHandle:e}))}function rs(t){let e=[];for(let n=0;n<t;n++)e.push(0);return e}function is({allowTableNodeSelection:t=!1}={}){return new wt.Sy({key:io,state:{init:()=>null,apply(t,e){let n=t.getMeta(io);if(null!=n)return-1==n?null:n;if(null==e||!t.docChanged)return e;let{deleted:r,pos:i}=t.mapping.mapResult(e);return r?null:i}},props:{decorations:bo,handleDOMEvents:{mousedown:Mo},createSelectionBetween(t){if(null!=io.getState(t.state))return t.state.selection},handleTripleClick:Bo,handleKeyDown:_o,handlePaste:Oo},appendTransaction:(e,n,r)=>function(t,e,n){let r,i,o=(e||t).selection,s=(e||t).doc;if(o instanceof wt.qv&&(i=o.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=mo.create(s,o.from);else if("row"==i){let t=s.resolve(o.from+1);r=mo.rowSelection(t,t)}else if(!n){let t=eo.get(o.node),e=o.from+1,n=e+t.map[t.width*t.height-1];r=mo.create(s,e+1,n)}}else o instanceof wt.Bs&&function({$from:t,$to:e}){if(t.pos==e.pos||t.pos<t.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let t=e.depth;t>=0&&!(e.before(t+1)>e.start(t));t--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}(o)?r=wt.Bs.create(s,o.from):o instanceof wt.Bs&&function({$from:t,$to:e}){let n,r;for(let e=t.depth;e>0;e--){let r=t.node(e);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let t=e.depth;t>0;t--){let n=e.node(t);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===e.parentOffset}(o)&&(r=wt.Bs.create(s,o.$from.start(),o.$from.end()));return r&&(e||(e=t.tr)).setSelection(r),e}(r,Ro(r,n),t)})}function os(t,e){return e?t.createChecked(null,e):t.createAndFill()}function ss(t,e,n,r,i){const o=function(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach((n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)})),t.cached.tableNodeTypes=e,e}(t),s=[],a=[];for(let t=0;t<n;t+=1){const t=os(o.cell,i);if(t&&a.push(t),r){const t=os(o.header_cell,i);t&&s.push(t)}}const l=[];for(let t=0;t<e;t+=1)l.push(o.row.createChecked(null,r&&0===t?s:a));return o.table.createChecked(null,l)}const as=t=>{let{editor:e}=t;const{selection:n}=e.state;if(!(n instanceof mo))return!1;let r=0;const i=(0,At.qv)(n.ranges[0].$from,(t=>"table"===t.type.name));i?.node.descendants((t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(r+=1)}));return r===n.ranges.length&&(e.commands.deleteTable(),!0)};function ls(t,e,n,r,i,o){let s=0,a=!0,l=e.firstChild;const c=t.firstChild;for(let t=0,n=0;t<c.childCount;t+=1){const{colspan:d,colwidth:p}=c.child(t).attrs;for(let t=0;t<d;t+=1,n+=1){const c=i===n?o:p&&p[t],d=c?`${c}px`:"";s+=c||r,c||(a=!1),l?(l.style.width!==d&&(l.style.width=d),l=l.nextSibling):e.appendChild(document.createElement("col")).style.width=d}}for(;l;){const t=l.nextSibling;l.parentNode.removeChild(l),l=t}n.style.width="50%"}class cs{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.margin="auto",this.colgroup=this.table.appendChild(document.createElement("colgroup")),ls(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type===this.node.type&&(this.node=t,ls(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"===t.type&&(t.target===this.table||this.colgroup.contains(t.target))}}function ds(t,e,n,r,i,o){let s=0,a=!0,l=e.firstChild;const c=t.firstChild;for(let t=0,n=0;t<c.childCount;t+=1){const{colspan:d,colwidth:p}=c.child(t).attrs;for(let t=0;t<d;t+=1,n+=1){const c=i===n?o:p&&p[t],d=c?`${c}px`:"";s+=c||r,c||(a=!1),l?(l.style.width!==d&&(l.style.width=d),l=l.nextSibling):e.appendChild(document.createElement("col")).style.width=d}}for(;l;){const t=l.nextSibling;l.parentNode.removeChild(l),l=t}}class ps{constructor(t,e,n,r){const{width:i}=r;this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.classList.add("cdtr-table-element"),this.table.style.margin="auto",this.table.style.width=i,this.colgroup=this.table.appendChild(document.createElement("colgroup")),ds(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type===this.node.type&&(this.node=t,ds(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"===t.type&&(t.target===this.table||this.colgroup.contains(t.target))}}let hs,us;if("undefined"!=typeof WeakMap){let t=new WeakMap;hs=e=>t.get(e),us=(e,n)=>(t.set(e,n),n)}else{let t=[],e=10,n=0;hs=e=>{for(let n=0;n<t.length;n+=2)if(t[n]==e)return t[n+1]},us=(r,i)=>(n==e&&(n=0),t[n++]=r,t[n++]=i)}class fs{constructor(t,e,n,r){this.left=t,this.top=e,this.right=n,this.bottom=r}}class ms{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){let n=this.map[e];if(n!=t)continue;let r=e%this.width,i=e/this.width|0,o=r+1,s=i+1;for(let t=1;o<this.width&&this.map[e+t]==n;t++)o++;for(let t=1;s<this.height&&this.map[e+this.width*t]==n;t++)s++;return new fs(r,i,o,s)}throw new RangeError("No cell with offset "+t+" found")}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError("No cell with offset "+t+" found")}nextCell(t,e,n){let{left:r,right:i,top:o,bottom:s}=this.findCell(t);return"horiz"==e?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(t,e){let{left:n,right:r,top:i,bottom:o}=this.findCell(t),{left:s,right:a,top:l,bottom:c}=this.findCell(e);return new fs(Math.min(n,s),Math.min(i,l),Math.max(r,a),Math.max(o,c))}cellsInRect(t){let e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){let o=r*this.width+i,s=this.map[o];n[s]||(n[s]=!0,i==t.left&&i&&this.map[o-1]==s||r==t.top&&r&&this.map[o-this.width]==s||e.push(s))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){let o=i+n.child(r).nodeSize;if(r==t){let n=e+t*this.width,r=(t+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(t){return hs(t)||us(t,function(t){if("table"!=t.type.spec.tableRole)throw new RangeError("Not a table node: "+t.type.name);let e=function(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){let i=t.child(r),o=0;if(n)for(let e=0;e<r;e++){let n=t.child(e);for(let t=0;t<n.childCount;t++){let i=n.child(t);e+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let t=0;t<i.childCount;t++){let e=i.child(t);o+=e.attrs.colspan,e.attrs.rowspan>1&&(n=!0)}-1==e?e=o:e!=o&&(e=Math.max(e,o))}return e}(t),n=t.childCount,r=[],i=0,o=null,s=[];for(let t=0,i=e*n;t<i;t++)r[t]=0;for(let a=0,l=0;a<n;a++){let c=t.child(a);l++;for(let t=0;;t++){for(;i<r.length&&0!=r[i];)i++;if(t==c.childCount)break;let d=c.child(t),{colspan:p,rowspan:h,colwidth:u}=d.attrs;for(let t=0;t<h;t++){if(t+a>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:h-t});break}let c=i+t*e;for(let t=0;t<p;t++){0==r[c+t]?r[c+t]=l:(o||(o=[])).push({type:"collision",row:a,pos:l,n:p-t});let n=u&&u[t];if(n){let r=(c+t)%e*2,i=s[r];null==i||i!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):i==n&&s[r+1]++}}}i+=p,l+=d.nodeSize}let d=(a+1)*e,p=0;for(;i<d;)0==r[i++]&&p++;p&&(o||(o=[])).push({type:"missing",row:a,n:p}),l++}let a=new ms(e,n,r,o),l=!1;for(let t=0;!l&&t<s.length;t+=2)null!=s[t]&&s[t+1]<n&&(l=!0);l&&function(t,e,n){t.problems||(t.problems=[]);for(let r=0,i={};r<t.map.length;r++){let o=t.map[r];if(i[o])continue;i[o]=!0;let s=n.nodeAt(o),a=null;for(let n=0;n<s.attrs.colspan;n++){let i=e[2*((r+n)%t.width)];null==i||s.attrs.colwidth&&s.attrs.colwidth[n]==i||((a||(a=gs(s.attrs)))[n]=i)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}(a,s,t);return a}(t))}}function gs(t){if(t.colwidth)return t.colwidth.slice();let e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}new wt.H$("selectingCells");function bs(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function ys(t,e,n){let r={};for(let e in t)r[e]=t[e];return r[e]=n,r}const As=new wt.H$("tableColumnSimple");function ws(){let{handleWidth:t=5,cellMinWidth:e=25,width:n="100%",View:r=ps,lastColumnResizable:i=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new wt.Sy({key:As,state:{init(t,i){return this.spec.props.nodeViews[function(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(let n in t.nodes){let r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}(i.schema).table.name]=(t,i)=>new r(t,e,i,{width:n}),new vs(-1,!1)},apply:(t,e)=>e.apply(t)},props:{attributes:t=>As.getState(t).activeHandle>-1?{class:"resize-cursor"}:null,handleDOMEvents:{mousemove(e,n){!function(t,e,n,r,i){let o=As.getState(t.state);if(!o.dragging){let r=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target),s=-1;if(r){let{left:i,right:o}=r.getBoundingClientRect();e.clientX-i<=n?s=xs(t,e,"left"):o-e.clientX<=n&&(s=xs(t,e,"right"))}if(s!=o.activeHandle){if(!i&&-1!==s){let e=t.state.doc.resolve(s),n=e.node(-1),r=ms.get(n),i=e.start(-1);if(r.colCount(e.pos-i)+e.nodeAfter.attrs.colspan-1==r.width-1)return}ks(t,s)}}}(e,n,t,0,i)},mouseleave(t){!function(t){let e=As.getState(t.state);e.activeHandle>-1&&!e.dragging&&ks(t,-1)}(t)},mousedown(t,n){!function(t,e,n){let r=As.getState(t.state);if(-1==r.activeHandle||r.dragging)return!1;let i=t.state.doc.nodeAt(r.activeHandle),o=function(t,e,n){let{colspan:r,colwidth:i}=n,o=i&&i[i.length-1];if(o)return o;let s=t.domAtPos(e),a=s.node.childNodes[s.offset].offsetWidth,l=r;if(i)for(let t=0;t<r;t++)i[t]&&(a-=i[t],l--);return a/l}(t,r.activeHandle,i.attrs);function s(e){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);let r=As.getState(t.state);r.dragging&&(!function(t,e,n){let r=t.state.doc.resolve(e),i=r.node(-1),o=ms.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let t=0;t<o.height;t++){let e=t*o.width+a;if(t&&o.map[e]==o.map[e-o.width])continue;let r=o.map[e],{attrs:c}=i.nodeAt(r),d=1==c.colspan?0:a-o.colCount(r);if(c.colwidth&&c.colwidth[d]==n)continue;let p=c.colwidth?c.colwidth.slice():Cs(c.colspan);p[d]=n,l.setNodeMarkup(s+r,null,ys(c,"colwidth",p))}l.docChanged&&t.dispatch(l)}(t,r.activeHandle,_s(r.dragging,e,n)),t.dispatch(t.state.tr.setMeta(As,{setDragging:null})))}function a(e){if(!e.which)return s(e);let r=As.getState(t.state),i=_s(r.dragging,e,n);!function(t,e,n,r){let i=t.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),a=ms.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=t.domAtPos(i.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;ds(o,l.firstChild,0,r,a,n)}(t,r.activeHandle,i,n)}t.dispatch(t.state.tr.setMeta(As,{setDragging:{startX:e.clientX,startWidth:o}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),e.preventDefault()}(t,n,e)}},decorations(t){let e=As.getState(t);if(e.activeHandle>-1)return function(t,e){let n=[],r=t.doc.resolve(e),i=r.node(-1),o=ms.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let t=0;t<o.height;t++){let e=a+t*o.width-1;if(!(a!=o.width&&o.map[e]==o.map[e+1]||0!=t&&o.map[e-1]==o.map[e-1-o.width])){let t=o.map[e],r=s+t+i.nodeAt(t).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(_t.p.widget(r,a))}}return _t.EH.create(t.doc,n)}(t,e.activeHandle)},nodeViews:{}}});return o}class vs{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(t){let e=this,n=t.getMeta(As);if(n&&null!=n.setHandle)return new vs(n.setHandle,null);if(n&&void 0!==n.setDragging)return new vs(e.activeHandle,n.setDragging);if(e.activeHandle>-1&&t.docChanged){let n=t.mapping.map(e.activeHandle,-1);"row"==(r=t.doc.resolve(n)).parent.type.spec.tableRole&&r.nodeAfter||(n=null),e=new vs(n,e.dragging)}var r;return e}}function xs(t,e,n){let r=t.posAtCoords({left:e.clientX,top:e.clientY});if(!r)return-1;let{pos:i}=r,o=bs(t.state.doc.resolve(i));if(!o)return-1;if("right"==n)return o.pos;let s=ms.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function _s(t,e,n){let r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function ks(t,e){t.dispatch(t.state.tr.setMeta(As,{setHandle:e}))}function Cs(t){let e=[];for(let n=0;n<t;n++)e.push(0);return e}const Es=At.NB.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,color:"red",width:"100%",View:ps,ReiszeView:cs,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML(t){let{HTMLAttributes:e}=t;return["table",(0,At.P1)(this.options.HTMLAttributes,e),["tbody",0]]},addCommands:()=>({insertTable:function(){let{rows:t=3,cols:e=3,withHeaderRow:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r=>{let{tr:i,dispatch:o,editor:s}=r;const a=ss(s.schema,t,e,n);if(o){const t=i.selection.anchor+1;i.replaceSelectionWith(a).scrollIntoView().setSelection(wt.Bs.near(i.doc.resolve(t)))}return!0}},addColumnBefore:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t);e(Do(t.tr,n,n.left))}return!0}(e,n)},addColumnAfter:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t);e(Do(t.tr,n,n.right))}return!0}(e,n)},deleteColumn:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t),r=t.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let t=n.right-1;zo(r,n,t),t!=n.left;t--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=eo.get(n.table);e(r)}return!0}(e,n)},addRowBefore:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t);e(Ho(t.tr,n,n.top))}return!0}(e,n)},addRowAfter:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t);e(Ho(t.tr,n,n.bottom))}return!0}(e,n)},deleteRow:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t),r=t.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let t=n.bottom-1;jo(r,n,t),t!=n.top;t--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=eo.get(n.table);e(r)}return!0}(e,n)},deleteTable:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){let n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(e,n)},mergeCells:()=>t=>{let{state:e,dispatch:n}=t;return Zo(e,n)},splitCell:()=>t=>{let{state:e,dispatch:n}=t;return Fo(e,n)},toggleHeaderColumn:()=>t=>{let{state:e,dispatch:n}=t;return Yo("column")(e,n)},toggleHeaderRow:()=>t=>{let{state:e,dispatch:n}=t;return Yo("row")(e,n)},toggleHeaderCell:()=>t=>{let{state:e,dispatch:n}=t;return Wo(e,n)},mergeOrSplit:()=>t=>{let{state:e,dispatch:n}=t;return!!Zo(e,n)||Fo(e,n)},setCellAttribute:(t,e)=>n=>{let{state:r,dispatch:i}=n;return function(t,e){return function(n,r){if(!so(n))return!1;let i=ao(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){let o=n.tr;n.selection instanceof mo?n.selection.forEachCell(((n,r)=>{n.attrs[t]!==e&&o.setNodeMarkup(r,null,ho(n.attrs,t,e))})):o.setNodeMarkup(i.pos,null,ho(i.nodeAfter.attrs,t,e)),r(o)}return!0}}(t,e)(r,i)},goToNextCell:()=>t=>{let{state:e,dispatch:n}=t;return qo(1)(e,n)},goToPreviousCell:()=>t=>{let{state:e,dispatch:n}=t;return qo(-1)(e,n)},fixTables:()=>t=>{let{state:e,dispatch:n}=t;return n&&Ro(e),!0},setCellSelection:t=>e=>{let{tr:n,dispatch:r}=e;if(r){const e=mo.create(n.doc,t.anchorCell,t.headCell);n.setSelection(e)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:as,"Mod-Backspace":as,Delete:as,"Mod-Delete":as}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Jo({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.ReiszeView,lastColumnResizable:this.options.lastColumnResizable})]:[ws({View:this.options.View,width:this.options.width})],is({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:(0,At.nU)((0,At.Nl)(t,"tableRole",e))}}}),Ss=Es,Bs=At.NB.create({name:"button",draggable:!1,group:"inline",atom:!0,inline:!0,addOptions:()=>({id:null,background:"red",height:"auto",width:"auto",HTMLAttributes:{class:"inline-button"}}),addAttributes:()=>({width:{default:"auto",parseHTML:t=>t.width},height:{default:"auto",parseHTML:t=>t.height},background:{default:"#000",parseHTML:t=>t.getAttribute("background")}}),parseHTML:()=>[{tag:"button",priority:51}],renderHTML(t){let{HTMLAttributes:e}=t;return["button",(0,At.P1)(e),0]},addCommands(){return{toggleButton:()=>t=>{let{commands:e,editor:n}=t;return e.insertContent({type:this.name,attrs:this.options}),!0},setButtonStyles:t=>e=>{const{commands:n,editor:r}=e,i=(0,At.P1)({background:this.options.background,width:this.options.width,height:this.options.height},t);return i.style=`\n background: ${i.background};\n width: ${i.width};\n height: ${i.height};`,n.updateAttributes(this.name,i),!0}}},addNodeView:()=>()=>{const t=document.createElement("button");t.contentEditable=!1,t.classList.add("node-view");const e=document.createElement("div");return e.innerHTML="button",e.contentEditable=!0,e.classList.add("content"),t.append(e),{dom:t,contentDOM:e}}}),Os=At.NB.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:t}){return["tr",(0,At.P1)(this.options.HTMLAttributes,t),0]}});const Ms=At.NB.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({borderColor:{default:"#ced4da"},colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML(t){let{HTMLAttributes:e}=t;const n=`border-color:${e.borderColor}`;return e.style=n,["td",(0,At.P1)(this.options.HTMLAttributes,e),0]}}),$s=At.NB.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map((t=>parseInt(t,10))):null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:t}){return["th",(0,At.P1)(this.options.HTMLAttributes,t),0]}}),Is=At.hj.create({name:"backgroundColor",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>t.style.backgroundColor.replace(/['"]+/g,""),renderHTML:t=>t.backgroundColor?{style:`background: ${t.backgroundColor}`}:{}}}}]},addCommands:()=>({setBackgroundColor:t=>e=>{let{chain:n}=e;return n().setMark("textStyle",{backgroundColor:t}).run()},unsetBackgroundColor:()=>t=>{let{chain:e}=t;return e().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}})}),Ts=At.hj.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>t.style.textAlign||this.options.defaultAlignment,renderHTML:t=>({style:`text-align: ${t.textAlign}`})}}}]},addCommands(){return{setTextAlign:t=>e=>{let{commands:n}=e;return!!this.options.alignments.includes(t)&&this.options.types.every((e=>n.updateAttributes(e,{textAlign:t})))},unsetTextAlign:()=>t=>{let{commands:e}=t;return this.options.types.every((t=>e.resetAttributes(t,"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")}}});const Ls=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),Ns=["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"],Rs=["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"],Ps=["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"],Ds=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],zs=["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();var Hs="[0-9](_*[0-9])*",js=`\\.(${Hs})`,Us="[0-9a-fA-F](_*[0-9a-fA-F])*",Zs={className:"number",variants:[{begin:`(\\b(${Hs})((${js})|\\.)?|(${js}))[eE][+-]?(${Hs})[fFdD]?\\b`},{begin:`\\b(${Hs})((${js})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${js})[fFdD]?\\b`},{begin:`\\b(${Hs})[fFdD]\\b`},{begin:`\\b0[xX]((${Us})\\.?|(${Us})?\\.(${Us}))[pP][+-]?(${Hs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Us})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Fs(t,e,n){return-1===n?"":t.replace(e,(r=>Fs(t,e,n-1)))}const Vs="[A-Za-z$_][0-9A-Za-z$_]*",Ys=["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"],Ws=["true","false","null","undefined","NaN","Infinity"],qs=["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"],Xs=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Gs=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ks=["arguments","this","super","console","window","document","localStorage","module","global"],Js=[].concat(Gs,qs,Xs);var Qs="[0-9](_*[0-9])*",ta=`\\.(${Qs})`,ea="[0-9a-fA-F](_*[0-9a-fA-F])*",na={className:"number",variants:[{begin:`(\\b(${Qs})((${ta})|\\.)?|(${ta}))[eE][+-]?(${Qs})[fFdD]?\\b`},{begin:`\\b(${Qs})((${ta})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ta})[fFdD]?\\b`},{begin:`\\b(${Qs})[fFdD]\\b`},{begin:`\\b0[xX]((${ea})\\.?|(${ea})?\\.(${ea}))[pP][+-]?(${Qs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ea})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const ra=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),ia=["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"],oa=["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"],sa=["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"],aa=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],la=["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(),ca=sa.concat(aa);const da=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),pa=["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"],ha=["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"],ua=["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"],fa=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],ma=["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 ga(t){return t?"string"==typeof t?t:t.source:null}function ba(t){return ya("(?=",t,")")}function ya(...t){return t.map((t=>ga(t))).join("")}function Aa(...t){const e=function(t){const e=t[t.length-1];return"object"==typeof e&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}(t);return"("+(e.capture?"":"?:")+t.map((t=>ga(t))).join("|")+")"}const wa=t=>ya(/\b/,t,/\w$/.test(t)?/\b/:/\B/),va=["Protocol","Type"].map(wa),xa=["init","self"].map(wa),_a=["Any","Self"],ka=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","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","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"],Ca=["false","nil","true"],Ea=["assignment","associativity","higherThan","left","lowerThan","none","right"],Sa=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],Ba=["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"],Oa=Aa(/[/=\-+!*%<>&|^~?]/,/[\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]/),Ma=Aa(Oa,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),$a=ya(Oa,Ma,"*"),Ia=Aa(/[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]/),Ta=Aa(Ia,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),La=ya(Ia,Ta,"*"),Na=ya(/[A-Z]/,Ta,"*"),Ra=["autoclosure",ya(/convention\(/,Aa("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ya(/objc\(/,La,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],Pa=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const Da="[A-Za-z$_][0-9A-Za-z$_]*",za=["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"],Ha=["true","false","null","undefined","NaN","Infinity"],ja=["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"],Ua=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Za=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Fa=["arguments","this","super","console","window","document","localStorage","module","global"],Va=[].concat(Za,ja,Ua);const Ya=n(2947);var Wa=n(149);const qa=Object.assign(Xa(Error),{eval:Xa(EvalError),range:Xa(RangeError),reference:Xa(ReferenceError),syntax:Xa(SyntaxError),type:Xa(TypeError),uri:Xa(URIError)});function Xa(t){return e.displayName=t.displayName||t.name,e;function e(e,...n){const r=e?Wa(e,...n):e;return new t(r)}}const Ga={}.hasOwnProperty,Ka="hljs-";function Ja(t,e,n={}){let r=n.prefix;if("string"!=typeof t)throw qa("Expected `string` for name, got `%s`",t);if(!Ya.getLanguage(t))throw qa("Unknown language: `%s` is not registered",t);if("string"!=typeof e)throw qa("Expected `string` for value, got `%s`",e);null==r&&(r=Ka),Ya.configure({__emitter:Qa,classPrefix:r});const i=Ya.highlight(e,{language:t,ignoreIllegals:!0});if(Ya.configure({}),i.errorRaised)throw i.errorRaised;return i._emitter.root.data.language=i.language,i._emitter.root.data.relevance=i.relevance,i._emitter.root}class Qa{constructor(t){this.options=t,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(t){if(""===t)return;const e=this.stack[this.stack.length-1],n=e.children[e.children.length-1];n&&"text"===n.type?n.value+=t:e.children.push({type:"text",value:t})}addKeyword(t,e){this.openNode(e),this.addText(t),this.closeNode()}addSublanguage(t,e){const n=this.stack[this.stack.length-1],r=t.root.children;e?n.children.push({type:"element",tagName:"span",properties:{className:[e]},children:r}):n.children.push(...r)}openNode(t){const e={type:"element",tagName:"span",properties:{className:t.split(".").map(((t,e)=>e?t+"_".repeat(e):this.options.classPrefix+t))},children:[]};this.stack[this.stack.length-1].children.push(e),this.stack.push(e)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const tl={highlight:Ja,highlightAuto:function(t,e={}){const n=e.subset||Ya.listLanguages();let r=e.prefix,i=-1,o={type:"root",data:{language:null,relevance:0},children:[]};if(null==r&&(r=Ka),"string"!=typeof t)throw qa("Expected `string` for value, got `%s`",t);for(;++i<n.length;){const r=n[i];if(!Ya.getLanguage(r))continue;const s=Ja(r,t,e);s.data.relevance>o.data.relevance&&(o=s)}return o},registerLanguage:function(t,e){Ya.registerLanguage(t,e)},registered:function(t){return Boolean(Ya.getLanguage(t))},listLanguages:function(){return Ya.listLanguages()},registerAlias:function(t,e){if("string"==typeof t)Ya.registerAliases(e,{languageName:t});else{let e;for(e in t)Ga.call(t,e)&&Ya.registerAliases(t[e],{languageName:e})}}};tl.registerLanguage("arduino",(function(t){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"]},n=function(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={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},c={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},t.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},p=e.optional(i)+t.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["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"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["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"]},u={className:"function.dispatch",relevance:0,keywords:{_hint:["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"]},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},f=[u,c,s,n,t.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:f.concat([{begin:/\(/,end:/\)/,keywords:h,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:p,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,u,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:h,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(t),r=n.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,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),tl.registerLanguage("bash",(function(t){const e=t.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:e.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);const a={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,n]},l=t.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","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","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"]},contains:[l,t.SHEBANG(),c,a,t.HASH_COMMENT_MODE,o,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),tl.registerLanguage("c",(function(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={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},c={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},t.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},p=e.optional(i)+t.IDENT_RE+"\\s*\\(",h={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"},u=[c,s,n,t.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:u.concat([{begin:/\(/,end:/\)/,keywords:h,contains:u.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:h,disableAutodetect:!0,illegal:"</",contains:[].concat(f,m,u,[c,{begin:t.IDENT_RE+"::",keywords:h},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:h}}})),tl.registerLanguage("cpp",(function(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={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},c={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},t.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},p=e.optional(i)+t.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["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"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["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"]},u={className:"function.dispatch",relevance:0,keywords:{_hint:["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"]},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},f=[u,c,s,n,t.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:f.concat([{begin:/\(/,end:/\)/,keywords:h,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:p,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,u,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:h,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),tl.registerLanguage("csharp",(function(t){const e={keyword:["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"].concat(["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"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={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},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=t.inherit(i,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:e},a=t.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},d=t.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,i,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,r,t.C_BLOCK_COMMENT_MODE],a.contains=[d,l,o,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,r,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const p={variants:[c,l,i,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},h={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},u=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:e,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},p,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,h,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,h,t.C_LINE_COMMENT_MODE,t.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:"("+u+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:e,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:e,relevance:0,contains:[p,r,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},f]}})),tl.registerLanguage("css",(function(t){const e=t.regex,n=Ls(t),r=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Ps.join("|")+")"},{begin:":(:)?("+Ds.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+zs.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...r,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...r,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:Rs.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...r,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ns.join("|")+")\\b"}]}})),tl.registerLanguage("diff",(function(t){const e=t.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:/$/}]}})),tl.registerLanguage("go",(function(t){const e={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:e,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:t.C_NUMBER_RE+"[i]",relevance:1},t.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,illegal:/["']/}]}]}})),tl.registerLanguage("graphql",(function(t){const e=t.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:e.concat(/[_A-Za-z][_0-9A-Za-z]*/,e.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}})),tl.registerLanguage("ini",(function(t){const e=t.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},r=t.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,o,i,s,n,"self"],relevance:0},l=e.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:e.concat(l,"(\\s*\\.\\s*",l,")*",e.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[r,a,o,i,s,n]}}]}})),tl.registerLanguage("java",(function(t){const e=t.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Fs("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),i={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"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:i,illegal:/<\/|#/,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[t.BACKSLASH_ESCAPE]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[e.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[s,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:i,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[o,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,Zs,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},Zs,o]}})),tl.registerLanguage("javascript",(function(t){const e=t.regex,n=Vs,r="<>",i="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(t,e)=>{const n=t[0].length+t.index,r=t.input[n];if("<"===r||","===r)return void e.ignoreMatch();let i;">"===r&&(((t,{after:e})=>{const n="</"+t[0].slice(1);return-1!==t.input.indexOf(n,e)})(t,{after:n})||e.ignoreMatch());const o=t.input.substring(n);((i=o.match(/^\s*=/))||(i=o.match(/^\s+extends\s+/))&&0===i.index)&&e.ignoreMatch()}},s={$pattern:Vs,keyword:Ys,literal:Ws,built_in:Js,"variable.language":Ks},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},u={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,p]},m={className:"comment",variants:[t.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:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},g=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,u,f,{match:/\$\d+/},d];p.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,p.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y},w={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},v={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:{_:[...qs,...Xs]}},x={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},_={match:e.concat(/\b/,function(t){return e.concat("(?!",t.join("|"),")")}([...Gs,"super","import"]),n,e.lookahead(/\(/)),className:"title.function",relevance:0},k={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},E="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",S={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(E)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:v},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,u,f,m,{match:/\$\d+/},d,v,{className:"attr",begin:n+e.lookahead(":"),relevance:0},S,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,t.REGEXP_MODE,{className:"function",begin:E,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:i},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},x,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,t.inherit(t.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,C,{match:/\$[(.]/}]}})),tl.registerLanguage("json",(function(t){const e=["true","false","null"],n={scope:"literal",beginKeywords:e.join(" ")};return{name:"JSON",keywords:{literal:e},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},t.QUOTE_STRING_MODE,n,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),tl.registerLanguage("kotlin",(function(t){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"},n={className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[t.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+t.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,r]},{begin:"'",end:"'",illegal:/\n/,contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[t.BACKSLASH_ESCAPE,i,r]}]};r.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+t.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+t.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[t.inherit(o,{className:"string"}),"self"]}]},l=na,c=t.COMMENT("/\\*","\\*/",{contains:[t.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:t.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},p=d;return p.variants[1].contains=[d],d.variants[1].contains=[p],{name:"Kotlin",aliases:["kt","kts"],keywords:e,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),t.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:e,relevance:5,contains:[{begin:t.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[t.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,t.C_LINE_COMMENT_MODE,c],relevance:0},t.C_LINE_COMMENT_MODE,c,s,a,o,t.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,t.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},t.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),tl.registerLanguage("less",(function(t){const e=ra(t),n=ca,r="[\\w-]+",i="("+r+"|@\\{"+r+"\\})",o=[],s=[],a=function(t){return{className:"string",begin:"~?"+t+".*?"+t}},l=function(t,e,n){return{className:t,begin:e,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:oa.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,a("'"),a('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},e.HEXCOLOR,d,l("variable","@@?"+r,10),l("variable","@\\{"+r+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},e.IMPORTANT,{beginKeywords:"and not"},e.FUNCTION_DISPATCH);const p=s.concat({begin:/\{/,end:/\}/,contains:o}),h={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},u={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+la.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:p}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,h,l("keyword","all\\b"),l("variable","@\\{"+r+"\\}"),{begin:"\\b("+ia.join("|")+")\\b",className:"selector-tag"},e.CSS_NUMBER_MODE,l("selector-tag",i,0),l("selector-id","#"+i),l("selector-class","\\."+i,0),l("selector-tag","&",0),e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+sa.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+aa.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:p},{begin:"!important"},e.FUNCTION_DISPATCH]},b={begin:r+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,f,m,b,u,g,h,e.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),tl.registerLanguage("lua",(function(t){const e="\\[=*\\[",n="\\]=*\\]",r={begin:e,end:n,contains:["self"]},i=[t.COMMENT("--(?!"+e+")","$"),t.COMMENT("--"+e,n,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:t.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:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:e,end:n,contains:[r],relevance:5}])}})),tl.registerLanguage("makefile",(function(t){const e={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,e]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[e]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[e]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,e,n,r,i,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}})),tl.registerLanguage("markdown",(function(t){const e={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),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}]},r={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},i={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},o=t.inherit(r,{contains:[]}),s=t.inherit(i,{contains:[]});r.contains.push(s),i.contains.push(o);let a=[e,n];return[r,i,o,s].forEach((t=>{t.contains=t.contains.concat(a)})),a=a.concat(r,i),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},e,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},r,i,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{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}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),tl.registerLanguage("objectivec",(function(t){const e=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:e,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:e,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"]},illegal:"</",contains:[{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.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}})),tl.registerLanguage("perl",(function(t){const e=t.regex,n=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:["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"].join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},o={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:e.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[t.BACKSLASH_ESCAPE,i,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(t,r,i="\\1")=>{const o="\\1"===i?i:e.concat(i,r);return e.concat(e.concat("(?:",t,")"),r,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,i,n)},d=(t,r,i)=>e.concat(e.concat("(?:",t,")"),r,/(?:\\.|[^\\\/])*?/,i,n),p=[s,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:a,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:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.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:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",e.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",e.either(...l,{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:[t.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:p}})),tl.registerLanguage("php",(function(t){const e=t.regex,n=/(?![A-Za-z0-9])(?![$])/,r=e.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=e.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+r},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=t.inherit(t.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(s)}),a,t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(s)})]},d={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},p=["false","null","true"],h=["__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"],u=["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"],f={keyword:h,literal:(t=>{const e=[];return t.forEach((t=>{e.push(t),t.toLowerCase()===t?e.push(t.toUpperCase()):e.push(t.toLowerCase())})),e})(p),built_in:u},m=t=>t.map((t=>t.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,e.concat(l,"+"),e.concat("(?!",m(u).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},b=e.concat(r,"\\b(?!\\()"),y={variants:[{match:[e.concat(/::/,e.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,e.concat(/::/,e.lookahead(/(?!class\b)/)),b],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"}}]},A={scope:"attr",match:e.concat(r,e.lookahead(":"),e.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:f,contains:[A,o,y,t.C_BLOCK_COMMENT_MODE,c,d,g]},v={relevance:0,match:[/\b/,e.concat("(?!fn\\b|function\\b|",m(h).join("\\b|"),"|",m(u).join("\\b|"),"\\b)"),r,e.concat(l,"*"),e.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(v);const x=[A,y,t.C_BLOCK_COMMENT_MODE,c,d,g];return{case_insensitive:!1,keywords:f,contains:[{begin:e.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:p,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:p,keyword:["new","array"]},contains:["self",...x]},...x,{scope:"meta",match:i}]},t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,v,y,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",o,y,t.C_BLOCK_COMMENT_MODE,c,d]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},c,d]}})),tl.registerLanguage("php-template",(function(t){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},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),tl.registerLanguage("plaintext",(function(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),tl.registerLanguage("python",(function(t){const e=t.regex,n=/[\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"],i={$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"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:i,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,o,a,s]},{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:[t.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,a,s]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,p=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${p})`},{begin:`(${d})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${c})[jJ](?=${p})`}]},u={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",o,h,l,t.HASH_COMMENT_MODE]}]};return s.contains=[l,h,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:i,illegal:/(<\/|->|\?)|=>/,contains:[o,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,u,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,f,l]}]}})),tl.registerLanguage("python-repl",(function(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),tl.registerLanguage("r",(function(t){const e=t.regex,n=/(?:(?:[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=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=e.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,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:[t.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:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.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:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),tl.registerLanguage("ruby",(function(t){const e=t.regex,n="([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"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[s]}),t.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[t.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{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:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,c]})]}]},p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${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"}]},u={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},f=[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+/,n],scope:{1:"keyword",3:"title.function"},contains:[u]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,c],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(a,l),relevance:0}].concat(a,l);c.contains=f,u.contains=f;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:o,contains:f}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(f)}})),tl.registerLanguage("rust",(function(t){const e=t.regex,n={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let\b)/,t.IDENT_RE,e.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["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!","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!"],o=["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:t.IDENT_RE+"!?",type:o,keyword:["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"],literal:["true","false","Some","None","Ok","Err"],built_in:i},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{begin:"\\b0x([A-Fa-f0-9_]+)"+r},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{begin:[/fn/,/\s+/,t.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,t.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,t.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,t.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,t.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:i,type:o}},{className:"punctuation",begin:"->"},n]}})),tl.registerLanguage("scss",(function(t){const e=da(t),n=fa,r=ua,i="@[a-z-]+",o={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[t.C_LINE_COMMENT_MODE,t.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("+pa.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[e.CSS_NUMBER_MODE]},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ma.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,o,e.HEXCOLOR,e.CSS_NUMBER_MODE,t.QUOTE_STRING_MODE,t.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:"and or not only",attribute:ha.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,e.HEXCOLOR,e.CSS_NUMBER_MODE]},e.FUNCTION_DISPATCH]}})),tl.registerLanguage("shell",(function(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),tl.registerLanguage("sql",(function(t){const e=t.regex,n=t.COMMENT("--","$"),r=["true","false","unknown"],i=["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"],o=["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"],s=["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"],a=o,l=["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","add","asc","collation","desc","final","first","last","view"].filter((t=>!o.includes(t))),c={begin:e.concat(/\b/,e.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(t,{exceptions:e,when:n}={}){const r=n;return e=e||[],t.map((t=>t.match(/\|\d+$/)||e.includes(t)?t:r(t)?`${t}|0`:t))}(l,{when:t=>t.length<3}),literal:r,type:i,built_in:["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"]},contains:[{begin:e.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:r,type:i}},{className:"type",begin:e.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),tl.registerLanguage("swift",(function(t){const e={match:/\s+/,relevance:0},n=t.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[t.C_LINE_COMMENT_MODE,n],i={match:[/\./,Aa(...va,...xa)],className:{2:"keyword"}},o={match:ya(/\./,Aa(...ka)),relevance:0},s=ka.filter((t=>"string"==typeof t)).concat(["_|0"]),a={variants:[{className:"keyword",match:Aa(...ka.filter((t=>"string"!=typeof t)).concat(_a).map(wa),...xa)}]},l={$pattern:Aa(/\b\w+/,/#\w+/),keyword:s.concat(Sa),literal:Ca},c=[i,o,a],d=[{match:ya(/\./,Aa(...Ba)),relevance:0},{className:"built_in",match:ya(/\b/,Aa(...Ba),/(?=\()/)}],p={match:/->/,relevance:0},h=[p,{className:"operator",relevance:0,variants:[{match:$a},{match:`\\.(\\.|${Ma})+`}]}],u="([0-9]_*)+",f="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${u})(\\.(${u}))?([eE][+-]?(${u}))?\\b`},{match:`\\b0x(${f})(\\.(${f}))?([pP][+-]?(${u}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(t="")=>({className:"subst",variants:[{match:ya(/\\/,t,/[0\\tnr"']/)},{match:ya(/\\/,t,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(t="")=>({className:"subst",match:ya(/\\/,t,/[\t ]*(?:[\r\n]|\r\n)/)}),y=(t="")=>({className:"subst",label:"interpol",begin:ya(/\\/,t,/\(/),end:/\)/}),A=(t="")=>({begin:ya(t,/"""/),end:ya(/"""/,t),contains:[g(t),b(t),y(t)]}),w=(t="")=>({begin:ya(t,/"/),end:ya(/"/,t),contains:[g(t),y(t)]}),v={className:"string",variants:[A(),A("#"),A("##"),A("###"),w(),w("#"),w("##"),w("###")]},x={match:ya(/`/,La,/`/)},_=[x,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${Ta}+`}],k=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Pa,contains:[...h,m,v]}]}},{className:"keyword",match:ya(/@/,Aa(...Ra))},{className:"meta",match:ya(/@/,La)}],C={match:ba(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ya(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ta,"+")},{className:"type",match:Na,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ya(/\s+&\s+/,ba(Na)),relevance:0}]},E={begin:/</,end:/>/,keywords:l,contains:[...r,...c,...k,p,C]};C.contains.push(E);const S={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:ya(La,/\s*:/),keywords:"_|0",relevance:0},...r,...c,...d,...h,m,v,..._,...k,C]},B={begin:/</,end:/>/,contains:[...r,C]},O={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:Aa(ba(ya(La,/\s*:/)),ba(ya(La,/\s+/,La,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:La}]},...r,...c,...h,m,v,...k,C,S],endsParent:!0,illegal:/["']/},M={match:[/func/,/\s+/,Aa(x.match,La,$a)],className:{1:"keyword",3:"title.function"},contains:[B,O,e],illegal:[/\[/,/%/]},$={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[B,O,e],illegal:/\[|%/},I={match:[/operator/,/\s+/,$a],className:{1:"keyword",3:"title"}},T={begin:[/precedencegroup/,/\s+/,Na],className:{1:"keyword",3:"title"},contains:[C],keywords:[...Ea,...Ca],end:/}/};for(const t of v.variants){const e=t.contains.find((t=>"interpol"===t.label));e.keywords=l;const n=[...c,...d,...h,m,v,..._];e.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...r,M,$,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[t.inherit(t.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},I,T,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...c,...d,...h,m,v,..._,...k,C,S]}})),tl.registerLanguage("typescript",(function(t){const e=function(t){const e=t.regex,n=Da,r="<>",i="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(t,e)=>{const n=t[0].length+t.index,r=t.input[n];if("<"===r||","===r)return void e.ignoreMatch();let i;">"===r&&(((t,{after:e})=>{const n="</"+t[0].slice(1);return-1!==t.input.indexOf(n,e)})(t,{after:n})||e.ignoreMatch());const o=t.input.substring(n);((i=o.match(/^\s*=/))||(i=o.match(/^\s+extends\s+/))&&0===i.index)&&e.ignoreMatch()}},s={$pattern:Da,keyword:za,literal:Ha,built_in:Va,"variable.language":Fa},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},u={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,p]},m={className:"comment",variants:[t.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:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},g=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,u,f,{match:/\$\d+/},d];p.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,p.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y},w={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},v={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:{_:[...ja,...Ua]}},x={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},_={match:e.concat(/\b/,function(t){return e.concat("(?!",t.join("|"),")")}([...Za,"super","import"]),n,e.lookahead(/\(/)),className:"title.function",relevance:0},k={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},E="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",S={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(E)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:v},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,u,f,m,{match:/\$\d+/},d,v,{className:"attr",begin:n+e.lookahead(":"),relevance:0},S,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,t.REGEXP_MODE,{className:"function",begin:E,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:i},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},x,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,t.inherit(t.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,C,{match:/\$[(.]/}]}}(t),n=Da,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[e.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[e.exports.CLASS_REFERENCE]},s={$pattern:Da,keyword:za.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:Ha,built_in:Va.concat(r),"variable.language":Fa},a={className:"meta",begin:"@"+n},l=(t,e,n)=>{const r=t.contains.findIndex((t=>t.label===e));if(-1===r)throw new Error("can not find mode to replace");t.contains.splice(r,1,n)};return Object.assign(e.keywords,s),e.exports.PARAMS_CONTAINS.push(a),e.contains=e.contains.concat([a,i,o]),l(e,"shebang",t.SHEBANG()),l(e,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),e.contains.find((t=>"func.def"===t.label)).relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx"]}),e})),tl.registerLanguage("vbnet",(function(t){const e=t.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,r=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:e.concat(/# */,e.either(r,n),/ *#/)},{begin:e.concat(/# */,o,/ *#/)},{begin:e.concat(/# */,i,/ *#/)},{begin:e.concat(/# */,e.either(r,n),/ +/,e.either(i,o),/ *#/)}]},a=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=t.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:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{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])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{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:[l]}]}})),tl.registerLanguage("wasm",(function(t){t.regex;const e=t.COMMENT(/\(;/,/;\)/);return e.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["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"]},contains:[t.COMMENT(/;;/,/$/),e,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},t.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{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/},{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/}]}})),tl.registerLanguage("xml",(function(t){const e=t.regex,n=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=t.inherit(i,{begin:/\(/,end:/\)/}),s=t.inherit(t.APOS_STRING_MODE,{className:"string"}),a=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,a,s]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(n,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),tl.registerLanguage("yaml",(function(t){const e="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=t.inherit(r,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{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+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},o,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},a,l,r],d=[...c];return d.pop(),d.push(i),s.contains=d,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));const el=/(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,nl=At.NB.create({name:"image",addOptions:()=>({id:null,inline:!0,allowBase64:!1,width:"200px",height:"200px",HTMLAttributes:{},"data-target":"_blank","data-href":""}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{id:{default:`inline-image-${(0,F.Z)()}`},src:{default:null},alt:{default:null},title:{default:null},width:{default:this.options.width||"500px"},height:{default:this.options.height||"500px"},"data-href":{default:this.options["data-href"]},"data-target":{default:this.options["data-target"]}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML(t){let{HTMLAttributes:e}=t;return["img",(0,At.P1)(this.options.HTMLAttributes,e)]},addNodeView(){return t=>{let{node:e,editor:n,getPos:r}=t;const i=document.createElement("img"),o=(0,At.P1)(this.options.HTMLAttributes,e.attrs);return Object.entries(o).forEach((t=>{let[e,n]=t;null!=n&&("style"===e&&"object"==typeof n?Object.assign(i.style,n):"style"===e&&"string"==typeof n?i.setAttribute("style",n):i.setAttribute(e,n))})),i.addEventListener("dblclick",(t=>{t.preventDefault(),t.stopPropagation();let e=null;"function"==typeof r&&(e=r());const i=document.createElement("cdtr-gallery");i.opened=!0,i.multi=!0,document.body.append(i),i.addEventListener("file",(t=>{let r=t.detail;if(Array.isArray(r)&&(r=r[0]),null!==e)try{const{view:t}=n,{state:i}=t;if(e<0||e>=i.doc.content.size)return void console.warn("Image position is out of bounds");try{const o=wt.qv.create(i.doc,e),s=i.tr.setSelection(o);t.dispatch(s),n.commands.updateImage({src:r.src})}catch(n){const o=i.doc.resolve(e),s=o.nodeAfter||o.nodeBefore;if(s&&"image"===s.type.name){const n={...s.attrs,src:r.src},o=s.type.create(n),a=e,l=e+s.nodeSize,c=i.tr.replaceWith(a,l,o);t.dispatch(c)}else console.warn("Could not find image node at position:",e)}}catch(t){console.warn("Failed to update image:",t)}i.opened=!1,setTimeout((()=>{i.remove()}),1500)})),i.addEventListener("close",(()=>{i.remove()}))})),{dom:i}}},addCommands(){return{setImage:t=>e=>{let{commands:n}=e;return n.insertContent({type:this.name,attrs:t}),!0},updateImage:t=>e=>{let{dispatch:n,commands:r,editor:i,view:o,tr:s}=e;const{state:a}=o,l=wt.qv.create(a.doc,o.state.selection.from),c={...l.node.attrs,...t},d=this.type.create(c);if(n){const t=(s||a.tr).replaceRangeWith(l.from,l.to,d);o.dispatch(t)}return!0}}},addInputRules(){return[(0,At.x2)({find:el,type:this.type,getAttributes:t=>{const[,,e,n,r,i,o,s]=t;return{src:n,alt:e,title:r,width:i,height:o,id:s}}})]}}),rl=At.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML(t){let{HTMLAttributes:e}=t;return["li",(0,At.P1)(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),il=At.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML(t){let{HTMLAttributes:e}=t;return["span",(0,At.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>t=>{let{state:e,commands:n}=t;const r=(0,At.Jo)(e,this.type);return!!Object.entries(r).some((t=>{let[,e]=t;return!!e}))||n.unsetMark(this.name)}}}}),ol=/^\s*([-+*])\s$/,sl=At.NB.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1,color:"#000"}),addAttributes:()=>({color:{default:"#000"}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:t=>[{tag:"ul"}],renderHTML(t){let{node:e,HTMLAttributes:n}=t;return["ul",(0,At.P1)(this.options.HTMLAttributes,n,{style:`color:${e.attrs.color}`}),0]},addCommands(){return{changeBulletListColor:t=>{let{color:e}=t;return t=>{let{commands:n,chain:r}=t;return r().updateAttributes(this.name,{color:e}).run()}},toggleBulletList:()=>t=>{let{commands:e,chain:n}=t;return this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(rl.name,this.editor.getAttributes(il.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=(0,At.S0)({find:ol,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,At.S0)({find:ol,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(il.name),editor:this.editor})),[t]}}),al=/^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{11})(?:\S+)?$/,ll=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)(\/(?:shorts\/|watch\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/g,cl=/^https?:\/\/(?:www\.)?(?:vimeo\.com|player\.vimeo\.com\/video)\/(\d+)(?:\/[\w-]*)?(?:\?.*)?$/i,dl=/^https?:\/\/(?:www\.)?.+\.mp3(?:\?.*)?$/i,pl=t=>!!t&&!!t.match(al),hl=t=>!!t&&!!t.match(cl),ul=t=>!!t&&!!t.match(dl),fl=t=>t?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",ml=t=>{let{url:e}=t;return pl(e)?(t=>{const{url:e,allowFullscreen:n,autoplay:r,ccLanguage:i,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:d,ivLoadPolicy:p,loop:h,modestBranding:u,nocookie:f,origin:m,playlist:g,progressBarColor:b,startAt:y}=t;if(!pl(e))return null;if(e.includes("/embed/"))return e;if(e.includes("youtu.be")){const t=e.split("/").pop();return t?`${fl(f)}${t}`:null}const A=/(?:v=|shorts\/)([-\w]+)/gm.exec(e);if(!A||!A[1])return null;let w=`${fl(f)}${A[1]}`;const v=[];return!1===n&&v.push("fs=0"),r&&v.push("autoplay=1"),i&&v.push(`cc_lang_pref=${i}`),o&&v.push("cc_load_policy=1"),s||v.push("controls=0"),a&&v.push("disablekb=1"),l&&v.push("enablejsapi=1"),c&&v.push(`end=${c}`),d&&v.push(`hl=${d}`),p&&v.push(`iv_load_policy=${p}`),h&&v.push("loop=1"),u&&v.push("modestbranding=1"),m&&v.push(`origin=${m}`),g&&v.push(`playlist=${g}`),y&&v.push(`start=${y}`),b&&v.push(`color=${b}`),v.length&&(w+=`?${v.join("&")}`),w})(t):hl(e)?(t=>{const{url:e}=t;if(!hl(e))return null;const n=(t=>{const e=t.match(cl);return e&&e.find((t=>/^\d+$/.test(t)))||null})(e);if(!n)return null;let r=`https://player.vimeo.com/video/${n}`;const i=[];return t.autoplay&&i.push("autoplay=1"),i.length&&(r+=`?${i.join("&")}`),r})(t):ul(e)?(t=>{const{url:e}=t;return ul(e)?e:null})(t):null},gl=At.NB.create({name:"video",addOptions:()=>({addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML:()=>[{tag:"div[data-video-cdtr] iframe"}],addCommands(){return{setVideo:t=>e=>{let{commands:n}=e;return hl(t.src)||pl(t.src)||ul(t.src)?(t.src=ml({url:t.src}),n.insertContent({type:this.name,attrs:t})):(console.error("Invalid video URL"),!1)}}},addPasteRules(){return this.options.addPasteHandler?[(0,At.Ss)({find:ll,type:this.type,getAttributes:t=>({src:t.input})})]:[]},renderHTML(t){let{HTMLAttributes:e}=t;const n=ml({url:e.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:e.start||0});return e.src=n,["div",{"data-video-cdtr":""},["iframe",(0,At.P1)(this.options.HTMLAttributes,{style:"max-width: 100%;",width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor},e)]]}}),bl={addAttributes(){return{...this.parent?.(),style:{parseHTML:t=>{const e=t.getAttribute("width");return e?`width: ${e}px; height: auto; cursor: pointer;max-width: 100%;`:`${t.style.cssText}`}}}},addNodeView(){const t=document.createElement("div");return e=>{let{node:n,editor:r,getPos:i}=e;const{view:o,options:{editable:s}}=r,a=document.createElement("iframe");a.src="about:blank",a.style.border="none",a.width="100%",a.height="30px";const l=document.createElement("input");l.style.height="30px",l.style.width="100%",l.value=n.attrs.src,a.addEventListener("load",(()=>{a.contentDocument.body.style.margin="0",a.contentDocument.body.style.padding="0",a.contentDocument.body.style.overflow="hidden",a.contentDocument.body.appendChild(l)})),l.addEventListener("input",(t=>{t.preventDefault(),t.stopPropagation();const e=l.value;setTimeout((()=>{r.chain().setVideo({src:e,width:n.attrs.width||this.options.width,height:n.attrs.height||this.options.height}).run()}),200)})),t.appendChild(a);const c=document.createElement("div");c.setAttribute("data-video-cdtr","");const d=document.createElement("div");d.classList.add("cdtr-video-container");const p=document.createElement("iframe");d.style.width="100%",p.style.maxWidth="100%",p.setAttribute("src",n.attrs.src),p.setAttribute("width",n.attrs.width),p.setAttribute("height",n.attrs.height),p.setAttribute("frameborder","0"),p.setAttribute("allowfullscreen","true"),p.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture");const h=()=>{t.classList.add("cdtr-position-controller"),(()=>{const t={...n.attrs,style:`${p.style.cssText}`};o.dispatch(o.state.tr.setNodeMarkup(i(),null,t))})(),d.appendChild(t)};return c.setAttribute("style","display: flex;"),c.appendChild(d),d.classList.add("video-container"),d.appendChild(p),s?(d.addEventListener("click",(t=>{h(),d.setAttribute("style","position: relative; border: 1px dashed #6C6C6C; cursor: pointer;")})),document.addEventListener("click",(e=>{const n=e.target;d.contains(n)||d===n||t.remove()})),{dom:c}):{dom:d}}}},yl=gl.extend(bl);function Al(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var wl={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function vl(t){wl=t}var xl={exec:()=>null};function _l(t,e=""){let n="string"==typeof t?t:t.source;const r={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(kl.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var kl={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Cl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,El=/(?:[*+-]|\d{1,9}[.)])/,Sl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bl=_l(Sl).replace(/bull/g,El).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ol=_l(Sl).replace(/bull/g,El).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ml=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$l=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Il=_l(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$l).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tl=_l(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,El).getRegex(),Ll="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Nl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Rl=_l("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Nl).replace("tag",Ll).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pl=_l(Ml).replace("hr",Cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ll).getRegex(),Dl={blockquote:_l(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pl).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Il,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Cl,html:Rl,lheading:Bl,list:Tl,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Pl,table:xl,text:/^[^\n]+/},zl=_l("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ll).getRegex(),Hl={...Dl,lheading:Ol,table:zl,paragraph:_l(Ml).replace("hr",Cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ll).getRegex()},jl={...Dl,html:_l("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Nl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_l(Ml).replace("hr",Cl).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Bl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ul=/^( {2,}|\\)\n(?!\s*$)/,Zl=/[\p{P}\p{S}]/u,Fl=/[\s\p{P}\p{S}]/u,Vl=/[^\s\p{P}\p{S}]/u,Yl=_l(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fl).getRegex(),Wl=/(?!~)[\p{P}\p{S}]/u,ql=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Xl=_l(ql,"u").replace(/punct/g,Zl).getRegex(),Gl=_l(ql,"u").replace(/punct/g,Wl).getRegex(),Kl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Jl=_l(Kl,"gu").replace(/notPunctSpace/g,Vl).replace(/punctSpace/g,Fl).replace(/punct/g,Zl).getRegex(),Ql=_l(Kl,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Wl).getRegex(),tc=_l("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Vl).replace(/punctSpace/g,Fl).replace(/punct/g,Zl).getRegex(),ec=_l(/\\(punct)/,"gu").replace(/punct/g,Zl).getRegex(),nc=_l(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),rc=_l(Nl).replace("(?:--\x3e|$)","--\x3e").getRegex(),ic=_l("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",rc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),oc=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,sc=_l(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",oc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ac=_l(/^!?\[(label)\]\[(ref)\]/).replace("label",oc).replace("ref",$l).getRegex(),lc=_l(/^!?\[(ref)\](?:\[\])?/).replace("ref",$l).getRegex(),cc={_backpedal:xl,anyPunctuation:ec,autolink:nc,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:Ul,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:xl,emStrongLDelim:Xl,emStrongRDelimAst:Jl,emStrongRDelimUnd:tc,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:sc,nolink:lc,punctuation:Yl,reflink:ac,reflinkSearch:_l("reflink|nolink(?!\\()","g").replace("reflink",ac).replace("nolink",lc).getRegex(),tag:ic,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:xl},dc={...cc,link:_l(/^!?\[(label)\]\((.*?)\)/).replace("label",oc).getRegex(),reflink:_l(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oc).getRegex()},pc={...cc,emStrongRDelimAst:Ql,emStrongLDelim:Gl,url:_l(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},hc={...pc,br:_l(Ul).replace("{2,}","*").getRegex(),text:_l(pc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},uc={normal:Dl,gfm:Hl,pedantic:jl},fc={normal:cc,gfm:pc,breaks:hc,pedantic:dc},mc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gc=t=>mc[t];function bc(t,e){if(e){if(kl.escapeTest.test(t))return t.replace(kl.escapeReplace,gc)}else if(kl.escapeTestNoEncode.test(t))return t.replace(kl.escapeReplaceNoEncode,gc);return t}function yc(t){try{t=encodeURI(t).replace(kl.percentDecode,"%")}catch{return null}return t}function Ac(t,e){const n=t.replace(kl.findPipe,((t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(kl.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(kl.slashPipe,"|");return n}function wc(t,e,n){const r=t.length;if(0===r)return"";let i=0;for(;i<r;){const o=t.charAt(r-i-1);if(o!==e||n){if(o===e||!n)break;i++}else i++}return t.slice(0,r-i)}function vc(t,e,n,r,i){const o=e.href,s=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}var xc=class{options;rules;lexer;constructor(t){this.options=t||wl}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:wc(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(n.other.beginningSpace);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=wc(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:wc(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=wc(e[0],"\n").split("\n"),n="",r="";const i=[];for(;t.length>0;){let e=!1;const o=[];let s;for(s=0;s<t.length;s++)if(this.rules.other.blockquoteStart.test(t[s]))o.push(t[s]),e=!0;else{if(e)break;o.push(t[s])}t=t.slice(s);const a=o.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;const d=i.at(-1);if("code"===d?.type)break;if("blockquote"===d?.type){const e=d,o=e.raw+"\n"+t.join("\n"),s=this.blockquote(o);i[i.length-1]=s,n=n.substring(0,n.length-e.raw.length)+s.raw,r=r.substring(0,r.length-e.text.length)+s.text;break}if("list"!==d?.type);else{const e=d,o=e.raw+"\n"+t.join("\n"),s=this.list(o);i[i.length-1]=s,n=n.substring(0,n.length-d.raw.length)+s.raw,r=r.substring(0,r.length-e.raw.length)+s.raw,t=o.substring(i.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let s=!1;for(;t;){let n=!1,r="",a="";if(!(e=o.exec(t)))break;if(this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],d=!l.trim(),p=0;if(this.options.pedantic?(p=2,a=l.trimStart()):d?p=e[1].length+1:(p=e[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,a=l.slice(p),p+=e[1].length),d&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){const e=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),o=this.rules.other.headingBeginRegex(p),s=this.rules.other.htmlBeginRegex(p);for(;t;){const h=t.split("\n",1)[0];let u;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),u=c):u=c.replace(this.rules.other.tabCharGlobal," "),i.test(c))break;if(o.test(c))break;if(s.test(c))break;if(e.test(c))break;if(n.test(c))break;if(u.search(this.rules.other.nonSpaceChar)>=p||!c.trim())a+="\n"+u.slice(p);else{if(d)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(i.test(l))break;if(o.test(l))break;if(n.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),r+=h+"\n",t=t.substring(h.length+1),l=u.slice(p)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let h,u=null;this.options.gfm&&(u=this.rules.other.listIsTask.exec(a),u&&(h="[ ] "!==u[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!u,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=r}const a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++)if(this.lexer.state.top=!1,i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]),!i.loose){const e=i.items[t].tokens.filter((t=>"space"===t.type)),n=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));i.loose=n}if(i.loose)for(let t=0;t<i.items.length;t++)i.items[t].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e){return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const n=Ac(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const t of r)this.rules.other.tableAlignRight.test(t)?o.align.push("right"):this.rules.other.tableAlignCenter.test(t)?o.align.push("center"):this.rules.other.tableAlignLeft.test(t)?o.align.push("left"):o.align.push(null);for(let t=0;t<n.length;t++)o.header.push({text:n[t],tokens:this.lexer.inline(n[t]),header:!0,align:o.align[t]});for(const t of i)o.rows.push(Ac(t,o.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]}))));return o}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=wc(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let n=0;for(let r=0;r<t.length;r++)if("\\"===t[r])r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),vc(e,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const t=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return vc(n,t,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let i,o,s=n,a=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(r=l.exec(e));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=[...i].length,r[3]||r[4]){s+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+a);const e=[...r[0]][0].length,l=t.slice(0,n+r.index+e+o);if(Math.min(n,o)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let r;do{r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(r!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},_c=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||wl,this.options.tokenizer=this.options.tokenizer||new xc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={other:kl,block:uc.normal,inline:fc.normal};this.options.pedantic?(e.block=uc.pedantic,e.inline=fc.pedantic):this.options.gfm&&(e.block=uc.gfm,this.options.breaks?e.inline=fc.breaks:e.inline=fc.gfm),this.tokenizer.rules=e}static get rules(){return{block:uc,inline:fc}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(kl.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){for(this.options.pedantic&&(t=t.replace(kl.tabCharGlobal," ").replace(kl.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0))))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);const n=e.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);const n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);const n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){const o=e.at(-1);n&&"paragraph"===o?.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(r),n=i.length!==t.length,t=t.substring(r.raw.length)}else if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);const n=e.at(-1);"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(r)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n=t,r=null;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)t.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;t;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0))))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);const n=e.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,n,o)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let s=t;if(this.options.extensions?.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(s=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(s)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;const n=e.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},kc=class{options;parser;constructor(t){this.options=t||wl}space(t){return""}code({text:t,lang:e,escaped:n}){const r=(e||"").match(kl.notSpaceStart)?.[0],i=t.replace(kl.endingNewline,"")+"\n";return r?'<pre><code class="language-'+bc(r)+'">'+(n?i:bc(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:bc(i,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,n=t.start;let r="";for(let e=0;e<t.items.length;e++){const n=t.items[e];r+=this.listitem(n)}const i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+bc(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",n="";for(let e=0;e<t.header.length;e++)n+=this.tablecell(t.header[e]);e+=this.tablerow({text:n});let r="";for(let e=0;e<t.rows.length;e++){const i=t.rows[e];n="";for(let t=0;t<i.length;t++)n+=this.tablecell(i[t]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+r+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${bc(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const r=this.parser.parseInline(n),i=yc(t);if(null===i)return r;let o='<a href="'+(t=i)+'"';return e&&(o+=' title="'+bc(e)+'"'),o+=">"+r+"</a>",o}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const i=yc(t);if(null===i)return bc(n);let o=`<img src="${t=i}" alt="${n}"`;return e&&(o+=` title="${bc(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:bc(t.text)}},Cc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ec=class t{options;renderer;textRenderer;constructor(t){this.options=t||wl,this.options.renderer=this.options.renderer||new kc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Cc}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(t,e=!0){let n="";for(let r=0;r<t.length;r++){const i=t[r];if(this.options.extensions?.renderers?.[i.type]){const t=i,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){n+=e||"";continue}}const o=i;switch(o.type){case"space":n+=this.renderer.space(o);continue;case"hr":n+=this.renderer.hr(o);continue;case"heading":n+=this.renderer.heading(o);continue;case"code":n+=this.renderer.code(o);continue;case"table":n+=this.renderer.table(o);continue;case"blockquote":n+=this.renderer.blockquote(o);continue;case"list":n+=this.renderer.list(o);continue;case"html":n+=this.renderer.html(o);continue;case"paragraph":n+=this.renderer.paragraph(o);continue;case"text":{let i=o,s=this.renderer.text(i);for(;r+1<t.length&&"text"===t[r+1].type;)i=t[++r],s+="\n"+this.renderer.text(i);n+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{const t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}parseInline(t,e=this.renderer){let n="";for(let r=0;r<t.length;r++){const i=t[r];if(this.options.extensions?.renderers?.[i.type]){const t=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=t||"";continue}}const o=i;switch(o.type){case"escape":case"text":n+=e.text(o);break;case"html":n+=e.html(o);break;case"link":n+=e.link(o);break;case"image":n+=e.image(o);break;case"strong":n+=e.strong(o);break;case"em":n+=e.em(o);break;case"codespan":n+=e.codespan(o);break;case"br":n+=e.br(o);break;case"del":n+=e.del(o);break;default:{const t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}},Sc=class{options;block;constructor(t){this.options=t||wl}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?_c.lex:_c.lexInline}provideParser(){return this.block?Ec.parse:Ec.parseInline}},Bc=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ec;Renderer=kc;TextRenderer=Cc;Lexer=_c;Tokenizer=xc;Hooks=Sc;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{const t=r;for(const r of t.header)n=n.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)n=n.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=r;n=n.concat(this.walkTokens(t.items,e));break}default:{const t=r;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach((r=>{const i=t[r].flat(1/0);n=n.concat(this.walkTokens(i,e))})):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){const e=this.defaults.renderer||new kc(this.defaults);for(const n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,i=t.renderer[r],o=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new xc(this.defaults);for(const n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=t.tokenizer[r],o=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new Sc;for(const n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,i=t.hooks[r],o=e[r];Sc.passThroughHooks.has(n)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>o.call(e,t)));const n=i.call(e,t);return o.call(e,n)}:e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,r=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(r.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return _c.lex(t,e??this.defaults)}parser(t,e){return Ec.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{const r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?_c.lex:_c.lexInline,a=i.hooks?i.hooks.provideParser():t?Ec.parse:Ec.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>a(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(o);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let n=a(t,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(t){return o(t)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+bc(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}};function Oc(t,e){return Bc.parse(t,e)}Oc.options=Oc.setOptions=function(t){return Bc.setOptions(t),Oc.defaults=Bc.defaults,vl(Oc.defaults),Oc},Oc.getDefaults=Al,Oc.defaults=wl,Oc.use=function(...t){return Bc.use(...t),Oc.defaults=Bc.defaults,vl(Oc.defaults),Oc},Oc.walkTokens=function(t,e){return Bc.walkTokens(t,e)},Oc.parseInline=Bc.parseInline,Oc.Parser=Ec,Oc.parser=Ec.parse,Oc.Renderer=kc,Oc.TextRenderer=Cc,Oc.Lexer=_c,Oc.lexer=_c.lex,Oc.Tokenizer=xc,Oc.Hooks=Sc,Oc.parse=Oc;Oc.options,Oc.setOptions,Oc.use,Oc.walkTokens,Oc.parseInline,Ec.parse,_c.lex;const Mc=t=>[/^#{1,6}\s/m,/\*\*.*\*\*/,/__.*__/,/\*.*\*/,/_.*_/,/\[.*\]\(.*\)/,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m,/```[\s\S]*```/,/`[^`]+`/,/^>\s/m,/!\[.*\]\(.*\)/,/^\s*[-*_]{3,}\s*$/m].some((e=>e.test(t))),$c=At.hj.create({name:"markdownPaste",addOptions:()=>({autoDetect:!0}),addProseMirrorPlugins(){const t=this.editor,e=this.options;return[new wt.Sy({key:new wt.H$("markdownPaste"),props:{handlePaste:(n,r,i)=>{if(!e.autoDetect)return!1;const o=r.clipboardData?.getData("text/plain"),s=r.clipboardData?.getData("text/html");if(console.log("Paste event - text:",o),console.log("Paste event - html:",s),console.log("Is markdown?",Mc(o)),!o||!Mc(o))return console.log("Not markdown or no text, skipping"),!1;if(s&&s.trim()){const t=/<(?!meta|style|link)([\w]+)[^>]*>/i.test(s);if(console.log("Has rich HTML content:",t),t&&!Mc(o))return console.log("Skipping due to rich HTML"),!1}try{const e=Oc.parse(o,{async:!1});return console.log("Parsed markdown to HTML:",e),r.preventDefault(),t.commands.insertContent(e),!0}catch(t){return console.error("Error parsing markdown:",t),!1}}}})]}}),Ic=At.hj.create({name:"markdownContent",addCommands:()=>({setMarkdownContent:t=>e=>{let{commands:n,editor:r}=e;try{const e=Oc.parse(t,{async:!1});return n.setContent(e)}catch(t){return console.error("Error parsing markdown:",t),!1}},insertMarkdownContent:t=>e=>{let{commands:n,editor:r}=e;try{const e=Oc.parse(t,{async:!1});return n.insertContent(e)}catch(t){return console.error("Error parsing markdown:",t),!1}}})}),Tc=t=>{const e=t.defaultDirection||"auto";let n=t.content;if(n&&("string"==typeof(r=n)&&[/^#{1,6}\s/m,/\*\*.*\*\*/,/__.*__/,/\*.*\*/,/_.*_/,/\[.*\]\(.*\)/,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m,/```[\s\S]*```/,/`[^`]+`/,/^>\s/m,/!\[.*\]\(.*\)/,/^\s*[-*_]{3,}\s*$/m].some((t=>t.test(r)))))try{n=Oc.parse(n,{async:!1})}catch(t){console.error("Error parsing markdown content:",t)}var r;const{content:i,...o}=t,s=new At.ML({autofocus:!1,content:n,editorProps:{handleDOMEvents:{drop:(t,e)=>{if(e.dataTransfer&&"move"===e.dataTransfer.effectAllowed&&1===e.dataTransfer.items.length&&"text/plain"===e.dataTransfer.items[0].type){const t=e.dataTransfer.getData("text/plain");"string"!=typeof t||t.trim()||e.preventDefault()}}},handlePaste:(t,e,n)=>{const r=e.clipboardData?.getData("text/plain");if(!r||!(t=>{try{const e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol}catch(e){return/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/i.test(t.trim())}})(r.trim()))return!1;const i=t.state,{from:o,to:s}=i.selection,a=i.doc.textBetween(o,s);if(a&&(t=>{if(!t||"string"!=typeof t)return!1;const e=t.trim();return/^(https?:\/\/|www\.|[\w-]+\.(com|org|net|io|co|edu|gov|mil|int|biz|info|name|pro|museum|aero|coop|travel|jobs|mobi|asia|tel|xxx|[\w]{2,}))[\w\.\/\-\?\=\&\#\@\%\+\~]*/i.test(e)})(a)){let e=!1,n=null;if(i.doc.nodesBetween(o,s,((t,r)=>{if(e)return!1;Math.max(o,r),Math.min(s,r+t.nodeSize);return t.marks.forEach((t=>{"link"===t.type.name&&(e=!0,n=t)})),!e})),!e){const t=i.storedMarks?.find((t=>"link"===t.type.name)),r=i.selection.$from.marks().find((t=>"link"===t.type.name)),o=i.selection.$to.marks().find((t=>"link"===t.type.name));n=t||r||o,e=!!n}const a=i.schema.marks.link;if(!a)return!1;let l=r.trim();l.startsWith("http://")||l.startsWith("https://")||(l="https://"+l);const c=i.tr;if(e){c.removeMark(o,s,a),c.replaceWith(o,s,i.schema.text(l));const t=o,e=o+l.length;c.addMark(t,e,a.create({href:l}))}else{c.replaceWith(o,s,i.schema.text(l));const t=o,e=o+l.length;c.addMark(t,e,a.create({href:l}))}const d=o+l.length;return c.setSelection(wt.Bs.near(c.doc.resolve(d))),t.dispatch(c),!0}return!1}},extensions:[Bt.Z,Wt.configure({placeholder:t=>{let{node:e}=t;return"paragraph"===e.type.name?B.h.get("lang","add_content_to_paragraph"):"heading"===e.type.name?B.h.get("lang","add_content_to_heading"):null}}),Wn,Ot.configure({HTMLAttributes:{class:"cdtr-heading",style:"font-weight: initial"}}),yl,Rn,Mt.Z,Ki.configure({openOnClick:!1,HTMLAttributes:{class:"cdtr-editor-link"}}),de.configure({draggable:!0}),ae.configure({keepMarks:!0}),Tn.configure({lowlight:tl,draggable:!0,defaultLanguage:"javascript"}),Nn.configure({fonts:t.fontFamilies}),Nt,Rt,vt.ZP,Ft,Vt,Is,sl,re,Ss.configure({resizable:!1,draggable:!0,lastColumnResizable:!1,HTMLAttributes:{class:"cdtr-table-element"}}),Os.configure({draggable:!0}),Ms,$s,Yt,nl.configure({inline:!1,HTMLAttributes:{"data-type":"inline-image","cdtr-resizable":"true",style:"display: block; margin: 0 auto;"}}),Kt.configure({class:"dropcursor",color:"black",width:2}),te.configure({types:["heading","blockquote","paragraph","taskList","customBulletList","bulletList","orderedList"]}),Qt.configure({types:["heading","blockquote","paragraph","taskList","orderedList"]}),Jt.configure({defaultDirection:e,types:["heading","blockquote","paragraph","taskList","customBulletList","bulletList","orderedList"]}),Ts.configure({types:["heading","paragraph"],defaultAlignment:"rtl"===e?"right":"left"}),St,Et,zt,Bs,Ct,xt,se,oe,Yn,$c,Ic],...o});return s};n(35432);var Lc=n(86274),Nc={};Nc.setAttributes=D(),Nc.insert=R().bind(null,"head"),Nc.domAPI=L(),Nc.insertStyleElement=H();I()(Lc.Z,Nc);Lc.Z&&Lc.Z.locals&&Lc.Z.locals;var Rc=n(36351);n(9545);const Pc={paragraph:16,heading:32,h1:32,h2:28,h3:24,h4:20,h5:18,h6:16,listItem:16,tableCell:16,tableHeader:16,blockquote:18,codeBlock:14,text:16,span:16,div:16,li:16,td:16,th:16,p:16},Dc={paragraph:"Arial",heading:"Arial",h1:"Arial",h2:"Arial",h3:"Arial",h4:"Arial",h5:"Arial",h6:"Arial",listItem:"Arial",tableCell:"Arial",tableHeader:"Arial",blockquote:"Arial",codeBlock:"Courier New",text:"Arial",span:"Arial",div:"Arial",li:"Arial",td:"Arial",th:"Arial",p:"Arial"},zc={paragraph:1.4,heading:1.2,h1:1.2,h2:1.2,h3:1.2,h4:1.2,h5:1.2,h6:1.2,listItem:1.4,tableCell:1.4,tableHeader:1.4,blockquote:1.4,codeBlock:1.4,text:1.4,span:1.4,div:1.4,li:1.4,td:1.4,th:1.4,p:1.4};function Hc(t){return null!=t&&""!==t}function jc(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!t)return void console.warn("No editor provided");const i={...Pc,...e},o={...Dc,...n},s={...zc,...r};console.log("Validating default values..."),console.log("Font sizes:",i),console.log("Font families:",o),console.log("Line heights:",s),console.log("=== APPLYING FONT SIZES, FAMILIES, AND LINE HEIGHTS TO TIPTAP DOCUMENT ==="),console.log("Font sizes to apply:",i),console.log("Font families to apply:",o),console.log("Line heights to apply:",s);const{state:a}=t,{doc:l}=a;l.descendants(((e,n)=>{const r=e.type.name;console.log(`Processing node: ${r} at position ${n}`);const a=e.marks?.find((t=>"textStyle"===t.type.name))?.attrs?.fontSize,l=e.marks?.find((t=>"textStyle"===t.type.name))?.attrs?.fontFamily;if(a||l)console.log(`Node at position ${n} already has font attributes:`,{fontSize:a||"not set",fontFamily:l||"not set"});else{let a=null,l=null,c=null;if("heading"===r){const t=e.attrs.level;a=i[`h${t}`]||i.heading,l=o[`h${t}`]||o.heading,c=s[`h${t}`]||s.heading,console.log(`Heading level ${t}:`,{fontSize:a||"not set",fontFamily:l||"not set",lineHeight:c||"not set"})}else i[r]&&(a=i[r],l=o[r],c=s[r],console.log(`Node type ${r}:`,{fontSize:a||"not set",fontFamily:l||"not set",lineHeight:c||"not set"}));(a||l||c)&&function(t,e,n,r,i,o){try{let s=t.chain().focus().setTextSelection({from:e,to:e+n});Hc(r)&&(s=s.setFontSize(r),console.log(`Setting font size: ${r}`)),Hc(i)&&(s=s.setFontFamily(i),console.log(`Setting font family: ${i}`)),Hc(o)&&(s=s.setLineHeight(o),console.log(`Setting line height: ${o}`)),s.run(),console.log(`Applied to node at position ${e}:`,{fontSize:r||"not set",fontFamily:i||"not set",lineHeight:o||"not set"})}catch(t){console.warn(`Failed to apply font and line height to node at position ${e}:`,t)}}(t,n,e.nodeSize,a,l,c)}return!0})),console.log("Font and line height application complete")}function Uc(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];t&&e&&(console.log("=== INSERTING CONTENT AND APPLYING FONT SIZES, FAMILIES, AND LINE HEIGHTS ==="),console.log("Content to insert:",e),console.log("Preserve existing fonts:",o),t.commands.insertContent(e),o||setTimeout((()=>{jc(t,n,r,i)}),100),t.chain().focus())}const Zc=(0,Rc.c)(),Fc="selection-background";function Vc(t,e){t?e.classList.add(dt.active):e.classList.remove(dt.active)}!function(){if(document.getElementById("theme-provider-vars"))return;const t=document.createElement("style");t.innerHTML='#input-iframe--v1, :root {\n --radius: 20px;\n --sm-radius: .25rem;\n --secondary: #0a0a0a;\n --dark: #002d5c; /* Darker blue shade */\n --sidebar-color: #1a73e8; /* Sidebar primary color */\n --sidebar-icon-color: #fff;\n --primary: #4285f4; /* Primary theme color */\n --primaryText: #ffffff; /* Text on primary color */\n --primary-text: #ffffff; /* Text on primary color */\n --resizer-color: #c1c1c1; /* Light gray resizer */\n --alpha: 0.8; /* Example alpha transparency */\n --micro-info-color: #7d7d7d;\n --bgPrimary: #f5f5f5; /* Background primary color */\n --secondary: #808080; /* Secondary color */\n --disabled: #d3d3d3; /* Disabled element color */\n --icon-color: #000000; /* Black for icons */\n --error-color: rgba(165, 16, 16, 0.877); \n --input-border-color: #9EADBD;\n --font-family: "Arial, sans-serif"; /* Example font family */\n --cdtr-font-family: "Arial, sans-serif"; /* Same as above */\n --layout-holder-color: #e0e0e0; /* Light gray background */\n --justify-content: center; /* Example alignment */\n --row-direction: row; /* Default row direction */\n --medium-box-shadow: 0 2px 10px 0 rgb(0 6 36 / 20%);\n --section-padding: 10px;\n --add-padding-row: 25px 0 25px 0;\n --section-padding-top: 6px;\n --section-padding-bottom: 6px;\n --margin-top: 1rem;\n --divider-color: #00000026;\n --focus-shadow: 0 0 0 0.15rem rgb(13 110 253 / 10%);\n --text-align-locale: left; /* Example locale text alignment */\n --direction-locale: rtl; /* Left-to-right direction */\n --direction: rtl; /* Left-to-right direction */\n --section-hover: #f0f0f048;\n --spacing-sm: .1rem;\n --paper-font-subhead_-_font-size: 13px;\n --editor-font-size: 13px;\n --paper-item-min-height: 30px;\n --element-border-color: rgba(0, 0, 0, 0.116);\n --editor-input-height: 30px;\n --title-block-height: 50px;\n --text-dark-color: #000000;\n} ',document.head.appendChild(t)}();const Yc=t=>{const{defaultDirection:e,content:n,editable:$,element:I,builder:T=[],language:L,editorWidth:N,onClickMagic:R}=t,P=T.find((t=>"fontFamily"===t.type)),D=Tc({fontFamilies:P?.fonts||[],defaultDirection:e,element:I,editable:$,content:n,language:L}),z=(P?.fonts.length>0&&P.fonts,T.find((t=>"fontSize"===t.type))),H=z?z.sizes:[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174],j={direction:()=>{const t=D.isActive({direction:"rtl"})?"ltr":"rtl";Z.direction.element.innerHTML="ltr"===t?a().outerHTML:(t=>(0,r.Z)("svg",(0,i.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),(0,r.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.Z)("path",{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zm8 12v-2.5l4 3.5-4 3.5V19H5v-2h12z"})))().outerHTML},fontWeight:()=>{Vc(D.isActive("bold"),Z.bold.element)},italic:()=>{Vc(D.isActive("italic"),Z.italic.element)},link:()=>{Vc(D.isActive("link"),Z.link.element)},unLink:()=>{D.isActive("link")?Z.unLink.element.classList.remove(dt.disabled):Z.unLink.element.classList.add(dt.disabled)},underline:()=>{Vc(D.isActive("underline"),Z.underline.element)},strike:()=>{Vc(D.isActive("strike"),Z.strike.element)},color:()=>{const t=D.getAttributes("textStyle").color||"black";Z.fontColor.element.setAttribute("value",t)},background:()=>{const t=D.getAttributes("textStyle").backgroundColor||"#fff";Z.backcolor.element.setAttribute("value",t)},fontFamily:()=>{const t=D.getAttributes("textStyle").fontFamily?.split(",")[0].replace(/['"]+/g,"");Z.fontFamily.element.value=t||"Arial",Z.fontFamily.element.name=t||"Arial"},table:()=>{Vc(D.isActive("table"),Z.table.element)},image:()=>Vc(D.isActive("image"),Z.image.element),video:()=>Vc(D.isActive("video"),Z.video.element),bulletList:()=>Vc(D.isActive("bulletList"),Z.bullet.element),customBulletList:()=>Vc(D.isActive("customBulletList"),Z.customList.element),numberedList:()=>{Vc(D.isActive("orderedList"),Z.numbered.element)},quotes:()=>Vc(D.isActive("blockquote"),Z.quotes.element),horizontalRule:()=>Vc(D.isActive("horizontalRule"),Z.horizonRule.element),textAlign:()=>{["justify","center","right","left"].forEach((t=>{Vc(D.isActive({textAlign:t}),Z[t].element)}))},fontSize:()=>{D.getAttributes("textStyle").fontSize;Z.fontSize.element.patch(D.getAttributes("textStyle").fontSize||"16px")}},U={removeTable:()=>D.chain().focus().deleteTable().run(),addTable:t=>{const e=(0,r.Z)(at,{style:{width:"220px",padding:"15px"},headerText:"add_table",target:t.target},(0,r.Z)("cdtr-table-cells-editor",{onChange:t=>{let{target:n}=t;const{x:r,y:i}=n.value;e.remove(),D.chain().focus().insertTable({rows:r,cols:i,withHeaderRow:!0}).run()}}));document.body.appendChild(e)},setButton:()=>{D.chain().focus().toggleButton({text:"button",width:"100",height:"100"}).run()},addImage:()=>{D.chain().focus().setImage({src:"https://picsum.photos/100/100",alt:""}).run()},setVideo:()=>{D.chain().focus().setVideo({src:"https://www.youtube.com/watch?v=HUYB8EY09ME",width:"500",height:"300"}).run()},setQuotes:()=>{D.chain().focus().toggleBlockquote().run()},setCode:()=>{D.chain().focus().toggleCodeBlock().run()},setHorizonRule:()=>{D.chain().focus().setHorizontalRule({url:"https://www.youtube.com/watch?v=HUYB8EY09ME",width:"100",height:"100"}).run()},clearFormat:()=>{D.chain().focus().unsetAllMarks().run()},emoji:t=>{},table:()=>D.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),bold:()=>D.chain().focus().toggleBold().run(),italic:()=>D.chain().focus().toggleItalic().run(),underline:()=>D.chain().focus().toggleUnderline().run(),strike:()=>D.chain().focus().toggleStrike().run(),direction:()=>{const t=D.isActive({direction:"rtl"})?"ltr":"rtl";D.chain().focus().setDirection(t).run()},textAlign:t=>D.chain().focus().setTextAlign(t).run(),bullets:()=>D.chain().focus().toggleBulletList().run(),numbered:()=>D.chain().focus().toggleOrderedList().run(),customList:()=>D.chain().focus().toggleCustomList().run(),fontSize:t=>{D.chain().focus().setFontSize(t).run()},fontFamily:t=>D.chain().focus().setFontFamily(t).run(),link:t=>{if(!t)return null;const e=t.target.closest("button"),n=(0,r.Z)("cdtr-link-element",{hasButton:!0,href:D.getAttributes("link").href||"",protocol:D.getAttributes("link").protocol,target:D.getAttributes("link").target,onChange:t=>(t=>{const e=D.state,{from:n,to:r}=e.selection;let o=[];e.doc.nodesBetween(n,r,(t=>{o=[...o,...t.marks]}));const s=o.find((t=>"link"===t.type.name)),a=t.target.value;a.href=a.getUrlWithParams(),s?D.chain().focus().setColor("blue").extendMarkRange("link").updateAttributes("link",a).run():D.chain().focus().setTextSelection({from:n,to:r}).setColor("blue").setLink(a).run(),i.close()})(t)}),i=(0,r.Z)(at,{offsetY:30,style:{width:"300px",padding:"15px"},headerText:B.h.get("lang","link"),target:e},n);document.body.appendChild(i)},unLink:()=>D.commands.unsetLink(),forColor:t=>{D.chain().focus().setColor(t).run()},clearColor:()=>D.chain().focus().unsetColor().run(),clearBackcolor:()=>D.chain().focus().unsetBackgroundColor().run(),backColor:t=>D.chain().focus().setBackgroundColor(t).run(),onClickMagic:()=>{const t={selectAll:()=>(D.chain().focus().selectAll().run(),t),selectNode:e=>(D.chain().focus().selectNode(e).run(),t),selectParentNode:()=>(D.chain().focus().selectParentNode().run(),t),insertContent:e=>(D.commands.insertContent(e),D.chain().focus(),t),insertContentHtml:e=>{const n=Oc.parse(e,{async:!1});return Uc(D,n,{},{},{},!0),t},getHTML:()=>D.getHTML(),getText:()=>D.getText(),getJSON:()=>D.getJSON()};R(t)}};let Z={bold:{element:(0,r.Z)(V,{onClick:U.bold},(0,r.Z)(o,null)),className:dt.colBtn,title:"bold"},underline:{element:(0,r.Z)(V,{onClick:U.underline},(0,r.Z)(h,null)),className:dt.colBtn,title:"underline"},italic:{element:(0,r.Z)(V,{onClick:U.italic},(0,r.Z)(p,null)),className:dt.colBtn,title:"italic"},strike:{element:(0,r.Z)(V,{onClick:U.strike},(0,r.Z)(u,null)),className:dt.colBtn,title:"strikeThrough",divider:!0},fontFamily:{element:(0,r.Z)("cdtr-font-family-editor",{light:!0,onChange:t=>{const e=t.target.value;U.fontFamily(e)}}),className:dt.dropdown,title:"fontFamily",divider:!0},fontSize:{element:(0,r.Z)(ft,{style:{fontSize:"13px",boxShadow:"none"},icon:(0,r.Z)(g,null),title:8,className:dt.dropdown},H.map((t=>(0,r.Z)(mt,{style:{fontSize:"13px"},onClick:()=>U.fontSize(t),className:dt.fontSizeItem,value:t+"px"},t,"px")))),className:dt.dropdown,title:"fontSize",divider:!0},left:{element:(0,r.Z)(V,{onClick:()=>U.textAlign("left")},(0,r.Z)(b,null)),className:dt.colBtn,title:"left"},center:{element:(0,r.Z)(V,{onClick:()=>U.textAlign("center")},(0,r.Z)(A,null)),className:dt.colBtn,title:"center"},right:{element:(0,r.Z)(V,{onClick:()=>U.textAlign("right")},(0,r.Z)(y,null)),className:dt.colBtn,title:"right"},justify:{element:(0,r.Z)(V,{onClick:()=>U.textAlign("justify")},(0,r.Z)(w,null)),className:dt.colBtn,title:"justify",divider:!0},direction:{element:(0,r.Z)(V,{onClick:U.direction},(0,r.Z)(a,null)),className:dt.colBtn,title:B.h.get("lang","direction"),divider:!0},fontColor:{element:(0,r.Z)("color-playground",{ref:{onCreate:t=>{t.hasAlpha=!1,t.type="text"}},onChange:t=>{U.forColor(t.target.value),rt({context:{"::selection":{background:"transparent"}},id:Fc}),Zc.run((()=>{document.getElementById(Fc).remove()}),1500)},className:"cdtr-plugin","data-color":!0}),className:dt.colBtn,title:"forecolor"},backcolor:{element:(0,r.Z)("color-playground",{type:"background",ref:{onCreate:t=>{t.hasAlpha=!1}},onChange:t=>{U.backColor(t.target.value),rt({context:{"::selection":{background:"transparent"}},id:Fc}),Zc.run((()=>{document.getElementById(Fc).remove()}),1500)},className:"cdtr-plugin","data-color":!0}),className:dt.colBtn,title:B.h.get("lang","backcolor"),endLine:!0},bullet:{element:(0,r.Z)(V,{onClick:U.bullets},(0,r.Z)(c,null)),className:dt.colBtn,title:"bullets"},numbered:{element:(0,r.Z)(V,{onClick:U.numbered},(0,r.Z)(d,null)),className:dt.colBtn,title:"numbered"},customList:{element:(0,r.Z)(V,{onClick:U.customList},(0,r.Z)(l,null)),className:dt.colBtn,title:"taskList_with_icons",divider:!0},link:{element:(0,r.Z)(V,{onClick:U.link},(0,r.Z)(f,null)),className:dt.colBtn,title:"link"},unLink:{element:(0,r.Z)(V,{onClick:U.unLink},(0,r.Z)(m,null)),className:dt.colBtn,divider:!0,title:"unLink"},emoji:{element:(0,r.Z)(V,{onClick:t=>{const e=(0,r.Z)("cdtr-emoji-picker",null);e.onEmojiClick=(t,e)=>{D.commands.insertContent(e.emoji),D.chain().focus(),n.close()};const n=(0,r.Z)(at,{target:t.target},e);document.body.appendChild(n)}},(0,r.Z)(_,{className:dt.colorBtn})),className:dt.colBtn,title:"emoji",divider:!0},image:{element:(0,r.Z)(V,{onClick:U.addImage},(0,r.Z)(x,{className:dt.colorBtn})),className:dt.colBtn,title:"image"},video:{element:(0,r.Z)(V,{onClick:U.setVideo},(0,r.Z)(v,{className:dt.colorBtn})),className:dt.colBtn,title:"video"},horizonRule:{element:(0,r.Z)(V,{onClick:U.setHorizonRule},(0,r.Z)(k,{className:dt.colorBtn})),className:dt.colBtn,title:"divider"},table:{element:(0,r.Z)(V,{onClick:U.addTable},(0,r.Z)(S,{className:dt.colorBtn})),className:dt.colBtn,title:"table",divider:!0},quotes:{element:(0,r.Z)(V,{onClick:U.setQuotes},(0,r.Z)(C,{className:dt.colorBtn})),className:dt.colBtn,title:"quotes",divider:!0},clearFormat:{element:(0,r.Z)(V,{onClick:U.clearFormat},(0,r.Z)(E,{className:dt.colorBtn})),className:dt.colBtn,title:"clearFormat",divider:!0},magic:{element:(0,r.Z)(V,{onClick:U.onClickMagic},(0,r.Z)(s,null)),className:dt.colBtn,title:"magic",divider:!0},mergeTags:{element:(0,r.Z)("cdtr-merge-tags",{onChange:t=>{D.commands.insertContent(t.target.value),D.chain().focus();const e=document.querySelector("cdtr-drop-modal");e?.remove()}}),title:"mergeTags",divider:!0}};const Y="editor";Y&&Y.textEditor&&Y.textEditor.cmds&&Array.isArray(Y.textEditor.cmds)&&Y.textEditor.cmds.forEach((t=>{const e="function"==typeof t.element?{element:t.element(),title:t.title,className:t.className||""}:{divider:t.divider};Z["extend-"+(0,F.Z)()]=e}));const W=(()=>{const t=[];for(const e in Z)if(Object.hasOwnProperty.call(Z,e)){if(T.find((t=>t.type===e))){const n=Z[e];n&&n.element&&(n.element.classList.add("cdtr-button-cmd"),n.element.classList.add(dt.btn),t.push(n)),n.endLine&&(t.push({endLine:!0}),delete n.endLine),n.divider&&(t.push({divider:!0}),delete n.divider)}}return t})(),q=t=>{let{editor:e}=t;for(const t in j)if(Object.hasOwnProperty.call(j,t)){(0,j[t])()}};return{component:new M({onLoad:()=>{D.off("selectionUpdate",q),D.off("transaction",q),D.on("selectionUpdate",q),D.on("transaction",q),window.removeEventListener("click",q),window.addEventListener("click",q),q({editor:D})},onUnload:()=>{},children:(0,r.Z)("cdtr-row",{style:{width:N||null},justify:"flex-start",alignItems:"center",className:O(dt.textEditor,"cdtr-plugin","cdtr-text-editor-plugin",dt.fadeUp)},W.map(((t,e)=>t.divider?(0,r.Z)("div",{className:dt.dividerY}):t.endLine?(0,r.Z)("cdtr-col",{sm:12}):(0,r.Z)("cdtr-col",{"tooltip-dir":"top",className:t.className},(0,r.Z)("cdtr-tooltip",{placement:"top",content:t.title,delay:"600,0"},t.element," ")," "))),(0,r.Z)("div",{className:dt.dividerX}))}),editor:D}};const Wc=function t(e){e&&e.firstChild&&(e.removeChild(e.firstChild),t(e))},qc=t=>{const e=(0,r.Z)("div",{style:{zIndex:(0,nt.Z)()+3},className:O(dt.main,"no-select")}),n=t.container,i=t.target,o=t.editor,s=t.offsetTop,a=r=>{window.requestAnimationFrame((()=>{setTimeout((()=>{if(!n)return;const r=t.container,o=t.target?.getBoundingClientRect();if(!o)return void console.error("no block");const a=e.getBoundingClientRect(),l=i.getBoundingClientRect(),c=o.top+r.offsetTop-a.height;let d=l.left+(l.width-a.width)/2+"px";e.style.left=d,n&&r.offsetTop>c-60?(e.classList.contains(dt.withTransition)||e.classList.add(dt.withTransition),e.classList.contains(dt.sticky)||e.classList.add(dt.sticky)):(e.classList.remove(dt.withTransition),e.classList.remove(dt.sticky),e.style.top=Math.abs(o.top)-a.height-s+"px")}),0)}))},l=new M({onUpdate:()=>{if(n){e.appendChild(o),e.style.opacity=0,setTimeout((()=>{e.style.opacity=1}),50);const t=e.getBoundingClientRect(),r=n.getBoundingClientRect();e.style.top=Math.abs(r.top)-t.height+"px"}},onUnload:()=>{Wc(e),n.removeEventListener("scroll",a),document.removeEventListener("scroll",a)},children:e});return l.start=()=>{document.body.appendChild(l),n.addEventListener("scroll",a),window.addEventListener("scroll",a),a()},l};const Xc=new class{constructor(){(0,gt.Z)(this,"events",void 0),this.onDispatchEvent=this.onDispatchEvent.bind(this),this.events={click:[],mouseover:[],mousedown:[],mousemove:[],mouseup:[],keydown:[],keyup:[],scroll:[]}}onDispatchEvent(t){const e=t,n=this;Array.isArray(n.events[t.type])&&requestAnimationFrame((()=>n.events[t.type].forEach(((r,i)=>{"function"==typeof r?r(e):n.events[t.type].splice(i,1)}))))}destroy(){}connect(t,e){const n=this;if(!n.events[t])return void console.error("Can't use this event name",t);0===n.events[t].length&&window.addEventListener(t,this.onDispatchEvent,!1);n.events[t].findIndex((t=>t===e))>-1?console.warn("The event has already been subscribed."):n.events[t].push(e)}disconnect(t,e){const n=this;if(!n.events[t])return void console.error("Can't remove event name",t);0===n.events[t].length&&window.removeEventListener(t,this.onDispatchEvent);const r=n.events[t].findIndex((t=>t===e));r>-1&&Array.from(n.events[t]).splice(r,1)}};Xc.connect("mousemove",(t=>{B.h.set({mouse:{y:t.pageY,x:t.pageX}})}));const Gc=Xc;const Kc=new class{constructor(){this.selectedRows=[],this.connected=!1,this.onExecute=(t,e)=>{},this.connect=this.connect.bind(this),this.node=(0,r.Z)("cdtr-table-editor",{onChange:this.onExecute}),this.render=this.render.bind(this),Gc.connect("keydown",this.render),Gc.connect("scroll",this.render)}disconnect(){this.connected=!1,this.node.remove()}connect(t,e){this.connected=!0,this.target=t,this.editor=e,this.render()}render(){if(this.connected&&this.target){const t=this.target.getBoundingClientRect();let e=t.top+t.height+5;e+43>window.innerHeight&&(e=window.innerHeight-43),e<t.top&&(e=t.top),this.node.setAttribute("top",e),this.node.setAttribute("left",t.left),this.node.setAttribute("width",t.width),this.node.setAttribute("height",t.height),document.body.appendChild(this.node),this.selectedRows=Array.from(this.target.querySelectorAll(".selectedCell")),this.node.setAttribute("selectedRows",this.selectedRows.length)}}},Jc=Kc;class Qc extends bt.oi{constructor(){super(),this.className="cdtr-button-cmd",this.cmds={tdColor:t=>{Kc.editor.commands.updateAttributes("tableCell",{borderColor:t.target.value})},toggleHeaderColumn:()=>Kc.editor.chain().focus().toggleHeaderColumn().run(),toggleHeaderCell:()=>Kc.editor.chain().focus().toggleHeaderCell().run(),mergeOrSplit:()=>Kc.editor.chain().focus().mergeOrSplit().run(),addRowAfter:()=>Kc.editor.chain().focus().addRowAfter().run(),addRowBefore:()=>Kc.editor.chain().focus().addRowBefore().run(),addColumnBefore:()=>Kc.editor.chain().focus().addColumnBefore().run(),addColumnAfter:()=>Kc.editor.chain().focus().addColumnAfter().run(),deleteColumn:()=>Kc.editor.chain().focus().deleteColumn().run(),deleteRow:()=>Kc.editor.chain().focus().deleteRow().run(),splitCell:()=>Kc.editor.chain().focus().splitCell().run(),deleteTable:()=>Kc.editor.chain().focus().deleteTable().run(),mergeCells:()=>Kc.editor.chain().focus().mergeCells().run(),setWidth:()=>{Kc.editor.commands.updateAttributes("table",{width:"300px"})}}}render(){return bt.dy`<div
1722
+ `),customElements.get("cdtr-table-cells-editor")||customElements.define("cdtr-table-cells-editor",yt);var At=n(88573),wt=n(27191),vt=n(64652);const xt=At.hj.create({name:"smilieReplacer",addInputRules:()=>[(0,At.DS)({find:/-___- $/,replace:"😑 "}),(0,At.DS)({find:/:'-\) $/,replace:"😂 "}),(0,At.DS)({find:/':-\) $/,replace:"😅 "}),(0,At.DS)({find:/':-D $/,replace:"😅 "}),(0,At.DS)({find:/>:-\) $/,replace:"😆 "}),(0,At.DS)({find:/-__- $/,replace:"😑 "}),(0,At.DS)({find:/':-\( $/,replace:"😓 "}),(0,At.DS)({find:/:'-\( $/,replace:"😢 "}),(0,At.DS)({find:/>:-\( $/,replace:"😠 "}),(0,At.DS)({find:/O:-\) $/,replace:"😇 "}),(0,At.DS)({find:/0:-3 $/,replace:"😇 "}),(0,At.DS)({find:/0:-\) $/,replace:"😇 "}),(0,At.DS)({find:/0;\^\) $/,replace:"😇 "}),(0,At.DS)({find:/O;-\) $/,replace:"😇 "}),(0,At.DS)({find:/0;-\) $/,replace:"😇 "}),(0,At.DS)({find:/O:-3 $/,replace:"😇 "}),(0,At.DS)({find:/:'\) $/,replace:"😂 "}),(0,At.DS)({find:/:-D $/,replace:"😃 "}),(0,At.DS)({find:/':\) $/,replace:"😅 "}),(0,At.DS)({find:/'=\) $/,replace:"😅 "}),(0,At.DS)({find:/':D $/,replace:"😅 "}),(0,At.DS)({find:/'=D $/,replace:"😅 "}),(0,At.DS)({find:/>:\) $/,replace:"😆 "}),(0,At.DS)({find:/>;\) $/,replace:"😆 "}),(0,At.DS)({find:/>=\) $/,replace:"😆 "}),(0,At.DS)({find:/;-\) $/,replace:"😉 "}),(0,At.DS)({find:/\*-\) $/,replace:"😉 "}),(0,At.DS)({find:/;-\] $/,replace:"😉 "}),(0,At.DS)({find:/;\^\) $/,replace:"😉 "}),(0,At.DS)({find:/B-\) $/,replace:"😎 "}),(0,At.DS)({find:/8-\) $/,replace:"😎 "}),(0,At.DS)({find:/B-D $/,replace:"😎 "}),(0,At.DS)({find:/8-D $/,replace:"😎 "}),(0,At.DS)({find:/:-\* $/,replace:"😘 "}),(0,At.DS)({find:/:\^\* $/,replace:"😘 "}),(0,At.DS)({find:/:-\) $/,replace:"🙂 "}),(0,At.DS)({find:/-_- $/,replace:"😑 "}),(0,At.DS)({find:/:-X $/,replace:"😶 "}),(0,At.DS)({find:/:-# $/,replace:"😶 "}),(0,At.DS)({find:/:-x $/,replace:"😶 "}),(0,At.DS)({find:/>.< $/,replace:"😣 "}),(0,At.DS)({find:/:-O $/,replace:"😮 "}),(0,At.DS)({find:/:-o $/,replace:"😮 "}),(0,At.DS)({find:/O_O $/,replace:"😮 "}),(0,At.DS)({find:/>:O $/,replace:"😮 "}),(0,At.DS)({find:/:-P $/,replace:"😛 "}),(0,At.DS)({find:/:-p $/,replace:"😛 "}),(0,At.DS)({find:/:-Þ $/,replace:"😛 "}),(0,At.DS)({find:/:-þ $/,replace:"😛 "}),(0,At.DS)({find:/:-b $/,replace:"😛 "}),(0,At.DS)({find:/>:P $/,replace:"😜 "}),(0,At.DS)({find:/X-P $/,replace:"😜 "}),(0,At.DS)({find:/x-p $/,replace:"😜 "}),(0,At.DS)({find:/':\( $/,replace:"😓 "}),(0,At.DS)({find:/'=\( $/,replace:"😓 "}),(0,At.DS)({find:/>:\\ $/,replace:"😕 "}),(0,At.DS)({find:/>:\/ $/,replace:"😕 "}),(0,At.DS)({find:/:-\/ $/,replace:"😕 "}),(0,At.DS)({find:/:-. $/,replace:"😕 "}),(0,At.DS)({find:/>:\[ $/,replace:"😞 "}),(0,At.DS)({find:/:-\( $/,replace:"😞 "}),(0,At.DS)({find:/:-\[ $/,replace:"😞 "}),(0,At.DS)({find:/:'\( $/,replace:"😢 "}),(0,At.DS)({find:/;-\( $/,replace:"😢 "}),(0,At.DS)({find:/#-\) $/,replace:"😵 "}),(0,At.DS)({find:/%-\) $/,replace:"😵 "}),(0,At.DS)({find:/X-\) $/,replace:"😵 "}),(0,At.DS)({find:/>:\( $/,replace:"😠 "}),(0,At.DS)({find:/0:3 $/,replace:"😇 "}),(0,At.DS)({find:/0:\) $/,replace:"😇 "}),(0,At.DS)({find:/O:\) $/,replace:"😇 "}),(0,At.DS)({find:/O=\) $/,replace:"😇 "}),(0,At.DS)({find:/O:3 $/,replace:"😇 "}),(0,At.DS)({find:/<\/3 $/,replace:"💔 "}),(0,At.DS)({find:/:D $/,replace:"😃 "}),(0,At.DS)({find:/=D $/,replace:"😃 "}),(0,At.DS)({find:/;\) $/,replace:"😉 "}),(0,At.DS)({find:/\*\) $/,replace:"😉 "}),(0,At.DS)({find:/;\] $/,replace:"😉 "}),(0,At.DS)({find:/;D $/,replace:"😉 "}),(0,At.DS)({find:/B\) $/,replace:"😎 "}),(0,At.DS)({find:/8\) $/,replace:"😎 "}),(0,At.DS)({find:/:\* $/,replace:"😘 "}),(0,At.DS)({find:/=\* $/,replace:"😘 "}),(0,At.DS)({find:/:\) $/,replace:"🙂 "}),(0,At.DS)({find:/=\] $/,replace:"🙂 "}),(0,At.DS)({find:/:\] $/,replace:"🙂 "}),(0,At.DS)({find:/:X $/,replace:"😶 "}),(0,At.DS)({find:/:# $/,replace:"😶 "}),(0,At.DS)({find:/=X $/,replace:"😶 "}),(0,At.DS)({find:/=x $/,replace:"😶 "}),(0,At.DS)({find:/:x $/,replace:"😶 "}),(0,At.DS)({find:/=# $/,replace:"😶 "}),(0,At.DS)({find:/:O $/,replace:"😮 "}),(0,At.DS)({find:/:o $/,replace:"😮 "}),(0,At.DS)({find:/:P $/,replace:"😛 "}),(0,At.DS)({find:/=P $/,replace:"😛 "}),(0,At.DS)({find:/:p $/,replace:"😛 "}),(0,At.DS)({find:/=p $/,replace:"😛 "}),(0,At.DS)({find:/:Þ $/,replace:"😛 "}),(0,At.DS)({find:/:þ $/,replace:"😛 "}),(0,At.DS)({find:/:b $/,replace:"😛 "}),(0,At.DS)({find:/d: $/,replace:"😛 "}),(0,At.DS)({find:/:\/ $/,replace:"😕 "}),(0,At.DS)({find:/:\\ $/,replace:"😕 "}),(0,At.DS)({find:/=\/ $/,replace:"😕 "}),(0,At.DS)({find:/=\\ $/,replace:"😕 "}),(0,At.DS)({find:/:L $/,replace:"😕 "}),(0,At.DS)({find:/=L $/,replace:"😕 "}),(0,At.DS)({find:/:\( $/,replace:"😞 "}),(0,At.DS)({find:/:\[ $/,replace:"😞 "}),(0,At.DS)({find:/=\( $/,replace:"😞 "}),(0,At.DS)({find:/;\( $/,replace:"😢 "}),(0,At.DS)({find:/D: $/,replace:"😨 "}),(0,At.DS)({find:/:\$ $/,replace:"😳 "}),(0,At.DS)({find:/=\$ $/,replace:"😳 "}),(0,At.DS)({find:/#\) $/,replace:"😵 "}),(0,At.DS)({find:/%\) $/,replace:"😵 "}),(0,At.DS)({find:/X\) $/,replace:"😵 "}),(0,At.DS)({find:/:@ $/,replace:"😠 "}),(0,At.DS)({find:/=\) $/,replace:"🙂 "}),(0,At.DS)({find:/<3 $/,replace:"❤️ "}),(0,At.DS)({find:/ש”ח $/,replace:"₪ "}),(0,At.DS)({find:/ש״ח $/,replace:"₪ "}),(0,At.DS)({find:/ש"ח $/,replace:"₪ "})]});var _t=n(52780);const kt=function(t){const e=/(#[0-9a-f]{3,6})\b/gi,n=[];return t.descendants(((t,r)=>{t.text&&Array.from(t.text.matchAll(e)).forEach((t=>{const e=t[0],i=t.index||0,o=r+i,s=o+e.length,a=_t.p.inline(o,s,{class:"color",style:`--color: ${e}`});n.push(a)}))})),_t.EH.create(t,n)},Ct=At.hj.create({name:"colorHighlighter",addProseMirrorPlugins:()=>[new wt.Sy({state:{init(t,e){let{doc:n}=e;return kt(n)},apply:(t,e)=>t.docChanged?kt(t.doc):e},props:{decorations(t){return this.getState(t)}}})]}),Et=At.vc.create({name:"textStyle",priority:101,addOptions:()=>({HTMLAttributes:{},mergeNestedSpanStyles:!1}),parseHTML(){return[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&(this.options.mergeNestedSpanStyles&&(t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach((t=>{var e,n;const r=t.getAttribute("style"),i=null===(n=null===(e=t.parentElement)||void 0===e?void 0:e.closest("span"))||void 0===n?void 0:n.getAttribute("style");t.setAttribute("style",`${i};${r}`)}))})(t),{})}]},renderHTML({HTMLAttributes:t}){return["span",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,((e,n)=>{if(e.isTextblock)return!0;e.marks.filter((t=>t.type===this.type)).some((t=>Object.values(t.attrs).some((t=>!!t))))||t.removeMark(n,n+e.nodeSize,this.type)})),!0}}}}),St=At.hj.create({name:"fontSize",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{if(t.style&&t.style.fontSize)return t.style.fontSize.replace(/['"]+/g,"");const e=window.getComputedStyle(t);return e&&e.fontSize?e.fontSize.replace(/['"]+/g,""):t.dataset&&t.dataset.fontSize?t.dataset.fontSize.replace(/['"]+/g,""):null},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands:()=>({setFontSize:t=>e=>{let{chain:n}=e;return n().setMark("textStyle",{fontSize:t+"px"}).run()},unsetFontSize:()=>t=>{let{chain:e}=t;return e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}),addKeyboardShortcuts(){return{"Mod-]":()=>{let t=parseInt(this.editor.getAttributes("textStyle").fontSize);t||(t=16),this.editor.commands.setFontSize(t+1)},"Mod-[":()=>{let t=parseInt(this.editor.getAttributes("textStyle").fontSize);t||(t=16),this.editor.commands.setFontSize(t-1)}}}});var Bt=n(42626);const Ot=At.NB.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML(t){let{node:e,HTMLAttributes:n}=t;const r=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0],i=document.createElement(`h${r}`);return i.style.cssText=n.style,i.style.fontFamily||(i.style.fontFamily="Arial, Helvetica, sans-serif"),n.style=i.style.cssText,[`h${r}`,(0,At.P1)(this.options.HTMLAttributes,n),0]},addCommands(){return{setHeading:t=>e=>{let{commands:n}=e;return!!this.options.levels.includes(t.level)&&n.setNode(this.name,t)},toggleHeading:t=>e=>{let{commands:n}=e;return!!this.options.levels.includes(t.level)&&n.toggleNode(this.name,"paragraph",t)}}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>(0,At.zK)({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}});var Mt=n(39615);const $t=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,It=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,Tt=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,Lt=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,Nt=At.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],renderHTML({HTMLAttributes:t}){return["strong",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,At.Cf)({find:$t,type:this.type}),(0,At.Cf)({find:Tt,type:this.type})]},addPasteRules(){return[(0,At.K9)({find:It,type:this.type}),(0,At.K9)({find:Lt,type:this.type})]}}),Rt=At.vc.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML({HTMLAttributes:t}){return["u",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Pt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Dt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,zt=At.vc.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,At.Cf)({find:Pt,type:this.type})]},addPasteRules(){return[(0,At.K9)({find:Dt,type:this.type})]}}),Ht=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,jt=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Ut=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Zt=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Ft=At.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,At.Cf)({find:Ht,type:this.type}),(0,At.Cf)({find:Ut,type:this.type})]},addPasteRules(){return[(0,At.K9)({find:jt,type:this.type}),(0,At.K9)({find:Zt,type:this.type})]}}),Vt=At.hj.create({name:"color",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return null===(e=t.style.color)||void 0===e?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands:()=>({setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()})}),Yt=At.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,At.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Wt=At.hj.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new wt.Sy({key:new wt.H$("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!n)return null;const o=this.editor.isEmpty;return t.descendants(((t,e)=>{const n=r>=e&&r<=e+t.nodeSize,s=!t.isLeaf&&(0,At.bR)(t);if((n||!this.options.showOnlyCurrent)&&s){const r=[this.options.emptyNodeClass];o&&r.push(this.options.emptyEditorClass);const s=_t.p.node(e,e+t.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:e,hasAnchor:n}):this.options.placeholder});i.push(s)}return this.options.includeChildren})),_t.EH.create(t,i)}}})]}});var qt=n(26151);function Xt(t={}){return new wt.Sy({view:e=>new Gt(e,t)})}class Gt{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map((e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}destroy(){this.handlers.forEach((({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e)))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r=this.editorView.dom,i=r.getBoundingClientRect(),o=i.width/r.offsetWidth,s=i.height/r.offsetHeight;if(n){let n=e.nodeBefore,r=e.nodeAfter;if(n||r){let e=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(e){let i=e.getBoundingClientRect(),o=n?i.bottom:i.top;n&&r&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*s;t={left:i.left,right:i.right,top:o-a,bottom:o+a}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*o;t={left:e.left-n,right:e.left+n,top:e.top,bottom:e.bottom}}let a,l,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!c||c==document.body&&"static"==getComputedStyle(c).position)a=-pageXOffset,l=-pageYOffset;else{let t=c.getBoundingClientRect(),e=t.width/c.offsetWidth,n=t.height/c.offsetHeight;a=t.left-c.scrollLeft*e,l=t.top-c.scrollTop*n}this.element.style.left=(t.left-a)/o+"px",this.element.style.top=(t.top-l)/s+"px",this.element.style.width=(t.right-t.left)/o+"px",this.element.style.height=(t.bottom-t.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,e,t):r;if(e&&!i){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,qt.nj)(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}const Kt=At.hj.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[Xt(this.options)]}}),Jt=At.hj.create({name:"direction",addOptions:()=>({types:[],directions:["rtl","ltr"],defaultDirection:"ltr"}),addGlobalAttributes(t){return[{types:this.options.types,attributes:{direction:{default:this.options.defaultDirection,parseHTML:t=>t.style.direction||this.options.defaultDirection,renderHTML:t=>({style:`direction: ${t.direction||this.options.defaultDirection}`})}}}]},addCommands(){return{setDirection:t=>e=>{let{commands:n}=e;return!!this.options.directions.includes(t)&&this.options.types.every((e=>n.updateAttributes(e,{direction:t})))},unsetDirection:()=>t=>{let{commands:e}=t;return this.options.types.every((t=>e.resetAttributes(t,"direction")))}}}}),Qt=At.hj.create({name:"lineHeight",addOptions:()=>({types:[],lineHeight:"1.4",defaultLineHeight:"1.4"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:this.options.defaultLineHeight,parseHTML:t=>t.style.lineHeight||this.options.defaultLineHeight,renderHTML:t=>({style:`line-height: ${t.lineHeight||this.options.defaultLineHeight}`})}}}]},addCommands(){return{setLineHeight:t=>e=>{let{commands:n}=e;return this.options.types.every((e=>n.updateAttributes(e,{lineHeight:t})))},unsetLineHeight:()=>t=>{let{commands:e}=t;return this.options.types.every((t=>e.resetAttributes(t,"lineHeight")))}}}}),te=At.hj.create({name:"letterSpacing",addOptions:()=>({types:[],letterSpacing:"",defaultLetterSpacing:""}),addGlobalAttributes(){return[{types:this.options.types,attributes:{letterSpacing:{default:this.options.defaultLetterSpacing,parseHTML:t=>t.style.letterSpacing||this.options.defaultLetterSpacing,renderHTML:t=>({style:`letter-spacing: ${t.letterSpacing||this.options.defaultLetterSpacing}`})}}}]},addCommands(){return{setLetterSpacing:t=>e=>{let{commands:n}=e;return this.options.types.every((e=>n.updateAttributes(e,{letterSpacing:t})))},unsetLetterSpacing:()=>t=>{let{commands:e}=t;return this.options.types.every((t=>e.resetAttributes(t,"letterSpacing")))}}}}),ee="textStyle",ne=/^(\d+)\.\s$/,re=At.NB.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return 1===e?["ol",(0,At.P1)(this.options.HTMLAttributes,n),0]:["ol",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(ee)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=(0,At.S0)({find:ne,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,At.S0)({find:ne,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(ee)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),ie="customBulletItem",oe=At.NB.create({name:ie,addOptions:()=>({nested:!0,HTMLAttributes:{},svgIcon:"",width:"",mt:0,height:"",fill:"",fontSize:""}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({svgIcon:{default:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zm-.692-2H20V5H4v13.385L5.763 17zm5.53-4.879l4.243-4.242 1.414 1.414-5.657 5.657-3.89-3.89 1.415-1.414 2.475 2.475z"/></svg>',parseHTML:t=>t.querySelector("svg")?.outerHTML},width:{default:24,parseHTML:t=>t.width},height:{default:24,parseHTML:t=>t.height},mt:{default:0,parseHTML:t=>t.style.marginTop},fill:{default:"#000",parseHTML:t=>t.style.fill}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML(t){let{node:e,HTMLAttributes:n}=t;return["li",(0,At.P1)(this.options.HTMLAttributes,n,{"data-type":this.name}),["div",["svg"],["span"]],["div",0]]},addCommands(){return{setCustomBulletIcon:t=>e=>{const{commands:n}=e;return n.updateAttributes(this.name,t),!0},setCustomBulletStyles:t=>e=>{const{commands:n,editor:r}=e;return n.updateAttributes(this.name,t),!0}}},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return t=>{let{HTMLAttributes:e}=t,n=e.svgIcon;if(n=n.replace(/&lt;/g,"<"),-1!==n.indexOf("<svg")){delete e.svgIcon;const t=document.createElement("li");t.classList.add("custom-bullet-item");const r=document.createElement("div");r.innerHTML=n;const i=document.createElement("div"),o=r.firstElementChild;return o.style.width=e.width,o.style.height=e.width,o.style.fill=e.fill,o.style.marginTop=e.mt,Object.entries(this.options.HTMLAttributes).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),t.append(r,i),Object.entries(e).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),{dom:t,contentDOM:i}}if(n.startsWith("http")){delete e.svgIcon;const t=document.createElement("li");t.classList.add("custom-bullet-item");const r=document.createElement("div");r.innerHTML=`<img src="${n}" height="auto" style="margin-top:${e.mt||"auto"}" width="${e.width}"\n />`;const i=document.createElement("div");r.firstElementChild;return Object.entries(this.options.HTMLAttributes).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),t.append(r,i),Object.entries(e).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),{dom:t,contentDOM:i}}{delete e.svgIcon;const t=document.createElement("li");t.classList.add("custom-bullet-item");const r=document.createElement("div");r.innerHTML=`<svg fill="${e.fill}" width="${e.width}"\n height="${e.width}"\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${n}</svg>`;const i=document.createElement("div"),o=r.firstElementChild;return o.style.width=e.width,o.style.height=e.width,o.style.marginTop=e.mt,o.style.fill=e.fill,Object.entries(this.options.HTMLAttributes).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),t.append(r,i),Object.entries(e).forEach((e=>{let[n,r]=e;t.setAttribute(n,r)})),{dom:t,contentDOM:i}}}}}),se=At.NB.create({name:"customBulletList",addOptions:()=>({itemTypeName:ie,HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML(t){let{HTMLAttributes:e}=t;return["ul",(0,At.P1)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleCustomList:()=>t=>{let{commands:e}=t;return e.toggleList(this.name,this.options.itemTypeName)}}},addKeyboardShortcuts(){return{"Mod-Shift-6":()=>this.editor.commands.toggleCustomList()}}}),ae=At.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",(0,At.P1)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command((()=>{const{selection:t,storedMarks:i}=n;if(t.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command((({tr:t,dispatch:e})=>{if(e&&a&&o){const e=a.filter((t=>s.includes(t.type.name)));t.ensureMarks(e)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),le=/^\s*(\[([ |x])\])\s$/,ce=(At.NB.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{}}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:t=>"true"===t.getAttribute("data-checked"),renderHTML:t=>({"data-checked":t.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML(t){let{node:e,HTMLAttributes:n}=t;return["li",(0,At.P1)(this.options.HTMLAttributes,n,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return t=>{let{node:e,HTMLAttributes:n,getPos:r,editor:i}=t;const o=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input");o.style.display="flex",o.style.alignItems="center",l.style.width="50px";const c=document.createElement("div");return s.contentEditable="false",l.type="checkbox",l.addEventListener("change",(t=>{if(!i.isEditable)return void(l.checked=!l.checked);const{checked:e}=t.target;i.isEditable&&"function"==typeof r&&i.chain().focus(void 0,{scrollIntoView:!1}).command((t=>{let{tr:n}=t;const i=r(),o=n.doc.nodeAt(i);return n.setNodeMarkup(i,void 0,{...o?.attrs,checked:e}),!0})).run()})),Object.entries(this.options.HTMLAttributes).forEach((t=>{let[e,n]=t;o.setAttribute(e,n)})),o.dataset.checked=e.attrs.checked,e.attrs.checked&&l.setAttribute("checked","checked"),s.append(l,a),o.append(s,c),Object.entries(n).forEach((t=>{let[e,n]=t;o.setAttribute(e,n)})),{dom:o,contentDOM:c,update:t=>t.type===this.type&&(o.dataset.checked=t.attrs.checked,t.attrs.checked?l.setAttribute("checked","checked"):l.removeAttribute("checked"),!0)}}},addInputRules(){return[(0,At.S0)({find:le,type:this.type,getAttributes:t=>({checked:"x"===t[t.length-1]})})]}}),At.NB.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML(t){let{HTMLAttributes:e}=t;return["ul",(0,At.P1)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>t=>{let{commands:e}=t;return e.toggleList(this.name,this.options.itemTypeName)}}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),/^\s*>\s$/),de=At.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return["blockquote",(0,At.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,At.S0)({find:ce,type:this.type})]}}),pe=/^```([a-z]+)?[\s\n]$/,he=/^~~~([a-z]+)?[\s\n]$/,ue=At.NB.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,r=[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter((t=>t.startsWith(n))).map((t=>t.replace(n,"")))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",(0,At.P1)(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!(!t||e.parent.type.name!==this.name)&&(!(!n&&e.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&t.chain().command((({tr:t})=>(t.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type)return!1;if(!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();if(void 0===s)return!1;return r.nodeAt(s)?t.commands.command((({tr:t})=>(t.setSelection(wt.Y1.near(r.resolve(s))),!0))):t.commands.exitCode()}}},addInputRules(){return[(0,At.zK)({find:pe,type:this.type,getAttributes:t=>({language:t[1]})}),(0,At.zK)({find:he,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new wt.Sy({key:new wt.H$("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;const{tr:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(wt.Bs.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}});function fe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function me(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((e=>{const n=t[e],r=typeof n;"object"!==r&&"function"!==r||Object.isFrozen(n)||me(n)})),t}class ge{constructor(t){void 0===t.data&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function be(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ye(t,...e){const n=Object.create(null);for(const e in t)n[e]=t[e];return e.forEach((function(t){for(const e in t)n[e]=t[e]})),n}const Ae=t=>!!t.scope;class we{constructor(t,e){this.buffer="",this.classPrefix=e.classPrefix,t.walk(this)}addText(t){this.buffer+=be(t)}openNode(t){if(!Ae(t))return;const e=((t,{prefix:e})=>{if(t.startsWith("language:"))return t.replace("language:","language-");if(t.includes(".")){const n=t.split(".");return[`${e}${n.shift()}`,...n.map(((t,e)=>`${t}${"_".repeat(e+1)}`))].join(" ")}return`${e}${t}`})(t.scope,{prefix:this.classPrefix});this.span(e)}closeNode(t){Ae(t)&&(this.buffer+="</span>")}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const ve=(t={})=>{const e={children:[]};return Object.assign(e,t),e};class xe{constructor(){this.rootNode=ve(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const e=ve({scope:t});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,e){return"string"==typeof e?t.addText(e):e.children&&(t.openNode(e),e.children.forEach((e=>this._walk(t,e))),t.closeNode(e)),t}static _collapse(t){"string"!=typeof t&&t.children&&(t.children.every((t=>"string"==typeof t))?t.children=[t.children.join("")]:t.children.forEach((t=>{xe._collapse(t)})))}}class _e extends xe{constructor(t){super(),this.options=t}addText(t){""!==t&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,e){const n=t.root;e&&(n.scope=`language:${e}`),this.add(n)}toHTML(){return new we(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function ke(t){return t?"string"==typeof t?t:t.source:null}function Ce(t){return Be("(?=",t,")")}function Ee(t){return Be("(?:",t,")*")}function Se(t){return Be("(?:",t,")?")}function Be(...t){return t.map((t=>ke(t))).join("")}function Oe(...t){const e=function(t){const e=t[t.length-1];return"object"==typeof e&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}(t);return"("+(e.capture?"":"?:")+t.map((t=>ke(t))).join("|")+")"}function Me(t){return new RegExp(t.toString()+"|").exec("").length-1}const $e=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ie(t,{joinWith:e}){let n=0;return t.map((t=>{n+=1;const e=n;let r=ke(t),i="";for(;r.length>0;){const t=$e.exec(r);if(!t){i+=r;break}i+=r.substring(0,t.index),r=r.substring(t.index+t[0].length),"\\"===t[0][0]&&t[1]?i+="\\"+String(Number(t[1])+e):(i+=t[0],"("===t[0]&&n++)}return i})).map((t=>`(${t})`)).join(e)}const Te="[a-zA-Z]\\w*",Le="[a-zA-Z_]\\w*",Ne="\\b\\d+(\\.\\d+)?",Re="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Pe="\\b(0b[01]+)",De={begin:"\\\\[\\s\\S]",relevance:0},ze={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[De]},He={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[De]},je=function(t,e,n={}){const r=ye({scope:"comment",begin:t,end:e,contains:[]},n);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=Oe("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:Be(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Ue=je("//","$"),Ze=je("/\\*","\\*/"),Fe=je("#","$"),Ve={scope:"number",begin:Ne,relevance:0},Ye={scope:"number",begin:Re,relevance:0},We={scope:"number",begin:Pe,relevance:0},qe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[De,{begin:/\[/,end:/\]/,relevance:0,contains:[De]}]},Xe={scope:"title",begin:Te,relevance:0},Ge={scope:"title",begin:Le,relevance:0},Ke={begin:"\\.\\s*"+Le,relevance:0};var Je=Object.freeze({__proto__:null,APOS_STRING_MODE:ze,BACKSLASH_ESCAPE:De,BINARY_NUMBER_MODE:We,BINARY_NUMBER_RE:Pe,COMMENT:je,C_BLOCK_COMMENT_MODE:Ze,C_LINE_COMMENT_MODE:Ue,C_NUMBER_MODE:Ye,C_NUMBER_RE:Re,END_SAME_AS_BEGIN:function(t){return Object.assign(t,{"on:begin":(t,e)=>{e.data._beginMatch=t[1]},"on:end":(t,e)=>{e.data._beginMatch!==t[1]&&e.ignoreMatch()}})},HASH_COMMENT_MODE:Fe,IDENT_RE:Te,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:Ke,NUMBER_MODE:Ve,NUMBER_RE:Ne,PHRASAL_WORDS_MODE:{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/},QUOTE_STRING_MODE:He,REGEXP_MODE:qe,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(t={})=>{const e=/^#![ ]*\//;return t.binary&&(t.begin=Be(e,/.*\b/,t.binary,/\b.*/)),ye({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,e)=>{0!==t.index&&e.ignoreMatch()}},t)},TITLE_MODE:Xe,UNDERSCORE_IDENT_RE:Le,UNDERSCORE_TITLE_MODE:Ge});function Qe(t,e){"."===t.input[t.index-1]&&e.ignoreMatch()}function tn(t,e){void 0!==t.className&&(t.scope=t.className,delete t.className)}function en(t,e){e&&t.beginKeywords&&(t.begin="\\b("+t.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",t.__beforeBegin=Qe,t.keywords=t.keywords||t.beginKeywords,delete t.beginKeywords,void 0===t.relevance&&(t.relevance=0))}function nn(t,e){Array.isArray(t.illegal)&&(t.illegal=Oe(...t.illegal))}function rn(t,e){if(t.match){if(t.begin||t.end)throw new Error("begin & end are not supported with match");t.begin=t.match,delete t.match}}function on(t,e){void 0===t.relevance&&(t.relevance=1)}const sn=(t,e)=>{if(!t.beforeMatch)return;if(t.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},t);Object.keys(t).forEach((e=>{delete t[e]})),t.keywords=n.keywords,t.begin=Be(n.beforeMatch,Ce(n.begin)),t.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},t.relevance=0,delete n.beforeMatch},an=["of","and","for","in","not","or","if","then","parent","list","value"],ln="keyword";function cn(t,e,n=ln){const r=Object.create(null);return"string"==typeof t?i(n,t.split(" ")):Array.isArray(t)?i(n,t):Object.keys(t).forEach((function(n){Object.assign(r,cn(t[n],e,n))})),r;function i(t,n){e&&(n=n.map((t=>t.toLowerCase()))),n.forEach((function(e){const n=e.split("|");r[n[0]]=[t,dn(n[0],n[1])]}))}}function dn(t,e){return e?Number(e):function(t){return an.includes(t.toLowerCase())}(t)?0:1}const pn={},hn=t=>{console.error(t)},un=(t,...e)=>{console.log(`WARN: ${t}`,...e)},fn=(t,e)=>{pn[`${t}/${e}`]||(console.log(`Deprecated as of ${t}. ${e}`),pn[`${t}/${e}`]=!0)},mn=new Error;function gn(t,e,{key:n}){let r=0;const i=t[n],o={},s={};for(let t=1;t<=e.length;t++)s[t+r]=i[t],o[t+r]=!0,r+=Me(e[t-1]);t[n]=s,t[n]._emit=o,t[n]._multi=!0}function bn(t){!function(t){t.scope&&"object"==typeof t.scope&&null!==t.scope&&(t.beginScope=t.scope,delete t.scope)}(t),"string"==typeof t.beginScope&&(t.beginScope={_wrap:t.beginScope}),"string"==typeof t.endScope&&(t.endScope={_wrap:t.endScope}),function(t){if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw hn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),mn;if("object"!=typeof t.beginScope||null===t.beginScope)throw hn("beginScope must be object"),mn;gn(t,t.begin,{key:"beginScope"}),t.begin=Ie(t.begin,{joinWith:""})}}(t),function(t){if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw hn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),mn;if("object"!=typeof t.endScope||null===t.endScope)throw hn("endScope must be object"),mn;gn(t,t.end,{key:"endScope"}),t.end=Ie(t.end,{joinWith:""})}}(t)}function yn(t){function e(e,n){return new RegExp(ke(e),"m"+(t.case_insensitive?"i":"")+(t.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(t,e){e.position=this.position++,this.matchIndexes[this.matchAt]=e,this.regexes.push([e,t]),this.matchAt+=Me(t)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const t=this.regexes.map((t=>t[1]));this.matcherRe=e(Ie(t,{joinWith:"|"}),!0),this.lastIndex=0}exec(t){this.matcherRe.lastIndex=this.lastIndex;const e=this.matcherRe.exec(t);if(!e)return null;const n=e.findIndex(((t,e)=>e>0&&void 0!==t)),r=this.matchIndexes[n];return e.splice(0,n),Object.assign(e,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(t){if(this.multiRegexes[t])return this.multiRegexes[t];const e=new n;return this.rules.slice(t).forEach((([t,n])=>e.addRule(t,n))),e.compile(),this.multiRegexes[t]=e,e}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(t,e){this.rules.push([t,e]),"begin"===e.type&&this.count++}exec(t){const e=this.getMatcher(this.regexIndex);e.lastIndex=this.lastIndex;let n=e.exec(t);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const e=this.getMatcher(0);e.lastIndex=this.lastIndex+1,n=e.exec(t)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(t.compilerExtensions||(t.compilerExtensions=[]),t.contains&&t.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return t.classNameAliases=ye(t.classNameAliases||{}),function n(i,o){const s=i;if(i.isCompiled)return s;[tn,rn,bn,sn].forEach((t=>t(i,o))),t.compilerExtensions.forEach((t=>t(i,o))),i.__beforeBegin=null,[en,nn,on].forEach((t=>t(i,o))),i.isCompiled=!0;let a=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),a=i.keywords.$pattern,delete i.keywords.$pattern),a=a||/\w+/,i.keywords&&(i.keywords=cn(i.keywords,t.case_insensitive)),s.keywordPatternRe=e(a,!0),o&&(i.begin||(i.begin=/\B|\b/),s.beginRe=e(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=e(s.end)),s.terminatorEnd=ke(s.end)||"",i.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(s.illegalRe=e(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(t){return function(t){t.variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map((function(e){return ye(t,{variants:null},e)})));if(t.cachedVariants)return t.cachedVariants;if(An(t))return ye(t,{starts:t.starts?ye(t.starts):null});if(Object.isFrozen(t))return ye(t);return t}("self"===t?i:t)}))),i.contains.forEach((function(t){n(t,s)})),i.starts&&n(i.starts,o),s.matcher=function(t){const e=new r;return t.contains.forEach((t=>e.addRule(t.begin,{rule:t,type:"begin"}))),t.terminatorEnd&&e.addRule(t.terminatorEnd,{type:"end"}),t.illegal&&e.addRule(t.illegal,{type:"illegal"}),e}(s),s}(t)}function An(t){return!!t&&(t.endsWithParent||An(t.starts))}class wn extends Error{constructor(t,e){super(t),this.name="HTMLInjectionError",this.html=e}}const vn=be,xn=ye,_n=Symbol("nomatch"),kn=7,Cn=function(t){const e=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={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:_e};function l(t){return a.noHighlightRe.test(t)}function c(t,e,n){let r="",i="";"object"==typeof e?(r=t,n=e.ignoreIllegals,i=e.language):(fn("10.7.0","highlight(lang, code, ...args) has been deprecated."),fn("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=t,r=e),void 0===n&&(n=!0);const o={code:r,language:i};y("before:highlight",o);const s=o.result?o.result:d(o.language,o.code,n);return s.code=o.code,y("after:highlight",s),s}function d(t,n,r,s){const l=Object.create(null);function c(){if(!C.keywords)return void S.addText(B);let t=0;C.keywordPatternRe.lastIndex=0;let e=C.keywordPatternRe.exec(B),n="";for(;e;){n+=B.substring(t,e.index);const i=x.case_insensitive?e[0].toLowerCase():e[0],o=(r=i,C.keywords[r]);if(o){const[t,r]=o;if(S.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=kn&&(O+=r),t.startsWith("_"))n+=e[0];else{const n=x.classNameAliases[t]||t;u(e[0],n)}}else n+=e[0];t=C.keywordPatternRe.lastIndex,e=C.keywordPatternRe.exec(B)}var r;n+=B.substring(t),S.addText(n)}function h(){null!=C.subLanguage?function(){if(""===B)return;let t=null;if("string"==typeof C.subLanguage){if(!e[C.subLanguage])return void S.addText(B);t=d(C.subLanguage,B,!0,E[C.subLanguage]),E[C.subLanguage]=t._top}else t=p(B,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(O+=t.relevance),S.__addSublanguage(t._emitter,t.language)}():c(),B=""}function u(t,e){""!==t&&(S.startScope(e),S.addText(t),S.endScope())}function f(t,e){let n=1;const r=e.length-1;for(;n<=r;){if(!t._emit[n]){n++;continue}const r=x.classNameAliases[t[n]]||t[n],i=e[n];r?u(i,r):(B=i,c(),B=""),n++}}function g(t,e){return t.scope&&"string"==typeof t.scope&&S.openNode(x.classNameAliases[t.scope]||t.scope),t.beginScope&&(t.beginScope._wrap?(u(B,x.classNameAliases[t.beginScope._wrap]||t.beginScope._wrap),B=""):t.beginScope._multi&&(f(t.beginScope,e),B="")),C=Object.create(t,{parent:{value:C}}),C}function b(t,e,n){let r=function(t,e){const n=t&&t.exec(e);return n&&0===n.index}(t.endRe,n);if(r){if(t["on:end"]){const n=new ge(t);t["on:end"](e,n),n.isMatchIgnored&&(r=!1)}if(r){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return b(t.parent,e,n)}function y(t){return 0===C.matcher.regexIndex?(B+=t[0],1):(I=!0,0)}function A(t){const e=t[0],r=n.substring(t.index),i=b(C,t,r);if(!i)return _n;const o=C;C.endScope&&C.endScope._wrap?(h(),u(e,C.endScope._wrap)):C.endScope&&C.endScope._multi?(h(),f(C.endScope,t)):o.skip?B+=e:(o.returnEnd||o.excludeEnd||(B+=e),h(),o.excludeEnd&&(B=e));do{C.scope&&S.closeNode(),C.skip||C.subLanguage||(O+=C.relevance),C=C.parent}while(C!==i.parent);return i.starts&&g(i.starts,t),o.returnEnd?0:e.length}let w={};function v(e,o){const s=o&&o[0];if(B+=e,null==s)return h(),0;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===s){if(B+=n.slice(o.index,o.index+1),!i){const e=new Error(`0 width match regex (${t})`);throw e.languageName=t,e.badRule=w.rule,e}return 1}if(w=o,"begin"===o.type)return function(t){const e=t[0],n=t.rule,r=new ge(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(t,r),r.isMatchIgnored))return y(e);return n.skip?B+=e:(n.excludeBegin&&(B+=e),h(),n.returnBegin||n.excludeBegin||(B=e)),g(n,t),n.returnBegin?0:e.length}(o);if("illegal"===o.type&&!r){const t=new Error('Illegal lexeme "'+s+'" for mode "'+(C.scope||"<unnamed>")+'"');throw t.mode=C,t}if("end"===o.type){const t=A(o);if(t!==_n)return t}if("illegal"===o.type&&""===s)return 1;if($>1e5&&$>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return B+=s,s.length}const x=m(t);if(!x)throw hn(o.replace("{}",t)),new Error('Unknown language: "'+t+'"');const _=yn(x);let k="",C=s||_;const E={},S=new a.__emitter(a);!function(){const t=[];for(let e=C;e!==x;e=e.parent)e.scope&&t.unshift(e.scope);t.forEach((t=>S.openNode(t)))}();let B="",O=0,M=0,$=0,I=!1;try{if(x.__emitTokens)x.__emitTokens(n,S);else{for(C.matcher.considerAll();;){$++,I?I=!1:C.matcher.considerAll(),C.matcher.lastIndex=M;const t=C.matcher.exec(n);if(!t)break;const e=v(n.substring(M,t.index),t);M=t.index+e}v(n.substring(M))}return S.finalize(),k=S.toHTML(),{language:t,value:k,relevance:O,illegal:!1,_emitter:S,_top:C}}catch(e){if(e.message&&e.message.includes("Illegal"))return{language:t,value:vn(n),illegal:!0,relevance:0,_illegalBy:{message:e.message,index:M,context:n.slice(M-100,M+100),mode:e.mode,resultSoFar:k},_emitter:S};if(i)return{language:t,value:vn(n),illegal:!1,relevance:0,errorRaised:e,_emitter:S,_top:C};throw e}}function p(t,n){n=n||a.languages||Object.keys(e);const r=function(t){const e={value:vn(t),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return e._emitter.addText(t),e}(t),i=n.filter(m).filter(b).map((e=>d(e,t,!1)));i.unshift(r);const o=i.sort(((t,e)=>{if(t.relevance!==e.relevance)return e.relevance-t.relevance;if(t.language&&e.language){if(m(t.language).supersetOf===e.language)return 1;if(m(e.language).supersetOf===t.language)return-1}return 0})),[l,c]=o,p=l;return p.secondBest=c,p}function h(t){let e=null;const r=function(t){let e=t.className+" ";e+=t.parentNode?t.parentNode.className:"";const n=a.languageDetectRe.exec(e);if(n){const e=m(n[1]);return e||(un(o.replace("{}",n[1])),un("Falling back to no-highlight mode for this block.",t)),e?n[1]:"no-highlight"}return e.split(/\s+/).find((t=>l(t)||m(t)))}(t);if(l(r))return;if(y("before:highlightElement",{el:t,language:r}),t.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",t);if(t.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(t)),a.throwUnescapedHTML)){throw new wn("One of your code blocks includes unescaped HTML.",t.innerHTML)}e=t;const i=e.textContent,s=r?c(i,{language:r,ignoreIllegals:!0}):p(i);t.innerHTML=s.value,t.dataset.highlighted="yes",function(t,e,r){const i=e&&n[e]||r;t.classList.add("hljs"),t.classList.add(`language-${i}`)}(t,r,s.language),t.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(t.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),y("after:highlightElement",{el:t,result:s,text:i})}let u=!1;function f(){if("loading"===document.readyState)return void(u=!0);document.querySelectorAll(a.cssSelector).forEach(h)}function m(t){return t=(t||"").toLowerCase(),e[t]||e[n[t]]}function g(t,{languageName:e}){"string"==typeof t&&(t=[t]),t.forEach((t=>{n[t.toLowerCase()]=e}))}function b(t){const e=m(t);return e&&!e.disableAutodetect}function y(t,e){const n=t;r.forEach((function(t){t[n]&&t[n](e)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){u&&f()}),!1),Object.assign(t,{highlight:c,highlightAuto:p,highlightAll:f,highlightElement:h,highlightBlock:function(t){return fn("10.7.0","highlightBlock will be removed entirely in v12.0"),fn("10.7.0","Please use highlightElement now."),h(t)},configure:function(t){a=xn(a,t)},initHighlighting:()=>{f(),fn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),fn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(t)}catch(t){if(hn("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw t;hn(t),o=s}o.name||(o.name=n),e[n]=o,o.rawDefinition=r.bind(null,t),o.aliases&&g(o.aliases,{languageName:n})},unregisterLanguage:function(t){delete e[t];for(const e of Object.keys(n))n[e]===t&&delete n[e]},listLanguages:function(){return Object.keys(e)},getLanguage:m,registerAliases:g,autoDetection:b,inherit:xn,addPlugin:function(t){!function(t){t["before:highlightBlock"]&&!t["before:highlightElement"]&&(t["before:highlightElement"]=e=>{t["before:highlightBlock"](Object.assign({block:e.el},e))}),t["after:highlightBlock"]&&!t["after:highlightElement"]&&(t["after:highlightElement"]=e=>{t["after:highlightBlock"](Object.assign({block:e.el},e))})}(t),r.push(t)},removePlugin:function(t){const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}),t.debugMode=function(){i=!1},t.safeMode=function(){i=!0},t.versionString="11.10.0",t.regex={concat:Be,lookahead:Ce,either:Oe,optional:Se,anyNumberOfTimes:Ee};for(const t in Je)"object"==typeof Je[t]&&me(Je[t]);return Object.assign(t,Je),t},En=Cn({});En.newInstance=()=>Cn({});var Sn=En;En.HighlightJS=En,En.default=En;var Bn=fe(Sn);function On(t,e=[]){return t.map((t=>{const n=[...e,...t.properties?t.properties.className:[]];return t.children?On(t.children,n):{text:t.value,classes:n}})).flat()}function Mn(t){return t.value||t.children||[]}function $n({doc:t,name:e,lowlight:n,defaultLanguage:r}){const i=[];return(0,At.N2)(t,(t=>t.type.name===e)).forEach((t=>{var e;let o=t.pos+1;const s=t.node.attrs.language||r,a=n.listLanguages();var l;On(s&&(a.includes(s)||(l=s,Boolean(Bn.getLanguage(l)))||(null===(e=n.registered)||void 0===e?void 0:e.call(n,s)))?Mn(n.highlight(s,t.node.textContent)):Mn(n.highlightAuto(t.node.textContent))).forEach((t=>{const e=o+t.text.length;if(t.classes.length){const n=_t.p.inline(o,e,{class:t.classes.join(" ")});i.push(n)}o=e}))})),_t.EH.create(t,i)}function In({name:t,lowlight:e,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every((t=>"function"==typeof e[t])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new wt.Sy({key:new wt.H$("lowlight"),state:{init:(r,{doc:i})=>$n({doc:i,name:t,lowlight:e,defaultLanguage:n}),apply:(r,i,o,s)=>{const a=o.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=(0,At.N2)(o.doc,(e=>e.type.name===t)),d=(0,At.N2)(s.doc,(e=>e.type.name===t));return r.docChanged&&([a,l].includes(t)||d.length!==c.length||r.steps.some((t=>void 0!==t.from&&void 0!==t.to&&c.some((e=>e.pos>=t.from&&e.pos+e.node.nodeSize<=t.to)))))?$n({doc:r.doc,name:t,lowlight:e,defaultLanguage:n}):i.map(r.mapping,r.doc)}},props:{decorations:t=>r.getState(t)}});return r}const Tn=ue.extend({addOptions(){var t;return{...null===(t=this.parent)||void 0===t?void 0:t.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},addProseMirrorPlugins(){var t;return[...(null===(t=this.parent)||void 0===t?void 0:t.call(this))||[],In({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),Ln={};const Nn=At.hj.create({name:"fontFamily",addOptions:()=>({types:["textStyle"],fonts:[]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily?.replace(/['"]+/g,""),renderHTML:t=>{if(!t.fontFamily)return{style:"font-family:Arial, Helvetica, sans-serif"};return function(t,e){if(!t||!t.length)return;const n=t.find((t=>t.cssRule.trim().replace('"',"").replace("'","")===e.trim().replace('"',"").replace("'","")));n&&!Ln[n.name]&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e),Ln[t.name]=!0}(n)}(this.options.fonts,t.fontFamily),{style:`font-family: ${t.fontFamily.replace(/;/g,"")}`,"data-cdtr-font-name":t.fontFamily}}}}}]},addCommands:()=>({setFontFamily:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=>{let{chain:n}=e;if(!t||"object"!=typeof t)return console.warn("setFontFamily should be { cssRule, name, id, url } "),"string"==typeof t?n().setMark("textStyle",{fontFamily:t}).run():void 0;const{cssRule:r,name:i,id:o,url:s}=t;return n().setMark("textStyle",{fontFamily:r}).run()}},unsetFontFamily:()=>t=>{let{chain:e}=t;return e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}})});const Rn=At.NB.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",draggable:!0,parseHTML:()=>[{tag:"hr"}],renderHTML(t){let{HTMLAttributes:e}=t;return["hr",(0,At.P1)(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>t=>{let{chain:e}=t;return e().insertContent({type:this.name}).command((t=>{let{tr:e,dispatch:n}=t;if(n){const{$to:t}=e.selection,n=t.end();if(t.nodeAfter)e.setSelection(wt.Bs.create(e.doc,t.pos));else{const r=t.parent.type.contentMatch.defaultType?.create();r&&(e.insert(n,r),e.setSelection(wt.Bs.create(e.doc,n)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[(0,At.x2)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var Pn=n(38404),Dn=n(52665);class zn extends wt.Y1{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return zn.valid(n)?new zn(n):wt.Y1.near(n)}content(){return Dn.p2.empty}eq(t){return t instanceof zn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new zn(t.resolve(e.pos))}getBookmark(){return new Hn(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0!=n)for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n!=r.childCount)for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&zn.valid(t))return t;let r=t.pos,i=null;for(let n=t.depth;;n--){let o=t.node(n);if(e>0?t.indexAfter(n)<o.childCount:t.index(n)>0){i=o.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let s=t.doc.resolve(r);if(zn.valid(s))return s}for(;;){let o=e>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!wt.qv.isSelectable(i)){t=t.doc.resolve(r+i.nodeSize*e),n=!1;continue t}break}i=o,r+=e;let s=t.doc.resolve(r);if(zn.valid(s))return s}return null}}}zn.prototype.visible=!1,zn.findFrom=zn.findGapCursorFrom,wt.Y1.jsonID("gapcursor",zn);class Hn{constructor(t){this.pos=t}map(t){return new Hn(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return zn.valid(e)?new zn(e):wt.Y1.near(e)}}const jn=(0,Pn.$)({ArrowLeft:Un("horiz",-1),ArrowRight:Un("horiz",1),ArrowUp:Un("vert",-1),ArrowDown:Un("vert",1)});function Un(t,e){const n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,i){let o=t.selection,s=e>0?o.$to:o.$from,a=o.empty;if(o instanceof wt.Bs){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=t.doc.resolve(e>0?s.after():s.before())}let l=zn.findGapCursorFrom(s,e,a);return!!l&&(r&&r(t.tr.setSelection(new zn(l))),!0)}}function Zn(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!zn.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&wt.qv.isSelectable(t.state.doc.nodeAt(i.inside)))&&(t.dispatch(t.state.tr.setSelection(new zn(r))),!0)}function Fn(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof zn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=Dn.HY.empty;for(let t=r.length-1;t>=0;t--)i=Dn.HY.from(r[t].createAndFill(null,i));let o=t.state.tr.replace(n.pos,n.pos,new Dn.p2(i,0,0));return o.setSelection(wt.Bs.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function Vn(t){if(!(t.selection instanceof zn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",_t.EH.create(t.doc,[_t.p.widget(t.selection.head,e,{key:"gapcursor"})])}const Yn=At.hj.create({name:"gapCursor",addProseMirrorPlugins:()=>[new wt.Sy({props:{decorations:Vn,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&zn.valid(n)?new zn(n):null,handleClick:Zn,handleKeyDown:jn,handleDOMEvents:{beforeinput:Fn}}})],extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=(0,At.nU)((0,At.Nl)(t,"allowGapCursor",n)))&&void 0!==e?e:null}}}),Wn=At.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML(t){const{HTMLAttributes:e}=t,n=document.createElement("p");n.style.cssText=e.style,n.style.fontSize||(n.style.fontSize="16px"),n.style.fontFamily||(n.style.fontFamily="Arial, Helvetica, sans-serif");const r=n.style.cssText;return["p",(0,At.P1)(this.options.HTMLAttributes,{style:r},{dir:"auto"}),0]},addCommands(){return{setParagraph:()=>t=>{let{commands:e}=t;return e.setNode(this.name)}}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),qn="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Xn="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Gn=(t,e)=>{for(const n in e)t[n]=e[n];return t},Kn="numeric",Jn="ascii",Qn="alpha",tr="asciinumeric",er="alphanumeric",nr="domain",rr="emoji",ir="scheme",or="slashscheme",sr="whitespace";function ar(t,e){return t in e||(e[t]=[]),e[t]}function lr(t,e,n){e[Kn]&&(e[tr]=!0,e[er]=!0),e[Jn]&&(e[tr]=!0,e[Qn]=!0),e[tr]&&(e[er]=!0),e[Qn]&&(e[er]=!0),e[er]&&(e[nr]=!0),e[rr]&&(e[nr]=!0);for(const r in e){const e=ar(r,n);e.indexOf(t)<0&&e.push(t)}}function cr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}cr.groups={},cr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let n=0;n<e.jr.length;n++){const r=e.jr[n][0],i=e.jr[n][1];if(i&&r.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){let i;return r=r||cr.groups,e&&e.j?i=e:(i=new cr(e),n&&r&&lr(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const o=t.length;if(!o)return i;for(let e=0;e<o-1;e++)i=i.tt(t[e]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){r=r||cr.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const o=e;let s,a=i.go(t);if(a?(s=new cr,Gn(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new cr,o){if(r)if(s.t&&"string"==typeof s.t){const t=Gn(function(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}(s.t,r),n);lr(o,t,r)}else n&&lr(o,n,r);s.t=o}return i.j[t]=s,s}};const dr=(t,e,n,r,i)=>t.ta(e,n,r,i),pr=(t,e,n,r,i)=>t.tr(e,n,r,i),hr=(t,e,n,r,i)=>t.ts(e,n,r,i),ur=(t,e,n,r,i)=>t.tt(e,n,r,i),fr="WORD",mr="UWORD",gr="ASCIINUMERICAL",br="ALPHANUMERICAL",yr="LOCALHOST",Ar="TLD",wr="UTLD",vr="SCHEME",xr="SLASH_SCHEME",_r="NUM",kr="WS",Cr="NL",Er="OPENBRACE",Sr="CLOSEBRACE",Br="OPENBRACKET",Or="CLOSEBRACKET",Mr="OPENPAREN",$r="CLOSEPAREN",Ir="OPENANGLEBRACKET",Tr="CLOSEANGLEBRACKET",Lr="FULLWIDTHLEFTPAREN",Nr="FULLWIDTHRIGHTPAREN",Rr="LEFTCORNERBRACKET",Pr="RIGHTCORNERBRACKET",Dr="LEFTWHITECORNERBRACKET",zr="RIGHTWHITECORNERBRACKET",Hr="FULLWIDTHLESSTHAN",jr="FULLWIDTHGREATERTHAN",Ur="AMPERSAND",Zr="APOSTROPHE",Fr="ASTERISK",Vr="AT",Yr="BACKSLASH",Wr="BACKTICK",qr="CARET",Xr="COLON",Gr="COMMA",Kr="DOLLAR",Jr="DOT",Qr="EQUALS",ti="EXCLAMATION",ei="HYPHEN",ni="PERCENT",ri="PIPE",ii="PLUS",oi="POUND",si="QUERY",ai="QUOTE",li="FULLWIDTHMIDDLEDOT",ci="SEMI",di="SLASH",pi="TILDE",hi="UNDERSCORE",ui="EMOJI",fi="SYM";var mi=Object.freeze({__proto__:null,WORD:fr,UWORD:mr,ASCIINUMERICAL:gr,ALPHANUMERICAL:br,LOCALHOST:yr,TLD:Ar,UTLD:wr,SCHEME:vr,SLASH_SCHEME:xr,NUM:_r,WS:kr,NL:Cr,OPENBRACE:Er,CLOSEBRACE:Sr,OPENBRACKET:Br,CLOSEBRACKET:Or,OPENPAREN:Mr,CLOSEPAREN:$r,OPENANGLEBRACKET:Ir,CLOSEANGLEBRACKET:Tr,FULLWIDTHLEFTPAREN:Lr,FULLWIDTHRIGHTPAREN:Nr,LEFTCORNERBRACKET:Rr,RIGHTCORNERBRACKET:Pr,LEFTWHITECORNERBRACKET:Dr,RIGHTWHITECORNERBRACKET:zr,FULLWIDTHLESSTHAN:Hr,FULLWIDTHGREATERTHAN:jr,AMPERSAND:Ur,APOSTROPHE:Zr,ASTERISK:Fr,AT:Vr,BACKSLASH:Yr,BACKTICK:Wr,CARET:qr,COLON:Xr,COMMA:Gr,DOLLAR:Kr,DOT:Jr,EQUALS:Qr,EXCLAMATION:ti,HYPHEN:ei,PERCENT:ni,PIPE:ri,PLUS:ii,POUND:oi,QUERY:si,QUOTE:ai,FULLWIDTHMIDDLEDOT:li,SEMI:ci,SLASH:di,TILDE:pi,UNDERSCORE:hi,EMOJI:ui,SYM:fi});const gi=/[a-z]/,bi=/\p{L}/u,yi=/\p{Emoji}/u,Ai=/\d/,wi=/\s/;const vi="\r",xi="\n",_i="️",ki="‍",Ci="";let Ei=null,Si=null;function Bi(t,e){const n=function(t){const e=[],n=t.length;let r=0;for(;r<n;){let i,o=t.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,(t=>t.toLowerCase()))),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=t,l=null,c=0,d=null,p=-1,h=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(p=0,h=0,d=a):p>=0&&(p+=n[s].length,h++),c+=n[s].length,o+=n[s].length,s++;o-=p,s-=h,c-=p,i.push({t:d.t,v:e.slice(o-c,o),s:o-c,e:o})}return i}function Oi(t,e,n,r,i){let o;const s=e.length;for(let n=0;n<s-1;n++){const s=e[n];t.j[s]?o=t.j[s]:(o=new cr(r),o.jr=i.slice(),t.j[s]=o),t=o}return o=new cr(n),o.jr=i.slice(),t.j[e[s-1]]=o,o}function Mi(t){const e=[],n=[];let r=0;for(;r<t.length;){let i=0;for(;"0123456789".indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+i),10);e>0;e--)n.pop();r+=i}else n.push(t[r]),r++}return e}const $i={defaultProtocol:"http",events:null,format:Ti,formatHref:Ti,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ii(t,e=null){let n=Gn({},$i);t&&(n=Gn(n,t instanceof Ii?t.o:t));const r=n.ignoreTags,i=[];for(let t=0;t<r.length;t++)i.push(r[t].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}function Ti(t){return t}Ii.prototype={o:$i,ignoreTags:[],defaultRender:t=>t,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=null!=e;let i=this.o[t];return i?("object"==typeof i?(i=n.t in i?i[n.t]:$i[t],"function"==typeof i&&r&&(i=i(e,n))):"function"==typeof i&&r&&(i=i(e,n.t,n)),i):i},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Li(t,e){this.t="token",this.v=t,this.tk=e}function Ni(t,e){class n extends Li{constructor(e,n){super(e,n),this.t=t}}for(const t in e)n.prototype[t]=e[t];return n.t=t,n}Li.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=$i.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),o=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),p=t.getObj("events",n,e);return s.href=r,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),d&&Gn(s,d),{tagName:i,attributes:s,content:o,eventListeners:p}}};const Ri=Ni("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Pi=Ni("text"),Di=Ni("nl"),zi=Ni("url",{isLink:!0,toHref(t=$i.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==yr&&t[1].t===Xr}});const Hi=t=>new cr(t);function ji(t,e,n){const r=n[0].s,i=n[n.length-1].e;return new t(e.slice(r,i),n)}const Ui="undefined"!=typeof console&&console&&console.warn||(()=>{}),Zi="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Fi={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Vi(t,e=!1){if(Fi.initialized&&Ui(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Zi}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');Fi.customSchemes.push([t,e])}function Yi(){Fi.scanner=function(t=[]){const e={};cr.groups=e;const n=new cr;null==Ei&&(Ei=Mi(qn)),null==Si&&(Si=Mi(Xn)),ur(n,"'",Zr),ur(n,"{",Er),ur(n,"}",Sr),ur(n,"[",Br),ur(n,"]",Or),ur(n,"(",Mr),ur(n,")",$r),ur(n,"<",Ir),ur(n,">",Tr),ur(n,"(",Lr),ur(n,")",Nr),ur(n,"「",Rr),ur(n,"」",Pr),ur(n,"『",Dr),ur(n,"』",zr),ur(n,"<",Hr),ur(n,">",jr),ur(n,"&",Ur),ur(n,"*",Fr),ur(n,"@",Vr),ur(n,"`",Wr),ur(n,"^",qr),ur(n,":",Xr),ur(n,",",Gr),ur(n,"$",Kr),ur(n,".",Jr),ur(n,"=",Qr),ur(n,"!",ti),ur(n,"-",ei),ur(n,"%",ni),ur(n,"|",ri),ur(n,"+",ii),ur(n,"#",oi),ur(n,"?",si),ur(n,'"',ai),ur(n,"/",di),ur(n,";",ci),ur(n,"~",pi),ur(n,"_",hi),ur(n,"\\",Yr),ur(n,"・",li);const r=pr(n,Ai,_r,{[Kn]:!0});pr(r,Ai,r);const i=pr(r,gi,gr,{[tr]:!0}),o=pr(r,bi,br,{[er]:!0}),s=pr(n,gi,fr,{[Jn]:!0});pr(s,Ai,i),pr(s,gi,s),pr(i,Ai,i),pr(i,gi,i);const a=pr(n,bi,mr,{[Qn]:!0});pr(a,gi),pr(a,Ai,o),pr(a,bi,a),pr(o,Ai,o),pr(o,gi),pr(o,bi,o);const l=ur(n,xi,Cr,{[sr]:!0}),c=ur(n,vi,kr,{[sr]:!0}),d=pr(n,wi,kr,{[sr]:!0});ur(n,Ci,d),ur(c,xi,l),ur(c,Ci,d),pr(c,wi,d),ur(d,vi),ur(d,xi),pr(d,wi,d),ur(d,Ci,d);const p=pr(n,yi,ui,{[rr]:!0});ur(p,"#"),pr(p,yi,p),ur(p,_i,p);const h=ur(p,ki);ur(h,"#"),pr(h,yi,p);const u=[[gi,s],[Ai,i]],f=[[gi,null],[bi,a],[Ai,o]];for(let t=0;t<Ei.length;t++)Oi(n,Ei[t],Ar,fr,u);for(let t=0;t<Si.length;t++)Oi(n,Si[t],wr,mr,f);lr(Ar,{tld:!0,ascii:!0},e),lr(wr,{utld:!0,alpha:!0},e),Oi(n,"file",vr,fr,u),Oi(n,"mailto",vr,fr,u),Oi(n,"http",xr,fr,u),Oi(n,"https",xr,fr,u),Oi(n,"ftp",xr,fr,u),Oi(n,"ftps",xr,fr,u),lr(vr,{scheme:!0,ascii:!0},e),lr(xr,{slashscheme:!0,ascii:!0},e),t=t.sort(((t,e)=>t[0]>e[0]?1:-1));for(let e=0;e<t.length;e++){const r=t[e][0],i=t[e][1]?{[ir]:!0}:{[or]:!0};r.indexOf("-")>=0?i[nr]=!0:gi.test(r)?Ai.test(r)?i[tr]=!0:i[Jn]=!0:i[Kn]=!0,hr(n,r,r,i)}return hr(n,"localhost",yr,{ascii:!0}),n.jd=new cr(fi),{start:n,tokens:Gn({groups:e},mi)}}(Fi.customSchemes);for(let t=0;t<Fi.tokenQueue.length;t++)Fi.tokenQueue[t][1]({scanner:Fi.scanner});Fi.parser=function({groups:t}){const e=t.domain.concat([Ur,Fr,Vr,Yr,Wr,qr,Kr,Qr,ei,_r,ni,ri,ii,oi,di,fi,pi,hi]),n=[Xr,Gr,Jr,ti,ni,si,ai,ci,Ir,Tr,Er,Sr,Or,Br,Mr,$r,Lr,Nr,Rr,Pr,Dr,zr,Hr,jr],r=[Ur,Zr,Fr,Yr,Wr,qr,Kr,Qr,ei,Er,Sr,ni,ri,ii,oi,si,di,fi,pi,hi],i=Hi(),o=ur(i,pi);dr(o,r,o),dr(o,t.domain,o);const s=Hi(),a=Hi(),l=Hi();dr(i,t.domain,s),dr(i,t.scheme,a),dr(i,t.slashscheme,l),dr(s,r,o),dr(s,t.domain,s);const c=ur(s,Vr);ur(o,Vr,c),ur(a,Vr,c),ur(l,Vr,c);const d=ur(o,Jr);dr(d,r,o),dr(d,t.domain,o);const p=Hi();dr(c,t.domain,p),dr(p,t.domain,p);const h=ur(p,Jr);dr(h,t.domain,p);const u=Hi(Ri);dr(h,t.tld,u),dr(h,t.utld,u),ur(c,yr,u);const f=ur(p,ei);ur(f,ei,f),dr(f,t.domain,p),dr(u,t.domain,p),ur(u,Jr,h),ur(u,ei,f);const m=ur(u,Xr);dr(m,t.numeric,Ri);const g=ur(s,ei),b=ur(s,Jr);ur(g,ei,g),dr(g,t.domain,s),dr(b,r,o),dr(b,t.domain,s);const y=Hi(zi);dr(b,t.tld,y),dr(b,t.utld,y),dr(y,t.domain,s),dr(y,r,o),ur(y,Jr,b),ur(y,ei,g),ur(y,Vr,c);const A=ur(y,Xr),w=Hi(zi);dr(A,t.numeric,w);const v=Hi(zi),x=Hi();dr(v,e,v),dr(v,n,x),dr(x,e,v),dr(x,n,x),ur(y,di,v),ur(w,di,v);const _=ur(a,Xr),k=ur(l,Xr),C=ur(k,di),E=ur(C,di);dr(a,t.domain,s),ur(a,Jr,b),ur(a,ei,g),dr(l,t.domain,s),ur(l,Jr,b),ur(l,ei,g),dr(_,t.domain,v),ur(_,di,v),ur(_,si,v),dr(E,t.domain,v),dr(E,e,v),ur(E,di,v);const S=[[Er,Sr],[Br,Or],[Mr,$r],[Ir,Tr],[Lr,Nr],[Rr,Pr],[Dr,zr],[Hr,jr]];for(let t=0;t<S.length;t++){const[r,i]=S[t],o=ur(v,r);ur(x,r,o),ur(o,i,v);const s=Hi(zi);dr(o,e,s);const a=Hi();dr(o,n),dr(s,e,s),dr(s,n,a),dr(a,e,s),dr(a,n,a),ur(s,i,v),ur(a,i,v)}return ur(i,yr,y),ur(i,Cr,Di),{start:i,tokens:mi}}(Fi.scanner.tokens);for(let t=0;t<Fi.pluginQueue.length;t++)Fi.pluginQueue[t][1]({scanner:Fi.scanner,parser:Fi.parser});return Fi.initialized=!0,Fi}function Wi(t){return Fi.initialized||Yi(),function(t,e,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=t,l=null,c=null,d=0,p=null,h=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,a=c,a.accepts()?(h=0,p=a):h>=0&&h++,i++,d++;if(h<0)i-=d,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(ji(Pi,e,s)),s=[]),i-=h,d-=h;const t=p.t,r=n.slice(i-d,i);o.push(ji(t,e,r))}}return s.length>0&&o.push(ji(Pi,e,s)),o}(Fi.parser.start,t,Bi(Fi.scanner.start,t))}function qi(t,e=null,n=null){if(e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Ii(n),i=Wi(t),o=[];for(let t=0;t<i.length;t++){const n=i[t];!n.isLink||e&&n.t!==e||!r.check(n)||o.push(n.toFormattedObject(r))}return o}Wi.scan=Bi;const Xi=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Gi(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach((t=>{const e="string"==typeof t?t:t.scheme;e&&n.push(e)})),!t||t.replace(Xi,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Ki=At.vc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach((t=>{"string"!=typeof t?Vi(t.scheme,t.optionalSlashes):Vi(t)}))},onDestroy(){cr.groups={},Fi.scanner=null,Fi.parser=null,Fi.tokenQueue=[],Fi.pluginQueue=[],Fi.customSchemes=[],Fi.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Gi(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}),addAttributes(){return{href:{default:null,parseHTML:t=>t.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!(!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,At.P1)(this.options.HTMLAttributes,t),0]:["a",(0,At.P1)(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().setMark(this.name,t).setMeta("preventAutolink",!0).run()},toggleLink:t=>({chain:e})=>{const{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,At.K9)({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,i=qi(t).filter((t=>t.isLink&&this.options.isAllowedUri(t.value,{defaultValidate:t=>!!Gi(t,n),protocols:n,defaultProtocol:r})));i.length&&i.forEach((t=>e.push({text:t.value,data:{href:t.href},index:t.start})))}return e},type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(function(t){return new wt.Sy({key:new wt.H$("autolink"),appendTransaction:(e,n,r)=>{const i=e.some((t=>t.docChanged))&&!n.doc.eq(r.doc),o=e.some((t=>t.getMeta("preventAutolink")));if(!i||o)return;const{tr:s}=r,a=(0,At.XP)(n.doc,[...e]);return(0,At.QC)(a).forEach((({newRange:e})=>{const n=(0,At.b5)(r.doc,e,(t=>t.isTextblock));let i,o;if(n.length>1?(i=n[0],o=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0," ")):n.length&&r.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(i=n[0],o=r.doc.textBetween(i.pos,e.to,void 0," ")),i&&o){const e=o.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],l=i.pos+o.lastIndexOf(n);if(!n)return!1;const c=Wi(n).map((e=>e.toObject(t.defaultProtocol)));if(!(1===(a=c).length?a[0].isLink:3===a.length&&a[1].isLink&&["()","[]"].includes(a[0].value+a[2].value)))return!1;c.filter((t=>t.isLink)).map((t=>({...t,from:l+t.start+1,to:l+t.end+1}))).filter((t=>!r.schema.marks.code||!r.doc.rangeHasMark(t.from,t.to,r.schema.marks.code))).filter((e=>t.validate(e.value))).filter((e=>t.shouldAutoLink(e.value))).forEach((e=>{(0,At.tI)(e.from,e.to,r.doc).some((e=>e.mark.type===t.type))||s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}var a})),s.steps.length?s:void 0}})}({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!Gi(t,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),!0===this.options.openOnClick&&t.push(function(t){return new wt.Sy({key:new wt.H$("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,o;if(0!==r.button)return!1;if(!e.editable)return!1;let s=r.target;const a=[];for(;"DIV"!==s.nodeName;)a.push(s),s=s.parentNode;if(!a.find((t=>"A"===t.nodeName)))return!1;const l=(0,At.u9)(e.state,t.type.name),c=r.target,d=null!==(i=null==c?void 0:c.href)&&void 0!==i?i:l.href,p=null!==(o=null==c?void 0:c.target)&&void 0!==o?o:l.target;return!(!c||!d||(window.open(d,p),0))}}})}({type:this.type})),this.options.linkOnPaste&&t.push(function(t){return new wt.Sy({key:new wt.H$("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:i}=e,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const l=qi(a,{defaultProtocol:t.defaultProtocol}).find((t=>t.isLink&&t.value===a));return!(!a||!l)&&t.editor.commands.setMark(t.type,{href:l.href})}}})}({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}});let Ji,Qi;if("undefined"!=typeof WeakMap){let t=new WeakMap;Ji=e=>t.get(e),Qi=(e,n)=>(t.set(e,n),n)}else{let t=[],e=10,n=0;Ji=e=>{for(let n=0;n<t.length;n+=2)if(t[n]==e)return t[n+1]},Qi=(r,i)=>(n==e&&(n=0),t[n++]=r,t[n++]=i)}class to{constructor(t,e,n,r){this.left=t,this.top=e,this.right=n,this.bottom=r}}class eo{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){let n=this.map[e];if(n!=t)continue;let r=e%this.width,i=e/this.width|0,o=r+1,s=i+1;for(let t=1;o<this.width&&this.map[e+t]==n;t++)o++;for(let t=1;s<this.height&&this.map[e+this.width*t]==n;t++)s++;return new to(r,i,o,s)}throw new RangeError("No cell with offset "+t+" found")}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError("No cell with offset "+t+" found")}nextCell(t,e,n){let{left:r,right:i,top:o,bottom:s}=this.findCell(t);return"horiz"==e?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(t,e){let{left:n,right:r,top:i,bottom:o}=this.findCell(t),{left:s,right:a,top:l,bottom:c}=this.findCell(e);return new to(Math.min(n,s),Math.min(i,l),Math.max(r,a),Math.max(o,c))}cellsInRect(t){let e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){let o=r*this.width+i,s=this.map[o];n[s]||(n[s]=!0,i==t.left&&i&&this.map[o-1]==s||r==t.top&&r&&this.map[o-this.width]==s||e.push(s))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){let o=i+n.child(r).nodeSize;if(r==t){let n=e+t*this.width,r=(t+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(t){return Ji(t)||Qi(t,function(t){if("table"!=t.type.spec.tableRole)throw new RangeError("Not a table node: "+t.type.name);let e=function(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){let i=t.child(r),o=0;if(n)for(let e=0;e<r;e++){let n=t.child(e);for(let t=0;t<n.childCount;t++){let i=n.child(t);e+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let t=0;t<i.childCount;t++){let e=i.child(t);o+=e.attrs.colspan,e.attrs.rowspan>1&&(n=!0)}-1==e?e=o:e!=o&&(e=Math.max(e,o))}return e}(t),n=t.childCount,r=[],i=0,o=null,s=[];for(let t=0,i=e*n;t<i;t++)r[t]=0;for(let a=0,l=0;a<n;a++){let c=t.child(a);l++;for(let t=0;;t++){for(;i<r.length&&0!=r[i];)i++;if(t==c.childCount)break;let d=c.child(t),{colspan:p,rowspan:h,colwidth:u}=d.attrs;for(let t=0;t<h;t++){if(t+a>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:h-t});break}let c=i+t*e;for(let t=0;t<p;t++){0==r[c+t]?r[c+t]=l:(o||(o=[])).push({type:"collision",row:a,pos:l,n:p-t});let n=u&&u[t];if(n){let r=(c+t)%e*2,i=s[r];null==i||i!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):i==n&&s[r+1]++}}}i+=p,l+=d.nodeSize}let d=(a+1)*e,p=0;for(;i<d;)0==r[i++]&&p++;p&&(o||(o=[])).push({type:"missing",row:a,n:p}),l++}let a=new eo(e,n,r,o),l=!1;for(let t=0;!l&&t<s.length;t+=2)null!=s[t]&&s[t+1]<n&&(l=!0);l&&function(t,e,n){t.problems||(t.problems=[]);for(let r=0,i={};r<t.map.length;r++){let o=t.map[r];if(i[o])continue;i[o]=!0;let s=n.nodeAt(o),a=null;for(let n=0;n<s.attrs.colspan;n++){let i=e[2*((r+n)%t.width)];null==i||s.attrs.colwidth&&s.attrs.colwidth[n]==i||((a||(a=no(s.attrs)))[n]=i)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}(a,s,t);return a}(t))}}function no(t){if(t.colwidth)return t.colwidth.slice();let e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function ro(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(let n in t.nodes){let r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}const io=new wt.H$("selectingCells");function oo(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function so(t){let e=t.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function ao(t){let e=t.selection;return e.$anchorCell?e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell:e.node&&"cell"==e.node.type.spec.tableRole?e.$anchor:oo(e.$head)||function(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){let r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){let r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n-e.nodeSize)}}(e.$head)}function lo(t){return"row"==t.parent.type.spec.tableRole&&t.nodeAfter}function co(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function po(t,e,n){let r=t.start(-1),i=eo.get(t.node(-1)).nextCell(t.pos-r,e,n);return null==i?null:t.node(0).resolve(r+i)}function ho(t,e,n){let r={};for(let e in t)r[e]=t[e];return r[e]=n,r}function uo(t,e,n=1){let r=ho(t,"colspan",t.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some((t=>t>0))||(r.colwidth=null)),r}function fo(t,e,n=1){let r=ho(t,"colspan",t.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(let t=0;t<n;t++)r.colwidth.splice(e,0,0)}return r}class mo extends wt.Y1{constructor(t,e=t){let n=t.node(-1),r=eo.get(n),i=t.start(-1),o=r.rectBetween(t.pos-i,e.pos-i),s=t.node(0),a=r.cellsInRect(o).filter((t=>t!=e.pos-i));a.unshift(e.pos-i);let l=a.map((t=>{let e=n.nodeAt(t),r=t+i+1;return new wt.xm(s.resolve(r),s.resolve(r+e.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=t,this.$headCell=e}map(t,e){let n=t.resolve(e.map(this.$anchorCell.pos)),r=t.resolve(e.map(this.$headCell.pos));if(lo(n)&&lo(r)&&co(n,r)){let t=this.$anchorCell.node(-1)!=n.node(-1);return t&&this.isRowSelection()?mo.rowSelection(n,r):t&&this.isColSelection()?mo.colSelection(n,r):new mo(n,r)}return wt.Bs.between(n,r)}content(){let t=this.$anchorCell.node(-1),e=eo.get(t),n=this.$anchorCell.start(-1),r=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let n=r.top;n<r.bottom;n++){let s=[];for(let o=n*e.width+r.left,a=r.left;a<r.right;a++,o++){let n=e.map[o];if(!i[n]){i[n]=!0;let o=e.findCell(n),a=t.nodeAt(n),l=r.left-o.left,c=o.right-r.right;if(l>0||c>0){let t=a.attrs;l>0&&(t=uo(t,0,l)),c>0&&(t=uo(t,t.colspan-c,c)),a=o.left<r.left?a.type.createAndFill(t):a.type.create(t,a.content)}if(o.top<r.top||o.bottom>r.bottom){let t=ho(a.attrs,"rowspan",Math.min(o.bottom,r.bottom)-Math.max(o.top,r.top));a=o.top<r.top?a.type.createAndFill(t):a.type.create(t,a.content)}s.push(a)}}o.push(t.child(n).copy(Dn.HY.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?t:o;return new Dn.p2(Dn.HY.from(s),1,1)}replace(t,e=Dn.p2.empty){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=t.mapping.slice(n);t.replace(a.map(o.pos),a.map(s.pos),i?Dn.p2.empty:e)}let i=wt.Y1.findFrom(t.doc.resolve(t.mapping.slice(n).map(this.to)),-1);i&&t.setSelection(i)}replaceWith(t,e){this.replace(t,new Dn.p2(Dn.HY.from(e),0,0))}forEachCell(t){let e=this.$anchorCell.node(-1),n=eo.get(e),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)t(e.nodeAt(i[n]),r+i[n])}isColSelection(){let t=this.$anchorCell.index(-1),e=this.$headCell.index(-1);if(Math.min(t,e)>0)return!1;let n=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,e=t){let n=eo.get(t.node(-1)),r=t.start(-1),i=n.findCell(t.pos-r),o=n.findCell(e.pos-r),s=t.node(0);return i.top<=o.top?(i.top>0&&(t=s.resolve(r+n.map[i.left])),o.bottom<n.height&&(e=s.resolve(r+n.map[n.width*(n.height-1)+o.right-1]))):(o.top>0&&(e=s.resolve(r+n.map[o.left])),i.bottom<n.height&&(t=s.resolve(r+n.map[n.width*(n.height-1)+i.right-1]))),new mo(t,e)}isRowSelection(){let t=eo.get(this.$anchorCell.node(-1)),e=this.$anchorCell.start(-1),n=t.colCount(this.$anchorCell.pos-e),r=t.colCount(this.$headCell.pos-e);if(Math.min(n,r)>0)return!1;let i=n+this.$anchorCell.nodeAfter.attrs.colspan,o=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,o)==t.width}eq(t){return t instanceof mo&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,e=t){let n=eo.get(t.node(-1)),r=t.start(-1),i=n.findCell(t.pos-r),o=n.findCell(e.pos-r),s=t.node(0);return i.left<=o.left?(i.left>0&&(t=s.resolve(r+n.map[i.top*n.width])),o.right<n.width&&(e=s.resolve(r+n.map[n.width*(o.top+1)-1]))):(o.left>0&&(e=s.resolve(r+n.map[o.top*n.width])),i.right<n.width&&(t=s.resolve(r+n.map[n.width*(i.top+1)-1]))),new mo(t,e)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,e){return new mo(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){return new mo(t.resolve(e),t.resolve(n))}getBookmark(){return new go(this.$anchorCell.pos,this.$headCell.pos)}}mo.prototype.visible=!1,wt.Y1.jsonID("cell",mo);class go{constructor(t,e){this.anchor=t,this.head=e}map(t){return new go(t.map(this.anchor),t.map(this.head))}resolve(t){let e=t.resolve(this.anchor),n=t.resolve(this.head);return"row"==e.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&e.index()<e.parent.childCount&&n.index()<n.parent.childCount&&co(e,n)?new mo(e,n):wt.Y1.near(n,1)}}function bo(t){if(!(t.selection instanceof mo))return null;let e=[];return t.selection.forEachCell(((t,n)=>{e.push(_t.p.node(n,n+t.nodeSize,{class:"selectedCell"}))})),_t.EH.create(t.doc,e)}function yo(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;1==e.childCount&&(n>0&&r>0||"table"==e.firstChild.type.spec.tableRole);)n--,r--,e=e.firstChild.content;let i=e.firstChild,o=i.type.spec.tableRole,s=i.type.schema,a=[];if("row"==o)for(let t=0;t<e.childCount;t++){let i=e.child(t).content,o=t?0:Math.max(0,n-1),l=t<e.childCount-1?0:Math.max(0,r-1);(o||l)&&(i=Ao(ro(s).row,new Dn.p2(i,o,l)).content),a.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;a.push(n||r?Ao(ro(s).row,new Dn.p2(e,n,r)).content:e)}return function(t,e){let n=[];for(let t=0;t<e.length;t++){let r=e[t];for(let e=r.childCount-1;e>=0;e--){let{rowspan:i,colspan:o}=r.child(e).attrs;for(let e=t;e<t+i;e++)n[e]=(n[e]||0)+o}}let r=0;for(let t=0;t<n.length;t++)r=Math.max(r,n[t]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(Dn.HY.empty),n[i]<r){let o=ro(t).cell.createAndFill(),s=[];for(let t=n[i];t<r;t++)s.push(o);e[i]=e[i].append(Dn.HY.from(s))}return{height:e.length,width:r,rows:e}}(s,a)}function Ao(t,e){let n=t.createAndFill();return new qt.wx(n).replace(0,n.content.size,e).doc}function wo(t,e,n,r,i,o,s,a){if(0==s||s==e.height)return!1;let l=!1;for(let c=i;c<o;c++){let i=s*e.width+c,o=e.map[i];if(e.map[i-e.width]==o){l=!0;let i=n.nodeAt(o),{top:d,left:p}=e.findCell(o);t.setNodeMarkup(t.mapping.slice(a).map(o+r),null,ho(i.attrs,"rowspan",s-d)),t.insert(t.mapping.slice(a).map(e.positionAt(s,p,n)),i.type.createAndFill(ho(i.attrs,"rowspan",d+i.attrs.rowspan-s))),c+=i.attrs.colspan-1}}return l}function vo(t,e,n,r,i,o,s,a){if(0==s||s==e.width)return!1;let l=!1;for(let c=i;c<o;c++){let i=c*e.width+s,o=e.map[i];if(e.map[i-1]==o){l=!0;let i=n.nodeAt(o),d=e.colCount(o),p=t.mapping.slice(a).map(o+r);t.setNodeMarkup(p,null,uo(i.attrs,s-d,i.attrs.colspan-(s-d))),t.insert(p+i.nodeSize,i.type.createAndFill(uo(i.attrs,0,s-d))),c+=i.attrs.rowspan-1}}return l}function xo(t,e,n,r,i){let o=n?t.doc.nodeAt(n-1):t.doc,s=eo.get(o),{top:a,left:l}=r,c=l+i.width,d=a+i.height,p=t.tr,h=0;function u(){o=n?p.doc.nodeAt(n-1):p.doc,s=eo.get(o),h=p.mapping.maps.length}(function(t,e,n,r,i,o,s){let a,l,c=ro(t.doc.type.schema);if(i>e.width)for(let o=0,d=0;o<e.height;o++){let p=n.child(o);d+=p.nodeSize;let h,u=[];h=null==p.lastChild||p.lastChild.type==c.cell?a||(a=c.cell.createAndFill()):l||(l=c.header_cell.createAndFill());for(let t=e.width;t<i;t++)u.push(h);t.insert(t.mapping.slice(s).map(d-1+r),u)}if(o>e.height){let d=[];for(let t=0,r=(e.height-1)*e.width;t<Math.max(e.width,i);t++){let i=!(t>=e.width)&&n.nodeAt(e.map[r+t]).type==c.header_cell;d.push(i?l||(l=c.header_cell.createAndFill()):a||(a=c.cell.createAndFill()))}let p=c.row.create(null,Dn.HY.from(d)),h=[];for(let t=e.height;t<o;t++)h.push(p);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),h)}return!(!a&&!l)})(p,s,o,n,c,d,h)&&u(),wo(p,s,o,n,l,c,a,h)&&u(),wo(p,s,o,n,l,c,d,h)&&u(),vo(p,s,o,n,a,d,l,h)&&u(),vo(p,s,o,n,a,d,c,h)&&u();for(let t=a;t<d;t++){let e=s.positionAt(t,l,o),r=s.positionAt(t,c,o);p.replace(p.mapping.slice(h).map(e+n),p.mapping.slice(h).map(r+n),new Dn.p2(i.rows[t-a],0,0))}u(),p.setSelection(new mo(p.doc.resolve(n+s.positionAt(a,l,o)),p.doc.resolve(n+s.positionAt(d-1,c-1,o)))),e(p)}const _o=(0,Pn.$)({ArrowLeft:Co("horiz",-1),ArrowRight:Co("horiz",1),ArrowUp:Co("vert",-1),ArrowDown:Co("vert",1),"Shift-ArrowLeft":Eo("horiz",-1),"Shift-ArrowRight":Eo("horiz",1),"Shift-ArrowUp":Eo("vert",-1),"Shift-ArrowDown":Eo("vert",1),Backspace:So,"Mod-Backspace":So,Delete:So,"Mod-Delete":So});function ko(t,e,n){return!n.eq(t.selection)&&(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Co(t,e){return(n,r,i)=>{let o=n.selection;if(o instanceof mo)return ko(n,r,wt.Y1.near(o.$headCell,e));if("horiz"!=t&&!o.empty)return!1;let s=$o(i,t,e);if(null==s)return!1;if("horiz"==t)return ko(n,r,wt.Y1.near(n.doc.resolve(o.head+e),e));{let i,o=n.doc.resolve(s),a=po(o,t,e);return i=a?wt.Y1.near(a,1):e<0?wt.Y1.near(n.doc.resolve(o.before(-1)),-1):wt.Y1.near(n.doc.resolve(o.after(-1)),1),ko(n,r,i)}}}function Eo(t,e){return(n,r,i)=>{let o=n.selection;if(!(o instanceof mo)){let r=$o(i,t,e);if(null==r)return!1;o=new mo(n.doc.resolve(r))}let s=po(o.$headCell,t,e);return!!s&&ko(n,r,new mo(o.$anchorCell,s))}}function So(t,e){let n=t.selection;if(!(n instanceof mo))return!1;if(e){let r=t.tr,i=ro(t.schema).cell.createAndFill().content;n.forEachCell(((t,e)=>{t.content.eq(i)||r.replace(r.mapping.map(e+1),r.mapping.map(e+t.nodeSize-1),new Dn.p2(i,0,0))})),r.docChanged&&e(r)}return!0}function Bo(t,e){let n=oo(t.state.doc.resolve(e));return!!n&&(t.dispatch(t.state.tr.setSelection(new mo(n))),!0)}function Oo(t,e,n){if(!so(t.state))return!1;let r=yo(n),i=t.state.selection;if(i instanceof mo){r||(r={width:1,height:1,rows:[Dn.HY.from(Ao(ro(t.state.schema).cell,n))]});let e=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=eo.get(e).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=function({width:t,height:e,rows:n},r,i){if(t!=r){let e=[],i=[];for(let t=0;t<n.length;t++){let o=n[t],s=[];for(let n=e[t]||0,i=0;n<r;i++){let a=o.child(i%o.childCount);n+a.attrs.colspan>r&&(a=a.type.create(uo(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)e[t+n]=(e[t+n]||0)+a.attrs.colspan}i.push(Dn.HY.from(s))}n=i,t=r}if(e!=i){let t=[];for(let r=0,o=0;r<i;r++,o++){let s=[],a=n[o%e];for(let t=0;t<a.childCount;t++){let e=a.child(t);r+e.attrs.rowspan>i&&(e=e.type.create(ho(e.attrs,"rowspan",Math.max(1,i-e.attrs.rowspan)),e.content)),s.push(e)}t.push(Dn.HY.from(s))}n=t,e=i}return{width:t,height:e,rows:n}}(r,s.right-s.left,s.bottom-s.top),xo(t.state,t.dispatch,o,s,r),!0}if(r){let e=ao(t.state),n=e.start(-1);return xo(t.state,t.dispatch,n,eo.get(e.node(-1)).findCell(e.pos-n),r),!0}return!1}function Mo(t,e){if(e.ctrlKey||e.metaKey)return;let n,r=Io(t,e.target);if(e.shiftKey&&t.state.selection instanceof mo)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&null!=(n=oo(t.state.selection.$anchor))&&To(t,e).pos!=n.pos)i(n,e),e.preventDefault();else if(!r)return;function i(e,n){let r=To(t,n),i=null==io.getState(t.state);if(!r||!co(e,r)){if(!i)return;r=e}let o=new mo(e,r);if(i||!t.state.selection.eq(o)){let n=t.state.tr.setSelection(o);i&&n.setMeta(io,e.pos),t.dispatch(n)}}function o(){t.root.removeEventListener("mouseup",o),t.root.removeEventListener("dragstart",o),t.root.removeEventListener("mousemove",s),null!=io.getState(t.state)&&t.dispatch(t.state.tr.setMeta(io,-1))}function s(n){let s,a=io.getState(t.state);if(null!=a)s=t.state.doc.resolve(a);else if(Io(t,n.target)!=r&&(s=To(t,e),!s))return o();s&&i(s,n)}t.root.addEventListener("mouseup",o),t.root.addEventListener("dragstart",o),t.root.addEventListener("mousemove",s)}function $o(t,e,n){if(!(t.state.selection instanceof wt.Bs))return null;let{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){let o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))return null;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){let o=r.before(i),s="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(s)?o:null}}return null}function Io(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e}function To(t,e){let n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?oo(t.state.doc.resolve(n.pos)):null}const Lo=new wt.H$("fix-tables");function No(t,e,n,r){let i=t.childCount,o=e.childCount;t:for(let s=0,a=0;s<o;s++){let o=e.child(s);for(let e=a,r=Math.min(i,s+3);e<r;e++)if(t.child(e)==o){a=e+1,n+=o.nodeSize;continue t}r(o,n),a<i&&t.child(a).sameMarkup(o)?No(t.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function Ro(t,e){let n,r=(e,r)=>{"table"==e.type.spec.tableRole&&(n=function(t,e,n,r){let i=eo.get(e);if(!i.problems)return r;r||(r=t.tr);let o,s,a=[];for(let t=0;t<i.height;t++)a.push(0);for(let t=0;t<i.problems.length;t++){let o=i.problems[t];if("collision"==o.type){let t=e.nodeAt(o.pos);for(let e=0;e<t.attrs.rowspan;e++)a[o.row+e]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,uo(t.attrs,t.attrs.colspan-o.n,o.n))}else if("missing"==o.type)a[o.row]+=o.n;else if("overlong_rowspan"==o.type){let t=e.nodeAt(o.pos);r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,ho(t.attrs,"rowspan",t.attrs.rowspan-o.n))}else if("colwidth mismatch"==o.type){let t=e.nodeAt(o.pos);r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,ho(t.attrs,"colwidth",o.colwidth))}}for(let t=0;t<a.length;t++)a[t]&&(null==o&&(o=t),s=t);for(let l=0,c=n+1;l<i.height;l++){let n=e.child(l),i=c+n.nodeSize,d=a[l];if(d>0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<d;n++)a.push(ro(t.schema)[e].createAndFill());let p=0!=l&&o!=l-1||s!=l?i-1:c+1;r.insert(r.mapping.map(p),a)}c=i}return r.setMeta(Lo,{fixTables:!0})}(t,e,r,n))};return e?e.doc!=t.doc&&No(e.doc,t.doc,0,r):t.doc.descendants(r),n}function Po(t){let e,n=t.selection,r=ao(t),i=r.node(-1),o=r.start(-1),s=eo.get(i);return e=n instanceof mo?s.rectBetween(n.$anchorCell.pos-o,n.$headCell.pos-o):s.findCell(r.pos-o),e.tableStart=o,e.map=s,e.table=i,e}function Do(t,{map:e,tableStart:n,table:r},i){let o=i>0?-1:0;(function(t,e,n){let r=ro(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0})(e,r,i+o)&&(o=0==i||i==e.width?null:0);for(let s=0;s<e.height;s++){let a=s*e.width+i;if(i>0&&i<e.width&&e.map[a-1]==e.map[a]){let o=e.map[a],l=r.nodeAt(o);t.setNodeMarkup(t.mapping.map(n+o),null,fo(l.attrs,i-e.colCount(o))),s+=l.attrs.rowspan-1}else{let l=null==o?ro(r.type.schema).cell:r.nodeAt(e.map[a+o]).type,c=e.positionAt(s,i,r);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function zo(t,{map:e,table:n,tableStart:r},i){let o=t.mapping.maps.length;for(let s=0;s<e.height;){let a=s*e.width+i,l=e.map[a],c=n.nodeAt(l);if(i>0&&e.map[a-1]==l||i<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(o).map(r+l),null,uo(c.attrs,i-e.colCount(l)));else{let e=t.mapping.slice(o).map(r+l);t.delete(e,e+c.nodeSize)}s+=c.attrs.rowspan}}function Ho(t,{map:e,tableStart:n,table:r},i){let o=n;for(let t=0;t<i;t++)o+=r.child(t).nodeSize;let s=[],a=i>0?-1:0;(function(t,e,n){let r=ro(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(e.nodeAt(t.map[i+n*t.width]).type!=r)return!1;return!0})(e,r,i+a)&&(a=0==i||i==e.height?null:0);for(let o=0,l=e.width*i;o<e.width;o++,l++)if(i>0&&i<e.height&&e.map[l]==e.map[l-e.width]){let i=e.map[l],s=r.nodeAt(i).attrs;t.setNodeMarkup(n+i,null,ho(s,"rowspan",s.rowspan+1)),o+=s.colspan-1}else{let t=null==a?ro(r.type.schema).cell:r.nodeAt(e.map[l+a*e.width]).type;s.push(t.createAndFill())}return t.insert(o,ro(r.type.schema).row.create(null,s)),t}function jo(t,{map:e,table:n,tableStart:r},i){let o=0;for(let t=0;t<i;t++)o+=n.child(t).nodeSize;let s=o+n.child(i).nodeSize,a=t.mapping.maps.length;t.delete(o+r,s+r);for(let o=0,s=i*e.width;o<e.width;o++,s++){let l=e.map[s];if(i>0&&l==e.map[s-e.width]){let e=n.nodeAt(l).attrs;t.setNodeMarkup(t.mapping.slice(a).map(l+r),null,ho(e,"rowspan",e.rowspan-1)),o+=e.colspan-1}else if(i<e.width&&l==e.map[s+e.width]){let s=n.nodeAt(l),c=s.type.create(ho(s.attrs,"rowspan",s.attrs.rowspan-1),s.content),d=e.positionAt(i+1,o,n);t.insert(t.mapping.slice(a).map(r+d),c),o+=s.attrs.colspan-1}}}function Uo(t){let e=t.content;return 1==e.childCount&&e.firstChild.isTextblock&&0==e.firstChild.childCount}function Zo(t,e){let n=t.selection;if(!(n instanceof mo)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=Po(t),{map:i}=r;if(function({width:t,height:e,map:n},r){let i=r.top*t+r.left,o=i,s=(r.bottom-1)*t+r.left,a=i+(r.right-r.left-1);for(let e=r.top;e<r.bottom;e++){if(r.left>0&&n[o]==n[o-1]||r.right<t&&n[a]==n[a+1])return!0;o+=t,a+=t}for(let o=r.left;o<r.right;o++){if(r.top>0&&n[i]==n[i-t]||r.bottom<e&&n[s]==n[s+t])return!0;i++,s++}return!1}(i,r))return!1;if(e){let n,o,s=t.tr,a={},l=Dn.HY.empty;for(let t=r.top;t<r.bottom;t++)for(let e=r.left;e<r.right;e++){let c=i.map[t*i.width+e],d=r.table.nodeAt(c);if(!a[c])if(a[c]=!0,null==n)n=c,o=d;else{Uo(d)||(l=l.append(d.content));let t=s.mapping.map(c+r.tableStart);s.delete(t,t+d.nodeSize)}}if(s.setNodeMarkup(n+r.tableStart,null,ho(fo(o.attrs,o.attrs.colspan,r.right-r.left-o.attrs.colspan),"rowspan",r.bottom-r.top)),l.size){let t=n+1+o.content.size,e=Uo(o)?n+1:t;s.replaceWith(e+r.tableStart,t+r.tableStart,l)}s.setSelection(new mo(s.doc.resolve(n+r.tableStart))),e(s)}return!0}function Fo(t,e){const n=ro(t.schema);return(r=({node:t})=>n[t.type.spec.tableRole],(t,e)=>{let n,i,o=t.selection;if(o instanceof mo){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;n=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{if(n=function(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}(o.$from),!n)return!1;i=oo(o.$from).pos}if(1==n.attrs.colspan&&1==n.attrs.rowspan)return!1;if(e){let s=n.attrs,a=[],l=s.colwidth;s.rowspan>1&&(s=ho(s,"rowspan",1)),s.colspan>1&&(s=ho(s,"colspan",1));let c,d=Po(t),p=t.tr;for(let t=0;t<d.right-d.left;t++)a.push(l?ho(s,"colwidth",l&&l[t]?[l[t]]:null):s);for(let t=d.top;t<d.bottom;t++){let e=d.map.positionAt(t,d.left,d.table);t==d.top&&(e+=n.nodeSize);for(let i=d.left,o=0;i<d.right;i++,o++)i==d.left&&t==d.top||p.insert(c=p.mapping.map(e+d.tableStart,1),r({node:n,row:t,col:i}).createAndFill(a[o]))}p.setNodeMarkup(i,r({node:n,row:d.top,col:d.left}),a[0]),o instanceof mo&&p.setSelection(new mo(p.doc.resolve(o.$anchorCell.pos),c&&p.doc.resolve(c))),e(p)}return!0})(t,e);var r}function Vo(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:"row"==t?e.map.width:1,bottom:"column"==t?e.map.height:1});for(let t=0;t<r.length;t++){const i=e.table.nodeAt(r[t]);if(i&&i.type!==n.header_cell)return!1}return!0}function Yo(t,e){return(e=e||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(t){return function(e,n){if(!so(e))return!1;if(n){let r=ro(e.schema),i=Po(e),o=e.tr,s=i.map.cellsInRect("column"==t?new to(i.left,0,i.right,i.map.height):"row"==t?new to(0,i.top,i.map.width,i.bottom):i),a=s.map((t=>i.table.nodeAt(t)));for(let t=0;t<s.length;t++)a[t].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[t],r.cell,a[t].attrs);if(0==o.steps.length)for(let t=0;t<s.length;t++)o.setNodeMarkup(i.tableStart+s[t],r.header_cell,a[t].attrs);n(o)}return!0}}(t):function(e,n){if(!so(e))return!1;if(n){let r=ro(e.schema),i=Po(e),o=e.tr,s=Vo("row",i,r),a=Vo("column",i,r),l=("column"===t?s:"row"===t&&a)?1:0,c="column"==t?new to(0,l,1,i.map.height):"row"==t?new to(l,0,i.map.width,1):i,d="column"==t?a?r.cell:r.header_cell:"row"==t?s?r.cell:r.header_cell:r.cell;i.map.cellsInRect(c).forEach((t=>{const e=t+i.tableStart,n=o.doc.nodeAt(e);n&&o.setNodeMarkup(e,d,n.attrs)})),n(o)}return!0}}Yo("row",{useDeprecatedLogic:!0}),Yo("column",{useDeprecatedLogic:!0});let Wo=Yo("cell",{useDeprecatedLogic:!0});function qo(t){return function(e,n){if(!so(e))return!1;let r=function(t,e){if(e<0){let e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let e=t.index(-1)-1,n=t.before();e>=0;e--){let r=t.node(-1).child(e);if(r.childCount)return n-1-r.lastChild.nodeSize;n-=r.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;let e=t.node(-1);for(let n=t.indexAfter(-1),r=t.after();n<e.childCount;n++){let t=e.child(n);if(t.childCount)return r+1;r+=t.nodeSize}}}(ao(e),t);if(null!=r){if(n){let t=e.doc.resolve(r);n(e.tr.setSelection(wt.Bs.between(t,(i=t,i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)))).scrollIntoView())}var i;return!0}}}class Xo{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Go(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,Go(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}}function Go(t,e,n,r,i,o){let s=0,a=!0,l=e.firstChild,c=t.firstChild;for(let t=0,n=0;t<c.childCount;t++){let{colspan:d,colwidth:p}=c.child(t).attrs;for(let t=0;t<d;t++,n++){let c=i==n?o:p&&p[t],d=c?c+"px":"";s+=c||r,c||(a=!1),l?(l.style.width!=d&&(l.style.width=d),l=l.nextSibling):e.appendChild(document.createElement("col")).style.width=d}}for(;l;){let t=l.nextSibling;l.parentNode.removeChild(l),l=t}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}const Ko=new wt.H$("tableColumnResizing");function Jo({handleWidth:t=5,cellMinWidth:e=25,View:n=Xo,lastColumnResizable:r=!0}={}){let i=new wt.Sy({key:Ko,state:{init(t,r){return this.spec.props.nodeViews[ro(r.schema).table.name]=(t,r)=>new n(t,e,r),new Qo(-1,!1)},apply:(t,e)=>e.apply(t)},props:{attributes:t=>Ko.getState(t).activeHandle>-1?{class:"resize-cursor"}:null,handleDOMEvents:{mousemove(e,n){!function(t,e,n,r,i){let o=Ko.getState(t.state);if(!o.dragging){let r=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target),s=-1;if(r){let{left:i,right:o}=r.getBoundingClientRect();e.clientX-i<=n?s=ts(t,e,"left"):o-e.clientX<=n&&(s=ts(t,e,"right"))}if(s!=o.activeHandle){if(!i&&-1!==s){let e=t.state.doc.resolve(s),n=e.node(-1),r=eo.get(n),i=e.start(-1);if(r.colCount(e.pos-i)+e.nodeAfter.attrs.colspan-1==r.width-1)return}ns(t,s)}}}(e,n,t,0,r)},mouseleave(t){!function(t){let e=Ko.getState(t.state);e.activeHandle>-1&&!e.dragging&&ns(t,-1)}(t)},mousedown(t,n){!function(t,e,n){let r=Ko.getState(t.state);if(-1==r.activeHandle||r.dragging)return!1;let i=t.state.doc.nodeAt(r.activeHandle),o=function(t,e,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let o=t.domAtPos(e),s=o.node.childNodes[o.offset].offsetWidth,a=n;if(r)for(let t=0;t<n;t++)r[t]&&(s-=r[t],a--);return s/a}(t,r.activeHandle,i.attrs);function s(e){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);let r=Ko.getState(t.state);r.dragging&&(!function(t,e,n){let r=t.state.doc.resolve(e),i=r.node(-1),o=eo.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let t=0;t<o.height;t++){let e=t*o.width+a;if(t&&o.map[e]==o.map[e-o.width])continue;let r=o.map[e],{attrs:c}=i.nodeAt(r),d=1==c.colspan?0:a-o.colCount(r);if(c.colwidth&&c.colwidth[d]==n)continue;let p=c.colwidth?c.colwidth.slice():rs(c.colspan);p[d]=n,l.setNodeMarkup(s+r,null,ho(c,"colwidth",p))}l.docChanged&&t.dispatch(l)}(t,r.activeHandle,es(r.dragging,e,n)),t.dispatch(t.state.tr.setMeta(Ko,{setDragging:null})))}function a(e){if(!e.which)return s(e);let r=Ko.getState(t.state),i=es(r.dragging,e,n);!function(t,e,n,r){let i=t.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),a=eo.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=t.domAtPos(i.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;Go(o,l.firstChild,l,r,a,n)}(t,r.activeHandle,i,n)}t.dispatch(t.state.tr.setMeta(Ko,{setDragging:{startX:e.clientX,startWidth:o}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),e.preventDefault()}(t,n,e)}},decorations(t){let e=Ko.getState(t);if(e.activeHandle>-1)return function(t,e){let n=[],r=t.doc.resolve(e),i=r.node(-1),o=eo.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let t=0;t<o.height;t++){let e=a+t*o.width-1;if(!(a!=o.width&&o.map[e]==o.map[e+1]||0!=t&&o.map[e-1]==o.map[e-1-o.width])){let t=o.map[e],r=s+t+i.nodeAt(t).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(_t.p.widget(r,a))}}return _t.EH.create(t.doc,n)}(t,e.activeHandle)},nodeViews:{}}});return i}class Qo{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(t){let e=this,n=t.getMeta(Ko);if(n&&null!=n.setHandle)return new Qo(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Qo(e.activeHandle,n.setDragging);if(e.activeHandle>-1&&t.docChanged){let n=t.mapping.map(e.activeHandle,-1);lo(t.doc.resolve(n))||(n=null),e=new Qo(n,e.dragging)}return e}}function ts(t,e,n){let r=t.posAtCoords({left:e.clientX,top:e.clientY});if(!r)return-1;let{pos:i}=r,o=oo(t.state.doc.resolve(i));if(!o)return-1;if("right"==n)return o.pos;let s=eo.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function es(t,e,n){let r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function ns(t,e){t.dispatch(t.state.tr.setMeta(Ko,{setHandle:e}))}function rs(t){let e=[];for(let n=0;n<t;n++)e.push(0);return e}function is({allowTableNodeSelection:t=!1}={}){return new wt.Sy({key:io,state:{init:()=>null,apply(t,e){let n=t.getMeta(io);if(null!=n)return-1==n?null:n;if(null==e||!t.docChanged)return e;let{deleted:r,pos:i}=t.mapping.mapResult(e);return r?null:i}},props:{decorations:bo,handleDOMEvents:{mousedown:Mo},createSelectionBetween(t){if(null!=io.getState(t.state))return t.state.selection},handleTripleClick:Bo,handleKeyDown:_o,handlePaste:Oo},appendTransaction:(e,n,r)=>function(t,e,n){let r,i,o=(e||t).selection,s=(e||t).doc;if(o instanceof wt.qv&&(i=o.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=mo.create(s,o.from);else if("row"==i){let t=s.resolve(o.from+1);r=mo.rowSelection(t,t)}else if(!n){let t=eo.get(o.node),e=o.from+1,n=e+t.map[t.width*t.height-1];r=mo.create(s,e+1,n)}}else o instanceof wt.Bs&&function({$from:t,$to:e}){if(t.pos==e.pos||t.pos<t.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let t=e.depth;t>=0&&!(e.before(t+1)>e.start(t));t--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}(o)?r=wt.Bs.create(s,o.from):o instanceof wt.Bs&&function({$from:t,$to:e}){let n,r;for(let e=t.depth;e>0;e--){let r=t.node(e);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let t=e.depth;t>0;t--){let n=e.node(t);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===e.parentOffset}(o)&&(r=wt.Bs.create(s,o.$from.start(),o.$from.end()));return r&&(e||(e=t.tr)).setSelection(r),e}(r,Ro(r,n),t)})}function os(t,e){return e?t.createChecked(null,e):t.createAndFill()}function ss(t,e,n,r,i){const o=function(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach((n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)})),t.cached.tableNodeTypes=e,e}(t),s=[],a=[];for(let t=0;t<n;t+=1){const t=os(o.cell,i);if(t&&a.push(t),r){const t=os(o.header_cell,i);t&&s.push(t)}}const l=[];for(let t=0;t<e;t+=1)l.push(o.row.createChecked(null,r&&0===t?s:a));return o.table.createChecked(null,l)}const as=t=>{let{editor:e}=t;const{selection:n}=e.state;if(!(n instanceof mo))return!1;let r=0;const i=(0,At.qv)(n.ranges[0].$from,(t=>"table"===t.type.name));i?.node.descendants((t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(r+=1)}));return r===n.ranges.length&&(e.commands.deleteTable(),!0)};function ls(t,e,n,r,i,o){let s=0,a=!0,l=e.firstChild;const c=t.firstChild;for(let t=0,n=0;t<c.childCount;t+=1){const{colspan:d,colwidth:p}=c.child(t).attrs;for(let t=0;t<d;t+=1,n+=1){const c=i===n?o:p&&p[t],d=c?`${c}px`:"";s+=c||r,c||(a=!1),l?(l.style.width!==d&&(l.style.width=d),l=l.nextSibling):e.appendChild(document.createElement("col")).style.width=d}}for(;l;){const t=l.nextSibling;l.parentNode.removeChild(l),l=t}n.style.width="50%"}class cs{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.margin="auto",this.colgroup=this.table.appendChild(document.createElement("colgroup")),ls(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type===this.node.type&&(this.node=t,ls(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"===t.type&&(t.target===this.table||this.colgroup.contains(t.target))}}function ds(t,e,n,r,i,o){let s=0,a=!0,l=e.firstChild;const c=t.firstChild;for(let t=0,n=0;t<c.childCount;t+=1){const{colspan:d,colwidth:p}=c.child(t).attrs;for(let t=0;t<d;t+=1,n+=1){const c=i===n?o:p&&p[t],d=c?`${c}px`:"";s+=c||r,c||(a=!1),l?(l.style.width!==d&&(l.style.width=d),l=l.nextSibling):e.appendChild(document.createElement("col")).style.width=d}}for(;l;){const t=l.nextSibling;l.parentNode.removeChild(l),l=t}}class ps{constructor(t,e,n,r){const{width:i}=r;this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.classList.add("cdtr-table-element"),this.table.style.margin="auto",this.table.style.width=i,this.colgroup=this.table.appendChild(document.createElement("colgroup")),ds(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type===this.node.type&&(this.node=t,ds(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"===t.type&&(t.target===this.table||this.colgroup.contains(t.target))}}let hs,us;if("undefined"!=typeof WeakMap){let t=new WeakMap;hs=e=>t.get(e),us=(e,n)=>(t.set(e,n),n)}else{let t=[],e=10,n=0;hs=e=>{for(let n=0;n<t.length;n+=2)if(t[n]==e)return t[n+1]},us=(r,i)=>(n==e&&(n=0),t[n++]=r,t[n++]=i)}class fs{constructor(t,e,n,r){this.left=t,this.top=e,this.right=n,this.bottom=r}}class ms{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){let n=this.map[e];if(n!=t)continue;let r=e%this.width,i=e/this.width|0,o=r+1,s=i+1;for(let t=1;o<this.width&&this.map[e+t]==n;t++)o++;for(let t=1;s<this.height&&this.map[e+this.width*t]==n;t++)s++;return new fs(r,i,o,s)}throw new RangeError("No cell with offset "+t+" found")}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError("No cell with offset "+t+" found")}nextCell(t,e,n){let{left:r,right:i,top:o,bottom:s}=this.findCell(t);return"horiz"==e?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(t,e){let{left:n,right:r,top:i,bottom:o}=this.findCell(t),{left:s,right:a,top:l,bottom:c}=this.findCell(e);return new fs(Math.min(n,s),Math.min(i,l),Math.max(r,a),Math.max(o,c))}cellsInRect(t){let e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){let o=r*this.width+i,s=this.map[o];n[s]||(n[s]=!0,i==t.left&&i&&this.map[o-1]==s||r==t.top&&r&&this.map[o-this.width]==s||e.push(s))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){let o=i+n.child(r).nodeSize;if(r==t){let n=e+t*this.width,r=(t+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(t){return hs(t)||us(t,function(t){if("table"!=t.type.spec.tableRole)throw new RangeError("Not a table node: "+t.type.name);let e=function(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){let i=t.child(r),o=0;if(n)for(let e=0;e<r;e++){let n=t.child(e);for(let t=0;t<n.childCount;t++){let i=n.child(t);e+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let t=0;t<i.childCount;t++){let e=i.child(t);o+=e.attrs.colspan,e.attrs.rowspan>1&&(n=!0)}-1==e?e=o:e!=o&&(e=Math.max(e,o))}return e}(t),n=t.childCount,r=[],i=0,o=null,s=[];for(let t=0,i=e*n;t<i;t++)r[t]=0;for(let a=0,l=0;a<n;a++){let c=t.child(a);l++;for(let t=0;;t++){for(;i<r.length&&0!=r[i];)i++;if(t==c.childCount)break;let d=c.child(t),{colspan:p,rowspan:h,colwidth:u}=d.attrs;for(let t=0;t<h;t++){if(t+a>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:h-t});break}let c=i+t*e;for(let t=0;t<p;t++){0==r[c+t]?r[c+t]=l:(o||(o=[])).push({type:"collision",row:a,pos:l,n:p-t});let n=u&&u[t];if(n){let r=(c+t)%e*2,i=s[r];null==i||i!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):i==n&&s[r+1]++}}}i+=p,l+=d.nodeSize}let d=(a+1)*e,p=0;for(;i<d;)0==r[i++]&&p++;p&&(o||(o=[])).push({type:"missing",row:a,n:p}),l++}let a=new ms(e,n,r,o),l=!1;for(let t=0;!l&&t<s.length;t+=2)null!=s[t]&&s[t+1]<n&&(l=!0);l&&function(t,e,n){t.problems||(t.problems=[]);for(let r=0,i={};r<t.map.length;r++){let o=t.map[r];if(i[o])continue;i[o]=!0;let s=n.nodeAt(o),a=null;for(let n=0;n<s.attrs.colspan;n++){let i=e[2*((r+n)%t.width)];null==i||s.attrs.colwidth&&s.attrs.colwidth[n]==i||((a||(a=gs(s.attrs)))[n]=i)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}(a,s,t);return a}(t))}}function gs(t){if(t.colwidth)return t.colwidth.slice();let e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}new wt.H$("selectingCells");function bs(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function ys(t,e,n){let r={};for(let e in t)r[e]=t[e];return r[e]=n,r}const As=new wt.H$("tableColumnSimple");function ws(){let{handleWidth:t=5,cellMinWidth:e=25,width:n="100%",View:r=ps,lastColumnResizable:i=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new wt.Sy({key:As,state:{init(t,i){return this.spec.props.nodeViews[function(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(let n in t.nodes){let r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}(i.schema).table.name]=(t,i)=>new r(t,e,i,{width:n}),new vs(-1,!1)},apply:(t,e)=>e.apply(t)},props:{attributes:t=>As.getState(t).activeHandle>-1?{class:"resize-cursor"}:null,handleDOMEvents:{mousemove(e,n){!function(t,e,n,r,i){let o=As.getState(t.state);if(!o.dragging){let r=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target),s=-1;if(r){let{left:i,right:o}=r.getBoundingClientRect();e.clientX-i<=n?s=xs(t,e,"left"):o-e.clientX<=n&&(s=xs(t,e,"right"))}if(s!=o.activeHandle){if(!i&&-1!==s){let e=t.state.doc.resolve(s),n=e.node(-1),r=ms.get(n),i=e.start(-1);if(r.colCount(e.pos-i)+e.nodeAfter.attrs.colspan-1==r.width-1)return}ks(t,s)}}}(e,n,t,0,i)},mouseleave(t){!function(t){let e=As.getState(t.state);e.activeHandle>-1&&!e.dragging&&ks(t,-1)}(t)},mousedown(t,n){!function(t,e,n){let r=As.getState(t.state);if(-1==r.activeHandle||r.dragging)return!1;let i=t.state.doc.nodeAt(r.activeHandle),o=function(t,e,n){let{colspan:r,colwidth:i}=n,o=i&&i[i.length-1];if(o)return o;let s=t.domAtPos(e),a=s.node.childNodes[s.offset].offsetWidth,l=r;if(i)for(let t=0;t<r;t++)i[t]&&(a-=i[t],l--);return a/l}(t,r.activeHandle,i.attrs);function s(e){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);let r=As.getState(t.state);r.dragging&&(!function(t,e,n){let r=t.state.doc.resolve(e),i=r.node(-1),o=ms.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let t=0;t<o.height;t++){let e=t*o.width+a;if(t&&o.map[e]==o.map[e-o.width])continue;let r=o.map[e],{attrs:c}=i.nodeAt(r),d=1==c.colspan?0:a-o.colCount(r);if(c.colwidth&&c.colwidth[d]==n)continue;let p=c.colwidth?c.colwidth.slice():Cs(c.colspan);p[d]=n,l.setNodeMarkup(s+r,null,ys(c,"colwidth",p))}l.docChanged&&t.dispatch(l)}(t,r.activeHandle,_s(r.dragging,e,n)),t.dispatch(t.state.tr.setMeta(As,{setDragging:null})))}function a(e){if(!e.which)return s(e);let r=As.getState(t.state),i=_s(r.dragging,e,n);!function(t,e,n,r){let i=t.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),a=ms.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=t.domAtPos(i.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;ds(o,l.firstChild,0,r,a,n)}(t,r.activeHandle,i,n)}t.dispatch(t.state.tr.setMeta(As,{setDragging:{startX:e.clientX,startWidth:o}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),e.preventDefault()}(t,n,e)}},decorations(t){let e=As.getState(t);if(e.activeHandle>-1)return function(t,e){let n=[],r=t.doc.resolve(e),i=r.node(-1),o=ms.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let t=0;t<o.height;t++){let e=a+t*o.width-1;if(!(a!=o.width&&o.map[e]==o.map[e+1]||0!=t&&o.map[e-1]==o.map[e-1-o.width])){let t=o.map[e],r=s+t+i.nodeAt(t).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(_t.p.widget(r,a))}}return _t.EH.create(t.doc,n)}(t,e.activeHandle)},nodeViews:{}}});return o}class vs{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(t){let e=this,n=t.getMeta(As);if(n&&null!=n.setHandle)return new vs(n.setHandle,null);if(n&&void 0!==n.setDragging)return new vs(e.activeHandle,n.setDragging);if(e.activeHandle>-1&&t.docChanged){let n=t.mapping.map(e.activeHandle,-1);"row"==(r=t.doc.resolve(n)).parent.type.spec.tableRole&&r.nodeAfter||(n=null),e=new vs(n,e.dragging)}var r;return e}}function xs(t,e,n){let r=t.posAtCoords({left:e.clientX,top:e.clientY});if(!r)return-1;let{pos:i}=r,o=bs(t.state.doc.resolve(i));if(!o)return-1;if("right"==n)return o.pos;let s=ms.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function _s(t,e,n){let r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function ks(t,e){t.dispatch(t.state.tr.setMeta(As,{setHandle:e}))}function Cs(t){let e=[];for(let n=0;n<t;n++)e.push(0);return e}const Es=At.NB.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,color:"red",width:"100%",View:ps,ReiszeView:cs,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML(t){let{HTMLAttributes:e}=t;return["table",(0,At.P1)(this.options.HTMLAttributes,e),["tbody",0]]},addCommands:()=>({insertTable:function(){let{rows:t=3,cols:e=3,withHeaderRow:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r=>{let{tr:i,dispatch:o,editor:s}=r;const a=ss(s.schema,t,e,n);if(o){const t=i.selection.anchor+1;i.replaceSelectionWith(a).scrollIntoView().setSelection(wt.Bs.near(i.doc.resolve(t)))}return!0}},addColumnBefore:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t);e(Do(t.tr,n,n.left))}return!0}(e,n)},addColumnAfter:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t);e(Do(t.tr,n,n.right))}return!0}(e,n)},deleteColumn:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t),r=t.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let t=n.right-1;zo(r,n,t),t!=n.left;t--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=eo.get(n.table);e(r)}return!0}(e,n)},addRowBefore:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t);e(Ho(t.tr,n,n.top))}return!0}(e,n)},addRowAfter:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t);e(Ho(t.tr,n,n.bottom))}return!0}(e,n)},deleteRow:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){if(!so(t))return!1;if(e){let n=Po(t),r=t.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let t=n.bottom-1;jo(r,n,t),t!=n.top;t--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=eo.get(n.table);e(r)}return!0}(e,n)},deleteTable:()=>t=>{let{state:e,dispatch:n}=t;return function(t,e){let n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(e,n)},mergeCells:()=>t=>{let{state:e,dispatch:n}=t;return Zo(e,n)},splitCell:()=>t=>{let{state:e,dispatch:n}=t;return Fo(e,n)},toggleHeaderColumn:()=>t=>{let{state:e,dispatch:n}=t;return Yo("column")(e,n)},toggleHeaderRow:()=>t=>{let{state:e,dispatch:n}=t;return Yo("row")(e,n)},toggleHeaderCell:()=>t=>{let{state:e,dispatch:n}=t;return Wo(e,n)},mergeOrSplit:()=>t=>{let{state:e,dispatch:n}=t;return!!Zo(e,n)||Fo(e,n)},setCellAttribute:(t,e)=>n=>{let{state:r,dispatch:i}=n;return function(t,e){return function(n,r){if(!so(n))return!1;let i=ao(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){let o=n.tr;n.selection instanceof mo?n.selection.forEachCell(((n,r)=>{n.attrs[t]!==e&&o.setNodeMarkup(r,null,ho(n.attrs,t,e))})):o.setNodeMarkup(i.pos,null,ho(i.nodeAfter.attrs,t,e)),r(o)}return!0}}(t,e)(r,i)},goToNextCell:()=>t=>{let{state:e,dispatch:n}=t;return qo(1)(e,n)},goToPreviousCell:()=>t=>{let{state:e,dispatch:n}=t;return qo(-1)(e,n)},fixTables:()=>t=>{let{state:e,dispatch:n}=t;return n&&Ro(e),!0},setCellSelection:t=>e=>{let{tr:n,dispatch:r}=e;if(r){const e=mo.create(n.doc,t.anchorCell,t.headCell);n.setSelection(e)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:as,"Mod-Backspace":as,Delete:as,"Mod-Delete":as}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Jo({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.ReiszeView,lastColumnResizable:this.options.lastColumnResizable})]:[ws({View:this.options.View,width:this.options.width})],is({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:(0,At.nU)((0,At.Nl)(t,"tableRole",e))}}}),Ss=Es,Bs=At.NB.create({name:"button",draggable:!1,group:"inline",atom:!0,inline:!0,addOptions:()=>({id:null,background:"red",height:"auto",width:"auto",HTMLAttributes:{class:"inline-button"}}),addAttributes:()=>({width:{default:"auto",parseHTML:t=>t.width},height:{default:"auto",parseHTML:t=>t.height},background:{default:"#000",parseHTML:t=>t.getAttribute("background")}}),parseHTML:()=>[{tag:"button",priority:51}],renderHTML(t){let{HTMLAttributes:e}=t;return["button",(0,At.P1)(e),0]},addCommands(){return{toggleButton:()=>t=>{let{commands:e,editor:n}=t;return e.insertContent({type:this.name,attrs:this.options}),!0},setButtonStyles:t=>e=>{const{commands:n,editor:r}=e,i=(0,At.P1)({background:this.options.background,width:this.options.width,height:this.options.height},t);return i.style=`\n background: ${i.background};\n width: ${i.width};\n height: ${i.height};`,n.updateAttributes(this.name,i),!0}}},addNodeView:()=>()=>{const t=document.createElement("button");t.contentEditable=!1,t.classList.add("node-view");const e=document.createElement("div");return e.innerHTML="button",e.contentEditable=!0,e.classList.add("content"),t.append(e),{dom:t,contentDOM:e}}}),Os=At.NB.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:t}){return["tr",(0,At.P1)(this.options.HTMLAttributes,t),0]}});const Ms=At.NB.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({borderColor:{default:"#ced4da"},colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML(t){let{HTMLAttributes:e}=t;const n=`border-color:${e.borderColor}`;return e.style=n,["td",(0,At.P1)(this.options.HTMLAttributes,e),0]}}),$s=At.NB.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map((t=>parseInt(t,10))):null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:t}){return["th",(0,At.P1)(this.options.HTMLAttributes,t),0]}}),Is=At.hj.create({name:"backgroundColor",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>t.style.backgroundColor.replace(/['"]+/g,""),renderHTML:t=>t.backgroundColor?{style:`background: ${t.backgroundColor}`}:{}}}}]},addCommands:()=>({setBackgroundColor:t=>e=>{let{chain:n}=e;return n().setMark("textStyle",{backgroundColor:t}).run()},unsetBackgroundColor:()=>t=>{let{chain:e}=t;return e().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}})}),Ts=At.hj.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>t.style.textAlign||this.options.defaultAlignment,renderHTML:t=>({style:`text-align: ${t.textAlign}`})}}}]},addCommands(){return{setTextAlign:t=>e=>{let{commands:n}=e;return!!this.options.alignments.includes(t)&&this.options.types.every((e=>n.updateAttributes(e,{textAlign:t})))},unsetTextAlign:()=>t=>{let{commands:e}=t;return this.options.types.every((t=>e.resetAttributes(t,"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")}}});const Ls=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),Ns=["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"],Rs=["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"],Ps=["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"],Ds=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],zs=["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();var Hs="[0-9](_*[0-9])*",js=`\\.(${Hs})`,Us="[0-9a-fA-F](_*[0-9a-fA-F])*",Zs={className:"number",variants:[{begin:`(\\b(${Hs})((${js})|\\.)?|(${js}))[eE][+-]?(${Hs})[fFdD]?\\b`},{begin:`\\b(${Hs})((${js})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${js})[fFdD]?\\b`},{begin:`\\b(${Hs})[fFdD]\\b`},{begin:`\\b0[xX]((${Us})\\.?|(${Us})?\\.(${Us}))[pP][+-]?(${Hs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Us})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Fs(t,e,n){return-1===n?"":t.replace(e,(r=>Fs(t,e,n-1)))}const Vs="[A-Za-z$_][0-9A-Za-z$_]*",Ys=["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"],Ws=["true","false","null","undefined","NaN","Infinity"],qs=["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"],Xs=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Gs=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ks=["arguments","this","super","console","window","document","localStorage","module","global"],Js=[].concat(Gs,qs,Xs);var Qs="[0-9](_*[0-9])*",ta=`\\.(${Qs})`,ea="[0-9a-fA-F](_*[0-9a-fA-F])*",na={className:"number",variants:[{begin:`(\\b(${Qs})((${ta})|\\.)?|(${ta}))[eE][+-]?(${Qs})[fFdD]?\\b`},{begin:`\\b(${Qs})((${ta})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ta})[fFdD]?\\b`},{begin:`\\b(${Qs})[fFdD]\\b`},{begin:`\\b0[xX]((${ea})\\.?|(${ea})?\\.(${ea}))[pP][+-]?(${Qs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ea})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const ra=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),ia=["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"],oa=["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"],sa=["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"],aa=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],la=["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(),ca=sa.concat(aa);const da=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.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:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.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_-]*/}}),pa=["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"],ha=["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"],ua=["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"],fa=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],ma=["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 ga(t){return t?"string"==typeof t?t:t.source:null}function ba(t){return ya("(?=",t,")")}function ya(...t){return t.map((t=>ga(t))).join("")}function Aa(...t){const e=function(t){const e=t[t.length-1];return"object"==typeof e&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}(t);return"("+(e.capture?"":"?:")+t.map((t=>ga(t))).join("|")+")"}const wa=t=>ya(/\b/,t,/\w$/.test(t)?/\b/:/\B/),va=["Protocol","Type"].map(wa),xa=["init","self"].map(wa),_a=["Any","Self"],ka=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","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","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"],Ca=["false","nil","true"],Ea=["assignment","associativity","higherThan","left","lowerThan","none","right"],Sa=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],Ba=["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"],Oa=Aa(/[/=\-+!*%<>&|^~?]/,/[\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]/),Ma=Aa(Oa,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),$a=ya(Oa,Ma,"*"),Ia=Aa(/[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]/),Ta=Aa(Ia,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),La=ya(Ia,Ta,"*"),Na=ya(/[A-Z]/,Ta,"*"),Ra=["autoclosure",ya(/convention\(/,Aa("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ya(/objc\(/,La,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],Pa=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const Da="[A-Za-z$_][0-9A-Za-z$_]*",za=["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"],Ha=["true","false","null","undefined","NaN","Infinity"],ja=["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"],Ua=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Za=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Fa=["arguments","this","super","console","window","document","localStorage","module","global"],Va=[].concat(Za,ja,Ua);const Ya=n(2947);var Wa=n(149);const qa=Object.assign(Xa(Error),{eval:Xa(EvalError),range:Xa(RangeError),reference:Xa(ReferenceError),syntax:Xa(SyntaxError),type:Xa(TypeError),uri:Xa(URIError)});function Xa(t){return e.displayName=t.displayName||t.name,e;function e(e,...n){const r=e?Wa(e,...n):e;return new t(r)}}const Ga={}.hasOwnProperty,Ka="hljs-";function Ja(t,e,n={}){let r=n.prefix;if("string"!=typeof t)throw qa("Expected `string` for name, got `%s`",t);if(!Ya.getLanguage(t))throw qa("Unknown language: `%s` is not registered",t);if("string"!=typeof e)throw qa("Expected `string` for value, got `%s`",e);null==r&&(r=Ka),Ya.configure({__emitter:Qa,classPrefix:r});const i=Ya.highlight(e,{language:t,ignoreIllegals:!0});if(Ya.configure({}),i.errorRaised)throw i.errorRaised;return i._emitter.root.data.language=i.language,i._emitter.root.data.relevance=i.relevance,i._emitter.root}class Qa{constructor(t){this.options=t,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(t){if(""===t)return;const e=this.stack[this.stack.length-1],n=e.children[e.children.length-1];n&&"text"===n.type?n.value+=t:e.children.push({type:"text",value:t})}addKeyword(t,e){this.openNode(e),this.addText(t),this.closeNode()}addSublanguage(t,e){const n=this.stack[this.stack.length-1],r=t.root.children;e?n.children.push({type:"element",tagName:"span",properties:{className:[e]},children:r}):n.children.push(...r)}openNode(t){const e={type:"element",tagName:"span",properties:{className:t.split(".").map(((t,e)=>e?t+"_".repeat(e):this.options.classPrefix+t))},children:[]};this.stack[this.stack.length-1].children.push(e),this.stack.push(e)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const tl={highlight:Ja,highlightAuto:function(t,e={}){const n=e.subset||Ya.listLanguages();let r=e.prefix,i=-1,o={type:"root",data:{language:null,relevance:0},children:[]};if(null==r&&(r=Ka),"string"!=typeof t)throw qa("Expected `string` for value, got `%s`",t);for(;++i<n.length;){const r=n[i];if(!Ya.getLanguage(r))continue;const s=Ja(r,t,e);s.data.relevance>o.data.relevance&&(o=s)}return o},registerLanguage:function(t,e){Ya.registerLanguage(t,e)},registered:function(t){return Boolean(Ya.getLanguage(t))},listLanguages:function(){return Ya.listLanguages()},registerAlias:function(t,e){if("string"==typeof t)Ya.registerAliases(e,{languageName:t});else{let e;for(e in t)Ga.call(t,e)&&Ya.registerAliases(t[e],{languageName:e})}}};tl.registerLanguage("arduino",(function(t){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"]},n=function(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={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},c={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},t.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},p=e.optional(i)+t.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["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"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["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"]},u={className:"function.dispatch",relevance:0,keywords:{_hint:["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"]},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},f=[u,c,s,n,t.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:f.concat([{begin:/\(/,end:/\)/,keywords:h,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:p,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,u,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:h,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(t),r=n.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,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),tl.registerLanguage("bash",(function(t){const e=t.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:e.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);const a={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,n]},l=t.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","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","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"]},contains:[l,t.SHEBANG(),c,a,t.HASH_COMMENT_MODE,o,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),tl.registerLanguage("c",(function(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={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},c={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},t.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},p=e.optional(i)+t.IDENT_RE+"\\s*\\(",h={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"},u=[c,s,n,t.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:u.concat([{begin:/\(/,end:/\)/,keywords:h,contains:u.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:h,disableAutodetect:!0,illegal:"</",contains:[].concat(f,m,u,[c,{begin:t.IDENT_RE+"::",keywords:h},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:h}}})),tl.registerLanguage("cpp",(function(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={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},c={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},t.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},p=e.optional(i)+t.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["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"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["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"]},u={className:"function.dispatch",relevance:0,keywords:{_hint:["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"]},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},f=[u,c,s,n,t.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:f.concat([{begin:/\(/,end:/\)/,keywords:h,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:p,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,u,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:h,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),tl.registerLanguage("csharp",(function(t){const e={keyword:["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"].concat(["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"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={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},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=t.inherit(i,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:e},a=t.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},d=t.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,i,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,r,t.C_BLOCK_COMMENT_MODE],a.contains=[d,l,o,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,r,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const p={variants:[c,l,i,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},h={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},u=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:e,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},p,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,h,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,h,t.C_LINE_COMMENT_MODE,t.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:"("+u+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:e,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:e,relevance:0,contains:[p,r,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},f]}})),tl.registerLanguage("css",(function(t){const e=t.regex,n=Ls(t),r=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Ps.join("|")+")"},{begin:":(:)?("+Ds.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+zs.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...r,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...r,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:Rs.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...r,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ns.join("|")+")\\b"}]}})),tl.registerLanguage("diff",(function(t){const e=t.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:/$/}]}})),tl.registerLanguage("go",(function(t){const e={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:e,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:t.C_NUMBER_RE+"[i]",relevance:1},t.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,illegal:/["']/}]}]}})),tl.registerLanguage("graphql",(function(t){const e=t.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:e.concat(/[_A-Za-z][_0-9A-Za-z]*/,e.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}})),tl.registerLanguage("ini",(function(t){const e=t.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},r=t.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,o,i,s,n,"self"],relevance:0},l=e.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:e.concat(l,"(\\s*\\.\\s*",l,")*",e.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[r,a,o,i,s,n]}}]}})),tl.registerLanguage("java",(function(t){const e=t.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Fs("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),i={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"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:i,illegal:/<\/|#/,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[t.BACKSLASH_ESCAPE]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[e.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[s,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:i,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[o,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,Zs,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},Zs,o]}})),tl.registerLanguage("javascript",(function(t){const e=t.regex,n=Vs,r="<>",i="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(t,e)=>{const n=t[0].length+t.index,r=t.input[n];if("<"===r||","===r)return void e.ignoreMatch();let i;">"===r&&(((t,{after:e})=>{const n="</"+t[0].slice(1);return-1!==t.input.indexOf(n,e)})(t,{after:n})||e.ignoreMatch());const o=t.input.substring(n);((i=o.match(/^\s*=/))||(i=o.match(/^\s+extends\s+/))&&0===i.index)&&e.ignoreMatch()}},s={$pattern:Vs,keyword:Ys,literal:Ws,built_in:Js,"variable.language":Ks},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},u={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,p]},m={className:"comment",variants:[t.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:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},g=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,u,f,{match:/\$\d+/},d];p.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,p.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y},w={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},v={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:{_:[...qs,...Xs]}},x={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},_={match:e.concat(/\b/,function(t){return e.concat("(?!",t.join("|"),")")}([...Gs,"super","import"]),n,e.lookahead(/\(/)),className:"title.function",relevance:0},k={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},E="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",S={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(E)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:v},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,u,f,m,{match:/\$\d+/},d,v,{className:"attr",begin:n+e.lookahead(":"),relevance:0},S,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,t.REGEXP_MODE,{className:"function",begin:E,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:i},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},x,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,t.inherit(t.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,C,{match:/\$[(.]/}]}})),tl.registerLanguage("json",(function(t){const e=["true","false","null"],n={scope:"literal",beginKeywords:e.join(" ")};return{name:"JSON",keywords:{literal:e},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},t.QUOTE_STRING_MODE,n,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),tl.registerLanguage("kotlin",(function(t){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"},n={className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[t.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+t.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,r]},{begin:"'",end:"'",illegal:/\n/,contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[t.BACKSLASH_ESCAPE,i,r]}]};r.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+t.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+t.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[t.inherit(o,{className:"string"}),"self"]}]},l=na,c=t.COMMENT("/\\*","\\*/",{contains:[t.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:t.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},p=d;return p.variants[1].contains=[d],d.variants[1].contains=[p],{name:"Kotlin",aliases:["kt","kts"],keywords:e,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),t.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:e,relevance:5,contains:[{begin:t.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[t.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,t.C_LINE_COMMENT_MODE,c],relevance:0},t.C_LINE_COMMENT_MODE,c,s,a,o,t.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,t.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},t.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),tl.registerLanguage("less",(function(t){const e=ra(t),n=ca,r="[\\w-]+",i="("+r+"|@\\{"+r+"\\})",o=[],s=[],a=function(t){return{className:"string",begin:"~?"+t+".*?"+t}},l=function(t,e,n){return{className:t,begin:e,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:oa.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,a("'"),a('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},e.HEXCOLOR,d,l("variable","@@?"+r,10),l("variable","@\\{"+r+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},e.IMPORTANT,{beginKeywords:"and not"},e.FUNCTION_DISPATCH);const p=s.concat({begin:/\{/,end:/\}/,contains:o}),h={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},u={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+la.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:p}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,h,l("keyword","all\\b"),l("variable","@\\{"+r+"\\}"),{begin:"\\b("+ia.join("|")+")\\b",className:"selector-tag"},e.CSS_NUMBER_MODE,l("selector-tag",i,0),l("selector-id","#"+i),l("selector-class","\\."+i,0),l("selector-tag","&",0),e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+sa.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+aa.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:p},{begin:"!important"},e.FUNCTION_DISPATCH]},b={begin:r+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,f,m,b,u,g,h,e.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),tl.registerLanguage("lua",(function(t){const e="\\[=*\\[",n="\\]=*\\]",r={begin:e,end:n,contains:["self"]},i=[t.COMMENT("--(?!"+e+")","$"),t.COMMENT("--"+e,n,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:t.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:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:e,end:n,contains:[r],relevance:5}])}})),tl.registerLanguage("makefile",(function(t){const e={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,e]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[e]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[e]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,e,n,r,i,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}})),tl.registerLanguage("markdown",(function(t){const e={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),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}]},r={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},i={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},o=t.inherit(r,{contains:[]}),s=t.inherit(i,{contains:[]});r.contains.push(s),i.contains.push(o);let a=[e,n];return[r,i,o,s].forEach((t=>{t.contains=t.contains.concat(a)})),a=a.concat(r,i),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},e,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},r,i,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{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}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),tl.registerLanguage("objectivec",(function(t){const e=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:e,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:e,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"]},illegal:"</",contains:[{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.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}})),tl.registerLanguage("perl",(function(t){const e=t.regex,n=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:["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"].join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},o={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:e.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[t.BACKSLASH_ESCAPE,i,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(t,r,i="\\1")=>{const o="\\1"===i?i:e.concat(i,r);return e.concat(e.concat("(?:",t,")"),r,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,i,n)},d=(t,r,i)=>e.concat(e.concat("(?:",t,")"),r,/(?:\\.|[^\\\/])*?/,i,n),p=[s,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:a,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:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.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:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",e.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",e.either(...l,{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:[t.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:p}})),tl.registerLanguage("php",(function(t){const e=t.regex,n=/(?![A-Za-z0-9])(?![$])/,r=e.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=e.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+r},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=t.inherit(t.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(s)}),a,t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(s)})]},d={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},p=["false","null","true"],h=["__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"],u=["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"],f={keyword:h,literal:(t=>{const e=[];return t.forEach((t=>{e.push(t),t.toLowerCase()===t?e.push(t.toUpperCase()):e.push(t.toLowerCase())})),e})(p),built_in:u},m=t=>t.map((t=>t.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,e.concat(l,"+"),e.concat("(?!",m(u).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},b=e.concat(r,"\\b(?!\\()"),y={variants:[{match:[e.concat(/::/,e.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,e.concat(/::/,e.lookahead(/(?!class\b)/)),b],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"}}]},A={scope:"attr",match:e.concat(r,e.lookahead(":"),e.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:f,contains:[A,o,y,t.C_BLOCK_COMMENT_MODE,c,d,g]},v={relevance:0,match:[/\b/,e.concat("(?!fn\\b|function\\b|",m(h).join("\\b|"),"|",m(u).join("\\b|"),"\\b)"),r,e.concat(l,"*"),e.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(v);const x=[A,y,t.C_BLOCK_COMMENT_MODE,c,d,g];return{case_insensitive:!1,keywords:f,contains:[{begin:e.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:p,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:p,keyword:["new","array"]},contains:["self",...x]},...x,{scope:"meta",match:i}]},t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,v,y,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",o,y,t.C_BLOCK_COMMENT_MODE,c,d]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},c,d]}})),tl.registerLanguage("php-template",(function(t){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},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),tl.registerLanguage("plaintext",(function(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),tl.registerLanguage("python",(function(t){const e=t.regex,n=/[\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"],i={$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"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:i,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,o,a,s]},{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:[t.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,a,s]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,p=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${p})`},{begin:`(${d})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${c})[jJ](?=${p})`}]},u={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",o,h,l,t.HASH_COMMENT_MODE]}]};return s.contains=[l,h,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:i,illegal:/(<\/|->|\?)|=>/,contains:[o,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,u,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,f,l]}]}})),tl.registerLanguage("python-repl",(function(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),tl.registerLanguage("r",(function(t){const e=t.regex,n=/(?:(?:[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=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=e.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,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:[t.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:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.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:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),tl.registerLanguage("ruby",(function(t){const e=t.regex,n="([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"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[s]}),t.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[t.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{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:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,c]})]}]},p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${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"}]},u={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},f=[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+/,n],scope:{1:"keyword",3:"title.function"},contains:[u]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,c],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(a,l),relevance:0}].concat(a,l);c.contains=f,u.contains=f;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:o,contains:f}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(f)}})),tl.registerLanguage("rust",(function(t){const e=t.regex,n={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let\b)/,t.IDENT_RE,e.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["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!","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!"],o=["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:t.IDENT_RE+"!?",type:o,keyword:["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"],literal:["true","false","Some","None","Ok","Err"],built_in:i},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{begin:"\\b0x([A-Fa-f0-9_]+)"+r},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{begin:[/fn/,/\s+/,t.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,t.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,t.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,t.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,t.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:i,type:o}},{className:"punctuation",begin:"->"},n]}})),tl.registerLanguage("scss",(function(t){const e=da(t),n=fa,r=ua,i="@[a-z-]+",o={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[t.C_LINE_COMMENT_MODE,t.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("+pa.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[e.CSS_NUMBER_MODE]},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ma.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,o,e.HEXCOLOR,e.CSS_NUMBER_MODE,t.QUOTE_STRING_MODE,t.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:"and or not only",attribute:ha.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,e.HEXCOLOR,e.CSS_NUMBER_MODE]},e.FUNCTION_DISPATCH]}})),tl.registerLanguage("shell",(function(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),tl.registerLanguage("sql",(function(t){const e=t.regex,n=t.COMMENT("--","$"),r=["true","false","unknown"],i=["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"],o=["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"],s=["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"],a=o,l=["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","add","asc","collation","desc","final","first","last","view"].filter((t=>!o.includes(t))),c={begin:e.concat(/\b/,e.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(t,{exceptions:e,when:n}={}){const r=n;return e=e||[],t.map((t=>t.match(/\|\d+$/)||e.includes(t)?t:r(t)?`${t}|0`:t))}(l,{when:t=>t.length<3}),literal:r,type:i,built_in:["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"]},contains:[{begin:e.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:r,type:i}},{className:"type",begin:e.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),tl.registerLanguage("swift",(function(t){const e={match:/\s+/,relevance:0},n=t.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[t.C_LINE_COMMENT_MODE,n],i={match:[/\./,Aa(...va,...xa)],className:{2:"keyword"}},o={match:ya(/\./,Aa(...ka)),relevance:0},s=ka.filter((t=>"string"==typeof t)).concat(["_|0"]),a={variants:[{className:"keyword",match:Aa(...ka.filter((t=>"string"!=typeof t)).concat(_a).map(wa),...xa)}]},l={$pattern:Aa(/\b\w+/,/#\w+/),keyword:s.concat(Sa),literal:Ca},c=[i,o,a],d=[{match:ya(/\./,Aa(...Ba)),relevance:0},{className:"built_in",match:ya(/\b/,Aa(...Ba),/(?=\()/)}],p={match:/->/,relevance:0},h=[p,{className:"operator",relevance:0,variants:[{match:$a},{match:`\\.(\\.|${Ma})+`}]}],u="([0-9]_*)+",f="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${u})(\\.(${u}))?([eE][+-]?(${u}))?\\b`},{match:`\\b0x(${f})(\\.(${f}))?([pP][+-]?(${u}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(t="")=>({className:"subst",variants:[{match:ya(/\\/,t,/[0\\tnr"']/)},{match:ya(/\\/,t,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(t="")=>({className:"subst",match:ya(/\\/,t,/[\t ]*(?:[\r\n]|\r\n)/)}),y=(t="")=>({className:"subst",label:"interpol",begin:ya(/\\/,t,/\(/),end:/\)/}),A=(t="")=>({begin:ya(t,/"""/),end:ya(/"""/,t),contains:[g(t),b(t),y(t)]}),w=(t="")=>({begin:ya(t,/"/),end:ya(/"/,t),contains:[g(t),y(t)]}),v={className:"string",variants:[A(),A("#"),A("##"),A("###"),w(),w("#"),w("##"),w("###")]},x={match:ya(/`/,La,/`/)},_=[x,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${Ta}+`}],k=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Pa,contains:[...h,m,v]}]}},{className:"keyword",match:ya(/@/,Aa(...Ra))},{className:"meta",match:ya(/@/,La)}],C={match:ba(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ya(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ta,"+")},{className:"type",match:Na,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ya(/\s+&\s+/,ba(Na)),relevance:0}]},E={begin:/</,end:/>/,keywords:l,contains:[...r,...c,...k,p,C]};C.contains.push(E);const S={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:ya(La,/\s*:/),keywords:"_|0",relevance:0},...r,...c,...d,...h,m,v,..._,...k,C]},B={begin:/</,end:/>/,contains:[...r,C]},O={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:Aa(ba(ya(La,/\s*:/)),ba(ya(La,/\s+/,La,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:La}]},...r,...c,...h,m,v,...k,C,S],endsParent:!0,illegal:/["']/},M={match:[/func/,/\s+/,Aa(x.match,La,$a)],className:{1:"keyword",3:"title.function"},contains:[B,O,e],illegal:[/\[/,/%/]},$={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[B,O,e],illegal:/\[|%/},I={match:[/operator/,/\s+/,$a],className:{1:"keyword",3:"title"}},T={begin:[/precedencegroup/,/\s+/,Na],className:{1:"keyword",3:"title"},contains:[C],keywords:[...Ea,...Ca],end:/}/};for(const t of v.variants){const e=t.contains.find((t=>"interpol"===t.label));e.keywords=l;const n=[...c,...d,...h,m,v,..._];e.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...r,M,$,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[t.inherit(t.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},I,T,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...c,...d,...h,m,v,..._,...k,C,S]}})),tl.registerLanguage("typescript",(function(t){const e=function(t){const e=t.regex,n=Da,r="<>",i="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(t,e)=>{const n=t[0].length+t.index,r=t.input[n];if("<"===r||","===r)return void e.ignoreMatch();let i;">"===r&&(((t,{after:e})=>{const n="</"+t[0].slice(1);return-1!==t.input.indexOf(n,e)})(t,{after:n})||e.ignoreMatch());const o=t.input.substring(n);((i=o.match(/^\s*=/))||(i=o.match(/^\s+extends\s+/))&&0===i.index)&&e.ignoreMatch()}},s={$pattern:Da,keyword:za,literal:Ha,built_in:Va,"variable.language":Fa},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},u={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,p]},m={className:"comment",variants:[t.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:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},g=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,u,f,{match:/\$\d+/},d];p.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,p.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y},w={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},v={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:{_:[...ja,...Ua]}},x={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},_={match:e.concat(/\b/,function(t){return e.concat("(?!",t.join("|"),")")}([...Za,"super","import"]),n,e.lookahead(/\(/)),className:"title.function",relevance:0},k={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},E="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",S={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(E)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:v},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,u,f,m,{match:/\$\d+/},d,v,{className:"attr",begin:n+e.lookahead(":"),relevance:0},S,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,t.REGEXP_MODE,{className:"function",begin:E,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:i},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},x,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,t.inherit(t.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,C,{match:/\$[(.]/}]}}(t),n=Da,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[e.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[e.exports.CLASS_REFERENCE]},s={$pattern:Da,keyword:za.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:Ha,built_in:Va.concat(r),"variable.language":Fa},a={className:"meta",begin:"@"+n},l=(t,e,n)=>{const r=t.contains.findIndex((t=>t.label===e));if(-1===r)throw new Error("can not find mode to replace");t.contains.splice(r,1,n)};return Object.assign(e.keywords,s),e.exports.PARAMS_CONTAINS.push(a),e.contains=e.contains.concat([a,i,o]),l(e,"shebang",t.SHEBANG()),l(e,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),e.contains.find((t=>"func.def"===t.label)).relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx"]}),e})),tl.registerLanguage("vbnet",(function(t){const e=t.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,r=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:e.concat(/# */,e.either(r,n),/ *#/)},{begin:e.concat(/# */,o,/ *#/)},{begin:e.concat(/# */,i,/ *#/)},{begin:e.concat(/# */,e.either(r,n),/ +/,e.either(i,o),/ *#/)}]},a=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=t.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:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{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])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{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:[l]}]}})),tl.registerLanguage("wasm",(function(t){t.regex;const e=t.COMMENT(/\(;/,/;\)/);return e.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["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"]},contains:[t.COMMENT(/;;/,/$/),e,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},t.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{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/},{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/}]}})),tl.registerLanguage("xml",(function(t){const e=t.regex,n=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=t.inherit(i,{begin:/\(/,end:/\)/}),s=t.inherit(t.APOS_STRING_MODE,{className:"string"}),a=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,a,s]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(n,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),tl.registerLanguage("yaml",(function(t){const e="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=t.inherit(r,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{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+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},o,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},a,l,r],d=[...c];return d.pop(),d.push(i),s.contains=d,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));const el=/(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,nl=At.NB.create({name:"image",addOptions:()=>({id:null,inline:!0,allowBase64:!1,width:"200px",height:"200px",HTMLAttributes:{},"data-target":"_blank","data-href":""}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{id:{default:`inline-image-${(0,F.Z)()}`},src:{default:null},alt:{default:null},title:{default:null},width:{default:this.options.width||"500px"},height:{default:this.options.height||"500px"},"data-href":{default:this.options["data-href"]},"data-target":{default:this.options["data-target"]}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML(t){let{HTMLAttributes:e}=t;return["img",(0,At.P1)(this.options.HTMLAttributes,e)]},addNodeView(){return t=>{let{node:e,editor:n,getPos:r}=t;const i=document.createElement("img"),o=(0,At.P1)(this.options.HTMLAttributes,e.attrs);return Object.entries(o).forEach((t=>{let[e,n]=t;null!=n&&("style"===e&&"object"==typeof n?Object.assign(i.style,n):"style"===e&&"string"==typeof n?i.setAttribute("style",n):i.setAttribute(e,n))})),i.addEventListener("dblclick",(t=>{t.preventDefault(),t.stopPropagation();let e=null;"function"==typeof r&&(e=r());const i=document.createElement("cdtr-gallery");i.opened=!0,i.multi=!0,document.body.append(i),i.addEventListener("file",(t=>{let r=t.detail;if(Array.isArray(r)&&(r=r[0]),null!==e)try{const{view:t}=n,{state:i}=t;if(e<0||e>=i.doc.content.size)return void console.warn("Image position is out of bounds");try{const o=wt.qv.create(i.doc,e),s=i.tr.setSelection(o);t.dispatch(s),n.commands.updateImage({src:r.src})}catch(n){const o=i.doc.resolve(e),s=o.nodeAfter||o.nodeBefore;if(s&&"image"===s.type.name){const n={...s.attrs,src:r.src},o=s.type.create(n),a=e,l=e+s.nodeSize,c=i.tr.replaceWith(a,l,o);t.dispatch(c)}else console.warn("Could not find image node at position:",e)}}catch(t){console.warn("Failed to update image:",t)}i.opened=!1,setTimeout((()=>{i.remove()}),1500)})),i.addEventListener("close",(()=>{i.remove()}))})),{dom:i}}},addCommands(){return{setImage:t=>e=>{let{commands:n}=e;return n.insertContent({type:this.name,attrs:t}),!0},updateImage:t=>e=>{let{dispatch:n,commands:r,editor:i,view:o,tr:s}=e;const{state:a}=o,l=wt.qv.create(a.doc,o.state.selection.from),c={...l.node.attrs,...t},d=this.type.create(c);if(n){const t=(s||a.tr).replaceRangeWith(l.from,l.to,d);o.dispatch(t)}return!0}}},addInputRules(){return[(0,At.x2)({find:el,type:this.type,getAttributes:t=>{const[,,e,n,r,i,o,s]=t;return{src:n,alt:e,title:r,width:i,height:o,id:s}}})]}}),rl=At.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML(t){let{HTMLAttributes:e}=t;return["li",(0,At.P1)(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),il=At.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML(t){let{HTMLAttributes:e}=t;return["span",(0,At.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>t=>{let{state:e,commands:n}=t;const r=(0,At.Jo)(e,this.type);return!!Object.entries(r).some((t=>{let[,e]=t;return!!e}))||n.unsetMark(this.name)}}}}),ol=/^\s*([-+*])\s$/,sl=At.NB.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1,color:"#000"}),addAttributes:()=>({color:{default:"#000"}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:t=>[{tag:"ul"}],renderHTML(t){let{node:e,HTMLAttributes:n}=t;return["ul",(0,At.P1)(this.options.HTMLAttributes,n,{style:`color:${e.attrs.color}`}),0]},addCommands(){return{changeBulletListColor:t=>{let{color:e}=t;return t=>{let{commands:n,chain:r}=t;return r().updateAttributes(this.name,{color:e}).run()}},toggleBulletList:()=>t=>{let{commands:e,chain:n}=t;return this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(rl.name,this.editor.getAttributes(il.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=(0,At.S0)({find:ol,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,At.S0)({find:ol,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(il.name),editor:this.editor})),[t]}}),al=/^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{11})(?:\S+)?$/,ll=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)(\/(?:shorts\/|watch\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/g,cl=/^https?:\/\/(?:www\.)?(?:vimeo\.com|player\.vimeo\.com\/video)\/(\d+)(?:\/[\w-]*)?(?:\?.*)?$/i,dl=/^https?:\/\/(?:www\.)?.+\.mp3(?:\?.*)?$/i,pl=t=>!!t&&!!t.match(al),hl=t=>!!t&&!!t.match(cl),ul=t=>!!t&&!!t.match(dl),fl=t=>t?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",ml=t=>{let{url:e}=t;return pl(e)?(t=>{const{url:e,allowFullscreen:n,autoplay:r,ccLanguage:i,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:d,ivLoadPolicy:p,loop:h,modestBranding:u,nocookie:f,origin:m,playlist:g,progressBarColor:b,startAt:y}=t;if(!pl(e))return null;if(e.includes("/embed/"))return e;if(e.includes("youtu.be")){const t=e.split("/").pop();return t?`${fl(f)}${t}`:null}const A=/(?:v=|shorts\/)([-\w]+)/gm.exec(e);if(!A||!A[1])return null;let w=`${fl(f)}${A[1]}`;const v=[];return!1===n&&v.push("fs=0"),r&&v.push("autoplay=1"),i&&v.push(`cc_lang_pref=${i}`),o&&v.push("cc_load_policy=1"),s||v.push("controls=0"),a&&v.push("disablekb=1"),l&&v.push("enablejsapi=1"),c&&v.push(`end=${c}`),d&&v.push(`hl=${d}`),p&&v.push(`iv_load_policy=${p}`),h&&v.push("loop=1"),u&&v.push("modestbranding=1"),m&&v.push(`origin=${m}`),g&&v.push(`playlist=${g}`),y&&v.push(`start=${y}`),b&&v.push(`color=${b}`),v.length&&(w+=`?${v.join("&")}`),w})(t):hl(e)?(t=>{const{url:e}=t;if(!hl(e))return null;const n=(t=>{const e=t.match(cl);return e&&e.find((t=>/^\d+$/.test(t)))||null})(e);if(!n)return null;let r=`https://player.vimeo.com/video/${n}`;const i=[];return t.autoplay&&i.push("autoplay=1"),i.length&&(r+=`?${i.join("&")}`),r})(t):ul(e)?(t=>{const{url:e}=t;return ul(e)?e:null})(t):null},gl=At.NB.create({name:"video",addOptions:()=>({addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML:()=>[{tag:"div[data-video-cdtr] iframe"}],addCommands(){return{setVideo:t=>e=>{let{commands:n}=e;return hl(t.src)||pl(t.src)||ul(t.src)?(t.src=ml({url:t.src}),n.insertContent({type:this.name,attrs:t})):(console.error("Invalid video URL"),!1)}}},addPasteRules(){return this.options.addPasteHandler?[(0,At.Ss)({find:ll,type:this.type,getAttributes:t=>({src:t.input})})]:[]},renderHTML(t){let{HTMLAttributes:e}=t;const n=ml({url:e.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:e.start||0});return e.src=n,["div",{"data-video-cdtr":""},["iframe",(0,At.P1)(this.options.HTMLAttributes,{style:"max-width: 100%;",width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor},e)]]}}),bl={addAttributes(){return{...this.parent?.(),style:{parseHTML:t=>{const e=t.getAttribute("width");return e?`width: ${e}px; height: auto; cursor: pointer;max-width: 100%;`:`${t.style.cssText}`}}}},addNodeView(){const t=document.createElement("div");return e=>{let{node:n,editor:r,getPos:i}=e;const{view:o,options:{editable:s}}=r,a=document.createElement("iframe");a.src="about:blank",a.style.border="none",a.width="100%",a.height="30px";const l=document.createElement("input");l.style.height="30px",l.style.width="100%",l.value=n.attrs.src,a.addEventListener("load",(()=>{a.contentDocument.body.style.margin="0",a.contentDocument.body.style.padding="0",a.contentDocument.body.style.overflow="hidden",a.contentDocument.body.appendChild(l)})),l.addEventListener("input",(t=>{t.preventDefault(),t.stopPropagation();const e=l.value;setTimeout((()=>{r.chain().setVideo({src:e,width:n.attrs.width||this.options.width,height:n.attrs.height||this.options.height}).run()}),200)})),t.appendChild(a);const c=document.createElement("div");c.setAttribute("data-video-cdtr","");const d=document.createElement("div");d.classList.add("cdtr-video-container");const p=document.createElement("iframe");d.style.width="100%",p.style.maxWidth="100%",p.setAttribute("src",n.attrs.src),p.setAttribute("width",n.attrs.width),p.setAttribute("height",n.attrs.height),p.setAttribute("frameborder","0"),p.setAttribute("allowfullscreen","true"),p.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture");const h=()=>{t.classList.add("cdtr-position-controller"),(()=>{const t={...n.attrs,style:`${p.style.cssText}`};o.dispatch(o.state.tr.setNodeMarkup(i(),null,t))})(),d.appendChild(t)};return c.setAttribute("style","display: flex;"),c.appendChild(d),d.classList.add("video-container"),d.appendChild(p),s?(d.addEventListener("click",(t=>{h(),d.setAttribute("style","position: relative; border: 1px dashed #6C6C6C; cursor: pointer;")})),document.addEventListener("click",(e=>{const n=e.target;d.contains(n)||d===n||t.remove()})),{dom:c}):{dom:d}}}},yl=gl.extend(bl);function Al(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var wl={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function vl(t){wl=t}var xl={exec:()=>null};function _l(t,e=""){let n="string"==typeof t?t:t.source;const r={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(kl.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var kl={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Cl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,El=/(?:[*+-]|\d{1,9}[.)])/,Sl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bl=_l(Sl).replace(/bull/g,El).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ol=_l(Sl).replace(/bull/g,El).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ml=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$l=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Il=_l(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$l).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tl=_l(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,El).getRegex(),Ll="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Nl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Rl=_l("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Nl).replace("tag",Ll).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pl=_l(Ml).replace("hr",Cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ll).getRegex(),Dl={blockquote:_l(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pl).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Il,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Cl,html:Rl,lheading:Bl,list:Tl,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Pl,table:xl,text:/^[^\n]+/},zl=_l("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ll).getRegex(),Hl={...Dl,lheading:Ol,table:zl,paragraph:_l(Ml).replace("hr",Cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ll).getRegex()},jl={...Dl,html:_l("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Nl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_l(Ml).replace("hr",Cl).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Bl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ul=/^( {2,}|\\)\n(?!\s*$)/,Zl=/[\p{P}\p{S}]/u,Fl=/[\s\p{P}\p{S}]/u,Vl=/[^\s\p{P}\p{S}]/u,Yl=_l(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fl).getRegex(),Wl=/(?!~)[\p{P}\p{S}]/u,ql=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Xl=_l(ql,"u").replace(/punct/g,Zl).getRegex(),Gl=_l(ql,"u").replace(/punct/g,Wl).getRegex(),Kl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Jl=_l(Kl,"gu").replace(/notPunctSpace/g,Vl).replace(/punctSpace/g,Fl).replace(/punct/g,Zl).getRegex(),Ql=_l(Kl,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Wl).getRegex(),tc=_l("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Vl).replace(/punctSpace/g,Fl).replace(/punct/g,Zl).getRegex(),ec=_l(/\\(punct)/,"gu").replace(/punct/g,Zl).getRegex(),nc=_l(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),rc=_l(Nl).replace("(?:--\x3e|$)","--\x3e").getRegex(),ic=_l("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",rc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),oc=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,sc=_l(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",oc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ac=_l(/^!?\[(label)\]\[(ref)\]/).replace("label",oc).replace("ref",$l).getRegex(),lc=_l(/^!?\[(ref)\](?:\[\])?/).replace("ref",$l).getRegex(),cc={_backpedal:xl,anyPunctuation:ec,autolink:nc,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:Ul,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:xl,emStrongLDelim:Xl,emStrongRDelimAst:Jl,emStrongRDelimUnd:tc,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:sc,nolink:lc,punctuation:Yl,reflink:ac,reflinkSearch:_l("reflink|nolink(?!\\()","g").replace("reflink",ac).replace("nolink",lc).getRegex(),tag:ic,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:xl},dc={...cc,link:_l(/^!?\[(label)\]\((.*?)\)/).replace("label",oc).getRegex(),reflink:_l(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oc).getRegex()},pc={...cc,emStrongRDelimAst:Ql,emStrongLDelim:Gl,url:_l(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},hc={...pc,br:_l(Ul).replace("{2,}","*").getRegex(),text:_l(pc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},uc={normal:Dl,gfm:Hl,pedantic:jl},fc={normal:cc,gfm:pc,breaks:hc,pedantic:dc},mc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gc=t=>mc[t];function bc(t,e){if(e){if(kl.escapeTest.test(t))return t.replace(kl.escapeReplace,gc)}else if(kl.escapeTestNoEncode.test(t))return t.replace(kl.escapeReplaceNoEncode,gc);return t}function yc(t){try{t=encodeURI(t).replace(kl.percentDecode,"%")}catch{return null}return t}function Ac(t,e){const n=t.replace(kl.findPipe,((t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(kl.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(kl.slashPipe,"|");return n}function wc(t,e,n){const r=t.length;if(0===r)return"";let i=0;for(;i<r;){const o=t.charAt(r-i-1);if(o!==e||n){if(o===e||!n)break;i++}else i++}return t.slice(0,r-i)}function vc(t,e,n,r,i){const o=e.href,s=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}var xc=class{options;rules;lexer;constructor(t){this.options=t||wl}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:wc(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(n.other.beginningSpace);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=wc(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:wc(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=wc(e[0],"\n").split("\n"),n="",r="";const i=[];for(;t.length>0;){let e=!1;const o=[];let s;for(s=0;s<t.length;s++)if(this.rules.other.blockquoteStart.test(t[s]))o.push(t[s]),e=!0;else{if(e)break;o.push(t[s])}t=t.slice(s);const a=o.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;const d=i.at(-1);if("code"===d?.type)break;if("blockquote"===d?.type){const e=d,o=e.raw+"\n"+t.join("\n"),s=this.blockquote(o);i[i.length-1]=s,n=n.substring(0,n.length-e.raw.length)+s.raw,r=r.substring(0,r.length-e.text.length)+s.text;break}if("list"!==d?.type);else{const e=d,o=e.raw+"\n"+t.join("\n"),s=this.list(o);i[i.length-1]=s,n=n.substring(0,n.length-d.raw.length)+s.raw,r=r.substring(0,r.length-e.raw.length)+s.raw,t=o.substring(i.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let s=!1;for(;t;){let n=!1,r="",a="";if(!(e=o.exec(t)))break;if(this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],d=!l.trim(),p=0;if(this.options.pedantic?(p=2,a=l.trimStart()):d?p=e[1].length+1:(p=e[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,a=l.slice(p),p+=e[1].length),d&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){const e=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),o=this.rules.other.headingBeginRegex(p),s=this.rules.other.htmlBeginRegex(p);for(;t;){const h=t.split("\n",1)[0];let u;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),u=c):u=c.replace(this.rules.other.tabCharGlobal," "),i.test(c))break;if(o.test(c))break;if(s.test(c))break;if(e.test(c))break;if(n.test(c))break;if(u.search(this.rules.other.nonSpaceChar)>=p||!c.trim())a+="\n"+u.slice(p);else{if(d)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(i.test(l))break;if(o.test(l))break;if(n.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),r+=h+"\n",t=t.substring(h.length+1),l=u.slice(p)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let h,u=null;this.options.gfm&&(u=this.rules.other.listIsTask.exec(a),u&&(h="[ ] "!==u[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!u,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=r}const a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++)if(this.lexer.state.top=!1,i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]),!i.loose){const e=i.items[t].tokens.filter((t=>"space"===t.type)),n=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));i.loose=n}if(i.loose)for(let t=0;t<i.items.length;t++)i.items[t].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e){return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const n=Ac(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const t of r)this.rules.other.tableAlignRight.test(t)?o.align.push("right"):this.rules.other.tableAlignCenter.test(t)?o.align.push("center"):this.rules.other.tableAlignLeft.test(t)?o.align.push("left"):o.align.push(null);for(let t=0;t<n.length;t++)o.header.push({text:n[t],tokens:this.lexer.inline(n[t]),header:!0,align:o.align[t]});for(const t of i)o.rows.push(Ac(t,o.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]}))));return o}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=wc(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let n=0;for(let r=0;r<t.length;r++)if("\\"===t[r])r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),vc(e,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const t=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return vc(n,t,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let i,o,s=n,a=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(r=l.exec(e));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=[...i].length,r[3]||r[4]){s+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+a);const e=[...r[0]][0].length,l=t.slice(0,n+r.index+e+o);if(Math.min(n,o)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let r;do{r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(r!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},_c=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||wl,this.options.tokenizer=this.options.tokenizer||new xc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={other:kl,block:uc.normal,inline:fc.normal};this.options.pedantic?(e.block=uc.pedantic,e.inline=fc.pedantic):this.options.gfm&&(e.block=uc.gfm,this.options.breaks?e.inline=fc.breaks:e.inline=fc.gfm),this.tokenizer.rules=e}static get rules(){return{block:uc,inline:fc}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(kl.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){for(this.options.pedantic&&(t=t.replace(kl.tabCharGlobal," ").replace(kl.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0))))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);const n=e.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);const n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);const n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){const o=e.at(-1);n&&"paragraph"===o?.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(r),n=i.length!==t.length,t=t.substring(r.raw.length)}else if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);const n=e.at(-1);"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(r)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n=t,r=null;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)t.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;t;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0))))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);const n=e.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,n,o)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let s=t;if(this.options.extensions?.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(s=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(s)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;const n=e.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},kc=class{options;parser;constructor(t){this.options=t||wl}space(t){return""}code({text:t,lang:e,escaped:n}){const r=(e||"").match(kl.notSpaceStart)?.[0],i=t.replace(kl.endingNewline,"")+"\n";return r?'<pre><code class="language-'+bc(r)+'">'+(n?i:bc(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:bc(i,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,n=t.start;let r="";for(let e=0;e<t.items.length;e++){const n=t.items[e];r+=this.listitem(n)}const i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+bc(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",n="";for(let e=0;e<t.header.length;e++)n+=this.tablecell(t.header[e]);e+=this.tablerow({text:n});let r="";for(let e=0;e<t.rows.length;e++){const i=t.rows[e];n="";for(let t=0;t<i.length;t++)n+=this.tablecell(i[t]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+r+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${bc(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const r=this.parser.parseInline(n),i=yc(t);if(null===i)return r;let o='<a href="'+(t=i)+'"';return e&&(o+=' title="'+bc(e)+'"'),o+=">"+r+"</a>",o}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const i=yc(t);if(null===i)return bc(n);let o=`<img src="${t=i}" alt="${n}"`;return e&&(o+=` title="${bc(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:bc(t.text)}},Cc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ec=class t{options;renderer;textRenderer;constructor(t){this.options=t||wl,this.options.renderer=this.options.renderer||new kc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Cc}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(t,e=!0){let n="";for(let r=0;r<t.length;r++){const i=t[r];if(this.options.extensions?.renderers?.[i.type]){const t=i,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){n+=e||"";continue}}const o=i;switch(o.type){case"space":n+=this.renderer.space(o);continue;case"hr":n+=this.renderer.hr(o);continue;case"heading":n+=this.renderer.heading(o);continue;case"code":n+=this.renderer.code(o);continue;case"table":n+=this.renderer.table(o);continue;case"blockquote":n+=this.renderer.blockquote(o);continue;case"list":n+=this.renderer.list(o);continue;case"html":n+=this.renderer.html(o);continue;case"paragraph":n+=this.renderer.paragraph(o);continue;case"text":{let i=o,s=this.renderer.text(i);for(;r+1<t.length&&"text"===t[r+1].type;)i=t[++r],s+="\n"+this.renderer.text(i);n+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{const t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}parseInline(t,e=this.renderer){let n="";for(let r=0;r<t.length;r++){const i=t[r];if(this.options.extensions?.renderers?.[i.type]){const t=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=t||"";continue}}const o=i;switch(o.type){case"escape":case"text":n+=e.text(o);break;case"html":n+=e.html(o);break;case"link":n+=e.link(o);break;case"image":n+=e.image(o);break;case"strong":n+=e.strong(o);break;case"em":n+=e.em(o);break;case"codespan":n+=e.codespan(o);break;case"br":n+=e.br(o);break;case"del":n+=e.del(o);break;default:{const t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}},Sc=class{options;block;constructor(t){this.options=t||wl}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?_c.lex:_c.lexInline}provideParser(){return this.block?Ec.parse:Ec.parseInline}},Bc=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ec;Renderer=kc;TextRenderer=Cc;Lexer=_c;Tokenizer=xc;Hooks=Sc;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{const t=r;for(const r of t.header)n=n.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)n=n.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=r;n=n.concat(this.walkTokens(t.items,e));break}default:{const t=r;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach((r=>{const i=t[r].flat(1/0);n=n.concat(this.walkTokens(i,e))})):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){const e=this.defaults.renderer||new kc(this.defaults);for(const n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,i=t.renderer[r],o=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new xc(this.defaults);for(const n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=t.tokenizer[r],o=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new Sc;for(const n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,i=t.hooks[r],o=e[r];Sc.passThroughHooks.has(n)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>o.call(e,t)));const n=i.call(e,t);return o.call(e,n)}:e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,r=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(r.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return _c.lex(t,e??this.defaults)}parser(t,e){return Ec.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{const r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?_c.lex:_c.lexInline,a=i.hooks?i.hooks.provideParser():t?Ec.parse:Ec.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>a(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(o);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let n=a(t,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(t){return o(t)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+bc(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}};function Oc(t,e){return Bc.parse(t,e)}Oc.options=Oc.setOptions=function(t){return Bc.setOptions(t),Oc.defaults=Bc.defaults,vl(Oc.defaults),Oc},Oc.getDefaults=Al,Oc.defaults=wl,Oc.use=function(...t){return Bc.use(...t),Oc.defaults=Bc.defaults,vl(Oc.defaults),Oc},Oc.walkTokens=function(t,e){return Bc.walkTokens(t,e)},Oc.parseInline=Bc.parseInline,Oc.Parser=Ec,Oc.parser=Ec.parse,Oc.Renderer=kc,Oc.TextRenderer=Cc,Oc.Lexer=_c,Oc.lexer=_c.lex,Oc.Tokenizer=xc,Oc.Hooks=Sc,Oc.parse=Oc;Oc.options,Oc.setOptions,Oc.use,Oc.walkTokens,Oc.parseInline,Ec.parse,_c.lex;const Mc=t=>[/^#{1,6}\s/m,/\*\*.*\*\*/,/__.*__/,/\*.*\*/,/_.*_/,/\[.*\]\(.*\)/,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m,/```[\s\S]*```/,/`[^`]+`/,/^>\s/m,/!\[.*\]\(.*\)/,/^\s*[-*_]{3,}\s*$/m].some((e=>e.test(t))),$c=At.hj.create({name:"markdownPaste",addOptions:()=>({autoDetect:!0}),addProseMirrorPlugins(){const t=this.editor,e=this.options;return[new wt.Sy({key:new wt.H$("markdownPaste"),props:{handlePaste:(n,r,i)=>{if(!e.autoDetect)return!1;const o=r.clipboardData?.getData("text/plain"),s=r.clipboardData?.getData("text/html");if(console.log("Paste event - text:",o),console.log("Paste event - html:",s),console.log("Is markdown?",Mc(o)),!o||!Mc(o))return console.log("Not markdown or no text, skipping"),!1;if(s&&s.trim()){const t=/<(?!meta|style|link)([\w]+)[^>]*>/i.test(s);if(console.log("Has rich HTML content:",t),t&&!Mc(o))return console.log("Skipping due to rich HTML"),!1}try{let e=Oc.parse(o,{async:!1});return console.log("Parsed markdown to HTML:",e),e&&"string"==typeof e&&(e=e.replace(/<a\s+([^>]*?)>/gi,((t,e)=>e.includes("style=")?t.replace(/style="([^"]*)"/i,((t,e)=>e.includes("color:")?t:`style="${e}; color: blue"`)):`<a ${e} style="color: blue">`))),r.preventDefault(),t.commands.insertContent(e),!0}catch(t){return console.error("Error parsing markdown:",t),!1}}}})]}}),Ic=At.hj.create({name:"markdownContent",addCommands:()=>({setMarkdownContent:t=>e=>{let{commands:n,editor:r}=e;try{let e=Oc.parse(t,{async:!1});return e&&"string"==typeof e&&(e=e.replace(/<a\s+([^>]*?)>/gi,((t,e)=>e.includes("style=")?t.replace(/style="([^"]*)"/i,((t,e)=>e.includes("color:")?t:`style="${e}; color: blue"`)):`<a ${e} style="color: blue">`))),n.setContent(e)}catch(t){return console.error("Error parsing markdown:",t),!1}},insertMarkdownContent:t=>e=>{let{commands:n,editor:r}=e;try{let e=Oc.parse(t,{async:!1});return e&&"string"==typeof e&&(e=e.replace(/<a\s+([^>]*?)>/gi,((t,e)=>e.includes("style=")?t.replace(/style="([^"]*)"/i,((t,e)=>e.includes("color:")?t:`style="${e}; color: blue"`)):`<a ${e} style="color: blue">`))),n.insertContent(e)}catch(t){return console.error("Error parsing markdown:",t),!1}}})}),Tc=t=>{const e=t.defaultDirection||"auto";let n=t.content;if(n&&("string"==typeof(r=n)&&[/^#{1,6}\s/m,/\*\*.*\*\*/,/__.*__/,/\*.*\*/,/_.*_/,/\[.*\]\(.*\)/,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m,/```[\s\S]*```/,/`[^`]+`/,/^>\s/m,/!\[.*\]\(.*\)/,/^\s*[-*_]{3,}\s*$/m].some((t=>t.test(r)))))try{n=Oc.parse(n,{async:!1}),n&&"string"==typeof n&&(n=n.replace(/<a\s+([^>]*?)>/gi,((t,e)=>e.includes("style=")?t.replace(/style="([^"]*)"/i,((t,e)=>e.includes("color:")?t:`style="${e}; color: blue"`)):`<a ${e} style="color: blue">`)))}catch(t){console.error("Error parsing markdown content:",t)}var r;const{content:i,...o}=t,s=new At.ML({autofocus:!1,content:n,editorProps:{handleDOMEvents:{drop:(t,e)=>{if(e.dataTransfer&&"move"===e.dataTransfer.effectAllowed&&1===e.dataTransfer.items.length&&"text/plain"===e.dataTransfer.items[0].type){const t=e.dataTransfer.getData("text/plain");"string"!=typeof t||t.trim()||e.preventDefault()}}},handlePaste:(t,e,n)=>{const r=e.clipboardData?.getData("text/plain");if(!r||!(t=>{try{const e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol}catch(e){return/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/i.test(t.trim())}})(r.trim()))return!1;const i=t.state,{from:o,to:s}=i.selection,a=i.doc.textBetween(o,s),l=i.schema.marks.link,c=i.schema.marks.textStyle;if(!l)return!1;let d=r.trim();d.startsWith("http://")||d.startsWith("https://")||(d="https://"+d);const p=a&&(t=>{if(!t||"string"!=typeof t)return!1;const e=t.trim();return/^(https?:\/\/|www\.|[\w-]+\.(com|org|net|io|co|edu|gov|mil|int|biz|info|name|pro|museum|aero|coop|travel|jobs|mobi|asia|tel|xxx|[\w]{2,}))[\w\.\/\-\?\=\&\#\@\%\+\~]*/i.test(e)})(a);if(p){let e=!1,n=null;if(i.doc.nodesBetween(o,s,((t,r)=>{if(e)return!1;Math.max(o,r),Math.min(s,r+t.nodeSize);return t.marks.forEach((t=>{"link"===t.type.name&&(e=!0,n=t)})),!e})),!e){const t=i.storedMarks?.find((t=>"link"===t.type.name)),r=i.selection.$from.marks().find((t=>"link"===t.type.name)),o=i.selection.$to.marks().find((t=>"link"===t.type.name));n=t||r||o,e=!!n}const r=i.tr;if(e){r.removeMark(o,s,l),r.replaceWith(o,s,i.schema.text(d));const t=o,e=o+d.length;r.addMark(t,e,l.create({href:d})),c&&r.addMark(t,e,c.create({color:"blue"}))}else{r.replaceWith(o,s,i.schema.text(d));const t=o,e=o+d.length;r.addMark(t,e,l.create({href:d})),c&&r.addMark(t,e,c.create({color:"blue"}))}const a=o+d.length;return r.setSelection(wt.Bs.near(r.doc.resolve(a))),t.dispatch(r),!0}{const e=i.tr;if(a&&o!==s){if(e.addMark(o,s,l.create({href:d})),c){let t={};i.doc.nodesBetween(o,s,((e,n)=>{Math.max(o,n),Math.min(s,n+e.nodeSize);e.marks.forEach((e=>{"textStyle"===e.type.name&&(t={...t,...e.attrs})}))}));const n={...t,color:"blue"};e.addMark(o,s,c.create(n))}e.setSelection(wt.Bs.near(e.doc.resolve(s)))}else{e.replaceWith(o,s,i.schema.text(d));const t=o,n=o+d.length;e.addMark(t,n,l.create({href:d})),c&&e.addMark(t,n,c.create({color:"blue"})),e.setSelection(wt.Bs.near(e.doc.resolve(n)))}return t.dispatch(e),!0}},transformPastedHTML:t=>(t&&"string"==typeof t&&(t=t.replace(/<a\s+([^>]*?)>/gi,((t,e)=>e.includes("style=")?t.replace(/style="([^"]*)"/i,((t,e)=>e.includes("color:")?t:`style="${e}; color: blue"`)):`<a ${e} style="color: blue">`))),t)},extensions:[Bt.Z,Wt.configure({placeholder:t=>{let{node:e}=t;return"paragraph"===e.type.name?B.h.get("lang","add_content_to_paragraph"):"heading"===e.type.name?B.h.get("lang","add_content_to_heading"):null}}),Wn,Ot.configure({HTMLAttributes:{class:"cdtr-heading",style:"font-weight: initial"}}),yl,Rn,Mt.Z,Ki.configure({openOnClick:!1,HTMLAttributes:{class:"cdtr-editor-link"}}),de.configure({draggable:!0}),ae.configure({keepMarks:!0}),Tn.configure({lowlight:tl,draggable:!0,defaultLanguage:"javascript"}),Nn.configure({fonts:t.fontFamilies}),Nt,Rt,vt.ZP,Ft,Vt,Is,sl,re,Ss.configure({resizable:!1,draggable:!0,lastColumnResizable:!1,HTMLAttributes:{class:"cdtr-table-element"}}),Os.configure({draggable:!0}),Ms,$s,Yt,nl.configure({inline:!1,HTMLAttributes:{"data-type":"inline-image","cdtr-resizable":"true",style:"display: block; margin: 0 auto;"}}),Kt.configure({class:"dropcursor",color:"black",width:2}),te.configure({types:["heading","blockquote","paragraph","taskList","customBulletList","bulletList","orderedList"]}),Qt.configure({types:["heading","blockquote","paragraph","taskList","orderedList"]}),Jt.configure({defaultDirection:e,types:["heading","blockquote","paragraph","taskList","customBulletList","bulletList","orderedList"]}),Ts.configure({types:["heading","paragraph"],defaultAlignment:"rtl"===e?"right":"left"}),St,Et,zt,Bs,Ct,xt,se,oe,Yn,$c,Ic],...o});return s};n(35432);var Lc=n(86274),Nc={};Nc.setAttributes=D(),Nc.insert=R().bind(null,"head"),Nc.domAPI=L(),Nc.insertStyleElement=H();I()(Lc.Z,Nc);Lc.Z&&Lc.Z.locals&&Lc.Z.locals;var Rc=n(36351);n(9545);const Pc={paragraph:16,heading:32,h1:32,h2:28,h3:24,h4:20,h5:18,h6:16,listItem:16,tableCell:16,tableHeader:16,blockquote:18,codeBlock:14,text:16,span:16,div:16,li:16,td:16,th:16,p:16},Dc={paragraph:"Arial",heading:"Arial",h1:"Arial",h2:"Arial",h3:"Arial",h4:"Arial",h5:"Arial",h6:"Arial",listItem:"Arial",tableCell:"Arial",tableHeader:"Arial",blockquote:"Arial",codeBlock:"Courier New",text:"Arial",span:"Arial",div:"Arial",li:"Arial",td:"Arial",th:"Arial",p:"Arial"},zc={paragraph:1.4,heading:1.2,h1:1.2,h2:1.2,h3:1.2,h4:1.2,h5:1.2,h6:1.2,listItem:1.4,tableCell:1.4,tableHeader:1.4,blockquote:1.4,codeBlock:1.4,text:1.4,span:1.4,div:1.4,li:1.4,td:1.4,th:1.4,p:1.4};function Hc(t){return null!=t&&""!==t}function jc(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!t)return void console.warn("No editor provided");const i={...Pc,...e},o={...Dc,...n},s={...zc,...r};console.log("Validating default values..."),console.log("Font sizes:",i),console.log("Font families:",o),console.log("Line heights:",s),console.log("=== APPLYING FONT SIZES, FAMILIES, AND LINE HEIGHTS TO TIPTAP DOCUMENT ==="),console.log("Font sizes to apply:",i),console.log("Font families to apply:",o),console.log("Line heights to apply:",s);const{state:a}=t,{doc:l}=a;l.descendants(((e,n)=>{const r=e.type.name;console.log(`Processing node: ${r} at position ${n}`);const a=e.marks?.find((t=>"textStyle"===t.type.name))?.attrs?.fontSize,l=e.marks?.find((t=>"textStyle"===t.type.name))?.attrs?.fontFamily;if(a||l)console.log(`Node at position ${n} already has font attributes:`,{fontSize:a||"not set",fontFamily:l||"not set"});else{let a=null,l=null,c=null;if("heading"===r){const t=e.attrs.level;a=i[`h${t}`]||i.heading,l=o[`h${t}`]||o.heading,c=s[`h${t}`]||s.heading,console.log(`Heading level ${t}:`,{fontSize:a||"not set",fontFamily:l||"not set",lineHeight:c||"not set"})}else i[r]&&(a=i[r],l=o[r],c=s[r],console.log(`Node type ${r}:`,{fontSize:a||"not set",fontFamily:l||"not set",lineHeight:c||"not set"}));(a||l||c)&&function(t,e,n,r,i,o){try{let s=t.chain().focus().setTextSelection({from:e,to:e+n});Hc(r)&&(s=s.setFontSize(r),console.log(`Setting font size: ${r}`)),Hc(i)&&(s=s.setFontFamily(i),console.log(`Setting font family: ${i}`)),Hc(o)&&(s=s.setLineHeight(o),console.log(`Setting line height: ${o}`)),s.run(),console.log(`Applied to node at position ${e}:`,{fontSize:r||"not set",fontFamily:i||"not set",lineHeight:o||"not set"})}catch(t){console.warn(`Failed to apply font and line height to node at position ${e}:`,t)}}(t,n,e.nodeSize,a,l,c)}return!0})),console.log("Font and line height application complete")}function Uc(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];t&&e&&(console.log("=== INSERTING CONTENT AND APPLYING FONT SIZES, FAMILIES, AND LINE HEIGHTS ==="),console.log("Content to insert:",e),console.log("Preserve existing fonts:",o),t.commands.insertContent(e),o||setTimeout((()=>{jc(t,n,r,i)}),100),t.chain().focus())}const Zc=(0,Rc.c)(),Fc="selection-background";function Vc(t,e){t?e.classList.add(dt.active):e.classList.remove(dt.active)}!function(){if(document.getElementById("theme-provider-vars"))return;const t=document.createElement("style");t.innerHTML='#input-iframe--v1, :root {\n --radius: 20px;\n --sm-radius: .25rem;\n --secondary: #0a0a0a;\n --dark: #002d5c; /* Darker blue shade */\n --sidebar-color: #1a73e8; /* Sidebar primary color */\n --sidebar-icon-color: #fff;\n --primary: #4285f4; /* Primary theme color */\n --primaryText: #ffffff; /* Text on primary color */\n --primary-text: #ffffff; /* Text on primary color */\n --resizer-color: #c1c1c1; /* Light gray resizer */\n --alpha: 0.8; /* Example alpha transparency */\n --micro-info-color: #7d7d7d;\n --bgPrimary: #f5f5f5; /* Background primary color */\n --secondary: #808080; /* Secondary color */\n --disabled: #d3d3d3; /* Disabled element color */\n --icon-color: #000000; /* Black for icons */\n --error-color: rgba(165, 16, 16, 0.877); \n --input-border-color: #9EADBD;\n --font-family: "Arial, sans-serif"; /* Example font family */\n --cdtr-font-family: "Arial, sans-serif"; /* Same as above */\n --layout-holder-color: #e0e0e0; /* Light gray background */\n --justify-content: center; /* Example alignment */\n --row-direction: row; /* Default row direction */\n --medium-box-shadow: 0 2px 10px 0 rgb(0 6 36 / 20%);\n --section-padding: 10px;\n --add-padding-row: 25px 0 25px 0;\n --section-padding-top: 6px;\n --section-padding-bottom: 6px;\n --margin-top: 1rem;\n --divider-color: #00000026;\n --focus-shadow: 0 0 0 0.15rem rgb(13 110 253 / 10%);\n --text-align-locale: left; /* Example locale text alignment */\n --direction-locale: rtl; /* Left-to-right direction */\n --direction: rtl; /* Left-to-right direction */\n --section-hover: #f0f0f048;\n --spacing-sm: .1rem;\n --paper-font-subhead_-_font-size: 13px;\n --editor-font-size: 13px;\n --paper-item-min-height: 30px;\n --element-border-color: rgba(0, 0, 0, 0.116);\n --editor-input-height: 30px;\n --title-block-height: 50px;\n --text-dark-color: #000000;\n} ',document.head.appendChild(t)}();const Yc=t=>{const{defaultDirection:e,content:n,editable:$,element:I,builder:T=[],language:L,editorWidth:N,onClickMagic:R}=t,P=T.find((t=>"fontFamily"===t.type)),D=Tc({fontFamilies:P?.fonts||[],defaultDirection:e,element:I,editable:$,content:n,language:L}),z=(P?.fonts.length>0&&P.fonts,T.find((t=>"fontSize"===t.type))),H=z?z.sizes:[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174],j={direction:()=>{const t=D.isActive({direction:"rtl"})?"ltr":"rtl";Z.direction.element.innerHTML="ltr"===t?a().outerHTML:(t=>(0,r.Z)("svg",(0,i.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),(0,r.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.Z)("path",{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zm8 12v-2.5l4 3.5-4 3.5V19H5v-2h12z"})))().outerHTML},fontWeight:()=>{Vc(D.isActive("bold"),Z.bold.element)},italic:()=>{Vc(D.isActive("italic"),Z.italic.element)},link:()=>{Vc(D.isActive("link"),Z.link.element)},unLink:()=>{D.isActive("link")?Z.unLink.element.classList.remove(dt.disabled):Z.unLink.element.classList.add(dt.disabled)},underline:()=>{Vc(D.isActive("underline"),Z.underline.element)},strike:()=>{Vc(D.isActive("strike"),Z.strike.element)},color:()=>{const t=D.getAttributes("textStyle").color||"black";Z.fontColor.element.setAttribute("value",t)},background:()=>{const t=D.getAttributes("textStyle").backgroundColor||"#fff";Z.backcolor.element.setAttribute("value",t)},fontFamily:()=>{const t=D.getAttributes("textStyle").fontFamily?.split(",")[0].replace(/['"]+/g,"");Z.fontFamily.element.value=t||"Arial",Z.fontFamily.element.name=t||"Arial"},table:()=>{Vc(D.isActive("table"),Z.table.element)},image:()=>Vc(D.isActive("image"),Z.image.element),video:()=>Vc(D.isActive("video"),Z.video.element),bulletList:()=>Vc(D.isActive("bulletList"),Z.bullet.element),customBulletList:()=>Vc(D.isActive("customBulletList"),Z.customList.element),numberedList:()=>{Vc(D.isActive("orderedList"),Z.numbered.element)},quotes:()=>Vc(D.isActive("blockquote"),Z.quotes.element),horizontalRule:()=>Vc(D.isActive("horizontalRule"),Z.horizonRule.element),textAlign:()=>{["justify","center","right","left"].forEach((t=>{Vc(D.isActive({textAlign:t}),Z[t].element)}))},fontSize:()=>{D.getAttributes("textStyle").fontSize;Z.fontSize.element.patch(D.getAttributes("textStyle").fontSize||"16px")}},U={removeTable:()=>D.chain().focus().deleteTable().run(),addTable:t=>{const e=(0,r.Z)(at,{style:{width:"220px",padding:"15px"},headerText:"add_table",target:t.target},(0,r.Z)("cdtr-table-cells-editor",{onChange:t=>{let{target:n}=t;const{x:r,y:i}=n.value;e.remove(),D.chain().focus().insertTable({rows:r,cols:i,withHeaderRow:!0}).run()}}));document.body.appendChild(e)},setButton:()=>{D.chain().focus().toggleButton({text:"button",width:"100",height:"100"}).run()},addImage:()=>{D.chain().focus().setImage({src:"https://picsum.photos/100/100",alt:""}).run()},setVideo:()=>{D.chain().focus().setVideo({src:"https://www.youtube.com/watch?v=HUYB8EY09ME",width:"500",height:"300"}).run()},setQuotes:()=>{D.chain().focus().toggleBlockquote().run()},setCode:()=>{D.chain().focus().toggleCodeBlock().run()},setHorizonRule:()=>{D.chain().focus().setHorizontalRule({url:"https://www.youtube.com/watch?v=HUYB8EY09ME",width:"100",height:"100"}).run()},clearFormat:()=>{D.chain().focus().unsetAllMarks().run()},emoji:t=>{},table:()=>D.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),bold:()=>D.chain().focus().toggleBold().run(),italic:()=>D.chain().focus().toggleItalic().run(),underline:()=>D.chain().focus().toggleUnderline().run(),strike:()=>D.chain().focus().toggleStrike().run(),direction:()=>{const t=D.isActive({direction:"rtl"})?"ltr":"rtl";D.chain().focus().setDirection(t).run()},textAlign:t=>D.chain().focus().setTextAlign(t).run(),bullets:()=>D.chain().focus().toggleBulletList().run(),numbered:()=>D.chain().focus().toggleOrderedList().run(),customList:()=>D.chain().focus().toggleCustomList().run(),fontSize:t=>{D.chain().focus().setFontSize(t).run()},fontFamily:t=>D.chain().focus().setFontFamily(t).run(),link:t=>{if(!t)return null;const e=t.target.closest("button"),n=(0,r.Z)("cdtr-link-element",{hasButton:!0,href:D.getAttributes("link").href||"",protocol:D.getAttributes("link").protocol,target:D.getAttributes("link").target,onChange:t=>(t=>{const e=D.state,{from:n,to:r}=e.selection;let o=[];e.doc.nodesBetween(n,r,(t=>{o=[...o,...t.marks]}));const s=o.find((t=>"link"===t.type.name)),a=t.target.value;a.href=a.getUrlWithParams(),s?D.chain().focus().setColor("blue").extendMarkRange("link").updateAttributes("link",a).run():D.chain().focus().setTextSelection({from:n,to:r}).setColor("blue").setLink(a).run(),i.close()})(t)}),i=(0,r.Z)(at,{offsetY:30,style:{width:"300px",padding:"15px"},headerText:B.h.get("lang","link"),target:e},n);document.body.appendChild(i)},unLink:()=>D.commands.unsetLink(),forColor:t=>{D.chain().focus().setColor(t).run()},clearColor:()=>D.chain().focus().unsetColor().run(),clearBackcolor:()=>D.chain().focus().unsetBackgroundColor().run(),backColor:t=>D.chain().focus().setBackgroundColor(t).run(),onClickMagic:()=>{const t={selectAll:()=>(D.chain().focus().selectAll().run(),t),selectNode:e=>(D.chain().focus().selectNode(e).run(),t),selectParentNode:()=>(D.chain().focus().selectParentNode().run(),t),insertContent:e=>(D.commands.insertContent(e),D.chain().focus(),t),insertContentHtml:e=>{const n=Oc.parse(e,{async:!1});return Uc(D,n,{},{},{},!0),t},getHTML:()=>D.getHTML(),getText:()=>D.getText(),getJSON:()=>D.getJSON()};R(t)}};let Z={bold:{element:(0,r.Z)(V,{onClick:U.bold},(0,r.Z)(o,null)),className:dt.colBtn,title:"bold"},underline:{element:(0,r.Z)(V,{onClick:U.underline},(0,r.Z)(h,null)),className:dt.colBtn,title:"underline"},italic:{element:(0,r.Z)(V,{onClick:U.italic},(0,r.Z)(p,null)),className:dt.colBtn,title:"italic"},strike:{element:(0,r.Z)(V,{onClick:U.strike},(0,r.Z)(u,null)),className:dt.colBtn,title:"strikeThrough",divider:!0},fontFamily:{element:(0,r.Z)("cdtr-font-family-editor",{light:!0,onChange:t=>{const e=t.target.value;U.fontFamily(e)}}),className:dt.dropdown,title:"fontFamily",divider:!0},fontSize:{element:(0,r.Z)(ft,{style:{fontSize:"13px",boxShadow:"none"},icon:(0,r.Z)(g,null),title:8,className:dt.dropdown},H.map((t=>(0,r.Z)(mt,{style:{fontSize:"13px"},onClick:()=>U.fontSize(t),className:dt.fontSizeItem,value:t+"px"},t,"px")))),className:dt.dropdown,title:"fontSize",divider:!0},left:{element:(0,r.Z)(V,{onClick:()=>U.textAlign("left")},(0,r.Z)(b,null)),className:dt.colBtn,title:"left"},center:{element:(0,r.Z)(V,{onClick:()=>U.textAlign("center")},(0,r.Z)(A,null)),className:dt.colBtn,title:"center"},right:{element:(0,r.Z)(V,{onClick:()=>U.textAlign("right")},(0,r.Z)(y,null)),className:dt.colBtn,title:"right"},justify:{element:(0,r.Z)(V,{onClick:()=>U.textAlign("justify")},(0,r.Z)(w,null)),className:dt.colBtn,title:"justify",divider:!0},direction:{element:(0,r.Z)(V,{onClick:U.direction},(0,r.Z)(a,null)),className:dt.colBtn,title:B.h.get("lang","direction"),divider:!0},fontColor:{element:(0,r.Z)("color-playground",{ref:{onCreate:t=>{t.hasAlpha=!1,t.type="text"}},onChange:t=>{U.forColor(t.target.value),rt({context:{"::selection":{background:"transparent"}},id:Fc}),Zc.run((()=>{document.getElementById(Fc).remove()}),1500)},className:"cdtr-plugin","data-color":!0}),className:dt.colBtn,title:"forecolor"},backcolor:{element:(0,r.Z)("color-playground",{type:"background",ref:{onCreate:t=>{t.hasAlpha=!1}},onChange:t=>{U.backColor(t.target.value),rt({context:{"::selection":{background:"transparent"}},id:Fc}),Zc.run((()=>{document.getElementById(Fc).remove()}),1500)},className:"cdtr-plugin","data-color":!0}),className:dt.colBtn,title:B.h.get("lang","backcolor"),endLine:!0},bullet:{element:(0,r.Z)(V,{onClick:U.bullets},(0,r.Z)(c,null)),className:dt.colBtn,title:"bullets"},numbered:{element:(0,r.Z)(V,{onClick:U.numbered},(0,r.Z)(d,null)),className:dt.colBtn,title:"numbered"},customList:{element:(0,r.Z)(V,{onClick:U.customList},(0,r.Z)(l,null)),className:dt.colBtn,title:"taskList_with_icons",divider:!0},link:{element:(0,r.Z)(V,{onClick:U.link},(0,r.Z)(f,null)),className:dt.colBtn,title:"link"},unLink:{element:(0,r.Z)(V,{onClick:U.unLink},(0,r.Z)(m,null)),className:dt.colBtn,divider:!0,title:"unLink"},emoji:{element:(0,r.Z)(V,{onClick:t=>{const e=(0,r.Z)("cdtr-emoji-picker",null);e.onEmojiClick=(t,e)=>{D.commands.insertContent(e.emoji),D.chain().focus(),n.close()};const n=(0,r.Z)(at,{target:t.target},e);document.body.appendChild(n)}},(0,r.Z)(_,{className:dt.colorBtn})),className:dt.colBtn,title:"emoji",divider:!0},image:{element:(0,r.Z)(V,{onClick:U.addImage},(0,r.Z)(x,{className:dt.colorBtn})),className:dt.colBtn,title:"image"},video:{element:(0,r.Z)(V,{onClick:U.setVideo},(0,r.Z)(v,{className:dt.colorBtn})),className:dt.colBtn,title:"video"},horizonRule:{element:(0,r.Z)(V,{onClick:U.setHorizonRule},(0,r.Z)(k,{className:dt.colorBtn})),className:dt.colBtn,title:"divider"},table:{element:(0,r.Z)(V,{onClick:U.addTable},(0,r.Z)(S,{className:dt.colorBtn})),className:dt.colBtn,title:"table",divider:!0},quotes:{element:(0,r.Z)(V,{onClick:U.setQuotes},(0,r.Z)(C,{className:dt.colorBtn})),className:dt.colBtn,title:"quotes",divider:!0},clearFormat:{element:(0,r.Z)(V,{onClick:U.clearFormat},(0,r.Z)(E,{className:dt.colorBtn})),className:dt.colBtn,title:"clearFormat",divider:!0},magic:{element:(0,r.Z)(V,{onClick:U.onClickMagic},(0,r.Z)(s,null)),className:dt.colBtn,title:"magic",divider:!0},mergeTags:{element:(0,r.Z)("cdtr-merge-tags",{onChange:t=>{D.commands.insertContent(t.target.value),D.chain().focus();const e=document.querySelector("cdtr-drop-modal");e?.remove()}}),title:"mergeTags",divider:!0}};const Y="editor";Y&&Y.textEditor&&Y.textEditor.cmds&&Array.isArray(Y.textEditor.cmds)&&Y.textEditor.cmds.forEach((t=>{const e="function"==typeof t.element?{element:t.element(),title:t.title,className:t.className||""}:{divider:t.divider};Z["extend-"+(0,F.Z)()]=e}));const W=(()=>{const t=[];for(const e in Z)if(Object.hasOwnProperty.call(Z,e)){if(T.find((t=>t.type===e))){const n=Z[e];n&&n.element&&(n.element.classList.add("cdtr-button-cmd"),n.element.classList.add(dt.btn),t.push(n)),n.endLine&&(t.push({endLine:!0}),delete n.endLine),n.divider&&(t.push({divider:!0}),delete n.divider)}}return t})(),q=t=>{let{editor:e}=t;for(const t in j)if(Object.hasOwnProperty.call(j,t)){(0,j[t])()}};return{component:new M({onLoad:()=>{D.off("selectionUpdate",q),D.off("transaction",q),D.on("selectionUpdate",q),D.on("transaction",q),window.removeEventListener("click",q),window.addEventListener("click",q),q({editor:D})},onUnload:()=>{},children:(0,r.Z)("cdtr-row",{style:{width:N||null},justify:"flex-start",alignItems:"center",className:O(dt.textEditor,"cdtr-plugin","cdtr-text-editor-plugin",dt.fadeUp)},W.map(((t,e)=>t.divider?(0,r.Z)("div",{className:dt.dividerY}):t.endLine?(0,r.Z)("cdtr-col",{sm:12}):(0,r.Z)("cdtr-col",{"tooltip-dir":"top",className:t.className},(0,r.Z)("cdtr-tooltip",{placement:"top",content:t.title,delay:"600,0"},t.element," ")," "))),(0,r.Z)("div",{className:dt.dividerX}))}),editor:D}};const Wc=function t(e){e&&e.firstChild&&(e.removeChild(e.firstChild),t(e))},qc=t=>{const e=(0,r.Z)("div",{style:{zIndex:(0,nt.Z)()+3},className:O(dt.main,"no-select")}),n=t.container,i=t.target,o=t.editor,s=t.offsetTop,a=r=>{window.requestAnimationFrame((()=>{setTimeout((()=>{if(!n)return;const r=t.container,o=t.target?.getBoundingClientRect();if(!o)return void console.error("no block");const a=e.getBoundingClientRect(),l=i.getBoundingClientRect(),c=o.top+r.offsetTop-a.height;let d=l.left+(l.width-a.width)/2+"px";e.style.left=d,n&&r.offsetTop>c-60?(e.classList.contains(dt.withTransition)||e.classList.add(dt.withTransition),e.classList.contains(dt.sticky)||e.classList.add(dt.sticky)):(e.classList.remove(dt.withTransition),e.classList.remove(dt.sticky),e.style.top=Math.abs(o.top)-a.height-s+"px")}),0)}))},l=new M({onUpdate:()=>{if(n){e.appendChild(o),e.style.opacity=0,setTimeout((()=>{e.style.opacity=1}),50);const t=e.getBoundingClientRect(),r=n.getBoundingClientRect();e.style.top=Math.abs(r.top)-t.height+"px"}},onUnload:()=>{Wc(e),n.removeEventListener("scroll",a),document.removeEventListener("scroll",a)},children:e});return l.start=()=>{document.body.appendChild(l),n.addEventListener("scroll",a),window.addEventListener("scroll",a),a()},l};const Xc=new class{constructor(){(0,gt.Z)(this,"events",void 0),this.onDispatchEvent=this.onDispatchEvent.bind(this),this.events={click:[],mouseover:[],mousedown:[],mousemove:[],mouseup:[],keydown:[],keyup:[],scroll:[]}}onDispatchEvent(t){const e=t,n=this;Array.isArray(n.events[t.type])&&requestAnimationFrame((()=>n.events[t.type].forEach(((r,i)=>{"function"==typeof r?r(e):n.events[t.type].splice(i,1)}))))}destroy(){}connect(t,e){const n=this;if(!n.events[t])return void console.error("Can't use this event name",t);0===n.events[t].length&&window.addEventListener(t,this.onDispatchEvent,!1);n.events[t].findIndex((t=>t===e))>-1?console.warn("The event has already been subscribed."):n.events[t].push(e)}disconnect(t,e){const n=this;if(!n.events[t])return void console.error("Can't remove event name",t);0===n.events[t].length&&window.removeEventListener(t,this.onDispatchEvent);const r=n.events[t].findIndex((t=>t===e));r>-1&&Array.from(n.events[t]).splice(r,1)}};Xc.connect("mousemove",(t=>{B.h.set({mouse:{y:t.pageY,x:t.pageX}})}));const Gc=Xc;const Kc=new class{constructor(){this.selectedRows=[],this.connected=!1,this.onExecute=(t,e)=>{},this.connect=this.connect.bind(this),this.node=(0,r.Z)("cdtr-table-editor",{onChange:this.onExecute}),this.render=this.render.bind(this),Gc.connect("keydown",this.render),Gc.connect("scroll",this.render)}disconnect(){this.connected=!1,this.node.remove()}connect(t,e){this.connected=!0,this.target=t,this.editor=e,this.render()}render(){if(this.connected&&this.target){const t=this.target.getBoundingClientRect();let e=t.top+t.height+5;e+43>window.innerHeight&&(e=window.innerHeight-43),e<t.top&&(e=t.top),this.node.setAttribute("top",e),this.node.setAttribute("left",t.left),this.node.setAttribute("width",t.width),this.node.setAttribute("height",t.height),document.body.appendChild(this.node),this.selectedRows=Array.from(this.target.querySelectorAll(".selectedCell")),this.node.setAttribute("selectedRows",this.selectedRows.length)}}},Jc=Kc;class Qc extends bt.oi{constructor(){super(),this.className="cdtr-button-cmd",this.cmds={tdColor:t=>{Kc.editor.commands.updateAttributes("tableCell",{borderColor:t.target.value})},toggleHeaderColumn:()=>Kc.editor.chain().focus().toggleHeaderColumn().run(),toggleHeaderCell:()=>Kc.editor.chain().focus().toggleHeaderCell().run(),mergeOrSplit:()=>Kc.editor.chain().focus().mergeOrSplit().run(),addRowAfter:()=>Kc.editor.chain().focus().addRowAfter().run(),addRowBefore:()=>Kc.editor.chain().focus().addRowBefore().run(),addColumnBefore:()=>Kc.editor.chain().focus().addColumnBefore().run(),addColumnAfter:()=>Kc.editor.chain().focus().addColumnAfter().run(),deleteColumn:()=>Kc.editor.chain().focus().deleteColumn().run(),deleteRow:()=>Kc.editor.chain().focus().deleteRow().run(),splitCell:()=>Kc.editor.chain().focus().splitCell().run(),deleteTable:()=>Kc.editor.chain().focus().deleteTable().run(),mergeCells:()=>Kc.editor.chain().focus().mergeCells().run(),setWidth:()=>{Kc.editor.commands.updateAttributes("table",{width:"300px"})}}}render(){return bt.dy`<div
1723
1723
  class="editor cdtr-button-cmd"
1724
1724
  style="width:auto;top:${parseInt(this.top)}px;left:${this.left}px"
1725
1725
  >
@@ -5986,4 +5986,4 @@ padding-right: 10px;"
5986
5986
  .popover-content.mobile-centered::before {
5987
5987
  display: none;
5988
5988
  }
5989
- `;let Hc=zc;function jc(t){if("string"!=typeof t)return!1;const e=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","prs","ps","sd","ug","ur","yi"].find((e=>e===t.toLowerCase()));return!!e}Nc([Ql({type:String})],Hc.prototype,"width"),Nc([Ql({type:Boolean})],Hc.prototype,"opened"),Nc([Ql({type:String})],Hc.prototype,"placement"),Nc([Ql({type:Boolean,attribute:!1})],Hc.prototype,"isMobileView"),customElements.get(Dc)||customElements.define(Dc,Hc),s.e(6737).then(s.bind(s,36737)),s.e(2340).then(s.bind(s,32340)),Promise.all([s.e(4050),s.e(1410)]).then(s.bind(s,1410)),Promise.resolve().then(s.bind(s,9545)),s.e(4).then(s.bind(s,70004)),s.e(3381).then(s.bind(s,63381)),s.e(6892).then(s.bind(s,6892)),Promise.all([s.e(2475),s.e(7911)]).then(s.bind(s,47911)),s.e(6588).then(s.bind(s,76588)),Promise.resolve().then(s.bind(s,71781)),s.e(9838).then(s.bind(s,19838)),s.e(1650).then(s.bind(s,81650)),Promise.all([s.e(4050),s.e(6220),s.e(1449),s.e(4159)]).then(s.bind(s,4159)),s.e(709).then(s.bind(s,20709)),s.e(8333).then(s.bind(s,48333)),Promise.resolve().then(s.bind(s,35432)),s.e(6961).then(s.bind(s,6961)),Promise.resolve().then(s.bind(s,42729)),s.e(2543).then(s.bind(s,62543)),s.e(7804).then(s.bind(s,77804)),s.e(4648).then(s.bind(s,24648)),s.e(42).then(s.bind(s,30042)),s.e(9476).then(s.bind(s,99476)),s.e(2050).then(s.bind(s,42050)),s.e(6700).then(s.bind(s,75478)),s.e(9203).then(s.bind(s,49203)),s.e(132).then(s.bind(s,90132)),s.e(3732).then(s.bind(s,43732)),s.e(3847).then(s.bind(s,13847)),s.e(4212).then(s.bind(s,14212)),s.e(6308).then(s.bind(s,36308)),s.e(6308).then(s.bind(s,36308)),s.e(185).then(s.bind(s,10185)),s.e(6052).then(s.bind(s,86052)),s.e(7490).then(s.t.bind(s,97490,23)),s.e(6430).then(s.bind(s,16430)),s.e(2416).then(s.bind(s,32416)),s.e(7837).then(s.bind(s,37837)),s.e(8724).then(s.bind(s,88724)),s.e(6236).then(s.bind(s,46236)),s.e(3622).then(s.bind(s,53622)),s.e(1790).then(s.bind(s,81790)),s.e(9001).then(s.bind(s,59001)),s.e(5848).then(s.bind(s,95848)),s.e(201).then(s.bind(s,10201)),s.e(1867).then(s.bind(s,51867)),s.e(5985).then(s.bind(s,55985)),s.e(296).then(s.bind(s,60296)),s.e(6807).then(s.bind(s,36807)),Promise.resolve().then(s.bind(s,50629)),s.e(2087).then(s.bind(s,12087)),s.e(3755).then(s.bind(s,83755)),s.e(116).then(s.bind(s,50116)),s.e(5034).then(s.bind(s,75034)),s.e(4473).then(s.bind(s,4473)),s.e(7597).then(s.bind(s,87597)),s.e(1199).then(s.bind(s,31199)),s.e(4661).then(s.bind(s,84661)),s.e(2357).then(s.bind(s,72357)),s.e(2118).then(s.bind(s,92118)),s.e(494).then(s.bind(s,10494)),s.e(4569).then(s.bind(s,4569)),s.e(3831).then(s.bind(s,73831)),s.e(966).then(s.bind(s,60966)),s.e(5581).then(s.bind(s,35581)),s.e(8251).then(s.bind(s,38251)),s.e(8290).then(s.bind(s,88290)),s.e(4900).then(s.bind(s,74900)),s.e(2022).then(s.bind(s,32022)),s.e(3794).then(s.bind(s,83794)),s.e(6046).then(s.bind(s,76046)),s.e(6593).then(s.bind(s,76593)),s.e(6883).then(s.bind(s,46883)),s.e(9050).then(s.bind(s,99050)),s.e(6479).then(s.bind(s,86479)),s.e(8522).then(s.bind(s,78522)),s.e(7149).then(s.bind(s,67149)),s.e(308).then(s.bind(s,90308)),s.e(3020).then(s.bind(s,63020)),s.e(5910).then(s.bind(s,55910)),s.e(8287).then(s.bind(s,58287)),s.e(9136).then(s.bind(s,59136)),s.e(6196).then(s.bind(s,46196)),s.e(1381).then(s.bind(s,71381)),s.e(6524).then(s.bind(s,54050)),s.e(19).then(s.bind(s,19)),s.e(5478).then(s.bind(s,35478)),s.e(1101).then(s.bind(s,31101)),s.e(2721).then(s.bind(s,2721)),s.e(2365).then(s.bind(s,82365)),s.e(2182).then(s.bind(s,12182)),s.e(8073).then(s.bind(s,18073)),Promise.all([s.e(4050),s.e(6220),s.e(1449),s.e(9628)]).then(s.bind(s,99628)),Promise.all([s.e(2609),s.e(4128)]).then(s.bind(s,14128)),Promise.all([s.e(4050),s.e(6220),s.e(9201)]).then(s.bind(s,99201)),Promise.all([s.e(4050),s.e(6220),s.e(2609),s.e(168)]).then(s.bind(s,30168)),Promise.resolve().then(s.bind(s,72743)),s.e(5246).then(s.bind(s,45246)),s.e(2397).then(s.bind(s,62397)),s.e(6993).then(s.bind(s,26993)),vo({href:"https://fonts.googleapis.com",ref:"preconnect",crossorigin:!0}),vo({href:"https://fonts.gstatic.com",ref:"preconnect",crossorigin:!0});const Uc=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;const s=[{type:"heading",level:6,text:"rootelement_editor_top_header"},{type:"fontFamily",text:"fontFamily",value:e.props?.style?.fontFamily,onChange:t=>{const e=t.target.value,n=(fe.h.get("components"),ge.Z.getComponents().find((t=>"root"===t.type))),r=[];ge.Z.store().execCommand("style",{fontFamily:e}),n.treeWalk((t=>{if(t&&t.props&&!["root","section","block","row","col"].find((e=>e===t.type))&&(t.props.style&&t.props.style.fontFamily!==e&&ge.Z.store().updateComponent(t,"style",{fontFamily:e}),t.type.equalWith("text")&&r.push(t.tiptap),Array.isArray(t.props.items))){const n=JSON.parse(JSON.stringify(t.props.items));n.forEach((t=>{t&&(t.style?t.style.fontFamily=e:t.props&&t.props.style&&(t.props.style.fontFamily=e),t.props&&t.props.label_field&&t.props.label_field.props&&t.props.label_field.props.style&&(t.props.label_field.props.style.fontFamily=e))})),ge.Z.store().updateComponent(t,"items",n)}})),r.forEach((t=>{t.chain().selectAll().setFontFamily({cssRule:e}).run()}))}},{type:"slider",title:"block_width",min:500,max:1200,value:(()=>{const t=e.find("section").find("block");return parseInt(t?.props.style.width)})(),onInput:t=>{let n=t.target.value;n<500&&(n=500),n>1200&&(n=1200);const r=(()=>{const t=[],n=e.find("section");return n&&n.children.forEach((e=>{const n=fe.h.get("components",e);n&&"block"===n.type&&t.push(n)})),t})();ge.Z.store().execCommand2({transactions:[{key:"style",value:{width:n+"px",maxWidth:"100%"}}],update:r})}},{type:"divider"},{type:"colorpicker",alpha:!1,value:e.props.style.background||"#fff",title:"page_background",onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e})}},{type:"divider"},{type:"colorpicker",alpha:!1,title:"bgColor_blocks",onChange:t=>{const e=t.target.value,n=fe.h.get("components").filter((t=>t.type.equalWith("block")));ge.Z.store().execCommand2({transactions:[{key:"style",value:{background:e}}],update:n})}},{type:"divider"},{type:"heading",level:6,text:"rootelement_editor_global_colors_heading"},{type:"heading",level:6,text:"Primary"},{type:"colorpicker",alpha:!1,title:"primaryColor",value:e.props.primaryColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("primaryColor",e)}},{type:"colorpicker",alpha:!1,title:"primaryContrastColor",value:e.props.primaryContrastColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("primaryContrastColor",e)}},{type:"divider"},{type:"heading",level:6,text:"secondary"},{type:"colorpicker",alpha:!1,title:"secondaryColor",value:e.props.secondaryColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("secondaryColor",e)}},{type:"colorpicker",alpha:!1,title:"secondaryContrastColor",value:e.props.secondaryContrastColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("secondaryContrastColor",e)}}];return s}}}},Zc=t=>{let{helpers:e,template:n,globalStylesVar:r}=t;return{set:(t,i,o)=>{switch(i){case"style":return t[i]=o,e.mergeDiff(n,{style:t[i]}),!0;case"fontFamily":case"fontSize":case"paragraphFontSize":case"headingLvlOneFontSize":return t[i]=o,!0;case"primaryColor":case"secondaryColor":case"primaryContrastColor":case"secondaryContrastColor":case"secondaryColor":return t[i]=o,r.patch(t),!0;default:return!1}}}};var Fc=s(8831),Vc={};Vc.setAttributes=u(),Vc.insert=p().bind(null,"head"),Vc.domAPI=c(),Vc.insertStyleElement=m();o()(Fc.Z,Vc);const Yc=Fc.Z&&Fc.Z.locals?Fc.Z.locals:void 0,Wc=document.createElement("style");Wc.patch=function(t){let{primaryColor:e,primaryContrastColor:n,secondaryColor:r,secondaryContrastColor:i}=t;e&&(Wc.innerHTML=`:root{--cdtr-primary:${e}}`),r&&(Wc.innerHTML+=`:root{--cdtr-secondary:${r}}`),i&&(Wc.innerHTML+=`:root{--cdtr-secondary-contrast:${r}}`),n&&(Wc.innerHTML+=`:root{--cdtr-primary-contrast:${n}}`)};const qc=()=>{const t="root";return{name:t,create:e=>{const{createElement:n,compose:i,helpers:o}=e,{children:s,backgrounds:a,commands:l}=i,{mergeDiff:c,arrayToString:d}=l;i.style||(i.style={});const p=d("root-component",i.classList,Yc.root);document.head.append(Wc),Wc.patch(i.props);const h=(0,r.Z)("div",{"data-id":i.id},s),u=(0,r.Z)("div",(0,A.Z)({},i,{className:p}),h);let f,m,g=(0,r.Z)("style",null,'\n .text-component:after{\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n }\n ');new vc.ZP(h,{group:"section-component",animation:450,handle:".section-handle--sortable",onStart:t=>{document.body.style.position="fixed",document.body.appendChild(g);const e=t.item;f=e.previousSibling?.dataset.id,m=e.nextSibling?.dataset.id},onEnd:function(t){document.body.style.position=null,g.remove();const e=t.item,n=t.to,r=t.from,i=t.oldIndex,o=t.newIndex;t.oldDraggableIndex,t.newDraggableIndex,t.clone,t.pullMode;ge.Z.store().moveComponent({componentId:e.dataset.id,newParentId:n.dataset.id,oldParentId:r.dataset.id,oldIndex:i,newIndex:o})}});return ge.Z.on("update",(()=>{setTimeout((()=>{const t=u.querySelector(`.${Yc.placeholder}`),e=h.children.length;0===e&&t||(e>0&&t?t.remove():0!==e||t||u.appendChild((0,r.Z)("div",{className:Yc.placeholder},(0,r.Z)("h1",null,"זה דף ריק,לחצו כאן כדי להוסיף אלמנטים, ורקעים"),(0,r.Z)("div",null,(0,r.Z)("paper-button",{onMousedown:()=>{be.Z.dispatch("open_add_menu",{type:"section-component"})},style:"color:var(--primary)"},(0,r.Z)("lang-text",{text:"for_quike_action_click_here"}))))))}),0)})),n({name:t,id:i.id,template:u,childrenHolder:h,allowSortable:!0,defaultProps:{},validator:Zc({template:u,helpers:o,globalStylesVar:Wc}),schema:i.schema,onSelect:()=>{},onDeselect:()=>{},elementProps:i,remove:()=>{u.remove()},createEditor:Uc})}}};var Xc=s(64721);const Gc=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"},{text:"animations"},{text:"settings"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;const s=e.closest("col"),a=[{type:"colorpicker",title:"background",value:e.props.style.background,onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e})}},,{type:"slider",title:"width",value:parseFloat(e.props.style.width),unit:"px",min:20,max:parseInt(window.getComputedStyle(s.element).width),onInput:t=>{const e=t.target.value;n.execCommand("style",{width:e+"px"})}},{type:"slider",title:"height",value:parseFloat(e.props.style.minHeight)||0,unit:"px",min:100,max:800,onInput:t=>{const e=t.target.value;n.execCommand("style",{minHeight:e+"px"})}}];return a}}}};s(46245);const Kc=t=>{let{helpers:e}=t;return{set:(t,n,r)=>{if("style"===n)return t[n]=e.deepMerge(t[n],r),!0}}};var Jc=s(77814),Qc={};Qc.setAttributes=u(),Qc.insert=p().bind(null,"head"),Qc.domAPI=c(),Qc.insertStyleElement=m();o()(Jc.Z,Qc);const td=Jc.Z&&Jc.Z.locals?Jc.Z.locals:void 0,ed=t=>{let{channel:e}=t;const n="card";return{name:n,menu:t=>{let{Compose:e}=t;return new e({type:n,children:[{type:"image",props:{}}],props:{style:{width:"300px",background:"#fff"}}},{group:"col",name:n,puzzle:[{type:"article"}],tags:[n],index:null})},create:t=>{const{createElement:e,compose:r,helpers:i}=t,{arrayToString:o,mergeDiff:s}=i,{children:a}=r,l=o(td.root,r.classList),c=document.createElement("div"),d=document.createElement("div");a[0].forEach((t=>{d.appendChild(t)})),c.append(d),c.className=l;const p=r.props.style;return delete p.border,delete p.borderWidth,delete p.borderStyle,delete p.borderColor,e({name:n,id:r.id,template:c,handleBar:!0,render:()=>{const t=p.width;if(p.height||(c.style.height="100%"),!parseInt(t)&&p.maxWidth){const t=p.padding||0;p.width=parseInt(p.maxWidth)-2*parseInt(t,10)+"px"}s(c,{style:p})},draggable:{group:"col"},childrenHolder:d,allowSortable:!0,defaultProps:{style:{background:"#fff",borderRadius:".2rem",width:"300px",maxWidth:"100%"}},validator:Kc({template:c,helpers:i,children:a}),schema:r.schema,onSelect:t=>{c.classList.add(t)},onDeselect:t=>{c.classList.remove(t)},elementProps:r,remove:()=>{c.remove()},createEditor:Gc})}}};let nd;const rd=class{constructor(e){let r;if((0,t.Z)(this,"site",void 0),(0,t.Z)(this,"commands",void 0),(0,t.Z)(this,"editor",void 0),e.channel||(e.channel="newsletter"),this.editor={setContent:t=>{nd&&nd.remove(),nd=wo({target:e.target,page:{},components:t||[]},(()=>{}))}},this.commands={snackbar:t=>{be.Z.dispatch("snackbar",{text:t})},langs:()=>fe.h.get("lang"),lang:t=>fe.h.get("lang",t),injectEditor:t=>{const e=fe.h.get("injectEditor");e&&e(t)},execCommand:(t,e)=>{ge.Z.store().execCommand(t,e)},toJSON:tc.au,toHTML:tc.io},fe.h.set({commands:this.commands}),e.target)if("string"==typeof e.target){if(r=document.getElementById(e.target),!r)throw new Error("string must be valid id or htmlElement")}else e.target instanceof HTMLElement?r=e.target:(r=document.createElement("div"),document.body.appendChild(r));else r=document.createElement("div"),e.target=r;fe.h.set({editor:ge.Z});const i=e.target;i.style.maxHeight="100vh",i.style.overflow="hidden",i.style.position="relative",ge.Z.on("change",(()=>{(0,tc.au)()})),fe.h.set({app:{_id:e.appId,name:e.documentName}}),e.languageJson&&fe.h.set({lang:e.languageJson}),ge.Z.configure=e?.editor?.configure;const o=e.language;!function(){if(jc(o)){fe.h.set({langConfig:{direction:"rtl",align:"right",justifyContent:"flex-start",justify:"start"}}),e.theme.textAlign=e.theme.textAlign?e.theme.textAlign:"right",e.theme.direction=e.theme.direction?e.theme.direction:"rtl",e.theme.justifyContent=e.theme.justifyContent?e.theme.justifyContent:"flex-start",e.theme.rowDirection=e.theme.rowDirection?e.theme.rowDirection:"row";const t=n(e.theme);fe.h.set({theme:t.theme}),i.appendChild(t.styleTag)}else{fe.h.set({langConfig:{direction:"ltr",align:"left",justifyContent:"flex-end",justify:"end"}}),e.theme.textAlign=e.theme.textAlign?e.theme.textAlign:"left",e.theme.direction=e.theme.direction?e.theme.direction:"ltr",e.theme.justifyContent=e.theme.justifyContent?e.theme.justifyContent:"flex-end",e.theme.rowDirection=e.theme.rowDirection?e.theme.rowDirection:"row-reverse";const t=n(e.theme);fe.h.set({theme:t.theme}),i.appendChild(t.styleTag)}let t=ge.Z?.configure?.plugins;Array.isArray(t)||(t=[]),t.push(qc),t.push(Xc.Z),t.push(ed),t=t.map((t=>t({channel:e.channel||"web",languages:e.languageJson,direction:fe.h.get("langConfig").direction,textAlign:fe.h.get("langConfig").align})));const r=e;r.editor.configure.plugins=t,fe.h.set({config:r,schemes:t}),nd=wo({target:e.target,page:{},components:e.components||[]},(()=>{const t=fe.h.get("components").find((t=>"root"===t.type));t&&ge.Z.clean().selectComponent(t)}))}(),e.collaborator,ge.Z.connectWithCloud(e.collaborator)}};function id(){const t="image";return{id:"1",name:t,menu:e=>{let{Compose:n}=e;return new n((()=>{const e="400px",n="250px";return{type:t,props:{alt:"image",width:e,height:n,style:{height:"auto",width:e,maxWidth:"100%",minWidth:"30px",objectFit:"fill"},src:`https://api.creaditor.com/images/placeholder?width=${parseInt(e)||250}&height=${parseInt(n)||250}`,isOpenWithModal:!1,isFullWidthOnMobile:!1,isRatioLock:!0}}})(),{group:"elements",name:t,puzzle:[{type:"image"}],tags:[t],index:null})},lazy:t=>{s.e(7946).then(s.bind(s,7946)).then((e=>{t(e.default())}))}}}function od(t){const{languages:e,direction:n,textAlign:r}=t,i="@paragraph/text";return{id:i,name:i,menu:t=>{let{Compose:o}=t;return new o({type:i,props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:r},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"#000"}}],type:"text",text:e.generalText}]}]}}}},{group:"elements",name:"text",puzzle:[{type:"text"}],tags:[i],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(od.data))}))}}}od.configure=t=>{let{fontSize:e,title:n,suffix:r,prefix:i,fonts:o,direction:s,textAlign:a}=t;return od.data={fontSize:e,title:n,suffix:r,prefix:i,fonts:o,direction:s,textAlign:a},od};const sd="video";function ad(t){let{channel:e}=t;return"web"===e?{id:"vvidoe-4Kj^43",name:sd,menu:t=>{let{Compose:e}=t;return new e({type:sd,props:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},{group:"elements",name:sd,puzzle:[{type:"video"}],tags:[sd],index:null})},lazy:t=>{Promise.all([s.e(3691),s.e(3585)]).then(s.bind(s,83585)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"vvidoe-4Kj^43",name:sd,menu:t=>{let{Compose:e}=t;return new e({type:sd,props:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},{group:"elements",name:sd,puzzle:[{type:"video"}],tags:[sd],index:null})},lazy:t=>{Promise.all([s.e(3691),s.e(6069)]).then(s.bind(s,46069)).then((e=>{t(e.default())}))}}:void 0}function ld(t){const{languages:e,direction:n,textAlign:r}=t,i="text",o=`${i}/heading1`;return{id:o,name:i,menu:t=>{let{Compose:s}=t;return new s({type:i,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:n,textAlign:r},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"62px",color:"#000"}}],type:"text",text:e.bigHeading}]}]}}}},{id:o,group:"elements",name:"heading 1",puzzle:[{type:"heading1"}],tags:[i],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(ld.data))}))}}}function cd(t){const e="text",{languages:n,direction:r,textAlign:i}=t;return{id:"5445",name:e,menu:t=>{let{Compose:o}=t;return new o({type:e,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:2,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"42px",color:"#000"}}],type:"text",text:n.mediumHeading}]}]}}}},{id:`${e}/heading2`,group:"elements",name:"heading 2",puzzle:[{type:"heading2"}],tags:[e],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(cd.data))}))}}}function dd(t){const e="text",{languages:n,direction:r,textAlign:i}=t;return{id:"544663",name:e,menu:t=>{let{Compose:o}=t;return new o({type:e,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:3,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"#000"}}],type:"text",text:n.smallHeading}]}]}}}},{id:`${e}/heading3`,group:"elements",name:"heading 3",puzzle:[{type:"heading3"}],tags:[e],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(dd.data))}))}}}ld.configure=t=>(ld.data=t,ld),cd.configure=t=>(cd.data=t,cd),dd.configure=t=>(dd.data=t,dd);const pd="countdown";function hd(t){let{channel:e}=t;return"web"===e?{id:"1",name:pd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setHours(n.getMinutes()+30),{type:pd,props:{hasColons:!0,hasLabels:!0,date:n.toString(),language:"he",style:{},classList:[],containerWidth:"300px",containerBg:"transparent",containerRadius:"0",colBg:"transparent",colBorderStyle:"none",colBorderSize:"0",colBorderColor:"none",colBorderPadding:"0",colBorderRadius:"100px",numberSize:"30px",numberColor:"black",numberFontFamily:"Arial",labelSize:"14px",labelColor:"black",labelfontFamily:"Arial"}}),{id:pd,group:"elements",name:pd,puzzle:[{type:"countdown"}],tags:[pd],index:null});var n},lazy:t=>{s.e(9e3).then(s.bind(s,99e3)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:pd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:pd,props:{hasColons:!0,hasLabels:!0,date:n.toString(),language:"he",style:{},classList:[],containerWidth:"400px",containerBg:"transparent",containerRadius:"0",colBg:"transparent",colBorderStyle:"none",colBorderSize:"0",colBorderColor:"none",colBorderPadding:"0",colBorderRadius:"100px",numberSize:"30px",numberColor:"black",numberFontFamily:"Arial",labelSize:"14px",labelColor:"black",labelfontFamily:"Arial"}}),{group:"elements",name:pd,puzzle:[{type:"countdown"}],tags:[pd],index:null});var n},lazy:t=>{s.e(5204).then(s.bind(s,95204)).then((e=>{t(e.default())}))}}:void 0}function ud(t){const{languages:e}=t,n="button";return{id:"button-menu",name:n,menu:t=>{let{Compose:r}=t;return new r({type:n,props:{text:e.readMore,style:{height:"auto",width:"100px",maxWidth:"100%",minWidth:"30px",background:"#000",color:"#fff"}}},{group:"elements",name:n,puzzle:[{type:"button"}],tags:[n],index:null})},lazy:t=>{s.e(9800).then(s.bind(s,29800)).then((e=>{t(e.default())}))}}}const fd="map";function md(t){let{channel:e}=t;return"web"===e?{id:"1",name:fd,menu:t=>{let{Compose:e}=t;return new e({type:fd,props:{width:200,height:200,style:{height:"200px",width:"200px"},address:"תל אביב"}},{group:"elements",name:fd,puzzle:[{type:"map"}],tags:[fd],index:null})},lazy:t=>{s.e(9265).then(s.bind(s,59265)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:fd,menu:t=>{let{Compose:e}=t;return new e({type:fd,props:{width:200,height:200,style:{height:"200px",width:"200px"},address:"תל אביב",lang:"he"}},{group:"elements",name:fd,puzzle:[{type:"map"}],tags:[fd],index:null})},lazy:t=>{s.e(6234).then(s.bind(s,46234)).then((e=>{t(e.default())}))}}:void 0}const gd="social";function bd(t){let{channel:e}=t;return"web"===e?{id:"1",name:gd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:gd,props:{}}),{group:"elements",name:gd,puzzle:[{type:"social"}],tags:[gd],index:null});var n},lazy:t=>{s.e(9e3).then(s.bind(s,99e3)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:gd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:gd,props:{style:{gap:"10px"},items:[{id:(0,Mn.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},url:"https://youtube.com",src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/youtube.png"},{id:(0,Mn.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/snapchat.png"},{id:(0,Mn.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},url:"https://whatsapp.com",src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/whatsapp.png"}]}}),{group:"elements",name:gd,puzzle:[{type:"social"}],tags:[gd],index:null});var n},lazy:t=>{s.e(7637).then(s.bind(s,77637)).then((e=>{t(e.default())}))}}:void 0}function yd(t){const e=t?.heading,n=t?.text,r=t?.direction,i=t?.textAlign;return{type:"card",props:{style:{width:"95%",maxWidth:"345px",padding:"10px"}},children:[{type:"col",children:[{type:"image",props:{src:"https://api.creaditor.com/images/placeholder?width=350&height=150",width:400,height:150,isFullWidthOnMobile:!0,style:{width:"100%"}}}]},{type:"col",children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:n}]}]}}}}]},{type:"col",props:{justify:"rtl"===r?"end":"start",style:{}},children:[{type:"button",props:{style:{}}}]}]}}function Ad(t){const e=t?.text;return{type:"row",props:{style:{width:"300px"}},children:[{type:"col",props:{lg:12,sm:12,justify:"end"},children:[{type:"image",draggable:!1,props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/last-post-quotes.png",width:24,height:24,style:{width:"24px",height:"24px"}}}]},{type:"col",props:{lg:12,sm:12},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:"rtl",textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"#000"}}],type:"text",text:e}]}]}}}}]},{type:"col",props:{lg:12,sm:12,justify:"start"},children:[{type:"image",draggable:!1,props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/last-post-quotes.png",width:24,height:24,style:{width:"24px",height:"24px"}}}]}]}}function wd(t){let{homePageText:e,direction:n,textAlign:r}=t;return{name:"contact",icon:[{type:"contact"}],tags:["image","two images"],children:[{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/mail.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:"example@example.com"}]}]}}}}]},{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/website.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/phone.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:"0505891010"}]}]}}}}]}]}}function vd(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.width||400,n=t.height||200;return{type:"image",props:{alt:"image",width:e,height:n,style:{height:"auto",width:e,maxWidth:"100%",minWidth:"30px",objectFit:"fill"},src:`https://api.creaditor.com/images/placeholder?width=${parseInt(e)||250}&height=${parseInt(n)||250}`,isOpenWithModal:!1,isFullWidthOnMobile:!1,isRatioLock:!0}}}function xd(){const t={width:300,height:200};return{name:"two images",icon:[{type:"image"},{type:"image"}],tags:["image"],children:[vd(t),vd(t)]}}function _d(){const t={width:200,height:200};return{name:"threeImages",icon:[{type:"image"},{type:"image"},{type:"image"}],tags:["quote"],children:[vd(t),vd(t),vd(t)]}}function kd(){const t={width:150,height:100};return{name:"fourImages",icon:[{type:"image"},{type:"image"},{type:"image"},{type:"image"}],tags:["image"],children:[vd(t),vd(t),vd(t),vd(t)]}}function Cd(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t?.text;return{type:"button",props:{style:{height:"40px",padding:"10px",borderRadius:"5px"},text:e}}}function Ed(t){const e=t?.heading,n=t?.text,r=t?.direction,i=t?.textAlign;return{type:"card",id:"card-title-txt-bton",props:{style:{width:"95%",maxWidth:"345px",background:""}},children:[{type:"col",props:{alignItems:"center"},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",props:{alignItems:"center"},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:n}]}]}}}}]},{type:"col",props:{justify:"rtl"===r?"end":"start",style:{}},children:[{type:"button",props:{style:{marginTop:"10px"}}}]}]}}const Sd=JSON.parse('{"name":"שם","link":"קישור","secureLink":"קישור מאובטח","tel":"טלפון","email":"אימייל","items":"פריטים","confirm":"אישור","contact":"יצירת קשר","loadingMore":"טוען תמונות נוספות...","loading":"טוען...","image_in_progress":"התמונה נוצרת...","expand_image_for_outlook_description":"כדי שהתמונה תוצג ותשמור על פרופורציות - הפעילו את הצ׳קבוקס כדי לשמור על גובה התמונה.","email_600":"הפרקטיקות המומלצות לעיצוב מיילים קובעות שגודל הרוחב האידיאלי של ניוזלטר הוא 600 פיקסלים. מספר זה היה הסטנדרט במשך שנים רבות.","mergeTags":"תגיות מיזוג","simply:Scratchcard":"כרטיס גירוד","is_user_wants_https":"להחליף את הקישור לhttps?","social":"רשתות חברתיות","prompt_editor_context":"האם להתייחס לטקסט הקיים?","Enter_your_business_name":"הכניסו את שם העסק שלכם","Enter_your_business_type":"הכניסו את סוג העסק שלכם","Enter_the_URL_of_the_page":"הכניסו את כתובת הדף שלכם","secure_link":"קישור מאובטח","bulletColor":"צבע הבולט","links_with_invalid_url":"קישורים עם כתובות לא תקינות","images_without_alt":"תמונות ללא תיאור","savedLinks":"קישורים שמורים","sms_body_if_needed":"גוף ההודעה אם נדרש","whatsapp_body_if_needed":"הודעת וואטסאפ אם נדרש","twoImages":"שתי תמונות","fourImages":"ארבע תמונות","threeImages":"שלוש תמונות","threeButtons":"שלושה כפתורים","borderSize":"גודל הגבול","file":"קובץ","root":"הדף","col":"עמודה","inline-image":"תמונה פנימית","link_of_button":"לאן הכפתור מוביל ?","addedToFavorite":"התווסף למועדפים","removedFromFavorite":"נמחק מהמועדפים","choose_backgroundColor":"בחרו צבע רקע","removedSuccess":"נמחק בהצלחה","aToZ":"א-ת","zToA":"ת-א","anchorName":"שם העוגן","inputEmptyError":"יש למלא את השדה","savedSuccess":"נשמר בהצלחה","createdSuccessfully":"בוצע בהצלחה","texts":"טקסטים","numOneAsFemale":"אחת","click_here_to_add":"לחצו להוספה","heading":"כותרת","bigHeading":"כותרת גדולה","readMore":"קראו עוד","mediumHeading":"כותרת בינונית","smallHeading":"כותרת קטנה","icons":"אייקונים","divider":"קו מפריד","bullets":"בולטים","numbered":"מספור","ok":"אוקי","newImage":"תמונה חדשה","newFolder":"תיקיה חדשה","folders":"תיקיות","edit":"עריכה","article":"מאמר","videoWithArticle":"וידאו עם מאמר","fit_colors":"צבעים מתאימים","plainSection":"מקטע ריק","iamgeWithArticle":"תמונה עם מאמר","imageWithText":"תמונה עם טקסט","BulletsWithImage":"בולטים עם תמונה","BulletsWithArticle":"בולטים עם מאמר","SocialNetwork":"רשת חברתית","twoArticles":"שני מאמרים","twoButtons":"שני כפתורים","threeArticles":"שלושה מאמרים","imageWithBullets":"תמונה עם בולטים","undo":"ביטול","redo":"ביצוע מחדש","wide":"מתוח לכל האוחב","click_to_add":"","videos":"סרטונים","empty_section_info":"זהו מקטע ריק, לחצו כאן כדי להוסיף בלוקים","text:button":"מה הכפתור אומר?","video":"סרטון","images":"תמונות","image":"תמונה","weight":"עובי","buttons":"כפתורים","button":"כפתור","general":"כללי","all":"הכל","myImages":"התמונות שלי","uploadSuccess":"העלאה הושלמה","fromOldToNew":"מהישן לחדש","fromNewToOld":"מהחדש לישן","download":"הורדה","quotes":"ציטוט","recommended":"מומלץ","save_block":"שמירת בלוק","what_category":"באיזו קטגוריה?","middle":"אמצע","give_name_to_block":"תנו שם לבלוק","quote":"ציטוט","no_responsive":"ביטול רספונסיביות","home_page":"דף הבית","quote | image":"ציטוט | תמונה","image | quote":"תמונה | ציטוט","image | card":"כרטיס | תמונה","card | image":"תמונה | כרטיס","quotesWithText":"ציטוט עם טקסט","delete":"מחיקה","anchor":"עוגן","drag_section":"החליפו מיקום עם מקטע אחר","drag_block":"לחצו לבחירה או גררו לשנות את המיקום","remove_block":"הסרת בלוק","duplicate_block":"שכפול בלוק","deleteElement":"מחיקת אלמנט","deleteBlock":"מחיקת בלוק","preview":"תצוגה מקדימה","design":"עיצוב","changeName":"שינוי שם","upload":"העלאת תמונה","add":"הוספה","publish":"פרסם","addons":"תוספות","duo":"מועד","position":"מיקום","drag_to_move_click_to_options":"גרירה להזזה, לחיצה להגדרות","save":"שמירה","repeat":"חזור","autoplay":"הפעל מיד","expand_image_for_outlook":"הגדלת תמונה לאאוטלוק","errors_to_fix":"שגיאות לתיקון","buttons_without_links":"כפתורים ללא קישור","images_with_default_src":"תמונות עם כתובת דיפולטית","urlAddressToYoutVimeo":"שורת כתובת ליוטיוב, וימאו","add_urlAddress_from_media_site":"קישור חיצוני","remove_background_movie":"הסרת רקע","playInLoop":"הפעל בלופ","height_in_section":"גובה, 100 יפרס לכל גובה המסך בהתאם למכשיר","cellSpace":"ריווח תא","numbers":"מספרים","titles":"כותרות","go_to_edit_mode":"חזרה למצב עריכה","auto":"אוטומטי","search":"חיפוש","showAsImage":"הצג כתמונה","titlesStyle":"עיצוב הכותרות","delete_section":"הסרת מקטע","numbersStyle":"עיצוב המספרים","slientMode":"מצב השתק","ratioLock":"נעילת יחס","choose_your_duo_date":"בחרו את המועד הסופי","videoLink":"קישור לסרטון","openAsModal":"פתח תמונה בחלון צף","innerBackgroundColor":"רקע פנימי","radius":"רדיוס","iconsColor":"צבע האייקונים","whereIframeLink":"לאן האייפרם מכוון?","whereIsLinkTo":"?לאן הקישור מכוון","dividerColor":"צבע קו מפריד","buttonText":"טקסט הכפתור","settings":"הגדרות","counterTitle":"הצגת כותרות","foreColor":"צבע הטקסט","colors":"צבעים","marginBottom":"ריווח תחתון","color":"צבע","openGalleryImage":" גלריית תמונות","icon_gallery":"גלריית אייקונים","folderName":"שם תיקיה","addFolder":"הוספת תיקיה","newFolderAdded":"התיקיה ונוספה בהצלחה","file_moved_to_new_folder":"הקובץ הועבר לתיקיה אחרת","add_block":"הוספת בלוק","counterColor":"צבע למונה","chooseBlock":"גרור בלוק","automations":"אוטומציות","list-settings":"מתקדם","page_background":"רקע הדף","bgColor_blocks":"רקע הבלוקים","create_anchor":"צריכים עוגן? לחצו פה","copy":"העתק","uploading":"אני עובד על זה!","verifying":"רגע... כמה בדיקות קטנות","completed":"זהו... סיימתי!","timeout":"אופס! לא בטוח מה קרה פה...","copy_to_here":"העתקה לכאן","addLinks":"הוספת קישור","keep_ratio":"שמירת יחס","list-check":"אלמנטים","powered_by_pexels":"כל התמונות מאתר Pexels","image_micro_copy":"הוסיפו תמונה(אבל אחת יפה) בלחיצה על הכפתור, או לחיצה כפולה על התמונה","typography_micro_copy":"סמנו בדיוק את המילה, או בכלל לא כדאי לעצב את הטקסט","icons_list_micro_copy":"במידה ובולט לא נראה רציני במיוחד, החליפו אותו עם אייקון מעוצב ","anchor_name_micro_copy":"תנו לעוגן שם עכשיו, ותוכלו למצוא אותו בעריכת הקישורים אחר כך.","imageEditTitle":"עריכת תמונה","generate_content":"יצירת תוכן","creating_magic":"אני יוצר את התוכן שלכם...","address":"כתובת","prompt_editor_title":"יצירת תוכן","prompt_editor_textarea_placeholder":"תארו את התמונה שברצונכם לייצר","block_width":"רוחב הבלוקים","describe_image_prompt_input":"תארו את התמונה שברצונכם לייצר","image_prompt_editor_description":"אנחנו יכולים לייצר תמונה בהתאם לתיאור שתכתבו כאן, בלחיצה על כפתור הבחירה תוכלו לבחור תמונה מגלריית התמונות שלכם, או להכניס כתובת תמונה של תמונה חיצונית","insert_image":"בחירה","generate_image":"יצירת תמונה","generating":"אני עובד על זה...","creating_your_masterpiece":"אני יוצר את התמונה שלך...","he":"עברית","en":"אנגלית","ar":"ערבית","empty_state":"שקט פה.. שנתחיל שיחה?","videoEditTitle":"עריכת סרטון","backgroundColor":"צבע רקע","labels":"כותרות","add_table":"הוספת טבלה","button_design":"עיצוב הכפתור","background:form":"רקע הטופס","background:fields":"רקע השדות","width:form":"רוחב הטופס","no_editor:title":"עדיין לא יצרנו עריכה לאלמנט הזה, אנחנו עובדים על זה.","addons_menu:title":" תפריט התוספים, זה החלק המעניין, פה ניתן למצוא תוספים לשדרוג התוכן שלכם. פיצ\'רים נוספים יעלו בקרוב. בנתיים ניתן לגרור את האלמנט לבלוק או מקטע בגרירה חופשית לכל נקודה שתרצו..","sections_menu:title":"תפריט מקטעים, יצירת מקטע דורשת תשומת לב רבה לצרכים שלך, אנחנו עוד עובדים על זה, בנתיים ניתן ליצור מקטע ריק.","backgrounds_menu:title":"תפריט רקעים, בחרו רקע, אבל אחד יפה, וגררו אותו לבלוק או מקטע.","blocks_menu:title":"תפריט בלוקים, פה ניתן למצוא קומפוזציות של כמה אלמנטים שונים, ניתן לגרור אותם בין הבלוקים השונים ובין המקטעים ","elements_menu:title":"תפריט אלמנטים, גררו את האלמנט לצד אלמנט, התקרבו לפינה כדי לפתוח כתא חדש, או פשוט מתחת הבלוק ליצירת בלוק חדש","size_options":"מידות","backgrounds":"רקעים","contactForError":"דווח על שגיאה","contactForErrorDesc":"נתקלת בהתנהגות לא צפויה? \\n לחץ כאן לדיווח על תקלה","fetureRequest":"בקשה לתוספות","pastePageContent":" הדבקת תוכן מייל","titleColor":"צבע כותרת","agreeToOverride":"אני מאשר למחוק את התוכן הקיים ולהחליפו בתוכן שהועתק.","overridePageContent":"בחרת להדביק תוכן של מייל אחר לתוך הדף זה. \\n ההדבקה תמחק את התוכן הקיים בדף ותדביק במקומו את התוכן שהועתק.","fetureRequestDesc":"חסר לך פיצ\'ר כלשהו ? \\n לחץ כאן לבקשה להוספת כלים לעורך","copyPageContent":"העתקת תוכן הדף לחשבון אחר","copyPageContentDesc":"לחצו כאן כדי להעתיק את התוכן הדף לחשבון אחר שלכם בחשבון","pasteContent":"הדבקת תוכן מחשבון אחר","pasteContentDesc":"לחצו כאן כדי להדביק תוכן דף שהעתקם מחשבון אחר שלכם בחשבון","generalText":"כאן אנו נרשום את טקסט כללי כלשהו על המוצר שלנו. זהו אזור טקסט כללי כלשהו חופשי לגמרי ","longText":"כאן אנו נרשום את טקסט כללי כלשהו על המוצר שלנו. זהו אזור טקסט כללי כלשהו חופשי לגמרי, אפשר לרשום כאן מה שמתחשק לכם כל עוד מדובר בתוכן לעניין.","textBlock":"בלוק טקסט","component_selected":"נבחר בלוק","component_unselected":"בלוק לא נבחר","countdown":"מונה זמן","counterBlock":"בלוק קאונטר","bulletBlock":"בלוק בולטים","singleImage":"תמונה בודדת","allImages":"כל התמונות","add_section":"הוספת מקטע","bulletWithImageBlock":"בלוק בולטים לצד תמונה","header1block":"כותרת ראשית","bold":"הדגשה","underline":"קו תחתון","italic":"טקסט נטוי","strikeThrough":"קו חוצה","saved_links":"קישורים שמורים","forecolor":"צבע טקסט","numberColor":"צבע המספרים","threeCells":"שלושה תאים","twoCells":"שני תאים","backcolor":"רקע טקסט","fontFamily":"גופן","back":"חזור","fontSize":"גודל גופן","text_micro_copy":"כתבו ש\\"ח ואז לחיצה על רווח.. אהבתם? שתפו אותנו (: ","direction":"כיוון","right":"ימין","left":"שמאל","scroll":"גלילה","new_item":"פריט חדש","center":"מרכז","top":"למעלה","bottom":"למטה","next":"שלב הבא","twoCards":"שני כרטיסים","threeCards":"שלושה כרטיסים","justify":"מתיחה","remove":"הסרה","unLink":"הסרת קישור","appendImage":"הוספת תמונה","appendVideo":"הוספת סרטון","blocks":"בלוקים","page":"דף","section":"מקטע","block":"בלוק","pageSetting":"הגדרות הדף","home":"בית","about":"אודות","text":"טקסט","clear":"ניקוי","articleTitle":"כותרת מאמר","quick_add":"הוספה מהירה","Header1Web":"כותרת","shortText":"משהו חשוב שעל הלקוחות לדעת","articleMore":"הצג עוד","emoji":"אמוטיקון","lineHeight":"גובה שורה","two images":"שתי תמונות","heading 1":"כותרת גדולה","heading 2":"כותרת בינונית","heading 3":"כותרת קטנה","textAlign":"כיוון טקסט","sendTest":"שליחת בדיקה","Duplicate":"שכפול","DragHere":"גרור פה","imageSize":"גודל תמונה","alignImage":"מיקום תמונה","fullWidthOnMobile":"רוחב מלא במובייל","delete_bcakground":"הסרת רקע","edit_background":"עריכת רקע","altText":"טקסט חילופי","gallery":"גלרייה","padding":"ריווח פנימי","padding_top":"ריווח עליון","padding_bottom":"ריווח תחתון","margin":"ריווח חיצוני","size":"גודל","coming_soon":"מגיע בקרוב","background":"רקע","svg_color":"צבע הסמל","width":"רוחב","makeCircle":"שמירה על התמונה כעיגול","add_now":"הוספה","card":"כרטיסיה","go_back":"חזרה אחורה","add_new_element":"הוספת אלמנט חדש","what_the_anchor_name":"שם העוגן","form:manage_fields":"ניהול השדות בטופס","accessories":"תוספות","jhon_lennon":"ג\'ון לנון","jhon_lennon_qoute":"החיים זה מה שקורה בזמן שאתה עסוק בלתכנן תוכניות אחרות","headingText":"טקסט כותרת","height":"גובה","rotate":"סיבוב","dateAndTime":"תאריך ושעת סיום","hour":"שעה","is_active":"האם פעיל?","where_the_image_link":"לאן התמונה מובילה?","minutes":"דקות","alignButton":"מיקום כפתור","favorites":"מועדפים","main":"ראשי","type":"סגנון","opacity":"שקיפות","backgroundColorAndOpacity":"צבע רקע ושקיפות","mediaType":"סוגי מדיה","filter":"סינון","elements":"אלמנטים","freeImages":"תמונות בחינם","choose:":"בחירה","sendTestMail":"שליחת הודעת בדיקה","AddNewAddress":"הוספת מייל נוסף","searchImages":"חיפוש תמונות","send":"שליחה","fontNameWholePage":"פונט לכל הדף","blockMenuInfo":"לחץ על אחד התגיות לבחירה ולחיצה נוספת לביטול *","menu":"תפריט","menu_widget":"תפריט","emailAddress":"כתובת המייל","addEmoji":"הוספת אמוטיקון","addBackcolor":"הוספת צבע רקע","addForcolor":"הוספת צבע טקסט","openNewTab":"פתח בטאב חדש","stayOnSamePage":"השאר באותו הדף","desktopMode":"מצב דפדפן בלבד","lastColors":"צבעים אחרונים","colorsInPage":"צבעים בדף","getColorFromImage":"הצגת צבעים מתמונה","addressWithExample":"כתובת (דוגמא: פתח תקווה, הסיבים 18)","maps":"מפות","map":"מפה","layout":"פריסה","animations":"אנימציות","close_scheme_locked":"נעל סכימת צבעים","open_scheme_locked":"פתיחת סכימת צבעים","event":"אירוע","audio":"שמע","addNew":"הוסף חדש","delete_and_add":"הוספה והסרה","what_would_u_like_to_link":"מה תרצו להוסיף?","add_link":"הוספת קישור","name_of_nav":"שם כפתור הניווט","urlAddress":"שורת כתובת","can_Open_Gallery_With_Double_Click_On_The_Image":" פתיחת הגלרייה על ידי לחיצה כפולה על התמונה","uploadFile":"העלאה של קובץ חדש","FileSelection":"בחירת קובץ","this_is_empty_iframe_start_add_url_link":"זה אייפרם ריק, הוסיפו קישור לכתובת אינטרנט","yes,Create":"כן, צור תיקיה","letterSpacing":"ריווח בין האותיות","spacing":"ריווחים","solid":"אחיד","palletes":"פלטים","savedPalletes":"פלטים שמורים","savedToMainTab":"שמור בלשונית ראשית","dashed":"מקוקו","advanced":"מתקדם","Select_an_element_to_edit_its_properties":"בחרו אלמנט או לחצו על הוספה כדי להתחיל ליצור","maxWidth":"רוחב מקסימלי","whatTheBtnSays":"מה הכפתור אומר?","sendSms":"שליחת סמס","sendWhatsapp":"שליחת וואטסאפ","sendEmail":"שליחת מייל","what_the_url_address":"מהי שורת הכתובת שתרצו להוסיף?","add_catchy_subject":"הוסיפו נושא קליט","what_the_email_address":"לאן המייל ישלח?","what_the_phone_number":"מהו מספר הטלפון?","what_the_phone_number_to_send_msg":"מהו מספר אליו תשלח ההודעה?","email_body_if_needed":"תוכן גוף המייל","active_on-scroll":"יפעל בגלילה","active_on-hover":"יפעל במצב ריחוף עם העכבר","drag_or_click":"גרירה","heading-1":"כותרת גדולה","svg-element":"אלמנט SVG","divider-element":"קו מפריד","iframe":"אייפרם","html-code":"קוד HTML","video with text":"וידאו עם טקסט","image with text":"תמונה עם טקסט","quotes-block":"בלוק ציטוט","animation_deleted":"האנימציה נמחקה","animation_added":"האנימציה נוספה","show_on_desktop":"הצג במחשב הלוח","show_on_mobile":"הצג במכשיר נייד","show_on_tablet":"הצג במכשיר טאבלט","properties":"מאפיינים","ID_with_description":"מזהה (ID)","on_hover":"במצב ריחוף עם העכבר","on_scroll":"בגלילה","menu-widget":"תצוגת תפריט","setting_section":"הגדרות סקשן","setting_block":"הגדרות בלוק","remove_element":"הסרת אלמנט","drag_element":"גרירת אלמנט","max_width":"רוחב מקסימלי","open_gallery":"פתיחת גלריה","open_gallery_icons":"גלריית אייקונים","number_size":"גודל המספרים","large":"גדול","medium":"בינוני","small":"קטן","extra-large":"גדול מאוד","without_radius":"ללא רדיוס","design_custom_list":"עיצוב רשימה מותאמת אישית","display_mode":"מצב תצוגה","left-to-element":"שמאל לאלמנט","right-to-element":"ימין לאלמנט","bottom-to-element":"מתחת לאלמנט","top-to-element":"מעל לאלמנט","open-new-cell-from-right":"הוספה בתא חדש מימין","open-new-cell-from-left":"הוספה בתא חדש משמאל","open-new-block-from-bottom":"הוספה בבלוק חדש מתחת","open-new-block-from-top":"הוספה בבלוק חדש מעלה","description":"תיאור","title":"כותרת","keywords":"מילות מפתח","favicon":"סמל מוצא","cancel":"ביטול","standard":"סטנדרטי","ready_to_publish":"מוכן לפרסום","lets_set_some_seo":"בואו נוסיף כמה הגדרות SEO","We_are_building_your_page":"אנחנו בונים את העמוד שלך","inner_blocks":"מרכז המקטע","drag_here":"גררו לכאן","advance_options":"אפשרויות מתקדמות","duplicate_template_code":"קוד לשכפול תבנית","copied":"הועתק","click_to_copy":"Click To Copy","fade_in":"Fade in","fade_in_down":"Fade in down","back_in_down":"Back in down","back_in_right":"Back in right","bounce":"קופצני","tada":"שיקשוק","saved_theme":"עיצוב שמור","open_colorpicker":"בחירה של צבע אישי","colors_that_created_from_image":"צבעים שנוצרו מתמונה","publish_success":"פרסום בוצע בהצלחה","open_the_page":"פתיחת העמוד בדף חדש","close":"סגירה","title_size":"גודל כותרות","ilustrations":"סמלים","svg":"סמל","click_to_refresh":"לחיצה לרענון הדף","error_client_disconnected":"אופס! החיבור לשרת נותק, לחצו על רענון הדף כדי להמשיך לעבוד, בנתיים קבלנו את הנתונים ואנחנו עובדים על פתרון הבעיה, עמך סליחה והמשך עבודה מהנה","connection_error":"החיבור נותק 😱, אבל אל דאגה, התוכן נשמר","typography":"טיפוגרפיה","more_colors":"צבעים נוספים","button_submit_form":"שליחה","get_started":"התחילו עכשיו","design_form":"עיצוב טופס","form_settings":"הגדרות טופס","input":"קלט","send_mail_on_submitted":"רוצים לקבל מייל כשלקוחות נרשמים?","placeholder":"טקסט פנימי של הקלט(במצב ללא טקסט)","default_value":"ערך ברירת מחדל","required":"חובה","hidden":"מוסתר","hidden_field":"שדה מוסתר","advance_setting":"הגדרות מתקדמות","label":"כותרת","color:label":"צבע הטקסט","radio-group":"קבוצת לחצנים","items_in_radio_group":"פריטים בקבוצת לחצנים","add_item":"הוספת פריט","textarea":"טקסט ארוך","items_in_menu":"פריטים בתפריט","checkbox":"תיבת סימון","height:form_field":"גובה השדות","ready_blocks":"בלוקים מוכנים","box-shadow":"אפקט צל","add_new_field":"הוספת שדה חדש","border_design":"עיצוב מסגרת","individual_elements":"אלמנטים בודדים","number_color":"צבע המספרים","send_form_only_if_checked":"שליחת טופס תתאפשר רק אם מסומן","select_fields_to_edit":"לחצו על האלמנטים בטופס לעריכה","url_parameters":"שם פרמטר בשליחה","the_color_of_cols":"צבע מקטעי המספרים","the_radius_of_col":"רדיוס קטעי המספרים","hidden_form_field_info":"שדה שלא יופיע לגולשים בתצוגת הטופס, משמש בעיקר לקבלת ערכי REF ו UTM או פרמטרים קבועים שמעונינים שיופיעו אוטומטית בשדות של הנרשם בטופס הספציפי מבלי שהוא ממלא או רואה אותם.","required_form_field_info":"שדה שהנרשם בטופס חייב למלא/לסמן אותו על מנת לשלוח את הטופס, טופס ששדה חובה לא מולא בו לא ישלח ויקפיץ הודעה לממלא הטופס שהשדה הוא חובה","url_param":"שם פרמטר בשליחה","show_colons":"להציג נקודותיים ?","please_wait_downloading_new_version":"אנא המתינו, אנחנו מעדכנים גרסה חדשה","my_fields":"השדות שלי","allow_send_form_only_if_checked":"אפשר לשלוח טופס רק אם מסומן","field_settings":"הגדרות שדה","after_form_subscribed":"מה לעשות אחרי שהטופס נשלח?","add_user_from_mailinglist_after_subscribed":"לאיזה קבוצות דיוור נרשום את הלקוח שלנו?","remove_user_from_mailinglist_after_subscribed":"מאיזה קבוצות דיוור נסיר את הלקוח שלנו ?","available_fields":"השדות שלי","background_fields":"רקע השדות","label_color":"צבע כותרת עליונה","title_color":"צבע הכותרות","button_color":"צבע טקסט הכפתור","start":"התחלה","end":"סיום","duration":"משך","prefix":"לפני","suffix":"אחרי","separator":"מפריד","count-up":"לספר עד","pie-chart":"פיי נתונים","edit_data":"עריכת נתונים","border_editor":"עריכת מסגרת","moving_from_mailing_list":"הוספה והסרה מרשימת דיוור","coming_soon_automations":"בקרוב! אנחנו מאמינים שאתם ואתן כבעלי ובעלות עסקים צריכים חיים קלים! לכן אנחנו עובדים על תפריט אוטומציות כדי שתוכלו להנות ולבצע פעולות גם בזמן שאתם ישנים.","bar-chart":"טבלת עמודות","cols_color":"צבעי עמודות","button_background":"רקע הכפתור","button_radius":"רדיוס כפתור","justifyContent":"ישור אופקי","alignItems":"ישור אנכי","design_pallete":"פלאטת הצבעים שלי","rootelement_editor_top_header":"שינוי גופן לכל האלמנטים בדף, כלל אלמנטים חדשים שתוסיפו","rootelement_editor_global_colors_heading":"צבעים שמורים לדף, בחרו צבעים לפי צבעי המותג שלכם, ואחר כך הצבעים יחכו לכם בבחירת צבע של כל אלמנט בתוך הcolorpicker","flex-start":"התחלה","primaryColor":"צבע ראשי","primaryContrastColor":"צבע ראשי נגדי","secondaryColor":"צבע משני","secondaryContrastColor":"צבע משני נגדי","flex-end":"סיום","make_it_default_value":"הפוך לערך ברירת מחדל","show_success_popup":"הצגת פופאפ בעת בהצלחה","forward_params":"להעביר פרמטרים?","user_will_redirect_to":"הלקוח יעבור לדף הבא","where_to_redirect":"לאן להעביר את הלקוח?","component_color":"צבע הרכיב","none":"ללא","my_form":"הטופס שלי","form:placeholder_color":"צבע הטקסט הפנימי","search_my_fields":"חיפוש השדות שלי","checkbox_on_right_side":"צ\'קבוקס מימין?","choose_an_option":"בחרו באחת האפשרויות הבאות","checkbox_checked_as_default":"תיבת סימון מסומנת כברירת מחדל","paragraph":"פיסקה","after_submission":"מה יקרה לאחר הרשמה?","stay_at_page":"נשארים בדף","redirect":"מועברים למקום אחר","field_background":"רקע שדות","form:heading":"בואו נדבר, הקפה עלינו!","form:subHeading":"לקביעת פגישה או רק שאלה? אשמח לסייע לכם! השאירו פרטים ואחזור אליכם בהקדם","form:background":"צבע הרקע של שדות","style":"עיצוב","connection_lost":"החיבור אבד","error_transactions_not_completed":"חלק מהפעולות לא הושלמו, בדיוק ברגעים אלה קיבלנו את המידע ואנחנו עובדים על שיפור החוויה בעורך","form":"טופס","sync_all_forms":"סנכרן את כל הטפסים","send_the_data_to":"צריכים לשלוח את הנתונים לCRM ?","horizontal_shadow_length":"מיקום האופקי של הצל","vertical_shadow_length":"מיקום האנכי של הצל","blur_radius":"טשטוש הצל","spread_radius":"פריסת הצל","open_image_editor":"עריכת תמונה","shadow_color":"צבע הצל","inset":"מיקום חיצוני ?","box_shadow:info":"Adds shadow effects around an element\'s frame.","choose":"בחירה","design_for_phone":"עיצוב לנייד","design_for_desktop":"עיצוב למחשב","number_example":"05000000","website_example":"www.example.com","email_example":"example@example.com","link_target":"יעד הקישור","open_in_new_tab":"פתח בטאב חדש","open_in_same_tab":"פתח באותו טאב","open_in_parent_frame":"פתח במסגרת ההורה","open_in_top_frame":"פתח במסגרת העליונה","_blank":"פתח בטאב חדש","_self":"פתח באותו טאב","_parent":"פתח במסגרת ההורה","_top":"פתח במסגרת העליונה","user_menu":"תפריט משתמש","send_test_emails":"שליחת מיילי בדיקה","attached_files":"קבצים מצורפים","make_newsletter_as_event":"הפוך ניוזלטר לאירוע","edit_block":"עריכת בלוק","add_files":"הוסף קבצים","max_files_reached":"מספר הקבצים המקסימלי הושג","make_event":"צור אירוע","name_and_subject":"שם ונושא","enter_email_addresses":"הזן כתובות מייל (פסיק או Enter להוספה)","invalid_email_error":"אנא הזן כתובת מייל תקינה","no_emails_error":"אנא הוסף לפחות כתובת מייל אחת","create_event":"צור אירוע","start_date_time":"תאריך ושעת התחלה","end_date_time":"תאריך ושעת סיום","location":"מיקום","link_optional":"קישור (אופציונלי)","save_event":"שמירת אירוע","cancel_event":"ביטול","font_color":"צבע גופן","confirm_cancel":"האם אתה בטוח שברצונך לבטל?","creating_event":"יוצר אירוע...","event_created":"האירוע נוצר!","end_after_start_error":"תאריך/שעת הסיום חייב להיות אחרי תאריך/שעת ההתחלה","enter_event_location":"הזן מיקום האירוע","enter_event_link":"הזן קישור לאירוע","logout":"יציאה מהעורך","details":"פרטים","subject":"נושא","iconDirection":"כיוון האייקון","subtitle":"כותרת משנה","hasIcon":"להפעיל אייקון?","enter_subject":"מה יהיה נושא המייל(subject)?","apply":"החל","automation_settings":"הגדרות אוטומציה","what_should_happen":"בלחיצה על הקישור, אנחנו נסיר או נוסיף את המשתמש לקבוצות הדיוור הבאות","add_to_mailing_list_question":"להוסיף","remove_from_mailing_list_question":"להסיר","select_mailing_lists":"בחרו רשימות תפוצה","saved_successfully":"הפעולה נשמרה בהצלחה","need_automations":"צריכים אוטומציה? לחצו על הכפתור. במידה ולא תמצאו מה שאתם צריכים, נשמח לשמוע איך נוכל לעזור .","menu_automations":"תפריט אוטומציות","selected":"נבחרו","automation_link_preview":"קישור אוטומציה","apply_automation":"החל אוטומציה"}'),Bd=JSON.parse('{"name":"Name","link":"Link","secureLink":"https link","tel":"Tel","email":"Email","keep_ratio":"Keep ratio","recommended":"Recommended","opengalleryimage":"Open gallery","email_600":"Email design best practices peg the ideal email newsletter width size at 600 pixels. This number has been the standard for many years.","secure_link":"Secure link","items":"Items","moving_from_mailing_list":"Moving from mailing list","links_with_invalid_url":"Links with invalid url","prompt_editor_title":"Create Your Content","generate_content":"Generate Content","creating_magic":"Creating Magic...","images_without_alt":"Images without alt","sms_body_if_needed":"SMS body if needed","whatsapp_body_if_needed":"WhatsApp message if needed","simply:Scratchcard":"Scratch card","image_in_progress":"Image in progress...","text_micro_copy":"Be creative, write something that will make your customers want to click on the button.","jhon_lennon":"Jhon Lennon","jhon_lennon_qoute":"Life is what happens when you\'re busy making other plans","headingText":"Heading text","title_color":"Title Color","button_color":"Color Button","button_background":"Background Button","start":"Start","end":"End","duration":"Duration","prefix":"Prefix","suffix":"Suffix","separator":"Separator","count-up":"Count up","pie-chart":"Pie chart","edit_data":"Edit Data","bar-chart":"Barchart","cols_color":"Cols Colors","button_radius":"Radius Button","accessories":"Accessories","elements":"Elements","confirm":"Accept","drag_block":"Drag block","what_the_anchor_name":"What the anchor name?","checkbox_on_right_side":"Checkbox on Right?","drag_to_move_click_to_options":"Drag to move, click to options","contact":"Contact","buttons_without_links":"Buttons without links","images_with_default_src":"Images with default src","errors_to_fix":"Errors to fix","expand_image_for_outlook":"Expand image for Outlook","social":"Social Networks","forward_params":"Forward Params?","menu_widget":"Menu widget","powered_by_pexels":"Powered by Pexels","bulletColor":"Bullet Color","makeCircle":"Make Circle","twoImages":"Two Images","component_color":"Component Color","close_scheme_locked":"Close scheme locked","open_scheme_locked":"Open scheme locked","threeImages":"Three Images","threeButtons":"Three Buttons","file":"File","auto":"auto","colors":"Colors","iconsColor":"Icon colors","slientMode":"Slient Mode","dividerColor":"Divider Color","this_is_empty_iframe_start_add_url_link":"This is empty iframe. Start adding url link","openAsModal":"Open image in modal","autoplay":"Autoplay","showAsImage":"show As Image","playInLoop":"play In Loop","addedToFavorite":"Added to Favorites","removedFromFavorite":"Deleted from favorites","removedSuccess":"Successfully deleted","aToZ":"A-Z","zToA":"Z-A","anchorName":"Anchor Name","inputEmptyError":"Fill in the field","savedSuccess":"Saved successfully","createdSuccessfully":"Done successfully","home":"Home","about":"About","position":"Position","scroll":"Scroll","repeat":"Repeat","choose":"Choose","texts":"Texts","home_page":"Home Page","numOneAsFemale":"One","heading":"Title","bigHeading":"Big Title","readMore":"Read More","quick_add":"Quick Add","click_here_to_add":"Click here to add","mediumHeading":"Medium title","smallHeading":"Small title","icons":"Icons","divider":"Divider","bullets":"Bullets","numbered":"Numbering","ok":"OK","newImage":"New Image","newFolder":"New Folder","folders":"Folders","addLinks":"Add link","edit":"editing","rootelement_editor_top_header":"Global settings","block_width":"Block width","page_background":"Page background","bgColor_blocks":"Background color","rootelement_editor_global_colors_heading":"Global colors","openGalleryImage":"Open gallery","clone_element":"Clone element","what_the_url_address":"What the url address?","videoWithArticle":"Video with article","give_name_to_block":"Give name to block","save_block":"Save block","choose_your_duo_date":"Choose your duo date","what_category":"What category?","iamgeWithArticle":"Image with article","imageWithText":"Image with text","no_responsive":"No responsive","BulletsWithImage":"Bulltes with image","SocialNetwork":"Social networks","height:form_field":"Fields height","box-shadow":"Shadow-Fx","ready_blocks":"Blocks","individual_elements":"Individual Elements","connection_lost":"Connection Lost","add_now":"Add Now","error_transactions_not_completed":"TODO:complete_text","form:manage_fields":"Manage The Form","add_new_field":"Add New Field","border_design":"Border Design","number_color":"Numbers Color","twoArticles":"Two article","the_color_of_cols":"The Color Of Cols","the_radius_of_col":"The Radius Of Cols","twoButtons":"Two buttons","show_colons":"Show Colons","my_fields":"My Fields","no_editor:title":"We will add editor to this element soon as possible.","threeArticles":"Three articles","addons_menu:title":"Addons menu, Here you can find some features that will improve your app. drag the element to block or section.","sections_menu:title":"Section menu, We didn’t find time to fill this content. Writing a new section needs a great understanding of your needs.","backgrounds_menu:title":"Backgrounds menu, choose a background, but a nice one and drag it to a block or a section.","blocks_menu:title":"Block menu, here you can find composes of multipal elements in the same block, just drag it between the blocks and the sections.","elements_menu:title":"Drag the element at the right,left.. or just drop it as a new block.","imageWithBullets":"Image With bullets","undo":"Cancel","redo":"Restore","wide":"Wide","text:button":"What The Button say?","empty_section_info":"This is empty section, Click here to add block and beatiful background.","videos":"Videos","video":"Video","images":"Images","image":"Image","weight":"Weight","buttons":"Buttons","button":"Button","general":"General","all":"All","myImages":"My Images","uploadSuccess":"Upload complete","fromOldToNew":"Old to new","fromNewToOld":"New To old","download":"Download","quotes":"A Quote","quotesWithText":"Quote with text","delete":"Deletion","anchor":"Anchor","deleteElement":"Delete element","deleteBlock":"Delete block","preview":"Preview","design":"Design","changeName":"Rename","upload":"Upload Image","uploading":"Uploading...","verifying":"Verifying...","completed":"Completed!","timeout":"Upload timeout","add":"Add","addons":"Extras","save":"Save","cellSpace":"Cell spacing","search":"Search","ratioLock":"Ratio lock","videoLink":"Video link","settings":"Settings","counterTitle":"Counter title?","folderName":"Folder name","addFolder":"Add folder","add_block":"Add block","counterColor":"Counter color","chooseBlock":"Drag a block","imageEditTitle":"Photo editing","videoEditTitle":"Edit video","size_options":"Size Options","backgroundColor":"Backgorund","backgrounds":"Backgrounds","contactForError":"Report an error","contactForErrorDesc":"Did you come across something unexpected?\\n Click here to report the error","fetureRequest":"Request for additions","pastePageContent":" Paste email content","titleColor":"Title color","agreeToOverride":"I agree to delete the existing content and replace it with copied content.","overridePageContent":"You have chosen to paste the content of another email into this page. \\n The paste will delete the existing content on the page and paste the copied content in its place.","fetureRequestDesc":"Are you missing any feature? \\n Click here to request tools to be added to the editor","copyPageContent":"Copy the contents of the page to another account","copyPageContentDesc":"Click here to copy the page content to your other account","pasteContent":"Paste content from another account","pasteContentDesc":"Click here to paste copied content","generalText":"Here we will write down some general text about our product. This is some general text area completely free","longText":"Here we will write down some general text about our product. This is some general text area that is completely free, you can write here what you feel like as long as it is relevant content.","textBlock":"Text block","timeCounter":"Time counter","counterBlock":"Counter block","bulletBlock":"Bullets block","singleImage":"Single image","allImages":"All images","bulletWithImageBlock":"Bullet with images","header1block":"Main title","bold":"Bold","underline":"Underline","italic":"Italic","strikeThrough":"Strike through","forecolor":"Forecolor","threeCells":"Three cells","twoCells":"Two cells","backcolor":"Background text","fontFamily":"Font","fontSize":"Font size","direction":"Direction","right":"Right","left":"Left","center":"Center","justify":"Justify","unLink":"Unlink","appendImage":"Add an image","appendVideo":"Add an video","blocks":"Blocks","page":"Page","block":"Block","section":"Section","pageSetting":"Page settings","text":"Text","clear":"Clear","articleTitle":"Article title","Header1Web":"Title","shortText":"Something important that customers need to know","articleMore":"Show more","emoji":"Emoji","lineHeight":"Line height","textAlign":"Text align","sendTest":"Send test","article":"Article","Duplicate":"Duplicate","component_selected":"Component selected","component_unselected":"Component unselected","add_section":"Add section","remove_block":"Remove block","duplicate_block":"Duplicate block","BulletsWithArticle":"Bullets With Article","sendTestMail":"Send Test Message","blockMenuInfo":"Click on the tag and click again to set it off *","fontNameWholePage":"Whole Page Font name","AddNewAddress":"Add new Input","send":"Send","emailAddress":"Email Address","DragHere":"Drag here","imageSize":"Image size","alignImage":"Align image","fullWidthOnMobile":"Full width on mobile","altText":"Alt text","gallery":"Gallery","padding":"Padding","size":"Size","coming_soon":"Coming Soon","width":"Width","height":"Height","dateAndTime":"Date and Time","hour":"Hour","minutes":"Minute","alignButton":"Align button","main":"Main","favorites":"Favorites","mediaType":"Media type","filter":"Filter","addEmoji":"Add Emoji","addBackcolor":"Add Backcolor","addForcolor":"Add Forecolor","lastColors":"Last Colors","colorsInPage":"Colors in page","openNewTab":"New window","stayOnSamePage":"Same window","desktopMode":"Desktop mode only","addressWithExample":"Address (Example:Petah Tikva,Sibim 18)","maps":"Maps","map":"Map","layout":"Layout","event":"Event","audio":"Audio","addNew":"Add New","animations":"Animations","urlAddress":"Url Address","can_Open_Gallery_With_Double_Click_On_The_Image":"You can open the gallery by Double click on the Image","uploadFile":"Upload File","FileSelection":"File Selection","yes,Create":"Yes, Create","letterSpacing":"Letter Spacing","spacing":"Spacing","advanced":"Advanced","Select_an_element_to_edit_its_properties":"Select an Block, Button, or Text to edit its properties","what_the_phone_number_to_send_msg_to":"What the phone number to send message to","email_body_if_needed":"Email body if needed","what_the_phone_number":"What the phone number to call to","what_the_email_address":"What the email address to send to","active_on-scroll":"Active on scroll","active_on-hover":"Active on mouse over","drag_or_click":"Drag or click","heading-1":"Heading 1","svg-element":"SVG Element","divider-element":"Divider Element","iframe":"Iframe","html-code":"Html Code","video with text":"Video with text","image with text":"Image with text","quotes-block":"quotes block","animation_deleted":"Animation deleted","animation_added":"Animation added","show_on_desktop":"Show on desktop","show_on_mobile":"Show on mobile","show_on_tablet":"Show on tablet","properties":"Properties","ID_with_description":"ID (advance)","on_hover":"On mouse over","on_scroll":"On scroll","menu-widget":"Menu widget","setting_section":"Setting section","setting_block":"Setting block","remove_element":"Remove element","drag_element":"Drag element","max_width":"Max width","open_gallery_icons":"Open gallery icons","number_size":"Number size","large":"Large","medium":"Medium","small":"Small","extra-large":"Extra Large","without_radius":"Without radius","design_custom_list":"Design custom list","display_mode":"Display mode","description":"Description","title":"Title","keywords":"Keywords","favicon":"Favicon","cancel":"Cancel","standard":"Standard","ready_to_publish":"Ready to publish","lets_set_some_seo":"Let\'s set some SEO","We_are_building_your_page":"We are building your page","fade_in":"Fade in","fade_in_down":"Fade in down","back_in_down":"Back in down","back_in_right":"Back in right","bounce":"Bounce","tada":"Tada!!","saved_theme":"Saved theme","go_back":"Go back","open_colorpicker":"Open colorpicker","colors_that_created_from_image":"Colors that created from image","publish_success":"Publish success","open_the_page":"Open the page","close":"Close","title_size":"Title size","ilustrations":"Ilustrations","svg":"SVG","click_to_refresh":"Click to refresh","error_client_disconnected":"Opps! we are disconnected from the server. Please try again later.","connection_error":"Connection error 😱 ","typography":"Typography","more_colors":"More colors","button_submit_form":"Send","get_started":"Get started","design_form":"Design form","input":"Input","placeholder":"Placeholder","default_value":"Default value","required":"Required","after_submission":"On Submission?","stay_at_page":"Nothing","redirect":"Redirect","form:background":"Placeholder Color","hidden":"Hidden","form_settings":"Form settings","hidden_field":"Hidden field","advance_setting":"Advance setting","label":"Label","radio-group":"Radio group","items_in_radio_group":"Items in radio group","add_item":"Add item","textarea":"Textarea","items_in_menu":"Items in menu","checkbox":"Checkbox","send_form_only_if_checked":"Send form only if checked","select_fields_to_edit":"Select fields to edit","url_parameters":"URL parameters","hidden_form_field_info":"text required here..","required_form_field_info":"text required here..","url_param":"URL parameter","please_wait_downloading_new_version":"Please wait downloading new version","allow_send_form_only_if_checked":"Allow send form only if checked","field_settings":"Field settings","inner_blocks":"Center","automations":"Automations","drag_here":"Drag here","advance_options":"Advance Options","copied":"Copied","duplicate_template_code":"Duplicate Template Code","click_to_copy":"Click To Copy","list-check":"Elements","drag_section":"Drag section","card":"Card","list-settings":"Advance","icons_list_micro_copy":"If a bullet doesn\'t look serious enough, you can use an icon instead.","typography_micro_copy":"Typography your text with the help of the typography settings.","anchor_name_micro_copy":"Name it now, find it later in the link editor.","create_anchor":"Need Anchor? click here","image_micro_copy":"Click on the button, or dblClick on the image to add an image(but a beautiful one).","after_form_subscribed":"What we Should do after form subscribed","add_user_from_mailinglist_after_subscribed":"Pick mailinglist the user subscribed","remove_user_from_mailinglist_after_subscribed":"Pick mailinglist the user subscribed","available_fields":"My fields","add_urlAddress_from_media_site":"Add url from media site","background_fields":"Background fields","label_color":"Label color","make_it_default_value":"Make it default value","show_success_popup":"Show success popup","user_will_redirect_to":"User will redirect to","where_to_redirect":"Where to redirect?","none":"None","my_form":"My form","search_my_fields":"Search my fields","choose_an_option":"Choose an option","checkbox_checked_as_default":"Checked as default","form":"Form","sync_all_forms":"Sync all forms","send_the_data_to":"Need to send the data to crm ?","color:label":"Color Text","field_background":"Field Background","paragraph":"Paragraph","horizontal_shadow_length":"Horizontal Shadow Length","vertical_shadow_length":"Vertical Shadow Length","blur_radius":"Blur Radius","spread_radius":"Spread Radius","shadow_color":"Shadow Color","inset":"Inset","box_shadow:info":"Adds shadow effects around an element\'s frame.","design_for_phone":"Mobile Design","design_for_desktop":"Desktop Design","number_example":"05000000","website_example":"www.example.com","email_example":"example@example.com","link_target":"Link Target","open_in_new_tab":"Open in new tab","open_in_same_tab":"Open in same tab","open_in_parent_frame":"Open in parent frame","open_in_top_frame":"Open in top frame","user_menu":"User Menu","send_test_emails":"Send Test Emails","attached_files":"Attached Files","make_newsletter_as_event":"Make Newsletter as Event","add_files":"Add Files","max_files_reached":"Maximum number of files reached","make_event":"Make Event","name_and_subject":"Name & Subject","enter_email_addresses":"Enter email addresses (comma or enter to add)","invalid_email_error":"Please enter a valid email address","no_emails_error":"Please add at least one email address","create_event":"Create Event","start_date_time":"Start Date & Time","end_date_time":"End Date & Time","location":"Location","link_optional":"Link (Optional)","save_event":"Save Event","cancel_event":"Cancel Event","confirm_cancel":"Are you sure you want to cancel?","creating_event":"Creating Event...","event_created":"Event Created!","end_after_start_error":"End date/time must be after start date/time","enter_event_location":"Enter event location","enter_event_link":"Enter event link","logout":"Logout","details":"Details","subject":"Subject","subtitle":"Subtitle","enter_subject":"Enter subject","back":"Back","apply":"Apply","automation_settings":"Automation Settings","what_should_happen":"What should happen?","add_to_mailing_list_question":"Add to mailing list?","remove_from_mailing_list_question":"Remove from mailing list?","select_mailing_lists":"Select mailing lists","selected":"Selected","automation_link_preview":"Automation Link","apply_automation":"Apply Automation"}');class Od{constructor(t){return this.props=t,this.init(t)}init(t){const e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.plugins||[];let n=t.languageJson;const r=t.language||"he";n||(n="he"===r?Sd:Bd);const i=jc(r)?"rtl":"ltr",o=jc(r)?"right":"left";t.navbar||(t.navbar={}),Array.isArray(t.components)&&0===t.components.length&&(t.components=null),t.width||(t.width="650px",console.warn("using default width of 650px or 1000px.")),t.theme||(t.theme={}),t.textConfigure||(t.textConfigure={}),"object"!=typeof t?.configure&&(t.configure={}),"object"!=typeof t?.configure?.text&&(t.configure.text={}),t.configure.text={onClickMagic:t=>{const{injectEditor:e,insertContent:n,insertContentHtml:r,getJSON:i,getHTML:o,getText:s,selectAll:a}=t;a();const l=document.createElement("cdtr-text-prompt-editor");l.context=s(),l.addEventListener("text-generation-start",(t=>{a()})),l.addEventListener("text-generation-chunk",(t=>{n(t.detail.chunk)})),l.addEventListener("text-generation-complete",(t=>{a(),r(t.detail.text)})),l.addEventListener("text-generation-error",(t=>{console.error("Text generation error:",t.detail.error)})),e(l)}};const s={documentName:t.documentName,editable:t.editable,mode:t.mode,user:t.user,collaborator:t.collaborator,components:t.components||[{_id:"0-root",type:"root",props:{style:{background:"#fff"}},children:["0-section"]},{_id:"0-section",type:"section",props:{style:{width:t.width,margin:"auto",height:"100%"}},children:[]}],channel:"newsletter",userMenu:{onLogout:()=>{"function"==typeof t?.userMenu?.onLogout&&t?.userMenu?.onLogout()}},onNextStep:e=>{"function"==typeof t.onNextStep&&t.onNextStep(e)},onSendTestEmail:t?.onSendTestEmail?e=>{"function"==typeof t.onSendTestEmail&&t.onSendTestEmail(e)}:null,attachFiles:t?.attachFiles?{files:t?.attachFiles?.files||[],lazyLoad:t?.attachFiles?.lazyLoad||null,maxFiles:t?.attachFiles?.maxFiles||1,maxFileSizeMB:t?.attachFiles?.maxFileSizeMB||"0.5",save:e=>{"function"==typeof t.attachFiles.save&&t.attachFiles.save(e)},remove:e=>{"function"==typeof t.attachFiles.remove&&t.attachFiles.remove(e)}}:null,makeEvent:t?.makeEvent?{initialStartDate:t?.makeEvent?.initialStartDate||"",initialStartTime:t?.makeEvent?.initialStartTime||"",initialEndDate:t?.makeEvent?.initialEndDate||"",initialEndTime:t?.makeEvent?.initialEndTime||"",initialLocation:t?.makeEvent?.initialLocation||"",initialLink:t?.makeEvent?.initialLink||"",save:e=>{"function"==typeof t.makeEvent.save&&t.makeEvent.save(e)},cancel:()=>{"function"==typeof t.makeEvent.cancel&&t.makeEvent.cancel()}}:null,subjectAndName:t?.subjectAndName?{name:t?.subjectAndName?.name||"",subject:t?.subjectAndName?.subject||"",subtitle:t?.subjectAndName?.subtitle||"",save:e=>{"function"==typeof t.subjectAndName.save&&t.subjectAndName.save(e)}}:null,savedDebounce:t.savedDebounce||1e3,target:t.target||function(){const t=document.createElement("div");return t.id="root",document.body.appendChild(t),t}(),theme:{},language:r,languageJson:n,editor:{props:{onSave:e=>{console.log("%csync completed","color:green;font-size:20px;",e),"function"==typeof t.onSave&&t.onSave(e)},onChange:()=>{}},configure:{text:t?.configure?.text,editorProps:{fonts:t.fonts||[{id:"Arial",cssRule:"Arial, Helvetica, sans-serif",name:"Arial",language:["en","he"],url:null},{id:"Times New Roman",cssRule:"Times New Roman, Times, Beskerville, Georgia, serif",name:"Times New Roman",language:["en","he"],url:null},{id:"Courier New",cssRule:"Courier New, Courier, monospace",name:"Courier New"},{id:"Tahoma",cssRule:"Tahoma, Geneva, sans-serif",name:"Tahoma"},{id:"Verdana",cssRule:"Verdana, Geneva, sans-serif",name:"Verdana"},{id:"Roboto",cssRule:"Roboto, sans-serif",name:"Roboto (google)",url:"https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap"}],menu:{},mergeTags:t.mergeTags||{},mailingLists:t.mailingLists||{},linkPicker:t.linkPicker||{savedVariables:[{value:"https://www.assaf.co.il",label:"האתר שלי"},{value:"email",label:"מייל",protocol:"mailto:"},{value:"tel",label:"טלפון"},{value:"address",label:"כתובת"}]}},onSaveBlock:t.onSaveBlock,onDeleteBlock:t.onDeleteBlock,blocksCategories:t.blocksCategories,customBlocks:t.customBlocks,mediaGalleryManager:t.mediaGalleryManager||function(){},blocks:[$c(xd()),$c(_d()),$c(kd()),$c({name:"twoButtons",id:"2 button",icon:[{type:"button"},{type:"button"}],tags:["button"],children:[Cd({text:n.readMore}),Cd({text:n.readMore})]}),$c({name:"threeButtons",id:"3 button",icon:[{type:"button"},{type:"button"},{type:"button"}],tags:["button"],children:[Cd({text:n.readMore}),Cd({text:n.readMore}),Cd({text:n.readMore})]}),$c(wd({direction:i,textAlign:o,homePageText:Sd.home_page})),$c((a={text:n.generalText},{name:"quote",icon:[{type:"quote"}],tags:["quote"],children:[Ad(a)]})),$c({name:"image | quote",icon:[{type:"image"},{type:"quote"}],tags:[],children:[Ad({text:n.generalText,direction:i,textAlign:o}),vd({width:200,height:150})]}),$c({name:"quote | image",icon:[{type:"quote"},{type:"image"}],tags:[],children:[vd({width:200,height:150}),Ad({text:n.generalText,direction:i,textAlign:o})]}),$c({name:"twoCards",icon:[{type:"article"},{type:"article"}],tags:["article","card"],children:[yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]}),$c({name:"threeCards",icon:[{type:"article"},{type:"article"},{type:"article"}],tags:["article","card"],children:[yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]}),$c({name:"card | image",icon:[{type:"image"},{type:"article"}],tags:["article","card","image","readmore"],children:[Ed({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),vd({width:300,height:150})]}),$c({name:"image | card",icon:[{type:"article"},{type:"image"}],tags:["article","card","image","readmore"],children:[vd({width:300,height:150}),Ed({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]})],plugins:[id,ad,dd.configure(t.textConfigure),cd.configure(t.textConfigure),ld.configure(t.textConfigure),od.configure(t.textConfigure),hd,ud,md,bd,...e]},navbar:{components:t.navbar.components}}};var a;return new rd(s)}(t);return e}}"undefined"!=typeof window&&(window.cdtrStarter=Od)})(),a})()));
5989
+ `;let Hc=zc;function jc(t){if("string"!=typeof t)return!1;const e=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","prs","ps","sd","ug","ur","yi"].find((e=>e===t.toLowerCase()));return!!e}Nc([Ql({type:String})],Hc.prototype,"width"),Nc([Ql({type:Boolean})],Hc.prototype,"opened"),Nc([Ql({type:String})],Hc.prototype,"placement"),Nc([Ql({type:Boolean,attribute:!1})],Hc.prototype,"isMobileView"),customElements.get(Dc)||customElements.define(Dc,Hc),s.e(6737).then(s.bind(s,36737)),s.e(2340).then(s.bind(s,32340)),Promise.all([s.e(4050),s.e(1410)]).then(s.bind(s,1410)),Promise.resolve().then(s.bind(s,9545)),s.e(4).then(s.bind(s,70004)),s.e(3381).then(s.bind(s,63381)),s.e(6892).then(s.bind(s,6892)),Promise.all([s.e(2475),s.e(7911)]).then(s.bind(s,47911)),s.e(6588).then(s.bind(s,76588)),Promise.resolve().then(s.bind(s,71781)),s.e(9838).then(s.bind(s,19838)),s.e(1650).then(s.bind(s,81650)),Promise.all([s.e(4050),s.e(6220),s.e(1449),s.e(4159)]).then(s.bind(s,4159)),s.e(709).then(s.bind(s,20709)),s.e(8333).then(s.bind(s,48333)),Promise.resolve().then(s.bind(s,35432)),s.e(6961).then(s.bind(s,6961)),Promise.resolve().then(s.bind(s,42729)),s.e(2543).then(s.bind(s,62543)),s.e(7804).then(s.bind(s,77804)),s.e(4648).then(s.bind(s,24648)),s.e(42).then(s.bind(s,30042)),s.e(9476).then(s.bind(s,99476)),s.e(2050).then(s.bind(s,42050)),s.e(6700).then(s.bind(s,75478)),s.e(9203).then(s.bind(s,49203)),s.e(132).then(s.bind(s,90132)),s.e(3732).then(s.bind(s,43732)),s.e(3847).then(s.bind(s,13847)),s.e(4212).then(s.bind(s,14212)),s.e(6308).then(s.bind(s,36308)),s.e(6308).then(s.bind(s,36308)),s.e(185).then(s.bind(s,10185)),s.e(6052).then(s.bind(s,86052)),s.e(7490).then(s.t.bind(s,97490,23)),s.e(6430).then(s.bind(s,16430)),s.e(2416).then(s.bind(s,32416)),s.e(7837).then(s.bind(s,37837)),s.e(8724).then(s.bind(s,88724)),s.e(6236).then(s.bind(s,46236)),s.e(3622).then(s.bind(s,53622)),s.e(1790).then(s.bind(s,81790)),s.e(9001).then(s.bind(s,59001)),s.e(5848).then(s.bind(s,95848)),s.e(201).then(s.bind(s,10201)),s.e(1867).then(s.bind(s,51867)),s.e(5985).then(s.bind(s,55985)),s.e(296).then(s.bind(s,60296)),s.e(6807).then(s.bind(s,36807)),Promise.resolve().then(s.bind(s,50629)),s.e(2087).then(s.bind(s,12087)),s.e(3755).then(s.bind(s,83755)),s.e(116).then(s.bind(s,50116)),s.e(5034).then(s.bind(s,75034)),s.e(4473).then(s.bind(s,4473)),s.e(7597).then(s.bind(s,87597)),s.e(1199).then(s.bind(s,31199)),s.e(4661).then(s.bind(s,84661)),s.e(2357).then(s.bind(s,72357)),s.e(2118).then(s.bind(s,92118)),s.e(494).then(s.bind(s,10494)),s.e(4569).then(s.bind(s,4569)),s.e(3831).then(s.bind(s,73831)),s.e(966).then(s.bind(s,60966)),s.e(5581).then(s.bind(s,35581)),s.e(8251).then(s.bind(s,38251)),s.e(8290).then(s.bind(s,88290)),s.e(4900).then(s.bind(s,74900)),s.e(2022).then(s.bind(s,32022)),s.e(3794).then(s.bind(s,83794)),s.e(6046).then(s.bind(s,76046)),s.e(6593).then(s.bind(s,76593)),s.e(6883).then(s.bind(s,46883)),s.e(9050).then(s.bind(s,99050)),s.e(6479).then(s.bind(s,86479)),s.e(8522).then(s.bind(s,78522)),s.e(7149).then(s.bind(s,67149)),s.e(308).then(s.bind(s,90308)),s.e(3020).then(s.bind(s,63020)),s.e(5910).then(s.bind(s,55910)),s.e(8287).then(s.bind(s,58287)),s.e(9136).then(s.bind(s,59136)),s.e(6196).then(s.bind(s,46196)),s.e(1381).then(s.bind(s,71381)),s.e(6524).then(s.bind(s,54050)),s.e(19).then(s.bind(s,19)),s.e(5478).then(s.bind(s,35478)),s.e(1101).then(s.bind(s,31101)),s.e(2721).then(s.bind(s,2721)),s.e(2365).then(s.bind(s,82365)),s.e(2182).then(s.bind(s,12182)),s.e(8073).then(s.bind(s,18073)),Promise.all([s.e(4050),s.e(6220),s.e(1449),s.e(9628)]).then(s.bind(s,99628)),Promise.all([s.e(2609),s.e(4128)]).then(s.bind(s,14128)),Promise.all([s.e(4050),s.e(6220),s.e(9201)]).then(s.bind(s,99201)),Promise.all([s.e(4050),s.e(6220),s.e(2609),s.e(168)]).then(s.bind(s,30168)),Promise.resolve().then(s.bind(s,72743)),s.e(5246).then(s.bind(s,45246)),s.e(2397).then(s.bind(s,62397)),s.e(6993).then(s.bind(s,26993)),vo({href:"https://fonts.googleapis.com",ref:"preconnect",crossorigin:!0}),vo({href:"https://fonts.gstatic.com",ref:"preconnect",crossorigin:!0});const Uc=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;const s=[{type:"heading",level:6,text:"rootelement_editor_top_header"},{type:"fontFamily",text:"fontFamily",value:e.props?.style?.fontFamily,onChange:t=>{const e=t.target.value,n=(fe.h.get("components"),ge.Z.getComponents().find((t=>"root"===t.type))),r=[];ge.Z.store().execCommand("style",{fontFamily:e}),n.treeWalk((t=>{if(t&&t.props&&!["root","section","block","row","col"].find((e=>e===t.type))&&(t.props.style&&t.props.style.fontFamily!==e&&ge.Z.store().updateComponent(t,"style",{fontFamily:e}),t.type.equalWith("text")&&r.push(t.tiptap),Array.isArray(t.props.items))){const n=JSON.parse(JSON.stringify(t.props.items));n.forEach((t=>{t&&(t.style?t.style.fontFamily=e:t.props&&t.props.style&&(t.props.style.fontFamily=e),t.props&&t.props.label_field&&t.props.label_field.props&&t.props.label_field.props.style&&(t.props.label_field.props.style.fontFamily=e))})),ge.Z.store().updateComponent(t,"items",n)}})),r.forEach((t=>{t.chain().selectAll().setFontFamily({cssRule:e}).run()}))}},{type:"slider",title:"block_width",min:500,max:1200,value:(()=>{const t=e.find("section").find("block");return parseInt(t?.props.style.width)})(),onInput:t=>{let n=t.target.value;n<500&&(n=500),n>1200&&(n=1200);const r=(()=>{const t=[],n=e.find("section");return n&&n.children.forEach((e=>{const n=fe.h.get("components",e);n&&"block"===n.type&&t.push(n)})),t})();ge.Z.store().execCommand2({transactions:[{key:"style",value:{width:n+"px",maxWidth:"100%"}}],update:r})}},{type:"divider"},{type:"colorpicker",alpha:!1,value:e.props.style.background||"#fff",title:"page_background",onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e})}},{type:"divider"},{type:"colorpicker",alpha:!1,title:"bgColor_blocks",onChange:t=>{const e=t.target.value,n=fe.h.get("components").filter((t=>t.type.equalWith("block")));ge.Z.store().execCommand2({transactions:[{key:"style",value:{background:e}}],update:n})}},{type:"divider"},{type:"heading",level:6,text:"rootelement_editor_global_colors_heading"},{type:"heading",level:6,text:"Primary"},{type:"colorpicker",alpha:!1,title:"primaryColor",value:e.props.primaryColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("primaryColor",e)}},{type:"colorpicker",alpha:!1,title:"primaryContrastColor",value:e.props.primaryContrastColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("primaryContrastColor",e)}},{type:"divider"},{type:"heading",level:6,text:"secondary"},{type:"colorpicker",alpha:!1,title:"secondaryColor",value:e.props.secondaryColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("secondaryColor",e)}},{type:"colorpicker",alpha:!1,title:"secondaryContrastColor",value:e.props.secondaryContrastColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("secondaryContrastColor",e)}}];return s}}}},Zc=t=>{let{helpers:e,template:n,globalStylesVar:r}=t;return{set:(t,i,o)=>{switch(i){case"style":return t[i]=o,e.mergeDiff(n,{style:t[i]}),!0;case"fontFamily":case"fontSize":case"paragraphFontSize":case"headingLvlOneFontSize":return t[i]=o,!0;case"primaryColor":case"secondaryColor":case"primaryContrastColor":case"secondaryContrastColor":case"secondaryColor":return t[i]=o,r.patch(t),!0;default:return!1}}}};var Fc=s(8831),Vc={};Vc.setAttributes=u(),Vc.insert=p().bind(null,"head"),Vc.domAPI=c(),Vc.insertStyleElement=m();o()(Fc.Z,Vc);const Yc=Fc.Z&&Fc.Z.locals?Fc.Z.locals:void 0,Wc=document.createElement("style");Wc.patch=function(t){let{primaryColor:e,primaryContrastColor:n,secondaryColor:r,secondaryContrastColor:i}=t;e&&(Wc.innerHTML=`:root{--cdtr-primary:${e}}`),r&&(Wc.innerHTML+=`:root{--cdtr-secondary:${r}}`),i&&(Wc.innerHTML+=`:root{--cdtr-secondary-contrast:${r}}`),n&&(Wc.innerHTML+=`:root{--cdtr-primary-contrast:${n}}`)};const qc=()=>{const t="root";return{name:t,create:e=>{const{createElement:n,compose:i,helpers:o}=e,{children:s,backgrounds:a,commands:l}=i,{mergeDiff:c,arrayToString:d}=l;i.style||(i.style={});const p=d("root-component",i.classList,Yc.root);document.head.append(Wc),Wc.patch(i.props);const h=(0,r.Z)("div",{"data-id":i.id},s),u=(0,r.Z)("div",(0,A.Z)({},i,{className:p}),h);let f,m,g=(0,r.Z)("style",null,'\n .text-component:after{\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n }\n ');new vc.ZP(h,{group:"section-component",animation:450,handle:".section-handle--sortable",onStart:t=>{document.body.style.position="fixed",document.body.appendChild(g);const e=t.item;f=e.previousSibling?.dataset.id,m=e.nextSibling?.dataset.id},onEnd:function(t){document.body.style.position=null,g.remove();const e=t.item,n=t.to,r=t.from,i=t.oldIndex,o=t.newIndex;t.oldDraggableIndex,t.newDraggableIndex,t.clone,t.pullMode;ge.Z.store().moveComponent({componentId:e.dataset.id,newParentId:n.dataset.id,oldParentId:r.dataset.id,oldIndex:i,newIndex:o})}});return ge.Z.on("update",(()=>{setTimeout((()=>{const t=u.querySelector(`.${Yc.placeholder}`),e=h.children.length;0===e&&t||(e>0&&t?t.remove():0!==e||t||u.appendChild((0,r.Z)("div",{className:Yc.placeholder},(0,r.Z)("h1",null,"זה דף ריק,לחצו כאן כדי להוסיף אלמנטים, ורקעים"),(0,r.Z)("div",null,(0,r.Z)("paper-button",{onMousedown:()=>{be.Z.dispatch("open_add_menu",{type:"section-component"})},style:"color:var(--primary)"},(0,r.Z)("lang-text",{text:"for_quike_action_click_here"}))))))}),0)})),n({name:t,id:i.id,template:u,childrenHolder:h,allowSortable:!0,defaultProps:{},validator:Zc({template:u,helpers:o,globalStylesVar:Wc}),schema:i.schema,onSelect:()=>{},onDeselect:()=>{},elementProps:i,remove:()=>{u.remove()},createEditor:Uc})}}};var Xc=s(64721);const Gc=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"},{text:"animations"},{text:"settings"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;const s=e.closest("col"),a=[{type:"colorpicker",title:"background",value:e.props.style.background,onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e})}},,{type:"slider",title:"width",value:parseFloat(e.props.style.width),unit:"px",min:20,max:parseInt(window.getComputedStyle(s.element).width),onInput:t=>{const e=t.target.value;n.execCommand("style",{width:e+"px"})}},{type:"slider",title:"height",value:parseFloat(e.props.style.minHeight)||0,unit:"px",min:100,max:800,onInput:t=>{const e=t.target.value;n.execCommand("style",{minHeight:e+"px"})}}];return a}}}};s(46245);const Kc=t=>{let{helpers:e}=t;return{set:(t,n,r)=>{if("style"===n)return t[n]=e.deepMerge(t[n],r),!0}}};var Jc=s(77814),Qc={};Qc.setAttributes=u(),Qc.insert=p().bind(null,"head"),Qc.domAPI=c(),Qc.insertStyleElement=m();o()(Jc.Z,Qc);const td=Jc.Z&&Jc.Z.locals?Jc.Z.locals:void 0,ed=t=>{let{channel:e}=t;const n="card";return{name:n,menu:t=>{let{Compose:e}=t;return new e({type:n,children:[{type:"image",props:{}}],props:{style:{width:"300px",background:"#fff"}}},{group:"col",name:n,puzzle:[{type:"article"}],tags:[n],index:null})},create:t=>{const{createElement:e,compose:r,helpers:i}=t,{arrayToString:o,mergeDiff:s}=i,{children:a}=r,l=o(td.root,r.classList),c=document.createElement("div"),d=document.createElement("div");a[0].forEach((t=>{d.appendChild(t)})),c.append(d),c.className=l;const p=r.props.style;return delete p.border,delete p.borderWidth,delete p.borderStyle,delete p.borderColor,e({name:n,id:r.id,template:c,handleBar:!0,render:()=>{const t=p.width;if(p.height||(c.style.height="100%"),!parseInt(t)&&p.maxWidth){const t=p.padding||0;p.width=parseInt(p.maxWidth)-2*parseInt(t,10)+"px"}s(c,{style:p})},draggable:{group:"col"},childrenHolder:d,allowSortable:!0,defaultProps:{style:{background:"#fff",borderRadius:".2rem",width:"300px",maxWidth:"100%"}},validator:Kc({template:c,helpers:i,children:a}),schema:r.schema,onSelect:t=>{c.classList.add(t)},onDeselect:t=>{c.classList.remove(t)},elementProps:r,remove:()=>{c.remove()},createEditor:Gc})}}};let nd;const rd=class{constructor(e){let r;if((0,t.Z)(this,"site",void 0),(0,t.Z)(this,"commands",void 0),(0,t.Z)(this,"editor",void 0),e.channel||(e.channel="newsletter"),this.editor={setContent:t=>{nd&&nd.remove(),nd=wo({target:e.target,page:{},components:t||[]},(()=>{}))}},this.commands={snackbar:t=>{be.Z.dispatch("snackbar",{text:t})},langs:()=>fe.h.get("lang"),lang:t=>fe.h.get("lang",t),injectEditor:t=>{const e=fe.h.get("injectEditor");e&&e(t)},execCommand:(t,e)=>{ge.Z.store().execCommand(t,e)},toJSON:tc.au,toHTML:tc.io},fe.h.set({commands:this.commands}),e.target)if("string"==typeof e.target){if(r=document.getElementById(e.target),!r)throw new Error("string must be valid id or htmlElement")}else e.target instanceof HTMLElement?r=e.target:(r=document.createElement("div"),document.body.appendChild(r));else r=document.createElement("div"),e.target=r;fe.h.set({editor:ge.Z});const i=e.target;i.style.maxHeight="100vh",i.style.overflow="hidden",i.style.position="relative",ge.Z.on("change",(()=>{(0,tc.au)()})),fe.h.set({app:{_id:e.appId,name:e.documentName}}),e.languageJson&&fe.h.set({lang:e.languageJson}),ge.Z.configure=e?.editor?.configure;const o=e.language;!function(){if(jc(o)){fe.h.set({langConfig:{direction:"rtl",align:"right",justifyContent:"flex-start",justify:"start"}}),e.theme.textAlign=e.theme.textAlign?e.theme.textAlign:"right",e.theme.direction=e.theme.direction?e.theme.direction:"rtl",e.theme.justifyContent=e.theme.justifyContent?e.theme.justifyContent:"flex-start",e.theme.rowDirection=e.theme.rowDirection?e.theme.rowDirection:"row";const t=n(e.theme);fe.h.set({theme:t.theme}),i.appendChild(t.styleTag)}else{fe.h.set({langConfig:{direction:"ltr",align:"left",justifyContent:"flex-end",justify:"end"}}),e.theme.textAlign=e.theme.textAlign?e.theme.textAlign:"left",e.theme.direction=e.theme.direction?e.theme.direction:"ltr",e.theme.justifyContent=e.theme.justifyContent?e.theme.justifyContent:"flex-end",e.theme.rowDirection=e.theme.rowDirection?e.theme.rowDirection:"row-reverse";const t=n(e.theme);fe.h.set({theme:t.theme}),i.appendChild(t.styleTag)}let t=ge.Z?.configure?.plugins;Array.isArray(t)||(t=[]),t.push(qc),t.push(Xc.Z),t.push(ed),t=t.map((t=>t({channel:e.channel||"web",languages:e.languageJson,direction:fe.h.get("langConfig").direction,textAlign:fe.h.get("langConfig").align})));const r=e;r.editor.configure.plugins=t,fe.h.set({config:r,schemes:t}),nd=wo({target:e.target,page:{},components:e.components||[]},(()=>{const t=fe.h.get("components").find((t=>"root"===t.type));t&&ge.Z.clean().selectComponent(t)}))}(),e.collaborator,ge.Z.connectWithCloud(e.collaborator)}};function id(){const t="image";return{id:"1",name:t,menu:e=>{let{Compose:n}=e;return new n((()=>{const e="400px",n="250px";return{type:t,props:{alt:"image",width:e,height:n,style:{height:"auto",width:e,maxWidth:"100%",minWidth:"30px",objectFit:"fill"},src:`https://api.creaditor.com/images/placeholder?width=${parseInt(e)||250}&height=${parseInt(n)||250}`,isOpenWithModal:!1,isFullWidthOnMobile:!1,isRatioLock:!0}}})(),{group:"elements",name:t,puzzle:[{type:"image"}],tags:[t],index:null})},lazy:t=>{s.e(7946).then(s.bind(s,7946)).then((e=>{t(e.default())}))}}}function od(t){const{languages:e,direction:n,textAlign:r}=t,i="@paragraph/text";return{id:i,name:i,menu:t=>{let{Compose:o}=t;return new o({type:i,props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:r},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:e.generalText}]}]}}}},{group:"elements",name:"text",puzzle:[{type:"text"}],tags:[i],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(od.data))}))}}}od.configure=t=>{let{fontSize:e,title:n,suffix:r,prefix:i,fonts:o,direction:s,textAlign:a}=t;return od.data={fontSize:e,title:n,suffix:r,prefix:i,fonts:o,direction:s,textAlign:a},od};const sd="video";function ad(t){let{channel:e}=t;return"web"===e?{id:"vvidoe-4Kj^43",name:sd,menu:t=>{let{Compose:e}=t;return new e({type:sd,props:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},{group:"elements",name:sd,puzzle:[{type:"video"}],tags:[sd],index:null})},lazy:t=>{Promise.all([s.e(3691),s.e(3585)]).then(s.bind(s,83585)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"vvidoe-4Kj^43",name:sd,menu:t=>{let{Compose:e}=t;return new e({type:sd,props:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},{group:"elements",name:sd,puzzle:[{type:"video"}],tags:[sd],index:null})},lazy:t=>{Promise.all([s.e(3691),s.e(6069)]).then(s.bind(s,46069)).then((e=>{t(e.default())}))}}:void 0}function ld(t){const{languages:e,direction:n,textAlign:r}=t,i="text",o=`${i}/heading1`;return{id:o,name:i,menu:t=>{let{Compose:s}=t;return new s({type:i,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:n,textAlign:r},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"62px",color:"#000"}}],type:"text",text:e.bigHeading}]}]}}}},{id:o,group:"elements",name:"heading 1",puzzle:[{type:"heading1"}],tags:[i],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(ld.data))}))}}}function cd(t){const e="text",{languages:n,direction:r,textAlign:i}=t;return{id:"5445",name:e,menu:t=>{let{Compose:o}=t;return new o({type:e,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:2,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"42px",color:"#000"}}],type:"text",text:n.mediumHeading}]}]}}}},{id:`${e}/heading2`,group:"elements",name:"heading 2",puzzle:[{type:"heading2"}],tags:[e],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(cd.data))}))}}}function dd(t){const e="text",{languages:n,direction:r,textAlign:i}=t;return{id:"544663",name:e,menu:t=>{let{Compose:o}=t;return new o({type:e,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:3,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"#000"}}],type:"text",text:n.smallHeading}]}]}}}},{id:`${e}/heading3`,group:"elements",name:"heading 3",puzzle:[{type:"heading3"}],tags:[e],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(dd.data))}))}}}ld.configure=t=>(ld.data=t,ld),cd.configure=t=>(cd.data=t,cd),dd.configure=t=>(dd.data=t,dd);const pd="countdown";function hd(t){let{channel:e}=t;return"web"===e?{id:"1",name:pd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setHours(n.getMinutes()+30),{type:pd,props:{hasColons:!0,hasLabels:!0,date:n.toString(),language:"he",style:{},classList:[],containerWidth:"300px",containerBg:"transparent",containerRadius:"0",colBg:"transparent",colBorderStyle:"none",colBorderSize:"0",colBorderColor:"none",colBorderPadding:"0",colBorderRadius:"100px",numberSize:"30px",numberColor:"black",numberFontFamily:"Arial",labelSize:"14px",labelColor:"black",labelfontFamily:"Arial"}}),{id:pd,group:"elements",name:pd,puzzle:[{type:"countdown"}],tags:[pd],index:null});var n},lazy:t=>{s.e(9e3).then(s.bind(s,99e3)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:pd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:pd,props:{hasColons:!0,hasLabels:!0,date:n.toString(),language:"he",style:{},classList:[],containerWidth:"400px",containerBg:"transparent",containerRadius:"0",colBg:"transparent",colBorderStyle:"none",colBorderSize:"0",colBorderColor:"none",colBorderPadding:"0",colBorderRadius:"100px",numberSize:"30px",numberColor:"black",numberFontFamily:"Arial",labelSize:"14px",labelColor:"black",labelfontFamily:"Arial"}}),{group:"elements",name:pd,puzzle:[{type:"countdown"}],tags:[pd],index:null});var n},lazy:t=>{s.e(5204).then(s.bind(s,95204)).then((e=>{t(e.default())}))}}:void 0}function ud(t){const{languages:e}=t,n="button";return{id:"button-menu",name:n,menu:t=>{let{Compose:r}=t;return new r({type:n,props:{text:e.readMore,style:{height:"auto",width:"100px",maxWidth:"100%",minWidth:"30px",background:"#000",color:"#fff"}}},{group:"elements",name:n,puzzle:[{type:"button"}],tags:[n],index:null})},lazy:t=>{s.e(9800).then(s.bind(s,29800)).then((e=>{t(e.default())}))}}}const fd="map";function md(t){let{channel:e}=t;return"web"===e?{id:"1",name:fd,menu:t=>{let{Compose:e}=t;return new e({type:fd,props:{width:200,height:200,style:{height:"200px",width:"200px"},address:"תל אביב"}},{group:"elements",name:fd,puzzle:[{type:"map"}],tags:[fd],index:null})},lazy:t=>{s.e(9265).then(s.bind(s,59265)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:fd,menu:t=>{let{Compose:e}=t;return new e({type:fd,props:{width:200,height:200,style:{height:"200px",width:"200px"},address:"תל אביב",lang:"he"}},{group:"elements",name:fd,puzzle:[{type:"map"}],tags:[fd],index:null})},lazy:t=>{s.e(6234).then(s.bind(s,46234)).then((e=>{t(e.default())}))}}:void 0}const gd="social";function bd(t){let{channel:e}=t;return"web"===e?{id:"1",name:gd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:gd,props:{}}),{group:"elements",name:gd,puzzle:[{type:"social"}],tags:[gd],index:null});var n},lazy:t=>{s.e(9e3).then(s.bind(s,99e3)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:gd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:gd,props:{style:{gap:"10px"},items:[{id:(0,Mn.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},url:"https://youtube.com",src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/youtube.png"},{id:(0,Mn.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/snapchat.png"},{id:(0,Mn.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},url:"https://whatsapp.com",src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/whatsapp.png"}]}}),{group:"elements",name:gd,puzzle:[{type:"social"}],tags:[gd],index:null});var n},lazy:t=>{s.e(7637).then(s.bind(s,77637)).then((e=>{t(e.default())}))}}:void 0}function yd(t){const e=t?.heading,n=t?.text,r=t?.direction,i=t?.textAlign;return{type:"card",props:{style:{width:"95%",maxWidth:"345px",padding:"10px"}},children:[{type:"col",children:[{type:"image",props:{src:"https://api.creaditor.com/images/placeholder?width=350&height=150",width:400,height:150,isFullWidthOnMobile:!0,style:{width:"100%"}}}]},{type:"col",children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"#000"}}],type:"text",text:e}]}]}}}}]},{type:"col",children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:n}]}]}}}}]},{type:"col",props:{justify:"rtl"===r?"end":"start",style:{}},children:[{type:"button",props:{style:{}}}]}]}}function Ad(t){const e=t?.text;return{type:"row",props:{style:{width:"300px"}},children:[{type:"col",props:{lg:12,sm:12,justify:"end"},children:[{type:"image",draggable:!1,props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/last-post-quotes.png",width:24,height:24,style:{width:"24px",height:"24px"}}}]},{type:"col",props:{lg:12,sm:12},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:"rtl",textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:e}]}]}}}}]},{type:"col",props:{lg:12,sm:12,justify:"start"},children:[{type:"image",draggable:!1,props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/last-post-quotes.png",width:24,height:24,style:{width:"24px",height:"24px"}}}]}]}}function wd(t){let{homePageText:e,direction:n,textAlign:r}=t;return{name:"contact",icon:[{type:"contact"}],tags:["image","two images"],children:[{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/mail.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:"example@example.com"}]}]}}}}]},{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/website.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/phone.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:"0505891010"}]}]}}}}]}]}}function vd(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.width||400,n=t.height||200;return{type:"image",props:{alt:"image",width:e,height:n,style:{height:"auto",width:e,maxWidth:"100%",minWidth:"30px",objectFit:"fill"},src:`https://api.creaditor.com/images/placeholder?width=${parseInt(e)||250}&height=${parseInt(n)||250}`,isOpenWithModal:!1,isFullWidthOnMobile:!1,isRatioLock:!0}}}function xd(){const t={width:300,height:200};return{name:"two images",icon:[{type:"image"},{type:"image"}],tags:["image"],children:[vd(t),vd(t)]}}function _d(){const t={width:200,height:200};return{name:"threeImages",icon:[{type:"image"},{type:"image"},{type:"image"}],tags:["quote"],children:[vd(t),vd(t),vd(t)]}}function kd(){const t={width:150,height:100};return{name:"fourImages",icon:[{type:"image"},{type:"image"},{type:"image"},{type:"image"}],tags:["image"],children:[vd(t),vd(t),vd(t),vd(t)]}}function Cd(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t?.text;return{type:"button",props:{style:{height:"40px",padding:"10px",borderRadius:"5px"},text:e}}}function Ed(t){const e=t?.heading,n=t?.text,r=t?.direction,i=t?.textAlign;return{type:"card",id:"card-title-txt-bton",props:{style:{width:"95%",maxWidth:"345px",background:""}},children:[{type:"col",props:{alignItems:"center"},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",props:{alignItems:"center"},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:n}]}]}}}}]},{type:"col",props:{justify:"rtl"===r?"end":"start",style:{}},children:[{type:"button",props:{style:{marginTop:"10px"}}}]}]}}const Sd=JSON.parse('{"name":"שם","link":"קישור","secureLink":"קישור מאובטח","tel":"טלפון","email":"אימייל","items":"פריטים","confirm":"אישור","contact":"יצירת קשר","loadingMore":"טוען תמונות נוספות...","loading":"טוען...","image_in_progress":"התמונה נוצרת...","expand_image_for_outlook_description":"כדי שהתמונה תוצג ותשמור על פרופורציות - הפעילו את הצ׳קבוקס כדי לשמור על גובה התמונה.","email_600":"הפרקטיקות המומלצות לעיצוב מיילים קובעות שגודל הרוחב האידיאלי של ניוזלטר הוא 600 פיקסלים. מספר זה היה הסטנדרט במשך שנים רבות.","mergeTags":"תגיות מיזוג","simply:Scratchcard":"כרטיס גירוד","is_user_wants_https":"להחליף את הקישור לhttps?","social":"רשתות חברתיות","prompt_editor_context":"האם להתייחס לטקסט הקיים?","Enter_your_business_name":"הכניסו את שם העסק שלכם","Enter_your_business_type":"הכניסו את סוג העסק שלכם","Enter_the_URL_of_the_page":"הכניסו את כתובת הדף שלכם","secure_link":"קישור מאובטח","bulletColor":"צבע הבולט","links_with_invalid_url":"קישורים עם כתובות לא תקינות","images_without_alt":"תמונות ללא תיאור","savedLinks":"קישורים שמורים","sms_body_if_needed":"גוף ההודעה אם נדרש","whatsapp_body_if_needed":"הודעת וואטסאפ אם נדרש","twoImages":"שתי תמונות","fourImages":"ארבע תמונות","threeImages":"שלוש תמונות","threeButtons":"שלושה כפתורים","borderSize":"גודל הגבול","file":"קובץ","root":"הדף","col":"עמודה","inline-image":"תמונה פנימית","link_of_button":"לאן הכפתור מוביל ?","addedToFavorite":"התווסף למועדפים","removedFromFavorite":"נמחק מהמועדפים","choose_backgroundColor":"בחרו צבע רקע","removedSuccess":"נמחק בהצלחה","aToZ":"א-ת","zToA":"ת-א","anchorName":"שם העוגן","inputEmptyError":"יש למלא את השדה","savedSuccess":"נשמר בהצלחה","createdSuccessfully":"בוצע בהצלחה","texts":"טקסטים","numOneAsFemale":"אחת","click_here_to_add":"לחצו להוספה","heading":"כותרת","bigHeading":"כותרת גדולה","readMore":"קראו עוד","mediumHeading":"כותרת בינונית","smallHeading":"כותרת קטנה","icons":"אייקונים","divider":"קו מפריד","bullets":"בולטים","numbered":"מספור","ok":"אוקי","newImage":"תמונה חדשה","newFolder":"תיקיה חדשה","folders":"תיקיות","edit":"עריכה","article":"מאמר","videoWithArticle":"וידאו עם מאמר","fit_colors":"צבעים מתאימים","plainSection":"מקטע ריק","iamgeWithArticle":"תמונה עם מאמר","imageWithText":"תמונה עם טקסט","BulletsWithImage":"בולטים עם תמונה","BulletsWithArticle":"בולטים עם מאמר","SocialNetwork":"רשת חברתית","twoArticles":"שני מאמרים","twoButtons":"שני כפתורים","threeArticles":"שלושה מאמרים","imageWithBullets":"תמונה עם בולטים","undo":"ביטול","redo":"ביצוע מחדש","wide":"מתוח לכל האוחב","click_to_add":"","videos":"סרטונים","empty_section_info":"זהו מקטע ריק, לחצו כאן כדי להוסיף בלוקים","text:button":"מה הכפתור אומר?","video":"סרטון","images":"תמונות","image":"תמונה","weight":"עובי","buttons":"כפתורים","button":"כפתור","general":"כללי","all":"הכל","myImages":"התמונות שלי","uploadSuccess":"העלאה הושלמה","fromOldToNew":"מהישן לחדש","fromNewToOld":"מהחדש לישן","download":"הורדה","quotes":"ציטוט","recommended":"מומלץ","save_block":"שמירת בלוק","what_category":"באיזו קטגוריה?","middle":"אמצע","give_name_to_block":"תנו שם לבלוק","quote":"ציטוט","no_responsive":"ביטול רספונסיביות","home_page":"דף הבית","quote | image":"ציטוט | תמונה","image | quote":"תמונה | ציטוט","image | card":"כרטיס | תמונה","card | image":"תמונה | כרטיס","quotesWithText":"ציטוט עם טקסט","delete":"מחיקה","anchor":"עוגן","drag_section":"החליפו מיקום עם מקטע אחר","drag_block":"לחצו לבחירה או גררו לשנות את המיקום","remove_block":"הסרת בלוק","duplicate_block":"שכפול בלוק","deleteElement":"מחיקת אלמנט","deleteBlock":"מחיקת בלוק","preview":"תצוגה מקדימה","design":"עיצוב","changeName":"שינוי שם","upload":"העלאת תמונה","add":"הוספה","publish":"פרסם","addons":"תוספות","duo":"מועד","position":"מיקום","drag_to_move_click_to_options":"גרירה להזזה, לחיצה להגדרות","save":"שמירה","repeat":"חזור","autoplay":"הפעל מיד","expand_image_for_outlook":"הגדלת תמונה לאאוטלוק","errors_to_fix":"שגיאות לתיקון","buttons_without_links":"כפתורים ללא קישור","images_with_default_src":"תמונות עם כתובת דיפולטית","urlAddressToYoutVimeo":"שורת כתובת ליוטיוב, וימאו","add_urlAddress_from_media_site":"קישור חיצוני","remove_background_movie":"הסרת רקע","playInLoop":"הפעל בלופ","height_in_section":"גובה, 100 יפרס לכל גובה המסך בהתאם למכשיר","cellSpace":"ריווח תא","numbers":"מספרים","titles":"כותרות","go_to_edit_mode":"חזרה למצב עריכה","auto":"אוטומטי","search":"חיפוש","showAsImage":"הצג כתמונה","titlesStyle":"עיצוב הכותרות","delete_section":"הסרת מקטע","numbersStyle":"עיצוב המספרים","slientMode":"מצב השתק","ratioLock":"נעילת יחס","choose_your_duo_date":"בחרו את המועד הסופי","videoLink":"קישור לסרטון","openAsModal":"פתח תמונה בחלון צף","innerBackgroundColor":"רקע פנימי","radius":"רדיוס","iconsColor":"צבע האייקונים","whereIframeLink":"לאן האייפרם מכוון?","whereIsLinkTo":"?לאן הקישור מכוון","dividerColor":"צבע קו מפריד","buttonText":"טקסט הכפתור","settings":"הגדרות","counterTitle":"הצגת כותרות","foreColor":"צבע הטקסט","colors":"צבעים","marginBottom":"ריווח תחתון","color":"צבע","openGalleryImage":" גלריית תמונות","icon_gallery":"גלריית אייקונים","folderName":"שם תיקיה","addFolder":"הוספת תיקיה","newFolderAdded":"התיקיה ונוספה בהצלחה","file_moved_to_new_folder":"הקובץ הועבר לתיקיה אחרת","add_block":"הוספת בלוק","counterColor":"צבע למונה","chooseBlock":"גרור בלוק","automations":"אוטומציות","list-settings":"מתקדם","page_background":"רקע הדף","bgColor_blocks":"רקע הבלוקים","create_anchor":"צריכים עוגן? לחצו פה","copy":"העתק","uploading":"אני עובד על זה!","verifying":"רגע... כמה בדיקות קטנות","completed":"זהו... סיימתי!","timeout":"אופס! לא בטוח מה קרה פה...","copy_to_here":"העתקה לכאן","addLinks":"הוספת קישור","keep_ratio":"שמירת יחס","list-check":"אלמנטים","powered_by_pexels":"כל התמונות מאתר Pexels","image_micro_copy":"הוסיפו תמונה(אבל אחת יפה) בלחיצה על הכפתור, או לחיצה כפולה על התמונה","typography_micro_copy":"סמנו בדיוק את המילה, או בכלל לא כדאי לעצב את הטקסט","icons_list_micro_copy":"במידה ובולט לא נראה רציני במיוחד, החליפו אותו עם אייקון מעוצב ","anchor_name_micro_copy":"תנו לעוגן שם עכשיו, ותוכלו למצוא אותו בעריכת הקישורים אחר כך.","imageEditTitle":"עריכת תמונה","generate_content":"יצירת תוכן","creating_magic":"אני יוצר את התוכן שלכם...","address":"כתובת","prompt_editor_title":"יצירת תוכן","prompt_editor_textarea_placeholder":"תארו את התמונה שברצונכם לייצר","block_width":"רוחב הבלוקים","describe_image_prompt_input":"תארו את התמונה שברצונכם לייצר","image_prompt_editor_description":"אנחנו יכולים לייצר תמונה בהתאם לתיאור שתכתבו כאן, בלחיצה על כפתור הבחירה תוכלו לבחור תמונה מגלריית התמונות שלכם, או להכניס כתובת תמונה של תמונה חיצונית","insert_image":"בחירה","generate_image":"יצירת תמונה","generating":"אני עובד על זה...","creating_your_masterpiece":"אני יוצר את התמונה שלך...","he":"עברית","en":"אנגלית","ar":"ערבית","empty_state":"שקט פה.. שנתחיל שיחה?","videoEditTitle":"עריכת סרטון","backgroundColor":"צבע רקע","labels":"כותרות","add_table":"הוספת טבלה","button_design":"עיצוב הכפתור","background:form":"רקע הטופס","background:fields":"רקע השדות","width:form":"רוחב הטופס","no_editor:title":"עדיין לא יצרנו עריכה לאלמנט הזה, אנחנו עובדים על זה.","addons_menu:title":" תפריט התוספים, זה החלק המעניין, פה ניתן למצוא תוספים לשדרוג התוכן שלכם. פיצ\'רים נוספים יעלו בקרוב. בנתיים ניתן לגרור את האלמנט לבלוק או מקטע בגרירה חופשית לכל נקודה שתרצו..","sections_menu:title":"תפריט מקטעים, יצירת מקטע דורשת תשומת לב רבה לצרכים שלך, אנחנו עוד עובדים על זה, בנתיים ניתן ליצור מקטע ריק.","backgrounds_menu:title":"תפריט רקעים, בחרו רקע, אבל אחד יפה, וגררו אותו לבלוק או מקטע.","blocks_menu:title":"תפריט בלוקים, פה ניתן למצוא קומפוזציות של כמה אלמנטים שונים, ניתן לגרור אותם בין הבלוקים השונים ובין המקטעים ","elements_menu:title":"תפריט אלמנטים, גררו את האלמנט לצד אלמנט, התקרבו לפינה כדי לפתוח כתא חדש, או פשוט מתחת הבלוק ליצירת בלוק חדש","size_options":"מידות","backgrounds":"רקעים","contactForError":"דווח על שגיאה","contactForErrorDesc":"נתקלת בהתנהגות לא צפויה? \\n לחץ כאן לדיווח על תקלה","fetureRequest":"בקשה לתוספות","pastePageContent":" הדבקת תוכן מייל","titleColor":"צבע כותרת","agreeToOverride":"אני מאשר למחוק את התוכן הקיים ולהחליפו בתוכן שהועתק.","overridePageContent":"בחרת להדביק תוכן של מייל אחר לתוך הדף זה. \\n ההדבקה תמחק את התוכן הקיים בדף ותדביק במקומו את התוכן שהועתק.","fetureRequestDesc":"חסר לך פיצ\'ר כלשהו ? \\n לחץ כאן לבקשה להוספת כלים לעורך","copyPageContent":"העתקת תוכן הדף לחשבון אחר","copyPageContentDesc":"לחצו כאן כדי להעתיק את התוכן הדף לחשבון אחר שלכם בחשבון","pasteContent":"הדבקת תוכן מחשבון אחר","pasteContentDesc":"לחצו כאן כדי להדביק תוכן דף שהעתקם מחשבון אחר שלכם בחשבון","generalText":"כאן אנו נרשום את טקסט כללי כלשהו על המוצר שלנו. זהו אזור טקסט כללי כלשהו חופשי לגמרי ","longText":"כאן אנו נרשום את טקסט כללי כלשהו על המוצר שלנו. זהו אזור טקסט כללי כלשהו חופשי לגמרי, אפשר לרשום כאן מה שמתחשק לכם כל עוד מדובר בתוכן לעניין.","textBlock":"בלוק טקסט","component_selected":"נבחר בלוק","component_unselected":"בלוק לא נבחר","countdown":"מונה זמן","counterBlock":"בלוק קאונטר","bulletBlock":"בלוק בולטים","singleImage":"תמונה בודדת","allImages":"כל התמונות","add_section":"הוספת מקטע","bulletWithImageBlock":"בלוק בולטים לצד תמונה","header1block":"כותרת ראשית","bold":"הדגשה","underline":"קו תחתון","italic":"טקסט נטוי","strikeThrough":"קו חוצה","saved_links":"קישורים שמורים","forecolor":"צבע טקסט","numberColor":"צבע המספרים","threeCells":"שלושה תאים","twoCells":"שני תאים","backcolor":"רקע טקסט","fontFamily":"גופן","back":"חזור","fontSize":"גודל גופן","text_micro_copy":"כתבו ש\\"ח ואז לחיצה על רווח.. אהבתם? שתפו אותנו (: ","direction":"כיוון","right":"ימין","left":"שמאל","scroll":"גלילה","new_item":"פריט חדש","center":"מרכז","top":"למעלה","bottom":"למטה","next":"שלב הבא","twoCards":"שני כרטיסים","threeCards":"שלושה כרטיסים","justify":"מתיחה","remove":"הסרה","unLink":"הסרת קישור","appendImage":"הוספת תמונה","appendVideo":"הוספת סרטון","blocks":"בלוקים","page":"דף","section":"מקטע","block":"בלוק","pageSetting":"הגדרות הדף","home":"בית","about":"אודות","text":"טקסט","clear":"ניקוי","articleTitle":"כותרת מאמר","quick_add":"הוספה מהירה","Header1Web":"כותרת","shortText":"משהו חשוב שעל הלקוחות לדעת","articleMore":"הצג עוד","emoji":"אמוטיקון","lineHeight":"גובה שורה","two images":"שתי תמונות","heading 1":"כותרת גדולה","heading 2":"כותרת בינונית","heading 3":"כותרת קטנה","textAlign":"כיוון טקסט","sendTest":"שליחת בדיקה","Duplicate":"שכפול","DragHere":"גרור פה","imageSize":"גודל תמונה","alignImage":"מיקום תמונה","fullWidthOnMobile":"רוחב מלא במובייל","delete_bcakground":"הסרת רקע","edit_background":"עריכת רקע","altText":"טקסט חילופי","gallery":"גלרייה","padding":"ריווח פנימי","padding_top":"ריווח עליון","padding_bottom":"ריווח תחתון","margin":"ריווח חיצוני","size":"גודל","coming_soon":"מגיע בקרוב","background":"רקע","svg_color":"צבע הסמל","width":"רוחב","makeCircle":"שמירה על התמונה כעיגול","add_now":"הוספה","card":"כרטיסיה","go_back":"חזרה אחורה","add_new_element":"הוספת אלמנט חדש","what_the_anchor_name":"שם העוגן","form:manage_fields":"ניהול השדות בטופס","accessories":"תוספות","jhon_lennon":"ג\'ון לנון","jhon_lennon_qoute":"החיים זה מה שקורה בזמן שאתה עסוק בלתכנן תוכניות אחרות","headingText":"טקסט כותרת","height":"גובה","rotate":"סיבוב","dateAndTime":"תאריך ושעת סיום","hour":"שעה","is_active":"האם פעיל?","where_the_image_link":"לאן התמונה מובילה?","minutes":"דקות","alignButton":"מיקום כפתור","favorites":"מועדפים","main":"ראשי","type":"סגנון","opacity":"שקיפות","backgroundColorAndOpacity":"צבע רקע ושקיפות","mediaType":"סוגי מדיה","filter":"סינון","elements":"אלמנטים","freeImages":"תמונות בחינם","choose:":"בחירה","sendTestMail":"שליחת הודעת בדיקה","AddNewAddress":"הוספת מייל נוסף","searchImages":"חיפוש תמונות","send":"שליחה","fontNameWholePage":"פונט לכל הדף","blockMenuInfo":"לחץ על אחד התגיות לבחירה ולחיצה נוספת לביטול *","menu":"תפריט","menu_widget":"תפריט","emailAddress":"כתובת המייל","addEmoji":"הוספת אמוטיקון","addBackcolor":"הוספת צבע רקע","addForcolor":"הוספת צבע טקסט","openNewTab":"פתח בטאב חדש","stayOnSamePage":"השאר באותו הדף","desktopMode":"מצב דפדפן בלבד","lastColors":"צבעים אחרונים","colorsInPage":"צבעים בדף","getColorFromImage":"הצגת צבעים מתמונה","addressWithExample":"כתובת (דוגמא: פתח תקווה, הסיבים 18)","maps":"מפות","map":"מפה","layout":"פריסה","animations":"אנימציות","close_scheme_locked":"נעל סכימת צבעים","open_scheme_locked":"פתיחת סכימת צבעים","event":"אירוע","audio":"שמע","addNew":"הוסף חדש","delete_and_add":"הוספה והסרה","what_would_u_like_to_link":"מה תרצו להוסיף?","add_link":"הוספת קישור","name_of_nav":"שם כפתור הניווט","urlAddress":"שורת כתובת","can_Open_Gallery_With_Double_Click_On_The_Image":" פתיחת הגלרייה על ידי לחיצה כפולה על התמונה","uploadFile":"העלאה של קובץ חדש","FileSelection":"בחירת קובץ","this_is_empty_iframe_start_add_url_link":"זה אייפרם ריק, הוסיפו קישור לכתובת אינטרנט","yes,Create":"כן, צור תיקיה","letterSpacing":"ריווח בין האותיות","spacing":"ריווחים","solid":"אחיד","palletes":"פלטים","savedPalletes":"פלטים שמורים","savedToMainTab":"שמור בלשונית ראשית","dashed":"מקוקו","advanced":"מתקדם","Select_an_element_to_edit_its_properties":"בחרו אלמנט או לחצו על הוספה כדי להתחיל ליצור","maxWidth":"רוחב מקסימלי","whatTheBtnSays":"מה הכפתור אומר?","sendSms":"שליחת סמס","sendWhatsapp":"שליחת וואטסאפ","sendEmail":"שליחת מייל","what_the_url_address":"מהי שורת הכתובת שתרצו להוסיף?","add_catchy_subject":"הוסיפו נושא קליט","what_the_email_address":"לאן המייל ישלח?","what_the_phone_number":"מהו מספר הטלפון?","what_the_phone_number_to_send_msg":"מהו מספר אליו תשלח ההודעה?","email_body_if_needed":"תוכן גוף המייל","active_on-scroll":"יפעל בגלילה","active_on-hover":"יפעל במצב ריחוף עם העכבר","drag_or_click":"גרירה","heading-1":"כותרת גדולה","svg-element":"אלמנט SVG","divider-element":"קו מפריד","iframe":"אייפרם","html-code":"קוד HTML","video with text":"וידאו עם טקסט","image with text":"תמונה עם טקסט","quotes-block":"בלוק ציטוט","animation_deleted":"האנימציה נמחקה","animation_added":"האנימציה נוספה","show_on_desktop":"הצג במחשב הלוח","show_on_mobile":"הצג במכשיר נייד","show_on_tablet":"הצג במכשיר טאבלט","properties":"מאפיינים","ID_with_description":"מזהה (ID)","on_hover":"במצב ריחוף עם העכבר","on_scroll":"בגלילה","menu-widget":"תצוגת תפריט","setting_section":"הגדרות סקשן","setting_block":"הגדרות בלוק","remove_element":"הסרת אלמנט","drag_element":"גרירת אלמנט","max_width":"רוחב מקסימלי","open_gallery":"פתיחת גלריה","open_gallery_icons":"גלריית אייקונים","number_size":"גודל המספרים","large":"גדול","medium":"בינוני","small":"קטן","extra-large":"גדול מאוד","without_radius":"ללא רדיוס","design_custom_list":"עיצוב רשימה מותאמת אישית","display_mode":"מצב תצוגה","left-to-element":"שמאל לאלמנט","right-to-element":"ימין לאלמנט","bottom-to-element":"מתחת לאלמנט","top-to-element":"מעל לאלמנט","open-new-cell-from-right":"הוספה בתא חדש מימין","open-new-cell-from-left":"הוספה בתא חדש משמאל","open-new-block-from-bottom":"הוספה בבלוק חדש מתחת","open-new-block-from-top":"הוספה בבלוק חדש מעלה","description":"תיאור","title":"כותרת","keywords":"מילות מפתח","favicon":"סמל מוצא","cancel":"ביטול","standard":"סטנדרטי","ready_to_publish":"מוכן לפרסום","lets_set_some_seo":"בואו נוסיף כמה הגדרות SEO","We_are_building_your_page":"אנחנו בונים את העמוד שלך","inner_blocks":"מרכז המקטע","drag_here":"גררו לכאן","advance_options":"אפשרויות מתקדמות","duplicate_template_code":"קוד לשכפול תבנית","copied":"הועתק","click_to_copy":"Click To Copy","fade_in":"Fade in","fade_in_down":"Fade in down","back_in_down":"Back in down","back_in_right":"Back in right","bounce":"קופצני","tada":"שיקשוק","saved_theme":"עיצוב שמור","open_colorpicker":"בחירה של צבע אישי","colors_that_created_from_image":"צבעים שנוצרו מתמונה","publish_success":"פרסום בוצע בהצלחה","open_the_page":"פתיחת העמוד בדף חדש","close":"סגירה","title_size":"גודל כותרות","ilustrations":"סמלים","svg":"סמל","click_to_refresh":"לחיצה לרענון הדף","error_client_disconnected":"אופס! החיבור לשרת נותק, לחצו על רענון הדף כדי להמשיך לעבוד, בנתיים קבלנו את הנתונים ואנחנו עובדים על פתרון הבעיה, עמך סליחה והמשך עבודה מהנה","connection_error":"החיבור נותק 😱, אבל אל דאגה, התוכן נשמר","typography":"טיפוגרפיה","more_colors":"צבעים נוספים","button_submit_form":"שליחה","get_started":"התחילו עכשיו","design_form":"עיצוב טופס","form_settings":"הגדרות טופס","input":"קלט","send_mail_on_submitted":"רוצים לקבל מייל כשלקוחות נרשמים?","placeholder":"טקסט פנימי של הקלט(במצב ללא טקסט)","default_value":"ערך ברירת מחדל","required":"חובה","hidden":"מוסתר","hidden_field":"שדה מוסתר","advance_setting":"הגדרות מתקדמות","label":"כותרת","color:label":"צבע הטקסט","radio-group":"קבוצת לחצנים","items_in_radio_group":"פריטים בקבוצת לחצנים","add_item":"הוספת פריט","textarea":"טקסט ארוך","items_in_menu":"פריטים בתפריט","checkbox":"תיבת סימון","height:form_field":"גובה השדות","ready_blocks":"בלוקים מוכנים","box-shadow":"אפקט צל","add_new_field":"הוספת שדה חדש","border_design":"עיצוב מסגרת","individual_elements":"אלמנטים בודדים","number_color":"צבע המספרים","send_form_only_if_checked":"שליחת טופס תתאפשר רק אם מסומן","select_fields_to_edit":"לחצו על האלמנטים בטופס לעריכה","url_parameters":"שם פרמטר בשליחה","the_color_of_cols":"צבע מקטעי המספרים","the_radius_of_col":"רדיוס קטעי המספרים","hidden_form_field_info":"שדה שלא יופיע לגולשים בתצוגת הטופס, משמש בעיקר לקבלת ערכי REF ו UTM או פרמטרים קבועים שמעונינים שיופיעו אוטומטית בשדות של הנרשם בטופס הספציפי מבלי שהוא ממלא או רואה אותם.","required_form_field_info":"שדה שהנרשם בטופס חייב למלא/לסמן אותו על מנת לשלוח את הטופס, טופס ששדה חובה לא מולא בו לא ישלח ויקפיץ הודעה לממלא הטופס שהשדה הוא חובה","url_param":"שם פרמטר בשליחה","show_colons":"להציג נקודותיים ?","please_wait_downloading_new_version":"אנא המתינו, אנחנו מעדכנים גרסה חדשה","my_fields":"השדות שלי","allow_send_form_only_if_checked":"אפשר לשלוח טופס רק אם מסומן","field_settings":"הגדרות שדה","after_form_subscribed":"מה לעשות אחרי שהטופס נשלח?","add_user_from_mailinglist_after_subscribed":"לאיזה קבוצות דיוור נרשום את הלקוח שלנו?","remove_user_from_mailinglist_after_subscribed":"מאיזה קבוצות דיוור נסיר את הלקוח שלנו ?","available_fields":"השדות שלי","background_fields":"רקע השדות","label_color":"צבע כותרת עליונה","title_color":"צבע הכותרות","button_color":"צבע טקסט הכפתור","start":"התחלה","end":"סיום","duration":"משך","prefix":"לפני","suffix":"אחרי","separator":"מפריד","count-up":"לספר עד","pie-chart":"פיי נתונים","edit_data":"עריכת נתונים","border_editor":"עריכת מסגרת","moving_from_mailing_list":"הוספה והסרה מרשימת דיוור","coming_soon_automations":"בקרוב! אנחנו מאמינים שאתם ואתן כבעלי ובעלות עסקים צריכים חיים קלים! לכן אנחנו עובדים על תפריט אוטומציות כדי שתוכלו להנות ולבצע פעולות גם בזמן שאתם ישנים.","bar-chart":"טבלת עמודות","cols_color":"צבעי עמודות","button_background":"רקע הכפתור","button_radius":"רדיוס כפתור","justifyContent":"ישור אופקי","alignItems":"ישור אנכי","design_pallete":"פלאטת הצבעים שלי","rootelement_editor_top_header":"שינוי גופן לכל האלמנטים בדף, כלל אלמנטים חדשים שתוסיפו","rootelement_editor_global_colors_heading":"צבעים שמורים לדף, בחרו צבעים לפי צבעי המותג שלכם, ואחר כך הצבעים יחכו לכם בבחירת צבע של כל אלמנט בתוך הcolorpicker","flex-start":"התחלה","primaryColor":"צבע ראשי","primaryContrastColor":"צבע ראשי נגדי","secondaryColor":"צבע משני","secondaryContrastColor":"צבע משני נגדי","flex-end":"סיום","make_it_default_value":"הפוך לערך ברירת מחדל","show_success_popup":"הצגת פופאפ בעת בהצלחה","forward_params":"להעביר פרמטרים?","user_will_redirect_to":"הלקוח יעבור לדף הבא","where_to_redirect":"לאן להעביר את הלקוח?","component_color":"צבע הרכיב","none":"ללא","my_form":"הטופס שלי","form:placeholder_color":"צבע הטקסט הפנימי","search_my_fields":"חיפוש השדות שלי","checkbox_on_right_side":"צ\'קבוקס מימין?","choose_an_option":"בחרו באחת האפשרויות הבאות","checkbox_checked_as_default":"תיבת סימון מסומנת כברירת מחדל","paragraph":"פיסקה","after_submission":"מה יקרה לאחר הרשמה?","stay_at_page":"נשארים בדף","redirect":"מועברים למקום אחר","field_background":"רקע שדות","form:heading":"בואו נדבר, הקפה עלינו!","form:subHeading":"לקביעת פגישה או רק שאלה? אשמח לסייע לכם! השאירו פרטים ואחזור אליכם בהקדם","form:background":"צבע הרקע של שדות","style":"עיצוב","connection_lost":"החיבור אבד","error_transactions_not_completed":"חלק מהפעולות לא הושלמו, בדיוק ברגעים אלה קיבלנו את המידע ואנחנו עובדים על שיפור החוויה בעורך","form":"טופס","sync_all_forms":"סנכרן את כל הטפסים","send_the_data_to":"צריכים לשלוח את הנתונים לCRM ?","horizontal_shadow_length":"מיקום האופקי של הצל","vertical_shadow_length":"מיקום האנכי של הצל","blur_radius":"טשטוש הצל","spread_radius":"פריסת הצל","open_image_editor":"עריכת תמונה","shadow_color":"צבע הצל","inset":"מיקום חיצוני ?","box_shadow:info":"Adds shadow effects around an element\'s frame.","choose":"בחירה","design_for_phone":"עיצוב לנייד","design_for_desktop":"עיצוב למחשב","number_example":"05000000","website_example":"www.example.com","email_example":"example@example.com","link_target":"יעד הקישור","open_in_new_tab":"פתח בטאב חדש","open_in_same_tab":"פתח באותו טאב","open_in_parent_frame":"פתח במסגרת ההורה","open_in_top_frame":"פתח במסגרת העליונה","_blank":"פתח בטאב חדש","_self":"פתח באותו טאב","_parent":"פתח במסגרת ההורה","_top":"פתח במסגרת העליונה","user_menu":"תפריט משתמש","send_test_emails":"שליחת מיילי בדיקה","attached_files":"קבצים מצורפים","make_newsletter_as_event":"הפוך ניוזלטר לאירוע","edit_block":"עריכת בלוק","add_files":"הוסף קבצים","max_files_reached":"מספר הקבצים המקסימלי הושג","make_event":"צור אירוע","name_and_subject":"שם ונושא","enter_email_addresses":"הזן כתובות מייל (פסיק או Enter להוספה)","invalid_email_error":"אנא הזן כתובת מייל תקינה","no_emails_error":"אנא הוסף לפחות כתובת מייל אחת","create_event":"צור אירוע","start_date_time":"תאריך ושעת התחלה","end_date_time":"תאריך ושעת סיום","location":"מיקום","link_optional":"קישור (אופציונלי)","save_event":"שמירת אירוע","cancel_event":"ביטול","font_color":"צבע גופן","confirm_cancel":"האם אתה בטוח שברצונך לבטל?","creating_event":"יוצר אירוע...","event_created":"האירוע נוצר!","end_after_start_error":"תאריך/שעת הסיום חייב להיות אחרי תאריך/שעת ההתחלה","enter_event_location":"הזן מיקום האירוע","enter_event_link":"הזן קישור לאירוע","logout":"יציאה מהעורך","details":"פרטים","subject":"נושא","iconDirection":"כיוון האייקון","subtitle":"כותרת משנה","hasIcon":"להפעיל אייקון?","enter_subject":"מה יהיה נושא המייל(subject)?","apply":"החל","automation_settings":"הגדרות אוטומציה","what_should_happen":"בלחיצה על הקישור, אנחנו נסיר או נוסיף את המשתמש לקבוצות הדיוור הבאות","add_to_mailing_list_question":"להוסיף","remove_from_mailing_list_question":"להסיר","select_mailing_lists":"בחרו רשימות תפוצה","saved_successfully":"הפעולה נשמרה בהצלחה","need_automations":"צריכים אוטומציה? לחצו על הכפתור. במידה ולא תמצאו מה שאתם צריכים, נשמח לשמוע איך נוכל לעזור .","menu_automations":"תפריט אוטומציות","selected":"נבחרו","automation_link_preview":"קישור אוטומציה","apply_automation":"החל אוטומציה"}'),Bd=JSON.parse('{"name":"Name","link":"Link","secureLink":"https link","tel":"Tel","email":"Email","keep_ratio":"Keep ratio","recommended":"Recommended","opengalleryimage":"Open gallery","email_600":"Email design best practices peg the ideal email newsletter width size at 600 pixels. This number has been the standard for many years.","secure_link":"Secure link","items":"Items","moving_from_mailing_list":"Moving from mailing list","links_with_invalid_url":"Links with invalid url","prompt_editor_title":"Create Your Content","generate_content":"Generate Content","creating_magic":"Creating Magic...","images_without_alt":"Images without alt","sms_body_if_needed":"SMS body if needed","whatsapp_body_if_needed":"WhatsApp message if needed","simply:Scratchcard":"Scratch card","image_in_progress":"Image in progress...","text_micro_copy":"Be creative, write something that will make your customers want to click on the button.","jhon_lennon":"Jhon Lennon","jhon_lennon_qoute":"Life is what happens when you\'re busy making other plans","headingText":"Heading text","title_color":"Title Color","button_color":"Color Button","button_background":"Background Button","start":"Start","end":"End","duration":"Duration","prefix":"Prefix","suffix":"Suffix","separator":"Separator","count-up":"Count up","pie-chart":"Pie chart","edit_data":"Edit Data","bar-chart":"Barchart","cols_color":"Cols Colors","button_radius":"Radius Button","accessories":"Accessories","elements":"Elements","confirm":"Accept","drag_block":"Drag block","what_the_anchor_name":"What the anchor name?","checkbox_on_right_side":"Checkbox on Right?","drag_to_move_click_to_options":"Drag to move, click to options","contact":"Contact","buttons_without_links":"Buttons without links","images_with_default_src":"Images with default src","errors_to_fix":"Errors to fix","expand_image_for_outlook":"Expand image for Outlook","social":"Social Networks","forward_params":"Forward Params?","menu_widget":"Menu widget","powered_by_pexels":"Powered by Pexels","bulletColor":"Bullet Color","makeCircle":"Make Circle","twoImages":"Two Images","component_color":"Component Color","close_scheme_locked":"Close scheme locked","open_scheme_locked":"Open scheme locked","threeImages":"Three Images","threeButtons":"Three Buttons","file":"File","auto":"auto","colors":"Colors","iconsColor":"Icon colors","slientMode":"Slient Mode","dividerColor":"Divider Color","this_is_empty_iframe_start_add_url_link":"This is empty iframe. Start adding url link","openAsModal":"Open image in modal","autoplay":"Autoplay","showAsImage":"show As Image","playInLoop":"play In Loop","addedToFavorite":"Added to Favorites","removedFromFavorite":"Deleted from favorites","removedSuccess":"Successfully deleted","aToZ":"A-Z","zToA":"Z-A","anchorName":"Anchor Name","inputEmptyError":"Fill in the field","savedSuccess":"Saved successfully","createdSuccessfully":"Done successfully","home":"Home","about":"About","position":"Position","scroll":"Scroll","repeat":"Repeat","choose":"Choose","texts":"Texts","home_page":"Home Page","numOneAsFemale":"One","heading":"Title","bigHeading":"Big Title","readMore":"Read More","quick_add":"Quick Add","click_here_to_add":"Click here to add","mediumHeading":"Medium title","smallHeading":"Small title","icons":"Icons","divider":"Divider","bullets":"Bullets","numbered":"Numbering","ok":"OK","newImage":"New Image","newFolder":"New Folder","folders":"Folders","addLinks":"Add link","edit":"editing","rootelement_editor_top_header":"Global settings","block_width":"Block width","page_background":"Page background","bgColor_blocks":"Background color","rootelement_editor_global_colors_heading":"Global colors","openGalleryImage":"Open gallery","clone_element":"Clone element","what_the_url_address":"What the url address?","videoWithArticle":"Video with article","give_name_to_block":"Give name to block","save_block":"Save block","choose_your_duo_date":"Choose your duo date","what_category":"What category?","iamgeWithArticle":"Image with article","imageWithText":"Image with text","no_responsive":"No responsive","BulletsWithImage":"Bulltes with image","SocialNetwork":"Social networks","height:form_field":"Fields height","box-shadow":"Shadow-Fx","ready_blocks":"Blocks","individual_elements":"Individual Elements","connection_lost":"Connection Lost","add_now":"Add Now","error_transactions_not_completed":"TODO:complete_text","form:manage_fields":"Manage The Form","add_new_field":"Add New Field","border_design":"Border Design","number_color":"Numbers Color","twoArticles":"Two article","the_color_of_cols":"The Color Of Cols","the_radius_of_col":"The Radius Of Cols","twoButtons":"Two buttons","show_colons":"Show Colons","my_fields":"My Fields","no_editor:title":"We will add editor to this element soon as possible.","threeArticles":"Three articles","addons_menu:title":"Addons menu, Here you can find some features that will improve your app. drag the element to block or section.","sections_menu:title":"Section menu, We didn’t find time to fill this content. Writing a new section needs a great understanding of your needs.","backgrounds_menu:title":"Backgrounds menu, choose a background, but a nice one and drag it to a block or a section.","blocks_menu:title":"Block menu, here you can find composes of multipal elements in the same block, just drag it between the blocks and the sections.","elements_menu:title":"Drag the element at the right,left.. or just drop it as a new block.","imageWithBullets":"Image With bullets","undo":"Cancel","redo":"Restore","wide":"Wide","text:button":"What The Button say?","empty_section_info":"This is empty section, Click here to add block and beatiful background.","videos":"Videos","video":"Video","images":"Images","image":"Image","weight":"Weight","buttons":"Buttons","button":"Button","general":"General","all":"All","myImages":"My Images","uploadSuccess":"Upload complete","fromOldToNew":"Old to new","fromNewToOld":"New To old","download":"Download","quotes":"A Quote","quotesWithText":"Quote with text","delete":"Deletion","anchor":"Anchor","deleteElement":"Delete element","deleteBlock":"Delete block","preview":"Preview","design":"Design","changeName":"Rename","upload":"Upload Image","uploading":"Uploading...","verifying":"Verifying...","completed":"Completed!","timeout":"Upload timeout","add":"Add","addons":"Extras","save":"Save","cellSpace":"Cell spacing","search":"Search","ratioLock":"Ratio lock","videoLink":"Video link","settings":"Settings","counterTitle":"Counter title?","folderName":"Folder name","addFolder":"Add folder","add_block":"Add block","counterColor":"Counter color","chooseBlock":"Drag a block","imageEditTitle":"Photo editing","videoEditTitle":"Edit video","size_options":"Size Options","backgroundColor":"Backgorund","backgrounds":"Backgrounds","contactForError":"Report an error","contactForErrorDesc":"Did you come across something unexpected?\\n Click here to report the error","fetureRequest":"Request for additions","pastePageContent":" Paste email content","titleColor":"Title color","agreeToOverride":"I agree to delete the existing content and replace it with copied content.","overridePageContent":"You have chosen to paste the content of another email into this page. \\n The paste will delete the existing content on the page and paste the copied content in its place.","fetureRequestDesc":"Are you missing any feature? \\n Click here to request tools to be added to the editor","copyPageContent":"Copy the contents of the page to another account","copyPageContentDesc":"Click here to copy the page content to your other account","pasteContent":"Paste content from another account","pasteContentDesc":"Click here to paste copied content","generalText":"Here we will write down some general text about our product. This is some general text area completely free","longText":"Here we will write down some general text about our product. This is some general text area that is completely free, you can write here what you feel like as long as it is relevant content.","textBlock":"Text block","timeCounter":"Time counter","counterBlock":"Counter block","bulletBlock":"Bullets block","singleImage":"Single image","allImages":"All images","bulletWithImageBlock":"Bullet with images","header1block":"Main title","bold":"Bold","underline":"Underline","italic":"Italic","strikeThrough":"Strike through","forecolor":"Forecolor","threeCells":"Three cells","twoCells":"Two cells","backcolor":"Background text","fontFamily":"Font","fontSize":"Font size","direction":"Direction","right":"Right","left":"Left","center":"Center","justify":"Justify","unLink":"Unlink","appendImage":"Add an image","appendVideo":"Add an video","blocks":"Blocks","page":"Page","block":"Block","section":"Section","pageSetting":"Page settings","text":"Text","clear":"Clear","articleTitle":"Article title","Header1Web":"Title","shortText":"Something important that customers need to know","articleMore":"Show more","emoji":"Emoji","lineHeight":"Line height","textAlign":"Text align","sendTest":"Send test","article":"Article","Duplicate":"Duplicate","component_selected":"Component selected","component_unselected":"Component unselected","add_section":"Add section","remove_block":"Remove block","duplicate_block":"Duplicate block","BulletsWithArticle":"Bullets With Article","sendTestMail":"Send Test Message","blockMenuInfo":"Click on the tag and click again to set it off *","fontNameWholePage":"Whole Page Font name","AddNewAddress":"Add new Input","send":"Send","emailAddress":"Email Address","DragHere":"Drag here","imageSize":"Image size","alignImage":"Align image","fullWidthOnMobile":"Full width on mobile","altText":"Alt text","gallery":"Gallery","padding":"Padding","size":"Size","coming_soon":"Coming Soon","width":"Width","height":"Height","dateAndTime":"Date and Time","hour":"Hour","minutes":"Minute","alignButton":"Align button","main":"Main","favorites":"Favorites","mediaType":"Media type","filter":"Filter","addEmoji":"Add Emoji","addBackcolor":"Add Backcolor","addForcolor":"Add Forecolor","lastColors":"Last Colors","colorsInPage":"Colors in page","openNewTab":"New window","stayOnSamePage":"Same window","desktopMode":"Desktop mode only","addressWithExample":"Address (Example:Petah Tikva,Sibim 18)","maps":"Maps","map":"Map","layout":"Layout","event":"Event","audio":"Audio","addNew":"Add New","animations":"Animations","urlAddress":"Url Address","can_Open_Gallery_With_Double_Click_On_The_Image":"You can open the gallery by Double click on the Image","uploadFile":"Upload File","FileSelection":"File Selection","yes,Create":"Yes, Create","letterSpacing":"Letter Spacing","spacing":"Spacing","advanced":"Advanced","Select_an_element_to_edit_its_properties":"Select an Block, Button, or Text to edit its properties","what_the_phone_number_to_send_msg_to":"What the phone number to send message to","email_body_if_needed":"Email body if needed","what_the_phone_number":"What the phone number to call to","what_the_email_address":"What the email address to send to","active_on-scroll":"Active on scroll","active_on-hover":"Active on mouse over","drag_or_click":"Drag or click","heading-1":"Heading 1","svg-element":"SVG Element","divider-element":"Divider Element","iframe":"Iframe","html-code":"Html Code","video with text":"Video with text","image with text":"Image with text","quotes-block":"quotes block","animation_deleted":"Animation deleted","animation_added":"Animation added","show_on_desktop":"Show on desktop","show_on_mobile":"Show on mobile","show_on_tablet":"Show on tablet","properties":"Properties","ID_with_description":"ID (advance)","on_hover":"On mouse over","on_scroll":"On scroll","menu-widget":"Menu widget","setting_section":"Setting section","setting_block":"Setting block","remove_element":"Remove element","drag_element":"Drag element","max_width":"Max width","open_gallery_icons":"Open gallery icons","number_size":"Number size","large":"Large","medium":"Medium","small":"Small","extra-large":"Extra Large","without_radius":"Without radius","design_custom_list":"Design custom list","display_mode":"Display mode","description":"Description","title":"Title","keywords":"Keywords","favicon":"Favicon","cancel":"Cancel","standard":"Standard","ready_to_publish":"Ready to publish","lets_set_some_seo":"Let\'s set some SEO","We_are_building_your_page":"We are building your page","fade_in":"Fade in","fade_in_down":"Fade in down","back_in_down":"Back in down","back_in_right":"Back in right","bounce":"Bounce","tada":"Tada!!","saved_theme":"Saved theme","go_back":"Go back","open_colorpicker":"Open colorpicker","colors_that_created_from_image":"Colors that created from image","publish_success":"Publish success","open_the_page":"Open the page","close":"Close","title_size":"Title size","ilustrations":"Ilustrations","svg":"SVG","click_to_refresh":"Click to refresh","error_client_disconnected":"Opps! we are disconnected from the server. Please try again later.","connection_error":"Connection error 😱 ","typography":"Typography","more_colors":"More colors","button_submit_form":"Send","get_started":"Get started","design_form":"Design form","input":"Input","placeholder":"Placeholder","default_value":"Default value","required":"Required","after_submission":"On Submission?","stay_at_page":"Nothing","redirect":"Redirect","form:background":"Placeholder Color","hidden":"Hidden","form_settings":"Form settings","hidden_field":"Hidden field","advance_setting":"Advance setting","label":"Label","radio-group":"Radio group","items_in_radio_group":"Items in radio group","add_item":"Add item","textarea":"Textarea","items_in_menu":"Items in menu","checkbox":"Checkbox","send_form_only_if_checked":"Send form only if checked","select_fields_to_edit":"Select fields to edit","url_parameters":"URL parameters","hidden_form_field_info":"text required here..","required_form_field_info":"text required here..","url_param":"URL parameter","please_wait_downloading_new_version":"Please wait downloading new version","allow_send_form_only_if_checked":"Allow send form only if checked","field_settings":"Field settings","inner_blocks":"Center","automations":"Automations","drag_here":"Drag here","advance_options":"Advance Options","copied":"Copied","duplicate_template_code":"Duplicate Template Code","click_to_copy":"Click To Copy","list-check":"Elements","drag_section":"Drag section","card":"Card","list-settings":"Advance","icons_list_micro_copy":"If a bullet doesn\'t look serious enough, you can use an icon instead.","typography_micro_copy":"Typography your text with the help of the typography settings.","anchor_name_micro_copy":"Name it now, find it later in the link editor.","create_anchor":"Need Anchor? click here","image_micro_copy":"Click on the button, or dblClick on the image to add an image(but a beautiful one).","after_form_subscribed":"What we Should do after form subscribed","add_user_from_mailinglist_after_subscribed":"Pick mailinglist the user subscribed","remove_user_from_mailinglist_after_subscribed":"Pick mailinglist the user subscribed","available_fields":"My fields","add_urlAddress_from_media_site":"Add url from media site","background_fields":"Background fields","label_color":"Label color","make_it_default_value":"Make it default value","show_success_popup":"Show success popup","user_will_redirect_to":"User will redirect to","where_to_redirect":"Where to redirect?","none":"None","my_form":"My form","search_my_fields":"Search my fields","choose_an_option":"Choose an option","checkbox_checked_as_default":"Checked as default","form":"Form","sync_all_forms":"Sync all forms","send_the_data_to":"Need to send the data to crm ?","color:label":"Color Text","field_background":"Field Background","paragraph":"Paragraph","horizontal_shadow_length":"Horizontal Shadow Length","vertical_shadow_length":"Vertical Shadow Length","blur_radius":"Blur Radius","spread_radius":"Spread Radius","shadow_color":"Shadow Color","inset":"Inset","box_shadow:info":"Adds shadow effects around an element\'s frame.","design_for_phone":"Mobile Design","design_for_desktop":"Desktop Design","number_example":"05000000","website_example":"www.example.com","email_example":"example@example.com","link_target":"Link Target","open_in_new_tab":"Open in new tab","open_in_same_tab":"Open in same tab","open_in_parent_frame":"Open in parent frame","open_in_top_frame":"Open in top frame","user_menu":"User Menu","send_test_emails":"Send Test Emails","attached_files":"Attached Files","make_newsletter_as_event":"Make Newsletter as Event","add_files":"Add Files","max_files_reached":"Maximum number of files reached","make_event":"Make Event","name_and_subject":"Name & Subject","enter_email_addresses":"Enter email addresses (comma or enter to add)","invalid_email_error":"Please enter a valid email address","no_emails_error":"Please add at least one email address","create_event":"Create Event","start_date_time":"Start Date & Time","end_date_time":"End Date & Time","location":"Location","link_optional":"Link (Optional)","save_event":"Save Event","cancel_event":"Cancel Event","confirm_cancel":"Are you sure you want to cancel?","creating_event":"Creating Event...","event_created":"Event Created!","end_after_start_error":"End date/time must be after start date/time","enter_event_location":"Enter event location","enter_event_link":"Enter event link","logout":"Logout","details":"Details","subject":"Subject","subtitle":"Subtitle","enter_subject":"Enter subject","back":"Back","apply":"Apply","automation_settings":"Automation Settings","what_should_happen":"What should happen?","add_to_mailing_list_question":"Add to mailing list?","remove_from_mailing_list_question":"Remove from mailing list?","select_mailing_lists":"Select mailing lists","selected":"Selected","automation_link_preview":"Automation Link","apply_automation":"Apply Automation"}');class Od{constructor(t){return this.props=t,this.init(t)}init(t){const e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.plugins||[];let n=t.languageJson;const r=t.language||"he";n||(n="he"===r?Sd:Bd);const i=jc(r)?"rtl":"ltr",o=jc(r)?"right":"left";t.navbar||(t.navbar={}),Array.isArray(t.components)&&0===t.components.length&&(t.components=null),t.width||(t.width="650px",console.warn("using default width of 650px or 1000px.")),t.theme||(t.theme={}),t.textConfigure||(t.textConfigure={}),"object"!=typeof t?.configure&&(t.configure={}),"object"!=typeof t?.configure?.text&&(t.configure.text={}),t.configure.text={onClickMagic:t=>{const{injectEditor:e,insertContent:n,insertContentHtml:r,getJSON:i,getHTML:o,getText:s,selectAll:a}=t;a();const l=document.createElement("cdtr-text-prompt-editor");l.context=s(),l.addEventListener("text-generation-start",(t=>{a()})),l.addEventListener("text-generation-chunk",(t=>{n(t.detail.chunk)})),l.addEventListener("text-generation-complete",(t=>{a(),r(t.detail.text)})),l.addEventListener("text-generation-error",(t=>{console.error("Text generation error:",t.detail.error)})),e(l)}};const s={documentName:t.documentName,editable:t.editable,mode:t.mode,user:t.user,collaborator:t.collaborator,components:t.components||[{_id:"0-root",type:"root",props:{style:{background:"#fff"}},children:["0-section"]},{_id:"0-section",type:"section",props:{style:{width:t.width,margin:"auto",height:"100%"}},children:[]}],channel:"newsletter",userMenu:{onLogout:()=>{"function"==typeof t?.userMenu?.onLogout&&t?.userMenu?.onLogout()}},onNextStep:e=>{"function"==typeof t.onNextStep&&t.onNextStep(e)},onSendTestEmail:t?.onSendTestEmail?e=>{"function"==typeof t.onSendTestEmail&&t.onSendTestEmail(e)}:null,attachFiles:t?.attachFiles?{files:t?.attachFiles?.files||[],lazyLoad:t?.attachFiles?.lazyLoad||null,maxFiles:t?.attachFiles?.maxFiles||1,maxFileSizeMB:t?.attachFiles?.maxFileSizeMB||"0.5",save:e=>{"function"==typeof t.attachFiles.save&&t.attachFiles.save(e)},remove:e=>{"function"==typeof t.attachFiles.remove&&t.attachFiles.remove(e)}}:null,makeEvent:t?.makeEvent?{initialStartDate:t?.makeEvent?.initialStartDate||"",initialStartTime:t?.makeEvent?.initialStartTime||"",initialEndDate:t?.makeEvent?.initialEndDate||"",initialEndTime:t?.makeEvent?.initialEndTime||"",initialLocation:t?.makeEvent?.initialLocation||"",initialLink:t?.makeEvent?.initialLink||"",save:e=>{"function"==typeof t.makeEvent.save&&t.makeEvent.save(e)},cancel:()=>{"function"==typeof t.makeEvent.cancel&&t.makeEvent.cancel()}}:null,subjectAndName:t?.subjectAndName?{name:t?.subjectAndName?.name||"",subject:t?.subjectAndName?.subject||"",subtitle:t?.subjectAndName?.subtitle||"",save:e=>{"function"==typeof t.subjectAndName.save&&t.subjectAndName.save(e)}}:null,savedDebounce:t.savedDebounce||1e3,target:t.target||function(){const t=document.createElement("div");return t.id="root",document.body.appendChild(t),t}(),theme:{},language:r,languageJson:n,editor:{props:{onSave:e=>{console.log("%csync completed","color:green;font-size:20px;",e),"function"==typeof t.onSave&&t.onSave(e)},onChange:()=>{}},configure:{text:t?.configure?.text,editorProps:{fonts:t.fonts||[{id:"Arial",cssRule:"Arial, Helvetica, sans-serif",name:"Arial",language:["en","he"],url:null},{id:"Times New Roman",cssRule:"Times New Roman, Times, Beskerville, Georgia, serif",name:"Times New Roman",language:["en","he"],url:null},{id:"Courier New",cssRule:"Courier New, Courier, monospace",name:"Courier New"},{id:"Tahoma",cssRule:"Tahoma, Geneva, sans-serif",name:"Tahoma"},{id:"Verdana",cssRule:"Verdana, Geneva, sans-serif",name:"Verdana"},{id:"Roboto",cssRule:"Roboto, sans-serif",name:"Roboto (google)",url:"https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap"}],menu:{},mergeTags:t.mergeTags||{},mailingLists:t.mailingLists||{},linkPicker:t.linkPicker||{savedVariables:[{value:"https://www.assaf.co.il",label:"האתר שלי"},{value:"email",label:"מייל",protocol:"mailto:"},{value:"tel",label:"טלפון"},{value:"address",label:"כתובת"}]}},onSaveBlock:t.onSaveBlock,onDeleteBlock:t.onDeleteBlock,blocksCategories:t.blocksCategories,customBlocks:t.customBlocks,mediaGalleryManager:t.mediaGalleryManager||function(){},blocks:[$c(xd()),$c(_d()),$c(kd()),$c({name:"twoButtons",id:"2 button",icon:[{type:"button"},{type:"button"}],tags:["button"],children:[Cd({text:n.readMore}),Cd({text:n.readMore})]}),$c({name:"threeButtons",id:"3 button",icon:[{type:"button"},{type:"button"},{type:"button"}],tags:["button"],children:[Cd({text:n.readMore}),Cd({text:n.readMore}),Cd({text:n.readMore})]}),$c(wd({direction:i,textAlign:o,homePageText:Sd.home_page})),$c((a={text:n.generalText},{name:"quote",icon:[{type:"quote"}],tags:["quote"],children:[Ad(a)]})),$c({name:"image | quote",icon:[{type:"image"},{type:"quote"}],tags:[],children:[Ad({text:n.generalText,direction:i,textAlign:o}),vd({width:200,height:150})]}),$c({name:"quote | image",icon:[{type:"quote"},{type:"image"}],tags:[],children:[vd({width:200,height:150}),Ad({text:n.generalText,direction:i,textAlign:o})]}),$c({name:"twoCards",icon:[{type:"article"},{type:"article"}],tags:["article","card"],children:[yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]}),$c({name:"threeCards",icon:[{type:"article"},{type:"article"},{type:"article"}],tags:["article","card"],children:[yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),yd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]}),$c({name:"card | image",icon:[{type:"image"},{type:"article"}],tags:["article","card","image","readmore"],children:[Ed({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),vd({width:300,height:150})]}),$c({name:"image | card",icon:[{type:"article"},{type:"image"}],tags:["article","card","image","readmore"],children:[vd({width:300,height:150}),Ed({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]})],plugins:[id,ad,dd.configure(t.textConfigure),cd.configure(t.textConfigure),ld.configure(t.textConfigure),od.configure(t.textConfigure),hd,ud,md,bd,...e]},navbar:{components:t.navbar.components}}};var a;return new rd(s)}(t);return e}}"undefined"!=typeof window&&(window.cdtrStarter=Od)})(),a})()));