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AE7Dc,EAAe5E,cAAcpH,OAAS,IAAKgL,EAAAA,EAAAA,MAAA6B,EAAAA,SAAA,YACxC7B,EAAAA,EAAAA,MAAC,gBAAIJ,EAAY,iCAAiC,KAAGoB,EAAezE,mBAAmB,OACtFyE,EAAe5E,cAAc0F,KAAI,SAAAC,UAAU5B,EAAAA,EAAAA,KAACN,EAAA,CAA6BE,WAAYgC,GAA/BA,EAAO7B,kBAEjEc,EAAe3E,gBAAkB2E,EAAe1E,eAAiB0E,EAAezE,oBAxChE,IAyCb4D,EAAAA,EAAAA,KAAC,KAAEvL,KAAM,GAA0CmD,OAAvC0D,EAAagD,iBAAiB,WAAe1G,OAANrB,GAASuJ,QAAS,kBAAM/E,EAAgB,SAAU,+BACjGiF,EAAAA,EAAAA,KAAC,QAAKC,UAAU,gDAAwCR,EAAY,4CAM5F,EC3CE7F,WAAY,aACZlB,cAAA,SAAcmJ,EAAKC,EAAMvO,GAErB,OAAOyM,EAAAA,EAAAA,KAAC,gBAAI,wCAChB,IARaK,EAA8BH,EAA9BG,UAAWE,EAAmBL,EAAnBK,MAAOvG,EAAYkG,EAAZlG","sources":["webpack://header-search-box/../../node_modules/react-dom/client.js","webpack://header-search-box/../../node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://header-search-box/../../node_modules/react/jsx-runtime.js","webpack://header-search-box/../../node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://header-search-box/../../node_modules/systemjs-webpack-interop/public-path.js","webpack://header-search-box/external system \"react\"","webpack://header-search-box/external system \"react-dom\"","webpack://header-search-box/webpack/bootstrap","webpack://header-search-box/webpack/runtime/__system_context__","webpack://header-search-box/webpack/runtime/define property getters","webpack://header-search-box/webpack/runtime/hasOwnProperty shorthand","webpack://header-search-box/webpack/runtime/make namespace object","webpack://header-search-box/webpack/runtime/publicPath","webpack://header-search-box/../../node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://header-search-box/../../node_modules/single-spa-react/lib/esm/single-spa-react.js","webpack://header-search-box/../../packages/ui/src/utilities/debounce.ts","webpack://header-search-box/../../packages/ui/src/utilities/matomo.ts","webpack://header-search-box/../../packages/ui/src/hooks/useSuggestions.ts","webpack://header-search-box/../../packages/ui/src/utilities/suggestions.ts","webpack://header-search-box/./src/app.tsx","webpack://header-search-box/./src/swecon-header-search-box.tsx"],"sourcesContent":["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","module.exports = __WEBPACK_EXTERNAL_MODULE__726__;","module.exports = __WEBPACK_EXTERNAL_MODULE__867__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(t){for(var n=1;n=0))return!1;var t=e.version.slice(0,e.version.indexOf(\".\"));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn(\"single-spa-react: \".concat(t.name||t.appName||t.childAppName,\"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.\")):console.warn(\"single-spa-react: \".concat(t.name||t.appName||t.childAppName,\"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).\")));var r=y(e,t,(function(){n(this)})),c=a(e,t)(),u=function(e){var t=e.reactDom,n=e.renderType,o=e.elementToRender,r=e.domElement,a=t[n];if(\"function\"!=typeof a)throw new Error('renderType \"'.concat(n,'\" did not return a function.'));switch(n){case\"createRoot\":case\"unstable_createRoot\":case\"createBlockingRoot\":case\"unstable_createBlockingRoot\":var c=a(r);return c.render(o),c;case\"hydrateRoot\":return a(r,o);case\"hydrate\":default:return a(o,r),null}}({elementToRender:r,domElement:c,reactDom:d(e),renderType:f(e)});e.domElements[t.name]=c,e.renderResults[t.name]=u}))}function l(e,t){return new Promise((function(n){e.unmountResolves[t.name]=n;var o=e.renderResults[t.name];o&&o.unmount?o.unmount():d(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function m(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var o=y(e,t,null),r=e.renderResults[t.name];if(r&&r.render)r.render(o);else{var c=a(e,t)();d(e).render(o,c)}}))}function d(e){return e.ReactDOMClient||e.ReactDOM}function f(e){return\"function\"==typeof e.renderType?e.renderType():e.renderType}function y(e,n,o){var r=e.React.createElement(e.rootComponent,n),a=c?e.React.createElement(c.Provider,{value:n},r):r;return(e.errorBoundary||n.errorBoundary||e.errorBoundaryClass||n.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||n.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName=\"SingleSpaReactErrorBoundary(\".concat(t.name,\")\")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,n),a=e.React.createElement(e.errorBoundaryClass,n,a)),a=e.React.createElement(e.SingleSpaRoot,t(t({},n),{},{mountFinished:o,updateFinished:function(){e.updateResolves[n.name]&&(e.updateResolves[n.name].forEach((function(e){return e()})),delete e.updateResolves[n.name])},unmountFinished:function(){e.unmountResolves[n.name]&&(e.unmountResolves[n.name](),delete e.unmountResolves[n.name])}}),a)}export{c as SingleSpaContext,i as default};\n//# sourceMappingURL=single-spa-react.js.map\n","export const debounce = (func: (...args: Args) => R, time: number) => {\r\n let timeout: NodeJS.Timeout;\r\n let valueToSend: Args | null = null;\r\n const debounced = (...args: Args) => {\r\n valueToSend = args;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(() => {\r\n func(...valueToSend!);\r\n }, time);\r\n };\r\n debounced.stop = () => clearTimeout(timeout);\r\n return debounced;\r\n}","type Matomo = {\r\n getCustomVariable(id: number, label?: string): string | null;\r\n getCustomDimension(id: number): string | null;\r\n getVisitorId(): string | null;\r\n isUserOptedOut(): boolean;\r\n};\r\n\r\nexport const sendMatomoEvent = (category: string, action: string, name?: string | null, value?: number | null) => {\r\n const data: any[] = ['trackEvent', category, action];\r\n if (name != null) data.push(name);\r\n if (value != null) {\r\n if (data.length == 3) data.push(null);\r\n data.push(value);\r\n }\r\n (window as any)._paq?.push(data);\r\n}\r\n\r\nexport const sendMatomoSearch = (keyword: string, category: string | false, results: number | false) => {\r\n (window as any)._paq?.push(['trackSiteSearch', keyword, category, results]);\r\n}\r\n\r\nexport const executeMatomoScript = (lambda: (matomo: Matomo) => T): T | null => {\r\n let result: T | null = null;\r\n (window as any)._paq?.push([function (this: Matomo) { result = lambda(this); }]);\r\n return result;\r\n}\r\n\r\nexport const setMatomoCustomDimension = (id: number, value: string) => {\r\n (window as any)._paq?.push(['setCustomDimension', id, value]);\r\n}\r\n\r\nexport const deleteMatomoCustomDimension = (id: number) => {\r\n (window as any)._paq?.push(['deleteCustomDimension', id]);\r\n}\r\n\r\nexport const getMatomoCustomDimension = (id: number): string | null => {\r\n return executeMatomoScript(mtm => mtm.getCustomDimension(id));\r\n}","import { useState, useMemo, useCallback } from 'react'\r\nimport { debounce } from \"../utilities/debounce\";\r\nimport { sendMatomoEvent, sendMatomoSearch } from '../utilities';\r\n\r\nexport type Suggestion = {\r\n displayName: string;\r\n itemNumber: string;\r\n url: string;\r\n}\r\n\r\nexport type SuggestionCategories = {\r\n spareParts: Suggestion[];\r\n usedParts: Suggestion[];\r\n machineModels: Suggestion[];\r\n sparePartsTotal: number;\r\n usedPartsTotal: number;\r\n machineModelsTotal: number;\r\n}\r\n\r\nconst getEmptySuggestionCategoriesObj = () => ({\r\n spareParts: [],\r\n usedParts: [],\r\n machineModels: [],\r\n sparePartsTotal: 0,\r\n usedPartsTotal: 0,\r\n machineModelsTotal: 0,\r\n})\r\n\r\nconst preloadState = (window as any).app.preloadState.headerSearchBox;\r\n\r\nexport const useCategorySuggestions = () => {\r\n const [value, setValue] = useState(\"\");\r\n const [results, setResults] = useState(getEmptySuggestionCategoriesObj());\r\n\r\n const process = useCallback(async (value: string) => {\r\n if (value.trim() === \"\") {\r\n setResults(getEmptySuggestionCategoriesObj());\r\n return;\r\n }\r\n const response = await fetch(`${preloadState.searchResultApi}?searchQuery=${value}`, {\r\n headers: {\r\n \"Swecon-Current-Language\": (window as any).app.preloadState.currentLanguage\r\n }\r\n });\r\n const data: SuggestionCategories = await response.json();\r\n setResults(data);\r\n }, []);\r\n\r\n const debouncedProcess = useMemo(() => debounce(process, 200), [process]);\r\n\r\n const onFocus = useCallback(() => {\r\n document.getElementsByTagName(\"body\")[0].classList.add(\"blurring\");\r\n sendMatomoEvent('Search', 'Focused');\r\n process(value);\r\n }, [value]);\r\n\r\n const search = useCallback(() => {\r\n sendMatomoEvent('Search', 'Go to result page', value);\r\n window.location.assign(`${preloadState.searchResultPage}?query=${value}`)\r\n }, [value]);\r\n\r\n const onKeyUp = useCallback((e: React.KeyboardEvent) => {\r\n if (e.key === \"Enter\") {\r\n sendMatomoEvent('Search', 'Enter clicked');\r\n search();\r\n }\r\n }, [search]);\r\n\r\n const onBlur = useCallback(() => {\r\n setTimeout(() => {\r\n setResults(getEmptySuggestionCategoriesObj());\r\n document.getElementsByTagName(\"body\")[0].classList.remove(\"blurring\");\r\n }, 200);\r\n }, []);\r\n\r\n const onInput = useCallback(async (e: React.FormEvent) => {\r\n const value = (e.target as HTMLInputElement).value;\r\n setValue(value);\r\n debouncedProcess(value);\r\n }, [debouncedProcess]);\r\n\r\n return {\r\n results,\r\n onFocus,\r\n onBlur,\r\n onKeyUp,\r\n value,\r\n onInput,\r\n search\r\n };\r\n}\r\n\r\n\r\nexport const useSuggestions = () => {\r\n const preloadState = (window as any).app.preloadState.headerSearchBox;\r\n const [value, setValue] = useState(\"\");\r\n const [results, setResults] = useState([]);\r\n\r\n const onFocus = () => {\r\n document.getElementsByTagName(\"body\")[0].classList.add(\"blurring\");\r\n }\r\n\r\n const search = useCallback(() => {\r\n window.location.assign(`${preloadState.searchResultPage}?query=${value}`)\r\n }, [value]);\r\n\r\n const onKeyUp = useCallback((e: React.KeyboardEvent) => {\r\n if (e.key === \"Enter\") {\r\n search();\r\n }\r\n }, [search]);\r\n\r\n const onBlur = () => {\r\n setTimeout(() => {\r\n setResults([]);\r\n document.getElementsByTagName(\"body\")[0].classList.remove(\"blurring\");\r\n }, 200);\r\n }\r\n\r\n const process = useMemo(() => debounce(async (value: string) => {\r\n if (value === \"\") {\r\n setResults([]);\r\n return;\r\n }\r\n const response = await fetch(`${preloadState.searchResultApi}?searchQuery=${value}`, {\r\n headers: {\r\n \"Swecon-Current-Language\": (window as any).app.preloadState.currentLanguage\r\n }\r\n });\r\n const data: Suggestion[] = await response.json();\r\n setResults(data);\r\n }, 200), []);\r\n\r\n const onInput = useCallback(async (e: React.FormEvent) => {\r\n const value = (e.target as HTMLInputElement).value;\r\n setValue(value);\r\n process(value);\r\n }, [process]);\r\n\r\n return {\r\n results,\r\n onFocus,\r\n onBlur,\r\n onKeyUp,\r\n value,\r\n onInput,\r\n search\r\n };\r\n}\r\n","import { SuggestionCategories } from \"..\";\r\n\r\nexport const getSuggestions = (results: SuggestionCategories, oneCategoryMax: number, allCategoriesMax: number) => {\r\n const shownResults: SuggestionCategories = {\r\n ...results,\r\n spareParts: results.spareParts.slice(0, oneCategoryMax),\r\n usedParts: results.usedParts.slice(0, oneCategoryMax),\r\n machineModels: results.machineModels.slice(0, oneCategoryMax)\r\n };\r\n let sparePartsIndex = shownResults.spareParts.length;\r\n let usedPartsIndex = shownResults.usedParts.length;\r\n let machineModelsIndex = shownResults.machineModels.length;\r\n\r\n const hasEnoughItems = () => shownResults.spareParts.length + shownResults.usedParts.length + shownResults.machineModels.length >= allCategoriesMax;\r\n const hasSparePartsAvailable = () => sparePartsIndex < results.spareParts.length;\r\n const hasUsedPartsAvailable = () => usedPartsIndex < results.usedParts.length;\r\n const hasMachineModelsAvailable = () => machineModelsIndex < results.machineModels.length;\r\n\r\n while (!hasEnoughItems() && (hasSparePartsAvailable() || hasUsedPartsAvailable() || hasMachineModelsAvailable())) {\r\n if (hasSparePartsAvailable()) {\r\n shownResults.spareParts.push(results.spareParts[sparePartsIndex]);\r\n sparePartsIndex++;\r\n if (hasEnoughItems()) {\r\n break;\r\n }\r\n }\r\n if (hasUsedPartsAvailable()) {\r\n shownResults.usedParts.push(results.usedParts[usedPartsIndex]);\r\n usedPartsIndex++;\r\n if (hasEnoughItems()) {\r\n break;\r\n }\r\n }\r\n if (hasMachineModelsAvailable()) {\r\n shownResults.machineModels.push(results.machineModels[machineModelsIndex]);\r\n machineModelsIndex++;\r\n if (hasEnoughItems()) {\r\n break;\r\n }\r\n }\r\n }\r\n return shownResults;\r\n}","import React, { useMemo, useRef } from \"react\";\r\nimport { getSuggestions, sendMatomoEvent, sendMatomoSearch, Suggestion, SuggestionCategories, useCategorySuggestions } from 'ui'\r\n\r\nconst oneCategoryMax: number = 3;\r\nconst allCategoriesMax: number = 3 * oneCategoryMax;\r\nconst translation = (window as any).app.preloadState.translation;\r\nconst preloadState = (window as any).app.preloadState.headerSearchBox;\r\n\r\nexport default function App() {\r\n const { results, onFocus, onBlur, onInput, onKeyUp, value, search } = useCategorySuggestions();\r\n const inputRef = useRef(null);\r\n const visibleResults: SuggestionCategories = useMemo(() => {\r\n const visible = getSuggestions(results, oneCategoryMax, allCategoriesMax);\r\n if (inputRef.current?.value) {\r\n sendMatomoSearch(inputRef.current?.value, false, visible.sparePartsTotal + visible.usedPartsTotal + visible.machineModelsTotal);\r\n }\r\n return visible;\r\n }, [results]);\r\n\r\n const onSearchIconClick = () => {\r\n if (inputRef?.current?.value?.length && inputRef?.current?.value?.length > 0) {\r\n search();\r\n } else {\r\n inputRef?.current?.focus();\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
onSearchIconClick()}>
\r\n {(visibleResults.machineModels.length > 0 || visibleResults.usedParts.length > 0 || visibleResults.spareParts.length > 0) &&
\r\n {visibleResults.spareParts.length > 0 && <>\r\n
{translation[\"headerSearchBox.spareParts\"]} ({visibleResults.sparePartsTotal})
\r\n {visibleResults.spareParts.map(result => )}\r\n }\r\n {visibleResults.usedParts.length > 0 && <>\r\n
{translation[\"headerSearchBox.usedParts\"]} ({visibleResults.usedPartsTotal})
\r\n {visibleResults.usedParts.map(result => )}\r\n }\r\n {visibleResults.machineModels.length > 0 && <>\r\n
{translation[\"headerSearchBox.machineModels\"]} ({visibleResults.machineModelsTotal})
\r\n {visibleResults.machineModels.map(result => )}\r\n }\r\n {visibleResults.sparePartsTotal + visibleResults.usedPartsTotal + visibleResults.machineModelsTotal >= allCategoriesMax &&\r\n sendMatomoEvent('Search', 'Show all clicked')}>\r\n {translation[\"sparePartItem.showAllSpareParts\"]}\r\n \r\n }\r\n
}\r\n
\r\n )\r\n}\r\n\r\nconst Item = ({ suggestion }: { suggestion: Suggestion }) => {\r\n return sendMatomoEvent('Search', 'Item clicked', suggestion.itemNumber)}>\r\n {suggestion.displayName} - {translation[\"sparePartItem.articleNo\"]}: {suggestion.itemNumber}\r\n \r\n}\r\n","import React from \"react\";\r\nimport ReactDOMClient from 'react-dom/client';\r\nimport singleSpaReact from \"single-spa-react\";\r\nimport rootComponent from \"./app\";\r\n\r\nexport const { bootstrap, mount, unmount } = singleSpaReact({\r\n React,\r\n ReactDOMClient,\r\n rootComponent,\r\n renderType: \"createRoot\",\r\n errorBoundary(err, info, props) {\r\n // https://reactjs.org/docs/error-boundaries.html\r\n return
An unhandled frontend error occurred
;\r\n },\r\n});\r\n"],"names":["m","exports","createRoot","hydrateRoot","f","k","Symbol","for","l","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","module","resolveDirectory","rootDirLevel","meta","url","console","error","Error","urlString","rootDirectoryLevel","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","Number","isInteger","__WEBPACK_EXTERNAL_MODULE__726__","__WEBPACK_EXTERNAL_MODULE__867__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","y","__system_context__","definition","o","defineProperty","enumerable","get","obj","prop","r","toStringTag","value","autoPublicPath","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","push","apply","arguments","forEach","getOwnPropertyDescriptors","defineProperties","iterator","constructor","configurable","writable","domElement","domElementGetter","appName","name","concat","getElementById","id","body","appendChild","HTMLElement","require","createContext","u","React","ReactDOM","ReactDOMClient","rootComponent","loadRootComponent","errorBoundary","errorBoundaryClass","parcelCanUpdate","suppressComponentDidCatchWarning","domElements","renderResults","updateResolves","unmountResolves","s","Promise","resolve","then","version","indexOf","componentDidCatch","warn","childAppName","this","renderType","elementToRender","reactDom","render","unmount","unmountComponentAtNode","Provider","Component","state","caughtError","caughtErrorInfo","displayName","create","children","setState","SingleSpaRoot","mountFinished","updateFinished","unmountFinished","sendMatomoEvent","category","action","_window__paq","data","window","_paq","preloadState","app","headerSearchBox","useCategorySuggestions","_useState","_sliced_to_array","useState","setValue","_useState1","spareParts","usedParts","machineModels","sparePartsTotal","usedPartsTotal","machineModelsTotal","results","setResults","process","useCallback","_async_to_generator","trim","fetch","searchResultApi","headers","currentLanguage","_state","sent","json","debouncedProcess","useMemo","func","valueToSend","debounced","args","Array","_len","_key","clearTimeout","timeout","setTimeout","stop","onFocus","getElementsByTagName","classList","add","search","location","assign","searchResultPage","onKeyUp","onBlur","remove","onInput","target","getSuggestions","oneCategoryMax","allCategoriesMax","shownResults","_object_spread_props","_object_spread","sparePartsIndex","usedPartsIndex","machineModelsIndex","hasEnoughItems","hasSparePartsAvailable","hasUsedPartsAvailable","hasMachineModelsAvailable","translation","Item","param","suggestion","_jsxs","onClick","itemNumber","_jsx","className","_singleSpaReact","componentDidMount","componentWillUnmount","bootstrap","bind","mount","update","singleSpaReact","_useCategorySuggestions","inputRef","useRef","visibleResults","_inputRef_current","_inputRef_current1","visible","keyword","sendMatomoSearch","spellCheck","autoComplete","placeholder","_inputRef_current_value","_inputRef_current_value1","_inputRef_current2","focus","_Fragment","map","result","err","info"],"sourceRoot":""}