{"version":3,"file":"scripts/chunks/src_widgets_accordion_accordion_js.3ddd2e90c098ef242334.js","mappings":"6HAWA,SAASA,EAAUC,GACjB,MAAMC,EAAOC,KACbD,EAAKD,GAAKG,EAAEH,GAEZG,EAAEC,UAAUC,OAAM,WAEa,UAAzBC,OAAOC,SAASC,OAEhBL,EAAE,kCAAkCM,WAAWC,SAAS,UAGxDP,EAAE,2CAA2CM,WAAWE,YAAY,UAE1E,IAEAV,EAAKW,KAAO,WAKV,QAA4CC,IAAxCZ,EAAKD,GAAGc,KAAK,uBAAsC,CAGrD,GADAb,EAAKD,GAAGe,IAAI,UAAW,GACnBd,EAAKD,GAAGgB,KAAK,iBAAiBC,QAAU,EAC1C,OAKJ,GAHEhB,EAAKD,GAAGS,SAAS,iBAAiBS,YAClCjB,EAAKD,GAAGc,KAAK,sBAAuB,QAEV,MAAxBR,OAAOC,SAASC,KAElB,IAAIW,EAAcb,OAAOC,SAASC,KAEpC,GAAmB,MAAfW,GAA0E,MAAnDhB,EAAE,iBAAiBM,WAAWO,KAAKG,GAAsB,CAElFhB,EAAEgB,GAAaV,WAAWC,SAAS,UAGnCP,EAAEgB,GAAaV,WAAWE,YAAY,UAGnBR,EAAE,iBAAiBiB,SACtCjB,EAAEgB,GAAaE,YAGjB,CAEA,CACF,CACF,CA5DAC,QAAQC,IAAI,CACV,uCACA,4VACA,mWACCC,MAAK,KACNrB,EAAE,qBAAqBsB,MAAK,SAAUC,EAAG1B,GACvCG,EAAEH,GAAI2B,KAAK,SAAU,IAAI5B,EAAUC,IACnCG,EAAEH,GAAI2B,KAAK,UAAUf,MACvB,GAAE,G","sources":["webpack://disp0001/./src/widgets/accordion/accordion.js"],"sourcesContent":["Promise.all([\r\n  import(/* webpackMode: \"eager\" */ './accordion.scss'),\r\n  import('../../plugins/semantic/accordion.css'),\r\n  import('../../plugins/semantic/accordion'),\r\n]).then(() => {\r\n  $('.widget.accordion').each(function (i, el) {\r\n    $(el).data('widget', new Accordion(el))\r\n    $(el).data('widget').init()\r\n  })\r\n})\r\n\r\nfunction Accordion(el) {\r\n  const self = this\r\n  self.el = $(el)\r\n\r\n  $(document).ready(function() {\r\n    // Check if the current path contains \"pets\"\r\n    if (window.location.hash === \"#pets\") {\r\n        // Add the 'active' class to all children of '.dog-guidelines-&-conditions'\r\n        $(\".dog-guidelines-\\\\&-conditions\").children().addClass(\"active\");\r\n  \r\n        // Remove the 'hidden' class from all children of '.dog-guidelines-\\\\&-conditions .content'\r\n        $(\".dog-guidelines-\\\\&-conditions .content\").children().removeClass(\"hidden\");\r\n    }\r\n  });\r\n\r\n  self.init = function () {\r\n    if (process.env.NODE_ENV === 'development') {\r\n      console.log('Accordion init', self)\r\n    }\r\n    // Check to stop double handling if this is called twice\r\n    if (self.el.attr('data-accordion-init') === undefined) {\r\n      // If this accordion contains other accordions, exit because otherwise we double up on click handlers\r\n      self.el.css('opacity', 1)\r\n      if (self.el.find('.ui.accordion').length >= 2) {\r\n        return\r\n      }\r\n      self.el.children('.ui.accordion').accordion()\r\n      self.el.attr('data-accordion-init', 'true')\r\n\r\n    if (window.location.hash != null || \"\")\r\n    {\r\n      var accordionId = window.location.hash;\r\n    }\r\n    if (accordionId != null && $('.ui.accordion').children().find(accordionId) != null) {\r\n      // Add the 'active' class to all children of '.dog-guidelines-&-conditions'\r\n      $(accordionId).children().addClass(\"active\");\r\n      \r\n      // Remove the 'hidden' class from all children of '.dog-guidelines-\\\\&-conditions .content'\r\n      $(accordionId).children().removeClass(\"hidden\");\r\n      \r\n      //Scrolling to the element id while considering the height of the header\r\n      var headerHeight = $('.header-fixed').height() + 'px';\r\n      $(accordionId).scrollHeight + headerHeight;\r\n\r\n\r\n    }\r\n\r\n    }\r\n  }\r\n}\r\n"],"names":["Accordion","el","self","this","$","document","ready","window","location","hash","children","addClass","removeClass","init","undefined","attr","css","find","length","accordion","accordionId","height","scrollHeight","Promise","all","then","each","i","data"],"sourceRoot":""}