{"version":3,"sources":["webpack:///./app/components/o/jobfind/index.js","webpack:///./app/components/o/jobfind/src/lib/i18n.js","webpack:///./app/components/o/jobfind/src/lib/FilterValues.js","webpack:///./app/components/o/jobfind/src/components/a/CheckboxField.js","webpack:///./app/components/o/jobfind/src/components/m/CheckboxSetField.js","webpack:///./app/components/o/jobfind/src/components/m/SelectPicker.js","webpack:///./app/components/o/jobfind/src/lib/Viewport.js","webpack:///./app/components/o/jobfind/src/lib/Filter.js","webpack:///./app/components/o/jobfind/src/components/o/JobFilters.js","webpack:///./app/components/o/jobfind/src/components/m/JobResult.js","webpack:///./app/components/o/jobfind/src/components/o/JobResults.js","webpack:///./app/components/o/jobfind/src/lib/Pager.js","webpack:///./app/components/o/jobfind/src/JobFind.js"],"names":["JOBFIND_DATA","console","error","render","h","JobFind","settings","items","document","querySelector","_module","module","_module$hot","hot","accept","i18n","constructor","_JOBFIND_DATA","_JOBFIND_DATA$setting","translations","arguments","length","undefined","_classPrivateFieldInitSpec","_translations","writable","value","_classPrivateFieldSet","init","t","key","_classPrivateFieldGet","FilterValues","country","department","brands","_defineProperty","values","new","create","filterValues","isEmpty","CheckboxField","Component","props","state","className","type","checked","onChange","e","currentTarget","label","PropTypes","string","isRequired","bool","func","CheckboxSetField","selection","wrapperRef","createRef","expanded","handleClickOutside","bind","componentDidMount","addEventListener","componentWillUnmount","removeEventListener","isSelected","item","includes","handleSelectionChange","push","filter","val","setState","target","contains","current","emptyLabel","collapsible","ref","Fragment","onClick","map","disabled","arrayOf","shape","SelectPicker","componentWillReceiveProps","nextProps","nextContext","handleValueChange","closeOnSelection","VIEWPORT_XS","VIEWPORT_SM","VIEWPORT_MD","VIEWPORT_LG","VIEWPORT_XL","Viewport","isXS","query","_classStaticPrivateFieldSpecGet","_breakpoints","sm","window","matchMedia","matches","isSM","md","isMD","lg","isLG","xl","isXL","curr","_items","WeakMap","_results","_filteredCount","_allCount","Filter","getResults","getFilteredCount","getAllCount","toLowerCase","brand","sort","field","_sort","a","b","_filter","JobFilters","departments","selectedCountry","selectedDepartment","selectedBrands","showDepartments","showDepartmentsAndBrands","showBrands","brandsCollapsible","activeTracking","handleViewportChange","filterProps","onInit","componentDidUpdate","filtered","results","filteredCount","allCount","disableDepartments","disableBrands","enabledBrands","trackingEventData","eventtype","jobcategory","selectedfilteroptions","Set","index","join","track","_this$state","_this$state$filterVal","_this$state2","_this$state2$filterVa","reset","filterResults","onFilterReset","handleCountriesChange","handleDepartmentChange","handleBrandsChange","brandsSelection","handleFilterReset","_props$brands","countries","viewBox","xmlns","id","transform","fill","d","array","number","JobResult","href","link","title","address","JobResults","Pager","pageSize","_pageSize","_hasItemsLeft","_itemsLeft","getItemsLeft","getHasItemsLeft","nextPage","currPage","itemsToShow","slice","_pager","sortBrands","order","res","i","sortedBrands","dropDownCountries","dropDownDepartments","dropDownBrands","paginatedResults","hasItemsLeft","itemsLeft","_ref","_ref2","_ref3","object"],"mappings":";;;;;;;;;;;;;;;AAAmC;AACC;;AAEpC;AACA,IAAI,OAAOA,YAAY,KAAK,WAAW,EAAE;EACvCC,OAAO,CAACC,KAAK,CAAC,gGAAgG,CAAC;AACjH,CAAC,MAAM;EACL;EACAC,qDAAM,CACJC,gDAAA,CAACC,oDAAO;IAACC,QAAQ,EAAEN,YAAY,CAACM,QAAS;IAACC,KAAK,EAAEP,YAAY,CAACO;EAAM,EAAG,EACvEC,QAAQ,CAACC,aAAa,CAAC,cAAc,CAAC,CACvC;AACH;AAEA,IAAI,SAAAC,OAAA,GAAOC,MAAM,cAAAD,OAAA,wBAAAE,WAAA,GAANF,OAAA,CAAQG,GAAG,cAAAD,WAAA,uBAAXA,WAAA,CAAaE,MAAM,MAAK,UAAU,EAAE;EAC7C;EACAH,MAAM,CAACE,GAAG,CAACC,MAAM,EAAE;AACrB,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjBe,MAAMC,SAAI,CAAC;EAIxB;AACF;AACA;AACA;EACEC,WAAWA,CAAA,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AAI,CAAC3I,QAAQ,CAAC;UAAEyE,OAAO;UAAEC,aAAa;UAAEC;QAAS,CAAC,CAAC;MAAA,CAAC;MACxGkB,aAAa,EAAE+C,KAAA;QAAA,IAAC;UAAEnE,OAAO;UAAEC,aAAa;UAAEC;QAAS,CAAC,GAAAiE,KAAA;QAAA,OAClD,IAAI,CAAC5I,QAAQ,CAAC;UAAEyE,OAAO;UAAEC,aAAa;UAAEC,QAAQ;UAAEgD,QAAQ,EAAE;QAAE,CAAC,CAAC;MAAA;IACjE,EACD,CACE,EAENnM,0BAAA;MAAK0C,SAAS,EAAC;IAAiB,GAC9B1C,0BAAA,CAAC0L,qBAAU;MAACvL,KAAK,EAAE4M;IAAiB,EAAG,EAEtCC,YAAY,GACXhN,0BAAA;MAAK0C,SAAS,EAAC;IAAK,GAClB1C,0BAAA;MAAK0C,SAAS,EAAC;IAAsC,GACnD1C,0BAAA;MACE0C,SAAS,EAAC,mCAAmC;MAC7CsC,OAAO,EAAEA,CAAA,KAAM;QACb,IAAI,CAACR,QAAQ,CAAC;UAAE2H,QAAQ,EAAEA,QAAQ,GAAG;QAAE,CAAC,CAAC;MAC3C;IAAE,GAEA,GAAExL,SAAI,CAACa,IAAI,EAAE,CAACC,CAAC,CAAC,WAAW,CAAE,KAAIwL,SAAU,GAAE,CACxC,CACL,CACF,GACJ,IAAI,CACJ,CACF,CACF;EAEV;AACF;AAjJE;AAAAjL,wBAAA,CADmB/B,eAAO,eAEP;EACjBC,QAAQ,EAAE+C,oBAAS,CAACoK,MAAM;EAC1BlN,KAAK,EAAE8C,oBAAS,CAACkI;AACnB,CAAC,E","file":"jobfind.chunk.js","sourcesContent":["import { h, render } from 'preact';\r\nimport JobFind from './src/JobFind';\r\n\r\n// abort early if no data was specified\r\nif (typeof JOBFIND_DATA === 'undefined') {\r\n  console.error('No data found! Please specify the data via the JSON_DATA variable within the body of the page.');\r\n} else {\r\n  // render the component\r\n  render(\r\n    <JobFind settings={JOBFIND_DATA.settings} items={JOBFIND_DATA.items} />,\r\n    document.querySelector('#jobfind-app')\r\n  );\r\n}\r\n\r\nif (typeof module?.hot?.accept === 'function') {\r\n  // enable hot-reloading\r\n  module.hot.accept();\r\n}\r\n","export default class i18n {\r\n  //\r\n  #translations = {};\r\n\r\n  /**\r\n   *\r\n   * @param translations\r\n   */\r\n  constructor(translations = null) {\r\n    //\r\n    this.#translations = translations !== null ? translations : JOBFIND_DATA?.settings?.i18n;\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param translations\r\n   * @returns {i18n}\r\n   */\r\n  static init(translations = null) {\r\n    return new i18n();\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param key\r\n   * @returns {*}\r\n   */\r\n  t(key) {\r\n    return this.#translations[key];\r\n  }\r\n}\r\n","export default class FilterValues {\r\n  //\r\n  values = {\r\n    country: undefined,\r\n    department: undefined,\r\n    brands: [],\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param country\r\n   * @param department\r\n   * @param brands\r\n   */\r\n  constructor(country = undefined, department = undefined, brands = []) {\r\n    //\r\n    this.values.country = country;\r\n    this.values.department = department;\r\n    this.values.brands = brands;\r\n  }\r\n\r\n  /**\r\n   * Create a new filter-values object\r\n   * with the given values\r\n   * @param country\r\n   * @param department\r\n   * @param brands\r\n   * @returns {{country: undefined, brands: *[], department: undefined}}\r\n   */\r\n  static new(country = undefined, department = undefined, brands = []) {\r\n    return new FilterValues(country, department, brands).values;\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param filterValues\r\n   * @returns {FilterValues}\r\n   */\r\n  static create(filterValues) {\r\n    return new FilterValues(filterValues.country, filterValues.department, filterValues.brands);\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @returns {boolean}\r\n   */\r\n  isEmpty() {\r\n    return this.values.country === undefined && this.values.department === undefined && this.values.brands.length === 0;\r\n  }\r\n}\r\n","import { h, Component } from 'preact';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport default class CheckboxField extends Component {\r\n  //\r\n  static propTypes = {\r\n    label: PropTypes.string.isRequired,\r\n    checked: PropTypes.bool,\r\n    onChange: PropTypes.func.isRequired,\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   * @param state\r\n   * @returns {JSX.Element}\r\n   */\r\n  render(props, state) {\r\n    return (\r\n      <label className=\"checkbox-field\">\r\n        <input type=\"checkbox\" checked={props.checked} onChange={(e) => props.onChange(e.currentTarget.checked)} />\r\n        {props.label}\r\n      </label>\r\n    );\r\n  }\r\n}\r\n","import { h, Component, Fragment, createRef } from 'preact';\r\nimport PropTypes from 'prop-types';\r\nimport CheckboxField from '../a/CheckboxField';\r\n\r\nexport default class CheckboxSetField extends Component {\r\n  //\r\n  static propTypes = {\r\n    emptyLabel: PropTypes.string.isRequired,\r\n    collapsible: PropTypes.bool,\r\n    items: PropTypes.arrayOf(\r\n      PropTypes.shape({\r\n        value: PropTypes.string.isRequired,\r\n        label: PropTypes.string.isRequired,\r\n      })\r\n    ),\r\n    selection: PropTypes.arrayOf(\r\n      PropTypes.shape({\r\n        value: PropTypes.string.isRequired,\r\n        label: PropTypes.string.isRequired,\r\n      })\r\n    ),\r\n    onChange: PropTypes.func.isRequired,\r\n  };\r\n\r\n  //\r\n  static defaultProps = {\r\n    collapsible: false,\r\n    selection: [],\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   */\r\n  constructor(props) {\r\n    super();\r\n\r\n    //\r\n    const { selection } = props;\r\n\r\n    //\r\n    this.wrapperRef = createRef();\r\n\r\n    this.state = {\r\n      expanded: false,\r\n      selection: selection,\r\n    };\r\n\r\n    //\r\n    this.handleClickOutside = this.handleClickOutside.bind(this);\r\n  }\r\n\r\n  /**\r\n   *\r\n   */\r\n  componentDidMount() {\r\n    document.addEventListener('mousedown', this.handleClickOutside);\r\n  }\r\n\r\n  /**\r\n   *\r\n   */\r\n  componentWillUnmount() {\r\n    document.removeEventListener('mousedown', this.handleClickOutside);\r\n  }\r\n\r\n  /**\r\n   * Return whether the given item should be\r\n   * marked as check or not\r\n   * @param item\r\n   * @returns {*}\r\n   */\r\n  isSelected(item) {\r\n    const { selection } = this.state;\r\n\r\n    return selection.includes(item);\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param value\r\n   * @param checked\r\n   */\r\n  handleSelectionChange(value, checked) {\r\n    let { selection } = this.state;\r\n    const { onChange } = this.props;\r\n\r\n    // add remove given value\r\n    if (checked) {\r\n      selection.push(value);\r\n    } else {\r\n      selection = selection.filter((val) => val !== value);\r\n    }\r\n\r\n    //\r\n    this.setState({ selection }, () => {\r\n      onChange(selection);\r\n    });\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param e\r\n   */\r\n  handleClickOutside(e) {\r\n    // close the picker if we detected a\r\n    // click outside of the component\r\n    if (e.target.contains(this.wrapperRef.current)) {\r\n      this.setState({ expanded: false });\r\n    }\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   * @param state\r\n   */\r\n  render(props, state) {\r\n    const { emptyLabel, collapsible, items } = props;\r\n    const { expanded } = state;\r\n\r\n    return (\r\n      <div ref={this.wrapperRef} className={`checkbox-set-field${collapsible ? ' collapsible' : ''}`}>\r\n        {collapsible ? (\r\n          <>\r\n            <button\r\n              className={`checkbox-set-field__toggle${expanded ? ' show' : ''}`}\r\n              onClick={() => this.setState({ expanded: !expanded })}\r\n            >\r\n              <span className=\"checkbox-set-field__toggle-label\">{emptyLabel}</span>\r\n            </button>\r\n            {expanded ? (\r\n              <div className=\"checkbox-set-field__dropdown-menu\">\r\n                {items && items.length > 0 ? (\r\n                  <ul className=\"checkbox-set-field__dropdown-menu-items\">\r\n                    {items.map((item) => {\r\n                      return (\r\n                        <li\r\n                          className={`checkbox-set-field__dropdown-menu-items-item${item.disabled ? ' disabled' : ''}`}\r\n                        >\r\n                          <CheckboxField\r\n                            label={item.label}\r\n                            checked={this.isSelected(item.value)}\r\n                            onChange={(checked) => this.handleSelectionChange(item.value, checked)}\r\n                          />\r\n                        </li>\r\n                      );\r\n                    })}\r\n                  </ul>\r\n                ) : null}\r\n              </div>\r\n            ) : null}\r\n          </>\r\n        ) : (\r\n          <>\r\n            {items && items.length > 0 ? (\r\n              <ul className=\"checkbox-set-field__dropdown-menu-items\">\r\n                {items.map((item) => {\r\n                  return (\r\n                    <li className={`checkbox-set-field__dropdown-menu-items-item${item.disabled ? ' disabled' : ''}`}>\r\n                      <CheckboxField\r\n                        label={item.label}\r\n                        checked={this.isSelected(item.value)}\r\n                        onChange={(checked) => this.handleSelectionChange(item.value, checked)}\r\n                      />\r\n                    </li>\r\n                  );\r\n                })}\r\n              </ul>\r\n            ) : null}\r\n          </>\r\n        )}\r\n      </div>\r\n    );\r\n  }\r\n}\r\n","import { h, Component, createRef, Fragment } from 'preact';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport default class SelectPicker extends Component {\r\n  //\r\n  static propTypes = {\r\n    value: PropTypes.string,\r\n    emptyLabel: PropTypes.string.isRequired,\r\n    items: PropTypes.shape({\r\n      value: PropTypes.string.isRequired,\r\n      label: PropTypes.string.isRequired,\r\n    }),\r\n    onChange: PropTypes.func.isRequired,\r\n  };\r\n\r\n  static defaultProps = {\r\n    value: null,\r\n    emptyLabel: 'Option wählen',\r\n    closeOnSelection: true,\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   */\r\n  constructor(props) {\r\n    super();\r\n\r\n    const { value } = props;\r\n\r\n    //\r\n    this.wrapperRef = createRef();\r\n\r\n    //\r\n    this.state = {\r\n      value: value === null ? value : null,\r\n      expanded: false,\r\n    };\r\n\r\n    //\r\n    this.handleClickOutside = this.handleClickOutside.bind(this);\r\n  }\r\n\r\n  /**\r\n   *\r\n   */\r\n  componentDidMount() {\r\n    document.addEventListener('mousedown', this.handleClickOutside);\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param nextProps\r\n   * @param nextContext\r\n   */\r\n  componentWillReceiveProps(nextProps, nextContext) {\r\n    const { value } = this.state;\r\n    if (nextProps.value !== value) {\r\n      this.setState({ value: nextProps.value });\r\n    }\r\n  }\r\n\r\n  /**\r\n   *\r\n   */\r\n  componentWillUnmount() {\r\n    document.removeEventListener('mousedown', this.handleClickOutside);\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param value\r\n   */\r\n  handleValueChange(value) {\r\n    const { onChange } = this.props;\r\n\r\n    this.setState({ value }, () => {\r\n      onChange(value);\r\n    });\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param e\r\n   */\r\n  handleClickOutside(e) {\r\n    // close the picker if we detected a\r\n    // click outside of the component\r\n    if (e.target.contains(this.wrapperRef.current)) {\r\n      this.setState({ expanded: false });\r\n    }\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   * @param state\r\n   * @returns {JSX.Element}\r\n   */\r\n  render(props, state) {\r\n    const { emptyLabel, items, closeOnSelection } = props;\r\n    const { value, expanded } = state;\r\n\r\n    return (\r\n      <div ref={this.wrapperRef} className=\"selectpicker\">\r\n        <button\r\n          className={`selectpicker__toggle${expanded ? ' show' : ''}`}\r\n          onClick={() => this.setState({ expanded: !expanded })}\r\n        >\r\n          <span className=\"selectpicker__toggle-label\">{value === null ? emptyLabel : value}</span>\r\n        </button>\r\n\r\n        {expanded ? (\r\n          <div\r\n            className=\"selectpicker__dropdown-menu\"\r\n            onClick={() => {\r\n              if (!closeOnSelection) return;\r\n              this.setState({ expanded: false });\r\n            }}\r\n          >\r\n            {items && items.length > 0 ? (\r\n              <ul className=\"selectpicker__dropdown-menu-items\">\r\n                <li\r\n                  className={`selectpicker__dropdown-menu-items-item${value === null ? ' selected' : ''}`}\r\n                  onClick={() => this.handleValueChange(undefined)}\r\n                >\r\n                  {emptyLabel}\r\n                </li>\r\n                {items.map((item) => {\r\n                  return (\r\n                    <li\r\n                      className={`selectpicker__dropdown-menu-items-item${item.value === value ? ' selected' : ''}${\r\n                        item.disabled ? ' disabled' : ''\r\n                      }`}\r\n                      onClick={() => this.handleValueChange(item.value)}\r\n                    >\r\n                      {item.label}\r\n                    </li>\r\n                  );\r\n                })}\r\n              </ul>\r\n            ) : null}\r\n          </div>\r\n        ) : null}\r\n      </div>\r\n    );\r\n  }\r\n}\r\n","export const VIEWPORT_XS = 'xs';\r\nexport const VIEWPORT_SM = 'sm';\r\nexport const VIEWPORT_MD = 'md';\r\nexport const VIEWPORT_LG = 'lg';\r\nexport const VIEWPORT_XL = 'xl';\r\n\r\nexport default class Viewport {\r\n  static #breakpoints = {\r\n    sm: 320,\r\n    md: 768,\r\n    lg: 1024,\r\n    xl: 1440,\r\n  };\r\n\r\n  static isXS() {\r\n    const query = `(max-width: ${Viewport.#breakpoints.sm}px)`;\r\n    return window.matchMedia(query).matches;\r\n  }\r\n\r\n  static isSM() {\r\n    const query = `(min-width: ${Viewport.#breakpoints.sm + 1}px) and (max-width: ${Viewport.#breakpoints.md}px)`;\r\n    return window.matchMedia(query).matches;\r\n  }\r\n\r\n  static isMD() {\r\n    const query = `(min-width: ${Viewport.#breakpoints.md + 1}px) and (max-width: ${Viewport.#breakpoints.lg}px)`;\r\n    return window.matchMedia(query).matches;\r\n  }\r\n\r\n  static isLG() {\r\n    const query = `(min-width: ${Viewport.#breakpoints.lg + 1}px) and (max-width: ${Viewport.#breakpoints.xl}px)`;\r\n    return window.matchMedia(query).matches;\r\n  }\r\n\r\n  static isXL() {\r\n    const query = `(min-width: ${Viewport.#breakpoints.xl + 1}px)`;\r\n    return window.matchMedia(query).matches;\r\n  }\r\n\r\n  static curr() {\r\n    if (Viewport.isXS()) return VIEWPORT_XS;\r\n    else if (Viewport.isSM()) return VIEWPORT_SM;\r\n    else if (Viewport.isMD()) return VIEWPORT_MD;\r\n    else if (Viewport.isLG()) return VIEWPORT_LG;\r\n    else if (Viewport.isXL()) return VIEWPORT_XL;\r\n    else return 'not-found';\r\n  }\r\n}\r\n","import FilterValues from './FilterValues';\r\n\r\nexport default class Filter {\r\n  //\r\n  #items = null;\r\n  //\r\n  #results = [];\r\n  //\r\n  #filteredCount = 0;\r\n  //\r\n  #allCount = 0;\r\n\r\n  /**\r\n   *\r\n   * @param items\r\n   */\r\n  constructor(items) {\r\n    this.#items = items;\r\n  }\r\n\r\n  /**\r\n   * Return the filtered results\r\n   * @returns {*[]}\r\n   */\r\n  getResults() {\r\n    return this.#results;\r\n  }\r\n\r\n  /**\r\n   * Return the number of filtered results\r\n   * @returns {number}\r\n   */\r\n  getFilteredCount() {\r\n    return this.#filteredCount;\r\n  }\r\n\r\n  /**\r\n   * Return the number of all items considered\r\n   * for filtering\r\n   * @returns {number}\r\n   */\r\n  getAllCount() {\r\n    return this.#allCount;\r\n  }\r\n\r\n  /**\r\n   * Filter the items based on the given filter\r\n   * values\r\n   * @param filterValues\r\n   * @returns {Filter}\r\n   */\r\n  filter(filterValues) {\r\n    //\r\n    this.#results = this.#items;\r\n\r\n    //\r\n    if (FilterValues.create(filterValues).isEmpty()) {\r\n      this.#results = this.#items;\r\n      this.#filteredCount = 0;\r\n      this.#allCount = this.#results.length;\r\n\r\n      return this;\r\n    }\r\n\r\n    if (filterValues.country !== undefined) {\r\n      this.#results = this.#results.filter((item) => item.country.toLowerCase() === filterValues.country.toLowerCase());\r\n    }\r\n\r\n    if (filterValues.department !== undefined) {\r\n      this.#results = this.#results.filter(\r\n        (item) => item.department.toLowerCase() === filterValues.department.toLowerCase()\r\n      );\r\n    }\r\n\r\n    if (filterValues.brands.length > 0) {\r\n      /*\r\n      filterValues.brands.map((brand) => {\r\n        this.#results = this.#results.filter((item) => item.brand.toLowerCase() === brand.toLowerCase());\r\n      });\r\n      */\r\n\r\n      this.#results = this.#results.filter((item) => {\r\n        return filterValues.brands.includes(item.brand);\r\n      });\r\n    }\r\n\r\n    //\r\n    this.#filteredCount = this.#results.length;\r\n    this.#allCount = this.#items.length;\r\n\r\n    return this;\r\n  }\r\n\r\n  /**\r\n   * Sort the filtered items\r\n   * @param field\r\n   * @returns {Filter}\r\n   */\r\n  sort(field = 'created') {\r\n    /**\r\n     *\r\n     * @param a\r\n     * @param b\r\n     * @returns {number}\r\n     * @private\r\n     */\r\n    const _sort = (a, b) => {\r\n      if (a[field] < b[field]) return 1;\r\n      if (a[field] > b[field]) return -1;\r\n\r\n      return 0;\r\n    };\r\n\r\n    //\r\n    this.#results = this.#results.sort(_sort);\r\n\r\n    return this;\r\n  }\r\n}\r\n","import { h, Component, createRef } from 'preact';\r\nimport i18n from '../../lib/i18n';\r\nimport PropTypes from 'prop-types';\r\nimport FilterValues from '../../lib/FilterValues';\r\nimport CheckboxSetField from '../m/CheckboxSetField';\r\nimport SelectPicker from '../m/SelectPicker';\r\nimport Viewport from '../../lib/Viewport';\r\nimport Filter from '../../lib/Filter';\r\nimport { track } from '../../../../../../core/js/libs/TrackingService';\r\n\r\nexport default class JobFilters extends Component {\r\n  //\r\n  static propTypes = {\r\n    items: PropTypes.array,\r\n    countries: PropTypes.array.isRequired,\r\n    departments: PropTypes.array.isRequired,\r\n    brands: PropTypes.array.isRequired,\r\n    selectedCountry: PropTypes.string,\r\n    selectedDepartment: PropTypes.string,\r\n    selectedBrands: PropTypes.arrayOf(PropTypes.string),\r\n    filteredCount: PropTypes.number,\r\n    allCount: PropTypes.number,\r\n    onInit: PropTypes.func.isRequired,\r\n    onChange: PropTypes.func.isRequired,\r\n    onFilterReset: PropTypes.func.isRequired,\r\n  };\r\n\r\n  //\r\n  #filter = null;\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   */\r\n  constructor(props) {\r\n    super();\r\n\r\n    // get possible pre-selection\r\n    const { items, departments, brands, selectedCountry, selectedDepartment, selectedBrands } = props;\r\n\r\n    //\r\n    this.#filter = new Filter(items);\r\n\r\n    //\r\n    this.state = {\r\n      filterValues: FilterValues.new(selectedCountry, selectedDepartment, selectedBrands),\r\n      showDepartments: this.showDepartmentsAndBrands(selectedCountry),\r\n      showBrands: this.showDepartmentsAndBrands(selectedCountry),\r\n      brandsCollapsible: Viewport.isXS(),\r\n      departments,\r\n      brands,\r\n      activeTracking: false,\r\n    };\r\n\r\n    //\r\n    this.handleViewportChange = this.handleViewportChange.bind(this);\r\n  }\r\n\r\n  /**\r\n   *\r\n   */\r\n  componentDidMount() {\r\n    //\r\n    const { filterValues } = this.state;\r\n\r\n    //\r\n    window.addEventListener('resize', this.handleViewportChange);\r\n\r\n    //\r\n    const filterProps = this.filter(filterValues);\r\n    this.props.onInit(filterProps);\r\n  }\r\n\r\n  /**\r\n   *\r\n   */\r\n  componentWillUnmount() {\r\n    window.removeEventListener('resize', this.handleViewportChange);\r\n  }\r\n\r\n  componentDidUpdate() {\r\n    this.state.activeTracking = true;\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param filterValues\r\n   * @returns {{filteredCount: number, allCount: number, results: *[]}}\r\n   */\r\n  filter(filterValues) {\r\n    //\r\n    let { departments, brands } = this.state;\r\n    const filtered = this.#filter.filter(filterValues).sort();\r\n    const results = filtered.getResults();\r\n    const filteredCount = filtered.getFilteredCount();\r\n    const allCount = filtered.getAllCount();\r\n\r\n    // disable non-existing departments\r\n    // in the results based on the brands\r\n    // selection\r\n    if (filterValues.brands.length > 0) {\r\n      departments = this.disableDepartments(results);\r\n    }\r\n\r\n    // disable non-existing brands\r\n    // in the results based on the\r\n    // department selection\r\n    if (filterValues.department !== undefined) {\r\n      brands = this.disableBrands(results);\r\n    }\r\n\r\n    // check if only one brand checkbox are left\r\n    // for selection. If so select it automatically\r\n    const enabledBrands = brands.filter((brand) => brand.disabled === false);\r\n    if (enabledBrands.length === 1) {\r\n      //\r\n      filterValues.brands.push(enabledBrands[0].value);\r\n    }\r\n\r\n    // check if at least the country is selected, to\r\n    // start constructing and sending the tracking event data\r\n    if (this.state.activeTracking === true) {\r\n      if (filterValues.country !== undefined) {\r\n        const trackingEventData = {\r\n          eventtype: 'applicationFilter',\r\n          country: filterValues.country,\r\n        };\r\n\r\n        // add jobcategory and selectedFilterOptions data only if the\r\n        // departments and brands are available for the selected country\r\n        if (this.showDepartmentsAndBrands(filterValues.country)) {\r\n          trackingEventData.jobcategory = filterValues.department;\r\n          trackingEventData.selectedfilteroptions =\r\n            filterValues.brands.length === 0\r\n              ? 'not selected'\r\n              : [...new Set(filterValues.brands)].map((brand, index) => `brand${index + 1} - ${brand}`).join(', ');\r\n        }\r\n\r\n        //\r\n        track(trackingEventData);\r\n      }\r\n    }\r\n\r\n    return {\r\n      results,\r\n      filteredCount,\r\n      allCount,\r\n      departments,\r\n      brands,\r\n    };\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param items\r\n   * @returns {*}\r\n   */\r\n  disableDepartments(items) {\r\n    //\r\n    const { departments } = this.state;\r\n\r\n    //\r\n    return departments.map((department) => {\r\n      let disabled = true;\r\n\r\n      items.map((item) => {\r\n        if (item.department === department.value) disabled = false;\r\n      });\r\n\r\n      //\r\n      department.disabled = disabled;\r\n\r\n      return department;\r\n    });\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param items\r\n   * @returns {*}\r\n   */\r\n  disableBrands(items) {\r\n    //\r\n    const { brands } = this.state;\r\n\r\n    //\r\n    return brands.map((brand) => {\r\n      let disabled = true;\r\n\r\n      items.map((item) => {\r\n        if (item.brand === brand.value) disabled = false;\r\n      });\r\n\r\n      //\r\n      brand.disabled = disabled;\r\n\r\n      return brand;\r\n    });\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @returns {boolean}\r\n   */\r\n  showDepartmentsAndBrands(selectedCountry = undefined) {\r\n    // check the possible given param first and\r\n    // return true if its germany\r\n    if (selectedCountry !== undefined && selectedCountry.toLowerCase() === i18n.init().t('GERMANY').toLowerCase()) {\r\n      return true;\r\n    }\r\n\r\n    // otherwise check our state\r\n    // with the filter-values\r\n    return (\r\n      this.state?.filterValues?.country !== undefined &&\r\n      this.state?.filterValues?.country.toLowerCase() === i18n.init().t('GERMANY').toLowerCase()\r\n    );\r\n  }\r\n\r\n  /**\r\n   * Reset all the filters\r\n   */\r\n  reset() {\r\n    //\r\n    const filterValues = FilterValues.new();\r\n\r\n    //\r\n    this.setState(\r\n      {\r\n        filterValues,\r\n        showDepartments: false,\r\n        showBrands: false,\r\n      },\r\n      () => {\r\n        // filter\r\n        const filterResults = this.filter(filterValues);\r\n        const { departments, brands } = this.state;\r\n        // reset departments and brands\r\n        departments.map((department) => (department.disabled = false));\r\n        brands.map((brand) => (brand.disabled = false));\r\n        //\r\n        this.props.onFilterReset(filterResults);\r\n      }\r\n    );\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param country\r\n   */\r\n  handleCountriesChange(country) {\r\n    //\r\n    const { filterValues } = this.state;\r\n\r\n    // if one resets the country drop-down to its\r\n    // empty value, we should reset the whole filter\r\n    // as well.\r\n    if (country === undefined) {\r\n      //\r\n      this.reset();\r\n      return;\r\n    }\r\n\r\n    //\r\n    filterValues.country = country;\r\n\r\n    //\r\n    this.setState(\r\n      {\r\n        filterValues,\r\n        showDepartments: this.showDepartmentsAndBrands(),\r\n        showBrands: this.showDepartmentsAndBrands(),\r\n        brandsCollapsible: Viewport.isSM() || Viewport.isXS(),\r\n      },\r\n      () => {\r\n        //\r\n        const filterResults = this.filter(filterValues);\r\n        this.props.onChange(filterResults);\r\n      }\r\n    );\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param department\r\n   */\r\n  handleDepartmentChange(department) {\r\n    const { filterValues } = this.state;\r\n\r\n    //\r\n    filterValues.department = department;\r\n\r\n    //\r\n    const filterResults = this.filter(filterValues);\r\n\r\n    //\r\n    this.setState(\r\n      {\r\n        filterValues,\r\n        departments: filterResults.departments,\r\n        brands: filterResults.brands,\r\n      },\r\n      () => {\r\n        //\r\n        this.props.onChange(filterResults);\r\n      }\r\n    );\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param brandsSelection\r\n   */\r\n  handleBrandsChange(brandsSelection) {\r\n    const { filterValues } = this.state;\r\n\r\n    //\r\n    filterValues.brands = brandsSelection;\r\n\r\n    //\r\n    const filterResults = this.filter(filterValues);\r\n\r\n    //\r\n    this.setState(\r\n      {\r\n        filterValues,\r\n        departments: filterResults.departments,\r\n        brands: filterResults.brands,\r\n      },\r\n      () => {\r\n        //\r\n        this.props.onChange(filterResults);\r\n      }\r\n    );\r\n  }\r\n\r\n  /**\r\n   *\r\n   */\r\n  handleFilterReset() {\r\n    //\r\n    this.reset();\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param e\r\n   */\r\n  handleViewportChange(e) {\r\n    //\r\n    const { showBrands, brandsCollapsible } = this.state;\r\n\r\n    // abort if we must not show\r\n    // the brands at all\r\n    if (!showBrands) return;\r\n\r\n    // should the brands be collapsible?\r\n    const collapsible = Viewport.isSM() || Viewport.isXS();\r\n\r\n    // prevent non-necessary renders...\r\n    if (collapsible !== brandsCollapsible) {\r\n      this.setState({ brandsCollapsible: collapsible });\r\n    }\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   * @param state\r\n   * @returns {JSX.Element}\r\n   */\r\n  render(props, state) {\r\n    //\r\n    const { departments, filterValues, showDepartments, showBrands, brandsCollapsible } = state;\r\n    const { country, department, brands } = filterValues;\r\n    const { countries, filteredCount, allCount } = props;\r\n\r\n    return (\r\n      <aside className=\"jobfind__filters\">\r\n        <div className=\"hdl hdl--4\">{i18n.init().t('FILTER_TITLE')}</div>\r\n\r\n        <div className=\"jobfind__filters-countries\">\r\n          <SelectPicker\r\n            items={countries}\r\n            value={country}\r\n            emptyLabel={i18n.init().t('CHOOSE_COUNTRY')}\r\n            onChange={(value) => this.handleCountriesChange(value)}\r\n          />\r\n        </div>\r\n\r\n        {showDepartments ? (\r\n          <div className=\"jobfind__filters-departments\">\r\n            <SelectPicker\r\n              items={departments}\r\n              value={department}\r\n              emptyLabel={i18n.init().t('CHOOSE_DEPARTMENT')}\r\n              onChange={(value) => this.handleDepartmentChange(value)}\r\n            />\r\n          </div>\r\n        ) : null}\r\n\r\n        {showBrands && props.brands?.length > 0 ? (\r\n          <div className=\"jobfind__filters-brands\">\r\n            <CheckboxSetField\r\n              emptyLabel={i18n.init().t('CHOOSE_BRAND')}\r\n              collapsible={brandsCollapsible}\r\n              items={state.brands}\r\n              selection={brands}\r\n              onChange={(selectedBrands) => this.handleBrandsChange(selectedBrands)}\r\n            />\r\n          </div>\r\n        ) : null}\r\n\r\n        <p className=\"jobfind__filters--results-text\">{`${filteredCount} ${i18n\r\n          .init()\r\n          .t('FILTERED')} (${allCount} ${i18n.init().t('WOLRDWIDE')})`}</p>\r\n\r\n        <button className=\"jobfind__filters--reset\" onClick={() => this.handleFilterReset()}>\r\n          <svg className=\"icon-reset\" viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g id=\"dwMask\" transform=\"translate(2 2)\">\r\n              <path\r\n                fill=\"currentColor\"\r\n                id=\"dwFill-1\"\r\n                className=\"dwst0\"\r\n                d=\"M17.9 24.8c-.9.3-1.8.4-2.7.5-.6 0-1 .5-.9 1.1 0 .5.5.9 1 .9h.1c1.1-.1 2.1-.3 3.2-.6.5-.2.8-.7.7-1.3-.3-.5-.9-.8-1.4-.6m5.8-4.3c-.4.5-.7.9-1.2 1.4l-.7.7c-.4.4-.5 1-.1 1.4.2.2.5.4.8.4.2 0 .5-.1.6-.2.3-.2.6-.5.8-.8.5-.5.9-1 1.4-1.6.3-.4.2-1.1-.2-1.4-.4-.4-1-.3-1.4.1m-13.1 4.2c-.9-.3-1.7-.7-2.5-1.2-.5-.3-1.1-.2-1.4.3-.3.5-.2 1.1.3 1.4.9.6 1.9 1 2.9 1.4.1 0 .2.1.3.1.4 0 .8-.3.9-.7.3-.6 0-1.1-.5-1.3m-7.1-6.8c-.2-.5-.8-.8-1.3-.6-.5.2-.8.8-.6 1.3.4 1 .9 2 1.5 2.8.2.3.5.4.8.4.2 0 .4-.1.6-.2.5-.3.6-.9.2-1.4-.4-.6-.9-1.4-1.2-2.3M28 13.6c0 1.1-.1 2.2-.4 3.2-.1.5-.5.8-1 .8h-.2c-.5-.1-.9-.7-.7-1.2.2-.9.3-1.8.3-2.7 0-3.1-1.2-6-3.4-8.2S17.5 2 14.4 2s-6 1.2-8.2 3.4c-.9.9-1.7 2-2.3 3.2l4-.9c.4-.1 1 .3 1.1.8.1.5-.2 1.1-.8 1.2l-6.3 1.4h-.2c-.2 0-.4-.1-.6-.2-.2-.2-.4-.4-.4-.7L0 3.9c-.1-.5.3-1 .9-1.1.5-.1 1 .3 1.1.9l.4 3.4C3 6 3.8 4.9 4.7 4c2.6-2.6 6-4 9.7-4s7.1 1.4 9.7 4c2.5 2.6 3.9 6 3.9 9.6\"\r\n              ></path>\r\n            </g>\r\n          </svg>\r\n          <span>{i18n.init().t('RESET_ALL')}</span>\r\n        </button>\r\n      </aside>\r\n    );\r\n  }\r\n}\r\n","import { h, Component } from 'preact';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport default class JobResult extends Component {\r\n  //\r\n  static propTypes = {\r\n    title: PropTypes.string.isRequired,\r\n    address: PropTypes.string.isRequired,\r\n    country: PropTypes.string.isRequired,\r\n    link: PropTypes.string.isRequired,\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   * @param state\r\n   * @returns {JSX.Element}\r\n   */\r\n  render(props, state) {\r\n    return (\r\n      <article className=\"jobfind__results-result\">\r\n        <h3>\r\n          <a href={props.link}>{props.title}</a>\r\n        </h3>\r\n\r\n        <p>\r\n          <a href={props.link}>{props.address}</a>\r\n        </p>\r\n      </article>\r\n    );\r\n  }\r\n}\r\n","import { h, Component, Fragment } from 'preact';\r\nimport JobResult from '../m/JobResult';\r\nimport PropTypes from 'prop-types';\r\nimport i18n from '../../lib/i18n';\r\n\r\nexport default class JobResults extends Component {\r\n  //\r\n  static propTypes = {\r\n    items: PropTypes.array.isRequired,\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   * @param state\r\n   * @returns {JSX.Element}\r\n   */\r\n  render(props, state) {\r\n    return (\r\n      <div className=\"jobfind__results\">\r\n        {props.items.length > 0 ? (\r\n          <>\r\n            {props.items.map((item) => {\r\n              return <JobResult title={item.title} address={item.address} country={item.country} link={item.link} />;\r\n            })}\r\n          </>\r\n        ) : (\r\n          <p>{i18n.init().t('NO_ITEMS_FOUND')}</p>\r\n        )}\r\n      </div>\r\n    );\r\n  }\r\n}\r\n","export default class Pager {\r\n  //\r\n  #pageSize = 0;\r\n  #hasItemsLeft = 0;\r\n  #itemsLeft = 0;\r\n\r\n  /**\r\n   *\r\n   * @param pageSize\r\n   */\r\n  constructor(pageSize = 3) {\r\n    this.#pageSize = pageSize;\r\n  }\r\n\r\n  /**\r\n   * Return the number of items which\r\n   * are left and currently not been\r\n   * displayed\r\n   * @returns {number}\r\n   */\r\n  getItemsLeft() {\r\n    return this.#itemsLeft;\r\n  }\r\n\r\n  /**\r\n   * Return whether we have items left\r\n   * to display or not\r\n   * @returns {number}\r\n   */\r\n  getHasItemsLeft() {\r\n    return this.#hasItemsLeft;\r\n  }\r\n\r\n  /**\r\n   * Return the results for the next page\r\n   * @param items\r\n   * @param currPage\r\n   * @returns {*}\r\n   */\r\n  nextPage(items, currPage) {\r\n    //\r\n    const itemsToShow = currPage * this.#pageSize;\r\n\r\n    this.#hasItemsLeft = itemsToShow < items.length;\r\n    this.#itemsLeft = items.length - itemsToShow;\r\n\r\n    return items.slice(0, itemsToShow);\r\n  }\r\n}\r\n","import { h, Component } from 'preact';\r\nimport JobFilters from './components/o/JobFilters';\r\nimport JobResults from './components/o/JobResults';\r\nimport PropTypes from 'prop-types';\r\nimport i18n from './lib/i18n';\r\nimport Filter from './lib/Filter';\r\nimport Pager from './lib/Pager';\r\n\r\nexport default class JobFind extends Component {\r\n  //\r\n  static propTypes = {\r\n    settings: PropTypes.object,\r\n    items: PropTypes.array,\r\n  };\r\n\r\n  //\r\n  #pager = null;\r\n  #pageSize = 20;\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   */\r\n  constructor(props) {\r\n    super();\r\n\r\n    //\r\n    this.#pager = new Pager(this.#pageSize);\r\n\r\n    //\r\n    this.state = {\r\n      filteredCount: 0,\r\n      allCount: 0,\r\n      results: [],\r\n      currPage: 1,\r\n    };\r\n  }\r\n\r\n  /**\r\n   * Ensure the correct sorting of the brands\r\n   * @returns {*[]}\r\n   */\r\n  sortBrands() {\r\n    // defines the correct order of the brands\r\n    const order = [\r\n      'Wirtgen Group',\r\n      'Wirtgen GmbH',\r\n      'Joseph Vögele AG',\r\n      'Hamm AG',\r\n      'Kleemann GmbH',\r\n      'Benninghoven',\r\n      'John Deere',\r\n      'Ciber',\r\n    ];\r\n    const res = [];\r\n\r\n    // ensure brand sorting\r\n    for (let i = 0; i < order.length; i++) {\r\n      //\r\n      const brand = order[i];\r\n\r\n      //\r\n      if (this.props.settings.brands.includes(brand)) {\r\n        res.push(brand);\r\n      }\r\n    }\r\n\r\n    return res;\r\n  }\r\n\r\n  /**\r\n   *\r\n   * @param props\r\n   * @param state\r\n   * @returns {JSX.Element}\r\n   */\r\n  render(props, state) {\r\n    //\r\n    const { settings, items } = props;\r\n    const { countries, departments, selectedCountry, selectedDepartment, selectedBrands } = settings;\r\n    const { filteredCount, allCount, results, currPage } = state;\r\n    const sortedBrands = this.sortBrands();\r\n\r\n    //\r\n    const dropDownCountries = countries.map((country) => {\r\n      return { value: country, label: country };\r\n    });\r\n\r\n    //\r\n    const dropDownDepartments = departments.map((department) => {\r\n      return { value: department, label: department };\r\n    });\r\n\r\n    //\r\n    const dropDownBrands = sortedBrands.map((brand) => {\r\n      return { value: brand, label: brand };\r\n    });\r\n\r\n    //\r\n    const paginatedResults = this.#pager.nextPage(results, currPage);\r\n    const hasItemsLeft = this.#pager.getHasItemsLeft();\r\n    const itemsLeft = this.#pager.getItemsLeft();\r\n\r\n    return (\r\n      <div className=\"container\">\r\n        {/*\r\n        <header className=\"jobfind__header\">\r\n          <h1 className=\"hdl hdl--1 jobfind__header-title\">{i18n.init().t('TITLE')}</h1>\r\n          <p className=\"jobfind__header-description\">{i18n.init().t('DESCRIPTION')}</p>\r\n        </header>\r\n        */}\r\n\r\n        <div className=\"row\">\r\n          <div className=\"col-12 col-xl-4\">\r\n            <JobFilters\r\n              items={items}\r\n              countries={dropDownCountries}\r\n              departments={dropDownDepartments}\r\n              brands={dropDownBrands}\r\n              selectedCountry={selectedCountry.length === 0 ? undefined : selectedCountry}\r\n              selectedDepartment={selectedDepartment.length === 0 ? undefined : selectedDepartment}\r\n              selectedBrands={selectedBrands}\r\n              filteredCount={filteredCount}\r\n              allCount={allCount}\r\n              onInit={({ results, filteredCount, allCount }) => this.setState({ results, filteredCount, allCount })}\r\n              onChange={({ results, filteredCount, allCount }) => this.setState({ results, filteredCount, allCount })}\r\n              onFilterReset={({ results, filteredCount, allCount }) =>\r\n                this.setState({ results, filteredCount, allCount, currPage: 1 })\r\n              }\r\n            />\r\n          </div>\r\n\r\n          <div className=\"col-12 col-xl-8\">\r\n            <JobResults items={paginatedResults} />\r\n\r\n            {hasItemsLeft ? (\r\n              <div className=\"row\">\r\n                <div className=\"col-12 d-flex justify-content-center\">\r\n                  <button\r\n                    className=\"btn btn-primary jobfind__loadmore\"\r\n                    onClick={() => {\r\n                      this.setState({ currPage: currPage + 1 });\r\n                    }}\r\n                  >\r\n                    {`${i18n.init().t('LOAD_MORE')} [${itemsLeft}]`}\r\n                  </button>\r\n                </div>\r\n              </div>\r\n            ) : null}\r\n          </div>\r\n        </div>\r\n      </div>\r\n    );\r\n  }\r\n}\r\n"],"sourceRoot":""}