1import{w as v,a as M,N as m,L as x,z as C,A as E,B as S,H as _,D as p,t as A,j as B,O as F,Y as l,Q as I,K as Q,$ as u,p as z,d as H}from"./index-CIpd-Oln.js";import{u as T,j as s,L as $}from"./index-DB1uCt0m.js";import{A as q}from"./AlertMessage-oHYdO0xR.js";import{G as D}from"./GeneralError-DILTxeZt.js";import{P as G}from"./Paginator-MdNoR6UQ.js";import{S as K}from"./SearchForm-DtKp6lsN.js";import{M as O}from"./MainLayout-BiiwOAO_.js";import{u as j}from"./useTranslation-D9fYHQVN.js";import"./pagination-BkhKLdbt.js";const rs={i18n:["public","zod"]},as=({data:t})=>[{title:t?.title}],es=v(function(){const{t:r}=j("public"),{result:g,params:f,pageSize:y,alertMessage:e}=T(),{phrase:i,page:w,category:L}=f,{data:n=[],pagination:o=void 0}=g||{},N=(a,c,d=100)=>{const b=a.toLowerCase().indexOf(c.toLowerCase()),h=Math.max(0,b-Math.floor((d-c.length)/2)),P=h+d;return a.slice(h,P).replace(new RegExp(c,"gi"),'<span class="!font-bold !text-primary">$&</span>')};return s.jsxs(O,{title:r("search.title"),children:[e&&s.jsx(q,{type:e.type,children:e.message},e.timestamp),s.jsxs(K,{children:[s.jsxs(m,{className:"w-1/3",children:[s.jsx(x,{htmlFor:"search",children:r("search.category")}),s.jsxs(C,{defaultValue:L,name:"category",required:!0,children:[s.jsx(E,{children:s.jsx(S,{})}),s.jsxs(_,{children:[s.jsx(p,{value:"campaign",children:r("search.category.campaign")}),s.jsx(p,{value:"blog",children:r("search.category.blog")})]})]})]}),s.jsxs(m,{className:"w-full",children:[s.jsx(x,{htmlFor:"search",children:r("search.phrase")}),s.jsx(A,{className:"w-full",defaultValue:i,name:"phrase",required:!0,type:"text",variant:"compact"})]})]}),s.jsxs(B,{children:[s.jsx(F,{children:s.jsx(l,{children:s.jsx(I,{children:r("search.result")})})}),s.jsx(Q,{children:!n||n.length===0?s.jsx(l,{children:s.jsx(u,{className:"text-center",colSpan:1,children:r("table.search.empty",{ns:"common"})})}):n.map(a=>s.jsx(l,{children:s.jsxs(u,{children:[s.jsx($,{className:"hover:text-secondary",to:a.url,children:s.jsx(z,{variant:"h4",children:a.title})}),s.jsx(H,{className:"text-gray-400",children:s.jsx("div",{dangerouslySetInnerHTML:{__html:N(a.fts,i)}})})]})},a.id))})]}),o&&s.jsx(G,{currentPage:w,pageSize:y,totalCount:o.total,totalPages:o.pages})]})}),ts=M(function(){const{t:r}=j();return s.jsx(D,{className:"m-10",t:r})});export{ts as ErrorBoundary,es as default,rs as handle,as as meta};
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.