1function Countquest(){function r(e){return e&&e.toString().replace(/\s/g,"")}this.onViewProduct=function(e,t,o,n){dataLayer.push({ecommerce:{detail:{actionField:{list:"Startsida",action:"detail"},products:[{name:e,id:t,price:r(o),category:n}]}}})},this.addToCart=function(e,o){var n={event:"addToCart",ecommerce:{currencyCode:"SEK",add:{products:[]}}};$.each(e,function(e,t){n.ecommerce.add.products.push({name:t.name,id:t.code,price:r(t.price),category:t.category,variant:t.variant,quantity:t.quantity,dimension7:o})}),dataLayer.push(n)},this.removeFromCart=function(e,t,o,n,i,a){dataLayer.push({event:"removeFromCart",ecommerce:{currencyCode:"SEK",remove:{products:[{name:e,id:t,price:r(o),category:n,variant:i,quantity:a}]}}})},this.openStandard=function(e,t){dataLayer.push({event:"openStandard",name:e,id:t})},this.previewStandard=function(e,t){dataLayer.push({event:"previewStandard",name:e,id:t})},this.promoClick=function(e,t,o,n){for(var i=-1,a=$(n).closest(".teaser")[0],r=$(".block .teaser"),s=0;s<r.length;s++)r[s]==a&&(i=s+1);dataLayer.push({event:"promoClick",ecommerce:{promoClick:{promotions:[{id:e,name:t,creative:o,position:i}]}}})},this.promoView=function(e,t,o,n){dataLayer.push({event:"promoView",ecommerce:{promoView:{promotions:[{id:e,name:t,creative:o,position:n}]}}})},this.promoViews=function(e){dataLayer.push({event:"promoView",ecommerce:{promoView:{promotions:e}}})},this.productImpression=function(e,t,o,n,i,a){dataLayer.push({event:"impressions",ecommerce:{impressions:[{id:e,name:t,price:o,category:n,list:i,position:a}]}})},this.productImpressions=function(e){dataLayer.push({event:"impressions",ecommerce:{impressions:e}})},this.checkOut=function(e,t,o){var n={event:"checkout",ecommerce:{checkout:{actionField:{step:e},products:[]}}};return $.each(t,function(e,t){n.ecommerce.checkout.products.push({name:t.name,id:t.code,price:r(t.price),category:t.category,variant:t.variant,quantity:t.quantity})}),dataLayer.push(n),!0},this.purchase=function(e,t){var o={event:"purchase",ecommerce:{purchase:{actionField:{id:e.id,revenue:r(e.revenue),tax:r(e.tax),shipping:e.shipping,coupon:e.coupon},products:[]}}};return $.each(t,function(e,t){o.ecommerce.purchase.products.push({name:t.name,id:t.code,price:r(t.price),category:t.category,variant:t.variant,quantity:t.quantity})}),dataLayer.push(o),!0},this.pushEvent=function(e,t,o){return dataLayer.push({event:"trackEvent",eventCategory:e,eventAction:t,eventLabel:o}),!0},this.logLogin=function(){""!==getCookie("loginSuccess")&&(deleteCookie("loginSuccess"),dataLayer.push({event:"login",loginResult:"success"}))}}var form=$("#EuroCodeForm"),$elements=form.find("input.validate, textarea.validate, select.validate");function ValidateEuroCodeFormWhole(e){e=e||window.event,validateJqueryInputElements($elements)||e.preventDefault()}$(function(){$(".formcontainerblock").on("keypress",".FormCaptcha .FormCaptcha__Input",function(e){13===e.which&&(e.preventDefault(),$(this).parent().parent().find(".Form__Submit .FormSubmitButton").click())}),"undefined"!=typeof $$epiforms&&$$epiforms(document).ready(function(){$$epiforms(".EPiServerForms").on("formsSubmitted",function(e,t,o){$(".Form__SubmitSuccessMessage").show()})})});var constraints={email:{presence:{message:"^Du måste ange en E-postadress"},email:{message:"^E-postadressen har fel format"}},firstname:{presence:{message:"^Du måste fylla i ett förnamn"}},lastname:{presence:{message:"^Du måste fylla i ett efternamn"}},organization:{presence:{message:"^Du måste fylla i en organisation"}},phone:{presence:{message:"^Du måste ange ett telefonnummer"},format:{pattern:"^[0-9-+ ]*$",message:"^Telefonnummret har fel format"}},swedish:{presence:{message:"^Du måste bekräfta"},inclusion:{within:[!0],message:"^Du måste kryssa i checkboxen"}},acceptedterms:{presence:{message:"^Du måste bekräfta"},inclusion:{within:[!0],message:"^Du måste kryssa i checkboxen"}}};function showErrorsForInputWithJquery(o,e){var n=!0,i=o.parent("div.form-group");return i.removeClass("has-error"),i.find("span.help-block.has-error").remove(),$.each(e,function(e,t){e.toLowerCase()===o.attr("name").toLowerCase()&&(i.addClass("has-error"),i.append('<span class="help-block has-error">'+t+"</span>"),n=!1)}),n}function validateJqueryInputElements(e){var n=Object(),t=!0,o=(e.each(function(){var e=$
1(this),t=e.attr("name").toLowerCase(),o=e.val();e.is(":checkbox")&&(o=!0===e.prop("checked")),n[t]=o}),JSON.stringify(n)),i=validate(JSON.parse(o),constraints)||{};return e.each(function(){showErrorsForInputWithJquery($(this),i)||(t=!1)}),t}$(function(){$("input.validate, textarea.validate, select.validate").each(function(){$(this).on("focusout",function(e){var t=$(this),o=t.attr("name").toLowerCase(),n=t.val(),i=(t.is(":checkbox")&&(n=!0===t.prop("checked")),Object()),o=(i[o]=n,JSON.stringify(i));showErrorsForInputWithJquery(t,validate(JSON.parse(o),constraints)||{})})})});var kooverridden=ko.bindingHandlers.html.update;function AlternativeChange(e){$("#AlternativeInvoiceAddress").change(function(e){toggleVisibilityElements($(this).id)})}function toggleVisibilityElements(e){$("[visibility-constraint]").hide(),$("[visibility-constraint]").each(function(e){$($(this).attr("visibility-constraint")).is(":checked")?$(this).show():$(this).find("input:checkbox").prop("checked",!1)})}ko.bindingHandlers.html.update=function(e,t){var o;8===e.nodeType?null!=(o=ko.unwrap(t()))?(o=ko.utils.parseHtmlFragment(""+o),ko.virtualElements.setDomNodeChildren(e,o)):ko.virtualElements.emptyNode(e):kooverridden(e,t)},ko.virtualElements.allowedBindings.html=!0,$(function(e){AlternativeChange(e)}),$(document).on("click","#userinformation-form *",function(e){var t;e.stopPropagation(),"my-settings-submit"===e.target.id&&($("#userinformation-form").submit(),AlternativeChange(e),(t=$("#my-settings-submit")).toggleClass("btn-greyed-out"),t.addAttr("disabled")),"AlternativeInvoiceAddress"===e.target.id&&AlternativeChange(e)}),$("#userinformation-form").on("keyup change paste","input, select, textarea",function(){var e=$
1("#my-settings-submit");e.toggleClass("btn-greyed-out"),e.removeAttr("disabled")});var $body,$window=$(window),$html=$(document.documentElement),animationSpeed=(window.displayLanguage="sv"===$("html").attr("lang")?"sv-SE":"en-US",0);if(window.matchMedia("(prefers-reduced-motion: no-preference)").matches&&(animationSpeed=250),$.fx.speeds._default=animationSpeed,0!==(translations=$("#js-translations")).length){var kvp,translations=$(translations).children(),jsTranslations={};for(kvp of translations)jsTranslations[kvp.name]=kvp.value}function showLoadingImage(e){$(e).append('<div id="loading-image"><img src="/static/images/ajax_loader.gif" alt="Loading..." /></div>')}function hideLoadingImage(e){$(e).find("#loading-image").remove()}function isJson(e){e="string"!=typeof e?JSON.stringify(e):e;try{e=JSON.parse(e)}catch(e){return!1}return"object"==typeof e&&null!==e}$(function(){$body=$(document.body),$.ajaxSetup({cache:!1})}),$html.hasClass("no-js")&&$html.removeClass("no-js"),$("#heroSearch").focus(function(){$(".hero-block-shadow").addClass("active")}),$("#heroSearch").blur(function(){$(".hero-block-shadow").removeClass("active")}),$(function(){$(".mega-menu li:has(ul)").addClass("has-children")}),$(document).on("click","#navbar-mobile .has-mega-menu a, .navbar-nav .has-children a",function(e){var t,o,n,i,a;991<window.innerWidth||(a=$(this),t=window.currentMenu||a.parent("li").parent("ul"),o=t.closest(".
1navbar-nav-wrapper"),n=a.siblings(".mega-menu").length?(i=a.siblings(".mega-menu").find(">ul").children().clone(),$("<ul>").append(i)):a.siblings("ul").clone(),i=a.clone().addClass("back-button").data("back-to",t).click(function(){var e=$(this),t=(e.parent().nextUntil(":not(:has(.back-button))").children("a.back-button").each(function(){$(this).data("back-to").remove()}),e.data("back-to"));o.animate({height:t.height()},function(){t.animate({left:0,marginLeft:0}),window.currentMenu.animate({left:"100%"},function(){window.currentMenu.remove(),window.currentMenu=t})})}),a=t.find(".back-button").parent().clone(!0),i.addClass("back-button--level-"+a.length),(a=$("<a />",{href:i.attr("href"),text:o.data("prefix")+" "+i.text()})).wrapInner("<strong></strong>"),i.attr("href","#"),i.text(o.data("back")),n.prepend($("<li>").append(a)),n.prepend($("<li>").append(i)),n.addClass("nav navbar-nav menu-clone").appendTo(o),0!==n.length&&(a=function(){var e;t.is(".menu-clone")?t.animate({left:"-100%"},e):t.animate({marginLeft:"-100%"},e),n.animate({left:0},void 0)},o.animate({height:n.height()},a),window.currentMenu=n,e.preventDefault()))}),$(function(){$("li.has-mega-menu").hoverIntent({over:function(){$(this).parent().find("li.has-mega-menu").removeClass("hover"),$(this).addClass("hover")},timeout:350,out:function(){$(this).removeClass("hover")}})}),$(function(){var o={};function e(){$.each(o,function(e,t){var n=0;$.each(t,function(e,t){t.css({paddingTop:"",paddingBottom:""})}),1<t.length?$.each(t,function(e,t){n=Math.max(t.outerHeight(),n)}):$(e).each(function(){n=Math.max($(this).outerHeight(),n)}),$.each(t,function(e,t){var o=t.height(),o=(n-o)/2;t.css({paddingTop:o+"px",paddingBottom:o+"px"})})})}
1$("[same-height-as]").each(function(){var e=$(this),t=e.attr("same-height-as");t in o||(o[t]=[]),o[t].push(e)}),0<$("[same-height-as]").length&&(e(),$(window).resize($.throttle(100,e)))}),$(function(){var e="Nästa",t="Förra";"en-US"===window.displayLanguage&&(t="Previous",e="Next"),$(".carousel").slick({speed:300,slidesToShow:4,slidesToScroll:1,prevArrow:'<a title="'+t+'" href="#" class="slick-prev"></a>',nextArrow:'<a title="'+e+'" href="#" class="slick-next"></a>',responsive:[{breakpoint:1200,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:992,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:2,slidesToScroll:1}}]})}),$.fn.hasAttr=function(e){var t=this[0];return t.hasAttribute?t.hasAttribute(e):void 0!==t[e]},$.fn.addAttr=function(e){this.attr(e,"")},$.fn.resetViews=function(){this.hasAttr("initial-view")&&(this.attr("current-view",this.attr("initial-view")).removeAttr("initial-view").removeAttr("history"),this.children().removeAttr("previous-view").css({top:"",display:""}))},$.fn.showView=function(e){var t,o,n,i,a,r=this;0!==this.length&&(t=r.attr("current-view"),o=r.children(t),n=r.children(e),r.hasAttr("initial-view")||(r.height(r.height()),r.attr("initial-view",t)),0===r.height()&&r.trigger($.Event("show.sis.pane")),t===e?r.animate({height:o.outerHeight()}):(r.attr("current-view",e),i=r.hasAttr("history")?r.attr("history").split(" "):[],n.hasAttr("previous-view")?(n.removeAttr("previous-view"),e=i.slice($.inArray(e,i)+1),$.each(e,function(e,t){r.children(t).removeAttr("previous-view").css({left:"",marginLeft:""})}),a=n.outerHeight(),n.css({top:-a}).show(),r.animate({height:a}),o.animate({top:a},function(){o.hide()})):(i.push(t),r.attr("history",i.join(" ")),o.addAttr("previous-view"),e=o.outerHeight(),a=n.outerHeight(),n.css({top:e}).show(),r.animate({height:a}),o.animate({top:-e},function(){o.hide()})),n.animate({top:0},function(){n.find("input").first().focus()})))},$(document).on("click","[view-switcher] [switch-to]",function(e){var t=$(this);t.closest("[view-switcher]").showView(t.attr("switch-to"))}),$(document).on("click","[view-switcher] [cancel]",function(e){var t=$(this).closest("[view-switcher]");t.animate({height:0},function(){t.resetViews()})}),$(document).on("click","[show-view]",function(e){e.preventDefault();var e=$(this).attr("show-view"),t=$(e).closest("[view-switcher]"),e=e.split(/[ >]+/).pop();t.showView(e)}),$(function(){$("[view-switcher]").each(function(){var t=$(this);$(window).resize($.throttle(100,function(){var e;0!==t.height()&&(e=t.attr("current-view"),e=t.children(e),t.children("[previous-view]"),e=e.outerHeight(),t.height(e))}))})});var collapseCloseButtonsToToggle=$();function cartMobileMenuSimultaneously(e){e.matches&&($(document).on("show.bs.collapse","#navbar-collapse",function(e){var t=$("#shopping-cart");t.is(":visible")&&t.collapse("hide")}),$(document).on("show.bs.collapse","#shopping-cart",function(e){var t=$("#navbar-collapse");t.is(":visible")&&t.collapse("hide")}))}$(document).on("show.bs.collapse",function(e){var t,e=$(e.target).attr("id");"my-sis-pane"===e&&(null!=(t=ko.contextFor(document.getElementById("order-container")).$data)&&t.GetOrders(),null!=(t=ko.contextFor(document.getElementById("my-standards")).$data)&&t.GetStandards(),null!=(t=ko.contextFor(document.getElementById("my-services-block")).$data))&&t.GetServices(),collapseCloseButtonsToToggle.length?collapseCloseButtonsToToggle.show():collapseCloseButtonsToToggle=$('[data-toggle="collapse"][data-target="#'+e+'"].hidden').removeClass("hidden")}),$(document).on("hide.bs.collapse",function(e){collapseCloseButtonsToToggle.hide()});var $heroListBlockSimultaneously,navbarH,x=window.matchMedia("(max-width: 700px)");function PopulateOfferModal(e,t,o,n){$("#offer-modal-summary #ProductTitle").text(e),$("#offer-modal-summary #ProductEdition").text(o);let i=$("#offer-modal-summary #ProductLanguageContainer");i.find("span.icon_lang_text").remove(),n.forEach(function(e,t){var o=document.createElement("span");o.className="icon_lang_text "+e,i.append(o)}),$("#offer-form #ProductTitle").val(e),$("#offer-form #ProductId").val(t),$("#offer-form #ProductEdition").val(o),$("#offer-form #ProductLanguages").val(n.join(",").replaceAll("icon_lang_",""))}function sendExtendSubscriptionEmail(){event.preventDefault();var e,t,o=$("#subscriptionFormName").text(),n=(""===o&&(o=$("#subscriptionFormNametxt").val()),$("#subscriptionFormEmail").text());""===(n=""===n?$("#subscriptionFormEmailtxt").val():n)||""===o?$("#suggest-abo-add-dialog-required-field-missing").show():($("#suggest-abo-add-dialog-required-field-missing").hide(),e=$("input[name=adminGroup]:checked").val(),t=$("#subscriptionFormComment").val(),$.ajax({type:"POST",url:"/api/extendSubscription/SendForm?productId="+currentProduct+"&admin="+e+"&user="+o+"&userEmail="+n+"&comment="+t,success:function(e){("Ok"==e.data?($(".ui-button-icon").attr("onClick","$('#suggest-abo-add-dialog-sent').attr('style','display:none');$('#suggest-abo-add-dialog').dialog('close');$('#suggest-abo-add-dialog-form').show();"),$("#suggest-abo-add-dialog-form").hide(),$("#suggest-abo-add-dialog-error").hide(),$("#suggest-abo-add-dialog-sent")):$("#suggest-abo-add-dialog-error")).show()},error:function(e,t,o){console.log(":-(")}}))}function sendOfferEmail(e,t){event.preventDefault(),$.ajax({type:"POST",url:"/api/offer/sendoffer?productId="+e+"&subscriptionId="+t+"&other="+$("#otherText").val(),success:function(e){$("#offertForm").hide(),$("#formSent").show()},error:function(e,t,o){console.log(":-(")}})}cartMobileMenuSimultaneously(x),x.addListener(cartMobileMenuSimultaneously),x.matches&&($heroListBlockSimultaneously=$(".hero-list-block")).on("click",function(){$heroListBlockSimultaneously.find(".collapse.in").collapse("hide")}),$(document).on("click",".panel--expandable .panel-heading",function(e){$(this).closest(".panel").toggleClass("panel--expanded")}),$(document).on("click",".list-group-item--expandable .list-group-item--expandable-head",function(e){$(this).closest(".list-group-item").toggleClass("list-group-item--expanded")}),$(function(){setTimeout(function(){$('[data-toggle="popover"]').popover({placement:"left"})},1e3)}),$(function(){$(".datepicker").datepicker(),$(".datepicker-button").click(function(){$(this).siblings(".datepicker").focus()})}),$(function(){var e;"hide"===Cookies.get("systembar")||$(".systembar").length||(e=$('<div class="systembar" style="display:block;">'),$("<span>").append(window.systemMessage).appendTo(e),$('<a href="#">').addClass("button").click(function(){$(".systembar").hide(),Cookies.set("systembar","hide",{path:"/",secure:!1,domain:""})}).append(window.systembarButton).appendTo(e),e.prependTo(document.body))}),$(document).on("click",".book-course-table-remove",function(){var e;confirm("Ãr du säker pÃ¥ att du vill ta bort deltagaren?")&&(e=$(this).closest("tr")).animate({opacity:0}
1,function(){setTimeout(function(){e.remove()},500)})}),$(document).on("click",".order-item",function(){var e=$(this),t=!e.hasClass("order-item--expanded");e.toggleClass("order-item--expanded",t);e=e.next(".order-detail").find(".order-detail-inner");t&&e.hide().slideDown()}),$(document).on("click",".expand-area, .contract-area",function(){var e,t=$(this),o=t.prev(".expand-area, .contract-area");o.length||(o=t.next(".expand-area, .contract-area")),e=(t.prev().is(".expand-area, .contract-area")?t.prev():t).prev(),t.is(".expand-area")?e.show():e.hide(),t.hide(),o.css("display","block")}),$(function(){var t,o=$(".go-to-top");o.length&&(o.click(function(e){e.preventDefault(),$("html, body").animate({scrollTop:0})}),t=!1,$window.scroll($.throttle(500,function(e){100<$window.scrollTop()?t||(t=!0,o.animate({marginBottom:0})):t&&(t=!1,o.animate({marginBottom:-100})),$(window).scrollTop()+$(window).height()>=$(document).height()-70?o.addClass("bottom"):o.removeClass("bottom")})))}),null!==$("#hero-block")&&(navbarH=$("#navbar").height(),$("#hero-block").css("min-height","calc(100vh - "+navbarH+"px)")),(()=>{var e,t;void 0!==window.top.epi&&void 0!==window.top.epi.shell&&(e=document.getElementsByTagName("head")[0],(t=document.createElement("style")).appendChild(document.createTextNode("#hero-block { min-height: unset!important; padding:150px 0px; }")),e.appendChild(t))})(),$(document).on("click",'a[href="#"]',function(e){e.preventDefault()}),$(document).on("submit","#userinformation-form",function(t){t.preventDefault();var e=$(t.target).serialize(),o=t.target.action;$.ajax({type:"POST",url:o,data:e,success:function(e){$(t.target).html(e),$(".TypeOfMembership").on("change",function(e){$(".company-fields").toggle()})}})}),$("#offerModal").on("show.bs.modal",function(e){$("#js-offer-form-success-message").addClass("d-none"),$("#js-offer-form-error-message").addClass("d-none"),$("#offer-form").removeClass("d-none")}),$(document).on("submit","#offer-form",function(t){t.preventDefault(),$("#offer-form-submit").attr("disabled",!0),$("#offer-form-close").attr("disabled",!0),$(".validation-message").each(function(){$(this).text("")});var e=$(t.target).serialize(),o=t.target.action;$.ajax({type:"POST",url:o,data:e,success:function(e){e.success?($(":input","#offer-form").not(":button, :submit, :reset, :hidden").val(""),$(t.target).addClass("d-none"),$("#js-offer-form-error-message").addClass("d-none"),$("#js-offer-form-success-message").removeClass("d-none")):$.each(e.errors,function(){var e=$
1("[data-valmsg-for="+this.key+"]");e.html(this.errors.join()),e.removeClass("field-validation-valid")}),$("#offer-form-submit").attr("disabled",!1),$("#offer-form-close").attr("disabled",!1)},error:function(e){$("#js-offer-form-success-message").addClass("d-none"),$("#js-offer-form-error-message").removeClass("d-none").text(e.responseJSON.message),$("#offer-form-submit").attr("disabled",!1),$("#offer-form-close").attr("disabled",!1)}})}),$("textarea[maxlength]").each(function(){var e=$(this),t=e.attr("maxlength"),o=$('<small class="text-muted d-block mt-1"></small>');function n(){o.text(e.val().length+"/"+t)}e.after(o),e.on("input",n),n()}),$(function(){function e(e){$("#suggest_abo_designation").html(e),$("#suggest-abo-add-dialog").dialog({height:"auto",autoOpen:!0,closeOnEsc:!0,modal:!0,width:600})}$(document).on("click",".suggest-abo-add",function(){e()}),$(document).on("click",".suggest-abo-add-search",function(){currentProduct=$(this).data("productid"),e($(this).data("designation"))})});var imgTB12,imgTB8,inputs=document.querySelectorAll(".inputfile");function AddRemoveFavouriteIcs(e,t){return $.getJSON("/api/subscription/favourite/addremovefavouriteICS",{codes:e,publisher:t}).done(function(e){$("#icsFavorites").css("opacity",1)})}function heroScale(){$(".hero .hero-image img").css("min-height",$(".hero .hero-text").height()+150+"px")}function imgTeaserH(e){for(var t=0;t<e.length;t++){var o=e[t].getElementsByClassName("text-main")[0].scrollHeight;320<o&&$(e[t]).css("min-height",50+o+"px")}}Array.prototype.forEach.call(inputs,function(e){var o=e.nextElementSibling,n=o.innerHTML;e.addEventListener("change",function(e){var t="";(t=this.files&&1<this.files.length?(this.getAttribute("data-multiple-caption")||"").replace("{count}",this.files.length):e.target.value.split("\\").pop())?o.querySelector("span").innerHTML=t:o.innerHTML=n})}),$("#UserFile").change(function(e){var t=$("#addFile > #btnSubmit");0<this.files.length&&(t.removeAttr("disabled"),t.removeClass("btn-greyed-out"),t.addClass("btn-secondary"))}),$("#icsFavorites input").click(function(e){$("#icsFavorites").css("opacity",.5);var t,o=$(this).val().split("|"),n=o[0],i=o[1],a=n,r=$("#subscribedIcsList").val().split(";"),s=$(this).prop("checked");for(t in r){var c,l=r[t];l.startsWith(n)&&(c=l+"|"+i,$('input[type=checkbox][value="'+c+'"]').prop("checked")!==s)&&($('input[type=checkbox][value="'+c+'"]').prop("checked",s),a+=";"+l)}AddRemoveFavouriteIcs(a,i)}),$('#icsNotificationPreferences input[type="radio"][name="icsPref"]').click(function(e){var t=$(this).val();return $.getJSON("/api/subscription/favourite/UpdateMailNotificationPreferences",{preference:t})}),$(function(){0<$("#icsSelectorDiv").length&&($(document).on("change","input[name=icsPref]",function(){"1"===$(this).val()?$("#icsSelectorDiv").show(250):$("#icsSelectorDiv").hide(250)}),"1"===$("input[name=icsPref]:checked").val()?$("#icsSelectorDiv").show(250):$("#icsSelectorDiv").hide(250))}),$(document).on("click","#icsFilter input",function(e){var t=$(this).val(),o=$(this).prop("checked");$('input[type=checkbox][name="ics"][value^="'+t+'"]').prop("checked",o)}),$(function(){function e(){$(".toolbox").addClass("admin--loggedin")}function t(){$(".nav.navbar-nav li").each(function(){$(this).hasClass("has-mega-menu")||$(this).addClass("active admin--loggedin")})}var o=(o=window.location.pathname).replace(/\/$/,"/");o=decodeURIComponent(o),$(".nav.navbar-nav a").each(function(){var e=$
1(this).attr("href");o.substring(0,e.length)===e&&$(this).closest(".nav.navbar-nav > li").addClass("active")}),$("input[name='showOnlyInSubscription']").length&&(e(),t()),"undefined"!=typeof currentProduct&¤tProduct&&0<currentProduct.length&&$("#mysismenu").length&&(e(),t()),"undefined"!=typeof bookProduct&&bookProduct&&0<bookProduct.length&&$("#mysismenu").length&&(e(),t())}),$('[data-toggle="tooltip"]').tooltip(),$(function(){0<$("#hero-block").length&&(heroListPlacement(),$window.resize($.throttle(100,heroListPlacement)))}),$(function(){0<$(".hero .hero-text").length&&(heroScale(),$window.resize($.throttle(100,heroScale)))}),0<$(".img-teaser").length&&(imgTB12=$(".img-teaser.col-sm-12"),imgTB8=$(".img-teaser.col-sm-8"),imgTeaserH(imgTB12),imgTeaserH(imgTB8));var GdprCheckbox=!1,Recaptcha=!1,ContractCheckbox=!1,SwedishCheckbox=!1;function recaptchaCallback(){Recaptcha=!Recaptcha,toggleSubmitBtn()}function recaptchaExpired(){Recaptcha=!Recaptcha,toggleSubmitBtn()}function toggleSubmitBtn(e){var t=$("#btnSubmit").attr("disabled"),o=!0;!$("#contract-checkbox").length||ContractCheckbox&&SwedishCheckbox===0<$("#swedish-checkbox").length||(o=!1),Recaptcha&&GdprCheckbox&&o&&void 0!==t&&!1!==t?$("#btnSubmit").removeAttr("disabled"):Recaptcha&&GdprCheckbox&&o||void 0!==t&&!1!==t||$("#btnSubmit").addAttr("disabled")}$("#gdpr-checkbox").is(":checked")&&$("#gdpr-checkbox").removeAttr("checked"),$("#contract-checkbox").is(":checked")&&$("#contract-checkbox").removeAttr("checked"),$("#swedish-checkbox").is(":checked")&&$("#swedish-checkbox").removeAttr("checked"),$("#gdpr-checkbox").change(function(e){GdprCheckbox=!GdprCheckbox,toggleSubmitBtn()}),$("#contract-checkbox").change(function(e){ContractCheckbox=!ContractCheckbox,toggleSubmitBtn()}),$("#swedish-checkbox").change(function(e){SwedishCheckbox=!SwedishCheckbox,toggleSubmitBtn()}),$.fn.isOnScreen=function(e){var t=$(window),o={top:t.scrollTop(),left:t.scrollLeft()},t=(o.right=o.left+t.width(),o.bottom=o.top+t.height(),this.offset());return t.right=t.left+this.outerWidth(),t.bottom=t.top+this.outerHeight(),!(o.right<t.left||o.left>t.right||o.bottom<t.top+this.outerHeight()*e||o.top>t.bottom)},$(function(){var i=[],a=$(".block .teaser");function e(){for(var e=0,t=[],o=0;o<a.length;o++){var n=$(a[o]);e++,n.isOnScreen(.5)&&i.indexOf(e)<0&&(i.push(e),t.push({id:n.data("id"),name:n.data("name"),creative:n.data("creative"),position:e}))}0<t.length&&(new Countquest).promoViews(t)}0<a.length&&$window.scroll($.throttle(1e3,e)),e()}),$(function(){$(".teaser").on("click",function(){(new Countquest).promoClick($(this).data("id"),$(this).data("name"),$(this).data("creative"),this)})});var searchResultImpressions=[];function sendSearchResultImpressions(){for(var e=$(".search-result[data-productid]"),t=[],o=0;o<e.length;o++){var n=$(e[o]);n.isOnScreen(.5)&&searchResultImpressions.indexOf(n.data("productid"))<0&&(searchResultImpressions.push(n.data("productid")),t.push({id:n.data("productid"),name:n.data("name"),price:n.data("price"),category:n.data("category"),list:"Search results page",position:n.data("position")}))}0<t.length&&(new Countquest).productImpressions(t)}function toggleLanguage(e){e.preventDefault(),window.location.href=e.target.href+location.search+location.hash}function StopLoad(e){setTimeout(function(){$(e).parent(".loadingIframe").removeClass("loadingIframe"),$(e).css("opacity","1")},1500)}function getUrlParameter(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function changeUrlParam(o,e){var t="",n="",i=(-1==window.location.href.indexOf("?")?t=window.location.href+"?":(t=window.location.href+"&",n=o+"="+new URL(location.href).searchParams.get(o)+"&"),t.replace(n,""));null!==e&&($.isArray(e)?$.each(e,function(e,t){i=i+o+"="+t+"&"}):i=i+o+"="+e+"&"),window.history.replaceState("","",i.slice(0,-1))}function getCookie(e){for(var t=e+"=",o=window.document.cookie.split(";"),n=0;n<o.length;n++){var i=o[n].trim();if(0===i.indexOf(t))return i.substring(t.length,i.length)}return""}function deleteCookie(e){document.cookie=e+"=;max-age=0;;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;"}function OrderHistory(e,t,o){var n=this;n.showLoaderImage=ko.observable(!0),n.orders=ko.observableArray(),n.totalcount=ko.observable(0),n.GetOrders=function(e,t){return(n.orders().length<1||!0===o&&0<n.orders().length&&n.orders().length<n.totalcount)&&(n.showLoaderImage(!0),$.ajax({type:"GET",url:"/api/orderhistory/GetOrders?take="+e+"&offset="+n.orders().length+"&contactId="+t,cache:!1,timeout:3e4,retries:3,retryInterval:2e3,success:function(e){if(!isJson(e.data))return n.showLoaderImage(!1),this.retries--,0<this.retries?void $.ajax(this):void 0;null!=e.data&&(n.totalcount=e.data.totalCount,$.each(e.data.orders,function(){n.orders.push(new Order(this))}),n.showLoaderImage(!1)),$(".loading-orderhistory").hide()},error:function(e,t,o){n.showLoaderImage(!1),this.retries--,0<this.retries&&$.ajax(this)}})),!0},!0===t&&n.GetOrders()}function Order(e){var t=this;t.showLoaderItemsImage=ko.observable(!0),t.orderlineitems=ko.observableArray(),t.number=ko.observable(e.number),t.invoicenumber=ko.observable(e.invoiceNumber),t.date=ko.observable(e.created),t.total=ko.observable(e.total),t.tax=ko.observable(e.tax),t.billingcurrency=ko.observable(e.billingCurrency),t.discount=ko.observable(e.discount),t.status=ko.observable(e.status),null==e.shippingAddress&&(e.shippingAddress={FirstName:"",LastName:"",Line1:"",Line2:"",City:"",PostalCode:"",CountryName:""}),t.firstname=ko.observable(e.shippingAddress.FirstName),t.lastname=ko.observable(e.shippingAddress.LastName),t.line1=ko.observable(e.shippingAddress.Line1),t.line2=ko.observable(e.shippingAddress.Line2),t.city=ko.observable(e.shippingAddress.City),t.zipcode=ko.observable(e.shippingAddress.PostalCode),t.country=ko.observable(e.shippingAddress.CountryName),t.GetLineItems=function(){t.orderlineitems().length<1&&(t.showLoaderItemsImage(!0),$.getJSON("/api/orderhistory/GetOrderItems",{trackingNumber:t.number()}).done(function(e){null!=e.data&&$.each(e.data.items,function(){t.orderlineitems.push(new OrderLineItem(this))}),t.showLoaderItemsImage(!1)}))},t.GetInvoice=function(){var e="/api/orderhistory/GetInvoice?trackingNumber="+t.number();window.open(e,"_blank")}}function OrderLineItem(e){var t=this;t.name=ko.observable(e.name),t.category=ko.observable(e.category),t.subcategory=ko.observable(e.subCategory),t.description=ko.observable(e.description),t.quantity=ko.observable(e.quantity),t.price=ko.observable(e.price),t.pricetext=ko.observable(e.priceText),t.currency=ko.observable(e.currency),t.total=ko.observable(e.total),t.totaltext=ko.observable(e.totalText),t.discount=ko.observable(e.discount),t.discounttext=ko.observable(e.discountText),t.designation=ko.observable(e.designation),t.type=ko.observable(e.type)}function MyStandardsList(e,t,o){var n=this;n.showLoaderImage=ko.observable(!0),n.standards=ko.observableArray(),n.totalcount=ko.observable(0),n.Get
1Standards=function(){(n.standards().length<1||!0===o&&0<n.standards().length&&n.standards().length<n.totalcount)&&(n.showLoaderImage(!0),$.ajax({type:"GET",url:"/api/mystandards/GetTheStandards?take="+e+"&offset="+n.standards().length,cache:!1,timeout:1e4,retries:3,retryInterval:2e3,success:function(e){isJson(e.data)?null!=e.data&&(n.totalcount=e.data.totalCount,$.each(e.data.standards,function(){n.standards.push(new StandardReference(this))}),n.showLoaderImage(!1)):(n.showLoaderImage(!1),this.retries--,0<this.retries&&$.ajax(this))},error:function(e,t,o){n.showLoaderImage(!1),this.retries--,0<this.retries&&$.ajax(this)}}))},!0===t&&n.GetStandards()}function daysAgo(e){return Math.abs(Math.ceil((new Date(e).getTime()-(new Date).getTime())/864e5))}function StandardReference(e){var t=this;t.title=ko.observable(e.title),t.standardid=ko.observable(e.id),t.url=ko.observable(e.url),t.designation=ko.observable(e.designation),t.icon=ko.observable(e.icon),t.type=ko.observable(e.type),t.target=ko.observable(e.target),t.paymentDate=ko.observable(e.paymentDate),t.linkToAddendum=ko.observable(e.linkToAddendum)}function MyServices(e,t){var o=this;o.showLoaderImage=ko.observable(!0),o.services=ko.observableArray(),o.GetServices=function(){o.services().length<1&&(o.showLoaderImage(!0),$.getJSON("/api/subscription/GetServicesAndSubscriptions",{take:e}).done(function(e){o.showLoaderImage(!1),null!=e&&$.each(e,function(){o.services.push(new EnavService(this))})}))},!0===t&&o.GetServices()}function EnavService(e){var t=this;t.iconUrl=ko.observable(e.iconUrl),t.title=ko.observable(e.title),t.subId=ko.observable(e.subId),t.url=ko.observable(e.enavUrl),t.role=ko.observable(e.roles),t.typeOfAuthentication=ko.observable(e.typeOfAuthentication)}function isTouchDevice(){return"ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints}function AboPickerMenuClick(e,t){isTouchDevice()&&1<GetNumberOfSubscriptions()?"none"==$(".abo-picker-body").css("display")?$(".abo-picker-body").css("display","block"):$(".abo-picker-body").css("display","none"):AboPickerLinkClick(e,t),pushDataLayer()}function AboPickerLinkClick(t,o){if(Cookies.get("subscriptionId").toString()===t.toString())return ChangeSubscriptionSelection(t,o),!1;$.getJSON("/api/cart/subscriptioncartisempty",function(e){return null===e.data||!1!==e.data?(ChangeSubscriptionSelection(t,o),!1):!!confirm($("#emptysubscriptioncartquestion").val())&&void $.getJSON("/api/cart/emptysubscriptioncart",function(e){return ChangeSubscriptionSelection(t,o),!1})})}function ChangeSubscriptionSelection(e,t){Cookies.set("subscriptionId",e,{path:"/",secure:!1,domain:"",expires:30}),""!=t?window.location.href="en"===t?"/en/subscription?id="+e:"/abonnemang?id="+e:-1!=window.location.href.indexOf("/en/")?window.location.href="/en/subscription?id="+e:window.location.href="/abonnemang?id="+e}function GetNumberOfSubscriptions(){return $(".abo-picker-body").children().length-1}function NewsFeed(){var o=this;o.showLoaderImage=ko.observable(!0),o.results=ko.observableArray(),o.refresh=function(){var e=o.results().length,t=null!=$("#newsfeedinfinitescroll").data("abocontext");$.getJSON("/api/newsfeed/getmore",{pageId:$("#newsfeedinfinitescroll").data("pageid"),offset:e,pageSize:$("#newsfeedinfinitescroll").data("itemsperpage"),lang:window.displayLanguage,aboContext:t}).done(function(e){null!=e.data&&$.each(e.data.results,function(){o.results.push(this)}),o.showLoaderImage(!1)})},o.refresh()}if($(function(){$(".tablesorter").each(function(e,t){new Tablesort(t)})}),$(function(){0<$(".searchPage").length&&$window.scroll($.throttle(1e3,sendSearchResultImpressions))}),$(document).on("click",".menu-toggle",function(e){$(this).closest("li").toggleClass("expanded"),e.preventDefault()}),$(function(){$(".LightBoxPdf").on("click",function(e){e.stopPropagation(),e.stopImmediatePropagation();var t=$(e.target).attr("href");(t=null==t?$(e.target).parent().attr("href"):t).includes("sis.se")&&(t="/api"+t.split("/api")),e.preventDefault(),$.ajax({type:"GET",data:{pdfurl:t},url:"/Overlay/ShowOverlay",contentType:"html",success:function(e){$("body").append(e)}})}),$(".lightBoxLink").on("click",function(e){e.stopPropagation(),e.stopImmediatePropagation(),$(e.target).nextAll(".lightbox-modal").first().css("display",""),$(".embed-responsive:nth-child(2)").closest(".embed-responsive").removeClass("embed-responsive")}),$(".lightBoxLinkImg").on("click",function(e){e.stopPropagation(),e.stopImmediatePropagation(),$(e.target).parent().parent().next(".lightbox-modal").css("display",""),$(".embed-responsive:nth-child(2)").closest(".embed-responsive").removeClass("embed-responsive")})}
1),$(document).on("keydown",function(e){27===e.keyCode&&$(".lightbox-modal").hide()}),$(function(){$(".lightbox").after("<span class='lightbox-icon'></span>"),$(".lightbox").on("click",function(e){var t=$(this).data("lightbox"),o=$(this).data("lightboxtext"),n=$(this).data("download"),t="<div class='lightbox-modal'><div class='lightbox-content'><button class='lightbox-close'>x</button><img src='"+t+"' class='lightbox-image' />";(o||n)&&(t+="<div class='lightbox-text py-2'>"+o+"</div>"),n&&(t+="<a href='"+n+"' download target='_blank' class='lightbox-link'>Ladda ner</a>"),t+="</div></div>",$("body").append(t)}),$(document).on("click",".lightbox-icon",function(e){$(e.target).hasClass("blockLightbox")||$(this).prev(".lightbox").click()}),$(document).on("click",".lightbox-close, .lightbox-modal",function(e){$(e.target).hasClass("blockLightbox")?$(e.target).closest(".lightbox-modal").css("display","none"):($(e.target).hasClass("lightbox-modal")||$(e.target).hasClass("lightbox-close"))&&$(e.target).closest(".lightbox-modal").remove()})}),$(document).on("click",".toggle",function(e){e.preventDefault();e=$(this);e.next().hasClass("show")?(e.next().removeClass("show"),e.next().hide(),$(this).find("i").removeClass("fa-chevron-down").addClass("fa-chevron-right")):(e.parent().parent().find("li .inner").removeClass("show"),e.parent().parent().find("li .inner").hide(),e.parent().parent().find("li").find("i").removeClass("fa-chevron-down").addClass("fa-chevron-right"),e.next().toggleClass("show"),e.next().show(),$(this).find("i").removeClass("fa-chevron-right").addClass("fa-chevron-down"))}),null!==document.getElementById("large-order-container")&&$(window).scroll($.throttle(800,function(){var e;$(window).scrollTop()>=$(document).height()-$(window).height()-100&&0<(e=ko.contextFor(document.getElementById("large-order-container")).$data).orders().length&&e.GetOrders()})),null!==document.getElementById("large-order-container")&&ko.applyBindings(new OrderHistory(10,!0,!0),document.getElementById("large-order-container")),null!==document.getElementById("order-container")&&ko.applyBindings(new OrderHistory(5,!1,!1),document.getElementById("order-container")),$(window).scroll($.throttle(800,function(){var e;null!==document.getElementById("my-standards-page")&&$(window).scrollTop()>=$(document).height()-$(window).height()-100&&0<(e=ko.contextFor(document.getElementById("my-standards-page")).$data).standards().length&&e.GetStandards()})),null!==document.getElementById("my-standards")&&ko.applyBindings(new MyStandardsList(5,!1,!1),document.getElementById("my-standards")),null!==document.getElementById("my-standards-page")&&ko.applyBindings(new MyStandardsList(100,!0,!0),document.getElementById("my-standards-page")),null!==document.getElementById("my-services")&&ko.applyBindings(new MyServices(0,!0),document.getElementById("my-services")),null!==document.getElementById("my-services-block")&&ko.applyBindings(new MyServices(5,!1),document.getElementById("my-services-block")),$(".TypeOfMembership").on("change",function(e){$(".company-fields").toggle(),"true"===e.currentTarget.value?$("#alternativeAdressDiv").css("display","block"):$("#alternativeAdressDiv").css("display","none")}),$("#openmysismenu").click(function(e){isTouchDevice()&&(e.preventDefault(),"none"==$("#my-sis-pane").css("display")?$("#my-sis-pane").css("display","block"):$("#my-sis-pane").css("display","none"))}),$("#mysismenu").mouseenter(function(e){isTouchDevice()||$("#my-sis-pane").css("display","block")}),$("#mysismenu").mouseleave(function(e){$("#my-sis-pane").css("display","none")}),$(".abo-picker").mouseenter(function(e){!isTouchDevice()&&1<GetNumberOfSubscriptions()&&$(".abo-picker-body").css("display","block")}),$(".abo-picker").mouseleave(function(e){$(".abo-picker-body").css("display","none")}),$(function(){GetNumberOfSubscriptions()<=1&&$(".abo-picker").find(".caret").css("display","none")}),$(window).scroll($.throttle(500,function(){var e;null!==document.getElementById("newsfeedinfinitescroll")&&$(window).scrollTop()>=$(document).height()-$(window).height()-500&&0<(e=ko.contextFor(document.getElementById("newsfeedinfinitescroll")).$data).results().length&&e.refresh()})),null!==document.getElementById("newsfeedinfinitescroll")&&ko.applyBindings(new NewsFeed,document.getElementById("newsfeedinfinitescroll")),document.getElementById("searchPage")){let e=Vue.createApp({data(){return{openInMobile:!1,isMobile:window.matchMedia("(max-width: 700px)").matches,searchType:"",searchStatus:0,mountStatus:0,queryText:"",query:"",lastPage:!0,offset:0,lang:window.displayLanguage,pageId:0,statusFilter:[],typeFilter:[],categoryFilter:[],languageFilter:[],icsFilter:[],publisherFilter:[],statusFilterOpen:!1,typeFilterOpen:!1,categoryFilterOpen:!1,languageFilterOpen:!1,icsFilterOpen:!1,publisherFilterOpen:!1,searcharea:"all",showOnlyInSubscription:!1,trackId:"",resultCount:0,results:[],resultCountAdjusted:!1,percentage:0,productLists:[],productListsProductId:null,allIcsCodes:[]}},mounted:function(){var t=this,e=(window.matchMedia("(max-width: 700px)").addListener(function(e){t.isMobile=e.matches}),window.location.hash.substr(1).split("&").reduce(function(e,t){t=t.split("=");return e[t[0]]=t[1],e},{}));t.query=decodeURIComponent(e.q),null==t.query&&(t.query=""),this.showOnlyInSubscription=decodeURIComponent(e.sub),this.statusFilter=filterFromHash(e.s),this.typeFilter=filterFromHash(e.t),this.categoryFilter=filterFromHash(e.c),this.languageFilter=filterFromHash(e.l),this.publisherFilter=filterFromHash(e.p),this.icsFilter=filterFromHash(e.i),window.search=this.search,window.addEventListener("hashchange",function(){window.search()},!1),e&&this.search(!1,!0),$('[data-toggle="tooltip"]').tooltip(),$(window).scroll($.throttle(500,function(){$(window).scrollTop()>=$(document).height()-$(window).height()-1500&&(t.lastPage||this.search(!0))})),this.mountStatus=1},watch:{showOnlyInSubscription:{handler:"updateHash"},statusFilter:{deep:!0,handler:"updateHash"},typeFilter:{deep:!0,handler:"updateHash"},categoryFilter:{deep:!0,handler:"updateHash"},languageFilter:{deep:!0,handler:"updateHash"},publisherFilter:{deep:!0,handler:"updateHash"},icsFilter:{deep:!0,handler:"updateHash"}},methods:{updateHash:function(){"undefined"===this.query&&(this.query=""),null==this.showOnlyInSubscription&&(this.showOnlyInSubscription=!1);
1var e="q="+this.query,e=(e=(e=(e=(e=(e=(e+="&sub="+encodeURIComponent(this.showOnlyInSubscription))+("&s="+encodeURIComponent(activeFilter(this.statusFilter))))+("&t="+encodeURIComponent(activeFilter(this.typeFilter))))+("&c="+encodeURIComponent(activeFilter(this.categoryFilter))))+("&l="+encodeURIComponent(activeFilter(this.languageFilter))))+("&i="+encodeURIComponent(activeFilter(this.icsFilter))))+("&p="+encodeURIComponent(activeFilter(this.publisherFilter)));window.location.hash!==e&&window.location.replace("#"+e.replace(/^#/,""))},search:function(t,o){var n,e=$("#SearchKeywords");e.hasClass("ui-autocomplete-input")&&e.autocomplete("close"),1!=this.searchStatus&&((n=this).searchStatus=1,this.queryText=n.query,this.offset=!0===t?this.results.length:0,$.post("/api/search/getmoreresults",{query:this.query,offset:this.offset,lang:this.lang,pageId:this.pageId,types:activeFilter(this.typeFilter),category:activeFilter(this.categoryFilter),languages:activeFilter(this.languageFilter),ics:activeFilter(this.icsFilter),searcharea:this.searcharea,showOnlyInSubscription:this.showOnlyInSubscription,status:activeFilter(this.statusFilter),publisher:activeFilter(this.publisherFilter),first:o,trackId:this.trackId}).done(function(e){null!=e.data&&(n.showOnlyInSubscription=e.data.showOnlyInSubscription,n.statusFilter=e.data.statusFilter,n.typeFilter=e.data.typeFilter,n.publisherFilter=e.data.publisherFilter,n.languageFilter=e.data.languageFilter,n.icsFilter=e.data.icsFilter,n.resultCount=e.data.resultCount,n.lastPage=e.data.lastPage,!0===t?Array.prototype.push.apply(n.results,e.data.results):n.results=e.data.results,n.percentage=Math.ceil(n.results.length/n.resultCount*100),n.resultCountAdjusted=e.data.resultCountAdjusted,o&&(n.statusFilterOpen=0<n.statusFilter.filter(function(e){return e.isActive}).length,n.typeFilterOpen=0<n.typeFilter.filter(function(e){return e.isActive}).length,n.publisherFilterOpen=0<n.publisherFilter.filter(function(e){return e.isActive}).length,n.languageFilterOpen=0<n.languageFilter.filter(function(e){return e.isActive}).length,n.icsFilterOpen=0<n.icsFilter.filter(function(e){return e.isActive}).length),0===(e=n.typeFilter.filter(function(e){return e.isActive})).length?n.searchType="all":1===e.length?n.searchType=e[0].filterName:n.searchType=null),n.searchStatus=2}))},addToCart:function(e){AddToCartClick(e.codeForCart,e.standardIsInvalid,!0,!1)},sendReaderEvent:function(e,t){window.dataLayer.push({event:e,name:t.designation,id:t.productId})},searchTypeChange:function(t){this.typeFilter=this.typeFilter.map(function(e){return e.isActive=e.filterName==t.target.value,e}),this.typeFilterOpen=0<this.typeFilter.filter(function(e){return e.isActive}).length},clearFilter:function(){this.statusFilter=clearFilter(this.statusFilter),this.typeFilter=clearFilter(this.typeFilter),this.categoryFilter=clearFilter(this.categoryFilter),this.languageFilter=clearFilter(this.languageFilter),this.publisherFilter=clearFilter(this.publisherFilter),this.icsFilter=clearFilter(this.icsFilter)},toggleFavorite:function(e){AddRemoveFavourite(e.productId,e.isFavourite)},toggleProductInList:function(e){$.getJSON("/api/subscription/list/addremovelistproduct",{subscriptionId:getCookie("subscriptionId"),listId:e.value,productId:this.productListsProductId,add:e.selected})},showAllIcsCodes:function(){var c=this;0==c.allIcsCodes.length&&$.getJSON("/api/search/geticscodes",{language:c.lang}).done(function(e){c.allIcsCodes=e.data}),$("#allIcsCodes").dialog({modal:!0,transitionMask:!1,position:{my:"right+50 top+10",at:"bottom",of:window},title:$("#allIcsCodes").data("title"),dialogClass:"icsCodesDialog",open:function(){setTimeout(function(){for(var e in c.allIcsCodes){var t,o=c.allIcsCodes[e];for(t in-1!=(r=c.icsFilter.findIndex(e=>e.filterName==o.code))&&(o.selected=c.icsFilter[r].isActive),o.subCodes){var n,i=o.subCodes[t];for(n in r=c.icsFilter.findIndex(e=>e.filterName==i.code),i.selected=-1!=r,i.subCodes){var a=i.subCodes[n],r=c.icsFilter.findIndex(e=>e.filterName==a.code);a.selected=-1!=r}}}},100)},buttons:{OK:function(){var e,t,o=[];for(e in c.allIcsCodes){var n,i=c.allIcsCodes[e];for(n in i.selected&&o.push(i),i.subCodes){var a,r=i.subCodes[n];for(a in r.selected&&o.push(r),r.subCodes){var s=r.subCodes[a];s.selected&&o.push(s)}}}for(t in clearFilter(c.icsFilter),o)0==c.icsFilter.filter(function(e){e.filterName,o[t].code}).length&&c.icsFilter.push({filterName:o[t].code,isActive:!0,title:o[t].title});$(this).dialog("close")}}})},showListDialog:function(e){var t=this,o=getCookie("subscriptionId");this.productListsProductId=e.productId,$.getJSON("/api/subscription/list/getproductlists",{subscriptionId:o,productId:e.productId}).done(function(e){null!=e.data&&(t.productLists=e.data,$("#addremovelistproduct").dialog({modal:!0,transitionMask:!1,position:{my:"right+50 top+10",at:"bottom",of:window},title:"Välj lista",buttons:{OK:function(){$(this).dialog("close")}}}))})},PopulateOfferModalInSearch:function(e){PopulateOfferModal(e.title,e.productId,e.edition,e.langCodeList)}}});e.config.compilerOptions.comments=!0,e.mount("#searchPage")}function filterFromHash(e){return e?decodeURIComponent(e).split(",").map(function(e){return{isActive:!0,filterName:e}}):[]}function clearFilter(e){return e.map(function(e){return e.isActive=!1,e})}function activeFilter(e){return e?e.filter(function(e){return e.isActive}).map(function(e){return e.filterName}):null}
1function quickSearch(){var e=$("#search-area").data("searchpage");null==e&&(e=$("#hero-block").data("searchpage")),document.location.href=e+"#q="+$("#SearchKeywords").val()+"&t="+$("#searchTypeSelector").val()}function ShoppingCartLine(e){var t=this;t.code=ko.observable(e.code),t.displayName=ko.observable(e.displayName),t.unitPrice=ko.observable(e.unitPrice),t.discountedUnitPrice=ko.observable(e.discountedUnitPrice),t.unitPriceEur=ko.observable(e.unitPriceEur),t.discountedUnitPriceEur=ko.observable(e.discountedUnitPriceEur),t.quantity=ko.observable(e.quantity),t.category=ko.observable(e.category),t.subCategory=ko.observable(e.subCategory),t.designation=ko.observable(e.designation),t.iconUrl=ko.observable(e.iconUrl),t.productUrl=ko.observable(e.productUrl),t.includedItems=ko.observableArray(e.includedItems),t.languages=ko.observable(e.languages),t.langCodeList=ko.observable(e.langCodeList),t.shipping=ko.observable(e.shipping),t.totalPrice=ko.observable(e.totalPrice),t.totalPriceEur=ko.observable(e.totalPriceEur),t.translatedSubCat=ko.observable(!1),t.approvalDate=ko.observable(e.approvalDate),t.physicalVariant=ko.observable(e.physicalVariant),t.linkToAddendum=ko.observable(e.linkToAddendum),t.showWarning=ko.observable(e.showWarning);e.subCategory&&-1<["TILLVERKADE HANDBÃCKER","INKÃPTA HANDBÃCKER","HANDBOOKS MANUFACTURED","HANDBOOKS PURCHASED"].indexOf(e.subCategory.toUpperCase())&&t.translatedSubCat(!0)}function ShoppingCartArrayItem(e){var t=this,o=(t.orderId=ko.observable(e.orderId),t.sum=ko.observable(e.sum),t.sumEur=ko.observable(e.sumEur),t.shippingTotal=ko.observable(e.shippingTotal),t.shippingTotalEur=ko.observable(e.shippingTotalEur),t.vat=ko.observable(e.vat),t.vatEur=ko.observable(e.vatEur),t.total=ko.observable(e.total),t.totalEur=ko.observable(e.totalEur),t.orderDiscount=ko.observable(e.orderDiscount),t.orderDiscountEur=ko.observable(e.orderDiscountEur),t.checkoutPageUrl=ko.observable(e.checkoutPageUrl),t.couponCode=ko.observable(e.couponCode),t.couponText=ko.observable(e.couponText),t.cartItems=ko.observableArray(),t.cartItems.removeAll(),0);null!==e.cartItems&&$.each(e.cartItems,function(){t.cartItems.push(new ShoppingCartLine(this)),o+=this.quantity}),t.enableCheckout=ko.observable(0<o)}function ShoppingCart(){var i=this;i.shoppingCartArray=ko.observableArray([]),i.subscriptionIteamAdded=ko.observableArray([]),i.paymentType=ko.observable(),i.acceptTerms=ko.observable(!1),i.enableBuyButton=ko.observable(null),i.availableQuantities=ko.observableArray(),i.enableCheckout=ko.observable(!1),i.subscriptionComment=ko.observable(""),i.invoiceRef=ko.observable(""),i.showEur=ko.observable(!1),i.couponError=ko.observable(""),i.customPackagesInfo=ko.observable(""),i.customPackagesCount=ko.observable(0),i.customPackagesBought=ko.observable(0),i.subscriptionCheckoutThanks=ko.observable(!1),i.hideAddSubscription=ko.observable(!0),i.hideAddSubscriptionTk=ko.observable(!1),i.addToSubscriptionButtonDisabled=ko.observable(!1),i.refresh=function(){$.getJSON("/api/cart/getcart",{language:window.displayLanguage}).done(function(e){var t;null!=e.data&&((t=0)!=(t=null!==e.data[0].cartItems?e.data[0].cartItems.length:t)?($(".navbar-header-cart").text(t).addClass("filled-cart").removeClass("empty-cart"),$("#shopping-cart-button").text(t).css("background-image","url(/Static/images/SIS_Ikon_Shopping_has_items.svg)")):($(".navbar-header-cart").text("").addClass("empty-cart").removeClass("filled-cart"),$("#shopping-cart-button").text("").css("background-image","url(/Static/images/SIS_Ikon_Shopping.svg)")),i.showEur=ko.observable("EUR"===e.data[0].userCurrency),i.invoiceRef=ko.observable(e.data[0].invoiceReference),i.shoppingCartArray.removeAll(),i.hideAddSubscription(!0),!1===e.data[1].hideAddSubscription&&i.hideAddSubscription(!1),$.each(e.data,function(){var e=new ShoppingCartArrayItem(this);i.shoppingCartArray.push(e)}),void 0!==i.shoppingCartArray()[2].cartItems&&0<i.shoppingCartArray()[2].cartItems().length&&i.shoppingCartArray()[2].cartItems().some(e=>e.showWarning())&&i.addToSubscriptionButtonDisabled(!0),void 0!==i.shoppingCartArray()[2].cartItems&&0<i.shoppingCartArray()[2].cartItems().length&&!i.shoppingCartArray()[2].cartItems().some(e=>e.showWarning())&&i.addToSubscriptionButtonDisabled(!1),i.hideAddSubscriptionTk(e.data[2].hideAddSubscriptionTk),i.updateEnableBuyButton(),i.customPackagesInfo(e.data[2].customPackagesInfo),i.customPackagesCount(e.data[2].customPackagesCount),i.customPackagesBought(e.data[2].customPackagesBought))})},i.addToCart=function(e,t,o){$.getJSON("/api/cart/addtocart",{code:e,includestandardamendmentscorrections:t,addSingleCopy:o}).done(function(e){var t,o,n;void 0!==e.data.warningMessage?alert(e.data.warningMessage):(t=new Countquest,o=[],n="Produktsida",document.getElementById("searchinfinitescroll")&&(n="Sökresultat"),$.each(e.data,function(e,t){o.push({name:null!=t.designation?t.designation:t.displayName,code:t.code,price:null==t.discountedUnitPrice?t.unitPrice:t.discountedUnitPrice,category:t.category,variant:GetDeliveryTypeByCode(t.code),quantity:t.quantity})}),t.addToCart(o,n),i.refresh())})},i.changeCartItem=function(e){$.getJSON("/api/cart/changecartitem",{code:e.code(),quantity:e.quantity()}).done(function(e){i.refresh()})},i.removeFromCart=function(e){confirm("Ãr du säker pÃ¥ att du vill ta bort varan?")&&((new Countquest).removeFromCart(null!=e.designation()?e.de
1signation():e.displayName(),e.code(),null==e.discountedUnitPrice()?e.unitPrice():e.discountedUnitPrice(),e.category(),GetDeliveryTypeByCode(e.code()),e.quantity()),$.getJSON("/api/cart/changecartitem",{code:e.code(),quantity:0}).done(function(e){i.refresh()}))},i.addCouponCode=function(){var e=$("#coupon-code").val();null!=e&&$.getJSON("/api/checkout/addcouponcode",{couponCode:e}).done(function(e){"ok"===e.data?i.refresh():i.couponError(e.data)})},i.removeCouponCode=function(){$.getJSON("/api/checkout/removecouponcode",{couponCode:i.shoppingCartArray()[1].couponCode()}).done(function(){i.refresh()})},i.updateEnableBuyButton=function(){return"True"!=$("#login").val()?i.enableBuyButton("disabled"):i.acceptTerms()&&"0"===i.shoppingCartArray()[1].total()&&void 0!==i.shoppingCartArray()[1].cartItems&&0<i.shoppingCartArray()[1].cartItems().length&&(void 0===i.shoppingCartArray()[2].cartItems||0===i.shoppingCartArray()[2].cartItems().length)||i.acceptTerms()&&void 0!==i.paymentType()&&void 0!==i.shoppingCartArray()[1].cartItems&&0<i.shoppingCartArray()[1].cartItems().length&&(void 0===i.shoppingCartArray()[2].cartItems||0===i.shoppingCartArray()[2].cartItems().length)?i.enableBuyButton(void 0):i.enableBuyButton("disabled"),!0};for(var e=1;e<101;e++)i.availableQuantities.push(e);i.checkout=function(){var o=[];$.each(i.shoppingCartArray()[0].cartItems(),function(e,t){o.push({name:null!=t.designation()?t.designation():t.displayName(),code:t.code(),price:null==t.discountedUnitPrice()?t.unitPrice():t.discountedUnitPrice(),category:t.category(),variant:GetDeliveryTypeByCode(t.code()),quantity:t.quantity()})}),(new Countquest).checkOut(1,o),setTimeout(function(){document.location=i.shoppingCartArray()[0].checkoutPageUrl()},250)},i.purchase=function(){var e={id:i.shoppingCartArray()[1].orderId(),revenue:i.shoppingCartArray()[1].sum(),tax:i.shoppingCartArray()[1].vat(),shipping:i.shoppingCartArray()[1].shippingTotal(),coupon:i.shoppingCartArray()[1].couponCode()},o=[];return $.each(i.shoppingCartArray()[1].cartItems(),function(e,t){o.push({name:null!=t.designation()?t.designation():t.displayName(),code:t.code(),price:null==t.discountedUnitPrice()?t.unitPrice():t.discountedUnitPrice(),category:t.category(),variant:GetDeliveryTypeByCode(t.code()),quantity:t.quantity()})}),(new Countquest).purchase(e,o)},i.moveToDefault=function(){$.getJSON("/api/cart/movetocheckoutcart",function(){i.refresh()})},i.moveToSubscription=function(){$.getJSON("/api/cart/movetosubscriptioncart",function(e){"ok"!==e.data&&alert(e.data),i.refresh()})},i.finalizeAddToSubscription=function(){i.addToSubscriptionButtonDisabled(!0);var e=i.customPackagesCount(),t=$("#subscriptioncomment").val();i.subscriptionIteamAdded=i.shoppingCartArray()[2],$.getJSON("/api/cart/addtosubscription",{comment:t,numberOfCustomPackageProducts:e}).done(function(e){e.data.success?i.subscriptionCheckoutThanks(!0):alert(e.data.message),i.refresh()})},i.refresh()}$(function(){$("#search-area[data-searchpage] button, #hero-block button").on("click",function(e){quickSearch()}),$("#search-area[data-searchpage] #SearchKeywords, #hero-block #SearchKeywords").on("keypress",function(e){13==e.which&&quickSearch()})}),$(function(){$("#SearchKeywords").autocomplete({source:function(e,t){$.getJSON("/api/search/autocomplete",{term:e.term,lang:window.displayLanguage,searcharea:$("#searchTypeSelector").val()},function(e){return t(e.data)})},focus:function(e,t){e.preventDefault()},delay:500,minLength:2,appendTo:"#autocompletediv",select:function(e,t){window.location=t.item.value,e.preventDefault()}})});var shoppingCart=new ShoppingCart;function AddToCartClick(e,t,o,n){ko.contextFor(document.getElementById("shopping-cart")).$data.addToCart(e,o,n),"True"!==t&&!0!==t||$("#invalid-product-modal").modal(),$("#shopping-cart").collapse("show"),$("#shopping-cart-button").focus(),$("HTML, BODY").animate({scrollTop:0},300)}function GetDeliveryTypeByCode(e){return null!=e&&2<(e=e.split("-")).length?e[2]:""}function ConfirmBeforeDeleteUser(e,t){window.confirm(e)&&(window.location.href=t)}function GetProductLists(e,t,o){o.removeAll(),$.getJSON("/api/subscription/list/getproductlists",{subscriptionId:e,productId:t}).done(function(e){null!=e.data&&$.each(e.data,function(){o.push(this)})})}function AddRemoveListProduct(e,t,o,n){return $.getJSON("/api/subscription/list/addremovelistproduct",{subscriptionId:e,listId:t,productId:o,add:n})}function AddRemoveFavourite(e,t){return $.getJSON("/api/subscription/favourite/addremovefavourite",{productId:e,add:t,subscriptionId:0})}function SubscriptionUpdates(){var t=this;t.showLoaderImage=ko.observable(!1),t.results=ko.observableArray(),t.totalCount=ko.observable(0),t.percentage=ko.observable(0),t.dataLoaded=ko.observable(!1),t.refresh=function(){var e=t.results().length;(t.results().length<t.totalCount()||0===t.totalCount())&&!1===t.showLoaderImage()&&(t.showLoaderImage(!0),$.ajax({dataType:"json",url:"/api/subscription/updates/getmore",async:!0,data:{subscriptionId:$("#subscriptionupdatesinfinitescroll").data("subscriptionid"),startDate:$("#subscriptionupdatesinfinitescroll").data("startdate"),endDate:$("#subscriptionupdatesinfinitescroll").data("enddate"),offset:e,pageSize:$("#subscriptionupdatesinfinitescroll").data("itemsperpage"),lang:window.displayLanguage}}
1).done(function(e){null!=e.data&&(t.results.valueWillMutate(),ko.utils.arrayPushAll(t.results,e.data.results),t.results.valueHasMutated(),t.totalCount(e.data.totalCount),t.percentage(Math.round(ko.utils.unwrapObservable(t.results).length/e.data.totalCount*100))),t.showLoaderImage(!1),t.dataLoaded(!0)}))},t.refresh()}function SubscriptionListProducts(){var t=this;t.showLoaderImage=ko.observable(!1),t.results=ko.observableArray(),t.totalCount=ko.observable(0),t.percentage=ko.observable(0),t.selectedProduct=ko.observable(),t.subscriptionId=ko.observable(),t.productLists=ko.observableArray(),t.dataLoaded=ko.observable(!1),addToList(t,!0),infiniteScroll(t),addToFavourites(t),sessionStorage.getItem("listId")?$("#SelectedList").val(sessionStorage.getItem("listId")):sessionStorage.setItem("listId",$("#SelectedList").val()),t.refresh=function(){var e=$("#subscriptionlistproducts").data("itemsperpage");(t.results().length<t.totalCount()||0===t.totalCount())&&!1===t.showLoaderImage()&&$("#SelectedList").val()&&(t.showLoaderImage(!0),$.ajax({dataType:"json",url:"/api/subscription/list/getproducts",async:!0,data:{listId:$("#SelectedList").val(),offset:0,pageSize:e,lang:window.displayLanguage}}).done(function(e){null!=e.data&&(t.results.valueWillMutate(),ko.utils.arrayPushAll(t.results,e.data.results),t.results.valueHasMutated(),t.totalCount(e.data.totalCount),t.percentage(Math.round(ko.utils.unwrapObservable(t.results).length/e.data.totalCount*100))),t.showLoaderImage(!1),t.dataLoaded(!0)}))},window.setTimeout(function(){t.refresh()},1)}function SubscriptionFavouritesProducts(){var o=this;o.showLoaderImage=ko.observable(!1),o.results=ko.observableArray(),o.totalCount=ko.observable(0),o.currentCount=ko.observable(0),o.percentage=ko.observable(0),o.selectedProduct=ko.observable(),o.subscriptionId=ko.observable(),o.productLists=ko.observableArray(),o.nrPagesOffset=0,o.dataLoaded=ko.observable(!1),addToList(o),infiniteScroll(o),addToFavourites(o,!0),$("#subscriptionSortOrder").change(function(){o.results([]),o.nrPagesOffset=0,o.refresh()}
1),o.refresh=function(){var e=$("#SubscriptionId").val(),t=$("#subscriptionSortOrder").val();(o.results().length<o.totalCount()||0===o.totalCount())&&!1===o.showLoaderImage()&&(o.showLoaderImage(!0),$.ajax({dataType:"json",url:"/api/subscription/favourites/get",async:!0,data:{subscriptionId:e,nrPagesOffset:o.nrPagesOffset,lang:window.displayLanguage,sortOrder:t}}).done(function(e){null!=e.data&&(o.results.valueWillMutate(),ko.utils.arrayPushAll(o.results,e.data.results),o.results.valueHasMutated(),o.totalCount(e.data.totalCount),o.percentage(Math.round(ko.utils.unwrapObservable(o.results).length/e.data.totalCount*100))),o.showLoaderImage(!1),o.nrPagesOffset++,o.dataLoaded(!0)}))},window.setTimeout(function(){o.refresh()},1)}function SubscriptionPopularProducts(){var t=this;t.showLoaderImage=ko.observable(!1),t.results=ko.observableArray(),t.totalCount=ko.observable(0),t.currentCount=ko.observable(0),t.percentage=ko.observable(0),t.selectedProduct=ko.observable(),t.subscriptionId=ko.observable(),t.productLists=ko.observableArray(),t.nrPagesOffset=0,t.dataLoaded=ko.observable(!1),t.error=ko.observable(!1),addToList(t),infiniteScroll(t),addToFavourites(),$("#subscriptionSortOrder").change(function(){t.results([]),t.nrPagesOffset=0,t.refresh()}
1),t.refresh=function(){var e=$("#SubscriptionId").val();(t.results().length<t.totalCount()||0===t.totalCount())&&!1===t.showLoaderImage()&&(t.showLoaderImage(!0),$.ajax({dataType:"json",url:"/api/subscription/popular/get",async:!1,data:{subscriptionId:e,nrPagesOffset:t.nrPagesOffset,lang:window.displayLanguage}}).done(function(e){null!=e.data&&null!==e.data.results?(t.results.valueWillMutate(),ko.utils.arrayPushAll(t.results,e.data.results),t.results.valueHasMutated(),t.totalCount(e.data.totalCount),t.percentage(Math.round(ko.utils.unwrapObservable(t.results).length/e.data.totalCount*100)),t.nrPagesOffset++,t.dataLoaded(!0)):(t.error(!0),t.dataLoaded(!1)),t.showLoaderImage(!1)}))},window.setTimeout(function(){t.refresh()},1)}function SubscriptionOurProducts(){var i=this;i.showLoaderImage=ko.observable(!1),i.results=ko.observableArray(),i.totalCount=ko.observable(0),i.currentCount=ko.observable(0),i.percentage=ko.observable(0),i.selectedProduct=ko.observable(),i.subscriptionId=ko.observable(),i.productLists=ko.observableArray(),i.endOfList=!1,i.currentList="standards",i.nrPagesOffset=0,i.dataLoaded=ko.observable(!1),i.isLoading=!1,addToList(i),infiniteScroll(i),addToFavourites(),$(document).on("click","#book-tab",function(){$("#standard-tab").addClass("disabledTag"),$("#standard-tab").parent().addClass("disabledTag"),i.totalCount(0),i.currentCount(0),i.percentage(0),i.dataLoaded(!1),i.refresh("books")}),$(document).on("click","#standard-tab",function(){$("#book-tab").addClass("disabledTag"),$("#book-tab").parent().addClass("disabledTag"),i.totalCount(0),i.currentCount(0),i.percentage(0),i.dataLoaded(!1),i.refresh("standards")}),$("#subscriptionSortOrder").change(function(){i.results([]),i.nrPagesOffset=0,i.endOfList=!1,i.refresh(i.currentList)}),i.refresh=function(o){var e,t,n;i.isLoading||(e=$("#SubscriptionId").val(),t=$("#subscriptionSortOrder").val(),"books"!==o&&"standards"!==o)||(i.currentList!==o&&(i.results([]),i.currentList=o,i.nrPagesOffset=0,i.endOfList=!1),i.endOfList)||(i.showLoaderImage(!0),n=i.nrPagesOffset,i.isLoading=!0,$.ajax({dataType:"json",url:"/api/subscription/getmore",async:!0,data:{subscriptionId:e,productType:o,nrPagesOffset:i.nrPagesOffset,lang:window.displayLanguage,sortOrder:t}}).done(function(e){var t=$("#standard-tab").hasClass("active");!("standards"===o&&t||"books"===o&&!t)||0===n&&0!==i.results().length&&0===n||(null!=e.data&&(i.results.valueWillMutate(),ko.utils.arrayPushAll(i.results,e.data.results),i.results.valueHasMutated(),0!==e.data.results.length&&ko.utils.unwrapObservable(i.results).length!==e.data.totalCount||(i.endOfList=!0),i.totalCount(e.data.totalCount),i.percentage(Math.round(ko.utils.unwrapObservable(i.results).length/e.data.totalCount*100))),i.nrPagesOffset++),("standards"===o?($("#book-tab").removeClass("disabledTag"),$("#book-tab")):($("#standard-tab").removeClass("disabledTag"),$("#standard-tab"))).parent().removeClass("disabledTag"),i.dataLoaded(!0),i.showLoaderImage(!1),i.isLoading=!1}))},window.setTimeout(function(){i.refresh(i.currentList)},1)}function infiniteScroll(e){$(window).scroll($.throttle(500,function(){$(window).scrollTop()>=$(document).height()-$(window).height()-500&&0<e.results().length&&e.refresh(e.currentList)}))}function addToList(o,n){$(document).off("click",".showListPopUp"),$(document).on("click",".showListPopUp",function(){var e=$
1("#SubscriptionId").val(),t=$(this).data("productid"),e=(o.subscriptionId(e),o.selectedProduct(t),GetProductLists(e,t,o.productLists),this.getAttribute("data-title"));$("#addremovelistproduct").dialog({modal:!0,transitionMask:!1,position:{my:"right+50 top+10",at:"bottom",of:$(this)},title:e,buttons:[{text:"OK",click:function(){$(this).dialog("close")}}]})}),$(document).off("click","#addremovelistproduct input:checkbox"),$(document).on("click","#addremovelistproduct input:checkbox",function(){var e=o.subscriptionId(),t=o.selectedProduct();AddRemoveListProduct(e,$(this).val(),t,$(this).prop("checked")).done(function(){n&&(o.nrPagesOffset=0,o.results.removeAll(),o.totalCount(0),o.refresh())})})}function addToFavourites(e,t){$(document).off("click",".search-favorite-container input:checkbox"),$(document).on("click",".search-favorite-container input:checkbox",function(){AddRemoveFavourite($(this).data("productid"),$(this).prop("checked")).done(function(){t&&(e.currentCount(e.results().length),e.results.removeAll(),e.totalCount(0),e.nrPagesOffset=0,e.refresh())})})}function AdminDropdownChange(e,t,o){var n=e.target.id,a=!1,e=$("#"+n).val();if("MainAdmin"===e){var r=(s=$("#setting-dropdown0")).val();for(i=1;r;
1i++)"MainAdmin"===(r=s.val())&&s.attr("id")!==n&&s.val("Admin"),r=(s=$("#setting-dropdown"+i)).val()}if("HiddenAdmin"===e){var s,r=(s=$("#setting-dropdown0")).val(),a=!0;for(i=1;r;i++)"HiddenAdmin"!==(r=s.val())&&(a=!1),r=(s=$("#setting-dropdown"+i)).val()}a?$("#"+n).val("Admin"):$.get("/abonnemang/anvandare/AdminDropdownChange?subscriptionId="+t+"&userIdentifier="+o+"&choice="+e).done(function(){$("#admin-list-container").load("/abonnemang/subscriptionadmins?id=")})}function updateRequiredFieldLabel(e,t,o){$("label[for='"+e+"']").removeClass("required"),t===o&&$("label[for='"+e+"']").addClass("required"),hideShowOrgNo(o,t)}function hideShowOrgNo(e,t){var o=["SE","AT","BE","BG","CY","CZ","DK","EE","ES","FI","FR","HR","EL","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SI","SK","DE"];o.includes(e)&&e!=t&&$(".orgNoFields").css("display","none"),o.includes(e)&&e!=t||$(".orgNoFields").css("display","block")}null!==document.getElementById("shopping-cart")&&ko.applyBindings(shoppingCart,document.getElementById("shopping-cart")),null!==document.getElementById("checkout-page")&&ko.applyBindings(shoppingCart,document.getElementById("checkout-page")),$(function(){$(".addtocart:not(.singlecopy)").click(function(){AddToCartClick($(this).data("code"),$(this).data("invalid"),!0,!1)}),$(".addtocart.singlecopy").click(function(){AddToCartClick($(this).data("code"),$(this).data("invalid"),!0,!0)})}
1),$("#shopping-cart-button").click(function(){var e=$("#shopping-cart"),t=$("#my-sis-bar-desktop").height()+$(".navbar-header").height();if($(window).scrollTop()>t&&e.is(":visible"))return document.body.scrollTop=0,document.documentElement.scrollTop=0,!1;document.body.scrollTop=0,document.documentElement.scrollTop=0}),$(function(){$("#updatesDatepickerFrom").datepicker({dateFormat:"yy-mm-dd"}),$("#updatesDatepickerTo").datepicker({dateFormat:"yy-mm-dd"}),$("#updatesShowButton").click(function(){var e=$("#updatesDatepickerFrom").datepicker("getDate"),t=$("#updatesDatepickerTo").datepicker("getDate"),o=$.datepicker.formatDate("yy-mm-dd",e),n=$.datepicker.formatDate("yy-mm-dd",t);$.ajax({url:window.location.href+"SubscriptionUpdates",type:"GET",data:{startDate:null!==e?o:"",endDate:null!==t?n:""}}).done(function(e){$("#updatesResult").html(e),ko.applyBindings(new SubscriptionUpdates,document.getElementById("subscriptionupdatesinfinitescroll"))})})}),$("#SelectedList").on("change",function(){var e=$("#SelectedList").val();sessionStorage.setItem("listId",e),$.ajax({url:location.origin.concat(location.pathname).concat(location.hash).concat("SubscriptionListProducts"),type:"GET",data:{listId:e}}).done(function(e){$("#subscriptionListProducts").html(e),ko.applyBindings(new SubscriptionListProducts,document.getElementById("subscriptionlistproducts"))})}),$(document).on("click",".updateAccordionLabel",function(){0<$(this).text().indexOf("â¼")?($(this).text($(this).text().replace("â¼","â²")),$(this).parent().find(".updateAccordionContent").show(300)):($(this).text($(this).text().replace("â²","â¼")),$(this).parent().find(".updateAccordionContent").hide(300))}),$(window).scroll($.throttle(500,function(){var e;null!==document.getElementById("subscriptionupdatesinfinitescroll")&&$(window).scrollTop()>=$(document).height()-$(window).height()-100&&0<(e=ko.contextFor(document.getElementById("subscriptionupdatesinfinitescroll")).$data).results().length&&e.refresh()})),$("#LogotypeImageFile").bind("change",function(){var e=this.files[0].size/1024;parseInt($("#LargeFilesizeMax").val())<e?($("#LogotypeImageFileClientValidationMessage").text($("#LargeFilesizeInfoText").val()),$("#btnSubmit").prop("disabled",!0)):$("#LogotypeImageFileClientValidationMessage").text(""),""==$("#MessageImageFileClientValidationMessage").text()&""==$("#LogotypeImageFileClientValidationMessage").text()&&$("#btnSubmit").prop("disabled",!1)}),$("#MessageImageFile").bind("change",function(){var e=this.files[0].size/1024;parseInt($("#LargeFilesizeMax").val())<e?($("#MessageImageFileClientValidationMessage").text($("#LargeFilesizeInfoText").val()),$("#btnSubmit").prop("disabled",!0)):$("#MessageImageFileClientValidationMessage").text(""),""==$("#MessageImageFileClientValidationMessage").text()&""==$("#LogotypeImageFileClientValidationMessage").text()&&$("#btnSubmit").prop("disabled",!1)}
1),$("#subscriptionusernamefilter").keyup(function(){var e=$(this).val().toLowerCase();$("#abousers").find("tbody").find("tr").each(function(){0<=$(this).text().toLowerCase().indexOf(e)?$(this).show():$(this).hide()}),$("#aboadmins").find("tbody").find("tr").each(function(){0<=$(this).text().toLowerCase().indexOf(e)?$(this).show():$(this).hide()})}),null!==document.getElementById("subscriptionupdatesinfinitescroll")&&ko.applyBindings(new SubscriptionUpdates,document.getElementById("subscriptionupdatesinfinitescroll")),null!==document.getElementById("subscriptionfavouriteproducts")&&ko.applyBindings(new SubscriptionFavouritesProducts,document.getElementById("subscriptionfavouriteproducts")),null!==document.getElementById("subscriptionpopularproducts")&&ko.applyBindings(new SubscriptionPopularProducts,document.getElementById("subscriptionpopularproducts")),null!==document.getElementById("subscriptionourproducts")&&ko.applyBindings(new SubscriptionOurProducts,document.getElementById("subscriptionourproducts")),null!==document.getElementById("subscriptionlistproducts")&&ko.applyBindings(new SubscriptionListProducts,document.getElementById("subscriptionlistproducts")),function(e,t,o){function n(e,t,o){if(o=d.extend({},d.options,o),(e=d.runValidations(e,t,o)).some(function(e){return d.isPromise(e.error)}))throw new Error("Use validate.async if you want support for promises");return n.processValidationResults(e,o)}var d=n;d.extend=function(o){return[].slice.call(arguments,1).forEach(function(e){for(var t in e)o[t]=e[t]}),o},d.extend(n,{version:{major:0,minor:13,patch:1,metadata:null,toString:function(){var e=d.format("%{major}.%{minor}.%{patch}",d.version);return d.isEmpty(d.version.metadata)||(e+="+"+d.version.metadata),e}},Promise:"undefined"!=typeof Promise?Promise:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(e,t,o){var n,i,a,r,s,c,l=[];for(n in(d.isDomElement(e)||d.isJqueryElement(e))&&(e=d.collectFormValues(e)),t)for(i in a=d.getDeepObjectValue(e,n),r=d.result(t[n],a,e,n,o,t)){if(!(s=d.validators[i]))throw c=d.format("Unknown validator %{name}",{name:i}),new Error(c);c=r[i],(c=d.result(c,a,e,n,o,t))&&l.push({attribute:n,value:a,validator:i,globalOptions:o,attributes:e,options:c,error:s.call(s,a,c,n,e,o)})}return l},processValidationResults:function(e,t){e=d.pruneEmptyErrors(e,t),e=d.expandMultipleErrors(e,t),e=d.convertErrorMessages(e,t);var o=t.format||"grouped";if("function"!=typeof d.formatters[o])throw new Error(d.format("Unknown format %{format}",t));return e=d.formatters[o](e),d.isEmpty(e)?void 0:e},async:function(n,i,a){var r=(a=d.extend({},d.async.options,a)).wrapErrors||function(e){return e},s=(!1!==a.cleanAttributes&&(n=d.cleanAttributes(n,i)),d.runValidations(n,i,a));return new d.Promise(function(t,o){d.waitForResults(s).then(function(){var e=d.processValidationResults(s,a);e?o(new r(e,a,n,i)):t(n)},function(e){o(e)})})},single:function(e,t,o){return o=d.extend({},d.single.options,o,{format:"flat",fullMessages:!1}),d({single:e},{single:t},o)},waitForResults:function(e){return e.reduce(function(e,t){return d.isPromise(t.error)?e.then(function(){return t.error.then(function(e){t.error=e||null})}):e},new d.Promise(function(e){e()}))},result:function(e){var t=[].slice.call(arguments,1);return e="function"==typeof e?e.apply(null,t):e},isNumber:function(e){return"number"==typeof e&&!isNaN(e)},isFunction:function(e){return"function"==typeof e},isInteger:function(e){return d.isNumber(e)&&e%1==0},isBoolean:function(e){return"boolean"==typeof e},isObject:function(e){return e===Object(e)},isDate:function(e){return e instanceof Date},isDefined:function(e){return null!=e},isPromise:function(e){return!!e&&d.isFunction(e.then)},isJqueryElement:function(e){return e&&d.isString(e.jquery)},isDomElement:function(e){return!!e&&!(!e.querySelectorAll||!e.querySelector)&&(!(!d.isObject(document)||e!==document)||("object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName))},isEmpty:function(e){if(!d.isDefined(e))return!0;if(!d.isFunction(e)){if(d.isString(e))return d.EMPTY_STRING_REGEXP.test(e);
1if(d.isArray(e))return 0===e.length;if(!d.isDate(e)&&d.isObject(e)){for(var t in e)return!1;return!0}}return!1},format:d.extend(function(e,n){return d.isString(e)?e.replace(d.format.FORMAT_REGEXP,function(e,t,o){return"%"===t?"%{"+o+"}":String(n[o])}):e},{FORMAT_REGEXP:/(%?)%\{([^\}]+)\}/g}),prettify:function(e){return d.isNumber(e)?100*e%1==0?""+e:parseFloat(Math.round(100*e)/100).toFixed(2):d.isArray(e)?e.map(function(e){return d.prettify(e)}).join(", "):d.isObject(e)?d.isDefined(e.toString)?e.toString():JSON.stringify(e):(e=""+e).replace(/([^\s])\.([^\s])/g,"$1 $2").replace(/\\+/g,"").replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,function(e,t,o){return t+" "+o.toLowerCase()}).toLowerCase()},stringifyValue:function(e,t){return(t&&t.prettify||d.prettify)(e)},isString:function(e){return"string"==typeof e},isArray:function(e){return"[object Array]"==={}.toString.call(e)},isHash:function(e){return d.isObject(e)&&!d.isArray(e)&&!d.isFunction(e)},contains:function(e,t){return!!d.isDefined(e)&&(d.isArray(e)?-1!==e.indexOf(t):t in e)},unique:function(e){return d.isArray(e)?e.filter(function(e,t,o){return o.indexOf(e)==t}):e},forEachKeyInKeypath:function(e,t,o){if(d.isString(t)){for(var n="",i=!1,a=0;a<t.length;++a)switch(t[a]){case".":i?(i=!1,n+="."):(e=o(e,n,!1),n="");break;case"\\":i?(i=!1,n+="\\"):i=!0;break;default:i=!1,n+=t[a]}return o(e,n,!0)}},getDeepObjectValue:function(e,t){if(d.isObject(e))return d.forEachKeyInKeypath(e,t,function(e,t){if(d.isObject(e))return e[t]})},collectFormValues:function(e,t){var o,n,i,a,r={};if(e=d.isJqueryElement(e)?e[0]:e){for(t=t||{},i=e.querySelectorAll("input[name], textarea[name]"),o=0;o<i.length;++o){var s,c,l=i.item(o);d.isDefined(l.getAttribute("data-ignored"))||(s=l.name.replace(/\./g,"\\\\."),c=d.sanitizeFormValue(l.value,t),"number"===l.type?c=c?+c:null:"checkbox"===l.type?l.attributes.value?l.checked||(c=r[s]||null):c=l.checked:"radio"!==l.type||l.checked||(c=r[s]||null),r[s]=c)}for(i=e.querySelectorAll("select[name]"),o=0;o<i.length;++o)if(l=i.item(o),!d.isDefined(l.getAttribute("data-ignored"))){if(l.multiple)for(n in c=[],l.options)a=l.options[n],a&&a.selected&&c.push(d.sanitizeFormValue(a.value,t));else{var u=void 0!==l.options[l.selectedIndex]?l.options[l.selectedIndex].value:"";c=d.sanitizeFormValue(u,t)}r[l.name]=c}}return r},sanitizeFormValue:function(e,t){return t.trim&&d.isString(e)&&(e=e.trim()),!1!==t.nullify&&""===e?null:e},capitalize:function(e){return d.isString(e)?e[0].toUpperCase()+e.slice(1):e},pruneEmptyErrors:function(e){return e.filter(function(e){return!d.isEmpty(e.error)})},expandMultipleErrors:function(e){var o=[];return e.forEach(function(t){d.isArray(t.error)?t.error.forEach(function(e){o.push(d.extend({},t,{error:e}))}):o.push(t)}),o},convertErrorMessages:function(e,o){var n=[],i=(o=o||{}).prettify||d.prettify;return e.forEach(function(e){var t=d.result(e.error,e.value,e.attribute,e.options,e.attributes,e.globalOptions);return d.isString(t)?("^"===t[0]?t=t.slice(1):!1!==o.fullMessages&&(t=d.capitalize(i(e.attribute))+" "+t),t=t.replace(/\\\^/g,"^"),t=d.format(t,{value:d.stringifyValue(e.value,o)}),void n.push(d.extend({},e,{error:t}))):void n.push(e)}),n},groupErrorsByAttribute:function(e){var o={};return e.forEach(function(e){var t=o[e.attribute];t?t.push(e):o[e.attribute]=[e]}),o},flattenErrorsToArray:function(e){return e.map(function(e){return e.error}).filter(function(e,t,o){return o.indexOf(e)===t})},cleanAttributes:function(e,t){function n(e,t,o){return d.isObject(e[t])?e[t]:e[t]=!!o||{}}return d.isObject(t)&&d.isObject(e)?function e(t,o){if(!d.isObject(t))return t;var n,i,a=d.extend({},t);for(i in t)n=o[i],d.isObject(n)?a[i]=e(a[i],n):n||delete a[i];return a}(e,t=(e=>{var t,o={};for(t in e)e[t]&&d.forEachKeyInKeypath(o,t,n);return o})(t)):{}},exposeModule:function(e,t,o,n,i){o?(o=n&&n.exports?n.exports=e:o).validate=e:(t.validate=e).isFunction(i)&&i.amd&&i([],function(){return e})},warn:function(e){"undefined"!=typeof console&&console.warn&&console.warn("[validate.js] "+e)},error:function(e){"undefined"!=typeof console&&console.error&&console.error("[validate.js] "+e)}}
1),n.validators={presence:function(e,t){if(!1!==(t=d.extend({},this.options,t)).allowEmpty?!d.isDefined(e):d.isEmpty(e))return t.message||this.message||"can't be blank"},length:function(e,t,o){var n,i,a,r,s;if(d.isDefined(e))return i=(t=d.extend({},this.options,t)).is,a=t.maximum,r=t.minimum,s=[],e=(e=(t.tokenizer||function(e){return e})(e)).length,d.isNumber(e)?(d.isNumber(i)&&e!==i&&(n=t.wrongLength||this.wrongLength||"is the wrong length (should be %{count} characters)",s.push(d.format(n,{count:i}))),d.isNumber(r)&&e<r&&(n=t.tooShort||this.tooShort||"is too short (minimum is %{count} characters)",s.push(d.format(n,{count:r}))),d.isNumber(a)&&a<e&&(n=t.tooLong||this.tooLong||"is too long (maximum is %{count} characters)",s.push(d.format(n,{count:a}))),0<s.length?t.message||s:void 0):t.message||this.notValid||"has an incorrect length"},numericality:function(e,t,o,n,i){if(d.isDefined(e)){var a,r=[],s={greaterThan:function(e,t){return t<e},greaterThanOrEqualTo:function(e,t){return t<=e},equalTo:function(e,t){return e===t},lessThan:function(e,t){return e<t},lessThanOrEqualTo:function(e,t){return e<=t},divisibleBy:function(e,t){return e%t==0}},c=(t=d.extend({},this.options,t)).prettify||i&&i.prettify||d.prettify;if(d.isString(e)&&t.strict){i="^-?(0|[1-9]\\d*)";if(t.onlyInteger||(i+="(\\.\\d+)?"),i+="$",!new RegExp(i).test(e))return t.message||t.notValid||this.notValid||this.message||"must be a valid number"}if(!0!==t.noStrings&&d.isString(e)&&!d.isEmpty(e)&&(e=+e),!d.isNumber(e))return t.message||t.notValid||this.notValid||this.message||"is not a number";if(t.onlyInteger&&!d.isInteger(e))return t.message||t.notInteger||this.notInteger||this.message||"must be an integer";for(a in s){var l,u=t[a];d.isNumber(u)&&!s[a](e,u)&&(l=t[l="not"+d.capitalize(a)]||this[l]||this.message||"must be %{type} %{count}",r.push(d.format(l,{count:u,type:c(a)})))}return t.odd&&e%2!=1&&r.push(t.notOdd||this.notOdd||this.message||"must be odd"),t.even&&e%2!=0&&r.push(t.notEven||this.notEven||this.message||"must be even"),r.length?t.message||r:void 0}},datetime:d.extend(function(e,t){if(!d.isFunction(this.parse)||!d.isFunction(this.format))throw new Error("Both the parse and format functions needs to be set to use the datetime/date validator");var o,n,i,a;if(d.isDefined(e))return n=[],i=(t=d.extend({},this.options,t)).earliest?this.parse(t.earliest,t):NaN,a=t.latest?this.parse(t.latest,t):NaN,e=this.parse(e,t),isNaN(e)||t.dateOnly&&e%864e5!=0?(o=t.notValid||t.message||this.notValid||"must be a valid date",d.format(o,{value:arguments[0]})):(!isNaN(i)&&e<i&&(o=t.tooEarly||t.message||this.tooEarly||"must be no earlier than %{date}",o=d.format(o,{value:this.format(e,t),date:this.format(i,t)}),n.push(o)),!isNaN(a)&&a<e&&(o=t.tooLate||t.message||this.tooLate||"must be no later than %{date}",o=d.format(o,{date:this.format(a,t),value:this.format(e,t)}),n.push(o)),n.length?d.unique(n):void 0)},{parse:null,format:null}),date:function(e,t){return t=d.extend({},t,{dateOnly:!0}),d.validators.datetime.call(d.validators.datetime,e,t)},format:function(e,t){(d.isString(t)||t instanceof RegExp)&&(t={pattern:t});var o=(t=d.extend({}
1,this.options,t)).message||this.message||"is invalid",n=t.pattern;return!d.isDefined(e)||d.isString(e)&&(t=(n=d.isString(n)?new RegExp(t.pattern,t.flags):n).exec(e))&&t[0].length==e.length?void 0:o},inclusion:function(e,t){if(d.isDefined(e)&&(d.isArray(t)&&(t={within:t}),t=d.extend({},this.options,t),!d.contains(t.within,e)))return t=t.message||this.message||"^%{value} is not included in the list",d.format(t,{value:e})},exclusion:function(e,t){var o;if(d.isDefined(e)&&(d.isArray(t)&&(t={within:t}),t=d.extend({},this.options,t),d.contains(t.within,e)))return o=t.message||this.message||"^%{value} is restricted",d.isString(t.within[e])&&(e=t.within[e]),d.format(o,{value:e})},email:d.extend(function(e,t){t=(t=d.extend({},this.options,t)).message||this.message||"is not a valid email";return!d.isDefined(e)||d.isString(e)&&this.PATTERN.exec(e)?void 0:t},{PATTERN:/^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i}),equality:function(e,t,o,n,i){if(d.isDefined(e)){d.isString(t)&&(t={attribute:t});var a=(t=d.extend({},this.options,t)).message||this.message||"is not equal to %{attribute}";if(d.isEmpty(t.attribute)||!d.isString(t.attribute))throw new Error("The attribute must be a non empty string");var r=d.getDeepObjectValue(n,t.attribute),s=t.comparator||function(e,t){return e===t},i=t.prettify||i&&i.prettify||d.prettify;return s(e,r,t,o,n)?void 0:d.format(a,{attribute:i(t.attribute)})}},url:function(e,t){var o,n,i,a;if(d.isDefined(e))return o=(t=d.extend({},this.options,t)).message||this.message||"is not a valid url",a=t.schemes||this.schemes||["http","https"],n=t.allowLocal||this.allowLocal||!1,t=t.allowDataUrl||this.allowDataUrl||!1,d.isString(e)&&(a="^(?:(?:"+a.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",i="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",n?i+="?":a+="(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})",a+="(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+i+")(?::\\d{2,5})?(?:[/?#]\\S*)?$",t&&(a="(?:"+a+")|(?:^data:(?:\\w+\\/[-+.\\w]+(?:;[\\w=]+)*)?(?:;base64)?,[A-Za-z0-9-_.!~\\*'();\\/?:@&=+$,%]*$)"),new RegExp(a,"i").exec(e))?void 0:o},type:d.extend(function(e,t,o,n,i){if(d.isString(t)&&(t={type:t}),d.isDefined(e)){var a,r=d.extend({},this.options,t),s=r.type;if(!d.isDefined(s))throw new Error("No type was specified");if(a=d.isFunction(s)?s:this.types[s],!d.isFunction(a))throw new Error("validate.validators.type.types."+s+" must be a function.");if(!a(e,r,o,n,i))return a=t.message||this.messages[s]||this.message||r.message||(d.isFunction(s)?"must be of the correct type":"must be of type %{type}"),d.isFunction(a)&&(a=a(e,t,o,n,i)),d.format(a,{attribute:d.prettify(o),type:s})}},{types:{object:function(e){return d.isObject(e)&&!d.isArray(e)},array:d.isArray,integer:d.isInteger,number:d.isNumber,string:d.isString,date:d.isDate,boolean:d.isBoolean},messages:{}})},n.formatters={detailed:function(e){return e},flat:d.flattenErrorsToArray,grouped:function(e){for(var t in e=d.groupErrorsByAttribute(e))e[t]=d.flattenErrorsToArray(e[t]);return e},constraint:function(e){for(var t in e=d.groupErrorsByAttribute(e))e[t]=e[t].map(function(e){return e.validator}).sort();return e}},n.exposeModule(n,this,e,t,o)}.call(this,"undefined"!=typeof exports?exports:null,"undefined"!=typeof module?module:null,"undefined"!=typeof define?define:null); 2//# sourceMappingURL=maps/app.js.map
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.