{"version":3,"sources":["webpack:///./src/client/default/js/components/headerDropdownAndAccordion.js","webpack:///./node_modules/@babel/runtime/helpers/get.js","webpack:///./node_modules/@babel/runtime/helpers/superPropBase.js"],"names":["HeaderDropdownAndAccordion","_HeaderDropdown","element","_this","_classCallCheck","_callSuper","debounceResize","debounce","checkBreakPoint","bind","window","addEventListener","_inherits","_createClass","key","value","this","br","lastBreakpointValue","resetDropdown2","isOpen","isDesktop","_superPropGet","$dropdown","style","height","addClasses","handleHeight","$el","dataset","stateInit","container","firstElementChild","concat","offsetHeight","HeaderDropdown","superPropBase","_get","Reflect","get","module","exports","__esModule","target","property","receiver","base","desc","Object","getOwnPropertyDescriptor","call","arguments","length","apply","getPrototypeOf","object","prototype","hasOwnProperty"],"mappings":"ynBAEuD,IAElCA,EAA0B,SAAAC,GAC7C,SAAAD,EAAYE,GAAS,IAAAC,EAAAC,IAAA,KAAAJ,GACnBG,EAAAE,EAAA,KAAAL,EAAA,CAAME,IACN,IAAMI,EAAiBC,YAASJ,EAAKK,gBAAgBC,KAAIN,GAAQ,KAO/D,OANFO,OAAOC,iBACL,UACA,WACEL,OAEF,GACAH,EACH,OAAAS,IAAAZ,EAAAC,GAAAY,IAAAb,EAAA,EAAAc,IAAA,kBAAAC,MAED,WACMC,KAAKC,KAAOP,OAAOQ,qBAAqBF,KAAKG,iBACjDH,KAAKC,GAAKP,OAAOQ,sBAClB,CAAAJ,IAAA,aAAAC,MAED,SAAWK,GACLV,OAAOW,aACTC,EAAAtB,EAAA,oBAAAsB,CAAA,CAAiBF,IACjBJ,KAAKO,UAAUC,MAAMC,OAAS,KAE9BT,KAAKU,WAAWN,GAChBJ,KAAKW,aAAaP,IAEpBJ,KAAKY,IAAIC,QAAQC,UAAYV,IAG/B,CAAAN,IAAA,iBAAAC,MACA,WACEO,EAAAtB,EAAA,uBAAAsB,CAAA,MACD,CAAAR,IAAA,gBAAAC,MACD,cAEC,CAAAD,IAAA,eAAAC,MAED,SAAaK,GACX,IAAIW,EAAwCf,KAAKO,UAAUS,kBAC3DhB,KAAKO,UAAUC,MAAMC,OAASL,EAAS,GAAHa,OAAMF,EAAUG,aAAY,MAAO,QAvC5B,CAASC,Y,oBCJxD,IAAIC,EAAgB,EAAQ,KAE5B,SAASC,IAiBP,MAhBuB,oBAAZC,SAA2BA,QAAQC,KAC5CC,EAAOC,QAAUJ,EAAOC,QAAQC,IAAKC,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,UAE1GD,EAAOC,QAAUJ,EAAO,SAAcM,EAAQC,EAAUC,GACtD,IAAIC,EAAOV,EAAcO,EAAQC,GACjC,GAAKE,EAAL,CACA,IAAIC,EAAOC,OAAOC,yBAAyBH,EAAMF,GAEjD,OAAIG,EAAKR,IACAQ,EAAKR,IAAIW,KAAKC,UAAUC,OAAS,EAAIT,EAASE,GAGhDE,EAAKhC,QACXyB,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,SAGnEJ,EAAKgB,MAAMrC,KAAMmC,WAG1BX,EAAOC,QAAUJ,EAAMG,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,S,oBCtB5F,IAAIa,EAAiB,EAAQ,GAW7Bd,EAAOC,QATP,SAAwBc,EAAQX,GAC9B,MAAQI,OAAOQ,UAAUC,eAAeP,KAAKK,EAAQX,IAEpC,QADfW,EAASD,EAAeC,MAI1B,OAAOA,GAGwBf,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC","file":"js/component-headerDropdownAndAccordion-js.chunks.js","sourcesContent":["import { debounce } from 'underscore';\nimport HeaderDropdown from './headerDropdown';\nimport { match } from '../utilities/resolutionHandler';\n\nexport default class HeaderDropdownAndAccordion extends HeaderDropdown {\n  constructor(element) {\n    super(element);\n    const debounceResize = debounce(this.checkBreakPoint.bind(this), 500);\n    window.addEventListener(\n      'resize',\n      () => {\n        debounceResize();\n      },\n      true\n    );\n  }\n\n  checkBreakPoint() {\n    if (this.br !== window.lastBreakpointValue) this.resetDropdown2();\n    this.br = window.lastBreakpointValue;\n  }\n\n  handleOpen(isOpen) {\n    if (window.isDesktop()) {\n      super.handleOpen(isOpen);\n      this.$dropdown.style.height = '';\n    } else {\n      this.addClasses(isOpen);\n      this.handleHeight(isOpen);\n    }\n    this.$el.dataset.stateInit = isOpen;\n  }\n\n  // this function is needed to not depend on event bus for breakpoint beacuse of the moveToComponent makes it unavailable.\n  resetDropdown2() {\n    super.resetDropdown();\n  }\n  resetDropdown() {\n    //do nothing\n  }\n\n  handleHeight(isOpen) {\n    var container = /** @type {HTMLElement} */ (this.$dropdown.firstElementChild);\n    this.$dropdown.style.height = isOpen ? `${container.offsetHeight}px` : '0';\n  }\n}\n","var superPropBase = require(\"./superPropBase.js\");\n\nfunction _get() {\n  if (typeof Reflect !== \"undefined\" && Reflect.get) {\n    module.exports = _get = Reflect.get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  } else {\n    module.exports = _get = function _get(target, property, receiver) {\n      var base = superPropBase(target, property);\n      if (!base) return;\n      var desc = Object.getOwnPropertyDescriptor(base, property);\n\n      if (desc.get) {\n        return desc.get.call(arguments.length < 3 ? target : receiver);\n      }\n\n      return desc.value;\n    }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  }\n\n  return _get.apply(this, arguments);\n}\n\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n    object = getPrototypeOf(object);\n    if (object === null) break;\n  }\n\n  return object;\n}\n\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;"],"sourceRoot":""}