class t{static createVirtualOptionsFromValues(t,r,e,n,a){if(!t||Array.isArray(t)&&0===t.length)return[];return(Array.isArray(t)?t:[t]).map((t=>{const i=e,u=n||(t=>t?.value||t),s=r.find((r=>{const e=u(r),n=i(r);return String(e)===String(t)||String(n)===String(t)})),c=s?i(s):t;return{value:t,selected:!0,getTextLabel:()=>{if(!a)return c;if("string"==typeof c&&/<[^>]+>/.test(c)){const t=document.createElement("div");return t.innerHTML=c,t.textContent||t.innerText||""}return c},getOptionPrefix:()=>""}}))}static updateDisplayLabel(t,r,e,n){if(e)return r&&0===t.length?"":t.length+" selected";{const r=Array.isArray(n)?n[0]:n;return t[0]?.getTextLabel()?t[0].getTextLabel():r??""}}static updateValue(t,r){return r?t.map((t=>t.value)):t[0]?.value??""}}export{t as V};
