website-utilities 1.0.252 → 1.0.253

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /* !/usr/bin/env css
2
+ -*- coding: utf-8 -*- */@font-face{font-family:open-sans;src:url(font.compiled/open-sans-light.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-light.woff?md5=[chunkhash]) format("woff");font-weight:300;font-style:normal}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-light-italic.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-light-italic.woff?md5=[chunkhash]) format("woff");font-weight:300;font-style:italic}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-regular.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-regular.woff?md5=[chunkhash]) format("woff");font-weight:400;font-style:normal}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-italic.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-italic.woff?md5=[chunkhash]) format("woff");font-weight:400;font-style:italic}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-semi-bold.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-semi-bold.woff?md5=[chunkhash]) format("woff");font-weight:600;font-style:normal}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-semi-bold-italic.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-semi-bold-italic.woff?md5=[chunkhash]) format("woff");font-weight:600;font-style:italic}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-bold.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-bold.woff?md5=[chunkhash]) format("woff");font-weight:700;font-style:normal}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-bold-italic.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-bold-italic.woff?md5=[chunkhash]) format("woff");font-weight:700;font-style:italic}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-extra-bold.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-extra-bold.woff?md5=[chunkhash]) format("woff");font-weight:800;font-style:normal}@font-face{font-family:open-sans;src:url(font.compiled/open-sans-extra-bold-italic.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-extra-bold-italic.woff?md5=[chunkhash]) format("woff");font-weight:800;font-style:italic}@font-face{font-family:open-sans-condensed;src:url(font.compiled/open-sans-condensed-bold.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-condensed-bold.woff?md5=[chunkhash]) format("woff");font-weight:700;font-style:normal}@font-face{font-family:open-sans-condensed;src:url(font.compiled/open-sans-condensed-light.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-condensed-light.woff?md5=[chunkhash]) format("woff");font-weight:300;font-style:normal}@font-face{font-family:open-sans-condensed;src:url(font.compiled/open-sans-condensed-light-italic.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/open-sans-condensed-light-italic.woff?md5=[chunkhash]) format("woff");font-weight:300;font-style:italic}@font-face{font-family:Glyphicons Halflings;src:url(font.compiled/glyphicons-halflings-regular.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/glyphicons-halflings-regular.woff?md5=[chunkhash]) format("woff")}@font-face{font-family:Glyphicons Social Regular;src:url(font.compiled/glyphicons-halflings-social-regular.woff2?md5=[chunkhash]) format("woff2"),url(font.compiled/glyphicons-halflings-social-regular.woff?md5=[chunkhash]) format("woff")}:root{--default-space:20px;--extra-extra-small-width:360px;--extra-small-width:500px;--small-width:768px;--medium-width:992px;--large-width:1200px;@custom-media --extra-extra-small (min-width: 360px);@custom-media --extra-small (min-width: 500px);@custom-media --small (min-width: 768px);@custom-media --medium (min-width: 992px);@custom-media --large (min-width: 1200px);--background-color:#fff;--disabled-color:#eee;--font-color:#555;--border-color:#ccc;--font-family:"Open Sans",open-sans,sans-serif;--font-family-condensed:"Open Sans Condensed",open-sans-condensed,sans-serif;& .javascript .tools{&-hidden-on-javascript-enabled{display:none!important}&-visible-on-javascript-enabled{display:initial!important}}& .no-javascript .tools{&-hidden-on-javascript-disabled{display:none!important}&-visible-on-javascript-disabled{display:initial!important}}}@keyframes spinner-line-fade-more{0%,to{opacity:0}1%{opacity:1}}@keyframes spinner-line-fade-quick{0%,39%,to{opacity:.25}40%{opacity:1}}@keyframes spinner-line-fade-default{0%,to{opacity:.22}1%{opacity:1}}
package/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';if(typeof module!=='undefined'&&module!==null&&eval('typeof require')!=='undefined'&&eval('require')!==null&&'main'in eval('require')&&eval('typeof require.main')!=='undefined'&&eval('require.main')!==null){var ORIGINAL_MAIN_MODULE=module;if(module!==eval('require.main')&&'paths'in module&&'paths'in eval('require.main')&&typeof __dirname!=='undefined'&&__dirname!==null)module.paths=eval('require.main.paths').concat(module.paths.filter(function(path){return eval('require.main.paths').includes(path)}))};if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/regenerator"),require("clientnode"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","@babel/runtime/regenerator","clientnode"],e);else{var o="object"==typeof exports?e(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/regenerator"),require("clientnode")):e(t["@babel/runtime/helpers/asyncToGenerator"],t["@babel/runtime/helpers/extends"],t["@babel/runtime/helpers/inheritsLoose"],t["@babel/runtime/regenerator"],t.clientnode);for(var n in o)("object"==typeof exports?exports:t)[n]=o[n]}}(this,(function(t,e,o,n,i){return function(){"use strict";var r=[,function(t){t.exports=e},function(e){e.exports=t},function(t){t.exports=o},function(t){t.exports=n},function(t){t.exports=i}],s={};function a(t){var e=s[t];if(void 0!==e)return e.exports;var o=s[t]={exports:{}};return r[t](o,o.exports,a),o.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var l={};return function(){a.r(l),a.d(l,{WebsiteUtilities:function(){return T},default:function(){return x}});var t=a(1),e=a.n(t),o=a(2),n=a.n(o),i=a(3),r=a.n(i),s=a(4),c=a.n(s),d=a(5),p=a.n(d),u=function(){return u=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},u.apply(this,arguments)},h={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",animation:"spinner-line-fade-default",rotate:0,direction:1,speed:1,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"0 0 1px transparent",position:"absolute"},m=function(){function t(t){void 0===t&&(t={}),this.opts=u(u({},h),t)}return t.prototype.spin=function(t){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),f(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),t&&t.insertBefore(this.el,t.firstChild||null),function(t,e){var o=Math.round(e.corners*e.width*500)/1e3+"px",n="none";!0===e.shadow?n="0 2px 4px #000":"string"==typeof e.shadow&&(n=e.shadow);for(var i=function(t){for(var e=[],o=0,n=t.split(",");o<n.length;o++){var i=n[o].match(/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/);if(null!==i){var r=+i[2],s=+i[5],a=i[4],l=i[7];0!=r||a||(a=l),0!==s||l||(l=a),a===l&&e.push({prefix:i[1]||"",x:r,y:s,xUnits:a,yUnits:l,end:i[8]})}}return e}(n),r=0;r<e.lines;r++){var s=~~(360/e.lines*r+e.rotate),a=f(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:w(e.fadeColor,r),borderRadius:o,transformOrigin:"left",transform:"rotate("+s+"deg) translateX("+e.radius+"px)"}),l=r*e.direction/e.lines/e.speed;l-=1/e.speed;var c=f(document.createElement("div"),{width:"100%",height:"100%",background:w(e.color,r),borderRadius:o,boxShadow:g(i,s),animation:1/e.speed+"s linear "+l+"s infinite "+e.animation});a.appendChild(c),t.appendChild(a)}}(this.el,this.opts),this},t.prototype.stop=function(){return this.el&&("undefined"==typeof requestAnimationFrame?clearTimeout(this.animateId):cancelAnimationFrame(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();function f(t,e){for(var o in e)t.style[o]=e[o];return t}function w(t,e){return"string"==typeof t?t:t[e%t.length]}function g(t,e){for(var o=[],n=0,i=t;n<i.length;n++){var r=i[n],s=v(r.x,r.y,e);o.push(r.prefix+s[0]+r.xUnits+" "+s[1]+r.yUnits+r.end)}return o.join(", ")}function v(t,e,o){var n=Math.round,i=o*Math.PI/180,r=Math.sin(i),s=Math.cos(i);return[n(1e3*(t*s+e*r))/1e3,n(1e3*(-t*r+e*s))/1e3]}function b(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return(o=o.call(t)).next.bind(o);if(Array.isArray(t)||(o=function(t,e){if(t){if("string"==typeof t)return y(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}var T=function(t){function o(){for(var e,o=arguments.length,n=Array(o),i=0;i<o;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).options=null,e.$domNodes=null,e.currentMediaQueryMode="",e.currentSectionName="home",e.languageHandler=null,e.startUpAnimationIsComplete=!1,e.viewportIsOnTop=!1,e.windowLoaded=!1,e.windowLoadingSpinner=null,e._onViewportMovesToTop=function(){"hidden"===e.$domNodes.scrollToTopButton.css("visibility")?e.$domNodes.scrollToTopButton.css("opacity",0):(e.options.scrollToTop.button.hideAnimationOptions.always=function(){return e.$domNodes.scrollToTopButton.css({bottom:"-="+e.options.scrollToTop.button.slideDistanceInPixel,display:"none"})},e.$domNodes.scrollToTopButton.finish().animate({bottom:"+="+e.options.scrollToTop.button.slideDistanceInPixel,opacity:0},e.options.scrollToTop.button.hideAnimationOptions))},e._onViewportMovesAwayFromTop=function(){"hidden"===e.$domNodes.scrollToTopButton.css("visibility")?e.$domNodes.scrollToTopButton.css("opacity",1):e.$domNodes.scrollToTopButton.finish().css({bottom:"+="+e.options.scrollToTop.button.slideDistanceInPixel,display:"block",opacity:0}).animate({bottom:"-="+e.options.scrollToTop.button.slideDistanceInPixel,queue:!1,opacity:1},e.options.scrollToTop.button.showAnimationOptions)},e}r()(o,t);var i=o.prototype;return i.initialize=function(e){var i,r=this;return void 0===e&&(e={}),t.prototype.initialize.call(this,p().extend(!0,{},o._defaultOptions,e)),this.options.initialSectionName?this.currentSectionName=this.options.initialSectionName:null!=(i=d.globalContext.window.location)&&i.hash&&(this.currentSectionName=d.globalContext.location.hash.substring(1)),this._onViewportMovesAwayFromTop=p().debounce(this._onViewportMovesAwayFromTop),this._onViewportMovesToTop=p().debounce(this._onViewportMovesToTop),this.$domNodes=this.grabDomNodes(this.options.domNodes),this.disableScrolling(),new Promise(function(){var t=n()(c().mark((function t(e){var o;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.$domNodes.windowLoadingSpinner.length&&(r.windowLoadingSpinner=new m(r.options.windowLoadingSpinner),r.windowLoadingSpinner.spin(r.$domNodes.windowLoadingSpinner[0])),r._bindScrollEvents(),r.$domNodes.parent.show(),o=function(){var t=n()(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.windowLoaded){t.next=6;break}return r.windowLoaded=!0,t.next=4,r._removeLoadingCover();case 4:r._performStartUpEffects(),e(r);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),(0,d.$)((function(){return p().timeout(o,r.options.windowLoadedTimeoutAfterDocumentLoadedInMilliseconds)})),r.on(r.$domNodes.window,"load",o),r._bindClickTracking(),r.options.language.logging||(r.options.language.logging=r.options.logging),!r.options.activateLanguageSupport||r.languageHandler){t.next=12;break}return t.next=11,(0,d.$)(r.$domNodes.parent).Internationalisation(r.options.language);case 11:r.languageHandler=t.sent.data(r.options.name);case 12:r._bindNavigationEvents(),r._bindMediaQueryChangeEvents(),r._triggerWindowResizeEvents();case 15:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}())},i.scrollToTop=function(){return d.globalContext.document&&this.$domNodes.window.stop().animate({scrollTop:0},this.options.scrollToTop.options),this},i.disableScrolling=function(){return this.$domNodes.parent.addClass("disable-scrolling").on("touchmove",(function(t){return t.preventDefault()})),this},i.enableScrolling=function(){return this.$domNodes.parent.removeClass(["disable-scrolling","touchmove"]),this.off(this.$domNodes.parent),this},i.track=function(t){if(d.globalContext.window.location&&this.options.tracking){var o=e()({context:d.globalContext.window.location.pathname+"#"+this.currentSectionName},t);(isNaN(o.value)||"number"!=typeof o.value)&&(o.value=1),this.debug('Run tracking code: "event" with arguments:'),this.debug(o);try{this.options.tracking.track(o)}catch(t){this.warn('Problem in tracking "'+p().represent(o)+'": '+p().represent(t))}}return this},i._onChangeMediaQueryMode=function(){},i._onChangeToLargeMode=function(){},i._onChangeToMediumMode=function(){},i._onChangeToSmallMode=function(){},i._onChangeToExtraSmallMode=function(){},i._onSwitchSection=function(t){var e;if(d.globalContext.window.location&&null!=(e=this.options.tracking)&&e.sectionSwitch&&this.currentSectionName!==t){this.currentSectionName=t,this.debug('Run section switch tracking on section "'+this.currentSectionName+'".');try{this.options.tracking.sectionSwitch.call(this,this.currentSectionName)}catch(t){this.warn('Problem due to track section switch to "'+this.currentSectionName+'": '+p().represent(t))}}},i._onStartUpAnimationComplete=function(){this.startUpAnimationIsComplete=!0},i._bindMediaQueryChangeEvents=function(){this.on(this.$domNodes.window,"resize",this._triggerWindowResizeEvents.bind(this))},i._triggerWindowResizeEvents=function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];for(var n,i,r=b(this.options.mediaQueryClassNameIndicator);!(n=r()).done;)i=n.value,this.$domNodes.mediaQueryIndicator.prependTo(this.$domNodes.parent).addClass("hidden-"+i[1]),this.$domNodes.mediaQueryIndicator.is(":hidden")&&i[0]!==this.currentMediaQueryMode&&(this.fireEvent.apply(this,["changeMediaQueryMode",!1,this,this.currentMediaQueryMode,i[0]].concat(e)),this.fireEvent.apply(this,["changeTo"+p().stringCapitalize(i[0])+"Mode",!1,this,this.currentMediaQueryMode,i[0]].concat(e)),this.currentMediaQueryMode=i[0]),this.$domNodes.mediaQueryIndicator.removeClass("hidden-"+i[1])},i._bindScrollEvents=function(){for(var t=this,e=arguments.length,o=Array(e),n=0;n<e;n++)o[n]=arguments[n];var i=(0,d.$)("body, html").add(this.$domNodes.window);i.on(this.options.knownScrollEventNames.join(" "),(function(e){t.options.switchToManualScrollingIndicator(e)&&i.stop(!0)})),this.on(this.$domNodes.window,"scroll",(function(){t.$domNodes.window.scrollTop()?t.viewportIsOnTop&&(t.viewportIsOnTop=!1,t.fireEvent.apply(t,["viewportMovesAwayFromTop",!1,t].concat(o))):!t.viewportIsOnTop&&(t.viewportIsOnTop=!0,t.fireEvent.apply(t,["viewportMovesToTop",!1,t].concat(o)))})),this.$domNodes.window.scrollTop()?(this.viewportIsOnTop=!1,this.fireEvent.apply(this,["viewportMovesAwayFromTop",!1,this].concat(o))):(this.viewportIsOnTop=!0,this.fireEvent.apply(this,["viewportMovesToTop",!1,this].concat(o)))},i._removeLoadingCover=function(){var t=n()(c().mark((function t(){var e=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p().timeout(this.options.additionalPageLoadingTimeInMilliseconds);case 2:return(0,d.$)(p().stringFormat('[class^="{1}"], [class*=" {1}"]',this.sliceDomNodeSelectorPrefix(this.options.domNodes.startUpAnimationClassPrefix).substr(1))).css(this.options.startUpHide),t.next=5,new Promise((function(t){e.$domNodes.windowLoadingCover.length?(e.enableScrolling(),e.$domNodes.windowLoadingCover.animate(e.options.windowLoadingCoverHideAnimation,{always:t})):t()}));case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),i._performStartUpEffects=function(){var t=n()(c().mark((function t(e){var o,n=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===e&&(e=1),this.$domNodes.windowLoadingCover.hide(),this.windowLoadingSpinner&&this.windowLoadingSpinner.stop(),!(0,d.$)(p().stringFormat('[class^="{1}"], [class*=" {1}"]',this.sliceDomNodeSelectorPrefix(this.options.domNodes.startUpAnimationClassPrefix).substr(1))).length){t.next=17;break}return t.next=6,p().timeout(this.options.startUpAnimationElementDelayInMiliseconds);case 6:if(o=!1,(0,d.$)(this.options.domNodes.startUpAnimationClassPrefix+e).animate(this.options.startUpShowAnimation,{always:function(){o&&n.fireEvent("startUpAnimationComplete")}}),!(0,d.$)(this.options.domNodes.startUpAnimationClassPrefix+e+1).length){t.next=14;break}return t.next=12,this._performStartUpEffects(e+1);case 12:t.next=15;break;case 14:o=!0;case 15:t.next=18;break;case 17:this.fireEvent("startUpAnimationComplete");case 18:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),i._bindNavigationEvents=function(){var t=this;d.globalContext.window.addEventListener("hashchange",(function(){t.startUpAnimationIsComplete&&t.fireEvent("switchSection",!1,t,location.hash.substring(1))}),!1),this._bindScrollToTopButton()},i._bindScrollToTopButton=function(){var t=this;this.on(this.$domNodes.scrollToTopButton,"click",(function(e){e.preventDefault(),t.scrollToTop()}))},i._bindClickTracking=function(){var t=this;this.options.tracking&&(this.options.tracking.linkClick&&this.on(this.$domNodes.parent.find("a"),"click",(function(e){return t.options.tracking.linkClick.call(t,(0,d.$)(e.target),e)})),this.options.tracking.buttonClick&&this.on(this.$domNodes.parent.find("button"),"click",(function(e){return t.options.tracking.buttonClick.call(t,(0,d.$)(e.target),e)})))},o}(p());T._defaultOptions={activateLanguageSupport:!0,additionalPageLoadingTimeInMilliseconds:0,domain:"auto",domNodes:{mediaQueryIndicator:'<div class="media-query-indicator">',scrollToTopButton:'a[href="#top"]',startUpAnimationClassPrefix:".website-start-up-animation-number-",top:"header",windowLoadingCover:".website-utilities-window-loading-cover",windowLoadingSpinner:".website-utilities-window-loading-cover > div"},domNodeSelectorPrefix:"body.{1}",initialSectionName:"home",knownScrollEventNames:["DOMMouseScroll","keyup","mousedown","mousewheel","scroll","touchmove","wheel"],language:{},mediaQueryClassNameIndicator:[["extraSmall","xs"],["small","sm"],["medium","md"],["large","lg"]],name:"WebsiteUtilities",onChangeMediaQueryMode:p().noop,onChangeToExtraSmallMode:p().noop,onChangeToLargeMode:p().noop,onChangeToMediumMode:p().noop,onChangeToSmallMode:p().noop,onViewportMovesAwayFromTop:p().noop,onViewportMovesToTop:p().noop,onSwitchSection:p().noop,onStartUpAnimationComplete:p().noop,scrollToTop:{button:{hideAnimationOptions:{},showAnimationOptions:{},slideDistanceInPixel:30},options:{duration:"fast"}},startUpAnimationElementDelayInMiliseconds:100,startUpHide:{opacity:0},startUpShowAnimation:{opacity:1},switchToManualScrollingIndicator:function(t){return"number"==typeof t.which&&0<t.which||"mousedown"===t.type||"mousewheel"===t.type||"touchmove"===t.type},tracking:{buttonClick:function(t){this.track({event:"buttonClick",eventType:"click",label:t.text(),reference:t.attr("action")||t.attr("target")||t.attr("type")||t.text(),subject:"button",value:parseInt(t.attr("website-analytics-value")),userInteraction:!0})},linkClick:function(t){this.track({event:"linkClick",eventType:"click",label:t.text(),reference:t.attr("href")||t.attr("action")||t.attr("target")||t.attr("type")||t.text(),subject:"link",value:parseInt(t.attr("website-analytics-value")),userInteraction:!0})},sectionSwitch:function(t){this.track({event:"sectionSwitch",eventType:"sectionSwitch",label:t,reference:d.globalContext.window.location.pathname+"#"+t,subject:"url",userInteraction:!1})},track:function(t){var e;null==(e=d.globalContext.dataLayer)||e.push(t)}},windowLoadingCoverHideAnimation:{opacity:0},windowLoadingSpinner:{animation:"spinner-line-fade-quick",className:"spinner",color:"#000",corners:1,direction:1,fadeColor:"transparent",left:"auto",length:23,lines:9,position:"absolute",radius:40,rotate:0,scale:1,shadow:!1,speed:1.1,top:"auto",width:11,zIndex:2e9},windowLoadedTimeoutAfterDocumentLoadedInMilliseconds:2e3};var x=T;d.$.WebsiteUtilities=function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return p().controller(T,e)},d.$.WebsiteUtilities.class=T}(),l}()}));
1
+ 'use strict';if(typeof module!=='undefined'&&module!==null&&eval('typeof require')!=='undefined'&&eval('require')!==null&&'main'in eval('require')&&eval('typeof require.main')!=='undefined'&&eval('require.main')!==null){var ORIGINAL_MAIN_MODULE=module;if(module!==eval('require.main')&&'paths'in module&&'paths'in eval('require.main')&&typeof __dirname!=='undefined'&&__dirname!==null)module.paths=eval('require.main.paths').concat(module.paths.filter(function(path){return eval('require.main.paths').includes(path)}))};if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/regenerator"),require("clientnode"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","@babel/runtime/regenerator","clientnode"],e);else{var o="object"==typeof exports?e(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/regenerator"),require("clientnode")):e(t["@babel/runtime/helpers/asyncToGenerator"],t["@babel/runtime/helpers/extends"],t["@babel/runtime/helpers/inheritsLoose"],t["@babel/runtime/regenerator"],t.clientnode);for(var n in o)("object"==typeof exports?exports:t)[n]=o[n]}}(this,(function(t,e,o,n,i){return function(){"use strict";var r=[,function(t){t.exports=e},function(e){e.exports=t},function(t){t.exports=o},function(t){t.exports=n},function(t){t.exports=i}],s={};function a(t){var e=s[t];if(void 0!==e)return e.exports;var o=s[t]={exports:{}};return r[t](o,o.exports,a),o.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var l={};return function(){a.r(l),a.d(l,{WebsiteUtilities:function(){return T},default:function(){return x}});var t=a(1),e=a.n(t),o=a(2),n=a.n(o),i=a(3),r=a.n(i),s=a(4),c=a.n(s),d=a(5),p=a.n(d),u=function(){return u=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},u.apply(this,arguments)},h={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",animation:"spinner-line-fade-default",rotate:0,direction:1,speed:1,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"0 0 1px transparent",position:"absolute"},m=function(){function t(t){void 0===t&&(t={}),this.opts=u(u({},h),t)}return t.prototype.spin=function(t){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),f(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),t&&t.insertBefore(this.el,t.firstChild||null),function(t,e){var o=Math.round(e.corners*e.width*500)/1e3+"px",n="none";!0===e.shadow?n="0 2px 4px #000":"string"==typeof e.shadow&&(n=e.shadow);for(var i=function(t){for(var e=[],o=0,n=t.split(",");o<n.length;o++){var i=n[o].match(/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/);if(null!==i){var r=+i[2],s=+i[5],a=i[4],l=i[7];0!=r||a||(a=l),0!==s||l||(l=a),a===l&&e.push({prefix:i[1]||"",x:r,y:s,xUnits:a,yUnits:l,end:i[8]})}}return e}(n),r=0;r<e.lines;r++){var s=~~(360/e.lines*r+e.rotate),a=f(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:w(e.fadeColor,r),borderRadius:o,transformOrigin:"left",transform:"rotate("+s+"deg) translateX("+e.radius+"px)"}),l=r*e.direction/e.lines/e.speed;l-=1/e.speed;var c=f(document.createElement("div"),{width:"100%",height:"100%",background:w(e.color,r),borderRadius:o,boxShadow:g(i,s),animation:1/e.speed+"s linear "+l+"s infinite "+e.animation});a.appendChild(c),t.appendChild(a)}}(this.el,this.opts),this},t.prototype.stop=function(){return this.el&&("undefined"==typeof requestAnimationFrame?clearTimeout(this.animateId):cancelAnimationFrame(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();function f(t,e){for(var o in e)t.style[o]=e[o];return t}function w(t,e){return"string"==typeof t?t:t[e%t.length]}function g(t,e){for(var o=[],n=0,i=t;n<i.length;n++){var r=i[n],s=v(r.x,r.y,e);o.push(r.prefix+s[0]+r.xUnits+" "+s[1]+r.yUnits+r.end)}return o.join(", ")}function v(t,e,o){var n=Math.round,i=o*Math.PI/180,r=Math.sin(i),s=Math.cos(i);return[n(1e3*(t*s+e*r))/1e3,n(1e3*(-t*r+e*s))/1e3]}function b(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return(o=o.call(t)).next.bind(o);if(Array.isArray(t)||(o=function(t,e){if(t){if("string"==typeof t)return y(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}var T=function(t){function o(){for(var e,o=arguments.length,n=Array(o),i=0;i<o;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).options=null,e.$domNodes=null,e.currentMediaQueryMode="",e.currentSectionName="home",e.languageHandler=null,e.startUpAnimationIsComplete=!1,e.viewportIsOnTop=!1,e.windowLoaded=!1,e.windowLoadingSpinner=null,e._onViewportMovesToTop=function(){"hidden"===e.$domNodes.scrollToTopButton.css("visibility")?e.$domNodes.scrollToTopButton.css("opacity",0):(e.options.scrollToTop.button.hideAnimationOptions.always=function(){return e.$domNodes.scrollToTopButton.css({bottom:"-="+e.options.scrollToTop.button.slideDistanceInPixel,display:"none"})},e.$domNodes.scrollToTopButton.finish().animate({bottom:"+="+e.options.scrollToTop.button.slideDistanceInPixel,opacity:0},e.options.scrollToTop.button.hideAnimationOptions))},e._onViewportMovesAwayFromTop=function(){"hidden"===e.$domNodes.scrollToTopButton.css("visibility")?e.$domNodes.scrollToTopButton.css("opacity",1):e.$domNodes.scrollToTopButton.finish().css({bottom:"+="+e.options.scrollToTop.button.slideDistanceInPixel,display:"block",opacity:0}).animate({bottom:"-="+e.options.scrollToTop.button.slideDistanceInPixel,queue:!1,opacity:1},e.options.scrollToTop.button.showAnimationOptions)},e}r()(o,t);var i=o.prototype;return i.initialize=function(e){var i,r=this;return void 0===e&&(e={}),t.prototype.initialize.call(this,p().extend(!0,{},o._defaultOptions,e)),this.options.initialSectionName?this.currentSectionName=this.options.initialSectionName:null!=(i=d.globalContext.window.location)&&i.hash&&(this.currentSectionName=d.globalContext.location.hash.substring(1)),this._onViewportMovesAwayFromTop=p().debounce(this._onViewportMovesAwayFromTop),this._onViewportMovesToTop=p().debounce(this._onViewportMovesToTop),this.$domNodes=this.grabDomNodes(this.options.domNodes),this.disableScrolling(),new Promise(n()(c().mark((function t(e){var o;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.$domNodes.windowLoadingSpinner.length&&(r.windowLoadingSpinner=new m(r.options.windowLoadingSpinner),r.windowLoadingSpinner.spin(r.$domNodes.windowLoadingSpinner[0])),r._bindScrollEvents(),r.$domNodes.parent.show(),o=function(){var t=n()(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.windowLoaded){t.next=6;break}return r.windowLoaded=!0,t.next=4,r._removeLoadingCover();case 4:r._performStartUpEffects(),e(r);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),(0,d.$)((function(){return p().timeout(o,r.options.windowLoadedTimeoutAfterDocumentLoadedInMilliseconds)})),r.on(r.$domNodes.window,"load",o),r._bindClickTracking(),r.options.language.logging||(r.options.language.logging=r.options.logging),!r.options.activateLanguageSupport||r.languageHandler){t.next=12;break}return t.next=11,(0,d.$)(r.$domNodes.parent).Internationalisation(r.options.language);case 11:r.languageHandler=t.sent.data(r.options.name);case 12:r._bindNavigationEvents(),r._bindMediaQueryChangeEvents(),r._triggerWindowResizeEvents();case 15:case"end":return t.stop()}}),t)}))))},i.scrollToTop=function(){return d.globalContext.document&&this.$domNodes.window.stop().animate({scrollTop:0},this.options.scrollToTop.options),this},i.disableScrolling=function(){return this.$domNodes.parent.addClass("disable-scrolling").on("touchmove",(function(t){return t.preventDefault()})),this},i.enableScrolling=function(){return this.$domNodes.parent.removeClass(["disable-scrolling","touchmove"]),this.off(this.$domNodes.parent),this},i.track=function(t){if(d.globalContext.window.location&&this.options.tracking){var o=e()({context:d.globalContext.window.location.pathname+"#"+this.currentSectionName},t);(isNaN(o.value)||"number"!=typeof o.value)&&(o.value=1),this.debug('Run tracking code: "event" with arguments:'),this.debug(o);try{this.options.tracking.track(o)}catch(t){this.warn('Problem in tracking "'+p().represent(o)+'": '+p().represent(t))}}return this},i._onChangeMediaQueryMode=function(){},i._onChangeToLargeMode=function(){},i._onChangeToMediumMode=function(){},i._onChangeToSmallMode=function(){},i._onChangeToExtraSmallMode=function(){},i._onSwitchSection=function(t){var e;if(d.globalContext.window.location&&null!=(e=this.options.tracking)&&e.sectionSwitch&&this.currentSectionName!==t){this.currentSectionName=t,this.debug('Run section switch tracking on section "'+this.currentSectionName+'".');try{this.options.tracking.sectionSwitch.call(this,this.currentSectionName)}catch(t){this.warn('Problem due to track section switch to "'+this.currentSectionName+'": '+p().represent(t))}}},i._onStartUpAnimationComplete=function(){this.startUpAnimationIsComplete=!0},i._bindMediaQueryChangeEvents=function(){this.on(this.$domNodes.window,"resize",this._triggerWindowResizeEvents.bind(this))},i._triggerWindowResizeEvents=function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];for(var n,i,r=b(this.options.mediaQueryClassNameIndicator);!(n=r()).done;)i=n.value,this.$domNodes.mediaQueryIndicator.prependTo(this.$domNodes.parent).addClass("hidden-"+i[1]),this.$domNodes.mediaQueryIndicator.is(":hidden")&&i[0]!==this.currentMediaQueryMode&&(this.fireEvent.apply(this,["changeMediaQueryMode",!1,this,this.currentMediaQueryMode,i[0]].concat(e)),this.fireEvent.apply(this,["changeTo"+p().stringCapitalize(i[0])+"Mode",!1,this,this.currentMediaQueryMode,i[0]].concat(e)),this.currentMediaQueryMode=i[0]),this.$domNodes.mediaQueryIndicator.removeClass("hidden-"+i[1])},i._bindScrollEvents=function(){for(var t=this,e=arguments.length,o=Array(e),n=0;n<e;n++)o[n]=arguments[n];var i=(0,d.$)("body, html").add(this.$domNodes.window);i.on(this.options.knownScrollEventNames.join(" "),(function(e){t.options.switchToManualScrollingIndicator(e)&&i.stop(!0)})),this.on(this.$domNodes.window,"scroll",(function(){t.$domNodes.window.scrollTop()?t.viewportIsOnTop&&(t.viewportIsOnTop=!1,t.fireEvent.apply(t,["viewportMovesAwayFromTop",!1,t].concat(o))):!t.viewportIsOnTop&&(t.viewportIsOnTop=!0,t.fireEvent.apply(t,["viewportMovesToTop",!1,t].concat(o)))})),this.$domNodes.window.scrollTop()?(this.viewportIsOnTop=!1,this.fireEvent.apply(this,["viewportMovesAwayFromTop",!1,this].concat(o))):(this.viewportIsOnTop=!0,this.fireEvent.apply(this,["viewportMovesToTop",!1,this].concat(o)))},i._removeLoadingCover=function(){var t=n()(c().mark((function t(){var e=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p().timeout(this.options.additionalPageLoadingTimeInMilliseconds);case 2:return(0,d.$)(p().stringFormat('[class^="{1}"], [class*=" {1}"]',this.sliceDomNodeSelectorPrefix(this.options.domNodes.startUpAnimationClassPrefix).substr(1))).css(this.options.startUpHide),t.next=5,new Promise((function(t){e.$domNodes.windowLoadingCover.length?(e.enableScrolling(),e.$domNodes.windowLoadingCover.animate(e.options.windowLoadingCoverHideAnimation,{always:t})):t()}));case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),i._performStartUpEffects=function(){var t=n()(c().mark((function t(e){var o,n=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===e&&(e=1),this.$domNodes.windowLoadingCover.hide(),this.windowLoadingSpinner&&this.windowLoadingSpinner.stop(),!(0,d.$)(p().stringFormat('[class^="{1}"], [class*=" {1}"]',this.sliceDomNodeSelectorPrefix(this.options.domNodes.startUpAnimationClassPrefix).substr(1))).length){t.next=17;break}return t.next=6,p().timeout(this.options.startUpAnimationElementDelayInMiliseconds);case 6:if(o=!1,(0,d.$)(this.options.domNodes.startUpAnimationClassPrefix+e).animate(this.options.startUpShowAnimation,{always:function(){o&&n.fireEvent("startUpAnimationComplete")}}),!(0,d.$)(this.options.domNodes.startUpAnimationClassPrefix+e+1).length){t.next=14;break}return t.next=12,this._performStartUpEffects(e+1);case 12:t.next=15;break;case 14:o=!0;case 15:t.next=18;break;case 17:this.fireEvent("startUpAnimationComplete");case 18:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),i._bindNavigationEvents=function(){var t=this;d.globalContext.window.addEventListener("hashchange",(function(){t.startUpAnimationIsComplete&&t.fireEvent("switchSection",!1,t,location.hash.substring(1))}),!1),this._bindScrollToTopButton()},i._bindScrollToTopButton=function(){var t=this;this.on(this.$domNodes.scrollToTopButton,"click",(function(e){e.preventDefault(),t.scrollToTop()}))},i._bindClickTracking=function(){var t=this;this.options.tracking&&(this.options.tracking.linkClick&&this.on(this.$domNodes.parent.find("a"),"click",(function(e){return t.options.tracking.linkClick.call(t,(0,d.$)(e.target),e)})),this.options.tracking.buttonClick&&this.on(this.$domNodes.parent.find("button"),"click",(function(e){return t.options.tracking.buttonClick.call(t,(0,d.$)(e.target),e)})))},o}(p());T._defaultOptions={activateLanguageSupport:!0,additionalPageLoadingTimeInMilliseconds:0,domain:"auto",domNodes:{mediaQueryIndicator:'<div class="media-query-indicator">',scrollToTopButton:'a[href="#top"]',startUpAnimationClassPrefix:".website-start-up-animation-number-",top:"header",windowLoadingCover:".website-utilities-window-loading-cover",windowLoadingSpinner:".website-utilities-window-loading-cover > div"},domNodeSelectorPrefix:"body.{1}",initialSectionName:"home",knownScrollEventNames:["DOMMouseScroll","keyup","mousedown","mousewheel","scroll","touchmove","wheel"],language:{},mediaQueryClassNameIndicator:[["extraSmall","xs"],["small","sm"],["medium","md"],["large","lg"]],name:"WebsiteUtilities",onChangeMediaQueryMode:p().noop,onChangeToExtraSmallMode:p().noop,onChangeToLargeMode:p().noop,onChangeToMediumMode:p().noop,onChangeToSmallMode:p().noop,onViewportMovesAwayFromTop:p().noop,onViewportMovesToTop:p().noop,onSwitchSection:p().noop,onStartUpAnimationComplete:p().noop,scrollToTop:{button:{hideAnimationOptions:{},showAnimationOptions:{},slideDistanceInPixel:30},options:{duration:"fast"}},startUpAnimationElementDelayInMiliseconds:100,startUpHide:{opacity:0},startUpShowAnimation:{opacity:1},switchToManualScrollingIndicator:function(t){return"number"==typeof t.which&&0<t.which||"mousedown"===t.type||"mousewheel"===t.type||"touchmove"===t.type},tracking:{buttonClick:function(t){this.track({event:"buttonClick",eventType:"click",label:t.text(),reference:t.attr("action")||t.attr("target")||t.attr("type")||t.text(),subject:"button",value:parseInt(t.attr("website-analytics-value")),userInteraction:!0})},linkClick:function(t){this.track({event:"linkClick",eventType:"click",label:t.text(),reference:t.attr("href")||t.attr("action")||t.attr("target")||t.attr("type")||t.text(),subject:"link",value:parseInt(t.attr("website-analytics-value")),userInteraction:!0})},sectionSwitch:function(t){this.track({event:"sectionSwitch",eventType:"sectionSwitch",label:t,reference:d.globalContext.window.location.pathname+"#"+t,subject:"url",userInteraction:!1})},track:function(t){var e;null==(e=d.globalContext.dataLayer)||e.push(t)}},windowLoadingCoverHideAnimation:{opacity:0},windowLoadingSpinner:{animation:"spinner-line-fade-quick",className:"spinner",color:"#000",corners:1,direction:1,fadeColor:"transparent",left:"auto",length:23,lines:9,position:"absolute",radius:40,rotate:0,scale:1,shadow:!1,speed:1.1,top:"auto",width:11,zIndex:2e9},windowLoadedTimeoutAfterDocumentLoadedInMilliseconds:2e3};var x=T;d.$.WebsiteUtilities=function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return p().controller(T,e)},d.$.WebsiteUtilities.class=T}(),l}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "website-utilities",
3
- "version": "1.0.252",
3
+ "version": "1.0.253",
4
4
  "license": "CC-BY-3.0",
5
5
  "description": "extend your web app",
6
6
  "homepage": "https://torben.website/website-utilities",
@@ -62,7 +62,6 @@
62
62
  "@types/jquery": "*",
63
63
  "@types/jsdom": "*",
64
64
  "@types/node": "*",
65
- "@types/workbox-webpack-plugin": "*",
66
65
  "@typescript-eslint/eslint-plugin": "*",
67
66
  "@typescript-eslint/parser": "*",
68
67
  "clientnode": "*",
@@ -111,7 +110,8 @@
111
110
  }
112
111
  },
113
112
  "resolutions": {
114
- "@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz"
113
+ "@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz",
114
+ "colors": "1.4.0"
115
115
  },
116
116
  "sideEffects": false,
117
117
  "webOptimizer": {