1import{a as p,d as h,au as v,av as g,m as r,l as y,ao as w,B as f,o as I,h as $,Z as B,e as c,G as S}from"./B2JktCjF.js";import{u as N}from"./D_-CvrY5.js";async function A(o,d,e){const s=`${p().public.API_BASE_URL}forms/${o}/fields/${d}/values?filteredBy=${e}`,n=N().get(o,"siteId");return await $fetch(s,{cache:"no-cache",headers:{siteId:n}}).catch(u=>[])}const F=h({__name:"UtilsSelect",props:v({data:{},relationship:{},formID:{},dealerKey:{}},{field:{},fieldModifiers:{}}),emits:["update:field"],setup(o){const{useNiwSelect:d}=p().public,e=o,a=g(o,"field"),s=r(!1),n=r(),u=d?"NiwSelect":"FieldSelect",m=y(()=>({...e.data,options:n.value||e.data.options}));try{if(e.relationship&&e.data.id===e.relationship.relatedField.fieldId){const t=w(e.relationship.fieldId,r(null));f(t,async l=>{if(l===""){a.value="",n.value=[];return}s.value=!0;const i=await A(e.formID,e.data.id,l);s.value=!1,n.value=i,a.value=i.length===1?i[0].value:""})}}catch{}return e.dealerKey===1&&f(()=>e.data,t=>{a.value=t.options.length===1?t.options[0].value:""}),(t,l)=>(I(),$(S(c(u)),B(t.$attrs,{field:a.value,"onUpdate:field":l[0]||(l[0]=i=>a.value=i),data:c(m),loading:c(s)}),null,16,["field","data","loading"]))}});export{F 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.