whatmore-react-assets 1.0.1843 → 1.0.1844
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/{12.2ff87af4.chunk.js → 12.e23e4099.chunk.js} +2 -2
- package/static/js/415.0c774e04.chunk.js +1 -0
- package/static/js/799.a1a2604a.chunk.js +1 -0
- package/static/js/{event-click-component.02d03131.chunk.js → event-click-component.9141709d.chunk.js} +3 -3
- package/static/js/homepage-carousel-view.d75fe339.chunk.js +15 -0
- package/static/js/react-main-app.0c1b64cb.chunk.js +1 -0
- package/static/js/{wht-neo-atc.280795ae.chunk.js → wht-neo-atc.c2de104b.chunk.js} +1 -1
- package/static/js/{wht-neo-banner.59332c80.chunk.js → wht-neo-banner.b779a272.chunk.js} +1 -1
- package/static/js/wht-neo-floating.568873a6.chunk.js +1 -0
- package/static/js/wht-neo-shopper.da8de2d8.chunk.js +2 -0
- package/static/js/wht-neo-stories.50cda412.chunk.js +1 -0
- package/static/js/wht-neo.9070aa69.chunk.js +1 -0
- package/static/js/wht-skin-product-multi-product.44390641.chunk.js +1 -0
- package/static/js/wht-skin-product-premium.afbea9c2.chunk.js +1 -0
- package/static/js/wht-skin-product-thumbnail-strip.35f78252.chunk.js +1 -0
- package/static/js/{wht-skin-shared-circle.4516194e.chunk.js → wht-skin-shared-circle.c166ece5.chunk.js} +1 -1
- package/static/js/wht-skin-shared-coverflow.8816605c.chunk.js +1 -0
- package/static/js/wht-skin-shared-info-strip.52270c1d.chunk.js +1 -0
- package/static/js/wht-skin-shared-standard.6c49790a.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/415.41c9c5d5.chunk.js +0 -1
- package/static/js/79.35d8bfe8.chunk.js +0 -1
- package/static/js/homepage-carousel-view.70b0a882.chunk.js +0 -15
- package/static/js/react-main-app.539f06d4.chunk.js +0 -1
- package/static/js/wht-neo-floating.4deeae80.chunk.js +0 -1
- package/static/js/wht-neo-shopper.85587cd5.chunk.js +0 -2
- package/static/js/wht-neo-stories.a3e4fd3c.chunk.js +0 -1
- package/static/js/wht-neo.0058f891.chunk.js +0 -1
- package/static/js/wht-skin-product-multi-product.9283860a.chunk.js +0 -1
- package/static/js/wht-skin-product-premium.890a272c.chunk.js +0 -1
- package/static/js/wht-skin-product-thumbnail-strip.46e96e39.chunk.js +0 -1
- package/static/js/wht-skin-shared-coverflow.19f003d3.chunk.js +0 -1
- package/static/js/wht-skin-shared-info-strip.6c0d316e.chunk.js +0 -1
- package/static/js/wht-skin-shared-standard.0ed7d073.chunk.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[866],{3297:function(t,e,o){o.r(e),o.d(e,{fireNeoAtcClick:function(){return m},fireNeoAtcMetric:function(){return y},fireNeoBuyNowMetric:function(){return v},fireNeoOutsideAtcFunnel:function(){return h},fireNeoProductClick:function(){return f}});var n=o(6694),r=o(9383),i=o(5443),a=o(2567),c=o(1637),d=o(7156);const s=["56352899156"];function u(t){if(t)return t.startsWith("index")?"home":t.startsWith("product")?"product_page":t.startsWith("collection")||t.startsWith("page")?"collection_page":void 0}const l={[d.O.EVENT_VIEW]:{gate:"meta_pixel_events->video_click_event",action:"whatmore_video_click_event",custom:"video_clicked"},[d.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{gate:"meta_pixel_events->video_product_tile_click_event",action:"whatmore_product_tile_click_event",custom:"video_product_tile_clicked"}};function p(t,e,o,n,r){const c=l[t];if(c){if("function"===typeof fbq){var d;const t=!!(0,i.hG)(n,c.gate),r=null===o||void 0===o||null===(d=o.meta_actions)||void 0===d?void 0:d[c.custom];if(t||r){const t={id:null===e||void 0===e?void 0:e.client_product_id,product_url:null===e||void 0===e?void 0:e.product_link};fbq("trackCustom",c.action,t),r&&setTimeout(()=>{r.forEach(e=>fbq("trackCustom",e,t))},500)}}var p,m,h;if(s.includes((0,a.Ry)())&&"object"===typeof window.dataLayer)window.dataLayer.push({event:"video_interaction",page_type:null!==(p=u(null===r||void 0===r?void 0:r.landingLocationType))&&void 0!==p?p:"NA",selection_type:c.action,video_name:null!==(m=null===o||void 0===o?void 0:o.event_id)&&void 0!==m?m:"NA",video_percentage:"NA",product_name:null!==(h=null===e||void 0===e?void 0:e.title)&&void 0!==h?h:"NA"})}}function m({event:t,productList:e,ctaList:o=[],customizations:r,widgetSourceDetails:c,interactionType:l}){var p;if(!t||!e||0===e.length)return;const m=(0,a.Ry)();(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:l||d.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:c,event:t,productList:e,ctaList:o}),function(t,e,o){var n;if("function"!==typeof fbq)return;const r=!!(0,i.hG)(o,"meta_pixel_events->video_atc_event"),a=null===e||void 0===e||null===(n=e.meta_actions)||void 0===n?void 0:n.video_atc_clicked;if(!r&&!a)return;const c={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link};fbq("trackCustom","whatmore_video_atc_event",c),a&&setTimeout(()=>{a.forEach(t=>fbq("trackCustom",t,c))},500)}(null!==(p=e[1])&&void 0!==p?p:e[0],t,r),function(t,e,o,n){var r,i,a,c,d,l;s.includes(t)&&"object"===typeof window.dataLayer&&window.dataLayer.push({event:"video_interaction",page_type:null!==(r=u(null===e||void 0===e?void 0:e.landingLocationType))&&void 0!==r?r:"NA",selection_type:"whatmore_video_atc_event",video_name:null!==(i=null===o||void 0===o?void 0:o.event_id)&&void 0!==i?i:"NA",video_percentage:"NA",product_name:null!==(a=null!==(c=null===n||void 0===n||null===(d=n[1])||void 0===d?void 0:d.title)&&void 0!==c?c:null===n||void 0===n||null===(l=n[0])||void 0===l?void 0:l.title)&&void 0!==a?a:"NA"})}(m,c,t,e)}function h({event:t,product:e,customizations:o,widgetSourceDetails:i}){var a,c;if(!t)return;(0,r.increaseViewCount)(t);const s=e?[e]:null!==(a=t.products)&&void 0!==a?a:[];(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:d.O.EVENT_VIEW,widgetSourceDetails:i,event:t,productList:s,ctaList:t.cta}),p(d.O.EVENT_VIEW,null!==(c=s[1])&&void 0!==c?c:s[0],t,o,i),(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:d.O.PRODUCT_CTA_VIEW,widgetSourceDetails:i,event:t,productList:s,ctaList:t.cta})}function f({event:t,product:e,kind:o,customizations:r,widgetSourceDetails:i}){if(!t||!e)return;const a="thumbnail"===o?d.O.VIDEO_TILE_PRODUCT_THUMBNAIL_CLICKED:d.O.PRODUCT_TILE_SHOPNOW_CLICKED;(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:a,widgetSourceDetails:i,event:t,productList:[e],ctaList:t.cta}),p(a,e,t,r,i)}function v(t,e){t&&e&&((0,a.U)()||(0,a.Ry)()===c.YZ||(0,r.increaseEventProductBuyNowCount)(t,e))}function y(t,e,o=1){t&&e&&((0,a.U)()||(0,a.Ry)()===c.YZ||(0,r.increaseEventProductAddToCartCount)(t,e,o))}},4400:function(t,e,o){o.r(e),o.d(e,{fireNeoAtcClick:function(){return n.fireNeoAtcClick},fireNeoBuyNowMetric:function(){return n.fireNeoBuyNowMetric},fireNeoOutsideAtcFunnel:function(){return n.fireNeoOutsideAtcFunnel},fireNeoProductClick:function(){return n.fireNeoProductClick},neoAddAllToCart:function(){return f},neoAddToCart:function(){return h}});var n=o(3297),r=o(5118),i=o(5566),a=o(6080),c=o(2567),d=o(5443);async function s(){const t="https://"+window.location.hostname+"/cart.json";return await fetch(t,{method:"GET"})}async function u(t,e,o,n,r="default",s,u,l,p){const m=(0,c.Ry)(),h=u?(0,i.wm)()+("72201044272"==m?`#${n}#${r}#${s?"olduser":"newuser"}:direct`:`#${n}:direct`):p?"_wt_vs":l?"_wt_vi":"";if(""==h||"_wt_vs"==h||"_wt_vi"==h||"77604192550"==m||"64157352183"==m||"80856187185"==m||"86486974743"==m||"62758289602"==m||"65972830359"==m||"75310563627"==m||"86968402213"==m||(0,d.hG)((0,d.VA)(),"order_tracking->track_using_wtot"))return;let f={id:t,quantity:e,properties:{...h?{[a.B_]:h}:{},...o}};return await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(t=>t.json()).catch(t=>{console.error("Whatmore :: Error while updating cart line item properties direct.",t)})}async function l(t,e,o,n,r="",l="",p="",m="",h="",f="",v=null){(0,c.yI)();const y=t=>{s().then(t=>t.json()).then(e=>{const o=e.items.find(e=>e.id==t);if(!o)return;u(o.key,o.quantity,o.properties,p,m,h,!0,!0,!0)}).catch(t=>{console.error("[Whatmore] updateATCLineItemProperties error:",t)})};if("STRNV8MHJTF"==t||"STR6HU283UZ"==t||"STR9T3LLEJB"==t||"STRWJMIOJNX"==t||"STRUDQ36YAC"==t||"STR1D5ONOZX"==t){console.log("Executing cart refresh script..");return void(document.getElementById("whatsmorecart").value=Math.random())}if("57217876118"===t){async function j(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e),o.append("sections","side-cart");const n=await fetch("/cart/add.js",{method:"POST",body:o,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"}}).then(t=>t.json());n.status?console.error("atc failed",n.description):(window.ajaxCart.load(n),setTimeout(()=>{y(t)},500))}return void j(r,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 57217876118 error:",t)})}if("75310563627"===t){async function E(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e),o.append("sections","cart-drawer,cart-icon-bubble");const n=await fetch("/cart/add.js",{method:"POST",body:o,headers:{Accept:"application/javascript"}}).then(t=>t.json());if(n.status)return void console.error("atc failed",n.description);const r=document.querySelector("cart-drawer");r&&(r.renderContents(n),r.classList.remove("is-empty"),r.open())}return E(r,1).then(()=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("[Whatmore] ATC 75310563627 error:",t)}),void setTimeout(e,o)}if("81308287252"===t)return(async()=>{const t={};(0,d.hG)((0,d.VA)(),"order_tracking->track_using_wtot")||(t[a.B_]=`${(0,i.wm)()}#${p}:direct`);const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(r),quantity:1,properties:t})}).then(t=>t.json()).catch(()=>null);e&&!e.status?setTimeout(()=>{const t=document.querySelector(".iCartBtnToggle")||document.querySelector("#iCartBtnToggle");t?t.click():console.warn("[Whatmore] iCart toggle not found for 81308287252")},250):console.error("[Whatmore] ATC 81308287252 failed:",e&&e.description)})(),void setTimeout(e,o);if("67841720509"===t){async function O(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(t),quantity:e})});o.ok?(document.dispatchEvent(new CustomEvent("on:cart:change",{bubbles:!0,cancelable:!1})),document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:refresh",{bubbles:!0}))):console.error("[Whatmore] ATC 67841720509 failed:",await o.text())}return O(r,1).then(()=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("[Whatmore] ATC 67841720509 error:",t)}),void setTimeout(e,o)}if("72603631788"===t||"5220302897"===t){const q=new FormData;q.append("id",r),q.append("quantity","1"),v&&q.append("properties[Size]",v);try{const k=await fetch("/cart/add.js",{method:"POST",body:q}),N=await k.json();N.id?setTimeout(()=>{y(r),window.location.href="/cart"},500):console.error("Afrozeh ATC failed:",N)}catch(_){console.error("Afrozeh ATC error:",_)}return void setTimeout(e,o)}if("67083239728"===t){try{const P=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:r,quantity:1}]})});P.ok||console.error("[ATC] Add to cart failed:",P.status)}catch(_){console.error("[ATC] Error while adding to cart:",_)}return setTimeout(()=>{y(r)},1e3),void setTimeout(e,o)}if("61442818186"===t){async function L(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});if(!o.ok)return void console.error("[ATC] Add to cart failed:",o.status);document.dispatchEvent(new CustomEvent("cart:build"));const n=document.querySelector(".js-drawer-open-cart");n&&n.click()}return L(r,1).then(()=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("[Whatmore] ATC 61442818186 error:",t)}),void setTimeout(e,o)}if("62226792677"===t){async function W(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});var n;o.ok?("function"===typeof(null===(n=window.cleverSopify)||void 0===n?void 0:n.onCartUpdate)&&window.cleverSopify.onCartUpdate(1,1,l),setTimeout(()=>{y(t)},500)):console.error("[ATC] Add to cart failed:",o.status)}return W(r).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("60595503283"===t){async function D(t,e=1){try{const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,quantity:e})});o.ok?setTimeout(()=>{y(t),window.location.href="/cart"},500):console.error("Failed to add item to cart:",o.status)}catch(_){console.error("Error adding to cart:",_)}}return D(r,1),void setTimeout(e,o)}if("72915616066"===t){function I(){var t,e;const o=window.customElements.get("cart-drawer")&&document.querySelector("cart-drawer");let n=[];const r=new CustomEvent("cart:prepare-bundled-sections",{bubbles:!0,detail:{sections:n}});document.documentElement.dispatchEvent(r);const i=n.length>0,a="string"===typeof(null===(t=window.themeVariables)||void 0===t||null===(e=t.settings)||void 0===e?void 0:e.cartType);return(!a||"page"!==window.themeVariables.settings.cartType)&&(o&&i&&a)}async function R(t,e){document.documentElement.dispatchEvent(new CustomEvent("theme:loading:start",{bubbles:!0}));let o=[];document.documentElement.dispatchEvent(new CustomEvent("cart:prepare-bundled-sections",{bubbles:!0,detail:{sections:o}}));const n=await fetch(`${window.Shopify.routes.root}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}],sections:o.join(",")})});if(document.documentElement.dispatchEvent(new CustomEvent("theme:loading:end",{bubbles:!0})),!n.ok)return console.error("[ATC] Add to cart failed:",n.status),document.dispatchEvent(new CustomEvent("cart:refresh")),!1;const r=await n.json(),i=await(await fetch(`${window.Shopify.routes.root}cart.js`)).json();return i.sections=r.sections,document.documentElement.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0,detail:{baseEvent:"variant:add",cart:i}})),setTimeout(()=>{y(t)},500),!0}async function J(t,e=1){return I()?R(t,e):async function(t,e,o){const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return n.ok?(setTimeout(()=>{o(t)},500),setTimeout(()=>{var t,e;window.location.href=`${(null===(t=window.Shopify)||void 0===t||null===(e=t.routes)||void 0===e?void 0:e.root)||"/"}cart`},1e3),!0):(console.error("[ATC Fallback] Add to cart failed:",n.status),!1)}(t,e,y)}return J(r).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("44061622423"===t){async function V(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});o.ok?window.cart&&"function"===typeof window.cart.getCart?(window.cart.getCart(),setTimeout(()=>{y(t)},500)):fetch("/cart?section_id=api-cart-items").then(t=>t.text()).then(e=>{const o=document.createElement("div");if(o.innerHTML=e,window.cart&&"function"===typeof window.cart.build){const t=o.querySelector("[data-api-content]");t&&window.cart.build(t)}document.dispatchEvent(new CustomEvent("theme:product:added",{bubbles:!0})),setTimeout(()=>{y(t)},500)}).catch(()=>{const e=document.querySelector('[href="/cart"], [data-cart-toggle], a[href*="/cart"]');e&&e.click(),setTimeout(()=>{y(t)},500)}):console.error("[ATC] Add to cart failed:",o.status)}return V(r).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("60183445561"===t){async function x(t,e=1,o="/cart"){const n=new URLSearchParams;n.append("id",t),n.append("quantity",e.toString()),n.append("return_to",o);const r=await fetch("https://tapee.in/cart/add",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString(),credentials:"include"}),i=await r.text();return r.ok&&setTimeout(()=>{y(t),window.location.href="https://tapee.in/cart"},500),i}return x(r).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("22907887"===t){async function F(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e.toString());const n=document.querySelector("cart-notification, cart-drawer");if(n){const t=n.getSectionsToRender();o.append("sections",t.map(t=>t.id).join(","))}o.append("sections_url",window.location.pathname);const r=await fetch("/cart/add.js",{method:"POST",body:o});if(!r.ok){const t=await r.text();throw new Error(`Failed to add to cart: ${t}`)}const i=await r.json();return n&&n.renderContents&&n.renderContents(i),document.body.classList.remove("overflow-hidden"),document.querySelectorAll(".atc-container.active, .atc-variant-container.active, .pdp-atc-container.active").forEach(t=>t.classList.remove("active")),window.dispatchEvent(new CustomEvent("cart:added",{detail:{variantId:t,quantity:e,data:i}})),i}return F(r).then(t=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("28575536"===t||"64287408360"===t||"8473575520"===t||"65972830359"===t||"75000480020"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.handleFloCartBtn&&window.handleFloCartBtn(),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("[Whatmore] Ripped Up Nutrition ATC error:",t)),void setTimeout(e,o);if("58692075703"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("[Whatmore] Lakshita ATC error:",t)),void setTimeout(e,o);if("22907887"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>t.json()).then(t=>{setTimeout(()=>{y(r)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("58501496967"===t)return(async()=>{const t=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:r,quantity:1}]})});t.ok?(window.ajaxCart&&"function"===typeof window.ajaxCart.load&&window.ajaxCart.load(),window.jQuery&&window.jQuery("body").trigger("drawer.open"),setTimeout(()=>{y(r)},500)):console.error("[Whatmore] ATC 58501496967 failed:",t.status)})().catch(t=>console.error("[Whatmore] ATC 58501496967 error:",t)),void setTimeout(e,o);if("56444977250"===t){const M=document.querySelector('button[data-pf-type="ProductATC2"]');return M?(l&&M.setAttribute("data-product-id",l),M.click(),setTimeout(()=>{s().then(t=>t.json()).then(t=>{const e=t.items.find(t=>String(t.id)===String(r));if(e){u(e.key,e.quantity,e.properties,p,m,h,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===f||void 0===f||null===(w=f.split("?"))||void 0===w?void 0:w[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html").querySelector('button[data-pf-type="ProductATC2"]');e&&l&&e.setAttribute("data-product-id",l)}),void setTimeout(e,o));var w}if("64379584700"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>t.json()).then(t=>fetch("/cart.js")).then(t=>t.json()).then(t=>{$(".paira-cart-item-count").text(t.item_count),$(".paira-cartEmpty").hide(),$(".paira-cartNotEmpty").show(),$(".paira-cart-total-price .money").text("Rs. "+t.total_price/100),$(".cart-drop").addClass("open"),$(".cart-icon").trigger("mouseenter"),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("66947219508"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(r),quantity:1}]})}).then(async()=>{const t=document.getElementById("mini-cart");t&&"function"===typeof t._rerenderCart&&await t._rerenderCart({detail:{openMiniCart:!0}}),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("[Whatmore] ATC 66947219508 error:",t)),void setTimeout(e,o);if("76767920441"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>t.json()).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("70840582336"===t){const U=r,B=1,G=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(G){let Q=G.querySelector('input[name="id"]');Q||(Q=document.createElement("input"),Q.type="hidden",Q.name="id",G.appendChild(Q)),Q.disabled=!1,Q.value=U;const H=G.querySelector('input[name="quantity"]');H&&(H.value=B);const z=G.querySelector('button[data-add-to-cart], button[type="submit"]');return z?(z.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),z.click(),z.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{y(U)},500),void setTimeout(e,o)}return void fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:U,quantity:B}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{y(U)},500),setTimeout(e,o)}).catch(t=>{console.error("[ATC] error for 70840582336:",t),setTimeout(e,o)})}if("64683278550"===t){try{const X=document.querySelector('form[action="/cart/add"]');if(!X)return console.warn("[ATC 64683278550] form not found"),void setTimeout(e,o);const K=X.querySelector('input[name="id"]');if(!K)return console.warn("[ATC 64683278550] id input not found"),void setTimeout(e,o);K.value=r;const Z=X.querySelector('button[type="submit"]');if(!Z)return console.warn("[ATC 64683278550] submit button not found"),void setTimeout(e,o);Z.click(),setTimeout(()=>{y(r)},500),setTimeout(e,o)}catch(A){console.error("[ATC 64683278550] error:",A),setTimeout(e,o)}return}if("95562924310"===t||"61810999367"===t){try{const Y=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:r,quantity:1}]})});if(Y.ok){const tt=await Y.json();document.dispatchEvent(new CustomEvent("cart:update",{detail:{cart:tt}})),document.dispatchEvent(new CustomEvent("theme:cart:refresh",{detail:{target:"product_flood_atc"},bubbles:!0})),setTimeout(()=>{y(r)},500)}else console.error("[ATC 95562924310] Add to cart failed:",Y.status)}catch(_){console.error("[ATC 95562924310] error:",_)}return void setTimeout(e,o)}if("45050691744"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>t.json()).then(t=>{jQuery.ajax({type:"GET",url:"/",dataType:"html",success:function(t){jQuery(".drawer__inner.cart-drawer-content").html(jQuery(t).find(".drawer__inner.cart-drawer-content").html()),jQuery(".custom_doscunt_bar").html(jQuery(t).find(".custom_doscunt_bar").html()),jQuery(".some_js_items").html(jQuery(t).find(".some_js_items").html()),jQuery(".header-cart-icon__count").html(jQuery(t).find(".header-cart-icon__count").html());try{jQuery("#FreeShippingText").slick({dots:!0,autoplay:!0,autoplaySpeed:2500,arrows:!0})}catch(e){}jQuery("div#HeaderCartIcon button").trigger("click"),setTimeout(()=>{y(r)},500)}})}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("55337746621"===t){async function et(t,e=1){var o;await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});const n=await fetch("/cart.js").then(t=>t.json());document.querySelectorAll("[data-cart-count]").forEach(t=>{const e=t.querySelector(":scope > span:last-of-type");e&&(e.textContent=n.item_count)});const r=document.querySelector("[data-cart-container]");if(!r)return;const i=((null===(o=r.parentElement)||void 0===o?void 0:o.id)||"").replace("shopify-section-","");let a=null;if(i){const t=await fetch(`/?sections=${encodeURIComponent(i)}`).then(t=>t.json()).catch(()=>null);if(null!==t&&void 0!==t&&t[i]){const e=document.createElement("div");e.innerHTML=t[i];const o=e.querySelector("[data-cart-container]");o&&(a=o.innerHTML)}}if(!a){const t=await fetch("/cart").then(t=>t.text()),e=(new DOMParser).parseFromString(t,"text/html").querySelector("[data-cart-container]");e&&(a=e.innerHTML)}if(!a)return;r.innerHTML=a,r.classList.add("is-drawer-open"),document.body.classList.add("is-scroll-disabled");const c=()=>{r.classList.remove("is-drawer-open"),document.body.classList.remove("is-scroll-disabled")};r.querySelectorAll("[data-cart-drawer-toggle]").forEach(t=>{t.addEventListener("click",t=>{t.preventDefault(),c()})}),document.addEventListener("keydown",t=>{"Escape"===t.key&&c()},{once:!0})}return et(r,1).then(()=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("[Whatmore] ATC 55337746621 error:",t)}),void setTimeout(e,o)}if("12175954"===t){async function ot(t,e=1){const o=await fetch(theme.routes.cart_add_url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return o.ok?(document.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0,cancelable:!1,detail:{openDrawer:!0}})),setTimeout(()=>{y(t)},500),!0):(console.error("[ATC] Add to cart failed:",o.status),!1)}return ot(r).catch(t=>{console.error("[Whatmore] ATC 12175954 error:",t)}),void setTimeout(e,o)}if("2754609263"===t){const nt=()=>{const t=["cart:open","CartDrawer:open","drawerOpen"],e=[document,window];try{window.parent&&window.parent!==window&&window.parent.document&&e.push(window.parent.document)}catch(n){}const o=t=>e.forEach(e=>{try{e.dispatchEvent(new CustomEvent(t,{bubbles:!0}))}catch(n){console.error(`[Whatmore] ATC 2754609263 dispatch ${t} failed:`,n)}});["cart:refresh","cart:build","cart:updated"].forEach(o),setTimeout(()=>t.forEach(o),150)};async function rt(t,e=1){var o,n,r;const i=(null===(o=window.Shopify)||void 0===o||null===(n=o.routes)||void 0===n?void 0:n.root)||"/",a={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"},c=Number(e)||1,d=()=>fetch(`${i}cart/add.js`,{method:"POST",headers:a,body:JSON.stringify({items:[{id:t,quantity:c}]})}).then(t=>t.json()),s=await fetch(`${i}cart.js`,{headers:{Accept:"application/json"},cache:"no-store"}).then(t=>t.json()).catch(()=>null),u=null===s||void 0===s||null===(r=s.items)||void 0===r?void 0:r.find(e=>e.id==t);let l;var p,m;(u?(l=await fetch(`${i}cart/change.js`,{method:"POST",headers:a,body:JSON.stringify({id:u.key,quantity:u.quantity+c})}).then(t=>t.json()).catch(()=>null),l&&!l.status||(console.warn("[Whatmore] ATC 2754609263 change.js rejected, falling back to add.js"),l=await d())):l=await d(),l&&!l.status)?(nt(),setTimeout(()=>{y(t)},500)):console.error("[Whatmore] ATC 2754609263 failed:",(null===(p=l)||void 0===p?void 0:p.description)||(null===(m=l)||void 0===m?void 0:m.message))}return rt(r).catch(t=>{console.error("[Whatmore] ATC 2754609263 error:",t)}),void setTimeout(e,o)}if("25786679341"===t)return(async(t,e)=>{const o={};(0,d.hG)((0,d.VA)(),"order_tracking->track_using_wtot")||(o[a.B_]=`${(0,i.wm)()}#${p}:direct`);const n=await fetch(`${(null===(t=window.Shopify)||void 0===t||null===(e=t.routes)||void 0===e?void 0:e.root)||"/"}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(r),quantity:1,properties:o}]})}).then(t=>t.json()).catch(()=>null);if(n&&!n.status)if(document.dispatchEvent(new CustomEvent("vd:cart:added",{bubbles:!0,detail:{items:n.items||[n]}})),"function"===typeof window.vdOpenCart)window.vdOpenCart();else{const t=document.querySelector("a.vd-bag");t?t.click():console.warn("[Whatmore] vdOpenCart missing and no .vd-bag for 25786679341")}else console.error("[Whatmore] ATC 25786679341 failed:",n&&n.description)})().catch(t=>{console.error("[Whatmore] ATC 25786679341 error:",t)}),void setTimeout(e,o);if("8111554613"===t)return(async()=>{const t=()=>{const t=document.querySelector("cart-drawer#CartDrawer");t?(document.querySelectorAll(".add-to-cart-popup, .exit-intent-popup").forEach(t=>t.classList.add("hide")),t.removeAttribute("hidden"),t.removeAttribute("inert"),"function"!==typeof t.show||t.open?(t.setAttribute("open","true"),t.setAttribute("active","true")):t.show()):console.warn("[Whatmore] cart-drawer#CartDrawer not found for 8111554613")},e=()=>{const e=document.querySelector("cart-drawer#CartDrawer");let o=!1;const n=()=>{o||(o=!0,r.disconnect(),clearTimeout(i),t())},r=new MutationObserver(()=>{const t=document.querySelector("cart-drawer#CartDrawer");t&&t!==e&&n()});r.observe(document.body,{childList:!0,subtree:!0});const i=setTimeout(n,3e3)};if("function"!==typeof window.cartGiftUpdate){console.warn("[Whatmore] cartGiftUpdate missing for 8111554613, falling back to /cart/add.js");const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(r),quantity:1}]})}).then(t=>t.json()).catch(()=>null);return!e||e.status?void console.error("[Whatmore] ATC 8111554613 fallback failed:",e&&e.description):void setTimeout(()=>{y(r),document.dispatchEvent(new CustomEvent("cart:updated",{detail:{cart:e}})),t()},500)}const{price:o,productType:n}=await(async()=>{try{var t,e;const o=await fetch("/cart.js",{headers:{Accept:"application/json"},cache:"no-store"}).then(t=>t.json()),n=null===o||void 0===o||null===(t=o.items)||void 0===t?void 0:t.find(t=>String(t.variant_id)===String(r));if(n)return{price:n.price,productType:null!==(e=n.product_type)&&void 0!==e?e:""}}catch(i){}try{var o,n;const t=(f||window.location.href).split(/[?#]/)[0],e=await fetch(`${t}.js`,{headers:{Accept:"application/json"}}).then(t=>t.json()),i=null===e||void 0===e||null===(o=e.variants)||void 0===o?void 0:o.find(t=>String(t.id)===String(r));if(i)return{price:i.price,productType:null!==(n=e.product_type)&&void 0!==n?n:""}}catch(i){}return{price:0,productType:""}})(),i=()=>{document.removeEventListener("cart:updated",i),clearTimeout(a),y(r),e()},a=setTimeout(()=>{document.removeEventListener("cart:updated",i),y(r),e()},2500);document.addEventListener("cart:updated",i,{once:!1}),window.cartGiftUpdate(String(r),o,1,n,"ADD_TO_CART")})().catch(t=>{console.error("[Whatmore] ATC 8111554613 error:",t)}),void setTimeout(e,o);if("5801421"===t)return(async()=>{const t={};(0,d.hG)((0,d.VA)(),"order_tracking->track_using_wtot")||(t[a.B_]=`${(0,i.wm)()}#${p}:direct`);const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(r),quantity:1,properties:t})}).then(t=>t.json()).catch(()=>null);if(!e||e.status)return void console.error("[Whatmore] ATC 5801421 failed:",e&&e.description);let o=!1;const n=()=>{if(o)return!0;const t=window.Rebuy&&window.Rebuy.SmartCart;if(!t||"function"!==typeof t.show)return!1;if("ready"!==t.status&&!t.hasBoundEvents&&!document.querySelector("#rebuy-cart"))return!1;o=!0;try{window.Rebuy.Cart&&window.Rebuy.Cart.fetchCart()}catch(e){}return t.show(),!0};document.addEventListener("rebuy:smartcart.ready",n,{once:!0});const c=(t=0)=>{if(n())return;if(t<40)return void setTimeout(()=>c(t+1),150);const e=window.Rebuy&&window.Rebuy.SmartCart;if(e&&"function"===typeof e.show)return o=!0,void e.show();const r=document.querySelector('[data-cart-open], a[href$="/cart"]:not([disable-rebuy], .disable-rebuy)');r?r.click():console.warn("[Whatmore] Rebuy SmartCart unavailable for 5801421")};c()})().catch(t=>{console.error("[Whatmore] ATC 5801421 error:",t)}),void setTimeout(e,o);const T=e=>{if("61126934766"==t){let t=e.querySelector(".productView-buttons").querySelector('form[action*="/cart/add"]');if(t)return t}let o=Array.from(e.querySelectorAll("product-form")).find(t=>t.querySelector('form > input[name="id"]')&&t.querySelector('form button[type="submit"]'));return o||(o=Array.from(e.querySelectorAll('form[action*="/cart/add"]')).find(t=>t.querySelector('button[type="submit"]'))),o},b=(e,o,n)=>{const r=e.cloneNode(!0);if(r){r.hasAttribute("data-product-variant-id")&&r.setAttribute("data-product-variant-id",o),r.hasAttribute("data-product-id")&&r.setAttribute("data-product-id",n);let e=r.querySelector('input[name="id"]');if(e)e.setAttribute("value",o),e.hasAttribute("disabled")&&e.removeAttribute("disabled");else{const t=r.querySelector('select[name="id"]');if(t){const e=t.querySelector('option[selected="selected"]');e&&e.setAttribute("value",o)}}const i=r.querySelector('input[name="product-id"]');i&&i.setAttribute("value",n);const a=document.createElement("div");return a.className="whatmore-atc",a.appendChild(r),document.body.appendChild(a),console.log(a,"formElement"),"92319318403"===t&&((t,e,o)=>{var n;const r=null!==(n=t.matches)&&void 0!==n&&n.call(t,"form")?t:t.querySelector("form");if(!r)return;let i=r.querySelector('input[name="id"]');i||(i=document.createElement("input"),i.type="hidden",i.name="id",r.prepend(i)),i.value=String(e),i.removeAttribute("disabled");const a=r.querySelector('select[name="id"]');a&&([...a.options].some(t=>t.value===String(e))?(a.value=String(e),[...a.options].forEach(t=>t.selected=t.value===String(e)),a.dispatchEvent(new Event("change",{bubbles:!0}))):a.removeAttribute("name"));const c=r.querySelector('input[name="product-id"]');c&&(c.value=String(o))})(a,o,n),a}},S=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},C=T(document);if(C||(null===C||void 0===C?void 0:C.length)>0){const it=b(C,r,l);S(it),setTimeout(()=>{y(r)},500),it.remove()}else{var g;fetch(null===f||void 0===f||null===(g=f.split("?"))||void 0===g?void 0:g[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=T(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=b(o,r,l);S(t),setTimeout(()=>{y(r)},500),t.remove()}})}setTimeout(e,o)}function p(t){return(0,d.hG)(t,"brand_metadata->domain_context")}async function m(t,e,o){const{product:i,event:a,customizations:s,widget:u,userType:p,closeClickComponent:m,onState:h}=t,f=(0,c.Ry)(),v=(0,r.getVariantIdFromSelectedOption)(o,e);if(!v)return h&&h("init"),{status:"noop"};h&&h("atcApiCallInProgress");try{const t="55586586685"===f&&"function"===typeof m;await l(f,t?m:()=>{},t?400:100,window.location.hostname,v,i.client_product_id,u,a&&a.location,p,i.product_link),(0,n.fireNeoAtcMetric)(a,i,1),(0,d.hG)(s,"product_config->navigate_to_cart_page")&&setTimeout(()=>{window.location.href=`${window.Shopify&&window.Shopify.routes&&window.Shopify.routes.root||"/"}cart`},500);const e=o.filter(t=>t&&"Default Title"!==t).join(" \xb7 ");return h&&h("added",e),{status:"added",variantId:v,variantLabel:e}}catch(y){return h&&h("errored"),console.error("Whatmore :: neo ATC add failed",y),{status:"errored"}}}async function h(t){const{product:e,event:o,customizations:n,mode:i="direct",selectedOptions:a,variants:d,onState:s}=t;if(!e||!o)return{status:"noop"};const u=(0,c.Ry)();if(a&&d)return m(t,d,a);let l;s&&s("productVariantDetailsApiCallInProgress");try{l=await(0,r.productDetailsDetailed)(e,p(n),u)}catch(v){return s&&s("errored"),{status:"errored"}}const h=l&&l.variants||[],f=(0,r.getVariantOptions)(l);if((0,r.isSingleVariantProduct)(f)||"direct"===i){if(!(0,r.atleastOneVariantAvailableInStock)(h))return s&&s("errored"),{status:"errored"};return m(t,h,[(0,r.getFirstAvailableOption)(f[0]),(0,r.getFirstAvailableOption)(f[1]),(0,r.getFirstAvailableOption)(f[2])])}return s&&s("awaitingVariantSelection"),{status:"needs_selection",variantOptions:f,variants:h}}async function f(t){const{products:e,event:o,customizations:i,widget:a,userType:d,onState:s}=t;if(!e||0===e.length||!o)return{status:"noop",added:0};const u=(0,c.Ry)();s&&s("productVariantDetailsApiCallInProgress");const m=(await Promise.all(e.map(async t=>{try{const e=await(0,r.productDetailsDetailed)(t,p(i),u),o=e&&e.variants||[],n=(0,r.getVariantOptions)(e);if(!(0,r.isSingleVariantProduct)(n))return null;if(!(0,r.atleastOneVariantAvailableInStock)(o))return null;const a=(0,r.getVariantIdFromSelectedOption)([(0,r.getFirstAvailableOption)(n[0]),(0,r.getFirstAvailableOption)(n[1]),(0,r.getFirstAvailableOption)(n[2])],o);return a?{product:t,variantId:a}:null}catch(e){return null}}))).filter(Boolean);if(0===m.length)return s&&s("init"),{status:"noop",added:0};s&&s("atcApiCallInProgress");try{const t=m.slice(0,-1),e=m[m.length-1];if(t.length){if(!await async function(t,e=1){if(!t||0===t.length)return!0;try{return(await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:t.map(t=>({id:t,quantity:e}))})})).ok}catch(o){return!1}}(t.map(t=>t.variantId),1))for(const{product:e,variantId:n}of t)await l(u,()=>{},100,window.location.hostname,n,e.client_product_id,a,o&&o.location,d,e.product_link)}return await l(u,()=>{},100,window.location.hostname,e.variantId,e.product.client_product_id,a,o&&o.location,d,e.product.product_link),m.forEach(({product:t})=>(0,n.fireNeoAtcMetric)(o,t,1)),s&&s("added"),{status:"added",added:m.length}}catch(h){return s&&s("errored"),console.error("Whatmore :: neo bulk ATC failed",h),{status:"errored",added:0}}}},5118:function(t,e,o){async function n(t,e=""){let o;if("27303477337"===e){var n,r;const e="https://"+window.location.hostname,i=window.location.pathname.split("/");o=e+"/"+(null!==i&&void 0!==i&&null!==(n=i[1])&&void 0!==n&&n.startsWith("en-")?(null===i||void 0===i?void 0:i[1])+"/":"")+(null===t||void 0===t||null===(r=t.product_link)||void 0===r?void 0:r.split(".co")[1])+".js"}else o=(null===t||void 0===t?void 0:t.product_link)+".js";const i=await fetch(o,{method:"GET"});if(!i.ok)throw new Error(`Error! status: ${i.status}`);return await i.json()}async function r(t,e,o){if(t)return n(t,o)}function i(t){var e=[],o=[],n=[];const r=t&&t.variants||[],i=t&&t.options||[];return r.forEach(t=>{var r,a,c;t.option1&&e.push({option:t.option1,available:null===(r=t.available)||void 0===r||r,type:i[0]&&i[0].name}),t.option2&&o.push({option:t.option2,available:null===(a=t.available)||void 0===a||a,type:i[1]&&i[1].name}),t.option3&&n.push({option:t.option3,available:null===(c=t.available)||void 0===c||c,type:i[2]&&i[2].name})}),e=e.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),o=o.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),n=n.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),[e,o,n]}function a(t){if(0==t.length)return null;const e=t.filter(t=>t.available);return 0==e.length?null:e[0].option}function c(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}function d(t,e){const o=e.filter(e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]);return 0==o.length?null:o[0].id}function s(t){if(t&&t.length>=1){return t.filter(t=>t.available).length>=1}return!1}o.r(e),o.d(e,{atleastOneVariantAvailableInStock:function(){return s},getFirstAvailableOption:function(){return a},getVariantIdFromSelectedOption:function(){return d},getVariantOptions:function(){return i},isSingleVariantProduct:function(){return c},productDetailsDetailed:function(){return r},productDetailsShopifyJS:function(){return n}})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[866],{3297:function(t,e,o){o.r(e),o.d(e,{fireNeoAtcClick:function(){return m},fireNeoAtcMetric:function(){return y},fireNeoBuyNowMetric:function(){return v},fireNeoOutsideAtcFunnel:function(){return h},fireNeoProductClick:function(){return f}});var n=o(6694),r=o(9383),i=o(5443),a=o(2567),c=o(1637),d=o(7156);const s=["56352899156"];function u(t){if(t)return t.startsWith("index")?"home":t.startsWith("product")?"product_page":t.startsWith("collection")||t.startsWith("page")?"collection_page":void 0}const l={[d.O.EVENT_VIEW]:{gate:"meta_pixel_events->video_click_event",action:"whatmore_video_click_event",custom:"video_clicked"},[d.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{gate:"meta_pixel_events->video_product_tile_click_event",action:"whatmore_product_tile_click_event",custom:"video_product_tile_clicked"}};function p(t,e,o,n,r){const c=l[t];if(c){if("function"===typeof fbq){var d;const t=!!(0,i.hG)(n,c.gate),r=null===o||void 0===o||null===(d=o.meta_actions)||void 0===d?void 0:d[c.custom];if(t||r){const t={id:null===e||void 0===e?void 0:e.client_product_id,product_url:null===e||void 0===e?void 0:e.product_link};fbq("trackCustom",c.action,t),r&&setTimeout(()=>{r.forEach(e=>fbq("trackCustom",e,t))},500)}}var p,m,h;if(s.includes((0,a.Ry)())&&"object"===typeof window.dataLayer)window.dataLayer.push({event:"video_interaction",page_type:null!==(p=u(null===r||void 0===r?void 0:r.landingLocationType))&&void 0!==p?p:"NA",selection_type:c.action,video_name:null!==(m=null===o||void 0===o?void 0:o.event_id)&&void 0!==m?m:"NA",video_percentage:"NA",product_name:null!==(h=null===e||void 0===e?void 0:e.title)&&void 0!==h?h:"NA"})}}function m({event:t,productList:e,ctaList:o=[],customizations:r,widgetSourceDetails:c,interactionType:l}){var p;if(!t||!e||0===e.length)return;const m=(0,a.Ry)();(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:l||d.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:c,event:t,productList:e,ctaList:o}),function(t,e,o){var n;if("function"!==typeof fbq)return;const r=!!(0,i.hG)(o,"meta_pixel_events->video_atc_event"),a=null===e||void 0===e||null===(n=e.meta_actions)||void 0===n?void 0:n.video_atc_clicked;if(!r&&!a)return;const c={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link};fbq("trackCustom","whatmore_video_atc_event",c),a&&setTimeout(()=>{a.forEach(t=>fbq("trackCustom",t,c))},500)}(null!==(p=e[1])&&void 0!==p?p:e[0],t,r),function(t,e,o,n){var r,i,a,c,d,l;s.includes(t)&&"object"===typeof window.dataLayer&&window.dataLayer.push({event:"video_interaction",page_type:null!==(r=u(null===e||void 0===e?void 0:e.landingLocationType))&&void 0!==r?r:"NA",selection_type:"whatmore_video_atc_event",video_name:null!==(i=null===o||void 0===o?void 0:o.event_id)&&void 0!==i?i:"NA",video_percentage:"NA",product_name:null!==(a=null!==(c=null===n||void 0===n||null===(d=n[1])||void 0===d?void 0:d.title)&&void 0!==c?c:null===n||void 0===n||null===(l=n[0])||void 0===l?void 0:l.title)&&void 0!==a?a:"NA"})}(m,c,t,e)}function h({event:t,product:e,customizations:o,widgetSourceDetails:i}){var a,c;if(!t)return;(0,r.increaseViewCount)(t);const s=e?[e]:null!==(a=t.products)&&void 0!==a?a:[];(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:d.O.EVENT_VIEW,widgetSourceDetails:i,event:t,productList:s,ctaList:t.cta}),p(d.O.EVENT_VIEW,null!==(c=s[1])&&void 0!==c?c:s[0],t,o,i),(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:d.O.PRODUCT_CTA_VIEW,widgetSourceDetails:i,event:t,productList:s,ctaList:t.cta})}function f({event:t,product:e,kind:o,customizations:r,widgetSourceDetails:i}){if(!t||!e)return;const a="thumbnail"===o?d.O.VIDEO_TILE_PRODUCT_THUMBNAIL_CLICKED:d.O.PRODUCT_TILE_SHOPNOW_CLICKED;(0,n.trackWhatmoreAnalyticsEvent)({userInteractionType:a,widgetSourceDetails:i,event:t,productList:[e],ctaList:t.cta}),p(a,e,t,r,i)}function v(t,e){t&&e&&((0,a.U)()||(0,a.Ry)()===c.YZ||(0,r.increaseEventProductBuyNowCount)(t,e))}function y(t,e,o=1){t&&e&&((0,a.U)()||(0,a.Ry)()===c.YZ||(0,r.increaseEventProductAddToCartCount)(t,e,o))}},4400:function(t,e,o){o.r(e),o.d(e,{fireNeoAtcClick:function(){return n.fireNeoAtcClick},fireNeoBuyNowMetric:function(){return n.fireNeoBuyNowMetric},fireNeoOutsideAtcFunnel:function(){return n.fireNeoOutsideAtcFunnel},fireNeoProductClick:function(){return n.fireNeoProductClick},neoAddAllToCart:function(){return f},neoAddToCart:function(){return h}});var n=o(3297),r=o(5118),i=o(5566),a=o(6080),c=o(2567),d=o(5443);async function s(){const t="https://"+window.location.hostname+"/cart.json";return await fetch(t,{method:"GET"})}async function u(t,e,o,n,r="default",s,u,l,p){const m=(0,c.Ry)(),h=u?(0,i.wm)()+("72201044272"==m?`#${n}#${r}#${s?"olduser":"newuser"}:direct`:`#${n}:direct`):p?"_wt_vs":l?"_wt_vi":"";if(""==h||"_wt_vs"==h||"_wt_vi"==h||"77604192550"==m||"64157352183"==m||"80856187185"==m||"86486974743"==m||"62758289602"==m||"65972830359"==m||"75310563627"==m||"86968402213"==m||(0,d.hG)((0,d.VA)(),"order_tracking->track_using_wtot"))return;let f={id:t,quantity:e,properties:{...h?{[a.B_]:h}:{},...o}};return await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(t=>t.json()).catch(t=>{console.error("Whatmore :: Error while updating cart line item properties direct.",t)})}async function l(t,e,o,n,r="",l="",p="",m="",h="",f="",v=null){(0,c.yI)();const y=t=>{s().then(t=>t.json()).then(e=>{const o=e.items.find(e=>e.id==t);if(!o)return;u(o.key,o.quantity,o.properties,p,m,h,!0,!0,!0)}).catch(t=>{console.error("[Whatmore] updateATCLineItemProperties error:",t)})};if("STRNV8MHJTF"==t||"STR6HU283UZ"==t||"STR9T3LLEJB"==t||"STRWJMIOJNX"==t||"STRUDQ36YAC"==t||"STR1D5ONOZX"==t){console.log("Executing cart refresh script..");return void(document.getElementById("whatsmorecart").value=Math.random())}if("57217876118"===t){async function j(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e),o.append("sections","side-cart");const n=await fetch("/cart/add.js",{method:"POST",body:o,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"}}).then(t=>t.json());n.status?console.error("atc failed",n.description):(window.ajaxCart.load(n),setTimeout(()=>{y(t)},500))}return void j(r,1).then(()=>{setTimeout(e,o)}).catch(t=>{console.error("[Whatmore] ATC 57217876118 error:",t)})}if("75310563627"===t){async function E(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e),o.append("sections","cart-drawer,cart-icon-bubble");const n=await fetch("/cart/add.js",{method:"POST",body:o,headers:{Accept:"application/javascript"}}).then(t=>t.json());if(n.status)return void console.error("atc failed",n.description);const r=document.querySelector("cart-drawer");r&&(r.renderContents(n),r.classList.remove("is-empty"),r.open())}return E(r,1).then(()=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("[Whatmore] ATC 75310563627 error:",t)}),void setTimeout(e,o)}if("81308287252"===t)return(async()=>{const t={};(0,d.hG)((0,d.VA)(),"order_tracking->track_using_wtot")||(t[a.B_]=`${(0,i.wm)()}#${p}:direct`);const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(r),quantity:1,properties:t})}).then(t=>t.json()).catch(()=>null);e&&!e.status?setTimeout(()=>{const t=document.querySelector(".iCartBtnToggle")||document.querySelector("#iCartBtnToggle");t?t.click():console.warn("[Whatmore] iCart toggle not found for 81308287252")},250):console.error("[Whatmore] ATC 81308287252 failed:",e&&e.description)})(),void setTimeout(e,o);if("67841720509"===t){async function O(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(t),quantity:e})});o.ok?(document.dispatchEvent(new CustomEvent("on:cart:change",{bubbles:!0,cancelable:!1})),document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:refresh",{bubbles:!0}))):console.error("[Whatmore] ATC 67841720509 failed:",await o.text())}return O(r,1).then(()=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("[Whatmore] ATC 67841720509 error:",t)}),void setTimeout(e,o)}if("72603631788"===t||"5220302897"===t){const k=new FormData;k.append("id",r),k.append("quantity","1"),v&&k.append("properties[Size]",v);try{const q=await fetch("/cart/add.js",{method:"POST",body:k}),N=await q.json();N.id?setTimeout(()=>{y(r),window.location.href="/cart"},500):console.error("Afrozeh ATC failed:",N)}catch(_){console.error("Afrozeh ATC error:",_)}return void setTimeout(e,o)}if("67083239728"===t){try{const P=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:r,quantity:1}]})});P.ok||console.error("[ATC] Add to cart failed:",P.status)}catch(_){console.error("[ATC] Error while adding to cart:",_)}return setTimeout(()=>{y(r)},1e3),void setTimeout(e,o)}if("61442818186"===t){async function L(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});if(!o.ok)return void console.error("[ATC] Add to cart failed:",o.status);document.dispatchEvent(new CustomEvent("cart:build"));const n=document.querySelector(".js-drawer-open-cart");n&&n.click()}return L(r,1).then(()=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("[Whatmore] ATC 61442818186 error:",t)}),void setTimeout(e,o)}if("62226792677"===t){async function W(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});var n;o.ok?("function"===typeof(null===(n=window.cleverSopify)||void 0===n?void 0:n.onCartUpdate)&&window.cleverSopify.onCartUpdate(1,1,l),setTimeout(()=>{y(t)},500)):console.error("[ATC] Add to cart failed:",o.status)}return W(r).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("60595503283"===t){async function D(t,e=1){try{const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,quantity:e})});o.ok?setTimeout(()=>{y(t),window.location.href="/cart"},500):console.error("Failed to add item to cart:",o.status)}catch(_){console.error("Error adding to cart:",_)}}return D(r,1),void setTimeout(e,o)}if("72915616066"===t){function I(){var t,e;const o=window.customElements.get("cart-drawer")&&document.querySelector("cart-drawer");let n=[];const r=new CustomEvent("cart:prepare-bundled-sections",{bubbles:!0,detail:{sections:n}});document.documentElement.dispatchEvent(r);const i=n.length>0,a="string"===typeof(null===(t=window.themeVariables)||void 0===t||null===(e=t.settings)||void 0===e?void 0:e.cartType);return(!a||"page"!==window.themeVariables.settings.cartType)&&(o&&i&&a)}async function R(t,e){document.documentElement.dispatchEvent(new CustomEvent("theme:loading:start",{bubbles:!0}));let o=[];document.documentElement.dispatchEvent(new CustomEvent("cart:prepare-bundled-sections",{bubbles:!0,detail:{sections:o}}));const n=await fetch(`${window.Shopify.routes.root}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}],sections:o.join(",")})});if(document.documentElement.dispatchEvent(new CustomEvent("theme:loading:end",{bubbles:!0})),!n.ok)return console.error("[ATC] Add to cart failed:",n.status),document.dispatchEvent(new CustomEvent("cart:refresh")),!1;const r=await n.json(),i=await(await fetch(`${window.Shopify.routes.root}cart.js`)).json();return i.sections=r.sections,document.documentElement.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0,detail:{baseEvent:"variant:add",cart:i}})),setTimeout(()=>{y(t)},500),!0}async function J(t,e=1){return I()?R(t,e):async function(t,e,o){const n=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return n.ok?(setTimeout(()=>{o(t)},500),setTimeout(()=>{var t,e;window.location.href=`${(null===(t=window.Shopify)||void 0===t||null===(e=t.routes)||void 0===e?void 0:e.root)||"/"}cart`},1e3),!0):(console.error("[ATC Fallback] Add to cart failed:",n.status),!1)}(t,e,y)}return J(r).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("44061622423"===t){async function V(t,e=1){const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});o.ok?window.cart&&"function"===typeof window.cart.getCart?(window.cart.getCart(),setTimeout(()=>{y(t)},500)):fetch("/cart?section_id=api-cart-items").then(t=>t.text()).then(e=>{const o=document.createElement("div");if(o.innerHTML=e,window.cart&&"function"===typeof window.cart.build){const t=o.querySelector("[data-api-content]");t&&window.cart.build(t)}document.dispatchEvent(new CustomEvent("theme:product:added",{bubbles:!0})),setTimeout(()=>{y(t)},500)}).catch(()=>{const e=document.querySelector('[href="/cart"], [data-cart-toggle], a[href*="/cart"]');e&&e.click(),setTimeout(()=>{y(t)},500)}):console.error("[ATC] Add to cart failed:",o.status)}return V(r).catch(t=>{console.error("[Whatmore] Error:",t)}),void setTimeout(e,o)}if("60183445561"===t){async function x(t,e=1,o="/cart"){const n=new URLSearchParams;n.append("id",t),n.append("quantity",e.toString()),n.append("return_to",o);const r=await fetch("https://tapee.in/cart/add",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString(),credentials:"include"}),i=await r.text();return r.ok&&setTimeout(()=>{y(t),window.location.href="https://tapee.in/cart"},500),i}return x(r).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("22907887"===t){async function F(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e.toString());const n=document.querySelector("cart-notification, cart-drawer");if(n){const t=n.getSectionsToRender();o.append("sections",t.map(t=>t.id).join(","))}o.append("sections_url",window.location.pathname);const r=await fetch("/cart/add.js",{method:"POST",body:o});if(!r.ok){const t=await r.text();throw new Error(`Failed to add to cart: ${t}`)}const i=await r.json();return n&&n.renderContents&&n.renderContents(i),document.body.classList.remove("overflow-hidden"),document.querySelectorAll(".atc-container.active, .atc-variant-container.active, .pdp-atc-container.active").forEach(t=>t.classList.remove("active")),window.dispatchEvent(new CustomEvent("cart:added",{detail:{variantId:t,quantity:e,data:i}})),i}return F(r).then(t=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("28575536"===t||"64287408360"===t||"8473575520"===t||"65972830359"===t||"75000480020"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.handleFloCartBtn&&window.handleFloCartBtn(),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("[Whatmore] Ripped Up Nutrition ATC error:",t)),void setTimeout(e,o);if("58692075703"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("[Whatmore] Lakshita ATC error:",t)),void setTimeout(e,o);if("22907887"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>t.json()).then(t=>{setTimeout(()=>{y(r)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("58501496967"===t)return(async()=>{const t=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:r,quantity:1}]})});t.ok?(window.ajaxCart&&"function"===typeof window.ajaxCart.load&&window.ajaxCart.load(),window.jQuery&&window.jQuery("body").trigger("drawer.open"),setTimeout(()=>{y(r)},500)):console.error("[Whatmore] ATC 58501496967 failed:",t.status)})().catch(t=>console.error("[Whatmore] ATC 58501496967 error:",t)),void setTimeout(e,o);if("56444977250"===t){const M=document.querySelector('button[data-pf-type="ProductATC2"]');return M?(l&&M.setAttribute("data-product-id",l),M.click(),setTimeout(()=>{s().then(t=>t.json()).then(t=>{const e=t.items.find(t=>String(t.id)===String(r));if(e){u(e.key,e.quantity,e.properties,p,m,h,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===f||void 0===f||null===(w=f.split("?"))||void 0===w?void 0:w[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html").querySelector('button[data-pf-type="ProductATC2"]');e&&l&&e.setAttribute("data-product-id",l)}),void setTimeout(e,o));var w}if("64379584700"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>t.json()).then(t=>fetch("/cart.js")).then(t=>t.json()).then(t=>{$(".paira-cart-item-count").text(t.item_count),$(".paira-cartEmpty").hide(),$(".paira-cartNotEmpty").show(),$(".paira-cart-total-price .money").text("Rs. "+t.total_price/100),$(".cart-drop").addClass("open"),$(".cart-icon").trigger("mouseenter"),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("66947219508"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(r),quantity:1}]})}).then(async()=>{const t=document.getElementById("mini-cart");t&&"function"===typeof t._rerenderCart&&await t._rerenderCart({detail:{openMiniCart:!0}}),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("[Whatmore] ATC 66947219508 error:",t)),void setTimeout(e,o);if("76767920441"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>t.json()).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{y(r)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("70840582336"===t){const G=r,U=1,B=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(B){let Q=B.querySelector('input[name="id"]');Q||(Q=document.createElement("input"),Q.type="hidden",Q.name="id",B.appendChild(Q)),Q.disabled=!1,Q.value=G;const H=B.querySelector('input[name="quantity"]');H&&(H.value=U);const z=B.querySelector('button[data-add-to-cart], button[type="submit"]');return z?(z.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),z.click(),z.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{y(G)},500),void setTimeout(e,o)}return void fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:G,quantity:U}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{y(G)},500),setTimeout(e,o)}).catch(t=>{console.error("[ATC] error for 70840582336:",t),setTimeout(e,o)})}if("64683278550"===t){try{const X=document.querySelector('form[action="/cart/add"]');if(!X)return console.warn("[ATC 64683278550] form not found"),void setTimeout(e,o);const K=X.querySelector('input[name="id"]');if(!K)return console.warn("[ATC 64683278550] id input not found"),void setTimeout(e,o);K.value=r;const Z=X.querySelector('button[type="submit"]');if(!Z)return console.warn("[ATC 64683278550] submit button not found"),void setTimeout(e,o);Z.click(),setTimeout(()=>{y(r)},500),setTimeout(e,o)}catch(A){console.error("[ATC 64683278550] error:",A),setTimeout(e,o)}return}if("95562924310"===t||"61810999367"===t){try{const Y=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:r,quantity:1}]})});if(Y.ok){const tt=await Y.json();document.dispatchEvent(new CustomEvent("cart:update",{detail:{cart:tt}})),document.dispatchEvent(new CustomEvent("theme:cart:refresh",{detail:{target:"product_flood_atc"},bubbles:!0})),setTimeout(()=>{y(r)},500)}else console.error("[ATC 95562924310] Add to cart failed:",Y.status)}catch(_){console.error("[ATC 95562924310] error:",_)}return void setTimeout(e,o)}if("45050691744"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r,quantity:1})}).then(t=>t.json()).then(t=>{jQuery.ajax({type:"GET",url:"/",dataType:"html",success:function(t){jQuery(".drawer__inner.cart-drawer-content").html(jQuery(t).find(".drawer__inner.cart-drawer-content").html()),jQuery(".custom_doscunt_bar").html(jQuery(t).find(".custom_doscunt_bar").html()),jQuery(".some_js_items").html(jQuery(t).find(".some_js_items").html()),jQuery(".header-cart-icon__count").html(jQuery(t).find(".header-cart-icon__count").html());try{jQuery("#FreeShippingText").slick({dots:!0,autoplay:!0,autoplaySpeed:2500,arrows:!0})}catch(e){}jQuery("div#HeaderCartIcon button").trigger("click"),setTimeout(()=>{y(r)},500)}})}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("55337746621"===t){async function et(t,e=1){var o;await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});const n=await fetch("/cart.js").then(t=>t.json());document.querySelectorAll("[data-cart-count]").forEach(t=>{const e=t.querySelector(":scope > span:last-of-type");e&&(e.textContent=n.item_count)});const r=document.querySelector("[data-cart-container]");if(!r)return;const i=((null===(o=r.parentElement)||void 0===o?void 0:o.id)||"").replace("shopify-section-","");let a=null;if(i){const t=await fetch(`/?sections=${encodeURIComponent(i)}`).then(t=>t.json()).catch(()=>null);if(null!==t&&void 0!==t&&t[i]){const e=document.createElement("div");e.innerHTML=t[i];const o=e.querySelector("[data-cart-container]");o&&(a=o.innerHTML)}}if(!a){const t=await fetch("/cart").then(t=>t.text()),e=(new DOMParser).parseFromString(t,"text/html").querySelector("[data-cart-container]");e&&(a=e.innerHTML)}if(!a)return;r.innerHTML=a,r.classList.add("is-drawer-open"),document.body.classList.add("is-scroll-disabled");const c=()=>{r.classList.remove("is-drawer-open"),document.body.classList.remove("is-scroll-disabled")};r.querySelectorAll("[data-cart-drawer-toggle]").forEach(t=>{t.addEventListener("click",t=>{t.preventDefault(),c()})}),document.addEventListener("keydown",t=>{"Escape"===t.key&&c()},{once:!0})}return et(r,1).then(()=>{setTimeout(()=>{y(r)},500)}).catch(t=>{console.error("[Whatmore] ATC 55337746621 error:",t)}),void setTimeout(e,o)}if("12175954"===t){async function ot(t,e=1){const o=await fetch(theme.routes.cart_add_url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:t,quantity:e}]})});return o.ok?(document.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0,cancelable:!1,detail:{openDrawer:!0}})),setTimeout(()=>{y(t)},500),!0):(console.error("[ATC] Add to cart failed:",o.status),!1)}return ot(r).catch(t=>{console.error("[Whatmore] ATC 12175954 error:",t)}),void setTimeout(e,o)}if("2754609263"===t){const nt=()=>{const t=["cart:open","CartDrawer:open","drawerOpen"],e=[document,window];try{window.parent&&window.parent!==window&&window.parent.document&&e.push(window.parent.document)}catch(n){}const o=t=>e.forEach(e=>{try{e.dispatchEvent(new CustomEvent(t,{bubbles:!0}))}catch(n){console.error(`[Whatmore] ATC 2754609263 dispatch ${t} failed:`,n)}});["cart:refresh","cart:build","cart:updated"].forEach(o),setTimeout(()=>t.forEach(o),150)};async function rt(t,e=1){var o,n,r;const i=(null===(o=window.Shopify)||void 0===o||null===(n=o.routes)||void 0===n?void 0:n.root)||"/",a={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"},c=Number(e)||1,d=()=>fetch(`${i}cart/add.js`,{method:"POST",headers:a,body:JSON.stringify({items:[{id:t,quantity:c}]})}).then(t=>t.json()),s=await fetch(`${i}cart.js`,{headers:{Accept:"application/json"},cache:"no-store"}).then(t=>t.json()).catch(()=>null),u=null===s||void 0===s||null===(r=s.items)||void 0===r?void 0:r.find(e=>e.id==t);let l;var p,m;(u?(l=await fetch(`${i}cart/change.js`,{method:"POST",headers:a,body:JSON.stringify({id:u.key,quantity:u.quantity+c})}).then(t=>t.json()).catch(()=>null),l&&!l.status||(console.warn("[Whatmore] ATC 2754609263 change.js rejected, falling back to add.js"),l=await d())):l=await d(),l&&!l.status)?(nt(),setTimeout(()=>{y(t)},500)):console.error("[Whatmore] ATC 2754609263 failed:",(null===(p=l)||void 0===p?void 0:p.description)||(null===(m=l)||void 0===m?void 0:m.message))}return rt(r).catch(t=>{console.error("[Whatmore] ATC 2754609263 error:",t)}),void setTimeout(e,o)}if("25786679341"===t)return(async(t,e)=>{const o={};(0,d.hG)((0,d.VA)(),"order_tracking->track_using_wtot")||(o[a.B_]=`${(0,i.wm)()}#${p}:direct`);const n=await fetch(`${(null===(t=window.Shopify)||void 0===t||null===(e=t.routes)||void 0===e?void 0:e.root)||"/"}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(r),quantity:1,properties:o}]})}).then(t=>t.json()).catch(()=>null);if(n&&!n.status)if(document.dispatchEvent(new CustomEvent("vd:cart:added",{bubbles:!0,detail:{items:n.items||[n]}})),"function"===typeof window.vdOpenCart)window.vdOpenCart();else{const t=document.querySelector("a.vd-bag");t?t.click():console.warn("[Whatmore] vdOpenCart missing and no .vd-bag for 25786679341")}else console.error("[Whatmore] ATC 25786679341 failed:",n&&n.description)})().catch(t=>{console.error("[Whatmore] ATC 25786679341 error:",t)}),void setTimeout(e,o);if("8111554613"===t)return(async()=>{const t=()=>{const t=document.querySelector("cart-drawer#CartDrawer");t?(document.querySelectorAll(".add-to-cart-popup, .exit-intent-popup").forEach(t=>t.classList.add("hide")),t.removeAttribute("hidden"),t.removeAttribute("inert"),"function"!==typeof t.show||t.open?(t.setAttribute("open","true"),t.setAttribute("active","true")):t.show()):console.warn("[Whatmore] cart-drawer#CartDrawer not found for 8111554613")},e=()=>{const e=document.querySelector("cart-drawer#CartDrawer");let o=!1;const n=()=>{o||(o=!0,r.disconnect(),clearTimeout(i),t())},r=new MutationObserver(()=>{const t=document.querySelector("cart-drawer#CartDrawer");t&&t!==e&&n()});r.observe(document.body,{childList:!0,subtree:!0});const i=setTimeout(n,3e3)};if("function"!==typeof window.cartGiftUpdate){console.warn("[Whatmore] cartGiftUpdate missing for 8111554613, falling back to /cart/add.js");const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(r),quantity:1}]})}).then(t=>t.json()).catch(()=>null);return!e||e.status?void console.error("[Whatmore] ATC 8111554613 fallback failed:",e&&e.description):void setTimeout(()=>{y(r),document.dispatchEvent(new CustomEvent("cart:updated",{detail:{cart:e}})),t()},500)}const{price:o,productType:n}=await(async()=>{try{var t,e;const o=await fetch("/cart.js",{headers:{Accept:"application/json"},cache:"no-store"}).then(t=>t.json()),n=null===o||void 0===o||null===(t=o.items)||void 0===t?void 0:t.find(t=>String(t.variant_id)===String(r));if(n)return{price:n.price,productType:null!==(e=n.product_type)&&void 0!==e?e:""}}catch(i){}try{var o,n;const t=(f||window.location.href).split(/[?#]/)[0],e=await fetch(`${t}.js`,{headers:{Accept:"application/json"}}).then(t=>t.json()),i=null===e||void 0===e||null===(o=e.variants)||void 0===o?void 0:o.find(t=>String(t.id)===String(r));if(i)return{price:i.price,productType:null!==(n=e.product_type)&&void 0!==n?n:""}}catch(i){}return{price:0,productType:""}})(),i=()=>{document.removeEventListener("cart:updated",i),clearTimeout(a),y(r),e()},a=setTimeout(()=>{document.removeEventListener("cart:updated",i),y(r),e()},2500);document.addEventListener("cart:updated",i,{once:!1}),window.cartGiftUpdate(String(r),o,1,n,"ADD_TO_CART")})().catch(t=>{console.error("[Whatmore] ATC 8111554613 error:",t)}),void setTimeout(e,o);if("5801421"===t)return(async()=>{const t={};(0,d.hG)((0,d.VA)(),"order_tracking->track_using_wtot")||(t[a.B_]=`${(0,i.wm)()}#${p}:direct`);const e=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:Number(r),quantity:1,properties:t})}).then(t=>t.json()).catch(()=>null);if(!e||e.status)return void console.error("[Whatmore] ATC 5801421 failed:",e&&e.description);let o=!1;const n=()=>{if(o)return!0;const t=window.Rebuy&&window.Rebuy.SmartCart;if(!t||"function"!==typeof t.show)return!1;if("ready"!==t.status&&!t.hasBoundEvents&&!document.querySelector("#rebuy-cart"))return!1;o=!0;try{window.Rebuy.Cart&&window.Rebuy.Cart.fetchCart()}catch(e){}return t.show(),!0};document.addEventListener("rebuy:smartcart.ready",n,{once:!0});const c=(t=0)=>{if(n())return;if(t<40)return void setTimeout(()=>c(t+1),150);const e=window.Rebuy&&window.Rebuy.SmartCart;if(e&&"function"===typeof e.show)return o=!0,void e.show();const r=document.querySelector('[data-cart-open], a[href$="/cart"]:not([disable-rebuy], .disable-rebuy)');r?r.click():console.warn("[Whatmore] Rebuy SmartCart unavailable for 5801421")};c()})().catch(t=>{console.error("[Whatmore] ATC 5801421 error:",t)}),void setTimeout(e,o);const T=e=>{if("61126934766"==t){let t=e.querySelector(".productView-buttons").querySelector('form[action*="/cart/add"]');if(t)return t}let o=Array.from(e.querySelectorAll("product-form")).find(t=>t.querySelector('form > input[name="id"]')&&t.querySelector('form button[type="submit"]'));return o||(o=Array.from(e.querySelectorAll('form[action*="/cart/add"]')).find(t=>t.querySelector('button[type="submit"]'))),o},b=(e,o,n)=>{const r=e.cloneNode(!0);if(r){r.hasAttribute("data-product-variant-id")&&r.setAttribute("data-product-variant-id",o),r.hasAttribute("data-product-id")&&r.setAttribute("data-product-id",n);let e=r.querySelector('input[name="id"]');if(e)e.setAttribute("value",o),e.hasAttribute("disabled")&&e.removeAttribute("disabled");else{const t=r.querySelector('select[name="id"]');if(t){const e=t.querySelector('option[selected="selected"]');e&&e.setAttribute("value",o)}}const i=r.querySelector('input[name="product-id"]');i&&i.setAttribute("value",n);const a=document.createElement("div");return a.className="whatmore-atc",a.appendChild(r),document.body.appendChild(a),console.log(a,"formElement"),"92319318403"===t&&((t,e,o)=>{var n;const r=null!==(n=t.matches)&&void 0!==n&&n.call(t,"form")?t:t.querySelector("form");if(!r)return;let i=r.querySelector('input[name="id"]');i||(i=document.createElement("input"),i.type="hidden",i.name="id",r.prepend(i)),i.value=String(e),i.removeAttribute("disabled");const a=r.querySelector('select[name="id"]');a&&([...a.options].some(t=>t.value===String(e))?(a.value=String(e),[...a.options].forEach(t=>t.selected=t.value===String(e)),a.dispatchEvent(new Event("change",{bubbles:!0}))):a.removeAttribute("name"));const c=r.querySelector('input[name="product-id"]');c&&(c.value=String(o))})(a,o,n),a}},S=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},C=T(document);if(C||(null===C||void 0===C?void 0:C.length)>0){const it=b(C,r,l);S(it),setTimeout(()=>{y(r)},500),it.remove()}else{var g;fetch(null===f||void 0===f||null===(g=f.split("?"))||void 0===g?void 0:g[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=T(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=b(o,r,l);S(t),setTimeout(()=>{y(r)},500),t.remove()}})}setTimeout(e,o)}function p(t){return(0,d.hG)(t,"brand_metadata->domain_context")}async function m(t,e,o){const{product:i,event:a,customizations:s,widget:u,userType:p,closeClickComponent:m,onState:h}=t,f=(0,c.Ry)(),v=(0,r.getVariantIdFromSelectedOption)(o,e);if(!v)return h&&h("init"),{status:"noop"};h&&h("atcApiCallInProgress");try{const t="55586586685"===f&&"function"===typeof m;await l(f,t?m:()=>{},t?400:100,window.location.hostname,v,i.client_product_id,u,a&&a.location,p,i.product_link),(0,n.fireNeoAtcMetric)(a,i,1),(0,d.hG)(s,"product_config->navigate_to_cart_page")&&setTimeout(()=>{window.location.href=`${window.Shopify&&window.Shopify.routes&&window.Shopify.routes.root||"/"}cart`},500);const e=o.filter(t=>t&&"Default Title"!==t).join(" \xb7 ");return h&&h("added",e),{status:"added",variantId:v,variantLabel:e}}catch(y){return h&&h("errored"),console.error("Whatmore :: neo ATC add failed",y),{status:"errored"}}}async function h(t){const{product:e,event:o,customizations:n,mode:i="direct",selectedOptions:a,variants:d,onState:s}=t;if(!e||!o)return{status:"noop"};const u=(0,c.Ry)();if(a&&d)return m(t,d,a);let l;s&&s("productVariantDetailsApiCallInProgress");try{l=await(0,r.productDetailsDetailed)(e,p(n),u)}catch(v){return s&&s("errored"),{status:"errored"}}const h=l&&l.variants||[],f=(0,r.getVariantOptions)(l);if((0,r.isSingleVariantProduct)(f)||"direct"===i){if(!(0,r.atleastOneVariantAvailableInStock)(h))return s&&s("errored"),{status:"errored"};return m(t,h,[(0,r.getFirstAvailableOption)(f[0]),(0,r.getFirstAvailableOption)(f[1]),(0,r.getFirstAvailableOption)(f[2])])}return s&&s("awaitingVariantSelection"),{status:"needs_selection",variantOptions:f,variants:h}}async function f(t){const{products:e,event:o,customizations:i,widget:a,userType:d,onState:s}=t;if(!e||0===e.length||!o)return{status:"noop",added:0};const u=(0,c.Ry)();s&&s("productVariantDetailsApiCallInProgress");const m=(await Promise.all(e.map(async t=>{try{const e=await(0,r.productDetailsDetailed)(t,p(i),u),o=e&&e.variants||[],n=(0,r.getVariantOptions)(e);if(!(0,r.isSingleVariantProduct)(n))return null;if(!(0,r.atleastOneVariantAvailableInStock)(o))return null;const a=(0,r.getVariantIdFromSelectedOption)([(0,r.getFirstAvailableOption)(n[0]),(0,r.getFirstAvailableOption)(n[1]),(0,r.getFirstAvailableOption)(n[2])],o);return a?{product:t,variantId:a}:null}catch(e){return null}}))).filter(Boolean);if(0===m.length)return s&&s("init"),{status:"noop",added:0};s&&s("atcApiCallInProgress");try{const t=m.slice(0,-1),e=m[m.length-1];if(t.length){if(!await async function(t,e=1){if(!t||0===t.length)return!0;try{return(await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:t.map(t=>({id:t,quantity:e}))})})).ok}catch(o){return!1}}(t.map(t=>t.variantId),1))for(const{product:e,variantId:n}of t)await l(u,()=>{},100,window.location.hostname,n,e.client_product_id,a,o&&o.location,d,e.product_link)}return await l(u,()=>{},100,window.location.hostname,e.variantId,e.product.client_product_id,a,o&&o.location,d,e.product.product_link),m.forEach(({product:t})=>(0,n.fireNeoAtcMetric)(o,t,1)),s&&s("added"),{status:"added",added:m.length}}catch(h){return s&&s("errored"),console.error("Whatmore :: neo bulk ATC failed",h),{status:"errored",added:0}}}},5118:function(t,e,o){async function n(t,e=""){let o;if("27303477337"===e){var n,r;const e="https://"+window.location.hostname,i=window.location.pathname.split("/");o=e+"/"+(null!==i&&void 0!==i&&null!==(n=i[1])&&void 0!==n&&n.startsWith("en-")?(null===i||void 0===i?void 0:i[1])+"/":"")+(null===t||void 0===t||null===(r=t.product_link)||void 0===r?void 0:r.split(".co")[1])+".js"}else o=(null===t||void 0===t?void 0:t.product_link)+".js";const i=await fetch(o,{method:"GET"});if(!i.ok)throw new Error(`Error! status: ${i.status}`);return await i.json()}async function r(t){if(!t||!t.product_link)return null;const e=await fetch(t.product_link+".json",{method:"GET"});if(!e.ok)throw new Error("Error! status: "+e.status);return e.json()}async function i(t,e,o){if(t)return n(t,o)}function a(t){var e=[],o=[],n=[];const r=t&&t.variants||[],i=t&&t.options||[];return r.forEach(t=>{var r,a,c;t.option1&&e.push({option:t.option1,available:null===(r=t.available)||void 0===r||r,type:i[0]&&i[0].name}),t.option2&&o.push({option:t.option2,available:null===(a=t.available)||void 0===a||a,type:i[1]&&i[1].name}),t.option3&&n.push({option:t.option3,available:null===(c=t.available)||void 0===c||c,type:i[2]&&i[2].name})}),e=e.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),o=o.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),n=n.reduce((t,e,o)=>{var n=t.filter(t=>t.option==e.option);return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)},[]),[e,o,n]}function c(t){if(0==t.length)return null;const e=t.filter(t=>t.available);return 0==e.length?null:e[0].option}function d(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}function s(t,e){const o=e.filter(e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]);return 0==o.length?null:o[0].id}function u(t){if(t&&t.length>=1){return t.filter(t=>t.available).length>=1}return!1}o.r(e),o.d(e,{atleastOneVariantAvailableInStock:function(){return u},getFirstAvailableOption:function(){return c},getVariantIdFromSelectedOption:function(){return s},getVariantOptions:function(){return a},isSingleVariantProduct:function(){return d},productDetailsDetailed:function(){return i},productDetailsShopifyJS:function(){return n},productDetailsShopifyJSON:function(){return r}})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[126],{1839:function(e,t,n){function a(e,t){let n=document.getElementById(e);n||(n=document.createElement("style"),n.id=e,document.head.appendChild(n)),n.textContent=t}function r(e,t){if(!e)return null;const n=e[t];if(!n||"object"!==typeof n)return Object.assign({},e,{brandCss:""});const a="string"===typeof e.customCss?e.customCss:"";return Object.assign({},n,{brandCss:a})}n.d(t,{R:function(){return r},f:function(){return a}})},5348:function(e,t,n){n.r(t),n.d(t,{REGISTRY:function(){return v},renderNeoBanner:function(){return y}});var a=n(7983),r=n(6387),o=n(1839),i=n(9439),s=".wht-neo-banner-overlay{background:var(--wht-neo-banner-overlay,linear-gradient(to top,transparent 70%,rgba(0,0,0,.3)))}.wht-neo-banner[data-wht-mutebtn] .wht-neo-banner-mute{align-items:center;background:var(--wht-neo-banner-mute-bg,rgba(0,0,0,.4));border:none;border-radius:50%;color:#fff;cursor:pointer;display:flex;height:var(--wht-neo-banner-mute-size,39px);justify-content:center;padding:0;position:absolute;right:10px;top:10px;width:var(--wht-neo-banner-mute-size,39px);z-index:2}.wht-neo-banner-mute svg{height:55%;width:55%}.wht-neo-banner[data-wht-sound] .wht-neo-banner-mute{opacity:.7}.wht-neo-banner-nav{align-items:center;background:var(--wht-neo-banner-nav-bg,#fff);border:none;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.18);color:var(--wht-neo-banner-nav-color,#090a0b);cursor:pointer;display:flex;height:var(--wht-neo-banner-nav-size,36px);justify-content:center;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:var(--wht-neo-banner-nav-size,36px);z-index:2}.wht-neo-banner-nav-prev{left:10px}.wht-neo-banner-nav-next{right:10px}.wht-neo-banner-nav svg{display:block;height:42%;width:42%}.wht-neo-banner[data-wht-dots] .wht-neo-banner-dots{align-items:center;bottom:7%;display:flex;gap:var(--wht-neo-banner-dot-gap,24px);justify-content:center;left:0;position:absolute;right:0;z-index:2}.wht-neo-banner-dot{background:var(--wht-neo-banner-dot,#f8eeec);border:none;border-radius:999px;cursor:pointer;height:12px;padding:0;transition:width .2s ease,background .2s ease;width:12px}.wht-neo-banner-dot[data-wht-active]{background:var(--wht-neo-banner-dot-active,#343434);width:25px}.wht-neo-banner[data-wht-cta] .wht-neo-banner-cta{background:var(--wht-neo-banner-cta-bg,#fff);border-radius:var(--wht-neo-banner-cta-radius,5px);bottom:10%;color:var(--wht-neo-banner-cta-color,#343434);display:inline-block;font-size:var(--wht-neo-banner-cta-size,15px);font-weight:700;left:50%;padding:10px 22px;position:absolute;text-decoration:none;transform:translateX(-50%);white-space:nowrap;z-index:2}.wht-neo-banner[data-wht-cta] .wht-neo-banner-cta[data-wht-empty]{display:none}";const c="https://consumer.whatmore.live",d="banner",l=6e3,u="wht-neo-banner-css",h="wht-neo-banner-critical",b=".wht-neo-banner-widget{width:100%}.wht-neo-banner{position:relative;margin:0 auto;overflow:hidden;cursor:pointer;width:var(--wht-neo-banner-w,var(--wht-neo-banner-w-auto,100%));height:var(--wht-neo-banner-h,var(--wht-neo-banner-h-auto,220px))}.wht-neo-banner-video,.wht-neo-banner-img{width:100%;height:100%;object-fit:cover;display:block;background:#ececec}.wht-neo-banner-overlay{position:absolute;inset:0}.wht-neo-banner-mute,.wht-neo-banner-nav,.wht-neo-banner-dots,.wht-neo-banner-cta{display:none}";async function p(e){let t=null;try{t=new URLSearchParams(window.location.search).get("neoskin")}catch(h){}let n="";const a=t||e&&e.skin;a&&"default"!==a&&"a"!==a&&(n=await(0,r.P)(d,a));const i=a&&"default"!==a?a:"a",c=e&&e.customCss,l="string"===typeof c?c:c&&"object"===typeof c&&"string"===typeof c[i]?c[i]:"";return(0,o.f)(u,s+"\n"+n+(e&&e.brandCss?"\n"+e.brandCss:"")+(l?"\n"+l:"")),!0}const v={bannerMedia:{data:{source:"backend",field:"event.event_media_urls"},action:"bannerClick"},muteButton:{data:{source:"runtime",field:"video.muted"},action:"toggleMute"},navArrows:{data:{source:"runtime",field:"banner.activeIndex"},action:"step"},dots:{data:{source:"runtime",field:"banner.activeIndex"},action:"jump"},ctaButton:{data:{source:"backend",field:"event.cta"},action:"bannerClick"}};const m=(e,t=null)=>{const n=function(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(e){return null}}(),a=e.split(".").reduce((e,t)=>null==e?void 0:e[t],n);return null==a?t:a};async function w({shopId:e,widgetIdentity:t}){const n=t&&"wgt_default"!==t?`${c}/brand/${e}/eventset?widget_id=${t}&source_type=homepage&source_id=${e}&eventset_type=banner&status=active,active`:`${c}/get_eventset/${e}?eventset_type=banner&source=homepage&source_id=${e}`,{events:r}=(0,a.Po)(await fetch(n).then(e=>e.json()),"banner");return r}const g=e=>"image"===e.event_type;function f(e,t,n,a){var r,o;const s=(0,i.vC)(),c=null!==(r=(0,i.eG)(t))&&void 0!==r?r:s.w,d=s.h>c,l=function(e,t,n){var a;const r=e&&e.querySelector("#"+t),o=r&&(null!==(a=r.getAttribute("data-wh"))&&void 0!==a?a:r.getAttribute("data")),i=null!=o?parseFloat(o):NaN;return isFinite(i)?i:n}(document,"whatmoreVideoTileSize",60)/100*Number(m(d?"banner_config.portrait_multiplier":"banner_config.landscape_multiplier",1)),u=m("banner_config.widget_aspect_ratios"),h=null!==(o=u&&u[n]&&u[n][d?"portrait":"landscape"])&&void 0!==o?o:a&&a[d?"portrait":"landscape"],b=Number(null!==h&&void 0!==h?h:m(d?"banner_config.portrait_aspect_ratio":"banner_config.landscape_aspect_ratio",d?1:.5625)),p=!!m("banner_config.is_full_screen"),v=c,w=v*l;return e.style.setProperty("--wht-neo-banner-w-auto",p?"100%":Math.round(w)+"px"),e.style.setProperty("--wht-neo-banner-h-auto",Math.round((p?v:w)*b)+"px"),d}async function y(e){const{rootElement:t,widgetContainer:n,shopId:a,widgetIdentity:r,bannerArOverride:i,whatmoreRootId:s,onWidgetView:c,onBannerClick:u,onBannerCtaClick:v}=e;if(!t||!a)return!1;let y;(0,o.f)(h,b);try{[y]=await Promise.all([w({shopId:a,widgetIdentity:r}),p((0,o.R)(e.neoJson,d))])}catch(U){return!1}const _=()=>{const e=document.querySelector(`.whatmore-shimmer-container[data-widget-id="${s}"]`);e&&e.remove(),t.removeAttribute("data-shimmer-active"),n&&(n.style.minHeight="0px")};if(!y||!y.length)return _(),!0;const k=document.createElement("div");k.className="wht-neo-banner-widget";const x=document.createElement("div");x.className="wht-neo-banner",x.dataset.role="bannerMedia",a&&x.setAttribute("data-wht-shop",a),r&&x.setAttribute("data-wht-widget",r),m("banner_config.show_mute_button")&&x.setAttribute("data-wht-mutebtn","1"),m("banner_config.show_navigation_dots")&&x.setAttribute("data-wht-dots","1"),m("banner_config.show_cta")&&x.setAttribute("data-wht-cta","1");const C=!!m("banner_config.is_banner_clickable"),E=m("banner_config.selected_dot_color");E&&x.style.setProperty("--wht-neo-banner-dot-active",E);let A=f(x,n,r,i);const I=document.createElement("video");I.className="wht-neo-banner-video",I.muted=!0,I.loop=!0,I.playsInline=!0,I.preload="auto",I.setAttribute("muted",""),I.setAttribute("playsinline",""),I.setAttribute("webkit-playsinline","");const N=document.createElement("img");N.className="wht-neo-banner-img",N.alt="",x.appendChild(I),x.appendChild(N);const z=document.createElement("div");z.className="wht-neo-banner-overlay";const P=document.createElement("button");P.type="button",P.className="wht-neo-banner-mute",P.dataset.role="muteButton",P.setAttribute("aria-label","Toggle sound"),P.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M11 5 6 9H2v6h4l5 4V5z" fill="currentColor"/><path d="M16 9l5 6M21 9l-5 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>';const L=e=>{const t=document.createElement("button");t.type="button",t.className="wht-neo-banner-nav wht-neo-banner-nav-"+e,t.dataset.role="navArrows",t.setAttribute("aria-label","prev"===e?"Previous":"Next");const n="prev"===e?"M15 5l-7 7 7 7":"M9 5l7 7-7 7";return t.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="'+n+'" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>',t},M=L("prev"),j=L("next"),B=document.createElement("div");B.className="wht-neo-banner-dots",B.dataset.role="dots";const S=y.map((e,t)=>{const n=document.createElement("button");return n.type="button",n.className="wht-neo-banner-dot",n.setAttribute("aria-label","Slide "+(t+1)),B.appendChild(n),n}),T=document.createElement("a");T.className="wht-neo-banner-cta",T.dataset.role="ctaButton",z.appendChild(P),y.length>1&&(z.appendChild(M),z.appendChild(j),z.appendChild(B)),z.appendChild(T),x.appendChild(z),k.appendChild(x);let O=-1,$=null,R=!0,H=!1;const F=()=>{I.muted=!H||!R},q=e=>(e.cta||[]).filter(e=>e&&e.cta_link&&!/whatmore\.ai/i.test(e.cta_link)).sort((e,t)=>{var n,a;return(null!==(n=e.cta_id)&&void 0!==n?n:0)-(null!==(a=t.cta_id)&&void 0!==a?a:0)})[0]||null,V=e=>{clearTimeout($),$=setTimeout(()=>G((O+1)%y.length),e)},G=e=>{O=(e%y.length+y.length)%y.length,clearTimeout($);const t=y[O],n=function(e,t){const n=e.event_media_urls,a=t?"portrait":"landscape",r=t?"landscape":"portrait";if(n){if(g(e))return n.primary&&n.primary[a]&&n.primary[a].content_image_original||"";const t=(e,t)=>{const a=n[e]&&n[e][t];return a&&(a.content_video_1080p||a.content_video_original)||""};return t("secondary",a)||t("primary",a)||t("primary",r)}return e.event_m3u8_url||e.event_hls_url||""}(t,A),a=function(e,t){const n=e.event_media_urls,a=t?"portrait":"landscape";return n?n.primary&&n.primary[a]&&n.primary[a].poster_image||n.secondary&&n.secondary[a]&&n.secondary[a].poster_image||e.poster_image||"":e.poster_image||""}(t,A);S.forEach((e,t)=>e.toggleAttribute("data-wht-active",t===O));const r=q(t);if(r&&r.cta_link&&(t.cta||[]).length>1?(T.href=(e=>e&&m("utm.activate_utm")?e+"?"+m("utm.utm_source","")+"&"+m("utm.utm_campaign","")+"&"+m("utm.utm_medium_cart_page",""):e)(r.cta_link),T.textContent=r.cta_title||"Shop now",T.removeAttribute("data-wht-empty")):T.setAttribute("data-wht-empty","1"),!n)return I.style.display="none",void(N.style.display="none");if(g(t))I.pause(),I.style.display="none",N.style.display="",N.src=n,V(l);else{if(N.style.display="none",I.style.display="",a&&(I.poster=a),F(),I.src=n,I.load(),R){const e=I.play();e&&e.catch&&e.catch(()=>{})}const e=()=>{isFinite(I.duration)&&I.duration>0&&V(1e3*I.duration)};I.removeEventListener("loadedmetadata",e),I.addEventListener("loadedmetadata",e,{once:!0})}};M.addEventListener("click",e=>{e.stopPropagation(),G(O-1)}),j.addEventListener("click",e=>{e.stopPropagation(),G(O+1)}),S.forEach((e,t)=>e.addEventListener("click",e=>{e.stopPropagation(),G(t)}));const J=e=>{e.stopPropagation(),H=!H,F(),x.toggleAttribute("data-wht-sound",H)};if(P.addEventListener("click",J),T.addEventListener("click",e=>{e.stopPropagation(),null===u||void 0===u||u(y[O]),null===v||void 0===v||v(y[O],q(y[O]))}),x.addEventListener("click",e=>{null===u||void 0===u||u(y[O]);const t=q(y[O]);C&&t&&t.cta_link?window.open(t.cta_link,"_self"):J(e)}),"IntersectionObserver"in window){new IntersectionObserver(e=>{e.forEach(e=>{if(R=e.isIntersecting,F(),!g(y[O]||{}))if(R){const e=I.play();e&&e.catch&&e.catch(()=>{})}else I.pause()})},{threshold:.01}).observe(x)}let Y=!1;if(window.addEventListener("resize",()=>{Y||(Y=!0,requestAnimationFrame(()=>{Y=!1;const e=A;A=f(x,n,r,i),A!==e&&G(O)}))},{passive:!0}),t.innerHTML="",t.appendChild(k),t.style.opacity="1",G(0),c)if("IntersectionObserver"in window){new IntersectionObserver((e,t)=>{e.some(e=>e.isIntersecting)&&(c(),t.disconnect())},{threshold:0}).observe(x)}else c();return _(),!0}},6387:function(e,t,n){n.d(t,{P:function(){return r}});const a={standard:()=>n.e(508).then(n.t.bind(n,5071,17)),card:()=>n.e(545).then(n.t.bind(n,9362,17)),"mosaic-ring":()=>n.e(457).then(n.t.bind(n,8171,17)),"mosaic-plain":()=>n.e(764).then(n.t.bind(n,5635,17)),hoverplay:()=>n.e(781).then(n.t.bind(n,787,17)),"info-strip":()=>n.e(94).then(n.t.bind(n,2109,17)),"text-overlay":()=>n.e(833).then(n.t.bind(n,3930,17)),focused:()=>n.e(506).then(n.t.bind(n,1987,17)),coverflow:()=>n.e(172).then(n.t.bind(n,9033,17)),minimal:()=>n.e(244).then(n.t.bind(n,6362,17)),feed:()=>n.e(315).then(n.t.bind(n,7456,17)),circle:()=>n.e(31).then(n.t.bind(n,5112,17)),viewmore:()=>n.e(343).then(n.t.bind(n,7672,17)),overlay:()=>n.e(936).then(n.t.bind(n,75,17)),"stories-b":()=>n.e(565).then(n.t.bind(n,1958,17)),"product-broad-no-cta":()=>n.e(838).then(n.t.bind(n,5955,17)),"product-broad-atc":()=>n.e(648).then(n.t.bind(n,2699,17)),"product-narrow":()=>n.e(594).then(n.t.bind(n,4859,17)),"product-premium":()=>n.e(566).then(n.t.bind(n,2529,17)),"product-navigation":()=>n.e(45).then(n.t.bind(n,4368,17)),"product-multi-product":()=>n.e(856).then(n.t.bind(n,6084,17)),"product-thumbnail-strip":()=>n.e(620).then(n.t.bind(n,4383,17)),"product-link-only":()=>n.e(750).then(n.t.bind(n,3365,17)),"product-minimal-atc":()=>n.e(685).then(n.t.bind(n,1890,17))};async function r(e,t){const n=a["carousel"===e||"collections"===e?t:e+"-"+t];if(!n)return"";try{return(await n()).default||""}catch(r){return""}}},7983:function(e,t,n){function a(e,t=!1){if(null==e)return{events:[],all_events:[]};if(t){return{events:e.events&&e.events[0]&&e.events[0].events||[],all_events:e.all_events||[]}}return{events:e.events||[],all_events:e.all_events||[]}}function r(e,t){if(null==e||!e.eventsets||!e.eventsets[t])return{events:[],all_events:[]};return{events:(Array.isArray(e.eventsets[t])?e.eventsets[t]:[]).reduce((e,t)=>e.concat(t&&t.events||[]),[]),all_events:[]}}n.d(t,{Np:function(){return a},Po:function(){return r}})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[126],{1839:function(e,t,n){function a(e,t){let n=document.getElementById(e);n||(n=document.createElement("style"),n.id=e,document.head.appendChild(n)),n.textContent=t}function r(e,t){if(!e)return null;const n=e[t];if(!n||"object"!==typeof n)return Object.assign({},e,{brandCss:""});const a="string"===typeof e.customCss?e.customCss:"";return Object.assign({},n,{brandCss:a})}n.d(t,{R:function(){return r},f:function(){return a}})},5348:function(e,t,n){n.r(t),n.d(t,{REGISTRY:function(){return m},renderNeoBanner:function(){return y}});var a=n(7983),r=n(6387),o=n(1839),i=n(9439),s=".wht-neo-banner-overlay{background:var(--wht-neo-banner-overlay,linear-gradient(to top,transparent 70%,rgba(0,0,0,.3)))}.wht-neo-banner[data-wht-mutebtn] .wht-neo-banner-mute{align-items:center;background:var(--wht-neo-banner-mute-bg,rgba(0,0,0,.4));border:none;border-radius:50%;color:#fff;cursor:pointer;display:flex;height:var(--wht-neo-banner-mute-size,39px);justify-content:center;padding:0;position:absolute;right:10px;top:10px;width:var(--wht-neo-banner-mute-size,39px);z-index:2}.wht-neo-banner-mute svg{height:55%;width:55%}.wht-neo-banner[data-wht-sound] .wht-neo-banner-mute{opacity:.7}.wht-neo-banner-nav{align-items:center;background:var(--wht-neo-banner-nav-bg,#fff);border:none;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.18);color:var(--wht-neo-banner-nav-color,#090a0b);cursor:pointer;display:flex;height:var(--wht-neo-banner-nav-size,36px);justify-content:center;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:var(--wht-neo-banner-nav-size,36px);z-index:2}.wht-neo-banner-nav-prev{left:10px}.wht-neo-banner-nav-next{right:10px}.wht-neo-banner-nav svg{display:block;height:42%;width:42%}.wht-neo-banner[data-wht-dots] .wht-neo-banner-dots{align-items:center;bottom:7%;display:flex;gap:var(--wht-neo-banner-dot-gap,24px);justify-content:center;left:0;position:absolute;right:0;z-index:2}.wht-neo-banner-dot{background:var(--wht-neo-banner-dot,#f8eeec);border:none;border-radius:999px;cursor:pointer;height:12px;padding:0;transition:width .2s ease,background .2s ease;width:12px}.wht-neo-banner-dot[data-wht-active]{background:var(--wht-neo-banner-dot-active,#343434);width:25px}.wht-neo-banner[data-wht-cta] .wht-neo-banner-cta{background:var(--wht-neo-banner-cta-bg,#fff);border-radius:var(--wht-neo-banner-cta-radius,5px);bottom:10%;color:var(--wht-neo-banner-cta-color,#343434);display:inline-block;font-size:var(--wht-neo-banner-cta-size,15px);font-weight:700;left:50%;padding:10px 22px;position:absolute;text-decoration:none;transform:translateX(-50%);white-space:nowrap;z-index:2}.wht-neo-banner[data-wht-cta] .wht-neo-banner-cta[data-wht-empty]{display:none}";const c="https://consumer.whatmore.live",d="banner",l=6e3,u="wht-neo-banner-css",h="wht-neo-banner-critical",p=".wht-neo-banner-widget{width:100%}.wht-neo-banner{position:relative;margin:0 auto;overflow:hidden;cursor:pointer;width:var(--wht-neo-banner-w,var(--wht-neo-banner-w-auto,100%));height:var(--wht-neo-banner-h,var(--wht-neo-banner-h-auto,220px))}.wht-neo-banner-video,.wht-neo-banner-img{width:100%;height:100%;object-fit:cover;display:block;background:#ececec}.wht-neo-banner-overlay{position:absolute;inset:0}.wht-neo-banner-mute,.wht-neo-banner-nav,.wht-neo-banner-dots,.wht-neo-banner-cta{display:none}";async function b(e){let t=null;try{t=new URLSearchParams(window.location.search).get("neoskin")}catch(h){}let n="";const a=t||e&&e.skin;a&&"default"!==a&&"a"!==a&&(n=await(0,r.P)(d,a));const i=a&&"default"!==a?a:"a",c=e&&e.customCss,l="string"===typeof c?c:c&&"object"===typeof c&&"string"===typeof c[i]?c[i]:"";return(0,o.f)(u,s+"\n"+n+(e&&e.brandCss?"\n"+e.brandCss:"")+(l?"\n"+l:"")),!0}const m={bannerMedia:{data:{source:"backend",field:"event.event_media_urls"},action:"bannerClick"},muteButton:{data:{source:"runtime",field:"video.muted"},action:"toggleMute"},navArrows:{data:{source:"runtime",field:"banner.activeIndex"},action:"step"},dots:{data:{source:"runtime",field:"banner.activeIndex"},action:"jump"},ctaButton:{data:{source:"backend",field:"event.cta"},action:"bannerClick"}};const v=(e,t=null)=>{const n=function(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(e){return null}}(),a=e.split(".").reduce((e,t)=>null==e?void 0:e[t],n);return null==a?t:a};async function w({shopId:e,widgetIdentity:t}){const n=t&&"wgt_default"!==t?`${c}/brand/${e}/eventset?widget_id=${t}&source_type=homepage&source_id=${e}&eventset_type=banner&status=active,active`:`${c}/get_eventset/${e}?eventset_type=banner&source=homepage&source_id=${e}`,{events:r}=(0,a.Po)(await fetch(n).then(e=>e.json()),"banner");return r}const g=e=>"image"===e.event_type;function f(e,t,n,a){var r,o;const s=(0,i.vC)(),c=null!==(r=(0,i.eG)(t))&&void 0!==r?r:s.w,d=s.h>c,l=function(e,t,n){var a;const r=e&&e.querySelector("#"+t),o=r&&(null!==(a=r.getAttribute("data-wh"))&&void 0!==a?a:r.getAttribute("data")),i=null!=o?parseFloat(o):NaN;return isFinite(i)?i:n}(document,"whatmoreVideoTileSize",60)/100*Number(v(d?"banner_config.portrait_multiplier":"banner_config.landscape_multiplier",1)),u=v("banner_config.widget_aspect_ratios"),h=null!==(o=u&&u[n]&&u[n][d?"portrait":"landscape"])&&void 0!==o?o:a&&a[d?"portrait":"landscape"],p=Number(null!==h&&void 0!==h?h:v(d?"banner_config.portrait_aspect_ratio":"banner_config.landscape_aspect_ratio",d?1:.5625)),b=!!v("banner_config.is_full_screen"),m=c,w=m*l;return e.style.setProperty("--wht-neo-banner-w-auto",b?"100%":Math.round(w)+"px"),e.style.setProperty("--wht-neo-banner-h-auto",Math.round((b?m:w)*p)+"px"),d}async function y(e){const{rootElement:t,widgetContainer:n,shopId:a,widgetIdentity:r,bannerArOverride:i,whatmoreRootId:s,onWidgetView:c,onBannerClick:u,onBannerCtaClick:m}=e;if(!t||!a)return!1;let y;(0,o.f)(h,p);try{[y]=await Promise.all([w({shopId:a,widgetIdentity:r}),b((0,o.R)(e.neoJson,d))])}catch(Y){return!1}const _=()=>{const e=document.querySelector(`.whatmore-shimmer-container[data-widget-id="${s}"]`);e&&e.remove(),t.removeAttribute("data-shimmer-active"),n&&(n.style.minHeight="0px")};if(!y||!y.length)return _(),!0;const k=document.createElement("div");k.className="wht-neo-banner-widget";const x=document.createElement("div");x.className="wht-neo-banner",x.dataset.role="bannerMedia",a&&x.setAttribute("data-wht-shop",a),r&&x.setAttribute("data-wht-widget",r),v("banner_config.show_mute_button")&&x.setAttribute("data-wht-mutebtn","1"),v("banner_config.show_navigation_dots")&&x.setAttribute("data-wht-dots","1"),v("banner_config.show_cta")&&x.setAttribute("data-wht-cta","1");const C=!!v("banner_config.is_banner_clickable"),E=v("banner_config.selected_dot_color");E&&x.style.setProperty("--wht-neo-banner-dot-active",E);let A=f(x,n,r,i);const I=document.createElement("video");I.className="wht-neo-banner-video",I.muted=!0,I.loop=!0,I.playsInline=!0,I.preload="auto",I.setAttribute("muted",""),I.setAttribute("playsinline",""),I.setAttribute("webkit-playsinline","");const N=document.createElement("img");N.className="wht-neo-banner-img",N.alt="",x.appendChild(I),x.appendChild(N);const z=document.createElement("div");z.className="wht-neo-banner-overlay";const P=document.createElement("button");P.type="button",P.className="wht-neo-banner-mute",P.dataset.role="muteButton",P.setAttribute("aria-label","Toggle sound"),P.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M11 5 6 9H2v6h4l5 4V5z" fill="currentColor"/><path d="M16 9l5 6M21 9l-5 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>';const L=e=>{const t=document.createElement("button");t.type="button",t.className="wht-neo-banner-nav wht-neo-banner-nav-"+e,t.dataset.role="navArrows",t.setAttribute("aria-label","prev"===e?"Previous":"Next");const n="prev"===e?"M15 5l-7 7 7 7":"M9 5l7 7-7 7";return t.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="'+n+'" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>',t},M=L("prev"),j=L("next"),B=document.createElement("div");B.className="wht-neo-banner-dots",B.dataset.role="dots";const S=y.map((e,t)=>{const n=document.createElement("button");return n.type="button",n.className="wht-neo-banner-dot",n.setAttribute("aria-label","Slide "+(t+1)),B.appendChild(n),n}),T=document.createElement("a");T.className="wht-neo-banner-cta",T.dataset.role="ctaButton",z.appendChild(P),y.length>1&&(z.appendChild(M),z.appendChild(j),z.appendChild(B)),z.appendChild(T),x.appendChild(z),k.appendChild(x);let O=-1,$=null,R=!0,H=!1;const F=()=>{I.muted=!H||!R},q=e=>(e.cta||[]).filter(e=>e&&e.cta_link&&!/whatmore\.ai/i.test(e.cta_link)).sort((e,t)=>{var n,a;return(null!==(n=e.cta_id)&&void 0!==n?n:0)-(null!==(a=t.cta_id)&&void 0!==a?a:0)})[0]||null,V=e=>{clearTimeout($),$=setTimeout(()=>G((O+1)%y.length),e)},G=e=>{O=(e%y.length+y.length)%y.length,clearTimeout($);const t=y[O],n=function(e,t){const n=e.event_media_urls,a=t?"portrait":"landscape",r=t?"landscape":"portrait";if(n){if(g(e))return n.primary&&n.primary[a]&&n.primary[a].content_image_original||"";const o=(e,t)=>{const a=n[e]&&n[e][t];return a&&(a.content_video_1080p||a.content_video_original)||""},i=o("secondary",a);if(i)return i;const s=e.event_hls_url,c=s&&s.startsWith("https://cdn.shopify.com")&&s.includes(".mp4")?s:"";return!c||!t&&o("primary",a)&&o("primary",a)!==o("primary",r)?o("primary",a)||o("primary",r):c}return e.event_m3u8_url||e.event_hls_url||""}(t,A),a=function(e,t){const n=e.event_media_urls,a=t?"portrait":"landscape";return n?n.secondary&&n.secondary[a]&&n.secondary[a].poster_image||n.primary&&n.primary[a]&&n.primary[a].poster_image||e.poster_image||"":e.poster_image||""}(t,A);S.forEach((e,t)=>e.toggleAttribute("data-wht-active",t===O));const r=q(t);if(r&&r.cta_link&&(t.cta||[]).length>1?(T.href=(e=>e&&v("utm.activate_utm")?e+"?"+v("utm.utm_source","")+"&"+v("utm.utm_campaign","")+"&"+v("utm.utm_medium_cart_page",""):e)(r.cta_link),T.textContent=r.cta_title||"Shop now",T.removeAttribute("data-wht-empty")):T.setAttribute("data-wht-empty","1"),!n)return I.style.display="none",void(N.style.display="none");if(g(t))I.pause(),I.style.display="none",N.style.display="",N.src=n,V(l);else{if(N.style.display="none",I.style.display="",a&&(I.poster=a),F(),I.src=n,I.load(),R){const e=I.play();e&&e.catch&&e.catch(()=>{})}const e=()=>{isFinite(I.duration)&&I.duration>0&&V(1e3*I.duration)};I.removeEventListener("loadedmetadata",e),I.addEventListener("loadedmetadata",e,{once:!0})}};M.addEventListener("click",e=>{e.stopPropagation(),G(O-1)}),j.addEventListener("click",e=>{e.stopPropagation(),G(O+1)}),S.forEach((e,t)=>e.addEventListener("click",e=>{e.stopPropagation(),G(t)}));const J=e=>{e.stopPropagation(),H=!H,F(),x.toggleAttribute("data-wht-sound",H)};if(P.addEventListener("click",J),T.addEventListener("click",e=>{e.stopPropagation(),null===u||void 0===u||u(y[O]),null===m||void 0===m||m(y[O],q(y[O]))}),x.addEventListener("click",e=>{null===u||void 0===u||u(y[O]);const t=q(y[O]);C&&t&&t.cta_link?window.open(t.cta_link,"_self"):J(e)}),"IntersectionObserver"in window){new IntersectionObserver(e=>{e.forEach(e=>{if(R=e.isIntersecting,F(),!g(y[O]||{}))if(R){const e=I.play();e&&e.catch&&e.catch(()=>{})}else I.pause()})},{threshold:.01}).observe(x)}let W=!1;if(window.addEventListener("resize",()=>{W||(W=!0,requestAnimationFrame(()=>{W=!1;const e=A;A=f(x,n,r,i),A!==e&&G(O)}))},{passive:!0}),t.innerHTML="",t.appendChild(k),t.style.opacity="1",G(0),c)if("IntersectionObserver"in window){new IntersectionObserver((e,t)=>{e.some(e=>e.isIntersecting)&&(c(),t.disconnect())},{threshold:0}).observe(x)}else c();return _(),!0}},6387:function(e,t,n){n.d(t,{P:function(){return r}});const a={standard:()=>n.e(508).then(n.t.bind(n,5071,17)),card:()=>n.e(545).then(n.t.bind(n,9362,17)),"mosaic-ring":()=>n.e(457).then(n.t.bind(n,8171,17)),"mosaic-plain":()=>n.e(764).then(n.t.bind(n,5635,17)),hoverplay:()=>n.e(781).then(n.t.bind(n,787,17)),"info-strip":()=>n.e(94).then(n.t.bind(n,2109,17)),"text-overlay":()=>n.e(833).then(n.t.bind(n,3930,17)),focused:()=>n.e(506).then(n.t.bind(n,1987,17)),coverflow:()=>n.e(172).then(n.t.bind(n,9033,17)),minimal:()=>n.e(244).then(n.t.bind(n,6362,17)),feed:()=>n.e(315).then(n.t.bind(n,7456,17)),circle:()=>n.e(31).then(n.t.bind(n,5112,17)),viewmore:()=>n.e(343).then(n.t.bind(n,7672,17)),overlay:()=>n.e(936).then(n.t.bind(n,75,17)),"stories-b":()=>n.e(565).then(n.t.bind(n,1958,17)),"product-broad-no-cta":()=>n.e(838).then(n.t.bind(n,5955,17)),"product-broad-atc":()=>n.e(648).then(n.t.bind(n,2699,17)),"product-narrow":()=>n.e(594).then(n.t.bind(n,4859,17)),"product-premium":()=>n.e(566).then(n.t.bind(n,2529,17)),"product-navigation":()=>n.e(45).then(n.t.bind(n,4368,17)),"product-multi-product":()=>n.e(856).then(n.t.bind(n,6084,17)),"product-thumbnail-strip":()=>n.e(620).then(n.t.bind(n,4383,17)),"product-link-only":()=>n.e(750).then(n.t.bind(n,3365,17)),"product-minimal-atc":()=>n.e(685).then(n.t.bind(n,1890,17))};async function r(e,t){const n=a["carousel"===e||"collections"===e?t:e+"-"+t];if(!n)return"";try{return(await n()).default||""}catch(r){return""}}},7983:function(e,t,n){function a(e,t=!1){if(null==e)return{events:[],all_events:[]};if(t){return{events:e.events&&e.events[0]&&e.events[0].events||[],all_events:e.all_events||[]}}return{events:e.events||[],all_events:e.all_events||[]}}function r(e,t){if(null==e||!e.eventsets||!e.eventsets[t])return{events:[],all_events:[]};return{events:(Array.isArray(e.eventsets[t])?e.eventsets[t]:[]).reduce((e,t)=>e.concat(t&&t.events||[]),[]),all_events:[]}}n.d(t,{Np:function(){return a},Po:function(){return r}})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[310],{1839:function(t,e,o){function n(t,e){let o=document.getElementById(t);o||(o=document.createElement("style"),o.id=t,document.head.appendChild(o)),o.textContent=e}function i(t,e){if(!t)return null;const o=t[e];if(!o||"object"!==typeof o)return Object.assign({},t,{brandCss:""});const n="string"===typeof t.customCss?t.customCss:"";return Object.assign({},o,{brandCss:n})}o.d(e,{R:function(){return i},f:function(){return n}})},5e3:function(t,e,o){o.d(e,{Au:function(){return s},YJ:function(){return c},k5:function(){return l}});const n=6,i="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",a="whatmore-video-player whatmore-main-video-player-from-pool";function r(){return"undefined"===typeof window?{}:(window.__whatmoreNeoVideoPool||(window.__whatmoreNeoVideoPool={}),window.__whatmoreNeoVideoPool)}function s(){const t=r();if(t.armed||"undefined"===typeof document)return;if(!function(){if("undefined"===typeof navigator||"undefined"===typeof document)return!1;const t=navigator.userAgent||"";return!(!/iPad|iPhone|iPod/.test(t)||window.MSStream)||/Macintosh/.test(t)&&"ontouchend"in document}())return;t.armed=!0,function(){const t=r();if(t.pool||"undefined"===typeof document)return;const e=document.createDocumentFragment();for(let o=0;o<n;o++){const t=document.createElement("video");t.setAttribute("class",a),t.setAttribute("src",i),t.muted=!0,t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("preload","auto"),t.setAttribute("loop",""),t.setAttribute("playsinline",""),t.setAttribute("webkit-playsinline",""),t.setAttribute("x-webkit-airplay","allow"),t.controls=!1,e.appendChild(t)}t.pool=e}();const e=()=>{document.removeEventListener("click",e),document.removeEventListener("touchstart",e),function(){const t=r();if(t.blessed||!t.pool)return;const e=t.pool.childNodes;for(let o=0;o<e.length;o++){const t=e[o];t.muted=!0;const n=t.play();n&&n.then&&n.then(()=>t.pause()).catch(()=>{})}t.blessed=!0}()};document.addEventListener("click",e,{passive:!0}),document.addEventListener("touchstart",e,{passive:!0})}function l(){return r().pool||null}function c(){return!!r().blessed}},6387:function(t,e,o){o.d(e,{P:function(){return i}});const n={standard:()=>o.e(508).then(o.t.bind(o,5071,17)),card:()=>o.e(545).then(o.t.bind(o,9362,17)),"mosaic-ring":()=>o.e(457).then(o.t.bind(o,8171,17)),"mosaic-plain":()=>o.e(764).then(o.t.bind(o,5635,17)),hoverplay:()=>o.e(781).then(o.t.bind(o,787,17)),"info-strip":()=>o.e(94).then(o.t.bind(o,2109,17)),"text-overlay":()=>o.e(833).then(o.t.bind(o,3930,17)),focused:()=>o.e(506).then(o.t.bind(o,1987,17)),coverflow:()=>o.e(172).then(o.t.bind(o,9033,17)),minimal:()=>o.e(244).then(o.t.bind(o,6362,17)),feed:()=>o.e(315).then(o.t.bind(o,7456,17)),circle:()=>o.e(31).then(o.t.bind(o,5112,17)),viewmore:()=>o.e(343).then(o.t.bind(o,7672,17)),overlay:()=>o.e(936).then(o.t.bind(o,75,17)),"stories-b":()=>o.e(565).then(o.t.bind(o,1958,17)),"product-broad-no-cta":()=>o.e(838).then(o.t.bind(o,5955,17)),"product-broad-atc":()=>o.e(648).then(o.t.bind(o,2699,17)),"product-narrow":()=>o.e(594).then(o.t.bind(o,4859,17)),"product-premium":()=>o.e(566).then(o.t.bind(o,2529,17)),"product-navigation":()=>o.e(45).then(o.t.bind(o,4368,17)),"product-multi-product":()=>o.e(856).then(o.t.bind(o,6084,17)),"product-thumbnail-strip":()=>o.e(620).then(o.t.bind(o,4383,17)),"product-link-only":()=>o.e(750).then(o.t.bind(o,3365,17)),"product-minimal-atc":()=>o.e(685).then(o.t.bind(o,1890,17))};async function i(t,e){const o=n["carousel"===t||"collections"===t?e:t+"-"+e];if(!o)return"";try{return(await o()).default||""}catch(i){return""}}},7119:function(t,e,o){o.r(e),o.d(e,{REGISTRY:function(){return g},renderNeoFloating:function(){return N}});var n=o(7983),i=o(6287),a=o(5e3),r=o(6387),s=o(1839),l=o(9439),c=".wht-neo-float-frame{animation:wht-neo-float-pop .4s cubic-bezier(.06,.92,.59,1.32) both;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background:linear-gradient(145deg,rgba(0,0,0,.1),rgba(0,0,0,.3));box-shadow:var(--wht-neo-float-shadow,0 20px 40px rgba(0,0,0,.3),0 8px 16px rgba(0,0,0,.2));transition:all .3s ease}@keyframes wht-neo-float-pop{0%{transform:scale(0)}to{transform:scale(1)}}.wht-neo-float-close svg{filter:drop-shadow(0 1px 2px rgba(0,0,0,.4))}.wht-neo-float-play svg{filter:drop-shadow(0 2px 6px rgba(0,0,0,.35))}.wht-neo-float-title{background:linear-gradient(180deg,transparent,rgba(0,0,0,.8));bottom:0;display:block;left:0;padding:16px;position:absolute;right:0}.wht-neo-float-title p{color:#fff;font-size:calc(var(--wht-neo-float-w, 140px)*.25*.35);font-weight:600;letter-spacing:.3px;line-height:125%;margin:0;text-shadow:0 2px 4px rgba(0,0,0,.5)}";const d="https://consumer.whatmore.live",p="https://cdn-consumer.whatmore.live",u="floating",h="wht-neo-floating-css",f="wht-neo-floating-critical",m='.wht-neo-float{position:fixed;z-index:var(--wht-neo-float-z,2147482000);bottom:var(--wht-neo-float-vpad,10px)}.wht-neo-float[data-wht-pos="left"]{left:var(--wht-neo-float-hpad,10px)}.wht-neo-float[data-wht-pos="right"]{right:var(--wht-neo-float-hpad,10px)}.wht-neo-float-frame{position:relative;width:var(--wht-neo-float-w,140px);height:var(--wht-neo-float-h,249px);border-radius:var(--wht-neo-float-radius,20px);overflow:hidden;background:transparent;cursor:pointer}.wht-neo-float-video{width:100%;height:100%;object-fit:cover;display:block;background:#fff}.wht-neo-float-overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between}.wht-neo-float-close{position:absolute;top:2px;right:2px;z-index:10;display:flex;border:none;padding:4px;background:transparent;cursor:pointer;color:#fff}.wht-neo-float-close svg{width:calc(var(--wht-neo-float-w,140px) * 0.25);height:calc(var(--wht-neo-float-w,140px) * 0.25)}.wht-neo-float-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;color:#fff}.wht-neo-float-play svg{width:calc(var(--wht-neo-float-w,140px) * 0.35);height:calc(var(--wht-neo-float-w,140px) * 0.35)}.wht-neo-float-title{display:none}.wht-neo-float[data-wht-hidden]{display:none}.wht-neo-float[data-wht-fs]{display:none}.wht-neo-float[data-wht-ultra][data-wht-pos="left"]{left:16px}.wht-neo-float[data-wht-ultra][data-wht-pos="right"]{right:16px}.wht-neo-float[data-wht-ultra] .wht-neo-float-frame{width:calc(var(--wht-neo-float-w,140px) * 0.6);height:calc(var(--wht-neo-float-h,249px) * 0.6)}';async function w(t){let e=null;try{e=new URLSearchParams(window.location.search).get("neoskin")}catch(d){}let o="";const n=e||t&&t.skin;n&&"default"!==n&&"a"!==n&&(o=await(0,r.P)(u,n));const i=n&&"default"!==n?n:"a",a=t&&t.customCss,l="string"===typeof a?a:a&&"object"===typeof a&&"string"===typeof a[i]?a[i]:"";return(0,s.f)(h,c+"\n"+o+(t&&t.brandCss?"\n"+t.brandCss:"")+(l?"\n"+l:"")),!0}const g={floatVideo:{data:{source:"backend",field:"event.thumbnail_image"},action:"openFullscreen"},closeButton:{data:{source:"runtime",field:"bubble.visible"},action:"close"},playIcon:{data:{source:"runtime",field:"video.paused"},action:null},titleStrip:{data:{source:"embed",field:"whatmoreEmbedAppVideoTitle"},action:null}};const v=(t,e=null)=>{const o=function(){try{return JSON.parse(localStorage.getItem("whatmore_brand_customizations")).customizations}catch(t){return null}}(),n=t.split(".").reduce((t,e)=>null==t?void 0:t[e],o);return null==n?e:n};function b(t,e,o){var n;const i=t&&t.querySelector("#"+e),a=i&&(null!==(n=i.getAttribute("data-wh"))&&void 0!==n?n:i.getAttribute("data"));return null!=a&&""!==a?a:o}function _(t,e,o){const n=parseFloat(b(t,e,NaN));return isFinite(n)?n:o}async function y({mode:t,shopId:e,landingLocationType:o,widgetContainer:i,storeFlags:a}){let r;if("pdp"===t){let t=b(i,"whatmoreProductId","");"true"===String(b(i,"whatmoreEmbedAppUseVariant","false"))&&(t=b(i,"whatmoreVariantId",t));const o=function(t){return!0===v("backend_config.use_instance_endpoint_for_product_events")||t&&t.productEventsUseInstance?d:p}(a),s=!0===v("recommendation_config.show_collection_events")?`${o}/v2/brand/${e}/product-events/collection/cdn?client_product_id=${encodeURIComponent(t)}&limit=50&status=live,upcoming&event_type=video`:!0===v("recommendation_config.show_recommended_events")?`${o}/v2/brand/${e}/product-events/recommendation/cdn?client_product_id=${encodeURIComponent(t)}&limit=10&recommended=${!v("product_page_popup_config.show_all_events")}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`:`${o}/v2/brand/${e}/product-events?client_product_id=${encodeURIComponent(t)}&status=upcoming&event_type=video`,{events:l,all_events:c}=(0,n.Np)(await fetch(s).then(t=>t.json()),!1);r=[...l,...c]}else if(o.startsWith("collection")){const t=b(i,"whatmoreCollectionId",e)||e,o=!0===v("collection_product_sync")?`${d}/v5/collection?store_id=${e}&client_collection_id=${t}&sync_products=true`:`${d}/v2/collection?store_id=${e}&client_collection_id=${t}`,{events:a}=(0,n.Np)(await fetch(o).then(t=>t.json()),!0);r=a}else{const t=`${d}/get_eventset/${e}?eventset_type=spotlight&source=homepage&source_id=${e}`,{events:o}=(0,n.Po)(await fetch(t).then(t=>t.json()),"spotlight");r=o}return v("oos_config.show_oos_videos")||(r=r.filter(t=>t&&!1!==t.in_stock)),r}function x(t){var e,o,n,i;const a=t.event_media_urls;let r=a?(null===(e=a.primary)||void 0===e||null===(o=e.portrait)||void 0===o?void 0:o.poster_image)||(null===(n=a.secondary)||void 0===n||null===(i=n.portrait)||void 0===i?void 0:i.poster_image)||t.poster_image||"":t.poster_image||"";return r&&r.startsWith("https://cdn.shopify.com")&&(r=r.split("?")[0]+"?width=400&height=400"),r}function A(t,e,o){const n=(0,l.vC)(),i=n.h>=n.w,a=i?"Portrait":"Landscape",r=function(t,e){const{w:o,h:n}=(0,l.vC)(),i=Math.min(o,n),a=n>=o,r=.6*i,s=a?o>=481?.48:.54:i<500?.7:.39,c=a?_(t,"whatmoreEmbedAppVideoPlayerSizePortrait",40)/100*1.2:_(t,"whatmoreEmbedAppVideoPlayerSizeLandscape",60)/100,d="spotlight"===e?Number(v("spotlight_config.size_factor",1))*(a?1.1:1.3):1.1;return Math.round(r*s*c*d)}(e,o);t.style.setProperty("--wht-neo-float-w",r+"px"),t.style.setProperty("--wht-neo-float-h",Math.round(16*r/9)+"px");const s=b(e,"whatmoreEmbedAppPosition"+a,"left"),c=_(e,"whatmoreEmbedAppHorizontalPadding"+a,i?10:20),d=_(e,"whatmoreEmbedAppVerticalPadding"+a,i?10:20),p="spotlight"===o?v("spotlight_config.position",s):s,u="spotlight"===o?Number(v("spotlight_config.horizontal_padding",c)):c,h="spotlight"===o?Number(v("spotlight_config.vertical_padding",d)):d;t.setAttribute("data-wht-pos","right"===p?"right":"left"),t.style.setProperty("--wht-neo-float-hpad",u+"px"),t.style.setProperty("--wht-neo-float-vpad",h+"px");const f=v("product_page_popup_config.popUpZindex");return null!=f&&t.style.setProperty("--wht-neo-float-z",String(f)),h}const C=500,k=12,E=8,P=300,L=["#pageheader","page-header",".navigation__tier-1-container",".navigation__tier-1"];function $(t){if(!t)return!1;const e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility&&0!==parseFloat(e.opacity||"1")&&(t.offsetWidth>0&&t.offsetHeight>0)}function I(t,e,o){let n=null;const i=()=>{n=null;const{w:i,h:a}=(0,l.vC)(),r=t.getBoundingClientRect();if(!r.width||!r.height)return;const s=o(),c=r.left,d=r.right,p=function(t,e){let o=0;for(const n of L)for(const i of document.querySelectorAll(n)){if(!$(i))continue;const n=i.getBoundingClientRect();n.top>.3*e||n.width<.5*t||n.bottom<=0||n.bottom>=.6*e||n.bottom>o&&(o=n.bottom)}return o}(i,a)+E,u=a-s-r.height,h=a-s;let f,m=null,w=!1;for(const t of e)for(const e of document.querySelectorAll(t)){if(!$(e))continue;const t=e.getBoundingClientRect();t.width<=0||t.height<=0||(t.right<=c||t.left>=d||t.bottom<=0||t.top>=a||(m=null===m?t.top:Math.min(m,t.top),t.top<h&&t.bottom>u&&(w=!0)))}f=w&&null!==m&&m-k-r.height>=p?Math.max(s,a-m+k):s;const g=parseFloat(t.style.bottom||"")||s;Math.round(g)!==Math.round(f)&&(t.style.bottom=Math.round(f)===Math.round(s)?"":f+"px")},a=()=>{null===n&&(n=window.requestAnimationFrame(i))};a(),window.addEventListener("scroll",a,{passive:!0}),window.addEventListener("resize",a),window.setInterval(a,P)}async function N(t){const{widgetContainer:e,shopId:o,landingLocationType:n="index",floatingMode:r,onWidgetView:l,onClose:c,onOpenEvent:d}=t;if(!o)return!1;const p=r||(n.startsWith("product")||"embed"===n?"pdp":"spotlight");if("spotlight"===p&&v("spotlight_config.show_once_to_user"))try{if(window.localStorage.getItem("_whatmore_spotlight_viewed"))return!0;window.localStorage.setItem("_whatmore_spotlight_viewed","true")}catch(Y){}let h;(0,s.f)(f,m);try{[h]=await Promise.all([y({mode:p,shopId:o,landingLocationType:n,widgetContainer:e,storeFlags:t.storeFlags}),w((0,s.R)(t.neoJson,u))])}catch(Y){return!1}if(!h||!h.length)return!0;const g=h[0],_="pdp"===p,k=!!v(_?"product_page_popup_config.ultra_minimize_on_scroll":"spotlight_config.ultraminimize_on_scroll"),E=_&&!k&&!!v("product_page_popup_config.show_popup_on_scroll"),P=_&&!!v("product_page_popup_config.auto_close_on_open"),L=v((_?"product_page_popup_config":"spotlight_config")+".atc_aware_selectors"),$=document.createElement("div");$.className="wht-neo-float",$.dataset.role="floatVideo",$.setAttribute("data-wht-mode",p),o&&$.setAttribute("data-wht-shop",o),$.setAttribute("data-wht-widget","spotlight"===p?"wgt_spotlight":"wgt_embed");const N={vPad:A($,e,p)};E&&$.setAttribute("data-wht-hidden","");const M=document.createElement("div");M.className="wht-neo-float-frame";const S=document.createElement("video");S.className="wht-neo-float-video",S.muted=!0,S.loop=!0,S.playsInline=!0,S.autoplay=!0,S.preload="metadata",S.setAttribute("muted",""),S.setAttribute("playsinline",""),S.setAttribute("webkit-playsinline","");const F=x(g);if(F&&(S.poster=F),g.thumbnail_image){const t=document.createElement("source");t.src=g.thumbnail_image,t.type="video/mp4",S.appendChild(t)}M.appendChild(S);const z=document.createElement("div");z.className="wht-neo-float-overlay";const V=document.createElement("button");V.type="button",V.className="wht-neo-float-close",V.dataset.role="closeButton",V.setAttribute("aria-label","Close video"),V.innerHTML='<svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><circle cx="12" cy="12" r="10" fill="rgba(0,0,0,0.6)" stroke="rgba(255,255,255,0.3)" stroke-width="1.5"/><path d="M9 9l6 6M15 9l-6 6" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg>',V.addEventListener("click",t=>{t.stopPropagation(),$.remove(),null===c||void 0===c||c(g)}),z.appendChild(V);const R=document.createElement("span");R.className="wht-neo-float-play",R.dataset.role="playIcon",R.innerHTML='<svg viewBox="0 0 64 64" aria-hidden="true"><circle cx="32" cy="32" r="28" fill="rgba(255,255,255,0.25)" stroke="rgba(255,255,255,0.5)" stroke-width="1.5"/><path d="M26 21l18 11-18 11z" fill="#fff"/></svg>',z.appendChild(R);const j=b(e,"whatmoreEmbedAppVideoTitle","");if(j){const t=document.createElement("div");t.className="wht-neo-float-title",t.dataset.role="titleStrip";const o=document.createElement("p");o.textContent=j;const n=b(e,"whatmorePrimaryFont","");n&&(o.style.fontFamily=n),t.appendChild(o),z.appendChild(t)}M.appendChild(z),$.appendChild(M),document.body.appendChild($);const B=S.play&&S.play();B&&B.catch&&B.catch(()=>{}),(0,a.Au)();const O=t=>{if(t!==$.hasAttribute("data-wht-ultra"))if(t){$.setAttribute("data-wht-ultra","");try{S.pause()}catch(Y){}}else{$.removeAttribute("data-wht-ultra");const t=S.play&&S.play();t&&t.catch&&t.catch(()=>{})}};!function(t,e){let o=0,n=0,i=0,a=0,r=!1,s=!1;t.addEventListener("pointerdown",e=>{if(e.target.closest(".wht-neo-float-close"))return;s=!0,r=!1,o=e.clientX,n=e.clientY;const l=/translate\((-?[\d.]+)px,\s*(-?[\d.]+)px\)/.exec(t.style.transform||"");i=l?parseFloat(l[1]):0,a=l?parseFloat(l[2]):0,t.setPointerCapture(e.pointerId)}),t.addEventListener("pointermove",e=>{if(!s)return;const l=e.clientX-o,c=e.clientY-n;(Math.abs(l)>5||Math.abs(c)>5)&&(r=!0),r&&(t.style.transform=`translate(${i+l}px, ${a+c}px)`)}),t.addEventListener("pointerup",o=>{if(s){s=!1;try{t.releasePointerCapture(o.pointerId)}catch(n){}r||e()}}),t.addEventListener("pointercancel",()=>{s=!1})}($,()=>{$.hasAttribute("data-wht-ultra")?O(!1):(P?($.remove(),null===c||void 0===c||c(g)):$.setAttribute("data-wht-fs",""),(0,i.w)(x(g)),null===d||void 0===d||d(g,0,h,{onFullscreenClose:()=>$.removeAttribute("data-wht-fs")}))});let T=!1;window.addEventListener("resize",()=>{T||(T=!0,requestAnimationFrame(()=>{T=!1,N.vPad=A($,e,p)}))},{passive:!0});let q=!1;const U=()=>{!q&&l&&(q=!0,requestAnimationFrame(()=>{($.checkVisibility?$.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):$.offsetWidth>0&&$.offsetHeight>0)&&l()}))};if(E||U(),k||E){let t=window.pageYOffset,e=!1;window.addEventListener("scroll",()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;const o=window.pageYOffset;Math.abs(o-t)<C||(t=o>0?o:0,o<=C?O(!1):(E&&$.hasAttribute("data-wht-hidden")&&($.removeAttribute("data-wht-hidden"),U()),k&&O(!0)))}))},{passive:!0}),k&&document.addEventListener("pointerdown",t=>{!$.contains(t.target)&&$.isConnected&&window.pageYOffset>C&&O(!0)},{capture:!0,passive:!0})}return Array.isArray(L)&&L.length&&I($,L,()=>N.vPad),!0}},7983:function(t,e,o){function n(t,e=!1){if(null==t)return{events:[],all_events:[]};if(e){return{events:t.events&&t.events[0]&&t.events[0].events||[],all_events:t.all_events||[]}}return{events:t.events||[],all_events:t.all_events||[]}}function i(t,e){if(null==t||!t.eventsets||!t.eventsets[e])return{events:[],all_events:[]};return{events:(Array.isArray(t.eventsets[e])?t.eventsets[e]:[]).reduce((t,e)=>t.concat(e&&e.events||[]),[]),all_events:[]}}o.d(e,{Np:function(){return n},Po:function(){return i}})}}]);
|