website-utilities 1.0.344 → 1.0.346

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.
Files changed (4) hide show
  1. package/index.d.ts +80 -115
  2. package/index.js +1 -1
  3. package/package.json +55 -49
  4. package/type.d.ts +1 -1
package/index.d.ts CHANGED
@@ -1,113 +1,102 @@
1
- import Tools from 'clientnode';
2
- import { RecursivePartial, $DomNodes } from 'clientnode/type';
1
+ import { $DomNodes, RecursivePartial, Tools } from 'clientnode';
3
2
  import Internationalisation from 'internationalisation';
4
3
  import { Spinner } from 'spin.js';
5
4
  import { DefaultOptions, Options, TrackingItem } from './type';
6
5
  /**
7
6
  * This plugin holds all needed methods to extend a whole website.
8
- * @property static:_defaultOptions - Options extended by the options given to
9
- * the initializer method.
10
- * @property static:_defaultOptions.activateLanguageSupport - Indicates whether
7
+ * @property _defaultOptions - Options extended by the options given to the
8
+ * initializer method.
9
+ * @property _defaultOptions.activateLanguageSupport - Indicates whether
11
10
  * language support should be used or not.
12
- * @property static:_defaultOptions.additionalPageLoadingTimeInMilliseconds -
11
+ * @property _defaultOptions.additionalPageLoadingTimeInMilliseconds -
13
12
  * Additional time to wait until page will be indicated as loaded.
14
- * @property static:_defaultOptions.domNodes - Mapping of dom node descriptions
15
- * to their corresponding selectors.
16
- * @property static:_defaultOptions.domNodes.mediaQueryIndicator - Selector for
13
+ * @property _defaultOptions.domNodes - Mapping of dom node descriptions to
14
+ * their corresponding selectors.
15
+ * @property _defaultOptions.domNodes.mediaQueryIndicator - Selector for
17
16
  * indicator dom node to use to trigger current media query mode.
18
- * @property static:_defaultOptions.domNodes.top - Selector to indicate that
19
- * viewport is currently on top.
20
- * @property static:_defaultOptions.domNodes.scrollToTopButton - Selector for
17
+ * @property _defaultOptions.domNodes.top - Selector to indicate that viewport
18
+ * is currently on top.
19
+ * @property _defaultOptions.domNodes.scrollToTopButton - Selector for
21
20
  * starting an animated scroll to top.
22
- * @property static:_defaultOptions.domNodes.startUpAnimationClassPrefix -
23
- * Class name selector prefix for all dom nodes to appear during start up
24
- * animations.
25
- * @property static:_defaultOptions.domNodes.windowLoadingCover - Selector to
26
- * the full window loading cover dom node.
27
- * @property static:_defaultOptions.domNodes.windowLoadingSpinner - Selector to
28
- * the window loading spinner (on top of the window loading cover).
29
- * @property static:_defaultOptions.domNodeSelectorInfix - Selector infix for
30
- * all nodes to take into account.
31
- * @property static:_defaultOptions.domNodeSelectorPrefix - Selector prefix for
32
- * all nodes to take into account.
33
- * @property static:_defaultOptions.initialSectionName - Pre-selected section
34
- * name.
35
- * @property static:_defaultOptions.knownScrollEventNames - Saves all known
36
- * scroll events in a space separated string.
37
- * @property static:_defaultOptions.language - Options for client side
21
+ * @property _defaultOptions.domNodes.startUpAnimationClassPrefix - Class name
22
+ * selector prefix for all dom nodes to appear during start up animations.
23
+ * @property _defaultOptions.domNodes.windowLoadingCover - Selector to the full
24
+ * window loading cover dom node.
25
+ * @property _defaultOptions.domNodes.windowLoadingSpinner - Selector to the
26
+ * window loading spinner (on top of the window loading cover).
27
+ * @property _defaultOptions.domNodeSelectorInfix - Selector infix for all
28
+ * nodes to take into account.
29
+ * @property _defaultOptions.domNodeSelectorPrefix - Selector prefix for all
30
+ * nodes to take into account.
31
+ * @property _defaultOptions.initialSectionName - Pre-selected section name.
32
+ * @property _defaultOptions.knownScrollEventNames - Saves all known scroll
33
+ * events in a space separated string.
34
+ * @property _defaultOptions.language - Options for client side
38
35
  * internationalisation handler.
39
- * @property static:_defaultOptions.mediaQueryClassNameIndicator - Mapping of
40
- * media query class indicator names to internal event names.
41
- * @property static:_defaultOptions.onChangeMediaQueryMode - Callback to
42
- * trigger if media query mode changes.
43
- * @property static:_defaultOptions.onChangeToExtraSmallMode - Callback to
44
- * trigger if media query mode changes to extra small mode.
45
- * @property static:_defaultOptions.onChangeToLargeMode - Callback to trigger
46
- * if media query mode changes to large mode.
47
- * @property static:_defaultOptions.onChangeToMediumMode - Callback to trigger
48
- * if media query mode changes to medium mode.
49
- * @property static:_defaultOptions.onChangeToSmallMode - Callback to trigger
50
- * if media query mode changes to small mode.
51
- * @property static:_defaultOptions.onStartUpAnimationComplete - Callback to
52
- * trigger if all start up animations has finished.
53
- * @property static:_defaultOptions.onSwitchSection - Callback to trigger if
54
- * current section switches.
55
- * @property static:_defaultOptions.onViewportMovesAwayFromTop - Callback to
56
- * trigger when viewport moves away from top.
57
- * @property static:_defaultOptions.onViewportMovesToTop - Callback to trigger
58
- * when viewport arrives at top.
59
- * @property static:_defaultOptions.scrollToTop - Options for automated scroll
60
- * top animation.
61
- * @property static:_defaultOptions.scrollToTop.button - To top scroll button
62
- * behavior configuration.
63
- * @property static:_defaultOptions.scrollToTop.button.hideAnimationOptions -
36
+ * @property _defaultOptions.mediaQueryClassNameIndicator - Mapping of media
37
+ * query class indicator names to internal event names.
38
+ * @property _defaultOptions.onChangeMediaQueryMode - Callback to trigger if
39
+ * media query mode changes.
40
+ * @property _defaultOptions.onChangeToExtraSmallMode - Callback to trigger if
41
+ * media query mode changes to extra small mode.
42
+ * @property _defaultOptions.onChangeToLargeMode - Callback to trigger if media
43
+ * query mode changes to large mode.
44
+ * @property _defaultOptions.onChangeToMediumMode - Callback to trigger if
45
+ * media query mode changes to medium mode.
46
+ * @property _defaultOptions.onChangeToSmallMode - Callback to trigger if media
47
+ * query mode changes to small mode.
48
+ * @property _defaultOptions.onStartUpAnimationComplete - Callback to trigger
49
+ * if all start up animations has finished.
50
+ * @property _defaultOptions.onSwitchSection - Callback to trigger if current
51
+ * section switches.
52
+ * @property _defaultOptions.onViewportMovesAwayFromTop - Callback to trigger
53
+ * when viewport moves away from top.
54
+ * @property _defaultOptions.onViewportMovesToTop - Callback to trigger when
55
+ * viewport arrives at top.
56
+ * @property _defaultOptions.scrollToTop - Options for automated scroll top
57
+ * animation.
58
+ * @property _defaultOptions.scrollToTop.button - To top scroll button behavior
59
+ * configuration.
60
+ * @property _defaultOptions.scrollToTop.button.hideAnimationOptions -
64
61
  * Configures hide animation.
65
- * @property static:_defaultOptions.scrollToTop.button.showAnimationOptions -
62
+ * @property _defaultOptions.scrollToTop.button.showAnimationOptions -
66
63
  * Configures show animation.
67
- * @property static:_defaultOptions.scrollToTop.options - Scrolling animation
68
- * options.
69
- * @property static:_defaultOptions.startUpAnimationElementDelayInMiliseconds -
70
- * Delay between two startup animated dom nodes in order.
71
- * @property static:_defaultOptions.startUpHide - Options for initially hiding
72
- * dom nodes showing on startup later.
73
- * @property static:_defaultOptions.startUpShowAnimation - Options for startup
74
- * show in animation.
75
- * @property static:_defaultOptions.switchToManualScrollingIndicator -
76
- * Indicator function to stop currently running scroll animations to let the
77
- * user get control of current scrolling behavior. Given callback gets an event
78
- * object. If the function returns "true" current animated scrolls will be
79
- * stopped.
80
- * @property static:_defaultOptions.tracking - Tracking configuration to
81
- * collect user's behavior data.
82
- * @property static:_defaultOptions.tracking.buttonClick - Function to call on
83
- * button click events.
84
- * @property static:_defaultOptions.tracking.linkClick - Function to call on
85
- * link click events.
86
- * @property static:_defaultOptions.tracking.sectionSwitch - Function to call
87
- * on section switches.
88
- * @property static:_defaultOptions.tracking.track - Tracker call itself.
89
- * @property static:_defaultOptions.windowLoadingCoverHideAnimation - Options
90
- * for startup loading cover hide animation.
91
- * @property static:_defaultOptions.windowLoadingSpinner - Options for the
92
- * window loading cover spinner.
93
- * @property static:_defaultOptions.windowLoadedTimeoutAfterDocLoadedInMSec -
94
- * Duration after loading cover should be removed.
95
- *
64
+ * @property _defaultOptions.scrollToTop.options - Scrolling animation options.
65
+ * @property _defaultOptions.startUpAnimationElementDelayInMiliseconds - Delay
66
+ * between two startup animated dom nodes in order.
67
+ * @property _defaultOptions.startUpHide - Options for initially hiding dom
68
+ * nodes showing on startup later.
69
+ * @property _defaultOptions.startUpShowAnimation - Options for startup show in
70
+ * animation.
71
+ * @property _defaultOptions.switchToManualScrollingIndicator - Indicator
72
+ * function to stop currently running scroll animations to let the user get
73
+ * control of current scrolling behavior. Given callback gets an event object.
74
+ * If the function returns "true" current animated scrolls will be stopped.
75
+ * @property _defaultOptions.tracking - Tracking configuration to collect
76
+ * user's behavior data.
77
+ * @property _defaultOptions.tracking.buttonClick - Function to call on button
78
+ * click events.
79
+ * @property _defaultOptions.tracking.linkClick - Function to call on link
80
+ * click events.
81
+ * @property _defaultOptions.tracking.sectionSwitch - Function to call on
82
+ * section switches.
83
+ * @property _defaultOptions.tracking.track - Tracker call itself.
84
+ * @property _defaultOptions.windowLoadingCoverHideAnimation - Options for
85
+ * startup loading cover hide animation.
86
+ * @property _defaultOptions.windowLoadingSpinner - Options for the window
87
+ * loading cover spinner.
88
+ * @property _defaultOptions.windowLoadedTimeoutAfterDocLoadedInMSec - Duration
89
+ * after loading cover should be removed.
96
90
  * @property options - Finally configured given options.
97
- *
98
91
  * @property $domNodes - Saves a set of references to all needed dom nodes.
99
- *
100
92
  * @property currentMediaQueryMode - Saves current media query status depending
101
93
  * on available space in current browser window.
102
94
  * @property currentSectionName - Saves current section hash name.
103
- *
104
95
  * @property languageHandler - Reference to the language switcher instance.
105
- *
106
96
  * @property startUpAnimationIsComplete - Indicates whether start up animations
107
97
  * has finished.
108
98
  * @property viewportIsOnTop - Indicates whether current viewport is on top.
109
99
  * @property windowLoaded - Indicates whether window is already loaded.
110
- *
111
100
  * @property windowLoadingSpinner - The window loading spinner instance.
112
101
  */
