(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[676],{70676:function(e,n,r){"use strict";var t=r(97766),s=r(43629),a=r(62856),i=r(48183),c=r(30415),l=r(24146),o=r.n(l);n.Z=e=>{let{data:n,t:r,setShowPrize:l,spmInfo:u}=e,[p,d]=(0,s.useState)(""),[m,_]=(0,s.useState)(""),[N,h]=(0,s.useState)(""),[R,v]=(0,s.useState)(null),S=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=b();d(e[0]),_(e[1]),h(e[2]),f()},[]);let b=()=>{let e=[{min:2,max:10},{min:11,max:20},{min:21,max:30}],n=[];for(let r=0;r<3;r++){let r=Math.floor(Math.random()*e.length),t=x(e[r].min,e[r].max);n.push((0,i.T)({price:t,currencyCode:c.ZP.get("intl_currency")||"USD"}).priceSimpleStr),e.splice(r,1)}return n},x=(e,n)=>Math.floor(Math.random()*(n-e+1))+e,f=()=>{let e=performance.now(),n=requestAnimationFrame(function r(t){let s=t-e;if(s>=1200)cancelAnimationFrame(n),setTimeout(()=>{l(!0)},500);else{let e=S.current;e&&(e.style.transform="rotate(".concat(.8833333333333333*s,"deg)"),v(n=requestAnimationFrame(r)))}})};return(0,t.jsx)("div",{className:o().turntable,"spm-c":u.spmC||"","event-code":u.eventCode||"","ab-version":(null==n?void 0:n.popVersion)||"",children:(0,t.jsxs)("div",{className:o().turntableWrap,children:[(0,t.jsx)("p",{className:o().turntableTitle,dangerouslySetInnerHTML:{__html:r("turntable_title",{amount:(null==n?void 0:n.couponSum)||""})}}),(0,t.jsxs)("div",{className:o().turntableMain,children:[(0,t.jsx)("a",{"event-type":"expose","spm-index":"1","link-type":"coupon",children:(0,t.jsx)("img",{})}),(0,t.jsxs)("div",{className:o().turntableContainer,children:[(0,t.jsxs)("div",{id:"TurntabelWeel",className:o().wheel,ref:S,children:[(0,t.jsx)("div",{className:(0,a.Z)(o().section,o().section1),children:(0,t.jsxs)("div",{className:o().sectionInfo,children:[(0,t.jsx)("div",{className:o().prizeNumber,children:p}),(0,t.jsx)("div",{className:o().prizeName,children:r("turntable_coupons")})]})}),(0,t.jsx)("div",{className:(0,a.Z)(o().section,o().section2),children:(0,t.jsxs)("div",{className:o().sectionInfo,children:[(0,t.jsx)("div",{className:o().prizeNumber,children:(null==n?void 0:n.couponSum)||""}),(0,t.jsx)("div",{className:o().prizeName,children:r("turntable_coupons")})]})}),(0,t.jsx)("div",{className:(0,a.Z)(o().section,o().section3),children:(0,t.jsxs)("div",{className:o().sectionInfo,children:[(0,t.jsx)("div",{className:o().prizeNumber,children:m}),(0,t.jsx)("div",{className:o().prizeName,children:r("turntable_coupons")})]})}),(0,t.jsx)("div",{className:(0,a.Z)(o().section,o().section4),children:(0,t.jsxs)("div",{className:o().sectionInfo,children:[(0,t.jsx)("div",{className:o().prizeNumber,children:N}),(0,t.jsx)("div",{className:o().prizeName,children:r("turntable_coupons")})]})})]}),(0,t.jsx)("div",{className:o().goBtn,children:(0,t.jsx)("span",{})})]})]}),(0,t.jsx)("span",{className:o().stopBtn,"spm-c":u.stopSpmc||"","event-type":"click","spm-index":"stop","event-code":u.stopEventCode||"","ab-version":(null==n?void 0:n.popVersion)||"",onClick:()=>{cancelAnimationFrame(R);let e=S.current;e.style.transition="none",e.style.transform="rotate(290deg)",e.style.animationPlayState="paused",setTimeout(()=>{l(!0)},500)},children:r("stop")})]})})}},48183:function(e,n,r){"use strict";r.d(n,{T:function(){return s}});var t=[["US","美元","USD","US $",2,",",".","EN","","$"],["FR","欧元","EUR","€",2,".",",","FR","%s #","€"],["ES","欧元","EUR","€",2,".",",","ES","%s #","€"],["IT","欧元","EUR","€",2,".",",","IT","%s #","€"],["DE","欧元","EUR","€",2,".",",","DE","%s #","€"],["UK","英镑","GBP","£",2,",",".","UK","","£"],["CA","加元","CAD","C$",2,",",".","CA","","$"],["AU","澳元","AUD","AU $",2,",",".","AU","",""],["BR","巴西雷亚尔","BRL","R$",2,".",",","PT","","$"],["MX","墨西哥比索","MXN","MXN $",2,",",".","","",""],["PL","波兰兹罗提","PLN","zł",2," ",",","PL","%s #",""],["SE","瑞典克朗","SEK","SEK kr",2,",",".","SE","","kr"],["NZ","新西兰元","NZD","NZ $",2,",",".","NZ","",""],["CH","瑞士法郎","CHF","CHF",2,",",".","","","CHF"],["JP","日元","JPY","¥",0,",","无","JP","#%s","¥"],["IL","以色列谢克尔","ILS","₪",2,",",".","IL","","₪"],["DK","丹麦克朗","DKK","DKK kr",2,",",".","","","kr"],["KR","韩元","KRW","₩",0,",","无","KR","","₩"],["RU","俄罗斯卢布","RUB","руб.",0," ","无","RU","%s #","руб."],["CL","智利比索","CLP","CLP $",0,".","无","","","$"],["NO","挪威克朗","NOK","NOK kr",2,",",".","","","kr"],["TR","土耳其里拉","TRY","TL",2,",",".","TR","","TL"],["PE","秘鲁索尔","PEN","S/",0,".","无","","","S/"],["CO","哥伦比亚比索","COP","COP $",0,".","无","","","$"],["UA","乌克兰格里夫纳","UAH","грн.",2," ",",","","%s #","грн."],["SA","沙特里亚尔","SAR","ر.س",2,",",".","AR","%s#","ر.س"],["CZ","捷克克朗","CZK","Kč",2,",",".","","","Kč"],["HU","匈牙利福林","HUF","Ft",2,",",".","","","Ft"],["IN","印度卢比","INR","Rs.",2,",",".","IN","","Rs."],["ZA","南非兰特","ZAR","R",2,",",".","","","R"],["SG","新加坡元","SGD","SG $",2,",",".","","",""],["RO","罗马尼亚新列伊","RON","lei",2,",",".","","","lei"],["BG","保加利亚列弗","BGN","лв",2,",",".","","","лв"],["PH","菲律宾比索","PHP","₱",2,",",".","","","₱"],["AE","阿联酋迪拉姆","AED","د.إ",2,",",".","","%s #","د.إ"],["CR","哥斯达黎加科朗","CRC","\xa2",0,",","无","","","\xa2"],["QA","卡塔尔里亚尔","QAR","ر.ق",2,",",".","","%s#","ر.ق"],["HR","克罗地亚库纳","HRK","kn",2,",",".","","","kn"],["TH","泰铢","THB","฿",2,",",".","","","฿"],["MY","马来西亚林吉特","MYR","RM",2,",",".","","","RM"],["KW","科威特第纳尔","KWD","د.ك",2,",",".","","%s#","د.ك"],["RS","塞尔维亚第纳尔","RSD","РСД",2,",",".","","","РСД"],["ID","印度尼西亚卢比","IDR","Rp",0,",","无","","","Rp"],["HK","港币","HKD","HK $",2,",",".","HK","",""],["AR","阿根廷比索","ARS","ARS $",0,".","无","","","$"],["NG","尼日利亚奈拉","NGN","₦",2,",",".","","","₦"],["UY","乌拉圭比索","UYU","$U",0,".","无","","","$U"],["AL","阿尔巴尼列克","ALL","Lek",2,",",".","","","Lek"],["PK","巴基斯坦卢比","PKR","PKR ₨",0,",","无","","","₨"],["BO","玻利维亚诺","BOB","Bs",0,".","无","","","Bs"],["BH","巴林第纳尔","BHD","د.ب",2,",",".","","%s#","د.ب"],["MA","摩洛哥迪拉姆","MAD","MAD",2,",",".","","","MAD"],["KH","柬埔寨瑞尔","KHR","៛",0,",","无","","","៛"],["PY","巴拉圭瓜拉尼","PYG","₲",0,",","无","","","₲"],["LK","斯里兰卡卢比","LKR","LKR ₨",0,",","无","","","₨"],["BW","博茨瓦纳普拉","BWP","P",2,",",".","","","P"],["OM","阿曼里亚尔","OMR","ر.ع",2,",",".","","%s#","ر.ع"],["NL","荷属安第列斯群岛盾","ANG","ƒ",2,",",".","NL","","ƒ"],["LB","黎巴嫩镑","LBP","ل.ل",2,",",".","","%s#","ل.ل"],["MV","马尔代夫拉菲亚","MVR","MVR",2,",",".","","","MVR"],["DO","多米尼加比索","DOP","DOP $",0,",","无","","","$"],["UG","乌干达","UGX","UGX",0,",","无","","","UGX","up#0","down#0"],["GH","加纳","GHS","GHS",2,",",".","","","GHS","up#2","down#2"],["KE","肯尼亚","KES","KES",0,",","无","","","KES","up#0","down#0"],["IE","欧元","EUR","€",2,".",",","IE","%s #","€"]];let s=e=>{e||(e={});var n,r,s=e.price,a=e.minPrice,i=e.maxPrice,c=e.fixedSite||"",l=e.currencyCode||"",o=window,u=((!1===/https/i.test(null==o?void 0:null===(n=o.location)||void 0===n?void 0:n.protocol)?"http://":"https://")+(null==o?void 0:null===(r=o.location)||void 0===r?void 0:r.hostname)).match(/(es|pt|ru|fr|de|it|ca|in|uk|au|tr|nz|mx|cl|co|pe|hk|kr|ar|nl|pl|jp|se|ie)\.dhgate.+/i)||(o._customHost?o._customHost:"en");u=Array.isArray(u)?u[1]:u;var p={};p.currencys=t,o.__currencyCache||(o.__currencyCache={});var d=[];if(l){if(o.__currencyCache[l])d=o.__currencyCache[l];else for(var m=0,_=p.currencys.length;m<_;m++){var N=p.currencys[m];if(N[2]===l){o.__currencyCache[l]=d=N;break}}}else{var h=(c||u).toLocaleUpperCase();if(o.__currencyCache[h])d=o.__currencyCache[h];else for(var m=0,_=p.currencys.length;m<_;m++){var N=p.currencys[m];if("USD"===N[2]&&(o.__currencyCache[h]=d=N),N[7]===h){o.__currencyCache[h]=d=N;break}}}d[9]||(d[9]=d[3]);var R="",v="",S="",b="";d[6]&&((s=s?s+"":"")&&s.indexOf(d[6])>-1&&(s=s?s.split(d[6]):s),Array.isArray(a)&&a.indexOf(d[6])>-1&&(a=a?a.split(d[6]):a),Array.isArray(a)&&i.indexOf(d[6])>-1&&(i=i?i.split(d[6]):i)),d[5]&&(s&&s.indexOf(d[5])>-1&&s instanceof Array&&s&&(s[0]=s[0].replace(d[5],"")),Array.isArray(a)&&a.indexOf(d[5])>-1&&a instanceof Array&&a&&(a[0]=a[0].replace(d[5],"")),Array.isArray(i)&&i.indexOf(d[5])>-1&&i instanceof Array&&i&&(i[0]=i[0].replace(d[5],""))),s=s&&s instanceof Array?s.join("."):s,a=a&&a instanceof Array?a.join("."):a,i=i&&i instanceof Array?i.join("."):i,isNaN(s=parseFloat(s))||((s<1&&s>0&&0===d[4]||s>999999)&&(s=Math.ceil(s)),(s=(s=(1*s.toFixed(d[4])).toString()).split("."))[0]&&(s[0]=s[0].replace(/(\d{1,3})(?=(\d{3})+$)/g,function(e){return e+d[5]}),s[1]&&(s[1]=d[6]+s[1])),s=s.join(""),d[8]?(R=d[8].replace(/%s/,s).replace(/#/,d[3]),v=d[8].replace(/%s/,s).replace(/#/,d[9])):(R=d[3]+s,v=d[9]+s));var x=[];return a=parseFloat(a),i=parseFloat(i),isNaN(a)||((a<1&&a>0&&0===d[4]||a>999999)&&(a=Math.ceil(a)),(a=(a=(1*a.toFixed(d[4])).toString()).split("."))[0]&&(a[0]=a[0].replace(/(\d{1,3})(?=(\d{3})+$)/g,function(e){return e+d[5]}),a[1]&&(a[1]=d[6]+a[1])),a=a.join(""),x.push(a)),isNaN(i)||((i<1&&i>0&&0===d[4]||i>999999)&&(i=Math.ceil(i)),(i=(i=(1*i.toFixed(d[4])).toString()).split("."))[0]&&(i[0]=i[0].replace(/(\d{1,3})(?=(\d{3})+$)/g,function(e){return e+d[5]}),i[1]&&(i[1]=d[6]+i[1])),i=i.join(""),x.push(i)),x.length>0&&(x=x.join(" - "),d[8]?(S=d[8].replace(/%s/,x).replace(/#/,d[3]),b=d[8].replace(/%s/,x).replace(/#/,d[9])):(S=d[3]+x,b=d[9]+x)),{priceStr:R,priceSimpleStr:v,minMaxPriceStr:S,minMaxPriceSimpleStr:b,currency:d[2]}}},24146:function(e){e.exports={turntable:"turntable_turntable__DEPSi",turntableWrap:"turntable_turntableWrap__Q_5pV",turntableTitle:"turntable_turntableTitle__ymfOn",turntableMain:"turntable_turntableMain__pbpEi",turntableContainer:"turntable_turntableContainer__03bj_",wheel:"turntable_wheel__GQSpr",section:"turntable_section__WUPx5",sectionInfo:"turntable_sectionInfo__K_sMu",prizeNumber:"turntable_prizeNumber__yGJDA",prizeName:"turntable_prizeName__Ljr18",section1:"turntable_section1__biqKI",section2:"turntable_section2__IvqqS",section3:"turntable_section3__sFlhw",section4:"turntable_section4__GVDgl",goBtn:"turntable_goBtn__qC9Wx",stopBtn:"turntable_stopBtn__dLkOj"}}}]);