"use strict";exports.id=8511,exports.ids=[8511],exports.modules={8511:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{sendTelegram:()=>l}),c(73024);var e=c(76760),f=c.n(e),g=c(73652);c(36017);var h=c(51021),i=c(93554);c(20243);var j=a([h,i]);function k(a,b){return`https://api.telegram.org/bot${a}/${b}`}async function l(a,b){let c=[];b.title&&c.push(`*${n(b.title)}*`),c.push(n(b.body)),b.link&&c.push(b.link),await m(a.botToken,a.chatId,c.join("\n\n"))}async function m(a,b,c){(await fetch(k(a,"sendMessage"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:b,text:c.slice(0,4e3),parse_mode:"Markdown",disable_web_page_preview:!0}),signal:AbortSignal.timeout(15e3)})).ok||await fetch(k(a,"sendMessage"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:b,text:c.slice(0,4e3)}),signal:AbortSignal.timeout(15e3)}).catch(()=>{})}function n(a){return a.replace(/([*_`\[])/g,"\\$1")}[h,i]=j.then?(await j)():j,f().join((0,g._)(),"notify","telegram-state.json"),d()}catch(a){d(a)}})}};