/*
http://www.gnu.org/licenses/gpl.html [GNU General Public License]
@param {jQuery} {md5:function(string))
@return string
jQuery Cookie Plugin v1.4.1
https://github.com/carhartl/jquery-cookie
Copyright 2013 Klaus Hartl
Released under the MIT license
jQuery & Zepto Lazy v1.7.10 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
(function(factory){if(typeof module==="object"&&module.exports)module.exports=factory();else{var g=window.Granite=window.Granite||{};g.Sling=factory()}})(function(){return{SELECTOR_INFINITY:".infinity",CHARSET:"_charset_",STATUS:":status",STATUS_BROWSER:"browser",OPERATION:":operation",OPERATION_DELETE:"delete",OPERATION_MOVE:"move",DELETE_SUFFIX:"@Delete",TYPEHINT_SUFFIX:"@TypeHint",COPY_SUFFIX:"@CopyFrom",MOVE_SUFFIX:"@MoveFrom",ORDER:":order",REPLACE:":replace",DESTINATION:":dest",SAVE_PARAM_PREFIX:":saveParamPrefix",
IGNORE_PARAM:":ignore",REQUEST_LOGIN_PARAM:"sling:authRequestLogin",LOGIN_URL:"/system/sling/login.html",LOGOUT_URL:"/system/sling/logout.html"}});
(function(factory){if(typeof module==="object"&&module.exports)module.exports=factory();else{var g=window.Granite=window.Granite||{};g.Util=factory()}})(function(){var isArray=function(arg){return Object.prototype.toString.call(arg)==="[object Array]"};return{patchText:function(text,snippets){if(snippets)if(!isArray(snippets))text=text.replace("{0}",snippets);else for(var i=0;i=0)return uri.substring(0,fragmentIndex);else return uri};self.removeParameters=function(uri){var queryIndex=uri.indexOf("?");if(queryIndex>=0)return uri.substring(0,queryIndex);else return uri};self.encodePathOfURI=function(uri){var DELIMS=["?","#"];var parts=[uri];var delim;for(var i=0,ln=DELIMS.length;i=0){parts=uri.split(delim);break}}if(ENCODE_PATH_REGEXP.test(parts[0]))parts[0]=
self.encodePath(parts[0]);return parts.join(delim)};self.encodePath=function(uri){uri=encodeURI(uri);uri=uri.replace(/%5B/g,"[").replace(/%5D/g,"]");uri=uri.replace(/\?/g,"%3F");uri=uri.replace(/#/g,"%23");return uri};self.handleLoginRedirect=function(){if(!loginRedirected){loginRedirected=true;alert(Granite.I18n.get("Your request could not be completed because you have been signed out."));var l=util.getTopWindow().document.location;l.href=self.externalize("/")+"?resource\x3d"+encodeURIComponent(l.pathname+
l.search+l.hash)}};self.getXhrHook=function(url,method,params){method=method||"GET";if(window.G_XHR_HOOK&&typeof G_XHR_HOOK==="function"){var p={"url":url,"method":method};if(params)p["params"]=params;return G_XHR_HOOK(p)}return null};self.eval=function(response){if(typeof response!=="object")response=$.ajax({url:response,type:"get",async:false});try{return eval("("+(response.body?response.body:response.responseText)+")")}catch(e){}return null};return self}()});
(function(factory){if(typeof module==="object"&&module.exports)module.exports=factory(require("@granite/http"));else window.Granite.I18n=factory(window.Granite.HTTP)})(function(HTTP){return function(){var dicts={};var urlPrefix="/libs/cq/i18n/dict.";var urlSuffix=".json";var manualLocale=undefined;var pseudoTranslations=false;var languages=null;var self={};var manualDictionary=false;var getDictionaryUrl=function(locale){if(manualDictionary)return urlPrefix+locale+urlSuffix;var dictionarySrc;var htmlEl=
document.querySelector("html");if(htmlEl)dictionarySrc=htmlEl.getAttribute("data-i18n-dictionary-src");if(!dictionarySrc)return urlPrefix+locale+urlSuffix;return dictionarySrc.replace("{locale}",encodeURIComponent(locale)).replace("{+locale}",locale)};var patchText=function(text,snippets){if(snippets)if(Array.isArray(snippets))for(var i=0;i0){var stData=str.split("(")[0];str=str.replace(stData,"");str=str.substr(1,str.length)}else str=str.substr(1,str.length);str=str.substr(0,str.length-1);var json=JSON.parse(str);return json}
function handleLogin(){if(!isShowLogin())return;removeLoginInfo();if($(".user-center").data("isPreviewMode")){window.location.href=casUrl+"/logout?service\x3d"+encodeURIComponent(cmktUrl+"/logout/cloudplatforms?siteURL\x3d"+encodeURIComponent($(".login-menu-component").attr("data-support-url")));return}window.location.href=getLoginUri(null,false);return}
function getCsrfToken(){$.ajax({url:apiurl+"/web/weblogin/1000",xhrFields:{withCredentials:true},dataType:"json",async:false,complete:function(xhr){if(xhr.getResponseHeader("Csrf-Token"))try{sessionStorage.setItem("Csrf-Token",xhr.getResponseHeader("Csrf-Token"))}catch(e){localStorage.setItem("Csrf-Token",xhr.getResponseHeader("Csrf-Token"))}}})}
var userLogin={request:function(relativeUrl,requestData,success,error,async){if(apiurl==null||apiurl=="")return;var _requestData=requestData;ajaxLoadingAnimate();var url=apiurl+relativeUrl;if(relativeUrl.indexOf("http")==0)url=relativeUrl;if(async===undefined)async=apiSysConfig.async;if(NoJsonpCountry.indexOf(sysConfig.countryCode)>-1)$.ajax({url:url,type:"GET",dataType:"html",data:_requestData,async:async,headers:{"Csrf-Token":sessionStorage.getItem("Csrf-Token")},success:function(data,textStatus,
request){if(request.getResponseHeader("Csrf-Token"))try{sessionStorage.setItem("Csrf-Token",request.getResponseHeader("Csrf-Token"))}catch(e){localStorage.setItem("Csrf-Token",request.getResponseHeader("Csrf-Token"))}data=handleStringToJson(data);try{if(data.responseCode!=null&&data.responseCode=="500003")handleLogin()}catch(e$1){}success&&success(data);apiSysConfig.enabledAjaxLoadingAnimate&&$($(".ajax-animate")[0]).remove()},complete:function(){},error:function(){error&&error();apiSysConfig.enabledAjaxLoadingAnimate&&
$($(".ajax-animate")[0]).remove()}});else $.ajax({url:url,type:"GET",dataType:"jsonp",jsonp:"jsonp",data:_requestData,async:async,success:function(data){try{if(data.responseCode!=null&&data.responseCode=="500003")handleLogin()}catch(e){}success&&success(data);apiSysConfig.enabledAjaxLoadingAnimate&&$($(".ajax-animate")[0]).remove()},complete:function(){},error:function(){error&&error();apiSysConfig.enabledAjaxLoadingAnimate&&$($(".ajax-animate")[0]).remove()}})}};var hwPageType="support-v2";
$(function(){String.prototype.trimSpecial=function(char){if(char)return this.replace(new RegExp("^\\"+char+"+|\\"+char+"+$","g"),"");return this.replace(/^\s+|\s+$/g,"")};setTimeout(function(){$(".a-sup-common,#accountNumber,#accountHeader").on("click",function(){try{var lab=$(this).attr("lab")?getContent($(this).attr("lab")):"Error: Not Maintain Value";var act=$(this).attr("act")?getContent($(this).attr("act")):"Error: Not Maintain Value";var cat=$(this).attr("cat")?getContent($(this).attr("cat")):
"Error: Not Maintain Value";ga("send","event",cat,act,lab);ga4SendByAttr(cat,act,lab,$(this).parents("[data-gaevent]"))}catch(e){}})},3E3);var supportListenerv27="expressRepaireServiceModify expressRepaireServiceSubmit repairStatusInquirySumbit doorToDoorServiceSubmit appointmentServiceModify appointmentServiceSubmit warrantyQuerySubmit topicPageInteractions topicListSiteSearch mailServiceSubmit homePageSiteSearch sparePartsPriceSubmit userCenterAdd userCenterModify userCenterDelete";$(document).on(supportListenerv27,
function(event){try{var cat=DataLayerUtil.getEvent(event.type,"cat");var act=DataLayerUtil.getEvent(event.type,"act");var lab=DataLayerUtil.getEvent(event.type,"lab");ga("send","event",cat,act,lab)}catch(e){}})});
(function(factory){if(typeof define==="function"&&define.amd)define(["jquery"],factory);else if(typeof exports==="object")factory(require("jquery"));else factory(jQuery)})(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0)s=s.slice(1,-1).replace(/\\"/g,
'"').replace(/\\\\/g,"\\");try{s=decodeURIComponent(s.replace(pluses," "));return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date;t.setTime(+t+days*864E5)}return document.cookie=
[encode(key),"\x3d",stringifyCookieValue(value),options.expires?"; expires\x3d"+options.expires.toUTCString():"",options.path?"; path\x3d"+options.path:"",options.domain?"; domain\x3d"+options.domain:"",options.secure?"; secure":""].join("")}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split("; "):[];for(var i=0,l=cookies.length;i0)siteUrl=siteUrl+"\x26loginCallback\x3dtrue";else siteUrl=siteUrl+"?loginCallback\x3dtrue";if(clickurl&&clickurl!="")if(clickurl.indexOf("http://")==0||clickurl.indexOf("https://")==0)siteUrl=clickurl;else siteUrl=location.origin+clickurl;var authController=new AuthController;if(!authController.isEcComSitePage()||
authController.isSupportPage())siteUrl=authController.getLoginUrl(false,siteUrl);var callbackUrl=cmktUrl+"/login/cloudplatforms?siteURL\x3d"+encodeURIComponent(siteUrl);if(shopLogin){siteUrl=siteUrl.replace("\x26loginCallback\x3dtrue","").replace("?loginCallback\x3dtrue","");callbackUrl=loginApiHost+"v1/login/casLogin?callback\x3d"+encodeURIComponent(siteUrl)+"\x26siteCode\x3d"+window.digitalData.page.pageInfo.siteCode2}if($(window).width()>767){baseLoginUrl=casUrl+"/portal/loginAuth.html";loginUrl=
casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000000\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dred\x26loginUrl\x3d"+encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl)}else{baseLoginUrl=casUrl+"/mobile/standard/wapLogin.html";loginUrl=casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000002\x26countryCode\x3d"+sysConfig.countryCode+
"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dhuawei\x26loginUrl\x3d"+encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl)}return loginUrl}
function getCmscLoginUri(clickurl,shopLogin){if(casUrl==null||casUrl=="")return"";var siteUrl=window.location.href;var baseLoginUrl;var loginUrl;var hasShop=false;if(shopLogin===true||shopLogin===false)hasShop=shopLogin;else hasShop=isECommerceSite=="Self-eCommerce"||isECommerceSite=="Fusion-eCommerce";if(siteUrl.indexOf("loginCmscCallback\x3dtrue")==-1)if(siteUrl.indexOf("?")>0)siteUrl=siteUrl+"\x26loginCmscCallback\x3dtrue";else siteUrl=siteUrl+"?loginCmscCallback\x3dtrue";if(clickurl&&clickurl!=
"")if(clickurl.indexOf("http://")==0||clickurl.indexOf("https://")==0)siteUrl=clickurl;else siteUrl=location.origin+clickurl;var callbackUrl=cmscApiUrl+"/login/cloudplatforms?siteURL\x3d"+encodeURIComponent(siteUrl);if(hasShop){siteUrl=siteUrl.replace("\x26loginCmscCallback\x3dtrue","").replace("?loginCmscCallback\x3dtrue","");callbackUrl=loginApiHost+"v1/login/casLogin?callback\x3d"+encodeURIComponent(siteUrl)+"\x26siteCode\x3d"+window.digitalData.page.pageInfo.siteCode2}if($(window).width()>767){var authController=
new AuthController;baseLoginUrl=authController.getLoginUrl(false,casUrl+"/portal/loginAuth.html");loginUrl=casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000000\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dred\x26loginUrl\x3d"+encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl)}else{var authController=new AuthController;baseLoginUrl=authController.getLoginUrl(false,
casUrl+"/mobile/standard/wapLogin.html");loginUrl=casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000002\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dhuawei\x26loginUrl\x3d"+encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl)}return loginUrl}
function getHuaweiTimeLoginUri(clickurl,shopLogin){if(casUrl==null||casUrl=="")return"";var siteUrl=window.location.href;var baseLoginUrl;var loginUrl;var hasShop=false;if(shopLogin===true||shopLogin===false)hasShop=shopLogin;else hasShop=isECommerceSite=="Self-eCommerce"||isECommerceSite=="Fusion-eCommerce";if(siteUrl.indexOf("loginCallback\x3dtrue")==-1)if(siteUrl.indexOf("?")>0)siteUrl=siteUrl+"\x26loginCallback\x3dtrue";else siteUrl=siteUrl+"?loginCallback\x3dtrue";if(clickurl&&clickurl!="")if(clickurl.indexOf("http://")==
0||clickurl.indexOf("https://")==0)siteUrl=clickurl;else siteUrl=location.origin+clickurl;var callbackUrl=huaweitimeApiUrl+"/login/cloudplatforms?siteURL\x3d"+encodeURIComponent(siteUrl);if(hasShop){siteUrl=siteUrl.replace("\x26loginCallback\x3dtrue","").replace("?loginCallback\x3dtrue","");callbackUrl=loginApiHost+"v1/login/casLogin?callback\x3d"+encodeURIComponent(siteUrl)+"\x26siteCode\x3d"+window.digitalData.page.pageInfo.siteCode2}if($(window).width()>767){baseLoginUrl=casUrl+"/portal/loginAuth.html";
loginUrl=casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000000\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dred\x26loginUrl\x3d"+encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl)}else{baseLoginUrl=casUrl+"/portal/loginAuth.html";loginUrl=casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000002\x26countryCode\x3d"+sysConfig.countryCode+
"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dhuawei\x26loginUrl\x3d"+encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl)}return loginUrl}
function getAsyncUumLoginUri(newUserUrl){var userUrl=newUserUrl||getNewUserUrl();if(casUrl==null||casUrl==""||typeof mktConfig==="undefined"||mktConfig.uumApi==null||mktConfig.uumApi=="")return"";var callbackUrl=mktConfig.uumApi+"/v1/login/casLogin?callback\x3d"+encodeURIComponent(userUrl)+"\x26siteCode\x3d"+window.digitalData.page.pageInfo.siteCode2.toUpperCase();if(newUserUrl)callbackUrl+=$(window).width()<1199.98?"\x26clientType\x3d95":"\x26clientType\x3d85";else callbackUrl+=$(window).width()<
1199.98?"\x26clientType\x3d96":"\x26clientType\x3d82";var loginUrl=casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000000\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dred\x26loginUrl\x3d"+encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl);return loginUrl}
function asyncUumLogin(url){if(window.sessionStorage&&window.sessionStorage.getItem("uumLoginStatus")==="1")return;if(casUrl!=null&&casUrl!=""&&typeof mktConfig!=="undefined"&&mktConfig.uumApi!=null&&mktConfig.uumApi!="")$.ajax({type:"get",dataType:"jsonp",jsonp:"jsonp",url:getAsyncUumLoginUri(url),success:function(){var authController=new AuthController;authController.getLoginUrl(true).then(function(loginUrl){authController.syncLogin(loginUrl,true,function(){$(document).trigger("privacyPopup")})})},
complete:function(){if(window.sessionStorage)window.sessionStorage.setItem("uumLoginStatus","1")}})}function asyncUumLogout(){if(casUrl!=null&&casUrl!=""&&typeof mktConfig!=="undefined"&&mktConfig.uumApi!=null&&mktConfig.uumApi!="")$.ajax({type:"get",dataType:"jsonp",jsonp:"jsonp",url:mktConfig.uumApi+"/v1/logout/casLogout",success:function(){var authController=new AuthController;authController.syncLogout();$(document).trigger("privacyPopup",true)},complete:function(){}})}
function getNewUserUrl(){var _url="";var _cmktUri=supportv2.cmktApiUrl;if(typeof _cmktUri!="undefined"&&_cmktUri!="")_url=_cmktUri+"/services/service/extuser/info";return _url}
function getRegisterUrl(registerType){var registerUrl="";if(casUrl&&cmktUrl)if($(window).width()>1023)registerUrl=casUrl+"/portal/userRegister/"+(registerType=="phone"?"regbyphone.html":"regbyemail.html")+"?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000000\x26countryCode\x3d"+sysConfig.countryCode+"\x26loginUrl\x3d"+encodeURIComponent(casUrl+"/portal/loginAuth.html")+"\x26service\x3d"+encodeURIComponent(cmktUrl+"/login/cloudplatforms?siteURL\x3d"+encodeURIComponent(location.href))+
"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dred";else registerUrl=casUrl+"/mobile/standard/register/wapRegister.html"+"?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000000\x26countryCode\x3d"+sysConfig.countryCode+"\x26loginUrl\x3d"+encodeURIComponent(casUrl+"/mobile/standard/wapLogin.html")+"\x26service\x3d"+encodeURIComponent(cmktUrl+"/login/cloudplatforms?siteURL\x3d"+encodeURIComponent(location.href))+"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dhuawei";
return registerUrl}function getWebsiteLogoutUrl(redirectUrl){var authController=new AuthController;authController.syncLogout();$(document).trigger("privacyPopup",true);return casUrl+"/logout?service\x3d"+encodeURIComponent(cmktUrl+"/logout/cloudplatforms?siteURL\x3d"+encodeURIComponent(redirectUrl==null?window.location.href:redirectUrl))}
function getHuaweiAccount(){if(!$.cookie("_ext_u_e_"))return;var userUrl=getNewUserUrl();if(userUrl==null||userUrl=="")return;$.ajax({url:userUrl,type:"GET",dataType:"jsonp",jsonp:"jsonp",success:function(data){if(data.resCode=="0"){try{window.encUser=data.cbg_uid}catch(e){}if(data.crossSite&&data.crossSite=="1")loginstate=1;else loginstate=0;logininfo={"cbgid":data.uid,"ac_loNa":data.ac_loNa,"username":data.user};var isEcom=isECommerceSite=="Self-eCommerce"||isECommerceSite=="Fusion-eCommerce";var isAemEdit=
$("#is-edit-mode").val()=="true";if(!isEcom&&!isAemEdit&&data.ageGroupFlag&&data.ageGroupFlag==="2"&&underageTips&&underageTipsBtn)queryAemServiceConfig(filterXSS(underageTips),filterXSS(underageTipsBtn));if(getUrlParam("loginCallback")=="true"&&sysConfig.countryCode=="RU")try{thirdPartyLogin()}catch(e$2){}}else{removeLoginCookie();loginstate=3;loginWhenExpires()}},error:function(){loginstate=3}})}
function queryAemServiceConfig(title,btnText){webLogout();websiteLogOut();var reservation=$(".reservation").length>0&&$(".html-text-component .reservation").length===0;var reservationForeign=$(".reservation-foreign").length>0&&$(".html-text-component .reservation-foreign").length===0;var expressRepair=$(".express-repair-edit").length>0&&$(".html-text-component .express-repair-edit").length===0;var expressRepairForeign=$(".express-application-foreign").length>0&&$(".html-text-component .express-application-foreign").length===
0;var noLoginExpressRepair=$(".express-repair-edit.login-free").length===0;var userCenter=$(".left-tag-container-component").length>0&&$(".html-text-component .left-tag-container-component").length===0;var reservationCallback=$(".reservation-callback-component").length>0&&$(".html-text-component .reservation-callback-component").length===0;var homePageUrl="https://"+window.location.host+"/"+siteCode+"/support/";if(window.location.host.indexOf("localhost")!==-1)homePageUrl="http://"+window.location.host+
"/content/huawei-cbg-site/"+siteCode+"/support.html?wcmmode\x3ddisabled";if(reservation||reservationForeign||expressRepair||expressRepairForeign||!noLoginExpressRepair||userCenter||reservationCallback)setTimeout(function(){webLogout();websiteLogOut();window.location.href=getWebsiteLogoutUrl(homePageUrl)},3E3);var lastUrl=window.location.href;showRestrictionLoginDialog({title:title,okStr:btnText,dailogClass:"restrictionLogin"},function(){webLogout();window.location.href=getWebsiteLogoutUrl(lastUrl)})}
function showRestrictionLoginDialog(config,okCallback,cancelCallback){var content="\x3cdiv class\x3d's-dialog "+(config.dailogClass?config.dailogClass:"")+"'\x3e"+" \x3cdiv class\x3d's-content-dialog'\x3e"+" \x3cdiv class\x3d's-dialog-title'\x3e"+" \x3ch3\x3e\x3c/span\x3e"+config.title+"\x3c/h3\x3e"+" \x3c/div\x3e"+" \x3cdiv class\x3d's-dialog-btn'\x3e"+" \x3ca class\x3d's-btn s-ok-btn' href\x3d'javascript:;' \x3e"+config.okStr+"\x3c/a\x3e"+" \x3c/div\x3e"+
" \x3cdiv class\x3d'close'\x3e\x3ci\x3e\x3c/i\x3e\x3c/div\x3e"+" \x3c/div\x3e"+"\x3c/div\x3e";$("body").append(content);setTimeout(function(){$("body").addClass("scroll-disabled");$(".s-dialog .s-content-dialog").toggleClass("s-show")},0);$(".s-dialog .s-ok-btn").on("click",function(){var cancelDesc=$(".s-reason-dialog .s-advice").val();var cancelResonCode=$(".s-cancel-reason label.red_selected").attr("cancelResonCode");$(".s-dialog .s-content-dialog").toggleClass("s-show");$(this).off("click");
setTimeout(function(){$("body \x3e .s-dialog").remove();$("body").removeClass("scroll-disabled");okCallback&&okCallback()},500);$(".s-dialog .s-ok-btn,.s-dialog .s-cancel-bt,.s-dialog .close").off("click")});$(".s-dialog .close").on("click",function(){$(".s-dialog .s-content-dialog").toggleClass("s-show");$(this).off("click");setTimeout(function(){$("body \x3e .s-dialog").remove();$("body").removeClass("scroll-disabled");okCallback&&okCallback()},500);$(".s-dialog .s-ok-btn,.s-dialog .s-cancel-bt,.s-dialog .close").off("click")})}
function getHuaweiAccountByRetry(){if(!$.cookie("_ext_u_e_"))return;var userUrl=getNewUserUrl();if(userUrl==null||userUrl=="")return;$.ajax({url:userUrl,type:"GET",dataType:"jsonp",jsonp:"jsonp",success:function(data){if(data.resCode=="0"){try{window.encUser=data.cbg_uid}catch(e){}if(data.crossSite&&data.crossSite=="1")loginstate=1;else loginstate=0;logininfo={"cbgid":data.uid,"ac_loNa":data.ac_loNa,"username":data.user};if(getUrlParam("loginCallback")=="true"&&sysConfig.countryCode=="RU")try{thirdPartyLogin()}catch(e$3){}}else{removeLoginCookie();
loginstate=3}},error:function(){loginstate=3}})}function cmktLogin(){if(casUrl!=null&&casUrl!="")$.ajax({type:"get",dataType:"jsonp",jsonp:"jsonp",url:getLoginUri(getNewUserUrl(),false),complete:function(){uumLogin()}})}function cmscLogin(){if(casUrl!=null&&casUrl!="")$.ajax({type:"get",dataType:"jsonp",jsonp:"jsonp",url:getCmscLoginUri(getCmscNewUserUrl(),false),complete:function(){uumLogin()}})}
function huaweiTimeLogin(){if(casUrl!=null&&casUrl!=""&&requestConfig.countryCode==="CN")$.ajax({type:"get",dataType:"jsonp",jsonp:"jsonp",url:getHuaweiTimeLoginUri(getNewUserUrl(),false),complete:function(){uumLogin()}})}function uumLogin(){var authController=new AuthController;if(isLogin()&&!authController.__isLoggedIn)authController.getLoginUrl(true).then(function(loginUrl){authController.syncLogin(loginUrl,true,function(){$(document).trigger("privacyPopup")})})}
function getCmscNewUserUrl(){var _url="";var _cmscUri=loginApiUrl.cmscApiUrl;if(typeof _cmscUri!="undefined"&&_cmscUri!="")_url=_cmscUri+"/services/service/extuser/info";return _url}
function processCmscAndHuaweiTimeLoginStatus(){if(typeof loginApiUrl==="undefined")return;var cmktUrl=supportv2.cmktApiUrl;var cmscUrl=loginApiUrl.cmscApiUrl;var huaweitimeApiUrl=loginApiUrl.huaweitimeApiUrl;if(!!$.cookie("_ext_u_e_")){if(cmscUrl!=null&&cmscUrl!="")$.ajax({url:cmscUrl+"/services/service/extuser/info",type:"get",dataType:"jsonp",jsonp:"jsonp",success:function(result){if(result.resCode!="0")cmscLogin()}});if(!$.cookie("userID"))if(huaweitimeApiUrl!=null&&huaweitimeApiUrl!="")huaweiTimeLogin()}else if(!!$.cookie("userID")){if(cmktUrl!=
null&&cmktUrl!="")cmktLogin();if(cmscUrl!=null&&cmscUrl!="")cmscLogin()}}
function processLoginStatus(){if(!!$.cookie("_ext_u_e_")){if($.cookie("loginCallback")!=="true")isCompleteUserInfo();if(!isUnifiedLoginSite())return;var communityKey="cbgcommunityUserinfo"+digitalData.page.pageInfo.countryCode;if(location.href.indexOf("community")!==-1&&location.href.indexOf("community/login")===-1&&typeof getCookie==="function"&&!$.cookie(communityKey)&&!$.cookie("forumLogin")){$.cookie("forumLogin","1",{path:"/"});try{CommunityUserLogin.login()}catch(e){}}if(!$.cookie("ec-loginStatus"))ecomLogin()}else if((isECommerceSite===
"Self-eCommerce"||isECommerceSite==="Fusion-eCommerce")&&typeof ecCom!="undefined"){var vLogged=ecCom.isVisitor();if(!vLogged&&$.cookie("ec-loginStatus")||$.cookie("cbgcommunityUserinfo"+digitalData.page.pageInfo.countryCode))if(casUrl!=null&&casUrl!="")$.ajax({type:"get",dataType:"jsonp",url:getLoginUri(getNewUserUrl(),false),complete:function(){isCompleteUserInfo(null,null,false);loginstate=-1;getHuaweiAccountByRetry()}});if(!vLogged&&$.cookie("ec-loginStatus"))if(location.href.indexOf("community")!=
-1&&!$.cookie("cbgcommunityUserinfo"+digitalData.page.pageInfo.countryCode)&&!$.cookie("forumLogin")){$.cookie("forumLogin","1",{path:"/"});try{CommunityUserLogin.login()}catch(e$4){}}if(!$.cookie("ec-loginStatus")&&$.cookie("cbgcommunityUserinfo"+digitalData.page.pageInfo.countryCode))ecomLogin()}}
function ecomLogin(){var authController=new AuthController;if(authController.isEcComSitePage())return;var ecomLoginUrl;try{window.getUPLoginUrl(window.location.href).then(function(data){if(!ecCom.isPC)ecomLoginUrl=data.loginWapUrl;else ecomLoginUrl=data.loginWebUrl;if(ecomLoginUrl!=null&&ecomLoginUrl!=undefined&&ecomLoginUrl!=""&&isUnifiedLoginSite())$.ajax({url:ecomLoginUrl,type:"post",dataType:"jsonp",complete:function(result){window.sessionStorage.setItem("ec-loginStatus","1");$.cookie("ec-loginStatus",
"1",{path:"/"});if($("#common-popup").length===0){var def=$.Deferred();ecCom.ajaxReq({api:"v1/login/info",apiHost:loginApiHost,type:"get",success:function(response){if(response.data&&response.data.userId){processLogin(def,response);if(response.data.ageGroupFlag&&response.data.ageGroupFlag!==0)restrictLogin(response.data.ageGroupFlag)}}})}}})})}catch(e){}}
function loginWhenExpires(){if(!isUnifiedLoginSite()){if(typeof cmktLogin==="function")cmktLogin()}else{var vLogged=!!(typeof ecCom!="undefined"&&ecCom.isVisitor());if(!vLogged&&$.cookie("ec-loginStatus")||$.cookie("cbgcommunityUserinfo"+digitalData.page.pageInfo.countryCode)||$.cookie("_ext_u_e_"))$.ajax({type:"get",dataType:"jsonp",url:getLoginUri(getNewUserUrl(),false),complete:function(){isCompleteUserInfo(null,null,false);loginstate=-1;getHuaweiAccountByRetry()}});else if(location.href.indexOf("community")==
-1)$(function(){apiAuth.exitAuth()})}}function isUnifiedLoginSite(){try{if(isECommerceSite)return isECommerceSite==="Self-eCommerce"||isECommerceSite==="Fusion-eCommerce"}catch(e){}return false}
function processPrivacy(){if($.cookie("agree-privacy-policy")=="1")return;if((sysConfig.countryCode=="GB"||isUnifiedLoginSite())&&location.href.indexOf("/community/")==-1){var maxtime=500;var islogined=setInterval(function(){if(loginstate==1||loginstate==0){var desc=$(".cbg-support-privacy").val();var agree=$(".agree-privacy").val();var disagree=$(".disagree-privacy").val();showPrivacyPolicy({content:desc,okStr:agree,cancelStr:disagree,iconClass:"icon-warin"},function(){$.cookie("agree-privacy-policy",
"1",{path:"/"})},function(){apiAuth.exitAuth(function(){removeLoginCookie();$.removeCookie("agree-privacy-policy",{path:"/"});if(isUnifiedLoginSite())removeUnifiedLoginCookie();window.location.href=casUrl+"/logout?service\x3d"+encodeURIComponent(cmktUrl+"/logout/cloudplatforms?siteURL\x3d"+encodeURIComponent($(".login-menu-component").attr("data-support-url")))});return});clearInterval(islogined)}if(loginstate==3)clearInterval(islogined);if(maxtime--<1)clearInterval(islogined)},20)}}
function processUumLoginStatus(){try{if(window.location.href.indexOf("loginCallback\x3dtrue")!==-1&&$.cookie("_ext_u_e_"))asyncUumLogin();else if(window.location.href.indexOf("loginCmscCallback\x3dtrue")!==-1&&$.cookie("_cuef_u_e_"))asyncUumLogin(getCmscNewUserUrl());else return}catch(e){}}
$(function(){if($(".login-menu-component").length==0&&$(".huawei-v4 .login-v4-wrap .login-v4 .login-v4-cnt .show-login").length==0)return;getHuaweiAccount();processUumLoginStatus();if(sysConfig.siteCode=="en_EN")return;processCmscAndHuaweiTimeLoginStatus();processLoginStatus();var nl=$(".login-menu-component").attr("data-support-login");if(typeof nl!="undefined"&&nl=="no")return;$(".conv3_nav .icon_close").after($(".login-menu-component").html());setTimeout(function(){$(".conv3_nav .navcon .login-menu .login-btn").on("click",
function(event){event.stopPropagation();$("body").append("\x3cstyle\x3e@media screen and (max-width:767px){body.ready-login{ height:"+$(window).height()+"px; } body.ready-login .conv3_wrap,body.ready-login .foot_module{display:none!important;} }\x3c/style\x3e");menuPageHistory.ClosePage(function(){callLoginOnClick()})});$(".conv3_nav .navcon .login-menu").on("mouseenter",function(event){event.stopPropagation();$(this).addClass("active")});$(".conv3_nav .navcon .login-menu").on("click",function(event){event.stopPropagation();
if($(this).hasClass("active"))$(this).removeClass("active");else $(this).addClass("active")});$(".conv3_nav .navcon .login-menu").on("mouseleave",function(event){event.stopPropagation();$(this).removeClass("active")});if(isLogin()==false)$(".conv3_nav .navcon .login-menu.singin").on("click",function(event){event.stopPropagation();$.removeCookie("AuthorizationInfo",{path:"/"});if(isLogin()){try{}catch(e){}window.location.href=$(".login-menu-component").attr("data-support-usercenter-url")}else;});
else{$(".conv3_nav .navcon .login-menu").addClass("singin");getUserInfoFromUum(contactUserInfo);setTimeout(function(){$(".login-menu.singin").click(function(event){event.stopPropagation();if(isLogin()){try{}catch(e){}window.location.href=$(".login-menu-component").attr("data-support-usercenter-url")}else;if($(this).hasClass("active"))$(this).removeClass("active");else $(this).addClass("active")})})}},200);$(".huawei-v3 .header-wrap .right-box .login .login-wrap .login-cnt ul li.track-order-v3,.huawei-v3 .header-wrap .right-box .login .login-wrap .login-cnt ul li.app-track-order-v3").on("click",
function(event){event.stopPropagation()})});function websiteLogOut(){if(casUrl!=null&&casUrl!=""){$.ajax({type:"get",dataType:"jsonp",url:casUrl+"/logout?service\x3d"+supportv2.cmktApiUrl+"/logout/cloudplatforms?siteURL\x3d"+encodeURIComponent(getNewUserUrl()),success:function(){}});apiAuth.exitAuth()}}
function webLogout(){removeLoginCookie();$.removeCookie("agree-privacy-policy",{path:"/"});if(isUnifiedLoginSite())removeUnifiedLoginCookie();__isAuth=false;isCreateUserInfo=false;if(isECommerceSite=="Self-eCommerce"||isUnifiedLoginSite()){if(casUrl!=null&&casUrl!=""){$.ajax({type:"get",dataType:"jsonp",url:casUrl+"/logout?service\x3d"+supportv2.cmktApiUrl+"/logout/cloudplatforms?siteURL\x3d"+encodeURIComponent(getNewUserUrl()),success:function(){}});apiAuth.exitAuth()}}else apiAuth.exitAuth()}
function getSitUrl(url){var toUrl=url?url:"";var siteUrl=window.location.origin+"/"+siteCode+"/"+toUrl;return siteUrl}
function huaweitimeLogout(callback){if(loginApiUrl.huaweitimeApiUrl!=null&&loginApiUrl.huaweitimeApiUrl!="")$.ajax({type:"get",dataType:"jsonp",url:casUrl+"/logout?service\x3d"+encodeURIComponent(loginApiUrl.huaweitimeApiUrl+"/logout/cloudplatforms?siteURL\x3d"+encodeURIComponent(getNewUserUrl())),complete:function(){var authController=new AuthController;authController.syncLogout();$(document).trigger("privacyPopup",true);callback&&callback()}})}
function cmscLogout(callback){if(casUrl!=null&&casUrl!=""&&loginApiUrl.cmscApiUrl!=null&&loginApiUrl.cmscApiUrl!="")$.ajax({type:"get",dataType:"jsonp",url:casUrl+"/logout?service\x3d"+encodeURIComponent(loginApiUrl.cmscApiUrl+"/logout/cloudplatforms?siteURL\x3d"+encodeURIComponent(getCmscNewUserUrl())),complete:function(){var authController=new AuthController;authController.syncLogout();$(document).trigger("privacyPopup",true);callback&&callback()}})}
function callLogin(clickurl){if(!isShowLogin())return;webLogout();callLoginOnClick(clickurl)}
function callLoginOnClick(clickurl){if(!isShowLogin())return;if(casUrl==null||casUrl=="")return;$(".login-dialog-component .login-dialog").css("display","block");$("body").addClass("ready-login");$("body").append("\x3cstyle\x3e@media screen and (max-width:767px){ body.ready-login{height:"+($(window).height()-0)+"px; } }\x3c/style\x3e");setTimeout(function(){$(".login-dialog").addClass("show")},0);setTimeout(function(){var siteUrl=window.location.href;if(siteUrl.indexOf("loginCallback\x3dtrue")==-1)if(siteUrl.indexOf("?")>
0)siteUrl=siteUrl+"\x26loginCallback\x3dtrue";else siteUrl=siteUrl+"?loginCallback\x3dtrue";if(clickurl&&clickurl!="")if(clickurl.indexOf("http://")==0||clickurl.indexOf("https://")==0)siteUrl=clickurl;else siteUrl=location.origin+clickurl;var callbackUrl=cmktUrl+"/login/cloudplatforms?siteURL\x3d"+encodeURIComponent(siteUrl);var baseLoginUrl;var loginUrl;if($(window).width()>767){baseLoginUrl=casUrl+"/portal/loginAuth.html";loginUrl=casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+
"\x26loginChannel\x3d27000000\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dred\x26loginUrl\x3d"+encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl)}else{baseLoginUrl=casUrl+"/mobile/standard/wapLogin.html";loginUrl=casUrl+"/remoteLogin?reqClientType\x3d"+sysConfig.reqClientType+"\x26loginChannel\x3d27000002\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26themeName\x3dhuawei\x26loginUrl\x3d"+
encodeURIComponent(baseLoginUrl);loginUrl+="\x26service\x3d"+encodeURIComponent(callbackUrl)}$("#loginFrame").attr("src",loginUrl);$(".login-close").on("click",function(){$(".login-dialog").removeClass("show");setTimeout(function(){$(".login-dialog").css("display","none");$("body").removeClass("ready-login")},300)})},200)}
function needLogin(needLoginFlag){if(!isShowLogin())return;if(typeof needLoginFlag=="undefined")needLoginFlag=$(".user-center").data("isPreviewMode");if(!!$.cookie("ac_loNa"))setTimeout(function(){if(needLoginFlag==false)return;isCompleteUserInfo(function(result,responseCode){if(responseCode=="500003")return})},2E3);else{$(function(){setTimeout(function(){if(needLoginFlag==false)return;window.location.href=getLoginUri(null,false)},200)});apiAuth.exitAuth(function(){removeLoginCookie();$.removeCookie("agree-privacy-policy",
{path:"/"});if(isUnifiedLoginSite())removeUnifiedLoginCookie()})}}function isShowLogin(){if(isECommerceSite=="Self-eCommerce"||isECommerceSite=="Fusion-eCommerce")return true;var nl=$(".login-menu-component").attr("data-support-login")||$(".huawei-v4 .login-v4-wrap .login-v4 .login-v4-cnt .show-login").attr("data-support-login");if(typeof nl!="undefined"&&nl=="no")return false;return true}
$(function(){setTimeout(function(){$("[data-auth-href]").each(function(){$(this).on("click",function(event){var that=this;var clickurl=$(this).attr("data-auth-href");if(isShowLogin())$.ajax({url:apiurl+"/web/getAuthorizationInfo/1000",type:"GET",dataType:"jsonp",jsonp:"jsonp",data:{},async:true,success:function(result){if(result.responseCode=="200")window.location.href=$(that).attr("data-auth-href");else{$.removeCookie("loginCallback",{path:"/"});if(location.href.indexOf("/express-repair")!=-1||location.href.indexOf("/reservation")!=
-1||location.href.indexOf("/repair-appointment")!=-1)window.location.href=getLoginUri(clickurl,false);else window.location.href=getLoginUri(location.href,false)}}});else window.location.href=$(that).attr("data-auth-href")})})},1E3)});function authCallback(result){window.location.reload();if(result.responseCode=="200")window.location.reload();else;}
function removeLoginCookie(){$.removeCookie("ac_loNa",{path:"/"});$.removeCookie("AuthorizationInfo",{path:"/"});$.removeCookie("__isAuth",{path:"/"});$.removeCookie("__isCreateUserInfo",{path:"/"});$.removeCookie("loginCallback",{path:"/"});if(window.sessionStorage)window.sessionStorage.removeItem("uumLoginStatus")}
function removeUnifiedLoginCookie(){try{$.removeCookie("cbgcommunityloginStatus",{path:"/"});$.removeCookie("cbgLoginTag",{path:"/"});sessionStorage.getItem("ec-loginStatus")?sessionStorage.removeItem("ec-loginStatus"):"";$.removeCookie("ec-loginStatus",{path:"/"});$.removeCookie("login_status",{path:"/"});$.removeCookie("forumLogin",{path:"/"});$.removeCookie("ac_loNa",{path:"/"+window.digitalData.page.pageInfo.siteCode2+"/"});$.removeCookie("loginUserinfo",{path:"/"+window.digitalData.page.pageInfo.siteCode2+
"/"})}catch(e){}}
function isCompleteUserInfo(callback,responseCode,redirect){if(!isShowLogin())return;if(apiurl==null||apiurl=="")return;var requestGetServiceCust={};requestGetServiceCust.accountId="000";requestGetServiceCust.source=sysConfig.source;$(function(){if($.cookie("loginCallback")==="true")apiAuth.getAuthInfo(function(result){if(result!=null&&result.responseCode=="500003"){removeLoginCookie();if(redirect!=false)window.location.href=getLoginUri(null,false)}else if(result.responseCode=="200")if(__isAuth){callback&&callback(isCreateUserInfo,
result.responseCode);return false}},true);else{if(__isAuth){callback&&callback(isCreateUserInfo);return false}if(casUrl==null||casUrl=="")return;$.ajax({type:"get",url:apiSysConfig.authUrl,dataType:"jsonp",jsonp:"jsonp",complete:function(){getCsrfToken();$.cookie("loginCallback","true",{path:"/"});thirdPartyLogin()}})}})}
function showPrivacyPolicy(config,okCallback,cancelCallback){var content="\x3cdiv class\x3d's-dialog-fr-privacy'\x3e"+" \x3cdiv class\x3d's-content-dialog'\x3e"+" \x3cdiv class\x3d's-dialog-title'\x3e"+" \x3c/div\x3e\x3cdiv class\x3d's-dialog-content'\x3e"+config.content+" \x3c/div\x3e\x3cdiv class\x3d's-dialog-btn'\x3e"+" \x3ca class\x3d's-btn s-cancel-btn'\x3e"+config.cancelStr+"\x3c/a\x3e"+" \x3ca class\x3d's-btn s-ok-btn'\x3e"+config.okStr+"\x3c/a\x3e"+
" \x3c/div\x3e"+" \x3c/div\x3e"+"\x3c/div\x3e";$("body").append(content);setTimeout(function(){$(".s-dialog-fr-privacy .s-content-dialog").toggleClass("s-show")},0);$(".s-dialog-fr-privacy .s-ok-btn").on("click",function(){$(".s-dialog-fr-privacy .s-content-dialog").toggleClass("s-show");$(this).off("click");setTimeout(function(){$("body \x3e .s-dialog-fr-privacy").remove();okCallback&&okCallback()},500);$(".s-dialog-fr-privacy .s-ok-btn,.s-dialog-fr-privacy .s-cancel-bt").off("click")});
$(".s-dialog-fr-privacy .s-cancel-btn").on("click",function(){$(".s-dialog .s-content-dialog").toggleClass("s-show");$(this).off("click");setTimeout(function(){$("body \x3e .s-dialog-fr-privacy").remove();cancelCallback&&cancelCallback()},500);$(".s-dialog-fr-privacy .s-ok-btn,.s-dialog-fr-privacy .s-cancel-bt").off("click")})}
function thirdPartyLogin(){var loginDom=$("i.third-party-login-url");if(loginDom){var loginUrl=$("i.third-party-login-url").attr("data-callback-url");if(loginUrl)$.ajax({type:"get",url:loginUrl,dataType:"jsonp",jsonp:"jsonp",complete:function(){if(isLogin()){var authController=new AuthController;authController.getLoginUrl(true).then(function(loginUrl){authController.syncLogin(loginUrl,true,function(){$(document).trigger("privacyPopup")})})}}})}else return}
var apiIRetail={getHotline:function(requestData,success){var request=requestData;request.countryCode=requestConfig.countryCode;request.langCode=requestConfig.langCode;userLogin.request("/iRetail/getHotline/1000",request,success)}};function checkStorageStatus(){var _s=false;try{if(window.localStorage)_s=true}catch(e){}return _s}
function buildNewKownApplicableRegion(requestData){if(sysConfig.countryCode=="Global")requestData.applicable_region="0";else if(digitalData.page.pageInfo.siteCode=="latin")requestData.applicable_region="CO";else if(digitalData.page.pageInfo.siteCode=="latinen")requestData.applicable_region="US";else if(digitalData.page.pageInfo.siteCode=="levantar")requestData.applicable_region="EG";else if(digitalData.page.pageInfo.siteCode=="levant")requestData.applicable_region="US";else requestData.applicable_region=
sysConfig.countryCode;return requestData}function checkInputStr(str){var reg=/^[^"#&'\+;<=>\\]{0,1000}$/;return reg.test(str)}
function getLoginStates(nextstep){var extue=$.cookie("_ext_u_e_");if(extue&&(extue=="1"||extue==1))nextstep&&nextstep();else apiAuth.exitAuth(function(){removeLoginCookie();if($(".huawei-v4 .login-v4-wrap .login-v4 .login-v4-cnt .show-login").length>0)var _logoutUrl=getWebsiteLogoutUrl($(".huawei-v4 .login-v4-wrap .login-v4 .login-v4-cnt .show-login").attr("data-support-url"));else var _logoutUrl=casUrl+"/logout?service\x3d"+encodeURIComponent(cmktUrl+"/logout/cloudplatforms?siteURL\x3d"+encodeURIComponent($(".login-menu-component").attr("data-support-url")));
window.location.href=_logoutUrl})}function getUserInfoFromUum(callbackFn){var authController=new AuthController;var isLoggedIn=authController.checkIsLoggedIn(false);if(!isLoggedIn){var _loginUrl=authController.getLoginUrl(false);authController.syncLogin(_loginUrl,true,function(){if(!authController.checkIsLoggedIn(false))callbackFn(authController.__userInfo)})}else callbackFn(authController.__userInfo)}
function contactUserInfo(userInfo){if(authController.__userInfo){var headPictureUrl=userInfo.headPictureUrl;if(headPictureUrl)$("body").append("\x3cstyle\x3e.login-menu.singin,.login-menu.login-phone.singin .user-logined:before{ background-image:url("+headPictureUrl+") }\x3c/style\x3e");var name=getUumInfoName(userInfo);$("body").append("\x3cstyle\x3e.login-menu.singin .login-menu-contaner:after { content: '"+name+"'; }\x3c/style\x3e")}}
function getUumInfoName(userInfo){if(userInfo){var nickName=userInfo.nickName;var userName=userInfo.userName;return checkNickName(nickName)?anonymizatizeName(nickName):anonymizatizeName(userName)}return""}function checkNickName(name){if(name==""||name==undefined)return false;if(/^\d+$/.test(name))return false;return true}
function anonymizatizeName(value){var result="";if(value&&value.length>1){if(value.indexOf("@")>-1){var prefixStr=value.substring(0,value.indexOf("@"));result=anonymizatizeName(prefixStr)+"@***"}else result=value.substring(0,value.length/2)+getStarString(value);return result}return"*"}function getStarString(value){if(value.length==0)return"*";var result="";for(var i=0;i0};AuthController.prototype.getUserInfo=function(isAsync){var _isAsync=typeof isAsync===
"boolean"?isAsync:false;var ctx=this;var options={url:shuttleToUrls.userInfo,async:_isAsync,type:"get",headers:{"SGW-APP-ID":ctx.SGW_APP_ID},xhrFields:{withCredentials:true}};if(_isAsync)return new Promise(function(resolve,reject){$.ajax($.extend({},options,{success:function(res){var isSuccess=res&&res.resultCode===0;ctx.__userInfo=isSuccess?res.data:null;resolve(ctx.__userInfo)},error:function(){ctx.__userInfo=null;reject()}}))});$.ajax($.extend({},options,{success:function(res){var isSuccess=res&&
res.resultCode===0;ctx.__userInfo=isSuccess?res.data:null},error:function(){ctx.__userInfo=null}}));return ctx.__userInfo};AuthController.prototype.checkIsLoggedIn=function(isAsync){var _isAsync=typeof isAsync==="boolean"?isAsync:false;var ctx=this;var resultOrPromise=ctx.getUserInfo(_isAsync);if(_isAsync)return resultOrPromise.then(function(userInfo){ctx.__isLoggedIn=!!userInfo;return ctx.__isLoggedIn}).catch(function(){ctx.__isLoggedIn=false});ctx.__isLoggedIn=!!resultOrPromise;return ctx.__isLoggedIn};
AuthController.prototype.getAuthorUrls=function(isAsync,targetCbUrl){var ctx=this;var _isAsync=typeof isAsync==="boolean"?isAsync:false;var hasBaseUrl=ctx.checkBaseUrl();var options={url:shuttleToUrls.getAuthUrls,data:{callback:targetCbUrl||(document.defaultView.location||document.location).href,siteCode:pageConfig.siteCode,lang:pageConfig.language||pageConfig.lang,countryCode:pageConfig.countryCode},headers:{"SGW-APP-ID":ctx.SGW_APP_ID},async:_isAsync,timeout:3E3,dataType:"json"};if(!hasBaseUrl)return _isAsync?
Promise.reject(errMsg).catch(console.error):{};if(_isAsync)return new Promise(function(resolve,reject){$.ajax($.extend({},options,{success:function(resData){if(resData&&resData.data&&Object.keys(resData.data).length){ctx.__authUrls=resData.data;resolve(ctx.__authUrls)}else reject()},error:function(){reject()}}))});$.ajax($.extend({},options,{success:function(resData){ctx.__authUrls=resData.data},error:function(){ctx.__authUrls=null}}));return ctx.__authUrls};AuthController.prototype.getLoginUrl=function(isAsync,
targetCbUrl){try{var _isAsync=typeof isAsync==="boolean"?isAsync:false;var result=this.getAuthorUrls(_isAsync,targetCbUrl);if(isAsync)return result.then(function(urls){return urls.loginWebUrl||targetCbUrl}).catch(console.error);return result?result.loginWebUrl:targetCbUrl}catch(err){return targetCbUrl}};AuthController.prototype.syncLogin=function(loginUrl,isSilent,completeCB){try{if(this.isEcComSitePage()&&!this.isSupportPage()||!loginUrl)return;var _isSilent=typeof isSilent==="boolean"?isSilent:
true;if(_isSilent)$.ajax({type:"get",dataType:"jsonp",jsonp:"jsonp",async:false,url:loginUrl,complete:function(){if(supportv2.enableCsrfVerify&&pageCategory=="support")ccpcCsrfToken=initToken();typeof completeCB==="function"&&completeCB()}});else(document.defaultView.location||document.location).href=loginUrl}catch(e){console.error("syncLogin: ",e)}};AuthController.prototype.syncLogout=function(targetCbUrl,completeCB){if(!uumApi)return;try{var params={callback:targetCbUrl||(document.defaultView.location||
document.location).href,siteCode:pageConfig.siteCode,lang:pageConfig.language||pageConfig.lang,countryCode:pageConfig.countryCode};$.ajax({type:"get",data:params,dataType:"jsonp",jsonp:"jsonp",async:false,url:shuttleToUrls.logout,complete:function(){typeof completeCB==="function"&&completeCB()}})}catch(e){console.error("An error occurred while logging out!")}};return AuthController}(document.defaultView||window);var authController=new AuthController;var login_leave="";
$(function(){if($(window).width()>1023){if($("#header-v3 .nav-wrap .login").length==0)return}else if($(".app-nav .app-nav-wrap .app-login-icon").length==0)return;$(".login-cnt .login-other-items").on("click",function(a){a.stopPropagation()});setTimeout(function(){$("#header-v3 .nav-wrap .login .signInBtn, .app-nav .app-login-icon .signInBtn").on("click",function(event){if(typeof communityLogin!="undefined")return;event.stopPropagation();window.location.href=getLoginUri()});$("#header-v3 .nav-wrap .login").on("mouseenter",
function(event){event.stopPropagation();$(this).addClass("active");clearTimeout(login_leave)});$("#header-v3 .nav-wrap .login, .app-nav .app-login-icon").on("click",function(event){event.stopPropagation();if($(this).hasClass("active"))$(this).removeClass("active");else $(this).addClass("active")});$("#header-v3 .nav-wrap .login").on("mouseleave",function(event){event.stopPropagation();var _t=$(this);login_leave=setTimeout(function(){_t.removeClass("active")},300)});$(".app-login-bullet .app-sign .app-loginout").on("click",
function(event){if(typeof communityLogin!="undefined")return;window.location.href=$(".app-login-bullet .app-sign .app-loginout").attr("data-url")});$("#header-v3 .nav-wrap .login .my-exit,.conv3_wrap .user-center .my-exit,.user-info-header .user-info .my-exit, .app-nav .app-login-icon .my-exit").on("click",function(event){event.stopPropagation();apiAuth.exitAuth(function(){$.removeCookie("ac_loNa",{path:"/"});$.removeCookie("AuthorizationInfo",{path:"/"});$.removeCookie("__isAuth",{path:"/"});$.removeCookie("__isCreateUserInfo",
{path:"/"});$.removeCookie("loginCallback",{path:"/"});$.removeCookie("agree-privacy-policy",{path:"/"});if(isUnifiedLoginSite())removeUnifiedLoginCookie();var reidrectUrl=encodeURIComponent($(".login-menu-component").attr("data-support-url"));if(location.href.indexOf("/community/")!=-1&&isUnifiedLoginSite()){reidrectUrl=encodeURIComponent(location.href);if(location.href.indexOf("/community/user-center")!=-1||location.href.indexOf("/login/")!=-1)reidrectUrl=encodeURIComponent(location.href.substring(0,
location.href.lastIndexOf("/community/"))+"/community/")}window.location.href=casUrl+"/logout?service\x3d"+encodeURIComponent($(".login-menu-component").attr("data-support-cmkt-url")+"/logout/cloudplatforms?siteURL\x3d"+reidrectUrl)})});if(isLogin()==false)$("#header-v3 .nav-wrap .login.singin, .app-nav .app-login-icon.singin").on("click",function(event){event.stopPropagation();$.removeCookie("AuthorizationInfo");if(isLogin()){try{}catch(e){}window.location.href=$(".login-menu-component").attr("data-support-usercenter-url")}else;
});else{$("#header-v3 .nav-wrap .login, .app-nav .app-login-icon").addClass("singin");$(".login-cnt .shop-bag-bnt").on("click",function(event){event.stopPropagation()});getUserInfoFromUum(function(userInfo){$(".login.singin .show-logout .singin-user,.app-login-icon.singin .app-sign-user .singin-user").text(getUumInfoName(userInfo))});setTimeout(function(){$(".login.singin").click(function(event){event.stopPropagation();if(isLogin()){try{}catch(e){}window.location.href=$(".login-menu-component").attr("data-support-usercenter-url")}else;
if($(this).hasClass("active"))$(this).removeClass("active");else $(this).addClass("active")})})}},200)});
function forumLogin(url){var href=window.location.href;var loginUrl="https://"+clientLoginUrl+loginPort+"/oauth2/v2/authorize?reqClientType\x3d"+reqClientType+"\x26response_type\x3dcode\x26client_id\x3d"+clientID+"\x26redirect_uri\x3dhttps%3A%2F%2F"+window.location.host+"%2F"+digitalData.page.pageInfo.siteCode2+"%2Fcommunity%2Flogin%2F\x26scope\x3dhttps%3A%2F%2Fwww.huawei.com%2Fauth%2Faccount%2Fbase.profile\x26display\x3dpage\x26lang\x3d"+sysConfig.casLangCode;url&&(loginUrl=url);setCookieCommunity("currentUrl",
getCookieUri(),24);if(window.location.href.indexOf("/community")==-1)setCookieCommunity("cbgcommunitylogin","1",24);window.location.href=loginUrl}
function forumMobileLogin(){window.location.href="https://"+clientUrl+"/CAS/mobile/standard/register/wapRegister.html?reqClientType\x3d"+reqClientType+"\x26loginChannel\x3d"+loginChannel+"\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26loginUrl\x3dhttps%3A%2F%2F"+clientUrl+"%2FCAS%2Fportal%2Flogin.html\x26service\x3dhttps%3A%2F%2F"+clientLoginUrl+"%2Foauth2%2Fv2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D"+clientID+"%26redirect_uri%3Dhttps%253A%252F%252F"+
window.location.host+"%252F"+digitalData.page.pageInfo.siteCode2+"%252Fcommunity%252Flogin%252F%26scope%3Dhttps%253A%252F%252Fwww.huawei.com%252Fauth%252Faccount%252Fbase.profile%26display%3Dpage"}function forumLogout(){var logouturi=$("#forum-clientLogoutUrl").val();var uri=window.location.href;if(uri.indexOf("/community")==-1)setCookieCommunity("cbgcommunitylogout","1",24);window.location.href=logouturi}
function forumMobileLogout(){var url=ajaxUrl+"user/logout";var tk;if(getCookieCommunity("tk"))tk=getCookieCommunity("tk");var params={};if(SITE_CODE=="worldwide")params.site=digitalData.page.pageInfo.siteCode;else params.site=SITE_CODE;if(getCookieCommunity("loginUserinfo")){var loginUserinfo=JSON.parse(getCookieCommunity("loginUserinfo"));params.loginUserId=loginUserinfo.userId}else return;var headUrl=window.location.protocol+"//"+window.location.host+"/"+digitalData.page.pageInfo.siteCode2;params.redirectUri=
encodeURIComponent(headUrl);$.ajax({url:url,type:"post",data:JSON.stringify(params),dataType:"json",xhrFields:{withCredentials:true},headers:{"CSRFToken":tk},crossDomain:true,contentType:"application/json",success:function(data,status,request){$(".forum-login,.app-login-icon").removeClass("singin");delCookieCommunity("currentUrl");delCookieCommunity("cbgcommunitylogin");if(request.getResponseHeader("CSRFToken")){tk=request.getResponseHeader("CSRFToken");delCookieCommunity("tk");setCookieCommunity("tk",
request.getResponseHeader("CSRFToken"),24)}if(data.resultCode=="1"||!data.resultCode){if(getCookieCommunity("loginUserinfo"))delCookieCommunity("loginUserinfo");if(getCookieCommunity("blacklist"))delCookieCommunity("blacklist",false);if(window.localStorage&&window.localStorage.getItem("pactList"))window.localStorage.removeItem("pactList");if(data&&data.url)window.location.href=data.url;else window.location.href="/"+digitalData.page.pageInfo.siteCode2}else CommunityLoginFailTipDialog(data.resultMsg,
function(){})},error:function(xhr,status,error){if(xhr.getResponseHeader("CSRFToken")){tk=xhr.getResponseHeader("CSRFToken");setCookieCommunity("tk",xhr.getResponseHeader("CSRFToken"),24)}if(xhr&&xhr.responseJSON)CommunityLoginFailTipDialog(xhr.responseJSON.resultMsg,function(){});else{var str=$("#forum-networkplroblemtips").val();CommunityLoginFailTipDialog(str,function(){})}}})}
function setCookieCommunity(c_name,value,expirehours){var exdate=new Date;exdate.setTime(exdate.getTime()+expirehours*60*60*1E3);document.cookie=c_name+"\x3d"+escape(value)+(expirehours==null?"":";expires\x3d"+exdate.toGMTString())+";path\x3d/"+digitalData.page.pageInfo.siteCode2+"/;"}
function getCookieCommunity(c_name){if(document.cookie.length>0){var c_start=document.cookie.indexOf(c_name+"\x3d");if(c_start!=-1){c_start=c_start+c_name.length+1;var c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end))}}return""}
function delCookieCommunity(name){var exdate=new Date;exdate.setTime(exdate.getTime()-1);var cval=getCookieCommunity(name);if(cval!=null&&cval!="")document.cookie=name+"\x3d"+""+";expires\x3d"+exdate.toGMTString()+";path\x3d/"+digitalData.page.pageInfo.siteCode2+"/;"}function getLoginStateCommunity(){var s=getCookieCommunity("loginUserinfo");if(s&&s!="")$(".forum-login,.app-login-icon").addClass("singin");else $(".forum-login,.app-login-icon").removeClass("singin")}
function getCookieUri(){var pathname=window.location.pathname;pathname=pathname.substring(1,pathname.length);pathname=pathname.substring(pathname.indexOf("/")+1,pathname.length);if(pathname=="")pathname=" ";return pathname}function popWindowInHomepageCommunity(){var s=getCookieCommunity("popcommunity");if(s&&s!="")return;else{setTimeout(function(){$(".forum-home-mask").show()},500);setCookieCommunity("popcommunity","1",720)}}
function goAccountCenter(){var nowUrl=window.location.href;var headUrl=nowUrl.substring(0,nowUrl.lastIndexOf("user-center"));var url="https://"+clientUrl+"/AMW/portal/userCenter/index.html?loginChannel\x3d40005000\x26reqClientType\x3d3040\x26lang\x3d"+sysConfig.casLangCode+"\x26service\x3d"+headUrl+"/login/";window.open(url)}
function CommunityLoginFailTipDialog(text,callback){var content="\x3cdiv class\x3d'community-dialog'\x3e"+" \x3cdiv class\x3d's-info-dialog'\x3e"+" \x3cdiv class\x3d's-info-title'\x3e"+" \x3ch3\x3e\x3cspan class\x3d'"+"fail-icon"+"'\x3e\x3c/span\x3e"+text+"\x3c/h3\x3e"+" \x3c/div\x3e"+" \x3c/div\x3e"+"\x3c/div\x3e";$("body").append(content);setTimeout(function(){$(".community-dialog .s-info-dialog").toggleClass("s-show");setTimeout(function(){$(".community-dialog .s-info-dialog").css("opacity",
0);setTimeout(function(){$("body \x3e .community-dialog").remove();callback&&callback()},1600)},1600)},0)}
$(function(){if(typeof communityLogin=="undefined")return;getLoginStateCommunity();if(digitalData.page.category.pageType=="homepage"&&$("#forum-showPop").val()=="1")popWindowInHomepageCommunity();$(".forum-login .signInBtn, .app-nav .forum-login-app .signInBtn").click(function(){forumLogin()});$(".forum-login .registeredBtn").click(function(){var signupuri="https://"+clientUrl+"/CAS/portal/userRegister/regbyphone.html?reqClientType\x3d"+reqClientType+"\x26loginChannel\x3d"+loginChannel+"\x26countryCode\x3d"+
sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26loginUrl\x3dhttps%3A%2F%2F"+clientUrl+"%2FCAS%2Fportal%2Flogin.html\x26service\x3dhttps%3A%2F%2F"+clientLoginUrl+"%2Foauth2%2Fv2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D"+clientID+"%26redirect_uri%3Dhttps%253A%252F%252F"+window.location.host+"%252F"+digitalData.page.pageInfo.siteCode2+"%252Fcommunity%252Flogin%252F%26scope%3Dhttps%253A%252F%252Fwww.huawei.com%252Fauth%252Faccount%252Fbase.profile%26display%3Dpage";forumLogin(signupuri)});
$(".forum-login .logout-btn a").click(function(){ga("send","event","user_center","click_on_logout_tuff","header_navigation");forumLogout()});$(".forum-login-app .registeredBtn").click(function(){forumMobileLogin()});$(".forum-login-app .app-logout-btn a").click(function(){forumMobileLogout()});$(".forum-login .show-logout .user-info").parent().click(function(){goAccountCenter()});$(".forum-home-mask .forum-home-close").click(function(){$(".forum-home-mask").hide()});$(".forum-home-mask .sign-button a").click(function(){if($(window).width()<
1024)forumMobileLogin();else{var signupuri="https://"+clientUrl+"/CAS/portal/userRegister/regbyphone.html?reqClientType\x3d"+reqClientType+"\x26loginChannel\x3d"+loginChannel+"\x26countryCode\x3d"+sysConfig.countryCode+"\x26lang\x3d"+sysConfig.casLangCode+"\x26loginUrl\x3dhttps%3A%2F%2F"+clientUrl+"%2FCAS%2Fportal%2Flogin.html\x26service\x3dhttps%3A%2F%2F"+clientLoginUrl+"%2Foauth2%2Fv2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D"+clientID+"%26redirect_uri%3Dhttps%253A%252F%252F"+window.location.host+
"%252F"+digitalData.page.pageInfo.siteCode2+"%252Fcommunity%252Flogin%252F%26scope%3Dhttps%253A%252F%252Fwww.huawei.com%252Fauth%252Faccount%252Fbase.profile%26display%3Dpage";forumLogin(signupuri)}});$(".forum-home-mask .sign-text a").click(function(){forumLogin()})});
$(function(){var PRIVACY_LOCAL_KEY="privacyAgreement";var SGW_APP_ID="EDCF82D77A5AB59706CD5F2163F67427";var privacyTitle=filterXSS($("#privacy-popup-title").val());var privacyIds=function(){var resultList=[];var ids=$("#privacy-popup-ids").val()||"";if(ids)resultList=ids.split(",");return resultList}();var privacyContent=filterXSS($("#privacy-popup-content").val());var privacyAgree=filterXSS($("#privacy-popup-agree").val());var privacyCheckNote=filterXSS($("#privacy-popup-checkNote").val());var privacyRemark=
filterXSS($("#privacy-popup-remark").val());var privacyAgreeText=filterXSS($("#privacy-popup-agreeText").val())||"Agree";var privacyRejectText=filterXSS($("#privacy-popup-rejectText").val())||"Disagree";var I18N_CLOSE=filterXSS($("#privacy-close-i18n").val()||"Close");var I18N_PRIVACY_ERROR=filterXSS($("#privacy-errortip-i18n").val());var privacyButtonLineStyle=window.privacyButtonLineStyle||false;var signLoading=false;var logoutCB;var isAppWebview=function(){return window.integrationJsInterface||
window.integrationJsInterfaceWebview||window.hicareJsInterface||window.kocJsInterface||window.fansJSInterface};function showPrivacyPopupByLogin(login,logoutCallback){login=login===undefined?true:login;logoutCB=logoutCallback;if(!login){clearLocalData();return}if(!privacyPopupSwitch)return;var localPrivacyData=getLocalAgreementData();if(localPrivacyData)return;if(privacyIds.length===0)return;getResignAgreementNeed().then(function(needResign){if(needResign)showPrivacyPolicyDialog();else setLocalAgreementData(true)})}
window.showPrivacyPopupByLogin=showPrivacyPopupByLogin;function getLocalAgreementData(){return localStorage.getItem(PRIVACY_LOCAL_KEY)===siteCode}function setLocalAgreementData(agree){if(!agree)return;localStorage.setItem(PRIVACY_LOCAL_KEY,siteCode)}function clearLocalData(){localStorage.removeItem(PRIVACY_LOCAL_KEY)}var fetchErrorTimes=0;function getResignAgreementNeed(){var def=$.Deferred();var agrInfo=[];var country=getCSGSiteCode();privacyIds.map(function(id){agrInfo.push({agrType:id,country:country})});
var headers={"SGW-APP-ID":SGW_APP_ID};$.ajax({url:mktConfig.sgwApi+"/myhuawei/meservice/tmsAgreementRecord/2",type:"post",data:JSON.stringify({agrInfo:agrInfo}),dataType:"json",traditional:true,xhrFields:{withCredentials:true},contentType:"application/json",headers:headers,crossDomain:true,success:function(response){if(response.code==="200"){var needResign=getNeedResign(response.data.signInfo);fetchErrorTimes=0;def.resolve(needResign)}else{if(String(response.code)==="401"){clearLocalData();logoutCB&&
logoutCB();return}retryFetchRecord();def.reject(false)}},error:function(xhr){retryFetchRecord();def.reject(xhr)}});return def.promise()}function retryFetchRecord(){fetchErrorTimes++;if(fetchErrorTimes<3)showPrivacyPopupByLogin(true,logoutCB);else showFetchError()}function showFetchError(){var html=getFetchErrorHtml();$("body").append(html);$(".privacy-error-close").on("click",function(){logoutCB&&logoutCB();removePriDialog()})}function getFetchErrorHtml(){return'\x3cdiv class\x3d"privacy-dialog"\x3e\n \x3cdiv class\x3d"privacy-content-cover privacy-error-cover"\x3e\n \x3cdiv class\x3d"privacy-content privacy-error-content"\x3e\n \x3csvg width\x3d"48px" height\x3d"48px" viewBox\x3d"0 0 48 48" version\x3d"1.1" xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink"\x3e\n \x3ctitle\x3e7677E44F-5FDF-4A51-B253-4EF3F152852F_0@3x\x3c/title\x3e\n \x3cg id\x3d"\u9690\u79c1\u58f0\u660e\u7528\u6237\u534f\u8bae\u4ea4\u4e92\u4f18\u5316" stroke\x3d"none" stroke-width\x3d"1" fill\x3d"none" fill-rule\x3d"evenodd"\x3e\n \x3cg id\x3d"PC_\u83b7\u53d6\u5931\u8d25" transform\x3d"translate(-936.000000, -387.000000)"\x3e\n \x3cg id\x3d"7677E44F-5FDF-4A51-B253-4EF3F152852F_0" transform\x3d"translate(936.000000, 387.000000)"\x3e\n \x3ccircle id\x3d"Oval" fill\x3d"#EFEFEF" cx\x3d"24" cy\x3d"24" r\x3d"24"\x3e\x3c/circle\x3e\n \x3cpolygon id\x3d"Fill-1" fill\x3d"#000000" points\x3d"22 27 26 27 26 14 22 14"\x3e\x3c/polygon\x3e\n \x3cpolygon id\x3d"Fill-2" fill\x3d"#000000" points\x3d"22 34 26 34 26 30 22 30"\x3e\x3c/polygon\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/svg\x3e\n \x3cp class\x3d"privacy-error-text"\x3e'+
I18N_PRIVACY_ERROR+'\x3c/p\x3e\n \x3cbutton class\x3d"privacy-error-close"\x3e'+I18N_CLOSE+"\x3c/button\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n "}function getNeedResign(signInfo){if(!signInfo||signInfo.length===0)return true;var needSignList=signInfo.filter(function(sign){return sign.needSign});return needSignList&&needSignList.length>0}function getCSGSiteCode(){var siteCodeMap={"uk":"gb","ae-en":"ae","eg-en":"eg","sa-en":"sa"};var specialSiteCode=siteCodeMap[siteCode]||
siteCode;return specialSiteCode.toUpperCase()}function showPrivacyPolicyDialog(){if($(".login-user-privacy-dialog").length===0&&!isAppWebview()){var dialogHtml=getPrivacyDialog();$("html").addClass("overflow-hidden");$("body").append(dialogHtml);bindPrivacyDialogEvent()}}function getPrivacyDialog(){return'\x3cdiv class\x3d"privacy-dialog login-user-privacy-dialog" id\x3d"privacy-dialog"\x3e\n \x3cdiv class\x3d"privacy-content-cover"\x3e\n \x3cdiv class\x3d"privacy-content"\x3e\n \x3cdiv class\x3d"privacy-title"\x3e'+
privacyTitle+'\x3c/div\x3e\n \x3cdiv class\x3d"privacy-content-text"\x3e\n '+privacyContent+'\n \x3c/div\x3e\n \x3cdiv class\x3d"privacy-line"\x3e\x3c/div\x3e\n \x3cdiv class\x3d"privacy-checknote"\x3e\n '+getPrivacyCheckbox()+'\n \x3cdiv class\x3d"privacy-checknote-text"\x3e\n \x3cp\x3e'+privacyCheckNote+'\x3c/p\x3e\n \x3cdiv class\x3d"privacy-remark"\x3e'+privacyRemark+'\x3c/div\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"privacy-buttons"\x3e\n \x3cbutton class\x3d"privacy-discard"\x3e'+
privacyRejectText+'\x3c/button\x3e\n \x3cbutton class\x3d"privacy-accept '+(privacyAgree?"":"usable")+" "+(privacyButtonLineStyle?"privacy-accept-line":"")+' "\x3e'+privacyAgreeText+"\x3c/button\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n \x3cdiv\x3e"}function getPrivacyCheckbox(){if(!privacyAgree)return"";return"\x3cinput type\x3d\"checkbox\" id\x3d\"dialog-privacy-checkbox\" class\x3d\"privacy-checkbox\" /\x3e\n \x3clabel for\x3d\"dialog-privacy-checkbox\" class\x3d\"privacy-checkbox-label\"\x3e\n \x3csvg class\x3d\"svg-nochecked\" xmlns\x3d'http://www.w3.org/2000/svg' xmlns:xlink\x3d'http://www.w3.org/1999/xlink' width\x3d'20' height\x3d'20' viewBox\x3d'0 0 20 20'\x3e\n \x3cdefs\x3e\n \x3cstyle\x3e.a,.b{fill:none;}.b{fill-rule:evenodd;}.c{fill:#f5f5f5;}.d{clip-path:url(public-v4/css/#a);}\x3c/style\x3e\n \x3cclipPath id\x3d'a'\x3e\n \x3crect class\x3d'a' width\x3d'20' height\x3d'20' transform\x3d'translate(0 -20)' /\x3e\n \x3c/clipPath\x3e\n \x3c/defs\x3e\n \x3cg transform\x3d'translate(-182 -2811)'\x3e\n \x3cpath class\x3d'b' d\x3d'M4-26H16a4,4,0,0,1,4,4v12a4,4,0,0,1-4,4H4a4,4,0,0,1-4-4V-22A4,4,0,0,1,4-26Z' transform\x3d'translate(182 2837)' /\x3e\n \x3cpath class\x3d'b' d\x3d'M4-26H16a4,4,0,0,1,4,4v12a4,4,0,0,1-4,4H4a4,4,0,0,1-4-4V-22A4,4,0,0,1,4-26Z' transform\x3d'translate(182 2837)' /\x3e\n \x3crect class\x3d'c' width\x3d'20' height\x3d'20' rx\x3d'4' transform\x3d'translate(182 2811)' /\x3e\n \x3cg class\x3d'd' transform\x3d'translate(182 2831)'\x3e\n \x3cimage width\x3d'20' height\x3d'20' transform\x3d'translate(0 -20)' xlink:href\x3d'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAANdJREFUOBHt1EFPg0AQhuFStei98eL//2neemyiRhG/BzINp8qmHDvJx8Cy887swk63m+0p7hj10T4aozXWZdJv9BWdom8DYG8eop9oiFqAD5n/GOG8A75GqvqMQGVsAYoFexaLLMNHBKhCsBagoqyKvQCqaLlcL1qA5jOMXrnoy2WuhSXsklgMxlBf1EApt01WcZMH3NTuwNu3876H2+yhP9wBL7VSK44ffRRnmTfAys9P1681l59YWpeWpZeplHm5ViCkax2ic2UALmgd9gz9a8vE+unwB39rNy2nbmwYAAAAAElFTkSuQmCC' /\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/svg\x3e\n \x3csvg class \x3d\"svg-checked\" xmlns\x3d'http://www.w3.org/2000/svg' xmlns:xlink\x3d'http://www.w3.org/1999/xlink' width\x3d'20' height\x3d'20' viewBox\x3d'0 0 20 20'\x3e\n \x3cdefs\x3e\n \x3cstyle\x3e.a,.b,.c{fill:none;}.b{clip-rule:evenodd;}.c{fill-rule:evenodd;}.d{fill:#f5f5f5;}.e{clip-path:url(#a);}.f{clip-path:url(#b);}.g{clip-path:url(#c);}.h{isolation:isolate;}.i{clip-path:url(#d);}.j{clip-path:url(#e);}.k{clip-path:url(#f);}\x3c/style\x3e\n \x3cclipPath id\x3d'a'\x3e\n \x3crect class\x3d'a' width\x3d'20' height\x3d'20' transform\x3d'translate(0 -20)' /\x3e\n \x3c/clipPath\x3e\n \x3cclipPath id\x3d'b'\x3e\n \x3cpath class\x3d'a' d\x3d'M7-6.914,4.707-9.207a1,1,0,0,0-1.414,0,1,1,0,0,0,0,1.414l3,3a1,1,0,0,0,1.414,0l5-5a1,1,0,0,0,0-1.414,1,1,0,0,0-1.414,0Z' /\x3e\n \x3c/clipPath\x3e\n \x3cclipPath id\x3d'c'\x3e\n \x3cpath class\x3d'a' d\x3d'M0,0H16V-16H0Z' /\x3e\n \x3c/clipPath\x3e\n \x3cclipPath id\x3d'd'\x3e\n \x3crect class\x3d'a' width\x3d'20' height\x3d'18' transform\x3d'translate(-2 -17)' /\x3e\n \x3c/clipPath\x3e\n \x3cclipPath id\x3d'e'\x3e\n \x3cpath class\x3d'a' d\x3d'M3-4H13v-8H3Z' /\x3e\n \x3c/clipPath\x3e\n \x3cclipPath id\x3d'f'\x3e\n \x3cpath class\x3d'b' d\x3d'M0-16H16V0H0Z' /\x3e\n \x3c/clipPath\x3e\n \x3c/defs\x3e\n \x3cg transform\x3d'translate(-540 -2811)'\x3e\n \x3cpath class\x3d'c' d\x3d'M4-26H16a4,4,0,0,1,4,4v12a4,4,0,0,1-4,4H4a4,4,0,0,1-4-4V-22A4,4,0,0,1,4-26Z' transform\x3d'translate(540 2837)' /\x3e\n \x3cpath class\x3d'c' d\x3d'M4-26H16a4,4,0,0,1,4,4v12a4,4,0,0,1-4,4H4a4,4,0,0,1-4-4V-22A4,4,0,0,1,4-26Z' transform\x3d'translate(540 2837)' /\x3e\n \x3crect class\x3d'd' width\x3d'20' height\x3d'20' rx\x3d'4' transform\x3d'translate(540 2811)' /\x3e\n \x3cg class\x3d'e' transform\x3d'translate(540 2831)'\x3e\n \x3cimage width\x3d'20' height\x3d'20' transform\x3d'translate(0 -20)' xlink:href\x3d'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAANdJREFUOBHt1EFPg0AQhuFStei98eL//2neemyiRhG/BzINp8qmHDvJx8Cy887swk63m+0p7hj10T4aozXWZdJv9BWdom8DYG8eop9oiFqAD5n/GOG8A75GqvqMQGVsAYoFexaLLMNHBKhCsBagoqyKvQCqaLlcL1qA5jOMXrnoy2WuhSXsklgMxlBf1EApt01WcZMH3NTuwNu3876H2+yhP9wBL7VSK44ffRRnmTfAys9P1681l59YWpeWpZeplHm5ViCkax2ic2UALmgd9gz9a8vE+unwB39rNy2nbmwYAAAAAElFTkSuQmCC' /\x3e\n \x3c/g\x3e\n \x3cg transform\x3d'translate(542 2829.5)'\x3e\n \x3cg class\x3d'f'\x3e\n \x3cg class\x3d'g'\x3e\n \x3cg class\x3d'h'\x3e\n \x3cg class\x3d'i'\x3e\n \x3cg class\x3d'j'\x3e\n \x3cpath d\x3d'M-2-16.5H18V.5H-2Z' /\x3e\n \x3c/g\x3e\n \x3cg class\x3d'k'\x3e\n \x3cg class\x3d'j'\x3e\n \x3cpath d\x3d'M-5-21H21V5H-5Z' /\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/g\x3e\n \x3c/svg\x3e\n \x3c/label\x3e"}
function bindPrivacyDialogEvent(){$("#dialog-privacy-checkbox").on("change",function(){var checked=$(this).prop("checked");if(checked)$(".privacy-accept").addClass("usable");else $(".privacy-accept").removeClass("usable")});$(".privacy-dialog .privacy-discard").on("click",function(){var disAgreeCallBack=function(){if(logoutCB)logoutCB()};signTmsAgree(false).then(disAgreeCallBack,disAgreeCallBack)});$(".privacy-dialog .privacy-accept").on("click",function(){if(privacyAgree){var checked=$("#dialog-privacy-checkbox").prop("checked");
if(!checked)return}signTmsAgree(true)})}function signTmsAgree(agree){agree=agree===undefined?true:agree;if(signLoading)return;signLoading=true;var def=$.Deferred();var signInfo=[];var country=getCSGSiteCode();privacyIds.map(function(id){signInfo.push({agrType:id,country:country,isAgree:agree,language:$("#privacy-language-code").val()||"cn"})});var headers={"SGW-APP-ID":SGW_APP_ID};$.ajax({url:mktConfig.sgwApi+"/myhuawei/meservice/tmsAgree/2",type:"post",data:JSON.stringify({signInfo:signInfo}),contentType:"application/json",
xhrFields:{withCredentials:true},headers:headers,success:function(response){if(response.code==="200"){setLocalAgreementData(agree);def.resolve(true)}else def.resolve(false)},error:function(xhr){def.reject(xhr)},complete:function(){signLoading=false;removePriDialog()}});return def.promise()}function removePriDialog(){$(".privacy-dialog").remove();$("html").removeClass("overflow-hidden")}});
if(typeof allowHA!="undefined"&&allowHA){(function(){var HaSdkVersion="2.1.5.301",userAccount,screenWidth=screen.width,screenHeight=screen.height,pattern=1,isInit=false,pageViewId="",expireTime=500,intervalTime=30*60*1E3,url=location.href,configCookieNamePrefix="HW_",url_path="",baseinfotypeSwitch1=false,baseinfotypeSwitch2=false,type1="baseinfotype",type2="customEvent",type3="elementEvent",type4="clickEvent",waitTime=0,CXX="",idsite="",waitTimeFlag=true,isNewVf=false,waitTimeFlagTime=0,referrer=
document.referrer,cvar="",title="",documentTitle="",uid="",idts="",idvc=1,idn="",refts="",viewts="",urlHashTag=false,properties={},serverUrl="",accessTime=(new Date).getTime(),saveAccessTime=-1,eventName="",eventLabel="",elementInfo={},customData={},UA={type:function(){var u=navigator.userAgent;if(u.match(/AppleWebKit.*Mobile.*/))if(u.indexOf(" wv")!==-1)return 2;else return 1;else return 0}()};_hasdk=function(){function sendData(eventNameP,eventLabelP,customDataP,cvarP){eventNameP?eventName=eventNameP:
"";eventLabelP?eventLabel=eventLabelP:"";customDataP?customData=customDataP:"";cvarP?elementInfo.cvar=cvarP:"";execReport(type2);return this}function sendClickData(eventNameP,eventLabelP,customDataP,cvarP){eventNameP?eventName=eventNameP:"";eventLabelP?eventLabel=eventLabelP:"";customDataP?customData=customDataP:"";cvarP?elementInfo.cvar=cvarP:"";execReport(type4);return this}function setOnReportUrl(serverUrlP){serverUrlP?serverUrl=serverUrlP:"";return this}function setPageData(cvarP){cvarP?cvar=
cvarP:"";return this}function setTitle(titleP){titleP?title=titleP:"";return this}function setUserAccount(userAccountP){userAccountP?userAccount=userAccountP:"";return this}function setUid(uidP){uidP?uid=uidP:"";return this}function setCXX(CXXP){CXXP?CXX=CXXP:"";return this}function setBaseinfotypeSwitch(flag){baseinfotypeSwitch1=flag;return this}function setWindowCloseSwitch(flag){baseinfotypeSwitch2=flag;return this}function setIdsite(idsiteValue){idsiteValue?idsite=idsiteValue:"";return this}function setSessionTimeoutDuration(interval){interval?
intervalTime=interval:"";return this}return{push:apply,bindclick:bindclick,sendData:sendData,sendClickData:sendClickData,setOnReportUrl:setOnReportUrl,setTitle:setTitle,setUserAccount:setUserAccount,setUid:setUid,setCXX:setCXX,setBaseinfotypeSwitch:setBaseinfotypeSwitch,setWindowCloseSwitch:setWindowCloseSwitch,setSessionTimeoutDuration:setSessionTimeoutDuration,setIdsite:setIdsite,setPageData:setPageData}}();(function bindReady(){domHasAlready();if(window.addEventListener)document.addEventListener("DOMContentLoaded",
reportPageEntryEvent,false);else if(window.attachEvent)doScroll()})();function doScroll(){try{document.documentElement.doScroll("left")}catch(error$5){return setTimeout(doScroll,20)}baseinfotypeSwitch1?execReport("baseinfotype"):""}function apply(){var i,f,parameterArray;for(i=0;i0)str+="\x26";str=str+key+"\x3d"+value}return str}function execReport(type){if(!isInit)initCookie();if(serverUrl===""){console.error("serverUrl is empty");return}if(idsite===""){console.error("idsite is empty");return}var option=[];properties={url:deletToken(window.location.href),title:title,at:accessTime,rf:deletToken(referrer)};if(type===type1){properties.res=screenWidth+" X "+screenHeight;
if(saveAccessTime!==-1){var time=(new Date).getTime();properties.cwt=time;properties.dt=waitTime}}if(type===type2||type===type4){properties.en=eventName;properties.el=eventLabel;properties.cd=customData}if(type===type3){properties.ei=elementInfo.elementId===document?"#document":elementInfo.elementId;properties.ec=elementInfo.cls;properties.ps=elementInfo.position;properties.data=elementInfo.data===undefined?"":elementInfo.data;properties.cd=customData}option.push(["type",type]);option.push(["vf",
userAccount]);option.push(["rt",(new Date).getTime()]);if(pattern===0){option.push(["pt",encodeURIComponent(JSON.stringify(properties))]);var postStr=parseParamToString(option);onReport(postStr)}else{option.push(["pt",properties]);handleSessionId();var data={type:option[0][1],vf:option[1][1],rt:option[2][1],ut:UA.type,cxx:CXX,idsite:idsite,suid:uid,cvar:elementInfo.cvar?elementInfo.cvar:cvar,idts:idts,idvc:idvc,idn:idn,refts:refts,viewts:viewts,hsv:HaSdkVersion,data:option[3][1]};var SupportOld=getParams(type)+
"\x26idsite\x3d"+encodeURIComponent(idsite)+"\x26rec\x3d1"+"\x26r\x3d"+"886244"+"\x26h\x3d"+(new Date).getHours()+"\x26m\x3d"+(new Date).getMinutes()+"\x26s\x3d"+(new Date).getSeconds()+"\x26url\x3d"+encodeURIComponent(url)+"\x26_id\x3d"+encodeURIComponent(userAccount)+"\x26_idts\x3d"+idts+"\x26_idvc\x3d"+idvc+"\x26_idn\x3d"+idn+"\x26urlref\x3d"+referrer+"\x26_refts\x3d"+refts+"\x26_viewts\x3d"+viewts+"\x26scd\x3d"+"24"+"\x26vpr\x3d"+screenWidth+" X "+screenHeight+"\x26cvar\x3d"+encodeURIComponent(elementInfo.cvar?
elementInfo.cvar:cvar)+"\x26pdf\x3d"+"1"+"\x26qt\x3d"+"0"+"\x26data\x3d"+encodeURIComponent(JSON.stringify(data));onReport(SupportOld)}}function getParams(type){var result="action_name\x3d"+encodeURIComponent(title);if(type===type3||type===type4)result="link\x3d"+encodeURIComponent(title);return result}function onReport(postStr){var image=new Image(1,1);serverUrl?image.src=serverUrl+"?"+postStr:image.src="";restoreObj()}function restoreObj(){properties={};elementInfo={};customData={}}function getCookieValue(name){var cookiePattern=
new RegExp("(^|;)[ ]*"+name+"\x3d([^;]*)"),cookieMatch=cookiePattern.exec(document.cookie);return cookieMatch?decodeURIComponent(cookieMatch[2]):0}function addCookie(cookieName,value,msToExpire,path,domain,secure){var expiryDate;if(msToExpire){expiryDate=new Date;expiryDate.setTime(expiryDate.getTime()+msToExpire)}document.cookie=cookieName+"\x3d"+encodeURIComponent(value)+(msToExpire?";expires\x3d"+expiryDate.toGMTString():"")+";path\x3d"+(path||"/")+(domain?";domain\x3d"+domain:"")+(secure?";secure":
"")}function getUuid(){var s=[];var hexDigits="0123456789abcdef";for(var i=0;i<36;i++)s[i]=hexDigits.substr(Math.floor(Math.random()*16),1);s[14]="4";s[19]=hexDigits.substr(s[19]&3|8,1);s[8]=s[13]=s[18]=s[23]="";var uuid=s.join("");return uuid}function getCookieName(baseName){return(configCookieNamePrefix+baseName+"_"+idsite+"_"+url_path).replace(/\./g,"_")}function getNowFormatDate(date){var seperator1="",seperator2="",month=date.getMonth()+1,strDate=date.getDate(),hours=date.getHours(),minutes=
date.getMinutes(),seconds=date.getSeconds();if(month>=1&&month<=9)month="0"+month;if(strDate>=0&&strDate<=9)strDate="0"+strDate;if(hours>=0&&hours<=9)hours="0"+hours;if(minutes>=0&&minutes<=9)minutes="0"+minutes;if(seconds>=0&&seconds<=9)seconds="0"+seconds;var currentdate=date.getFullYear()+seperator1+month+seperator1+strDate+""+hours+seperator2+minutes+seperator2+seconds;return currentdate}function bindclick(elid,_type,data,cvarP){var dom=elid===document?document:document.getElementById(elid);if(dom)addEventListenerHa(dom,
data,elid,_type,cvarP);return this}function eventDealWidth(data,elid,el,e,cvarP){var h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var w=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;elementInfo.elementId=elid;elementInfo.cls=el.className;elementInfo.data=data;elementInfo.cvar=cvarP;elementInfo.position={res:e.screenX+"X"+e.screenY,vpr:e.clientX+"X"+e.clientY,doc:w+"X"+h};execReport(type3)}function addEventListenerHa(dom,
data,elid,type,cvarP){function eventToDo(e){eventDealWidth(data,elid,dom,e,cvarP)}attachEventListener(dom,type,eventToDo)}function attachEventListener(obj,e,fun){obj.attachEvent?obj.attachEvent("on"+e,fun):obj.addEventListener(e,fun,false)}function beforeUnloadHandler(){var now,nowTime=(new Date).getTime(),expireDateTime=nowTime+expireTime;stateChanged();addCookie(getCookieName("viewts"),nowTime,365*24*60*60*1E3,"/");baseinfotypeSwitch2?execReport("baseinfotype"):"";if(expireDateTime){var i=0;do{now=
new Date;i++;if(i>1E3)break}while(now.getTime()>>32-iShiftBits};var addUnsigned=function(lX,lY){var lX4,lY4,lX8,lY8,lResult;lX8=lX&2147483648;lY8=lY&2147483648;lX4=lX&1073741824;lY4=lY&1073741824;lResult=(lX&1073741823)+(lY&1073741823);if(lX4&lY4)return lResult^2147483648^lX8^lY8;if(lX4|lY4)if(lResult&1073741824)return lResult^3221225472^lX8^lY8;else return lResult^1073741824^lX8^lY8;else return lResult^lX8^lY8};var F=function(x,y,z){return x&y|~x&z};var G=
function(x,y,z){return x&z|y&~z};var H=function(x,y,z){return x^y^z};var I=function(x,y,z){return y^(x|~z)};var FF=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(F(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b)};var GG=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(G(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b)};var HH=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(H(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b)};var II=function(a,
b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(I(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b)};var convertToWordArray=function(string){var lWordCount;var lMessageLength=string.length;var lNumberOfWordsTempOne=lMessageLength+8;var lNumberOfWordsTempTwo=(lNumberOfWordsTempOne-lNumberOfWordsTempOne%64)/64;var lNumberOfWords=(lNumberOfWordsTempTwo+1)*16;var lWordArray=Array(lNumberOfWords-1);var lBytePosition=0;var lByteCount=0;while(lByteCount>>29;return lWordArray};var wordToHex=function(lValue){var WordToHexValue="",WordToHexValueTemp="",lByte,lCount;for(lCount=0;lCount<=3;lCount++){lByte=
lValue>>>lCount*8&255;WordToHexValueTemp="0"+lByte.toString(16);WordToHexValue=WordToHexValue+WordToHexValueTemp.substr(WordToHexValueTemp.length-2,2)}return WordToHexValue};var uTF8Encode=function(string){string=string.replace(/\x0d\x0a/g,"\n");var output="";for(var n=0;n127&&c<2048){output+=String.fromCharCode(c>>6|192);output+=String.fromCharCode(c&63|128)}else{output+=String.fromCharCode(c>>12|224);
output+=String.fromCharCode(c>>6&63|128);output+=String.fromCharCode(c&63|128)}}return output};$.extend({md5:function(string){var x=Array();var k,AA,BB,CC,DD,a,b,c,d;var S11=7,S12=12,S13=17,S14=22;var S21=5,S22=9,S23=14,S24=20;var S31=4,S32=11,S33=16,S34=23;var S41=6,S42=10,S43=15,S44=21;string=uTF8Encode(string);x=convertToWordArray(string);a=1732584193;b=4023233417;c=2562383102;d=271733878;for(k=0;k1)return;var params={query:q,searchFrom:searchFrom,query_from:searchFrom,scope:searchModule,searchParam:data,sid:sid,app_id:"www-website",type:"search",action:"customSearch",language:getSiteLanguage(),site:dmpa_site_id,
module:searchModule,userId:dmpa_sessionid,site_id:dmpa_site_id,sitecode:getDmpaSite(),source:"web",languagecode:getSiteLanguage(),pageSize:data.pageSize,pageNo:data.pageNo,client:getDmpaClient()};if(searchModule=="global")if(data.docCategory=="consumer_press")params.query_doctype="press";else params.query_doctype=data.docCategory!==undefined?"product":"support";if(typeof dmpa==="function"){dmpa("setAutoSendPV",false);dmpa("set",{siteId:"consumer-cn","user_id":""});dmpa("setAutoLinkTracking",false)}trackDmpaSearch(params);
trackCcpcDmpaSearchResult(sid,params,result)}function trackDmpaSearch(params){if(dmpa_site_code==dmpa_us_site_code)return;var trackParams=JSON.stringify(params);try{trackParams=decodeURIComponent(trackParams)}catch(e$7){}try{dmpa("trackEvent","customSearch",{data:"'"+trackParams+"'"})}catch(e$8){if(typeof dmpa=="function")setTimeout(function(){dmpa("trackEvent","customSearch",{data:"'"+trackParams+"'"})},2E3)}}
function trackCcpcDmpaSearchResult(sid,params,r){if(dmpa_site_code==dmpa_us_site_code)return;try{var result={};if(!r.responseCode){if(r.hits||r.relatedProds||isArrayFn(r)){result.responseCode="200";result.responseData=r}}else result=r;if(result.responseCode=="200"&&!$.isEmptyObject(result.responseData)){var displayData={};if(result.responseData.hits){var hits=result.responseData.hits.hits;var knowList=[];for(var i=0;i2)break;arr.push({"shopCode":dataListArr[i]._id,"level3":"show"})}displayData.custom_data=arr}else{var dataListArr=result.responseData.custom_data;var arr=new Array;for(var i=
0;i2)break;arr.push({"card_id":dataListArr[i].card_id,"level3":dataListArr[i].level3?dataListArr[i].level3:"entrance"})}displayData.custom_data=arr}displayData.type="card";displayData.displayFrom=typeName;displayData.sid=sid;displayData.site_id=dmpa_site_id;displayData.sitecode=getDmpaSite();displayData.source="web";displayData.app_id="www-website";displayData.languagecode=getSiteLanguage();displayData.scope=scope;displayData.userId=dmpa_sessionid;var trackData=JSON.stringify(displayData);
try{trackData=decodeURIComponent(trackData);if(typeof dmpa==="function"){dmpa("setAutoSendPV",false);dmpa("set",{siteId:"consumer-cn","user_id":""});dmpa("setAutoLinkTracking",false);dmpa("trackEvent","cardInfoDisplay",{data:"'"+trackData+"'"})}}catch(e$17){}}
function getAnalyticsType(code){var result="";switch(code.toLocaleLowerCase()){case "express-repair":result="function";break;case "reservation":result="function";break;case "door-to-door-service":result="function";break;case "sparepart-price":result="function";break;case "inquiry":result="function";break;case "service-center":result="shop";break;case "warranty-query":result="function";break;case "vipservice":result="function";break;case "hicare":result="software";break;case "hisuite":result="software";
break;case "phone clone":result="software";break;case "app store":result="software";break;case "beta":result="software";break;case "hotline":result="hotline";break;case "email feedback":result="email";break;case "activities":result="activities";break;case "roaming":result="function";break;case "honor":result="honor";break;default:result="function"}return result}
function getGAData(str){if(!str)return null;var at=str.split(" - ");var s=queryVariableD(at[0]);for(var i=1;i$/;for(var key in vd)if(key==str)s=vd[key];if(reg.test(s))s="";return s};
function sendDmpaByAttr(eType,cat,act,lab,QueryResult,SearchPageNum,ProductName){var eType=eType?eType:"click";var lab=lab?getGAData(lab):"Error: Not Maintain Value";var value=act?getGAData(act):"Error: Not Maintain Value";var cat=cat?getGAData(cat):"Error: Not Maintain Value";cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;var QueryResult=QueryResult?QueryResult:null;var SearchPageNum=SearchPageNum?SearchPageNum:null;var ProductName=ProductName?ProductName:null;var eData={category:cat,label:lab,
value:value,location:window.location.href,uri:window.digitalData.page.pageInfo.uri,subModuleName:"Support"};if(QueryResult!=null)eData.QueryResult=QueryResult;if(SearchPageNum!=null)eData.SearchPageNum=SearchPageNum;if(ProductName!=null)eData.ProductName=ProductName;if(typeof dmpa5==="function")dmpa5("trackEvent",eType,eData)}
function sendDmpaByAttr2(eType,cat,act,lab,QueryResult,SearchPageNum,ProductName,FAQViewTime,FAQChannelEntrance,FAQParameter){var eType=eType?eType:"click";var lab=lab?getGAData(lab):"Error: Not Maintain Value";var value=act?getGAData(act):"Error: Not Maintain Value";var cat=cat?getGAData(cat):"Error: Not Maintain Value";cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;var QueryResult=QueryResult?QueryResult:null;var SearchPageNum=SearchPageNum?SearchPageNum:null;var ProductName=ProductName?
ProductName:null;var FAQViewTime=FAQViewTime?FAQViewTime:null;var FAQChannelEntrance=FAQChannelEntrance?FAQChannelEntrance:null;var FAQParameter=FAQParameter?FAQParameter:null;var eData={category:cat,label:lab,value:value,location:window.location.href,uri:window.digitalData.page.pageInfo.uri,subModuleName:"Support"};if(QueryResult!=null)eData.QueryResult=QueryResult;if(SearchPageNum!=null)eData.SearchPageNum=SearchPageNum;if(ProductName!=null)eData.ProductName=ProductName;if(FAQViewTime!=null)eData.FAQViewTime=
FAQViewTime;if(FAQChannelEntrance!=null)eData.FAQChannelEntrance=FAQChannelEntrance;if(FAQParameter!=null)eData.FAQParameter=FAQParameter;if(typeof dmpa5==="function")dmpa5("trackEvent",eType,eData)}
function sendDmpaByAttr3(eType,cat,act,lab,QueryResult,SearchPageNum,ProductName,FAQViewTime,FAQChannelEntrance,FAQParameter,ContentTitle){var eType=eType?eType:"click";var lab=lab?getGAData(lab):"Error: Not Maintain Value";var value=act?getGAData(act):"Error: Not Maintain Value";var cat=cat?getGAData(cat):"Error: Not Maintain Value";cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;var QueryResult=QueryResult?QueryResult:null;var SearchPageNum=SearchPageNum?SearchPageNum:null;var ProductName=
ProductName?ProductName:null;var FAQViewTime=FAQViewTime?FAQViewTime:null;var FAQChannelEntrance=FAQChannelEntrance?FAQChannelEntrance:null;var FAQParameter=FAQParameter?FAQParameter:null;var ContentTitle=ContentTitle?ContentTitle:null;var eData={category:cat,label:lab,value:value,location:window.location.href,uri:window.digitalData.page.pageInfo.uri,subModuleName:"Support"};if(QueryResult!=null)eData.QueryResult=QueryResult;if(SearchPageNum!=null)eData.SearchPageNum=SearchPageNum;if(ProductName!=
null)eData.ProductName=ProductName;if(FAQViewTime!=null)eData.FAQViewTime=FAQViewTime;if(FAQChannelEntrance!=null)eData.FAQChannelEntrance=FAQChannelEntrance;if(FAQParameter!=null)eData.FAQParameter=FAQParameter;if(ContentTitle!=null)eData.ContentTitle=ContentTitle;if(typeof dmpa5==="function")dmpa5("trackEvent",eType,eData)}
function sendDmpaByData(data){var eType=data.eType?data.eType:"click";var lab=data.label?getGAData(data.label):"Error: Not Maintain Value";var value=data.value?getGAData(data.value):"Error: Not Maintain Value";var cat=data.category?getGAData(data.category):"Error: Not Maintain Value";cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;var QueryResult=data.QueryResult?data.QueryResult:null;var SearchPageNum=data.SearchPageNum?data.SearchPageNum:null;var ProductName=data.ProductName?data.ProductName:
null;var eData={category:cat,label:lab,value:value,location:window.location.href,uri:window.digitalData.page.pageInfo.uri,subModuleName:"Support"};if(QueryResult!=null)eData.QueryResult=QueryResult;if(SearchPageNum!=null)eData.SearchPageNum=SearchPageNum;if(ProductName!=null)eData.ProductName=ProductName;if(typeof dmpa5==="function")dmpa5("trackEvent",eType,eData)}
function sendDmpaByCurrentTag(tag){var event=window.event;if(!event||!event.isTrusted||$(event.target).closest($(tag)).length<1)return;var eType=$(tag).attr("dmpa-etype")?$(tag).attr("dmpa-etype"):"click";var lab=$(tag).attr("lab")?getGAData($(tag).attr("lab")):"Error: Not Maintain Value";var value=$(tag).attr("act")?getGAData($(tag).attr("act")):"Error: Not Maintain Value";var cat=$(tag).attr("cat")?getGAData($(tag).attr("cat")):"Error: Not Maintain Value";cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;
var QueryResult=$(tag).attr("queryresult")?$(tag).attr("queryresult"):null;var SearchPageNum=$(tag).attr("searchpagenum")?$(tag).attr("searchpagenum"):null;var ProductName=$(tag).attr("productname")?$(tag).attr("productname"):null;var eData={category:cat,label:lab,value:value,location:window.location.href,uri:window.digitalData.page.pageInfo.uri,subModuleName:"Support"};if(QueryResult!=null)eData.QueryResult=QueryResult;if(SearchPageNum!=null)eData.SearchPageNum=SearchPageNum;if(ProductName!=null)eData.ProductName=
ProductName;if(typeof dmpa5==="function")dmpa5("trackEvent",eType,eData)}
function sendDmpaByClass(event){if(!event||!event.originalEvent||!event.originalEvent.isTrusted)return;var eType=$(this).attr("dmpa-etype")?$(this).attr("dmpa-etype"):"click";var lab=$(this).attr("lab")?getGAData($(this).attr("lab")):"Error: Not Maintain Value";var value=$(this).attr("act")?getGAData($(this).attr("act")):"Error: Not Maintain Value";var cat=$(this).attr("cat")?getGAData($(this).attr("cat")):"Error: Not Maintain Value";cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;var QueryResult=
$(this).attr("queryresult")?$(this).attr("queryresult"):null;var SearchPageNum=$(this).attr("searchpagenum")?$(this).attr("searchpagenum"):null;var ProductName=$(this).attr("productname")?$(this).attr("productname"):null;var eData={category:cat,label:lab,value:value,location:window.location.href,uri:window.digitalData.page.pageInfo.uri,subModuleName:"Support"};if(QueryResult!=null)eData.QueryResult=QueryResult;if(SearchPageNum!=null)eData.SearchPageNum=SearchPageNum;if(ProductName!=null)eData.ProductName=
ProductName;if(typeof dmpa5==="function")dmpa5("trackEvent",eType,eData)}$(document).on("click",".dmpa-click-dispach",sendDmpaByClass);
function gaAndAaByAttr3(cat,act,lab,QueryResult,SearchPageNum,ProductName,FAQViewTime,FAQChannelEntrance,FAQParameter,ContentTitle,ContentId,$gaElement){var lab=lab?getGAData(lab):"Error: Not Maintain Value";var act=act?getGAData(act):"Error: Not Maintain Value";var cat=cat?getGAData(cat):"Error: Not Maintain Value";var ga4Cat=cat;cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;var QueryResult=QueryResult?QueryResult:null;var SearchPageNum=SearchPageNum?SearchPageNum:null;var ProductName=
ProductName?ProductName:null;var FAQViewTime=FAQViewTime?FAQViewTime:null;var FAQChannelEntrance=FAQChannelEntrance?FAQChannelEntrance:null;var FAQParameter=FAQParameter?FAQParameter:null;var ContentTitle=ContentTitle?ContentTitle:null;var ContentId=ContentId?ContentId:null;if(typeof ga==="function")try{ga("newhuaiweisupport.send","event",cat,act,lab,{"dimension7":QueryResult,"dimension8":SearchPageNum,"dimension9":ProductName,"dimension10":FAQViewTime,"dimension11":FAQChannelEntrance,"dimension12":FAQParameter,
"dimension13":ContentTitle,"dimension16":ContentId});ga("send","event",cat,act,lab)}catch(e$18){}ga4SendByAttr(ga4Cat,act,lab,$gaElement)}
function gaAndAaByAttr2(cat,act,lab,QueryResult,SearchPageNum,ProductName,FAQViewTime,FAQChannelEntrance,FAQParameter,FAQApplicableProduct){var lab=lab?getGAData(lab):"Error: Not Maintain Value";var act=act?getGAData(act):"Error: Not Maintain Value";var cat=cat?getGAData(cat):"Error: Not Maintain Value";cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;var QueryResult=QueryResult?QueryResult:null;var SearchPageNum=SearchPageNum?SearchPageNum:null;var ProductName=ProductName?ProductName:null;
var FAQViewTime=FAQViewTime?FAQViewTime:null;var FAQChannelEntrance=FAQChannelEntrance?FAQChannelEntrance:null;var FAQParameter=FAQParameter?FAQParameter:null;if(typeof ga==="function")try{ga("newhuaiweisupport.send","event",cat,act,lab,{nonInteraction:true,"dimension7":QueryResult,"dimension8":SearchPageNum,"dimension9":ProductName,"dimension10":FAQViewTime,"dimension11":FAQChannelEntrance,"dimension12":FAQParameter,"dimension14":FAQApplicableProduct});ga("send","event",cat,act,lab)}catch(e$19){}}
function gaAndAaByAttr(cat,act,lab,QueryResult,SearchPageNum,ProductName,$gaElement,addtionalObj){var lab=lab?getGAData(lab):"Error: Not Maintain Value";var act=act?getGAData(act):"Error: Not Maintain Value";var cat=cat?getGAData(cat):"Error: Not Maintain Value";var ga4Cat=cat;cat=cat+"+"+sysConfig.countryCode+"+"+sysConfig.language;var QueryResult=QueryResult?QueryResult:null;var SearchPageNum=SearchPageNum?SearchPageNum:null;var ProductName=ProductName?ProductName:null;if(typeof ga==="function")try{ga("newhuaiweisupport.send",
"event",cat,act,lab,{"dimension7":QueryResult,"dimension8":SearchPageNum,"dimension9":ProductName});ga("send","event",cat,act,lab)}catch(e$20){}ga4SendByAttr(ga4Cat,act,lab,$gaElement,addtionalObj)}
function ga4SendByAttr(cat,act,lab,$gaElement,additionalObj){var obj={};obj.event="other_page_interactions";obj.support_entrance_level1=supportv2.gaEntrance||"";obj.module=supportv2.gaModule;var support_entrance_level2=supportv2.entranceLv2ForGa||"";var productCategory1=supportv2.productCategory1||"";var productCategory2=supportv2.productCategory2||"";var productCategory3=supportv2.productCategory3||"";var productCategory4=supportv2.productCategory4||"";if($gaElement){obj.event=$gaElement.data("gaevent")||
obj.event;obj.module=$gaElement.data("gamodule")||obj.module;obj.support_entrance_level1=$gaElement.data("entrancelevel")||obj.support_entrance_level1;support_entrance_level2=$gaElement.data("entranceLv2ForGa")||support_entrance_level2;productCategory1=$gaElement.data("productCategory1")||productCategory1;productCategory2=$gaElement.data("productCategory2")||productCategory2;productCategory3=$gaElement.data("productCategory3")||productCategory3;productCategory4=$gaElement.data("productCategory4")||
productCategory4}if(support_entrance_level2)obj.support_entrance_level2=support_entrance_level2;if(productCategory1)obj.product_category1=productCategory1;if(productCategory2)obj.product_category2=productCategory2;if(productCategory3)obj.product_category3=productCategory3;if(productCategory4)obj.product_category4=productCategory4;obj.country=sysConfig.countryCode;obj.language=sysConfig.language;obj.ua_category=cat;obj.ua_action=act;processGa4Lab(lab,obj);$.extend(obj,additionalObj);window.dataLayer.push(obj)}
function processGa4Lab(lab,dataLayerObj){dataLayerObj.ua_label=lab.substring(0,500);var length=lab.length;var size=Math.min(Math.ceil(length/500),6);for(var index=0;index=1024?"pc":iWinWidth<768?"mobile":"tablet"}
var supportPageCategory=window.digitalData?window.digitalData.page.category.pageType:"";
if(typeof supportPageCategory!="undefined"&&supportPageCategory=="support"){var cat="scroll";var value=(deviceType()=="pc"?"Desktop":deviceType())+" scroll";var gaHACat=value+"+"+sysConfig.countryCode+"+"+sysConfig.language;var lab=window.location.pathname;var ga4Labl=getGAData("\x3cpage title\x3e");var roll_25=0;var roll_50=0;var roll_75=0;var roll_100=0;var gaScrollPercent=0;var ga4AdditionalObj={event:"support_interaction",module:"scroll",support_entrance_level1:"common"};$(document).on("scroll",
function(){gaScrollPercent=getCookie("scrollPercentage")||0;if(gaScrollPercent>24&&gaScrollPercent<49&&roll_25==0){roll_25=1;var act="Content 25%";sendDmpaByAttr("scroll",cat,value,act);if(typeof ga==="function")try{ga("newhuaiweisupport.send","event",gaHACat,act,lab,{nonInteraction:true});ga("send","event",gaHACat,act,lab,{nonInteraction:true})}catch(e$25){}ga4SendByAttr(value,act,ga4Labl,undefined,ga4AdditionalObj);var haData={id:"content_scroll",title:"25%"};haDispach(haData)}if(gaScrollPercent>
49&&gaScrollPercent<74&&roll_50==0){roll_50=1;sendDmpaByAttr("scroll",cat,value,"Content 50%");var act="Content 50%";if(typeof ga==="function")try{ga("newhuaiweisupport.send","event",gaHACat,act,lab,{nonInteraction:true});ga("send","event",gaHACat,act,lab,{nonInteraction:true})}catch(e$26){}ga4SendByAttr(value,act,ga4Labl,undefined,ga4AdditionalObj);var haData={id:"content_scroll",title:"50%"};haDispach(haData)}if(gaScrollPercent>74&&gaScrollPercent<99&&roll_75==0){roll_75=1;sendDmpaByAttr("scroll",
cat,value,"Content 75%");var act="Content 75%";if(typeof ga==="function"){ga("newhuaiweisupport.send","event",gaHACat,act,lab,{nonInteraction:true});ga("send","event",gaHACat,act,lab,{nonInteraction:true})}ga4SendByAttr(value,act,ga4Labl,undefined,ga4AdditionalObj);var haData={id:"content_scroll",title:"75%"};haDispach(haData)}if(gaScrollPercent==100&&roll_100==0){roll_100=1;var act="Content 100%";sendDmpaByAttr("scroll",cat,value,act);if(typeof ga==="function")try{ga("newhuaiweisupport.send","event",
gaHACat,act,lab,{nonInteraction:true});ga("send","event",gaHACat,act,lab,{nonInteraction:true})}catch(e$27){}ga4SendByAttr(value,act,ga4Labl,undefined,ga4AdditionalObj);var haData={id:"content_scroll",title:"100%"};haDispach(haData)}})}
"undefined"==typeof jwplayer&&(jwplayer=function(a){if(jwplayer.api)return jwplayer.api.selectPlayer(a)},jwplayer.version="6.6.3896",jwplayer.vid=document.createElement("video"),jwplayer.audio=document.createElement("audio"),jwplayer.source=document.createElement("source"),function(q){function u(a){return function(){return r(a)}}function i(a){return function(){a("Error loading file")}}function o(b,c,f,d){return function(){try{var e=b.responseXML;if(e&&e.firstChild)return f(b)}catch(a){}(e=t.parseXML(b.responseText))&&
e.firstChild?(b=t.extend({},b,{responseXML:e}),f(b)):d&&d(b.responseText?"Invalid XML":c)}}var m=document,p=window,l=navigator,t=q.utils=function(){};t.exists=function(a){switch(typeof a){case "string":return 0k||k>w)}else w=void 0;if(w)return b;w=v.substring(0,v.indexOf("://")+3);var k=v.substring(w.length,v.indexOf("/",w.length+1)),d;0===b.indexOf("/")?d=b.split("/"):(d=v.split("?")[0],d=d.substring(w.length+k.length+1,d.lastIndexOf("/")),d=d.split("/").concat(b.split("/")));for(var n=[],h=0;hf&&0>d&&(!b||!isNaN(b))?g.CDN:g.RELATIVE}};t.getPluginName=function(a){return a.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")};t.getPluginVersion=function(a){return a.replace(/[^-]*-?([^\.]*).*$/,"$1")};t.isYouTube=function(a){return/^(http|\/\/).*(youtube\.com|youtu\.be)\/.+/.test(a)};t.youTubeID=function(c){try{return/v[=\/]([^?&]*)|youtu\.be\/([^?]*)|^([\w-]*)$/i.exec(c).slice(1).join("").replace("?",
"")}catch(d){return""}};t.isRtmp=function(c,d){return 0==c.indexOf("rtmp")||"rtmp"==d};t.foreach=function(b,h){var f,d;for(f in b)"function"==t.typeOf(b.hasOwnProperty)?b.hasOwnProperty(f)&&(d=b[f],h(f,d)):(d=b[f],h(f,d))};t.isHTTPS=function(){return 0==p.location.href.indexOf("https")};t.repo=function(){var b="/etc/designs/huawei-cbg-site/statics/";try{t.isHTTPS()&&(b=b.replace("http://","https://"))}catch(d){}return b};t.ajax=function(b,y,e){var v;0=n.length&&(n[1]=0);for(var w=b.strToLongs(e.encode(t).slice(0,16)),v=n.length,u=n[v-1],i=n[0],f,k=Math.floor(6+52/v),r=0;0>>2&3;for(var a=0;a>>5^i<<2)+(i>>>3^u<<4)^(r^i)+(w[a&3^f]^u),u=n[a]+=u}n=b.longsToStr(n);return c.encode(n)};b.decrypt=function(n,q){if(0==n.length)return"";for(var k=b.strToLongs(c.decode(n)),u=b.strToLongs(e.encode(q).slice(0,
16)),t=k.length,r=k[t-1],f=k[0],a,i=2654435769*Math.floor(6+52/t);0!=i;){a=i>>>2&3;for(var o=t-1;0<=o;o--)r=k[0>>5^f<<2)+(f>>>3^r<<4)^(i^f)+(u[o&3^a]^r),f=k[o]-=r;i-=2654435769}k=b.longsToStr(k);k=k.replace(/\0+$/,"");return e.decode(k)};b.strToLongs=function(d){for(var h=Array(Math.ceil(d.length/4)),f=0;f>>8&255,d[f]>>>16&255,d[f]>>>24&255);return h.join("")};var c={code:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(w,r){var n,v,u,t,i=[],h="",k,o,f=c.code;o=("undefined"==typeof r?0:r)?e.encode(w):w;k=o.length%3;if(0k++;)h+="\x3d",o+="\x00";for(k=0;k>18&63,v=t>>12&63,u=t>>6&63,t&=63,i[k/3]=f.charAt(n)+
f.charAt(v)+f.charAt(u)+f.charAt(t);i=i.join("");return i=i.slice(0,i.length-h.length)+h},decode:function(w,r){r="undefined"==typeof r?!1:r;var n,v,u,t,i,h=[],k,o=c.code;k=r?e.decode(w):w;for(var f=0;f>>16&255,v=u>>>8&255,u&=255,h[f/4]=String.fromCharCode(n,v,u),64==i&&(h[f/4]=String.fromCharCode(n,v)),64==t&&(h[f/4]=String.fromCharCode(n));t=h.join("");
return r?e.decode(t):t}},e={encode:function(d){d=d.replace(/[\u0080-\u07ff]/g,function(f){f=f.charCodeAt(0);return String.fromCharCode(192|f>>6,128|f&63)});return d=d.replace(/[\u0800-\uffff]/g,function(f){f=f.charCodeAt(0);return String.fromCharCode(224|f>>12,128|f>>6&63,128|f&63)})},decode:function(d){d=d.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(f){f=(f.charCodeAt(0)&15)<<12|(f.charCodeAt(1)&63)<<6|f.charCodeAt(2)&63;return String.fromCharCode(f)});return d=d.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,
function(f){f=(f.charCodeAt(0)&31)<<6|f.charCodeAt(1)&63;return String.fromCharCode(f)})}}}(jwplayer.utils),function(a){a.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_SETUP_ERROR:"jwplayerSetupError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",
JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_MEDIA_LEVELS:"jwplayerMediaLevels",
JWPLAYER_MEDIA_LEVEL_CHANGED:"jwplayerMediaLevelChanged",JWPLAYER_CAPTIONS_CHANGED:"jwplayerCaptionsChanged",JWPLAYER_CAPTIONS_LIST:"jwplayerCaptionsList",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_PLAYLIST_COMPLETE:"jwplayerPlaylistComplete",JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_CONTROLS:"jwplayerViewControls",
JWPLAYER_USER_ACTION:"jwplayerUserAction",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed",JWPLAYER_AD_TIME:"jwplayerAdTime",JWPLAYER_AD_ERROR:"jwplayerAdError",JWPLAYER_AD_CLICK:"jwplayerAdClicked",JWPLAYER_AD_COMPLETE:"jwplayerAdComplete",JWPLAYER_AD_IMPRESSION:"jwplayerAdImpression",JWPLAYER_AD_COMPANIONS:"jwplayerAdCompanions"}}(jwplayer),function(c){var b=jwplayer.utils;c.eventdispatcher=function(j,g){var a,i;this.resetEventListeners=function(){a=
{};i=[]};this.resetEventListeners();this.addEventListener=function(k,d,l){try{b.exists(a[k])||(a[k]=[]),"string"==b.typeOf(d)&&(d=(new Function("return "+d))()),a[k].push({listener:d,count:l})}catch(h){b.log("error",h)}return!1};this.removeEventListener=function(k,d){if(a[k]){try{for(var l=0;lparseFloat(g.version)))i=!0,d="Incompatible player version",o()});
0==h&&o()}}var v=b.loaderstatus.NEW,f=!1,i=!1,d,k=u,t=new c.eventdispatcher;b.extend(this,t);this.setupPlugins=function(h,y,p){var m={length:0,plugins:{}},l=0,q={},x=r.getPlugins();e(y.plugins,function(H,G){var F=b.getPluginName(H),E=x[F],C=E.getFlashPath(),n=E.getJS(),z=E.getURL();C&&(m.plugins[C]=b.extend({},G),m.plugins[C].pluginmode=E.getPluginmode(),m.length++);try{if(n&&y.plugins&&y.plugins[z]){var B=document.createElement("div");B.id=h.id+"_"+F;B.style.position="absolute";B.style.top=0;B.style.zIndex=
l+10;q[F]=E.getNewInstance(h,b.extend({},y.plugins[z]),B);l++;h.onReady(p(q[F],B,!0));h.onResize(p(q[F],B))}}catch(j){b.log("ERROR: Failed to load "+F+".")}});h.plugins=q;return m};this.load=function(){if(!(b.exists(u)&&"object"!=b.typeOf(u))){v=b.loaderstatus.LOADING;e(u,function(j){b.exists(j)&&(j=r.addPlugin(j),j.addEventListener(c.COMPLETE,w),j.addEventListener(c.ERROR,a))});var h=r.getPlugins();e(h,function(l,j){j.load()})}w()};var a=this.pluginFailed=function(){i||(i=!0,d="File not found",o())};
this.getStatus=function(){return v}}}(jwplayer),function(){jwplayer.parsers={localName:function(a){return a?a.localName?a.localName:a.baseName?a.baseName:"":""},textContent:function(a){return a?a.textContent?a.textContent:a.text?a.text:"":""},getChildNode:function(c,b){return c.childNodes[b]},numChildren:function(a){return a.childNodes?a.childNodes.length:0}}}(jwplayer),function(c){var b=c.parsers;(b.jwparser=function(){}).parseEntry=function(d,l){for(var i=[],m=[],g=c.utils.xmlAttribute,a=0;aA.playlist.length&&(0==A.playlist.length||!A.playlist[0].sources||
0==A.playlist[0].sources.length))F();else if(!a)if("string"==b.typeOf(A.playlist)){var t=new n.playlist.loader;t.addEventListener(c.JWPLAYER_PLAYLIST_LOADED,function(u){A.playlist=u.playlist;a=i;G()});t.addEventListener(c.JWPLAYER_ERROR,function(u){a=i;F(u)});a=l;t.load(A.playlist)}else if(d.getStatus()==b.loaderstatus.COMPLETE){for(t=0;t=d||0>=a?0:100*(a/d)+"%")}-1==f.width.toString().indexOf("%")?delete f.aspectratio:d?f.aspectratio=d:delete f.aspectratio;return f}).addConfig=function(a,f){b(f);return g.extend(a,f)}}(jwplayer),function(e){var b=e.utils,c=document;e.embed.download=function(B,y,A){function x(g,l){for(var h=c.querySelectorAll(g),
j=0;ja)return r.sendEvent(c.ERROR,{message:"Flash version must be 10.0 or greater"}),!1;var p,n,m=f.config.listbar,l=b.extend({},
v);if(t.id+"_wrapper"==t.parentNode.id)p=document.getElementById(t.id+"_wrapper");else{p=document.createElement("div");n=document.createElement("div");n.style.display="none";n.id=t.id+"_aspect";p.id=t.id+"_wrapper";p.style.position="relative";p.style.display="block";p.style.width=b.styleDimension(l.width);p.style.height=b.styleDimension(l.height);if(f.config.aspectratio){var j=parseFloat(f.config.aspectratio);n.style.display="block";n.style.marginTop=f.config.aspectratio;p.style.height="auto";p.style.display=
"inline-block";m&&("bottom"==m.position?n.style.paddingBottom=m.size+"px":"right"==m.position&&(n.style.marginBottom=-1*m.size*(j/100)+"px"))}t.parentNode.replaceChild(p,t);p.appendChild(t);p.appendChild(n)}p=u.setupPlugins(f,l,d);0=l.height?"transparent":"opaque";n="height width modes events primary base fallback volume".split(" ");
for(m=0;m=1024?"pc":iWinWidth<768?"mobile":"tablet"};
$.fn.initJwplayer=function(settings){var thisDom=$(this),defs={"path":"../","target":"self","autostart":false};var timer_video=null,thisLabel=thisDom.data("t-lab"),isAndroid=$.isAndroid();window.conv3VidoeControl=window.conv3VidoeControl||{};$.extend(defs,settings);return this.each(function(e){var eventAction=0;var isPlaying=false;var handleVideo=function(videoDom,behavior){switch(behavior){case "show":videoDom.find("video").show();videoDom.find(".jwpreview").css({"opacity":0,"visibility":"hidden"});
videoDom.find(".jwcontrolbar").show();break;case "hide":videoDom.find("video").hide();videoDom.find(".jwpreview").css({"opacity":1,"visibility":"visible"});videoDom.find(".jwcontrolbar").hide();break}};var viewtimes=$(this).data("t-viewtimes");var played=false;var video={id:$(this).data("video-id"),image:$(this).data("video-image"),link:$(this).data("video-link"),aspectratio:$(this).data("video-ratio"),file:$(this).attr("href"),width:"100%",label:$(this).data("t-label"),autostart:defs.autostart,flashplayer:"/etc/designs/huawei-cbg-site/statics/hw_jwflash.swf",
tracks:[{file:$(this).data("video-track"),label:"on",kind:"captions","default":true}],captions:{back:false,color:$(this).data("caption-color")||"ffffff",fontsize:15},events:{"onReady":function(){},"onPlay":function(e){$(".jwdisplay").removeClass("x-mask");$(".jwpreview").removeClass("x-opacity");$(".jwplayer .x-over").hide();clearTimeout(timer_video);if(!thisDom.data("video-start")){$.trackVideo("Video Milestone","start",video.label+","+queryVariable("\x3cURL\x3e"));thisDom.data("video-start",true)}else $.trackVideo("Video Play/Pause/Exit",
"play",video.label+","+queryVariable("\x3cURL\x3e"));isPlaying=true;clearTimeout(timer_player);isAndroid&&handleVideo(thisVideoDom,"show")},"onPause":function(){isAndroid&&handleVideo(thisVideoDom,"hide")},"onComplete":function(){$(".jwdisplay").addClass("x-mask");$(".jwpreview").addClass("x-opacity");$(".jwplayer .x-over").show();isPlaying=false;clearTimeout(timer_player);isAndroid&&handleVideo(thisVideoDom,"hide")}}};var thisVideoDom=null,timer_player=null;var pauseVideo=function(){jwplayer(video.id).pause(true);
isPlaying=false;clearTimeout(timer_player);timer_player=setTimeout(function(){video.events.onPause()},100)};conv3VidoeControl.pause=conv3VidoeControl.pause||[];conv3VidoeControl.pause.push(pauseVideo);if(isAndroid)$(window).on("scroll",function(){if(isPlaying)pauseVideo()});if($("html").hasClass("ie9")||$("html").hasClass("ie8")||$("html").hasClass("ie7"))video.primary="flash";else video.primary="html5";var width=1600,height=900;if(typeof video.aspectratio=="string"&&/^[0-9]{1,2}:[0-9]{1,2}$/.test(video.aspectratio)){var ratio=
video.aspectratio.split(":");height=width*parseInt(ratio[1])/parseInt(ratio[0])}if(defs.target=="self"){$(this).html('\x3cdiv id\x3d"'+video.id+'"\x3e\x3c/div\x3e');try{jwplayer(video.id).setup(video);if(viewtimes)jwplayer(video.id).onPlay(function(event){if(played)return;var video_page=window.digitalData.page.pageInfo.uri.split("/").reverse()[1].split(".")[0];addStatistics(video_page);played=true});jwplayer(video.id).onReady(function(event){thisVideoDom=$("#"+video.id)})}catch(e$29){}}else if(defs.target==
"fancybox"){var oFFScorll=function(ev){ev.stopPropagation();ev.preventDefault();return false};$("head").append('\x3clink href\x3d"/etc/designs/huawei-cbg-site/statics/jquery.fancybox-v2.1.5.css" rel\x3d"stylesheet" type\x3d"text/css" /\x3e');$.getScript("/etc/designs/huawei-cbg-site/statics/lib-bundle.js",function(){$.fancybox('\x3cdiv id\x3d"'+video.id+'" class\x3d"cbg-jwplayer"\x3e\x3c/div\x3e\x3cdiv class\x3d"cbg-video-mask"\x3e\x3c/div\x3e',{width:width,height:height,padding:0,margin:20,autoSize:false,
aspectRatio:true,scrolling:"no",beforeShow:function(){try{if(thisDom.data("iframe-url")){var iframe='\x3ciframe height\x3d"100%" width\x3d"100%" src\x3d"'+thisDom.data("iframe-url")+'?autoplay\x3d1" frameborder\x3d0 allowfullscreen\x3e\x3c/iframe\x3e';$(".fancybox-wrap #videoPlayer").remove();$(".fancybox-wrap .fancybox-inner").prepend(iframe)}else{jwplayer(video.id).setup(video);jwplayer(video.id).onFullscreen(function(event){event.fullscreen?$(".fancybox-close").hide():$(".fancybox-close").show();
!event.fullscreen&&$(".jwcontrolbar").css({"opacity":0,"display":"inline-block"})});jwplayer(video.id).onReady(function(event){$(".cbg-video-mask").fadeOut();thisVideoDom=$("#"+video.id)});$(".fancybox-overlay").on("touchmove",oFFScorll);$("#cbg-banner").flexslider("pause")}}catch(e$30){}if(window.innerWidth<1024){var winHeight=$(window).height(),videoHeight=$(".fancybox-inner").height(),_top=parseFloat((winHeight-videoHeight)/2);$(".fancybox-wrap").css("top",_top);_scrollTop=$(document).scrollTop();
$("html,body").css({"height":$(window).height(),"overflow":"hidden"}).scrollTop(_scrollTop);return _scrollTop}},afterClose:function(){$("[data-video-id]").removeClass("active");if(window.innerWidth<1024)$("html,body").removeAttr("style").scrollTop(_scrollTop)},beforeClose:function(){var videoName=thisDom.data("video-name")||"\x3cvideo name\x3e";var lab="\x3cproduct name\x3e - "+videoName+" - \x3cpage title\x3e";if(thisDom.data("iframe-url"));else{jwplayer(0).stop();jwplayer(video.id).stop();var playedPercentage=
Math.floor(jwplayer(video.id).getPosition()*100/jwplayer(video.id).getDuration())}window.dataLayer.push({"event":"video","videoStep":"close","videoName":videoName,"productMktName":pageProductInfo&&pageProductInfo.marketingName||"","productCategory":pageProductInfo&&pageProductInfo.category||"","clickName":"video "+videoName+"_close","clickType":"action"})}})})}})};var videotrack=new Array;
$.fn.initH5player=function(settings){var thisDom=$(this),defs={"path":"../","target":"self","autostart":false};$.extend(defs,settings);return this.each(function(e){var video={id:$(this).data("video-id"),image:$(this).data("video-image"),aspectratio:$(this).data("video-ratio"),file:$(this).attr("href"),tracks:$(this).data("video-track")};var timesForGA={};timesForGA.endedEventTime=0;timesForGA.playPercentTime_25=0;timesForGA.playPercentTime_50=0;timesForGA.playPercentTime_75=0;var pageProductInfo=
window.digitalData.product?window.digitalData.product.productInfo:"";var productMktName=pageProductInfo&&pageProductInfo.marketingName||"";var productCategory=pageProductInfo&&pageProductInfo.category||"";if(addVideoList(video.file))videotrack.push(video);var thisvideo=[];for(var i=0;i1600?1600:Number(settings.width)||1600;var height=
settings.height=="0"?900:Number(settings.height)||900;var widthHeightRatio=width/height||1;var reallyWidth=window.innerWidth-videoMargin*2>width?width:window.innerWidth-videoMargin*2;var reallyHeight=reallyWidth/widthHeightRatio;reallyHeight=reallyHeight>window.innerHeight-80?window.innerHeight-80:reallyHeight;reallyWidth=reallyHeight*widthHeightRatio;if(typeof video.aspectratio=="string"&&/^[0-9]{1,2}:[0-9]{1,2}$/.test(video.aspectratio)){var ratio=video.aspectratio.split(":");height=width*parseInt(ratio[1])/
parseInt(ratio[0])}if(video.tracks)var v="\x3cvideo controls playsinline\x3d'true' webkit-playsinline\x3d'true' controlsList\x3d'nodownload' poster\x3d'"+video.image+"' id\x3d'"+video.id+"' style\x3d'width:100%;max-height:100%;' src\x3d'"+video.file+"'\x3e\x3ctrack src\x3d'"+video.tracks+"' kind\x3d'subtitles' default /\x3eYour browser does not support mp4 video.\x3c/video\x3e";else var v="\x3cvideo controls playsinline\x3d'true' webkit-playsinline\x3d'true' controlsList\x3d'nodownload' poster\x3d'"+
video.image+"' id\x3d'"+video.id+"' style\x3d'width:100%;max-height:100%;' src\x3d'"+video.file+"'\x3e\x3c/video\x3e";if(defs.target=="self"){$(this).html('\x3cdiv class\x3d"self-video"\x3e'+v+"\x3c/div\x3e");var maxCount=1E3;var loadTimer=setInterval(function(){var $video=$("#"+video.id);var videoDom=$video[0];if($video.length>0&&videoDom.readyState=="4"){videoDom.play();handleGAInVideoEventListener(videoDom,video.label,timesForGA,productMktName,productCategory);clearInterval(loadTimer)}if(maxCount--<
1)clearInterval(loadTimer)},100)}else if(defs.target=="fancybox"){var oFFScorll=function(ev){ev.stopPropagation();ev.preventDefault();return false};$("head").append('\x3clink href\x3d"/etc/designs/huawei-cbg-site/statics/jquery.fancybox-v2.1.5.css" rel\x3d"stylesheet" type\x3d"text/css" /\x3e');$.getScript("/etc/designs/huawei-cbg-site/statics/lib-bundle.js",function(){$.fancybox('\x3cdiv class\x3d"cbg-jwplayer" style\x3d"display: flex;height:'+reallyHeight+'px;align-items: center;background:#000;"\x3e'+
v+'\x3c/div\x3e\x3cdiv class\x3d"cbg-video-mask"\x3e\x3c/div\x3e',{width:reallyWidth,height:reallyHeight,minWidth:reallyWidth,minHeight:reallyHeight,padding:0,margin:marginArray,autoSize:false,aspectRatio:true,scrolling:"no",beforeShow:function(){var maxCount=1E3;var loadTimer=setInterval(function(){var $video=$("#"+video.id);var videoDom=$video[0];if($video.length>0&&videoDom.readyState=="4"){videoDom.play();handleGAInVideoEventListener(videoDom,video.label,timesForGA,productMktName,productCategory);
clearInterval(loadTimer)}if(maxCount--<1)clearInterval(loadTimer)},100)},afterClose:function(){},beforeClose:function(){var $video=$("#"+video.id);var videoDom=$video[0];videoDom.currentTime=0;closeAllVideo(video.id);pushVideoDatalayer(video.label,"close",productMktName,productCategory)}})})}})};
function handleGAInVideoEventListener($video,videoName,timesForGA,productMktName,productCategory){if(timesForGA==null)return false;pushVideoDatalayer(videoName,"play",productMktName,productCategory);$video.onended=function(event){if(timesForGA.endedEventTime==0){timesForGA.endedEventTime=1;pushVideoDatalayer(videoName,"100%",productMktName,productCategory)}};$video.onpause=function(event){if($video.currentTime==0||$video.currentTime==$video.duration)return false;pushVideoDatalayer(videoName,"pause",
productMktName,productCategory)};$video.ontimeupdate=function(){videoStepHandleGaEvent($video,videoName,timesForGA,productMktName,productCategory)}}
function videoStepHandleGaEvent($video,videoName,timesForGA,productMktName,productCategory){var playPercentNum=Math.floor($video.currentTime*100/$video.duration);if(playPercentNum>=25&&playPercentNum<50&×ForGA.playPercentTime_25==0){pushVideoDatalayer(videoName,"25%",productMktName,productCategory);timesForGA.playPercentTime_25=1}else if(playPercentNum>=50&&playPercentNum<75&×ForGA.playPercentTime_50==0){pushVideoDatalayer(videoName,"50%",productMktName,productCategory);timesForGA.playPercentTime_50=
1}else if(playPercentNum>=75&&playPercentNum<100&×ForGA.playPercentTime_75==0){pushVideoDatalayer(videoName,"75%",productMktName,productCategory);timesForGA.playPercentTime_75=1}}function addVideoList(file){var l=videotrack.length;for(var i=0;i-1};var $gaElement=$(".contact-us-technical-support-component .conv3_contact_email[data-gaevent]");$.extend(defs,settings);thisSelector.find(".select").on("click",function(ev){if(isTabView())return;var thisSelect=$(this),thisOl=thisSelect.find("ol"),siblingsSelect=
thisSelect.siblings(".select");var thisSelectli=thisOl.find("li");if((thisSelect.parents(".add-contact-info").length>0||thisSelect.parents(".user-perfect-dialog").length>0)&&thisSelectli.length==0)return;if(thisSelect.hasClass("disable"))return;if(thisOl.data("slide")=="open"){thisOl.slideUp(250,function(){thisOl.data("slide","close")});setTimeout(function(){thisSelect.find("span").removeClass("active")},250)}else{thisOl.slideDown(250,function(){thisOl.data("slide","open")});thisSelect.find("span").addClass("active")}siblingsSelect.find("ol").slideUp(250,
function(){$(this).data("slide","close")});siblingsSelect.find("span").removeClass("active");if(thisSelect.parents(".add-contact-info").length>0||thisSelect.parents(".user-perfect-dialog").length>0){var prarentSiblingsSelect=thisSelect.parents(".s-selector").siblings(".s-selector");prarentSiblingsSelect.find("ol").slideUp(250,function(){$(this).data("slide","close")});prarentSiblingsSelect.find("span").removeClass("active")}ev.stopPropagation()});thisSelector.find(".select ol li").off("click.compareItem").on("click.compareItem",
function(ev){var thisLi=$(this),thisSpan=thisLi.parents(".select").eq(0).find("span"),sText=thisLi.text(),spText=thisSpan.text();if(isTabView())thisLi.addClass(defs.tabClass).siblings("li").removeClass(defs.tabClass);else{thisLi.addClass(defs.tabClass).siblings("li").removeClass(defs.tabClass);thisLi.parents(".select").eq(0).find("ol").slideUp(250,function(){$(this).data("slide","close")})}defs.tabChangeTitle&&thisSpan.text(sText);thisSelector.trigger("selected",{"val":sText,"_mark":thisLi.parents("ol").eq(0).attr("_mark")});
setTimeout(function(){$(".conv3_search_wrap .result_news_pc .list li strong").each(function(){var title=$(this).find("a");if(title.height()>45)$(this).addClass("ellipsis")});$(".conv3_search_wrap .result_news_pc .list li p").each(function(){var descript=$(this).find("span.content");if(descript.height()>65)$(this).addClass("ellipsis")})},500);ev.stopPropagation();setTimeout(function(){thisSpan.removeClass("active")},250)});$("body").on("click",function(){if(isTabView())return;var aSelect=thisSelector.find(".select");
aSelect.find("ol").slideUp(250,function(){$(this).data("slide","close")});setTimeout(function(){aSelect.find("span").removeClass("active")},250)});if(isTabView())$(window).on("resize",function(){if(isTabView())thisSelector.find(".select ol").show();else thisSelector.find(".select ol").hide()});return thisSelector}})(jQuery);
function RenderSelectInput(jqSelector,placeHolder,inputCallback){var selectWidth=parseInt($(jqSelector).css("width").replace("px",""));var selectHeight=parseInt($(jqSelector).css("height").replace("px",""));var spanJq=$(jqSelector).children("span").first();spanJq.after("\x3cinput type\x3d'text' class\x3d'select-input' "+"placeholder\x3d'"+placeHolder+"' /\x3e");var inputJq=$(jqSelector).children("input").first();var olJq=$(jqSelector).children("ol").first();spanJq.css("font-size","0");inputJq.css({"height":selectHeight+
"px","position":"relative","display":"block","left":"0","top":"-"+selectHeight+"px","outline":"none","border-width":"0","background-color":"transparent","margin-left":"auto","margin-right":"auto","width":$(spanJq).css("width")});inputJq.keyup(function(){if(inputCallback!="undefined")inputCallback(inputJq,function(){olJq.children("li").each(function(){if($(this).text().toUpperCase().indexOf($(inputJq).val().toUpperCase())>=0){$(this).html($(this).text().replace($(inputJq).val().toUpperCase(),"\x3cstrong style\x3d'color:red;' \x3e"+
$(inputJq).val().toUpperCase()+"\x3c/strong\x3e"));$(this).show()}else $(this).hide()});if(!$(spanJq).hasClass("active"))$(spanJq).addClass("active");setTimeout(function(){$(olJq).css("display","block")},500)})});inputJq.focus(function(event){if(inputJq.val()=="")return;if(!$(spanJq).hasClass("active"))$(spanJq).addClass("active");setTimeout(function(){$(olJq).css("display","block")},500)});$(window).resize(function(){inputJq.css({"width":$(spanJq).css("width")})});$(jqSelector+" ol").first().find("li").on("click",
function(){$(inputJq).val($(this).text());$(jqSelector+" ol").first().hide()});window.SelectProduct=function(productName){setTimeout(function(){$(".conv3_certification_wrap .conv3_global_selector .select input").first().val(productName);$(".conv3_global_selector .select ol").hide()},200)}}$.isAndroid=function(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Adr")>-1};$.isIos=function(){return!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)};
$.isMobile=function(){var userAgentInfo=navigator.userAgent;var Agents=new Array("Android","iPhone","SymbianOS","Windows Phone","iPad","iPod");for(var v=0;v0)return true;return false};$.isPc=function(){return!$.isMobile()};
$.equip=function(){var userAgentInfo=navigator.userAgent;var Agents=new Array("Android","iPhone","SymbianOS","Windows Phone","iPad","iPod");for(var v=0;v0)return Agents[v];return"pc"};
function HeightKey(txt,key,tag){var str=txt;var _keys=key;var k_index=str&&_keys?str.toLowerCase().indexOf(_keys.toLowerCase()):-1;if(k_index>-1){if(k_index==0){var str1="\x3c"+tag+"\x3e"+str.substring(0,_keys.length)+"\x3c/"+tag+"\x3e";var str2=str.substring(_keys.length,str.length);var str3=""}else{var str1=str.substring(0,k_index);var str2="\x3c"+tag+"\x3e"+str.substring(k_index,_keys.length+k_index)+"\x3c/"+tag+"\x3e";var str3=str.substring(_keys.length+k_index,txt.length)}str=str1+str2+str3}return str}
function getURLParam(name){var m=decodeURIComponent(window.location.href).match(new RegExp("[?\x26]"+name+"\x3d([^\x3d\x26]*)(\x26|$)"));return m?m[1]:null}var monthtxt=$("#month_txt").val();if(monthtxt==""||monthtxt=="month txt")monthtxt="January,February,March,April,May,June,July,August,September,October,November,December";var montharray=monthtxt.split(",");function formatMonth(month){var m=parseInt(month);return montharray[m-1]}
function formatTime(str,site){if(str&&str!=""){var ta=str.split("-");var m=formatMonth(ta[1]);return m+" "+ta[2]+", "+ta[0]}else return""}function deleteHttp(str){if(str!=null&&typeof str=="string")if(str.indexOf("http:")==0)return str.substring(5,str.length);else if(str.indexOf("https:")==0)return str.substring(6,str.length);else return str;else return str}function formatString(field){if(field)return field;return""}
function getVideoActionStatus(playedPercentage){if(playedPercentage<25)return"Video Start";if(playedPercentage<50)return"Video 25%";if(playedPercentage<75)return"Video 50%";if(playedPercentage<99)return"Video 75%";return"Video Complete"}function setCookie(name,value){var Days=7;var exp=new Date;exp.setTime(exp.getTime()+Days*24*60*60*1E3);document.cookie=name+"\x3d"+escape(value)+";expires\x3d"+exp.toGMTString()+";path\x3d/"}
function getCookie(name){var arr,reg=new RegExp("(^| )"+name+"\x3d([^;]*)(;|$)");if(arr=document.cookie.match(reg))return unescape(arr[2]);else return null}function delCookie(name){var exp=new Date;exp.setTime(exp.getTime()-1);var cval=getCookie(name);if(cval!=null)document.cookie=name+"\x3d"+cval+";expires\x3d"+exp.toGMTString()}
function getExplorerInfo(){var explorer=window.navigator.userAgent.toLowerCase();if(explorer.indexOf("msie")>=0){var ver=explorer.match(/msie ([\d.]+)/)[1];return{type:"IE",version:ver}}else if(explorer.indexOf("Edge")>=0){var ver=explorer.match(/Edge\/([\d.]+)/)[1];return{type:"Edge",version:ver}}else if(explorer.indexOf("firefox")>=0){var ver=explorer.match(/firefox\/([\d.]+)/)[1];return{type:"Firefox",version:ver}}else if(explorer.indexOf("chrome")>=0){var ver=explorer.match(/chrome\/([\d.]+)/)[1];
return{type:"Chrome",version:ver}}else if(explorer.indexOf("opera")>=0){var ver=explorer.match(/opera.([\d.]+)/)[1];return{type:"Opera",version:ver}}else if(explorer.indexOf("safari")>=0)return{type:"Safari",version:0};else return{type:0,version:0}}
function snsShare(type,url){var u=url||document.location.href;var t=encodeURIComponent(document.title);var shareUrl="";switch(type){case "facebook":shareUrl="https://www.facebook.com/sharer/sharer.php?u\x3d"+u;break;case "googleplus":shareUrl="https://plus.google.com/u/0/share?text\x3d"+t+encodeURIComponent(" ")+u;break;case "twitter":shareUrl="https://twitter.com/intent/tweet?text\x3d"+t+encodeURIComponent(" ")+u;break;case "sinablog":shareUrl="http://v.t.sina.com.cn/share/share.php?url\x3d"+u+"\x26title\x3d"+
t+"\x26appkey\x3d330242870";break;case "qqblog":shareUrl="http://shuqian.qq.com/post?from\x3d3\x26title\x3d"+t+"\x26uri\x3d"+encodeURIComponent(document.location.href)+"\x26jumpback\x3d2\x26noui\x3d1";break;default:shareUrl=""}window.open(shareUrl,type,"toolbar\x3dno,location\x3dno,status\x3dno,menubar\x3dno,scrollbars\x3dyes,resizable\x3dyes,width\x3d800,height\x3d500,location\x3d1")}var basesupport="/support/services/";
function setInitMap(b,c){var a=b.address==undefined?"beijing":b.address;b.geocoder.geocode({address:b.address},function(g,e){if(e==google.maps.GeocoderStatus.OK){var d={zoom:10,center:g[0].geometry.location,mapTypeId:google.maps.MapTypeId.ROADMAP};var f=new google.maps.Map(document.getElementById(b.id),d);c&&c(f)}})}
function loadMapScript(b){b=b||"en";var a=document.createElement("script");a.type="text/javascript";a.setAttribute("async","");a.setAttribute("defer","");a.src="//maps.google.com/maps/api/js?key\x3dAIzaSyB5ykZNED0-oT4i1RZRqS9oetClB7wCwfE\x26language\x3d"+b.toLowerCase()+"\x26callback\x3dinitMap";document.body.appendChild(a)}
var MenuPageHistory=function($){function MenuPageHistory(option){this.pages=[];this.option=option;this.closeCallBack;this.prePushCallBack}MenuPageHistory.prototype.PushPage=function(jqPageSelector,callBack){var that=this;that.prePushCallBack&&that.prePushCallBack();setTimeout(function(){if(that.pages.length>0){var preJqPageSelector=that.pages[that.pages.length-1];that.pages.push(jqPageSelector);$(preJqPageSelector).slideUp(that.option.slideSpeed,function(){$(jqPageSelector).slideDown(that.option.slideSpeed,
function(){callBack&&callBack()})})}else{that.pages.push(jqPageSelector);$(jqPageSelector).slideDown(that.option.slideSpeed,function(){callBack&&callBack()})}},200)};MenuPageHistory.prototype.PopPage=function(callBack){var that=this;if(this.pages.length>1){var currJqPageSelector=this.pages[this.pages.length-1];var preJqPageSelector=this.pages[this.pages.length-2];$(currJqPageSelector).slideUp(this.option.slideSpeed,function(){$(preJqPageSelector).slideDown(that.option.slideSpeed,function(){that.pages.splice(that.pages.length-
1,1);callBack&&callBack()})})}else if(this.pages.length==1){var currJqPageSelector=this.pages[this.pages.length-1];$(currJqPageSelector).slideUp(this.option.slideSpeed,function(){that.pages.splice(that.pages.length-1,1);callBack&&callBack();if(that.pages.length==0)that.closeCallBack&&that.closeCallBack()})}};MenuPageHistory.prototype.ClosePage=function(callBack){var that=this;try{var currJqPageSelector=this.pages[this.pages.length-1];if(!currJqPageSelector){callBack&&callBack();return}$(currJqPageSelector).slideUp(this.option.slideSpeed,
function(){that.pages.splice(0,that.pages.length);callBack&&callBack();that.closeCallBack&&that.closeCallBack()})}catch(e$31){callBack&&callBack()}};MenuPageHistory.prototype.CloseHandler=function(callBack){if(callBack)this.closeCallBack=callBack};MenuPageHistory.prototype.BeforePushPageHandler=function(callBack){if(callBack)this.prePushCallBack=callBack};return MenuPageHistory}(jQuery);var slideSpeed=250;var fotterScrollTop=0;var menuPageHistory=new MenuPageHistory({slideSpeed:slideSpeed});
menuPageHistory.BeforePushPageHandler(function(){if(fotterScrollTop==0)fotterScrollTop=$(document).scrollTop();$(document).scrollTop(0)});menuPageHistory.CloseHandler(function(){$("#normal_nav .navcon .menu ul li").removeClass("current");$(document).scrollTop(fotterScrollTop);fotterScrollTop=0});$(function(){var browser=getExplorerInfo();setTimeout(function(){$("img").each(function(i){$(this).attr("onerror","imgErrorUrl(this)")})},3E3)});
var imgErrorUrl=function(ths){var thsImg=$(ths)||$(this);var imgUrl="/etc/designs/huawei-cbg-site/clientlib-v3/images/hw-logo1-80.png";if(thsImg.hasClass("imgerror-defaultlogo"))return;else thsImg.attr("src",imgUrl).addClass("imgerror-defaultlogo")};function clickLazyImgs(obj){obj.find("img.lazy_src").each(function(){$(this).attr("src",$(this).data("src")).removeClass("lazy_src").show()})}
function scrollLazyImgs(obj,dis){var _top=parseInt($(document).scrollTop());var mytop=parseInt(obj.offset().top)-(dis||200);if(_top>=mytop)obj.find("img.scroll_src").each(function(index){$(this).attr("src",$(this).data("src")).removeClass("scroll_src").show()})}function classLazy($p,top){var t=top||500;var st=parseInt($(document).scrollTop())+t;$(".lazy_class").each(function(){var mt=$(this).offset().top;st>=mt?$(this).addClass($(this).data("class")).removeClass("lazy_class"):""})}
$(function(){$(".part_description,.spec-contect p").each(function(){if($(this).text().indexOf("\u2265")!=-1)$(this).text($(this).text().replace(/\u2265/g,"\x3e\x3d"));if($(this).text().indexOf("\u2264")!=-1)$(this).text($(this).text().replace(/\u2264/g,"\x3c\x3d"))})});
function getV3PageTypeByCategory(c){switch(c){case "phones":return"phones";case "laptops":return"laptops";case "tablets":return"tablets";case "wearables":return"wearables";case "smart-home":return"smart-home";case "mobile-broadband":return"more-products";case "accessories":return"more-products";case "about-us":return"setCurrentNav";case "legal":return"setCurrentNav";case "store-finder":return"setCurrentNav";default:return"0"}}
function setV3CurrentNav(){var $nv=$(".header-wrap\x3e.nav-wrap\x3e.left-box\x3eul\x3eli");var nvl=$nv.length;var _pt=getV3PageTypeByCategory(digitalData.page.category.primaryCategory);var _pc=digitalData.page.category.pageType;var _pm=digitalData.page.category.primaryCategory;if(_pc=="support")for(var i=nvl-1;i>0;i--){if($nv.eq(i).find("a").attr("href")&&$nv.eq(i).find("a").attr("href").indexOf("/support")>0){$nv.eq(i).addClass("curpage");break}}else if(_pm=="emui")for(var i=nvl-1;i>0;i--){if($nv.eq(i).find("a").attr("href")&&
$nv.eq(i).find("a").attr("href").indexOf("/emui")>0){$nv.eq(i).addClass("curpage");break}}else if(_pt!="0"&&_pt!="setCurrentNav"){var _c=0;for(var i=0;i767)setV3CurrentNav();$("input[type\x3d'text']").each(function(i,input){var $input=$(input);if(!$input.attr("maxlength"))$input.attr("maxlength",500)})});var plphidedataToJson=function(){var plpJson=[];$(".plphidedata_arr span").each(function(i,span){if($(span).text().length>0)plpJson.push(JSON.parse($(span).text().trim()))});return plpJson};
String.format=function(){var s=arguments[0];for(var i=0;i0){clearInterval(fancyTimes);$("body").css("overflow","visible");$(".fancybox-overlay,.fancybox-close").on("click",function(){$("html,body").css("overflow","visible");$("body").css("height","auto")})}},500)})});var _scrollTop=0;
var bilingual_site_cookie=getCookie("bilingual_site_cookie")?getCookie("bilingual_site_cookie"):"";var current_site_code=digitalData.page.pageInfo.siteCode||"";var current_country_code=digitalData.page.pageInfo.countryCode||"";var site_code="";var country_code="";var cookieArr=[];var cookieStr="";var c_flag=false;var s_flag=false;var replace_str="";var cookie_info="";var path_name=window.location.pathname;var click_flag=false;
if(path_name.indexOf("/editor.html/content/huawei-cbg-site/")==0){path_name=path_name.replace("/editor.html/content/huawei-cbg-site/","");if(path_name.indexOf("/")>-1)current_site_code=path_name.split("/")[0];else current_site_code=path_name.split(".")[0]}else if(path_name.indexOf("/content/huawei-cbg-site/")==0){path_name=path_name.replace("/content/huawei-cbg-site/","");if(path_name.indexOf("/")>-1)current_site_code=path_name.split("/")[0];else current_site_code=path_name.split(".")[0]}else current_site_code=
path_name.split("/")[1];
$(document).ready(function(){if(window.integrationJsInterface||window.integrationJsInterfaceWebview)return;var $siteChooseMask=$(".site_choose_mask");if($siteChooseMask.length>0){var updateHeaderHg=function(){var $header=$("#header-v4");var $headerPh=$("#header-placeholder");var headerHeight=$header.innerHeight();if(headerHeight<300){$headerPh.css({"height":headerHeight});$(document).scrollTop("1px")}$(".n12-search").css("top",headerHeight);if(Mkt.Util.windowWidth()>1199){$(".main-nav .popup").css("top",headerHeight);
var isNavV2MbUI=$header.hasClass("nav-v2")&&(Mkt.Util.windowWidth()<1366||$header.hasClass("mb-ui"));if(isNavV2MbUI)$(".v4.n01-main-navigation.nav-v2 .main-nav,.huawei-v4 .login-v4-wrap .login-v4").css("top",headerHeight)}else{$(".main-nav").css("top",headerHeight);$(".huawei-v4 .login-v4-wrap .login-v4").css("top",headerHeight)}};var hideSitChooseMask=function(){$siteChooseMask.hide();updateHeaderHg()};var showSitChooseMask=function(){$siteChooseMask.show();updateHeaderHg()};var windowHref=function(siteCode,
click,jump){if(jump==false)return;if(click=="yes")window.location.href=getCurrentBtnUrl(siteCode);else if(editorMode=="false")showSitChooseMask()};var cookieJudgment=function(cookie_info,site_code,click,jump){if(getCookie("bilingual_site_cookie")&&getCookie("bilingual_site_cookie")!=""){updateCodeStatusAndData();if(c_flag==true&&s_flag==true&&click=="yes")windowHref(site_code,click);else if(c_flag==true&&s_flag==false){cookieStr=cookieStr.replace(replace_str,cookie_info);setCookie("bilingual_site_cookie",
cookieStr);windowHref(site_code,click)}else if(c_flag==false){cookieStr=cookieStr+","+cookie_info;setCookie("bilingual_site_cookie",cookieStr);windowHref(site_code,click)}}else{cookieArr.push(cookie_info);setCookie("bilingual_site_cookie",cookieArr);windowHref(site_code,"yes",jump)}};var updateCodeStatusAndData=function(){cookieStr=getCookie("bilingual_site_cookie");cookieArr=cookieStr.split(",");for(var i=0;i-1){pathname=pathname.replace(pathname.split("/")[0],siteCode);pathname="/editor.html/content/huawei-cbg-site/"+
pathname;url=origin+pathname}else{pathname=pathname.replace(pathname.split(".")[0],siteCode);pathname="/editor.html/content/huawei-cbg-site/"+pathname;url=origin+pathname+search}}else if(pathname.indexOf("/content/huawei-cbg-site/")==0){pathname=pathname.replace("/content/huawei-cbg-site/","");if(pathname.indexOf("/")>-1){pathname=pathname.replace(pathname.split("/")[0],siteCode);pathname="/content/huawei-cbg-site/"+pathname;url=origin+pathname+search}else{pathname=pathname.replace(pathname.split(".")[0],
siteCode);pathname="/content/huawei-cbg-site/"+pathname;url=origin+pathname+search}}else{pathname=pathname.replace("/"+current_site_code+"/","/"+siteCode+"/");url=origin+pathname+search}return url};$("#topTipsBox").prepend($siteChooseMask);$("#header-v4").addClass("has-top-tips");var editorMode=$("#is_editor").attr("data-is-editor-mode");$(".site_choose_mask p span.site_choose_btn").each(function(){if($(this).attr("sitecode")&&$(this).attr("sitecode")==current_site_code)$(this).addClass("current").siblings().addClass("other")});
$("a.lang_change").click(function(){if($(this).attr("scode")&&$(this).attr("scode")!=""){c_flag=false;s_flag=false;var choose_site_code=$(this).attr("scode");site_code=choose_site_code;country_code=current_country_code;cookie_info=country_code+"|"+site_code;cookieJudgment(cookie_info,site_code,"yes")}});if(bilingual_site_cookie!=""){site_code=current_site_code;updateCodeStatusAndData();if(c_flag==true&&s_flag==false){site_code=replace_str.split("|")[1];windowHref(site_code)}else if(c_flag==false&&
editorMode=="false")showSitChooseMask()}else if(editorMode=="false")showSitChooseMask();$(document).on("click","#close_btn",function(e){e.stopPropagation();var cat="navigation";var act="site_language_box_close";var lab=current_site_code;if(typeof ga=="function")ga("send","event",cat,act,lab);var $link=getCurrentBtnUrl()==window.location.href?window.location.href:getCurrentBtnUrl();dmpaCommon("trackEvent","click","pop_up interaction","Close",$link);$("html").removeClass("htmlbody_scroll");hideSitChooseMask();
site_code=current_site_code;country_code=current_country_code;cookie_info=country_code+"|"+site_code;cookieJudgment(cookie_info,site_code,"yes",false)});$(document).on("click",".site_choose_btn",function(e){e.stopPropagation();var cat="navigation";var act="site_language_select";var lab=current_site_code+"_"+$(this).text();if(typeof ga=="function")ga("send","event",cat,act,lab);var $buttonName=$(this).attr("data-language").toLowerCase()=="english"?"English":"Arabic",$link=getCurrentBtnUrl()==window.location.href?
window.location.href:getCurrentBtnUrl();dmpaCommon("trackEvent","click","pop_up interaction",$buttonName,$link);var click="yes";if($(this).hasClass("current"))click_flag=true;else click_flag=false;var choose_site_code=$(this).attr("siteCode");if(choose_site_code){$("html").removeClass("htmlbody_scroll");hideSitChooseMask();site_code=choose_site_code;country_code=current_country_code;cookie_info=country_code+"|"+site_code;cookieJudgment(cookie_info,site_code,click)}})}});
$(document).ready(function(){appEmbedded();IEVersion();thirdPartyAccessAction();if(enableNewCookieCfg&&cookieModeSetting=="fusionPromptModeB"&&pushForConsentTime!="")pushConsentTimeHandle(pushForConsentTime);if($(".huawei-convergent-cookie").length>0){showJpCookie();var acceptFlag=getCookie("huawei_store_accept_cookie_flag");if(enableNewCookieCfg&&cookieModeSetting&&cookieModeSetting=="fusionPromptModeB"&&enableDefaultCookieAccept&&!acceptFlag)cookieBListenClick()}else showCookieTip();$(".huawei-ie-tips .huawei-ie-close").on("click",
function(){$(".huawei-ie-tips").slideUp(500)});$(".huawei-v4 .huawei-cookie-cnt .huawei-cookie-close").on("click",function(){cookieTips()});$(".convergent-cookie-agree").on("click",function(){setJPCookie("huawei_store_accept_cookie_flag",true,360);setJPCookie("huawei_store_accept_cookie_choose","1|1|1",360);JPCookieBanner()});$(".convergent-cookie-reject").on("click",function(){setJPCookie("huawei_store_accept_cookie_flag",true,360);setJPCookie("huawei_store_accept_cookie_choose","0|0|0",360);JPCookieBanner()});
var isNotModeD=!!$(".huawei-convergent-cookie.model-default").length;$(".convergent-cookie-close").on("click",function(){if(!enableNewCookieCfg||isNotModeD)JPCookieBanner();else{setJPCookie("huawei_store_accept_cookie_flag",true,360);setJPCookie("huawei_store_accept_cookie_choose","1|1|1",360);JPCookieBanner()}});$(".second-mask-wrap").on("click",function(){$(".second-navigation .second-nav .icon-app").click()})});var lastWinWidth=$(window).width();
$(window).on("resize",function(){if($(".huawei-convergent-cookie").length>0){var currentWinWidth=$(window).width();if(currentWinWidth!=lastWinWidth){showJpCookie();lastWinWidth=currentWinWidth}}else showCookieTip()});var site=window.digitalData.page.pageInfo.siteCode2.toUpperCase();var pre_url=supportv2.supportApiUrl+"/services/service/";function getSiteLanguage(){return window.digitalData.page.pageInfo.language?window.digitalData.page.pageInfo.language.replace("_","-"):""}
function cookieTips(){var winW=$(window).width();$(".huawei-bootom-cookie").hide();setCookie("agreed-huawei-cookiepolicy","1");$("#footer-v3").removeAttr("style");$(".custom-service").removeAttr("style");$(".supportquestionnairedom-side").removeAttr("style");if(typeof support!="undefined"&&support.Util)support.Util.initModuleEvaluationLocation();$(".manhattan_topBtn").removeAttr("style");$("#content-v3-compare").css({transform:"none","-webkit-transform":"none"});$("#up").css("bottom",5+"vh");$(".post-create").removeAttr("style");
$(".cbg-backtotop").css("bottom",50+"px");$(".emui9-backtotop").css("bottom",50+"px");if(winW<1024){$(".custom-service-container,.scroll-top").removeAttr("style");$("#livechat-compact-container").css("z-index",2147483639);$(".header-gblnav-default").css("bottom","0px");$(".huawei-bootom-cookie").hide(function(){if($(".app-nav-icon").hasClass("clicked")){var appHeaderHeight=$(window).height()-$(".app-nav").height()-$(".huawei-bootom-cookie:visible").outerHeight(),navheight=$(".second-navigation:visible").height(),
headerHeight=$(".app-nav").height();$(".header-wrap").height(appHeaderHeight+navheight-$(".header-gblnav-default").height());$("#header-v3").css({height:appHeaderHeight+navheight,top:headerHeight-navheight+"px","z-index":151})}else headerHeigh()}).css("height","0")}var pdpCompare=$(".content-v3-compare");if(pdpCompare.is(":visible"))pdpCompare.css({top:"100%"});if($(".support-bootom-cookie").length>0)$(".support-bootom-cookie").css("bottom",0)}
$(document).on("click",".convergent-cookie-close,.convergent-cookie-button a",function(){if($(".support-bootom-cookie").length>0)$(".support-bootom-cookie").css("bottom",0)});
function showCookieTip(str){if(window.integrationJsInterface||window.integrationJsInterfaceWebview)return;if($(".huawei-convergent-cookie").length>0)return;if($("#cookieType").val()=="othercookie"){delCookie("agreed-huawei-cookiepolicy");headerHeigh();return}var _ag=getCookie("agreed-huawei-cookiepolicy");if(_ag=="1"){$(".huawei-bootom-cookie").remove();headerHeigh()}else{$(".huawei-bootom-cookie").show();var cookitheight=$(".huawei-bootom-cookie").outerHeight();if($(".huawei-bootom-cookie").hasClass("cookie-style-two"))cookitheight=
$(".huawei-cookie-cnt").outerHeight();$("#footer-v3").css("padding-bottom",cookitheight+"px");$(".manhattan_topBtn").css("bottom",cookitheight+10+"px");$(".emui9-backtotop").css("bottom",cookitheight+10+"px");$(".manhattan_topBtn").css("bottom",cookitheight+10+"px");$(".post-create").css({bottom:cookitheight+10+"px",top:"auto"});$(".cbg-backtotop").css("bottom",cookitheight+15+"px");fixedPageUIForCookieDOM(cookitheight)}}
function JPCookieBanner(){var winW=$(window).width();$(".huawei-convergent-cookie").hide();$(".custom-service").removeAttr("style");$(".supportquestionnairedom-side").removeAttr("style");$(".manhattan_topBtn").removeAttr("style");$("#content-v3-compare").css({transform:"none","-webkit-transform":"none"});$("#up").css("bottom",5+"vh");$(".post-create").removeAttr("style");$(".cbg-backtotop").css("bottom",50+"px");$(".emui9-backtotop").css("bottom",50+"px");$("body").removeClass("convergentCookie");
if(winW<1024){$(".custom-service-container,.scroll-top").removeAttr("style");$("#livechat-compact-container").css("z-index",2147483639);$(".header-gblnav-default").css("bottom","0px")}var pdpCompare=$(".content-v3-compare");if(pdpCompare.is(":visible"))pdpCompare.css({top:"100%"})}
function setJPCookie(key,value,day){var expires=day*24*60*60*1E3;var date=new Date(+new Date+expires);var pathVal=window.siteCode;document.cookie=key+"\x3d"+value+";expires\x3d"+date.toUTCString()+";domain\x3dhuawei.com;path\x3d/"+pathVal+";"}
function showJpCookie(){if(window.integrationJsInterface||window.integrationJsInterfaceWebview)return;var _ag=getCookie("huawei_store_accept_cookie_flag");if(!_ag||_ag=="false"){$(".huawei-convergent-cookie").show();var cookitheight=$(".huawei-convergent-cookie").outerHeight();$(".manhattan_topBtn").css("bottom",cookitheight+10+"px");$(".emui9-backtotop").css("bottom",cookitheight+10+"px");$(".post-create").css({bottom:cookitheight+10+"px",top:"auto"});$(".cbg-backtotop").css("bottom",cookitheight+
15+"px");$("body").addClass("convergentCookie");fixedPageUIForCookieDOM(cookitheight)}}
function fixedPageUIForCookieDOM(cookitheight){if(window.innerWidth<1024){$(".header-gblnav-default").css("bottom",cookitheight+"px");$(".custom-service-container,.scroll-top").css("z-index",207)}else if($(".custom-service").length>0&&IsPersonalComputer()){$(".custom-service").css("bottom",cookitheight+22+"px");var serviceBottom=$(".custom-service").css("bottom");var serviceHeight=$(".custom-service").outerHeight();$(".supportquestionnairedom-side").css("bottom",parseInt(serviceBottom?serviceBottom:
0)+parseInt(serviceHeight?serviceHeight:0)+"px")}}function headerHeigh(){if($(".product-detail-container").not("#More_Support").length>0)$("body").addClass("v3-suppro-detail")}function setSessionuuid(uuidUrl,imageUrl,$tag,$img){$.ajax({type:"GET",async:false,url:deleteHttp(uuidUrl),dataType:"jsonp",jsonp:"jsonp",data:{},success:function(data){$tag.val(data.sessionuuid);$img.attr("src",imageUrl+"?tm\x3d"+Math.random()+"\x26sessionuuid\x3d"+data.sessionuuid+"\x26timep\x3d"+Date().valueOf())}})}
function IEVersion(){var userAgent=navigator.userAgent;var isIE=userAgent.indexOf("compatible")>-1&&userAgent.indexOf("MSIE")>-1;var isEdge=userAgent.indexOf("Edge")>-1&&!isIE;var isIE11=userAgent.indexOf("Trident")>-1&&userAgent.indexOf("rv:11.0")>-1;var ismate10m5ucuc=userAgent.indexOf("HUAWEIALP")>-1||userAgent.indexOf("HUAWEISHT")>-1||userAgent.indexOf("HUAWEICMR")>-1;var ieversion=0;if(isIE)ieversion=1;else if(isEdge)ieversion=-1;else if(isIE11)ieversion=-1;else if(ismate10m5ucuc)ieversion=1;
if(ieversion==1)$(".huawei-ie-tips").slideDown(500);else $(".huawei-ie-tips").remove()}function cookieBListenClick(){$("a,button").not(".convergent-cookie-agree,.convergent-cookie-reject,.convergent-cookie-close").on("click",function(){setJPCookie("huawei_store_accept_cookie_flag",true,360);setJPCookie("huawei_store_accept_cookie_choose","1|0|0",360);if(ctlAnalysisCookie)activeCookieScripts("analysis-cookie");if(ctlAdvertiseCookie)activeCookieScripts("advertise-cookie")})}
function appEmbedded(){if(window.integrationJsInterface||window.integrationJsInterfaceWebview)$("body").addClass("app-hidden")}function thirdPartyEmbedded(){var thirdPartyPathName=null;var thirdPartyParentHost=document.referrer;if(parent!==window)try{thirdPartyPathName=top.location.href}catch(e$32){thirdPartyPathName=window.location.href}else thirdPartyPathName=window.location.href;var thirdPartyFlag=thirdPartyPathName.indexOf("integrateMode\x3diframe")!=-1;return thirdPartyFlag||false}
function thirdPartyAccessAction(){if(thirdPartyEmbedded()){$("body").addClass("nav-hidden");window.top.postMessage("nav-hidden-success",thirdPartyParentHost)}else activeCookieScripts("default-load-cookie")}
function pushConsentTimeHandle(pushConsentTime){var values=window.localStorage.getItem("push_for_consent_time")||"";var currentSiteCode=window.siteCode;var hasModified=false;var hasExistInValues=false;var valueArr=[];if(values!=""){valueArr=JSON.parse(values);$.each(valueArr,function(index,obj){if(obj.siteCode===currentSiteCode){hasExistInValues=true;if(obj.time!=pushConsentTime.trim()){hasModified=true;obj.time=pushConsentTime}}})}if(!hasExistInValues||valueArr.length<1){valueArr.push({"siteCode":currentSiteCode,
"time":pushConsentTime.trim()});window.localStorage.setItem("push_for_consent_time",JSON.stringify(valueArr));$.removeCookie("huawei_store_accept_cookie_flag",{domain:"huawei.com",path:"/"+currentSiteCode});$.removeCookie("huawei_store_accept_cookie_choose",{domain:"huawei.com",path:"/"+currentSiteCode})}else if(hasExistInValues&&hasModified){window.localStorage.setItem("push_for_consent_time",JSON.stringify(valueArr));$.removeCookie("huawei_store_accept_cookie_flag",{domain:"huawei.com",path:"/"+
currentSiteCode});$.removeCookie("huawei_store_accept_cookie_choose",{domain:"huawei.com",path:"/"+currentSiteCode})}}var defaultImgLogo=$(window).width()<1024?"/etc/designs/huawei-cbg-site/clientlib-v3/images/loading-40.png":"/etc/designs/huawei-cbg-site/clientlib-v3/images/loading-80.png";
var buyFeature=function(ths,storeFinder,disclaimer,nameforga){var thsBtn=ths||$(this);var btnType=thsBtn.attr("data-buybtntype");var productId=thsBtn.attr("data-pid");var productName=thsBtn.attr("data-pname");var targetType=thsBtn.attr("data-targettype");var eventtype=thsBtn.attr("data-eventtype");var position=thsBtn.attr("data-position");var siteCode2=window.digitalData.page.pageInfo.siteCode2;if(thsBtn.hasClass("eCommerce-buy")){var targetUrl=thsBtn.data("ecbuylink"),data_productId=thsBtn.attr("data-ecpid"),
data_openInNewPage=thsBtn.data("ecopeninnewpage"),data_btnlinkinfo=thsBtn.attr("data-btnlinkinfo"),data_type=thsBtn.attr("data-buttonType");var ecTargetType=data_openInNewPage?"_blank":"_self";var appAPI=window.integrationJsInterface||window.integrationJsInterfaceWebview;if(appAPI){appAPI.startAppActivity(data_productId);return}if(data_type==="explore"&&data_btnlinkinfo){buyToPdp_gtm(nameforga,position,eventtype);fun_ecommerce(ecTargetType,data_btnlinkinfo)}else{buyToThirdParty_gtm(nameforga,position,
eventtype,thsBtn);fun_ecommerce(ecTargetType,targetUrl)}return}if(btnType=="none"){buyToPdp_gtm(nameforga,position,eventtype);var targetUrl=thsBtn.attr("data-btnlinkinfo");if(targetUrl.indexOf("/content/huawei-cbg-site")==0)targetUrl=targetUrl.replace("/content/huawei-cbg-site","");if(targetType=="_self")window.location.href=targetUrl;else window.open(targetUrl)}else if(btnType=="partner"){buyOpenPopup_gtm(nameforga,position,eventtype);var pCountryBeal=thsBtn.attr("data-pcountrybeal")=="true";var pCountryTitle=
thsBtn.attr("data-pcountrytitle");pCountryTitle=!!pCountryTitle?pCountryTitle:Mkt.I18n.get("Select Country");createPopupToBuy();var showStoreFinder=storeFinder&&storeFinder.showStoreFinder;var storeFinderInNewPage="_self";var storeFinderLink="";if(showStoreFinder){storeFinderInNewPage=storeFinder.openStoreFinderInNewPage?"_blank ":"_self";storeFinderLink=storeFinder.storeFinderLink}var detailPath=thsBtn.attr("data-btnlinkinfo");if(detailPath.indexOf(".html")>0)detailPath=detailPath.substring(0,detailPath.lastIndexOf(".html"));
var ajaxPartnerUrl=detailPath+"/_jcr_content.partners-v4.json";var allInOne={};allInOne.showStoreFinder=showStoreFinder;allInOne.storeFinderLink=storeFinderLink;allInOne.storeFinderInNewPage=storeFinderInNewPage;allInOne.pCountryBeal=pCountryBeal;allInOne.pCountryTitle=pCountryTitle;var comb={};comb.nameforga=nameforga;comb.eventtype=eventtype;comb.bannerposition=position;comb.targetType=targetType;fun_partner(ajaxPartnerUrl,allInOne,comb,disclaimer)}else if(btnType=="third-party-site"){var isToPsp=
false;var targetUrl=thsBtn.attr("data-btnlinkinfo")||"";if(targetUrl){var isCurrPage=targetUrl.indexOf(window.location.href)!=-1;var urlTxt=Mkt.Util.isDispatcher?"/":"/content/huawei-cbg-site/";var isCurrSite=targetUrl.indexOf(window.location.origin+urlTxt+siteCode2)!=-1;var isPSP=Mkt.Util.isDispatcher?targetUrl.lastIndexOf("/select")!=-1:targetUrl.indexOf("/select.html")!=-1;var pageType=thsBtn.attr("data-pagetype");if(isCurrSite&&isPSP)isToPsp=true;else if(isCurrPage&&targetUrl.indexOf("#")!=-1)eventtype=
"product-detail-footer";else if(pageType&&pageType=="search"&&targetUrl.indexOf("#")!=-1)eventtype="search-product-detail-footer"}buyToThirdParty_gtm(nameforga,position,eventtype,thsBtn,isToPsp);fun_thirdParty(targetType,targetUrl,siteCode2)}else if(btnType=="global-buy"){buyOpenPopup_gtm(nameforga,position,eventtype);if(!!productId){createPopupToBuy();var comb={};comb.nameforga=nameforga;comb.eventtype=eventtype;comb.bannerposition=position;comb.targetType=targetType;getECSiteList(siteCode2,productId,
productName,comb);if($.isIos())$("#pdbuypage").trigger("click")}}else console.log(productId+"--\x3e"+btnType)};
var fun_partner=function(ajaxPartnerUrl,allInOne,comb,disclaimer){var showStoreFinder=allInOne.showStoreFinder;var storeFinderLink=allInOne.storeFinderLink;var storeFinderInNewPage=allInOne.storeFinderInNewPage;var pCountryBeal=allInOne.pCountryBeal;var pCountryTitle=allInOne.pCountryTitle;var nameforga=comb.nameforga;var eventtype=comb.eventtype;var bannerposition=comb.bannerposition;var targetType=comb.targetType;$.getJSON(ajaxPartnerUrl,function(res){var pcountryClass="";if(pCountryBeal){pcountryClass=
"pdbuypage-pcountry";$("#pdbuypage .pcountry-selbox").show();$("#pdbuypage .pcountry-countryname").html(pCountryTitle);if(res&&res.countries){var liHtml="";for(var key in res.countries)liHtml+='\x3cli class\x3d"pcountry-list-li" value\x3d"'+key+'" title\x3d"'+res.countries[key]+'"\x3e'+res.countries[key]+"\x3c/li\x3e";$("#pdbuypage .pcountry-list").append(liHtml)}addEventListener()}if(res&&res.partners){var partnerListHtml="";res.partners.forEach(function(partner,index,array){partnerListHtml+='\x3cli class\x3d"pdbuypage-listitem pdbuypage-listitem-partner '+
pcountryClass+'" data-pcountry\x3d"'+partner.countryTag+'"\x3e'+'\x3ca href\x3d"'+partner.link+'" data-selectedpartnerbuy\x3d"'+partner.name+'" data-nameforga\x3d"'+nameforga+'" data-eventtype\x3d"'+eventtype+'" data-bannerposition\x3d"'+bannerposition+'" target\x3d"'+targetType+'" data-parterlink\x3d"'+partner.link+'" class\x3d"pdbuypage-listitem-link"\x3e'+'\x3cimg src\x3d"'+partner.icon+'" onerror\x3d"javascript:this.src\x3d\''+defaultImgLogo+'\'" alt\x3d"'+partner.name+'" class\x3d"pdbuypage-listitem-img" /\x3e'+
"\x3c/a\x3e"+"\x3c/li\x3e"});$("#pdbuypage .pdbuypage-listul").html(partnerListHtml);$("#pdbuypage .pdbuypage-title-tipinfo").html(Mkt.I18n.get("Your Huawei device is available here"))}if(!!showStoreFinder){$(".pdbuypage-footinfo").show();$(".pdbuypage-footinfo span").html(Mkt.I18n.get("If you want to buy in store, please click"));$(".pdbuypage-footinfo a").text(" "+Mkt.I18n.get("Store finder")).attr({"href":storeFinderLink,"target":storeFinderInNewPage})}else $(".pdbuypage-footinfo").hide();if(disclaimer&&
disclaimer.length>0)$(".pdbuypage-disclaimer").html(disclaimer).show();partnerShow()});function addEventListener(){$(".pcountry-active").on("click",function(){var thsActive=$(this);if(thsActive.attr("type")=="hide"){thsActive.attr("type","show");thsActive.find(".pcountry-arrow").addClass("pcountry-arrowup");thsActive.parent().find(".pcountry-list").slideDown(300);if($(window).width()<1024){$(".pcountry-bg").show();$(".pdbuypage-listul").css("overflow-y","hidden")}}else{thsActive.attr("type","hide");
thsActive.find(".pcountry-arrow").removeClass("pcountry-arrowup");thsActive.parent().find(".pcountry-list").slideUp(300);$(".pcountry-bg").hide();$(".pdbuypage-listul").css("overflow-y","auto")}});$(".pcountry-list-li").on("click",function(){$(".pcountry-list-liactive").removeClass("pcountry-list-liactive");$(".pdbuypage-listitem-partner").hide();var thsListLi=$(this);thsListLi.addClass("pcountry-list-liactive");var thsCountryText=thsListLi.text();var thsCountryVal=thsListLi.attr("value");$(".pcountry-active .pcountry-countryname").text(thsCountryText).attr("title",
thsCountryText);$(".pcountry-active").attr({"value":thsCountryVal,"type":"hide"});$(".pcountry-arrow").removeClass("pcountry-arrowup");$(".pcountry-list").slideUp(300,function(){$(".pcountry-bg").hide();$(".pdbuypage-listul").css("overflow-y","auto")});$(".pdbuypage-listitem-partner").each(function(i,li){var thsLi=$(li);if(thsLi.attr("data-pcountry")==thsCountryVal)thsLi.show().css("float","left");else thsLi.hide()})});$(".pcountry-bg").on("click",function(){$(".pcountry-list").slideUp(300,function(){$(".pcountry-bg").hide();
$(".pdbuypage-listul").css("overflow-y","auto");$(".pcountry-active").attr({"type":"hide"});$(".pcountry-arrow").removeClass("pcountry-arrowup")})})}function partnerShow(){var mobileSrollTop=0;if($(window).width()>=1024){if($(".pdbuypage-listul .pdbuypage-listitem").length>3)$(".pdbuypage-listul .pdbuypage-listitem").css("float","left");if($.isIos()){mobileSrollTop=$(window).scrollTop();$("html").addClass("htmlbody_scroll")}}else{if($(".pdbuypage-listul .pdbuypage-listitem").length>2)$(".pdbuypage-listul .pdbuypage-listitem").css("float",
"left");mobileSrollTop=$(window).scrollTop();$("html").addClass("htmlbody_scroll")}$("body.huawei-v4").css("overflow-y","hidden");$("#pdbuypage").stop().slideDown(300,function(){setTimeout(function(){$("#pdbuypage").trigger("click")},200);setListHeight()});$(".pdbuypage-close").on("click",function(){$("#pdbuypage").slideUp(300,function(){$("body.huawei-v4").css("overflow-y","auto");$("html").removeClass("htmlbody_scroll");if($(window).width()<1024||$.isIos())$(window).scrollTop(mobileSrollTop);$("#pdbuypage").remove()})})}
};var fun_thirdParty=function(targetType,targetUrl,siteCode2){if(targetUrl.indexOf("http")=="-1"){var host=window.location.href.split("/"+siteCode2+"/")[0];if(targetUrl.indexOf("/")==0)targetUrl=host+targetUrl;else targetUrl=host+"/"+targetUrl}if(enableExternalLinkPopup)handleExternalLink(targetUrl,targetType);else if(targetType==="_self")window.location.href=targetUrl;else window.open(targetUrl)};
var getECSiteList=function(siteCode2,productId,productName,comb){var ecSiteList=[];var getECSiteListApi="/content/dam/huawei-cbg-site/en/worldwide/js/ecommerce-site-list.json";$.ajax({url:getECSiteListApi,type:"GET",success:function(data){if(data&&data.selfEcommerce)data.selfEcommerce.forEach(function(item){ecSiteList.push(item.siteCode)})},complete:function(){fun_globalBuy(siteCode2,productId,productName,comb,ecSiteList)}})};
var arrSortBySiteNameLetter=function(siteArr,param){return siteArr.sort(function(prev,next){return prev[param].localeCompare(next[param])})};
var areaSiteSort=function(areaItem,ecSiteList){var currAreaECSite=[],currAreaOtherSite=[];for(var country in areaItem)if(Object.prototype.hasOwnProperty.call(areaItem,country)){areaItem[country].countryName=country;if(ecSiteList.length>0&&ecSiteList.indexOf(country)>-1){areaItem[country].isECSite="true";currAreaECSite.push(areaItem[country])}else{areaItem[country].isECSite="false";currAreaOtherSite.push(areaItem[country])}}currAreaECSite=arrSortBySiteNameLetter(currAreaECSite,"siteName");currAreaOtherSite=
arrSortBySiteNameLetter(currAreaOtherSite,"siteName");return currAreaECSite.concat(currAreaOtherSite)};
var fun_globalBuy=function(siteCode2,productId,productName,comb,ecSiteList){var nameforga=comb.nameforga;var eventtype=comb.eventtype;var bannerposition=comb.bannerposition;var targetType=comb.targetType;var host=location.href.split("/"+siteCode2+"/")[0];if(host.indexOf(".html")>-1)host=location.href.split("/"+siteCode2+".html")[0];var globalBuyUrl=host+"/en/hidden/product/"+productId+"/_jcr_content/content.json";$.getJSON(globalBuyUrl,function(res){if(!res||!res.buyInfo)return;var globalBuyListHtml=
getGlobalBuyListHtml(res.buyInfo);$(".pdbuypage-box").addClass("pdbuypage-box-global");$(".pdbuypage-title-productname").html(productName).parent().show();$(".pdbuypage-title-productplane").html(Mkt.I18n.get("Region to buy"));$(".pdbuypage-title-tipinfo").html(Mkt.I18n.get("Please Select Your Country"));$(".pdbuypage-listul").html(globalBuyListHtml);$(".pdbuypage-footinfo").hide();globalBuyPopUpWindowUX()});var getGlobalBuyListHtml=function(buyInfo){var globalBuyJson=JSON.parse(buyInfo);var globalBuyListHtml=
"";for(var area in globalBuyJson)if(Object.prototype.hasOwnProperty.call(globalBuyJson,area)){var sortedAreaItem=areaSiteSort(globalBuyJson[area],ecSiteList);var countryStr=getCountryDomStr(sortedAreaItem);if(area==="Middle East / Africa"){area="Africa and Middle East";globalBuyListHtml=getAreaDomStr(area,countryStr)+globalBuyListHtml}else globalBuyListHtml+=getAreaDomStr(area,countryStr)}return globalBuyListHtml};var getAreaDomStr=function(area,countryStr){return'\x3cli class\x3d"pdbuypage-listitem pdbuypage-listitem-global"\x3e'+
'\x3cp class\x3d"pdbuypage-listitem-area"\x3e'+area+"\x3c/p\x3e"+'\x3cdiv class\x3d"pdbuypage-listitem-country"\x3e'+countryStr+"\x3c/div\x3e"+"\x3c/li\x3e"};var getCountryDomStr=function(sortedAreaItem){var countryStr="";for(var country in sortedAreaItem)if(Object.prototype.hasOwnProperty.call(sortedAreaItem,country)){countryStr+='\x3ca href\x3d"'+sortedAreaItem[country].buyLink;countryStr+='" data-selectedglobalbuy\x3d"'+sortedAreaItem[country].countryName;countryStr+='" data-nameforga\x3d"'+nameforga;
countryStr+='" data-eventtype\x3d"'+eventtype;countryStr+='" data-bannerposition\x3d"'+bannerposition;countryStr+='" target\x3d"'+targetType;countryStr+='" data-parterlink\x3d"" class\x3d"pdbuypage-listitem-link"\x3e';countryStr+='\x3cspan class\x3d"pdbuypage-listitem-name"\x3e'+sortedAreaItem[country].localSiteName+"\x3c/span\x3e";if(sortedAreaItem[country].isECSite==="true")countryStr+='\x3cspan class\x3d"icon icon-cart"\x3e\x3c/span\x3e';countryStr+="\x3c/a\x3e"}return countryStr}};
var setListHeight=function(){var boxH=$(".pdbuypage-box").height();var titleH=$(".pdbuypage-title").is(":visible")?$(".pdbuypage-title").outerHeight(true):0;var countryH=$(".pcountry-selbox").is(":visible")?$(".pcountry-selbox").outerHeight(true):0;var footerH=$(".pdbuypage-footinfo").is(":visible")?$(".pdbuypage-footinfo").outerHeight(true):0;var disclaimerH=$(".pdbuypage-disclaimer").is(":visible")?$(".pdbuypage-disclaimer").outerHeight(true):0;$(".pdbuypage-list").height(boxH-titleH-countryH-footerH-
disclaimerH)};
var globalBuyPopUpWindowUX=function(){var mobileSrollTop=0;if($(window).width()<1024){mobileSrollTop=$(window).scrollTop();$("html").addClass("htmlbody_scroll")}else if($.isIos()){mobileSrollTop=$(window).scrollTop();$("html").addClass("htmlbody_scroll")}var win_scrollTop=$(window).scrollTop();$("body").css({"overflow":"hidden","position":"fixed","top":-win_scrollTop,width:"100%"});$("#pdbuypage").stop().slideDown(300,function(){setTimeout(function(){$("#pdbuypage").trigger("click")},200);setListHeight()});
$(".pdbuypage-close").on("click",function(){$("body").css({"overflow":"auto","position":"static","top":"auto",width:"auto"});$("html").removeClass("htmlbody_scroll");$(window).scrollTop(win_scrollTop);$("#pdbuypage").slideUp(300,function(){$("#pdbuypage").remove()})});$(".pdbuypage-listitem-global .pdbuypage-listitem-area").click(function(){$(this).parent().toggleClass("active");$(this).siblings(".pdbuypage-listitem-country").slideToggle()})};
var fun_ecommerce=function(targetType,targetUrl){if(targetUrl){if(!targetUrl.startsWith("http")&&!targetUrl.startsWith("https")){if(targetUrl.indexOf(".html")==-1)targetUrl+=".html";if(targetUrl.indexOf("/content/huawei-cbg-site")>-1)targetUrl=targetUrl.split("/content/huawei-cbg-site")[1];targetUrl=dialogLinkHandler(targetUrl)}if(targetType==="_self")window.location.href=targetUrl;else window.open(targetUrl)}};
var createPopupToBuy=function(select){var buyAlertModelHtml='\x3cdiv id\x3d"pdbuypage"\x3e'+'\x3cdiv class\x3d"pdbuypage-bg"\x3e\x3c/div\x3e'+'\x3cdiv class\x3d"pdbuypage-box"\x3e'+'\x3cp class\x3d"pdbuypage-close"\x3e'+'\x3csvg width\x3d"32" height\x3d"32" xmlns\x3d"http://www.w3.org/2000/svg"\x3e\x3cg fill\x3d"#3C3C3C" fill-rule\x3d"evenodd"\x3e\x3cpath d\x3d"M8 7l17 17-1 1L7 8z"\x3e\x3c/path\x3e\x3cpath d\x3d"M7 24L24 7l1 1L8 25z"\x3e\x3c/path\x3e\x3c/g\x3e\x3c/svg\x3e'+"\x3c/p\x3e"+'\x3cdiv class\x3d"pdbuypage-title"\x3e'+
'\x3cp class\x3d"pdbuypage-title-product"\x3e'+'\x3cspan class\x3d"pdbuypage-title-productplane"\x3e\x3c/span\x3e'+'\x3cspan class\x3d"pdbuypage-title-productname"\x3e\x3c/span\x3e'+"\x3c/p\x3e"+'\x3cp class\x3d"pdbuypage-title-tipinfo"\x3e\x3c/p\x3e'+'\x3cp class\x3d"pdbuypage-ecommerce-tipinfo"\x3e'+'\x3cspan class\x3d"icon icon-cart"\x3e\x3c/span\x3e'+'\x3cspan class\x3d"ec-tip-content"\x3e This icon represents that Huawei e-commerce is available in this country or region.\x3c/span\x3e'+"\x3c/p\x3e"+
"\x3c/div\x3e"+'\x3cdiv class\x3d"pcountry-selbox" style\x3d"display:none"\x3e'+'\x3cdiv class\x3d"pcountry-bg"\x3e\x3c/div\x3e'+'\x3cdiv class\x3d"pcountry-country"\x3e'+'\x3cp class\x3d"pcountry-active" type\x3d"hide"\x3e'+'\x3cb class\x3d"pcountry-countryname"\x3e\x3c/b\x3e'+'\x3cb class\x3d"pcountry-arrow"\x3e\x3c/b\x3e'+"\x3c/p\x3e"+'\x3cul class\x3d"pcountry-list"\x3e\x3c/ul\x3e'+"\x3c/div\x3e"+"\x3c/div\x3e"+'\x3cdiv class\x3d"pdbuypage-list"\x3e'+'\x3cul class\x3d"pdbuypage-listul"\x3e'+"\x3c/ul\x3e"+
"\x3c/div\x3e"+'\x3cp class\x3d"pdbuypage-footinfo"\x3e'+"\x3cspan\x3e\x3c/span\x3e"+'\x3ca href\x3d"javascript:;" class\x3d"pdbuypage-shopSearch"\x3e\x3c/a\x3e'+"\x3c/p\x3e"+'\x3cp class\x3d"pdbuypage-disclaimer"\x3e\x3c/p\x3e'+"\x3c/div\x3e"+"\x3c/div\x3e";var selector=select||".huawei-v4";if($(selector+" .pdbuypage").length>0)$(selector+" .pdbuypage").remove();$(selector).append(buyAlertModelHtml);$("#pdbuypage").on("click",function(){$("#pdbuypage").css("z-index",parseInt($("#pdbuypage").css("z-index"))+
1)})};
var buyBtnAttributes=function(product,nameforga,position,eventtype){if(!product)return;if(product.buyButtonMode&&product.buyButtonMode.buyButtonText&&product.buyButtonMode.buyButtonText.length>0)product.buyButtonText=product.buyButtonMode.buyButtonText;else product.buyButtonText=Mkt.I18n.get("Buy");var attr={};attr["data-pid"]=product.productId;attr["data-pname"]=product.marketingName;if(product.buyButtonMode){attr["data-buybtntype"]=product.buyButtonMode.buttonType;attr["data-targettype"]=product.buyButtonMode.openInNewPage?
"_blank":"_self";attr["data-eventtype"]=eventtype;attr["data-position"]=position;switch(attr["data-buybtntype"]){case "none":product.buyButtonText=Mkt.I18n.get("Explore Product");attr["data-btnlinkinfo"]=product.detailLink;break;case "partner":attr["data-storelink"]=product.buyButtonMode.storeFinderLink;attr["data-btnlinkinfo"]=product.detailLink;attr["data-pcountrybeal"]=product.buyButtonMode.partnerCountryFilterEffective;attr["data-pcountrytitle"]=product.buyButtonMode.partnerCountryFilterTitle;
break;case "third-party-site":attr["data-btnlinkinfo"]=$(window).width()<1024?product.buyButtonMode.mobileThirdPartySiteLink:product.buyButtonMode.thirdPartySiteLink;break;case "global-buy":attr["data-btnlinkinfo"]=product.detailLink;break;default:break}}attr["data-enableec"]=product.enableEc;attr["data-ecpid"]=product.ecProductId;attr["data-ecbuylink"]=product.ecBuyLink;attr["data-ecopeninnewpage"]=product.ecOpenInNewPage;attr["data-onepricedisplay"]=product.onePriceDisplay;product.buyButtonAttr=
attr};var getPrdDisplayDetailInfo=function(productId,asyncValue){var def=$.Deferred();var params={};params.api="queryPrdDisplayDetailInfo";params.type="GET";params.data={};params.data.productId=productId;if(asyncValue!=undefined)params.async=asyncValue;params.success=function(data){def.resolve(data)};params.error=function(xhr,status,error){def.reject(xhr,status,error)};if(asyncValue!=undefined&&!asyncValue)return ecCom.ajaxReq(params);else{ecCom.ajaxReq(params);return def.promise()}};
var ecRenderEcomercePrice=function(){var ecommerceProductId=[];function getComponentEcProductIdAttr(list){var productIdArr=$.map(list,function(element,index){var $buyBtn=$(element).find(".global-buy-button").hide();var productId=$buyBtn.attr("data-ecpid")||"";if($buyBtn.attr("data-enableec")=="true"&&productId!="")$buyBtn.addClass("eCommerce-buy");return productId});return productIdArr}function unique(array){return array.filter(function(item,index,array){return array.indexOf(item,0)===index})}ecommerceProductId=
ecommerceProductId.concat(getComponentEcProductIdAttr($(".hero-carousel__slide-wrap")));ecommerceProductId=ecommerceProductId.concat(getComponentEcProductIdAttr($(".products-card-component .product-card")));ecommerceProductId=ecommerceProductId.concat(getComponentEcProductIdAttr($(".product-carousel-component .product-carousel__product")));ecommerceProductId=unique(ecommerceProductId);if(ecommerceProductId.length==0)return;getMinPriceAndInv(ecommerceProductId).then(function(data){var minPriceAndInvMap=
new Map;if(data.data.minPriceAndInvList)$.each(data.data.minPriceAndInvList,function(index,minPriceAndInvObj){minPriceAndInvMap.set(minPriceAndInvObj.productId+"",minPriceAndInvObj)});addHeroCarouselEcomPrice(minPriceAndInvMap);addProductCardEcomPrice(minPriceAndInvMap);addProductCarouselEcomPrice(minPriceAndInvMap)},function(){var blankMap=new Map;addHeroCarouselEcomPrice(blankMap);addProductCardEcomPrice(blankMap);addProductCarouselEcomPrice(blankMap)});function addHeroCarouselEcomPrice(data){var afterInitSlideArr=
$(".hero-carousel__slide-wrap");$.each(afterInitSlideArr,function(number,element){var $buyBtn=$(element).find(".global-buy-button");$($buyBtn).each(function(){addHeroCarouselEcBuyBtn($(this),data)})})}function addHeroCarouselEcBuyBtn($buyBtn,data){var productInfoJson=JSON.parse($buyBtn.prev('[name\x3d"buyBtnInfo"]').val()||"{}");var enableEc=productInfoJson.enableEc==="true"?true:false;if(!enableEc)return;var ecAdminSetting=productInfoJson.ecAdminSetting==="true"?true:false;if(ecAdminSetting){$buyBtn.show();
return}var productId=$buyBtn.attr("data-ecpid")||"";var minPriceAndInvData=data.get(productId.trim())||{};window.handleBuyButtonTextForECommerceSite(ecAdminSetting,enableEc,minPriceAndInvData,$buyBtn)}function addProductCardEcomPrice(minPriceAndInvMap){var productCards=$(".products-card-component .product-card");$.each(productCards,function(index,productCardEle){var $buyBtn=$(productCardEle).find(".global-buy-button");var $productPrice=$(productCardEle).find(".product-card__price");ecSitePriceAndBuyBtn($buyBtn,
$productPrice,minPriceAndInvMap)})}function addProductCarouselEcomPrice(minPriceAndInvMap){var productCarouselSlides=$(".product-carousel-component .product-carousel__product");$.each(productCarouselSlides,function(index,productCarouselSlideEle){var $buyBtn=$(productCarouselSlideEle).find(".global-buy-button");var $productPrice=$(productCarouselSlideEle).find(".product-carousel__price");ecSitePriceAndBuyBtn($buyBtn,$productPrice,minPriceAndInvMap)})}function ecSitePriceAndBuyBtn($buyBtn,$productPrice,
minPriceAndInvMap){var productInfoJson=JSON.parse($buyBtn.prev(".buy-btn-info").val()||"{}");var enableEc=productInfoJson.enableEc==="true"?true:false;if(!enableEc)return;var ecAdminSetting=productInfoJson.ecAdminSetting==="true"?true:false;var hasPcp=productInfoJson.hasPcp||false;var onePriceDisplay=productInfoJson.onePriceDisplay||false;if(ecAdminSetting){var adminPrice=productInfoJson.price||0;if(adminPrice){var priceHtml=createAdminPriceHtml(window.ecCurrency(adminPrice),onePriceDisplay);$productPrice.addClass("has-price-info").html(priceHtml)}if(hasPcp)$buyBtn.show()}else{var productId=
$buyBtn.attr("data-ecpid")||"";var productMinPriceAndInv=minPriceAndInvMap.get(productId.trim())||{};if(productMinPriceAndInv&&!$.isEmptyObject(productMinPriceAndInv)){var priceHtml=createPriceHtml(productMinPriceAndInv,productInfoJson);$productPrice.addClass("has-price-info").html(priceHtml);if(hasPcp)window.handleBuyButtonTextForECommerceSite(ecAdminSetting,enableEc,productMinPriceAndInv,$buyBtn)}}}function createAdminPriceHtml(adminPrice,onePriceDisplay){var fromBehind="";var fromFront="";if(showFrom&&
!onePriceDisplay)if(putFromFront)fromFront=ecCom.I18n.get("ec_from")+" ";else fromBehind=" "+ecCom.I18n.get("ec_from");var priceHtml="";if(window.innerWidth>1199.98)priceHtml='\x3cdiv class\x3d"ec-price"\x3e'+'\x3cspan class\x3d"from-front"\x3e'+fromFront+"\x3c/span\x3e"+'\x3cp class\x3d"sale-price"\x3e'+adminPrice+'\x3cspan class\x3d"from-behind"\x3e'+fromBehind+"\x3c/span\x3e"+"\x3c/p\x3e\x3c/div\x3e";else priceHtml='\x3cdiv class\x3d"ec-price"\x3e'+'\x3cp class\x3d"sale-price"\x3e'+'\x3cspan class\x3d"from-front"\x3e'+
fromFront+"\x3c/span\x3e"+adminPrice+'\x3cspan class\x3d"from-behind"\x3e'+fromBehind+"\x3c/span\x3e"+"\x3c/p\x3e\x3c/div\x3e";return priceHtml}function createPriceHtml(minPriceAndInvData,buyButtonInfo){var fromBehind="";var fromFront="";if(showFrom&&!buyButtonInfo.onePriceDisplay)if(putFromFront)fromFront=ecCom.I18n.get("ec_from")+" ";else fromBehind=" "+ecCom.I18n.get("ec_from");var hasInstallment="";var installmentText="";if(minPriceAndInvData.installmentInfos){hasInstallment="has-installment";
if(enableInstallmentCfg)installmentText=window.ecInstallmentFullText(minPriceAndInvData.installmentInfos);else{var maxInstallmentNum=minPriceAndInvData.installmentInfos.sort(function(a,b){return b.num-a.num})[0].num;if(site==="UK"||site==="DE"||site==="ES")installmentText=ecCom.I18n.get("ec_installment_or")+" "+ecCom.I18n.get("ec_finance_available");else installmentText=ecCom.I18n.get("ec_installment_or")+" "+ecCom.I18n.get("ec_payment_in_installments",[maxInstallmentNum])}}var salePrice=ecCurrency(minPriceAndInvData.minUnitPrice);
var orderPriceWithHtml=getOrderPriceHtml(minPriceAndInvData.minUnitPrice,minPriceAndInvData.minOrderPrice);var priceHtml="";if(window.innerWidth>1199.98)priceHtml='\x3cdiv class\x3d"ec-price"\x3e'+'\x3cspan class\x3d"from-front"\x3e'+fromFront+"\x3c/span\x3e"+'\x3cp class\x3d"sale-price"\x3e'+salePrice+'\x3cspan class\x3d"from-behind"\x3e'+fromBehind+"\x3c/span\x3e"+"\x3c/p\x3e"+orderPriceWithHtml+'\x3cspan class\x3d"installment '+hasInstallment+'"\x3e'+installmentText+"\x3c/span\x3e"+"\x3c/div\x3e";
else priceHtml='\x3cdiv class\x3d"ec-price"\x3e'+'\x3cp class\x3d"sale-price"\x3e'+'\x3cspan class\x3d"from-front"\x3e'+fromFront+"\x3c/span\x3e"+salePrice+'\x3cspan class\x3d"from-behind"\x3e'+fromBehind+"\x3c/span\x3e"+orderPriceWithHtml+"\x3c/p\x3e"+'\x3cspan class\x3d"installment '+hasInstallment+'"\x3e'+installmentText+"\x3c/span\x3e"+"\x3c/div\x3e";return priceHtml}};
function getOrderPriceHtml(salePrice,orderPrice){var originalPriceHtml="";if(salePrice!=orderPrice){var originalPrice=ecCurrency(orderPrice);var tips="";if(rrpTips)tips='\x3cstrong class\x3d"rrp-tips"\x3e\x3c/strong\x3e';if(enableScribes)originalPriceHtml=enableRRP?"\x3cspan\x3e"+RRPText+"\x3c/span\x3e"+'\x3cspan class\x3d"original-price" style\x3d"text-decoration:line-through;"\x3e'+originalPrice+tips+"\x3c/span\x3e":'\x3cspan class\x3d"original-price" style\x3d"text-decoration:line-through;"\x3e'+
originalPrice+"\x3c/span\x3e";else originalPriceHtml=enableRRP?"\x3cspan\x3e"+RRPText+"\x3c/span\x3e"+'\x3cspan class\x3d"original-price"\x3e'+originalPrice+tips+"\x3c/span\x3e":'\x3cspan class\x3d"original-price"\x3e'+originalPrice+"\x3c/span\x3e"}return originalPriceHtml}
$(function(){$(document).on("click",".global-buy-button",function(e){e.preventDefault();var productInfoJson=($(this).prev("input[name\x3d'buyBtnInfo']")||{}).val();var productInfo=JSON.parse(productInfoJson);if(productInfo!=null){var position=$(this).attr("data-position");var eventtype=$(this).attr("data-eventtype");var nameforga=$(this).attr("data-nameforga");var bannerName=eventtype=="navi"?nameforga:nameforga?nameforga+"_"+productInfo.marketingName:productInfo.marketingName;buyBtnAttributes(productInfo,
nameforga,position,eventtype);for(var name in productInfo.buyButtonAttr)$(this).attr(name,productInfo.buyButtonAttr[name]);var storeFinder={showStoreFinder:productInfo.showStoreFinder,openStoreFinderInNewPage:productInfo.openStoreFinderInNewPage,storeFinderLink:productInfo.storeFinderLink};buyFeature($(this),storeFinder,productInfo.disclaimer,bannerName)}})});var RESULT_SUCCESS_CODE=0;var currentPageMinPriceAndInvMap=new Map;var currentPagePrdDisplayInfosMap=new Map;var currentPagePrdSkuDataMap=new Map;
var currentPageMinPriceAndInvMapFun=function(){var productIdList=[];var productId;$(".global-eCommerce-price[data-interfacename\x3d'queryMinPriceAndInv']").each(function(){productId=$(this).attr("data-ecproductid")||"";if(""!=productId&&productIdList.indexOf(productId.trim())==-1)productIdList.push(productId.trim())});if(productIdList&&productIdList.length>0){var data=getMinPriceAndInv(productIdList,false);if(data&&RESULT_SUCCESS_CODE===data.resultCode){var minPriceAndInvList=data.data.minPriceAndInvList;
if(minPriceAndInvList&&minPriceAndInvList.length>0)$.each(minPriceAndInvList,function(i){currentPageMinPriceAndInvMap.set(minPriceAndInvList[i].productId.toString(),minPriceAndInvList[i])})}else console.error(data.message+" : queryMinPriceAndInv")}};
var getMinPriceAndInv=function(productIdArr,asyncValue){var def=$.Deferred();var params={};params.api="queryMinPriceAndInv";params.type="GET";params.data={};params.data.productIds=productIdArr;if(asyncValue!=undefined)params.async=asyncValue;params.success=function(data){def.resolve(data)};params.error=function(xhr,status,error){def.reject(xhr,status,error)};if(asyncValue!=undefined&&!asyncValue)return Mkt.Util.ajaxReq(params);else{Mkt.Util.ajaxReq(params);return def.promise()}};
var currentPagePrdDisplayInfosMapFun=function(){var productIdList=[];var productId;$("[data-vmallbtn\x3d'true']").each(function(){productId=$(this).attr("data-ecproductid")||"";if(""!=productId&&productIdList.indexOf(productId.trim())==-1)productIdList.push(productId.trim())});if(productIdList&&productIdList.length>0){var data=getPrdDisplayInfos(productIdList,false);if(data&&data.resultCode===RESULT_SUCCESS_CODE){var prdDisplayInfos=data.data.prdDisplayInfos;if(prdDisplayInfos&&prdDisplayInfos.length>
0)$.each(prdDisplayInfos,function(i){currentPagePrdDisplayInfosMap.set(prdDisplayInfos[i].disPrdId.toString(),prdDisplayInfos[i])})}else console.error(data.message+" : queryPrdDisplayInfos")}};
var currentPagePrdSkuDataMapFun=function(){var sbomCodeList=[];var prdSbomCode;$(".promo-integration-item.promo-eCommerce-integration").each(function(){prdSbomCode=$(this).attr("data-ecsbomcode")||"";if(""!=prdSbomCode&&sbomCodeList.indexOf(prdSbomCode.trim())==-1)sbomCodeList.push(prdSbomCode.trim())});if(sbomCodeList&&sbomCodeList.length>0){var data=getPrdSkuDatas(sbomCodeList,false);if(data&&data.resultCode===RESULT_SUCCESS_CODE){var sbomDataList=data.data.sbomList;if(sbomDataList&&sbomDataList.length>
0)$.each(sbomDataList,function(i){currentPagePrdSkuDataMap.set(sbomDataList[i].sbomCode.toString(),sbomDataList[i])})}else console.error(data.message+" : queryPrdSkuDatas")}};
var getPrdDisplayInfos=function(productIdArr,asyncValue){var def=$.Deferred();var params={};params.api="queryPrdDisplayInfos";params.type="GET";params.data={};params.data.productIds=productIdArr;if(asyncValue!=undefined)params.async=asyncValue;params.success=function(data){def.resolve(data)};params.error=function(xhr,status,error){def.reject(xhr,status,error)};if(asyncValue!=undefined&&!asyncValue)return Mkt.Util.ajaxReq(params);else{Mkt.Util.ajaxReq(params);return def.promise()}};
var getPrdSkuDatas=function(sbomCodeArr,asyncValue){var def=$.Deferred();var params={};params.api="querySbomByCodes";params.type="GET";params.data={};params.data.sbomCodes=sbomCodeArr;if(asyncValue!=undefined)params.async=asyncValue;params.success=function(data){def.resolve(data)};params.error=function(xhr,status,error){def.reject(xhr,status,error)};if(asyncValue!=undefined&&!asyncValue)return Mkt.Util.ajaxReq(params);else{Mkt.Util.ajaxReq(params);return def.promise()}};
var currentPageProductMinPriceSkuMap=new Map;
var currentPageProductMinPriceSkuMapFun=function(){var productIds=[];var productId;$(".global-eCommerce-price[data-interfacename\x3d'queryMinPriceAndInv']").each(function(){productId=$(this).attr("data-ecproductid")||"";if(""!=productId&&productIds.indexOf(productId.trim())==-1)productIds.push(productId.trim())});$("[data-vmallbtn\x3d'true']").each(function(){productId=$(this).attr("data-ecproductid")||"";if(""!=productId&&productIds.indexOf(productId.trim())==-1)productIds.push(productId.trim())});
if(productIds&&productIds.length>0){var result=getProductMinPriceSku(productIds,false);if(result&&RESULT_SUCCESS_CODE===result.resultCode){var productMinPriceList=result.data.prdDisplayInfos;if(productMinPriceList&&productMinPriceList.length>0)$.each(productMinPriceList,function(i){currentPageProductMinPriceSkuMap.set(productMinPriceList[i].disPrdId.toString(),productMinPriceList[i])})}else console.error(result.message+" : queryMinPriceSku")}};
var getProductMinPriceSku=function(productIdArr,asyncValue){var def=$.Deferred();var params={};params.api="queryMinPriceSku";params.type="GET";params.data={};params.data.productIds=productIdArr;if(asyncValue!=undefined)params.async=asyncValue;params.success=function(data){def.resolve(data)};params.error=function(xhr,status,error){def.reject(xhr,status,error)};if(asyncValue!=undefined&&!asyncValue)return Mkt.Util.ajaxReq(params);else{Mkt.Util.ajaxReq(params);return def.promise()}};
var EVENT_TYPE_EMAIL_SUBMIT_SUCCESS="emailSubSuccess";var EVENT_TYPE_EMAIL_SUBMIT_FAIL="emailSubFail";var EVENT_TYPE_SPAREPART_PRICE="supportSparepartPrice";var EVENT_TYPE_M2M_DISTRIBUTOR="m2mDistributor";var EVENT_TYPE_CONTACT_US_FEEDBACK="contactUsFeedback";var EVENT_TYPE_CONTACT_US_HOTLINE="contactUsHotline";var EVENT_TYPE_CONTACT_US_TECHNICAL="contactUsTechnical";var EVENT_TYPE_APPOINTMENT_SERVICE="appointmentServiceSuccess";var EVENT_TYPE_FIND_A_STORE="findAStore";
var EVENT_TYPE_SUPPORT_SEARCH_AND_RESULT="supportSearchAndResultSuccess";var EVENT_TYPE_PRODUCT_FILTER="headerProductFilter";var EVENT_TYPE_PRODUCT_COMPARE_ADD="productCompareAdd";var EVENT_TYPE_PRODUCT_CANCEL_CLOSE="productCancelClose";var EVENT_TYPE_PRESS_NEWS_LIST="pressNewsList";var EVENT_TYPE_PRESS_NEWS_LIST_SEARCH="pressNewsListSearch";var EVENT_TYPE_PRESS_AWARD_LIST="pressAwardList";var EVENT_TYPE_PRESS_VIDEO_LIST="pressVideoList";var EVENT_TYPE_PDP_FAQ_SEARCH="supportPdpFaqSearch";
var EVENT_TYPE_FAQ_PDP_FEEDBACK="faqDetailpageIsthisContentHelpful";var EVENT_TYPE_POST_REPAIR="submitPostalRepairApointment";var EVENT_TYPE_FIND_SERVICE_CENTER_COUNTRY_CITY="submitFindServiceByCountryCity";var EVENT_TYPE_FIND_SERVICE_CENTER_DISTANCE="submitFindServiceByAddressDistance";var EVENT_TYPE_VIDEO_CLOSED="videoClosed";var EVENT_TYPE_SEARCH_RECYCLING_POINT="searchRecyclingPoint";var EVENT_TYPE_SP_LANDING_PAGE_SEARCH="supportLandingPageSearch";var EVENT_AUTO_SUGGEST_SEARCH="autoSuggestSearch";
var EVENT_PURE_SEARCH="pureSearch";var EVENT_SEARCH_BY_DROPDOWN_FILTER="searchByDropdownFilter";var EVENT_COMPARISON_FILTER="comparisonFilter";var EVENT_CLICK_FIND_SERVICE_CENTER="clickOnSupportServiceCenterResult";var EVENT_TYPE_SHOW_CONTENT="showContent";var EVENT_TYPE_HIDE_CONTENT="hideContent";var EVENT_TYPE_HOTSPOTS_CLICK="hotspotsClicked";var EVENT_TYPE_PS_PRODUCT_LISTING_SEARCH="supportProductListingSearch";var EVENT_TYPE_SUPPORT_PDP_DROPDOWN="supportPdpDropdown";
var EVENT_TYPE_HOT_SEARCH="HotSearch";var EVENT_TYPE_SUPPORT_SEARCH="SupportSearch";var EVENT_TYPE_OPEN_MENU_FIRST_LEVEL="openMenuFirstLevel";var EVENT_TYPE_OPEN_MENU_SECOND_LEVEL="openMenuSecondLevel";var EVENT_TYPE_SUPPORT_SEARCH_AUTO_SUGGEST="supportSearchAutoSuggest";var EVENT_TYPE_NEWS_LIST_LOAD_MORE="newsListLoadMore";var EVENT_TYPE_PRODUCT_MENU_MODULE_LOAD_MORE="productMenuModuleLoadMore";var EVENT_TYPE_SEARCH_RECYCLING_STORE_CLICK="searchRecyclingStoreClick";
var EVENT_TYPE_EXPRESS_REPAIRE_SERVICE_MODIFY="expressRepaireServiceModify";var EVENT_TYPE_EXPRESS_REPAIRE_SERVICE_SUBMIT="expressRepaireServiceSubmit";var EVENT_TYPE_REPAIR_STATUS_INQUIRY_SUMBIT="repairStatusInquirySumbit";var EVENT_TYPE_DOOR_TO_DOOR_SERVICE_SUBMIT="doorToDoorServiceSubmit";var EVENT_TYPE_APPOINTMENT_SERVICE_MODIFY="appointmentServiceModify";var EVENT_TYPE_APPOINTMENT_SERVICE_SUBMIT="appointmentServiceSubmit";var EVENT_TYPE_WARRANTY_QUERY_SUBMIT="warrantyQuerySubmit";
var EVENT_TYPE_TOPIC_PAGE_INTERACTIONS="topicPageInteractions";var EVENT_TYPE_TOPIC_LIST_SITE_SEARCH="topicListSiteSearch";var EVENT_TYPE_MAIL_SERVICE_SUBMIT="mailServiceSubmit";var EVENT_TYPE_HOME_PAGE_SITE_SEARCH="homePageSiteSearch";var EVENT_TYPE_SPAREPARTS_PRICE_SUBMIT="sparePartsPriceSubmit";var EVENT_TYPE_USER_CENTER_ADD="userCenterAdd";var EVENT_TYPE_USER_CENTER_MODIFY="userCenterModify";var EVENT_TYPE_USER_CENTER_DELETE="userCenterDelete";
var pageProductGTMV4=window.digitalData.product?window.digitalData.product.productInfo:"";function analyticsSubmit(cat,act,lab,customEventType){if(!cat||!act||!lab)return;var eventObj={cat:cat,act:act,lab:lab,customEventType:customEventType};for(var i=4;i=0;i--){var ei=events[i].eventInfo;if(ei.customEventType==eventType&&ei[item]){val=getContent(ei[item].toString()).trim();break}}}}catch(err){}return val},triggerEvent:function(eventName){$(document).trigger(eventName)}};
function pushVideoDatalayer(videoName,videoStep,productMktName,productCategory){window.dataLayer&&window.dataLayer.push({"event":"video","videoStep":videoStep,"videoName":videoName,"productMktName":productMktName?productMktName:"","productCategory":productCategory?productCategory:"","clickName":"video "+videoName+"_"+videoStep,"clickType":"action"})}
function getCookie(cname){var name=cname+"\x3d";var decodedCookie=decodeURIComponent(document.cookie);var ca=decodedCookie.split(";");for(var i=0;i0)Mkt.Util.imgLazyLoad($(".contact-us-v2 img.img-lazy"))});
!function(t,e){function r(r,a,i,u,l){function f(){L=t.devicePixelRatio>1,i=c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(u.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),u.a=function(t){t=c(t),i.push.apply(i,t)},u.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},u.f=function(t){for(var e=0;ee.top&&-ne.left&&
-n=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;at||!a.enableThrottle||u?l():n=setTimeout(l,t-f)}}function p(){--z,i.length||
z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+l,f)}function a(a,o){var u=this,l=n.extend({},u.config,o),f={},c=l.name+"-"+ ++i;return u.config=function(t,r){return r===e?l[t]:(l[t]=r,u)},u.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),u},u.getItems=function(){return f.g?f.g():
{}},u.update=function(t){return f.e&&f.e({},!t),u},u.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),u},u.loadAll=function(){return f.e&&f.e({all:!0},!0),u},u.destroy=function(){return n(l.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(u,l,a,f,c),l.chainable?a:u}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=
a.prototype.config,u=o._f||(o._f={}),l=0,f=t.length;l=0&&(f=t,setTimeout(u,i))}}},debounce:function(t,e,n){if("function"==typeof t){var o="boolean"==typeof n&&n,
i=e||100;return function(){if("function"==typeof t){var e=this,n=arguments;clearTimeout(t.__id),o&&!t.__id?(!t.__id&&t.apply(e,n),t.__id=setTimeout(function(){t.__id=null},i)):t.__id=setTimeout(function(){t.apply(e,n)},i)}}}},tryCatch:function(t,e){var n=e||"";try{n=t()}catch(t$33){return n}return n},version:"1.0.0"};return t});
(function(){function sleep(_time){var time=_time||30;var def=$.Deferred();var timerId=setTimeout(function(){def.reject(time)},time);return def.always(function(){window.clearTimeout(timerId);timerId=null})}function getWechatSignature(reqOpts,isJsonp,delay){var jsonpObj=isJsonp?{"dataType":"jsonp","jsonp":"jsonp"}:{};var _reqOpts=$.extend({},reqOpts,jsonpObj);var def=sleep(delay);return $.when($.ajax(_reqOpts).always(function(){def.resolve("success")}),def)}function _loadScript(){var map={};return function(scriptUrl,
cache){if(map[scriptUrl])return $.Deferred().resolve("["+scriptUrl+"] was downloaded successfully!");return $.ajax({type:"GET",url:scriptUrl,dataType:"script",async:true,cache:typeof cache==="undefined"}).done(function(){map[scriptUrl]=true})}}var loadScript=_loadScript();var WechatShare=function(){function WechatShare(_config,callbacks,shareConf){var config=_config||{};var _wxConf=config.wechat;var wxConf=_wxConf===undefined?{}:_wxConf;var _urls=config.urls;var urls=_urls===undefined?{}:_urls;this.wxConf=
wxConf;this.urls=urls;Object.prototype.toString.call(this.urls.needToBeLoadedScripts)!=="[object Array]"&&(this.urls.needToBeLoadedScripts=[]);this.isUseCCPCMethod=!!config.isUseCCPCMethod;this.delay=config.delay||5E3;this.share=shareConf||{};var _callbacks=callbacks||{};var success=_callbacks.success;var fail=_callbacks.fail;typeof success==="function"&&(this.successCb=success);typeof fail==="function"&&(this.failCb=fail);this.__maxExecCount=6;this.__count=0;this.defaultWxConfig={debug:false,jsApiList:["updateAppMessageShareData",
"updateTimelineShareData"]}}WechatShare.prototype.init=function(){if(this.initialized||++this.__count>this.__maxExecCount)return;if(this.isUseCCPCMethod||this.checkConfig()){var _this=this;this.initialized=true;this.loadMultiScripts(function(){if(_this.isUseCCPCMethod&&!_this.__failToExecWithCcpc)_this.subscribeWxEventWithCcpcMethod(function(result){this.initialized=true;this.__resData=result},function(){console.error("Failed to subscribe to WeChat events!");this.initialized=false;this.__failToExecWithCcpc=
true;this.isUseCCPCMethod=false;this.init()});else _this.getWechatSignature().done(function(res){_this.handleGetSignatureRes(res[0],function(){_this.registerWxEvent(_this.share)})}).fail(function(cause){console.error("Failed to get WechatSignature!");typeof _this.failCb==="function"&&_this.failCb(cause);_this.initialized=false;_this.isUseCCPCMethod=true;_this.__failToExecWithCcpc=false;_this.init()})},function(e){typeof _this.failCb==="function"&&_this.failCb(e);_this.initialized=false;_this.isUseCCPCMethod=
!_this.isUseCCPCMethod;_this.__failToExecWithCcpc=!_this.isUseCCPCMethod;_this.init()})}else typeof this.failCb==="function"&&this.failCb()};WechatShare.prototype.subscribeWxEventWithCcpcMethod=function(successCallback,failCallback){try{if(!this.isUseCCPCMethod)throw new Error("The current isUseCCPCMethod field value is true. Please note the instance parameters!");if(!this.initialized)return;var _this=this;var metaDom=document.head.querySelector("meta[name\x3ddescription]");var desc=metaDom&&metaDom.content?
metaDom.content:document.title;var info={title:document.title,link:window.location.href,imgUrl:this.urls.thumbnailImg,desc:desc};$.extend(info,{success:this.successCb,cancel:this.failCb,fail:this.failCb},this.share);var dtd=sleep(_this.delay).always(function(result){if(typeof result==="object"&&result.status)return;typeof failCallback==="function"&&failCallback.call(_this)});window.setWxConfig(info,{},function(){dtd.reject({status:false})});window.getWxSignature(function(res){dtd.resolve({status:true});
typeof successCallback==="function"&&successCallback.call(_this,res)},function(err){dtd.reject({status:false});typeof _this.failCb==="function"&&_this.failCb(err)})}catch(err){console.error("An error occurred in the method[shareWithCcpcMethod]!");typeof failCallback==="function"&&failCallback.call(_this)}};WechatShare.prototype.checkConfig=function(){if(this.isUseCCPCMethod)return true;var isAllOk=true;var fields=[];if(!this.wxConf.appId||typeof this.wxConf.appId!=="string")fields.push("appId");if(this.isUseCCPCMethod&&
!this.urls.needToBeLoadedScripts.length)fields.push("needToBeLoadedScripts");if(!this.urls.signature||typeof this.urls.signature!=="string")fields.push("signature");if(fields.length){console.error("[ "+fields.join("|")+" ] parameters are incorrectly configured");isAllOk=false}return isAllOk};WechatShare.prototype.loadMultiScripts=function(successCallbacks,failCallbacks){if(this.initialized){var dtd=sleep(this.delay);var __list=[];var needToBeLoadedScripts=$.extend([],this.urls.needToBeLoadedScripts);
if(!this.isUseCCPCMethod||this.__failToExecWithCcpc){var index=needToBeLoadedScripts.length;var wxSdkUrl="//res.wx.qq.com/open/js/jweixin-1.6.0.js";var isExist=needToBeLoadedScripts.some(function(scriptUrl,idx){var isMatched=/(shareSdk|ccpc)/i.test(scriptUrl);if(isMatched)index=idx;return isMatched});needToBeLoadedScripts.splice(index,isExist?1:0,wxSdkUrl)}var defs=needToBeLoadedScripts.filter(Boolean).map(function(scriptUrlItem,_,array){return loadScript(scriptUrlItem).always(function(){__list.push(scriptUrlItem);
array.length===__list.length&&dtd.resolve("success")})}).concat(dtd);if(defs.length===1)dtd.reject("no request urls");$.when.apply(null,defs).done(function(data){typeof successCallbacks==="function"&&successCallbacks(data)}).fail(function(e){typeof failCallbacks==="function"&&failCallbacks(e)})}};WechatShare.prototype.getWechatSignature=function(){if(this.initialized&&!this.isUseCCPCMethod||this.__failToExecWithCcpc){var reqUrl=this.urls.signature+"?url\x3d"+encodeURIComponent(window.location.href.split("#")[0]);
return getWechatSignature({url:reqUrl},this.urls.isGetSignatureByJsonp,this.delay)}else return $.Deferred().reject("Failed to get the signature!")};WechatShare.prototype.handleGetSignatureRes=function(resData,cb){var _resData=resData||{};this.__resData=_resData;this.injectWxConfig($.extend({},this.defaultWxConfig,{timestamp:_resData.timestamp,nonceStr:_resData.nonceStr,signature:_resData.signature},this.wxConf),cb)};WechatShare.prototype.injectWxConfig=function(conf,cb){var _this=this;if(!this.__failToExecWithCcpc&&
(this.isUseCCPCMethod||!this.initialized||this.__isInjectWxConfig))return;var curConfig=$.extend({},this.wxConf,conf);var isSignatureNotOK=Object.keys(curConfig).some(function(field){if(["nonceStr","signature","timestamp"].indexOf(field)>-1&&!curConfig[field])return true});if(isSignatureNotOK){_this.initialized=false;_this.isUseCCPCMethod=true;_this.__failToExecWithCcpc=false;_this.init();return}typeof this.failCb==="function"&&wx.error(function(res){_this.failCb(res);_this.__isInjectWxConfig=false;
_this.initialized=false;_this.isUseCCPCMethod=true;_this.__failToExecWithCcpc=false;_this.init()});wx.config(curConfig);this.__isInjectWxConfig=true;typeof cb==="function"&&cb()};WechatShare.prototype.registerWxEvent=function(shareData){if(!this.__failToExecWithCcpc&&(this.isUseCCPCMethod||!this.initialized||this.__isRegisterWxEvent))return;var _shareData=shareData||{};var metaDom=document.head.querySelector("meta[name\x3ddescription]");var desc=metaDom&&metaDom.content?metaDom.content:document.title;
var defaultShareData={title:document.title,link:window.location.href,imgUrl:this.urls.thumbnailImg};var cbsMap={success:function(){typeof this.successCb==="function"&&this.successCb()},cancel:function(){typeof this.failCb==="function"&&this.failCb()}};var shareConf=$.extend({},defaultShareData,cbsMap,_shareData);wx.ready(function(){wx.updateTimelineShareData(shareConf);wx.updateAppMessageShareData($.extend({desc:desc},shareConf))});this.__isRegisterWxEvent=true};return WechatShare}();$(function(){function isWechatBrowser(){var userAgent=
window.navigator.userAgent.toLowerCase();return/MicroMessenger/i.test(userAgent)}var $input=$("#thumbnailImagePath");var thumbnailImg=($input.val()||"").trim();var ccpcApiUrl=($input.attr("data-ccpc-api")||"").trim();var urls={needToBeLoadedScripts:[],signature:"//consumer.huawei.com/cmkt/services/service/wx/sign",thumbnailImg:thumbnailImg,isGetSignatureByJsonp:false};ccpcApiUrl&&urls.needToBeLoadedScripts.push(ccpcApiUrl);var wechat={appId:"wxe3b3a57fc490237b",debug:false,jsApiList:["updateAppMessageShareData",
"updateTimelineShareData"]};var conf={urls:urls,wechat:wechat,isUseCCPCMethod:!!ccpcApiUrl,delay:5E3};var baseConf={isEnableWxShare:Boolean($input.length)};if(baseConf.isEnableWxShare&&isWechatBrowser()){var wxShare=new WechatShare(conf);wxShare.init()}})})();