ably-ui 8.7.0.dev.7072b07 → 8.7.0.dev.7456b53

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -6
  3. data/README.md +3 -7
  4. data/lib/ably_ui/core/code/component.css +0 -2
  5. data/lib/ably_ui/core/code/component.js +1 -739
  6. data/lib/ably_ui/core/company_autocomplete/component.css +0 -2
  7. data/lib/ably_ui/core/company_autocomplete/component.js +1 -1161
  8. data/lib/ably_ui/core/connect_state_wrapper/component.js +1 -22
  9. data/lib/ably_ui/core/contact_footer/component.css +0 -2
  10. data/lib/ably_ui/core/contact_footer/component.js +1 -211
  11. data/lib/ably_ui/core/cookie_message/component.css +0 -2
  12. data/lib/ably_ui/core/cookie_message/component.js +1 -82
  13. data/lib/ably_ui/core/core.rb +4 -8
  14. data/lib/ably_ui/core/customer_logos/component.js +1 -22
  15. data/lib/ably_ui/core/dropdown_menu/component.js +1 -22
  16. data/lib/ably_ui/core/feature_footer/component.css +0 -2
  17. data/lib/ably_ui/core/feature_footer/component.js +1 -211
  18. data/lib/ably_ui/core/featured_link/component.css +0 -2
  19. data/lib/ably_ui/core/featured_link/component.js +1 -82
  20. data/lib/ably_ui/core/flash/component.css +0 -2
  21. data/lib/ably_ui/core/flash/component.js +1 -82
  22. data/lib/ably_ui/core/footer/component.css +1 -3
  23. data/lib/ably_ui/core/footer/component.js +1 -82
  24. data/lib/ably_ui/core/footer/footer.html.erb +23 -18
  25. data/lib/ably_ui/core/icon/component.js +1 -22
  26. data/lib/ably_ui/core/loader/component.js +1 -22
  27. data/lib/ably_ui/core/logo/component.js +1 -22
  28. data/lib/ably_ui/core/meganav/component.css +3 -3
  29. data/lib/ably_ui/core/meganav/component.js +1 -992
  30. data/lib/ably_ui/core/meganav/component.json +1 -1
  31. data/lib/ably_ui/core/meganav/meganav.rb +4 -4
  32. data/lib/ably_ui/core/meganav_blog_posts_list/component.js +1 -1159
  33. data/lib/ably_ui/core/meganav_content_company/component.js +1 -22
  34. data/lib/ably_ui/core/meganav_content_company/meganav_content_company.html.erb +0 -9
  35. data/lib/ably_ui/core/meganav_content_developers/component.js +1 -22
  36. data/lib/ably_ui/core/meganav_content_developers/meganav_content_developers.html.erb +2 -18
  37. data/lib/ably_ui/core/meganav_content_platform/component.js +1 -0
  38. data/lib/ably_ui/core/{meganav_content_products/meganav_content_products.html.erb → meganav_content_platform/meganav_content_platform.html.erb} +33 -15
  39. data/lib/ably_ui/core/{meganav_content_products/meganav_content_products.rb → meganav_content_platform/meganav_content_platform.rb} +1 -1
  40. data/lib/ably_ui/core/meganav_content_use_cases/component.js +1 -22
  41. data/lib/ably_ui/core/meganav_content_use_cases/meganav_content_use_cases.html.erb +38 -42
  42. data/lib/ably_ui/core/meganav_control/component.js +1 -241
  43. data/lib/ably_ui/core/meganav_control_mobile_dropdown/component.js +1 -180
  44. data/lib/ably_ui/core/meganav_control_mobile_panel_close/component.js +1 -142
  45. data/lib/ably_ui/core/meganav_control_mobile_panel_open/component.js +1 -170
  46. data/lib/ably_ui/core/meganav_items_desktop/component.js +1 -22
  47. data/lib/ably_ui/core/meganav_items_desktop/meganav_items_desktop.rb +1 -1
  48. data/lib/ably_ui/core/meganav_items_mobile/component.js +1 -22
  49. data/lib/ably_ui/core/meganav_items_signed_in/component.js +1 -22
  50. data/lib/ably_ui/core/meganav_search/component.js +1 -22
  51. data/lib/ably_ui/core/meganav_search_autocomplete/component.js +1 -295
  52. data/lib/ably_ui/core/meganav_search_panel/component.js +1 -22
  53. data/lib/ably_ui/core/meganav_search_suggestions/component.js +1 -258
  54. data/lib/ably_ui/core/notice/component.css +0 -2
  55. data/lib/ably_ui/core/notice/component.js +1 -872
  56. data/lib/ably_ui/core/scripts.js +1 -1465
  57. data/lib/ably_ui/core/showcase/component.css +0 -2
  58. data/lib/ably_ui/core/showcase/component.js +1 -343
  59. data/lib/ably_ui/core/sign_out_link/component.js +1 -22
  60. data/lib/ably_ui/core/slider/component.css +0 -2
  61. data/lib/ably_ui/core/slider/component.js +1 -255
  62. data/lib/ably_ui/core/sprites.svg +0 -93
  63. data/lib/ably_ui/core/styles.css +7 -3
  64. data/lib/ably_ui/core/uptime/component.css +0 -2
  65. data/lib/ably_ui/core/uptime/component.js +1 -82
  66. data/lib/ably_ui/reset/scripts.js +1 -1
  67. data/lib/ably_ui/reset/styles.css +11 -1
  68. data/lib/ably_ui/version.rb +1 -1
  69. metadata +5 -9
  70. data/lib/ably_ui/core/images/best-support-2023.svg +0 -1
  71. data/lib/ably_ui/core/images/fastest-implementation-2023.svg +0 -1
  72. data/lib/ably_ui/core/images/high-performer-2023.svg +0 -1
  73. data/lib/ably_ui/core/images/highest-user-adoption-2023.svg +0 -1
  74. data/lib/ably_ui/core/meganav_content_products/component.js +0 -22
