1function formatMoney(cents,formatString=theme.moneyFormat){typeof cents=="string"&&(cents=cents.replace(".",""));let value="";const placeholderRegex=/\{\{\s*(\w+)\s*\}\}/;function formatWithDelimiters(number,precision=2,thousands=",",decimal="."){if(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}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}return formatString.replace(placeholderRegex,value)}window.switchDOMContentLoaded=!1,document.addEventListener("DOMContentLoaded",()=>{window.switchDOMContentLoaded=!0}),window.switchOnDOMContentLoaded=cb=>{if(window.switchDOMContentLoaded){cb();return}document.addEventListener("DOMContentLoaded",()=>{cb()})},window.requestIdleCallback=window.requestIdleCallback||function(cb){const start=Date.now();return setTimeout(function(){cb({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-start))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function(id){clearTimeout(id)};function throttle(callback,limit){var waiting=!1;return function(){waiting||(callback.apply(this,arguments),waiting=!0,setTimeout(function(){waiting=!1},limit))}}function objectWithDefaults(defaults,provided){return filterObjectByValues(provided,value=>value==null),Object.assign(defaults,provided)}function wrap(el,tagName="div"){const wrapper=document.createElement(tagName);return el.parentNode.insertBefore(wrapper,el),wrapper.appendChild(el),wrapper}function wrapAll(nodes,wrapper){for(var parent=nodes[0].parentNode,previousSibling=nodes[0].previousSibling,i=0;nodes.length-i;wrapper.firstChild===nodes[0]&&i++)wrapper.appendChild(nodes[i]);return parent.insertBefore(wrapper,previousSibling.nextSibling),wrapper}function unwrap(wrapper){for(var docFrag=document.createDocumentFragment();wrapper.firstChild;){var child=wrapper.removeChild(wrapper.firstChild);docFrag.appendChild(child)}wrapper.parentNode.replaceChild(docFrag,wrapper)}function initTeleport(el){if(!el)return;const teleportCandidates=el.querySelectorAll("[data-should-teleport]");teleportCandidates.length&&teleportCandidates.forEach(teleportCandidate=>{teleportCandidate.setAttribute("x-teleport",teleportCandidate.dataset.shouldTeleport)})}async function fetchSectionHTML(url,selector){const fetchedSection=await(await fetch(url)).text(),result=querySelectorInHTMLString(selector,fetchedSection);return result===null?null:result.innerHTML}function fetchConfigDefaults(acceptHeader="application/json"){return{method:"POST",credentials:"same-origin",headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json;",Accept:acceptHeader}}}function parseDOMFromString(htmlString){return window.___shapesDOMParser=window.___shapesDOMParser||new DOMParser,window.___shapesDOMParser.parseFromString(htmlString,"text/html")}function querySelectorInHTMLString(selector,htmlString){return parseDOMFromString(htmlString).querySelector(selector)}window.__fetchCache=window.__fetchCache||{};const RESPONSE_TYPE_JSON=0,RESPONSE_TYPE_TEXT=1;async function fetchAndCache(url,options,cacheTimeout=5e3,forceFresh=!1,responseType){if(__fetchCache[url]&&!forceFresh)return __fetchCache[url];const responseReader=responseType===RESPONSE_TYPE_TEXT?Response.prototype.text:Response.prototype.json,res=await fetch(url,options),data=responseReader.call(res);return cacheTimeout&&cacheTimeout>0&&(__fetchCache[url]=data,setTimeout(()=>{delete __fetchCache[url]},cacheTimeout)),data}async function fetchHTML(url,options,cacheTimeout=5e3,forceFresh=!1){return fetchAndCache(url,options,cacheTimeout,forceFresh,RESPONSE_TYPE_TEXT)}function freshHTML(url,options){return fetchHTML(url,options,0,!0)}async function fetchJSON(url,options,cacheTimeout=5e3,forceFresh=!1){return fetchAndCache(url,options,cacheTimeout,forceFresh,RESPONSE_TYPE_JSON)}function freshJSON(url,options){return fetchJSON(url,options,0,!0)}async function fetchHTMLFragment(url,selector,forceFresh=!1){const fetchedHTMLString=forceFresh?await freshHTML(url):await fetchHTML(url),fragment=querySelectorInHTMLString(selector,fetchedHTMLString);return fragment?fragment.innerHTML:""}function mdBreakpointMQL(){return window.matchMedia("(min-width: 768px)")}function isMdBreakpoint(){return window.mdBreakpointMQL().matches}function maxLgBreakpointMQL(){return window.matchMedia("(max-width: 989px)")}function isMaxLgBreakpoint(){return window.maxLgBreakpointMQL().matches}
1function lgBreakpointMQL(){return window.matchMedia("(min-width: 990px)")}function isLgBreakpoint(){return window.lgBreakpointMQL().matches}function motionSafeMQL(){return window.matchMedia("(prefers-reduced-motion)")}function isMotionSafe(){return!window.motionSafeMQL().matches}function kebabCase(subject){return[" ","_"].includes(subject)?subject:subject.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function clearURLSearchParams(url){for(const key of[...url.searchParams.keys()])url.searchParams.delete(key)}function _getURLByModifyingParams(urlString,paramsInput,clear=!1,append){const url=new URL(urlString,window.location.origin);clear&&clearURLSearchParams(url);const params=new URLSearchParams(paramsInput),setOrAppendParam=append?URLSearchParams.prototype.append:URLSearchParams.prototype.set;for(const[key,value]of params)setOrAppendParam.call(url.searchParams,key,value);return url}function getURLWithParams(url,paramsInput,clear=!1){return _getURLByModifyingParams(url,paramsInput,clear,!1)}function currentURLWithParams(paramsInput,clear=!1){return getURLWithParams(window.location.href,paramsInput,clear)}function getURLAddingParams(url,paramsInput,clear=!1){return _getURLByModifyingParams(url,paramsInput,clear,!0)}function currentURLAddingParams(paramsInput,clear=!1){return getURLAddingParams(window.location.href,paramsInput,clear)}function iFrameCommand(iFrameEl,commandString){!iFrameEl||!commandString||iFrameEl.contentWindow.postMessage(JSON.stringify({event:"command",func:commandString,args:""}),"*")}function iFrameMethod(iFrameEl,methodString){!iFrameEl||!methodString||iFrameEl.contentWindow.postMessage(JSON.stringify({method:methodString}),"*")}let touchDevice=!1;window.setTouch=function(){touchDevice=!0},window.isTouch=function(){return touchDevice};function getModalLabel(modalSlotName,slotEl){const modal=Alpine.store("modals")[modalSlotName];if(modal&&modal.open){const labelSourceEl=Array.from(slotEl.children).filter(el=>el.hasAttribute("data-modal-label"))[0];if(labelSourceEl)return labelSourceEl.dataset.modalLabel}return!1}function capitalize(string){return string.charAt(0).toUpperCase()+string.slice(1)}function asyncTimeout(ms){return new Promise(resolve=>{setTimeout(resolve,ms)})}function getSectionId(el){return el._closestSectionId||(el._closestSectionId=el.closest(".shopify-section").getAttribute("id").replace("shopify-section-","")),el._closestSectionId}function daysInMs(days){return days*24*60*60*1e3}function msInDays(ms){return ms/1e3/60/60/24}function isInTheFuture(msSinceEpoch){return msSinceEpoch>Date.now()}function setExpiringStorageItem(key,value,expiresIn){localStorage.setItem(key,JSON.stringify({value,expires:Date.now()+expiresIn}))}function getExpiringStorageItem(key){const value=localStorage.getItem(key);if(!value)return null;let valueObject;try{valueObject=JSON.parse(value)}catch{}return valueObject&&valueObject.expires?isInTheFuture(valueObject.expires)?valueObject.value:(localStorage.removeItem(key),null):null} 2//# sourceMappingURL=/cdn/shop/t/40/assets/utils.js.map?v=32068786680498309641786380582
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.