{"version":3,"file":"globalOffices.entry.js","mappings":"YAAC,MAAMA,EAAaC,SAASC,iBAAiB,iDAE9C,IAAK,MAAMC,KAAQH,EACfG,EAAKC,iBAAiB,SAAS,SAAUC,GACrCA,EAAMC,iBACWC,KAAKC,cAAc,2DACdC,UAAUC,SAAS,QAErCC,EAAgBJ,MAGhBK,EAAcL,KAEtB,IAGqBJ,EAAKK,cAAc,0DAC3BJ,iBAAiB,SAAS,SAAUC,GAC7CA,EAAMQ,iBACV,IAGJ,SAASD,EAAcE,GACnB,IAAK,MAAMX,KAAQH,EAAY,CAC3B,MAAMe,EAAWZ,EAAKK,cAAc,2DAChCO,EAASN,UAAUC,SAAS,SAC5BK,EAASN,UAAUO,OAAO,OAElC,CACwBF,EAAQN,cAAc,2DAC9BC,UAAUQ,IAAI,OAClC,CAEA,SAASN,EAAgBR,GACrB,MAAMe,EAAef,EAAKK,cAAc,2DACpCU,EAAaT,UAAUC,SAAS,SAChCQ,EAAaT,UAAUO,OAAO,OAEtC,CAGYf,SAASkB,eAAe,qBAChCf,iBAAiB,SAAS,WACKH,SAASO,cAAc,+BAE/BY,eAAe,CAClCC,SAAU,SACVC,YAAY,GAEpB,IAIA,MAAMC,EAAUC,KAAKC,MAAMC,QAAQ,eACnCF,KAAKC,MAAME,QAAQJ,GAEnB,MAAMK,EAAKJ,KAAKK,SAAS,CAAEC,QAAS,EAAGC,YAAa,EAAGC,QAAQ,IAC/D,IAAK,IAAIC,EAAI,EAAGA,EAAIV,EAAQW,OAAQD,IAAK,CACrC,IAAIE,EAAkB,IAANF,EAAU,GAAK,QAC/BL,EAAGQ,GAAGb,EAAQU,GAAI,CAAEI,KAAM,CAAEC,EAAG,GAAIC,IAAK,IAAMC,SAAU,IAAKV,OAAQ,EAAGC,YAAa,GAAIU,MAAM,EAAMC,KAAM,mBAAqBP,EACpI,CAEAP,EAAGe,M","sources":["webpack://DDI-Main-Marketing-Website/./src/about/globalOfficesDetailsOpener.js"],"sourcesContent":["const list_items = document.querySelectorAll(\".section__global__locations__area__list__item\");\r\n\r\nfor (const item of list_items) {\r\n item.addEventListener(\"click\", function (event) {\r\n event.preventDefault();\r\n const location = this.querySelector(\".section__global__locations__area__list__item--location\");\r\n const open = location.classList.contains(\"open\");\r\n if (open) {\r\n removeOpenClass(this);\r\n }\r\n else {\r\n moveOpenClass(this);\r\n }\r\n });\r\n //The nested details container should be able to be clicked and dragged without firing parent close event. \r\n //That's what this function does. Allows tel and mailto links to fire but immediately stops their propagation bubbling.\r\n const itemLocation = item.querySelector('.section__global__locations__area__list__item__details');\r\n itemLocation.addEventListener(\"click\", function (event) {\r\n event.stopPropagation();\r\n })\r\n}\r\n\r\nfunction moveOpenClass(newItem) {\r\n for (const item of list_items) {\r\n const location = item.querySelector(\".section__global__locations__area__list__item--location\");\r\n if (location.classList.contains(\"open\")) {\r\n location.classList.remove(\"open\")\r\n }\r\n }\r\n const newItemLocation = newItem.querySelector(\".section__global__locations__area__list__item--location\");\r\n newItemLocation.classList.add(\"open\");\r\n}\r\n\r\nfunction removeOpenClass(item) {\r\n const itemLocation = item.querySelector(\".section__global__locations__area__list__item--location\");\r\n if (itemLocation.classList.contains(\"open\")) {\r\n itemLocation.classList.remove(\"open\")\r\n }\r\n}\r\n\r\n//When the user clicks the cta, move the view window down. \r\nconst cta = document.getElementById('exploreOfficesCTA');\r\ncta.addEventListener('click', function () {\r\n const globalOfficesContainer = document.querySelector('.section__global__locations');\r\n\r\n globalOfficesContainer.scrollIntoView({\r\n behavior: 'smooth',\r\n alignToTop: true\r\n })\r\n})\r\n\r\n\r\n//Map animation stuff\r\nconst circles = gsap.utils.toArray('.svg_circle');\r\ngsap.utils.shuffle(circles);\r\n\r\nconst tl = gsap.timeline({ repeat: -1, repeatDelay: 1, paused: true });\r\nfor (let i = 0; i < circles.length; i++) {\r\n let placement = i === 0 ? \"\" : \"<1.25\"\r\n tl.to(circles[i], { attr: { r: 10, cy: -15 }, duration: .75, repeat: 1, repeatDelay: .5, yoyo: true, ease: \"back.inOut(1.7)\" }, placement)\r\n}\r\n\r\ntl.play();"],"names":["list_items","document","querySelectorAll","item","addEventListener","event","preventDefault","this","querySelector","classList","contains","removeOpenClass","moveOpenClass","stopPropagation","newItem","location","remove","add","itemLocation","getElementById","scrollIntoView","behavior","alignToTop","circles","gsap","utils","toArray","shuffle","tl","timeline","repeat","repeatDelay","paused","i","length","placement","to","attr","r","cy","duration","yoyo","ease","play"],"sourceRoot":""}