!function(){const e=1,t=3;function n(e,t,n={}){const{findAll:r=!1,deep:o=!0,textNodes:i=!1}=n;if(!e)return r?[]:null;const a=e.host&&e.mode;return function n(i){if(a&&i===e){const e=r?Array.from(i.querySelectorAll(t)):i.querySelector(t);if(r?e.length>0:e)return e;if(o){const e=i.querySelectorAll("*");for(const t of e){const e=n(t);if(r?e&&e.length>0:e)return e}}return r?[]:null}if(i.shadowRoot){const e=r?Array.from(i.shadowRoot.querySelectorAll(t)):i.shadowRoot.querySelector(t);if(r?e.length>0:e)return e;if(o){const e=i.shadowRoot.querySelectorAll("*");for(const t of e){const e=n(t);if(r?e&&e.length>0:e)return e}}}if(o){const e=i.children;for(let t of e){const e=n(t);if(r?e&&e.length>0:e)return e}}return r?[]:null}(e)}const r=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r{const n=g[e],r=n?.data?.type;if(n?.[t]?.content&&(y.hasContentTests=!0),n?.[t]?.customCode&&(y.hasCustomCodeTests=!0),"PRODUCT_GROUP"===r){let e=[];const r=n[t],o=r?.groupVariationId;for(const t in n)"data"!==t&&n[t]?.groupVariationId===o&&e.push(n[t]);const i=n?.data?.defaultVariants;return e=e.map((e=>({...e,handles:[e.originalProductHandle],defaultVariants:i}))),e}{const n=g[e]?.[t],r=g[e]?.data?.defaultVariants,o=g[e]?.data?.handles,i=g[e]?.data?.variantIds,a=g[e]?.data?.settings?.includeRecharge;return{...n,handles:o,defaultVariants:r,variantIds:i,includeRecharge:a}}})).filter((e=>e&&e.handles)),A=_.every((e=>e.isControl)),v=[],S=[],w=[],C=[];if(b.forEach((([e,t])=>{const n=g[e],r=n?.[t]?.content,o=n?.[t]?.customCode;(o?.js||o?.css)&&v.push(o),r?.changes?.length>0&&S.push(...r.changes),r?.elements?.length>0&&w.push(...r.elements),r?.blocks?.length>0&&C.push(...r.blocks)})),A&&0===S.length&&0===w.length&&0===C.length&&0===v.length)return;function E(e,t={}){return new Promise(((n,r)=>{if(t.id){const e=document.querySelector(`script#${t.id}`);if(e)return void n(e)}const o=document.createElement("script");o.src=e,t.async&&(o.async=!0),t.defer&&(o.defer=!0),t.id&&(o.id=t.id),o.onload=e=>{"function"==typeof t.onload&&t.onload(e),n(o)},o.onerror=()=>r(new Error(`Failed to load script: ${e}`)),document.head.appendChild(o)}))}let $=!1;!async function(){if(C.length<1)return;try{await E("https://ds0wlyksfn0sb.cloudfront.net/preact-bundle.js",{async:!0,id:"eab-renderer",onload:()=>{$=!0}}),C.forEach((e=>{E(e.url,{id:`eab-bl-r-${e.id}`})}))}catch(e){console.error("Error loading scripts:",e)}}();const q="elv-bl-",T={},k=(e,t)=>{T[e]||(T[e]=[]),T[e].push(t)},I=e=>{const t=T[e];t&&t.length>0&&(t.forEach((e=>e())),delete T[e])},N=async e=>{let t=document.querySelector(e);if(!t&&e.startsWith("#elv-el-")){const n=e.substring(1).split(/[^a-zA-Z0-9_-]/)[0];await new Promise(((e,t)=>{k(n,(()=>{e(null),setTimeout(t,1500)}))})),t=document.querySelector(e)}if(!t&&e.startsWith(`#${q}`)){const n=e.substring(1).split(/[^a-zA-Z0-9_-]/)[0];await new Promise(((e,t)=>{k(n,(()=>{e(null),setTimeout(t,1500)}))})),t=document.querySelector(e)}return t},P=t=>t.nodeType===e,x=window.Shopify?.currency.active??_?.[0]?.prices?.[_[0]?.defaultVariant]?.main??"USD",O=()=>window.innerWidth<768,R=(e,t)=>{L[e]||(L[e]=t.cloneNode(!0))};let j=O(),L={},M=null;const F=new MutationObserver(ne);function V(){s&&p||(F.disconnect(),F.takeRecords(),F.observe(document,{attributes:!0,attributeFilter:["id","class","value","data-product-id","data-product-handle","data-variant-id","product-id","handle","href","action","data-product-price","data-product-price-element","data-add-to-cart-price-text"],childList:!0,subtree:!0}))}function B(){F.disconnect(),F.takeRecords()}function D(e){return`${e.type}|${e.target.nodeName}|${e.target.id}|${e.target.className}|${e.target.textContent?.trim()?.substring(0,50)}|${e.addedNodes.length}|${e.removedNodes.length}|${e.attributeName}|${e.target.attributes?.[e.attributeName]?.value}`}const U=(e,t)=>(Array.isArray(t)?t:[t]).reduce(((t,n)=>{if(n?.multiple){const r=e.querySelectorAll(n.selector);return t.concat(Array.from(r).map((e=>({element:e,multiple:!0,node:n?.node??null}))))}{const r="object"==typeof n?n.selector:n,o=e.querySelector(r);return o&&t.push({element:o,multiple:!1,node:n?.node??null}),t}}),[]),W=(e,t,n)=>{let r=n?t.compareAt:t.price;const o=e.variantId;return o&&(r?.selector?r.selector=r.selector.replaceAll("{{variant}}",o):"string"==typeof r&&(r=r.replaceAll("{{variant}}",o))),U(e.element,r)},G=(e,t,n,r={node:void 0},{isComparePrice:o,quantity:i}={isComparePrice:!1,quantity:null})=>{if(!e||!t)return;const a=n.prices;let c=o?a?.[t]?.compare?.[x]:a?.[t]?.price?.[x];null!==c&&(o&&0===Number(c)?e.style.display="none":(o&&Number(c)>0&&(e.style.display=""),i&&(c=(c*i).toFixed(2)),ce(e,c,r.node)))},Z=(e,t,n)=>{let r=[];const o=e.container.replace(/\{\{handle\}\}/g,n),i=e.container.replace(/\{\{handle\}\}/g,encodeURIComponent(n)),a=document.querySelectorAll(`${o}, ${i}`);return r=Array.from(a).map((r=>{if(e.form){const o="object"==typeof e.form,i={selector:o?e.form.selector:e.form,variantIdField:e.variantIdField??"id",fallbackDefaultVariantId:!1};o&&Object.assign(i,e.form);const a=r.querySelector(i.selector.replace(/\{\{handle\}\}/g,n));if(!a)return null;{let e=new FormData(a).get(i.variantIdField);!e&&i.fallbackDefaultVariantId&&(e=t.defaultVariants[n]);const r=t?.variantIds?.includes(e);if(!r)return null}}return{element:r}})).filter(Boolean),r},H=()=>{function e(e,t){if(!e||!t)return!1;if(!t.startsWith(e))return!1;const n=t.slice(e.length);return/(_(small|compact|medium|large|grande|\d+x\d*|\d+x\d+(_crop_(center|top|bottom))?|pico|icon|thumb|default|master))?(\.(jpg|jpeg|png|gif|webp))?$/.test(n)}const t=e=>`img[srcset*="/${e}"]`,n=e=>{const t=window.getComputedStyle(e).backgroundImage;if(t&&"none"!==t){const e=t.match(/url\(['"]?(.*?)['"]?\)/);return e?e[1]:null}return null},r=(e,t)=>{e.style.backgroundImage=`url('${t}')`,e.ab_bg_updated=!0};function o(e){const t=e.match(/\/([^\/]+)(?=\.[^\/]+$)/);return t?.[1]||null}const i=(e,t)=>{try{const n=new URL(e,location.origin),r=new RegExp(`${t}([_-].*?)?(\\.\\w+)(?:\\?|$)`),o=n.pathname.match(r);return o&&o[1]?o[1]:""}catch(e){console.error("extractAdditionalParams: ",e)}},a=e=>{try{const t=new URL(e,location.origin),n=new URLSearchParams(t.search),r={};for(const[e,t]of n.entries())r[e]=t;return r}catch(e){console.error("getSearchParams: ",e)}};for(const s of oe(c))for(const c of _)if(!c.isControl&&c.images)for(const l of c.handles){if(s.pathname&&"*"!==s.pathname&&!window.location.pathname.endsWith(s.pathname.replace("{{handle}}",l)))continue;const u=Z(s,c,l);for(const d of u){if(!d.element)continue;const u=c.images.some((e=>!e.handle))?c.images:c.images.filter((e=>e.handle===l));for(const{newFilename:c,originalFilename:l,newSrc:p}of u){if(s.checkBgImage){d.element.querySelectorAll('[style*="background-image"]').forEach((t=>{if(t.ab_bg_updated)return;const s=n(t);if(!s)return;const u=o(s);if(!e(l,u))return;const d=i(s,l),f=a(s);delete f.v;const m=Object.entries(f).map((([e,t])=>`${e}=${t}`)).join("&"),h=p.replace(c,c+d);if(!h)return;const g=new URL(h,location.origin),y=g.search.startsWith("?")?`${g.href}&${m}`:`${g.href}?${m}`;r(t,y)}))}d.element.querySelectorAll(`img[src*="/${l}"]`).forEach((t=>{if(t.ab_src_updated)return;const n=t.getAttribute("src"),r=o(n);if(!e(l,r))return;const s=i(n,l),u=a(n);delete u.v;const d=Object.entries(u).map((([e,t])=>`${e}=${t}`)).join("&"),f=p.replace(c,c+s);if(!f)return;const m=new URL(f,location.origin),h=m.search.startsWith("?")?`${m.href}&${d}`:`${m.href}?${d}`;t.setAttribute("src",h),t.ab_src_updated=!0}));d.element.querySelectorAll(t(l)).forEach((t=>{if(t.ab_srcset_updated)return;const n=t.getAttribute("srcset").split(",").map((t=>{const[n,r]=t.trimStart().split(" "),s=o(n);if(!e(l,s))return;const u=i(n,l),d=a(n);delete d.v;const f=Object.entries(d).map((([e,t])=>`${e}=${t}`)).join("&"),m=p.replace(c,c+u),h=new URL(m,location.origin);return[h.search.startsWith("?")?`${h.href}&${f}`:`${h.href}?${f}`,r].join(" ")}));t.setAttribute("srcset",n.join(",")),t.ab_srcset_updated=!0}))}}}},J=(()=>{let e;return()=>{e&&clearTimeout(e),e=setTimeout((()=>{z(),e=null}),1)}})(),z=()=>{const e=new Map,r=new Map,o=new Set;_.forEach((t=>{t.isControl||(t.handles.forEach((n=>{e.set(n,t),o.add(n)})),t.prices&&Object.keys(t.prices).forEach((e=>{r.set(e,t)})))}));const i=window.location.pathname,a=[],s=new Map;if(oe(c).forEach((t=>{if(t.pathname&&"*"!==t.pathname&&!t.pathname.includes("{{handle}}")&&!i.endsWith(t.pathname))return;let n=[];if(t.pathname&&"*"!==t.pathname&&t.pathname.includes("{{handle}}")){if(n=Array.from(o).filter((e=>{const n=t.pathname.replace("{{handle}}",e);return i.endsWith(n)})),0===n.length)return}else n=Array.from(o);t.container&&t.container.includes("{{variant}}")?Array.from(r.keys()).forEach((e=>{const n=r.get(e);if(n.isControl&&!t?.plugin?.includeControl)return;const o=t.container.replace(/\{\{variant\}\}/g,e);s.set(o,{selector:t,variantId:e,variant:n,isVariantIdSelector:!0}),a.push(o)})):n.forEach((n=>{const r=e.get(n);if(r.isControl&&!t?.plugin?.includeControl)return;const o=t.container.replace(/\{\{handle\}\}/g,n),i=t.container.replace(/\{\{handle\}\}/g,encodeURIComponent(n));s.set(o,{selector:t,handle:n,variant:r}),s.set(i,{selector:t,handle:n,variant:r}),a.push(o,i)}))})),0===a.length)return;const l=[...new Set(a)].join(", ");Array.from(document.querySelectorAll(l)).forEach((e=>{if(!e)return;const o=a.find((t=>e.matches(t)));if(!o)return;const{selector:i,handle:c,variant:l,isVariantIdSelector:u,variantId:d}=s.get(o);let p=null,f=null;if(u)p=d;else if(i.form){const t="object"==typeof i.form?i.form:{selector:i.form},n=t.selector.replace(/\{\{handle\}\}/g,c),r=t.variantIdField??"id",o=t.multiplyPriceByQuantity??!1,a=e.querySelector(n);a&&(p=new FormData(a).get(r),o&&(f=new FormData(a).get("quantity")),!p&&t.fallbackDefaultVariantId&&(p=l?.defaultVariants?.[c]))}else p=l?.defaultVariants?.[c];if(!p)return;const m=r.get(p);if(!m)return;const h={element:e,variantId:p},g=i?.plugin?function(e){const r={kaching:{name:"kaching",apply:function(e,t,n,r){try{const n=e.variantId,r=document.querySelectorAll(".kaching-bundles__bar");if(!r?.length)return;const o=document.querySelector("[deal-block]").getAttribute("deal-block"),i=JSON.parse(o),a=document.querySelector("[deal-block]").getAttribute("config"),c=JSON.parse(a),s={enabled:i.priceRounding,precision:i.priceRoundingPrecision},l=({bundleInfo:e,price:t})=>{if(!t)return null;const n=e.quantity||1;let r=e.discountValue||0;const o=e.discountType;let i=t*n;if(r&&"percentage"===o&&(i*=1-r/100),r&&"amount"===o&&(i-=r*(c?.currencyRate||1)),s&&s.enabled){const e=parseInt(s.precision.replace(".",""))||2,t=Math.pow(10,e);i=Math.round(i*t)/t}return i?Number(i).toFixed(2):null};r.forEach((r=>{const o=r.getAttribute("data-deal-bar-id"),a=i.dealBars.find((e=>e.id===o));if(a)if("quantity-break"===a.dealBarType){const e=r.querySelector(".kaching-bundles__bar-price");if(!e)return;const o=t.prices?.[n]?.price?.[x];ce(e,l({bundleInfo:a,price:o}))}else if(a.bundleProducts?.length>0){let n=0;if(r.querySelectorAll(".kaching-bundles__bundle-products__product").forEach(((r,o)=>{const i=a.bundleProducts[o];let c=i?.variantGID?i?.variantGID?.split("/")?.pop():null;c||"default"!==i.productGID||(c=e.variantId);const s=t.prices?.[c]?.price?.[x];if(!s){const e=r.querySelector(".kaching-bundles__bundle-products__price").textContent.trim().match(/(\d+[,. ])*\d+([,.]?\d+)?/);if(!e)return;let t=e[0];t.includes(",")&&!t.includes(".")?t=t.replace(",","."):t.includes(",")&&t.includes(".")&&(t=t.replace(/\./g,"").replace(",","."));const o=parseFloat(t.replace(/\s/g,""));return void(n+=Number(o))}const u=l({bundleInfo:i,price:s});if(!u)return;const d=r.querySelector(".kaching-bundles__bundle-products__price");n+=Number(u),ce(d,u)})),n>0){const e=r.querySelector(".kaching-bundles__bar-price");n=n?.toFixed(2),ce(e,n)}}}))}catch(e){console.error("Kaching plugin error:",e)}}},variant_bundles:{name:"variant_bundles",apply:function(e,t,n,r){try{const n=r.container,o=r.variantKey;document.querySelectorAll(n).forEach((n=>{const i=n.getAttribute(o||"data-variant-id"),a=t.prices?.[i]?.price?.[x],c=t.prices?.[i]?.compare?.[x];if(a&&!r.priceIncludesQuantity){const e=r.price;ce(n.querySelector(e?`${e}, .variant-prices .final-price, .block_with_info-v3__prices .block_with_info-v3__discounted-price`:".variant-prices .final-price, .block_with_info-v3__prices .block_with_info-v3__discounted-price"),a)}if(c){const e=r.compareAt;ce(n.querySelector(e?`${e}, .variant-prices .compare-at, .block_with_info-v3__prices .block_with_info-v3__original-price s`:".variant-prices .compare-at, .block_with_info-v3__prices .block_with_info-v3__original-price s"),c)}const s=r.quantityText?n.querySelector(r.quantityText):null,l=r.quantityKey,u=s?s?.getAttribute(l):n.getAttribute("data-variant-title")||n.getAttribute("data-limit"),d=u?.match(/\d+/),p=d?.[0]?parseInt(d[0]):null;if(p){const t=Number((a/p).toFixed(2)),o=r.quantity,c=o?n.querySelector(o):n.querySelector(".price-per-unit")||n.querySelector(".block_with_info-v3__price-per-item p span:nth-child(2)"),s=r.externalQuantity.replace("{{variant}}",i),l=s?e.element.querySelectorAll(s):null;l&&l.forEach((e=>{ce(e,t)})),c&&ce(c,t)}const f=r.saving,m=n.querySelector(f?`${f}, .block_with_info-v3__savings`:".block_with_info-v3__savings");m&&ce(m,c-a)}))}catch(e){console.error("variant bundles plugin error:",e)}}},bundle_selector:{name:"bundle_selector",apply:function(e,t,n,r){try{const r=n?.plugin?.container,o=e.element.querySelector(r);if(!o)return;o.querySelectorAll(".radio__button").forEach((e=>{const n=e.getAttribute("data-variant-id"),r=e.querySelector("#pricebundle"),o=e.querySelector("#bundletitle");if(!r||!n||!o)return;const i=t.prices?.[n]?.price?.[x];i&&ce(r,(i/((o.textContent.trim().match(/\d+/g)||[]).reduce(((e,t)=>e+parseInt(t)),0)||1)).toFixed(2))}))}catch(e){console.error("Bundle selector plugin error:",e)}}},price_variant_bundle:{name:"price_variant_bundle",apply:function(e,t,n,r){let o=0,i=0,a=!1,c=!1;const s=e.element.querySelector(n.plugin.addOnIdSelector);if(s){const r=s?.getAttribute("value"),l=e.element?.querySelector(n?.plugin?.addOnPriceSelector?.replace("{{addOnId}}",r));if(!l&&!n?.plugin?.addOnPriceAttribute)return;if(o=t.prices?.[r]?.price?.[x],i=t.prices?.[r]?.compare?.[x],o&&(a=!0),i&&(c=!0),!o)if(n?.plugin?.addOnPriceAttribute){const e=s?.getAttribute(n?.plugin?.addOnPriceAttribute);o=Number(e)}else{const e=l?.getAttribute("data-price");o=Number(e)/100}if(!i)if(n?.plugin?.addOnCompareAttribute){const e=s?.getAttribute(n?.plugin?.addOnCompareAttribute);i=Number(e)}else{const e=l?.getAttribute("data-compare-price");i=Number(e)/100}}const l=e.element.querySelector(".radio-wrapper[data-option-index='option-1'] .field_set-optionList .mrk-selected-size");let u=l?.getAttribute("data-id");if(n?.plugin?.useForm){const t=e.element.querySelector("form[action='/cart/add']");u=new FormData(t).get("id")}if(!u)return;let d=t.prices?.[u]?.price?.[x],p=t.prices?.[u]?.compare?.[x];if(d)a=!0;else{const e=l.getAttribute("data-price");d=Number(e)/100}if(p)c=!0;else{const e=l.getAttribute("data-compare-price");p=Number(e)/100}if(!a)return;const f=Number(d)+Number(o),m=Number(p)+Number(i),h=e.element.querySelectorAll("#ProductPrice .money, .btn--add-to-cart .mian-product_price, .price_datta .ori_price, .price ins span"),g=e.element.querySelectorAll("#ComparePrice .money, .compare-product_price, .price del span");if(h&&g){if(h.forEach((e=>{if(e.classList.contains("mian-product_price")){const t=e.querySelector(".compare-product_price");if(t){const e=t.nextSibling;e&&3===e.nodeType&&ce(e,f)}}else ce(e,f)})),n?.plugin?.saveBadgeSelector){const t=e.element.querySelectorAll(n?.plugin?.saveBadgeSelector),r=Math.round(100-f/m*100);t.forEach((e=>{ce(e,r)}))}g.forEach((e=>{c&&ce(e,m)}))}}},recharge:{name:"recharge",apply:function(e,r,o,i){try{const o=(e,n,r=null)=>{if(!e)return!1;const o=Array.from(e.childNodes).filter((e=>e.nodeType===t));if(0===o.length)return!1;let i=null;for(const e of o)if(/\$?\d+(\.\d+)?/.test(e.textContent)){i=e;break}if(!i){const e=o.filter((e=>e.textContent.trim().length>0));e.length>0?i=e.sort(((e,t)=>t.textContent.trim().length-e.textContent.trim().length))[0]:o.length>0&&(i=o[o.length-1])}if(!i)return!1;if(r)i.textContent=r;else if(n){const e=i.textContent,t=ae(e,100*n);i.textContent=ie(e,t)}return!0},a=e.variantId,c=r?.includeRecharge;if(!a)return;const s=r.prices?.[a]?.price?.[x];if(!s)return;const l=()=>{const t=".rc-selection__onetime .rc-price"+(i?.priceElements?`, ${i.priceElements}`:"");return n(e.element,t,{findAll:!0,deep:!0})},u=(e,t)=>{if(!e||!e.shadowRoot)return;const r=i.subPriceSelector,a=i.percentOffSelectors,c=i.crossedOutPriceSelector;if(!a||!r)return;const s=n(e,r);if(!s)return;const l=n(e,c);l&&(o(l,t)||ce(l,t));const u=Array.isArray(a)?a:[a];e._updatePercentOffTimeout&&clearTimeout(e._updatePercentOffTimeout),e._updatePercentOffTimeout=setTimeout((()=>{const r=Number(t),o=parseFloat(s.textContent.replace(/[^0-9.]/g,""));if(!isNaN(r)&&!isNaN(o)&&r>0){const t=Math.round((r-o)/r*100);if(t<0||!t)return;u.forEach((r=>{const o=n(e,r?.element||r,{findAll:r?.updateAll||!1});o&&(Array.isArray(o)?o:[o]).forEach((e=>{const n=e.textContent.replace(/\d+%/,`${t}%`);e.textContent=n}))}))}}),200)},d=l();if(d&&d.length>0){d.forEach((e=>{const t=Array.from(e.childNodes),n=t.find((e=>8===e.nodeType)),r=t.find((e=>3===e.nodeType&&e.textContent.trim().match(/\$\d+/)));if(n&&r){const e=ae(r.textContent,100*s);r.textContent=ie(r.textContent,e)}else o(e,s)||ce(e,s)}));const t=e.element.querySelector(i.container);c||u(t,s)}if(c){const t=e.element.querySelector(i.container);if(!t||!t.shadowRoot)return;const r=i.percentOffSelectors;if(!r)return;const a=Array.isArray(r)?r:[r];let c=null;for(const e of a){const r=n(t,e?.element||e,{findAll:e?.updateAll||!1});if(r&&(c=Array.isArray(r)?r[0]:r,c))break}if(!c)return;const l=c.textContent.match(/(\d+)%/);if(!l)return;const u=parseInt(l[1],10);if(isNaN(u)||u<=0)return;const d=s*(1-u/100),p=i.subPriceSelector;if(!p)return;const f=n(t,p);if(!f)return;o(f,d)||ce(f,d)}}catch(e){console.error("Recharge plugin error:",e)}}}};return r[e]||null}(i.plugin?.name):void 0;if(!g||!g.runBefore&&g.runAfter||g.apply(h,l,i,i.plugin?.context),i.price&&!i?.plugin?.ignoreMainPrice){W({element:e,variantId:p},i,!1).forEach((e=>{G(e.element,p,m,e,{isComparePrice:!1,quantity:f})}))}if(i.compareAt&&!i?.plugin?.ignoreComparePrice){W({element:e,variantId:p},i,!0).forEach((e=>{G(e.element,p,m,e,{isComparePrice:!0,quantity:f})}))}if(i.saving&&!i?.plugin?.ignoreSavings){const t=(e=>{const t=typeof e;return["object","string"].includes(t)?"string"===t?[e]:Array.isArray(e.selector)?e.selector:[e.selector]:[]})(i.saving);e.querySelectorAll(t).forEach((e=>{if(!e)return;let t=((e,t,n)=>{const r=e.prices?.[t];let o=null;const i=Number(r?.price?.[x]),a=Number(r?.compare?.[x]);return isNaN(i)||isNaN(a)||0===a?null:(o=n?.isPercentage?100-100*i/a:a-i,o)})(m,p,i.saving);null!==t&&(f&&(t=(t*f).toFixed(2)),((e,t)=>{e&&ce(e,t)})(e,Math.floor(t)))}))}if(i.remove&&!i?.plugin?.ignoreRemoving){U(e,i.remove).forEach((e=>{((e,t)=>{if(e)if("number"==typeof t){const n=e?.childNodes?.[t];if(!n)return;e.removeChild(n)}else e.remove()})(e.element,e.node)}))}g&&g.runAfter&&g.apply(e,m,i,i.plugin?.context)}))};function K(e,t){if(t.startsWith("*")&&t.endsWith("*")){const n=t.slice(1,-1);return e.includes(n)}if(t.startsWith("*")){const n=t.slice(1);return e.endsWith(n)}return t===e||"*"===t}const Q=()=>{const e=location.pathname,n=S.filter((t=>!t?.pathnames?.length||t.pathnames.some((t=>K(e,t)))));j=O();const r=n.map((e=>({...e,...e.style&&{style:{...e.style.lg,...j&&e.style.sm}},...e.content&&{content:j&&e.content.sm?e.content.sm:e.content.lg}}))),o=[],i=[],a=[],c=[];for(const e of r)"content"in e&&o.push(e),"style"in e&&i.push(e),"attributes"in e&&(e.attributes["data-section-order"]?c.push(e):a.push(e));(e=>{if(e.length>0){const t=e.map((e=>e.split(",")[0].replaceAll("'","").replaceAll(" ","+"))).join("|");if(document.head.ab_appended_google_fonts===t)return;let n=document.head.ab_google_fonts_link;if(!n){const e=document.createElement("link");e.rel="preconnect",e.href="https://fonts.googleapis.com",document.head.appendChild(e),n=document.createElement("link"),n.rel="stylesheet",document.head.appendChild(n)}n.href=`https://fonts.googleapis.com/css?family=${t}&display=swap`,document.head.ab_appended_google_fonts=t,document.head.ab_google_fonts_link=n}})(i.map((e=>e.style.fontFamily?.trim())).filter(((e,t,n)=>e&&n.indexOf(e)===t)));const s=(e,n)=>{e&&e.ab_modified_content!==n.content&&((e=>e.nodeType===t)(e)?(e.nodeValue=n.content,e.ab_modified_content=n.content):P(e)&&(e.innerHTML=n.content,e.ab_modified_content=n.content))};o.forEach((async e=>{if(!e.content)return;(e.applyAll?document.querySelectorAll(e.selector):[await N(e.selector)].filter(Boolean)).forEach(((t,n)=>{const r=e.applyAll?`${e.selector}-${n}-${t.id||Math.random().toString(36).substr(2,9)}`:e.selector;R(r,t),s(t,e)}))}));const l=new WeakMap;i.forEach((async e=>{const t=await N(e.selector);if(!t||!e.style||!P(t))return;const n=JSON.stringify(e.style);if(l.get(t)===n)return;R(e.selector,t);const r=window.getComputedStyle(t);let o=!1;Object.entries(e.style).forEach((([e,n])=>{const i=r.getPropertyValue(e),a=n.toString().replace(/\s*!important\s*$/,"");i!==a&&(o=!0,"string"==typeof n&&n.includes("!important")?t.style.setProperty(e,a,"important"):t.style[e]=n)})),o&&l.set(t,n)})),c.forEach((async e=>{const t=await N(e.selector);if(t&&"MainContent"===t.id){R(e.selector,t);try{const n=JSON.parse(e.attributes["data-section-order"]),r=Array.from(t.children).filter((e=>e.classList.contains("shopify-section"))),o=r.map((e=>e.id||e.getAttribute("data-section-id")));if(n.every(((e,t)=>e===o[t])))return t.ab_modified_attributes=t.ab_modified_attributes||{},void(t.ab_modified_attributes["data-section-order"]=e.attributes["data-section-order"]);const i=new Map;r.forEach((e=>{const t=e.id||e.getAttribute("data-section-id");t&&i.set(t,e)})),n.forEach(((e,n)=>{const r=i.get(e);if(r){if(Array.from(t.children).indexOf(r)!==n){const e=t.children[n];e&&e!==r&&t.insertBefore(r,e)}}})),t.ab_modified_attributes=t.ab_modified_attributes||{},t.ab_modified_attributes["data-section-order"]=e.attributes["data-section-order"]}catch(e){console.error("Error reordering sections:",e)}}})),a.forEach((async e=>{const t=await N(e.selector);t&&e.attributes&&P(t)&&t.ab_modified_attributes!==e.attributes&&(R(e.selector,t),Object.entries(e.attributes).forEach((([e,n])=>{t.setAttribute(e,n)})))}))},X=()=>{const e="elv-el-";w.filter((e=>!e?.selector?.pathnames?.length||e?.selector?.pathnames.some((e=>K(location.pathname,e))))).forEach((async t=>{const n=await N(t.selector.target);if(!n||n.parentElement?.querySelector(`#${e}${t.id}`))return;const r=t=>{const n=document.createElement(t.tagName);return n.id=`${e}${t.id}`,Object.assign(n.style,t.style),Object.entries(t.attributes??{}).forEach((([e,t])=>{n.setAttribute(e,t)})),"text"===t.kind&&(n.innerText=t.content),n},o=(e,t)=>{t.forEach((t=>{const n=r(t);e.appendChild(n),"container"===t.kind&&o(n,t.childrens)}))},i=r(t);"container"===t.kind&&o(i,t.childrens,document),"after"===t.selector.placement?n.after(i):"before"===t.selector.placement&&n.before(i);const a=`${e}${t.id}`;I(a)}))},Y=()=>{const e=window.preact;if(!$||!e||"function"!=typeof e.h)return;C.filter((e=>!e?.selector?.pathnames?.length||e?.selector?.pathnames.some((e=>K(location.pathname,e))))).forEach((async t=>{try{const n=window.eab_blocks?.[t.type];if("function"!=typeof n)return;const r=await N(t.selector.target);if(!r||r.parentElement?.querySelector(`#${q}${t.id}`))return;const o=document.createElement("div"),i=`${q}${t.id}`;o.id=i,o.style.cssText="all: unset; position: relative; white-space: pre-wrap;",e.render(e.h(n,{options:t.options,onMount:()=>{I(i)}}),o),"after"===t.selector.placement?r.after(o):"before"===t.selector.placement&&r.before(o)}catch(e){console.error("An error while rendering a block ",e)}}))},ee=()=>{const e=location.pathname;v.filter((t=>{if(!t?.pathnames?.length)return!0;if(t?.excludePathnames?.length){if(t.excludePathnames.some((t=>K(e,t))))return!1}return t.pathnames.some((t=>K(e,t)))})).map((e=>{const t=e.id;if(!t)return;const n=e?.css,r=(e=>e?.replaceAll("`","`").replaceAll("$","$"))(e?.js||"");if(n){if(!document.getElementById(`css-${t}`)){const e=document.createElement("style");e.id=`css-${t}`,e.textContent=n,document.head.appendChild(e)}}if(r){if(!document.getElementById(`js-${t}`)){const e=document.createElement("script");e.id=`js-${t}`,e.textContent=`(function(){try{${r}}catch{console.log('an error occurred while running the custom script')}})()`,document.head.appendChild(e)}}}))};let te=!1;function ne(e){if(s){const t=Date.now();if(t-u>5e3&&(l=0,u=t,p))return p=!1,void V();if(e&&(l+=e.length,l>d))return console.warn("ABTL: Too many mutations detected, disabling observer temporarily"),p=!0,void B()}if(e){const t=function(e){return e.map(D).join(",")}(e);if(t===M)return void(M=t);M=t}else M=null;B(),s?(f&&clearTimeout(f),f=setTimeout((()=>{re()}),m)):re()}function re(){try{y.hasImageTests&&H(),y.hasPriceTests&&(te?z():J()),y.hasContentTests&&(X(),Y(),Q()),y.hasCustomCodeTests&&ee()}catch(e){console.error("ABTL: Error processing changes:",e)}s&&p||V()}function oe(e){return[...e].sort(((e,t)=>+Boolean(e.form)-Boolean(t.form)))}function ie(e,t){return e.replace(/(?:\b|[A-Z]{3})(\d{1,3}(?:[.,\s]\d{3})*(?:[.,]\d{1,2})?)(?:\b|[A-Z]{3})|(?:\b|[A-Z]{3})(\d+(?:[.,]\d{1,2})?)(?:\b|[A-Z]{3})/,((e,n,r)=>n?e.replace(n,t):r?e.replace(r,t):e))}function ae(e,t){const n=e.match(/(\d+[,. ])*\d+([,.]?\d+)?/);if(!n)return;const r=n[0],o=/[,. ]\d{3}/.test(r),i=o?r.match(/[,. ]\d{3}/)[0][0]:"";let a;if(i)a=","===i?".":",";else{a=".";const e=r.match(/([,.])\d{1,2}$/);e&&(a=e[1])}const c=a?(r.split(a)[1]||"").length:0,s=t/100,l=(s.toString().split(".")[1]||"").length;let u=Math.max(c,l);u>0&&(u=Math.max(u,2));let d=s.toFixed(u);if(","===a&&(d=d.replace(".",",")),o){const e=d.split(a);e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,i),d=e.join(a)}return d}function ce(e,t,n){if(isNaN(t)||!e)return;const r="number"==typeof n&&e.childNodes[n]||e,o=3===r.nodeType,i=r.textContent,a=o?r.nodeValue:r.innerHTML,c=ae(i,100*t),s=ie(a,c);i.includes(c)||(o?r.nodeValue=s:r.innerHTML=s)}window.addEventListener("load",(()=>{te=!0})),window.Shopify?.designMode||(addEventListener("DOMContentLoaded",(()=>{ne()})),addEventListener("resize",(()=>{O()!==j&&(B(),Object.entries(L).forEach((([e,t])=>{const n=document.querySelector(e);n&&n.replaceWith(t.cloneNode(!0))})),ne(),V())})),addEventListener("input",(()=>{ne()})),addEventListener("popstate",(function(){ne()}))),s?(setTimeout((()=>{p=!1,ne(),V()}),1e4),p=!0,ne(),setTimeout((()=>{p=!1,V()}),2e3)):(ne(),V())}();