1import{_ as N}from"./bWrleqOO.js";import O from"./_dSpnMod.js";import{r as b}from"./D5Pg5t-Y.js";import{u as U}from"./DuPLz9R7.js";import{d as E,w as k,C as g,l as L,c as d,f as p,n as R,g as l,F as A,r as C,s as j,D as r,a as z,o as i,A as G,t as K,b as Q,_ as W}from"./DawSIRb8.js";import{u as J}from"./Ch65KH0o.js";import"./D7Z5z9fX.js";const X={class:"FaqContentBlock"},Y={class:"grid"},Z={class:"col-8-12 push-2-12 sm-col-1-1 sm-push-0"},ee={class:"faq-wrapper col-8-12 push-2-12 sm-col-1-1 sm-push-0"},te={key:0,class:"filters flex col-1-1 no-p"},se={role:"group","aria-label":"Filter options"},ae=["aria-pressed","onClick"],ne={class:"faq-list flex flex-column col-1-1 no-p"},oe=!1,le=E({__name:"Faq",props:{content:{},breadCrumb:{},settings:{},contentblockIdx:{}},async setup(h){let n,f;const o=h,{forFaq:B}=U(),c=g([]),{data:D}=([n,f]=k(()=>z(`/pages/${b}/filters`)),n=await n,f(),n);c.value=D.value?.filters||[];const _=g(o.content.questionList?.map(e=>e)||[]),u=g(o.content.categoryIds?.map(e=>e._id)||[]),T=r(()=>{if(_.value.length>0)return[];if(u.value.length>0)return u.value.length>0?[u.value[0]]:[];if(u.value.length===0){const e=c.value.find(t=>t.value===1264),a=e?e.options[0]:null;return a?[a.id]:[]}return[]}),V=r(()=>({articles:{presetArticles:_.value,fillWithPageId:_.value.length===0},seo:{changeRoute:!1,changeHead:!1},filters:{enabled:!0,show:!1,multiple:!1,showResetFilters:!1,presetSelectedFilterIds:T.value},search:{enabled:!1,show:!1},pagination:{enabled:!1,show:!1,articlesPerPage:100}})),{filters:P,updateFilterValue:$,articles:F,executeArticles:y}
1=J(b,{...V.value,filterData:c.value,instanceKey:o.contentblockIdx});async function H(e,a){$(e,a),await y()}[n,f]=k(()=>y()),await n,f();const v=g(null);function S(e){o.content.accordion?v.value=v.value===e?null:e:v.value=e}const w=r(()=>{if(u.value.length===0)return c.value.flatMap(t=>t.options);const e=o.content.categoryIds.map(t=>t._id),a=c.value.flatMap(t=>t.options);return e.map(t=>a.find(m=>m.id===t)).filter(Boolean)}),M=r(()=>o.content.showFilters=="true"&&w.value.length>1&&_.value.length===0),q=r(()=>(e,a)=>{const t=P.value[e];return t&&Array.isArray(t.values)?t.values.includes(a):!1}),x=r(()=>(F.value??[]).map(e=>({question:e.content?.question,answer:e.content?.answerText})).filter(e=>!!(e.question&&e.answer)));return L(()=>x.value.length?{script:[{type:"application/ld+json",children:B(x.value)}]}:{}),(e,a)=>{const t=N,m=O;return i(),d("div",X,[p("div",Y,[p("div",Z,[R(t,{class:"heading-2","heading-type":h.content.seoHeadingtype,title:h.content.title},null,8,["heading-type","title"])]),p("div",ee,[l(M)?(i(),d("div",te,[p("div",se,[(i(!0),d(A,null,C(l(w),s=>(i(),d("button",{key:s.id,class:G(["filter-button",{active:l(q)(0,s.id)}]),"aria-pressed":l(q)(0,s.id),onClick:I=>H(0,s.id)},K(s.label),11,ae))),128))])])):j("",!0),p("div",ne,[(i(!0),d(A,null,C(l(F),(s,I)=>(i(),Q(m,{id:s._id,key:`faq-item-${I}`,title:s.content.question,text:s.content.answerText,"is-open":l(v)===s._id,accordion:oe,onToggle:re=>S(s._id)},null,8,["id","title","text","is-open","onToggle"]))),128))])])])])}}}),ve=W(le,[["__scopeId","data-v-336e6c7e"]]);export{ve as default};
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.