/* Source Themes Academic v4.8.0 | https://sourcethemes.com/academic/ */ ; /*! * Bootstrap v4.4.1 (https://getbootstrap.com/) * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],b):b((a=a||self).bootstrap={},a.jQuery,a.Popper)}(this,function(i,a,q){"use strict";var aj,b,$,av,aH,da,aE,c_,cY,cX,y,K,an,aq,ar,cW,n,cV,cR,bg,cQ,cN,cM,aD,cK,aV,aC,J,B,L,e,aU,cI,aB,cH,ai,au,cG,cF,f,cE,s,cD,cy,cw,cv,ct,cr,cp,ax,cn,cm,cl,ck,cb,b$,aN,D,G,v,V,b_,aJ,bZ,aa,t,P,ac,aI,aL,bY,bV,bf,M,F,_,o,aG,bU,bR,h,al,l,bQ,bO,bN,aP,bH,ak,bF,aF,bE,bD,bx,bw,bv,bq,bp,bo,bn,bj,p,H,Z,g,bh,aK,bi,c,bk,bl,bm,ba,C,ao,aZ,br,bs,bt,bu,aY,aX,ab,by,bz,bA,bB,u,am,k,bG,aQ,bI,bJ,bK,bL,bM,R,aw,bP,W,S,bS,bT,I,aA,bW,bX,r,A,ap,j,ca,aO,cc,cd,ce,cf,cg,ch,ci,cj,ah,w,af,ae,co,aM,cq,ay,cs,x,cu,aR,az,cx,aS,cz,cA,cB,cC,aT,Q,ag,T,df,O,cJ,N,cL,aW,a_,cO,cP,a$,bb,cS,cT,cU,Y,E,ad,X,cZ,z,c$,bc,U,bd,dd,be,db,at;function de(d,c){for(var b=0,a;bthis._items.length-1||b<0))if(this._isSliding)a(this._element).one(f.SLID,function(){return d.to(b)});else{if(c===b)return this.pause(),void this.cycle();e=cdocument.documentElement.clientHeight;!this._isBodyOverflowing&&a&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!a&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var a=document.body.getBoundingClientRect();this._isBodyOverflowing=a.left+a.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:bz,popperConfig:null},R="show",aw="out",bP={HIDE:"hide"+k,HIDDEN:"hidden"+k,SHOW:"show"+k,SHOWN:"shown"+k,INSERTED:"inserted"+k,CLICK:"click"+k,FOCUSIN:"focusin"+k,FOCUSOUT:"focusout"+k,MOUSEENTER:"mouseenter"+k,MOUSELEAVE:"mouseleave"+k},W="fade",S="show",bS=".tooltip-inner",bT=".arrow",I="hover",aA="focus",bW="click",bX="manual",r=function(){function e(a,b){if("undefined"==typeof q)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=a,this.config=this._getConfig(b),this.tip=null,this._setListeners()}var c=e.prototype;return c.enable=function(){this._isEnabled=!0},c.disable=function(){this._isEnabled=!1},c.toggleEnabled=function(){this._isEnabled=!this._isEnabled},c.toggle=function(c){if(this._isEnabled)if(c){var d=this.constructor.DATA_KEY,b=a(c.currentTarget).data(d);b||(b=new this.constructor(c.currentTarget,this._getDelegateConfig()),a(c.currentTarget).data(d,b)),b._activeTrigger.click=!b._activeTrigger.click,b._isWithActiveTrigger()?b._enter(null,b):b._leave(null,b)}else{if(a(this.getTipElement()).hasClass(S))return void this._leave(null,this);this._enter(null,this)}},c.dispose=function(){clearTimeout(this._timeout),a.removeData(this.element,this.constructor.DATA_KEY),a(this.element).off(this.constructor.EVENT_KEY),a(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&a(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},c.show=function(){var c=this,e,f,l,d,h,j,i,k,g,m;if("none"===a(this.element).css("display"))throw new Error("Please use show on visible elements");if(e=a.Event(this.constructor.Event.SHOW),this.isWithContent()&&this._isEnabled){if(a(this.element).trigger(e),f=b.findShadowRoot(this.element),l=a.contains(null!==f?f:this.element.ownerDocument.documentElement,this.element),e.isDefaultPrevented()||!l)return;d=this.getTipElement(),h=b.getUID(this.constructor.NAME),d.setAttribute("id",h),this.element.setAttribute("aria-describedby",h),this.setContent(),this.config.animation&&a(d).addClass(W),j="function"==typeof this.config.placement?this.config.placement.call(this,d,this.element):this.config.placement,i=this._getAttachment(j),this.addAttachmentClass(i),k=this._getContainer(),a(d).data(this.constructor.DATA_KEY,this),a.contains(this.element.ownerDocument.documentElement,this.tip)||a(d).appendTo(k),a(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new q(this.element,d,this._getPopperConfig(i)),a(d).addClass(S),"ontouchstart"in document.documentElement&&a(document.body).children().on("mouseover",null,a.noop),g=function(){c.config.animation&&c._fixTransition();var b=c._hoverState;c._hoverState=null,a(c.element).trigger(c.constructor.Event.SHOWN),b===aw&&c._leave(null,c)},a(this.tip).hasClass(W)?(m=b.getTransitionDurationFromElement(this.tip),a(this.tip).one(b.TRANSITION_END,g).emulateTransitionEnd(m)):g()}},c.hide=function(f){var c,d,e,h;function g(){c._hoverState!==R&&d.parentNode&&d.parentNode.removeChild(d),c._cleanTipClass(),c.element.removeAttribute("aria-describedby"),a(c.element).trigger(c.constructor.Event.HIDDEN),null!==c._popper&&c._popper.destroy(),f&&f()}c=this,d=this.getTipElement(),e=a.Event(this.constructor.Event.HIDE),(a(this.element).trigger(e),!e.isDefaultPrevented())&&(a(d).removeClass(S),"ontouchstart"in document.documentElement&&a(document.body).children().off("mouseover",null,a.noop),this._activeTrigger[bW]=!1,this._activeTrigger[aA]=!1,this._activeTrigger[I]=!1,a(this.tip).hasClass(W)?(h=b.getTransitionDurationFromElement(d),a(d).one(b.TRANSITION_END,g).emulateTransitionEnd(h)):g(),this._hoverState="")},c.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},c.isWithContent=function(){return Boolean(this.getTitle())},c.addAttachmentClass=function(b){a(this.getTipElement()).addClass(aQ+"-"+b)},c.getTipElement=function(){return this.tip=this.tip||a(this.config.template)[0],this.tip},c.setContent=function(){var b=this.getTipElement();this.setElementContent(a(b.querySelectorAll(bS)),this.getTitle()),a(b).removeClass(W+" "+S)},c.setElementContent=function(c,b){"object"!=typeof b||!b.nodeType&&!b.jquery?this.config.html?(this.config.sanitize&&(b=bC(b,this.config.whiteList,this.config.sanitizeFn)),c.html(b)):c.text(b):this.config.html?a(b).parent().is(c)||c.empty().append(b):c.text(a(b).text())},c.getTitle=function(){var a=this.element.getAttribute("data-original-title");return a=a||("function"==typeof this.config.title?this.config.title.call(this.element):this.config.title)},c._getPopperConfig=function(b){var a=this;return d({},{placement:b,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:bT},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(b){b.originalPlacement!==b.placement&&a._handlePopperPlacementChange(b)},onUpdate:function(b){return a._handlePopperPlacementChange(b)}},{},this.config.popperConfig)},c._getOffset=function(){var b=this,a={};return"function"==typeof this.config.offset?a.fn=function(a){return a.offsets=d({},a.offsets,{},b.config.offset(a.offsets,b.element)||{}),a}:a.offset=this.config.offset,a},c._getContainer=function(){return!1===this.config.container?document.body:b.isElement(this.config.container)?a(this.config.container):a(document).find(this.config.container)},c._getAttachment=function(a){return bL[a.toUpperCase()]},c._setListeners=function(){var b=this;this.config.trigger.split(" ").forEach(function(c){if("click"===c)a(b.element).on(b.constructor.Event.CLICK,b.config.selector,function(a){return b.toggle(a)});else if(c!==bX){var d=c===I?b.constructor.Event.MOUSEENTER:b.constructor.Event.FOCUSIN,e=c===I?b.constructor.Event.MOUSELEAVE:b.constructor.Event.FOCUSOUT;a(b.element).on(d,b.config.selector,function(a){return b._enter(a)}).on(e,b.config.selector,function(a){return b._leave(a)})}}),this._hideModalHandler=function(){b.element&&b.hide()},a(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=d({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},c._fixTitle=function(){var a=typeof this.element.getAttribute("data-original-title");!this.element.getAttribute("title")&&"string"==a||(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},c._enter=function(c,b){var d=this.constructor.DATA_KEY;(b=b||a(c.currentTarget).data(d))||(b=new this.constructor(c.currentTarget,this._getDelegateConfig()),a(c.currentTarget).data(d,b)),c&&(b._activeTrigger["focusin"===c.type?aA:I]=!0),a(b.getTipElement()).hasClass(S)||b._hoverState===R?b._hoverState=R:(clearTimeout(b._timeout),b._hoverState=R,b.config.delay&&b.config.delay.show?b._timeout=setTimeout(function(){b._hoverState===R&&b.show()},b.config.delay.show):b.show())},c._leave=function(c,b){var d=this.constructor.DATA_KEY;(b=b||a(c.currentTarget).data(d))||(b=new this.constructor(c.currentTarget,this._getDelegateConfig()),a(c.currentTarget).data(d,b)),c&&(b._activeTrigger["focusout"===c.type?aA:I]=!1),b._isWithActiveTrigger()||(clearTimeout(b._timeout),b._hoverState=aw,b.config.delay&&b.config.delay.hide?b._timeout=setTimeout(function(){b._hoverState===aw&&b.hide()},b.config.delay.hide):b.hide())},c._isWithActiveTrigger=function(){for(var a in this._activeTrigger)if(this._activeTrigger[a])return!0;return!1},c._getConfig=function(c){var e=a(this.element).data();return Object.keys(e).forEach(function(a){-1!==bJ.indexOf(a)&&delete e[a]}),"number"==typeof(c=d({},this.constructor.Default,{},e,{},"object"==typeof c&&c?c:{})).delay&&(c.delay={show:c.delay,hide:c.delay}),"number"==typeof c.title&&(c.title=c.title.toString()),"number"==typeof c.content&&(c.content=c.content.toString()),b.typeCheckConfig(u,c,this.constructor.DefaultType),c.sanitize&&(c.template=bC(c.template,c.whiteList,c.sanitizeFn)),c},c._getDelegateConfig=function(){var b={},a;if(this.config)for(a in this.config)this.constructor.Default[a]!==this.config[a]&&(b[a]=this.config[a]);return b},c._cleanTipClass=function(){var c=a(this.getTipElement()),b=c.attr("class").match(bI);null!==b&&b.length&&c.removeClass(b.join(""))},c._handlePopperPlacementChange=function(a){var b=a.instance;this.tip=b.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(a.placement))},c._fixTransition=function(){var b=this.getTipElement(),c=this.config.animation;null===b.getAttribute("x-placement")&&(a(b).removeClass(W),this.config.animation=!1,this.hide(),this.show(),this.config.animation=c)},e._jQueryInterface=function(b){return this.each(function(){var c=a(this).data(am),d="object"==typeof b&&b;if((c||!/dispose|hide/.test(b))&&(c||(c=new e(this,d),a(this).data(am,c)),"string"==typeof b)){if("undefined"==typeof c[b])throw new TypeError('No method named "'+b+'"');c[b]()}})},m(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return bM}},{key:"NAME",get:function(){return u}},{key:"DATA_KEY",get:function(){return am}},{key:"Event",get:function(){return bP}},{key:"EVENT_KEY",get:function(){return k}},{key:"DefaultType",get:function(){return bK}}]),e}(),a.fn[u]=r._jQueryInterface,a.fn[u].Constructor=r,a.fn[u].noConflict=function(){return a.fn[u]=bG,r._jQueryInterface},A="popover",ap="bs.popover",j="."+ap,ca=a.fn[A],aO="bs-popover",cc=new RegExp("(^|\\s)"+aO+"\\S+","g"),cd=d({},r.Default,{placement:"right",trigger:"click",content:"",template:''}),ce=d({},r.DefaultType,{content:"(string|element|function)"}),cf="fade",cg="show",ch=".popover-header",ci=".popover-body",cj={HIDE:"hide"+j,HIDDEN:"hidden"+j,SHOW:"show"+j,SHOWN:"shown"+j,INSERTED:"inserted"+j,CLICK:"click"+j,FOCUSIN:"focusin"+j,FOCUSOUT:"focusout"+j,MOUSEENTER:"mouseenter"+j,MOUSELEAVE:"mouseleave"+j},ah=function(d){function b(){return d.apply(this,arguments)||this}!function(a,b){a.prototype=Object.create(b.prototype),(a.prototype.constructor=a).__proto__=b}(b,d);var c=b.prototype;return c.isWithContent=function(){return this.getTitle()||this._getContent()},c.addAttachmentClass=function(b){a(this.getTipElement()).addClass(aO+"-"+b)},c.getTipElement=function(){return this.tip=this.tip||a(this.config.template)[0],this.tip},c.setContent=function(){var c=a(this.getTipElement()),b;this.setElementContent(c.find(ch),this.getTitle()),b=this._getContent(),"function"==typeof b&&(b=b.call(this.element)),this.setElementContent(c.find(ci),b),c.removeClass(cf+" "+cg)},c._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},c._cleanTipClass=function(){var c=a(this.getTipElement()),b=c.attr("class").match(cc);null!==b&&0=this._offsets[a]&&("undefined"==typeof this._offsets[a+1]||b0){c.preventDefault();let d=Math.ceil(a(b).offset().top-l());a('html, body').animate({scrollTop:d},800)}}),a(document).on('click','.navbar-collapse.show',function(b){let c=a(b.target).is('a')?a(b.target):a(b.target).parent();c.is('a')&&c.attr('class')!='dropdown-toggle'&&a(this).collapse('hide')});let c={},g,e,d=a('#container-publications');d.isotope({itemSelector:'.isotope-item',percentPosition:!0,masonry:{columnWidth:'.grid-sizer'},filter:function(){let b=a(this),c=!g||b.text().match(g),d=!e||b.is(e);return c&&d}});let t=a('.filter-search').keyup(s(function(){g=new RegExp(t.val(),'gi'),d.isotope()}));function s(c,a){let b;return a=a||100,function(){clearTimeout(b);let d=arguments,e=this;function f(){c.apply(e,d)}b=setTimeout(f,a)}}function m(a){let b='';for(let c in a)b+=a[c];return b}a('.pub-filters').on('change',function(){let f=a(this),b=f[0].getAttribute('data-filter-group');if(c[b]=this.value,e=m(c),d.isotope(),b=="pubtype"){let b=a(this).val();b.substr(0,9)=='.pubtype-'?window.location.hash=b.substr(9):window.location.hash=''}});function r(){let b=window.location.hash.replace('#',''),f='*';b!=''&&!isNaN(b)&&(f='.pubtype-'+b);let g='pubtype';c[g]=f,e=m(c),d.isotope(),a('.pubtype-select').val(f)}function p(){if(a('#map').length){let f=a('#map-provider').val(),b=a('#map-lat').val(),c=a('#map-lng').val(),d=parseInt(a('#map-zoom').val()),e=a('#map-dir').val(),g=a('#map-api-key').val();if(f==1){let a=new GMaps({div:'#map',lat:b,lng:c,zoom:d,zoomControl:!0,zoomControlOpt:{style:'SMALL',position:'TOP_LEFT'},panControl:!1,streetViewControl:!1,mapTypeControl:!1,overviewMapControl:!1,scrollwheel:!0,draggable:!0});a.addMarker({lat:b,lng:c,click:function(d){let a='https://www.google.com/maps/place/'+encodeURIComponent(e)+'/@'+b+','+c+'/';window.open(a,'_blank')},title:e})}else{let a=new L.map('map').setView([b,c],d);f==3&&g.length?L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',{attribution:'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox',maxZoom:18,id:'mapbox.streets',accessToken:g}).addTo(a):L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{maxZoom:19,attribution:'© OpenStreetMap'}).addTo(a);let h=L.marker([b,c]).addTo(a),i=b+','+c+'#map='+d+'/'+b+'/'+c+'&layers=N';h.bindPopup(e+'

Routing via OpenStreetMap

')}}}function q(b,c){a.getJSON('https://api.github.com/repos/'+c+'/tags').done(function(c){let d=c[0];a(b).append(' '+d.name)}).fail(function(d,a,b){let c=a+", "+b;console.log("Request Failed: "+c)})}function i(){a('body').hasClass('searching')?(a('[id=search-query]').blur(),a('body').removeClass('searching compensate-for-scrollbar'),v(),a('#fancybox-style-noscroll').remove()):(!a('#fancybox-style-noscroll').length&&document.body.scrollHeight>window.innerHeight&&(a('head').append(''),a('body').addClass('compensate-for-scrollbar')),a('body').addClass('searching'),a('.search-results').css({opacity:0,visibility:'visible'}).animate({opacity:1},200),a('#search-query').focus())}function f(){return a('.js-theme-selector').length}function n(){return parseInt(localStorage.getItem('dark_mode')||2)}function k(c){if(console.info('Request to set theme.'),!f()){console.info('Cannot set theme - admin disabled theme selector.');return}let a;switch(c){case 0:localStorage.setItem('dark_mode','1'),a=!0,console.info('User changed theme variation to Dark.'),b(0);break;localStorage.setItem('dark_mode','1'),a=!0,console.info('User changed theme variation to Dark.');localStorage.setItem('dark_mode','1'),a=!0,console.info('User changed theme variation to Dark.'),b(0);break;case 1:localStorage.setItem('dark_mode','2'),window.matchMedia('(prefers-color-scheme: dark)').matches?a=!0:window.matchMedia('(prefers-color-scheme: light)').matches?a=!1:a=isSiteThemeDark,console.info('User changed theme variation to Auto.'),b(1);break;localStorage.setItem('dark_mode','2'),window.matchMedia('(prefers-color-scheme: dark)').matches?a=!0:window.matchMedia('(prefers-color-scheme: light)').matches?a=!1:a=isSiteThemeDark,console.info('User changed theme variation to Auto.');localStorage.setItem('dark_mode','2'),window.matchMedia('(prefers-color-scheme: dark)').matches?a=!0:window.matchMedia('(prefers-color-scheme: light)').matches?a=!1:a=isSiteThemeDark,console.info('User changed theme variation to Auto.'),b(1);break;default:localStorage.setItem('dark_mode','0'),a=!1,console.info('User changed theme variation to Light.'),b(2);break;localStorage.setItem('dark_mode','0'),a=!1,console.info('User changed theme variation to Light.');localStorage.setItem('dark_mode','0'),a=!1,console.info('User changed theme variation to Light.'),b(2);break}h(a)}function b(b){switch(b){case 0:a('.js-set-theme-light').removeClass('dropdown-item-active'),a('.js-set-theme-dark').addClass('dropdown-item-active'),a('.js-set-theme-auto').removeClass('dropdown-item-active');break;a('.js-set-theme-light').removeClass('dropdown-item-active'),a('.js-set-theme-dark').addClass('dropdown-item-active'),a('.js-set-theme-auto').removeClass('dropdown-item-active');break;case 1:a('.js-set-theme-light').removeClass('dropdown-item-active'),a('.js-set-theme-dark').removeClass('dropdown-item-active'),a('.js-set-theme-auto').addClass('dropdown-item-active');break;a('.js-set-theme-light').removeClass('dropdown-item-active'),a('.js-set-theme-dark').removeClass('dropdown-item-active'),a('.js-set-theme-auto').addClass('dropdown-item-active');break;default:a('.js-set-theme-light').addClass('dropdown-item-active'),a('.js-set-theme-dark').removeClass('dropdown-item-active'),a('.js-set-theme-auto').removeClass('dropdown-item-active');break;a('.js-set-theme-light').addClass('dropdown-item-active'),a('.js-set-theme-dark').removeClass('dropdown-item-active'),a('.js-set-theme-auto').removeClass('dropdown-item-active');break}}function u(){if(!f())return isSiteThemeDark;let b=n(),a;switch(b){case 0:a=!1;break;case 1:a=!0;break;default:window.matchMedia('(prefers-color-scheme: dark)').matches?a=!0:window.matchMedia('(prefers-color-scheme: light)').matches?a=!1:a=isSiteThemeDark;break}return a}function h(c,b=!1){const d=a('link[title=hl-light]').length>0,e=a('link[title=hl-light]')[0],f=a('link[title=hl-dark]')[0],g=a('script[title=mermaid]').length>0;if(!b)if(c===!1&&!a('body').hasClass('dark')||c===!0&&a('body').hasClass('dark'))return;c===!1?(b||a('body').css({opacity:0,visibility:'visible'}).animate({opacity:1},500),a('body').removeClass('dark'),d&&(e.disabled=!1,f.disabled=!0),g&&(b?mermaid.initialize({theme:'default',securityLevel:'loose'}):location.reload())):c===!0&&(b||a('body').css({opacity:0,visibility:'visible'}).animate({opacity:1},500),a('body').addClass('dark'),d&&(e.disabled=!0,f.disabled=!1),g&&(b?mermaid.initialize({theme:'dark',securityLevel:'loose'}):location.reload()))}function w(){if(f){let a=n();switch(a){case 0:b(2),console.info('Initialize theme variation to Light.');break;break;case 1:b(0),console.info('Initialize theme variation to Dark.');break;break;default:b(1),console.info('Initialize theme variation to Auto.');break;break}}let a=u();h(a,!0)}function x(){a('.carousel').each(function(){let b=a('.carousel-item',this);b.css('min-height',0);let c=Math.max.apply(null,b.map(function(){return a(this).outerHeight()}).get());b.css('min-height',c+'px')})}function y(){a('#TableOfContents').addClass('nav flex-column'),a('#TableOfContents li').addClass('nav-item'),a('#TableOfContents li a').addClass('nav-link'),a("input[type='checkbox'][disabled]").parents('ul').addClass('task-list')}function z(){let b=[];[].push.apply(b,document.getElementsByClassName('language-mermaid'));for(let c=0;c").append(a(this).contents()).addClass('mermaid')})}a(document).ready(function(){y(),z(),code_highlighting&&hljs.initHighlighting(),w(),a('.js-set-theme-light').click(function(a){a.preventDefault(),k(2)}),a('.js-set-theme-dark').click(function(a){a.preventDefault(),k(0)}),a('.js-set-theme-auto').click(function(a){a.preventDefault(),k(1)});const b=window.matchMedia('(prefers-color-scheme: dark)');b.addListener(b=>{if(!f())return;const c=b.matches;console.log(`OS dark mode preference changed to ${c?'🌒 on':'☀️ off'}.`);let d=parseInt(localStorage.getItem('dark_mode')||2),a;d===2&&(window.matchMedia('(prefers-color-scheme: dark)').matches?a=!0:window.matchMedia('(prefers-color-scheme: light)').matches?a=!1:a=isSiteThemeDark,h(a))})}),a(window).on('load',function(){a('.projects-container').each(function(f,e){let b=a(e),c=b.closest('section'),d;c.find('.isotope').hasClass('js-layout-row')?d='fitRows':d='masonry',b.imagesLoaded(function(){b.isotope({itemSelector:'.isotope-item',layoutMode:d,masonry:{gutter:20},filter:c.find('.default-project-filter').text()}),c.find('.project-filters a').click(function(){let c=a(this).attr('data-filter');return b.isotope({filter:c}),a(this).removeClass('active').addClass('active').siblings().removeClass('active all'),!1}),window.location.hash&&j()})}),a('.pub-filters-select')&&r(),a('.back-to-top').click(function(b){b.preventDefault(),a('html, body').animate({scrollTop:0},800,function(){window.location.hash=""})}),a('.js-cite-modal').click(function(d){d.preventDefault();let b=a(this).attr('data-filename'),c=a('#modal');c.find('.modal-body code').load(b,function(e,d,c){if(d=='error'){let b="Error: ";a('#modal-error').html(b+c.status+" "+c.statusText)}else a('.js-download-cite').attr('href',b)}),c.modal('show')}),a('.js-copy-cite').click(function(b){b.preventDefault();let a=document.createRange(),c=document.querySelector('#modal .modal-body');a.selectNode(c),window.getSelection().addRange(a);try{document.execCommand('copy')}catch(a){console.log('Error: citation copy failed.')}window.getSelection().removeRange(a)}),p();let b='.js-github-release';a(b).length>0&&q(b,a(b).data('repo')),a('.js-search').click(function(a){a.preventDefault(),i()}),a(document).on('keydown',function(b){b.which==27?a('body').hasClass('searching')&&i():b.which==191&&b.shiftKey==!1&&!a('input,textarea').is(':focus')&&(b.preventDefault(),i())})}),a(window).on('load resize orientationchange',x),a('body').on('mouseenter mouseleave','.dropdown',function(e){var b=a(e.target).closest('.dropdown'),c=a('.dropdown-menu',b);b.addClass('show'),c.addClass('show'),setTimeout(function(){b[b.is(':hover')?'addClass':'removeClass']('show'),c[b.is(':hover')?'addClass':'removeClass']('show')},300),o(),window.location.hash&&(window.location.hash=="#top"?window.location.hash="":a('.projects-container').length||j());let d;a(window).resize(function(){clearTimeout(d),d=setTimeout(o,200)})})}(jQuery)