{"size": 4823, "ext": "js", "max_stars_repo_path": "tests/cdiscount/out_of_stock_files/recs.js", "max_stars_repo_name": "FLouisy/inventory-hunter", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tests/cdiscount/out_of_stock_files/recs.js", "max_issues_repo_name": "FLouisy/inventory-hunter", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tests/cdiscount/out_of_stock_files/recs.js", "max_forks_repo_name": "FLouisy/inventory-hunter", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 964.6, "max_line_length": 4755, "alphanum_fraction": 0.7209205888}
(function(n,t){var u=n.document,i="/Recommendations/",r="/AddToBasketManager.mvc";ajaxJson=function(n,r){t.ajax({url:i+n.route,type:"POST",dataType:"json",data:JSON.stringify(n),contentType:"application/json; charset=utf-8",cache:!1,async:!0,success:r})};t.init("recommendations",function(n){var r=n.siteRateCookieId,u=n.providerToTestA,f=n.providerToTestB,o=n.expectedCookieValue||"1",i=[],s=r+"."+o,e=t.cookies.isSiteVersionActive(s);t(".jsRecSwCarousel").each(function(){t.isTouch()&&t(this).addClass("isTouchCarrou")});t(".jsRecSwCarousel:empty").each(function(){var o=t(this),n=o.attr("data-provider"),s=o.attr("data-template"),c=o.attr("data-vertical")=="True"?!0:!1,h=o.attr("data-titleFormatter");(r=="-1"||!e&&n==u||e&&n==f||n!=u&&n!=f)&&i.push({id:this.id,provider:n,template:s,titleFormatter:h})});n.placements=i;(typeof n.siteMapNodeId=="undefined"||n.siteMapNodeId==0)&&(n.siteMapNodeId=t("#TechFormSiteMapNodeId").val());i.length>0?ajaxJson(n,function(i){i&&t(i.data).each(function(){var r=this.provider;t(this.recommendations).each(function(){var e=this.id,u=t("#"+e),h=this.recommendationRef,o=[],l=!!(t.contextPage&&t.contextPage.getTechForm()),c=u.attr("data-template"),f=null,s;t(i.templates).each(function(){if(this.key==c)return f=this.value,!1});this.products&&this.products.length&&(tempMus=Mustache.render(f!=null?f:i.template,this),u.html(tempMus),$recoSwCar=t(".jsSwCarousel",u),$recoSwCar?(s=typeof t.fn.raAddToBasket=="function",$recoSwCar.carouselSwipe(null,s)):t("img",u).lazyload(),t(".crItem",u).each(function(){var f=t(this),i=f.attr("data-sku"),u;f.hover(function(){o.indexOf(i)===-1&&(u=setTimeout(function(){var t=n;t.route="Interest";t.productId=i;t.recommendationId=h;t.interactedPlacementId=e;t.providerId=r;ajaxJson(t);o.push(i)},5e3))},function(){u&&clearTimeout(u)})}))})});t(".jsRecSwCarousel:empty").hide()}):t(".jsRecSwCarousel:empty").hide()});t.addRRProductToBasket=function(n,i,u){i===!0&&u?document.location.href=u:n&&t.ajax({type:"GET",url:r+"?pageType="+t("#hdnPageType").attr("value")+"&addMainProduct=true&isRichRelevanceProduct=true&productId="+n+"&isNotRrMaster=true&isForcedPageType=true",success:function(n){var i=typeof n=="object"?n:t.parseJSON(n);i.GoToUrl?document.location.href=i.GoToUrl:u&&(document.location.href=u)}})};t.fn.addToBasket==undefined&&(t.fn.addToBasket=t.addRRProductToBasket);t.getRRPriceInformations=function(n){var i="";return n&&n.push&&n.length>0?(n.sort(),i=t.ajax({type:"GET",url:PRICER_PROXY_URL+"?productidlist="+n.join(";"),success:function(n){return n}})):console.log("getProductPriceInformations: productIdList="+n),i&&!i.PricerServiceProxyError?t.parseJson(i):{}};t.init("Assembly",function(){var n=t("#selectedAssemblyId").val();if(i=t("#selectedAssemblyTitle").val(),n&&i){var i=t("#selectedAssemblyTitle").val(),r=t("#selectedAssemblyDescriptionFL").val(),u=t("#selectedAssemblyDescriptionSL").val();t("input[type='checkbox'][id^='ckselectedAssembly_']").prop("id","ckselectedAssembly_"+n);initSelectedValues(i,r,u);selecthiddenAssemb(n)}});n.setselectedAssemblyInfo=function(n,i,r,u){var e=t(n).is(":checked"),o=t("#assemblyContent"),f=getAssemblyId(t(n).attr("id"));e?(f!=""&&(t("#selectedAssemblyId").val(f),t("input[type='checkbox'][id^='ckselectedAssembly_']").prop("id","ckselectedAssembly_"+f),t("#selectedAssemblyTitle").val(i),t("#selectedAssemblyDescriptionFL").val(r),t("#selectedAssemblyDescriptionSL").val(u)),initSelectedValues(i,r,u),t(".jsfpAssembly",o).find("input[type=checkbox]:checked").removeAttr("checked"),t(n).prop("checked",!0),t("input[type='checkbox'][id^='ckselectedAssembly_']").prop("checked",!0),selecthiddenAssemb(f)):(t("input[type='checkbox'][id^='ckselectedAssembly_']").prop("checked",!1),removeSelectedValues(),unselecthiddenAssemb())};n.setselectedAssembly=function(n){var r=t(n).is(":checked"),u=t("#assemblyContent"),i="";i=getAssemblyId(t(n).attr("id"));r?(t("#selectedAssemblyId").val(i),t("#assembly_"+i).prop("checked",!0),selecthiddenAssemb(i)):(t(".jsfpAssembly",u).find("input[type=checkbox]:checked").removeAttr("checked"),removeSelectedValues(),unselecthiddenAssemb())};n.getAssemblyId=function(n){var i="",t;return n.indexOf("_")>=0&&(t=n.split("_"),t&&t[1]&&(i=t[1])),i};n.initSelectedValues=function(n,i,r){t("#selectedAssembly").html(n);t("#descriptionFL").html(i);t("#descriptionSL").html(r)};n.removeSelectedValues=function(){t("#selectedAssemblyId").val("");t("#selectedAssemblyTitle").val("");t("#selectedAssemblyDescriptionFL").val("");t("#selectedAssemblyDescriptionSL").val("")};n.selecthiddenAssemb=function(n){t("input[type='hidden'][id^='hassembly_']").val(!1);t("#hassembly_"+n).val(!0)};n.unselecthiddenAssemb=function(){t("input[type='hidden'][id^='hassembly_']").val(!1)}})(window,window.$fwk);
//# sourceMappingURL=recs.js.map

//# sourceMappingURL=recs.js.map
