whatmore-react-assets 1.0.274 → 1.0.276
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/282.57451dc7.chunk.js +2 -0
- package/static/js/55.cf1baab0.chunk.js +1 -0
- package/static/js/972.af22bcad.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/282.01879db2.chunk.js +0 -2
- package/static/js/55.f26df2af.chunk.js +0 -1
- package/static/js/972.dd8141d3.chunk.js +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 282.57451dc7.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[282],{3867:function(t,o,n){"use strict";var i=n(8816),r=n(417),e=n(4885),a=n(7753),c=n(6417);o.Z=function(t){var o;const[n]=(0,a.j1)("whatmoreSecondaryColor"),[s,u]=(0,a.j1)("productRatings"),p=(0,a.MO)("whatmorePrimaryFont"),d=(0,a.MO)("whatmoreUITheme"),l=(t.storeId,t.productId),_=(t.productLink,t.fontSize),f=null!==(o=t.fontColor)&&void 0!==o?o:"gray";if(null===s||"undefined"==typeof s||!(l in s)||s[l].avgRating>5)return(0,c.jsx)(c.Fragment,{});const m=s[l].avgRating,h=s[l].totalRatings;return(0,c.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,c.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(m))].map(((t,o)=>(0,c.jsx)(i.Z,{sx:{color:n,fontSize:_+"px"}},"star-icon"+o))),m-Math.floor(m)>.2?(0,c.jsx)(r.Z,{sx:{color:n,fontSize:_+"px"}},"star-half-icon"):m-Math.floor(m)==0?(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(e.Z,{sx:{color:n,fontSize:_+"px"}},"star-outline-icon"),[...Array(Math.floor(5-m))].map(((t,o)=>(0,c.jsx)(e.Z,{sx:{color:n,fontSize:_+"px"}},"star-outline-icon-"+o))),(0,c.jsx)("div",{children:(0,c.jsx)("div",{width:"2px"})}),(0,c.jsx)("div",{children:(0,c.jsx)("div",{style:{backgroundColor:n,borderRadius:"round"==d?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,c.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*_+"px","important"),t.style.setProperty("font-family",p,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",m,"\xa0"]})})}),(0,c.jsx)("div",{children:(0,c.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",f,"important"),t.style.setProperty("font-size",.8*_+"px","important"),t.style.setProperty("font-family",p,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+h+")"]})})]})})}},9219:function(t,o,n){"use strict";n.d(o,{p_:function(){return l},Rb:function(){return _},jx:function(){return d}});var i=n(5051),r=n(6040),e=n.n(r),a=n(9854);function c(t,o){var n;return null!==(n=(0,a.Qx)(o)[t])&&void 0!==n?n:e()(t)}function s(){return null!=window.Shopify||"undefined"!=typeof window.Shopify}function u(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function p(t){if(t%1>=.1){return t.toString().split(".")[0].length>=4?parseInt(t):t.toFixed(2)}return parseInt(t)}function d(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"INR";if(!t||void 0==typeof t)return"";if(!s())return"70993772860"==n||"72534294803"==n?"$"+o+u(p(t)):c(null!==i&&void 0!==i?i:"INR",n)+o+u(p(t));const r=window.Shopify.currency?window.Shopify.currency.active:"INR",e=parseFloat(window.Shopify.currency?window.Shopify.currency.rate:"1.0");return c(r,n)+o+u(p(t*e))}async function l(t,o,n){for(let c=0;c<t.products.length;c++){var r,e,a;const s=await(0,i.vX)(t.products[c],o,n);t.products[c].price=null!==(r=s.price)&&void 0!==r?r:t.products[c].price,t.products[c].compare_price=null!==(e=s.compare_at_price)&&void 0!==e?e:t.products[c].compare_price,t.products[c].currency=null!==(a=s.currency_code)&&void 0!==a?a:t.products[c].currency}return t}async function _(t,o,n){var r,e,a;const c=await(0,i.vX)(t,o,n);return t.price=null!==(r=c.price)&&void 0!==r?r:t.price,t.compare_price=null!==(e=c.compare_at_price)&&void 0!==e?e:t.compare_price,t.currency=null!==(a=c.currency_code)&&void 0!==a?a:t.currency,t}},5945:function(t,o,n){"use strict";function i(t){return"undefined"==typeof t||"undefined"==t||null==t?"":t.replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))}n.d(o,{s:function(){return i}})},5456:function(t,o,n){"use strict";n.d(o,{B:function(){return i}});const i=function(t,o){return!(isNaN(o)||!o||("string"===typeof o||o instanceof String)&&!o.trim().length)&&!(parseInt(o)<=parseInt(t))}},5051:function(t,o,n){"use strict";n.d(o,{jg:function(){return st},TE:function(){return pt},rY:function(){return ut},OM:function(){return dt},vX:function(){return lt},Y4:function(){return at},ln:function(){return ct}});var i=n(9854);function r(t){for(var o=1;o<arguments.length;o++){var n=arguments[o];for(var i in n)t[i]=n[i]}return t}var e=function t(o,n){function i(t,i,e){if("undefined"!==typeof document){"number"===typeof(e=r({},n,e)).expires&&(e.expires=new Date(Date.now()+864e5*e.expires)),e.expires&&(e.expires=e.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in e)e[c]&&(a+="; "+c,!0!==e[c]&&(a+="="+e[c].split(";")[0]));return document.cookie=t+"="+o.write(i,t)+a}}return Object.create({set:i,get:function(t){if("undefined"!==typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],i={},r=0;r<n.length;r++){var e=n[r].split("="),a=e.slice(1).join("=");try{var c=decodeURIComponent(e[0]);if(i[c]=o.read(a,c),t===c)break}catch(s){}}return t?i[t]:i}},remove:function(t,o){i(t,"",r({},o,{expires:-1}))},withAttributes:function(o){return t(this.converter,r({},this.attributes,o))},withConverter:function(o){return t(r({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(o)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),a=e;const c={STRCGMYX28X:"https://qa-s4-kar-store2.kartify.in"},s={STRCGMYX28X:3},u="ansxwhatmore-access-token",p="ans-whatmore";function d(t){return t.product_metadata.sku_id}function l(t){return s[t]}function _(t){return c[t]}async function f(t,o){const n=_(o);return function(t){const o=t.data.product_data,n=o.options[0].product_option_id;var i=Object.entries(o.options[0].product_option_value).map((t=>{const i=t[1];return{id:o.product_id+"::"+n+"::"+i.product_option_value_id,product_id:o.product_id,title:"",price:100*o.price,compare_at_price:100*o.mrp,available:parseInt(i.quantity)>0,option1:i.name,option2:null,option3:null,options:[i.name]}}));const r=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,options:r}}(await fetch(n+"/wm-getProductDetails",{method:"POST",body:JSON.stringify({merchant_store_id:l(o),sku:d(t)}),headers:{[u]:p}}).then((t=>t.json())).catch((t=>console.error(t))))}async function m(t,o,n){_(n);const i=t.split("::"),r=i[0],e=i[1],a=i[2];return whatmoreatc(r,o,e,a),await new Promise((t=>setTimeout(t,1500))),"whatmoreatc_success"in localStorage&&"true"==localStorage.getItem("whatmoreatc_success")?{ok:!0,status:200,json:function(){return{}}}:{ok:!1,status:500,json:function(){return{}}}}const h={STRR72TX6AT:"https://www.cbazaar.com"};function w(t){return t.product_metadata.sku_id}function v(t){return h[t]}async function y(t,o){function n(t){const o=t.data.product_data[0];var n=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:100*o.price,compare_at_price:100*o.mrp,currency_code:o.currency_code,available:!o.outOfStock,option1:null,option2:null,option3:null,options:[]}];const i=(n=n.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:"",variants:n,options:i}}const i=v(o);return n(await fetch(i+"/productsv3api/getproductdetails/"+w(t),{method:"GET",headers:{redirect:"follow",mode:"no-cors"}}).then((t=>t.json())).catch((t=>console.error(t))))}const S={STRRPY8YRZE:"https://idaho-o.com"},b=(window.location.hostname.substring(10,4),window.location.hostname.substring(10,4),window.location.hostname.substring(10,4),"Y2tfZTI1OWVmNWVlNzg5MzIzYzIzOWU3ZDE0NjQwNmUwZmZkZGY4NDQ5Yzpjc19iYzdkZjI0MGEwYTgzNDhlZjNhMTI4ZTA3MDRkMmMwNmU5ZGM4NTM5");function T(t){return t.product_metadata.sku_id}function g(t){return S[t]}async function R(t,o){const n=g(o);return function(t){const o=t;var n=Object.entries(o.attributes[0].options).map(((t,n)=>{var i;return{id:(null!==(i=o.variations[n])&&void 0!==i?i:o.variations[0])+":"+o.id+":"+t[1],product_id:o.id,title:"",price:100*o.price,compare_at_price:100*o.price,available:"instock"===o.stock_status,option1:t[1],option2:null,option3:null,options:[t[1]]}}));const i=(n=n.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:o.description,variants:n,options:i}}(await fetch(n+"/wp-json/wc/v3/products/"+T(t),{method:"GET",headers:{Authorization:"Basic "+b}}).then((t=>t.json())).catch((t=>console.error(t))))}async function j(t,o,n){const i=t.split(":"),r=i[0],e=i[1],a=i[2],c=g(n)+"/wp-admin/admin-ajax.php",s={Authorization:"Basic "+b},u=new FormData;u.append("action","woocommerce_ajax_add_to_cart"),u.append("product_id",e),u.append("product_sku",""),u.append("quantity",o),u.append("variation_id",r),u.append("variation[attribute_pa_size]",a?a.toLowerCase():"");return await fetch(c,{method:"POST",headers:s,body:u}).then((t=>t.json())).then((t=>({ok:!0,status:200,json:function(){return{}}})))}var k;const x={STRMM0QP0CU:"https://"+window.location.hostname},P=null!==(k=a.get("form_key"))&&void 0!==k?k:"undefined",D=(window.location.hostname.substring(10,4),window.location.hostname.substring(10,4),window.location.hostname.substring(10,4),"ds243corrt3qkd1rhoeyfes3ztefxjae");function N(t){return t.product_metadata.sku_id}function M(t){return x[t]}async function C(t,o){var n=await async function(t){const o=M(t);return(await fetch(o+"/rest/V1/products/attributes/ready_to_wear_sizes",{method:"GET",headers:{Authorization:"Bearer "+D}}).then((t=>t.json())).catch((t=>console.error(t)))).options.reduce(((t,o,n)=>(o.value&&o.label&&(t[o.value]=o.label),t)),{})}(o),i=[];return t.split(",").forEach((t=>{t in n&&i.push(t+":"+n[t])})),i}async function O(t){var o=[];return t.options.forEach((t=>{t.values.forEach((n=>{"Ready to wear"==n.title&&o.push(t.option_id+":"+n.option_type_id)}))})),o.length>0?o[0]:void 0}async function U(t,o){async function n(t){const n=t,i=n.extension_attributes.is_ready_to_ware,r=n.custom_attributes.reduce(((t,o,n)=>(t[o.attribute_code]=o.value,t)),{});async function e(){var t;return{id:n.id,title:n.name,body_html:r.description,variants:[{id:"single_option::"+n.id,product_id:n.id,title:"",price:100*(null!==(t=r.special_price)&&void 0!==t?t:n.price),compare_at_price:100*n.price,available:!0,option1:n.extension_attributes.stock_item.item_id,option2:null,option3:null,options:[n.extension_attributes.stock_item.item_id]}],images:[{id:n.id,product_id:n.id,position:1,src:"https://ik.imagekit.io/wb2spwtue/kreeva/tr:h-433,w-315,q-80,cm-pad_resize/media/catalog/product"+r.thumbnail,variant_ids:["single_option::"+n.id]}],options:[{id:n.product_id,product_id:n.product_id,name:"Size",position:1,values:[n.extension_attributes.stock_item.item_id]}]}}if(0==i)return await e();if(!("ready_to_wear_sizes"in r))return await e();const a=await C(r.ready_to_wear_sizes,o),c=await O(t);return c?await async function(t,o){const i=t.map(((t,i)=>{var e;const a=n.extension_attributes.stock_item.item_id,c=t.split(":")[0],s=t.split(":")[1];return{id:"multi_option::"+n.id+":"+a+":"+s+":"+c+":"+o,product_id:n.id,title:"",price:100*(null!==(e=r.special_price)&&void 0!==e?e:n.price),compare_at_price:100*n.price,available:!0,option1:s,option2:null,option3:null,options:null}})),e=t.map(((t,o)=>{t.split(":")[0];return t.split(":")[1]}));return{id:n.id,title:n.name,body_html:r.description,variants:i,images:[{id:n.id,product_id:n.id,position:1,src:"https://ik.imagekit.io/wb2spwtue/kreeva/tr:h-433,w-315,q-80,cm-pad_resize/media/catalog/product"+r.thumbnail,variant_ids:["single_option::"+n.id]}],options:[{id:n.product_id,product_id:n.product_id,name:"Size",position:1,values:e}]}}(a,c):await e()}const i=M(o),r=await fetch(i+"/rest/default/V1/products/"+N(t),{method:"GET",headers:{Authorization:"Bearer "+D,"User-Agent":"PostmanRuntime/7.32.3"}}).then((t=>t.json())).catch((t=>console.error(t)));return await n(r)}async function A(t,o,n){var i,r;if(t.startsWith("single_option::")){const i=t.split("::")[1],r=M(n)+"/ajaxcart",e={Authorization:"Bearer "+D},a=new FormData;a.append("product",i),a.append("item",i),a.append("qty",o),a.append("form_key",P);return await fetch(r,{method:"POST",headers:e,body:a}).then((t=>t.json())).then((t=>({ok:!0,status:200,json:function(){return{}}})))}const e=t.split("::")[1].split(":"),a=e[0],c=(e[1],e[2]),s=(e[3],null!==(i=e[4])&&void 0!==i?i:void 0),u=null!==(r=e[5])&&void 0!==r?r:void 0,p=M(n)+"/ajaxcart",d={Authorization:"Bearer "+D},l=new FormData;l.append("product",a),l.append("item",a),l.append("qty",o),l.append("options["+s+"]",u),l.append("options[size_"+s+"]",c),l.append("form_key",P);return await fetch(p,{method:"POST",headers:d,body:l}).then((t=>t.json())).then((t=>({ok:!0,status:200,json:function(){return{}}})))}const B={STRNV8MHJTF:"https://cart-pim.wforwoman.com/api/v1/whatmore",STR6HU283UZ:"https://cart-pim.wforwoman.com/api/v1/whatmore",STR9T3LLEJB:"https://cart-pim.wforwoman.com/api/v1/whatmore",STRWJMIOJNX:"https://cart-pim.wforwoman.com/api/v1/whatmore",STR1D5ONOZX:"https://cart-pim.wforwoman.com/api/v1/whatmore",STRUDQ36YAC:"https://cart-pim.wforwoman.com/api/v1/whatmore"},z={STRNV8MHJTF:1,STR6HU283UZ:1,STR9T3LLEJB:5,STRWJMIOJNX:2,STR1D5ONOZX:4,STRUDQ36YAC:3},G=window.location.hostname.substring(10,4)+"_cart",L=window.location.hostname.substring(10,4)+"_carts",E=window.location.hostname.substring(10,4)+"_curr";function I(t){return t.product_link.match(/\/([^\/]+)\/?$/)[1].replace(".html","")}function Z(t){return z[t]}function F(t){return B[t]}function $(t){var o;return null!==(o=a.get(E))&&void 0!==o?o:"INR"}async function K(t,o){const n=F(o);return function(t){const o=t.data.product_data[0];var n=Object.entries(o.variation).map((t=>{const o=t[1],n=o.configrable_atribute_value;return{id:o.id_product,product_id:o.id_product,title:"",price:100*o.selling_price,compare_at_price:100*o.price,available:"in-stock"==o.stock_status,option1:n,option2:null,option3:null,options:[n]}}));const i=(n=n.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:o.description,variants:n,options:i}}(await fetch(n+"/get-product?url_key="+I(t)+"&store="+Z(o)+"¤cy="+$(),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t))))}async function Y(t,o,n){const i=F(n),r=a.get(G),e=a.get(L);var c={varient_id:t,qty:o,store:Z(n)};r&&e&&(c={varient_id:t,qty:o,store:Z(n),cart_id:r,cart_session:e});return await fetch(i+"/add-product",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).then((t=>t.json())).then((t=>(r||(a.set(G,t.data.cart_id,{expires:365}),a.set(L,t.data.cart_session,{expires:365})),{ok:!0,status:200,json:function(){return{}}})))}const J={STRJ5VPPT3U:"https://"+window.location.hostname};function X(t){return t.product_link.match(/\/([^\/]+)\/?$/)[1].replace(".html","")}function H(t){return J[t]}async function V(t,o){const n=H(o);return function(t){const o=t;null==o.variations&&(o.variations=["no-variations"]);var n=Object.entries(o.variations).map((t=>{const n=t[1];return{id:o.product_id+"::"+n,product_id:o.product_id,title:"",price:100*o.price,compare_at_price:100*o.mrp,available:!0,option1:n,option2:null,option3:null,options:[n]}}));const i=(n=n.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:o.description,variants:n,options:i}}((await fetch(n+"/catalog/whatsmoreproducts?slug="+X(t),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t)))).product_detail)}async function W(t,o,n){const i=H(n),r=t.split("::"),e=r[0],a=r.length>1?r[1]:"";return await fetch(i+"/cart/addtocart?product_id="+e+("no-variations"===a||t?"":"&variation_value="+a)+"&qty="+o,{method:"GET"}).then((t=>t.json())).then((t=>({ok:!0,status:200,json:function(){return{}}})))}const q="https://www.ninecolours.com";function Q(t){const o=t.product_link.split("-");return o[o.length-1]}function tt(t){return"STRNV8MHJTF"==t||"STR6HU283UZ"==t||"STR9T3LLEJB"==t||"STRWJMIOJNX"==t||"STRUDQ36YAC"==t||"STR1D5ONOZX"==t}function ot(t){return"STRRPY8YRZE"==t}function nt(t){return"STR5KA9X0OZ"==t||"STRR72TX6AT"==t}function it(t){return"STRMM0QP0CU"==t}function rt(t){return"STRJ5VPPT3U"==t}function et(t){return"STRCGMYX28X"==t}async function at(t,o){if(tt(o))return async function(t,o){const n=F(o);return function(t){const o=t.data.product_data[0];var n=Object.entries(o.variation).map((t=>{const o=t[1],n=o.configrable_atribute_value;return{id:o.id_product,product_id:o.id_product,title:"",price:o.selling_price,compare_at_price:o.price,available:"in-stock"==o.stock_status,option1:n,option2:null,option3:null}}));const i=(n=n.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:o.description,variants:n,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:i}]}}}(await fetch(n+"/get-product?url_key="+I(t)+"&store="+Z(o)+"¤cy="+$(),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(ot(o))return async function(t,o){const n=g(o);return function(t){const o=t;var n=Object.entries(o.attributes[0].options).map(((t,n)=>{var i;return{id:(null!==(i=o.variations[n])&&void 0!==i?i:o.variations[0])+":"+o.id+":"+t[1],product_id:o.id,title:"",price:o.price,compare_at_price:o.price,available:"instock"===o.stock_status,option1:t[1],option2:null,option3:null}}));const i=n.map((t=>t.option1));return{product:{id:o.id,title:o.name,body_html:o.short_description,variants:n,images:[{id:o.images[0].id,product_id:o.id,position:1,src:o.images[0].src,variant_ids:[o.variations[0]]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:i}]}}}(await fetch(n+"/wp-json/wc/v3/products/"+T(t),{method:"GET",headers:{Authorization:"Basic "+b}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(nt(o))return async function(t,o){function n(t){const o=t.data.product_data[0];var n=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,available:!o.outOfStock,option1:null,option2:null,option3:null}];const i=(n=n.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:"",variants:n,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:i}]}}}const i=v(o);return n(await fetch(i+"/productsv3api/getproductdetails/"+w(t),{method:"GET",headers:{redirect:"follow"}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(it(o))return async function(t,o){async function n(t){const n=t,i=n.extension_attributes.is_ready_to_ware,r=n.custom_attributes.reduce(((t,o,n)=>(t[o.attribute_code]=o.value,t)),{});async function e(){var t;return{product:{id:n.id,title:n.name,body_html:r.description,variants:[{id:"single_option::"+n.id,product_id:n.id,title:"",price:null!==(t=r.special_price)&&void 0!==t?t:n.price,compare_at_price:n.price,available:!0,option1:n.extension_attributes.stock_item.item_id,option2:null,option3:null}],images:[{id:n.id,product_id:n.id,position:1,src:"https://ik.imagekit.io/wb2spwtue/kreeva/tr:h-433,w-315,q-80,cm-pad_resize/media/catalog/product"+r.thumbnail,variant_ids:[n.id]}],options:[{id:n.product_id,product_id:n.product_id,name:"Size",position:1,values:[n.extension_attributes.stock_item.item_id]}]}}}if(0==i)return await e();if(!("ready_to_wear_sizes"in r))return await e();const a=await C(r.ready_to_wear_sizes,o),c=await O(t);return c?await async function(t,o){const i=t.map(((t,i)=>{var e;const a=n.extension_attributes.stock_item.item_id,c=t.split(":")[0],s=t.split(":")[1];return{id:"multi_option::"+n.id+":"+a+":"+s+":"+c+":"+o,product_id:n.id,title:"",price:null!==(e=r.special_price)&&void 0!==e?e:n.price,compare_at_price:n.price,available:!0,option1:s,option2:null,option3:null,options:null}})),e=t.map(((t,o)=>(t.split(":")[0],t.split(":")[1])));return{product:{id:n.id,title:n.name,body_html:r.description,variants:i,images:[{id:n.id,product_id:n.id,position:1,src:"https://ik.imagekit.io/wb2spwtue/kreeva/tr:h-433,w-315,q-80,cm-pad_resize/media/catalog/product"+r.thumbnail,variant_ids:[n.id]}],options:[{id:n.product_id,product_id:n.product_id,name:"Size",position:1,values:e}]}}}(a,c):await e()}const i=M(o),r=await fetch(i+"/rest/default/V1/products/"+N(t),{method:"GET",headers:{Authorization:"Bearer "+D}}).then((t=>t.json())).catch((t=>console.error(t)));return await n(r)}(t,o);if(rt(o))return async function(t,o){const n=H(o);return function(t){const o=t;null==o.variations&&(o.variations=["no-variations"]);var n=Object.entries(o.variations).map((t=>{const n=t[1];return{id:o.product_id+"::"+n,product_id:o.product_id,title:"",price:o.price,compare_at_price:o.mrp,available:!0,option1:n,option2:null,option3:null}}));const i=(n=n.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:o.description,variants:n,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:i}]}}}((await fetch(n+"/catalog/whatsmoreproducts?slug="+X(t),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t)))).product_detail)}(t,o);if(et(o))return async function(t,o){const n=_(o);return function(t){const o=t.data.product_data,n=o.options[0].product_option_id;var i=Object.entries(o.options[0].product_option_value).map((t=>{const i=t[1];return{id:o.product_id+"::"+n+"::"+i.product_option_value_id,product_id:o.product_id,title:"",price:o.price,compare_at_price:o.mrp,available:parseInt(i.quantity)>0,option1:i.name,option2:null,option3:null}}));const r=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:r}]}}}(await fetch(n+"/wm-getProductDetails",{method:"POST",body:JSON.stringify({merchant_store_id:l(o),sku:d(t)}),headers:{[u]:p}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if("STRGA3S8N41"==o){function n(t){const o=t.data.product_data[0];return{product:{id:o.product_id,title:o.product_title,body_html:o.description,variants:[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,option1:"variant-1",option2:null,option3:null}],images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image[0],variant_ids:[o.product_id]}]}}}const i=q;return n(await fetch(i+"/whatmore-productfetch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_code:Q(t)})}).then((t=>t.json())).catch((t=>console.error(t))))}return{}}async function ct(t,o){if(tt(o))return K(t,o);if(ot(o))return R(t,o);if(nt(o))return y(t,o);if(it(o))return U(t,o);if(rt(o))return V(t,o);if(et(o))return f(t,o);if("STRGA3S8N41"==o){function n(t){const o=t.data.product_data[0];return{id:o.product_id,title:o.product_title,body_html:o.description,variants:[{id:o.product_id,title:"variant-1",option1:"variant-1",option2:null,option3:null,available:!0,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,options:["variant-1"]}],options:[{name:"variant",position:1,values:["variant-1"]}]}}const i=q;return n(await fetch(i+"/whatmore-productfetch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_code:Q(t)})}).then((t=>t.json())).catch((t=>console.error(t))))}return{}}async function st(t,o,n){if(tt(n))return await Y(t,o,n);if(ot(n))return await j(t,o,n);if(it(n))return A(t,o,n);if(rt(n))return W(t,o,n);if(et(n))return m(t,o,n);if("STRGA3S8N41"==n){const n=q;return await fetch(n+"/whatmore-addtocart ",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_id:t,qty:o})})}return{}}async function ut(t,o,n){if(tt(n))return async function(t,o,n){await Y(t,o,n);const r="https://"+window.location.hostname;var e;e=(0,i.lj)(n)?"".concat(r,"/checkout")+"?"+(0,i.aw)(n)+"&"+(0,i.n9)(n)+"&"+(0,i.Uc)(n):"".concat(r,"/checkout"),window.location.href=e}(t,o,n);if(ot(n))return async function(t,o,n){await j(t,o,n);const r="https://"+window.location.hostname;var e;e=(0,i.lj)(n)?"".concat(r,"/cart")+"?"+(0,i.aw)(n)+"&"+(0,i.n9)(n)+"&"+(0,i.Uc)(n):"".concat(r,"/cart"),window.location.href=e}(t,o,n);if(it(n))return async function(t,o,n){await A(t,o,n);const r="https://"+window.location.hostname;var e;e=(0,i.lj)(n)?"".concat(r,"/checkout/cart")+"?"+(0,i.aw)(n)+"&"+(0,i.n9)(n)+"&"+(0,i.Uc)(n):"".concat(r,"/checkout/cart"),window.location.href=e}(t,o,n);if(rt(n))return async function(t,o,n){await W(t,o,n);const r="https://"+window.location.hostname;var e;e=(0,i.lj)(n)?"".concat(r,"/checkout")+"?"+(0,i.aw)(n)+"&"+(0,i.n9)(n)+"&"+(0,i.Uc)(n):"".concat(r,"/checkout"),window.location.href=e}(t,o,n);if(et(n))return async function(t,o,n){await m(t,o,n);const r="https://"+window.location.hostname;var e;e=(0,i.lj)(n)?"".concat(r,"/checkout")+"?"+(0,i.aw)(n)+"&"+(0,i.n9)(n)+"&"+(0,i.Uc)(n):"".concat(r,"/checkout"),window.location.href=e}(t,o,n);if("STRGA3S8N41"==n){await st(t,o,n);const e="https://"+window.location.hostname;var r;r=(0,i.lj)(n)?"".concat(e,"/cart")+"?"+(0,i.aw)(n)+"&"+(0,i.n9)(n)+"&"+(0,i.Uc)(n):"".concat(e,"/cart"),window.location.href=r}return{}}async function pt(t){if(tt(t))return async function(t){const o="https://"+window.location.hostname;var n;n=(0,i.lj)(t)?"".concat(o,"/cart")+"?"+(0,i.aw)(t)+"&"+(0,i.n9)(t)+"&"+(0,i.Uc)(t):"".concat(o,"/cart"),window.location.href=n}(t);if(ot(t))return async function(t){const o="https://"+window.location.hostname;var n;n=(0,i.lj)(t)?"".concat(o,"/cart")+"?"+(0,i.aw)(t)+"&"+(0,i.n9)(t)+"&"+(0,i.Uc)(t):"".concat(o,"/cart"),window.location.href=n}(t);if(it(t))return async function(t){const o="https://"+window.location.hostname;var n;n=(0,i.lj)(t)?"".concat(o,"/checkout/cart")+"?"+(0,i.aw)(t)+"&"+(0,i.n9)(t)+"&"+(0,i.Uc)(t):"".concat(o,"/checkout/cart"),window.location.href=n}(t);if(rt(t))return async function(t){const o="https://"+window.location.hostname;var n;n=(0,i.lj)(t)?"".concat(o,"/cart")+"?"+(0,i.aw)(t)+"&"+(0,i.n9)(t)+"&"+(0,i.Uc)(t):"".concat(o,"/cart"),window.location.href=n}(t);if(et(t))return async function(t){const o="https://"+window.location.hostname;var n;n=(0,i.lj)(t)?"".concat(o,"/cart")+"?"+(0,i.aw)(t)+"&"+(0,i.n9)(t)+"&"+(0,i.Uc)(t):"".concat(o,"/cart"),window.location.href=n}(t);if("STRGA3S8N41"==t){const n="https://"+window.location.hostname;var o;o=(0,i.lj)(t)?"".concat(n,"/cart")+"?"+(0,i.aw)(t)+"&"+(0,i.n9)(t)+"&"+(0,i.Uc)(t):"".concat(n,"/cart"),window.location.href=o}return{}}function dt(t){if(tt(t))return function(t){const o=a.get(G),n=F(t);return fetch(n+"/get-cart",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cart_id:o})}).then((t=>t.json())).then((t=>({json:function(){return{item_count:t.data.item_count}}})))}(t);if(ot(t))return function(t){const o=g(t);return fetch(o+"/wp-json/wc/v3/cart`",{method:"GET",headers:{Authorization:"Basic "+b}}).then((t=>t.json())).then((t=>({json:function(){var o;return{item_count:null!==(o=t.data.item_count)&&void 0!==o?o:0}}})))}(t);if(it(t))return function(t){const o=M(t);return fetch(o+"/wp-json/wc/v3/cart`",{method:"GET",headers:{Authorization:"Basic "+D}}).then((t=>t.json())).then((t=>({json:function(){var o;return{item_count:null!==(o=t.data.item_count)&&void 0!==o?o:0}}})))}(t);if(rt(t))return Promise.resolve({json:function(){return{item_count:0}}});if(et(t))return Promise.resolve({json:function(){return{item_count:0}}});if("STRGA3S8N41"==t){return fetch(q+"/whatmore-cartcount ",{method:"GET",headers:{"Content-Type":"application/json"}})}return{}}async function lt(t,o,n){if(tt(n))return async function(t,o){const n=await K(t,o);return{price:n.variants[0].price/100,compare_at_price:n.variants[0].compare_at_price/100,currency_code:$()}}(t,n);if(ot(n))return async function(t,o){const n=await R(t,o);return{price:n.variants[0].price/100,compare_at_price:n.variants[0].compare_at_price/100,currency_code:"INR"}}(t,n);if(it(n))return async function(t,o){const n=await U(t,o);return{price:n.variants[0].price/100,compare_at_price:n.variants[0].compare_at_price/100,currency_code:"INR"}}(t,n);if(rt(n))return async function(t,o){const n=await V(t,o);return{price:n.variants[0].price/100,compare_at_price:n.variants[0].compare_at_price/100,currency_code:"INR"}}(t,n);if(nt(n))return async function(t,o){const n=await y(t,o);return{price:n.variants[0].price/100,compare_at_price:n.variants[0].compare_at_price/100,currency_code:n.variants[0].currency_code}}(t,n);if(et(n))return async function(t,o){const n=await f(t,o);return{price:n.variants[0].price/100,compare_at_price:n.variants[0].compare_at_price/100,currency_code:"INR"}}(t,n);if("STRGA3S8N41"==n){const o=await ct(t,n);return{price:o.variants[0].price,compare_at_price:o.variants[0].compare_at_price,currency_code:o.variants[0].currency_code}}return{}}},8816:function(t,o,n){"use strict";var i=n(5318);o.Z=void 0;var r=i(n(5045)),e=n(6417),a=(0,r.default)((0,e.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");o.Z=a},417:function(t,o,n){"use strict";var i=n(5318);o.Z=void 0;var r=i(n(5045)),e=n(6417),a=(0,r.default)((0,e.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarHalf");o.Z=a},4885:function(t,o,n){"use strict";var i=n(5318);o.Z=void 0;var r=i(n(5045)),e=n(6417),a=(0,r.default)((0,e.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarOutline");o.Z=a},6040:function(t,o,n){const i=n(500);t.exports=function(t){if("string"!==typeof t)return;const o=t.toUpperCase();return Object.prototype.hasOwnProperty.call(i,o)?i[o]:void 0},t.exports.currencySymbolMap=i},500:function(t){t.exports={AED:"\u062f.\u0625",AFN:"\u060b",ALL:"L",AMD:"\u058f",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20bc",BAM:"KM",BBD:"$",BDT:"\u09f3",BGN:"\u043b\u0432",BHD:".\u062f.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20bf",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"\xa5",CNY:"\xa5",COP:"$",COU:"COU",CRC:"\u20a1",CUC:"$",CUP:"\u20b1",CVE:"$",CZK:"K\u010d",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062f\u062c",EEK:"kr",EGP:"\xa3",ERN:"Nfk",ETB:"Br",ETH:"\u039e",EUR:"\u20ac",FJD:"$",FKP:"\xa3",GBP:"\xa3",GEL:"\u20be",GGP:"\xa3",GHC:"\u20b5",GHS:"GH\u20b5",GIP:"\xa3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20aa",IMP:"\xa3",INR:"\u20b9",IQD:"\u0639.\u062f",IRR:"\ufdfc",ISK:"kr",JEP:"\xa3",JMD:"J$",JOD:"JD",JPY:"\xa5",KES:"KSh",KGS:"\u043b\u0432",KHR:"\u17db",KMF:"CF",KPW:"\u20a9",KRW:"\u20a9",KWD:"KD",KYD:"$",KZT:"\u20b8",LAK:"\u20ad",LBP:"\xa3",LKR:"\u20a8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043d",MMK:"K",MNT:"\u20ae",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20a8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20a6",NIO:"C$",NOK:"kr",NPR:"\u20a8",NZD:"$",OMR:"\ufdfc",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20b1",PKR:"\u20a8",PLN:"z\u0142",PYG:"Gs",QAR:"\ufdfc",RMB:"\uffe5",RON:"lei",RSD:"\u0414\u0438\u043d.",RUB:"\u20bd",RWF:"R\u20a3",SAR:"\ufdfc",SBD:"$",SCR:"\u20a8",SDG:"\u062c.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xa3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xa3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xa3",SZL:"E",THB:"\u0e3f",TJS:"SM",TMT:"T",TND:"\u062f.\u062a",TOP:"T$",TRL:"\u20a4",TRY:"\u20ba",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20b4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043b\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20ab",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20a3",XSU:"Sucre",XUA:"XUA",YER:"\ufdfc",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"}},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[55],{51:function(e,t,n){n.d(t,{Z:function(){return i}});n(7313);var o=n(6417);var i=function(e){return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("span",{className:"whatmore-loading-indicator"})})}},3175:function(e,t,n){var o=n(208),i=n(51),r=n(6417);t.Z=function(e){var t,n;const a=null!==(t=e.height)&&void 0!==t?t:"100%",d=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,r.jsxs)("div",{style:{width:d,height:a,overflow:"hidden"},children:[(0,r.jsx)(o.Od,{height:"100%",width:"100%",speed:0,startColor:"#202020",endColor:"#606060"}),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,r.jsx)(i.Z,{})})})]})}},4998:function(e,t,n){n.d(t,{D:function(){return o}});const o=async function(e,t,n,o){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var i=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("27358003275"==e||"63748341981"==e||"68237558034"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:i,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(i),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e){(new theme.CartDrawer).open()}else"62602182872"==e||"57362710572"==e?(CartJS.getCart(),$(".block-cart").addClass("active")):"60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e?(document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}))):"36300750986"==e?fetch("/?section_id=cart-drawer").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(t),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)})):document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}}));setTimeout(t,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}},2887:function(e,t,n){var o=n(7313),i=(n(6422),n(3175)),r=n(6417);t.Z=function(e){var t,n,a;const[d,s]=(0,o.useState)(!1),c=o.useRef(0),l=(0,o.useRef)(null),u=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},p=null!==(n=e.height)&&void 0!==n?n:"100%",h=null!==(a=e.width)&&void 0!==a?a:"100%";return(0,o.useEffect)((()=>{c.current=0;const e=setInterval((()=>{c.current=c.current+.03,l.current&&u(c.current,5),c.current>=5&&(c.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,r.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:h,height:p,overflow:"hidden"},children:[(0,r.jsx)("div",{style:{width:d?"100%":"0px",height:d?"100%":"0px"},children:(0,r.jsx)("img",{ref:l,src:e.url,style:{objectFit:"cover",height:p,width:h,backgroundColor:"white"},alt:"image player",onLoad:()=>{s(!0)}})}),d?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)(i.Z,{width:"100%",height:"100%"})]})}},4892:function(e,t,n){n.d(t,{Z:function(){return u}});var o=n(7313),i=n(3933),r=n(868),a=n(8984),d=n(7300),s=(n(6422),n(2887)),c=n(6417);var l=function(e){var t,n;const r=(0,o.useRef)(null),[a,d,s]=(0,i.YD)({triggerOnce:!0}),l=null!==(t=e.height)&&void 0!==t?t:"100%",u=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,o.useEffect)((()=>{r.current&&(e.isPlaying?r.current.play():r.current.pause())}),[e.isPlaying,d]),(0,c.jsx)("div",{ref:a,style:{width:l,height:u,overflow:"hidden"},children:d?(0,c.jsx)("video",{ref:r,className:"whatmore-video-player",width:u,height:l,preload:"auto",loop:!0,playsInline:!0,muted:!0,autoPlay:!0,src:e.url,style:{backgroundColor:"white"}}):(0,c.jsx)("div",{width:u,height:l,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var u=function(e){var t,n,u;const[p,h,f]=(0,i.YD)({triggerOnce:!0});if((0,d.WJ)(e.event))return(0,c.jsx)(s.Z,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const m=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200;if((0,a.KE)())return(0,c.jsx)(l,{height:"100%",width:"100%",url:(0,r.V)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:m});const v=(0,o.useRef)(null),w=null!==(n=e.height)&&void 0!==n?n:"100%",g=null!==(u=e.width)&&void 0!==u?u:"100%";return(0,o.useEffect)((()=>{v.current&&(e.isPlaying?v.current.play():v.current.pause())}),[e.isPlaying,h]),(0,c.jsx)("div",{ref:p,style:{width:w,height:g,overflow:"hidden"},children:h?(0,c.jsx)("video",{ref:v,className:"whatmore-video-player",width:g,height:w,preload:"auto",loop:!0,playsInline:!0,muted:!0,src:(0,r.V)(e.url),style:{backgroundColor:"white"}}):(0,c.jsx)("div",{width:g,height:w,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},6055:function(e,t,n){n.r(t),n.d(t,{default:function(){return O}});var o=n(7313),i=n(9854),r=n(2860),a=n(7753),d=n(5160),s=(n(4844),n(6967)),c=n(4959),l=n(4892),u=n(6805),p=n(9821);var h=function(e){const[t,n,o,i,r]=(0,p.Z)(),[d]=(0,a.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[s]=(0,a.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),c=r[u.YP]===u.$w?s/100:d/100*1.2;return[t*c,n*c,r]},f=n(9723),m=n(9461),v=n.n(m),w=n(1195),g=n(7108),b=(n(7244),n(123),n(6417));var x=function(e){const t=o.useRef(null);var[n,r,d]=h();const[s]=(0,a.j1)("whatmoreEmbedAppVideoTitle"),[p]=(0,a.j1)("whatmoreEmbedAppPositionPortrait"),[m]=(0,a.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[x]=(0,a.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[y]=(0,a.j1)("whatmoreEmbedAppPositionLandscape"),[j]=(0,a.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[E]=(0,a.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),_=(0,a.MO)("whatmoreShopId");var P=p,S=m,C=x;d[u.YP]===u.$w&&(P=y,S=j,C=E);const[T,k]=(0,o.useState)(["initial",window.pageYOffset]),[I,z]=(0,o.useState)(!1);function O(e,t){k(e),e[1]<=100?z(!1):t!=I&&z(t)}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(O([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},o=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)}),[T]),(0,c.O3)({ref:t,handler:()=>{O(["scrolled-up",T[1]],!0)}});const A=e.event,L=e.inVideoClick,N=e.closeClick,Z=.3*r,M=.6*r,V=.1*r,D=.1*(.5*r),R="10px",B=(0,i.Z$)(_);var J=!1,F=0,H=0;function Y(e){J=e}return(0,b.jsx)("div",{children:I&&(0,i.lV)(_)?(0,b.jsx)("div",{style:"left"===P?{left:"1px",bottom:C+"px",position:"fixed",zIndex:B}:{right:"5px",bottom:C+"px",position:"fixed",zIndex:B},children:(0,b.jsxs)("div",{onClick:()=>{O(["initial",T[1]],!1)},style:{margin:"1px",width:r+"px",height:n+"px"},className:"left"===P?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,b.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:R,overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,b.jsx)(l.Z,{url:A.thumbnail_image,isPlaying:!1,event:A})})}),(0,b.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,b.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,b.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,b.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,b.jsx)(w.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:Z+"px"},style:{position:"relative",zIndex:1,left:D+"px",bottom:D+"px"},onClick:N})})}),(0,b.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,b.jsx)(g.Z,{sx:{color:"white",fontSize:2*Z+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,b.jsx)(v(),{nodeRef:t,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var n,o;n=t.x,o=t.y,F=n,H=o},onDrag:(e,t)=>{Y(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-F)>5||Math.abs(t.y-H)>5)?Y(!1):L(A)},children:(0,b.jsx)("div",{ref:t,style:"left"===P?{left:S+"px",bottom:C+"px",position:"fixed",zIndex:B}:{right:S+"px",bottom:C+"px",position:"fixed",zIndex:B},children:(0,b.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:r+"px",height:n+"px"}),className:"left"===P?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,b.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:R,overflow:"hidden",position:"relative"},children:(0,b.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,b.jsx)(l.Z,{url:A.thumbnail_image,isMuted:!0,isPlaying:!0,event:A})})}),(0,b.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,b.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,b.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,b.jsx)(w.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:Z+"px"},onClick:N,style:{position:"relative",zIndex:1,left:V+"px",bottom:V+"px"}})}),(0,b.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,b.jsx)(f.Z,{sx:{color:"white",fontSize:M+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,b.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:R,borderBottomRightRadius:R,backgroundImage:s?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,b.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*Z+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",s]})})]})})]})})})})},y=n(58),j=n(8984),E=(n(7247),n(1824),n(4669)),_=n(4998),P=n(9302),S=n(2575),C=n(7300),T=n(6524);const k=(0,S.Z)({key:"whatmore-css-ppv"}),I=o.lazy((()=>Promise.all([n.e(648),n.e(576),n.e(853),n.e(267),n.e(926),n.e(985),n.e(282),n.e(204)]).then(n.bind(n,3008))));function z(e){return e.split(/[?#]/)[0]}var O=function(e){const[t,n]=(0,o.useState)(),[c,l]=(0,o.useState)(),[u]=(0,a.j1)("isInDesignMode"),[p]=(0,a.j1)("isDemoBrand"),[h]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[f,m]=(0,o.useState)(-2),[v]=(0,a.j1)("whatmoreVariantId"),[w]=(0,a.j1)("whatmoreShopId");var[g]=(0,a.j1)("whatmoreProductId");const S=(0,a.MO)("isLandingSharedLink"),O=(0,a.MO)("whatmoreShareTemplateId"),A=((0,a.MO)("whatmoreShareStoryId"),(0,a.MO)("whatmoreShareEventId"));g=(0,i.iX)(w)?z(window.location.href):g;const[L,N]=(0,o.useState)((()=>"true"===h?v:g));var Z=r.Gc+"/v1/brand/"+w+"/product-events";(0,o.useEffect)((()=>{(0,s.hb)()}),[]),(0,o.useEffect)((()=>{(0,E.ll)(w)}),[]),(0,o.useEffect)((()=>{null==t||0==t.length||c||!(0,j.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,y.b5)(y.UD)}),[t]),(0,o.useEffect)((()=>{m(-1),fetch(Z.toString()+"?client_product_id="+L.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>(n(e),e))).then((e=>((0,i.yo)(w)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==z(window.location.href))return;const o={product_id:n.product_id,product_link:z(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)})}),500)}(e,L),e))).catch((e=>{l(e.message)}))}),[L]),(0,o.useEffect)((()=>{m(-2)}),[t]),(0,o.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===h){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var o=t[n].split("=");if(o[0]==e)return o[1]}return!1}("variant");e&&""!==e&&N(e)}}))}),[]),(0,o.useEffect)((()=>{null==t||0==t.length||c||S&&"template-embed"==(0,T.z)(O)&&null!=A&&t.forEach(((e,t)=>{A==e.event_id&&M(e,!0,t)}))}),[t]);const M=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,j.KE)()&&!t&&(0,y.QV)(),(0,C.B6)(e)||(0,C.WJ)(e))return u||p||(async()=>{(0,d.wh)(e),(0,E.Tc)(w,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"product_page","video_popup")})(),void m(n)};function V(){return(0,b.jsx)(b.Fragment,{})}return null==t||0==t.length||c?(0,b.jsx)("div",{}):(0,b.jsx)(P.C,{value:k,children:"no-product"===L||-1===f||0===t.length?(0,b.jsx)(V,{}):-2===f&&t.length>0?(0,b.jsx)("div",{children:(0,b.jsx)(x,{event:t[0],inVideoClick:M,closeClick:e=>{e.stopPropagation(),m(-1)}})}):(0,b.jsx)("div",{children:(0,b.jsx)(o.Suspense,{children:(0,b.jsx)(I,{events:t,index:f,onBack:function(){(0,i.n2)(w)&&(0,a.MO)("whatmoreAddedToCart")&&(0,_.D)(w,(()=>{}),100,window.location.hostname),m(-2)},template:"template-product-page"})})})})}},868:function(e,t,n){n.d(t,{V:function(){return d}});var o=n(9854),i=n(7753);const r={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},a={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},d=function(e){const t=(0,i.MO)("whatmoreShopId");if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,o.zp)(t))return e;if("AZURECDN"==(0,o.zp)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(r))if(e.includes(t))return e.replace(t,r[t]);return e}}if("BUNNYCDN"==(0,o.zp)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(a))if(e.includes(t))return e.replace(t,a[t]);return e}}return e}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return i},yC:function(){return r}});const o=function(e){return"video"===e.event_type},i=function(e){return"image"===e.event_type},r=function(e){return"livestream"===e.event_type}},6524:function(e,t,n){n.d(t,{Q:function(){return a},z:function(){return r}});const o={ta:"template-a",ta1:"template-a-1",tb:"template-b",tc:"template-c",td:"template-d",te:"template-e",te:"template-embed",tsa:"template-stories-a",tsb:"template-stories-b",tfa:"template-feed-a",tca:"template-collections-a",tcb:"template-collections-b",tcc:"template-collections-c",tcd:"template-collections-d",tce:"template-collections-e"},i={"template-a":"ta","template-a-1":"ta1","template-c":"tc","template-d":"td","template-e":"te","template-b":"tb","template-embed":"te","template-stories-a":"tsa","template-stories-b":"tsb","template-feed-a":"tfa","template-collections-a":"tca","template-collections-b":"tcb","template-collections-c":"tcc","template-collections-d":"tcd","template-collections-e":"tce"},r=function(e){return o[e]},a=function(e){return i[e]}},6805:function(e,t,n){n.d(t,{$I:function(){return d},$w:function(){return c},AK:function(){return r},AL:function(){return a},YP:function(){return i},me:function(){return o},rE:function(){return s}});const o="device_type",i="device_mode",r="mobile",a="tablet",d="desktop",s="portrait",c="landscape"},6422:function(e,t,n){var o=n(7313),i=n(7753);t.Z=function(e){const[t,n]=(0,i.j1)("muted");return(0,o.useEffect)((()=>{}),[]),[t,n]}},8866:function(e,t,n){var o=n(7313);function i(){return[window.innerHeight,window.innerWidth]}t.Z=function(e){var[t,n]=i();const[r,a]=(0,o.useState)(["portrait",t,n]);return(0,o.useLayoutEffect)((()=>{function e(){var[e,t]=i();a(e>t?["portrait",e,t]:["landscape",e,t])}return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),screen.orientation&&screen.orientation.addEventListener("change",e),e(),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),screen.orientation&&screen.orientation.removeEventListener("change",e)}}),[]),r}},9821:function(e,t,n){var o=n(6367),i=n(7753),r=n(8866),a=n(6805);t.Z=function(e){const[t,n,d]=(0,r.Z)(),[s]=(0,i.j1)("whatmoreLandscapePadding"),[c]=(0,i.j1)("whatmoreVideoTileSize"),l=(0,o.useMediaQuery)({query:"(min-width: 1025px)"}),u=(0,o.useMediaQuery)({query:"(min-width: 481px)"}),p=!("portrait"!=t||!u),h=c/100*1.3*.5,f=c/100;var m=Math.min(d,n),[v,w,g,b]=[.6*m*(16/9),.6*m,1.4,0];function x(e){return Math.round(10*e)/10}var y={DEVICE_TYPE:a.AK,DEVICE_MODE:a.rE};if(l){const e=w*h,t=v*h;[v,w,g,b]=[t,e,(d-2*s)/(1.1*e),s],y[a.me]=a.$I,y[a.YP]=a.$w}else if(p){var j=.8*w,E=.8*v;"portrait"==t?(j*=f,E*=f,[v,w,g,b]=[E,j,x(d/(1.2*j)),0],y[a.me]=a.AL,y[a.YP]=a.rE):([v,w,g,b]=[E,j,(d-2*s)/(1.1*j),s],y[a.me]=a.AL,y[a.YP]=a.$w)}else{j=w,E=v;"portrait"==t?(j*=f,E*=f,[v,w,g,b]=[E,j,x(d/(1.2*j)),0],y[a.me]=a.AK,y[a.YP]=a.rE):(j=.7*w,E=.7*v,[v,w,g,b]=[E,j,(d-2*s)/(1.1*j),s],y[a.me]=a.AK,y[a.YP]=a.$w)}return[v,w,g,b,y]}},5160:function(e,t,n){n.d(t,{$L:function(){return d},JX:function(){return a},rp:function(){return s},wh:function(){return i},wz:function(){return r}});var o=n(2860);n(7753);function i(e){console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(o.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function r(e,t){console.debug("updating event-product click count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(o.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product click count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product click count for event {} : ",e.event_id,t)}))}function a(e,t,n){console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const i={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(o.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)}).then((e=>(console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product add to cart count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product add to cart count for event {} : ",e.event_id,t)}))}function d(e,t){console.debug("updating event-product buy now count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(o.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product buy now count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product buy now count for event {} : ",e.event_id,t)}))}async function s(){let{storeId:e="",eventId:t=0,productId:n="",variantId:i="",cartToken:r="",checkoutToken:a="",quantity:d=0,price:s="",actionType:c="",trackingId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u={event_id:t,product_id:n,cart_token:r,checkout_token:a,quantity:d,price:s,variant_id:i,action_type:c,tracking_id:l};console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,i);const p=await fetch(o.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(u)}).then((e=>(console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP "+e.status),e.json()))).catch((e=>{console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ",t,n,i)}));return p}},4669:function(e,t,n){n.d(t,{Tc:function(){return u},ll:function(){return l}});var o=n(1824),i=n(7786),r=n(9854);n(7753);const a="Whatmore Video Shopping",d="Video View",s={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},c={homepage:"Home Page",product_page:"Product Page"};async function l(e){if((0,r.Dv)(e)&&null!==(0,r.hf)(e)&&(i.ZP.initialize((0,r.hf)(e)),console.debug("Whatmore: initialized GA4")),(0,r.hv)(e)&&null!==(0,r.BH)(e)){const t=(0,r.OQ)(e);o.ZP.initialize((0,r.BH)(e),{useExistingGa:t}),console.debug("Whatmore: initialized GA3")}}async function u(e,t,n){(0,r.hv)(e)&&null!==(0,r.BH)(e)&&(o.ZP.event({category:a,action:d,label:c[t]+":"+s[n]}),console.debug("Whatmore: pushed view event to GA3")),(0,r.Dv)(e)&&null!==(0,r.hf)(e)&&(i.ZP.event({category:a,action:d+":"+c[t]+":"+s[n],value:1,nonInteraction:!1}),console.debug("Whatmore: pushed view event to GA4"))}},123:function(){},7244:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return k}});var o=n(7753),a=n(7313),i=n(2860),r=n(499),s=n(4897),c=n(5160),d=n(9854),u=n(6967),l=n(8984),p=n(58),h=n(4669),m=n(4998),v=n(6966),g=n(7300),f=n(6524),b=n(6417);const T=a.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(853),n.e(926),n.e(282),n.e(95)]).then(n.bind(n,4095)))),_=a.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(576),n.e(664),n.e(517)]).then(n.bind(n,5523)))),y=a.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(136)]).then(n.bind(n,3827)))),S=a.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(92)]).then(n.bind(n,6071)))),w=a.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(245)]).then(n.bind(n,1291)))),j=a.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),x=a.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(240),n.e(576),n.e(853),n.e(267),n.e(926),n.e(985),n.e(282),n.e(166)]).then(n.bind(n,3008)))),I=a.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(853),n.e(926),n.e(664),n.e(850)]).then(n.bind(n,4048)))),C=a.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(576),n.e(664),n.e(602)]).then(n.bind(n,8091))));var E=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[E]=(0,o.j1)("whatmoreTopBottomPadding"),[P]=(0,o.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:M}=(0,a.useContext)(v.I),[O]=(0,o.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:k}=(0,a.useContext)(v.I),D=(0,o.MO)("isLandingSharedLink"),N=(0,o.MO)("whatmoreShareTemplateId"),Z=(0,o.MO)("whatmoreShareStoryId"),z=(0,o.MO)("whatmoreShareEventId"),[G,U]=(0,a.useState)(-1),[A,L]=(0,a.useState)(null);var J=e.events,V=null;function R(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,l.KE)()&&!o&&(0,p.QV)(),t||n||(async()=>{const t=V[e].events[0];(0,c.wh)(t),(0,h.Tc)(O,i.Xh,i.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var r=0;null!=a&&V[e].events.map(((e,t)=>{e.event_id==a&&(r=t)})),U(r),L(e)}function B(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,l.KE)()&&!o&&(0,p.QV)(),(0,g.B6)(e)||(0,g.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,h.Tc)(O,i.Xh,i.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void U(e.index);const a=20;var{status:d,bannerText:m,timeToStartInMins:v}=s.Z.getEventStatus(e);v<=a&&d.name!==r.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):U(e.index)}function H(e){return(0,b.jsx)(b.Fragment,{})}return M&&!V&&(V=function(e){var t=e.reduce(((e,t,n)=>{var o=t.storyset_id;return o in e?(e[o].total_events=e[o].total_events+1,e[o].events.push(t)):e[o]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(J)),(0,a.useEffect)((()=>{D&&k==(0,f.z)(N)&&(null!=Z&&M?V.forEach(((e,t)=>{Z==e.id&&R(t,!0,z)})):null!=z&&J.forEach(((e,t)=>{z==e.event_id&&B(e,!0)})))}),[]),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{marginTop:(M?P:E)+"px",marginBottom:(M?P:E)+"px"},children:"template-b"===k?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(T,{events:J,onClick:B,heading:e.heading})}):"template-a-1"===k?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(_,{events:J,onClick:B,heading:e.heading})}):"template-feed-a"===k?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(C,{events:J,onClick:B,heading:e.heading})}):"template-collections-a"===k||"template-c"===k?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(y,{events:J,onClick:B,heading:e.heading})}):"template-collections-b"===k||"template-d"===k?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(S,{events:J,onClick:B,heading:e.heading})}):"template-collections-c"===k||"template-e"===k?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(w,{events:J,onClick:B,heading:e.heading})}):"template-collections-d"===k?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(T,{events:J,onClick:B,heading:e.heading})}):"template-collections-e"===k?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(I,{events:J,onClick:B,heading:e.heading})}):M?(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(j,{eventsStories:V,onClick:R,template:k})}):(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(I,{events:J,onClick:B,heading:e.heading})})}),-1==G?(0,b.jsx)(H,{}):(0,b.jsx)(a.Suspense,{children:(0,b.jsx)(x,{events:J,index:G,onBack:function(e){(0,d.n2)(O)&&(0,o.MO)("whatmoreAddedToCart")&&(0,m.D)(O,(()=>{}),100,window.location.hostname),U(-1)},slideDirection:M||"horizontal"===(0,d.e8)(O)?"horizontal":"vertical",eventsStories:V,initialStoryIndex:A,template:k})})]})};const P=function(e,t,n){const a=(0,o.MO)("whatmoreShopId");var i=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),r=Object.keys(i);if("60960964855"==a&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var s={};fera.getRatings(r,(e=>{new Promise(((t,n)=>{e.forEach((e=>{s[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(s)})).then((e=>n(e)))}))}if("23114481744"==a){const e="1e6MQXxzYR19mpw9Km6Dcm86";s={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+r.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{s[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),s))).then((e=>n(e))).catch((e=>console.error(e)))}};var M=n(3388);var O=function(e){const[t,n]=(0,a.useState)(),[r,s]=(0,a.useState)(),{whatmoreIsStoriesTemplate:c}=(0,a.useContext)(v.I),{whatmoreIsCollectionsTemplate:h}=(0,a.useContext)(v.I),[m]=(0,o.j1)("whatmoreShopId"),[g]=(0,o.j1)("whatmoreCollectionId"),f=(0,d.cZ)(m)?window.location.href.split(/[?#]/)[0]:g,[T,_]=(0,o.j1)("productRatings");var y=(0,d.ef)(m)?i.Dm+"/v1/events/":i.Gc+"/v1/events/",S=(0,d.ef)(m)?i.Dm+"/collection/":i.Gc+"/collection/",w=e.shopId;return(0,a.useEffect)((()=>{(0,u.hb)()}),[]),(0,a.useEffect)((()=>{null==t||0==t.length||r||!(0,l.KE)()||(0,o.MO)("whatmoreVideoPlayerPoolInitiated")||(0,p.b5)(p.UD)}),[t]),(0,a.useEffect)((()=>{var e;e=h?S.toString()+"?store_id="+w.toString()+"&client_collection_id="+f:y.toString()+w.toString()+"?status="+"live,upcoming".toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":""),fetch(e).then((e=>e.json())).then((e=>(0,M.kW)(e,h))).then((e=>c?e:(0,M.e8)(e,w))).then((e=>(null!=e&&0!=e.length&&(0,d.LU)(m)&&function(e,t,n){const a=setInterval((()=>{null===(0,o.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(a)}),1e4)}(m,e,(e=>{_(e)})),e))).then((e=>{null==e||0==e.length||c||(0,d.NO)(w,e),n(e)})).catch((e=>{s(e.message)}))}),[]),null==t||0==t.length||r?(0,b.jsx)("div",{}):(function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),(0,b.jsx)("div",{children:(0,b.jsx)(E,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var k=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[r]=(0,o.j1)("whatmoreShopId"),[s]=(0,o.j1)("whatmoreHeading"),[c]=(0,o.j1)("whatmorePrimaryColor"),[d]=(0,o.j1)("whatmoreSecondaryColor");return(0,a.useEffect)((()=>{(0,h.ll)(r)}),[]),(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("div",{children:t||n?(0,b.jsx)("div",{children:(0,b.jsx)(O,{heading:s,shopId:i.aA})}):(0,b.jsx)("div",{children:(0,b.jsx)(O,{heading:s,shopId:r})})})})}},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,n){var o=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,a=e.scheduled_date,i=e.status,r=e.time_zone;if(i.toUpperCase()==o.Z.LIVE.name)return{status:o.Z.LIVE,bannerText:" "+o.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==o.Z.UPCOMING.name){var s=new Date(a+" "+t+" "+r),c=(new Date(a+" "+n+" "+r),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,a=n/60,i=a/60,r=i/24;return n<=0?{status:o.Z.COMPLETED,bannerText:" "+o.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:a<60?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" min ",timeToStartInMins:a}:i<24?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:r<7?{status:o.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*r*24}:{status:o.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:c.status,bannerText:c.bannerText,timeToStartInMins:c.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:o.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},4998:function(e,t,n){n.d(t,{D:function(){return o}});const o=async function(e,t,n,o){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var a=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("27358003275"==e||"63748341981"==e||"68237558034"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:a,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(a),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e){(new theme.CartDrawer).open()}else"62602182872"==e||"57362710572"==e?(CartJS.getCart(),$(".block-cart").addClass("active")):"60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e?(document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}))):"36300750986"==e?fetch("/?section_id=cart-drawer").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(t),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)})):document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}}));setTimeout(t,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}},3388:function(e,t,n){n.d(t,{e8:function(){return i},kT:function(){return o},kW:function(){return r},xg:function(){return a}});const o=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},a=function(e,t){return!(void 0==e.products||0==e.products.length)},i=function(e,t){if(null!=e)return e.filter((e=>1==o(e)))},r=function(e,t){if(null!=e)return t?e[0].events:e}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return a},yC:function(){return i}});const o=function(e){return"video"===e.event_type},a=function(e){return"image"===e.event_type},i=function(e){return"livestream"===e.event_type}},6524:function(e,t,n){n.d(t,{Q:function(){return r},z:function(){return i}});const o={ta:"template-a",ta1:"template-a-1",tb:"template-b",tc:"template-c",td:"template-d",te:"template-e",te:"template-embed",tsa:"template-stories-a",tsb:"template-stories-b",tfa:"template-feed-a",tca:"template-collections-a",tcb:"template-collections-b",tcc:"template-collections-c",tcd:"template-collections-d",tce:"template-collections-e"},a={"template-a":"ta","template-a-1":"ta1","template-c":"tc","template-d":"td","template-e":"te","template-b":"tb","template-embed":"te","template-stories-a":"tsa","template-stories-b":"tsb","template-feed-a":"tfa","template-collections-a":"tca","template-collections-b":"tcb","template-collections-c":"tcc","template-collections-d":"tcd","template-collections-e":"tce"},i=function(e){return o[e]},r=function(e){return a[e]}},5160:function(e,t,n){n.d(t,{$L:function(){return s},JX:function(){return r},rp:function(){return c},wh:function(){return a},wz:function(){return i}});var o=n(2860);n(7753);function a(e){console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(o.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function i(e,t){console.debug("updating event-product click count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(o.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product click count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product click count for event {} : ",e.event_id,t)}))}function r(e,t,n){console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const a={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(o.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>(console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product add to cart count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product add to cart count for event {} : ",e.event_id,t)}))}function s(e,t){console.debug("updating event-product buy now count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(o.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user event-product buy now count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product buy now count for event {} : ",e.event_id,t)}))}async function c(){let{storeId:e="",eventId:t=0,productId:n="",variantId:a="",cartToken:i="",checkoutToken:r="",quantity:s=0,price:c="",actionType:d="",trackingId:u=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l={event_id:t,product_id:n,cart_token:i,checkout_token:r,quantity:s,price:c,variant_id:a,action_type:d,tracking_id:u};console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,a);const p=await fetch(o.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(l)}).then((e=>(console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP "+e.status),e.json()))).catch((e=>{console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ",t,n,a)}));return p}},4669:function(e,t,n){n.d(t,{Tc:function(){return l},ll:function(){return u}});var o=n(1824),a=n(7786),i=n(9854);n(7753);const r="Whatmore Video Shopping",s="Video View",c={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},d={homepage:"Home Page",product_page:"Product Page"};async function u(e){if((0,i.Dv)(e)&&null!==(0,i.hf)(e)&&(a.ZP.initialize((0,i.hf)(e)),console.debug("Whatmore: initialized GA4")),(0,i.hv)(e)&&null!==(0,i.BH)(e)){const t=(0,i.OQ)(e);o.ZP.initialize((0,i.BH)(e),{useExistingGa:t}),console.debug("Whatmore: initialized GA3")}}async function l(e,t,n){(0,i.hv)(e)&&null!==(0,i.BH)(e)&&(o.ZP.event({category:r,action:s,label:d[t]+":"+c[n]}),console.debug("Whatmore: pushed view event to GA3")),(0,i.Dv)(e)&&null!==(0,i.hf)(e)&&(a.ZP.event({category:r,action:s+":"+d[t]+":"+c[n],value:1,nonInteraction:!1}),console.debug("Whatmore: pushed view event to GA4"))}}}]);
|