Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bolt/components-smooth-scroll

Package Overview
Dependencies
Maintainers
4
Versions
351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bolt/components-smooth-scroll - npm Package Compare versions

Comparing version 0.9.0-rc.3 to 0.9.0-rc.4

2

dist/bolt-smooth-scroll.min.js

@@ -1,1 +0,1 @@

!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,n){!function(e,t){if(!w[e]||!b[e])return;b[e]=!1;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(h[n]=t[n]);0==--v&&0===y&&_()}(e,n),t&&t(e,n)};var n,r=!0,o="87b56faecf914a806750",i=1e4,a={},c=[],d=[];function s(e){var t=j[e];if(!t)return S;var r=function(r){return t.hot.active?(j[r]?j[r].parents.indexOf(e)<0&&j[r].parents.push(e):(c=[e],n=r),t.children.indexOf(r)<0&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),c=[]),S(r)},o=function(e){return{configurable:!0,enumerable:!0,get:function(){return S[e]},set:function(t){S[e]=t}}};for(var i in S)Object.prototype.hasOwnProperty.call(S,i)&&"e"!==i&&Object.defineProperty(r,i,o(i));return r.e=function(e){return"ready"===l&&f("prepare"),y++,S.e(e).then(t,function(e){throw t(),e});function t(){y--,"prepare"===l&&(g[e]||I(e),0===y&&0===v&&_())}},r}var u=[],l="idle";function f(e){l=e;for(var t=0;t<u.length;t++)u[t].call(null,e)}var p,h,m,v=0,y=0,g={},b={},w={};function O(e){return+e+""===e?+e:e}function E(e){if("idle"!==l)throw new Error("check() is only allowed in idle status");return r=e,f("check"),(t=i,t=t||1e4,new Promise(function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=S.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}})).then(function(e){if(!e)return f("idle"),null;b={},g={},w=e.c,m=e.h,f("prepare");var t=new Promise(function(e,t){p={resolve:e,reject:t}});h={};return I(0),"prepare"===l&&0===y&&0===v&&_(),t});var t}function I(e){w[e]?(b[e]=!0,v++,function(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.src=S.p+""+e+"."+o+".hot-update.js",t.appendChild(n)}(e)):g[e]=!0}function _(){f("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then(function(){return D(r)}).then(function(t){e.resolve(t)},function(t){e.reject(t)});else{var t=[];for(var n in h)Object.prototype.hasOwnProperty.call(h,n)&&t.push(O(n));e.resolve(t)}}function D(t){if("ready"!==l)throw new Error("apply() is only allowed in ready status");t=t||{};var n,r,i,d,s;function u(e){for(var t=[e],n={},r=t.slice().map(function(e){return{chain:[e],id:e}});r.length>0;){var o=r.pop(),i=o.id,a=o.chain;if((d=j[i])&&!d.hot._selfAccepted){if(d.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:i};if(d.hot._main)return{type:"unaccepted",chain:a,moduleId:i};for(var c=0;c<d.parents.length;c++){var s=d.parents[c],u=j[s];if(u){if(u.hot._declinedDependencies[i])return{type:"declined",chain:a.concat([s]),moduleId:i,parentId:s};t.indexOf(s)>=0||(u.hot._acceptedDependencies[i]?(n[s]||(n[s]=[]),p(n[s],[i])):(delete n[s],t.push(s),r.push({chain:a.concat([s]),id:s})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.indexOf(r)<0&&e.push(r)}}var v={},y=[],g={},b=function(){console.warn("[HMR] unexpected require("+I.moduleId+") to disposed module")};for(var E in h)if(Object.prototype.hasOwnProperty.call(h,E)){s=O(E);var I,_=!1,D=!1,A=!1,H="";switch((I=h[E]?u(s):{type:"disposed",moduleId:E}).chain&&(H="\nUpdate propagation: "+I.chain.join(" -> ")),I.type){case"self-declined":t.onDeclined&&t.onDeclined(I),t.ignoreDeclined||(_=new Error("Aborted because of self decline: "+I.moduleId+H));break;case"declined":t.onDeclined&&t.onDeclined(I),t.ignoreDeclined||(_=new Error("Aborted because of declined dependency: "+I.moduleId+" in "+I.parentId+H));break;case"unaccepted":t.onUnaccepted&&t.onUnaccepted(I),t.ignoreUnaccepted||(_=new Error("Aborted because "+s+" is not accepted"+H));break;case"accepted":t.onAccepted&&t.onAccepted(I),D=!0;break;case"disposed":t.onDisposed&&t.onDisposed(I),A=!0;break;default:throw new Error("Unexception type "+I.type)}if(_)return f("abort"),Promise.reject(_);if(D){g[s]=h[s],p(y,I.outdatedModules);for(s in I.outdatedDependencies)Object.prototype.hasOwnProperty.call(I.outdatedDependencies,s)&&(v[s]||(v[s]=[]),p(v[s],I.outdatedDependencies[s]))}A&&(p(y,[I.moduleId]),g[s]=b)}var x=[];for(r=0;r<y.length;r++)s=y[r],j[s]&&j[s].hot._selfAccepted&&x.push({module:s,errorHandler:j[s].hot._selfAccepted});f("dispose"),Object.keys(w).forEach(function(e){!1===w[e]&&delete installedChunks[e]});for(var P,k=y.slice();k.length>0;)if(s=k.pop(),d=j[s]){var M={},q=d.hot._disposeHandlers;for(i=0;i<q.length;i++)(n=q[i])(M);for(a[s]=M,d.hot.active=!1,delete j[s],delete v[s],i=0;i<d.children.length;i++){var C=j[d.children[i]];C&&((P=C.parents.indexOf(s))>=0&&C.parents.splice(P,1))}}var L,Q;for(s in v)if(Object.prototype.hasOwnProperty.call(v,s)&&(d=j[s]))for(Q=v[s],i=0;i<Q.length;i++)L=Q[i],(P=d.children.indexOf(L))>=0&&d.children.splice(P,1);f("apply"),o=m;for(s in g)Object.prototype.hasOwnProperty.call(g,s)&&(e[s]=g[s]);var T=null;for(s in v)if(Object.prototype.hasOwnProperty.call(v,s)&&(d=j[s])){Q=v[s];var U=[];for(r=0;r<Q.length;r++)if(L=Q[r],n=d.hot._acceptedDependencies[L]){if(U.indexOf(n)>=0)continue;U.push(n)}for(r=0;r<U.length;r++){n=U[r];try{n(Q)}catch(e){t.onErrored&&t.onErrored({type:"accept-errored",moduleId:s,dependencyId:Q[r],error:e}),t.ignoreErrored||T||(T=e)}}}for(r=0;r<x.length;r++){var N=x[r];s=N.module,c=[s];try{S(s)}catch(e){if("function"==typeof N.errorHandler)try{N.errorHandler(e)}catch(n){t.onErrored&&t.onErrored({type:"self-accept-error-handler-errored",moduleId:s,error:n,orginalError:e,originalError:e}),t.ignoreErrored||T||(T=n),T||(T=e)}else t.onErrored&&t.onErrored({type:"self-accept-errored",moduleId:s,error:e}),t.ignoreErrored||T||(T=e)}}return T?(f("fail"),Promise.reject(T)):(f("idle"),new Promise(function(e){e(y)}))}var j={};function S(t){if(j[t])return j[t].exports;var r=j[t]={i:t,l:!1,exports:{},hot:function(e){var t={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:n!==e,active:!0,accept:function(e,n){if(void 0===e)t._selfAccepted=!0;else if("function"==typeof e)t._selfAccepted=e;else if("object"==typeof e)for(var r=0;r<e.length;r++)t._acceptedDependencies[e[r]]=n||function(){};else t._acceptedDependencies[e]=n||function(){}},decline:function(e){if(void 0===e)t._selfDeclined=!0;else if("object"==typeof e)for(var n=0;n<e.length;n++)t._declinedDependencies[e[n]]=!0;else t._declinedDependencies[e]=!0},dispose:function(e){t._disposeHandlers.push(e)},addDisposeHandler:function(e){t._disposeHandlers.push(e)},removeDisposeHandler:function(e){var n=t._disposeHandlers.indexOf(e);n>=0&&t._disposeHandlers.splice(n,1)},check:E,apply:D,status:function(e){if(!e)return l;u.push(e)},addStatusHandler:function(e){u.push(e)},removeStatusHandler:function(e){var t=u.indexOf(e);t>=0&&u.splice(t,1)},data:a[e]};return n=void 0,t}(t),parents:(d=c,c=[],d),children:[]};return e[t].call(r.exports,r,r.exports,s(t)),r.l=!0,r.exports}S.m=e,S.c=j,S.d=function(e,t,n){S.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},S.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return S.d(t,"a",t),t},S.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},S.p="/scripts/",S.h=function(){return o},s(0)(S.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=new(n.n(r).a);document.querySelectorAll('a[href*="#"]').forEach(function(e){var t=e,n={ignore:"[data-scroll-ignore]",header:".js-bolt-smooth-scroll-offset",speed:500,offset:0,easing:"easeInOutCubic",before:function(){},after:function(){}},r=t.getAttribute("href");r=r.replace("#","");var i=document.getElementById(r);i&&t.addEventListener("click",function(){o.animateScroll(i,t,n)})})},function(e,t,n){(function(n){var r;"function"==typeof Symbol&&Symbol.iterator;o=void 0!==n?n:"undefined"!=typeof window?window:this,i=function(e){"use strict";var t="querySelector"in document&&"addEventListener"in e&&"requestAnimationFrame"in e&&"closest"in e.Element.prototype,n={ignore:"[data-scroll-ignore]",header:null,speed:500,offset:0,easing:"easeInOutCubic",customEasing:null,before:function(){},after:function(){}},r=function(){for(var e={},t=0,n=arguments.length;t<n;t++){var r=arguments[t];!function(t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(r)}return e},o=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),r=n.length,o=-1,i="",a=n.charCodeAt(0);++o<r;){if(0===(t=n.charCodeAt(o)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");i+=t>=1&&t<=31||127==t||0===o&&t>=48&&t<=57||1===o&&t>=48&&t<=57&&45===a?"\\"+t.toString(16)+" ":t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?n.charAt(o):"\\"+n.charAt(o)}return"#"+i},i=function(t){return t?(n=t,parseInt(e.getComputedStyle(n).height,10)+t.offsetTop):0;var n};return function(a,c){var d,s,u,l,f,p,h,m={};m.cancelScroll=function(){cancelAnimationFrame(h)},m.animateScroll=function(t,o,a){var c=r(d||n,a||{}),s="[object Number]"===Object.prototype.toString.call(t),u=s||!t.tagName?null:t;if(s||u){var p=e.pageYOffset;c.header&&!l&&(l=document.querySelector(c.header)),f||(f=i(l));var h,v,y,g=s?t:function(e,t,n){var r=0;if(e.offsetParent)do{r+=e.offsetTop,e=e.offsetParent}while(e);return Math.max(r-t-n,0)}(u,f,parseInt("function"==typeof c.offset?c.offset():c.offset,10)),b=g-p,w=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),O=0,E=function(n,r){var i=e.pageYOffset;if(n==r||i==r||(p<r&&e.innerHeight+i)>=w)return m.cancelScroll(),a=t,d=r,u=s,u||(a.focus(),document.activeElement.id!==a.id&&(a.setAttribute("tabindex","-1"),a.focus(),a.style.outline="none"),e.scrollTo(0,d)),c.after(t,o),h=null,!0;var a,d,u},I=function t(n){h||(h=n),v=(O+=n-h)/parseInt(c.speed,10),y=p+b*function(e,t){var n;return"easeInQuad"===e.easing&&(n=t*t),"easeOutQuad"===e.easing&&(n=t*(2-t)),"easeInOutQuad"===e.easing&&(n=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e.easing&&(n=t*t*t),"easeOutCubic"===e.easing&&(n=--t*t*t+1),"easeInOutCubic"===e.easing&&(n=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e.easing&&(n=t*t*t*t),"easeOutQuart"===e.easing&&(n=1- --t*t*t*t),"easeInOutQuart"===e.easing&&(n=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e.easing&&(n=t*t*t*t*t),"easeOutQuint"===e.easing&&(n=1+--t*t*t*t*t),"easeInOutQuint"===e.easing&&(n=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),e.customEasing&&(n=e.customEasing(t)),n||t}(c,v=v>1?1:v),e.scrollTo(0,Math.floor(y)),E(y,g)||(e.requestAnimationFrame(t),h=n)};0===e.pageYOffset&&e.scrollTo(0,0),c.before(t,o),m.cancelScroll(),e.requestAnimationFrame(I)}};var v=function(e){s&&(s.id=s.getAttribute("data-scroll-id"),m.animateScroll(s,u),s=null,u=null)},y=function(t){if(!("matchMedia"in e&&e.matchMedia("(prefers-reduced-motion)").matches)&&0===t.button&&!t.metaKey&&!t.ctrlKey&&(u=t.target.closest(a))&&"a"===u.tagName.toLowerCase()&&!t.target.closest(d.ignore)&&u.hostname===e.location.hostname&&u.pathname===e.location.pathname&&/#/.test(u.href)){var n;try{n=o(decodeURIComponent(u.hash))}catch(e){n=o(u.hash)}if("#"===n){t.preventDefault();var r=(s=document.body).id?s.id:"smooth-scroll-top";return s.setAttribute("data-scroll-id",r),s.id="",void(e.location.hash.substring(1)===r?v():e.location.hash=r)}(s=document.querySelector(n))&&(s.setAttribute("data-scroll-id",s.id),s.id="",u.hash===e.location.hash&&(t.preventDefault(),v()))}},g=function(e){p||(p=setTimeout(function(){p=null,f=i(l)},66))};return m.destroy=function(){d&&(document.removeEventListener("click",y,!1),e.removeEventListener("resize",g,!1),m.cancelScroll(),d=null,s=null,u=null,l=null,f=null,p=null,h=null)},m.init=function(o){t&&(m.destroy(),d=r(n,o||{}),l=d.header?document.querySelector(d.header):null,f=i(l),document.addEventListener("click",y,!1),e.addEventListener("hashchange",v,!1),l&&e.addEventListener("resize",g,!1))},m.init(c),m}},void 0===(r=function(){return i(o)}.apply(t,[]))||(e.exports=r);var o,i}).call(t,n(2))},function(e,t){var n,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(n=window)}e.exports=n}]);
!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,n){!function(e,t){if(!w[e]||!b[e])return;b[e]=!1;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(h[n]=t[n]);0==--y&&0===v&&_()}(e,n),t&&t(e,n)};var n,r=!0,o="87b56faecf914a806750",i=1e4,a={},c=[],d=[];function s(e){var t=j[e];if(!t)return S;var r=function(r){return t.hot.active?(j[r]?j[r].parents.indexOf(e)<0&&j[r].parents.push(e):(c=[e],n=r),t.children.indexOf(r)<0&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),c=[]),S(r)},o=function(e){return{configurable:!0,enumerable:!0,get:function(){return S[e]},set:function(t){S[e]=t}}};for(var i in S)Object.prototype.hasOwnProperty.call(S,i)&&"e"!==i&&Object.defineProperty(r,i,o(i));return r.e=function(e){return"ready"===u&&f("prepare"),v++,S.e(e).then(t,function(e){throw t(),e});function t(){v--,"prepare"===u&&(g[e]||I(e),0===v&&0===y&&_())}},r}var l=[],u="idle";function f(e){u=e;for(var t=0;t<l.length;t++)l[t].call(null,e)}var p,h,m,y=0,v=0,g={},b={},w={};function O(e){return+e+""===e?+e:e}function E(e){if("idle"!==u)throw new Error("check() is only allowed in idle status");return r=e,f("check"),(t=i,t=t||1e4,new Promise(function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=S.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}})).then(function(e){if(!e)return f("idle"),null;b={},g={},w=e.c,m=e.h,f("prepare");var t=new Promise(function(e,t){p={resolve:e,reject:t}});h={};return I(0),"prepare"===u&&0===v&&0===y&&_(),t});var t}function I(e){var t,n,r;w[e]?(b[e]=!0,y++,t=e,n=document.getElementsByTagName("head")[0],(r=document.createElement("script")).type="text/javascript",r.charset="utf-8",r.src=S.p+""+t+"."+o+".hot-update.js",n.appendChild(r)):g[e]=!0}function _(){f("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then(function(){return D(r)}).then(function(t){e.resolve(t)},function(t){e.reject(t)});else{var t=[];for(var n in h)Object.prototype.hasOwnProperty.call(h,n)&&t.push(O(n));e.resolve(t)}}function D(t){if("ready"!==u)throw new Error("apply() is only allowed in ready status");var n,r,i,d,s;function l(e){for(var t=[e],n={},r=t.slice().map(function(e){return{chain:[e],id:e}});r.length>0;){var o=r.pop(),i=o.id,a=o.chain;if((d=j[i])&&!d.hot._selfAccepted){if(d.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:i};if(d.hot._main)return{type:"unaccepted",chain:a,moduleId:i};for(var c=0;c<d.parents.length;c++){var s=d.parents[c],l=j[s];if(l){if(l.hot._declinedDependencies[i])return{type:"declined",chain:a.concat([s]),moduleId:i,parentId:s};t.indexOf(s)>=0||(l.hot._acceptedDependencies[i]?(n[s]||(n[s]=[]),p(n[s],[i])):(delete n[s],t.push(s),r.push({chain:a.concat([s]),id:s})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.indexOf(r)<0&&e.push(r)}}t=t||{};var y={},v=[],g={},b=function(){console.warn("[HMR] unexpected require("+I.moduleId+") to disposed module")};for(var E in h)if(Object.prototype.hasOwnProperty.call(h,E)){var I;s=O(E);var _=!1,D=!1,A=!1,H="";switch((I=h[E]?l(s):{type:"disposed",moduleId:E}).chain&&(H="\nUpdate propagation: "+I.chain.join(" -> ")),I.type){case"self-declined":t.onDeclined&&t.onDeclined(I),t.ignoreDeclined||(_=new Error("Aborted because of self decline: "+I.moduleId+H));break;case"declined":t.onDeclined&&t.onDeclined(I),t.ignoreDeclined||(_=new Error("Aborted because of declined dependency: "+I.moduleId+" in "+I.parentId+H));break;case"unaccepted":t.onUnaccepted&&t.onUnaccepted(I),t.ignoreUnaccepted||(_=new Error("Aborted because "+s+" is not accepted"+H));break;case"accepted":t.onAccepted&&t.onAccepted(I),D=!0;break;case"disposed":t.onDisposed&&t.onDisposed(I),A=!0;break;default:throw new Error("Unexception type "+I.type)}if(_)return f("abort"),Promise.reject(_);if(D){g[s]=h[s],p(v,I.outdatedModules);for(s in I.outdatedDependencies)Object.prototype.hasOwnProperty.call(I.outdatedDependencies,s)&&(y[s]||(y[s]=[]),p(y[s],I.outdatedDependencies[s]))}A&&(p(v,[I.moduleId]),g[s]=b)}var x,P=[];for(r=0;r<v.length;r++)s=v[r],j[s]&&j[s].hot._selfAccepted&&P.push({module:s,errorHandler:j[s].hot._selfAccepted});f("dispose"),Object.keys(w).forEach(function(e){!1===w[e]&&delete installedChunks[e]});for(var k,M,q=v.slice();q.length>0;)if(s=q.pop(),d=j[s]){var C={},L=d.hot._disposeHandlers;for(i=0;i<L.length;i++)(n=L[i])(C);for(a[s]=C,d.hot.active=!1,delete j[s],delete y[s],i=0;i<d.children.length;i++){var Q=j[d.children[i]];Q&&((x=Q.parents.indexOf(s))>=0&&Q.parents.splice(x,1))}}for(s in y)if(Object.prototype.hasOwnProperty.call(y,s)&&(d=j[s]))for(M=y[s],i=0;i<M.length;i++)k=M[i],(x=d.children.indexOf(k))>=0&&d.children.splice(x,1);f("apply"),o=m;for(s in g)Object.prototype.hasOwnProperty.call(g,s)&&(e[s]=g[s]);var T=null;for(s in y)if(Object.prototype.hasOwnProperty.call(y,s)&&(d=j[s])){M=y[s];var U=[];for(r=0;r<M.length;r++)if(k=M[r],n=d.hot._acceptedDependencies[k]){if(U.indexOf(n)>=0)continue;U.push(n)}for(r=0;r<U.length;r++){n=U[r];try{n(M)}catch(e){t.onErrored&&t.onErrored({type:"accept-errored",moduleId:s,dependencyId:M[r],error:e}),t.ignoreErrored||T||(T=e)}}}for(r=0;r<P.length;r++){var N=P[r];s=N.module,c=[s];try{S(s)}catch(e){if("function"==typeof N.errorHandler)try{N.errorHandler(e)}catch(n){t.onErrored&&t.onErrored({type:"self-accept-error-handler-errored",moduleId:s,error:n,orginalError:e,originalError:e}),t.ignoreErrored||T||(T=n),T||(T=e)}else t.onErrored&&t.onErrored({type:"self-accept-errored",moduleId:s,error:e}),t.ignoreErrored||T||(T=e)}}return T?(f("fail"),Promise.reject(T)):(f("idle"),new Promise(function(e){e(v)}))}var j={};function S(t){if(j[t])return j[t].exports;var r,o,i=j[t]={i:t,l:!1,exports:{},hot:(r=t,o={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:n!==r,active:!0,accept:function(e,t){if(void 0===e)o._selfAccepted=!0;else if("function"==typeof e)o._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)o._acceptedDependencies[e[n]]=t||function(){};else o._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)o._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)o._declinedDependencies[e[t]]=!0;else o._declinedDependencies[e]=!0},dispose:function(e){o._disposeHandlers.push(e)},addDisposeHandler:function(e){o._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=o._disposeHandlers.indexOf(e);t>=0&&o._disposeHandlers.splice(t,1)},check:E,apply:D,status:function(e){if(!e)return u;l.push(e)},addStatusHandler:function(e){l.push(e)},removeStatusHandler:function(e){var t=l.indexOf(e);t>=0&&l.splice(t,1)},data:a[r]},n=void 0,o),parents:(d=c,c=[],d),children:[]};return e[t].call(i.exports,i,i.exports,s(t)),i.l=!0,i.exports}S.m=e,S.c=j,S.d=function(e,t,n){S.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},S.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return S.d(t,"a",t),t},S.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},S.p="/scripts/",S.h=function(){return o},s(0)(S.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=new(n.n(r).a);document.querySelectorAll('a[href*="#"]').forEach(function(e){var t=e,n={ignore:"[data-scroll-ignore]",header:".js-bolt-smooth-scroll-offset",speed:500,offset:0,easing:"easeInOutCubic",before:function(){},after:function(){}},r=t.getAttribute("href");r=r.replace("#","");var i=document.getElementById(r);i&&t.addEventListener("click",function(){o.animateScroll(i,t,n)})})},function(e,t,n){(function(n){var r,o,i;"function"==typeof Symbol&&Symbol.iterator;o=void 0!==n?n:"undefined"!=typeof window?window:this,i=function(e){"use strict";var t="querySelector"in document&&"addEventListener"in e&&"requestAnimationFrame"in e&&"closest"in e.Element.prototype,n={ignore:"[data-scroll-ignore]",header:null,speed:500,offset:0,easing:"easeInOutCubic",customEasing:null,before:function(){},after:function(){}},r=function(){for(var e={},t=0,n=arguments.length;t<n;t++){var r=arguments[t];!function(t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(r)}return e},o=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),r=n.length,o=-1,i="",a=n.charCodeAt(0);++o<r;){if(0===(t=n.charCodeAt(o)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");i+=t>=1&&t<=31||127==t||0===o&&t>=48&&t<=57||1===o&&t>=48&&t<=57&&45===a?"\\"+t.toString(16)+" ":t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?n.charAt(o):"\\"+n.charAt(o)}return"#"+i},i=function(t){return t?(n=t,parseInt(e.getComputedStyle(n).height,10)+t.offsetTop):0;var n};return function(a,c){var d,s,l,u,f,p,h,m={};m.cancelScroll=function(){cancelAnimationFrame(h)},m.animateScroll=function(t,o,a){var c=r(d||n,a||{}),s="[object Number]"===Object.prototype.toString.call(t),l=s||!t.tagName?null:t;if(s||l){var p=e.pageYOffset;c.header&&!u&&(u=document.querySelector(c.header)),f||(f=i(u));var h,y,v,g=s?t:function(e,t,n){var r=0;if(e.offsetParent)do{r+=e.offsetTop,e=e.offsetParent}while(e);return Math.max(r-t-n,0)}(l,f,parseInt("function"==typeof c.offset?c.offset():c.offset,10)),b=g-p,w=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),O=0,E=function(n,r){var i,a,d,l=e.pageYOffset;if(n==r||l==r||(p<r&&e.innerHeight+l)>=w)return m.cancelScroll(),i=t,a=r,d=s,d||(i.focus(),document.activeElement.id!==i.id&&(i.setAttribute("tabindex","-1"),i.focus(),i.style.outline="none"),e.scrollTo(0,a)),c.after(t,o),h=null,!0};0===e.pageYOffset&&e.scrollTo(0,0),c.before(t,o),m.cancelScroll(),e.requestAnimationFrame(function t(n){var r,o,i;h||(h=n),y=(O+=n-h)/parseInt(c.speed,10),v=p+b*(o=y=y>1?1:y,"easeInQuad"===(r=c).easing&&(i=o*o),"easeOutQuad"===r.easing&&(i=o*(2-o)),"easeInOutQuad"===r.easing&&(i=o<.5?2*o*o:(4-2*o)*o-1),"easeInCubic"===r.easing&&(i=o*o*o),"easeOutCubic"===r.easing&&(i=--o*o*o+1),"easeInOutCubic"===r.easing&&(i=o<.5?4*o*o*o:(o-1)*(2*o-2)*(2*o-2)+1),"easeInQuart"===r.easing&&(i=o*o*o*o),"easeOutQuart"===r.easing&&(i=1- --o*o*o*o),"easeInOutQuart"===r.easing&&(i=o<.5?8*o*o*o*o:1-8*--o*o*o*o),"easeInQuint"===r.easing&&(i=o*o*o*o*o),"easeOutQuint"===r.easing&&(i=1+--o*o*o*o*o),"easeInOutQuint"===r.easing&&(i=o<.5?16*o*o*o*o*o:1+16*--o*o*o*o*o),r.customEasing&&(i=r.customEasing(o)),i||o),e.scrollTo(0,Math.floor(v)),E(v,g)||(e.requestAnimationFrame(t),h=n)})}};var y=function(e){s&&(s.id=s.getAttribute("data-scroll-id"),m.animateScroll(s,l),s=null,l=null)},v=function(t){if(!("matchMedia"in e&&e.matchMedia("(prefers-reduced-motion)").matches)&&0===t.button&&!t.metaKey&&!t.ctrlKey&&(l=t.target.closest(a))&&"a"===l.tagName.toLowerCase()&&!t.target.closest(d.ignore)&&l.hostname===e.location.hostname&&l.pathname===e.location.pathname&&/#/.test(l.href)){var n;try{n=o(decodeURIComponent(l.hash))}catch(e){n=o(l.hash)}if("#"===n){t.preventDefault();var r=(s=document.body).id?s.id:"smooth-scroll-top";return s.setAttribute("data-scroll-id",r),s.id="",void(e.location.hash.substring(1)===r?y():e.location.hash=r)}(s=document.querySelector(n))&&(s.setAttribute("data-scroll-id",s.id),s.id="",l.hash===e.location.hash&&(t.preventDefault(),y()))}},g=function(e){p||(p=setTimeout(function(){p=null,f=i(u)},66))};return m.destroy=function(){d&&(document.removeEventListener("click",v,!1),e.removeEventListener("resize",g,!1),m.cancelScroll(),d=null,s=null,l=null,u=null,f=null,p=null,h=null)},m.init=function(o){t&&(m.destroy(),d=r(n,o||{}),u=d.header?document.querySelector(d.header):null,f=i(u),document.addEventListener("click",v,!1),e.addEventListener("hashchange",y,!1),u&&e.addEventListener("resize",g,!1))},m.init(c),m}},void 0===(r=function(){return i(o)}.apply(t,[]))||(e.exports=r)}).call(t,n(2))},function(e,t){var n,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(n=window)}e.exports=n}]);

@@ -11,3 +11,3 @@ {

],
"version": "0.9.0-rc.3",
"version": "0.9.0-rc.4",
"maintainers": [

@@ -43,3 +43,3 @@ {

"devDependencies": {
"@bolt/build-webpack": "^0.9.0-rc.3"
"@bolt/build-webpack": "^0.9.0-rc.4"
},

@@ -46,0 +46,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc