{"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","element","debounceResize","debounce","checkBreakPoint","bind","window","addEventListener","this","br","lastBreakpointValue","resetDropdown2","isOpen","isDesktop","$dropdown","style","height","addClasses","handleHeight","$el","dataset","stateInit","container","firstElementChild","offsetHeight","HeaderDropdown","superPropBase","_get","Reflect","get","module","exports","__esModule","target","property","receiver","base","desc","Object","getOwnPropertyDescriptor","call","arguments","length","value","apply","getPrototypeOf","object","prototype","hasOwnProperty"],"mappings":"0sBAIqBA,E,gCACnB,WAAYC,GAAS,kBACnB,cAAMA,GACN,IAAMC,EAAiBC,YAAS,EAAKC,gBAAgBC,KAArB,QAAiC,KAF9C,OAGnBC,OAAOC,iBACL,UACA,WACEL,OAEF,GARiB,E,2CAYrB,WACMM,KAAKC,KAAOH,OAAOI,qBAAqBF,KAAKG,iBACjDH,KAAKC,GAAKH,OAAOI,sB,wBAGnB,SAAWE,GACLN,OAAOO,aACT,kDAAiBD,GACjBJ,KAAKM,UAAUC,MAAMC,OAAS,KAE9BR,KAAKS,WAAWL,GAChBJ,KAAKU,aAAaN,IAEpBJ,KAAKW,IAAIC,QAAQC,UAAYT,I,4BAI/B,WACE,wD,2BAEF,c,0BAIA,SAAaA,GACX,IAAIU,EAAwCd,KAAKM,UAAUS,kBAC3Df,KAAKM,UAAUC,MAAMC,OAASJ,EAAS,GAAH,OAAMU,EAAUE,aAAhB,MAAmC,Q,GAvCnBC,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,EAAKM,QACXb,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,SAGnEJ,EAAKiB,MAAMpC,KAAMiC,WAG1BX,EAAOC,QAAUJ,EAAMG,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,S,oBCtB5F,IAAIc,EAAiB,EAAQ,GAW7Bf,EAAOC,QATP,SAAwBe,EAAQZ,GAC9B,MAAQI,OAAOS,UAAUC,eAAeR,KAAKM,EAAQZ,IAEpC,QADfY,EAASD,EAAeC,MAI1B,OAAOA,GAGwBhB,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":""}