113
102
  export declare class WebsiteUtilities extends Tools {
@@ -124,7 +113,6 @@ export declare class WebsiteUtilities extends Tools {
124
113
  /**
125
114
  * Initializes the interactive web application.
126
115
  * @param options - An options object.
127
- *
128
116
  * @returns Returns a promise containing the current instance.
129
117
  */
130
118
  initialize<R = Promise<WebsiteUtilities>>(options?: RecursivePartial<Options>): R;
@@ -147,7 +135,6 @@ export declare class WebsiteUtilities extends Tools {
147
135
  * Triggers an analytics event. All given arguments are forwarded to
148
136
  * configured analytics event code to defined their environment variables.
149
137
  * @param properties - Event tracking informations.
150
- *
151
138
  * @returns Returns the current instance.
152
139
  */
153
140
  track(properties: Omit<TrackingItem, 'context' | 'value'> & {
@@ -158,42 +145,34 @@ export declare class WebsiteUtilities extends Tools {
158
145
  * This method triggers if the viewport moves to top.
159
146
  * @returns Nothing.
160
147
  */
161
- _onViewportMovesToTop: (...parameters: unknown[]) => Promise<unknown>;
148
+ _onViewportMovesToTop: (...parameters: Array<unknown>) => Promise<unknown>;
162
149
  /**
163
150
  * This method triggers if the viewport moves away from top.
164
151
  * @returns Nothing.
165
152
  */
166
- _onViewportMovesAwayFromTop: (...parameters: unknown[]) => Promise<unknown>;
153
+ _onViewportMovesAwayFromTop: (...parameters: Array<unknown>) => Promise<unknown>;
167
154
  /**
168
155
  * This method triggers if the responsive design switches to another mode.
169
156
  * @param _oldMode - Saves the previous mode.
170
157
  * @param _newMode - Saves the new mode.
171
- *
172
- * @returns Nothing.
173
158
  */
174
159
  _onChangeMediaQueryMode(_oldMode: string, _newMode: string): void;
175
160
  /**
176
161
  * This method triggers if the responsive design switches to large mode.
177
162
  * @param _oldMode - Saves the previous mode.
178
163
  * @param _newMode - Saves the new mode.
179
- *
180
- * @returns Nothing.
181
164
  */
182
165
  _onChangeToLargeMode(_oldMode: string, _newMode: string): void;
183
166
  /**
184
167
  * This method triggers if the responsive design switches to medium mode.
185
168
  * @param _oldMode - Saves the previous mode.
186
169
  * @param _newMode - Saves the new mode.
187
- *
188
- * @returns Nothing.
189
170
  */
190
171
  _onChangeToMediumMode(_oldMode: string, _newMode: string): void;
191
172
  /**
192
173
  * This method triggers if the responsive design switches to small mode.
193
174
  * @param _oldMode - Saves the previous mode.
194
175
  * @param _newMode - Saves the new mode.
195
- *
196
- * @returns Nothing.
197
176
  */
198
177
  _onChangeToSmallMode(_oldMode: string, _newMode: string): void;
199
178
  /**
@@ -201,41 +180,31 @@ export declare class WebsiteUtilities extends Tools {
201
180
  * mode.
202
181
  * @param _oldMode - Saves the previous mode.
203
182
  * @param _newMode - Saves the new mode.
204
- *
205
- * @returns Nothing.
206
183
  */
207
184
  _onChangeToExtraSmallMode(_oldMode: string, _newMode: string): void;
208
185
  /**
209
186
  * This method triggers if we change the current section.
210
187
  * @param sectionName - Contains the new section name.
211
- *
212
- * @returns Nothing.
213
188
  */
214
189
  _onSwitchSection(sectionName: string): void;
215
190
  /**
216
191
  * This method is complete if last startup animation was initialized.
217
- * @returns Nothing.
218
192
  */
219
193
  _onStartUpAnimationComplete(): void;
220
194
  /**
221
195
  * This method adds triggers for responsive design switches.
222
- * @returns Nothing.
223
196
  */
224
197
  _bindMediaQueryChangeEvents(): void;
225
198
  /**
226
199
  * This method triggers if the responsive design switches its mode.
227
200
  * @param parameters - All arguments will be appended to the event handler
228
201
  * callbacks.
229
- *
230
- * @returns Nothing.
231
202
  */
232
203
  _triggerWindowResizeEvents(...parameters: Array<unknown>): void;
233
204
  /**
234
205
  * This method triggers if view port arrives at special areas.
235
206
  * @param parameters - All arguments will be appended to the event handler
236
207
  * callbacks.
237
- *
238
- * @returns Nothing.
239
208
  */
240
209
  _bindScrollEvents(...parameters: Array<unknown>): void;
241
210
  /**
@@ -246,25 +215,21 @@ export declare class WebsiteUtilities extends Tools {
246
215
  _removeLoadingCover(): Promise<void>;
247
216
  /**
248
217
  * This method handles the given start up effect step.
249
- * @param elementNumber - The current start up step.
250
- *
218
+ * @param elementNumber - The current startup step.
251
219
  * @returns Promise resolving to nothing when start up effects have been
252
220
  * finished.
253
221
  */
254
222
  _performStartUpEffects(elementNumber?: number): Promise<void>;
255
223
  /**
256
224
  * This method adds triggers to switch section.
257
- * @returns Nothing.
258
225
  */
259
226
  _bindNavigationEvents(): void;
260
227
  /**
261
228
  * Adds trigger to scroll top buttons.
262
- * @returns Nothing.
263
229
  */
264
230
  _bindScrollToTopButton(): void;
265
231
  /**
266
232
  * Executes the page tracking code.
267
- * @returns Nothing.
268
233
  */
269
234
  _bindClickTracking(): void;
270
235
  }
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(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"],t);else{var n="object"==typeof exports?t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/regenerator"),require("clientnode")):t(e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/regenerator"],e.clientnode);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,(function(e,t,n,o,i){return function(){var r=[,,,function(t){t.exports=e},function(e){e.exports=t},function(e){e.exports=n},function(e){e.exports=o},function(e){e.exports=i}],a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return function(){s.r(l),s.d(l,{WebsiteUtilities:function(){return T},default:function(){return x}});var e=s(3),t=s.n(e),n=s(4),o=s.n(n),i=s(5),r=s.n(i),a=s(6),d=s.n(a),c=s(7),u=s.n(c),p=function(){return p=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p.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 e(e){void 0===e&&(e={}),this.opts=p(p({},h),e)}return e.prototype.spin=function(e){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+")"}),e&&e.insertBefore(this.el,e.firstChild||null),function(e,t){var n=Math.round(t.corners*t.width*500)/1e3+"px",o="none";!0===t.shadow?o="0 2px 4px #000":"string"==typeof t.shadow&&(o=t.shadow);for(var i=function(e){for(var t=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],o=0,i=e.split(",");o<i.length;o++){var r=i[o].match(t);if(null!==r){var a=+r[2],s=+r[5],l=r[4],d=r[7];0!==a||l||(l=d),0!==s||d||(d=l),l===d&&n.push({prefix:r[1]||"",x:a,y:s,xUnits:l,yUnits:d,end:r[8]})}}return n}(o),r=0;r<t.lines;r++){var a=~~(360/t.lines*r+t.rotate),s=f(document.createElement("div"),{position:"absolute",top:-t.width/2+"px",width:t.length+t.width+"px",height:t.width+"px",background:g(t.fadeColor,r),borderRadius:n,transformOrigin:"left",transform:"rotate("+a+"deg) translateX("+t.radius+"px)"}),l=r*t.direction/t.lines/t.speed;l-=1/t.speed;var d=f(document.createElement("div"),{width:"100%",height:"100%",background:g(t.color,r),borderRadius:n,boxShadow:w(i,a),animation:1/t.speed+"s linear "+l+"s infinite "+t.animation});s.appendChild(d),e.appendChild(s)}}(this.el,this.opts),this},e.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},e}();function f(e,t){for(var n in t)e.style[n]=t[n];return e}function g(e,t){return"string"==typeof e?e:e[t%e.length]}function w(e,t){for(var n=[],o=0,i=e;o<i.length;o++){var r=i[o],a=v(r.x,r.y,t);n.push(r.prefix+a[0]+r.xUnits+" "+a[1]+r.yUnits+r.end)}return n.join(", ")}function v(e,t,n){var o=n*Math.PI/180,i=Math.sin(o),r=Math.cos(o);return[Math.round(1e3*(e*r+t*i))/1e3,Math.round(1e3*(-e*i+t*r))/1e3]}function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var T=function(e){function n(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(t=e.call.apply(e,[this].concat(o))||this).options=null,t.$domNodes=null,t.currentMediaQueryMode="",t.currentSectionName="home",t.languageHandler=null,t.startUpAnimationIsComplete=!1,t.viewportIsOnTop=!1,t.windowLoaded=!1,t.windowLoadingSpinner=null,t._onViewportMovesToTop=u().debounce((function(){"hidden"===t.$domNodes.scrollToTopButton.css("visibility")?t.$domNodes.scrollToTopButton.css("opacity",0):(t.options.scrollToTop.button.hideAnimationOptions.always=function(){return t.$domNodes.scrollToTopButton.css({bottom:"-="+t.options.scrollToTop.button.slideDistanceInPixel,display:"none"})},t.$domNodes.scrollToTopButton.finish().animate({bottom:"+="+String(t.options.scrollToTop.button.slideDistanceInPixel),opacity:0},t.options.scrollToTop.button.hideAnimationOptions))})),t._onViewportMovesAwayFromTop=u().debounce((function(){"hidden"===t.$domNodes.scrollToTopButton.css("visibility")?t.$domNodes.scrollToTopButton.css("opacity",1):t.$domNodes.scrollToTopButton.finish().css({bottom:"+="+String(t.options.scrollToTop.button.slideDistanceInPixel),display:"block",opacity:0}).animate({bottom:"-="+String(t.options.scrollToTop.button.slideDistanceInPixel),queue:!1,opacity:1},t.options.scrollToTop.button.showAnimationOptions)})),t}r()(n,e);var i=n.prototype;return i.initialize=function(t){var o=this;return void 0===t&&(t={}),e.prototype.initialize.call(this,u().extend(!0,{},n._defaultOptions,t)),this.$domNodes=this.grabDomNodes(this.options.domNodes),this.disableScrolling(),new Promise((function(e){o.$domNodes.windowLoadingSpinner.length&&(o.windowLoadingSpinner=new m(o.options.windowLoadingSpinner),o.windowLoadingSpinner.spin(o.$domNodes.windowLoadingSpinner[0])),o._bindScrollEvents(),o.$domNodes.parent.show();var t=function(){o.windowLoaded||(o.windowLoaded=!0,o._removeLoadingCover().then((function(){o._performStartUpEffects(),e(o)})))};(0,c.$)((function(){u().timeout(t,o.options.windowLoadedTimeoutAfterDocLoadedInMSec)})),o.on(o.$domNodes.window,"load",t),o._bindClickTracking(),o.options.language.logging||(o.options.language.logging=o.options.logging),o.options.activateLanguageSupport&&!o.languageHandler&&(0,c.$)(o.$domNodes.parent).Internationalisation(o.options.language).then((function(e){o.languageHandler=e.data("Internationalisation")})),o._bindNavigationEvents(),o._bindMediaQueryChangeEvents(),o._triggerWindowResizeEvents()}))},i.scrollToTop=function(){return c.globalContext.document&&(0,c.$)("html, body").stop().animate({scrollTop:0},this.options.scrollToTop.options),this},i.disableScrolling=function(){return this.$domNodes.parent.addClass("disable-scrolling").on("touchmove",(function(e){return e.preventDefault()})),this},i.enableScrolling=function(){return this.$domNodes.parent.removeClass(["disable-scrolling","touchmove"]),this.off(this.$domNodes.parent),this},i.track=function(e){if(c.globalContext.window.location&&this.options.tracking){var t=o()({context:c.globalContext.window.location.pathname+"#"+this.currentSectionName},e);(isNaN(t.value)||"number"!=typeof t.value)&&(t.value=1),this.debug('Run tracking code: "event" with arguments:'),this.debug(t);try{this.options.tracking.track(t)}catch(e){this.warn('Problem in tracking "'+u().represent(t)+'": '+u().represent(e))}}return this},i._onChangeMediaQueryMode=function(e,t){},i._onChangeToLargeMode=function(e,t){},i._onChangeToMediumMode=function(e,t){},i._onChangeToSmallMode=function(e,t){},i._onChangeToExtraSmallMode=function(e,t){},i._onSwitchSection=function(e){var t;if(c.globalContext.window.location&&null!=(t=this.options.tracking)&&t.sectionSwitch&&this.currentSectionName!==e){this.currentSectionName=e,this.debug('Run section switch tracking on section "'+this.currentSectionName+'".');try{this.options.tracking.sectionSwitch.call(this,this.currentSectionName)}catch(e){this.warn('Problem due to track section switch to "'+this.currentSectionName+'": '+u().represent(e))}}},i._onStartUpAnimationComplete=function(){this.startUpAnimationIsComplete=!0},i._bindMediaQueryChangeEvents=function(){this.on(this.$domNodes.window,"resize",this._triggerWindowResizeEvents.bind(this))},i._triggerWindowResizeEvents=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var o,i=b(this.options.mediaQueryClassNameIndicator);!(o=i()).done;){var r=o.value;this.$domNodes.mediaQueryIndicator.prependTo(this.$domNodes.parent).addClass("hidden-"+r[1]),this.$domNodes.mediaQueryIndicator.is(":hidden")&&r[0]!==this.currentMediaQueryMode&&(this.fireEvent.apply(this,["changeMediaQueryMode",!1,this,this.currentMediaQueryMode,r[0]].concat(t)),this.fireEvent.apply(this,["changeTo"+u().stringCapitalize(r[0])+"Mode",!1,this,this.currentMediaQueryMode,r[0]].concat(t)),this.currentMediaQueryMode=r[0]),this.$domNodes.mediaQueryIndicator.removeClass("hidden-"+r[1])}},i._bindScrollEvents=function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var i=(0,c.$)("body, html").add(this.$domNodes.window);i.on(this.options.knownScrollEventNames.join(" "),(function(t){e.options.switchToManualScrollingIndicator(t)&&i.stop(!0)})),this.on(this.$domNodes.window,"scroll",(function(){e.$domNodes.window.scrollTop()?e.viewportIsOnTop&&(e.viewportIsOnTop=!1,e.fireEvent.apply(e,["viewportMovesAwayFromTop",!1,e].concat(n))):e.viewportIsOnTop||(e.viewportIsOnTop=!0,e.fireEvent.apply(e,["viewportMovesToTop",!1,e].concat(n)))})),this.$domNodes.window.scrollTop()?(this.viewportIsOnTop=!1,this.fireEvent.apply(this,["viewportMovesAwayFromTop",!1,this].concat(n))):(this.viewportIsOnTop=!0,this.fireEvent.apply(this,["viewportMovesToTop",!1,this].concat(n)))},i._removeLoadingCover=function(){var e=t()(d().mark((function e(){var t=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u().timeout(this.options.additionalPageLoadingTimeInMilliseconds);case 2:return(0,c.$)(u().stringFormat('[class^="{1}"], [class*=" {1}"]',this.sliceDomNodeSelectorPrefix(this.options.domNodes.startUpAnimationClassPrefix).substr(1))).css(this.options.startUpHide),e.next=5,new Promise((function(e){t.$domNodes.windowLoadingCover.length?(t.enableScrolling(),t.$domNodes.windowLoadingCover.animate(t.options.windowLoadingCoverHideAnimation,{always:function(){return e()}})):e()}));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),i._performStartUpEffects=function(){var e=t()(d().mark((function e(t){var n,o=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t=1),this.$domNodes.windowLoadingCover.hide(),this.windowLoadingSpinner&&this.windowLoadingSpinner.stop(),!(0,c.$)(u().stringFormat('[class^="{1}"], [class*=" {1}"]',this.sliceDomNodeSelectorPrefix(this.options.domNodes.startUpAnimationClassPrefix).substr(1))).length){e.next=17;break}return e.next=6,u().timeout(this.options.startUpAnimationElementDelayInMiliseconds);case 6:if(n=!1,(0,c.$)(this.options.domNodes.startUpAnimationClassPrefix+""+t).animate(this.options.startUpShowAnimation,{always:function(){n&&o.fireEvent("startUpAnimationComplete")}}),!(0,c.$)(this.options.domNodes.startUpAnimationClassPrefix+""+(t+1)).length){e.next=14;break}return e.next=12,this._performStartUpEffects(t+1);case 12:e.next=15;break;case 14:n=!0;case 15:e.next=18;break;case 17:this.fireEvent("startUpAnimationComplete");case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),i._bindNavigationEvents=function(){var e=this;c.globalContext.window.addEventListener("hashchange",(function(t){e.startUpAnimationIsComplete&&e.fireEvent("switchSection",!1,e,location.hash.substring(1),t)}),!1),this._bindScrollToTopButton()},i._bindScrollToTopButton=function(){var e=this;this.on(this.$domNodes.scrollToTopButton,"click",(function(t){t.preventDefault(),e.scrollToTop()}))},i._bindClickTracking=function(){var e=this;this.options.tracking&&(this.options.tracking.linkClick&&this.on(this.$domNodes.parent.find("a"),"click",(function(t){return e.options.tracking.linkClick.call(e,(0,c.$)(t.target),t)})),this.options.tracking.buttonClick&&this.on(this.$domNodes.parent.find("button"),"click",(function(t){return e.options.tracking.buttonClick.call(e,(0,c.$)(t.target),t)})))},n}(u());T._defaultOptions={activateLanguageSupport:!0,additionalPageLoadingTimeInMilliseconds:0,domain:"auto",domNodes:{mediaQueryIndicator:'<div class="wu-media-query-indicator">',scrollToTopButton:'a[href="#top"]',startUpAnimationClassPrefix:".wu-start-up-animation-number-",top:"header",windowLoadingCover:".window-loading-cover, .wu-window-loading-cover",windowLoadingSpinner:".window-loading-cover > div, .wu-window-loading-cover > div"},domNodeSelectorInfix:"wu",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:u().noop,onChangeToExtraSmallMode:u().noop,onChangeToLargeMode:u().noop,onChangeToMediumMode:u().noop,onChangeToSmallMode:u().noop,onViewportMovesAwayFromTop:u().noop,onViewportMovesToTop:u().noop,onSwitchSection:u().noop,onStartUpAnimationComplete:u().noop,scrollToTop:{button:{hideAnimationOptions:{},showAnimationOptions:{},slideDistanceInPixel:30},options:{duration:"fast"}},startUpAnimationElementDelayInMiliseconds:100,startUpHide:{opacity:0},startUpShowAnimation:{opacity:1},switchToManualScrollingIndicator:function(e){return"number"==typeof e.which&&e.which>0||"mousedown"===e.type||"mousewheel"===e.type||"touchmove"===e.type},tracking:{buttonClick:function(e,t){this.track({event:"buttonClick",eventType:"click",label:e.text(),reference:e.attr("action")||e.attr("target")||e.attr("type")||e.text(),subject:"button",value:parseInt(e.attr("website-analytics-value")),userInteraction:!0})},linkClick:function(e,t){this.track({event:"linkClick",eventType:"click",label:e.text(),reference:e.attr("href")||e.attr("action")||e.attr("target")||e.attr("type")||e.text(),subject:"link",value:parseInt(e.attr("website-analytics-value")),userInteraction:!0})},sectionSwitch:function(e){this.track({event:"sectionSwitch",eventType:"sectionSwitch",label:e,reference:c.globalContext.window.location.pathname+"#"+e,subject:"url",userInteraction:!1})},track:function(e){var t;null==(t=c.globalContext.dataLayer)||t.push(e)}},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},windowLoadedTimeoutAfterDocLoadedInMSec:2e3};var x=T;c.$.WebsiteUtilities=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u().controller(T,t)},c.$.WebsiteUtilities.class=T}(),l}()}));
1
+ "use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(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"],t);else{var n="object"==typeof exports?t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/regenerator"),require("clientnode")):t(e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/regenerator"],e.clientnode);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,(function(e,t,n,o,i){return function(){var r=[,,,function(t){t.exports=e},function(e){e.exports=t},function(e){e.exports=n},function(e){e.exports=o},function(e){e.exports=i}],a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return function(){s.r(l),s.d(l,{WebsiteUtilities:function(){return y},default:function(){return T}});var e=s(3),t=s.n(e),n=s(4),o=s.n(n),i=s(5),r=s.n(i),a=s(6),d=s.n(a),c=s(7),u=function(){return u=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)},p={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"},h=function(){function e(e){void 0===e&&(e={}),this.opts=u(u({},p),e)}return e.prototype.spin=function(e){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),m(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+")"}),e&&e.insertBefore(this.el,e.firstChild||null),function(e,t){var n=Math.round(t.corners*t.width*500)/1e3+"px",o="none";!0===t.shadow?o="0 2px 4px #000":"string"==typeof t.shadow&&(o=t.shadow);for(var i=function(e){for(var t=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],o=0,i=e.split(",");o<i.length;o++){var r=i[o].match(t);if(null!==r){var a=+r[2],s=+r[5],l=r[4],d=r[7];0!==a||l||(l=d),0!==s||d||(d=l),l===d&&n.push({prefix:r[1]||"",x:a,y:s,xUnits:l,yUnits:d,end:r[8]})}}return n}(o),r=0;r<t.lines;r++){var a=~~(360/t.lines*r+t.rotate),s=m(document.createElement("div"),{position:"absolute",top:-t.width/2+"px",width:t.length+t.width+"px",height:t.width+"px",background:f(t.fadeColor,r),borderRadius:n,transformOrigin:"left",transform:"rotate("+a+"deg) translateX("+t.radius+"px)"}),l=r*t.direction/t.lines/t.speed;l-=1/t.speed;var d=m(document.createElement("div"),{width:"100%",height:"100%",background:f(t.color,r),borderRadius:n,boxShadow:g(i,a),animation:1/t.speed+"s linear "+l+"s infinite "+t.animation});s.appendChild(d),e.appendChild(s)}}(this.el,this.opts),this},e.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},e}();function m(e,t){for(var n in t)e.style[n]=t[n];return e}function f(e,t){return"string"==typeof e?e:e[t%e.length]}function g(e,t){for(var n=[],o=0,i=e;o<i.length;o++){var r=i[o],a=w(r.x,r.y,t);n.push(r.prefix+a[0]+r.xUnits+" "+a[1]+r.yUnits+r.end)}return n.join(", ")}function w(e,t,n){var o=n*Math.PI/180,i=Math.sin(o),r=Math.cos(o);return[Math.round(1e3*(e*r+t*i))/1e3,Math.round(1e3*(-e*i+t*r))/1e3]}function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return b(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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 b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var y=function(e){function n(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(t=e.call.apply(e,[this].concat(o))||this).options=null,t.$domNodes=null,t.currentMediaQueryMode="",t.currentSectionName="home",t.languageHandler=null,t.startUpAnimationIsComplete=!1,t.viewportIsOnTop=!1,t.windowLoaded=!1,t.windowLoadingSpinner=null,t._onViewportMovesToTop=(0,c.debounce)((function(){"hidden"===t.$domNodes.scrollToTopButton.css("visibility")?t.$domNodes.scrollToTopButton.css("opacity",0):(t.options.scrollToTop.button.hideAnimationOptions.always=function(){return t.$domNodes.scrollToTopButton.css({bottom:"-="+t.options.scrollToTop.button.slideDistanceInPixel,display:"none"})},t.$domNodes.scrollToTopButton.finish().animate({bottom:"+="+String(t.options.scrollToTop.button.slideDistanceInPixel),opacity:0},t.options.scrollToTop.button.hideAnimationOptions))})),t._onViewportMovesAwayFromTop=(0,c.debounce)((function(){"hidden"===t.$domNodes.scrollToTopButton.css("visibility")?t.$domNodes.scrollToTopButton.css("opacity",1):t.$domNodes.scrollToTopButton.finish().css({bottom:"+="+String(t.options.scrollToTop.button.slideDistanceInPixel),display:"block",opacity:0}).animate({bottom:"-="+String(t.options.scrollToTop.button.slideDistanceInPixel),queue:!1,opacity:1},t.options.scrollToTop.button.showAnimationOptions)})),t}r()(n,e);var i=n.prototype;return i.initialize=function(t){var o=this;return void 0===t&&(t={}),e.prototype.initialize.call(this,(0,c.extend)(!0,{},n._defaultOptions,t)),this.$domNodes=this.grabDomNodes(this.options.domNodes),this.disableScrolling(),new Promise((function(e){o.$domNodes.windowLoadingSpinner.length&&(o.windowLoadingSpinner=new h(o.options.windowLoadingSpinner),o.windowLoadingSpinner.spin(o.$domNodes.windowLoadingSpinner[0])),o._bindScrollEvents(),o.$domNodes.parent.show();var t=function(){o.windowLoaded||(o.windowLoaded=!0,o._removeLoadingCover().then((function(){o._performStartUpEffects(),e(o)})))};(0,c.$)((function(){(0,c.timeout)(t,o.options.windowLoadedTimeoutAfterDocLoadedInMSec)})),o.on(o.$domNodes.window,"load",t),o._bindClickTracking(),o.options.language.logging||(o.options.language.logging=o.options.logging),o.options.activateLanguageSupport&&!o.languageHandler&&(0,c.$)(o.$domNodes.parent).Internationalisation(o.options.language).then((function(e){o.languageHandler=e.data("Internationalisation")})),o._bindNavigationEvents(),o._bindMediaQueryChangeEvents(),o._triggerWindowResizeEvents()}))},i.scrollToTop=function(){return c.globalContext.document&&(0,c.$)("html, body").stop().animate({scrollTop:0},this.options.scrollToTop.options),this},i.disableScrolling=function(){return this.$domNodes.parent.addClass("disable-scrolling").on("touchmove",(function(e){return e.preventDefault()})),this},i.enableScrolling=function(){return this.$domNodes.parent.removeClass(["disable-scrolling","touchmove"]),this.off(this.$domNodes.parent),this},i.track=function(e){if(c.globalContext.window.location&&this.options.tracking){var t=o()({context:c.globalContext.window.location.pathname+"#"+this.currentSectionName},e);(isNaN(t.value)||"number"!=typeof t.value)&&(t.value=1),this.debug('Run tracking code: "event" with arguments:'),this.debug(t);try{this.options.tracking.track(t)}catch(e){this.warn('Problem in tracking "'+(0,c.represent)(t)+'": '+(0,c.represent)(e))}}return this},i._onChangeMediaQueryMode=function(e,t){},i._onChangeToLargeMode=function(e,t){},i._onChangeToMediumMode=function(e,t){},i._onChangeToSmallMode=function(e,t){},i._onChangeToExtraSmallMode=function(e,t){},i._onSwitchSection=function(e){var t;if(c.globalContext.window.location&&null!=(t=this.options.tracking)&&t.sectionSwitch&&this.currentSectionName!==e){this.currentSectionName=e,this.debug('Run section switch tracking on section "'+this.currentSectionName+'".');try{this.options.tracking.sectionSwitch.call(this,this.currentSectionName)}catch(e){this.warn('Problem due to track section switch to "'+this.currentSectionName+'": '+(0,c.represent)(e))}}},i._onStartUpAnimationComplete=function(){this.startUpAnimationIsComplete=!0},i._bindMediaQueryChangeEvents=function(){this.on(this.$domNodes.window,"resize",this._triggerWindowResizeEvents.bind(this))},i._triggerWindowResizeEvents=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var o,i=v(this.options.mediaQueryClassNameIndicator);!(o=i()).done;){var r=o.value;this.$domNodes.mediaQueryIndicator.prependTo(this.$domNodes.parent).addClass("hidden-"+r[1]),this.$domNodes.mediaQueryIndicator.is(":hidden")&&r[0]!==this.currentMediaQueryMode&&(this.fireEvent.apply(this,["changeMediaQueryMode",!1,this,this.currentMediaQueryMode,r[0]].concat(t)),this.fireEvent.apply(this,["changeTo"+(0,c.capitalize)(r[0])+"Mode",!1,this,this.currentMediaQueryMode,r[0]].concat(t)),this.currentMediaQueryMode=r[0]),this.$domNodes.mediaQueryIndicator.removeClass("hidden-"+r[1])}},i._bindScrollEvents=function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var i=(0,c.$)("body, html").add(this.$domNodes.window);i.on(this.options.knownScrollEventNames.join(" "),(function(t){e.options.switchToManualScrollingIndicator(t)&&i.stop(!0)})),this.on(this.$domNodes.window,"scroll",(function(){e.$domNodes.window.scrollTop()?e.viewportIsOnTop&&(e.viewportIsOnTop=!1,e.fireEvent.apply(e,["viewportMovesAwayFromTop",!1,e].concat(n))):e.viewportIsOnTop||(e.viewportIsOnTop=!0,e.fireEvent.apply(e,["viewportMovesToTop",!1,e].concat(n)))})),this.$domNodes.window.scrollTop()?(this.viewportIsOnTop=!1,this.fireEvent.apply(this,["viewportMovesAwayFromTop",!1,this].concat(n))):(this.viewportIsOnTop=!0,this.fireEvent.apply(this,["viewportMovesToTop",!1,this].concat(n)))},i._removeLoadingCover=function(){var e=t()(d().mark((function e(){var t=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.timeout)(this.options.additionalPageLoadingTimeInMilliseconds);case 2:return(0,c.$)((0,c.format)('[class^="{1}"], [class*=" {1}"]',this.sliceDomNodeSelectorPrefix(this.options.domNodes.startUpAnimationClassPrefix).substr(1))).css(this.options.startUpHide),e.next=5,new Promise((function(e){t.$domNodes.windowLoadingCover.length?(t.enableScrolling(),t.$domNodes.windowLoadingCover.animate(t.options.windowLoadingCoverHideAnimation,{always:function(){return e()}})):e()}));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),i._performStartUpEffects=function(){var e=t()(d().mark((function e(t){var n,o=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t=1),this.$domNodes.windowLoadingCover.hide(),this.windowLoadingSpinner&&this.windowLoadingSpinner.stop(),!(0,c.$)((0,c.format)('[class^="{1}"], [class*=" {1}"]',this.sliceDomNodeSelectorPrefix(this.options.domNodes.startUpAnimationClassPrefix).substr(1))).length){e.next=17;break}return e.next=6,(0,c.timeout)(this.options.startUpAnimationElementDelayInMiliseconds);case 6:if(n=!1,(0,c.$)(this.options.domNodes.startUpAnimationClassPrefix+""+t).animate(this.options.startUpShowAnimation,{always:function(){n&&o.fireEvent("startUpAnimationComplete")}}),!(0,c.$)(this.options.domNodes.startUpAnimationClassPrefix+""+(t+1)).length){e.next=14;break}return e.next=12,this._performStartUpEffects(t+1);case 12:e.next=15;break;case 14:n=!0;case 15:e.next=18;break;case 17:this.fireEvent("startUpAnimationComplete");case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),i._bindNavigationEvents=function(){var e=this;c.globalContext.window.addEventListener("hashchange",(function(t){e.startUpAnimationIsComplete&&e.fireEvent("switchSection",!1,e,location.hash.substring(1),t)}),!1),this._bindScrollToTopButton()},i._bindScrollToTopButton=function(){var e=this;this.on(this.$domNodes.scrollToTopButton,"click",(function(t){t.preventDefault(),e.scrollToTop()}))},i._bindClickTracking=function(){var e=this;this.options.tracking&&(this.options.tracking.linkClick&&this.on(this.$domNodes.parent.find("a"),"click",(function(t){return e.options.tracking.linkClick.call(e,(0,c.$)(t.target),t)})),this.options.tracking.buttonClick&&this.on(this.$domNodes.parent.find("button"),"click",(function(t){return e.options.tracking.buttonClick.call(e,(0,c.$)(t.target),t)})))},n}(c.Tools);y._defaultOptions={activateLanguageSupport:!0,additionalPageLoadingTimeInMilliseconds:0,domain:"auto",domNodes:{mediaQueryIndicator:'<div class="wu-media-query-indicator">',scrollToTopButton:'a[href="#top"]',startUpAnimationClassPrefix:".wu-start-up-animation-number-",top:"header",windowLoadingCover:".window-loading-cover, .wu-window-loading-cover",windowLoadingSpinner:".window-loading-cover > div, .wu-window-loading-cover > div"},domNodeSelectorInfix:"wu",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:c.NOOP,onChangeToExtraSmallMode:c.NOOP,onChangeToLargeMode:c.NOOP,onChangeToMediumMode:c.NOOP,onChangeToSmallMode:c.NOOP,onViewportMovesAwayFromTop:c.NOOP,onViewportMovesToTop:c.NOOP,onSwitchSection:c.NOOP,onStartUpAnimationComplete:c.NOOP,scrollToTop:{button:{hideAnimationOptions:{},showAnimationOptions:{},slideDistanceInPixel:30},options:{duration:"fast"}},startUpAnimationElementDelayInMiliseconds:100,startUpHide:{opacity:0},startUpShowAnimation:{opacity:1},switchToManualScrollingIndicator:function(e){return"number"==typeof e.which&&e.which>0||"mousedown"===e.type||"mousewheel"===e.type||"touchmove"===e.type},tracking:{buttonClick:function(e,t){this.track({event:"buttonClick",eventType:"click",label:e.text(),reference:e.attr("action")||e.attr("target")||e.attr("type")||e.text(),subject:"button",value:parseInt(e.attr("website-analytics-value")),userInteraction:!0})},linkClick:function(e,t){this.track({event:"linkClick",eventType:"click",label:e.text(),reference:e.attr("href")||e.attr("action")||e.attr("target")||e.attr("type")||e.text(),subject:"link",value:parseInt(e.attr("website-analytics-value")),userInteraction:!0})},sectionSwitch:function(e){this.track({event:"sectionSwitch",eventType:"sectionSwitch",label:e,reference:c.globalContext.window.location.pathname+"#"+e,subject:"url",userInteraction:!1})},track:function(e){var t;null==(t=c.globalContext.dataLayer)||t.push(e)}},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},windowLoadedTimeoutAfterDocLoadedInMSec:2e3};var T=y;c.$.WebsiteUtilities=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.Tools.controller(y,t)},c.$.WebsiteUtilities.class=y}(),l}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "website-utilities",
3
- "version": "1.0.344",
3
+ "version": "1.0.346",
4
4
  "description": "extend your web app",
5
5
  "keywords": [
6
6
  "jquery",
@@ -32,9 +32,7 @@
32
32
  "type.d.ts",
33
33
  "_variables.scss"
34
34
  ],
35
- "bin": {
36
- "website-utilities": "deploy.js"
37
- },
35
+ "bin": "deploy.js",
38
36
  "repository": {
39
37
  "type": "git",
40
38
  "url": "https://github.com/thaibault/website-utilities"
@@ -52,7 +50,6 @@
52
50
  "deploy": "./deploy.js",
53
51
  "document": "weboptimizer document",
54
52
  "lint": "weboptimizer lint",
55
- "postversion": "yarn publish --non-interactive; git push --tags && git push",
56
53
  "prepare": "yarn build",
57
54
  "serve": "weboptimizer serve",
58
55
  "start": "yarn serve",
@@ -60,48 +57,50 @@
60
57
  "test:browser": "weboptimizer test:browser",
61
58
  "test:coverage": "weboptimizer test:coverage",
62
59
  "test:coverage:report": "weboptimizer test:coverage:report",
63
- "update": "yarn version --patch",
60
+ "update": "yarn version patch && yarn npm publish",
64
61
  "update:documentation": "documentation-website",
65
62
  "watch": "weboptimizer build --watch"
66
63
  },
67
64
  "devDependencies": {
68
- "@babel/eslint-parser": "*",
69
- "@babel/plugin-transform-proto-to-assign": "*",
70
- "@types/ejs": "*",
71
- "@types/html-minifier": "*",
72
- "@types/jquery": "*",
73
- "@types/jsdom": "*",
74
- "@types/node": "*",
75
- "@typescript-eslint/eslint-plugin": "*",
76
- "@typescript-eslint/parser": "*",
77
- "clientnode": "*",
78
- "css-loader": "*",
79
- "cssnano": "*",
80
- "documentation-website": "*",
81
- "eslint": "*",
82
- "eslint-config-google": "*",
83
- "eslint-plugin-jsdoc": "*",
84
- "internationalisation": "*",
85
- "jest": "*",
86
- "jquery": "*",
87
- "jsdoc": "*",
88
- "mini-css-extract-plugin": "*",
89
- "postcss": "*",
90
- "postcss-fontpath": "*",
91
- "postcss-import": "*",
92
- "postcss-loader": "*",
93
- "postcss-preset-env": "*",
94
- "postcss-scss": "*",
95
- "postcss-sprites": "*",
96
- "postcss-url": "*",
97
- "sass": "*",
98
- "sass-loader": "*",
99
- "spin.js": "*",
100
- "style-loader": "*",
101
- "stylelint": "*",
102
- "stylelint-config-standard-scss": "*",
103
- "weboptimizer": "*",
104
- "webpack-dev-server": "*"
65
+ "@babel/eslint-parser": "^7.24.7",
66
+ "@babel/plugin-transform-proto-to-assign": "^7.24.7",
67
+ "@babel/runtime": "^7.24.7",
68
+ "@types/ejs": "^3.1.5",
69
+ "@types/html-minifier": "^4.0.5",
70
+ "@types/jquery": "^3.5.30",
71
+ "@types/jsdom": "^21.1.7",
72
+ "@types/node": "^20.14.10",
73
+ "@typescript-eslint/eslint-plugin": "^7.16.0",
74
+ "@typescript-eslint/parser": "^7.16.0",
75
+ "clientnode": "^3.0.1155",
76
+ "css-loader": "^7.1.2",
77
+ "cssnano": "^7.0.4",
78
+ "documentation-website": "^1.0.326",
79
+ "eslint": "^9.6.0",
80
+ "eslint-config-google": "^0.14.0",
81
+ "eslint-plugin-jsdoc": "^48.5.2",
82
+ "internationalisation": "^1.0.317",
83
+ "jest": "^29.7.0",
84
+ "jquery": "^3.7.1",
85
+ "jsdoc": "^4.0.3",
86
+ "mini-css-extract-plugin": "^2.9.0",
87
+ "postcss": "^8.4.39",
88
+ "postcss-fontpath": "^1.0.0",
89
+ "postcss-import": "^16.1.0",
90
+ "postcss-loader": "^8.1.1",
91
+ "postcss-preset-env": "^9.6.0",
92
+ "postcss-scss": "^4.0.9",
93
+ "postcss-sprites": "^4.2.1",
94
+ "postcss-url": "^10.1.3",
95
+ "sass": "^1.77.6",
96
+ "sass-loader": "^14.2.1",
97
+ "spin.js": "^4.1.1",
98
+ "style-loader": "^4.0.0",
99
+ "stylelint": "^16.6.1",
100
+ "stylelint-config-standard-scss": "^13.1.0",
101
+ "typescript-eslint": "^7.16.0",
102
+ "weboptimizer": "^2.0.1482",
103
+ "webpack-dev-server": "^5.0.4"
105
104
  },
106
105
  "peerDependencies": {
107
106
  "@babel/runtime": "*",
@@ -122,11 +121,15 @@
122
121
  }
123
122
  },
124
123
  "engines": {
125
- "node": ">=18",
126
- "npm": ">=9"
124
+ "node": ">=20",
125
+ "npm": ">=10",
126
+ "yarn": ">=4"
127
127
  },
128
128
  "resolutions": {
129
- "colors": "1.4.0"
129
+ "colors": "1.4.0",
130
+ "globals@npm:^14.0.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
131
+ "globals@npm:^11.1.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
132
+ "globals@npm:^9.18.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch"
130
133
  },
131
134
  "sideEffects": false,
132
135
  "documentationWebsite": {
@@ -164,7 +167,9 @@
164
167
  },
165
168
  "injection": {
166
169
  "autoExclude": {
167
- "__append__": "./deploy.ts"
170
+ "paths": {
171
+ "__append__": "./deploy.ts"
172
+ }
168
173
  },
169
174
  "chunks": false,
170
175
  "entry": {
@@ -277,5 +282,6 @@
277
282
  }
278
283
  }
279
284
  }
280
- }
281
- }
285
+ },
286
+ "packageManager": "yarn@4.1.0+sha256.81a00df816059803e6b5148acf03ce313cad36b7f6e5af6efa040a15981a6ffb"
287
+ }
package/type.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { DomNodes as BaseDomNodes, FirstParameter, Mapping, Options as BaseOptions, ProcedureFunction, $T } from 'clientnode/type';
1
+ import { DomNodes as BaseDomNodes, FirstParameter, Mapping, Options as BaseOptions, ProcedureFunction, $T } from 'clientnode';
2
2
  import { Options as InternationalisationOptions } from 'internationalisation/type';
3
3
  import { SpinnerOptions } from 'spin.js';
4
4
  import WebsiteUtilities from './index';