{"version":3,"file":"index.esm-DVjbCxU_.js","sources":["../../node_modules/vue-use-stripe/dist/index.esm.js"],"sourcesContent":["import{ref as u,onMounted as m,onBeforeUnmount as y,defineComponent as S,watchEffect as h,h as b}from\"vue-demi\";var E=Object.assign;const d={base:{color:\"#32325d\",fontFamily:\"Helvetica Neue, Roboto\",fontSmoothing:\"antialiased\",fontSize:\"16px\",\"::placeholder\":{color:\"#aab7c4\"}},invalid:{color:\"#fa755a\",iconColor:\"#fa755a\"}};function w({key:n,elements:r=[],constructorOptions:i,elementsOptions:f}){const l=u(null),o=u(null),a=r.map(()=>u(null)),t=()=>typeof window==\"undefined\"||!window.Stripe?!1:(l.value=window.Stripe(n,i),o.value=l.value.elements(f),r.forEach(({type:e,options:s},c)=>{a[c].value=o.value.create(e,E({style:d},s))}),!0),v=e=>{if(e)try{e.unmount(),e.destroy()}catch(s){}};return m(()=>{if(!t()){let e=0;const s=setInterval(()=>{e++;const c=t();(c||e>10)&&(clearInterval(s),c||console.error(\"Stripe library is not loaded\"))},500)}}),y(()=>{a.forEach(e=>v(e.value))}),{stripe:l,stripeElements:o,elements:a}}const p=[\"change\",\"focus\",\"blur\",\"click\",\"ready\"];var g=S({name:\"StripeElement\",props:{element:{type:Object,default:null}},emits:p,setup(n,{emit:r}){const i=u(null),f=l=>{const[o,...a]=p;for(const t of a)l.on(t,()=>r(t));n.element.on(o,t=>r(o,t))};return m(()=>{h(()=>{if(!n.element)return;f(n.element),n.element.mount(i.value)})}),{domRef:i}},render(){return b(\"div\",{ref:\"domRef\"})}});export{g as StripeElement,d as baseStyle,w as useStripe};\n"],"names":["E","d","w","n","r","i","u","o","a","t","e","s","c","v","m","y","p","g","S","h","b"],"mappings":"mYAAgH,IAAIA,EAAE,OAAO,OAAO,MAAMC,EAAE,CAAC,KAAK,CAAC,MAAM,UAAU,WAAW,yBAAyB,cAAc,cAAc,SAAS,OAAO,gBAAgB,CAAC,MAAM,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,UA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