var GN;window.addEventListener("load",function(){"use strict";var n=document.querySelector(".top-navigation__main-menu__item--cart");if(n!==null){var r=n.querySelector(".top-navigation__main-menu__label--cart"),u=function(){return new Promise(function(n,t){var r=productApiConfig.settingsUrl+"api/v1/settings?site="+productApiConfig.siteContext+"&marketLocale="+productApiConfig.language+"&scope=ecom",i=new XMLHttpRequest;i.open("GET",r);i.onload=function(){i.status===200?n(JSON.parse(i.response).ecom):t(Error(i.statusText))};i.onerror=function(){t(Error("Network error"))};i.send()})},f=function(){return new Promise(function(n,t){var r=productApiConfig.settingsUrl+"api/v1/settings?site="+productApiConfig.siteContext+"&marketLocale="+productApiConfig.language+"&scope=cart",i=new XMLHttpRequest;i.open("GET",r);i.onload=function(){i.status===200?n(JSON.parse(i.response).cart):t(Error(i.statusText))};i.onerror=function(){t(Error("Network error"))};i.send()})},i=function(n){return new Promise(function(i,r){var f=sessionStorage.getItem("dr-token"),e,u;typeof f=="string"&&f!==""?i(JSON.parse(f)):(e=""+n.tokenUrl+t(n.tokenUrl)+"apiKey="+n.apiKey+"&format=jsonp&locale="+n.marketLocale,u=new XMLHttpRequest,u.open("GET",e),u.onload=function(){u.status===200?(sessionStorage.setItem("dr-token",u.response),i(JSON.parse(u.response))):r(Error(u.statusText))},u.onerror=function(){r(Error("Network error"))},u.send())})},e=function(n){return new Promise(function(r){i(n).then(function(i){var u=document.createElement("script"),f="jsonp_callback_"+Math.round(1e5*Math.random()),e=""+n.cartUrl+t(n.cartUrl)+"token="+i.access_token+"&format=json&method=get&callback="+f;u.src=e;window[f]=function(n){r(n.cart);document.body.removeChild(u);delete window[f]};document.body.appendChild(u)})})},o=function(n){return new Promise(function(r){i(n).then(function(i){r(""+n.checkoutUrl+t(n.checkoutUrl)+"locale="+n.marketLocale+"&currency="+n.currency+"&token="+i.access_token)})})},t=function(n){return n===void 0&&(n=""),n.indexOf("?")>-1?"&":"?"};u().then(function(t){if(!t.ecomEnabled){n.style.display="none";return}f().then(function(t){n.addEventListener("click",function(){o(t).then(function(n){window.location.href=n})});e(t).then(function(n){r.dataset.cartitems=String(n.totalItemsInCart)})})})}}),function(){var n=function(n){var t=document.querySelectorAll(n),i=function(n){Array.prototype.forEach.call(n,function(n){n.checked=!1})};i(t);Array.prototype.forEach.call(t,function(n){n.addEventListener("change",function(n){n.preventDefault();var r=n.target,u=r.checked;i(t);r.checked=u})})};n(".top-navigation__main-menu__item > input");n("#top-navigation__search, .top-navigation__mobile-nav__input")}(),function(){var n=document.querySelectorAll(".top-navigation__main-menu__item--search input");Array.prototype.forEach.call(n,function(n){var i=n.dataset.focus,t=document.getElementById(i);t!==null&&n.addEventListener("change",function(){setTimeout(function(){t.focus()},10)})})}(),function(){var i=document.querySelector(".top-navigation"),n=i.querySelectorAll(".top-navigation__siteselector__region__link"),f=i.querySelectorAll(".top-navigation__siteselector__list"),e=n.length>0?n[0].dataset.region:undefined,r=i.querySelector("#top-navigation__siteselector"),u="active",h=768,t;if(r!==null){var c=function(){Array.prototype.forEach.call(f,function(n){n.style.display="none"})},o=function(n){Array.prototype.forEach.call(f,function(t){t.style.display=t.dataset.region===n?"block":"none"})},s=function(t){Array.prototype.forEach.call(n,function(n){var i=n.classList;n.dataset.region===t?i.add(u):i.remove(u)})};Array.prototype.forEach.call(n,function(n){n.addEventListener("click",function(t){var i=t.target,f=i.classList.contains("top-navigation__siteselector__region__link--mobile"),e=i.classList.contains(u),r=f&&e?undefined:n.dataset.region;s(r);o(r)})});t=function(){document.documentElement.clientWidth<h||r.querySelectorAll(".top-navigation__siteselector__region__link.active").length>0||(s(e),o(e))};r.addEventListener("click",t);window.addEventListener("orientationchange",t);window.addEventListener("resize",t);c()}}();angular.module("gn.audio.site.settings",[]),function(n){var t;(function(n){var t;(function(n){"use strict";var r,u,f,t,i;(function(n){n.ExcludeIncludeVAT="ExcludeIncludeVAT";n.ExcludeVATThreshold="ExcludeVATThreshold";n.Simple="Simple"})(r=n.PriceDisplayOption||(n.PriceDisplayOption={})),function(n){n.Blueparrott="blueparrott";n.Jabra="jabra"}(u=n.SiteContext||(n.SiteContext={})),function(n){n.Cart="cart";n.Display="display";n.Ecom="ecom";n.Support="support"}(f=n.SiteSettingsScope||(n.SiteSettingsScope={}));t=function(){function t(n,t){this.$http=n;this.configuration=t}return t.prototype.getAll=function(){var t=this.configuration,i=n.SiteSettingsScope.Cart+","+n.SiteSettingsScope.Display+","+n.SiteSettingsScope.Ecom,r=t.baseUrl+"?site="+t.siteContext+"&marketLocale="+t.marketLocale+"&scope="+i;return this.$http.get(r,{cache:!0}).then(function(n){return angular.extend({},n.data.cart,n.data.display,n.data.ecom,n.data.support)})},t.prototype.getEcomSetting=function(){var t=this.configuration,i=t.baseUrl+"?site="+t.siteContext+"&marketLocale="+t.marketLocale+"&scope="+n.SiteSettingsScope.Ecom;return this.$http.get(i,{cache:!0}).then(function(n){return n.data.ecom})},t.prototype.getCartSetting=function(){var t=this.configuration,i=t.baseUrl+"?site="+t.siteContext+"&marketLocale="+t.marketLocale+"&scope="+n.SiteSettingsScope.Cart;return this.$http.get(i,{cache:!0}).then(function(n){return n.data.cart})},t.prototype.getPriceDisplaySetting=function(){var t=this.configuration,i=t.baseUrl+"?site="+t.siteContext+"&marketLocale="+t.marketLocale+"&scope="+n.SiteSettingsScope.Display;return this.$http.get(i,{cache:!0}).then(function(n){return n.data.display})},t.prototype.getSupportSetting=function(){var t=this.configuration,i=t.baseUrl+"?site="+t.siteContext+"&marketLocale="+t.marketLocale+"&scope="+n.SiteSettingsScope.Support;return this.$http.get(i,{cache:!0}).then(function(n){var t=(n.data.support.wasThisUsefulReasons||"").split("||").map(function(n){var t=n.split("@@");return{code:t[1]||"",title:t[0]||""}});return{supportUrl:n.data.support.supportUrl,wasThisUsefulUrl:n.data.support.wasThisUsefulUrl,wasThisUsefulReasons:t}})},t}();i=function(){function n(){var n=this;this.$get=["$http",function(i){return new t(i,n._configuration)}]}return n.prototype.config=function(n){return angular.isDefined(n)?(this._configuration=n,this):this._configuration},n}();angular.module("gn.audio.site.settings").provider("siteSettings",i)})(t=n.SiteSettings||(n.SiteSettings={}))})(t=n.Audio||(n.Audio={}))}(GN||(GN={}));angular.module("gn.audio.quicksearch",[]),function(n){var t;(function(n){var t;(function(n){"use strict";var r,t,i;(function(n){n.Available="available";n.Discontinued="discontinued";n.Supported="supported"})(r=n.IncludeType||(n.IncludeType={}));t=function(){function t(n,t,i){this.$http=n;this.url=t;this.language=i}return t.prototype.get=function(n){n===void 0&&(n={});var t=this.validate(n);return this.$http.post(this.url,t).then(function(n){return n.data})},t.prototype.getByEntity=function(t,i,r){r===void 0&&(r=n.IncludeType.Available);switch(t){case"g":return this.getGroups(i,r);case"f":default:return this.getFamilies(i,r)}},t.prototype.getGroups=function(t,i){t===void 0&&(t={});i===void 0&&(i=n.IncludeType.Available);var r=this.validate(t);return this.$http.post(this.url+"/groups?include="+i.toLowerCase(),r).then(function(n){return n.data})},t.prototype.getFamilies=function(t,i){t===void 0&&(t={});i===void 0&&(i=n.IncludeType.Available);var r=this.validate(t);return this.$http.post(this.url+"/families?include="+i.toLowerCase(),r).then(function(n){return n.data})},t.prototype.getSuggestions=function(n){return n===void 0&&(n={}),angular.isString(n.marketLocale)||(n.marketLocale=this.language),this.$http.post(this.url+"/suggest",n).then(function(n){return n.data})},t.prototype.validate=function(n){var t=angular.copy(n);return angular.isString(t.orderBy)||(t.orderBy=""),angular.isDefined(t.includePrices)||(t.includePrices=!1),angular.isString(t.marketLocale)||(t.marketLocale=this.language),t},t}();i=function(){function n(){var n=this;this.$get=["$http",function(i){return new t(i,n._url,n._language)}]}return n.prototype.url=function(n){return angular.isDefined(n)?(this._url=n,this):this._url},n.prototype.language=function(n){return angular.isDefined(n)?(this._language=n,this):this._language},n}();angular.module("gn.audio.quicksearch").provider("quickSearch",i)})(t=n.QuickSearch||(n.QuickSearch={}))})(t=n.Audio||(n.Audio={}))}(GN||(GN={})),function(n){"use strict";n.module("JabraApplication.Navigation",["gn.audio.site.settings","gn.audio.quicksearch"])}(angular),function(){"use strict";var n=angular.module("JabraApplication.Navigation");n.factory("loginHost",["$window",function(n){return n.location.host&&n.location.host.indexOf(".jabra.")>0?"https://"+n.location.host:n.location.host==="jabra-public-shell-en"?"http://"+n.location.host:"https://www.jabra.com"}]);n.factory("loginService",["$http","$rootScope","$q","loginHost",function(n,t,i,r){var u={},e="login",f=r+"/services/AuthenticationService/AuthenticationService.svc";return u.login=function(r,u,o,s){var h=i.defer(),c={Login:r,Password:u,RememberMe:Number(o||!1)+""};return typeof s=="object"&&s!==null&&(c.DuplicateProfileId=s.CrmContactId||""),n.post(f+"/Authenticate",c).then(function(n){var r=(n.data.IsAuthenticated+"").toLowerCase()==="true",i={authenticated:r,requiresSelection:!1,customerName:n.data.CustomerName};r&&(n.data.DuplicateProfiles&&n.data.DuplicateProfiles.length>1?(i.profiles=n.data.DuplicateProfiles,i.requiresSelection=(c.DuplicateProfileId||"").length===0):t.$broadcast(e));h.resolve(i)},function(n){h.reject(n)}),h.promise},u.isAuthenticated=function(){var t=i.defer();return n.get(f+"/IsAuthenticated",{params:{cache:(new Date).getTime()}}).then(function(n){t.resolve(n.data)},function(n){t.reject(n)}),t.promise},u.logOff=function(){var i=n.get(f+"/Logoff",{params:{cache:(new Date).getTime()}});return i.then(function(){t.$broadcast(e)}),i},u.resetPassword=function(t){var r=i.defer();return n.get(f+"/ResetPassword/"+t,{cache:!1}).then(function(n){r.resolve(n.data)},function(){r.resolve(!1)}),r.promise},u.onLoginChange=function(n,t){return n.$on(e,t)},u.showLogin=function(){window.location.protocol==="https:"&&t.$broadcast("showlogin")},u.onShowLogin=function(n,t){return n.$on("showlogin",t)},u}])}(),function(){"use strict";angular.module("JabraApplication.Navigation").controller("LoginStateController",["$scope","$location","loginService",function(n,t,i){function r(){i.isAuthenticated().then(function(i){n.authenticated=String(i).toLowerCase()==="true";n.authenticated||t.path()!=="/login"||n.showLogin()})}n.authenticated=!1;n.logOff=function(){i.logOff().then(function(){document.location.href="http://"+document.location.host})};n.showLogin=function(){i.showLogin()};i.onLoginChange(n,function(){r()});r()}])}(),function(){"use strict";angular.module("JabraApplication.Navigation").controller("PartnernetLoginController",["$scope","loginService","$window",function(n,t,i){function r(n,t){var r=new RegExp("[\\?&#]"+n+"=([^&#]*)"),i=r.exec(t);return!i||i.length<=0?null:decodeURIComponent(i[1].replace(/\+/g," "))}function e(){return r("returnUrl",i.location.search)||r("url",i.location.hash)||n.targetPage}function u(t){n.loading=!1;t&&t.authenticated?t.requiresSelection&&t.profiles?(n.profiles=t.profiles,n.mode="selectprofile",n.customerName=t.customerName):i.location.href=e():n.invalid=!0}function f(){n.loading=!1;n.invalid=!0}n.showlogin=i.location.protocol==="https:"&&i.location.hash&&i.location.hash.indexOf("#/login")>=0;n.invalid=!1;n.loading=!1;n.email="";n.password="";n.remember=!1;n.targetPage=null;n.mode="";n.profiles=[];n.customerName="";n.submit=function(r){r||(r=i.location.href);n.targetPage=r;n.loading=!0;n.invalid=!1;t.login(n.email,n.password,n.remember).then(u,f)};n.selectProfile=function(i){t.login(n.email,n.password,n.remember,i).then(u,f)};n.close=function(){n.invalid=!1;n.showlogin=!1;n.mode=""};n.forgot=function(){n.email&&t.resetPassword(n.email).then(function(t){n.mode=t?"forgot-success":"forgot-unknown"})};t.onShowLogin(n,function(){n.invalid=!1;n.showlogin=!0;n.mode=""})}])}(),function(n){"use strict";n.module("JabraApplication.Navigation").controller("TopNavigationSearchController",["$scope","topNavSearchHelper",function(n,t){var r=function(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null},i=r("q");i&&t.setCurrentSearchPhrase(i);n.searchQuery=t.getCurrentSearchPhrase();n.$on("search:query:reset",function(){n.searchQuery="";t.setCurrentSearchPhrase(n.searchQuery);var i=document.getElementById("q");i!==null&&i.focus()});n.doSearch=function(){t.setCurrentSearchPhrase(n.searchQuery)}}])}(angular),function(n){"use strict";n.module("JabraApplication.Navigation").controller("TopNavigationSearchResultsController",["$scope","$rootScope","topNavSearchHelper","quickSearch",function(n,t,i,r){var o="",u="",e=5,f=5,s=2,h=function(t,i,r){var u=Math.ceil(r/i),o,h=1,e=1,c=0,s=Math.ceil(f/2);if(n.selectedPage=t,n.productResultsPages=[],u&&u!==1)for(u<=f?e=u:t<=s?e=f:(c=u-t,c<s?(h=u-f+1,e=u):(h=t-s+1,e=t+s-1)),o=h;o<=e;o++)n.productResultsPages.push(o)},c=function(){var t;window.bcsCurrentQuery=u;window.bcsAlterQuery?t=window.setInterval(function(){document.getElementsByClassName("bcs-searchbox").length!==0&&(window.bcsAlterQuery(u),clearInterval(t),n.loading=!1,n.$apply())},100):n.loading=!1};n.loading=!1;n.showResults=!1;n.selectedPage=0;n.productResultsCount=0;n.productResultsItems=[];n.showResultsContainer=function(){if(u.length<s){n.showResults=!1;return}n.productResultsItems={};n.updateProductSearch();n.showResults=!0};n.updateProductSearch=function(t){var i=t||1,f=e*Math.max(i-1,0);n.productResultsPages=[];n.loading=!0;r.get({filter:n.filterQuery,orderBy:o,search:u,skip:f,top:e}).then(function(t){n.productResultsCount=t.count||0;n.productResultsItems=t.items||[];h(i,e,n.productResultsCount)},function(){n.productResultsCount=0;n.productResultsItems=[]}).finally(function(){if(t!==undefined){n.loading=!1;return}c()})};n.findNew=function(){t.$broadcast("search:query:reset")};n.$watch(function(){return i.getCurrentSearchPhrase()},function(t){u=t;n.showResultsContainer()});n.seeAllResults=function(){var n=document.getElementById("site-search");n!==null&&n.submit()}},])}(angular),function(){"use strict";angular.module("JabraApplication.Navigation").directive("autoFillSync",["$timeout",function(n){return{require:"ngModel",link:function(t,i,r,u){return n(function(){var n=i.val();u.$pristine&&u.$viewValue!==n&&n&&u.$setViewValue(n)},500)}}}])}(),function(n){"use strict";n.module("JabraApplication.Navigation").directive("doDesktopRedirect",[function(){return{link:function(t,i,r){var u=!1,f=r.doDesktopRedirect;if(n.isString(f)&&f!==""){i.on("touchstart",function(){u=!0});i.on("click",function(){if(u){u=!1;return}window.location.href=f})}}}}])}(angular),function(n){"use strict";n.module("JabraApplication.Navigation").factory("topNavSearchHelper",[function(){var n="";return{getCurrentSearchPhrase:function(){return n},setCurrentSearchPhrase:function(t){n=t.substr(0,100);n&&n.length>2&&window.ga!==undefined&&window.ga("send","pageview","/search?q="+n)}}}])}(angular),function(n){"use strict";n.module("JabraApplication.DisableLocationRewrite",[]).config(["$provide",function(n){n.decorator("$browser",["$delegate",function(n){return n.onUrlChange=function(){},n.url=function(){return""},n}])}])}(window.angular),function(n,t){"use strict";var i=["JabraApplication.Navigation","JabraApplication.DisableLocationRewrite"];n.module("JabraApplication.Navigation").config(["$sceProvider",function(n){n.enabled(!1)},]).config(["navigationConfigurationExport","quickSearchProvider",function(n,t){t.url(n.productCatalogueUrl+"v1/search").language(n.language)},]);t(function(){var t=document.querySelector(".top-navigation");n.bootstrap(t,i)})}(window.angular,jQuery)