1import{g as e}from"./DBq4UlV4.js";import{f as t,p as n}from"./fOwmonzH.js";import{t as r}from"./Ckx9aLOC.js";import{t as i}from"./C3Uuq6-N.js";import{n as a}from"./CUNCt0eV.js";import{t as o}from"./DRLboRIe.js";import{t as s}from"./BgXyD_3l.js";import{a as c}from"./MhW4rcIA.js";var l=5e3,u=1800;function d(e,t){if(t<=0)return``;let n=[...e];return n.length<=t?e:n.slice(0,t).join(``)}function f(e,t=l){let n=e.trim();return[...n].length<=t?n:`${d(n,t-1)}â¦`}function p(e,t,n){let r=f(e),i=n-t.length;if(i<=0)return{q:``,truncated:!0};if(encodeURIComponent(r).length<=i)return{q:r,truncated:!1};let a=r;for(;[...a].length>1&&encodeURIComponent(`${a}â¦`).length>i;)a=d(a,[...a].length-20);return a.length>=r.length?{q:r,truncated:!1}:{q:`${a.trimEnd()}â¦`,truncated:!0}}function m(e,t){let n=f(e,800),{q:r,truncated:i}=p(n,t,u);return{url:`${t}${encodeURIComponent(r)}`,needsClipboardFallback:i||r!==n}}function h(e){return m(e,`cursor://anysphere.cursor-deeplink/prompt?text=`)}function g(e){return m(e,`claude://code/new?q=`)}function _(e){return m(e,`vscode://GitHub.Copilot-Chat/chat?agent=agent&prompt=`)}function v(e){if(!e||typeof e!=`object`)return null;let t=e;if(`error`in t&&t.error||typeof t.description!=`string`||typeof t.prompt!=`string`)return null;let n=t.deeplinks;if(!n||typeof n!=`object`)return null;let r=n;return typeof r.cursor!=`string`||typeof r.claude!=`string`?null:{description:t.description,prompt:t.prompt,deeplinks:{cursor:r.cursor,claude:r.claude,...typeof t.claudeNeedsClipboardFallback==`boolean`?{claudeNeedsClipboardFallback:t.claudeNeedsClipboardFallback}:typeof r.claudeNeedsClipboardFallback==`boolean`?{claudeNeedsClipboardFallback:r.claudeNeedsClipboardFallback}:{}}}}var y=()=>{let t=a(),n=e(()=>typeof navigator<`u`&&navigator.platform?.includes(`Mac`)?`âV`:`Ctrl+V`);function r(e){window.open(e,`_self`)}async function i(e){try{await navigator.clipboard.writeText(e),t.add({title:`Prompt copied`,description:`The opened prompt was shortened â paste the full prompt with ${n.value} if needed`,icon:`i-lucide-clipboard-check`})}catch{}}function o(e,t){let{url:n,needsClipboardFallback:a}=e(t);r(n),a&&i(t)}function s(e){o(h,e)}function c(e){o(g,e)}function l(e){o(_,e)}return{pasteShortcut:n,openInCursor:s,openInClaudeCode:c,openInVSCode:l}},b={Official:`i-lucide-medal`,AI:`i-lucide-brain`,Analytics:`i-lucide-bar-chart`,CMS:`i-lucide-pencil`,CSS:`i-lucide-palette`,Database:`i-lucide-database`,Devtools:`i-lucide-wrench`,Ecommerce:`i-lucide-shopping-cart`,Extensions:`i-lucide-puzzle`,Fonts:`i-lucide-type`,Images:`i-lucide-image`,Libraries:`i-lucide-library`,Monitoring:`i-lucide-timer`,Payment:`i-lucide-credit-card`,Performance:`i-lucide-gauge`,Request:`i-lucide-unplug`,Security:`i-lucide-shield`,SEO:`i-lucide-search`,UI:`i-lucide-layout`},x=function(e=``,t=80){if(e)return/^https?:\/\//.test(e)?e:`https://raw.githubusercontent.com/nuxt/modules/main/icons/${e}`},S=function(e){return b[e]||`i-lucide-box`};function C(e){return`npx nuxt@latest module add ${Array.isArray(e)?e.join(` `):e}`}function w(e){let t=[`Install and configure the Nuxt module ${e.npm||e.name}: ${e.description||``}`];return e.website&&t.push(`Docs: ${e.website}`),e.repo&&t.push(`GitHub: https://github.com/${e.repo}`),t.push(`\nSteps:\n1. Run \`${C(e.name)}\`\n2. Read the module documentation and add recommended configuration in \`nuxt.config.ts\`\n3. List any required environment variables in the example env file without filling in actual values`),t.join(` 2`)}function T(e){return`Install and configure the following Nuxt modules in my project: 3 4${e.map(e=>{let t=[`- ${e.npm||e.name}: ${e.description||``}`];return e.website&&t.push(` Docs: ${e.website}`),e.repo&&t.push(` GitHub: https://github.com/${e.repo}`),t.join(` 5`)}).join(` 6`)} 7 8Steps: 91. Run \`${C(e.map(e=>e.name))}\` to install all modules at once 102. For each module, read its documentation and add the recommended configuration in \`nuxt.config.ts\` 113. List any required environment variables in the example env file without filling in actual values 124. Verify the setup is correct by checking that the modules are properly registered`}function E(t,n){let{copy:r}=s(),{track:i}=o(),{openInCursor:a,openInClaudeCode:c,openInVSCode:l}=y(),u=e(()=>C(t().name)),d=e(()=>w(t()));function f(){i(`Module Install Command Copied`,{module:t().name,source:n}),r(u.value,{title:`Command copied to clipboard:`,description:u.value})}function p(){i(`Module Agent Prompt Copied`,{module:t().name,source:n}),r(d.value,{title:`Agent prompt copied!`,description:t().npm||t().name,icon:`i-custom-ai`})}function m(){i(`Module Prompt Opened`,{module:t().name,ide:`cursor`,source:n}),a(d.value)}function h(){i(`Module Prompt Opened`,{module:t().name,ide:`claude`,source:n}),c(d.value)}function g(){i(`Module Prompt Opened`,{module:t().name,ide:`vscode`,source:n}),l(d.value)}return{installCommand:u,agentPrompt:d,copyInstall:f,copyPrompt:p,openCursor:m,openClaude:h,openVSCode:g}}var D=[{key:`downloads`,label:`Downloads`},{key:`stars`,label:`Stars`},{key:`publishedAt`,label:`Updated`},{key:`createdAt`,label:`Created`}],O=[{key:`desc`,label:`Desc`,icon:`i-lucide-arrow-down-wide-narrow`},{key:`asc`,label:`Asc`,icon:`i-lucide-arrow-up-wide-narrow`}],k=()=>{let a=t(),o=n(),{data:s,execute:l}=i(`/api/v1/modules`,{immediate:!1,default:()=>({modules:[],stats:{maintainers:0,contributors:0,modules:0}})},`$MHUlxB4B-p`),u=e(()=>s.value.stats),d=e(()=>s.value.modules||[]),f=r(`module`,()=>({}));async function p(){if(!d.value.length)return l()}let m=e(()=>Object.keys(b).map(e=>({key:e,label:e,active:a.query.category===e,to:{name:`modules`,query:e===a.query.category?void 0:{category:e},state:{smooth:`#smooth`}},icon:b[e]||void 0,click:t=>{a.query.category===e&&(t.preventDefault(),o.replace({query:{...a.query,category:void 0}}))}}))),h=e(()=>m.value.find(e=>e.label===a.query.category)),g=e(()=>D.find(e=>e.key===a.query.sortBy)||D[0]),_=e(()=>O.find(e=>e.key===a.query.orderBy)||O[0]),v=e(()=>a.query.q),y=(e,t)=>e.sponsor&&!t.sponsor?-1:!e.sponsor&&t.sponsor?1:e.type===`official`&&t.type!==`official`?-1:+(e.type!==`official`&&t.type===`official`);return{fetchList:p,sorts:D,orders:O,stats:u,modules:d,filteredModules:e(()=>{let e=[...d.value].filter(e=>{if(h.value){if(h.value.key===`Official`)return e.type===`official`;
12if(e.category!==h.value.key)return!1}let t=c(v.value);return!(v.value&&![`name`,`npm`,`category`,`description`,`repo`].map(t=>e[t]).filter(Boolean).some(e=>typeof e==`string`&&e.search(t)!==-1))}).sort((e,t)=>{let n=g.value?.key;return n&&e.stats&&t.stats?t.stats[n]-e.stats[n]:0});return _.value?.key===`asc`&&(e=e.reverse()),!a.query.sortBy&&!a.query.orderBy?e.sort(y):e}),module:f,categories:m,selectedCategory:h,selectedSort:g,selectedOrder:_,q:v}};export{E as a,v as c,x as i,C as n,k as o,S as r,y as s,T as t}; 13//# sourceMappingURL=DLWMGSbM.js.map
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.