export const findInput=(e,t)=>{var n,o;const a=null===(o=null===(n=e.querySelector("sc-form"))||void 0===n?void 0:n.shadowRoot)||void 0===o?void 0:o.querySelector("slot");if(a)return a.assignedElements({flatten:!0}).reduce(((e,t)=>e.concat(t,[...t.querySelectorAll("*")])),[]).find((e=>e.name===t))};export const handleInputs=(e,t)=>{["name","email"].forEach((n=>{const o=findInput(e,n);o&&(o.value=t[n])})),Object.keys((null==t?void 0:t.metadata)||{}).forEach((n=>{findInput(e,n).value=t.metadata[n]}))};