{"version":3,"file":"js/6138-b4425bbf2eff1ef9e699.chunk.js","mappings":"kIAEAA,KAAO,KACL,MAAMC,EAAe,0CACKD,IAAO,GAAGC,cAAyBC,OAMrC,IACtBF,IAAO,GAAGC,0CAAqDE,SAAS,qBACxEH,IAAO,GAAGC,UAAqBG,YAAY,UAAUD,SAAS,qBAE9DH,IAAO,GAAGC,YAAuBI,GAAG,SAAS,KAC3CL,IAAO,GAAGC,cAAyBG,YAAY,UAAUD,SAAS,WAClEH,IAAO,GAAGC,UAAqBG,YAAY,WAAWD,SAAS,SAAS,IAE5E,G","sources":["webpack://agra/./app/javascript/phoenix/stacked-navigation.js"],"sourcesContent":["import jQuery from 'jquery'\n\njQuery(() => {\n const stackedPills = '.stacked-navigation .nav-tabs .nav-item'\n const numberOfSelectors = jQuery(`${stackedPills}.selector`).length\n\n // If there are more than 5 selectors, collapse all after the first 4 and activate a \"More\" button\n // that will reveal them.\n // There is no option to re-collapse after expanding; the idea is that the user will choose one of the selectors to click\n // on at that point.\n if (numberOfSelectors > 5) {\n jQuery(`${stackedPills}.selector:nth-child(n+5):not(.active)`).addClass('d-none d-md-block')\n jQuery(`${stackedPills}.more`).removeClass('d-none').addClass('d-block d-md-none')\n\n jQuery(`${stackedPills}.more a`).on('click', () => {\n jQuery(`${stackedPills}.selector`).removeClass('d-none').addClass('d-block')\n jQuery(`${stackedPills}.more`).removeClass('d-block').addClass('d-none')\n })\n }\n})\n"],"names":["jQuery","stackedPills","length","addClass","removeClass","on"],"sourceRoot":""}