import{s as o,g as n}from"./p-b28405ea.js";import{s as i}from"./p-7ec75b85.js";import"./p-e2e1fe1f.js";const d=()=>n(o.formId,o.mode),l=(i="")=>{var l;return i?o.locks.some((o=>o===i)):!!(null===(l=o.locks)||void 0===l?void 0:l.length)},v=i=>{var l,e;return((null===(e=null===(l=o.checkout)||void 0===l?void 0:l.line_items)||void 0===e?void 0:e.data)||[]).find((o=>{var l,e;return(null===(e=null===(l=null==o?void 0:o.price)||void 0===l?void 0:l.product)||void 0===e?void 0:e.id)===i}))},t=()=>{var i;return"full"===(null===(i=o.checkout)||void 0===i?void 0:i.shipping_address_accuracy_requirement)},u=()=>{var i,l;return"full"===(null===(i=o.checkout)||void 0===i?void 0:i.shipping_address_accuracy_requirement)||"tax"===(null===(l=o.checkout)||void 0===l?void 0:l.shipping_address_accuracy_requirement)},s=i=>{const l=i||o.checkout,e=!1===(null==l?void 0:l.billing_matches_shipping)&&(null==l?void 0:l.billing_address)?l.billing_address:void 0,n=(null==e?void 0:e.line_1)?e:null==l?void 0:l.shipping_address;if(null==n?void 0:n.line_1)return n},r=l=>{var e;const n=l||o.checkout;return(null==n?void 0:n.email)||(null===(e=null==n?void 0:n.customer)||void 0===e?void 0:e.email)||(null==i?void 0:i.email)||void 0},e=i=>{if(!(null==i?void 0:i.line_1))return;const{line_1:o,line_2:l,city:e,state:n,country:d,postal_code:r}=i;return{line1:o,line2:l,city:e,state:n,postal_code:r,country:d}};export{l as a,r as b,d as c,s as d,t as f,v as g,u as s,e as t};