1if(typeof ShippingNotice!="function"){class ShippingNotice2 extends HTMLElement{constructor(){super(),this.init()}init(){const freeShippingThreshold=Math.round(Number(this.getAttribute("data-free-shipping"))*(Shopify.currency.rate?Number(Shopify.currency.rate):1)),freeShippingRemaining=Number(this.getAttribute("data-cart-total"))-freeShippingThreshold;let cartSliderWidth=0;const shippingTextElement=this.querySelector("[data-js-free-shipping-text]"),currentText=shippingTextElement.innerHTML,isCustomMessage=shippingTextElement.getAttribute("custom-message")==="true";freeShippingRemaining<0?isCustomMessage?(this.querySelector("[data-js-free-shipping-text]").innerHTML=window.KROWN.settings.locales.cart_custom_message.replace("{{amount}}",this._formatMoney(Math.abs(freeShippingRemaining),KROWN.settings.shop_money_format)),cartSliderWidth=100-Math.abs(freeShippingRemaining)*100/freeShippingThreshold):(this.querySelector("[data-js-free-shipping-text]").innerHTML=window.KROWN.settings.locales.shipping_notice_remaining_to_free.replace("{{ remaining_amount }}",this._formatMoney(Math.abs(freeShippingRemaining),KROWN.settings.shop_money_format)),cartSliderWidth=100-Math.abs(freeShippingRemaining)*100/freeShippingThreshold):isCustomMessage&&window.KROWN.settings.locales.cart_custom_message_final?(this.querySelector("[data-js-free-shipping-text]").innerHTML=window.KROWN.settings.locales.cart_custom_message_final,cartSliderWidth=100):(this.querySelector("[data-js-free-shipping-text]").innerHTML=window.KROWN.settings.locales.shipping_notice_eligible_for_free,cartSliderWidth=100),this.querySelector("[data-js-free-shipping-slider]")&&(this.querySelector("[data-js-free-shipping-slider]").style.width=`${cartSliderWidth}%`)}_formatMoney(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));let value="";const placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function formatWithDelimiters(number,precision,thousands,decimal){if(thousands=thousands||",",decimal=decimal||".",isNaN(number)||number===null)return 0;number=(number/100).toFixed(precision);const parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount+KROWN.settings.iso_code}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ");break;case"amount_with_apostrophe_separator":value=formatWithDelimiters(cents,2,"'");break}return formatString.replace(placeholderRegex,value)}}typeof customElements.get("shipping-notice")>"u"&&customElements.define("shipping-notice",ShippingNotice2)} 2//# sourceMappingURL=/cdn/shop/t/9/assets/component-shipping-notice.js.map?v=70198945276931063141744284604
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.