1"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendor--animated-scroll-to"],{5275(e,t,o){o.d(t,{A:()=>a});function n(e){let t=0,o=0,n=e;do{t+=n.offsetTop||0,o+=n.offsetLeft||0,n=n.offsetParent}while(n);return{top:t,left:o}}class l{constructor(e){this.element=e}getHorizontalScroll(){return this.element.scrollLeft}getVerticalScroll(){return this.element.scrollTop}getMaxHorizontalScroll(){return this.element.scrollWidth-this.element.clientWidth}getMaxVerticalScroll(){return this.element.scrollHeight-this.element.clientHeight}getHorizontalElementScrollOffset(e,t){return n(e).left-n(t).left}getVerticalElementScrollOffset(e,t){return n(e).top-n(t).top}scrollTo(e,t){this.element.scrollLeft=e,this.element.scrollTop=t}}class r{constructor(){this.element=window}getHorizontalScroll(){return window.scrollX||document.documentElement.scrollLeft}getVerticalScroll(){return window.scrollY||document.documentElement.scrollTop}getMaxHorizontalScroll(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)-window.innerWidth}getMaxVerticalScroll(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight}getHorizontalElementScrollOffset(e){return(window.scrollX||document.documentElement.scrollLeft)+e.getBoundingClientRect().left}getVerticalElementScrollOffset(e){return(window.scrollY||document.documentElement.scrollTop)+e.getBoundingClientRect().top}scrollTo(e,t){window.scrollTo(e,t)}}const c={elements:[],cancelMethods:[],add:(e,t)=>{c.elements.push(e),c.cancelMethods.push(t)},remove:(e,t)=>{const o=c.elements.indexOf(e);o>-1&&(t&&c.cancelMethods[o](),c.elements.splice(o,1),c.cancelMethods.splice(o,1))}},i="undefined"!=typeof window,s={cancelOnUserAction:!0,easing:e=>--e*e*e+1,elementToScroll:i?window:null,horizontalOffset:0,maxDuration:3e3,minDuration:250,speed:500,verticalOffset:0},a=function(e,t={}){return o=this,n=void 0,m=function*(){if(!i)return new Promise(e=>{e(!1)});if(!window.Promise)throw"Browser doesn't support Promises, and animated-scroll-to depends on it, please provide a polyfill.";let o,n,a,m=Object.assign(Object.assign({},s),t);const d=m.elementToScroll===window,u=!!m.elementToScroll.nodeName;if(!d&&!u)throw"Element to scroll needs to be either window or DOM element.";const h=d?document.documentElement:m.elementToScroll;"smooth"===getComputedStyle(h).getPropertyValue("scroll-behavior")&&console.warn(`${h.tagName} has "scroll-behavior: smooth" which can mess up with animated-scroll-to's animations`);const f=d?new r:new l(m.elementToScroll);if(e instanceof Element){if(a=e,u&&(!m.elementToScroll.contains(a)||m.elementToScroll.isSameNode(a)))throw"options.elementToScroll has to be a parent of scrollToElement";o=f.getHorizontalElementScrollOffset(a,m.elementToScroll),n=f.getVerticalElementScrollOffset(a,m.elementToScroll)}else if("number"==typeof e)o=f.getHorizontalScroll(),n=e;else{if(!Array.isArray(e)||2!==e.length)throw"Wrong function signature. Check documentation.\nAvailable method signatures are:\n animateScrollTo(y:number, options)\n animateScrollTo([x:number | null, y:number | null], options)\n animateScrollTo(scrollToElement:Element, options)";o=null===e[0]?f.getHorizontalScroll():e[0],n=null===e[1]?f.getVerticalScroll():e[1]}o+=m.horizontalOffset,n+=m.verticalOffset;const w=f.getMaxHorizontalScroll(),g=f.getHorizontalScroll();o>w&&(o=w);const p=o-g,S=f.getMaxVerticalScroll(),T=f.getVerticalScroll();n>S&&(n=S);const E=n-T,b=Math.abs(Math.round(p/1e3*m.speed)),v=Math.abs(Math.round(E/1e3*m.speed));let H=b>v?b:v;return H<m.minDuration?H=m.minDuration:H>m.maxDuration&&(H=m.maxDuration),new Promise((e,t)=>{let l;0===p&&0===E&&e(!0),c.remove(f.element,!0);const r=()=>{d(),cancelAnimationFrame(l),e(!1)};c.add(f.element,r);const i=m.cancelOnUserAction?r:e=>e.preventDefault(),s=m.cancelOnUserAction?{passive:!0}:{passive:!1},a=["wheel","touchstart","keydown","mousedown"],d=()=>
1{a.forEach(e=>{f.element.removeEventListener(e,i,s)})};a.forEach(e=>{f.element.addEventListener(e,i,s)});const u=Date.now(),h=()=>{var t=Date.now()-u,r=t/H;const i=Math.round(g+p*m.easing(r)),s=Math.round(T+E*m.easing(r));t<H&&(i!==o||s!==n)?(f.scrollTo(i,s),l=requestAnimationFrame(h)):(f.scrollTo(o,n),cancelAnimationFrame(l),d(),c.remove(f.element,!1),e(!0))};l=requestAnimationFrame(h)})},new((a=void 0)||(a=Promise))(function(e,t){function l(e){try{c(m.next(e))}catch(e){t(e)}}function r(e){try{c(m.throw(e))}catch(e){t(e)}}function c(t){var o;t.done?e(t.value):(o=t.value,o instanceof a?o:new a(function(e){e(o)})).then(l,r)}c((m=m.apply(o,n||[])).next())});var o,n,a,m}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.