1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17373,73297],{138:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3424).A)("outline","upload","Upload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]])},1135:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},3424:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(23016),o={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};let i=(e,t,r,i)=>{let a=(0,n.forwardRef)(({color:r="currentColor",size:a=24,stroke:s=2,title:l,className:p,children:c,...d},u)=>(0,n.createElement)("svg",{ref:u,...o[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${t}`,p].join(" "),..."filled"===e?{fill:r}:{strokeWidth:s,stroke:r},...d},[l&&(0,n.createElement)("title",{key:"svg-title"},l),...i.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return a.displayName=`${r}`,a}},4347:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]])},4678:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},6149:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3424).A)("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]])},7145:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},12150:()=>{},17373:(e,t,r)=>{"use strict";r.d(t,{k5:()=>c});var n=r(23016),o={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=n.createContext&&n.createContext(o),a=["attr","size","title"];function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e){return t=>n.createElement(d,s({attr:p({},e.attr)},t),function e(t){return t&&t.map((t,r)=>n.createElement(t.tag,p({key:r},t.attr),e(t.child)))}(e.child))}function d(e){var t=t=>{var r,{attr:o,size:i,title:l}=e,c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),d=i||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",s({stroke:"currentColor",fill:"
1currentColor",strokeWidth:"0"},t.attr,o,c,{className:r,style:p(p({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),l&&n.createElement("title",null,l),e.children)};return void 0!==i?n.createElement(i.Consumer,null,e=>t(e)):t(o)}},17872:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},20777:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},21413:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]])},30612:(e,t,r)=>{"use strict";e.exports=r(56571)},54437:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},54916:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]])},56571:(e,t,r)=>{"use strict";var n=r(23016),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function p(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,c=n[1];return s(function(){o.value=r,o.getSnapshot=t,p(o)&&c({inst:o})},[e,r,t]),a(function(){return p(o)&&c({inst:o}),e(function(){p(o)&&c({inst:o})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},62501:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},67187:(e,t,r)=>{"use strict";r.d(t,{d:()=>et});var n=Object.defineProperty,o=(e,t,r)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?n(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,r},i=class{static resetLinkIndex(){this.linkIndex=0}static escapeHtml(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,e=>t[e])}static preserveIndentation(e,t){let r=t.match(/^(\s*)/)[1].replace(/ /g," ");return e.replace(/^\s*/,r)}static parseHeader(e){return e.replace(/^(#{1,3})\s(.+)$/,(e,t,r)=>{let n=t.length;return`<h${n}><span class="syntax-marker">${t} </span>${r}</h${n}>`})}static parseHorizontalRule(e){return e.match(/^(-{3,}|\*{3,}|_{3,})$/)?`<div><span class="hr-marker">${e}</span></div>`:null}static parseBlockquote(e){return e.replace(/^> (.+)$/,(e,t)=>`<span class="blockquote"><span class="syntax-marker">></span> ${t}</span>`)}static parseBulletList(e){return e.replace(/^((?: )*)([-*])\s(.+)$/,(e,t,r,n)=>`${t}<li class="bullet-list"><span class="syntax-marker">${r} </span>${n}</li>`)}static parseNumberedList(e){return e.replace(/^((?: )*)(\d+\.)\s(.+)$/,(e,t,r,n)=>`${t}<li class="ordered-list"><span class="syntax-marker">${r} </span>${n}</li>`)}static parseCodeBlock(e){return/^`{3}[^`]*$/.test(e)?`<div><span class="code-fence">${e}</span></div>`:null}static parseBold(e){return e=(e=e.replace(/\*\*(.+?)\*\*/g,'<strong><span class="syntax-marker">**</span>$1<span class="syntax-marker">**</span></strong>')).replace(/__(.+?)__/g,'<strong><span class="syntax-marker">__</span>$1<span class="syntax-marker">__</span></strong>')}static parseItalic(e){return e=(e=e.replace(RegExp("(?<!\\*)\\*(?!\\*)(.+?)(?<!\\*)\\*(?!\\*)","g"),'<em><span class="syntax-marker">*</span>$1<span class="syntax-marker">*</span></em>')).replace(RegExp("(?<=^|\\s)_(?!_)(.+?)(?<!_)_(?!_)(?=\\s|$)","g"),'<em><span class="syntax-marker">_</span>$1<span class="syntax-marker">_</span></em>')}static parseStrikethrough(e){return e=(e=e.replace(RegExp("(?<!~)~~(?!~)(.+?)(?<!~)~~(?!~)","g"),'<del><span class="syntax-marker">~~</span>$1<span class="syntax-marker">~~</span></del>')).replace(RegExp("(?<!~)~(?!~)(.+?)(?<!~)~(?!~)","g"),'<del><span class="syntax-marker">~</span>$1<span class="syntax-marker">~</span></del>')}static parseInlineCode(e){return e.replace(RegExp("(?<!`)(`+)(?!`)((?:(?!\\1).)+?)(\\1)(?!`)","g"),'<code><span class="syntax-marker">$1</span>$2<span class="syntax-marker">$3</span></code>')}
1static sanitizeUrl(e){let t=e.trim(),r=t.toLowerCase(),n=["http://","https://","mailto:","ftp://","ftps://"].some(e=>r.startsWith(e)),o=t.startsWith("/")||t.startsWith("#")||t.startsWith("?")||t.startsWith(".")||!t.includes(":")&&!t.includes("//");return n||o?e:"#"}static parseLinks(e){return e.replace(/\[(.+?)\]\((.+?)\)/g,(e,t,r)=>{let n=`--link-${this.linkIndex++}`,o=this.sanitizeUrl(r);return`<a href="${o}" style="anchor-name: ${n}"><span class="syntax-marker">[</span>${t}<span class="syntax-marker url-part">](${r})</span></a>`})}static identifyAndProtectSanctuaries(e){let t,r,n=new Map,o=0,i=e,a=[],s=/\[([^\]]+)\]\(([^)]+)\)/g;for(;null!==(t=s.exec(e));){let e=t.index+t[0].indexOf("](")+2,r=e+t[2].length;a.push({start:e,end:r})}let l=RegExp("(?<!`)(`+)(?!`)((?:(?!\\1).)+?)(\\1)(?!`)","g"),p=[];for(;null!==(r=l.exec(e));){let e=r.index,t=r.index+r[0].length;a.some(r=>e>=r.start&&t<=r.end)||p.push({match:r[0],index:r.index,openTicks:r[1],content:r[2],closeTicks:r[3]})}return p.sort((e,t)=>t.index-e.index),p.forEach(e=>{let t=`\uE000${o++}\uE001`;n.set(t,{type:"code",original:e.match,openTicks:e.openTicks,content:e.content,closeTicks:e.closeTicks}),i=i.substring(0,e.index)+t+i.substring(e.index+e.match.length)}),{protectedText:i=i.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(e,t,r)=>{let i=`\uE000${o++}\uE001`;return n.set(i,{type:"link",original:e,linkText:t,url:r}),i}),sanctuaries:n}}static restoreAndTransformSanctuaries(e,t){return Array.from(t.keys()).sort((t,r)=>e.indexOf(t)-e.indexOf(r)).forEach(r=>{let n,o=t.get(r);if("code"===o.type)n=`<code><span class="syntax-marker">${o.openTicks}</span>${this.escapeHtml(o.content)}<span class="syntax-marker">${o.closeTicks}</span></code>`;else if("link"===o.type){let e=o.linkText;t.forEach((t,r)=>{if(e.includes(r)&&"code"===t.type){let n=`<code><span class="syntax-marker">${t.openTicks}</span>${this.escapeHtml(t.content)}<span class="syntax-marker">${t.closeTicks}</span></code>`;e=e.replace(r,n)}}),e=this.parseStrikethrough(e),e=this.parseBold(e),e=this.parseItalic(e);let r=`--link-${this.linkIndex++}`,i=this.sanitizeUrl(o.url);n=`<a href="${i}" style="anchor-name: ${r}"><span class="syntax-marker">[</span>${e}<span class="syntax-marker url-part">](${this.escapeHtml(o.url)})</span></a>`}e=e.replace(r,n)}),e}static parseInlineElements(e){let{protectedText:t,sanctuaries:r}=this.identifyAndProtectSanctuaries(e),n=t;return n=this.parseStrikethrough(n),n=this.parseBold(n),n=this.parseItalic(n),n=this.restoreAndTransformSanctuaries(n,r)}static parseLine(e){let t=this.escapeHtml(e);t=this.preserveIndentation(t,e);let r=this.parseHorizontalRule(t);if(r)return r;let n=this.parseCodeBlock(t);return n||((t=this.parseHeader(t),t=this.parseBlockquote(t),t=this.parseBulletList(t),t=this.parseNumberedList(t),""===(t=this.parseInlineElements(t)).trim())?"<div> </div>":`<div>${t}</div>`)}static parse(e,t=-1,r=!1){this.resetLinkIndex();let n=e.split("\n"),o=!1,i=n.map((e,n)=>{if(r&&n===t){let t=this.escapeHtml(e)||" ";return`<div class="raw-line">${t}</div>`}if(/^```[^`]*$/.test(e))return o=!o,this.parseLine(e);if(o){let t=this.escapeHtml(e),r=this.preserveIndentation(t,e);return`<div>${r||" "}</div>`}return this.parseLine(e)}).join("");return this.postProcessHTML(i)}static postProcessHTML(e){if("undefined"==typeof document||!document)return this.postProcessHTMLManual(e);let t=document.createElement("div");t.innerHTML=e;let r=null,n=null,o=null,i=!1,a=Array.from(t.children);for(let e=0;e<a.length;e++){let s=a[e];if(!s.parentNode)continue;let l=s.querySelector(".code-fence");if(l){let e=l.textContent;if(e.startsWith("```"))if(i){i=!1,o=null;continue}else{i=!0,o=document.createElement("pre");let r=document.createElement("code");o.appendChild(r),o.className="code-block";let n=e.slice(3).trim();n&&(r.className=`language-${n}`),t.insertBefore(o,s.nextSibling),o._codeElement=r;continue}}if(i&&o&&"DIV"===s.tagName&&!s.querySelector(".code-fence")){let e=o._codeElement||o.querySelector("code");e.textContent.length>0&&(e.textContent+="\n");let t=s.textContent.replace(/\u00A0/g," ");e.textContent+=t,s.remove();continue}let p=null;if("DIV"===s.tagName&&(p=s.querySelector("li")),p){let e=p.classList.contains("bullet-list"),o=p.classList.contains("ordered-list");if(!e&&!o){r=null,n=null;continue}let i=e?"ul":"ol";
1r&&n===i||(r=document.createElement(i),t.insertBefore(r,s),n=i);let a=[];for(let e of s.childNodes)if(3===e.nodeType&&e.textContent.match(/^\u00A0+$/))a.push(e.cloneNode(!0));else if(e===p)break;a.forEach(e=>{p.insertBefore(e,p.firstChild)}),r.appendChild(p),s.remove()}else r=null,n=null}return t.innerHTML}static postProcessHTMLManual(e){let t=e;return(t=(t=t.replace(/((?:<div>(?: )*<li class="bullet-list">.*?<\/li><\/div>\s*)+)/gs,e=>{let t=e.match(/<div>(?: )*<li class="bullet-list">.*?<\/li><\/div>/gs)||[];return t.length>0?"<ul>"+t.map(e=>{let t=e.match(/<div>((?: )*)<li/),r=e.match(/<li class="bullet-list">.*?<\/li>/);if(t&&r){let e=t[1];return r[0].replace(/<li class="bullet-list">/,`<li class="bullet-list">${e}`)}return r?r[0]:""}).filter(Boolean).join("")+"</ul>":e})).replace(/((?:<div>(?: )*<li class="ordered-list">.*?<\/li><\/div>\s*)+)/gs,e=>{let t=e.match(/<div>(?: )*<li class="ordered-list">.*?<\/li><\/div>/gs)||[];return t.length>0?"<ol>"+t.map(e=>{let t=e.match(/<div>((?: )*)<li/),r=e.match(/<li class="ordered-list">.*?<\/li>/);if(t&&r){let e=t[1];return r[0].replace(/<li class="ordered-list">/,`<li class="ordered-list">${e}`)}return r?r[0]:""}).filter(Boolean).join("")+"</ol>":e})).replace(/<div><span class="code-fence">(```[^<]*)<\/span><\/div>(.*?)<div><span class="code-fence">(```)<\/span><\/div>/gs,(e,t,r,n)=>{let o=(r.match(/<div>(.*?)<\/div>/gs)||[]).map(e=>e.replace(/<div>(.*?)<\/div>/s,"$1").replace(/ /g," ")).join("\n"),i=t.slice(3).trim(),a=i?` class="language-${i}"`:"",s=`<div><span class="code-fence">${t}</span></div>`;return s+`<pre class="code-block"><code${a}>${o}</code></pre><div><span class="code-fence">${n}</span></div>`})}static getListContext(e,t){let r=e.split("\n"),n=0,o=0,i=0;for(let e=0;e<r.length;e++){let a=r[e].length;if(n+a>=t){o=e,i=n;break}n+=a+1}let a=r[o],s=i+a.length,l=a.match(this.LIST_PATTERNS.checkbox);if(l)return{inList:!0,listType:"checkbox",indent:l[1],marker:"-",checked:"x"===l[2],content:l[3],lineStart:i,lineEnd:s,markerEndPos:i+l[1].length+l[2].length+5};let p=a.match(this.LIST_PATTERNS.bullet);if(p)return{inList:!0,listType:"bullet",indent:p[1],marker:p[2],content:p[3],lineStart:i,lineEnd:s,markerEndPos:i+p[1].length+p[2].length+1};let c=a.match(this.LIST_PATTERNS.numbered);return c?{inList:!0,listType:"numbered",indent:c[1],marker:parseInt(c[2]),content:c[3],lineStart:i,lineEnd:s,markerEndPos:i+c[1].length+c[2].length+2}:{inList:!1,listType:null,indent:"",marker:null,content:a,lineStart:i,lineEnd:s,markerEndPos:i}}static createNewListItem(e){switch(e.listType){case"bullet":return`${e.indent}${e.marker} `;case"numbered":return`${e.indent}${e.marker+1}. `;case"checkbox":return`${e.indent}- [ ] `;default:return""}}static renumberLists(e){let t=e.split("\n"),r=new Map,n=!1;return t.map(e=>{let t=e.match(this.LIST_PATTERNS.numbered);if(!t)return""!==e.trim()&&e.match(/^\s/)||(n=!1,r.clear()),e;{let e=t[1],o=e.length,i=t[3];n||r.clear();let a=(r.get(o)||0)+1;for(let[e]of(r.set(o,a),r))e>o&&r.delete(e);return n=!0,`${e}${a}. ${i}`}}).join("\n")}};o(i,"linkIndex",0),o(i,"LIST_PATTERNS",{bullet:/^(\s*)([-*+])\s+(.*)$/,numbered:/^(\s*)(\d+)\.\s+(.*)$/,checkbox:/^(\s*)-\s+\[([ x])\]\s+(.*)$/});var a=Object.defineProperty,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&c(e,r,t[r]);if(s)for(var r of s(t))p.call(t,r)&&c(e,r,t[r]);return e},u={bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](url)",replaceNext:"url",scanFor:"https?://"},bulletList:{prefix:"- ",multiline:!0,unorderedList:!0},numberedList:{prefix:"1. ",multiline:!0,orderedList:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},taskList:{prefix:"- [ ] ",multiline:!0,surroundWithNewlines:!0},header1:{prefix:"# "},header2:{prefix:"## "},header3:{prefix:"### "},header4:{prefix:"#### "},header5:{prefix:"##### "},header6:{prefix:"###### "}}
1;function h(e){return d(d({},{prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1}),e)}function m(e,t,r){}function f(e,t){}var y=null;function v(e,{text:t,selectionStart:r,selectionEnd:n}){e.focus();let o=e.selectionStart,i=e.selectionEnd,a=e.value.slice(0,o),s=e.value.slice(i),l=e.value;if(null===y||!0===y){e.contentEditable="true";try{y=document.execCommand("insertText",!1,t)}catch(e){y=!1}e.contentEditable="false"}if((y&&e.value,!y)&&e.value===l){try{document.execCommand("ms-beginUndoUnit")}catch(e){}e.value=a+t+s;try{document.execCommand("ms-endUndoUnit")}catch(e){}e.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))}null!=r&&null!=n?e.setSelectionRange(r,n):e.setSelectionRange(o,e.selectionEnd)}function b(e){return e.trim().split("\n").length>1}function g(e){let t=e.value.split("\n"),r=0;for(let n=0;n<t.length;n++){let o=t[n].length+1;e.selectionStart>=r&&e.selectionStart<r+o&&(e.selectionStart=r),e.selectionEnd>=r&&e.selectionEnd<r+o&&(n===t.length-1?e.selectionEnd=Math.min(r+t[n].length,e.value.length):e.selectionEnd=r+o-1),r+=o}}function w(e){let t=e.value.slice(0,e.selectionStart),r=e.value.slice(e.selectionEnd),n=t.match(/\n*$/),o=r.match(/^\n*/),i=n?n[0].length:0,a=o?o[0].length:0,s="",l="";return t.match(/\S/)&&i<2&&(s="\n".repeat(2-i)),r.match(/\S/)&&a<2&&(l="\n".repeat(2-a)),{newlinesToAppend:s,newlinesToPrepend:l}}function x(e,t,r={}){let n=e.selectionStart,o=e.selectionEnd,i=n===o,a=e.value,s=n;for(;s>0&&"\n"!==a[s-1];)s--;if(i){let t=n;for(;t<a.length&&"\n"!==a[t];)t++;e.selectionStart=s,e.selectionEnd=t}else g(e);let l=t(e);if(r.adjustSelection){let t=e.value.slice(e.selectionStart,e.selectionEnd).startsWith(r.prefix),i=r.adjustSelection(t,n,o,s);l.selectionStart=i.start,l.selectionEnd=i.end}else if(r.prefix){let t=e.value.slice(e.selectionStart,e.selectionEnd).startsWith(r.prefix);i?(t?l.selectionStart=Math.max(n-r.prefix.length,s):l.selectionStart=n+r.prefix.length,l.selectionEnd=l.selectionStart):t?(l.selectionStart=Math.max(n-r.prefix.length,s),l.selectionEnd=Math.max(o-r.prefix.length,s)):(l.selectionStart=n+r.prefix.length,l.selectionEnd=o+r.prefix.length)}return l}function k(e,t){let r,n,{prefix:o,suffix:i,blockPrefix:a,blockSuffix:s,replaceNext:l,prefixSpace:p,scanFor:c,surroundWithNewlines:d,trimFirst:u}=t,h=e.selectionStart,m=e.selectionEnd,f=e.value.slice(e.selectionStart,e.selectionEnd),y=b(f)&&a&&a.length>0?`${a} 2`:o,v=b(f)&&s&&s.length>0?` 3${s}`:i;if(p){let t=e.value[e.selectionStart-1];0===e.selectionStart||null==t||t.match(/\s/)||(y=` ${y}`)}f=function(e,t,r,n=!1){if(e.selectionStart===e.selectionEnd)e.selectionStart=function(e,t){let r=t;for(;e[r]&&null!=e[r-1]&&!e[r-1].match(/\s/);)r--;return r}(e.value,e.selectionStart),e.selectionEnd=function(e,t,r){let n=t,o=r?/\n/:/\s/;for(;e[n]&&!e[n].match(o);)n++;return n}(e.value,e.selectionEnd,n);else{let n=e.selectionStart-t.length,o=e.selectionEnd+r.length,i=e.value.slice(n,e.selectionStart)===t,a=e.value.slice(e.selectionEnd,o)===r;i&&a&&(e.selectionStart=n,e.selectionEnd=o)}return e.value.slice(e.selectionStart,e.selectionEnd)}(e,y,v,t.multiline);let g=e.selectionStart,x=e.selectionEnd,k=l&&l.length>0&&v.indexOf(l)>-1&&f.length>0;if(d){let t=w(e);r=t.newlinesToAppend,n=t.newlinesToPrepend,y=r+o,v+=n}if(f.startsWith(y)&&f.endsWith(v)){let e=f.slice(y.length,f.length-v.length);if(h===m){let t=h-y.length;g=x=t=Math.min(t=Math.max(t,g),g+e.length)}else x=g+e.length;return{text:e,selectionStart:g,selectionEnd:x}}if(k)if(c&&c.length>0&&f.match(c))return{text:y+(v=v.replace(l,f)),selectionStart:g=x=g+y.length,selectionEnd:x};else{let e=y+f+v;return x=(g=g+y.length+f.length+v.indexOf(l))+l.length,{text:e,selectionStart:g,selectionEnd:x}}{let e=y+f+v;g=h+y.length,x=m+y.length;let t=f.match(/^\s*|\s*$/g);if(u&&t){let r=t[0]||"",n=t[1]||"";e=r+y+f.trim()+v+n,g+=r.length,x-=n.length}return{text:e,selectionStart:g,selectionEnd:x}}}function S(e,t){let{prefix:r,suffix:n,surroundWithNewlines:o}=t,i=e.value.slice(e.selectionStart,e.selectionEnd),a=e.selectionStart,s=e.selectionEnd,l=i.split("\n");if(l.every(e=>
3e.startsWith(r)&&(!n||e.endsWith(n))))s=a+(i=l.map(e=>{let t=e.slice(r.length);return n&&(t=t.slice(0,t.length-n.length)),t}).join("\n")).length;else if(i=l.map(e=>r+e+(n||"")).join("\n"),o){let{newlinesToAppend:t,newlinesToPrepend:r}=w(e);a+=t.length,s=a+i.length,i=t+i+r}return{text:i,selectionStart:a,selectionEnd:s}}function O(e){let t=e.split("\n"),r=/^\d+\.\s+/,n=t.every(e=>r.test(e)),o=t;return n&&(o=t.map(e=>e.replace(r,""))),{text:o.join("\n"),processed:n}}function L(e){let t=e.split("\n"),r=t.every(e=>e.startsWith("- ")),n=t;return r&&(n=t.map(e=>e.slice(2))),{text:n.join("\n"),processed:r}}function E(e,t){return t?"- ":`${e+1}. `}function T(e,t){let r=x(e,e=>(function(e,t){let r,n,o,i=e.selectionStart===e.selectionEnd,a=e.selectionStart,s=e.selectionEnd;g(e);let l=e.value.slice(e.selectionStart,e.selectionEnd),[p,c,d]=(o=t.orderedList?(n=L((r=O(l)).text)).text:(n=O((r=L(l)).text)).text,[r,n,o]),u=d.split("\n").map((e,r)=>`${E(r,t.unorderedList)}${e}`),h=u.reduce((e,r,n)=>e+E(n,t.unorderedList).length,0),m=u.reduce((e,r,n)=>e+E(n,!t.unorderedList).length,0);if(p.processed)return i?s=a=Math.max(a-E(0,t.unorderedList).length,0):(a=e.selectionStart,s=e.selectionEnd-h),{text:d,selectionStart:a,selectionEnd:s};let{newlinesToAppend:f,newlinesToPrepend:y}=w(e),v=f+u.join("\n")+y;return i?s=a=Math.max(a+E(0,t.unorderedList).length+f.length,0):c.processed?(a=Math.max(e.selectionStart+f.length,0),s=e.selectionEnd+f.length+h-m):(a=Math.max(e.selectionStart+f.length,0),s=e.selectionEnd+f.length+h),{text:v,selectionStart:a,selectionEnd:s}})(e,t),{adjustSelection:(r,n,o,i)=>{let a=e.value.slice(i,e.selectionEnd),s=/^\d+\.\s+/,l=/^- /,p=s.test(a),c=l.test(a),d=t.orderedList&&p||t.unorderedList&&c;if(n===o)if(d){let e=a.match(t.orderedList?s:l),r=e?e[0].length:0;return{start:Math.max(n-r,i),end:Math.max(n-r,i)}}else if(p||c){let e=a.match(p?s:l),r=e?e[0].length:0,o=(t.unorderedList?2:3)-r;return{start:n+o,end:n+o}}else{let e=t.unorderedList?2:3;return{start:n+e,end:n+e}}if(d){let e=a.match(t.orderedList?s:l),r=e?e[0].length:0;return{start:Math.max(n-r,i),end:Math.max(o-r,i)}}if(p||c){let e=a.match(p?s:l),r=e?e[0].length:0,i=(t.unorderedList?2:3)-r;return{start:n+i,end:o+i}}{let e=t.unorderedList?2:3;return{start:n+e,end:o+e}}}});v(e,r)}function j(e){if(!e||e.disabled||e.readOnly)return;f(e,"Before");let t=k(e,h(u.bold));v(e,t),f(e,"After")}function P(e){if(!e||e.disabled||e.readOnly)return;let t=k(e,h(u.italic));v(e,t)}function C(e,t={}){if(!e||e.disabled||e.readOnly)return;let r=e.value.slice(e.selectionStart,e.selectionEnd),n=h(u.link);if(r&&r.match(/^https?:\/\//)&&!t.url?(n.suffix=`](${r})`,n.replaceNext=""):t.url&&(n.suffix=`](${t.url})`,n.replaceNext=""),t.text&&!r){let r=e.selectionStart;e.value=e.value.slice(0,r)+t.text+e.value.slice(r),e.selectionStart=r,e.selectionEnd=r+t.text.length}let o=k(e,n);v(e,o)}function M(e){!e||e.disabled||e.readOnly||T(e,h(u.bulletList))}function A(e){!e||e.disabled||e.readOnly||T(e,h(u.numberedList))}function _(e,t=1,r=!1){if(!e||e.disabled||e.readOnly)return;(t<1||t>6)&&(t=1),e.selectionStart,e.selectionEnd;let n=h(u[`header${1===t?"1":t}`]||u.header1);n.prefix;let o=e.value,i=e.selectionStart,a=e.selectionEnd,s=i;for(;s>0&&"\n"!==o[s-1];)s--;let l=a;for(;l<o.length&&"\n"!==o[l];)l++;let p=o.slice(s,l);let c=p.match(/^(#{1,6})\s*/),d=c?c[1].length:0,f=c?c[0].length:0;
3c&&c[0];let y=r&&d===t;let b=x(e,e=>{let r,o=e.value.slice(e.selectionStart,e.selectionEnd);let i=o.replace(/^#{1,6}\s*/,"");return m("insertHeader",`Cleaned line: "${i}"`),y?(m("insertHeader","ACTION: Toggling OFF - removing header"),r=i):(d>0?m("insertHeader",`ACTION: Replacing H${d} with H${t}`):m("insertHeader","ACTION: Adding new header"),r=n.prefix+i),m("insertHeader",`New line: "${r}"`),{text:r,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}},{prefix:n.prefix,adjustSelection:(e,t,r,o)=>{if(m("insertHeader","Adjusting selection:"),m("insertHeader",` - isRemoving param: ${e}`),m("insertHeader",` - shouldToggleOff: ${y}`),m("insertHeader",` - selStart: ${t}, selEnd: ${r}`),m("insertHeader",` - lineStartPos: ${o}`),y){let e=Math.max(t-f,o);return m("insertHeader",` - Removing header, adjusting by -${f}`),{start:e,end:t===r?e:Math.max(r-f,o)}}if(!(f>0))return m("insertHeader",` - Adding header, adjusting by +${n.prefix.length}`),{start:t+n.prefix.length,end:r+n.prefix.length};{let e=n.prefix.length-f;return m("insertHeader",` - Replacing header, adjusting by ${e}`),{start:t+e,end:r+e}}}});b.text,b.selectionStart,b.selectionEnd,v(e,b)}var I=class{constructor(e){this.editor=e,this.textarea=e.textarea}handleKeydown(e){if(!(navigator.platform.toLowerCase().includes("mac")?e.metaKey:e.ctrlKey))return!1;let t=null;switch(e.key.toLowerCase()){case"b":e.shiftKey||(t="toggleBold");break;case"i":e.shiftKey||(t="toggleItalic");break;case"k":e.shiftKey||(t="insertLink");break;case"7":e.shiftKey&&(t="toggleNumberedList");break;case"8":e.shiftKey&&(t="toggleBulletList")}return!!t&&(e.preventDefault(),this.editor.toolbar?this.editor.toolbar.handleAction(t):this.handleAction(t),!0)}async handleAction(e){let t=this.textarea;if(t){t.focus();try{switch(e){case"toggleBold":j(t);break;case"toggleItalic":P(t);break;case"insertLink":C(t);break;case"toggleBulletList":M(t);break;case"toggleNumberedList":A(t)}t.dispatchEvent(new Event("input",{bubbles:!0}))}catch(e){console.error("Error in markdown action:",e)}}}destroy(){}},$={name:"solar",colors:{bgPrimary:"#faf0ca",bgSecondary:"#ffffff",text:"#0d3b66",h1:"#f95738",h2:"#ee964b",h3:"#3d8a51",strong:"#ee964b",em:"#f95738",link:"#0d3b66",code:"#0d3b66",codeBg:"rgba(244, 211, 94, 0.4)",blockquote:"#5a7a9b",hr:"#5a7a9b",syntaxMarker:"rgba(13, 59, 102, 0.52)",cursor:"#f95738",selection:"rgba(244, 211, 94, 0.4)",listMarker:"#ee964b",toolbarBg:"#ffffff",toolbarBorder:"rgba(13, 59, 102, 0.15)",toolbarIcon:"#0d3b66",toolbarHover:"#f5f5f5",toolbarActive:"#faf0ca"}},H={name:"cave",colors:{bgPrimary:"#141E26",bgSecondary:"#1D2D3E",text:"#c5dde8",h1:"#d4a5ff",h2:"#f6ae2d",h3:"#9fcfec",strong:"#f6ae2d",em:"#9fcfec",link:"#9fcfec",code:"#c5dde8",codeBg:"#1a232b",blockquote:"#9fcfec",hr:"#c5dde8",syntaxMarker:"rgba(159, 207, 236, 0.73)",cursor:"#f26419",selection:"rgba(51, 101, 138, 0.4)",listMarker:"#f6ae2d",toolbarBg:"#1D2D3E",toolbarBorder:"rgba(197, 221, 232, 0.1)",toolbarIcon:"#c5dde8",toolbarHover:"#243546",toolbarActive:"#2a3f52"}},N={solar:$,cave:H,light:$,dark:H};function R(e){return"string"==typeof e?{...N[e]||N.solar,name:e}:e}function B(e){let t=[];for(let[r,n]of Object.entries(e)){let e=r.replace(/([A-Z])/g,"-$1").toLowerCase();t.push(`--${e}: ${n};`)}return t.join("\n")}var z=`<svg viewBox="0 0 18 18"> 4 <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"></path> 5 <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"></path> 6</svg>`,D=`<svg viewBox="0 0 18 18"> 7 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="13" y1="4" y2="4"></line> 8 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="5" x2="11" y1="14" y2="14"></line> 9 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="10" y1="14" y2="4"></line> 10</svg>`,V=`<svg viewBox="0 0 18 18">
11 <path fill="currentColor" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"></path> 12</svg>`,q=`<svg viewBox="0 0 18 18"> 13 <path fill="currentColor" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path> 14</svg>`,F=`<svg viewBox="0 0 18 18"> 15 <path fill="currentColor" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path> 16</svg>`,W=`<svg viewBox="0 0 18 18"> 17 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="11" y1="7" y2="11"></line> 18 <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"></path> 19 <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"></path> 20</svg>`,U=`<svg viewBox="0 0 18 18"> 21 <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="5 7 3 9 5 11"></polyline> 22 <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="13 7 15 9 13 11"></polyline> 23 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="10" x2="8" y1="5" y2="13"></line> 24</svg>`,K=`<svg viewBox="0 0 18 18"> 25 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="4" y2="4"></line> 26 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="9" y2="9"></line> 27 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="14" y2="14"></line> 28 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="4" y2="4"></line> 29 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="9" y2="9"></line> 30 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="14" y2="14"></line> 31</svg>`,G=`<svg viewBox="0 0 18 18"> 32 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="4" y2="4"></line> 33 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="9" y2="9"></line> 34 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="14" y2="14"></line> 35 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" x1="2.5" x2="4.5" y1="5.5" y2="5.5"></line>
36 <path fill="currentColor" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"></path> 37 <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"></path> 38 <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"></path> 39</svg>`,Z=`<svg viewBox="2 2 20 20"> 40 <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 10.8182L9 10.8182C8.80222 10.8182 8.60888 10.7649 8.44443 10.665C8.27998 10.5651 8.15181 10.4231 8.07612 10.257C8.00043 10.0909 7.98063 9.90808 8.01922 9.73174C8.0578 9.55539 8.15304 9.39341 8.29289 9.26627C8.43275 9.13913 8.61093 9.05255 8.80491 9.01747C8.99889 8.98239 9.19996 9.00039 9.38268 9.0692C9.56541 9.13801 9.72159 9.25453 9.83147 9.40403C9.94135 9.55353 10 9.72929 10 9.90909L10 12.1818C10 12.664 9.78929 13.1265 9.41421 13.4675C9.03914 13.8084 8.53043 14 8 14"></path> 41 <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 10.8182L15 10.8182C14.8022 10.8182 14.6089 10.7649 14.4444 10.665C14.28 10.5651 14.1518 10.4231 14.0761 10.257C14.0004 10.0909 13.9806 9.90808 14.0192 9.73174C14.0578 9.55539 14.153 9.39341 14.2929 9.26627C14.4327 9.13913 14.6109 9.05255 14.8049 9.01747C14.9989 8.98239 15.2 9.00039 15.3827 9.0692C15.5654 9.13801 15.7216 9.25453 15.8315 9.40403C15.9414 9.55353 16 9.72929 16 9.90909L16 12.1818C16 12.664 15.7893 13.1265 15.4142 13.4675C15.0391 13.8084 14.5304 14 14 14"></path> 42</svg>`,Q=`<svg viewBox="0 0 18 18"> 43 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="4" y2="4"></line> 44 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="9" y2="9"></line> 45 <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="14" y2="14"></line> 46 <rect stroke="currentColor" fill="none" stroke-width="1.5" x="2" y="3" width="3" height="3" rx="0.5"></rect> 47 <rect stroke="currentColor" fill="none" stroke-width="1.5" x="2" y="13" width="3" height="3" rx="0.5"></rect> 48 <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" points="2.65 9.5 3.5 10.5 5 8.5"></polyline> 49</svg>`,X=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 50 <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" fill="none"></path> 51 <circle cx="12" cy="12" r="3" fill="none"></circle> 52</svg>`,Y=class{constructor(e,t=null){this.editor=e,this.container=null,this.buttons={},this.buttonConfig=t}create(){var e;this.container=document.createElement("div"),this.container.className="overtype-toolbar",this.container.setAttribute("role","toolbar"),this.container.setAttribute("aria-label","Text formatting"),(null!=(e=this.buttonConfig)?e:[{name:"bold",icon:z,title:"Bold (Ctrl+B)",action:"toggleBold"},{name:"italic",icon:D,title:"Italic (Ctrl+I)",action:"toggleItalic"},{separator:!0},{name:"h1",icon:V,title:"Heading 1",action:"insertH1"},{name:"h2",icon:q,title:"Heading 2",action:"insertH2"},{name:"h3",icon:F,title:"Heading 3",action:"insertH3"},{separator:!0},{name:"link",icon:W,title:"Insert Link (Ctrl+K)",action:"insertLink"},{name:"code",icon:U,title:"Code (Ctrl+`)",action:"toggleCode"},{separator:!0},{name:"quote",icon:Z,title:"Quote",action:"toggleQuote"},{separator:!0},{name:"bulletList",icon:K,title:"Bullet List",action:"toggleBulletList"},{name:"orderedList",icon:G,title:"Numbered List",action:"toggleNumberedList"},{name:"taskList",icon:Q,title:"Task List",action:"toggleTaskList"},{separator:!0},{name:"viewMode",icon:X,title:"View mode",action:"toggle-view-menu",hasDropdown:!0}
52]).forEach(e=>{if(e.separator){let e=document.createElement("div");e.className="overtype-toolbar-separator",e.setAttribute("role","separator"),this.container.appendChild(e)}else{let t=this.createButton(e);this.buttons[e.name]=t,this.container.appendChild(t)}});let t=this.editor.element.querySelector(".overtype-container"),r=this.editor.element.querySelector(".overtype-wrapper");return t&&r&&t.insertBefore(this.container,r),this.container}createButton(e){let t=document.createElement("button");return t.className="overtype-toolbar-button",t.type="button",t.title=e.title,t.setAttribute("aria-label",e.title),t.setAttribute("data-action",e.action),t.innerHTML=e.icon,e.hasDropdown&&(t.classList.add("has-dropdown"),"viewMode"===e.name&&(this.viewModeButton=t)),t.addEventListener("click",r=>{r.preventDefault(),this.handleAction(e.action,t)}),t}async handleAction(e,t){let r=this.editor.textarea;if(r){if("toggle-view-menu"===e)return void this.toggleViewDropdown(t);r.focus();try{switch(e){case"toggleBold":j(r);break;case"toggleItalic":P(r);break;case"insertH1":_(r,1,!0);break;case"insertH2":_(r,2,!0);break;case"insertH3":_(r,3,!0);break;case"insertLink":C(r);break;case"toggleCode":!function(e){if(!e||e.disabled||e.readOnly)return;let t=k(e,h(u.code));v(e,t)}(r);break;case"toggleBulletList":M(r);break;case"toggleNumberedList":A(r);break;case"toggleQuote":!function(e){if(!e||e.disabled||e.readOnly)return;f(e,"Initial");let t=h(u.quote),r=x(e,e=>S(e,t),{prefix:t.prefix});v(e,r),f(e,"Final")}(r);break;case"toggleTaskList":!function(e){if(!e||e.disabled||e.readOnly)return;let t=h(u.taskList),r=x(e,e=>S(e,t),{prefix:t.prefix});v(e,r)}(r);break;case"toggle-plain":let t=this.editor.container.classList.contains("plain-mode");this.editor.showPlainTextarea(!t)}r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(e){console.error("Error loading markdown-actions:",e)}}}async updateButtonStates(){let e=this.editor.textarea;if(e)try{let t=function(e){if(!e)return[];let t=[],{selectionStart:r,selectionEnd:n,value:o}=e,i=o.split("\n"),a=0,s="";for(let e of i){if(r>=a&&r<=a+e.length){s=e;break}a+=e.length+1}s.startsWith("- ")&&(s.startsWith("- [ ] ")||s.startsWith("- [x] ")?t.push("task-list"):t.push("bullet-list")),/^\d+\.\s/.test(s)&&t.push("numbered-list"),s.startsWith("> ")&&t.push("quote"),s.startsWith("# ")&&t.push("header"),s.startsWith("## ")&&t.push("header-2"),s.startsWith("### ")&&t.push("header-3");let l=Math.max(0,r-10),p=Math.min(o.length,n+10),c=o.slice(l,p);if(c.includes("**")){let e=o.slice(Math.max(0,r-100),r),i=o.slice(n,Math.min(o.length,n+100)),a=e.lastIndexOf("**"),s=i.indexOf("**");-1!==a&&-1!==s&&t.push("bold")}if(c.includes("_")){let e=o.slice(Math.max(0,r-100),r),i=o.slice(n,Math.min(o.length,n+100)),a=e.lastIndexOf("_"),s=i.indexOf("_");-1!==a&&-1!==s&&t.push("italic")}if(c.includes("`")){let e=o.slice(Math.max(0,r-100),r),i=o.slice(n,Math.min(o.length,n+100));e.includes("`")&&i.includes("`")&&t.push("code")}if(c.includes("[")&&c.includes("]")){let e=o.slice(Math.max(0,r-100),r),i=o.slice(n,Math.min(o.length,n+100)),a=e.lastIndexOf("["),s=i.indexOf("]");-1!==a&&-1!==s&&o.slice(n+s+1,n+s+10).startsWith("(")&&t.push("link")}return t}(e);Object.entries(this.buttons).forEach(([e,r])=>{let n=!1;switch(e){case"bold":n=t.includes("bold");break;case"italic":n=t.includes("italic");break;case"code":n=!1;break;case"bulletList":n=t.includes("bullet-list");break;case"orderedList":n=t.includes("numbered-list");break;case"quote":n=t.includes("quote");break;case"taskList":n=t.includes("task-list");break;case"h1":n=t.includes("header");break;case"h2":n=t.includes("header-2");break;case"h3":n=t.includes("header-3");break;case"togglePlain":n=!this.editor.container.classList.contains("plain-mode")}r.classList.toggle("active",n),r.setAttribute("aria-pressed",n.toString())})}catch(e){}}toggleViewDropdown(e){let t=document.querySelector(".overtype-dropdown-menu");if(t){t.remove(),e.classList.remove("dropdown-active"),document.removeEventListener("click",this.handleDocumentClick);return}let r=this.createViewDropdown(),n=e.getBoundingClientRect();r.style.top=`${n.bottom+4}px`,r.style.left=`${n.left}px`,document.body.appendChild(r),e.classList.add("dropdown-active"),this.handleDocumentClick=t=>{e.contains(t.target)||r.contains(t.target)||(r.remove(),e.classList.remove("dropdown-active"),document.removeEventListener("click",this.handleDocumentClick))},setTimeout(()=>{document.addEventListener("click",this.handleDocumentClick)},0)}createViewDropdown(){let e=document.createElement("div");e.className="overtype-dropdown-menu";let t=this.editor.container.classList.contains("plain-mode"),r=this.editor.container.classList.contains("preview-mode")?"preview":t?"plain":"normal";return[{id:"normal",label:"Normal Edit",icon:"â"},{id:"plain",label:"Plain Textarea",icon:"â"},{id:"preview",label:"Preview Mode",icon:"â"}
52].forEach(t=>{let n=document.createElement("button");n.className="overtype-dropdown-item",n.type="button";let o=document.createElement("span");o.className="overtype-dropdown-check",o.textContent=r===t.id?t.icon:"";let i=document.createElement("span");i.textContent=t.label,n.appendChild(o),n.appendChild(i),r===t.id&&n.classList.add("active"),n.addEventListener("click",r=>{r.stopPropagation(),this.setViewMode(t.id),e.remove(),this.viewModeButton.classList.remove("dropdown-active"),document.removeEventListener("click",this.handleDocumentClick)}),e.appendChild(n)}),e}setViewMode(e){switch(this.editor.container.classList.remove("plain-mode","preview-mode"),e){case"plain":this.editor.showPlainTextarea(!0);break;case"preview":this.editor.showPreviewMode(!0);break;default:this.editor.showPlainTextarea(!1),"function"==typeof this.editor.showPreviewMode&&this.editor.showPreviewMode(!1)}}destroy(){this.container&&(this.handleDocumentClick&&document.removeEventListener("click",this.handleDocumentClick),this.container.remove(),this.container=null,this.buttons={})}},J=class{constructor(e){this.editor=e,this.tooltip=null,this.currentLink=null,this.hideTimeout=null,this.init()}init(){CSS.supports("position-anchor: --x")&&CSS.supports("position-area: center")&&(this.createTooltip(),this.editor.textarea.addEventListener("selectionchange",()=>this.checkCursorPosition()),this.editor.textarea.addEventListener("keyup",e=>{(e.key.includes("Arrow")||"Home"===e.key||"End"===e.key)&&this.checkCursorPosition()}),this.editor.textarea.addEventListener("input",()=>this.hide()),this.editor.textarea.addEventListener("scroll",()=>this.hide()),this.tooltip.addEventListener("mouseenter",()=>this.cancelHide()),this.tooltip.addEventListener("mouseleave",()=>this.scheduleHide()))}createTooltip(){this.tooltip=document.createElement("div"),this.tooltip.className="overtype-link-tooltip";let e=document.createElement("style");e.textContent=` 53 @supports (position-anchor: --x) and (position-area: center) { 54 .overtype-link-tooltip { 55 position: absolute; 56 position-anchor: var(--target-anchor, --link-0); 57 position-area: block-end center; 58 margin-top: 8px !important; 59 60 background: #333 !important; 61 color: white !important; 62 padding: 6px 10px !important; 63 border-radius: 16px !important; 64 font-size: 12px !important; 65 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; 66 display: none !important; 67 z-index: 10000 !important; 68 cursor: pointer !important; 69 box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important; 70 max-width: 300px !important; 71 white-space: nowrap !important; 72 overflow: hidden !important; 73 text-overflow: ellipsis !important; 74 75 position-try: most-width block-end inline-end, flip-inline, block-start center; 76 position-visibility: anchors-visible; 77 } 78 79 .overtype-link-tooltip.visible { 80 display: flex !important; 81 } 82 } 83 `,document.head.appendChild(e),this.tooltip.innerHTML=` 84 <span style="display: flex; align-items: center; gap: 6px;"> 85 <svg width="12" height="12" viewBox="0 0 20 20" fill="currentColor" style="flex-shrink: 0;"> 86 <path d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"></path> 87 <path d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"></path> 88 </svg> 89 <span class="overtype-link-tooltip-url"></span> 90 </span> 91 `,this.tooltip.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this.currentLink&&(window.open(this.currentLink.url,"_blank"),this.hide())}),this.editor.container.appendChild(this.tooltip)}checkCursorPosition(){let e=this.editor.textarea.selectionStart,t=this.editor.textarea.value,r=this.findLinkAtPosition(t,e);r?this.currentLink&&this.currentLink.url===r.url&&this.currentLink.index===r.index||this.show(r):this.scheduleHide()}findLinkAtPosition(e,t){let r,n=/\[([^\]]+)\]\(([^)]+)\)/g,o=0;for(;null!==(r=n.exec(e));){let e=r.index,n=r.index+r[0].length;if(t>=e&&t<=n)return{text:r[1],url:r[2],index:o,start:e,end:n};o++}return null}show(e){this.currentLink=e,this.cancelHide(),this.tooltip.querySelector(".overtype-link-tooltip-url").textContent=e.url,this.tooltip.style.setProperty("--target-anchor",`--link-${e.index}`),this.tooltip.classList.add("visible")}hide(){this.tooltip.classList.remove("visible"),this.currentLink=null}scheduleHide(){this.cancelHide(),this.hideTimeout=setTimeout(()=>this.hide(),300)}cancelHide(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}destroy(){this.cancelHide(),this.tooltip&&this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip),this.tooltip=null,this.currentLink=null}},ee=class e{constructor(t,r={}){let n;if("string"==typeof t){if(0===(n=document.querySelectorAll(t)).length)throw Error(`No elements found for selector: ${t}`);n=Array.from(n)}else if(t instanceof Element)n=[t];else if(t instanceof NodeList)n=Array.from(t);else if(Array.isArray(t))n=t;else throw Error("Invalid target: must be selector string, Element, NodeList, or Array");return n.map(t=>{if(t.overTypeInstance)return t.overTypeInstance.reinit(r),t.overTypeInstance;let n=Object.create(e.prototype);return n._init(t,r),t.overTypeInstance=n,e.instances.set(t,n),n})}_init(t,r={}){this.element=t,this.instanceTheme=r.theme||null,this.options=this._mergeOptions(r),this.instanceId=++e.instanceCount,this.initialized=!1,e.injectStyles(),e.initGlobalListeners();let n=t.querySelector(".overtype-container"),o=t.querySelector(".overtype-wrapper");if(n||o?this._recoverFromDOM(n,o):this._buildFromScratch(),this.shortcuts=new I(this),this.linkTooltip=new J(this),this.options.toolbar){let e="object"==typeof this.options.toolbar?this.options.toolbar.buttons:null;
91this.toolbar=new Y(this,e),this.toolbar.create(),this.textarea.addEventListener("selectionchange",()=>{this.toolbar.updateButtonStates()}),this.textarea.addEventListener("input",()=>{this.toolbar.updateButtonStates()})}this.initialized=!0,this.options.onChange&&this.options.onChange(this.getValue(),this)}_mergeOptions(e){let{theme:t,colors:r,...n}=e;return{fontSize:"14px",lineHeight:1.6,fontFamily:'"SF Mono", SFMono-Regular, Menlo, Monaco, "Cascadia Code", Consolas, "Roboto Mono", "Noto Sans Mono", "Droid Sans Mono", "Ubuntu Mono", "DejaVu Sans Mono", "Liberation Mono", "Courier New", Courier, monospace',padding:"16px",mobile:{fontSize:"16px",padding:"12px",lineHeight:1.5},textareaProps:{},autofocus:!1,autoResize:!1,minHeight:"100px",maxHeight:null,placeholder:"Start typing...",value:"",onChange:null,onKeydown:null,showActiveLineRaw:!1,showStats:!1,toolbar:!1,statsFormatter:null,smartLists:!0,...n}}_recoverFromDOM(t,r){if(t&&t.classList.contains("overtype-container"))this.container=t,this.wrapper=t.querySelector(".overtype-wrapper");else if(r){this.wrapper=r,this.container=document.createElement("div"),this.container.className="overtype-container";let t=this.instanceTheme||e.currentTheme||$,n="string"==typeof t?t:t.name;if(n&&this.container.setAttribute("data-theme",n),this.instanceTheme){let e="string"==typeof this.instanceTheme?R(this.instanceTheme):this.instanceTheme;if(e&&e.colors){let t=B(e.colors);this.container.style.cssText+=t}}r.parentNode.insertBefore(this.container,r),this.container.appendChild(r)}if(!this.wrapper){t&&t.remove(),r&&r.remove(),this._buildFromScratch();return}if(this.textarea=this.wrapper.querySelector(".overtype-input"),this.preview=this.wrapper.querySelector(".overtype-preview"),!this.textarea||!this.preview){this.container.remove(),this._buildFromScratch();return}this.wrapper._instance=this,this.options.fontSize&&this.wrapper.style.setProperty("--instance-font-size",this.options.fontSize),this.options.lineHeight&&this.wrapper.style.setProperty("--instance-line-height",String(this.options.lineHeight)),this.options.padding&&this.wrapper.style.setProperty("--instance-padding",this.options.padding),this._configureTextarea(),this._applyOptions()}_buildFromScratch(){let e=this._extractContent();this.element.innerHTML="",this._createDOM(),(e||this.options.value)&&this.setValue(e||this.options.value),this._applyOptions()}_extractContent(){let e=this.element.querySelector(".overtype-input");return e?e.value:this.element.textContent||""}_createDOM(){this.container=document.createElement("div"),this.container.className="overtype-container";let t=this.instanceTheme||e.currentTheme||$,r="string"==typeof t?t:t.name;if(r&&this.container.setAttribute("data-theme",r),this.instanceTheme){let e="string"==typeof this.instanceTheme?R(this.instanceTheme):this.instanceTheme;if(e&&e.colors){let t=B(e.colors);this.container.style.cssText+=t}}this.wrapper=document.createElement("div"),this.wrapper.className="overtype-wrapper",this.options.fontSize&&this.wrapper.style.setProperty("--instance-font-size",this.options.fontSize),this.options.lineHeight&&this.wrapper.style.setProperty("--instance-line-height",String(this.options.lineHeight)),this.options.padding&&this.wrapper.style.setProperty("--instance-padding",this.options.padding),this.wrapper._instance=this,this.textarea=document.createElement("textarea"),this.textarea.className="overtype-input",this.textarea.placeholder=this.options.placeholder,this._configureTextarea(),this.options.textareaProps&&Object.entries(this.options.textareaProps).forEach(([e,t])=>{"className"===e||"class"===e?this.textarea.className+=" "+t:"style"===e&&"object"==typeof t?Object.assign(this.textarea.style,t):this.textarea.setAttribute(e,t)}),this.preview=document.createElement("div"),this.preview.className="overtype-preview",this.preview.setAttribute("aria-hidden","true"),this.wrapper.appendChild(this.textarea),this.wrapper.appendChild(this.preview),this.container.appendChild(this.wrapper),this.options.showStats&&(this.statsBar=document.createElement("div"),this.statsBar.className="overtype-stats",this.container.appendChild(this.statsBar),this._updateStats()),this.element.appendChild(this.container),window.location.pathname.includes("demo.html")&&console.log("_createDOM completed:",{elementId:this.element.i
91d,autoResize:this.options.autoResize,containerClasses:this.container.className,hasStats:!!this.statsBar,hasToolbar:this.options.toolbar}),this.options.autoResize?this._setupAutoResize():(this.container.classList.remove("overtype-auto-resize"),window.location.pathname.includes("demo.html")&&console.log("Removed auto-resize class from:",this.element.id))}_configureTextarea(){this.textarea.setAttribute("autocomplete","off"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.setAttribute("data-gramm","false"),this.textarea.setAttribute("data-gramm_editor","false"),this.textarea.setAttribute("data-enable-grammarly","false")}_applyOptions(){this.options.autofocus&&this.textarea.focus(),this.options.autoResize?this.container.classList.contains("overtype-auto-resize")||this._setupAutoResize():this.container.classList.remove("overtype-auto-resize"),this.updatePreview()}updatePreview(){let e=this.textarea.value,t=this.textarea.selectionStart,r=this._getCurrentLine(e,t),n=i.parse(e,r,this.options.showActiveLineRaw);this.preview.innerHTML=n||'<span style="color: #808080;">Start typing...</span>',this._applyCodeBlockBackgrounds(),this.options.showStats&&this.statsBar&&this._updateStats(),this.options.onChange&&this.initialized&&this.options.onChange(e,this)}_applyCodeBlockBackgrounds(){let e=this.preview.querySelectorAll(".code-fence");for(let t=0;t<e.length-1;t+=2){let r=e[t],n=e[t+1],o=r.parentElement,i=n.parentElement;o&&i&&(r.style.display="block",n.style.display="block",o.classList.add("code-block-line"),i.classList.add("code-block-line"))}}_getCurrentLine(e,t){return e.substring(0,t).split("\n").length-1}handleInput(e){this.updatePreview()}handleKeydown(e){if("Tab"===e.key){e.preventDefault();let t=this.textarea.selectionStart,r=this.textarea.selectionEnd,n=this.textarea.value;if(t!==r&&e.shiftKey){let e=n.substring(0,t),o=n.substring(t,r),i=n.substring(r),a=o.split("\n").map(e=>e.replace(/^ /,"")).join("\n");document.execCommand?(this.textarea.setSelectionRange(t,r),document.execCommand("insertText",!1,a)):(this.textarea.value=e+a+i,this.textarea.selectionStart=t,this.textarea.selectionEnd=t+a.length)}else if(t!==r){let e=n.substring(0,t),o=n.substring(t,r),i=n.substring(r),a=o.split("\n").map(e=>" "+e).join("\n");document.execCommand?(this.textarea.setSelectionRange(t,r),document.execCommand("insertText",!1,a)):(this.textarea.value=e+a+i,this.textarea.selectionStart=t,this.textarea.selectionEnd=t+a.length)}else document.execCommand?document.execCommand("insertText",!1," "):(this.textarea.value=n.substring(0,t)+" "+n.substring(r),this.textarea.selectionStart=this.textarea.selectionEnd=t+2);this.textarea.dispatchEvent(new Event("input",{bubbles:!0}));return}"Enter"===e.key&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&this.options.smartLists&&this.handleSmartListContinuation()?e.preventDefault():!this.shortcuts.handleKeydown(e)&&this.options.onKeydown&&this.options.onKeydown(e,this)}handleSmartListContinuation(){let e=this.textarea,t=e.selectionStart,r=i.getListContext(e.value,t);return!!r&&!!r.inList&&(""===r.content.trim()&&t>=r.markerEndPos?this.deleteListMarker(r):(t>r.markerEndPos&&t<r.lineEnd?this.splitListItem(r,t):this.insertNewListItem(r),"numbered"===r.listType&&this.scheduleNumberedListUpdate()),!0)}deleteListMarker(e){this.textarea.setSelectionRange(e.lineStart,e.markerEndPos),document.execCommand("delete"),this.textarea.dispatchEvent(new Event("input",{bubbles:!0}))}insertNewListItem(e){let t=i.createNewListItem(e);document.execCommand("insertText",!1,"\n"+t),this.textarea.dispatchEvent(new Event("input",{bubbles:!0}))}splitListItem(e,t){let r=e.content.substring(t-e.markerEndPos);this.textarea.setSelectionRange(t,e.lineEnd),document.execCommand("delete");let n=i.createNewListItem(e);document.execCommand("insertText",!1,"\n"+n+r);let o=this.textarea.selectionStart-r.length;this.textarea.setSelectionRange(o,o),this.textarea.dispatchEvent(new Event("input",{bubbles:!0}))}scheduleNumberedListUpdate(){this.numberUpdateTimeout&&clearTimeout(this.numberUpdateTimeout),this.numberUpdateTimeout=setTimeout(()=>{this.updateNumberedLists()},10)}updateNumberedLists(){let e=this.textarea.value,t=this.textarea.selectionStart,r=i.renumberLists(e);if(r!==e){let n=0,o=e.split("\n"),i=r.split("\n"),a=0;for(let e=0;e<o.length&&a<t;e++){if(o[e]!==i[e]){let r=i[e].length-o[e].length;a+o[e].length<t&&(n+=r)}a+=o[e].length+1}this.textarea.value=r;let s=t+n;this.textarea.setSelectionRange(s,s),this.textarea.dispatchEvent(new Event("input",{bubbles:!0}))}}handleScroll(e){this.preview.scrollTop=this.textarea.scrollTop,this.preview.scrollLeft=this.textarea.scrollLeft}getValue(){return this.textarea.value}setValue(e){this.textarea.value=e,this.updatePreview(),this.options.autoResize&&this._updateAutoHeight()}getRenderedHTML(e={}){let t=this.getValue(),r=i.parse(t);return e.cleanHTML&&(r=(r=(r=r.replace(/<span class="syntax-marker[^"]*">.*?<\/span>/g,"")).replace(/\sclass="(bullet-list|ordered-list|code-fence|hr-marker|blockquote|url-part)"/g,"")).replace(/\sclass=""/g,"")),r}getPreviewHTML(){return this.preview.innerHTML}getCleanHTML(){return this.getRenderedHTML({cleanHTML:!0})}focus(){this.textarea.focus()}blur(){this.textarea.blur()}isInitialized(){return this.initialized}reinit(e={}){this.options=this._mergeOptions({...this.options,...e}),this._applyOptions(),this.updatePreview()}_updateStats(){if(!this.statsBar)return;let e=this.textarea.value,t=e.split("\n"),r=e.length,n=e.split(/\s+/).filter(e=>e.length>0).length,o=this.textarea.selectionStart,i=e.substring(0,o).split("\n"),a=i.length,s=i[i.length-1].length+1;this.options.statsFormatter?this.statsBar.innerHTML=this.options.statsFormatter({chars:r,words:n,lines:t.length,line:a,column:s}):this.statsBar.innerHTML=` 92 <div class="overtype-stat">
93 <span class="live-dot"></span> 94 <span>${r} chars, ${n} words, ${t.length} lines</span> 95 </div> 96 <div class="overtype-stat">Line ${a}, Col ${s}</div> 97 `}_setupAutoResize(){this.container.classList.add("overtype-auto-resize"),this.previousHeight=null,this._updateAutoHeight(),this.textarea.addEventListener("input",()=>this._updateAutoHeight()),window.addEventListener("resize",()=>this._updateAutoHeight())}_updateAutoHeight(){if(!this.options.autoResize)return;let e=this.textarea,t=this.preview,r=this.wrapper,n=window.getComputedStyle(e);parseFloat(n.paddingTop),parseFloat(n.paddingBottom);let o=e.scrollTop;e.style.setProperty("height","auto","important");let i=e.scrollHeight;this.options.minHeight&&(i=Math.max(i,parseInt(this.options.minHeight)));let a="hidden";if(this.options.maxHeight){let e=parseInt(this.options.maxHeight);i>e&&(i=e,a="auto")}let s=i+"px";e.style.setProperty("height",s,"important"),e.style.setProperty("overflow-y",a,"important"),t.style.setProperty("height",s,"important"),t.style.setProperty("overflow-y",a,"important"),r.style.setProperty("height",s,"important"),e.scrollTop=o,t.scrollTop=o,this.previousHeight!==i&&(this.previousHeight=i)}showStats(e){this.options.showStats=e,e&&!this.statsBar?(this.statsBar=document.createElement("div"),this.statsBar.className="overtype-stats",this.container.appendChild(this.statsBar),this._updateStats()):!e&&this.statsBar&&(this.statsBar.remove(),this.statsBar=null)}showPlainTextarea(e){if(e?this.container.classList.add("plain-mode"):this.container.classList.remove("plain-mode"),this.toolbar){let t=this.container.querySelector('[data-action="toggle-plain"]');t&&(t.classList.toggle("active",!e),t.title=e?"Show markdown preview":"Show plain textarea")}return e}showPreviewMode(e){return e?this.container.classList.add("preview-mode"):this.container.classList.remove("preview-mode"),e}destroy(){if(this.element.overTypeInstance=null,e.instances.delete(this.element),this.shortcuts&&this.shortcuts.destroy(),this.wrapper){let e=this.getValue();this.wrapper.remove(),this.element.textContent=e}this.initialized=!1}static init(t,r={}){return new e(t,r)}static getInstance(t){return t.overTypeInstance||e.instances.get(t)||null}static destroyAll(){document.querySelectorAll("[data-overtype-instance]").forEach(t=>{let r=e.getInstance(t);r&&r.destroy()})}static injectStyles(t=!1){if(e.stylesInjected&&!t)return;let r=document.querySelector("style.overtype-styles");r&&r.remove();let n=function(e={}){let{fontSize:t="14px",lineHeight:r=1.6,fontFamily:n='"SF Mono", SFMono-Regular, Menlo, Monaco, "Cascadia Code", Consolas, "Roboto Mono", "Noto Sans Mono", "Droid Sans Mono", "Ubuntu Mono", "DejaVu Sans Mono", "Liberation Mono", "Courier New", Courier, monospace',padding:o="20px",theme:i=null,mobile:a={}}=e,s=Object.keys(a).length>0?` 98 @media (max-width: 640px) { 99 .overtype-wrapper .overtype-input, 100 .overtype-wrapper .overtype-preview { 101 ${Object.entries(a).map(([e,t])=>{let r=e.replace(/([A-Z])/g,"-$1").toLowerCase();return`${r}: ${t} !important;`}).join("\n ")} 102 } 103 } 104 `:"",l=i&&i.colors?B(i.colors):"";return` 105 /* OverType Editor Styles */ 106 107 /* Middle-ground CSS Reset - Prevent parent styles from leaking in */ 108 .overtype-container * { 109 /* Box model - these commonly leak */ 110 margin: 0 !important; 111 padding: 0 !important; 112 border: 0 !important; 113 114 /* Layout - these can break our layout */ 115 /* Don't reset position - it breaks dropdowns */ 116 float: none !important; 117 clear: none !important; 118 119 /* Typography - only reset decorative aspects */ 120 text-decoration: none !important; 121 text-transform: none !important; 122 letter-spacing: normal !important; 123 124 /* Visual effects that can interfere */ 125 box-shadow: none !important; 126 text-shadow: none !important; 127 128 /* Ensure box-sizing is consistent */ 129 box-sizing: border-box !important; 130 131 /* Keep inheritance for these */ 132 /* font-family, color, line-height, font-size - inherit */ 133 } 134 135 /* Container base styles after reset */ 136 .overtype-container { 137 display: grid !important; 138 grid-template-rows: auto 1fr auto !important; 139 width: 100% !important; 140 height: 100% !important; 141 position: relative !important; /* Override reset - needed for absolute children */ 142 overflow: visible !important; /* Allow dropdown to overflow container */ 143 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important; 144 text-align: left !important; 145 ${l?` 146 /* Theme Variables */ 147 ${l}`:""} 148 } 149 150 /* Force left alignment for all elements in the editor */ 151 .overtype-container .overtype-wrapper * { 152 text-align: left !important; 153 } 154 155 /* Auto-resize mode styles */ 156 .overtype-container.overtype-auto-resize { 157 height: auto !important; 158 grid-template-rows: auto auto auto !important; 159 } 160 161 .overtype-container.overtype-auto-resize .overtype-wrapper { 162 height: auto !important; 163 min-height: 60px !important; 164 overflow: visible !important; 165 } 166 167 .overtype-wrapper { 168 position: relative !important; /* Override reset - needed for absolute children */ 169 width: 100% !important; 170 height: 100% !important; /* Take full height of grid cell */ 171 min-height: 60px !important; /* Minimum usable height */ 172 overflow: hidden !important; 173 background: var(--bg-secondary, #ffffff) !important;
174 grid-row: 2 !important; /* Always second row in grid */ 175 z-index: 1; /* Below toolbar and dropdown */ 176 } 177 178 /* Critical alignment styles - must be identical for both layers */ 179 .overtype-wrapper .overtype-input, 180 .overtype-wrapper .overtype-preview { 181 /* Positioning - must be identical */ 182 position: absolute !important; /* Override reset - required for overlay */ 183 top: 0 !important; 184 left: 0 !important; 185 width: 100% !important; 186 height: 100% !important; 187 188 /* Font properties - any difference breaks alignment */ 189 font-family: ${n} !important; 190 font-variant-ligatures: none !important; /* keep metrics stable for code */ 191 font-size: var(--instance-font-size, ${t}) !important; 192 line-height: var(--instance-line-height, ${r}) !important; 193 font-weight: normal !important; 194 font-style: normal !important; 195 font-variant: normal !important; 196 font-stretch: normal !important; 197 font-kerning: none !important; 198 font-feature-settings: normal !important; 199 200 /* Box model - must match exactly */ 201 padding: var(--instance-padding, ${o}) !important; 202 margin: 0 !important; 203 border: none !important; 204 outline: none !important; 205 box-sizing: border-box !important; 206 207 /* Text layout - critical for character positioning */ 208 white-space: pre-wrap !important; 209 word-wrap: break-word !important; 210 word-break: normal !important; 211 overflow-wrap: break-word !important; 212 tab-size: 2 !important; 213 -moz-tab-size: 2 !important; 214 text-align: left !important; 215 text-indent: 0 !important; 216 letter-spacing: normal !important; 217 word-spacing: normal !important; 218 219 /* Text rendering */ 220 text-transform: none !important; 221 text-rendering: auto !important; 222 -webkit-font-smoothing: auto !important; 223 -webkit-text-size-adjust: 100% !important; 224 225 /* Direction and writing */ 226 direction: ltr !important; 227 writing-mode: horizontal-tb !important; 228 unicode-bidi: normal !important; 229 text-orientation: mixed !important; 230 231 /* Visual effects that could shift perception */ 232 text-shadow: none !important; 233 filter: none !important; 234 transform: none !important; 235 zoom: 1 !important; 236 237 /* Vertical alignment */ 238 vertical-align: baseline !important; 239 240 /* Size constraints */ 241 min-width: 0 !important; 242 min-height: 0 !important; 243 max-width: none !important; 244 max-height: none !important; 245 246 /* Overflow */ 247 overflow-y: auto !important; 248 overflow-x: auto !important; 249 /* overscroll-behavior removed to allow scroll-through to parent */ 250 scrollbar-width: auto !important; 251 scrollbar-gutter: auto !important; 252 253 /* Animation/transition - disabled to prevent movement */ 254 animation: none !important; 255 transition: none !important; 256 } 257 258 /* Input layer styles */ 259 .overtype-wrapper .overtype-input { 260 /* Layer positioning */ 261 z-index: 1 !important; 262 263 /* Text visibility */ 264 color: transparent !important; 265 caret-color: var(--cursor, #f95738) !important; 266 background-color: transparent !important; 267 268 /* Textarea-specific */ 269 resize: none !important; 270 appearance: none !important; 271 -webkit-appearance: none !important; 272 -moz-appearance: none !important; 273 274 /* Prevent mobile zoom on focus */ 275 touch-action: manipulation !important; 276 277 /* Disable autofill and spellcheck */ 278 autocomplete: off !important; 279 autocorrect: off !important; 280 autocapitalize: off !important; 281 spellcheck: false !important; 282 } 283 284 .overtype-wrapper .overtype-input::selection { 285 background-color: var(--selection, rgba(244, 211, 94, 0.4)); 286 } 287 288 /* Preview layer styles */ 289 .overtype-wrapper .overtype-preview { 290 /* Layer positioning */ 291 z-index: 0 !important; 292 pointer-events: none !important; 293 color: var(--text, #0d3b66) !important; 294 background-color: transparent !important; 295 296 /* Prevent text selection */ 297 user-select: none !important; 298 -webkit-user-select: none !important; 299 -moz-user-select: none !important;
300 -ms-user-select: none !important; 301 } 302 303 /* Defensive styles for preview child divs */ 304 .overtype-wrapper .overtype-preview div { 305 /* Reset any inherited styles */ 306 margin: 0 !important; 307 padding: 0 !important; 308 border: none !important; 309 text-align: left !important; 310 text-indent: 0 !important; 311 display: block !important; 312 position: static !important; 313 transform: none !important; 314 min-height: 0 !important; 315 max-height: none !important; 316 line-height: inherit !important; 317 font-size: inherit !important; 318 font-family: inherit !important; 319 } 320 321 /* Markdown element styling - NO SIZE CHANGES */ 322 .overtype-wrapper .overtype-preview .header { 323 font-weight: bold !important; 324 } 325 326 /* Header colors */ 327 .overtype-wrapper .overtype-preview .h1 { 328 color: var(--h1, #f95738) !important; 329 } 330 .overtype-wrapper .overtype-preview .h2 { 331 color: var(--h2, #ee964b) !important; 332 } 333 .overtype-wrapper .overtype-preview .h3 { 334 color: var(--h3, #3d8a51) !important; 335 } 336 337 /* Semantic headers - flatten in edit mode */ 338 .overtype-wrapper .overtype-preview h1, 339 .overtype-wrapper .overtype-preview h2, 340 .overtype-wrapper .overtype-preview h3 { 341 font-size: inherit !important; 342 font-weight: bold !important; 343 margin: 0 !important; 344 padding: 0 !important; 345 display: inline !important; 346 line-height: inherit !important; 347 } 348 349 /* Header colors for semantic headers */ 350 .overtype-wrapper .overtype-preview h1 { 351 color: var(--h1, #f95738) !important; 352 } 353 .overtype-wrapper .overtype-preview h2 { 354 color: var(--h2, #ee964b) !important; 355 } 356 .overtype-wrapper .overtype-preview h3 { 357 color: var(--h3, #3d8a51) !important; 358 } 359 360 /* Lists - remove styling in edit mode */ 361 .overtype-wrapper .overtype-preview ul, 362 .overtype-wrapper .overtype-preview ol { 363 list-style: none !important; 364 margin: 0 !important; 365 padding: 0 !important; 366 display: block !important; /* Lists need to be block for line breaks */ 367 } 368 369 .overtype-wrapper .overtype-preview li { 370 display: block !important; /* Each item on its own line */ 371 margin: 0 !important; 372 padding: 0 !important; 373 /* Don't set list-style here - let ul/ol control it */ 374 } 375 376 /* Bold text */ 377 .overtype-wrapper .overtype-preview strong { 378 color: var(--strong, #ee964b) !important; 379 font-weight: bold !important; 380 } 381 382 /* Italic text */ 383 .overtype-wrapper .overtype-preview em { 384 color: var(--em, #f95738) !important; 385 text-decoration-color: var(--em, #f95738) !important; 386 text-decoration-thickness: 1px !important; 387 font-style: italic !important; 388 } 389 390 /* Strikethrough text */ 391 .overtype-wrapper .overtype-preview del { 392 color: var(--del, #ee964b) !important; 393 text-decoration: line-through !important; 394 text-decoration-color: var(--del, #ee964b) !important; 395 text-decoration-thickness: 1px !important; 396 } 397 398 /* Inline code */ 399 .overtype-wrapper .overtype-preview code { 400 background: var(--code-bg, rgba(244, 211, 94, 0.4)) !important; 401 color: var(--code, #0d3b66) !important; 402 padding: 0 !important; 403 border-radius: 2px !important; 404 font-family: inherit !important; 405 font-size: inherit !important; 406 line-height: inherit !important; 407 font-weight: normal !important; 408 } 409 410 /* Code blocks - consolidated pre blocks */ 411 .overtype-wrapper .overtype-preview pre { 412 padding: 0 !important; 413 margin: 0 !important; 414 border-radius: 4px !important; 415 overflow-x: auto !important; 416 } 417 418 /* Code block styling in normal mode - yellow background */ 419 .overtype-wrapper .overtype-preview pre.code-block { 420 background: var(--code-bg, rgba(244, 211, 94, 0.4)) !important; 421 } 422 423 /* Code inside pre blocks - remove background */ 424 .overtype-wrapper .overtype-preview pre code { 425 background: transparent !important; 426 color: var(--code, #0d3b66) !important; 427 } 428 429 /* Blockquotes */ 430 .overtype-wrapper .overtype-preview .blockquote { 431 color: var(--blockquote, #5a7a9b) !important; 432 padding: 0 !important; 433 margin: 0 !important; 434 border: none !important; 435 } 436 437 /* Links */ 438 .overtype-wrapper .overtype-preview a { 439 color: var(--link, #0d3b66) !important; 440 text-decoration: underline !important; 441 font-weight: normal !important; 442 } 443 444 .overtype-wrapper .overtype-preview a:hover { 445 text-decoration: underline !important; 446 color: var(--link, #0d3b66) !important; 447 } 448 449 /* Lists - no list styling */ 450 .overtype-wrapper .overtype-preview ul, 451 .overtype-wrapper .overtype-preview ol { 452 list-style: none !important; 453 margin: 0 !important; 454 padding: 0 !important; 455 } 456 457 458 /* Horizontal rules */ 459 .overtype-wrapper .overtype-preview hr { 460 border: none !important; 461 color: var(--hr, #5a7a9b) !important; 462 margin: 0 !important; 463 padding: 0 !important; 464 } 465 466 .overtype-wrapper .overtype-preview .hr-marker { 467 color: var(--hr, #5a7a9b) !important; 468 opacity: 0.6 !important; 469 } 470 471 /* Code fence markers - with background when not in code block */ 472 .overtype-wrapper .overtype-preview .code-fence { 473 color: var(--code, #0d3b66) !important; 474 background: var(--code-bg, rgba(244, 211, 94, 0.4)) !important; 475 } 476 477 /* Code block lines - background for entire code block */ 478 .overtype-wrapper .overtype-preview .code-block-line { 479 background: var(--code-bg, rgba(244, 211, 94, 0.4)) !important; 480 } 481 482 /* Remove background from code fence when inside code block line */ 483 .overtype-wrapper .overtype-preview .code-block-line .code-fence { 484 background: transparent !important; 485 } 486 487 /* Raw markdown line */ 488 .overtype-wrapper .overtype-preview .raw-line { 489 color: var(--raw-line, #5a7a9b) !important; 490 font-style: normal !important; 491 font-weight: normal !important; 492 } 493 494 /* Syntax markers */ 495 .overtype-wrapper .overtype-preview .syntax-marker { 496 color: var(--syntax-marker, rgba(13, 59, 102, 0.52)) !important; 497 opacity: 0.7 !important; 498 } 499 500 /* List markers */ 501 .overtype-wrapper .overtype-preview .list-marker { 502 color: var(--list-marker, #ee964b) !important; 503 } 504 505 /* Stats bar */ 506 507 /* Stats bar - positioned by grid, not absolute */ 508 .overtype-stats { 509 height: 40px !important; 510 padding: 0 20px !important; 511 background: #f8f9fa !important; 512 border-top: 1px solid #e0e0e0 !important; 513 display: flex !important; 514 justify-content: space-between !important; 515 align-items: center !important; 516 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; 517 font-size: 0.85rem !important; 518 color: #666 !important; 519 grid-row: 3 !important; /* Always third row in grid */ 520 } 521 522 /* Dark theme stats bar */ 523 .overtype-container[data-theme="cave"] .overtype-stats { 524 background: var(--bg-secondary, #1D2D3E) !important; 525 border-top: 1px solid rgba(197, 221, 232, 0.1) !important; 526 color: var(--text, #c5dde8) !important; 527 } 528 529 .overtype-stats .overtype-stat { 530 display: flex !important; 531 align-items: center !important; 532 gap: 5px !important; 533 white-space: nowrap !important; 534 } 535 536 .overtype-stats .live-dot { 537 width: 8px !important; 538 height: 8px !important; 539 background: #4caf50 !important; 540 border-radius: 50% !important; 541 animation: overtype-pulse 2s infinite !important; 542 } 543 544 @keyframes overtype-pulse { 545 0%, 100% { opacity: 1; transform: scale(1); } 546 50% { opacity: 0.6; transform: scale(1.2); } 547 } 548 549 550 /* Toolbar Styles */ 551 .overtype-toolbar { 552 display: flex !important; 553 align-items: center !important; 554 gap: 4px !important; 555 padding: 8px !important; /* Override reset */ 556 background: var(--toolbar-bg, var(--bg-primary, #f8f9fa)) !important; /* Override reset */ 557 overflow-x: auto !important; /* Allow horizontal scrolling */ 558 overflow-y: hidden !important; /* Hide vertical overflow */ 559 -webkit-overflow-scrolling: touch !important; 560 flex-shrink: 0 !important; 561 height: auto !important; 562 grid-row: 1 !important; /* Always first row in grid */ 563 position: relative !important; /* Override reset */ 564 z-index: 100 !important; /* Ensure toolbar is above wrapper */ 565 scrollbar-width: thin; /* Thin scrollbar on Firefox */ 566 } 567 568 /* Thin scrollbar styling */ 569 .overtype-toolbar::-webkit-scrollbar {
570 height: 4px; 571 } 572 573 .overtype-toolbar::-webkit-scrollbar-track { 574 background: transparent; 575 } 576 577 .overtype-toolbar::-webkit-scrollbar-thumb { 578 background: rgba(0, 0, 0, 0.2); 579 border-radius: 2px; 580 } 581 582 .overtype-toolbar-button { 583 display: flex; 584 align-items: center; 585 justify-content: center; 586 width: 32px; 587 height: 32px; 588 padding: 0; 589 border: none; 590 border-radius: 6px; 591 background: transparent; 592 color: var(--toolbar-icon, var(--text-secondary, #666)); 593 cursor: pointer; 594 transition: all 0.2s ease; 595 flex-shrink: 0; 596 } 597 598 .overtype-toolbar-button svg { 599 width: 20px; 600 height: 20px; 601 fill: currentColor; 602 } 603 604 .overtype-toolbar-button:hover { 605 background: var(--toolbar-hover, var(--bg-secondary, #e9ecef)); 606 color: var(--toolbar-icon, var(--text-primary, #333)); 607 } 608 609 .overtype-toolbar-button:active { 610 transform: scale(0.95); 611 } 612 613 .overtype-toolbar-button.active { 614 background: var(--toolbar-active, var(--primary, #007bff)); 615 color: var(--toolbar-icon, var(--text-primary, #333)); 616 } 617 618 .overtype-toolbar-button:disabled { 619 opacity: 0.5; 620 cursor: not-allowed; 621 } 622 623 .overtype-toolbar-separator { 624 width: 1px; 625 height: 24px; 626 background: var(--border, #e0e0e0); 627 margin: 0 4px; 628 flex-shrink: 0; 629 } 630 631 /* Adjust wrapper when toolbar is present */ 632 .overtype-container .overtype-toolbar + .overtype-wrapper { 633 } 634 635 /* Mobile toolbar adjustments */ 636 @media (max-width: 640px) { 637 .overtype-toolbar { 638 padding: 6px; 639 gap: 2px; 640 } 641 642 .overtype-toolbar-button { 643 width: 36px; 644 height: 36px; 645 } 646 647 .overtype-toolbar-separator { 648 margin: 0 2px; 649 } 650 } 651 652 /* Plain mode - hide preview and show textarea text */ 653 .overtype-container.plain-mode .overtype-preview { 654 display: none !important; 655 } 656 657 .overtype-container.plain-mode .overtype-input { 658 color: var(--text, #0d3b66) !important; 659 /* Use system font stack for better plain text readability */ 660 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 661 "Helvetica Neue", Arial, sans-serif !important; 662 } 663 664 /* Ensure textarea remains transparent in overlay mode */ 665 .overtype-container:not(.plain-mode) .overtype-input { 666 color: transparent !important; 667 } 668 669 /* Dropdown menu styles */ 670 .overtype-toolbar-button { 671 position: relative !important; /* Override reset - needed for dropdown */ 672 } 673 674 .overtype-toolbar-button.dropdown-active { 675 background: var(--toolbar-active, var(--hover-bg, #f0f0f0)); 676 } 677 678 .overtype-dropdown-menu { 679 position: fixed !important; /* Fixed positioning relative to viewport */ 680 background: var(--bg-secondary, white) !important; /* Override reset */ 681 border: 1px solid var(--border, #e0e0e0) !important; /* Override reset */ 682 border-radius: 6px; 683 box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important; /* Override reset */ 684 z-index: 10000; /* Very high z-index to ensure visibility */ 685 min-width: 150px; 686 padding: 4px 0 !important; /* Override reset */ 687 /* Position will be set via JavaScript based on button position */ 688 } 689 690 .overtype-dropdown-item { 691 display: flex; 692 align-items: center; 693 width: 100%; 694 padding: 8px 12px; 695 border: none; 696 background: none; 697 text-align: left; 698 cursor: pointer; 699 font-size: 14px; 700 color: var(--text, #333); 701 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 702 } 703 704 .overtype-dropdown-item:hover { 705 background: var(--hover-bg, #f0f0f0); 706 } 707 708 .overtype-dropdown-item.active { 709 font-weight: 600; 710 } 711 712 .overtype-dropdown-check { 713 width: 16px; 714 margin-right: 8px; 715 color: var(--h1, #007bff); 716 } 717 718 /* Preview mode styles */ 719 .overtype-container.preview-mode .overtype-input { 720 display: none !important; 721 } 722 723 .overtype-container.preview-mode .overtype-preview { 724 pointer-events: auto !important; 725 user-select: text !important; 726 cursor: text !important; 727 } 728 729 /* Hide syntax markers in preview mode */ 730 .overtype-container.preview-mode .syntax-marker { 731 display: none !important; 732 } 733 734 /* Hide URL part of links in preview mode - extra specificity */ 735 .overtype-container.preview-mode .syntax-marker.url-part, 736 .overtype-container.preview-mode .url-part { 737 display: none !important; 738 } 739 740 /* Hide all syntax markers inside links too */ 741 .overtype-container.preview-mode a .syntax-marker { 742 display: none !important; 743 } 744 745 /* Headers - restore proper sizing in preview mode */ 746 .overtype-container.preview-mode .overtype-wrapper .overtype-preview h1, 747 .overtype-container.preview-mode .overtype-wrapper .overtype-preview h2, 748 .overtype-container.preview-mode .overtype-wrapper .overtype-preview h3 { 749 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important; 750 font-weight: 600 !important; 751 margin: 0 !important; 752 display: block !important; 753 color: inherit !important; /* Use parent text color */ 754 line-height: 1 !important; /* Tight line height for headings */ 755 } 756 757 .overtype-container.preview-mode .overtype-wrapper .overtype-preview h1 { 758 font-size: 2em !important; 759 } 760 761 .overtype-container.preview-mode .overtype-wrapper .overtype-preview h2 { 762 font-size: 1.5em !important; 763 } 764 765 .overtype-container.preview-mode .overtype-wrapper .overtype-preview h3 { 766 font-size: 1.17em !important; 767 } 768 769 /* Lists - restore list styling in preview mode */ 770 .overtype-container.preview-mode .overtype-wrapper .overtype-preview ul { 771 display: block !important; 772 list-style: disc !important; 773 padding-left: 2em !important; 774 margin: 1em 0 !important; 775 } 776 777 .overtype-container.preview-mode .overtype-wrapper .overtype-preview ol { 778 display: block !important; 779 list-style: decimal !important; 780 padding-left: 2em !important; 781 margin: 1em 0 !important; 782 } 783 784 .overtype-container.preview-mode .overtype-wrapper .overtype-preview li { 785 display: list-item !important; 786 margin: 0 !important; 787 padding: 0 !important; 788 } 789 790 /* Links - make clickable in preview mode */ 791 .overtype-container.preview-mode .overtype-wrapper .overtype-preview a { 792 pointer-events: auto !important; 793 cursor: pointer !important; 794 color: var(--link, #0066cc) !important; 795 text-decoration: underline !important; 796 } 797 798 /* Code blocks - proper pre/code styling in preview mode */ 799 .overtype-container.preview-mode .overtype-wrapper .overtype-preview pre.code-block { 800 background: #2d2d2d !important; 801 color: #f8f8f2 !important; 802 padding: 1.2em !important; 803 border-radius: 3px !important; 804 overflow-x: auto !important; 805 margin: 0 !important; 806 display: block !important; 807 } 808 809 /* Cave theme code block background in preview mode */ 810 .overtype-container[data-theme="cave"].preview-mode .overtype-wrapper .overtype-preview pre.code-block { 811 background: #11171F !important; 812 } 813 814 .overtype-container.preview-mode .overtype-wrapper .overtype-preview pre.code-block code { 815 background: transparent !important; 816 color: inherit !important; 817 padding: 0 !important; 818 font-family: ${n} !important; 819 font-size: 0.9em !important; 820 line-height: 1.4 !important; 821 } 822 823 /* Hide old code block lines and fences in preview mode */ 824 .overtype-container.preview-mode .overtype-wrapper .overtype-preview .code-block-line { 825 display: none !important; 826 } 827 828 .overtype-container.preview-mode .overtype-wrapper .overtype-preview .code-fence { 829 display: none !important; 830 } 831
832 /* Blockquotes - enhanced styling in preview mode */ 833 .overtype-container.preview-mode .overtype-wrapper .overtype-preview .blockquote { 834 display: block !important; 835 border-left: 4px solid var(--blockquote, #ddd) !important; 836 padding-left: 1em !important; 837 margin: 1em 0 !important; 838 font-style: italic !important; 839 } 840 841 /* Typography improvements in preview mode */ 842 .overtype-container.preview-mode .overtype-wrapper .overtype-preview { 843 font-family: Georgia, 'Times New Roman', serif !important; 844 font-size: 16px !important; 845 line-height: 1.8 !important; 846 color: var(--text, #333) !important; /* Consistent text color */ 847 } 848 849 /* Inline code in preview mode - keep monospace */ 850 .overtype-container.preview-mode .overtype-wrapper .overtype-preview code { 851 font-family: ${n} !important; 852 font-size: 0.9em !important; 853 background: rgba(135, 131, 120, 0.15) !important; 854 padding: 0.2em 0.4em !important; 855 border-radius: 3px !important; 856 } 857 858 /* Strong and em elements in preview mode */ 859 .overtype-container.preview-mode .overtype-wrapper .overtype-preview strong { 860 font-weight: 700 !important; 861 color: inherit !important; /* Use parent text color */ 862 } 863 864 .overtype-container.preview-mode .overtype-wrapper .overtype-preview em { 865 font-style: italic !important; 866 color: inherit !important; /* Use parent text color */ 867 } 868 869 /* HR in preview mode */ 870 .overtype-container.preview-mode .overtype-wrapper .overtype-preview .hr-marker { 871 display: block !important; 872 border-top: 2px solid var(--hr, #ddd) !important; 873 text-indent: -9999px !important; 874 height: 2px !important; 875 } 876 877 ${s} 878 `}({theme:e.currentTheme||$}),o=document.createElement("style");o.className="overtype-styles",o.textContent=n,document.head.appendChild(o),e.stylesInjected=!0}static setTheme(t,r=null){let n="string"==typeof t?R(t):t;r&&(n=function(e,t={}){return{...e,colors:{...e.colors,...t}}}(n,r)),e.currentTheme=n,e.injectStyles(!0),document.querySelectorAll(".overtype-container").forEach(e=>{let t="string"==typeof n?n:n.name;t&&e.setAttribute("data-theme",t)}),document.querySelectorAll(".overtype-wrapper").forEach(e=>{if(!e.closest(".overtype-container")){let t="string"==typeof n?n:n.name;t&&e.setAttribute("data-theme",t)}let t=e._instance;t&&t.updatePreview()})}static initGlobalListeners(){e.globalListenersInitialized||(document.addEventListener("input",e=>{if(e.target&&e.target.classList&&e.target.classList.contains("overtype-input")){let t=e.target.closest(".overtype-wrapper"),r=null==t?void 0:t._instance;r&&r.handleInput(e)}}),document.addEventListener("keydown",e=>{if(e.target&&e.target.classList&&e.target.classList.contains("overtype-input")){let t=e.target.closest(".overtype-wrapper"),r=null==t?void 0:t._instance;r&&r.handleKeydown(e)}}),document.addEventListener("scroll",e=>{if(e.target&&e.target.classList&&e.target.classList.contains("overtype-input")){let t=e.target.closest(".overtype-wrapper"),r=null==t?void 0:t._instance;r&&r.handleScroll(e)}},!0),document.addEventListener("selectionchange",e=>{let t=document.activeElement;if(t&&t.classList.contains("overtype-input")){let e=t.closest(".overtype-wrapper"),r=null==e?void 0:e._instance;r&&(r.options.showStats&&r.statsBar&&r._updateStats(),clearTimeout(r._selectionTimeout),r._selectionTimeout=setTimeout(()=>{r.updatePreview()},50))}}),e.globalListenersInitialized=!0)}};o(ee,"instances",new WeakMap),o(ee,"stylesInjected",!1),o(ee,"globalListenersInitialized",!1),o(ee,"instanceCount",0);var et=ee;et.MarkdownParser=i,et.ShortcutsManager=I,et.themes={solar:$,cave:R("cave")},et.getTheme=R,et.currentTheme=$},69135:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},86373:(e,t,r)=>{var n={296:(e,t,r)=>{var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,p="object"==typeof self&&self&&self.Object===Object&&self,c=l||p||Function("return this")(),d=Object.prototype.toString,u=Math.max,h=Math.min,m=function(){return c.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==d.call(t))return NaN;if(f(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=f(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var l=i.test(e);return l||a.test(e)?s(e.slice(2),l?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,r){var n,o,i,a,s,l,p=0,c=!1,d=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var r=n,i=o;return n=o=void 0,p=t,a=e.apply(i,r)}function g(e){var r=e-l;return void 0===l||r>=t||r<0||d&&e-p>=i}function w(){var e,r=m();if(g(r))return x(r);s=setTimeout(w,(e=t-(r-l),d?h(e,i-(r-p)):e))}function x(e){return s=void 0,v&&n?b(e):(n=o=void 0,a)}function k(){var e,r=m(),i=g(r);if(n=arguments,o=this,l=r,i){if(void 0===s)return p=e=l,s=setTimeout(w,t),c?b(e):a;if(d)return s=setTimeout(w,t),b(l)}return void 0===s&&(s=setTimeout(w,t)),a}return t=y(t)||0,f(r)&&(c=!!r.leading,i=(d="maxWait"in r)?u(y(r.maxWait)||0,t):i,v="trailing"in r?!!r.trailing:v),k.cancel=function(){void 0!==s&&clearTimeout(s),p=0,n=l=o=s=void 0},k.flush=function(){return void 0===s?a:x(m())},k}},96:(e,t,r)=>{var n="Expected a function",o=NaN,i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,p=parseInt,c="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),h=Object.prototype.toString,m=Math.max,f=Math.min,y=function(){return u.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==h.call(t))return o;if(v(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=v(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||l.test(e)?p(e.slice(2),n?2:8):a.test(e)?o:+e}e.exports=function(e,t,r){var o=!0,i=!0;if("function"!=typeof e)throw TypeError(n);return v(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),function(e,t,r){var o,i,a,s,l,p,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw TypeError(n);function g(t){var r=o,n=i;return o=i=void 0,c=t,s=e.apply(n,r)}function w(e){var r=e-p;return void 0===p||r>=t||r<0||u&&e-c>=a}function x(){var e,r=y();if(w(r))return k(r);l=setTimeout(x,(e=t-(r-p),u?f(e,a-(r-c)):e))}function k(e){return l=void 0,h&&o?g(e):(o=i=void 0,s)}function S(){var e,r=y(),n=w(r);if(o=arguments,i=this,p=r,n){if(void 0===l)return c=e=p,l=setTimeout(x,t),d?g(e):s;if(u)return l=setTimeout(x,t),g(p)}return void 0===l&&(l=setTimeout(x,t)),s}return t=b(t)||0,v(r)&&(d=!!r.leading,a=(u="maxWait"in r)?m(b(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),S.cancel=function(){void 0!==l&&clearTimeout(l),c=0,o=p=i=l=void 0},S.flush=function(){return void 0===l?s:k(y())},S}(e,t,{leading:o,maxWait:t,trailing:i})}},703:(e,t,r)=>{"use strict";var n=r(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
878:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},697:(e,t,r)=>{e.exports=r(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";i.r(a),i.d(a,{LazyLoadComponent:()=>z,LazyLoadImage:()=>Q,trackWindowScroll:()=>C});let e=r(23016);var t=i.n(e),n=i(697);function o(){return"undefined"!=typeof window&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=function(e){e.forEach(function(e){e.isIntersecting&&e.target.onVisible()})},h={},m=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),e&&c(a,e);var r,n,i=(n=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=d(a);e=n?Reflect.construct(t,arguments,d(this).constructor):t.apply(this,arguments);if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this});function a(e){var t,r;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).supportsObserver=!e.scrollPosition&&e.useIntersectionObserver&&o(),t.supportsObserver&&(h[r=e.threshold]=h[r]||new IntersectionObserver(u,{rootMargin:r+"px"}),t.observer=h[r]),t}return r=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollPosition,t=this.placeholder.getBoundingClientRect(),r=this.placeholder.style,n=parseInt(r.getPropertyValue("margin-left"),10)||0,o=parseInt(r.getPropertyValue("margin-top"),10)||0;return{bottom:e.y+t.bottom+o,left:e.x+t.left+n,right:e.x+t.right+n,top:e.y+t.to
878p+o}}},{key:"isPlaceholderInViewport",value:function(){if("undefined"==typeof window||!this.placeholder)return!1;var e=this.props,t=e.scrollPosition,r=e.threshold,n=this.getPlaceholderBoundingBox(t),o=t.y+window.innerHeight,i=t.x,a=t.x+window.innerWidth;return!!(t.y-r<=n.bottom&&o+r>=n.top&&i-r<=n.right&&a+r>=n.left)}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var e=this,r=this.props,n=r.className,o=r.height,i=r.placeholder,a=r.style,s=r.width;if(i&&"function"!=typeof i.type)return t().cloneElement(i,{ref:function(t){return e.placeholder=t}});var c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){var n,o;n=t,o=r[t],(n=p(n))in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({display:"inline-block"},a);return void 0!==s&&(c.width=s),void 0!==o&&(c.height=o),t().createElement("span",{className:n,ref:function(t){return e.placeholder=t},style:c},i)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}(a.prototype,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(t().Component);m.propTypes={onVisible:n.PropTypes.func.isRequired,className:n.PropTypes.string,height:n.PropTypes.oneOfType([n.PropTypes.number,n.PropTypes.string]),placeholder:n.PropTypes.element,threshold:n.PropTypes.number,useIntersectionObserver:n.PropTypes.bool,scrollPosition:n.PropTypes.shape({x:n.PropTypes.number.isRequired,y:n.PropTypes.number.isRequired}),width:n.PropTypes.oneOfType([n.PropTypes.number,n.PropTypes.string])},m.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};var f=i(296),y=i.n(f),v=i(96),b=i.n(v),g=function(e){var t=getComputedStyle(e,null);return t.getPropertyValue("overflow")+t.getPropertyValue("overflow-y")+t.getPropertyValue("overflow-x")};let w=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t instanceof HTMLElement;){if(/(scroll|auto)/.test(g(t)))return t;t=t.parentNode}return window};function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var k=["delayMethod","delayTime"];function S(){return(S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function O(e,t){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(){return"undefined"==typeof window?0:window.scrollX||window.pageXOffset},P=function(){return"undefined"==typeof window?0:window.scrollY||window.pageYOffset};let C=function(e){var r=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");s.prototype=Object.create(r&&r.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),r&&O(s,r);var n,i,a=(i=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=T(s);return e=i?Reflect.construct(t,arguments,T(this).constructor):t.apply(this,arguments),L(this,e)});function s(e){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,s),(r=a.call(this,e)).useIntersectionObserver=e.useIntersectionObserver&&o(),r.useIntersectionObserver)return L(r);var r,n=r.onChangeScroll.bind(E(r));return"debounce"===e.delayMethod?r.delayedScroll=y()(n,e.delayTime):"throttle"===e.delayMethod&&(r.delayedScroll=b()(n,e.delayTime)),r.state={scrollPosition:{x:j(),y:P()}},r.baseComponentRef=t().createRef(),r}return n=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){"undefined"==typeof window||this.useIntersectionObserver||w(this.baseComponentRef.current)!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){"undefined"==typeof window||this.useIntersectionObserver||(this.scrollElement=w(this.baseComponentRef.current),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){"undefined"==typeof window||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:j(),y:P()}})}},{key:"render",value:function(){var r=this.props,n=(r.delayMethod,r.delayTime,function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(r,k)),o=this.useIntersectionObserver?null:this.state.scrollPosition;return t().createElement(e,S({forwardRef:this.baseComponentRef,scrollPosition:o},n))}}],function(e,t){for(var r,n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(r=function(e,t){if("object"!==x(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==x(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===x(r)?r:String(r)),o)}}(s.prototype,n),Object.defineProperty(s,"prototype",{writable:!1}),s}(t().Component);
878return r.propTypes={delayMethod:n.PropTypes.oneOf(["debounce","throttle"]),delayTime:n.PropTypes.number,useIntersectionObserver:n.PropTypes.bool},r.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},r};function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}let I=C(function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&A(i,e);var r,n,o=(n=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=_(i);e=n?Reflect.construct(t,arguments,_(this).constructor):t.apply(this,arguments);if(e&&("object"===M(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this});function i(e){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return r=[{key:"render",value:function(){return t().createElement(m,this.props)}}],function(e,t){for(var r,n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(r=function(e,t){if("object"!==M(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==M(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===M(r)?r:String(r)),o)}}(i.prototype,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(t().Component));function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){return(H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function N(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var B=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),e&&H(a,e);var r,n,i=(n=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=R(a);e=n?Reflect.construct(t,arguments,R(this).constructor):t.apply(this,arguments);if(e&&("object"===$(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return N(this)});function a(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e);var t,r=e.afterLoad,n=e.beforeLoad,o=e.scrollPosition,s=e.visibleByDefault;return t.state={visible:s},s&&(n(),r()),t.onVisible=t.onVisible.bind(N(t)),t.isScrollTracked=!!(o&&Number.isFinite(o.x)&&o.x>=0&&Number.isFinite(o.y)&&o.y>=0),t}return r=[{key:"componentDidUpdate",value:function(e,t){t.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var e=this.props,r=e.className,n=e.delayMethod,i=e.delayTime,a=e.height,s=e.placeholder,l=e.scrollPosition,p=e.style,c=e.threshold,d=e.useIntersectionObserver,u=e.width;return this.isScrollTracked||d&&o()?t().createElement(m,{className:r,height:a,onVisible:this.onVisible,placeholder:s,scrollPosition:l,style:p,threshold:c,useIntersectionObserver:d,width:u}):t().createElement(I,{className:r,delayMethod:n,delayTime:i,height:a,onVisible:this.onVisible,placeholder:s,style:p,threshold:c,width:u})}}],function(e,t){for(var r,n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(r=function(e,t){if("object"!==$(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==$(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===$(r)?r:String(r)),o)}}(a.prototype,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(t().Component);B.propTypes={afterLoad:n.PropTypes.func,beforeLoad:n.PropTypes.func,useIntersectionObserver:n.PropTypes.bool,visibleByDefault:n.PropTypes.bool},B.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};let z=B;function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var V=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
878t%2?q(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=U(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function W(){return(W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function U(e){var t=function(e,t){if("object"!==D(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==D(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===D(t)?t:String(t)}function K(e,t){return(K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&K(i,e);var r,n,o=(n=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=G(i);e=n?Reflect.construct(t,arguments,G(this).constructor):t.apply(this,arguments);if(e&&("object"===D(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this});function i(e){var t;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).state={loaded:!1},t}return r=[{key:"onImageLoad",value:function(){var e=this;return this.state.loaded?null:function(t){e.props.onLoad(t),e.props.afterLoad(),e.setState({loaded:!0})}}},{key:"getImg",value:function(){var e=this.props,r=(e.afterLoad,e.beforeLoad,e.delayMethod,e.delayTime,e.effect,e.placeholder,e.placeholderSrc,e.scrollPosition,e.threshold,e.useIntersectionObserver,e.visibleByDefault,e.wrapperClassName,e.wrapperProps,function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,V));return t().createElement("img",W({},r,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var e=this.props,r=e.beforeLoad,n=e.className,o=e.delayMethod,i=e.delayTime,a=e.height,s=e.placeholder,l=e.scrollPosition,p=e.style,c=e.threshold,d=e.useIntersectionObserver,u=e.visibleByDefault,h=e.width;return t().createElement(z,{beforeLoad:r,className:n,delayMethod:o,delayTime:i,height:a,placeholder:s,scrollPosition:l,style:p,threshold:c,useIntersectionObserver:d,visibleByDefault:u,width:h},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(e){var r=this.props,n=r.effect,o=r.height,i=r.placeholderSrc,a=r.width,s=r.wrapperClassName,l=r.wrapperProps,p=this.state.loaded;return t().createElement("span",W({className:s+" lazy-load-image-background "+n+(p?" lazy-load-image-loaded":""),style:F(F({},p||!i?{}:{backgroundImage:"url(".concat(i,")"),backgroundSize:"100% 100%"}),{},{color:"transparent",display:"inline-block",height:o,width:a})},l),e)}},{key:"render",value:function(){var e=this.props,t=e.effect,r=e.placeholderSrc,n=e.visibleByDefault,o=e.wrapperClassName,i=e.wrapperProps,a=this.getLazyLoadImage();return(t||r)&&!n||o||i?this.getWrappedLazyLoadImage(a):a}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,U(n.key),n)}}(i.prototype,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(t().Component);Z.propTypes={onLoad:n.PropTypes.func,afterLoad:n.PropTypes.func,beforeLoad:n.PropTypes.func,delayMethod:n.PropTypes.string,delayTime:n.PropTypes.number,effect:n.PropTypes.string,placeholderSrc:n.PropTypes.string,threshold:n.PropTypes.number,useIntersectionObserver:n.PropTypes.bool,visibleByDefault:n.PropTypes.bool,wrapperClassName:n.PropTypes.string,wrapperProps:n.PropTypes.object},Z.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};let Q=Z})(),e.exports=a},86428:(e,t,r)=>{"use strict";r.d(t,{q7:()=>P,bL:()=>j});var n=r(23016),o=r(28488),i=r(24400),a=r(25570),s=r(93619),l=r(41949),p=r(98628),c="Toggle",d=n.forwardRef((e,t)=>
878{let{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[d,u]=(0,l.i)({prop:r,onChange:o,defaultProp:n??!1,caller:c});return(0,p.jsx)(i.sG.button,{type:"button","aria-pressed":d,"data-state":d?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:(0,s.mK)(e.onClick,()=>{e.disabled||u(!d)})})});d.displayName=c;var u=r(31685),h="ToggleGroup",[m,f]=(0,o.A)(h,[a.RG]),y=(0,a.RG)(),v=n.forwardRef((e,t)=>{let{type:r,...n}=e;if("single"===r)return(0,p.jsx)(w,{...n,ref:t});if("multiple"===r)return(0,p.jsx)(x,{...n,ref:t});throw Error(`Missing prop \`type\` expected on \`${h}\``)});v.displayName=h;var[b,g]=m(h),w=n.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:i=()=>{},...a}=e,[s,c]=(0,l.i)({prop:r,defaultProp:o??"",onChange:i,caller:h});return(0,p.jsx)(b,{scope:e.__scopeToggleGroup,type:"single",value:n.useMemo(()=>s?[s]:[],[s]),onItemActivate:c,onItemDeactivate:n.useCallback(()=>c(""),[c]),children:(0,p.jsx)(O,{...a,ref:t})})}),x=n.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:i=()=>{},...a}=e,[s,c]=(0,l.i)({prop:r,defaultProp:o??[],onChange:i,caller:h}),d=n.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=n.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,p.jsx)(b,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:d,onItemDeactivate:u,children:(0,p.jsx)(O,{...a,ref:t})})});v.displayName=h;var[k,S]=m(h),O=n.forwardRef((e,t)=>{let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:s,dir:l,loop:c=!0,...d}=e,h=y(r),m=(0,u.jH)(l),f={role:"group",dir:m,...d};return(0,p.jsx)(k,{scope:r,rovingFocus:o,disabled:n,children:o?(0,p.jsx)(a.bL,{asChild:!0,...h,orientation:s,dir:m,loop:c,children:(0,p.jsx)(i.sG.div,{...f,ref:t})}):(0,p.jsx)(i.sG.div,{...f,ref:t})})}),L="ToggleGroupItem",E=n.forwardRef((e,t)=>{let r=g(L,e.__scopeToggleGroup),o=S(L,e.__scopeToggleGroup),i=y(e.__scopeToggleGroup),s=r.value.includes(e.value),l=o.disabled||e.disabled,c={...e,pressed:s,disabled:l},d=n.useRef(null);return o.rovingFocus?(0,p.jsx)(a.q7,{asChild:!0,...i,focusable:!l,active:s,ref:d,children:(0,p.jsx)(T,{...c,ref:t})}):(0,p.jsx)(T,{...c,ref:t})});E.displayName=L;var T=n.forwardRef((e,t)=>{let{__scopeToggleGroup:r,value:n,...o}=e,i=g(L,r),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===i.type?a:void 0;return(0,p.jsx)(d,{...s,...o,ref:t,onPressedChange:e=>{e?i.onItemActivate(n):i.onItemDeactivate(n)}})}),j=v,P=E},92801:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]])},92985:(e,t,r)=>{"use strict";r.d(t,{Avatar:()=>y,AvatarFallback:()=>w,AvatarImage:()=>b,H4:()=>O,_V:()=>S,bL:()=>k});var n=r(23016),o=r(28488),i=r(48993),a=r(58485),s=r(24400),l=r(30612);function p(){return()=>{}}var c=r(98628),d="Avatar",[u,h]=(0,o.A)(d),[m,f]=u(d),y=n.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[i,a]=n.useState("idle");return(0,c.jsx)(m,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:(0,c.jsx)(s.sG.span,{...o,ref:t})})});y.displayName=d;var v="AvatarImage",b=n.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:d=()=>{},...u}=e,h=f(v,r),m=function(e,{referrerPolicy:t,crossOrigin:r}){let o=(0,l.useSyncExternalStore)(p,()=>!0,()=>!1),i=n.useRef(null),s=o?(i.current||(i.current=new window.Image),i.current):null,[c,d]=n.useState(()=>x(s,e));return(0,a.N)(()=>{d(x(s,e))},[s,e]),(0,a.N)(()=>{let e=e=>()=>{d(e)};if(!s)return;let n=e("loaded"),o=e("error");return s.addEventListener("load",n),s.addEventListener("error",o),t&&(s.referrerPolicy=t),"string"==typeof r&&(s.crossOrigin=r),()=>{s.removeEventListener("load",n),s.removeEventListener("error",o)}},[s,r,t]),c}(o,u),y=(0,i.c)(e=>{d(e),h.onImageLoadingStatusChange(e)});return(0,a.N)(()=>{"idle"!==m&&y(m)},[m,y]),"loaded"===m?(0,c.jsx)(s.sG.img,{...u,ref:t,src:o}):null});b.displayName=v;var g="AvatarFallback",w=n.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...i}=e,a=f(g,r),[l,p]=n.useState(void 0===o);return n.useEffect(()=>{if(void 0!==o){let e=window.setTimeout(()=>p(!0),o);return()=>window.clearTimeout(e)}},[o]),l&&"loaded"!==a.imageLoadingStatus?(0,c.jsx)(s.sG.span,{...i,ref:t}):null});function x(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWi
878dth>0?"loaded":"loading"):"error":"idle"}w.displayName=g;var k=y,S=b,O=w},93975:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("sun-dim",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M20 12h.01",key:"1ykeid"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M4 12h.01",key:"158zrr"}],["path",{d:"M17.657 6.343h.01",key:"31pqzk"}],["path",{d:"M17.657 17.657h.01",key:"jehnf4"}],["path",{d:"M6.343 17.657h.01",key:"gdk6ow"}],["path",{d:"M6.343 6.343h.01",key:"1uurf0"}]])},97780:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},98211:()=>{},99628:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(32744).A)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.