text: /**
   * Bundle of AWEMA page-map
   * Generated: 2019-06-28 10:52:35
   * Version: 1.1.1
   */
  
  !function(){"use strict";function t(t){let e=0;do{e+=t.offsetTop,t=t.offsetParent}while(t);return e}function e(t){let e=getComputedStyle(t);return t.clientWidth-parseInt(e.paddingLeft)-parseInt(e.paddingRight)}function i(t,e,i){return e=document.createElement(e),t.appendChild(e),i&&Object.keys(i).forEach(t=>{e.setAttribute(t,i[t])}),Array.from(t.childNodes).forEach(t=>{t!==e&&e.appendChild(t)}),e}var s=function(t,e,i,s,n,r,o,c,l,h){"boolean"!=typeof o&&(l=c,c=o,o=!1);var a,d="function"==typeof i?i.options:i;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,n&&(d.functional=!0)),s&&(d._scopeId=s),r?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(r)},d._ssrRegister=a):e&&(a=o?function(){e.call(this,h(this.$root.$options.shadowRoot))}:function(t){e.call(this,c(t))}),a)if(d.functional){var u=d.render;d.render=function(t,e){return a.call(e),u(t,e)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,a):[a]}return i}({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("nav",{staticClass:"page-map",class:t.stickyClass,style:t.stickyStyle},[t._t("before"),t._v(" "),t.targetsEls&&t.targetsEls.length?i("ul",{staticClass:"page-map__list"},t._l(t.targetsEls,function(e,s){return i("li",{key:s,staticClass:"page-map__list-item",class:["for-"+e.tagName.toLowerCase(),{"is-active":t.activeAnchor==s}]},[i("a",{staticClass:"page-map__link",attrs:{href:"#"+e.id},on:{click:function(e){return e.preventDefault(),t.scrollToAnchor(s)}}},[t._v("\n                "+t._s(e.innerText)+"\n            ")])])}),0):t._e(),t._v(" "),t._t("after")],2)},staticRenderFns:[]},void 0,{name:"page-map",mixins:[{props:{sticky:{type:[Object,Boolean],default:()=>({top:10})}},data:()=>({shouldStick:!1,sizes:{width:null,height:null}}),computed:{stickyTop(){return this.sticky&&Number(this.sticky.top)||0},stickyBottom(){return this.sticky&&Number(this.sticky.bottom)||0},stickyStyle(){if(!this.shouldStick)return null;let t="top"===this.shouldStick;return{position:t?"fixed":"absolute",top:t?this.stickyTop+"px":"auto",bottom:t?"auto":this.stickyBottom+"px",width:this.sizes.width+"px",maxHeight:t?this.sizes.height+"px":null,overflow:"auto"}},stickyClass(){return this.shouldStick?"is-sticky-"+this.shouldStick:null},passive(){return!(!this._isMounted||!function(){let t=!1;try{var e=Object.defineProperty({},"passive",{get(){t=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(t){}return t}())&&{passive:!0}}},methods:{prepareSticky(){let i=this.$el.parentNode,s=t(i),n=i.clientHeight,r=this.$el.offsetHeight,o=n>r;return o?(window.addEventListener("scroll",this.checkSticky,this.passive),this.__stickAt=s-this.stickyTop,this.__stickBottomAt=s+n-r-this.stickyTop-this.stickyBottom,this.sizes={width:e(i),height:window.innerHeight-this.stickyTop-this.stickyBottom}):(window.removeEventListener("scroll",this.checkSticky,this.passive),this.shouldStick=!1),o},checkSticky(){let t=window.pageYOffset;t<=this.__stickAt?this.shouldStick=!1:t<=this.__stickBottomAt&&this.__stickAt<t?this.shouldStick="top":this.shouldStick="bottom"},updateSticky(){this.prepareSticky()&&this.checkSticky()}},mounted(){this.sticky&&(this.__oldParentPosition=getComputedStyle(this.$el.parentNode).position,"static"===this.__oldParentPosition&&(this.$el.parentNode.style.position="relative"),this.updateSticky(),window.addEventListener("resize",this.updateSticky))},beforeDestroy(){this.sticky&&("static"===this.__oldParentPosition&&(this.$el.parentNode.style.position=null),window.removeEventListener("scroll",this.checkSticky,this.passive),window.removeEventListener("resize",this.updateSticky))}}],props:{content:{type:String,default:"body"},exclude:String,targets:{type:String,default:"h1, h2, h3, h4, h5, h6"},offset:{type:Number,default:0}},data:()=>({contentEl:null,activeAnchor:null,targetsEls:[],targetsHeights:[]}),watch:{content(t,e){e&&document.querySelector(e)===this.contentEl||(e&&this.destroy(),t&&this.init())}},methods:{scrollToAnchor(t){this.toggleScrollListener(!1),this.setActiveAnchor(t),function(t,e=700){let i=(new Date).getTime(),s=window.pageYOffset,n=t-s;return new Promise(r=>{requestAnimationFrame(function o(){let c=(new Date).getTime()-i;if(c<e){let t=s+n*(l=c/e,--l*l*l+1);window.scrollTo(0,t),requestAnimationFrame(o)}else window.scrollTo(0,t),requestAnimationFrame(r);var l})})}(this.targetsHeights[t]+this.offset).then(()=>{this.toggleScrollListener(!0)})},setTargetsHeights(){this.targetsHeights=Array.from(this.targetsEls).map(e=>t(e))},checkActiveAnchor(){let t=0,e=window.pageYOffset;for(;t<this.targetsHeights.length-1&&e>this.targetsHeights[t];)t+=1;this.setActiveAnchor(t)},setActiveAnchor(t){t!==this.activeAnchor&&(this.activeAnchor=t,null===t?history.replaceState(void 0,void 0,location.href.split("#")[0]):history.replaceState(void 0,void 0,`#${this.targetsEls[t].id}`))},toggleScrollListener(t){window[t?"addEventListener":"removeEventListener"]("scroll",this.checkActiveAnchor)},createAnchors(){if(!this.contentEl)return!1;let t=this.contentEl.querySelectorAll(this.targets);if(!t)return!1;if(this.exclude){let e=this.contentEl.querySelectorAll(this.exclude);e&&(e=Array.from(e),t=Array.from(t).filter(t=>!e.includes(t)&&!e.find(e=>e.contains(t))))}for(let e=0;e<t.length;e++){let s=t[e];s.id=s.id||this.$url.urlify(s.innerText),i(t[e],"A",{href:"#"+s.id,class:"page-map-anchor"}).addEventListener("click",t=>{t.preventDefault(),this.scrollToAnchor(e)},!0)}return!!t.length&&(this.targetsEls=t,this.setTargetsHeights(),this.checkActiveAnchor(),!0)},globalObserver(t){t.filter(t=>!this.contentEl.contains(t.target)).length&&setTimeout(this.setTargetsHeights,0),this.sticky&&this.updateSticky()},createObservers(){this.__intersectionObserver=new IntersectionObserver(t=>{t[0].intersectionRatio?this.toggleScrollListener(!0):(this.toggleScrollListener(!1),this.setActiveAnchor(null))}),this.__intersectionObserver.observe(this.contentEl);try{this.__globalMutationObserver=new MutationObserver(this.globalObserver),this.__globalMutationObserver.observe(document.body,{childList:!0,subtree:!0})}catch(t){AWEMA_CONFIG.dev&&console.log("page-map: ",t)}},init(){this.contentEl=document.querySelector(this.content),this.createAnchors()&&(this.createObservers(),window.addEventListener("resize",this.setTargetsHeights))},destroy(){window.removeEventListener("resize",this.setTargetsHeights);try{this.__intersectionObserver.disconnect(),this.__globalMutationObserver.disconnect()}catch(t){AWEMA_CONFIG.dev&&console.log("page-map: ",t)}}},mounted(){this.init()},beforeDestroy(){this.destroy()}},void 0,!1,void 0,void 0,void 0);var n={installed:!1,install:function(t){this.installed||(this.installed=!0,t.component("page-map",s))}};const r={install(){Vue.use(n)}};(function(){try{return new IntersectionObserver(function(){}).disconnect(),!0}catch(t){return!1}})()||(r.modules["intersection-observer"]="https://cdn.jsdelivr.net/npm/intersection-observer-polyfill@0.1.0/dist/IntersectionObserver.global.js"),window&&"AWEMA"in window?AWEMA.use(r):(window.__awema_plugins_stack__=window.__awema_plugins_stack__||[],window.__awema_plugins_stack__.push(r))}();
  