PageSourceSearch

https://grorepository.ru/_nuxt/CFdjI--I.js

js grorepository.ru collected 2026-10-05 07:04:21 UTC 3,438 bytes, 1 lines download raw bytes

1import{C as e,Fn as t,Gn as n,I as r,K as i,L as a,Lt as o,P as s,_r as c,an as l,jt as u,mr as d,vr as f}from"./tRMwG_AM.js";import{w as p}from"./CnOAGn99.js";import{q as m}from"./Cf4j_un_.js";var h={key:0,class:`absolute left-0 right-0 top-full mt-1 z-50 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl shadow-lg overflow-hidden max-h-80 overflow-y-auto`},g={key:0,class:`px-4 py-3 space-y-3`},_={class:`flex-1 space-y-1.5`},v={key:1},y=[`onMousedown`,`onMouseenter`],b={class:`flex-shrink-0`},x={key:0,class:`h-4 w-4 text-gray-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},S={key:1,class:`h-4 w-4 text-gray-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},C={class:`flex-1 min-w-0`},w={class:`truncate font-medium text-gray-900 dark:text-gray-100`},T={key:0,class:`truncate text-xs text-primary-500 dark:text-primary-400`},E={key:1,class:`truncate text-xs text-gray-400`},D={key:2,class:`px-4 py-6 text-center text-sm text-gray-400`},O=Object.assign(i({__name:`ModSearchSuggestionsComponent`,props:{query:{},apiUrl:{}},emits:[`select`],setup(i,{expose:O,emit:k}){let A=i,j=k,M=t([]),N=t(!1),P=t(!1),F=t(-1),I=null,L=``,R=async e=>{if(!e||e.trim().length<2){M.value=[],N.value=!1,P.value=!1;return}L=e,P.value=!0,N.value=!0;try{let t=await m(A.apiUrl,{query:{q:e}});if(L!==e)return;M.value=t||[],N.value=!0,F.value=-1}catch{if(L!==e)return;M.value=[]}finally{L===e&&(P.value=!1)}};l(()=>A.query,e=>{if(I&&clearTimeout(I),!e||e.trim().length<2){M.value=[],N.value=!1,P.value=!1;return}P.value=!0,N.value=!0,I=setTimeout(()=>{R(e)},300)});let z=()=>{N.value=!1,P.value=!1,F.value=-1},B=e=>{j(`select`,e),z()};return O({moveDown:()=>{N.value&&!P.value&&(F.value=(F.value+1)%M.value.length)},moveUp:()=>{N.value&&!P.value&&(F.value=F.value<=0?M.value.length-1:F.value-1)},selectActive:()=>F.value>=0&&M.value[F.value]?(B(M.value[F.value]),!0):!1,close:z,isOpen:N}),(t,i)=>n(N)?(u(),a(`div`,h,[n(P)?(u(),a(`div`,g,[(u(),a(e,null,o(3,e=>s(`div`,{key:e,class:`flex items-center gap-3`},[i[1]||=s(`div`,{class:`h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0`},null,-1),s(`div`,_,[s(`div`,{class:`h-3 rounded bg-gray-200 dark:bg-gray-700 animate-pulse`,style:c(`width: ${55+e*12}%`)},null,4),i[0]||=s(`div`,{class:`h-2.5 rounded bg-gray-100 dark:bg-gray-700/60 animate-pulse w-2/5`},null,-1)])])),64))])):n(M).length>0?(u(),a(`ul`,v,[(u(!0),a(e,null,o(n(M),(e,t)=>(u(),a(`li`,{key:`${e.type}-${e.id}`,onMousedown:p(t=>B(e),[`prevent`]),onMouseenter:e=>F.value=t,class:d([`flex items-center gap-3 px-4 py-2.5 cursor-pointer text-sm transition-colors`,n(F)===t?`bg-primary-50 dark:bg-primary-900/30`:`hover:bg-gray-50 dark:hover:bg-gray-700/50`])},[s(`span`,b,[e.type===`AUTHOR`?(u(),a(`svg`,x,[...i[2]||=[s(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`},null,-1)]])):(u(),a(`svg`,S,[...i[3]||=[s(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4`},null,-1)]]))]),s(`div`,C,[s(`div`,w,f(e.label),1),e.matchedLevelTitle?(u(),a(`div`,T,f(e.matchedLevelTitle),1)):e.matchedFileName?(u(),a(`div`,E,f(e.matchedFileName),1)):r(``,!0)])],42,y))),128))])):(u(),a(`div`,D,f(t.$t(`nothing_found`)),1))])):r(``,!0)}}),{__name:`ModSearchSuggestionsComponent`});export{O as t};

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.