/* sohutv 2025-06-12 19:20:52 */ var c=(n,r,s)=>new Promise((u,i)=>{var m=e=>{try{o(s.next(e))}catch(t){i(t)}},g=e=>{try{o(s.throw(e))}catch(t){i(t)}},o=e=>e.done?u(e.value):Promise.resolve(e.value).then(m,g);o((s=s.apply(n,r)).next())});import{A as d,r as l}from"./vendor-CDgHT6Qw.js";import{h as y,b as E}from"./lazyload-B-cG4Yvq.js";const w="//api.my.tv.sohu.com",x="//api.tv.sohu.com";function _(n){return c(this,null,function*(){const r={app_type:7,source:7,source_type:1,source_id:0};return y(w+"/forward/api/h5/forward",Object.assign(r,n))})}function b(){return c(this,null,function*(){return E(`${x}/v7/mobile/pc_meme/list`)})}const j={repost:_,getEmojiList:b},$=d("emo",()=>{const n=l([]),r=l({}),s=l(null),u=o=>{n.value=o;const e=o.reduce((t,a)=>(t[a.description]=a.imageName,t),{});r.value=e},i=()=>c(void 0,null,function*(){var o;if(!(n.value.length>0)){if(s.value){yield s.value;return}try{s.value=j.getEmojiList();const{data:e}=yield s.value,t=((o=e==null?void 0:e.data)==null?void 0:o.emoticons)||[];u(t)}catch(e){}finally{s.value=null}}});return{emotionsList:n,_cache:r,getEmotionsList:i,transformEmotions:(o,e,t)=>c(void 0,null,function*(){n.value.length===0&&(yield i());const a=new RegExp("\\[emoji:[0-9a-zA-Z]+\\]","gi");o=o.replace(a,"鈽");const f=/(\[.*?\])/g;return o.replace(f,(h,v)=>{const p=r.value[v];return p?``:h})}),getEmoPosition:o=>c(void 0,null,function*(){n.value.length===0&&(yield i());const e=/(\[.*?\])/g;let t;const a=[];for(;(t=e.exec(o))!==null;)r.value[t[0]]&&a.push({start:t.index,length:t[0].length,url:r.value[t[0]],title:t[0]});return a})}});export{j as r,$ as u};