PageSourceSearch

https://www.chemicalguys.com/cdn/shop/t/5/assets/wls-helpers.js?v=63973744814706842241781187923

js chemicalguys.com collected 2026-10-01 11:26:01 UTC 2,797 bytes, 2 lines download raw bytes

1class WLSHelpers{constructor(config){const themeFormat=typeof window<"u"&&window.theme&&window.theme.moneyFormat||"{{amount}}";this._moneyFormat=config&&config.moneyFormat||themeFormat}_createCustomEvent(name,detail,bubbles){try{return new CustomEvent(name,{detail,bubbles})}catch{const evt=document.createEvent("CustomEvent");return evt.initCustomEvent(name,bubbles,!1,detail),evt}}_defaultTo(value,fallback){return value==null||value!==value?fallback:value}_formatWithDelimiters(number,precision,thousands,decimal){if(precision=this._defaultTo(precision,2),thousands=this._defaultTo(thousands,","),decimal=this._defaultTo(decimal,"."),isNaN(number)||number==null)return"0";const isNegative=Number(number)<0,parts=(Math.abs(Number(number))/100).toFixed(precision).split("."),dollars=parts[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+thousands),cents=parts[1]?decimal+parts[1]:"";return(isNegative?"-":"")+dollars+cents}debounce(fn,wait){let t;return function(){const ctx=this,args=arguments;clearTimeout(t),t=setTimeout(function(){fn.apply(ctx,args)},wait)}}triggerEvent(element,name,data){element&&element.dispatchEvent(this._createCustomEvent(name,data||{},!0))}triggerNonBubblingEvent(element,name,data){element&&element.dispatchEvent(this._createCustomEvent(name,data||{},!1))}getGuid(){let d=new Date().getTime(),d2=typeof performance<"u"&&performance&&typeof performance.now=="function"&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){let r=Math.random()*16;return d>0?(r=(d+r)%16|0,d=Math.floor(d/16)):(r=(d2+r)%16|0,d2=Math.floor(d2/16)),(c==="x"?r:r&7|8).toString(16)})}formatMoney(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));const formatString=format||this._moneyFormat||"{{amount}}",placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,match=formatString.match(placeholderRegex);if(!match)return String(formatString);switch(match[1]){case"amount":return formatString.replace(placeholderRegex,this._formatWithDelimiters(cents,2,",","."));case"amount_no_decimals":return formatString.replace(placeholderRegex,this._formatWithDelimiters(cents,0,",","."));case"amount_with_comma_separator":return formatString.replace(placeholderRegex,this._formatWithDelimiters(cents,2,".",","));case"amount_no_decimals_with_comma_separator":return formatString.replace(placeholderRegex,this._formatWithDelimiters(cents,0,".",","));case"amount_with_apostrophe_separator":return formatString.replace(placeholderRegex,this._formatWithDelimiters(cents,2,"'","."));default:return formatString.replace(placeholderRegex,this._formatWithDelimiters(cents,2,",","."))}}setMoneyFormat(moneyFormat){this._moneyFormat=moneyFormat}}window.WLSHelpers=new WLSHelpers;
2//# sourceMappingURL=/cdn/shop/t/5/assets/wls-helpers.js.map?v=63973744814706842241781187923

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.