!function(e,t,l){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(e),o=a(t),n=a(l);n.default.Deasilsoft=void 0!==n.default.Deasilsoft?n.default.Deasilsoft:{},i.default.extend(n.default.Deasilsoft,{ /** * Deasilsoft/Scroller (2021.8.0) * * Navigate your web page with a smooth scrolling animation. * * @author Deasilsoft * @copyright Copyright (c) 2018-2021 Deasilsoft * * @licence MIT License * * Copyright (c) 2018-2021 Deasilsoft * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * @link https://deasilsoft.com/ * @see jQuery * * @param {String[]} links * @param {Object} userOptions * * @return {Number} 1 success, -1 invalid links parameter, -2 invalid userOptions parameter * * @constructor */ Scroller:(links,userOptions={})=>{if(!Array.isArray(links))return-1;if(!(userOptions instanceof Object))return-2;const e=i.default.extend(!0,{Navigation:{Class:{Active:"active"},Selector:{ActiveParentLink:!0,Active:"body > header .nav-item.active",Link:"body > header .nav-link[href^='{{link}}']"}},ResizeTimeout:250,ScrollTimeout:100,TouchThreshold:.66,LoadLink:0},userOptions);let t,l=null,a=null,u=e.LoadLink;const d=t=>e.Navigation.Selector.Link.replace(/{{ ?link ?}}/gi,t),c=t=>{links.includes(t)&&null===l&&(l=setTimeout((()=>{i.default("html,body").animate({scrollTop:i.default(t).offset().top},{queue:!1,complete:()=>{clearTimeout(l),l=null,u=links.indexOf(t),i.default(e.Navigation.Selector.Active).removeClass(e.Navigation.Class.Active),e.Navigation.Selector.ActiveParentLink?i.default(d(t)).parent().addClass(e.Navigation.Class.Active):i.default(d(t)).addClass(e.Navigation.Class.Active),n.default.history.pushState(null,null,t)}})}),e.ScrollTimeout))},f=()=>{let e=u-1;e<0&&(e=links.length-1),c(links[e])},s=()=>{let e=u+1;e>=links.length&&(e=0),c(links[e])};return i.default(o.default).ready((()=>{""!==n.default.location.hash?c(n.default.location.hash):e.LoadLink>=0&&(n.default.location.hash=links[e.LoadLink])})),i.default(n.default).on("resize",(()=>{clearTimeout(a),a=setTimeout((()=>{clearTimeout(a),a=null,c(links[u])}),e.ResizeTimeout)})),i.default("*").on("scroll",(()=>{clearTimeout(l),l=null})),i.default(n.default).on("wheel",(e=>{e.originalEvent.deltaY<0?f():s()})),i.default(o.default).on("touchstart",(e=>{t=e.originalEvent.touches[0].clientY})),i.default(o.default).on("touchend",(l=>{const a=l.originalEvent.changedTouches[0].clientY;t-ai.default(n.default).height()*e.TouchThreshold&&s()})),i.default(d("#")).on("click",(function(e){const t=i.default(this).attr("href");c(t),e.preventDefault()})),1}})}($,document,window);