PageSourceSearch

https://mammutco-panel.com/wp-content/themes/mammutco/assets/scripts/header.min.js?ver=1.1.30

js mammutco-panel.com collected 2026-10-05 03:35:20 UTC 26,991 bytes, 474 lines download raw bytes

vendor: 8,964 bytes, lines 1-5
1"use strict";
2
3function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
5function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEac
5h(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
6
7function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
8
9function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
11/* eslint-env browser */
12(function () {
13  'use strict';
14
15  document.addEventListener('DOMContentLoaded', function () {// Your custom JavaScript goes here
16  });
17})();
18
19var ModalManager = function () {
20  // window.addEventListener("beforeunload", () => {
21  // 	if (history.state && history.state.modalId) {
22  // 		history.replaceState(null, "", location.href);
23  // 	}
24  // });
25  var stack = [];
26  window.addEventListener("popstate", function () {
27    var last = stack.pop();
28
29    if (last && last.close) {
30      last.close();
31    }
32
33    document.documentElement.classList.remove("h-full", "overflow-hidden");
34  });
35  return {
36    register: function register(openFn, closeFn) {
37      // const stateId = Date.now() + Math.random();
38      return {
39        open: function open() {
40          document.documentElement.classList.add("h-full", "overflow-hidden"); // stack.push({ id: stateId, close: closeFn });
41          // history.pushState({ modalId: stateId }, "");
42        },
43        close: function close() {
44          document.documentElement.classList.remove("h-full", "overflow-hidden"); // if (history.state && history.state.modalId === stateId) {
45          // 	history.back();
46          // }
47        }
48      };
49    }
50  };
51}(); // prevent page from scroll
52
53
54function fixBody() {
55  var isChromeDesktop = /Chrome/.test(navigator.userAgent) && !/Mobile/.test(navigator.userAgent) && window.innerWidth >= 1024;
56  document.documentElement.classList.add("h-full", "overflow-hidden");
57
58  if (isChromeDesktop) {
59    document.documentElement.classList.add("pr-3.75");
60  }
61}
62
63; // let page scrolls
64
65function unfixBody() {
66  document.documentElement.classList.remove("h-full", "overflow-hidden", "pr-3.75");
67}
68
69;
70var origin = window.location.origin;
71
72var FormRequestApiv1 = function FormRequestApiv1(api) {
73  return "".concat(origin, "/api/v1/").concat(api, "/");
74};
75
76var CrmRequestApiv1 = function CrmRequestApiv1(api) {
77  return "https://mammut-erp.com/api/v1/".concat(api, "/");
78};
79
80function handleHeader() {
81  var modal = ModalManager.register();
82  var searchTimeout = null;
83  var previousActiveElement = null;
84  var scrollFrame = null;
85  var layerHideTimeout = null;
86  var searchRequestId = 0;
87  return {
88    isMenuOpen: false,
89    isSearchOpen: false,
90    intialActiveDropdown: "",
91    searchSmValue: "",
92    isScrolled: false,
93    // scrollTimeout: null,
94    searchItems: {},
95    isLoadingSearch: false,
96    searchError: false,
97    focusableSelector: 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not
97([tabindex="-1"])',
98    openMenu: function openMenu() {
99      var _this = this;
100
101      previousActiveElement = document.activeElement;
102      this.isMenuOpen = true;
103      modal.open();
104    },
105    closeMenu: function closeMenu() {
106      this.isMenuOpen = false;
107      this.isSearchOpen = false;
108      this.intialActiveDropdown = "";
109      modal.close();
110      this.hideModalLayer();
111      this.clearSearch();
112      this.restoreFocus();
113    },
114    openSearch: function openSearch() {
115      if (!this.isMenuOpen) {
116        previousActiveElement = document.activeElement;
117      }
118
119      this.isSearchOpen = true;
120      modal.open();
121
122      if (window.innerWidth < 1024) {
123        setTimeout(function () {
124          var input = document.getElementById("header-search-sm");
125          input === null || input === void 0 ? void 0 : input.focus();
126        }, 50);
127      } else {
128        this.showModalLayer();
129        setTimeout(function () {
130          var _document$getElementB;
131
132          (_document$getElementB = document.getElementById('header-search-sm')) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.focus();
133        }, 100);
134      }
135    },
136    closeSearch: function closeSearch() {
137      var _this2 = this;
138
139      this.isSearchOpen = false;
140      this.clearSearch();
141
142      if (!this.isMenuOpen) {
143        modal.close();
144        this.restoreFocus();
145      } else {
146        setTimeout(function () {
147          return _this2.focusFirstItem('#mobile-menu-panel');
148        }, 50);
149      }
150
151      this.hideModalLayer();
152    },
153    closeSearchLg: function closeSearchLg() {
154      if (window.innerWidth >= 1024) {
155        this.closeSearch();
156      }
157    },
158    toggleMenuItem: function toggleMenuItem(id) {
159      var forceOpen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
160
161      if (forceOpen || this.intialActiveDropdown !== id) {
162        this.intialActiveDropdown = id;
163      } else {
164        this.intialActiveDropdown = "";
165      }
166    },
167    closeMenuItemOnFocusOut: function closeMenuItemOnFocusOut(event) {
168      if (!event.currentTarget.contains(event.relatedTarget)) {
169        this.intialActiveDropdown = "";
170      }
171    },
172    mouseEnterMenuItem: function mouseEnterMenuItem(id) {
173      if (window.innerWidth >= 1024) {
174        this.intialActiveDropdown = id;
175      }
176    },
177    mouseLeaveMenuItem: function mouseLeaveMenuItem() {
178      if (window.innerWidth >= 1024) {
179        this.intialActiveDropdown = "";
180      }
181    },
182    checkScroll: function checkScroll() {
183      this.isScrolled = window.scrollY > 200;
184    },
185    showModalLayer: function showModalLayer() {
186      var layer = document.getElementById('fixed-modal-layer');
187      if (!layer) return;
188      clearTimeout(layerHideTimeout);
189      layer.classList.remove('hidden');
190      layer.style.pointerEvents = 'auto';
191      setTimeout(function () {
192        return layer.style.opacity = '1';
193      }, 10);
194    },
195    hideModalLayer: function hideModalLayer() {
196      var layer = document.getElementById('fixed-modal-layer');
197      if (!layer) return;
198      layer.style.opacity = '0';
199      layer.style.pointerEvents = 'none';
200      clearTimeout(layerHideTimeout);
201      layerHideTimeout = setTimeout(function () {
202        return layer.classList.add('hidden');
203      }, 300);
204    },
205    focusFirstItem: function focusFirstItem(containerSelector) {
206      var container = document.querySelector(containerSelector);
207      var first = container === null || container === void 0 ? void 0 : container.querySelector(this.focusableSelector);
208      first === null || first === void 0 ? void 0 : first.focus();
209    },
210    restoreFocus: function restoreFocus() {
211      if (previousActiveElement && typeof previousActiveElement.focus === 'function') {
212        previousActiveElement.focus();
213      }
214
215      previousActiveElement = null;
216    },
217    getActiveTrap: function getActiveTrap() {
218      if (this.isMenuOpen && window.innerWidth < 1024) {
219        return document.getElementById('mobile-menu-panel');
220      }
221
222      if (this.isSearchOpen && window.innerWidth >= 1024) {
223        return document.querySelector('.search-header-lg-container');
224      }
225
226      return null;
227    },
228    handleKeydown: function handleKeydown(event) {
229      if (event.key === 'Escape') {
230        if (this.isSearchOpen) {
231          this.closeSearch();
232          return;
233        }
234
235        if (this.intialActiveDropdown) {
236          this.intialActiveDropdown = "";
237          return;
238        }
239
240        if (this.isMenuOpen) {
241          this.closeMenu();
242        }
243      }
244
245      if (event.key !== 'Tab') return;
246      var trap = this.getActiveTrap();
247      if (!trap) return;
248      var focusable = Array.from(trap.querySelectorAll(this.focusableSelector)).filter(function (element) {
249        return element.offsetParent !== null;
250      });
251      if (focusable.length === 0) return;
252      var first = focusable[0];
253      var last = focusable[focusable.length - 1];
254
255      if (event.shiftKey && document.activeElement === first) {
256        event.preventDefault();
257        last.focus();
258      } else if (!event.shiftKey && document.activeElement === last) {
259        event.preventDefault();
260        first.focus();
261      }
262    },
263    handleSearchSm: function handleSearchSm() {
264      var _this3 = this;
265
266      return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
267        var _this3$searchSmValue;
268
269        var value, requestId, formData, response, result;
270        return _regeneratorRuntime().wrap(function _callee$(_context) {
271          while (1) {
272            switch (_context.prev = _context.next) {
273              case 0:
274                value = ((_this3$searchSmValue = _this3.searchSmValue) === null || _this3$searchSmValue === void 0 ? void 0 : _this3$searchSmValue.trim()) || "";
275
276                if (!(value.length < 3)) {
277                  _context.next = 6;
278                  break;
279                }
280
281                _this3.searchItems = {
282                  blog: [],
283                  landing: []
284                };
285                _this3.isLoadingSearch = false;
286                _this3.searchError = false;
287                return _context.abrupt("return");
288
289              case 6:
290                _this3.isLoadingSearch = true;
291                _this3.searchError = false;
292                requestId = ++searchRequestId;
293                _context.prev = 9;
294                formData = new FormData();
295                formData.append('search', value);
296                _context.next = 14;
297                return fetch(FormRequestApiv1('searchAll'), {
298                  method: 'POST',
299                  body: formData
300                });
301
302              case 14:
303                response = _context.sent;
304
305                if (response.ok) {
306                  _context.next = 17;
307                  break;
308                }
309
310                throw new Error('Network error');
311
312              case 17:
313                _context.next = 19;
314                return response.json();
315
316              case 19:
317                result = _context.sent;
318
319                if (!(requestId !== searchRequestId)) {
320                  _context.next = 22;
321                  break;
322                }
323
324                return _context.abrupt("return");
325
326              case 22:
327                _this3.searchItems = result.status && result.data ? {
328                  blog: result.data.blog || [],
329                  landing: result.data.landing || []
330                } : {
331                  blog: [],
332                  landing: []
333                };
334                _context.next = 31;
335                break;
336
337              case 25:
338                _context.prev = 25;
339                _context.t0 = _context["catch"](9);
340
341                if (!(requestId !== searchRequestId)) {
342                  _context.next = 29;
343                  break;
344                }
345
346                return _context.abrupt("return");
347
348              case 29:
349                _this3.searchItems = {
350                  blog: [],
351                  landing: []
352                };
353                _this3.searchError = true;
354
355              case 31:
356                _context.prev = 31;
357
358                if (requestId === searchRequestId) {
359                  _this3.isLoadingSearch = false;
360                }
361
362                return _context.finish(31);
363
364              case 34:
365              case "end":
366                return _context.stop();
367            }
368          }
369        }, _callee, null, [[9, 25, 31, 34]]);
370      }))();
371    },
372    clearSearch: function clearSearch() {
373      clearTimeout(searchTimeout);
374      searchRequestId++;
375      this.searchSmValue = "";
376      this.searchItems = {
377        blog: [],
378        landing: []
379      };
380      this.isLoadingSearch = false;
381      this.searchError = false;
382    },
383    init: function init() {
384      var _this4 = this;
385
386      this.checkScroll();
387      window.addEventListener('scroll', function () {
388        if (scrollFrame) return;
389        scrollFrame = window.requestAnimationFrame(function () {
390          _this4.checkScroll();
391
392          scrollFrame = null;
393        });
394      });
395      var prevIsDesktop = window.innerWidth >= 1024;
396      window.addEventListener("resize", function () {
397        var isDesktop = window.innerWidth >= 1024;
398
399        if (isDesktop !== prevIsDesktop) {
400          _this4.closeMenu();
401
402          _this4.intialActiveDropdown = "";
403          prevIsDesktop = isDesktop;
404        }
405
406        _this4.checkScroll();
407      });
408      var desktopParent = document.querySelector('#search-container-desktop');
409      var mobileParent = document.querySelector('#search-container-mobile');
410      var searchComponent = document.querySelector('#search-container-movable');
411
412      function moveSearchComponent() {
413        if (!desktopParent || !mobileParent || !searchComponent) return;
414
415        if (window.innerWidth < 1024) {
416          if (!mobileParent.contains(searchComponent)) {
417            mobileParent.appendChild(searchComponent);
418          }
419        } else {
420          if (!desktopParent.contains(searchComponent)) {
421            desktopParent.appendChild(searchComponent);
422          }
423        }
424      }
425
426      moveSearchComponent();
427      window.addEventListener('resize', moveSearchComponent);
428      var layer = document.getElementById('fixed-modal-layer');
429
430      if (layer) {
431        layer.addEventListener("click", function () {
432          if (_this4.isSearchOpen) {
433            _this4.closeSearchLg();
434          }
435        });
436      }
437
438      document.addEventListener("keydown", function (event) {
439        return _this4.handleKeydown(event);
440      });
441    }
442  };
443}
444
445function handleInputParent() {
446  return {
447    normalizeDigits: function normalizeDigits(str) {
448      var fa = ['Û°', 'Û±', 'Û²', 'Û³', 'Û´', 'Ûµ', 'Û¶', 'Û·', 'Û¸', 'Û¹'];
449      var ar = ['Ù ', 'Ù¡', 'Ù¢', 'Ù£', 'Ù¤', 'Ù¥', 'Ù¦', 'Ù§', 'Ù¨', 'Ù©'];
450      return str.split('').map(function (_char) {
451        if (fa.includes(_char)) return fa.indexOf(_char);
452        if (ar.includes(_char)) return ar.indexOf(_char);
453        if (/[0-9]/.test(_char)) return _char;
454        return '';
455      }).join('');
456    },
457    emptyInput: function emptyInput(event) {
458      var parentBox = event.target.closest('.input-box');
459      var inputOrTextarea = parentBox.querySelector('input, textarea');
460
461      if (inputOrTextarea) {
462        inputOrTextarea.value = '';
463      }
464    },
465    onPaste: function onPaste(e) {
466      var text = (e.clipboardData || window.clipboardData).getData('text');
467      var digitsOnly = this.normalizeDigits(text);
468
469      if (!/^\d+$/.test(digitsOnly)) {
470        e.preventDefault();
471      }
472    }
473  };
474}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.