PageSourceSearch

https://www.honor.com/etc.clientlibs/honor-site-mkt/components/con…lib.min.7f570f0f5105de4b1b522f65abe41807.js

js honor.com collected 2026-09-24 08:36:57 UTC 9,529 bytes, 18 lines download raw bytes

1var newHomeBannerComp={$element:$(".new-home-banner-comp"),isScrollDisabled:!1,topScroll:0,init:function(b){var a=this;this.$element=b;this.gtmHandler();this.backgroundVideo();750>=document.body.clientWidth&&a.$element.each(function(){$(this).attr("data-mbbackgroundcolor")&&$(this).css("background",$(this).attr("data-mbbackgroundcolor"))});window.handleECommercePrice(this.$element).always(function(c){a.$element.find(".home-banner-content-price").each(function(d,e){0==$(this).height()&&$(this).hide()});
2c=a.$element.parents(".cmp-carousel-hook");c.addClass("new-home-carousel");0<c.length&&(750>=document.body.clientWidth&&a.matchHeight(),c.trigger("update"));750<document.body.clientWidth&&$(".new-home-banner-wrap.doubleStyle.twoProduct,.new-home-banner-wrap.singleStyle.twoProduct").each(function(d,e){$(this).find(".desolate-title-img").matchHeight({property:"height"});$(this).find(".new-home-banner-content-slogan").matchHeight({property:"height"});$(this).find(".energy-label-wrapper").matchHeight({property:"height"});
3$(this).find(".price-benefit-point").matchHeight({property:"height"})});$(".new-home-banner-wrap .desolate-advertise").each(function(d,e){""==$(this).text()&&$(this).hide()});750<document.body.clientWidth&&setTimeout(function(){$(".new-home-banner-wrap.doubleStyle.twoProduct,.new-home-banner-wrap.singleStyle.twoProduct").each(function(){var d=$(this).find(".product-content-warp-proInfo"),e=0;d.each(function(){var f=$(this).outerHeight(!0);f>e&&(e=f)});d.height(e).addClass("updateStyle")})},100)});
4this.videoPopupsEventRegister()},matchHeight:function(){$(".home-home-banner-content",this.$element).matchHeight({property:"height"})},videoPopupsEventRegister:function(){var b=this;$(".js-new-banner-video-play").on("click",function(){var a={isVideo:$(this).attr("data-video-url")&&(-1<$(this).attr("data-video-url").indexOf(".mp4")||-1<$(this).attr("data-video-url").indexOf(".webm"))?!0:!1,videoImg:$(this).attr("data-video-img"),isPC:750<document.body.clientWidth?!0:!1,videoUrl:$(this).attr("data-video-url")},
5c=$(this).attr("data-video-PcSyncAudio"),d=$(this).attr("data-video-PcSynchronizedSubtitles"),e=$(this).attr("data-video-PcDescribeAudio"),f=$(this).attr("data-video-PcDescriptionSubtitles"),g=$(this).attr("data-video-VideoTranscript");a=b.tempVideoHtml(a);$("body").append(a);$("#dialog-home-banner-video").videoPlayer({audioAndSubArr:[{label:Honor.I18n.get("ec_accessibility_Sync_audio_text"),audioSrc:c,subLabel:Honor.I18n.get("ec_subtitles"),subSrc:d},{label:Honor.I18n.get("ec_accessibility_desc_audio_text"),
6audioSrc:e,subLabel:Honor.I18n.get("ec_descriptions"),subSrc:f}],videoDescription:g});b.disableScrolls();$(this).attr("data-open-dialog",!0);b.openVideoPopups(b);$("#homeBannerVideoDialog").focus()});$("body").on("click",".js-banner-video-close",function(){b.closeVideoPopups(b)})},openVideoPopups:function(b){$("#homeBannerVideoDialog").on("keydown",function(a){utils.dialogFocusLoopProcessing(a,$(this),function(){b.closeVideoPopups(b)})})},closeVideoPopups:function(b){$("#homeBannerVideoDialog").off("keydown");
7$(".banner-image-video__modal").remove();b.enableScrolls();b.$element.find(".js-new-banner-video-play[data-open-dialog]").eq(0).focus();b.$element.find(".js-new-banner-video-play[data-open-dialog]").eq(0).removeAttr("data-open-dialog")},disableScrolls:function(){this.isScrollDisabled||(this.topScroll=$(window).scrollTop(),$("body").css("top",-this.topScroll+"px").addClass("scroll-disabled"),this.isScrollDisabled=!0)},enableScrolls:function(){$("body").css("top","").removeClass("scroll-disabled");
8$(window).scrollTop(this.topScroll);this.isScrollDisabled=!1},backgroundVideo:function(){var b=$(".video-background.bgVideo"),a=document.body.clientWidth;0<b.length&&b.each(function(){var c=$('\x3cvideo class\x3d"homeBanner_vidage__video" playsinline\x3d"true" autoplay\x3d"autoplay" muted tabindex\x3d"-1" aria-hidden\x3d"true"\x3e\x3c/video\x3e'),d=750<a?$(this).find(".homeBanner_backgroundVideo").val():$(this).find(".homeBanner_mbBackgroundVideo").val(),e=750<a?$(this).find(".homeBanner_backgroundVideoWebm").val():
9$(this).find(".homeBanner_mbBackgroundVideoWebm").val();c.append('\x3csource class\x3d"background_pc_video_mp" src\x3d"'+d+'" type\x3d"video/mp4"\x3e\x3csource class\x3d"background_pc_video_webm" src\x3d"'+e+'" type\x3d"video/webm"\x3e');$(this).find(".homeBanner_vidage__video_wrap").empty().append(c)})},tempVideoHtml:function(b){var a='\x3cdiv id\x3d"homeBannerVideoDialog" class\x3d"banner-image-video__modal js-banner-video-modal" tabindex\x3d"-1" role\x3d"dialog"\x3e\x3cdiv class\x3d"banner-image-video__modal-content"\x3e\x3cdiv class\x3d"banner-image-video__modal-wrap"\x3e\x3cbutton class\x3d"banner-image-video__close-btn popup__close-btn js-banner-video-close" aria-label\x3d"'+
10Honor.I18n.get("ec_voice_close_dialog")+'"\x3e\x3c/button\x3e{{ if isVideo }}\x3cvideo id\x3d"dialog-home-banner-video" class\x3d"lazy banner-image-video__modal-video js-banner-video kv_banner_click_video video-js banner-video-euaccessibility" aria-label\x3d"'+Honor.I18n.get("ec_video")+'" src\x3d"{{videoUrl}}" poster\x3d"{{videoImg}}" controls autoplay muted\x3d""\x3e\x3c/video\x3e{{ else }}\x3ciframe frameborder\x3d"0" scrolling\x3d"no" src\x3d"{{videoUrl}}" allowfullscreen\x3e\x3c/iframe\x3e{{ /if }}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e';
11return template.compile(a)(b)},gtmHandler:function(){$(document).on("click",".new-home-banner-comp .new-home-banner-content-title-image ,.new-home-banner-comp .learn_more_button,.new-home-banner-comp .image-background",function(b){var a=$(this);b=$.trim(a.data("txtnameforga"));var c=$.trim(a.closest(".product-content-warp").find(".new-home-banner-content-title-image img").attr("data-productname"))||$.trim(a.closest(".new-home-banner-wrap").find(".product-title").attr("ganame"))||$.trim(a.closest(".product-content-warp").find(".new-home-banner-content-title-image img").attr("alt"));
12a.hasClass("image-background")&&(c=a.find("img").attr("alt"));a=a.closest(".cmp-carousel__item").attr("data-swiper-slide-index");a=void 0!==a?Number(a)+1:1;if("CN"==honorConfig.siteCode){var d={actionCode:"select_product",eventType:"2",content:{event_name:"select_product",product_name:c,position:"Banner_"+a,button_name:b}};window.sendDapData&&window.sendDapData(d)}window.dataLayer&&window.dataLayer.push({event:"select_product",product_name:c,position:"Banner_"+a,button_name:b});YandexCommon.track("select_product",
13{product_name:c,position:"Banner_"+a,button_name:b})});$(document).on("click",".new-home-banner-comp .imgClick",function(b){var a=$(this);b=$.trim(a.data("txtnameforga"));var c=a.find("img").attr("data-productname")||a.find("img").attr("alt");a=a.closest(".cmp-carousel__item").attr("data-swiper-slide-index");a=void 0!==a?Number(a)+1:1;if("CN"==honorConfig.siteCode){var d={actionCode:"select_product",eventType:"2",content:{event_name:"select_product",product_name:c,position:"Banner_"+a,button_name:b}};
14window.sendDapData&&window.sendDapData(d)}window.dataLayer&&window.dataLayer.push({event:"select_product",product_name:c,position:"Banner_"+a,button_name:b});YandexCommon.track("select_product",{product_name:c,position:"Banner_"+a,button_name:b})});$(document).on("click",".new-home-banner-comp .home-banner-content-btn-buy,.new-home-banner-comp .btn-group .buy_button",function(b){var a=$(this);b=$.trim(a.data("txtnameforga"));var c=$.trim(a.closest(".product-content-warp").find(".new-home-banner-content-title-image img").attr("data-productname"))||
15$.trim(a.closest(".new-home-banner-wrap").find(".product-title").attr("ganame"))||$.trim(a.closest(".product-content-warp").find(".new-home-banner-content-title-image img").attr("alt"));a=a.closest(".cmp-carousel__item").attr("data-swiper-slide-index");a=void 0!==a?Number(a)+1:1;if("CN"==honorConfig.siteCode){var d={actionCode:"buy",eventType:"2",content:{event_name:"buy",product_name:c||"",position:"Banner_"+a,button_name:b}};window.sendDapData&&window.sendDapData(d)}window.dataLayer&&window.dataLayer.push({event:"buy",
16product_name:c||"",position:"Banner_"+a,button_name:b});YandexCommon.track("buy",{product_name:c||"",position:"Banner_"+a,button_name:b})});$(document).on("click",".new-home-banner-comp  .imgClick",function(b){b=$(this).parents(".new-home-banner-comp").find(".learn_more_button").eq(0).attr("href");window.location.href=b})},isShowNewBanner:function(b){var a=$(window).height(),c=$(window).scrollTop(),d=b.offset().top;b=b.height();return d<a+c-400&&d+b>c?!0:!1},newBannerShowGa:function(b){$(".cmp-carousel-hook").each(function(a){var c=
17$(this);newHomeBannerComp.isShowNewBanner(c)&&"false"!=c.attr("flag")&&(c.attr("flag","false"),a="",c=c.eq(0).find(".cmp-carousel__item[data-swiper-slide-index\x3d'0']"),0<c.find(".product-title").length?a=c.find(".product-title").attr("ganame")||"":0<c.find(".new-home-banner-content-title-image").length?a=c.find(".new-home-banner-content-title-image img").attr("alt")||"":0<c.find(".cnx-section-ga").length&&(a=c.find(".cnx-section-ga").attr("data-txtnameforga")||""),a=a.trim(),GTM.BannerExposure(1,
18a,a))})}};$(function(){if(0<$(".new-home-banner-comp").length||0<$(".new-home-config-content").length){$(".new-home-config-content .theme-dark").each(function(){$(this).parents(".new-home-config-content").addClass("theme-dark");$(this).css("visibility","visible")});newHomeBannerComp.init($(".new-home-banner-comp"));var b;$(window).on("scroll",function(){b&&clearTimeout(b);b=setTimeout(function(){newHomeBannerComp.newBannerShowGa()},500)})}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.