@@ -1,992 +1 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("addsearch-js-client"), require("lodash.throttle"), require("scroll-lock"));
4
- else if(typeof define === 'function' && define.amd)
5
- define([, , ], factory);
6
- else if(typeof exports === 'object')
7
- exports["AblyUi"] = factory(require("addsearch-js-client"), require("lodash.throttle"), require("scroll-lock"));
8
- else
9
- root["AblyUi"] = root["AblyUi"] || {}, root["AblyUi"]["Core"] = root["AblyUi"]["Core"] || {}, root["AblyUi"]["Core"]["Meganav"] = factory(root[undefined], root[undefined], root[undefined]);
10
- })(this, (__WEBPACK_EXTERNAL_MODULE_addsearch_js_client__, __WEBPACK_EXTERNAL_MODULE_lodash_throttle__, __WEBPACK_EXTERNAL_MODULE_scroll_lock__) => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ({
14
-
15
- /***/ "./src/core/MeganavControl/component.js":
16
- /*!**********************************************!*\
17
- !*** ./src/core/MeganavControl/component.js ***!
18
- \**********************************************/
19
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20
-
21
- __webpack_require__.r(__webpack_exports__);
22
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
24
- /* harmony export */ });
25
- /* harmony import */ var _dom_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom-query */ "./src/core/dom-query.js");
26
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
27
-
28
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
-
30
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
-
32
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
33
-
34
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
35
-
36
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
37
-
38
-
39
-
40
- var MeganavControl = function MeganavControl() {
41
- var controls = Array.from((0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryIdAll)("meganav-control"));
42
- var panels = Array.from((0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryIdAll)("meganav-panel"));
43
- var mdBreakpoint = getComputedStyle(document.documentElement).getPropertyValue("--bp-md");
44
-
45
- var hoverEnabled = function hoverEnabled() {
46
- return window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(mdBreakpoint, ")")).matches;
47
- };
48
-
49
- var isSearchControl = function isSearchControl(node) {
50
- return node.dataset.control === "search";
51
- };
52
-
53
- var isSearchPanelOpen = function isSearchPanelOpen() {
54
- var searchPanel = document.querySelector('[data-id="meganav-panel"]#panel-search');
55
- if (!searchPanel) return;
56
- return !searchPanel.classList.contains("invisible");
57
- };
58
-
59
- var controlsHaveFocus = function controlsHaveFocus() {
60
- return controls.some(function (control) {
61
- return control === document.activeElement;
62
- });
63
- };
64
-
65
- var hover = function hover(control, panel, open) {
66
- if (hoverEnabled() && !controlsHaveFocus() && !isSearchPanelOpen()) {
67
- var _panel$classList;
68
-
69
- var classes = ["invisible", "visible"];
70
-
71
- (_panel$classList = panel.classList).replace.apply(_panel$classList, _toConsumableArray(open ? classes : classes.reverse()));
72
-
73
- control.setAttribute("aria-expanded", open);
74
- control.dataset.hover = open;
75
- }
76
- };
77
-
78
- var mouseenterHandler = function mouseenterHandler(control, panel) {
79
- return function () {
80
- return hover(control, panel, true);
81
- };
82
- };
83
-
84
- var mouseleaveHandler = function mouseleaveHandler(control, panel) {
85
- return function () {
86
- return hover(control, panel, false);
87
- };
88
- };
89
-
90
- var clickHandler = function clickHandler(control, panel) {
91
- return function () {
92
- controls.forEach(function (node) {
93
- return node !== control && node.setAttribute("aria-expanded", false);
94
- });
95
- panels.forEach(function (node) {
96
- return node !== panel && node.classList.replace("visible", "invisible");
97
- });
98
- var ariaExpanded = control.getAttribute("aria-expanded"); // Prevent closing of the panel if it was already opened by hovering
99
-
100
- var openedByHover = control.dataset.hover === "true";
101
-
102
- if (ariaExpanded === "true" && !openedByHover) {
103
- control.setAttribute("aria-expanded", false);
104
- panel.classList.replace("visible", "invisible");
105
- } else {
106
- control.setAttribute("aria-expanded", true);
107
- panel.classList.replace("invisible", "visible");
108
- }
109
-
110
- if (openedByHover) {
111
- control.dataset.hover = false;
112
- }
113
-
114
- if (isSearchControl(control)) {
115
- var searchInput = (0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-search-input", panel);
116
- if (!searchInput) return;
117
- searchInput.focus();
118
- } else {
119
- control.focus();
120
- }
121
- };
122
- };
123
-
124
- return controls.map(function (control) {
125
- var item = control.parentNode;
126
- var panel = document.querySelector("#".concat(control.getAttribute("aria-controls")));
127
- var click = clickHandler(control, panel);
128
- control.addEventListener("click", click);
129
- var mouseenter, mouseleave;
130
-
131
- if (!isSearchControl(control)) {
132
- mouseenter = mouseenterHandler(control, panel);
133
- mouseleave = mouseleaveHandler(control, panel);
134
- item.addEventListener("mouseenter", mouseenter);
135
- item.addEventListener("mouseleave", mouseleave);
136
- }
137
-
138
- return [{
139
- teardown: function teardown() {
140
- if (mouseenter && mouseleave) {
141
- item.removeEventListener("mouseenter", mouseenter);
142
- item.removeEventListener("mouseleave", mouseleave);
143
- }
144
-
145
- control.removeEventListener("click", click);
146
- },
147
- clear: function clear() {
148
- control.setAttribute("aria-expanded", false);
149
- panel.classList.replace("visible", "invisible");
150
- }
151
- }];
152
- }).flat();
153
- };
154
-
155
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MeganavControl);
156
-
157
- /***/ }),
158
-
159
- /***/ "./src/core/MeganavControlMobileDropdown/component.js":
160
- /*!************************************************************!*\
161
- !*** ./src/core/MeganavControlMobileDropdown/component.js ***!
162
- \************************************************************/
163
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
164
-
165
- __webpack_require__.r(__webpack_exports__);
166
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
167
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
168
- /* harmony export */ });
169
- /* harmony import */ var scroll_lock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! scroll-lock */ "scroll-lock");
170
- /* harmony import */ var scroll_lock__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(scroll_lock__WEBPACK_IMPORTED_MODULE_0__);
171
- /* harmony import */ var _dom_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dom-query */ "./src/core/dom-query.js");
172
-
173
-
174
-
175
- var MeganavControlMobileDropdown = function MeganavControlMobileDropdown(_ref) {
176
- var clearPanels = _ref.clearPanels;
177
- var control = (0,_dom_query__WEBPACK_IMPORTED_MODULE_1__.queryId)("meganav-control-mobile-dropdown");
178
- var dropdown = (0,_dom_query__WEBPACK_IMPORTED_MODULE_1__.queryId)("meganav-mobile-dropdown");
179
- var menuIcon = (0,_dom_query__WEBPACK_IMPORTED_MODULE_1__.queryId)("meganav-control-mobile-dropdown-menu");
180
- var closeIcon = (0,_dom_query__WEBPACK_IMPORTED_MODULE_1__.queryId)("meganav-control-mobile-dropdown-close");
181
-
182
- var clickHandler = function clickHandler() {
183
- var ariaExpanded = control.getAttribute("aria-expanded");
184
-
185
- if (ariaExpanded === "false") {
186
- dropdown.classList.replace("invisible", "visible");
187
- control.setAttribute("aria-expanded", true);
188
- scroll_lock__WEBPACK_IMPORTED_MODULE_0___default().disablePageScroll();
189
- } else {
190
- dropdown.classList.replace("visible", "invisible");
191
- control.setAttribute("aria-expanded", false);
192
- scroll_lock__WEBPACK_IMPORTED_MODULE_0___default().enablePageScroll();
193
- clearPanels();
194
- }
195
-
196
- menuIcon.classList.toggle("hidden");
197
- closeIcon.classList.toggle("hidden");
198
- };
199
-
200
- control.addEventListener("click", clickHandler);
201
- return {
202
- teardown: function teardown() {
203
- control.removeEventListener("click", clickHandler);
204
- scroll_lock__WEBPACK_IMPORTED_MODULE_0___default().enablePageScroll();
205
- },
206
- clear: function clear() {
207
- dropdown.classList.replace("visible", "invisible");
208
- control.setAttribute("aria-expanded", false);
209
- menuIcon.classList.remove("hidden");
210
- closeIcon.classList.add("hidden");
211
- scroll_lock__WEBPACK_IMPORTED_MODULE_0___default().enablePageScroll();
212
- }
213
- };
214
- };
215
-
216
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MeganavControlMobileDropdown);
217
-
218
- /***/ }),
219
-
220
- /***/ "./src/core/MeganavControlMobilePanelClose/component.js":
221
- /*!**************************************************************!*\
222
- !*** ./src/core/MeganavControlMobilePanelClose/component.js ***!
223
- \**************************************************************/
224
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
225
-
226
- __webpack_require__.r(__webpack_exports__);
227
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
228
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
229
- /* harmony export */ });
230
- /* harmony import */ var _dom_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom-query */ "./src/core/dom-query.js");
231
-
232
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function () {
233
- var closeControls = Array.from((0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryIdAll)("meganav-control-mobile-panel-close"));
234
- var openControls = Array.from((0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryIdAll)("meganav-control-mobile-panel-open"));
235
-
236
- var clickHandler = function clickHandler(btn, openBtn, panel) {
237
- return function () {
238
- btn.setAttribute("aria-expanded", false);
239
- openBtn.setAttribute("aria-expanded", false);
240
- panel.classList.replace("block", "hidden");
241
- panel.style.height = null;
242
- };
243
- };
244
-
245
- return closeControls.map(function (btn) {
246
- var openBtn = openControls.find(function (open) {
247
- return open.getAttribute("aria-controls") === btn.getAttribute("aria-controls");
248
- });
249
- var panel = document.querySelector("#".concat(btn.getAttribute("aria-controls")));
250
- var handler = clickHandler(btn, openBtn, panel);
251
- btn.addEventListener("click", handler);
252
- return {
253
- teardown: function teardown() {
254
- return btn.removeEventListener("click", handler);
255
- },
256
- clear: function clear() {
257
- return btn.setAttribute("aria-expanded", false);
258
- }
259
- };
260
- });
261
- });
262
-
263
- /***/ }),
264
-
265
- /***/ "./src/core/MeganavControlMobilePanelOpen/component.js":
266
- /*!*************************************************************!*\
267
- !*** ./src/core/MeganavControlMobilePanelOpen/component.js ***!
268
- \*************************************************************/
269
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
270
-
271
- __webpack_require__.r(__webpack_exports__);
272
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
273
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
274
- /* harmony export */ });
275
- /* harmony import */ var _dom_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom-query */ "./src/core/dom-query.js");
276
- /* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../css */ "./src/core/css.js");
277
-
278
-
279
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function () {
280
- var closeControls = Array.from((0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryIdAll)("meganav-control-mobile-panel-close"));
281
- var openControls = Array.from((0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryIdAll)("meganav-control-mobile-panel-open"));
282
- var dropdown = (0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-mobile-dropdown"); // Height is defined in rem's so to get the pixel value we need to find the fontSize on root
283
-
284
- var meganavHeight = (0,_css__WEBPACK_IMPORTED_MODULE_1__.remsToPixelValue)(getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"));
285
-
286
- var clickHandler = function clickHandler(btn, closeBtn, panel) {
287
- return function () {
288
- btn.setAttribute("aria-expanded", true);
289
- closeBtn.setAttribute("aria-expanded", true);
290
- panel.classList.replace("hidden", "block"); // On devices where we don't have enough space for the panel, set it's height to
291
- // the height of the viewport (minus the meganav height) - this will trigger a scroll.
292
- // Otherwise just set it to the panel height. This handles the case where the ratio of vertical
293
- // space to horizontal is especially high (think tablets, but not only).
294
-
295
- panel.style.height = "".concat(window.innerHeight - meganavHeight > panel.offsetHeight ? panel.offsetHeight : window.innerHeight - meganavHeight, "px");
296
- };
297
- };
298
-
299
- return openControls.map(function (btn) {
300
- var closeBtn = closeControls.find(function (node) {
301
- return node.getAttribute("aria-controls") === btn.getAttribute("aria-controls");
302
- });
303
- var panel = document.querySelector("#".concat(btn.getAttribute("aria-controls")));
304
- var handler = clickHandler(btn, closeBtn, panel);
305
- btn.addEventListener("click", handler);
306
- return {
307
- teardown: function teardown() {
308
- return btn.removeEventListener("click", handler);
309
- },
310
- clear: function clear() {
311
- panel.classList.replace("block", "hidden");
312
- dropdown.classList.remove("ui-meganav-mobile-dropdown-expand");
313
- btn.setAttribute("aria-expanded", false);
314
- panel.style.height = null;
315
- }
316
- };
317
- });
318
- });
319
-
320
- /***/ }),
321
-
322
- /***/ "./src/core/MeganavSearchAutocomplete/component.js":
323
- /*!*********************************************************!*\
324
- !*** ./src/core/MeganavSearchAutocomplete/component.js ***!
325
- \*********************************************************/
326
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
327
-
328
- __webpack_require__.r(__webpack_exports__);
329
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
330
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
331
- /* harmony export */ });
332
- /* harmony import */ var _dom_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom-query */ "./src/core/dom-query.js");
333
- /* harmony import */ var addsearch_js_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! addsearch-js-client */ "addsearch-js-client");
334
- /* harmony import */ var addsearch_js_client__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(addsearch_js_client__WEBPACK_IMPORTED_MODULE_1__);
335
-
336
-
337
-
338
- var init = function init(_ref) {
339
- var input = _ref.input,
340
- container = _ref.container,
341
- listContainer = _ref.listContainer,
342
- clear = _ref.clear,
343
- client = _ref.client;
344
- client.setAnalyticsTag("Meganav autocomplete");
345
- client.setThrottleTime(400);
346
-
347
- var clearResults = function clearResults() {
348
- container.classList.add("hidden");
349
- listContainer.innerHTML = "";
350
- };
351
-
352
- var toggleClearBtn = function toggleClearBtn(query) {
353
- if ((query || "").length > 0 && clear) {
354
- clear.classList.remove("invisible");
355
- } else if (clear) {
356
- clear.classList.add("invisible");
357
- }
358
- };
359
-
360
- var markQueryInSuggestion = function markQueryInSuggestion(suggestionValue, query) {
361
- return suggestionValue.replace(query.toLowerCase(), "<span class=\"font-light\">".concat(query, "</span>"));
362
- };
363
-
364
- var navigateToUrl = function navigateToUrl(q) {
365
- return window.location = "/search?q=".concat(q);
366
- };
367
-
368
- var focusNext = function focusNext(index) {
369
- var nextSuggestion = listContainer.querySelector("[data-suggestion-index=\"".concat(index + 1, "\"]"));
370
- if (!nextSuggestion) return;
371
- nextSuggestion.focus();
372
- };
373
-
374
- var focusPrevious = function focusPrevious(index) {
375
- var previousIndex = index - 1;
376
- var previousSuggestion = listContainer.querySelector("[data-suggestion-index=\"".concat(previousIndex, "\"]"));
377
- if (!previousSuggestion) return;
378
- previousSuggestion.focus();
379
- };
380
-
381
- var renderResults = function renderResults(query) {
382
- return function () {
383
- var results = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
384
- toggleClearBtn(query); // Prevent invalid access error when key is invalid
385
-
386
- if (!Array.isArray(results.suggestions)) {
387
- clearResults();
388
- return;
389
- } // Prevent key error from invalid key
390
-
391
-
392
- if (results.suggestions.length === 0) {
393
- clearResults();
394
- return;
395
- }
396
-
397
- var items = results.suggestions.map(function (suggestion, index) {
398
- var li = document.createElement("li");
399
- var button = document.createElement("button");
400
- button.type = "button";
401
- button.classList.add("ui-text-menu2", "font-medium", "p-8", "w-full", "text-left", "rounded", "hover:text-gui-hover", "focus:outline-gui-focus", "hover:bg-light-grey");
402
- button.innerHTML = markQueryInSuggestion(suggestion.value, query);
403
- button.dataset.suggestionIndex = index;
404
- button.addEventListener("click", function () {
405
- navigateToUrl(suggestion.value);
406
- });
407
- button.addEventListener("keydown", function (e) {
408
- var key = e.key;
409
-
410
- if (key === "ArrowDown") {
411
- focusNext(index);
412
- } else if (key === "ArrowUp" && index - 1 < 0) {
413
- input.focus();
414
- } else if (key === "ArrowUp" && index - 1 >= 0) {
415
- focusPrevious(index);
416
- } else if (key === "Enter" || key === "Space") {
417
- navigateToUrl(suggestion.value);
418
- }
419
- });
420
- li.appendChild(button);
421
- return li;
422
- });
423
- listContainer.innerHTML = "";
424
- items.forEach(function (item) {
425
- return listContainer.appendChild(item);
426
- });
427
- container.classList.remove("hidden");
428
- };
429
- };
430
-
431
- var keyupHandler = function keyupHandler(e) {
432
- var query = e.target.value;
433
- var key = e.key;
434
-
435
- if (key === "ArrowDown") {
436
- focusNext(0);
437
- return;
438
- }
439
-
440
- if (!query) {
441
- clearResults();
442
- } else {
443
- client.suggestions(query, renderResults(query));
444
- }
445
- };
446
-
447
- var clearHandler;
448
-
449
- if (clear) {
450
- clearHandler = function clearHandler() {
451
- input.value = "";
452
- clear.classList.add("invisible");
453
- clearResults();
454
- };
455
-
456
- clear.addEventListener("click", clearHandler);
457
- }
458
-
459
- input.addEventListener("keyup", keyupHandler);
460
- return {
461
- teardown: function teardown() {
462
- input.removeEventListener("keyup", keyupHandler);
463
- if (clear) clear.removeEventListener("click", clearHandler);
464
- },
465
- clear: function clear() {
466
- input.value = "";
467
- clearResults();
468
- }
469
- };
470
- };
471
-
472
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (apiKey) {
473
- if (!apiKey) {
474
- console.log("No AddSearch API key provided, skipping search suggestions.");
475
- return [];
476
- }
477
-
478
- var client = new (addsearch_js_client__WEBPACK_IMPORTED_MODULE_1___default())(apiKey);
479
- return [(0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-search-input"), (0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-mobile-search-input")].filter(function (i) {
480
- return i;
481
- }).map(function (input) {
482
- var parent = input.parentNode;
483
- var container = (0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-search-autocomplete-container", parent);
484
- var listContainer = (0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-search-autocomplete-list", parent);
485
- var clear = (0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-search-input-clear", parent);
486
- return init({
487
- input: input,
488
- container: container,
489
- listContainer: listContainer,
490
- client: client,
491
- clear: clear
492
- });
493
- });
494
- });
495
-
496
- /***/ }),
497
-
498
- /***/ "./src/core/MeganavSearchSuggestions/component.js":
499
- /*!********************************************************!*\
500
- !*** ./src/core/MeganavSearchSuggestions/component.js ***!
501
- \********************************************************/
502
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
503
-
504
- __webpack_require__.r(__webpack_exports__);
505
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
506
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
507
- /* harmony export */ });
508
- /* harmony import */ var _dom_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom-query */ "./src/core/dom-query.js");
509
-
510
- var DRAG_BUFFER = 5;
511
-
512
- var getTranslateX = function getTranslateX(node) {
513
- return new DOMMatrix(window.getComputedStyle(node).transform).e;
514
- };
515
-
516
- var updateTranslateX = function updateTranslateX(node, value) {
517
- return node.style.transform = "translateX(".concat(value, "px)");
518
- };
519
-
520
- var dragLeftBoundary = function dragLeftBoundary(translateX, threshold) {
521
- return translateX >= threshold;
522
- };
523
-
524
- var dragRightBoundary = function dragRightBoundary(translateX, itemsWidth, windowWidth, threshold) {
525
- return Math.abs(translateX - windowWidth + threshold) > itemsWidth;
526
- };
527
-
528
- var getDistance = function getDistance(e, touchStartX) {
529
- var _e$changedTouches$;
530
-
531
- return ((_e$changedTouches$ = e.changedTouches[0]) === null || _e$changedTouches$ === void 0 ? void 0 : _e$changedTouches$.clientX) - touchStartX;
532
- };
533
-
534
- var withinBuffer = function withinBuffer(distance) {
535
- return Math.abs(distance) < DRAG_BUFFER;
536
- };
537
-
538
- var getItemsTotalWidth = function getItemsTotalWidth(nodes) {
539
- return nodes.map(function (item) {
540
- return item.getBoundingClientRect().width;
541
- }).reduce(function (acc, val) {
542
- return acc + val;
543
- }, 0);
544
- };
545
-
546
- var MeganavSearchSuggestions = function MeganavSearchSuggestions() {
547
- var suggestionsToggle = (0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-mobile-search-input");
548
- var suggestions = (0,_dom_query__WEBPACK_IMPORTED_MODULE_0__.queryId)("meganav-mobile-search-suggestions");
549
- var list = suggestions.querySelector("ul");
550
- var listItems = Array.from(list.querySelectorAll("li"));
551
-
552
- var dragLeft = function dragLeft(distance, threshold) {
553
- var currentTranslateX = getTranslateX(list);
554
- var translateX = Math.round(currentTranslateX + distance);
555
- if (dragLeftBoundary(translateX, threshold)) return;
556
- updateTranslateX(list, translateX);
557
- };
558
-
559
- var dragLeftEnd = function dragLeftEnd(distance, threshold) {
560
- var currentTranslateX = getTranslateX(list);
561
- var translateX = Math.round(currentTranslateX + distance);
562
-
563
- if (dragLeftBoundary(translateX, threshold)) {
564
- translateX = 0;
565
- }
566
-
567
- updateTranslateX(list, translateX);
568
- };
569
-
570
- var dragRight = function dragRight(distance, threshold) {
571
- var listWidth = list.getBoundingClientRect().width;
572
- var currentTranslateX = getTranslateX(list);
573
- var translateX = Math.round(currentTranslateX + distance);
574
- var itemsTotalWidth = getItemsTotalWidth(listItems);
575
-
576
- if (dragRightBoundary(translateX, itemsTotalWidth, listWidth, threshold)) {
577
- return;
578
- }
579
-
580
- updateTranslateX(list, translateX);
581
- };
582
-
583
- var dragRightEnd = function dragRightEnd(distance, threshold) {
584
- var listWidth = list.getBoundingClientRect().width;
585
- var currentTranslateX = getTranslateX(list);
586
- var itemsTotalWidth = getItemsTotalWidth(listItems);
587
- var translateX = Math.round(currentTranslateX + distance);
588
-
589
- if (dragRightBoundary(translateX, itemsTotalWidth, listWidth, threshold)) {
590
- translateX = -(itemsTotalWidth - listWidth + threshold);
591
- }
592
-
593
- updateTranslateX(list, translateX);
594
- };
595
-
596
- var touchStartX;
597
-
598
- var touchstartHandler = function touchstartHandler(e) {
599
- var _e$touches$;
600
-
601
- touchStartX = (_e$touches$ = e.touches[0]) === null || _e$touches$ === void 0 ? void 0 : _e$touches$.clientX;
602
- };
603
-
604
- var touchmoveHandler = function touchmoveHandler(e) {
605
- var distance = getDistance(e, touchStartX);
606
- if (withinBuffer(distance)) return;
607
- distance > 0 ? dragLeft(distance, 24) : dragRight(distance, 96);
608
- };
609
-
610
- var touchendHandler = function touchendHandler(e) {
611
- var distance = getDistance(e, touchStartX);
612
- if (withinBuffer(distance)) return;
613
- distance > 0 ? dragLeftEnd(distance, 24) : dragRightEnd(distance, 48);
614
- };
615
-
616
- var focusSuggestionsHandler = function focusSuggestionsHandler() {
617
- suggestions.classList.add("max-h-96");
618
- };
619
-
620
- var blurSuggestionsHandler = function blurSuggestionsHandler(e) {
621
- if (e.relatedTarget === suggestions.querySelectorAll("a")[0]) {
622
- return;
623
- }
624
-
625
- suggestions.classList.remove("max-h-96");
626
- };
627
-
628
- var wheelHandler = function wheelHandler(e) {
629
- var distance = e.deltaY * 4;
630
- if (withinBuffer(distance)) return;
631
- distance > 0 ? dragLeftEnd(distance, 24) : dragRightEnd(distance, 48);
632
- };
633
-
634
- suggestionsToggle.addEventListener("focus", focusSuggestionsHandler);
635
- suggestionsToggle.addEventListener("blur", blurSuggestionsHandler);
636
- suggestions.addEventListener("touchstart", touchstartHandler);
637
- suggestions.addEventListener("touchmove", touchmoveHandler);
638
- suggestions.addEventListener("touchend", touchendHandler);
639
- suggestions.addEventListener("wheel", wheelHandler);
640
- return {
641
- teardown: function teardown() {
642
- suggestionsToggle.removeEventListener("focus", focusSuggestionsHandler);
643
- suggestionsToggle.removeEventListener("blur", blurSuggestionsHandler);
644
- suggestions.removeEventListener("touchstart", touchstartHandler);
645
- suggestions.removeEventListener("touchmove", touchmoveHandler);
646
- suggestions.removeEventListener("touchend", touchendHandler);
647
- },
648
- clear: function clear() {
649
- suggestions.classList.remove("max-h-96");
650
- list.style.transform = "translateX(0px)";
651
- }
652
- };
653
- };
654
-
655
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MeganavSearchSuggestions);
656
-
657
- /***/ }),
658
-
659
- /***/ "./src/core/css.js":
660
- /*!*************************!*\
661
- !*** ./src/core/css.js ***!
662
- \*************************/
663
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
664
-
665
- __webpack_require__.r(__webpack_exports__);
666
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
667
- /* harmony export */ "remsToPixelValue": () => (/* binding */ remsToPixelValue)
668
- /* harmony export */ });
669
- var remsToPixelValue = function remsToPixelValue(remString) {
670
- return parseFloat(remString) * parseFloat(getComputedStyle(document.documentElement).fontSize);
671
- };
672
-
673
- /***/ }),
674
-
675
- /***/ "./src/core/dom-query.js":
676
- /*!*******************************!*\
677
- !*** ./src/core/dom-query.js ***!
678
- \*******************************/
679
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
680
-
681
- __webpack_require__.r(__webpack_exports__);
682
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
683
- /* harmony export */ "queryId": () => (/* binding */ queryId),
684
- /* harmony export */ "queryIdAll": () => (/* binding */ queryIdAll)
685
- /* harmony export */ });
686
- var queryId = function queryId(val) {
687
- var root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
688
- return root.querySelector("[data-id=".concat(val, "]"));
689
- };
690
- var queryIdAll = function queryIdAll(val) {
691
- var root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
692
- return root.querySelectorAll("[data-id=".concat(val, "]"));
693
- };
694
-
695
- /***/ }),
696
-
697
- /***/ "./src/core/Meganav/component.css":
698
- /*!****************************************!*\
699
- !*** ./src/core/Meganav/component.css ***!
700
- \****************************************/
701
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
702
-
703
- __webpack_require__.r(__webpack_exports__);
704
- // extracted by mini-css-extract-plugin
705
-
706
-
707
- /***/ }),
708
-
709
- /***/ "addsearch-js-client":
710
- /*!*************************************************************************************!*\
711
- !*** external {"commonjs":"addsearch-js-client","commonjs2":"addsearch-js-client"} ***!
712
- \*************************************************************************************/
713
- /***/ ((module) => {
714
-
715
- module.exports = __WEBPACK_EXTERNAL_MODULE_addsearch_js_client__;
716
-
717
- /***/ }),
718
-
719
- /***/ "lodash.throttle":
720
- /*!*****************************************************************************!*\
721
- !*** external {"commonjs":"lodash.throttle","commonjs2":"lodash.throttle"} ***!
722
- \*****************************************************************************/
723
- /***/ ((module) => {
724
-
725
- module.exports = __WEBPACK_EXTERNAL_MODULE_lodash_throttle__;
726
-
727
- /***/ }),
728
-
729
- /***/ "scroll-lock":
730
- /*!*********************************************************************!*\
731
- !*** external {"commonjs":"scroll-lock","commonjs2":"scroll-lock"} ***!
732
- \*********************************************************************/
733
- /***/ ((module) => {
734
-
735
- module.exports = __WEBPACK_EXTERNAL_MODULE_scroll_lock__;
736
-
737
- /***/ })
738
-
739
- /******/ });
740
- /************************************************************************/
741
- /******/ // The module cache
742
- /******/ var __webpack_module_cache__ = {};
743
- /******/
744
- /******/ // The require function
745
- /******/ function __webpack_require__(moduleId) {
746
- /******/ // Check if module is in cache
747
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
748
- /******/ if (cachedModule !== undefined) {
749
- /******/ return cachedModule.exports;
750
- /******/ }
751
- /******/ // Create a new module (and put it into the cache)
752
- /******/ var module = __webpack_module_cache__[moduleId] = {
753
- /******/ // no module.id needed
754
- /******/ // no module.loaded needed
755
- /******/ exports: {}
756
- /******/ };
757
- /******/
758
- /******/ // Execute the module function
759
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
760
- /******/
761
- /******/ // Return the exports of the module
762
- /******/ return module.exports;
763
- /******/ }
764
- /******/
765
- /************************************************************************/
766
- /******/ /* webpack/runtime/compat get default export */
767
- /******/ (() => {
768
- /******/ // getDefaultExport function for compatibility with non-harmony modules
769
- /******/ __webpack_require__.n = (module) => {
770
- /******/ var getter = module && module.__esModule ?
771
- /******/ () => (module['default']) :
772
- /******/ () => (module);
773
- /******/ __webpack_require__.d(getter, { a: getter });
774
- /******/ return getter;
775
- /******/ };
776
- /******/ })();
777
- /******/
778
- /******/ /* webpack/runtime/define property getters */
779
- /******/ (() => {
780
- /******/ // define getter functions for harmony exports
781
- /******/ __webpack_require__.d = (exports, definition) => {
782
- /******/ for(var key in definition) {
783
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
784
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
785
- /******/ }
786
- /******/ }
787
- /******/ };
788
- /******/ })();
789
- /******/
790
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
791
- /******/ (() => {
792
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
793
- /******/ })();
794
- /******/
795
- /******/ /* webpack/runtime/make namespace object */
796
- /******/ (() => {
797
- /******/ // define __esModule on exports
798
- /******/ __webpack_require__.r = (exports) => {
799
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
800
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
801
- /******/ }
802
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
803
- /******/ };
804
- /******/ })();
805
- /******/
806
- /************************************************************************/
807
- var __webpack_exports__ = {};
808
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
809
- (() => {
810
- /*!***************************************!*\
811
- !*** ./src/core/Meganav/component.js ***!
812
- \***************************************/
813
- __webpack_require__.r(__webpack_exports__);
814
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
815
- /* harmony export */ "default": () => (/* binding */ Meganav)
816
- /* harmony export */ });
817
- /* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash.throttle */ "lodash.throttle");
818
- /* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_0__);
819
- /* harmony import */ var _component_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./component.css */ "./src/core/Meganav/component.css");
820
- /* harmony import */ var _dom_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dom-query */ "./src/core/dom-query.js");
821
- /* harmony import */ var _MeganavControl_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../MeganavControl/component */ "./src/core/MeganavControl/component.js");
822
- /* harmony import */ var _MeganavControlMobileDropdown_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../MeganavControlMobileDropdown/component */ "./src/core/MeganavControlMobileDropdown/component.js");
823
- /* harmony import */ var _MeganavControlMobilePanelOpen_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../MeganavControlMobilePanelOpen/component */ "./src/core/MeganavControlMobilePanelOpen/component.js");
824
- /* harmony import */ var _MeganavControlMobilePanelClose_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../MeganavControlMobilePanelClose/component */ "./src/core/MeganavControlMobilePanelClose/component.js");
825
- /* harmony import */ var _MeganavSearchAutocomplete_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../MeganavSearchAutocomplete/component */ "./src/core/MeganavSearchAutocomplete/component.js");
826
- /* harmony import */ var _MeganavSearchSuggestions_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../MeganavSearchSuggestions/component */ "./src/core/MeganavSearchSuggestions/component.js");
827
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
828
-
829
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
830
-
831
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
832
-
833
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
834
-
835
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
836
-
837
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
838
-
839
-
840
- // Glossary:
841
- // item - is the element which contains both the control and the panel - these are adjacent
842
- // control - interactive element that controls showing and hiding of dropdown or panel
843
- // panel - container for meganav content
844
- // dropdown - container for top level items on mobile
845
- // clear - return to initial state
846
- // teardown - remove all event listeners (for example when removing nodes)
847
-
848
-
849
-
850
-
851
-
852
-
853
-
854
- // Close menu when user clicks outside of viewport
855
-
856
- var windowOnBlur = function windowOnBlur(closeAll) {
857
- window.onblur = function () {
858
- return closeAll();
859
- };
860
-
861
- return {
862
- teardown: function teardown() {
863
- return window.onblur = null;
864
- }
865
- };
866
- }; // Close menu when click/tap outside of nav
867
-
868
-
869
- var documentClick = function documentClick(closeAll) {
870
- var meganav = (0,_dom_query__WEBPACK_IMPORTED_MODULE_2__.queryId)("meganav");
871
-
872
- var clickHandler = function clickHandler(e) {
873
- if (meganav.contains(e.target)) return;
874
- closeAll();
875
- };
876
-
877
- document.addEventListener("click", clickHandler);
878
- return {
879
- teardown: function teardown() {
880
- return document.removeEventListener("click", clickHandler);
881
- }
882
- };
883
- }; // Invert from transparent to white
884
-
885
-
886
- var documentScroll = function documentScroll(themeName) {
887
- if (themeName !== "transparentToWhite") return {
888
- teardown: function teardown() {}
889
- };
890
- var meganav = (0,_dom_query__WEBPACK_IMPORTED_MODULE_2__.queryId)("meganav");
891
- var navItems = (0,_dom_query__WEBPACK_IMPORTED_MODULE_2__.queryIdAll)("meganav-link");
892
- var controlMobileDropdownMenu = (0,_dom_query__WEBPACK_IMPORTED_MODULE_2__.queryId)("meganav-control-mobile-dropdown-menu");
893
- var controlMobileDropdownClose = (0,_dom_query__WEBPACK_IMPORTED_MODULE_2__.queryId)("meganav-control-mobile-dropdown-close");
894
- var controls = (0,_dom_query__WEBPACK_IMPORTED_MODULE_2__.queryIdAll)("meganav-control");
895
- var signUpBtn = (0,_dom_query__WEBPACK_IMPORTED_MODULE_2__.queryId)("meganav-sign-up-btn");
896
- var invertTextCollection = [].concat(_toConsumableArray(Array.from(controls)), _toConsumableArray(Array.from(navItems)), [(0,_dom_query__WEBPACK_IMPORTED_MODULE_2__.queryId)("meganav-logo")]);
897
-
898
- var invertMobleDropdownColor = function invertMobleDropdownColor(invert) {
899
- var whiteToBlack = ["ui-icon-white", "ui-icon-cool-black"];
900
- var blackToWhite = [].concat(whiteToBlack).reverse();
901
-
902
- if (invert) {
903
- var _controlMobileDropdow, _controlMobileDropdow2;
904
-
905
- controlMobileDropdownMenu === null || controlMobileDropdownMenu === void 0 ? void 0 : (_controlMobileDropdow = controlMobileDropdownMenu.classList).replace.apply(_controlMobileDropdow, whiteToBlack);
906
- controlMobileDropdownClose === null || controlMobileDropdownClose === void 0 ? void 0 : (_controlMobileDropdow2 = controlMobileDropdownClose.classList).replace.apply(_controlMobileDropdow2, whiteToBlack);
907
- } else {
908
- var _controlMobileDropdow3, _controlMobileDropdow4;
909
-
910
- controlMobileDropdownMenu === null || controlMobileDropdownMenu === void 0 ? void 0 : (_controlMobileDropdow3 = controlMobileDropdownMenu.classList).replace.apply(_controlMobileDropdow3, _toConsumableArray(blackToWhite));
911
- controlMobileDropdownClose === null || controlMobileDropdownClose === void 0 ? void 0 : (_controlMobileDropdow4 = controlMobileDropdownClose.classList).replace.apply(_controlMobileDropdow4, _toConsumableArray(blackToWhite));
912
- }
913
- };
914
-
915
- var inverSignupBtnColors = function inverSignupBtnColors(invert) {
916
- if (invert) {
917
- signUpBtn === null || signUpBtn === void 0 ? void 0 : signUpBtn.classList.replace("bg-white", "bg-cool-black");
918
- signUpBtn === null || signUpBtn === void 0 ? void 0 : signUpBtn.classList.replace("text-cool-black", "text-white");
919
- } else {
920
- signUpBtn === null || signUpBtn === void 0 ? void 0 : signUpBtn.classList.replace("bg-cool-black", "bg-white");
921
- signUpBtn === null || signUpBtn === void 0 ? void 0 : signUpBtn.classList.replace("text-white", "text-cool-black");
922
- }
923
- };
924
-
925
- var scrollHandler = lodash_throttle__WEBPACK_IMPORTED_MODULE_0___default()(function () {
926
- if (window.scrollY > 5) {
927
- meganav.classList.replace("bg-transparent", "bg-white");
928
- inverSignupBtnColors(true);
929
- invertMobleDropdownColor(true);
930
- invertTextCollection.forEach(function (n) {
931
- return n.classList.replace("text-white", "text-cool-black");
932
- });
933
- } else {
934
- meganav.classList.replace("bg-white", "bg-transparent");
935
- inverSignupBtnColors(false);
936
- invertMobleDropdownColor(false);
937
- invertTextCollection.forEach(function (n) {
938
- return n.classList.replace("text-cool-black", "text-white");
939
- });
940
- }
941
- }, 150);
942
- document.addEventListener("scroll", scrollHandler);
943
- return {
944
- teardown: function teardown() {
945
- return document.removeEventListener("scroll", scrollHandler);
946
- }
947
- };
948
- };
949
-
950
- function Meganav() {
951
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
952
- themeName: null
953
- },
954
- themeName = _ref.themeName,
955
- addSearchApiKey = _ref.addSearchApiKey;
956
-
957
- var controls = (0,_MeganavControl_component__WEBPACK_IMPORTED_MODULE_3__["default"])();
958
- var panelOpenControls = (0,_MeganavControlMobilePanelOpen_component__WEBPACK_IMPORTED_MODULE_5__["default"])();
959
- var panelCloseControls = (0,_MeganavControlMobilePanelClose_component__WEBPACK_IMPORTED_MODULE_6__["default"])();
960
- var search = (0,_MeganavSearchAutocomplete_component__WEBPACK_IMPORTED_MODULE_7__["default"])(addSearchApiKey);
961
- var searchSuggestions = (0,_MeganavSearchSuggestions_component__WEBPACK_IMPORTED_MODULE_8__["default"])();
962
- var mobileDropdownControl = (0,_MeganavControlMobileDropdown_component__WEBPACK_IMPORTED_MODULE_4__["default"])({
963
- clearPanels: function clearPanels() {
964
- return [].concat(_toConsumableArray(panelOpenControls), _toConsumableArray(panelCloseControls)).forEach(function (i) {
965
- return i.clear();
966
- });
967
- }
968
- });
969
-
970
- var closeAll = function closeAll() {
971
- return [mobileDropdownControl, searchSuggestions].concat(_toConsumableArray(panelOpenControls), _toConsumableArray(panelCloseControls), _toConsumableArray(controls), _toConsumableArray(search)).forEach(function (i) {
972
- return i.clear();
973
- });
974
- };
975
-
976
- var teardowns = [documentScroll(themeName), documentClick(closeAll), windowOnBlur(closeAll), mobileDropdownControl, searchSuggestions].concat(_toConsumableArray(controls), _toConsumableArray(panelOpenControls), _toConsumableArray(panelCloseControls), _toConsumableArray(search)).map(function (i) {
977
- return i.teardown;
978
- });
979
- return function () {
980
- return teardowns.forEach(function (teardown) {
981
- return teardown();
982
- });
983
- };
984
- }
985
- })();
986
-
987
- __webpack_exports__ = __webpack_exports__["default"];
988
- /******/ return __webpack_exports__;
989
- /******/ })()
990
- ;
991
- });
992
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS9NZWdhbmF2L2NvbXBvbmVudC5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXVDLHVEQUF1RDtBQUM5RixDQUFDO0FBQ0QsTzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FDVkE7O0FBRUEsSUFBTUUsY0FBYyxHQUFHLFNBQWpCQSxjQUFpQixHQUFNO0FBQzNCLE1BQU1DLFFBQVEsR0FBR0MsS0FBSyxDQUFDQyxJQUFOLENBQVdKLHNEQUFVLENBQUMsaUJBQUQsQ0FBckIsQ0FBakI7QUFDQSxNQUFNSyxNQUFNLEdBQUdGLEtBQUssQ0FBQ0M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typeof module?module.exports=t(require("addsearch-js-client"),require("lodash.throttle"),require("scroll-lock")):"function"==typeof define&&define.amd?define([,,],t):"object"==typeof exports?exports.AblyUi=t(require("addsearch-js-client"),require("lodash.throttle"),require("scroll-lock")):(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Meganav=t(e[void 0],e[void 0],e[void 0]))}(this,(function(e,t,n){return(()=>{"use strict";var r={2498:(e,t,n)=>{n.d(t,{default:()=>o});var r=n(9581);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const o=function(){var e=Array.from((0,r.n)("meganav-control")),t=Array.from((0,r.n)("meganav-panel")),n=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),o=function(e){return"search"===e.dataset.control},i=function(t,r,o){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(n,")")).matches&&!e.some((function(e){return e===document.activeElement}))&&!function(){var e=document.querySelector('[data-id="meganav-panel"]#panel-search');if(e)return!e.classList.contains("invisible")}()){var i,c=["invisible","visible"];(i=r.classList).replace.apply(i,function(e){if(Array.isArray(e))return a(e)}(l=o?c:c.reverse())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.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)?a(e,t):void 0}}(l)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),t.setAttribute("aria-expanded",o),t.dataset.hover=o}var l};return e.map((function(n){var a,c,l=n.parentNode,u=document.querySelector("#".concat(n.getAttribute("aria-controls"))),s=function(n,a){return function(){e.forEach((function(e){return e!==n&&e.setAttribute("aria-expanded",!1)})),t.forEach((function(e){return e!==a&&e.classList.replace("visible","invisible")}));var i=n.getAttribute("aria-expanded"),c="true"===n.dataset.hover;if("true"!==i||c?(n.setAttribute("aria-expanded",!0),a.classList.replace("invisible","visible")):(n.setAttribute("aria-expanded",!1),a.classList.replace("visible","invisible")),c&&(n.dataset.hover=!1),o(n)){var l=(0,r.A)("meganav-search-input",a);if(!l)return;l.focus()}else n.focus()}}(n,u);return n.addEventListener("click",s),o(n)||(a=function(e,t){return function(){return i(e,t,!0)}}(n,u),c=function(e,t){return function(){return i(e,t,!1)}}(n,u),l.addEventListener("mouseenter",a),l.addEventListener("mouseleave",c)),[{teardown:function(){a&&c&&(l.removeEventListener("mouseenter",a),l.removeEventListener("mouseleave",c)),n.removeEventListener("click",s)},clear:function(){n.setAttribute("aria-expanded",!1),u.classList.replace("visible","invisible")}}]})).flat()}},1792:(e,t,n)=>{n.d(t,{default:()=>i});var r=n(6833),a=n.n(r),o=n(9581);const i=function(e){var t=e.clearPanels,n=(0,o.A)("meganav-control-mobile-dropdown"),r=(0,o.A)("meganav-mobile-dropdown"),i=(0,o.A)("meganav-control-mobile-dropdown-menu"),c=(0,o.A)("meganav-control-mobile-dropdown-close"),l=function(){"false"===n.getAttribute("aria-expanded")?(r.classList.replace("invisible","visible"),n.setAttribute("aria-expanded",!0),a().disablePageScroll()):(r.classList.replace("visible","invisible"),n.setAttribute("aria-expanded",!1),a().enablePageScroll(),t()),i.classList.toggle("hidden"),c.classList.toggle("hidden")};return n.addEventListener("click",l),{teardown:function(){n.removeEventListener("click",l),a().enablePageScroll()},clear:function(){r.classList.replace("visible","invisible"),n.setAttribute("aria-expanded",!1),i.classList.remove("hidden"),c.classList.add("hidden"),a().enablePageScroll()}}}},7359:(e,t,n)=>{n.d(t,{default:()=>a});var r=n(9581);const a=function(){var e=Array.from((0,r.n)("meganav-control-mobile-panel-close")),t=Array.from((0,r.n)("meganav-control-mobile-panel-open"));return e.map((function(e){var n=t.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),r=document.querySelector("#".concat(e.getAttribute("aria-controls"))),a=function(e,t,n){return function(){e.setAttribute("aria-expanded",!1),t.setAttribute("aria-expanded",!1),n.classList.replace("block","hidden"),n.style.height=null}}(e,n,r);return e.addEventListener("click",a),{teardown:function(){return e.removeEventListener("click",a)},clear:function(){return e.setAttribute("aria-expanded",!1)}}}))}},9552:(e,t,n)=>{n.d(t,{default:()=>a});var r=n(9581);const a=function(){var e,t=Array.from((0,r.n)("meganav-control-mobile-panel-close")),n=Array.from((0,r.n)("meganav-control-mobile-panel-open")),a=(0,r.A)("meganav-mobile-dropdown"),o=(e=getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"),parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize));return n.map((function(e){var n=t.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),r=document.querySelector("#".concat(e.getAttribute("aria-controls"))),i=function(e,t,n){return function(){e.setAttribute("aria-expanded",!0),t.setAttribute("aria-expanded",!0),n.classList.replace("hidden","block"),n.style.height="".concat(window.innerHeight-o>n.offsetHeight?n.offsetHeight:window.innerHeight-o,"px")}}(e,n,r);return e.addEventListener("click",i),{teardown:function(){return e.removeEventListener("click",i)},clear:function(){r.classList.replace("block","hidden"),a.classList.remove("ui-meganav-mobile-dropdown-expand"),e.setAttribute("aria-expanded",!1),r.style.height=null}}}))}},6364:(e,t,n)=>{n.d(t,{default:()=>i});var r=n(9581),a=n(5090),o=n.n(a);const i=function(e){if(!e)return console.log("No AddSearch API key provided, skipping search suggestions."),[];var t=new(o())(e);return[(0,r.A)("meganav-search-input"),(0,r.A)("meganav-mobile-search-input")].filter((function(e){return e})).map((function(e){var n=e.parentNode,a=(0,r.A)("meganav-search-autocomplete-container",n),o=(0,r.A)("meganav-search-autocomplete-list",n),i=(0,r.A)("meganav-search-input-clear",n);return function(e){var t=e.input,n=e.container,r=e.listContainer,a=e.clear,o=e.client;o.setAnalyticsTag("Meganav autocomplete"),o.setThrottleTime(400);var i,c=function(){n.classList.add("hidden"),r.innerHTML=""},l=function(e){(e||"").length>0&&a?a.classList.remove("invisible"):a&&a.classList.add("invisible")},u=function(e,t){return e.replace(t.toLowerCase(),'<span class="font-light">'.concat(t,"</span>"))},s=function(e){return window.location="/search?q=".concat(e)},d=function(e){var t=r.querySelector('[data-suggestion-index="'.concat(e+1,'"]'));t&&t.focus()},f=function(e){var t=e-1,n=r.querySelector('[data-suggestion-index="'.concat(t,'"]'));n&&n.focus()},v=function(e){var a=e.target.value;"ArrowDown"!==e.key?a?o.suggestions(a,function(e){return function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(l(e),Array.isArray(a.suggestions))if(0!==a.suggestions.length){var o=a.suggestions.map((function(n,r){var a=document.createElement("li"),o=document.createElement("button");return o.type="button",o.classList.add("ui-text-menu2","font-medium","p-8","w-full","text-left","rounded","hover:text-gui-hover","focus:outline-gui-focus","hover:bg-light-grey"),o.innerHTML=u(n.value,e),o.dataset.suggestionIndex=r,o.addEventListener("click",(function(){s(n.value)})),o.addEventListener("keydown",(function(e){var a=e.key;"ArrowDown"===a?d(r):"ArrowUp"===a&&r-1<0?t.focus():"ArrowUp"===a&&r-1>=0?f(r):"Enter"!==a&&"Space"!==a||s(n.value)})),a.appendChild(o),a}));r.innerHTML="",o.forEach((function(e){return r.appendChild(e)})),n.classList.remove("hidden")}else c();else c()}}(a)):c():d(0)};return a&&(i=function(){t.value="",a.classList.add("invisible"),c()},a.addEventListener("click",i)),t.addEventListener("keyup",v),{teardown:function(){t.removeEventListener("keyup",v),a&&a.removeEventListener("click",i)},clear:function(){t.value="",c()}}}({input:e,container:a,listContainer:o,client:t,clear:i})}))}},3169:(e,t,n)=>{n.d(t,{default:()=>d});var r=n(9581),a=function(e){return new DOMMatrix(window.getComputedStyle(e).transform).e},o=function(e,t){return e.style.transform="translateX(".concat(t,"px)")},i=function(e,t){return e>=t},c=function(e,t,n,r){return Math.abs(e-n+r)>t},l=function(e,t){var n;return(null===(n=e.changedTouches[0])||void 0===n?void 0:n.clientX)-t},u=function(e){return Math.abs(e)<5},s=function(e){return e.map((function(e){return e.getBoundingClientRect().width})).reduce((function(e,t){return e+t}),0)};const d=function(){var e,t=(0,r.A)("meganav-mobile-search-input"),n=(0,r.A)("meganav-mobile-search-suggestions"),d=n.querySelector("ul"),f=Array.from(d.querySelectorAll("li")),v=function(e,t){var n=a(d),r=Math.round(n+e);i(r,t)&&(r=0),o(d,r)},m=function(e,t){var n=d.getBoundingClientRect().width,r=a(d),i=s(f),l=Math.round(r+e);c(l,i,n,t)&&(l=-(i-n+t)),o(d,l)},p=function(t){var n;e=null===(n=t.touches[0])||void 0===n?void 0:n.clientX},g=function(t){var n=l(t,e);u(n)||(n>0?function(e,t){var n=a(d),r=Math.round(n+e);i(r,24)||o(d,r)}(n):function(e,t){var n=d.getBoundingClientRect().width,r=a(d),i=Math.round(r+e),l=s(f);c(i,l,n,96)||o(d,i)}(n))},b=function(t){var n=l(t,e);u(n)||(n>0?v(n,24):m(n,48))},h=function(){n.classList.add("max-h-96")},y=function(e){e.relatedTarget!==n.querySelectorAll("a")[0]&&n.classList.remove("max-h-96")};return t.addEventListener("focus",h),t.addEventListener("blur",y),n.addEventListener("touchstart",p),n.addEventListener("touchmove",g),n.addEventListener("touchend",b),n.addEventListener("wheel",(function(e){var t=4*e.deltaY;u(t)||(t>0?v(t,24):m(t,48))})),{teardown:function(){t.removeEventListener("focus",h),t.removeEventListener("blur",y),n.removeEventListener("touchstart",p),n.removeEventListener("touchmove",g),n.removeEventListener("touchend",b)},clear:function(){n.classList.remove("max-h-96"),d.style.transform="translateX(0px)"}}}},9581:(e,t,n)=>{n.d(t,{A:()=>r,n:()=>a});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))},a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}},5090:t=>{t.exports=e},2040:e=>{e.exports=t},6833:e=>{e.exports=n}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};return(()=>{o.d(i,{default:()=>g});var e=o(2040),t=o.n(e),n=o(9581),r=o(2498),a=o(1792),c=o(9552),l=o(7359),u=o(6364),s=o(3169);function d(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.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)?f(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=function(e){return window.onblur=function(){return e()},{teardown:function(){return window.onblur=null}}},m=function(e){var t=(0,n.A)("meganav"),r=function(n){t.contains(n.target)||e()};return document.addEventListener("click",r),{teardown:function(){return document.removeEventListener("click",r)}}},p=function(e){if("transparentToWhite"!==e)return{teardown:function(){}};var r=(0,n.A)("meganav"),a=(0,n.n)("meganav-link"),o=(0,n.A)("meganav-control-mobile-dropdown-menu"),i=(0,n.A)("meganav-control-mobile-dropdown-close"),c=(0,n.n)("meganav-control"),l=(0,n.A)("meganav-sign-up-btn"),u=[].concat(d(Array.from(c)),d(Array.from(a)),[(0,n.A)("meganav-logo")]),s=function(e){var t,n,r,a,c=["ui-icon-white","ui-icon-cool-black"],l=[].concat(c).reverse();e?(null==o||(t=o.classList).replace.apply(t,c),null==i||(n=i.classList).replace.apply(n,c)):(null==o||(r=o.classList).replace.apply(r,d(l)),null==i||(a=i.classList).replace.apply(a,d(l)))},f=function(e){e?(null==l||l.classList.replace("bg-white","bg-cool-black"),null==l||l.classList.replace("text-cool-black","text-white")):(null==l||l.classList.replace("bg-cool-black","bg-white"),null==l||l.classList.replace("text-white","text-cool-black"))},v=t()((function(){window.scrollY>5?(r.classList.replace("bg-transparent","bg-white"),f(!0),s(!0),u.forEach((function(e){return e.classList.replace("text-white","text-cool-black")}))):(r.classList.replace("bg-white","bg-transparent"),f(!1),s(!1),u.forEach((function(e){return e.classList.replace("text-cool-black","text-white")})))}),150);return document.addEventListener("scroll",v),{teardown:function(){return document.removeEventListener("scroll",v)}}};function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeName:null},t=e.themeName,n=e.addSearchApiKey,o=(0,r.default)(),i=(0,c.default)(),f=(0,l.default)(),g=(0,u.default)(n),b=(0,s.default)(),h=(0,a.default)({clearPanels:function(){return[].concat(d(i),d(f)).forEach((function(e){return e.clear()}))}}),y=function(){return[h,b].concat(d(i),d(f),d(o),d(g)).forEach((function(e){return e.clear()}))},A=[p(t),m(y),v(y),h,b].concat(d(o),d(i),d(f),d(g)).map((function(e){return e.teardown}));return function(){return A.forEach((function(e){return e()}))}}})(),i.default})()}));