1import{d as A,aO as F,aj as y,o as u,c as j,h as C,f as m,v as E,F as V,bu as B,b as d,a6 as x,b3 as D,a4 as S,g as T,l as f,ak as w,bv as N}from"./CMFI55Wc.js";const I=A({__name:"TideSearchFilterDependent",props:{id:{},multiple:{type:Boolean,default:!1},options:{default:()=>[]},variant:{default:"default"},columns:{default:void 0},display:{default:"inline"},levels:{default:()=>[]}},setup(n){const s=n,c=x({}),o=F(Object.fromEntries(Array.from(Array(s.levels.length).keys()).map(l=>[`${s.id}-${l+1}`,[]]))),h=f(()=>s.options.reduce((l,a)=>{let t=a?.parent;return l[t]||(l[t]=[]),l[t].push(a),l},{})),p=f(()=>s.options.filter(l=>!l.parent)),b=l=>(s.options?.filter(t=>Array.isArray(l)?l.includes(t.value):l===t.value)).map(t=>h.value[t.id]).filter(Boolean).flat(),v=(l,a)=>Array.isArray(l)?l.filter(t=>a.some(e=>e.value===t)):a.some(t=>t.value===l)?l:null,$=l=>{const a={},t={};return Object.entries(l).forEach(([e,r])=>{const i=Number(e.match(/\d+$/)?.[0]);i===1?(a[e]=r,t[e]=p.value):(t[e]=b(a[`${s.id}-${i-1}`]),a[e]=v(r,t[e]))}),{options:t,selection:a}};y(c,l=>{const{options:a,selection:t}=$(l);Object.entries(a).forEach(([e,r])=>{o[e]?.length&&(o[e].length=0),r.forEach(i=>o[e].push(i))}),Object.entries(t).forEach(([e,r])=>{let i=!1;Array.isArray(l[e])?i=l[e].filter(O=>!r.includes(O)).length:i=l[e]!==r,i&&w(()=>N(e)?.input(t[e]))})},{deep:!0});const g=f(()=>s.columns?`rpl-col-12 ${s.columns}`:s.display==="block"?"rpl-col-12":"rpl-col-12 rpl-col-6-m");return(l,a)=>{const t=D("FormKit");return u(),j(t,{id:`${n.id}`,key:`${n.id}`,modelValue:d(c),"onUpdate:modelValue":a[0]||(a[0]=e=>B(c)?c.value=e:null),type:"group"},{default:C(()=>[(u(!0),m(V,null,E(n.levels.length,e=>(u(),m("div",{key:`${n.id}-${e}`,class:S(d(g))},[T(t,{id:`${n.id}-${e}`,name:`${n.id}-${e}`,type:"RplFormDropdown",multiple:n.levels?.[e-1]?.multiple??n.multiple,searchable:n.levels?.[e-1]?.searchable,label:n.levels?.[e-1]?.label,placeholder:n.levels?.[e-1]?.placeholder,options:d(o)[`${n.id}-${e}`]||[],disabled:!d(o)[`${n.id}-${e}`]?.length,variant:n.variant,pii:!1},null,8,["id","name","multiple","searchable","label","placeholder","options","disabled","variant"])],2))),128))]),_:1},8,["id","modelValue"])}}}),R=Object.assign(I,{__name:"TideSearchFilterDependent"});export{R 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.