import{r as s,t as _}from"./chunk-JImsuXuG.js";_();var w={angry:[`>:(`,`>:-(`],blush:[`:")`,`:-")`],broken_heart:[`</3`,`<\\3`],confused:[`:/`,`:-/`],cry:[`:'(`,`:'-(`,`:,(`,`:,-(`],frowning:[`:(`,`:-(`],heart:[`<3`],imp:[`]:(`,`]:-(`],innocent:[`o:)`,`O:)`,`o:-)`,`O:-)`,`0:)`,`0:-)`],joy:[`:')`,`:'-)`,`:,)`,`:,-)`,`:'D`,`:'-D`,`:,D`,`:,-D`],kissing:[`:*`,`:-*`],laughing:[`x-)`,`X-)`],neutral_face:[`:|`,`:-|`],open_mouth:[`:o`,`:-o`,`:O`,`:-O`],rage:[`:@`,`:-@`],smile:[`:D`,`:-D`],smiley:[`:)`,`:-)`],smiling_imp:[`]:)`,`]:-)`],sob:[`:,'(`,`:,'-(`,`;(`,`;-(`],stuck_out_tongue:[`:P`,`:-P`],sunglasses:[`8-)`,`B-)`],sweat:[`,:(`,`,:-(`],sweat_smile:[`,:)`,`,:-)`],unamused:[`:s`,`:-S`,`:z`,`:-Z`,`:$`,`:-$`],wink:[`;)`,`;-)`]};function b(e,o){return e[o].content}function k(e,o,f,l,g){let h=e.utils.arrayReplaceAt,d=e.utils.lib.ucmicro,t=new RegExp([d.Z.source,d.P.source,d.Cc.source].join(`|`));function s(p,j,r){let i=0,m=[];if(p.replace(g,function(n,u,a){let c;if(Object.prototype.hasOwnProperty.call(f,n)){if(c=f[n],u>0&&!t.test(a[u-1])||u+n.length<a.length&&!t.test(a[u+n.length]))return}else c=n.slice(1,-1);if(u>i){let x=new r(`text`,``,0);x.content=p.slice(i,u),m.push(x)}let _=new r(`emoji`,``,0);_.markup=c,_.content=o[c],m.push(_),i=u+n.length}),i<p.length){let n=new r(`text`,``,0);n.content=p.slice(i),m.push(n)}return m}return function(j){let r,i=j.tokens,m=0;for(let n=0,u=i.length;n<u;n++){if(i[n].type!==`inline`)continue;let a=i[n].children;for(let c=a.length-1;c>=0;c--)r=a[c],(r.type===`link_open`||r.type===`link_close`)&&r.info===`auto`&&(m-=r.nesting),r.type===`text`&&m===0&&l.test(r.content)&&(i[n].children=a=h(a,c,s(r.content,r.level,j.Token)))}}}function D(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}function y(e){let o=e.defs;e.enabled.length&&(o=Object.keys(o).reduce((t,s)=>(e.enabled.indexOf(s)>=0&&(t[s]=o[s]),t),{}));let f=Object.keys(e.shortcuts).reduce((t,s)=>o[s]?Array.isArray(e.shortcuts[s])?(e.shortcuts[s].forEach(p=>{t[p]=s}),t):(t[e.shortcuts[s]]=s,t):t,{}),l=Object.keys(o),g;l.length===0?g=`^$`:g=l.map(t=>`:${t}:`).concat(Object.keys(f)).sort().reverse().map(t=>D(t)).join(`|`);let h=RegExp(g),d=RegExp(g,`g`);return{defs:o,shortcuts:f,scanRE:h,replaceRE:d}}function O(e,o){let l=y(Object.assign({},{defs:{},shortcuts:{},enabled:[]},o||{}));e.renderer.rules.emoji=b,e.core.ruler.after(`linkify`,`emoji`,k(e,l.defs,l.shortcuts,l.scanRE,l.replaceRE))}function $(e,o){O(e,Object.assign({},{defs:s,shortcuts:w,enabled:[]},o||{}))}export{$ as default};
//# debugId=4cce2b97-b309-5403-a087-42bb32b5cdd8
//# sourceMappingURL=chunk-B2NlWm7j.js.map