var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
jQuery(function($){let widgetStates={};let postalCodeInputField=document.getElementById('billing_postcode');if(postalCodeInputField){postalCodeInputField.addEventListener('change',(event)=>{if(SendcloudShippingData){SendcloudShippingData['postal_code']=postalCodeInputField.value;}});}
let $checkoutForm=$('form.checkout');if(0===$checkoutForm.length||!window.renderScShippingOptionModule){return;}
let $selectedShippingMethod,shippingMethodSelectorPrefix,mountElement,deliveryMethod,locale,state,renderedWidgetDestructor;$(document.body).on('updated_checkout',function(){window.renderScShippingOptionModule.then(onCheckoutUpdate);});function onCheckoutUpdate(){if(renderedWidgetDestructor){renderedWidgetDestructor.call();}
$selectedShippingMethod=findSelectedShippingMethod();if(0===$selectedShippingMethod.length){return;}
initShippingMethodSelectorPrefix();let deliveryMethodConfig=$(`#${shippingMethodSelectorPrefix}_delivery_method`).html()||null;mountElement=$(`#${shippingMethodSelectorPrefix}_mount_point`).get(0);deliveryMethod=JSON.parse(deliveryMethodConfig);locale=$(`#${shippingMethodSelectorPrefix}_locale`).val()||'en-US';state=widgetStates[shippingMethodSelectorPrefix];if(mountElement){mountElement.classList.add('sc-delivery-method-mount-point');mountElement.setAttribute('data-sc-delivery-method-type',deliveryMethod.delivery_method_type)}
let descriptionItems=document.getElementsByClassName('sc-delivery-method-description');for(let i=0;i