{"version":3,"sources":["02-molecules/misc/expand-collapse/expand-collapse.js"],"names":["$","Drupal","behaviors","expandCollapse","attach","context","$allPanels","next","hide","once","click","$this","$target","parent","state","attr","hasClass","removeClass","slideUp","addClass","slideDown","jQuery"],"mappings":"aAAC,UAA8BA,CAA9B,CAAiCC,CAAjC,CAAyC,CAExCA,CAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAkC,CAChCC,MAAM,CAAE,WAAUC,CAAV,CAA6B,CAEnC,GAAIC,CAAAA,CAAU,CAAGN,CAAC,CAAC,yBAAD,CAA4BK,CAA5B,CAAD,CAAsCE,IAAtC,CAA2C,2BAA3C,EAAwEC,IAAxE,EAAjB,CAEAR,CAAC,CAAC,gCAAD,CAAmCK,CAAnC,CAAD,CAA6CI,IAA7C,GAAoDC,KAApD,CAA0D,UAAiB,IAErEC,CAAAA,CAAK,CAAGX,CAAC,CAAC,IAAD,CAF4D,CAGrEY,CAAO,CAAGD,CAAK,CAACE,MAAN,GAAeN,IAAf,EAH2D,CAMrEO,CAAK,CAAqC,OAAlC,GAAAd,CAAC,CAAC,IAAD,CAAD,CAAQe,IAAR,CAAa,eAAb,CAN6D,CAwBzE,MAjBAf,CAAAA,CAAC,CAAC,IAAD,CAAD,CAAQe,IAAR,CAAa,eAAb,CAA8BD,CAA9B,CAiBA,CAhBAF,CAAO,CAACG,IAAR,CAAa,aAAb,CAA4B,CAACD,CAA7B,CAgBA,CAbIF,CAAO,CAACI,QAAR,CAAiB,QAAjB,CAaJ,EAZEL,CAAK,CAACM,WAAN,CAAkB,QAAlB,CAYF,CAXEL,CAAO,CAACK,WAAR,CAAoB,QAApB,EACCC,OADD,EAWF,GAPElB,CAAC,CAAC,gCAAD,CAAD,CAAoCiB,WAApC,CAAgD,QAAhD,CAOF,CANEX,CAAU,CAACW,WAAX,CAAuB,QAAvB,EACCC,OADD,EAMF,CAJEP,CAAK,CAACQ,QAAN,CAAe,QAAf,CAIF,CAHEP,CAAO,CAACO,QAAR,CAAiB,QAAjB,EACCC,SADD,EAGF,IAED,CA1BD,CA4BD,CAjC+B,CAoCnC,CAtCA,EAsCCC,MAtCD,CAsCSpB,MAtCT,C","sourcesContent":["(function expandCollapseScript($, Drupal) {\n \n Drupal.behaviors.expandCollapse = {\n attach: function (context, settings) {\n\n var $allPanels = $('.expand-collapse__title', context).next('.expand-collapse__content').hide();\n\n $('.expand-collapse__title button', context).once().click(function (event) {\n\n var $this = $(this);\n var $target = $this.parent().next();\n\n // Set ARIA states.\n var state = $(this).attr('aria-expanded') === 'false' ? true : false;\n $(this).attr('aria-expanded', state);\n $target.attr('aria-hidden', !state);\n\n // Toggle classes and slide drawers.\n if ($target.hasClass('active')) {\n $this.removeClass('active')\n $target.removeClass('active')\n .slideUp();\n }\n else {\n $('.expand-collapse__title button').removeClass('active')\n $allPanels.removeClass('active')\n .slideUp();\n $this.addClass('active')\n $target.addClass('active')\n .slideDown();\n }\n return false;\n\n });\n\n }\n }\n\n}(jQuery, Drupal));"],"file":"expand-collapse.js"}