From bba972cbc3c182182e34797900e8a8b273ca89dd Mon Sep 17 00:00:00 2001 From: Alex Iglesias Date: Tue, 13 Apr 2021 21:14:16 +0200 Subject: [PATCH] Update mailchimp.js --- dist/mailchimp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/mailchimp.js b/dist/mailchimp.js index 878a202..0f53da9 100644 --- a/dist/mailchimp.js +++ b/dist/mailchimp.js @@ -1 +1 @@ -(()=>{var d=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,c=(e,n)=>{switch(e.type){case"checkbox":n.value=`${e.checked}`;break;case"radio":{let r=e.closest("form"),l=r==null?void 0:r.querySelector(`input[name="${e.name}"]:checked`);l&&(n.value=l.value);break}default:n.value=e.value}};var s=e=>{var i;let n=document.querySelector(e);if(!n)return;let r=n.querySelectorAll('input[type="checkbox"], input[type="radio"], select'),l=new Map;for(let o of r){let t=(i=[...l].find(m=>o.name===m[1].name))==null?void 0:i[1];t||(t=document.createElement("input"),t.type="hidden",t.name=o.name,c(o,t),n.append(t)),o.name=`_${o.name}`,l.set(o,t)}let a=o=>{let t=o.target;if(!d(t))return;let m=l.get(t);!m||c(t,m)};n.addEventListener("input",a)},f=s;})(); +(()=>{var d=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,m=(e,n)=>{switch(e.type){case"checkbox":n.value=`${e.checked}`;break;case"radio":{let r=e.closest("form"),l=r==null?void 0:r.querySelector(`input[name="${e.name}"]:checked`);l&&(n.value=l.value);break}default:n.value=e.value}};var a=e=>{var c;let n=document.querySelector(e);if(!n)return;let r=n.querySelectorAll('input[type="checkbox"], input[type="radio"], select'),l=new Map;for(let o of r){let t=(c=[...l].find(i=>o.name===i[1].name))==null?void 0:c[1];t||(t=document.createElement("input"),t.type="hidden",t.name=o.name,m(o,t),n.append(t)),o.name=`_${o.name}`,l.set(o,t)}let s=o=>{let t=o.target;if(!d(t))return;let i=l.get(t);!i||m(t,i)};n.addEventListener("input",s)},f=a;window.formMirroring={mailchimp:a};})();