function getScriptConfiguration(){var n,t=currentScript,i="",r="";return t&&(n=$(t).attr("data-domain"),"undefined"!=typeof n&&(i=n),n=$(t).attr("data-loopDomain"),"undefined"!=typeof n&&(r=n)),{domain:i,loopDomain:r}}var Loop,currentScript,Registration;(function(){}).call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});!function(n){"use strict";function t(t){var i=this._getSettings(t);return this.routes=i.routes,this.notFoundHandler=i.page404,this.mode=n.history&&n.history.pushState?i.mode:"hash",this.root="/"===i.root?"/":"/"+this._trimSlashes(i.root)+"/",this.beforeHook=i.hooks.before,this.securityHook=i.hooks.secure,this._pageState=null,this._currentPage=null,this._skipCheck=!1,this._action=null,"hash"===this.mode&&(this._historyStack=[],this._historyIdx=0,this._historyState="add"),this}t.Page=function(n,t,i,r,u){this.uri=n||"";this.query=t||{};this.params=i||[];this.state=r||null;this.options=u||{}};t.prototype._getSettings=function(n){var t={},i={routes:[],mode:"history",root:"/",hooks:{before:function(){},secure:function(){return!0}},page404:function(n){console.error({page:n,message:"404. Page not found"})}};return n=n||{},["routes","mode","root","page404"].forEach(function(r){t[r]=n[r]||i[r]}),t.hooks=Object.assign({},i.hooks,n.hooks||{}),t};t.prototype._getHistoryFragment=function(){var t=decodeURI(n.location.pathname);return"/"!==this.root&&(t=t.replace(this.root,"")),this._trimSlashes(t)};t.prototype._getHashFragment=function(){var t=n.location.hash.substr(1).replace(/(\?.*)$/,"");return this._trimSlashes(t)};t.prototype._getFragment=function(){return"history"===this.mode?this._getHistoryFragment():this._getHashFragment()};t.prototype._trimSlashes=function(n){return"string"!=typeof n?"":n.toString().replace(/\/$/,"").replace(/^\//,"")};t.prototype._page404=function(n){this._currentPage=new t.Page(n);this.notFoundHandler(n)};t.prototype._parseRouteRule=function(n){if("string"!=typeof n)return n;var t=this._trimSlashes(n).replace(/([\\\/\-\_\.])/g,"\\$1").replace(/\{[a-zA-Z]+\}/g,"(:any)").replace(/\:any/g,"[\\w\\-\\_\\.]+").replace(/\:word/g,"[a-zA-Z]+").replace(/\:num/g,"\\d+");return new RegExp("^"+t+"$","i")};t.prototype._parseQuery=function(n){var t={};return"string"!=typeof n?t:("?"===n[0]&&(n=n.substr(1)),this._queryString=n,n.split("&").forEach(function(n){var i=n.split("=");""!==i[0]&&(void 0===i[1]&&(i[1]=!0),t[decodeURIComponent(i[0])]=i[1])}),t)};t.prototype._getHistoryQuery=function(){return this._parseQuery(n.location.search)};t.prototype._getHashQuery=function(){var t=n.location.hash.indexOf("?"),i=-1!==t?n.location.hash.substr(t):"";return this._parseQuery(i)};t.prototype._getQuery=function(){return"history"===this.mode?this._getHistoryQuery():this._getHashQuery()};t.prototype.add=function(n,t,i){return this.routes.push({rule:this._parseRouteRule(n),handler:t,options:i}),this};t.prototype.remove=function(n){var t=this;return"string"==typeof n&&(n=this._parseRouteRule(n).toString()),this.routes.some(function(i,r){return(i.handler===n||i.rule.toString()===n)&&(t.routes.splice(r,1),!0)}),this};t.prototype.reset=function(){return this.routes=[],this.mode=null,this.root="/",this._pageState={},this.removeUriListener(),this};t.prototype._pushHistory=function(){var n=this._getFragment();"hash"===this.mode&&("add"===this._historyState&&(this._historyIdx!==this._historyStack.length-1&&this._historyStack.splice(this._historyIdx+1),this._historyStack.push({path:n,state:this._pageState}),this._historyIdx=this._historyStack.length-1),this._historyState="add")};t.prototype._unloadCallback=function(n){var t;return this._skipCheck?!n||Promise.resolve(!0):this._currentPage&&this._currentPage.options&&this._currentPage.options.unloadCb?(t=this._currentPage.options.unloadCb(this._currentPage,n),!n||t instanceof Promise?t:t?Promise.resolve(t):Promise.reject(t)):!n||Promise.resolve(!0)};t.prototype._findRoute=function(){var i=this,r=this._getFragment();return this.routes.some(function(u){var e=r.match(u.rule),o,f;return e?(e.shift(),o=i._getQuery(),f=new t.Page(r,o,e,i._pageState,u.options),!!i.securityHook(f)&&(i._currentPage=f,i._skipCheck?(i._skipCheck=!1,!0):(i.beforeHook(f),u.handler.apply(f,e),i._pageState=null,n.onbeforeunload=function(n){if(!i._unloadCallback(!1))return n.returnValue=!0,!0},!0))):!1})};t.prototype._treatAsync=function(){var n;(n=this._currentPage.options.unloadCb(this._currentPage,!0))instanceof Promise||(n=n?Promise.resolve(n):Promise.reject(n));n.then(this._processUri.bind(this)).catch(this._resetState.bind(this))};t.prototype._resetState=function(){this._skipCheck=!0;this.navigateTo(this._current,this._currentPage.state,!0)};t.prototype._processUri=function(){var n=this._getFragment();this._current=n;this._pushHistory();this._findRoute.call(this)||this._page404(n)};t.prototype.check=function(){return this._skipCheck?this:(this._currentPage&&this._currentPage.options&&this._currentPage.options.unloadCb?this._treatAsync():this._processUri(),this)};t.prototype.addUriListener=function(){return"history"===this.mode?n.onpopstate=this.check.bind(this):n.onhashchange=this.check.bind(this),this};t.prototype.removeUriListener=function(){return n.onpopstate=null,n.onhashchange=null,this};t.prototype.redirectTo=function(t,i,r){return t=this._trimSlashes(t)||"",this._pageState=i||null,this._skipCheck=!!r,"history"===this.mode?(history.replaceState(i,null,this.root+this._trimSlashes(t)),this.check()):(this._historyIdx--,n.location.hash=t,this)};t.prototype.navigateTo=function(t,i,r){return t=this._trimSlashes(t)||"",this._pageState=i||null,this._skipCheck=!!r,"history"===this.mode?(history.pushState(i,null,this.root+this._trimSlashes(t)),this.check()):(n.location.hash=t,this)};t.prototype.refresh=function(){if(!this._currentPage)return this;var n=this._currentPage.uri+"?"+this._queryString;return this.navigateTo(n,this._currentPage.state)};t.prototype.back=function(){return"history"===this.mode?(n.history.back(),this):this.go(this._historyIdx-1)};t.prototype.forward=function(){return"history"===this.mode?(n.history.forward(),this):this.go(this._historyIdx+1)};t.prototype.go=function(t){if("history"===this.mode)return n.history.go(t),this;var i=this._historyStack[t];return i?(this._historyIdx=t,this._historyState="hold",this.navigateTo(i.path,i.state)):this};n.Router=t}(window);ko.bindingHandlers.fadeIf={init:function(n,t,i,r,u){var f=t();return $(n).toggle(ko.utils.unwrapObservable(f)),ko.bindingHandlers["if"].init(n,t,i,r,u)},update:function(n,t){var i=t();ko.utils.unwrapObservable(i)?$(n).slideDown(200).animate({opacity:"1"},200):$(n).animate({opacity:"0"},200).slideUp(200)}};ko.bindingHandlers.fadeVisible={init:function(n,t){var i=t();$(n).toggle(ko.utils.unwrapObservable(i))},update:function(n,t){var i=t();ko.utils.unwrapObservable(i)?$(n).slideDown(500,"easeInOutExpo").animate({opacity:"1"},500):$(n).animate({opacity:"0"},300).slideUp(500,"easeInOutExpo")}},function(n,t){var i=function(n,t,i){var r;return function(){function e(){i||n.apply(u,f);r=null}var u=this,f=arguments;r?clearTimeout(r):i&&n.apply(u,f);r=setTimeout(e,t||100)}};jQuery.fn[t]=function(n){return n?this.bind("resize",i(n)):this.trigger(t)}}(jQuery,"smartresize");Loop=Loop||{};Loop.Core=Loop.Core||{};Loop.Core.Configuration=function(){function n(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function r(n){var t,r=!1,u="",i="";return n=n||window.location.host,n&&(t=n.split(":"),t.length>1&&(n=t.slice(0,t.length-1).join(":"),u=t[t.length-1]),t=n.split("."),i=t.slice(-2).join("."),["com.au","net.au","org.au","edu.au","gov.au","net.za","co.uk","org.uk","ltd.uk","plc.uk","net.uk","sch.uk","ac.uk","gov.uk","com.fr","ac.jp","co.jp","ed.jp","go.jp","ne.jp","or.jp"].forEach(function(n){i===n&&(r=!0)}),r&&(i=t.slice(-3).join("."))),i}function e(n){n&&n.domain&&(u=t+("string"==typeof n.loopDomain&&n.loopDomain.length>0?n.loopDomain:"loop."+n.domain),i=t+"registration."+n.domain,f=t+"www."+n.domain)}function o(){Loop.Core.Configuration.loginPage=i+"/people/login";Loop.Core.Configuration.registerPage=i+"/people/register-user";Loop.Core.Configuration.UrlList.loopApi=u+"/api/v1";Loop.Core.Configuration.UrlList.frontiers=f}function s(n){var t=window.location.host;n&&!n.domain&&t&&(n.domain=r(t));e(n);o()}var h="0.3.17283.0",t="//",u="loop.frontiersin.org",i="registration.frontiersin.org",f="www.frontiersin.org";return{init:s,getDomain:r,version:function(){return h},generateUUID:function(){return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()},loginPage:null,registerPage:null,currentUserId:null,loggedUserId:null,isUserLogged:function(){return isNaN(this.loggedUserId)===!1&&parseInt(this.loggedUserId,10)>=0},getLoginUri:function(n,t){var i=window.location.protocol+"//"+window.location.host,r=this.loginPage;return t=t?"actionReferral="+t+"&":"",n=n?n:window.location,n="returnUrl="+encodeURI(i+n),r+"?"+t+n},getRegisterUri:function(n,t){var i=window.location.protocol+"//"+window.location.host,r=this.registerPage;return t=t?"actionReferral="+t+"&":"",n=n?n:window.location,n="returnUrl="+encodeURI(i+n),r+"?"+t+n},UrlList:{frontiers:null,loopApi:null,getLoopProfilePage:function(n){var t=this.getAbsoluteUrl("frontiers","/people/{0}/overview");return t=t.replace("www","loop"),Loop.Core.Utils.stringFormat(t,n)},getDefaultProfilePicture:function(){var n=this.getAbsoluteUrl("frontiers","/cdn/images/profile/default_240.jpg");return n.replace("www","loop")},getProfilePicture:function(n){var t=this.getAbsoluteUrl("frontiers","/images/profile/{0}/203");return t=t.replace("www","loop"),Loop.Core.Utils.stringFormat(t,n)},getAbsoluteUrl:function(n,t){var i=$.trim(this[n]);if(t=$.trim(t),!i)throw new Error("The 'Loop.Core.Configuration.UrlList."+n+"' property is undefined.");if("function"==typeof i)throw new Error("The 'Loop.Core.Configuration.UrlList."+n+"' is a function.");return"/"===i[i.length-1]&&(i=i.substring(0,i.length-1)),"/"===t[0]&&(t=t.substring(1)),i+"/"+t}}}}();Loop.Core.Utils=function(){function n(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function t(){return'<script type="text/html" id="multipleAuthorsTemplate">    <ul class="people-list" data-bind="foreach: $data.authorList, css: {\'one-line\': $data.extendDataOnDialog === false}">        <li>            <div class="image-container">                <img alt="author image" class="img-responsive" data-bind="customImg: { src: pictureUrl }" />            <\/div>            <div class="data-container">                <div class="name"><a data-bind="text: name, attr: { href: profileUrl }"><\/a><\/div>                <div class="cb"><\/div>                <ul class="list-hrz">                    <!-- ko if: affiliation -->                    <li data-bind="text: affiliation"><\/li>                    <!-- /ko -->                    <li data-bind="text: location"><\/li>                <\/ul>            <\/div>            <div class="cb"><\/div>        <\/li>    <\/ul><\/script>'}function i(){return'<script type="text/html" id="authorsListTemplate">    <ul class="people-list-hrz" data-test-id="author-list">        <!-- ko foreach: $data.visibleAuthorList -->        <li>            <!-- ko if: ($data.profileUrl || $data.clickAction) && $parent.enableLinks -->            <a data-bind="attr: { href: $data.profileUrl }, click: $data.clickAction" data-test-id="author-name">                <span class="img-frame" data-bind="visible: $data.showImageInList"><img data-bind="attr: {src: $data.imageUrl}, visible: $data.showImageInList"                     data-test-id="author-image"                     onerror="this.src=Loop.Core.Configuration.UrlList.getDefaultProfilePicture();" /><\/span>                <span class="name" data-bind="text: $data.fullName"><\/span>            <\/a>            <!-- /ko -->            <!-- ko ifnot: ($data.profileUrl || $data.clickAction) && $parent.enableLinks -->            <span data-test-id="author-profile-link-empty">                <span class="img-frame" data-bind="visible: $data.showImageInList"><img data-bind="attr: {src: $data.imageUrl}, visible: $data.showImageInList"                     data-test-id="author-image"                     onerror="this.src=Loop.Core.Configuration.UrlList.getDefaultProfilePicture();" /><\/span>                <span class="name" data-bind="text: $data.fullName" data-test-id="author-name"><\/span>            <\/span>            <!-- /ko -->        <\/li>        <!-- /ko -->                <!-- ko if: $data.lastAuthor -->        <li>            <!-- ko if: $data.enableLinks -->               <a data-bind="click: $data.showMoreAction" class="more" data-test-id="author-list-more">                   <span data-bind="text: $data.showMoreCounter() + \' more\'"><\/span>               <\/a>            <!-- /ko -->            <!-- ko ifnot: $data.enableLinks -->               <span data-bind="text: $data.showMoreCounter() + \' more\'"><\/span>            <!-- /ko -->        <\/li>        <li>            <!-- ko if: ($data.lastAuthor().profileUrl || $data.lastAuthor().clickAction) && $data.enableLinks -->            <a data-bind="attr: {href: $data.lastAuthor().profileUrl }, click: $data.lastAuthor().clickAction" data-test-id="last-author-name">                <span class="img-frame" data-bind="visible: $data.lastAuthor().showImageInList"><img data-bind="attr: {src: $data.lastAuthor().imageUrl}, visible: $data.lastAuthor().showImageInList"                     data-test-id="last-author-image"                     onerror="this.src=Loop.Core.Configuration.UrlList.getDefaultProfilePicture();" /><\/span>                <span data-bind="text: $data.lastAuthor().fullName"><\/span>            <\/a>            <!-- /ko -->            <!-- ko ifnot: ($data.lastAuthor().profileUrl || $data.lastAuthor().clickAction) && $data.enableLinks -->            <span data-test-id="author-profile-link-empty">                <span class="img-frame" data-bind="visible: $data.lastAuthor().showImageInList"><img data-bind="attr: {src: $data.lastAuthor().imageUrl}, visible: $data.lastAuthor().showImageInList"                     data-test-id="author-image"                     onerror="this.src=Loop.Core.Configuration.UrlList.getDefaultProfilePicture();" /><\/span>                <span data-bind="text: $data.lastAuthor().fullName" data-test-id="last-author-name"><\/span>            <\/span>            <!-- /ko -->        <\/li>        <!-- /ko -->    <\/ul>    <div class="cb"><\/div><\/script><script type="text/html" id="authorsListDetailedTemplate">    <ul class="people-list" data-bind="foreach: $data.fullInfoAuthorList, css: {\'one-line\': $data.extendDataOnDialog === false}">        <li>            <div class="image-container">                <!-- ko if: profileUrl-->                <a data-bind="attr: { href: profileUrl }" href="" data-test-id="author-image-link">                    <span class="img-frame"><img data-bind="attr: { src: imageUrl, alt: fullName }" alt="" class="img-responsive"                         data-test-id="author-image"                         onerror="this.src=Loop.Core.Configuration.UrlList.getDefaultProfilePicture();" /><\/span>                <\/a>                <!-- /ko-->                <!-- ko ifnot: profileUrl-->                <a style="pointer-events: none;" data-test-id="author-profile-link-empty">                    <span class="img-frame"><img data-bind="attr: { src: imageUrl, alt: fullName }" alt="" class="img-responsive"                         data-test-id="author-image"                         onerror="this.src=Loop.Core.Configuration.UrlList.getDefaultProfilePicture();" /><\/span>                <\/a>                <!-- /ko-->            <\/div>            <div class="data-container">                <div class="name">                    <!-- ko if: profileUrl-->                    <a data-bind="text: fullName, attr: { href: profileUrl }" href="" data-test-id="author-name"><\/a>                    <!-- /ko-->                    <!-- ko ifnot: profileUrl-->                    <span data-bind="text: fullName" data-test-id="author-name"><\/span>                    <!-- /ko-->                <\/div>                <div class="cb"><\/div>                <ul class="list-hrz">                    <li data-bind="text: affiliation" data-test-id="author-affiliation">Affiliation<\/li>                    <li data-bind="text: location" data-test-id="author-location">Location<\/li>                <\/ul>            <\/div>            <div class="cb"><\/div>        <\/li>    <\/ul><\/script>'}function r(){return'<script type="text/html" id="message-bar-template"><div data-bind="fadeVisible: visible, attr: { \'class\': \'alert \' + getCssClass() , \'data-test-id\': dataTestId}" role="alert"><p data-bind="html: htmlMessage, css: { \'icon\': showIcon() === true }"><\/p><!-- ko if: showCloseButton() === true--><i class="close" data-bind="click: close"><\/i><!-- /ko --><\/div><\/script>'}function u(){var n="";return n+='<script type="text/html" id="button">',n+="    <!-- ko template: { name: viewName } -->",n+="    <!-- /ko -->",n+="<\/script>",n+='<script type="text/html" id="defaultButton">',n+="    <button type=\"button\" data-bind=\"attr: { 'data-test-id': 'btn-' + buttonText, 'class': className, 'data-track': dataTrack }, css: { 'btn-saving': isWorking(), 'disabled': (isWorking() || disabled()) }, click: clickAction, enable: (!isWorking() && !disabled())\">",n+="        <span data-bind=\"html: buttonText, attr: { 'data-track': dataTrack }, css: { 'disabled-click': (isWorking() || disabled()) }\"><\/span>",n+="    <\/button>",n+="<\/script>",n+='<script type="text/html" id="cancelButton">',n+='    <button class="btn-cancel" type="button" data-test-id="cancelButton" data-dismiss="modal"',n+="            data-bind=\"click: clickAction, enable: !isWorking(), css: { 'disabled': isWorking() }, attr: { 'data-track': dataTrack }\">",n+="        <span data-bind=\"html: buttonText, attr: { 'data-track': dataTrack }, css: { 'disabled-click': (isWorking() || disabled()) }\"><\/span>",n+="    <\/button>",n+="<\/script>",n+='<script type="text/html" id="confirmButton">',n+='    <button class="btn-save" type="button" data-test-id="confirmButton"',n+="            data-bind=\"click: clickAction, css: {'btn-saving': isWorking(), 'disabled': disabled() }, enable: !isWorking() && !disabled(), attr: { 'data-track': dataTrack }\">",n+="        <span data-bind=\"html: buttonText, attr: { 'data-track': dataTrack }, css: { 'disabled-click': (isWorking() || disabled()) }\"><\/span>",n+="    <\/button>",n+"<\/script>"}function f(){return'<script type="text/html" id="loopMD">    <div class="modal fade" data-bind="attr:{id: id}" role="dialog" aria-hidden="true">        <div class="modal-dialog" data-test-id="actual-dialog">            <div class="modal-content">                <div class="modal-header">                    <button type="button" class="close" data-dismiss="modal"                            data-bind="visible: !hideCloseButton() || error(), click: close">                        <span aria-hidden="true">&times;<\/span><span class="sr-only" data-test-id="closeModalDialogButton"><\/span>                    <\/button>                    <h4 class="modal-title" data-bind="text: title" data-test-id="modal-title"><\/h4>                <\/div>                <div class="spinner" data-bind="fadeIf: isLoading()"><\/div>                <div class="modal-body" data-bind="fadeIf: !error() && isLoaded()">                    <!-- ko template : { name: viewModelTemplate, data: viewModelData } -->                    <!-- /ko -->                <\/div>                <div class="error-module" data-bind="fadeIf: error()">                    <p data-bind="html: error"><\/p>                <\/div>                <div class="modal-footer" style="text-align: center" data-bind="visible: !isLoading()">                    <div data-bind="fadeIf: !error() && isLoaded()">                        <div data-bind="template: { name: \'button\', foreach: buttons }"><\/div>                        <div class="cb"><\/div>                    <\/div>                    <div data-bind="fadeIf: actionButtonError() !== \'\' && actionButtonError() !== null" class="form-validator-warning">                       <span id="exp-ui-msg" data-bind="text: actionButtonError"><\/span>                    <\/div>                <\/div>            <\/div>        <\/div>    <\/div><\/script><script type="text/html" id="loopLoginOrRegisterMD">    <div class="modal fade" data-bind="attr:{id: id}" aria-hidden="true">        <div class="modal-dialog">            <div class="modal-content">                <div class="modal-header">                    <button type="button" class="close" data-dismiss="modal"                            data-bind="visible: !hideCloseButton() || error, click: close">                        <span aria-hidden="true">&times;<\/span><span class="sr-only" data-test-id="closeModalDialogButton"><\/span>                    <\/button>                    <h1 class="modal-title" data-bind="html: title" data-test-id="modal-title"><\/h1>                <\/div>                <div class="modal-body">                    <!-- ko template : { name: viewModelTemplate, data: viewModelData } -->                    <!-- /ko -->                    <div class="divider"><\/div>                <\/div>                <div class="modal-footer">                    <div class="button-container" data-bind="template: { name: \'button\', foreach: buttons }"><\/div>                    <div class="cb"><\/div>                <\/div>            <\/div>        <\/div>    <\/div><\/script><script type="text/html" id="loopSimpleMD">    <div data-bind="html: htmlString"><\/div><\/script>'}function e(){$("body").append(f());$("body").append(u());$("body").append(r());$("body").append(i());$("body").append(t())}return $(document).ready(function(){e()}),{generateUUID:function(){return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()},stringFormat:function(n){var t=Array.prototype.slice.call(arguments,1);return n.replace(/{(\d+)}/g,function(n,i){return"undefined"!=typeof t[i]?t[i]:n})},scrollToElement:function(n,t){var i,r=null,u=!1;r="string"==typeof n?$("#"+n):n;void 0!==t?i="string"==typeof t?$("#"+t):t:(i=$("body"),u=!0);r&&r.offset()&&!i.is(":animated")&&($(window).bind("mousewheel",function(){i.stop()}),r.velocity("scroll",{duration:700,easing:"ease-in-out",container:u?void 0:i,complete:function(){$(window).unbind("mousewheel")}}))}}}();Loop.Core.Browser=function(){function s(){var r,t,u,i=navigator.userAgent;if(o)n.name="MSIE",n.version=11;else{if(t=i.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],/trident/i.test(t[1]))return r=/\brv[ :]+(\d+)/g.exec(i)||[],"IE "+(r[1]||"");if("Chrome"===t[1]&&(r=i.match(/\bOPR\/(\d+)/),null!==r))return"Opera "+r[1];t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"];null!==(r=i.match(/version\/(\d+)/i))&&t.splice(1,1,r[1]);n.name=t[0];n.version=parseInt(t[1],10)}u=navigator.userAgent.match(/Mobile/);n.isMobile=u?u.length>0:!1;n.isMobile===!0?(i=i.toLowerCase(),n.isIpad=i.indexOf("ipad")>-1,n.isIphone=i.indexOf("iphone")>-1):(n.isIpad=!1,n.isIphone=!1)}function i(i,r,u){for(var e=null,f=0;f<t.length;f++)if(t[f].name===i){e=t[f];break}if(null!==e)throw new Error(Loop.Core.Utils.stringFormat("The browser '{0}' with version {1} is already added.",e.name,e.version));"function"!=typeof u&&(u=function(){return"number"==typeof n.version?n.version>=this.minVersion:!1});t.push({name:i,minVersion:r,isSupportedVersion:u,toString:function(){return this.name+" "+this.minVersion}})}var t=[],n={name:null,version:null,isMobile:null,isIpad:null,isIphone:null,toString:function(){return this.name+" "+this.version}},h=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,r="undefined"!=typeof InstallTrigger,u=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,f=!!window.chrome&&!h,e=!1||!!document.documentMode,o=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);return i("Chrome",40,function(){return f?"number"==typeof n.version?n.version>=this.minVersion:!1:!1}),i("Firefox",35,function(){return r?"number"==typeof n.version?n.version>=this.minVersion:!1:!1}),i("IE",11,function(){return e?"number"==typeof n.version?n.version>=this.minVersion:!1:!1}),i("Safari",8,function(){return u?"number"==typeof n.version?n.version>=this.minVersion:!1:!1}),s(),{addSupportedBrowser:i,getCurrentNavigator:function(){return n},getDefaultSupportedBrowsers:function(){return t},isSupportedBrowser:function(){return(r||u||f||e||o)&&!n.isMobile},isSupportedBrowserVersion:function(){var n=!1;return $.each(t,function(t,i){if(i.isSupportedVersion())return(n=!0,void 0)}),n}}}();Loop.Core.Tracking=function(){function o(){if(null===t)throw new Error("Endpoint cannot be null.");if("number"!=typeof t.type)throw new Error("Missing 'type' property in endpoint object.");if("function"!=typeof t.url)throw new Error("Missing 'url' function in endpoint object.");}function f(t){if(!i)throw new Error("Loop.Core.Tracking.eventType must be defined.");("undefined"==typeof n.userId||null===n.userId)&&(n.userId=Loop.Core.Configuration.currentUserId);("undefined"==typeof n.loggedUserId||null===n.loggedUserId)&&(n.loggedUserId=Loop.Core.Configuration.loggedUserId);var u=$(t).attr("data-track-referral"),f={eventType:i,action:$(t).attr("data-track"),actionReferral:u?u:""},r=jQuery.extend(!0,{},n,f);return r.userId<0&&(r.userId=0),r.loggedUserId<0&&(r.loggedUserId=0),r}function r(n){var e,s,r,i=n.target,h=!0;u&&(r="Click -> OnTrackEvent(). Node: ",r+=i.nodeName,i.id&&(r+=" Id: "+i.id),console.log(r));$(i).data("track")&&(u&&console.log("The element has a data-track attribute."),"function"==typeof Loop.Core.Tracking.canTrackThisElement&&(h=Loop.Core.Tracking.canTrackThisElement(i)),h?(o(),e=f(i),"function"==typeof Loop.Core.Tracking.setTrackInfo&&(s=Loop.Core.Tracking.setTrackInfo(i),$.extend(e,s)),Loop.Core.Ajax.createData({endpoint:t,inputData:JSON.stringify(e),successCallback:function(){},errorCallback:function(){},preventModalOnError:!0,loginRequired:!1})):u&&console.log("canTrackElement is false."))}function s(){window.addEventListener?window.addEventListener("click",r,!0):window.attachEvent("click",r)}function h(){window.removeEventListener?window.removeEventListener("click",r,!0):window.detachEvent("click",r)}var e=!1,t=null,i=null,n={eventType:i,action:"",actionReferral:"",page:window.location.pathname,host:window.location.hostname,userId:Loop.Core.Configuration.currentUserId,loggedUserId:Loop.Core.Configuration.loggedUserId},u=!1;return{eventType:function(n){return"string"==typeof n&&(i=n),i},enabled:function(n,t){return"boolean"==typeof n&&(n?s():h(),e=n),Loop.Core.Tracking.eventType(t),e},endpoint:function(n){return n&&(t=n),t},defaultTrackItem:n,setTrackInfo:null,canTrackThisAction:!0,getFakeTrackItem:function(n){var t,i=f(n);return"function"==typeof Loop.Core.Tracking.setTrackInfo&&(t=Loop.Core.Tracking.setTrackInfo(n),$.extend(i,t)),i},setVerbose:function(n){u=n}}}();Loop.Core=Loop.Core||{},function(){var n=function(){var n,t,f,i="trapScroll-enabled",e=".trapScroll",r=".trapScroll-container",o=null,u=null;o=function(r){if($("body").hasClass(i))if($(r.target).closest(n).length>0){var u=n.scrollTop(),o=r.originalEvent,e=o.deltaY;if(e>0&&u>=f||0>e&&0>=u)return!1}else if($(r.target).closest(t).length>0)return!1};u=function(){if(n=t.find(e+":first"),n&&n[0]){var r=n.outerHeight(),u=n[0].scrollHeight;f=u-r;$("body").addClass(i)}};$(document).on("wheel",o);Loop.Core.trapScroll=function(n,f){n&&(f||(f=n),f.addClass(r.substr(1)),n.addClass(e.substr(1)),f.on("mouseleave",function(){$("body").removeClass(i);t=$(this);t.parents(r).length>0&&(t=t.parents(r+":first"),u())}).on("mouseenter",function(n){t=$(this);u();n.stopPropagation()}))}};n()}();Loop.Core.Literals={errors:{defaultRead:{title:"",message:"Sorry, something went wrong and this content could not be loaded. Please refresh the page and try again."},defaultEdit:{title:"",message:"Sorry, something went wrong and your changes could not be saved. Please try again."},unauthorized:{title:"Authentication required",message:"Your session has expired. Please login to continue."},forbidden:{title:"Authorization required",message:"You are not allowed to perform this action. Please refresh the page and try again."},resourceNotFoundRead:{title:"Resource not found",message:"This resource is temporarily unavailable. Please refresh the page and try again."},resourceNotFoundEdit:{title:"Resource not found",message:"The resource you’re editing is temporarily unavailable. Please refresh the page and try again."},itemNotFoundEdit:{title:"Resource not found",message:"The resource you’re editing is temporarily unavailable."},genericLoadingErrorInModal:{title:"",message:"Sorry, something went wrong and this content could not be loaded. Please refresh the page and try again."}},modals:{loginOrRegister:{title:"Stay in the <span>Loop<\/span><br>&amp; up-to-date",message:"<h4>Loop maximizes the impact of researchers and their discoveries. Join the world's leading researchers and academics and become discoverable.<\/h4>"},unauthorized:{title:"Authentication required",message:"Your session has expired. Please login to continue."},forbidden:{title:"Forbidden",message:'Please set your profile to public in the <a href="/settings/privacy">settings<\/a> page so you will be able to perform this action.'},resourceNotFound:{title:"Resource not found",message:"The resource you’re editing is temporarily unavailable. Please refresh the page and try again."},itemNotFound:{title:"Resource not found",message:"The resource you’re editing is temporarily unavailable."}}};Loop.Core.Constants=Loop.Core.Constants||{};Loop.Core.Constants.EndpointType={PRIVATE:0,PUBLIC:1,SOCIAL:2};Loop.Core.Constants.ModalType={DEFAULT:0,LOGIN_OR_REGISTER:1};Loop.Core.Constants.ButtonTypes={DEFAULT:"default",CONFIRM:"confirm",CANCEL:"cancel",BLOCK:"block",UNBLOCK:"unblock"};Loop.Core.Constants.FloatPosition={NONE:"none",LEFT:"left",RIGHT:"right"};Loop.Core.Constants.MessageBarTypes={ERROR:0,SUCCESS:1,INFO:2,WARNING:3,PRIVATE:4};Loop.Core.Constants.Breakpoints={EXTRA_SMALL:"xs",SMALL:"sm",MEDIUM:"md",LARGE:"lg"};Loop.Core.Constants.PaginationMode={NONE:0,SCROLL_DOCUMENT:1,SCROLL_ELEMENT:2,SHOW_MORE:3,POOL:4,NUMBER:5};Loop.Core.Enum=Loop.Core.Enum||{};Loop.Core.Enum.APIActions=function(){return{Read:0,Create:1,Update:2,Delete:3,GetName:function(n){var t;switch(n){case Loop.Core.Enum.APIActions.Read:t="READ";break;case Loop.Core.Enum.APIActions.Create:t="CREATE";break;case Loop.Core.Enum.APIActions.Update:t="UPDATE";break;case Loop.Core.Enum.APIActions.Delete:t="DELETE"}return t}}}();Loop.Core.Constants.Events={},function(n,t){var i=n({});t.subscribe=function(t,r,u){return n.isArray(t)||(t=[t]),n.each(t,function(n,t){u?setTimeout(function(){i.on(t,function(){setTimeout(r,u)})}):i.on(t,r)}),!0};t.unsubscribe=function(n,t){return i.off(n,t),void 0};t.publish=function(n,t){i.trigger(n,t)}}(jQuery,window.Loop.Core=window.Loop.Core||{});Loop.Core.Controls=Loop.Core.Controls||{};Loop.Core.Controls.Pager=function(n){function o(){var i=jQuery.extend(!0,{},e,n);t.paginationMode=i.paginationMode;t.pageSize(i.pageSize);t.currentPage(i.currentPage);t.total(i.totalElements);t.customArgs=i.customArgs;t.onPagination=i.onPagination}function r(n){"function"==typeof t.onPagination?(f("paging"),t.pagingFinish=$.Deferred(),t.pagingFinish.promise(),t.onPagination(t),$.when(t.pagingFinish).then(function(){f("none");u=!0;t.paginationMode===Loop.Core.Constants.PaginationMode.NUMBER?s(t.total(),t.pageSize()):n===!0?t.currentPage(t.currentPage()+1):n===!1&&t.currentPage(t.currentPage()-1)},function(){f("none");u=!0})):console.warn("next function needs a handler for options.onPagination event. Pass it into the constractor.")}function s(n,i){var u,f=parseInt(n/i);for(0!=n%i&&(f+=1),t.totalPages(f),t.pages([]),u=0;f>u;u++)t.pages.push({index:u,isCurrent:u==t.currentPage(),goTo:function(){t.currentPage(this.index);r()}})}var t=this,i=!1,u=!1,f=ko.observable("none"),e={pageSize:100,currentPage:0,totalElements:0,paginationMode:Loop.Core.Constants.PaginationMode.NONE,customArgs:null,onPagination:null};t.pagingFinish=$.Deferred();t.pagingFinish.promise();t.paginationMode=null;t.disabled=!1;t.pageSize=ko.observable(e.pageSize);t.currentPage=ko.observable(0);t.pages=ko.observableArray([]);t.totalPages=ko.observable(0);t.total=ko.observable(0);t.customArgs=null;t.onPagination=null;t.getOffset=function(){return t.pageSize()*t.currentPage()};t.next=function(){if(i&&!u)throw new Error("pagingFinish deferred was not resolved nor rejected.");t.isEndOfPagination()!==!1&&i!==!1||t.isPaging()!==!1||(t.paginationMode===Loop.Core.Constants.PaginationMode.NUMBER&&t.currentPage(t.currentPage()+1),r(!0),i=!0)};t.previous=function(){if(i&&!u)throw new Error("pagingFinish deferred was not resolved nor rejected.");t.currentPage()>0&&t.isPaging()===!1&&(t.paginationMode===Loop.Core.Constants.PaginationMode.NUMBER&&t.currentPage(t.currentPage()-1),r(!1),i=!0)};t.loadPage=function(n){t.currentPage(n);r()};t.isPaging=ko.computed(function(){return"paging"===f()});t.isEndOfPagination=ko.computed(function(){if(t.paginationMode===Loop.Core.Constants.PaginationMode.NUMBER)return t.pages().length-1<=t.currentPage();var n=t.currentPage()*t.pageSize();return n>=t.total()});t.allowPagination=ko.computed(function(){return!t.isPaging()&&!t.isEndOfPagination()&&!t.disabled});o()};Loop.Core.Controls=Loop.Core.Controls||{};Loop.Core.Controls.Button=function(n){function u(){switch(r){case Loop.Core.Constants.ButtonTypes.CONFIRM:i="confirmButton";t=t||"btn-save";break;case Loop.Core.Constants.ButtonTypes.CANCEL:i="cancelButton";t=t||"btn-cancel";break;case Loop.Core.Constants.ButtonTypes.BLOCK:i="defaultButton";t=t||"btn-block";break;case Loop.Core.Constants.ButtonTypes.UNBLOCK:i="defaultButton";t=t||"btn-confirm";break;case Loop.Core.Constants.ButtonTypes.DEFAULT:i="defaultButton";t=t||"btn"}switch(o){case Loop.Core.Constants.FloatPosition.LEFT:t+=" pull-left";break;case Loop.Core.Constants.FloatPosition.RIGHT:t+=" pull-right"}}var r=n.buttonType||Loop.Core.Constants.ButtonTypes.DEFAULT,f=n.buttonText,i="",e=n.clickAction,o=n.floatPosition,s=n.isDefault||!1,h=n.isWorking||ko.observable(!1),t=n.buttonClass,c=n.dataTrack||null,l=n.isDisabled||ko.observable(!1),a=n.trackingData;return u(),{viewName:i,buttonType:r,buttonText:f,clickAction:e,isDefault:s,isWorking:h,disabled:l,className:t,dataTrack:c,trackingData:a}};Loop.Core.Controls=Loop.Core.Controls||{};Loop.Core.Controls.ModalDialog=function(n,t,i,r,u,f,e,o){function l(){return s.modalType===Loop.Core.Constants.ModalType.LOGIN_OR_REGISTER?"loopLoginOrRegisterMD":(s.modalType=Loop.Core.Constants.ModalType.DEFAULT,"loopMD")}function a(){return $.extend({backdrop:"static",keyboard:!1,show:!1},o||{})}function v(){var n=$($("#"+c).html().trim()).modal(a());return n.on("hide.bs.modal",function(){s.currentlyModalOnScreen=!1}),n.on("hidden.bs.modal",function(){f===!0&&n.remove()}),n}function y(){c=l();null===s.viewModelTemplate&&"string"==typeof s.viewModelData&&(s.viewModelData={htmlString:s.viewModelData},s.viewModelTemplate=p);s.dialog=v();ko.applyBindings(s,s.dialog[0])}f="boolean"==typeof f?f:!0;u="boolean"==typeof u?u:!1;var s=this,c=null,p="loopSimpleMD",h=ko.observable("none");s.dialogGUID=Loop.Core.Utils.generateUUID();s.dialog=null;s.currentlyModalOnScreen=!1;s.id=n;s.title=ko.observable(t);s.modalType=e;s.viewModelTemplate=null;s.viewModelData=i;s.buttons=r;s.error=ko.observable(!1);s.actionButtonError=ko.observable("");s.hideCloseButton=ko.observable(u);s.onDestroy=null;s.onClose=null;s.isLoading=ko.computed(function(){return"loading"===h()});s.isLoaded=ko.computed(function(){return"loaded"===h()});s.setDataStatus=function(n){n="boolean"==typeof n?n:!0;h(n?"loaded":"loading")};s.show=function(n){return s.setDataStatus(n),null===s.dialog&&y(),s.currentlyModalOnScreen||(s.dialog.modal("show"),s.currentlyModalOnScreen=!0,document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()),s};s.close=function(){if(s.dialog.modal("hide"),s.currentlyModalOnScreen=!1,s.buttons&&s.buttons.length>0){var n=s.buttons.filter(function(n){return n.isDefault});n.length>0?n[0].clickAction():n.length>1&&(n[0].clickAction(),console.warn("The current dialog (id='"+s.id+"') has more than one default buttons. The first button action has been triggered."))}return"function"==typeof s.onClose&&s.onClose(s),s};s.toggle=function(){return s.dialog.modal("toggle"),s};s.destroy=function(){if(s)return(s.currentlyModalOnScreen&&s.dialog.modal("hide"),"function"==typeof s.onDestroy&&s.onDestroy(s),s.currentlyModalOnScreen=!1,s=null)}};Loop.Core.Modals=function(){function t(n){return"<p>"+n+"<\/p>"}function e(){for(;n.length;){var t=n.pop();t.destroy()}}function f(t){for(var i=0;i<n.length;i++)if(n[i]===t){n.splice(i,1);break}}function u(){var t=$.grep(n,function(n){return n.currentlyModalOnScreen===!0});if(t.length>0)return t[0]}function r(){return u()}function i(t,i,u,e,o){var s,h,c;return s=new Loop.Core.Controls.ModalDialog(t,i,u),c=function(){"function"==typeof e&&e();s.destroy()},h=new Loop.Core.Controls.Button({buttonType:Loop.Core.Constants.ButtonTypes.CONFIRM,buttonText:"OK",floatPosition:Loop.Core.Constants.FloatPosition.RIGHT,clickAction:c,isDefault:!0}),s.hideCloseButton(o),s.buttons=[h],s.onDestroy=f,r()||s.show(),n.push(s),s}function o(i){var u,s,h,e=[],o=[];if(!i)throw new Error("Method expects parameters.");if(i.id||e.push("id"),i.title||e.push("title"),i.message||e.push("message"),i.confirmAction||e.push("confirmAction"),i.cancelAction||e.push("cancelAction"),e.length>0)throw new Error("Missing required fields: "+e.join(","));if("string"!=typeof i.id&&o.push("id"),"string"!=typeof i.title&&o.push("title"),"string"!=typeof i.message&&o.push("message"),"function"!=typeof i.confirmAction&&o.push("confirmAction"),"function"!=typeof i.cancelAction&&o.push("cancelAction"),o.length>0)throw new Error("Wrong field types: "+o.join(","));return u=new Loop.Core.Controls.ModalDialog(i.id,i.title,t(i.message)),s=new Loop.Core.Controls.Button({buttonType:Loop.Core.Constants.ButtonTypes.CONFIRM,buttonText:i.confirmButtonText||"Confirm",floatPosition:Loop.Core.Constants.FloatPosition.RIGHT,clickAction:i.confirmAction,isWorking:i.isWorking,dataTrack:i.confirmDataTrack,trackingData:i.confirmTrackingData}),h=new Loop.Core.Controls.Button({buttonType:Loop.Core.Constants.ButtonTypes.CANCEL,buttonText:i.cancelButtonText||"Cancel",floatPosition:Loop.Core.Constants.FloatPosition.LEFT,clickAction:i.cancelAction,isDefault:!0,isWorking:i.isWorking,dataTrack:i.cancelDataTrack,trackingData:i.cancelTrackingData}),u.buttons=[s,h],u.onDestroy=f,void 0!==u.hideCloseButton&&u.hideCloseButton(!1),r()||u.show(),n.push(u),u}function s(n){var r=Loop.Core.Literals.modals.unauthorized.title,u=t(Loop.Core.Literals.modals.unauthorized.message);return i("unauthorizedModal",r,u,n,!0)}function h(i,u){var f,e,o;return f=new Loop.Core.Controls.ModalDialog("socialForbiddenAction",i,t(u)),o=function(){var n=window.location.protocol+"//"+window.location.host,t=n+"/settings/privacy";location.replace(t)},e=new Loop.Core.Controls.Button({buttonType:Loop.Core.Constants.ButtonTypes.DEFAULT,buttonText:"Change privacy settings",floatPosition:Loop.Core.Constants.FloatPosition.RIGHT,clickAction:o,buttonClass:"btn-flex"}),f.hideCloseButton(!1),f.buttons=[e],r()||f.show(),n.push(f),f}function c(){var n=Loop.Core.Literals.modals.forbidden.title,r=t(Loop.Core.Literals.modals.forbidden.message);return i("forbiddenModal",n,r,!0)}function l(n){var r=Loop.Core.Literals.modals.resourceNotFound.title,u=t(Loop.Core.Literals.modals.resourceNotFound.message);return i("errorModalResNotFound",r,u,n,!0)}function a(n){var r=Loop.Core.Literals.modals.itemNotFound.title,u=t(Loop.Core.Literals.modals.itemNotFound.message);return i("errorModalItemNotFound",r,u,n,!0)}function v(t,i,f,e){var o,s,h,c,l="modal-login-register",a=Loop.Core.Literals.modals.loginOrRegister.title,v=void 0===f?Loop.Core.Literals.modals.loginOrRegister.message:"<h4>"+f+"<\/h4>";return o=new Loop.Core.Controls.ModalDialog(l,a,v),o.modalType=Loop.Core.Constants.ModalType.LOGIN_OR_REGISTER,e=e?e:"",c=e?"actionReferral="+e+"&":"","function"!=typeof t&&(t=function(){var n=Loop.Core.Configuration.loginPage+"?"+c+"returnUrl="+encodeURI(window.location);location.replace(n)}),"function"!=typeof i&&(i=function(){var n=Loop.Core.Configuration.registerPage+"?"+c+"returnUrl="+encodeURI(window.location);location.replace(n)}),s=new Loop.Core.Controls.Button({buttonType:Loop.Core.Constants.ButtonTypes.DEFAULT,buttonText:"LOGIN",floatPosition:Loop.Core.Constants.FloatPosition.LEFT,clickAction:t,dataTrack:"login",trackingData:function(){return{brick:l,actionReferral:e}}}),h=new Loop.Core.Controls.Button({buttonType:Loop.Core.Constants.ButtonTypes.DEFAULT,buttonText:"REGISTER",floatPosition:Loop.Core.Constants.FloatPosition.RIGHT,clickAction:i,dataTrack:"register",trackingData:function(){return{brick:l,actionReferral:e}}}),s.className="btn-login",h.className="btn-register",o.buttons=[s,h],r()&&u().destroy(),o.show(),n.push(o),o}function y(n,u,f,e,o){f="string"==typeof f?t(f):f;var s=i(n,u,f,e,o);return r()||s.show(),s}function p(n,r,f,o){var s=u(),h="loopBlockingErrorModal",c=null;if(!s||s.id!==h)return(o="boolean"==typeof o?o:!0,e(),c=i(h,n,t(r),f,o),c.show())}function w(t,i,r,u,f,e,o,s){var h=new Loop.Core.Controls.ModalDialog(t,i,r,u,f,e,o,s);return n.push(h),h}var n=[];return{getCurrentModalOnScreen:u,getModal:w,showModal:y,showConfirmCancelModal:o,showForbiddenModal:c,showUnauthorizedModal:s,showResourceNotFound:l,showItemNotFound:a,showLoginRegisterModal:v,showSocialForbiddenModal:h,showBlockingErrorModal:p}}();Loop.Core.Controls=Loop.Core.Controls||{};Loop.Core.Controls.MessageBar=function(n){function u(){var u=jQuery.extend(!0,{},f,n),e=$("#"+r);if(0===e.length)throw new Error("Template script '"+r+"' not found.");i=$(e.html().trim());t.type(u.type);t.htmlMessage=ko.observable(u.htmlMessage);t.visible=ko.observable(u.visible);t.showCloseButton=ko.observable(u.showCloseButton);t.showIcon=ko.observable(u.showIcon);t.parent=u.parent;t.dataTestId=u.dataTestId;t.onClose=u.onClose;ko.applyBindings(t,i[0]);t.parent.prepend(i)}var f={type:Loop.Core.Constants.MessageBarTypes.INFO,htmlMessage:"",showCloseButton:!0,visible:!1,parent:$("body"),dataTestId:"msg-bar",showIcon:!0,onClose:null},r="message-bar-template",i=null,t=this;t.type=ko.observable();t.htmlMessage=null;t.visible=null;t.showCloseButton=null;t.parent=null;t.dataTestId=null;t.showIcon=null;t.show=function(){t.visible(!0)};t.close=function(){t.visible(!1);"function"==typeof t.onClose&&t.onClose(t)};t.getCssClass=ko.computed(function(){switch(t.type()){case Loop.Core.Constants.MessageBarTypes.ERROR:return"alert-error";case Loop.Core.Constants.MessageBarTypes.SUCCESS:return"alert-success";case Loop.Core.Constants.MessageBarTypes.INFO:return"alert-info";case Loop.Core.Constants.MessageBarTypes.WARNING:return"alert-warning";case Loop.Core.Constants.MessageBarTypes.PRIVATE:return"alert-private";default:return"alert-info"}});t.onClose=null;u()};Loop.Core.ErrorHandler=function(){function t(n,t,i,r){var u="EPT"+n+"_";return u+=t?t:"DEFAULT",i&&(u+="_"+i),u+(r?"_"+Loop.Core.Enum.APIActions.GetName(r):"_ALL")}function r(i){if(!i)throw new Error("Error trying to add a new error handler. Parameter 'handler' is null.");var r=n[t(i.endpointType,i.errorCode,i.subErrorCode,i.apiAction)];if(r)throw new Error("New error handler for endpoint type '"+i.endpointType+"', error code  '"+i.errorCode+"', error subcode '"+i.subErrorCode+"' and API action '"+i.apiAction+"' already exists.");if("string"!=typeof i.errorMessage&&"function"!=typeof i.action)throw new Error("New error handler doesn't contain error message and action.");}function u(t){r(t);var i=jQuery.extend(!0,{},e,t);n[i.getEntryCode()]=i}function i(i,r,u,f){var e=n[t(i,r,u,f)];return e||(e=n[t(i,r,u,null)]),e||(e=n[t(i,r,null,null)]),e||(e=n[t(i,null,null,f)]),e||(e=n[t(i,null,null,null)]),e}function f(n,t,r,u){var f=i(n,t,r,u);return f||(f=i(Loop.Core.Constants.EndpointType.PRIVATE,t,r,u)),f}var n={},e={endpointType:Loop.Core.Constants.EndpointType.PRIVATE,errorCode:null,subErrorCode:null,apiAction:null,errorTitle:null,errorMessage:null,action:null,getEntryCode:function(){return t(this.endpointType,this.errorCode,this.subErrorCode,this.apiAction)}};return{addErrorHandler:u,getErrorHandler:f,getAllErrorHandlers:function(){return n}}}();Loop.Core.ErrorHandler.addErrorHandler({errorTitle:Loop.Core.Literals.errors.defaultRead.title,errorMessage:Loop.Core.Literals.errors.defaultRead.message,apiAction:Loop.Core.Enum.APIActions.Read});Loop.Core.ErrorHandler.addErrorHandler({errorTitle:Loop.Core.Literals.errors.defaultEdit.title,errorMessage:Loop.Core.Literals.errors.defaultEdit.message,apiAction:Loop.Core.Enum.APIActions.Create});Loop.Core.ErrorHandler.addErrorHandler({errorTitle:Loop.Core.Literals.errors.defaultEdit.title,errorMessage:Loop.Core.Literals.errors.defaultEdit.message,apiAction:Loop.Core.Enum.APIActions.Update});Loop.Core.ErrorHandler.addErrorHandler({errorTitle:Loop.Core.Literals.errors.defaultEdit.title,errorMessage:Loop.Core.Literals.errors.defaultEdit.message,apiAction:Loop.Core.Enum.APIActions.Delete});Loop.Core.ErrorHandler.addErrorHandler({errorCode:401,errorTitle:Loop.Core.Literals.errors.unauthorized.title,errorMessage:Loop.Core.Literals.errors.unauthorized.message,action:function(){Loop.Core.Modals.showBlockingErrorModal(this.errorTitle,this.errorMessage,function(){var n=Loop.Core.Configuration.loginPage;n=n+"?ReturnUrl="+document.location.href;location.replace(n)})}});Loop.Core.ErrorHandler.addErrorHandler({errorCode:403,errorTitle:Loop.Core.Literals.errors.forbidden.title,errorMessage:Loop.Core.Literals.errors.forbidden.message,action:function(){Loop.Core.Modals.showBlockingErrorModal(this.errorTitle,this.errorMessage,function(){location.reload()})}});Loop.Core.ErrorHandler.addErrorHandler({errorCode:404,errorTitle:Loop.Core.Literals.errors.resourceNotFoundRead.title,errorMessage:Loop.Core.Literals.errors.resourceNotFoundRead.message,apiAction:Loop.Core.Enum.APIActions.Read,action:function(){Loop.Core.Modals.showBlockingErrorModal(this.errorTitle,this.errorMessage,function(){location.reload()})}});Loop.Core.ErrorHandler.addErrorHandler({errorCode:404,errorTitle:Loop.Core.Literals.errors.resourceNotFoundEdit.title,errorMessage:Loop.Core.Literals.errors.resourceNotFoundEdit.message,apiAction:Loop.Core.Enum.APIActions.Create,action:function(){Loop.Core.Modals.showBlockingErrorModal(this.errorTitle,this.errorMessage,function(){location.reload()})}});Loop.Core.ErrorHandler.addErrorHandler({errorCode:404,errorTitle:Loop.Core.Literals.errors.resourceNotFoundEdit.title,errorMessage:Loop.Core.Literals.errors.resourceNotFoundEdit.message,apiAction:Loop.Core.Enum.APIActions.Update,action:function(){Loop.Core.Modals.showBlockingErrorModal(this.errorTitle,this.errorMessage,function(){location.reload()})}});Loop.Core.ErrorHandler.addErrorHandler({errorCode:412,subErrorCode:7,errorTitle:Loop.Core.Literals.errors.itemNotFoundEdit.title,errorMessage:Loop.Core.Literals.errors.itemNotFoundEdit.message,apiAction:Loop.Core.Enum.APIActions.Update});Loop.Core.EndpointRepository=function(){function t(n,t){var i=n;return t&&(i+="_"+t),i}function r(n){if(!n)throw new Error("Error trying to add a new endpoint. Parameter 'endpoint' is null.");if(!n.key)throw new Error("Error trying to add a new endpoint. Parameter 'key' is null.");var t=i(n.key);if(t)throw new Error("Endpoint with key '"+t.key+"' already exists.");if("function"!=typeof n.url)throw new Error("endpoint.url must be a function which return the URI of the endpoint.");}function u(t){r(t);var i=jQuery.extend(!0,{},o,t);n[i.key]=i}function i(t,i){var u=n[t],r=null;return u?(r=jQuery.extend(!0,{},u),r.urlArgs=i,r):null}function f(t,i){var r=jQuery.extend(!0,{},s,i),u=n[t];u&&(u.customErrorMessages[r.getCustomMessageCode()]=r)}function e(t,i,r){var u=n[t];return u?u.getCustomMessage(i,r):null}var n={},o={key:null,url:null,urlArgs:null,params:null,type:Loop.Core.Constants.EndpointType.PRIVATE,customErrorMessages:{},getCustomMessage:function(n,i){if(this.customErrorMessages){var r=this.customErrorMessages[t(n,i)];return r?r:this.customErrorMessages[t(n,null)]}return null}},s={errorCode:null,subErrorCode:null,errorTitle:null,errorMessage:null,getCustomMessageCode:function(){return t(this.errorCode,this.subErrorCode)}};return{addEndpoint:u,getEndpoint:i,addCustomMessage:f,getCustomMessage:e,getAllEndpoints:function(){return n}}}();Loop.Core.Ajax=function(){function i(n,t,i,r,u){var e=u?u.ErrorCode:null,f=Loop.Core.ErrorHandler.getErrorHandler(n.type,t,e,i);return"function"==typeof f.action&&r!==!0&&f.action(n,t,e,i),f.errorMessage}function u(n,t,i){if(t){var u=Loop.Core.ErrorHandler.getErrorHandler(n.type,401,null,i),r=u.errorMessage;i===Loop.Core.Enum.APIActions.Delete?setTimeout(function(){t(401,r)},500):t(401,r)}}function f(n){return n?Loop.Core.Configuration.isUserLogged():!0}function r(n,t,r){if(f(n.loginRequired)){var o,s=!0;return $("html").hasClass("ie9")&&(s=!1),o={type:n.verb,url:n.endpoint.url(),"async":r,timeout:n.timeout,tryCount:0,retryLimit:3,crossDomain:s,dataType:"json",contentType:"application/json; charset=utf-8",cache:!e,data:n.inputData,success:function(t){"function"==typeof n.successCallback&&n.successCallback(t)},error:function(r){var f,u;this.tryCount+=1;0===r.status&&"timeout"===r.statusText?this.tryCount<=this.retryLimit-1&&"GET"===n.verb?$.ajax(this):(u=i(n.endpoint,408,t,n.preventModalOnError),"function"==typeof n.errorCallback&&n.errorCallback(408,u)):(412===r.status&&(f=JSON.parse(r.responseText)),u=i(n.endpoint,r.status,t,n.preventModalOnError,f),"function"==typeof n.errorCallback&&n.errorCallback(r.status,u,f))}},r&&(o.xhrFields={withCredentials:n.withCredentials}),$.ajax(o)}u(n.endpoint,n.errorCallback,t)}function o(n,t){var r={url:n.endpoint.url(),timeout:n.timeout,type:"POST",data:n.inputData,mimeType:"multipart/form-data",contentType:!1,cache:!1,processData:!1,success:function(t){"function"==typeof n.successCallback&&n.successCallback(t)},error:function(t){var r;0===t.status&&"timeout"===t.statusText&&n.errorCallback(408,i(n.endpoint,408,Loop.Core.Enum.APIActions.Create,n.preventModalOnError));412===t.status&&(r=JSON.parse(t.responseText));n.errorCallback(t.status,i(n.endpoint,t.status,Loop.Core.Enum.APIActions.Create,r),r)}};return t&&(r.xhrFields={withCredentials:n.withCredentials}),$.ajax(r)}function n(n,t,i){var u=[],r=[];if(n.endpoint||u.push("endpoint"),n.verb||(n.verb=t),"boolean"!=typeof n.loginRequired&&(n.loginRequired=i),n.withCredentials||(n.withCredentials=!1),u.length>0)throw new Error("Missing required fields: "+u.join(","));if("object"!=typeof n.endpoint&&r.push("endpoint"),"string"!=typeof n.verb&&r.push("verb"),"boolean"!=typeof n.loginRequired&&r.push("loginRequired"),"boolean"!=typeof n.withCredentials&&r.push("withCredentials"),r.length>0)throw new Error("Wrong field types: "+r.join(","));isNaN(n.timeout)&&(n.timeout=15e3)}$.support.cors=!0;var e=!0,t={endpoint:null,verb:null,inputData:null,loginRequired:null,preventModalOnError:!1,timeout:15e3,successCallback:null,errorCallback:null};return{forceNoCache:function(n){e=n},handleErrors:i,loadData:function(i){return i=jQuery.extend(!0,{},t,i),n(i,"GET",!1),r(i,Loop.Core.Enum.APIActions.Read,!0)},loadDataSync:function(i){i=jQuery.extend(!0,{},t,i);n(i,"GET",!1);r(i,Loop.Core.Enum.APIActions.Read,!1)},updateData:function(i){i=jQuery.extend(!0,{},t,i);n(i,"PUT",!0);r(i,Loop.Core.Enum.APIActions.Update,!0)},createData:function(i){i=jQuery.extend(!0,{},t,i);n(i,"POST",!0);r(i,Loop.Core.Enum.APIActions.Create,!0)},deleteData:function(i){return i=jQuery.extend(!0,{},t,i),n(i,"DELETE",!0),r(i,"DELETE",!0)},createMultipartData:function(i){i=jQuery.extend(!0,{},t,i);n(i,"POST",!0);f(!0)?o(i):u(i.endpoint,i.errorCallback,Loop.Core.Enum.APIActions.Update)},isBlockingError:function(n){return 404===n||403===n||401===n}}}();Loop.Core.Breakpoints=function(){function n(){return window.innerWidth<t.sm}function i(){return window.innerWidth<t.md&&!n()}function r(){return window.innerWidth<t.lg&&!i()&&!n()}function u(){return window.innerWidth>=t.lg}function f(t){return t===Loop.Core.Constants.Breakpoints.EXTRA_SMALL?n():t===Loop.Core.Constants.Breakpoints.SMALL?i():t===Loop.Core.Constants.Breakpoints.MEDIUM?r():t===Loop.Core.Constants.Breakpoints.LARGE?u():(console.error("Bad argument for isCurrentBreakpoint()"),!1)}function e(){return n()?Loop.Core.Constants.Breakpoints.EXTRA_SMALL:i()?Loop.Core.Constants.Breakpoints.SMALL:r()?Loop.Core.Constants.Breakpoints.MEDIUM:u()?Loop.Core.Constants.Breakpoints.LARGE:void 0}function o(n){$(window).smartresize(n)}var t={xs:480,sm:768,md:992,lg:1300};return{getCurrentBreakpoint:e,isCurrentBreakpoint:f,smartResize:o}}();Loop.Core.Authors=Loop.Core.Authors||{};Loop.Core.Authors.MultipleAuthors=function(n){function u(n,t){var i=n||"",r=t||"";return i.trim()+" "+r.trim()}function f(n,t){var i=n||"",r=t||"";return i&&r?i+", "+r:i?i:r}function e(){var n=$.Deferred();return Loop.Core.Ajax.loadData({endpoint:Loop.Core.EndpointRepository.getEndpoint("LoopCore-MainInfoUserList",{userIDList:r}),successCallback:function(t){$.each(t,function(n,t){var e=t.LocationCountry?t.LocationCountry.Name||"":null,r={name:u(t.FirstName,t.LastName),affiliation:"",location:"",pictureUrl:t.ProfilePictureSmall||null,profileUrl:Loop.Core.Configuration.UrlList.getLoopProfilePage(t.UserId)};i.extendDataOnDialog===!0&&(r.affiliation=t.Affiliation||"",r.location=f(t.LocationCity,e));i.authorList.push(r)});n.resolve()},errorCallback:function(t,i,r){var u={errorCode:t,errorMessage:i,preconditionFailed:r};n.reject(u)},preventModalOnError:!0}),n.promise()}function o(){r="object"==typeof n.authorList?n.authorList:[];i.extendDataOnDialog="boolean"==typeof n.extendDataOnDialog?n.extendDataOnDialog:!0}var i=this,r=[],t=null;i.authorList=ko.observableArray();i.extendDataOnDialog=!0;i.showModal=function(){if(null===t)t=new Loop.Core.Controls.ModalDialog("multi-auth-modal","More than one user with this authoring name has confirmed this publication:","",null,!1,!1),t.viewModelData=i,t.viewModelTemplate="multipleAuthorsTemplate";0===i.authorList().length?(t.show(!1),$.when(e()).then(function(){t.viewModelData=i;t.setDataStatus(!0)},function(){t.error(Loop.Core.Literals.errors.genericLoadingErrorInModal.message);t.setDataStatus(!0)})):t.show(!0)};o()};Loop.Core.Authors=Loop.Core.Authors||{};Loop.Core.Authors.AuthorList=function(n){function o(){var i={};i[Loop.Core.Constants.Breakpoints.EXTRA_SMALL]=8;i[Loop.Core.Constants.Breakpoints.SMALL]=10;i[Loop.Core.Constants.Breakpoints.MEDIUM]=15;i[Loop.Core.Constants.Breakpoints.LARGE]=15;t.authorList="object"==typeof n.authorList?n.authorList:[];t.enableLinks="boolean"==typeof n.enableLinks?n.enableLinks:!0;t.extendDataOnDialog="boolean"==typeof n.extendDataOnDialog?n.extendDataOnDialog:!0;t.itemsToShowByBreakpoint="object"==typeof n.itemsToShowByBreakpoint?n.itemsToShowByBreakpoint:i;u=t.authorList.length;h();Loop.Core.Breakpoints.smartResize(c);f()}function s(){var r=[],n=$.Deferred(),u=0;return $.each(t.authorList,function(n,t){t.UserID.length>0&&r.push(t.UserID[0]);u+=t.UserID.length}),u>0?Loop.Core.Ajax.loadData({endpoint:Loop.Core.EndpointRepository.getEndpoint("LoopCore-MainInfoUserList",{userIDList:r}),successCallback:function(r){i=t.authorList;$.each(i,function(n,i){i.affiliation="";i.location="";$.each(r,function(n,r){i.UserID&&i.UserID[0]===r.UserId&&(i.imageUrl=r.ProfilePictureSmall,i.imageUrl&&(i.showImageInList=!0),t.extendDataOnDialog===!0&&(i.affiliation=r.Affiliation,i.location=r.LocationCountry?r.LocationCity+", "+r.LocationCountry.Name:r.LocationCity))})});n.resolve()},errorCallback:function(t,i,r){var u={errorCode:t,errorMessage:i,preconditionFailed:r};n.reject(u)},preventModalOnError:!0}):(i=t.authorList,$.each(i,function(n,t){t.affiliation="";t.location=""}),n.resolve()),n.promise()}function h(){var n=null;t.itemsToShowByBreakpoint[Loop.Core.Constants.Breakpoints.LARGE];t.authorList.length>e&&(n=t.authorList[t.authorList.length-1],t.authorList=t.authorList.slice(0,e),t.authorList.push(n));t.authorList=t.authorList.filter(function(n){return"string"==typeof n.FullName&&n.FullName.trim().length>0});$.each(t.authorList,function(n,i){i.fullName=i.FullName.trim();i.profileUrl=null;i.imageUrl=Loop.Core.Configuration.UrlList.getDefaultProfilePicture();i.showImageInList=!1;i.clickAction=null;i.UserID.length>0&&(i.showImageInList=!0);1===i.UserID.length&&(i.imageUrl=Loop.Core.Configuration.UrlList.getProfilePicture(i.UserID[0]));t.enableLinks&&(1===i.UserID.length?i.profileUrl=Loop.Core.Configuration.UrlList.getLoopProfilePage(i.UserID[0]):i.UserID.length>1&&(i.multiAuthors=new Loop.Core.Authors.MultipleAuthors({authorList:i.UserID,extendDataOnDialog:t.extendDataOnDialog}),i.clickAction=function(){this.multiAuthors.showModal()}))})}function f(){var n=0,i=t.itemsToShowByBreakpoint[r],f=[],e=u>i?i-1:i;for(0===i&&(i=2),n=0;e>n&&n<t.authorList.length;n++)f.push(t.authorList[n]);t.visibleAuthorList(f);t.showMoreCounter(u-t.visibleAuthorList().length-1);t.showMoreCounter()>0?t.lastAuthor(t.authorList[t.authorList.length-1]):t.lastAuthor(null)}function c(){var n=Loop.Core.Breakpoints.getCurrentBreakpoint();r!==n&&(r=n,f())}var t=this,r=Loop.Core.Breakpoints.getCurrentBreakpoint(),e=1e4,u=0,i=null;t.authorList=[];t.visibleAuthorList=ko.observableArray([]);t.lastAuthor=ko.observable();t.showMoreCounter=ko.observable(0);t.showMoreAction=function(){function r(){return{fullInfoAuthorList:i,extendDataOnDialog:t.extendDataOnDialog}}if(t.enableLinks){var n=new Loop.Core.Modals.getModal("multi-auth-modal","Authors of this publication",!0);n.viewModelData=r();n.viewModelTemplate="authorsListDetailedTemplate";null===i?(n.show(!1),$.when(s()).then(function(){n.viewModelData=r();n.setDataStatus(!0)},function(t){n.error(t.errorMessage);n.setDataStatus(!0)})):n.show(!0)}};t.enableLinks=!0;t.extendDataOnDialog=!0;t.itemsToShowByBreakpoint={xs:8,sm:10,md:15,lg:15};o()};Loop.Core.EndpointRepository.addEndpoint({type:Loop.Core.Constants.EndpointType.PRIVATE,key:"LoopCore-MainInfoUserList",urlArgs:{userIDList:[]},url:function(){var n="";return"object"==typeof this.urlArgs.userIDList&&($.each(this.urlArgs.userIDList,function(t,i){if("number"!=typeof i)throw new Error("'"+typeof i+"' type is not valid for the querystring of 'LoopCore-MainInfoUserList' endpoint.");n+="usersIds="+i+"&"}),n.length>0&&(n=n.substr(0,n.length-1))),Loop.Core.Configuration.UrlList.getAbsoluteUrl("loopApi","/users/main-info?"+n)}});currentScript=document.currentScript;$(document).ready(function(){var n=getScriptConfiguration();Loop.Core.Configuration.init(n)});Registration=Registration||{};Registration.viewModels=Registration.viewModels||{};Registration.viewModels.termsViewModel=function(){function i(){t.add(n.tabs.termsAndConditions,function(){document.title="Terms and Conditions";n.currentTab(n.tabs.termsAndConditions)});t.add(n.tabs.privacyPolicy,function(){document.title="Privacy Policy";n.currentTab(n.tabs.privacyPolicy)});t.add(n.tabs.copyright,function(){document.title="Copyright Statement";n.currentTab(n.tabs.copyright)});t.add(n.tabs.cookiePolicy,function(){document.title="Cookie Policy";n.currentTab(n.tabs.cookiePolicy)});t.add(n.tabs.summary,function(){document.title="Summary of Changes";n.currentTab(n.tabs.summary)});t.add(n.tabs.eventTermsAndConditions,function(){document.title="Events Terms and Conditions";n.currentTab(n.tabs.eventTermsAndConditions)});t.addUriListener();t.check()}var n=this,t=new Router({mode:"history",root:"legal"});n.tabs={termsAndConditions:"terms-and-conditions",privacyPolicy:"privacy-policy",copyright:"copyright-statement",cookiePolicy:"cookie-policy",summary:"summary-of-changes",eventTermsAndConditions:"events-terms-and-conditions"};n.currentTab=ko.observable();n.helpDeskUrl="";n.supportEmail="";n.contactSupportEmail="";n.navigate=function(n){window.history.pushState({},"",n);t.check();$("html,body").animate({scrollTop:0},300)};n.setCurrentTab=function(t){n.currentTab(t)};n.displayTermsAndConditions=ko.computed(function(){return n.currentTab()==n.tabs.termsAndConditions});n.displayPrivacyPolicy=ko.computed(function(){return n.currentTab()==n.tabs.privacyPolicy});n.displayCopyright=ko.computed(function(){return n.currentTab()==n.tabs.copyright});n.displayCookiePolicy=ko.computed(function(){return n.currentTab()==n.tabs.cookiePolicy});n.displaySummaryOfChanges=ko.computed(function(){return n.currentTab()==n.tabs.summary});n.displayEventTermsAndConditions=ko.computed(function(){return n.currentTab()==n.tabs.eventTermsAndConditions});n.goToHomePage=function(){document.location.href="/"};i()}