import{t as e}from"./got-BBDj7u1e.mjs";import{t}from"./question-description-DtlpsF9E.mjs";const n=`https://leetcode.com`,r={path:`/dailyquestion/en`,radar:[{source:[`leetcode.com/`]}],name:`Unknown`,maintainers:[],handler:i,url:`leetcode.com/`};async function i(){let r={date:``,link:``,titleSlug:``,content:``,frontedId:``,difficulty:``,tags:``},i=n+`/graphql`,a=(await e({method:`post`,url:i,headers:{"content-type":`application/json`},body:JSON.stringify({query:`
            query questionOfToday {
                activeDailyCodingChallengeQuestion {
                    date
                    link
                    question {
                        frontendQuestionId: questionFrontendId
                        titleSlug
                    }
                }
            }
        `,variables:{}})})).data.data.activeDailyCodingChallengeQuestion;r.date=a.date,r.link=n+a.link,r.titleSlug=a.question.titleSlug;let o={operationName:`questionData`,query:`
            query questionData($titleSlug: String!) {
                question(titleSlug: $titleSlug) {
                    questionId
                    questionFrontendId
                    title
                    titleSlug
                    content
                    translatedTitle
                    translatedContent
                    difficulty
                    topicTags {
                        name
                        slug
                        translatedName
                        __typename
                    }
                    __typename
                }
            }
        `,variables:{titleSlug:r.titleSlug}},s=await e({method:`post`,url:i,headers:{"content-type":`application/json`},body:JSON.stringify(o)}),c={Medium:`🟡`,Easy:`🟢`,Hard:`🔴`},l=s.data.data.question;r.content=l.content,r.frontedId=l.questionFrontendId,r.difficulty=c[l.difficulty];let u=l.topicTags;u=u.map(e=>{let t=`#`+e.slug;return t=t.replaceAll(`-`,`_`),t}),r.tags=u.join(` `);let d={title:r.frontedId+`.`+r.titleSlug,description:t({question:r}),link:r.link};return{title:`LeetCode Daily Question`,link:`https://leetcode.com`,description:`Leetcode Daily Question`,item:[{title:d.title,description:d.description+r.content,link:d.link}]}}export{r as route};