whatmore-react-assets 1.0.1063 → 1.0.1065
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
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see carousel-template-f.5264770d.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[116],{9085:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return N}});var r=o(7313),n=(o(3439),o(6090)),i=o(32),s=o(7616),l=(o(6143),o(4444),o(7244),o(123),o(5892),o(9302)),a=o(2575),c=o(9821),d=o(8866),p=o(2279),u=o.n(p),h=o(7753),m=o(7129),x=o(1855),f=o(9854),y=o(364),v=o(4522),g=o(778),C=o(4892),M=o(5945),S=o(9219),w=o(6805),P=o(8984),D=o(7053),j=o(5416),R=o(6417);var b=function(e){var t,o,n,i,s,l,a,d,p,u,x,y;const[v,g,b,O,T]=(0,c.Z)(),B=(0,h.MO)("whatmoreShopId"),I="portrait"===T[w.YP],N=(I?1.076*g*(0,f.pEd)(B):g*(0,f.H4g)(B))+"px",$=(I?1.076*g*(0,f.pEd)(B):g*(0,f.H4g)(B))+"px",U=(I?.965*g*(0,f.pEd)(B):.859*g*(0,f.H4g)(B))+"px",[E,F]=(0,r.useState)(e.event),L=(0,h.MO)("whatmoreSecondaryColor");var A=(0,r.useContext)(m.V);const K=null===(t=e.isOnFocus)||void 0===t||t,k=null!==(o=e.playOnUnfocus)&&void 0!==o&&o,G=e.onClick,Y=(0,h.MO)("whatmoreUITheme"),Z=null!==(n=e.animateOnFocus&&(0,f.iWI)(B))&&void 0!==n&&n,[W,H]=(0,r.useState)(!1),V=(0,h.MO)("whatmorePrimaryFont"),X=Math.round(+(null===(i=E.products[0])||void 0===i?void 0:i.price)),z=Math.round(+(null===(s=E.products[0])||void 0===s?void 0:s.compare_price)),_=z&&0!=z&&z>X?Math.round((z-X)/z*100):NaN,[J,Q]=(0,r.useState)(_),[q,ee]=(0,r.useState)(),te="55143268394"===B;return(0,r.useEffect)((()=>{(0,f.N8M)(B)&&(0,S.p_)(E,(0,f.Ipo)(B),B).then((e=>{var t,o,r;F(e),(null===e||void 0===e||null===(t=e.products)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.discount)&&Q(null===e||void 0===e||null===(r=e.products[0])||void 0===r?void 0:r.discount),H(!0)}));(async()=>{var e;const t=await(0,D.p)(null===E||void 0===E||null===(e=E.products)||void 0===e?void 0:e[0],(0,f.Ipo)(B),B);ee(t),H(!0)})()}),[]),(0,R.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",A.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",A.tileBottomMMargin+"px","important"))},className:Z&&!I?K?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:g},onClick:()=>{G(E)},children:[(0,R.jsx)("div",{style:{borderRadius:"round"==Y?"5%":"0px",boxShadow:"round"==Y?"0px 0px 5px 0px #B0B0B0":null,height:v,borderWidth:(0,f.alU)(B),borderColor:(0,f.qPe)(B),overflow:"hidden"},children:(0,R.jsx)(C.Z,{height:(0,f.dXm)(B)+" !important",width:"100%",url:E.thumbnail_image,isPlaying:K||k||(0,P.gE)(),event:E})}),(0,R.jsxs)("div",{style:{display:(0,f.pvY)(B)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:te?"8px":"5px",alignItems:te?"center":"flex-start"},children:[(0,R.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-size",te?"0.9rem":N,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",V,"important"),e.style.setProperty("-webkit-line-clamp",1,"important"),e.style.setProperty("line-clamp",1,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},children:(0,M.s)(null===(l=E.products[0])||void 0===l?void 0:l.title)}),W&&(0,f.QaY)(B)&&(0,R.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,f.$zZ)(B)?"row":"row-reverse",justifyContent:te?"center":(0,f.$zZ)(B)?"flex-start":"flex-end"},children:[(0,R.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.Uyp)(B),"important"),e.style.setProperty("font-size",te?"0.9rem":$,"important"),e.style.setProperty("font-family",V,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,f.rPP)(B)?"normal":"bold"},children:(0,S.jx)(parseFloat((0,j.G)()?null===q||void 0===q?void 0:q.price:null===E||void 0===E||null===(a=E.products)||void 0===a||null===(d=a[0])||void 0===d?void 0:d.price)," ",B,null===(p=E.products[0])||void 0===p?void 0:p.currency)}),!isNaN(z)&&z>X&&(0,R.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.kPs)(B),"important"),e.style.setProperty("font-size",te?"0.9rem":$,"important"),e.style.setProperty("font-family",V,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through",alignItems:te?"center":void 0},children:(0,S.jx)(parseFloat((0,j.G)()?null===q||void 0===q?void 0:q.compare_at_price:null===E||void 0===E||null===(u=E.products)||void 0===u||null===(x=u[0])||void 0===x?void 0:x.compare_price)," ",B,null===(y=E.products[0])||void 0===y?void 0:y.currency)})]}),(0,f.QaY)(B)&&!isNaN(J)&&0!=J&&W&&(0,R.jsx)("div",{style:{display:(0,f.aKo)(B)?"flex":"none",backgroundColor:te?L:"green"===(0,f.ZJm)(B)?"#343434"===L?(0,f.ZJm)(B):L:(0,f.ZJm)(B),alignItems:"center",justifyContent:te?"center":void 0,borderRadius:te?"25px":(0,f.CF_)(B)+"px",width:te?.5*g:"fit-content",padding:(0,f.Spx)(B)?te?"12px 12px":"3px 6px":"0px",margin:te?"0 auto":void 0,textAlign:te?"center":void 0,height:te?"7%":void 0},children:(0,f.Spx)(B)?(0,R.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.mso)(B),"important"),e.style.setProperty("font-size",te?"0.7rem":U,"important"),e.style.setProperty("font-family",V,"important"),e.style.setProperty("font-weight",te?"600":"normal","important"))},children:te?"BUY NOW":`${J}% Off`}):(0,R.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.aUT)(B),"important"),e.style.setProperty("font-size",U,"important"),e.style.setProperty("font-family",(0,f.V3Y)(B),"important"))},children:(0,f.sG7)(B)})})]})]})},O=o(7381);const T=(0,a.Z)({key:"whatmore-css-hv"});function B(e){const[t,o,n]=(0,c.Z)(),i=(0,h.MO)("whatmoreShopId"),s=e.events,l=e.onClick,{whatmoreWidgetSourceDetails:a}=(0,r.useContext)(y.I),d=Math.ceil(n),p=2*d,[u,m]=(0,r.useState)(p),[C,M]=(0,r.useState)(2*d),S=0===(0,f.WGf)(i)?24:(0,f.WGf)(i),[w,P]=(0,r.useState)({touchX:0,touchY:0}),D=()=>(0,R.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,R.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),j=()=>(0,R.jsx)("div",{style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,R.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),O=e=>{if("next"===e){const e=2;M((e=>Math.min(e+Math.floor(n),s.length+d+1))),m((t=>Math.min(t+e,s.length+d+1)))}else M((e=>Math.max(e-Math.floor(n),p)));(0,v.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:a})};return(0,R.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:e=>{P({touchX:e.touches[0].clientX,touchY:e.touches[0].clientY})},onTouchEnd:e=>{var t,o,r,n;const i=(null===(t=e.changedTouches)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.clientX)-w.touchX,s=(null===(r=e.changedTouches)||void 0===r||null===(n=r[0])||void 0===n?void 0:n.clientY)-w.touchY;Math.sqrt(i**2+s**2)>10&&Math.abs(i)>Math.abs(s)&&O(i>0?"prev":"next")},children:[(0,f.Yxs)(i)&&(0,R.jsxs)(R.Fragment,{children:[C<=s.length+d&&(0,R.jsx)("div",{onClick:()=>O("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,R.jsx)(D,{})}),C>2*d&&(0,R.jsx)("div",{onClick:()=>O("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,R.jsx)(j,{})})]}),(0,R.jsx)("div",{style:{display:"flex",gap:S,transform:`translateX(-${(C-p)*(o+S)}px)`,transition:"transform 0.4s ease-in-out"},children:s.map(((e,t)=>t<u?(0,R.jsx)("div",{children:(0,R.jsx)(b,{isOnFocus:t<=C-d-1&&t>=Math.max(0,C-p),playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>l(e)})},`whatmore-carousel-tile-${t}`):(0,R.jsx)(x.Z,{})))})]})}function I(e){const[t,o,n,i]=(0,c.Z)(),[s,l]=(0,r.useState)(-1),a=(0,h.MO)("whatmoreShopId"),[d,p]=(0,r.useState)("next"),m=e.onClick,x=e.events,{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(y.I),M=Math.min(Math.ceil(n),x.length),[S,w]=(0,r.useState)(0),P=0===(0,f.WGf)(a)?24:(0,f.WGf)(a),D=()=>(0,R.jsx)("div",{children:(0,R.jsx)("button",{onClick:B,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,R.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),j=()=>(0,R.jsx)("div",{children:(0,R.jsx)("button",{onClick:T,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,R.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,r.useEffect)((()=>{S<=M&&w((e=>e+M))}),[M]);const O=()=>{l(-1)},T=()=>{S!==M&&(p("prev"),w((e=>Math.max(Math.ceil(e-n),M))),(0,v.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:C}))},B=()=>{S>x.length+n||(p("next"),w((e=>Math.floor(e+n))),(0,v.y4)({userInteractionType:g.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:C}))},I=S>x.length?x.length-M+1:S-M,N=S>=x.length?x.length:I+M,$=x.slice(I,N);return(0,R.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:`${i}px`,paddingRight:`${i}px`},children:[x.length>=n-1&&x.length>4&&(0,R.jsx)("div",{style:{position:"absolute",left:i+"px",zIndex:1,top:"50%",transform:"translateY(-65%)"},children:S!==M&&(0,R.jsx)(j,{})}),(0,R.jsx)("div",{style:{display:"flex",gap:P+"px",width:o*n*(0,f.Su5)(a)+"px",justifyContent:x.length<=n-1||x.length<5?"center":"flex-start",overflow:"hidden"},children:$.map(((e,t)=>{const o=`whatmore-event-tile-landscape-${e.index}${t===M-1?"-last":""}`,r=t===s;return(0,R.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-"+("next"===d?"next":"prev"),onMouseEnter:()=>(e=>{const t=u()((()=>l(e)),300);return t(),t.cancel})(t),onMouseLeave:O,children:(0,R.jsx)(b,{isOnFocus:r,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>(e=>{m(e)})(e)})},o)}))}),x.length>=n-1&&x.length>4&&(0,R.jsx)("div",{style:{position:"absolute",zIndex:1,top:"50%",right:i+"px",transform:"translateY(-65%)"},children:S<=x.length&&(0,R.jsx)(D,{})})]})}var N=function(e){const[t,o,a]=(0,d.Z)(),[c]=(0,h.j1)("whatmoreShopId"),[p]=(0,h.j1)("whatmorePrimaryColor"),[u]=(0,h.j1)("whatmoreSecondaryColor"),[x]=(0,h.j1)("whatmoreTitleFont"),v="portrait"==t?(0,h.MO)("whatmoreTitleFontSizePortrait"):(0,h.MO)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,r.useContext)(y.I),C=((0,h.MO)("isInDesignMode"),(0,h.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:M}=(0,r.useContext)(y.I),S=e.events,w=e.onClick,P=x;function D(e){w(e)}return(0,r.useEffect)((()=>{(0,O.Oo)("Video shopping powered by Whatmore!")}),[]),(0,r.useEffect)((()=>{i.IR.forEach((e=>{var t;const o=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-f"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-f"]');if(!o)return;o&&e&&(e.style.minHeight="0px")}))}),[]),delete s.ZP.styles.global,(0,R.jsx)(l.C,{value:T,children:(0,R.jsx)("div",{className:"whatmore-carousel-events",children:(0,R.jsx)(n.x,{theme:s.ZP,cssVarsRoot:g,resetCSS:!1,children:(0,R.jsxs)(m.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||M?(0,R.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,R.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",P,"important"),e.style.setProperty("font-size",v+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(c),lineHeight:(0,f.vY4)(c),letterSpacing:(0,f.X2K)(c)},children:M?"W"!==C?C:"":e.heading})}):(0,R.jsx)(R.Fragment,{}),"landscape"===t?(0,R.jsx)(I,{events:S,onClick:D}):(0,R.jsx)(B,{events:S,onClick:D})]})})})})}},7129:function(e,t,o){"use strict";o.d(t,{V:function(){return r}});const r=(0,o(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(e,t,o){"use strict";var r=o(7313),n=o(9821),i=o(7129),s=o(6417);t.Z=function(e){var[t,o]=(0,n.Z)();return(0,r.useContext)(i.V),e.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:o,height:t,overflow:"hidden"}})}},6040:function(e,t,o){const r=o(500);e.exports=function(e){if("string"!==typeof e)return;const t=e.toUpperCase();return Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0},e.exports.currencySymbolMap=r},500:function(e){e.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:"$"}},3439:function(){},5892:function(){},4444:function(){},8507:function(e,t){"use strict";function o(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)e[r]=o[r]}return e}var r=function e(t,r){function n(e,n,i){if("undefined"!==typeof document){"number"===typeof(i=o({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in i)i[l]&&(s+="; "+l,!0!==i[l]&&(s+="="+i[l].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+s}}return Object.create({set:n,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var o=document.cookie?document.cookie.split("; "):[],r={},n=0;n<o.length;n++){var i=o[n].split("="),s=i.slice(1).join("=");try{var l=decodeURIComponent(i[0]);if(r[l]=t.read(s,l),e===l)break}catch(a){}}return e?r[e]:r}},remove:function(e,t){n(e,"",o({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,o({},this.attributes,t))},withConverter:function(t){return e(o({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});t.Z=r}}]);
|
package/static/js/{product-page-view.e35c4c9d.chunk.js → product-page-view.05ee21d1.chunk.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[281],{8181:function(e,t,n){var i=n(7313),o=n(8866),r=n(7753),a=n(6417);const s=i.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[e]=(0,o.Z)();return(0,a.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},t))),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));t.Z=s},5380:function(e,t,n){n.d(t,{Z:function(){return g}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),s=n(7753),d=n(9821);var l=function(e){const[t,n,i,o,r]=(0,d.Z)(),[l]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.YP]===a.$w?c/100:l/100*1.2;return[t*u,n*u,r]},c=n(9723),u=n(9461),p=n.n(u),h=n(1195),v=n(7108),m=(n(7244),n(123),n(9854)),f=n(6417);var g=function(e){var t;const n=o.useRef(null);var[d,u,g]=l();const w=(0,s.MO)("whatmoreUITheme"),[x]=(0,s.j1)("whatmoreEmbedAppVideoTitle"),[_]=(0,s.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[b]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[I]=(0,s.j1)("whatmoreEmbedAppPositionLandscape"),[j]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[E]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),S=(0,s.MO)("whatmoreShopId");var L=_,C=y,D=b;g[a.YP]===a.$w&&(L=I,C=j,D=E);const[P,O]=(0,o.useState)(["initial",window.pageYOffset]),[T,K]=(0,o.useState)(!1),k=null!==(t=e.isSpotlight)&&void 0!==t&&t,A=g[a.YP]===a.$w?.7*(0,m.zGA)(S):(0,m.zGA)(S),z=k?A:1;d*=z,u*=z;const V=k?(0,m.G0o)(S):L,M=k?(0,m.X8j)(S):(0,m.lVn)(S),[N,W]=(0,o.useState)(!k&&(0,m.eXi)(S));function R(e,t){O(e),e[1]<=100?K(!1):t!=T&&(K(t),W(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(R([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[P]),(0,i.O3)({ref:n,handler:()=>{R(["scrolled-up",P[1]],!0)}});const Z=e.event,F=e.inVideoClick,H=e.closeClick,$=.3*u,B=.6*u,U=.1*u,Y=.1*(.5*u),G="round"==w?"10px":"0px",q=(0,m.Z$A)(S);var J=!1,X=0,Q=0;function ee(e){J=e}return(0,f.jsx)("div",{children:N&&!M?(0,f.jsx)(f.Fragment,{}):T&&M?(0,f.jsx)("div",{style:"left"===V?{left:"1px",bottom:k?(0,m.vnu)(S)+"px":D+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:k?(0,m.vnu)(S)+"px":D+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{R(["initial",P[1]],!1)},style:{margin:"1px",width:u+"px",height:d+"px"},className:"left"===V?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(r.Z,{url:Z.thumbnail_image,isPlaying:!1,event:Z})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:$+"px"},style:{position:"relative",zIndex:1,left:Y+"px",bottom:Y+"px"},onClick:H})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(v.Z,{sx:{color:"white",fontSize:2*$+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,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,i;n=t.x,i=t.y,X=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-X)>5||Math.abs(t.y-Q)>5)?ee(!1):F(Z)},children:(0,f.jsx)("div",{ref:n,style:"left"===V?{left:k?(0,m.$II)(S)+"px":C+"px",bottom:k?(0,m.vnu)(S)+"px":D+"px",position:"fixed",zIndex:q}:{right:k?(0,m.$II)(S)+"px":C+"px",bottom:k?(0,m.vnu)(S)+"px":D+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==S?d+"px":u+"px",height:e.isSpotlight&&"60122562760"==S?u+"px":d+"px"}),className:"left"===V?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==S?16/9:9/16},children:(0,f.jsx)(r.Z,{url:Z.thumbnail_image,isMuted:!0,isPlaying:!0,event:Z})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:$+"px"},onClick:H,style:{position:"relative",zIndex:1,left:U+"px",bottom:U+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.Z,{sx:{color:(0,m.Ya_)(S),fontSize:B+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:G,borderBottomRightRadius:G,backgroundImage:x?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*$+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",x]})})]})})]})})})})}},4284:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),s=n(5160),d=n(6967),l=n(5380),c=n(58),u=n(8984),p=n(4669),h=n(513),v=n(9302),m=n(2575),f=n(7300),g=n(6524),w=n(364),x=n(4522),_=n(778),y=n(7643),b=n(7008),I=n(7381),j=n(8181),E=n(6095),S=n(6417);const L=(0,m.Z)({key:"whatmore-css-ppv"}),C=i.lazy((()=>Promise.all([n.e(819),n.e(577),n.e(351),n.e(587),n.e(926),n.e(824),n.e(818),n.e(647)]).then(n.bind(n,3818))));function D(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[m,P]=(0,i.useState)(),{whatmoreIsPreviewMode:O}=(0,i.useContext)(w.I),[T]=(0,a.j1)("isInDesignMode"),[K]=(0,a.j1)("isDemoBrand"),[k]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[A,z]=(0,i.useState)(-2),[V]=(0,a.j1)("whatmoreVariantId"),[M]=(0,a.j1)("whatmoreShopId");var[N]=(0,a.j1)("whatmoreProductId");const W=(0,a.MO)("isLandingSharedLink"),R=(0,a.MO)("whatmoreShareTemplateId"),Z=(0,a.MO)("whatmoreShareEventId"),F=W&&"template-embed"===(0,g.zv)(R),[H,$]=(0,i.useState)(F);N=(0,o.iXA)(M)?D(window.location.href):N;const[B,U]=(0,i.useState)((()=>"true"===k?V:N));var Y=r.Gc+"/v2/brand/"+M+"/product-events";const{whatmoreWidgetSourceDetails:G}=(0,i.useContext)(w.I);(0,i.useEffect)((()=>{(0,I.Oo)("Video shopping powered by Whatmore!"),(0,d.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,b.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{(0,p.ll)(M)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||m||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,i.useEffect)((()=>{if(z(-1),(0,o.ly4)(M)){const e=`${r.Gc}/v2/brand/${M}/product-events/recommendation`,t=(0,o.FSv)(M);fetch(`${e}?client_product_id=${B}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`).then((e=>e.json())).then((e=>{var i;if((null===(i=e.events)||void 0===i?void 0:i.length)>0){var o,r;const i=e=>{var t;return null===(t=e.products)||void 0===t?void 0:t.some((e=>"oos"!=(null===e||void 0===e?void 0:e.product_status)))},a=t?null===e||void 0===e?void 0:e.all_events:null===e||void 0===e||null===(o=e.related_events)||void 0===o?void 0:o.filter((e=>i(e)));(null===a||void 0===a?void 0:a.length)>0&&(null===e||void 0===e||null===(r=e.product_info)||void 0===r?void 0:r.length)>0?n([...e.events,...a,{event_type:"recommended_images",product_list:[...e.product_info]}]):n([...e.events,...a])}else n([])})).catch((e=>P(e.message)))}else fetch(Y.toString()+"?client_product_id="+B.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.Htz)(M)&&(0,o.d0x)(e),n(e),e))).then((e=>((0,o.yoE)(M)&&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==D(window.location.href))return;const i={product_id:n.product_id,product_link:D(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,B),e))).catch((e=>{P(e.message)}))}),[B]),(0,i.useEffect)((()=>{var e,n;z(-2),(t&&t.length>0||(0,o.uO6)(M))&&(0,x.PB)({userInteractionType:_.K.PDP_VISITED,widgetSourceDetails:G,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.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"===k){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&U(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!m&&F&&((0,E.A)("whatmore-video-player",(()=>{$(!1)})),null!=Z)){const e=t.find((e=>Z==e.event_id));if(e)return void X(e,!0,t.indexOf(e))}}),[t]);const q=G.landingLocationType,J=G.templateType,X=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,u.KE)()&&!t&&(0,c.QV)(),(0,f.B6)(e)||(0,f.WJ)(e))return T||K||(async()=>{const t=(0,g.NY)(q)+(0,g.dS)(J)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,s.wh)(e),(0,p.Tc)(M,r.h7,r.dU),(0,d.H4)(e.event_id,e.products,"product_page","video_popup",t)})(),void z(n)};function Q(){return(0,S.jsx)(S.Fragment,{})}return null==t||0==t.length||m?(0,S.jsx)("div",{}):(0,S.jsxs)(v.C,{value:L,children:[H&&(0,S.jsx)(j.Z,{}),"no-product"===B||-1===A||0===t.length?(0,S.jsx)(Q,{}):-2===A&&t.length>0?(0,S.jsx)("div",{children:(0,S.jsx)(y.u,{userInteractionType:_.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!T&&!K,children:(0,S.jsx)(l.Z,{event:t[0],inVideoClick:X,closeClick:e=>{e.stopPropagation(),z(-1)}})})}):(0,S.jsx)("div",{children:(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(y.u,{userInteractionType:_.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!T&&!K,children:(0,S.jsx)(C,{events:t,index:A,onBack:function(e){(0,o.n2L)(M)&&(0,a.MO)("whatmoreAddedToCart")&&(0,h.D)(M,(()=>{}),100,window.location.hostname,e),z(-2),$(!1)},template:"template-product-page"})})})})]})}},6095:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{A:function(){return i}})},4522:function(e,t,n){n.d(t,{gW:function(){return d},GF:function(){return l},y4:function(){return u},PB:function(){return p},Z2:function(){return c}});var i=n(9854),o=n(7753),r=n(778);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,o.MO)("whatmoreShopId");(e!=r.K.EVENT_VIEW||(0,i.UAB)(a))&&(e!=r.K.VIDEO_PLAYBACK||(0,i.JP0)(a))&&(e!=r.K.SHOPNOW_ATC_CLICKED&&e!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,i.Tn_)(a))&&(e!=r.K.VIDEO_LIKED||(0,i.sKB)(a))&&(e!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,i.YOU)(a))&&(e!=r.K.PRODUCT_TILE_SHOPNOW_CLICKED&&e!=r.K.SHOPNOW_CLICKED||(0,i.ejq)(a))&&"function"==typeof fbq&&(async()=>{fbq("trackCustom",d[e],{id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===r.K.VIDEO_PLAYBACK?{watch_time:n.watch_time,video_duration:n.video_duration}:{}})})()}var s=n(733);const d={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.PRODUCT_TILE_SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.VIDEO_PLAYBACK]:"whatmore_video_watch_event"};function l(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,s.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in d&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0])}function c(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,s.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in d&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0],i)}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,s.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}function p(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,s.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[281],{8181:function(e,t,n){var i=n(7313),o=n(8866),r=n(7753),a=n(6417);const s=i.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[e]=(0,o.Z)();return(0,a.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},t))),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));t.Z=s},5380:function(e,t,n){n.d(t,{Z:function(){return g}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),s=n(7753),d=n(9821);var l=function(e){const[t,n,i,o,r]=(0,d.Z)(),[l]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.YP]===a.$w?c/100:l/100*1.2;return[t*u,n*u,r]},c=n(9723),u=n(9461),p=n.n(u),h=n(1195),v=n(7108),m=(n(7244),n(123),n(9854)),f=n(6417);var g=function(e){var t;const n=o.useRef(null);var[d,u,g]=l();const w=(0,s.MO)("whatmoreUITheme"),[x]=(0,s.j1)("whatmoreEmbedAppVideoTitle"),[_]=(0,s.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[b]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[I]=(0,s.j1)("whatmoreEmbedAppPositionLandscape"),[j]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[E]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),S=(0,s.MO)("whatmoreShopId");var L=_,C=y,D=b;g[a.YP]===a.$w&&(L=I,C=j,D=E);const[P,O]=(0,o.useState)(["initial",window.pageYOffset]),[T,K]=(0,o.useState)(!1),k=null!==(t=e.isSpotlight)&&void 0!==t&&t,A=g[a.YP]===a.$w?.7*(0,m.zGA)(S):(0,m.zGA)(S),z=k?A:1;d*=z,u*=z;const V=k?(0,m.G0o)(S):L,M=k?(0,m.X8j)(S):(0,m.lVn)(S),[N,W]=(0,o.useState)(!k&&(0,m.eXi)(S));function R(e,t){O(e),e[1]<=100?K(!1):t!=T&&(K(t),W(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(R([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[P]),(0,i.O3)({ref:n,handler:()=>{R(["scrolled-up",P[1]],!0)}});const Z=e.event,F=e.inVideoClick,H=e.closeClick,$=.3*u,B=.6*u,U=.1*u,Y=.1*(.5*u),G="round"==w?"10px":"0px",q=(0,m.Z$A)(S);var J=!1,X=0,Q=0;function ee(e){J=e}return(0,f.jsx)("div",{children:N&&!M?(0,f.jsx)(f.Fragment,{}):T&&M?(0,f.jsx)("div",{style:"left"===V?{left:"1px",bottom:k?(0,m.vnu)(S)+"px":D+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:k?(0,m.vnu)(S)+"px":D+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{R(["initial",P[1]],!1)},style:{margin:"1px",width:u+"px",height:d+"px"},className:"left"===V?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(r.Z,{url:Z.thumbnail_image,isPlaying:!1,event:Z})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:$+"px"},style:{position:"relative",zIndex:1,left:Y+"px",bottom:Y+"px"},onClick:H})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(v.Z,{sx:{color:"white",fontSize:2*$+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,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,i;n=t.x,i=t.y,X=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-X)>5||Math.abs(t.y-Q)>5)?ee(!1):F(Z)},children:(0,f.jsx)("div",{ref:n,style:"left"===V?{left:k?(0,m.$II)(S)+"px":C+"px",bottom:k?(0,m.vnu)(S)+"px":D+"px",position:"fixed",zIndex:q}:{right:k?(0,m.$II)(S)+"px":C+"px",bottom:k?(0,m.vnu)(S)+"px":D+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==S?d+"px":u+"px",height:e.isSpotlight&&"60122562760"==S?u+"px":d+"px"}),className:"left"===V?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==S?16/9:9/16},children:(0,f.jsx)(r.Z,{url:Z.thumbnail_image,isMuted:!0,isPlaying:!0,event:Z})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:$+"px"},onClick:H,style:{position:"relative",zIndex:1,left:U+"px",bottom:U+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.Z,{sx:{color:(0,m.Ya_)(S),fontSize:B+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:G,borderBottomRightRadius:G,backgroundImage:x?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*$+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",x]})})]})})]})})})})}},4284:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),s=n(5160),d=n(6967),l=n(5380),c=n(58),u=n(8984),p=n(4669),h=n(513),v=n(9302),m=n(2575),f=n(7300),g=n(6524),w=n(364),x=n(4522),_=n(778),y=n(7643),b=n(7008),I=n(7381),j=n(8181),E=n(6095),S=n(6417);const L=(0,m.Z)({key:"whatmore-css-ppv"}),C=i.lazy((()=>Promise.all([n.e(819),n.e(577),n.e(351),n.e(587),n.e(926),n.e(824),n.e(818),n.e(647)]).then(n.bind(n,3818))));function D(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[m,P]=(0,i.useState)(),{whatmoreIsPreviewMode:O}=(0,i.useContext)(w.I),[T]=(0,a.j1)("isInDesignMode"),[K]=(0,a.j1)("isDemoBrand"),[k]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[A,z]=(0,i.useState)(-2),[V]=(0,a.j1)("whatmoreVariantId"),[M]=(0,a.j1)("whatmoreShopId");var[N]=(0,a.j1)("whatmoreProductId");const W=(0,a.MO)("isLandingSharedLink"),R=(0,a.MO)("whatmoreShareTemplateId"),Z=(0,a.MO)("whatmoreShareEventId"),F=W&&"template-embed"===(0,g.zv)(R),[H,$]=(0,i.useState)(F);N=(0,o.iXA)(M)?D(window.location.href):N;const[B,U]=(0,i.useState)((()=>"true"===k?V:N));var Y=r.Gc+"/v2/brand/"+M+"/product-events";const{whatmoreWidgetSourceDetails:G}=(0,i.useContext)(w.I);(0,i.useEffect)((()=>{(0,I.Oo)("Video shopping powered by Whatmore!"),(0,d.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,b.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{(0,p.ll)(M)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||m||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,i.useEffect)((()=>{if(z(-1),(0,o.ly4)(M)){const e=`${r.Gc}/v2/brand/${M}/product-events/recommendation`,t=(0,o.FSv)(M);fetch(`${e}?client_product_id=${B}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`).then((e=>e.json())).then((e=>{var i;if((null===(i=e.events)||void 0===i?void 0:i.length)>0){var o,r;const i=e=>{var t;return null===(t=e.products)||void 0===t?void 0:t.some((e=>"oos"!=(null===e||void 0===e?void 0:e.product_status)))},a=t?null===e||void 0===e?void 0:e.all_events:null===e||void 0===e||null===(o=e.related_events)||void 0===o?void 0:o.filter((e=>i(e)));(null===a||void 0===a?void 0:a.length)>0&&(null===e||void 0===e||null===(r=e.product_info)||void 0===r?void 0:r.length)>0&&"6749782119"!=M?n([...e.events,...a,{event_type:"recommended_images",product_list:[...e.product_info]}]):n([...e.events,...a])}else n([])})).catch((e=>P(e.message)))}else fetch(Y.toString()+"?client_product_id="+B.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.Htz)(M)&&(0,o.d0x)(e),n(e),e))).then((e=>((0,o.yoE)(M)&&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==D(window.location.href))return;const i={product_id:n.product_id,product_link:D(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,B),e))).catch((e=>{P(e.message)}))}),[B]),(0,i.useEffect)((()=>{var e,n;z(-2),(t&&t.length>0||(0,o.uO6)(M))&&(0,x.PB)({userInteractionType:_.K.PDP_VISITED,widgetSourceDetails:G,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.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"===k){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&U(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!m&&F&&((0,E.A)("whatmore-video-player",(()=>{$(!1)})),null!=Z)){const e=t.find((e=>Z==e.event_id));if(e)return void X(e,!0,t.indexOf(e))}}),[t]);const q=G.landingLocationType,J=G.templateType,X=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,u.KE)()&&!t&&(0,c.QV)(),(0,f.B6)(e)||(0,f.WJ)(e))return T||K||(async()=>{const t=(0,g.NY)(q)+(0,g.dS)(J)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,s.wh)(e),(0,p.Tc)(M,r.h7,r.dU),(0,d.H4)(e.event_id,e.products,"product_page","video_popup",t)})(),void z(n)};function Q(){return(0,S.jsx)(S.Fragment,{})}return null==t||0==t.length||m?(0,S.jsx)("div",{}):(0,S.jsxs)(v.C,{value:L,children:[H&&(0,S.jsx)(j.Z,{}),"no-product"===B||-1===A||0===t.length?(0,S.jsx)(Q,{}):-2===A&&t.length>0?(0,S.jsx)("div",{children:(0,S.jsx)(y.u,{userInteractionType:_.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!T&&!K,children:(0,S.jsx)(l.Z,{event:t[0],inVideoClick:X,closeClick:e=>{e.stopPropagation(),z(-1)}})})}):(0,S.jsx)("div",{children:(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(y.u,{userInteractionType:_.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!T&&!K,children:(0,S.jsx)(C,{events:t,index:A,onBack:function(e){(0,o.n2L)(M)&&(0,a.MO)("whatmoreAddedToCart")&&(0,h.D)(M,(()=>{}),100,window.location.hostname,e),z(-2),$(!1)},template:"template-product-page"})})})})]})}},6095:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{A:function(){return i}})},4522:function(e,t,n){n.d(t,{gW:function(){return d},GF:function(){return l},y4:function(){return u},PB:function(){return p},Z2:function(){return c}});var i=n(9854),o=n(7753),r=n(778);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,o.MO)("whatmoreShopId");(e!=r.K.EVENT_VIEW||(0,i.UAB)(a))&&(e!=r.K.VIDEO_PLAYBACK||(0,i.JP0)(a))&&(e!=r.K.SHOPNOW_ATC_CLICKED&&e!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,i.Tn_)(a))&&(e!=r.K.VIDEO_LIKED||(0,i.sKB)(a))&&(e!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,i.YOU)(a))&&(e!=r.K.PRODUCT_TILE_SHOPNOW_CLICKED&&e!=r.K.SHOPNOW_CLICKED||(0,i.ejq)(a))&&"function"==typeof fbq&&(async()=>{fbq("trackCustom",d[e],{id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===r.K.VIDEO_PLAYBACK?{watch_time:n.watch_time,video_duration:n.video_duration}:{}})})()}var s=n(733);const d={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.PRODUCT_TILE_SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.VIDEO_PLAYBACK]:"whatmore_video_watch_event"};function l(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,s.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in d&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0])}function c(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,s.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in d&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0],i)}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,s.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}function p(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,s.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}}}]);
|