PageSourceSearch

https://onerc.redcross.or.ke/assets/onerc_vmms/frontend/assets/Faq-CO9_szFJ.js

js redcross.or.ke collected 2026-10-02 06:17:20 UTC 4,529 bytes, 2 lines download raw bytes

1import{r as w,b as z,e as m,z as F,l as n,o as a,f as g,i as o,k as L,F as v,p as _,g as s,h as x,ch as S,t as d,w as $,V as q,m as k,n as H,B,c5 as T,G as A}from"./index-DkHxERqz.js";import{_ as N}from"./FormControl.vue_vue_type_script_setup_true_lang-Dc-cNXff.js";import{_ as R}from"./EmptyState-Cg3uhZp2.js";import{s as C}from"./sanitizeHtml-BbWx3ulo.js";import"./form-mfsyIw-y.js";const j={class:"mx-auto max-w-4xl px-4 py-6 md:py-10 space-y-6"},D={key:0,class:"bg-white border border-red-200 rounded-2xl shadow-sm p-6 md:p-8"},Q={class:"flex items-start gap-4"},I={class:"hidden sm:flex items-center justify-center size-12 shrink-0 rounded-full bg-red-50"},K={class:"space-y-2"},E={class:"text-2xl md:text-3xl font-semibold text-red-600"},G={key:0,class:"text-base text-gray-600 leading-6"},O=["innerHTML"],U={class:"space-y-4"},J={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 px-1"},P={class:"text-xl md:text-2xl font-semibold text-gray-800"},W={class:"text-xs font-semibold uppercase tracking-wide text-gray-500 px-1 pt-2"},X={class:"border rounded-2xl bg-white shadow-sm divide-y overflow-hidden"},Y=["aria-expanded","onClick"],Z={class:"font-medium text-gray-800"},ee=["innerHTML"],te={key:1,class:"border rounded-2xl bg-white shadow-sm p-8 text-center"},se={class:"text-gray-700"},ae={key:2,class:"space-y-4"},ue={__name:"Faq",setup(ne){const c=w(""),p=w(new Set),u=z({url:"onerc_vmms.volunteer_and_member_management.api.faq.get_help_content",auto:!0,cache:["helpContent"]}),i=m(()=>{var e;return(e=u.data)==null?void 0:e.about}),h=m(()=>{var e;return((e=u.data)==null?void 0:e.categories)||[]}),f=m(()=>h.value.reduce((e,t)=>e+t.faqs.length,0)),b=m(()=>{const e=c.value.trim().toLowerCase();return e?h.value.map(t=>({category:t.category,faqs:t.faqs.filter(l=>`${l.question} ${V(l.answer)}`.toLowerCase().includes(e))})).filter(t=>t.faqs.length):h.value});function V(e){return(e||"").replace(/<[^>]*>/g," ")}function y(e){return p.value.has(e)}function M(e){const t=new Set(p.value);t.has(e)?t.delete(e):t.add(e),p.value=t}return F({title:"FAQ | Kenya Red Cross VMMS",meta:[{name:"description",content:"Answers to common questions about the Kenya Red Cross Volunteer and Member Management portal, including membership, volunteering, events and deployments."}]}),(e,t)=>(a(),n("div",j,[o(u).error?(a(),g(o(L),{key:0,class:"text-center border rounded-md p-2 border-red-500 bg-red-50 text-sm",message:e.__("Failed to load help content")},null,8,["message"])):o(u).data?(a(),n(v,{key:1},[i.value?(a(),n("section",D,[s("div",Q,[s("div",I,[x(o(S),{class:"size-6 text-red-500"})]),s("div",K,[s("h1",E,d(e.__(i.value.heading)),1),i.value.subheading?(a(),n("p",G,d(e.__(i.value.subheading)),1)):_("",!0)])]),i.value.body?(a(),n("div",{key:0,class:"mt-5 text-gray-700 leading-7 space-y-3 [&_a]:text-red-600 [&_a]:underline [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5",innerHTML:o(C)(i.value.body)},null,8,O)):_("",!0)])):_("",!0),s("section",U,[s("div",J,[s("h2",P,d(e.__("Frequently Asked Questions")),1),f.value?(a(),g(o(N),{key:0,modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=l=>c.value=l),type:"text",placeholder:e.__("Search questions"),class:"w-full sm:w-64"},{prefix:$(()=>[x(o(q),{class:"size-4 text-gray-500"})]),_:1},8,["modelValue","placeholder"])):_("",!0)]),b.value.length?(a(!0),n(v,{key:0},k(b.value,l=>(a(),n("div",{key:l.category,class:"space-y-2"},[s("h3",W,d(e.__(l.category)),1),s("div",X,[(a(!0),n(v,null,k(l.faqs,r=>(a(),n("div",{key:r.name},[s("button",{type:"button","aria-expanded":y(r.name),class:"flex w-full items-center justify-between gap-3 p-4 text-left hover:bg-gray-50 transition duration-150",onClick:oe=>M(r.name)},[s("span",Z,d(r.question),1),x(o(T),{class:B(["size-5 shrink-0 text-gray-500 transition-transform duration-300",{"rotate-180":y(r.name)}])},null,8,["class"])],8,Y),H(s("div",{class:"px-4 pb-4 text-gray-700 leading-7 space-y-3 [&_a]:text-red-600 [&_a]:underline [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5",innerHTML:o(C)(r.answer)},null,8,ee),[[A,y(r.name)]])]))),128))])]))),128)):c.value&&f.value?(a(),n("div",te,[s("p",se,d(e.__("No questions match {0}.").format(`"${c.value}"`)),1)])):(a(),g(R,{key:2,type:e.__("FAQ"),class:"mt-6"},null,8,["type"]))])],64)):(a(),n("div",ae,[...t[1]||(t[1]=[s("div",{class:"h-40 rounded-2xl bg-gray-100 animate-pulse"}
1,null,-1),s("div",{class:"h-64 rounded-2xl bg-gray-100 animate-pulse"},null,-1)])]))]))}};export{ue as default};
2//# sourceMappingURL=Faq-CO9_szFJ.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.