PageSourceSearch

https://fortidsminneforeningen.no/js/scroll-spy.es5.min.js

js fortidsminneforeningen.no collected 2026-09-24 18:15:10 UTC 4,428 bytes, 1 lines download raw bytes

1"use strict";function _toConsumableArray(n){if(Array.isArray(n)){for(var t=0,i=Array(n.length);t<n.length;t++)i[t]=n[t];return i}return Array.from(n)}function _classCallCheck(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var _createClass=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),MSScrollSpy=function(){function n(){var t=this;_classCallCheck(this,n);this.trackingNodes=[];this.trackingTraveled=[];this.previousScrollY=0;this.trackingStart=window.scrollY;this.traveled=0;this.traveledTimeout=null;this.direction="down";this.previousDirection=null;this.run=this.run.bind(this);this.initAnimations=this.initAnimations.bind(this);this.inView=this.inView.bind(this);this.trackTraveled=this.trackTraveled.bind(this);this.setDirection=this.setDirection.bind(this);this.resetTravelTracking=this.resetTravelTracking.bind(this);this.scrollTo=this.scrollTo.bind(this);this.initAnimations();this.run();window.addEventListener("scroll",this.run,{passive:!0});document.addEventListener("DOMContentLoaded",function(){t.run()})}return _createClass(n,[{key:"run",value:function(){var n=this;this.setDirection();this.previousDirection!==this.direction&&this.resetTravelTracking();this.traveled=window.scrollY-this.trackingStart;this.previousScrollY=window.scrollY;this.traveledTimeout!==null&&(clearTimeout(this.traveledTimeout),this.traveledTimeout=null);this.traveledTimeout=setTimeout(function(){n.resetTravelTracking()},500);this.trackingNodes.forEach(function(t){t.trigger==="in-view"&&(!t.viewed&&n.inView(t)?t.actionIn!==undefined&&t.actionIn():t.actionOut!==undefined&&t.actionOut());t.trigger==="top"&&(window.scrollY<=0?t.actionIn!==undefined&&t.actionIn():t.actionOut!==undefined&&t.actionOut())});this.trackingTraveled.forEach(function(t){typeof t=="function"&&t(n.traveled)})}},{key:"resetTravelTracking",value:function(){this.traveled=0;this.trackingStart=window.scrollY}},{key:"setDirection",value:function(){var n=window.scrollY-this.previousScrollY>0?"up":"down";this.previousDirection=this.previousDirection===null?n:this.direction;this.direction=n}},{key:"trackTraveled",value:function(n){this.trackingTraveled.push(n)}},{key:"inView",value:function(n){if(n===undefined)return!1;var i=n.offset===undefined?0:parseInt(n.offset),t=n.node.getBoundingClientRect();return t.top<window.innerHeight-i&&t.bottom>0||t.bottom>0+i&&t.top<0-i?(n.viewed=!0,!0):!1}},{key:"trackNode",value:function(n,t,i,r){if(n&&n.dataset){var u=n.dataset.offset;this.trackingNodes.push({node:n,actionIn:t,viewed:!1,offset:u,trigger:i,actionOut:r})}}},{key:"stopTracking",value:function(n){this.trackingNodes=this.trackingNodes.filter(function(t){return t.node!==n})}},{key:"initAnimations",value:function(){var t=this,n=document.querySelectorAll(".animate");n!==null&&[].concat(_toConsumableArray(n)).forEach(function(n){var r=n.dataset.animation.split(" "),i={targets:n,duration:n.dataset.duration!==undefined?parseInt(n.dataset.duration):300,easing:n.dataset.easing!==undefined?n.dataset.easing:"easeOutQuad",delay:n.dataset.delay!==undefined?parseInt(n.dataset.delay):0};r.forEach(function(t){switch(t){case"fade-in":n.style.opacity=0;i.opacity=[0,1];break;case"slide-in":n.style.opacity=0;i.opacity=[0,1];var r=n.dataset.direction;r!==undefined&&(r==="from-left"&&(i.translateX=["-15%","0%"]),r==="from-right"&&(i.translateX=["15%","0%"]),r==="from-top"&&(i.translateY=["-15%","0%"]),r==="from-bottom"&&(i.translateY=["15%","0%"]));break;case"scale-in":n.style.transform="scale(0)";i.scale=[0,1];i.opacity=1}});t.trackNode(n,function(){anime(i)},n.dataset.trigger!==undefined?n.dataset.trigger:"in-view")})}},{key:"freeze",value:function(){var n=window.document.scrollingElement||window.document.body||window.document.documentElement;n.style.overflow="hidden"}},{key:"unFreeze",value:function(){var n=window.document.scrollingElement||window.document.body||window.document.documentElement;n.style.overflow="visible"}},{key:"scrollTo",value:function(n){var t=window.document.scrollingElement||window.document.body||window.document.documentElement,i=n.getBoundingClientRect(),r=t.scrollY+i.top;anime({targets:t,duration:300,easing:"linear",scrollTop:r})}}]),n}(),ScrollSpy=new MSScrollSpy;module.exports=ScrollSpy;

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.