1(()=>{"use strict";var e={428(e){e.exports=window.jQuery}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n](i,i.exports,t),i.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{convertFormToFields:()=>x,extractShippingMethod:()=>u,fieldsToJson:()=>v,getErrorMessage:()=>y,getFieldValue:()=>f,getPage:()=>b,getRestRoute:()=>g,getSetting:()=>d,hasPaymentMethod:()=>P,isFieldRequired:()=>c,isFieldValid:()=>p,isNextActionRequired:()=>w,parseOrderReviewParams:()=>_,parsePrice:()=>S,paymentMethods:()=>a,registerPaymentMethod:()=>O,sanitizeHtml:()=>h,setFieldValue:()=>m,toCents:()=>M});var o=t(428),i=t.n(o);const s=new Map,a={},l=/^(?<index>\d+):(?<id>.+)$/,d=(e,r=null)=>void 0!==window.wcStripeSettings&&window.wcStripeSettings[e]||r,u=e=>{const r=e.match(l);return r?{[r.groups.index]:r.groups.id}:null},c=e=>(d("requiredFields")||[]).includes(e),p=e=>{let r=f(e);return r=r?.trim(),!!r},g=e=>d("restRoutes")?.[e]?.url||null,m=(e,r,t=null)=>{t&&(e=`${t}_${e}`),s.set(e,r),i()(`[name="${e}"]`).length&&i()(`[name="${e}"]`).val(r)},f=(e,r=null)=>(r&&(e=`${r}_${e}`),s.get(e)),h=e=>{const{body:r}=document.implementation.createHTMLDocument("");r.innerHTML=e;const t=r.getElementsByTagName("*");let n=t.length;for(;n--;){const e=t[n];if("SCRIPT"===e.tagName)e.remove();else{let r=e.attributes.length;for(;r--;){const{name:t}=e.attributes[r];0===t.indexOf("on")&&e.removeAttribute(t)}}}return r.innerHTML},y=e=>{if(!e)return d("errorMessages")?.generic;const r=d("errorMessages")||{};return Array.isArray(e)||"string"==typeof e?e:"object"==typeof e?(e.message&&(e.message.indexOf("server_side_confirmation_beta=v1")>-1?e.code="server_side_confirmation_beta":(e.message.indexOf("params.payment_method_data.billing_details.phone")>-1||e.message.indexOf("fields.billing_details.phone")>-1)&&(e.code="phone_required")),e.code&&r[e.code]?r[e.code]:e.message?e.message:JSON.stringify(e)):r.generic||"An error occurred. Please try again."},v=()=>{const e={};return s.forEach((r,t)=>{e[t]=r}),e},w=e=>{if("string"!=typeof e)return!1;let r=e.match(/#response=(.+)/),t=null;return r&&(t=JSON.parse(window.atob(decodeURIComponent(r[1])))),t},_=e=>{if("string"!=typeof e)return!1;let r=e.match(/_stripe_order_review=(.+)/),t=null;return r&&(t=JSON.parse(window.atob(decodeURIComponent(r[1])))),t},b=()=>d("page"),S=e=>{const{thousandSeparator:r=",",decimalSeparator:t="."}=d("currency")||{},n=e=>e.replace(/[\]\\^-]/g,"\\$&"),o=[n(r),n(t)].join("");let i=e.replace(new RegExp(`[^\\d${o}]`,"g"),"");r&&(i=i.split(r).join("")),"."!==t&&(i=i.replace(t,"."));const s=parseFloat(i);return isNaN(s)?null:s},M=e=>{const{minorUnit:r=2}=d("currency")||{};return Math.round(e*Math.pow(10,r))},x=(e,r=[])=>e.serializeArray().reduce((e,t)=>{if(r.includes(t.name))return e;const n=[];t.name.replace(/([^\[\]]*)/g,(e,r)=>{""!==r&&n.push(r)});const o=t.name.endsWith("[]");return n.reduce((e,r,i)=>{var s,a;return i===n.length-1?o?(e[r]=null!==(s=e[r])&&void 0!==s?s:[],e[r].push(t.value)):e[r]=t.value:e[r]=null!==(a=e[r])&&void 0!==a?a:{},e[r]},e),e},{}),O=e=>{a[e.id]=e},P=e=>!!a[e];(this.wcStripe=this.wcStripe||{}).utils=n})(); 2//# sourceMappingURL=utils.js.map
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.