{"version":3,"file":"terms-snippets/tos-frontend.js","mappings":";;;;AAAA,SAASA,WAAWA,CAACC,EAAE,EAAC;EACpB,MAAMC,UAAU,GAAGC,QAAQ,CAACC,cAAc,CAACH,EAAE,CAAC;EAE9C,IAAG,CAACC,UAAU,EAAC;IACX,OAAO,KAAK;EAChB;EAEA,MAAMG,cAAc,GAAGH,UAAU,CAACI,OAAO,CAAC,SAAS,CAAC;EAEpD,IAAG,CAACD,cAAc,EAAC;IACf;EACJ;EAEA,MAAME,eAAe,GAAGA,CAAA,KAAM;IAC1B,MAAMC,YAAY,GAAGH,cAAc,CAACI,gBAAgB,CAAC,cAAc,CAAC;IAEpE,KAAI,MAAMC,QAAQ,IAAIF,YAAY,EAAC;MAC/BE,QAAQ,CAACC,SAAS,CAACC,GAAG,CAAC,QAAQ,CAAC;IACpC;EACJ,CAAC;EAED,MAAMC,WAAW,GAAIC,EAAE,IAAK;IACxBP,eAAe,CAAC,CAAC;IACjB,MAAMQ,WAAW,GAAGZ,QAAQ,CAACC,cAAc,CAAC,SAAS,GAAGU,EAAE,CAAC;IAE3DC,WAAW,CAACJ,SAAS,CAACK,MAAM,CAAC,QAAQ,CAAC;EAC1C,CAAC;EAEDd,UAAU,CAACe,gBAAgB,CAAC,QAAQ,EAAGC,CAAC,IAAK;IACzC,MAAMC,SAAS,GAAGD,CAAC,CAACE,aAAa,CAACC,KAAK;IACvCR,WAAW,CAACM,SAAS,CAAC;EAC1B,CAAC,CAAC;AACN;AAEAnB,WAAW,CAAC,WAAW,CAAC,C","sources":["webpack://rewind-gutenblocks/./src/terms-snippets/tos-frontend.js"],"sourcesContent":["function TosSnippets(el){\n const $tosSelect = document.getElementById(el);\n\n if(!$tosSelect){\n return false;\n }\n\n const $parentWrapper = $tosSelect.closest('section');\n\n if(!$parentWrapper){\n return;\n }\n\n const hideAllSnippets = () => {\n const $allSnippets = $parentWrapper.querySelectorAll('.tos-snippet');\n\n for(const $snippet of $allSnippets){\n $snippet.classList.add('d-none');\n }\n }\n\n const showSnippet = (id) => {\n hideAllSnippets();\n const $theSnippet = document.getElementById('snippet' + id);\n\n $theSnippet.classList.remove('d-none');\n }\n\n $tosSelect.addEventListener('change', (e) => {\n const currentID = e.currentTarget.value;\n showSnippet(currentID);\n })\n}\n\nTosSnippets('tosSelect');"],"names":["TosSnippets","el","$tosSelect","document","getElementById","$parentWrapper","closest","hideAllSnippets","$allSnippets","querySelectorAll","$snippet","classList","add","showSnippet","id","$theSnippet","remove","addEventListener","e","currentID","currentTarget","value"],"sourceRoot":""}