PageSourceSearch

https://www.politico.eu/wp-content/themes/politico/dist/js/politic…cription-form.c8c1119bf8e0e2ba5d41.chunk.js

js politico.eu collected 2026-10-01 06:22:52 UTC 4,882 bytes, 1 lines download raw bytes

1(self.webpackChunkpolitico_theme=self.webpackChunkpolitico_theme||[]).push([[6259],{4484:function(e,t,n){"use strict";var o=n(1083),r=n(5373),i=n.n(r);t.default=()=>{if(!window.Stripe)return;let e="subscribe";document.querySelector("#ev-invoicepayment")&&(e="invoicepayment"),document.querySelector("#ev-renew")&&(e="renewal");const t=document.querySelector('button[type="submit"][name="submit-subscribe"]'),n=document.querySelector(`input[type="checkbox"][name="${e}[send_invoice]"]`),r=document.getElementById("card-errors"),a=window.Stripe(window.stripeData.PublishableKey),l=a.elements().create("card",{hidePostalCode:!0,iconStyle:"solid",style:{base:{iconColor:"#8898AA",color:"#666666",lineHeight:"20px",fontWeight:300,fontFamily:'"Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"16px",":focus":{color:"#000000"},"::placeholder":{color:"#8898AA"}},invalid:{iconColor:"#e85746",color:"#e85746"}},classes:{focus:"is-focused",empty:"is-empty",invalid:"contains-error"}});l.mount("#card-element"),l.addEventListener("change",(e=>(e.error?r.textContent=e.error.message:r.textContent="",!1)));const c=document.querySelector(".vat-number-field").querySelector(".fm-vat_number input"),u=document.querySelector(".fm-billing_country select"),d=document.querySelectorAll('.fm-plan input[type="radio"]'),s=document.querySelector("#subtotal"),m=n=>{const r=document.querySelector('.fm-plan input[type="radio"]:checked');if(!r)return;const a=r.value,l=r.getAttribute("id"),d=document.querySelector(`label[for='${l}']`).textContent,p=/\((.+)\s(.+)\)/.exec(d),y=c.value;let f;const v=u.value,b=u.options[u.selectedIndex].text;if(v&&void 0!==a&&null!=p){f=""!==y&&void 0!==window.stripeData.euCountries[v]&&"Belgium"!==b||void 0===window.stripeData.euCountries[v]?0:a.indexOf("print_online")>-1?.06:.21;const r=parseFloat(p[2]).toFixed(2),l=parseFloat(r*f).toFixed(2),c=(parseFloat(r)+parseFloat(l)).toFixed(2);if(s.querySelector(".plan_price span").textContent=r,s.querySelector(".vat_calculated span").textContent=l,s.querySelector(".total span").textContent=c,"invoicepayment"===e&&(document.querySelector(".fm-plan_price input").value=r,document.querySelector(".fm-plan_tax input").value=l,document.querySelector(".fm-plan_total input").value=c,document.querySelector(".fm-plan_vat_to_charge input").value=100*f+"%"),s.setAttribute("aria-hidden","false"),s.style.display="block",!n||n>3)return s.setAttribute("aria-hidden",!0),void(s.style.display="none");const u=document.getElementById("payment-errors");o.A.post(window.stripeData.ajaxurl,i().stringify({action:"vatrateupdate",plan:a,country:v,vatNumber:y,vat_rate:f,total:c,nonce:window.stripeData.nonce})).then((e=>{e.success||e.data&&e.data.success?(s.setAttribute("aria-hidden","false"),t.disabled=!1,u.textContent=""):n<3?setTimeout((()=>{m(n+1)}),3e3):(s.setAttribute("aria-hidden","true"),t.disabled=!0,u.textContent=window.stripeData.paymentUpdateError)})).catch((e=>{u.textContent=e.message}))}else s.setAttribute("aria-hidden","true")},p=o=>{const i=document.getElementById(o);if(t.disabled=!0,n&&n.checked)i.submit();else{const n={name:document.querySelector(".fm-customer_name input").value,email:document.querySelector(".fm-customer_email input").value,phone:document.querySelector(".fm-phone input").value,address:{city:document.querySelector(".fm-billing_city input").value,country:document.querySelector(".fm-billing_country select").value,line1:document.querySelector(".fm-billing_address input").value,line2:document.querySelector(".fm-billing_address_2 input").value,postal_code:document.querySelector(".fm-billing_postal_code input").value}};a.confirmCardPayment(window.stripeData.PaymentIntentSecret,{payment_method:{card:l,billing_details:n}}).then((n=>{n.error?(r.textContent=n.error.message,window.scrollTo(0,0),t.disabled=!1):document.getElementById(`ev-${e}`).submit()}))}};if(n){const e=document.getElementById("stripe-card-elements"),t=t=>{e.setAttribute("aria-hidden",`${t.target.checked}`)};n.addEventListener("change",t)}const y=["ev-subscribe","ev-renew","ev-invoicepayment"];for(const e of y){const t=document.getElementById(e);t&&t.addEventListener("submit",(t=>{t.preventDefault(),p(e)}))}const f=()=>{m(1)};(()=>{u&&u.addEventListener("change",f),c&&c.addEventListener("blur",f),d.forEach((e=>{e.addEventListener("change",f)}));const t=document.querySelector(`input[type="checkbox"][name="${e}[same_as_billing]"]`);if(t){const e=e=>{if(t.checked){const t=/\[billing_(.*)\]/i,n=e.target.getAttribute("name").match(t);document.querySelector(`.fm-shipping_${n[1]} ${e.target.tagName}
1`).value=document.querySelector(`.fm-billing_${n[1]} ${e.target.tagName}`).value}};document.querySelectorAll(".billing-field input").forEach((t=>{t.addEventListener("keydown",e)}));document.querySelectorAll(".billing-field select").forEach((t=>{t.addEventListener("change",e)}))}})(),m(1)}},2634:function(){}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.