d8e6136f72a97a539e852734d73ba2f5208cdfe0976819a78cc7c4d75629a186

Source Code:

webpackJsonp([155],{28:function(e,t,n){n("KkCJ"),e.exports=n("UtwK")},"7muP":function(e,t,n){var r=n("+ObC");e.exports=function(e){"use strict";var t="",n=(e=e||{}).type,a=e.history,o=r.$each,i=(e.$value,e.$index,r.$escape),c=e.data;return t+="\n\n","hot"===n?(t+=" ",t+="\n\n    ",a.length&&(t+='\n    <div class="siteSearch_history js-panelSearchHistory">\n        <div class="siteSearch_historyHeader">\n            <span class="siteSearch_historyTitle">',t+=r.trans("base.recent_searches"),t+='</span>\n            <span class="siteSearch_historyClear js-btnClearAllHistory">',t+=r.trans("base.clear_history"),t+="</span>\n        </div>\n        <ul>\n            ",o(a,function(e,n){t+='\n            <li class="siteSearch_historyItem js-searchItem_link">\n                <span class="siteSearch_historyLink">',t+=i(e),t+='</span>\n                <span class="siteSearch_itemClear js-btnClearItemHistory">',t+=r.trans("base.delete"),t+="</span>\n            </li>\n            "}),t+="\n        </ul>\n    </div>\n    "),t+="\n\n    ",c.length&&(t+='\n    <div class="siteSearch_hot">\n        <div class="siteSearch_hotTitle">',t+=r.trans("base.hot_searches"),t+=" </div>\n        <ul>\n            ",o(c,function(e,n){t+='\n            <li class="siteSearch_hotItem js-searchItem_link">\n                <a class="siteSearch_link siteSearch_hotLink" href="',t+=i(e.url),t+='">\n                    ',t+=i(e.name),t+="\n                </a> \n            </li>\n            "}),t+="\n        </ul>\n    </div>\n    "),t+="\n\n"):(t+=" ",t+='\n\n    <div class="siteSearch_suggestion">\n        <ul>\n            ',o(c,function(e,n){t+='\n            <li class="siteSearch_suggestItem ',"shop"===e.type&&(t+=" siteSearch_suggestStore "),t+='" data-resultcount="',t+=i(c.length||0),t+='">\n                <a class="siteSearch_link siteSearch_suggestLink js-searchItem_link ',"shop"===e.type?t+=" js-searchTrackItem_shop ":t+=" js-searchTrackItem  ",t+='" href="',t+=i(e.url),t+='" data-keyword="',t+=i(e.name),t+='" data-type="',t+=i(e.type),t+='" ',"shop"==e.type&&(t+=' data-shopcode="',t+=i(e.shopCode),t+='" '),t+=">\n                    ","shop"===e.type&&(t+='\n                        <i class="icon-store_tiny"></i>\n                        <i class="icon-arrow-right siteSearch_iconTo"></i>\n                    '),t+='\n                    <span class="siteSearch_suggestInner">',t+=i(e.name),t+="</span>\n                </a>\n                ",e.child&&(t+='\n                    <a class="siteSearch_link-cate siteSearch_link siteSearch_suggestLink js-searchItem_link" href="',t+=i(e.child.catUrl),t+='" data-keyword="',t+=i(e.name),t+='">\n                        ',t+=r.trans("base.header_search_in",[e.name,e.child.catName]),t+="\n                    </a>\n                "),t+="\n            </li>\n            "}),t+="\n        </ul>\n    </div>\n    \n"),t}},DIiz:function(e,t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};$.fn.combobox=function(e){if(0===this.length)return this;if(this.length>1)return this.each(function(t,n){$(n).combobox(e)}),this;var t=this,r={data:[],value:"code",text:"name",default:"",placeholder:void 0,onChange:$.noop,onComplete:$.noop};"object"===(void 0===e?"undefined":n(e))&&Object.assign(r,e);var a="string"==typeof r.placeholder?'<option value="">'+r.placeholder+"</option>":"";return t.html(a+function e(n){return n.map(function(n){if(!n)return"";if(Array.isArray(n))return n.length>0?"<optgroup>"+e(n)+"</optgroup>":"";var a=String(n[r.value]);return'<option value="'+a+'" '+(a===String(r.default)||a===t[0].dataset.value?"selected":"")+">"+n[r.text]+"</option>"}).join("")}(r.data)),t.hasClass("initialized")||(t.on("change",function(){r.onChange(t)}),t.addClass("initialized")),r.onComplete(t),this}},Ey0f:function(e,t,n){"use strict";var r=n("l/Rs"),a=n.n(r),o=n("x9pK"),i=n.n(o),c=n("ypFs"),s=n("EL1a"),u=n("Tqbj"),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var d=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u["a"]),l(t,[{key:"customClickTrackCallback",value:function(e){var t=e.dom,n=e.classKey,r=e.configData,a=(e.module,e.targetData,{});return"recomSearch"===r.itemType&&(a.sckw=t.textContent,a.sl=$(t).index(n)),a}}]),t}())({config:{".js-trackItemHotKey":{itemType:"recomSearch",click:"self",crossPage:"search",recordOrigin:2,customData:{sk:"T",x:"search"}},".js-footerAppIos":{click:"self",customData:{x:"topios"}},".js-footerAppAndroid":{click:"self",customData:{x:"topiandroid"}}},context:".js-siteFooterWrap"}),h=(n("BvOo"),{init:function(){this.bindEvent()},bindEvent:function(){a()(".js-btnToggleHotKey").on("click",function(e){a()(e.currentTarget).parents(".goodsHotkey").toggleClass("showAll")});var e=a()(".js-newsLetter"),t=a()(".js-formGroup-input-eu");if(e.validate({rules:{email:{required:!0,email:!0}}}),e.on("submit",function(e){e.preventDefault();var t=a()(e.currentTarget);t.valid()&&c.C.http({method:"post",data:{email:t.find("input").val(),subscribedSource:2}}).then(function(e){s.default.msg(e.msg)})}),t.on("focus",function(e){a()(".js-gbform_input_tipsBox").show()}),t.on("blur",function(e){setTimeout(function(){a()(".js-gbform_input_tipsBox").hide()},200)}),a()(".js-siteAside").length){a()(".js-toTop").click(function(){a()("html,body").animate({scrollTop:0},1e3)}),a()(".js-asideLink").click(function(){var e=a()(this).index();a()("html,body").animate({scrollTop:a()(".indexLayer").eq(e).offset().top})});var n=a()(".js-siteAside");i.a.subscribe("nativeScroll",function(){a()(window).scrollTop()>300?n.addClass("active"):n.removeClass("active")})}}});setTimeout(function(){h.init(),d.run()},0)},GH70:function(e,t){},"RX+G":function(e,t){},U0Cm:function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i});var r=n("cnew");n.n(r);function a(e){if(void 0!==window.TOP_BANNER_SYNC.randomIndex)return window.TOP_BANNER_SYNC.randomIndex;var t=Math.floor(Math.random()*e);return window.TOP_BANNER_SYNC.randomIndex=t,t}function o(){if(!window.TOP_BANNER_SYNC||!window.TOP_BANNER_SYNC.randomData)return{};var e=void 0;try{e=JSON.parse(window.TOP_BANNER_SYNC.randomData)}catch(t){e=null}if(e&&e.length){var t=a(e.length);return e[t]?{index:t,bannerData:e[t]||{}}:{}}return{}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$.noop,t=o().bannerData;if(t){var n=$(".js-globalTopBannerLink"),r=t.banner_link,i=void 0===r?"javascript:;":r,c=t.banner_url,s=void 0===c?"":c;n.attr("href",i).attr("data-track-key",window.TOP_BANNER_SYNC.bannerId+"_"+a()),("index"!==window.dataLayer[0].PAGE||"index"===window.dataLayer[0].PAGE&&!window.TOP_BANNER_SYNC.promoStatus)&&$(".js-globalTopBannerPanel").css("background-image","url('"+s+"')"),e()}}},UXeF:function(e,t){},UtwK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n("qCWV"),n("OjSX"),n("joEz"),n("hA59");var r=n("nr7h"),a=n("12Ke"),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"get",value:function(){return JSON.parse(window.localStorage.getItem(a.S)||"[]")}},{key:"set",value:function(t){var n=e.filter(t),r=e.get(),o=r.length;if(o>0){var i=r[0];t.toLowerCase()!==i.toLowerCase()&&(5===o&&r.pop(),r.unshift(n))}else r.unshift(n);window.localStorage.setItem(a.S,JSON.stringify(r))}},{key:"remove",value:function(t){var n=e.get(),r=n.indexOf(t);return n.splice(r,1),window.localStorage.setItem(a.S,JSON.stringify(n)),n.length}},{key:"removeAll",value:function(){window.localStorage.removeItem(a.S)}},{key:"filter",value:function(e){return e.replace(/<[^>]+>/g,"")}}]),e}(),c=n("ypFs"),s=n("7muP"),u=n.n(s);n("GH70"),n("tkvk");function l(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function r(a,o){try{var i=t[a](o),c=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}("next")})}}function d(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/\*/g,"~~")).replace(/\|/g,"]]")).replace(/=/g,"((")).replace(/"/g," ")).replace(/</g,"))")).replace(/>/g,")))")).replace(/\?/g,"!!!")).replace(/\+/g,"__")).replace(/-/g,"^^")).replace(/\//g,"..")).replace(/\\/g,"...")).replace(/%/g,"!!")).replace(/#/g,"~~~")).replace(/>/g,"___")).replace(/</g,"^^^")).replace(/"/g,"[[")).replace(/\$/g,"[[[")).replace(/@/g," ")).replace(/\s+/g,"-"),encodeURIComponent(e)}var h={catId:0,recomCateSearchHref:"",searchValue:""},p=$("#js-btnSubmitSearch"),f=window.location.pathname.match(/c_([^/]*)/),m=$("#js-selSearchCateList"),g={init:function(){this.setCurrentCatId(),this.bindEvent()},bindEvent:function(){var e=this;m.select({skin:"headSearch-catelist",onDropdownOpen:function(){},onDropdownClose:function(){}}).on("change",function(t){e.selCateChange()})},selCateChange:function(){var e=m.find("option:selected").text(),t=m.val();e&&e.length&&($(".headSearch_cateLabel").text(e),h.catId=t),k.getDarkwordList()},setCurrentCatId:function(){f&&f[1]&&(h.catId=f[1],m.val(f[1]),this.selCateChange())}},y=$("#js-formSearch"),v=$("#js-iptKeyword"),w=$("#js-panelDarkword"),b=$("#js-panelSearchHelp"),k={darkwordArr:[],darkwordIndex:0,darkTimer:0,isFocus:!1,currentKeyIndex:-1,init:function(){f&&f[1]||this.getDarkwordList(),this.bindEvent()},bindEvent:function(){var e=this;v.on("input",Object(r.l)(function(){e.isFocus=!0,e.onInputEvent()},300)).focus(function(){e.isFocus=!0,e.handleSearchHelpPanel(),e.pauseLoopDarkword()}).blur(function(){e.isFocus=!1,e.startLoopDarkword()}),$(document).on("mousedown",function(e){var t=$(e.target);0===t.closest("#js-panelSearchHelp").length&&0===t.closest("#js-formSearch").length&&(b.removeClass("active"),c.x.cancel&&c.x.cancel())}),y.on("click",".js-btnClearAllHistory",function(){i.removeAll(),y.find(".js-panelSearchHistory").remove()}).on("click",".js-btnClearItemHistory",function(e){var t=$(e.currentTarget),n=t.siblings("span").text();i.remove(n)?t.parent("li").remove():y.find(".js-panelSearchHistory").remove()}).on("click",".siteSearch_historyLink",function(t){var n=$(t.currentTarget);e.toggleDarkworkPanel("hide"),v.val(n.text()),S.searchSubmit()}),$(window).on("keydown",function(t){if(e.isFocus&&!t.defaultPrevented){var n=t.keyCode;38===n&&e.keySelhelpPanel("up"),40===n&&e.keySelhelpPanel("down"),27===n&&(e.toggleSearchHelpPanel("hide"),e.isFocus=!1)}})},getVal:function(){var e=v.val();return e.trim()?e.trim():null},onInputEvent:function(){var e=this.getVal(),t=e&&e.length;this.toggleDarkFlag(t),this.toggleDarkworkPanel(t?"hide":"show"),this.handleSearchHelpPanel()},getDarkwordList:function(){var e=l(regeneratorRuntime.mark(function e(){var t,n,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("GB"!==window.GLOBAL.PIPELINE||!w.length){e.next=9;break}return this.pauseLoopDarkword(),e.next=4,c.p.http({params:{"cat-id":h.catId}});case 4:t=e.sent,n=t.data,r=t.status,this.darkwordArr=0===r?n:[],this.startLoopDarkword();case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),startLoopDarkword:function(){var e=this,t=this.darkwordArr.length;if(0!==t){!function n(){var r=e.darkwordArr[e.darkwordIndex],a=r.name,o=r.url;w.html(a).attr("data-href",o),e.darkTimer=setTimeout(function(){p.attr("data-dark",1),e.darkwordIndex=(e.darkwordIndex+1)%t,n()},5e3)}()}},pauseLoopDarkword:function(){clearTimeout(this.darkTimer)},toggleDarkworkPanel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hide";w.length&&w[e]()},toggleDarkFlag:function(e){p.attr("data-dark",e?0:1)},getSearchHelpList:function(){var e=l(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return h.searchValue=k.getVal()||"",e.next=3,c.x.http({params:{keyword:h.searchValue,cate_id:h.catId,page_type:window.GLOBAL.PAGETYPE}});case 3:return t=e.sent,e.abrupt("return",t.data||[]);case 5:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),toggleSearchHelpPanel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hide";if(b.length){b[{show:"addClass",hide:"removeClass"}[e]]("active")}},handleSearchHelpPanel:function(){var e=l(regeneratorRuntime.mark(function e(){var t,n,r,a;arguments.length>0&&void 0!==arguments[0]&&arguments[0];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return h.recomCateSearchHref="",this.currentKeyIndex=-1,t=i.get(),n=this.getVal(),r="suggest",e.next=7,this.getSearchHelpList();case 7:if((a=e.sent)instanceof Array){e.next=10;break}return e.abrupt("return");case 10:n&&n.length||(a=a.filter(function(e){return!t.includes(e.name)}).slice(0,6),r="hot"),a.length>0||t.length>0?(b.html(u()({type:r,history:t,data:a})),this.toggleSearchHelpPanel("show")):this.toggleSearchHelpPanel("hide");case 12:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),keySelhelpPanel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"down";this.toggleDarkworkPanel("hide");var t=b.find(".js-searchItem_link"),n=t.length-1;"down"===e?this.currentKeyIndex=this.currentKeyIndex===n?0:this.currentKeyIndex+1:"up"===e&&(this.currentKeyIndex=0===this.currentKeyIndex?n:this.currentKeyIndex-1);var r=t.eq(this.currentKeyIndex);t.removeClass("active"),r.addClass("active");var a=r.find(".siteSearch_historyLink"),o=a.length?a.text().trim():r.text().trim();if(r.hasClass("siteSearch_link-cate")){var i=r.html().split("<em>")[0]||"";o=i.trim(),h.recomCateSearchHref=r.attr("href")}else"shop"===r.attr("data-type")?(o=h.searchValue,h.recomCateSearchHref=r.attr("href")):h.recomCateSearchHref="";v.val(o),setTimeout(function(){v.get(0).setSelectionRange(o.length,o.length)},16)}},S={init:function(){g.init(),k.init(),this.bindEvent()},bindEvent:function(){var e=this;$("#js-formSearch").on("submit",function(t){t.preventDefault(),e.searchSubmit()})},searchSubmit:function(){var e=this.getSearchHref();e&&(window.location.href=e)},getSearchHref:function(){if(h.recomCateSearchHref)return h.recomCateSearchHref;var e=k.getVal(),t=w.attr("data-href"),n=GLOBAL.DOMAIN_MAIN+"/";return e?(i.set(e),0!=+h.catId?n+="c_"+h.catId+"/"+d(e)+"/":n+="sale/"+d(e)+"/"):t&&(n=t),n}},C=S,_=n("x9pK"),x=n.n(_),j=n("lWiZ"),T=n("82at"),I=window.GLOBAL.PIPELINE?window.GLOBAL.PIPELINE.toLowerCase().trim():"";"GB"===window.GLOBAL.PIPELINE&&(I="");var O={search:{preLoad:!0,status:+$("#js-hdSearchAbTestSwitch").val()||0,plancode:I+"keyword",cookieKey:a.n,storageKey:a.t},category:{preLoad:!0,status:+$("#js-hdCateAbTestSwitch").val()||0,plancode:I+"category",cookieKey:a.a,storageKey:a.s}};function P(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function r(a,o){try{var i=t[a](o),c=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}("next")})}}var L={abShuntTimeout:1500,abShuntLocalTime:3600,cookieExpires:1/24,cookieDomain:document.domain,btsServiceParams:{}},E={init:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(O,t);x.a.subscribe("nativeLoad",function(){for(var t in n)n[t].preLoad&&e.shuntHandle(t)})},shuntHandle:function(e){var t,n=(t=P(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.getABData(i,a);case 2:(t=e.sent)&&t.policy&&(window.sessionStorage.setItem(s,JSON.stringify(t)),j.a.set(c,t.policy,{expires:u,domain:l}));case 4:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)}),r=this,a=Object.assign(L,O[e]),o=a.status,i=a.plancode,c=a.cookieKey,s=a.storageKey,u=a.cookieExpires,l=a.cookieDomain;o?j.a.get(c)||n().catch(function(e){}):(window.sessionStorage.removeItem(s),j.a.remove(c))},getABData:function(){var e=P(regeneratorRuntime.mark(function e(t){var n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={data:JSON.stringify({appkey:window.GLOBAL.SITE_CODE,cookie:Object(T.a)(),plancode:t,params:{}}),isCancel:!1,timeout:a.abShuntTimeout||1500,useLocalCache:a.abShuntLocalTime||3600,headers:{"Content-Type":"application/json"}},Object.assign(n,a.btsServiceParams||{}),e.next=4,c.a.http(n);case 4:if(!(r=e.sent)||!r.result){e.next=7;break}return e.abrupt("return",r.result);case 7:return e.abrupt("return",!1);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()};n("Ey0f"),n("RX+G");E.init(),setTimeout(function(){$("#js-formSearch")&&C.init()})},VyN5:function(e,t,n){"use strict";t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector(e)},t.b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t.querySelectorAll(e)))}},YnlG:function(e,t){},cnew:function(e,t){},hA59:function(e,t){},joEz:function(e,t,n){"use strict";var r,a,o,i=n("x9pK"),c=n.n(i),s=(n("M2ci"),n("DIiz"),n("+ObC")),u=n.n(s),l=n("3wxm"),d=n("fV2S"),h=n("bC+L"),p=n("XSnq"),f=(n("UXeF"),this),m=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=(r=w(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y();case 2:return e.next=4,v();case 4:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)}),y=(a=w(regeneratorRuntime.mark(function e(){var t,n,r,a,o,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b();case 2:t=e.sent,n=t.countryCode,r=$(".js-countrySelect"),a=r.find("option"),o=[],i=[],a.each(function(e,t){var n=t.dataset,r=n.frequent,a=n.countryName;a&&(t.innerHTML=a),"1"===r&&o.push({code:t.value,name:t.innerHTML}),i.push({code:t.value,name:t.innerHTML})}),r.combobox({data:[o,i],default:n,onComplete:function(e){e.select({searchable:[e.find("optgroup").length||1],skin:"select-country"}),$(".js-countrySelect").on("change",function(e){var t=$(e.currentTarget),n=t.val(),r=t.find("option:selected").text();c.a.publish("sysUpdateCountry",{gb_countryCode:n,gb_countryName:r}),S(),Object(h.setCountry)(n);try{1===$(".js-orderItem").data("order-key")&&window.location.reload()}catch(e){}})}});case 10:case"end":return e.stop()}},e,this)})),function(){return a.apply(this,arguments)}),v=(o=w(regeneratorRuntime.mark(function e(){var t,r,a,o,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(67).then(n.bind(null,"02Vq"));case 2:return t=e.sent,e.next=5,b();case 5:r=e.sent,a=r.currencyCode,o=r.currencySign,i=r.currencyName,$("#js-listHeadCurrency").replaceWith(t({currency:window.EXCHANGERATE,defaultCurrencyCode:a,defaultCurrencySign:o,defaultCurrencyName:i})),k(o,a),$("#js-panelHeadCurrency").on("click",".js-itemHeadCurrency",function(e){var t=$(e.currentTarget),n=t.data("sign"),r=t.data("code");$("#js-labelHeadCurrency").text(n+" "+r),c.a.publish("sysUpdateCurrency",{currencyCode:r}),k(n,r),S()});case 12:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)});function w(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function r(a,o){try{var i=t[a](o),c=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}("next")})}}var b=Object(p.a)(w(regeneratorRuntime.mark(function e(){var t,n,r,a,o,i,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([Object(h.getCountry)(),Object(h.getCurrency)()]);case 2:return t=e.sent,n=m(t,2),r=n[0].countryCode,a=n[1],o=a.currencyCode,i=a.currencySign,c=a.currencyName,e.abrupt("return",{countryCode:r,currencyCode:o,currencySign:i,currencyName:c});case 10:case"end":return e.stop()}},e,f)})));function k(e,t){$("#js-labelHeadCurrency").text(e+" "+t),$("#js-panelHeadCurrency").find("li[data-code="+t+"]").addClass("active").siblings().removeClass("active")}function S(){c.a.publish("sysUpdateCurrencySuccess"),setTimeout(function(){$(".clickShow .compDropdown-panel").css("display","none")},16)}var C=n("U0Cm"),_=n("Tqbj"),x=n("l/Rs"),j=n.n(x),T=n("VyN5");function I(){var e=Object(T.a)(".js-track-infor");return e?e.dataset.trackType:null}var O=n("12Ke"),P=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),L=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(r):void 0};var E,A={".siteSearch_hotLink":{itemType:"hotSearch",click:"self",crossPage:"search",async:!0,observer:".headSearch_helpPanel",recordOrigin:2,customData:{sk:"T",x:"search"}},".siteSearch_historyLink":{itemType:"historySearch",click:"self",crossPage:"search",async:!0,observer:".headSearch_helpPanel",recordOrigin:2,customData:{sk:"H",x:"search"}},".js-searchTrackItem":{itemType:"suggestSearch",click:"self",crossPage:"search",async:!0,observer:".headSearch_helpPanel",recordOrigin:2,customData:{sk:"L",x:"search"}},".siteSearch_link-cate":{itemType:"suggestSearchCate",click:"self",crossPage:"search",async:!0,observer:".headSearch_helpPanel",recordOrigin:2,customData:{sk:"F",x:"search"}},".headSearch_btnSub":{itemType:"submitSearch",click:"self",crossPage:"search",recordOrigin:2,customData:{x:"search"}},".headCate_childName":{itemType:"navSearch",click:"self",crossPage:"search",recordOrigin:2,customData:{x:"search"}},".headPipeline_itemLink":{itemType:"link",click:"self",customData:{x:"website"}},".js-centerEntrance":{itemType:"userLink",click:"self",recordOrigin:1,customData:{x:"VIPCENTER_CLICK"}},".js-searchTrackItem_shop":{click:"self",itemType:"shopItem",customUbcta:function(e){var t=e.target,n=j()(t);return{at:n.parents(".siteSearch_suggestItem").attr("data-resultcount"),store:n.attr("data-shopcode")}}},".js-headNavCommunityItemLink":{click:"self",itemType:"headNavItem"}},D={".js-globalTopBannerLink":{module:"A_0",click:"self",explore:"self",pageModule:"md",exploreRoot:"root",customUbcta:function(){return"index"in Object(C.a)()?{mdID:window.TOP_BANNER_SYNC.bannerId+"_"+Object(C.a)().index}:{}}}},N=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,_["a"]),P(t,[{key:"errorWord",value:function(e){var n=L(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getRecordOrigin",this).call(this);n.sk=e,L(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setStorageSourceOrigin",this).call(this,n)}},{key:"customCrossPageData",value:function(e){var t=window.TrackData&&window.TrackData.search&&window.TrackData.search.at||0;if(!t){var n=document.querySelector(".cateMain_count");if(n){var r=n.innerHTML.match(/\d+/g);t=r&&r[0]}}var a={glb_ubcta:{at:t||0,skty:window.userTrackData?window.userTrackData.skty:""}};if(document.querySelector(".cateMain_recomCurWord")){var o=j()("input[name=track-word]").data("key-word");a.sk="J",a.sckw=o,this.errorWord(a.sk)}if(document.querySelector(".cateMain_errorCorrection_tips")){a.sckw=[],j()(".cateMain_recomTitle strong").each(function(e,t){a.sckw.push(j()(t).text())}),a.sk="J";var i=j()(".cateMain_recomCountd").eq(0).data("search-at");i&&0===a.glb_ubcta.at&&(a.glb_ubcta.at=i),this.errorWord(a.sk)}document.querySelector(".cateMain_correctionTip")&&(a.sckw=j()("input[name=track-word]").data("key-word"),a.sk="QJ",this.errorWord(a.sk));var c=document.querySelector(".cateMain_lineKeyWord");if(c){var s=c.childNodes[0].textContent.replace(/["|\s]/g,"");a.sk="S",a.sckw=s}return a}},{key:"getFixOriginData",value:function(e){if("search"===e){var t=j()(".js-inputKeyWords").data("key-word");if(t)return{sckw:t.split(" in")[0]}}return null}},{key:"customClickTrackCallback",value:function(e){var t=e.dom,n=e.classKey,r=e.configData,a=(e.module,e.targetData,r.itemType),o={},i=j()("#js-selSearchCateList").val()||j()("#js-selSearchCateList").find("option:selected").text(),c=j()("#js-iptKeyword").val();if("link"===a&&(o={ubcta:{dcn:t.dataset.trackCustom}}),"hotSearch"===a&&(o.sckw=t.textContent.trim(),o.sc=i,o.sl=j()(t).index(n)+1),"historySearch"===a&&(o.sckw=t.textContent.trim(),o.sc=i,o.sl=j()(t).index(n)+1),"recomSearch"===a&&(o.sckw=t.textContent.trim(),o.sc=i,o.sl=j()(t).index(n)),"suggestSearch"===a&&(o.sckw=t.dataset.keyword.trim(),o.siws=c,o.sc=i,o.sl=j()(t).index(n)+1),"suggestSearchCate"===a){o.sckw=t.dataset.keyword.trim(),o.siws=c;try{o.sc=t.getAttribute("href").match(/c_([\d]+)/)[1]}catch(e){o.sc=i}o.sl=j()(t).index(n)+1}if("submitSearch"===a&&(t.dataset.dark&&"1"===t.dataset.dark?(o.siws=j()("#js-iptKeyword").text(),o.sc=i,o.sk="A",o.sckw=o.siws):(o.siws=c,o.sc=i,o.sckw=o.siws)),"navSearch"===a&&(o.sc=i,o.sk="G",o.sl=1,o.sckw=c,window.sessionStorage.setItem(O.O,1)),"userLink"===a&&(o={ubcta:{name:"vipcenter enter"}}),"shopItem"===a&&(o={sk:"P",x:"search",sckw:t.dataset.keyword.trim(),siws:c,si:t.dataset.shopcode}),"headNavItem"===a){var s={ty:1,rank:j()(t).closest(".headNav_item").index()+1};window.localStorage.setItem(O.w,JSON.stringify(s)),o={x:"Community"}}return o}}]),t}();if(window.sessionStorage.getItem(O.O)&&(!(E=I())||!E.includes("search"))){var H=window.localStorage.getItem(_.a.TRACK_CROSS_PAGE);if(H){var R=JSON.parse(H);R.search&&(delete R.search,window.localStorage.setItem(_.a.TRACK_CROSS_PAGE,JSON.stringify(R)))}}window.sessionStorage.removeItem(O.O);var K=new N({config:A,context:".head"}),B=new _.a({config:D,context:".js-globalTopBannerLink"}),G=(n("YnlG"),function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}());function M(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function r(a,o){try{var i=t[a](o),c=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}("next")})}}function U(){!function(){var e=this;c.a.subscribe("sysUpdateCurrencySuccess",(t=M(regeneratorRuntime.mark(function t(n,r){var a,o,i,c,s,u,d,p,f,m,g,y;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([Object(h.getCountry)(),Object(h.getCurrency)()]);case 2:if(a=e.sent,o=G(a,2),i=o[0],c=i.countryName,s=i.countryCode,u=o[1],d=u.currencyCode,p=u.currencySign,s&&(f=s.toLowerCase(),m="https://uidesign.gbtcdn.com/GB/app/2018/flag_png/"+f+".png",(g=document.getElementById("js-labelShipTo"))&&(g.innerHTML="\n                        <span>"+Object(l.trans)("base.ship_to")+'</span>\n                        <img src="'+m+'" alt="'+c+'" title="'+c+'" class="headShortcut_nalflag"> /\n                        <span>'+d+"</span>\n                    "),y=document.getElementById("js-labelShipItem"))){y.innerHTML=""+c;try{document.getElementById("js-labelCurrencyItem").innerHTML=""+p+d}catch(e){}}case 11:case"end":return e.stop()}},t,e)})),function(e,n){return t.apply(this,arguments)})),c.a.subscribe("head.itemClick",function(e,t){"ship_currency"!==t.logic||t.$el.data("initialized")||(g(),t.$el.data("initialized",1))});var t}(),c.a.subscribe("head.itemClick",function(e,t){"google-lang"!==t.logic||t.$el.data("initialized")||$.getScript("//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit",function(){$("#google_translate_element").empty(),window.googleTranslateElementInit=function(){new window.google.translate.TranslateElement({pageLanguage:window.GLOBAL.LANG||"en",layout:window.google.translate.TranslateElement.InlineLayout.SIMPLE},"google_translate_element")},t.$el.data("initialized",1)})}),c.a.subscribe("head.itemHover",function(e,t){"simple-cart"!==t.logic||t.$el.data("initialized")||(t.$el.data("initialized",1),c.a.publish("sysUpdateSampleCart"))}),$(document).on("click",".js-btnDeleteItemSimpleCart",function(e){e.preventDefault();var t=$(e.currentTarget).attr("data-id");Object(d.c)({itemIds:[t],success:function(){c.a.publish("sysUpdateSampleCart")}})}),Object(C.b)(),function(){var e=this;function t(){$(".clickShow .compDropdown-panel").hide()}if($(document).on("click",function(e){t()}),$(".compDropdown.clickShow").on("click",function(e){e.stopPropagation();var n=$(e.currentTarget),r=n.data("logic");t(),n.find(".compDropdown-panel").show(),c.a.publish("head.itemClick",{logic:r,$el:n,$tar:$(e.target)})}),$(".compDropdown.hoverShow").on("mouseenter",function(e){var n=$(e.currentTarget),r=n.data("logic");n.hasClass("hoverShow")&&(t(),n.find(".compDropdown-panel").show(),c.a.publish("head.itemHover",{logic:r,$el:n}))}),2===window.GLOBAL.CART_THEME_TYPE){var r=!1,a=$("#js-tinyCartBtn"),o=$("#js-tinyCartWrap"),i=$("#js-panelUserInfo");a.on("click",function(e){var t=+a.attr("visible");e.stopPropagation(),t?Object(d.b)():(a.attr("visible",1),o.show(),setTimeout(function(){o.addClass("visible"),r||(r=!0,c.a.publish("sysUpdateSampleCart"))}))}),o.on("click",function(e){e.stopPropagation()}),i.on("mouseenter",d.b),$(document).on("click",d.b)}$(document).on("click",".js-btnHeadSocialLogin",(s=M(regeneratorRuntime.mark(function t(r){var a,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=$(r.currentTarget),e.next=3,n.e(64).then(n.bind(null,"tAa4"));case 3:o=e.sent,new(0,o.default)(a.attr("data-type"));case 6:case"end":return e.stop()}},t,e)})),function(e){return s.apply(this,arguments)}));var s;var u=null;$(".headCate_item").on("mouseenter",function(e){var t=$(e.currentTarget),n=t.find(".js-cateChildImg");1!=+n.data("loaded")&&(clearTimeout(u),u=setTimeout(function(){n.data("loaded",1),n.attr("src",n.attr("data-custom-lazy"))},200))}).on("mouseleave",function(){clearTimeout(u)});var l=$(".headCate");l.data("async")&&$.get("/catetree.html",function(e){l.html(e)});c.a.publish("sysUpdateCurrencySuccess"),c.a.publish("sysUpdateUserInfo")}()}u.a.trans=l.trans,K.run(),B.run(),c.a.subscribe("nativeReady",function(){U()})},tkvk:function(e,t){}},[28]);