{"version":3,"file":"news_carousel.min.js","sources":["news_carousel.js"],"sourcesContent":["/**\n * @file\n * Attaches the behaviors for local Carousel Content component.\n */\n(function (Drupal, once) {\n\n 'use strict';\n\n Drupal.behaviors.carouselContent = {\n attach: function (context) {\n const elements = once('carouselContent', '.paragraph--type--carousel-with-content .news-items', context);\n if (elements.length) {\n const isMobile = window.matchMedia(\"(max-width: 512px)\").matches;\n const itemsContainer = document.querySelector('.paragraph--type--carousel-with-content .news-items');\n if (isMobile) {\n itemsContainer.style.display = 'grid';\n itemsContainer.style.gridTemplateColumns = 'repeat(2, 1fr)';\n itemsContainer.style.gap = '20px';\n itemsContainer.style.overflowX = 'auto';\n } else {\n const news_slider = tns({\n container: \".paragraph--type--carousel-with-content .news-items\",\n items: 3,\n loop: false,\n gutter: 20,\n nav: false,\n responsive: {\n 810: {\n items: 2,\n },\n 1120: {\n items: 3,\n },\n },\n });\n }\n }\n },\n };\n})(Drupal, once);\n"],"names":["Drupal","once","behaviors","carouselContent","attach","context","itemsContainer","length","isMobile","window","matchMedia","matches","document","querySelector","style","display","gridTemplateColumns","gap","overflowX","tns","container","items","loop","gutter","nav","responsive","810","1120"],"mappings":"CAIA,CAAWA,EAAQC,KAIjBD,EAAOE,UAAUC,gBAAkB,CACjCC,OAAQ,SAAUC,GACZ,IAGQC,EAHSL,EAAK,kBAAmB,sDAAuDI,CAAO,EAC1FE,SACLC,EAAWC,OAAOC,WAAW,oBAAoB,EAAEC,QACnDL,EAAiBM,SAASC,cAAc,qDAAqD,EAC/FL,GACFF,EAAeQ,MAAMC,QAAU,OAC/BT,EAAeQ,MAAME,oBAAsB,iBAC3CV,EAAeQ,MAAMG,IAAM,OAC3BX,EAAeQ,MAAMI,UAAY,QAEbC,IAAI,CACtBC,UAAW,sDACXC,MAAO,EACPC,KAAM,CAAA,EACNC,OAAQ,GACRC,IAAK,CAAA,EACLC,WAAY,CACVC,IAAK,CACHL,MAAO,CACT,EACAM,KAAM,CACJN,MAAO,CACT,CACF,CACF,CAAC,EAGX,CACF,CACD,GAAErB,OAAQC,IAAI"}