{"version":3,"file":"csrf.js","names":["metaCsrf","document","querySelector","metaCsrfContents","getAttribute","split","name","token","setters","execute"],"sources":["toolbox/csrf.js"],"sourcesContent":["/**\n * CSRF tools\n */\n\n/**\n * Get the CSRF token name and value generated in the tag.\n * @returns {object} An object containing both the CSRF token name and value\n */\nexport function getCSRF() {\n const metaCsrf = document.querySelector('meta[name=\"csrf\"]');\n if (!metaCsrf) {\n return null;\n }\n const metaCsrfContents = metaCsrf.getAttribute('content').split('||');\n return {\n name: metaCsrfContents[0],\n token: metaCsrfContents[1],\n };\n}\n"],"mappings":"4EAQO,UAAmB,CACtB,KAAM,CAAAA,CAAQ,CAAGC,QAAQ,CAACC,aAAa,CAAC,qBAAmB,CAAC,CAC5D,GAAI,CAACF,CAAQ,CACT,MAAO,KAAI,CAEf,KAAM,CAAAG,CAAgB,CAAGH,CAAQ,CAACI,YAAY,CAAC,SAAS,CAAC,CAACC,KAAK,CAAC,IAAI,CAAC,CACrE,MAAO,CACHC,IAAI,CAAEH,CAAgB,CAAC,CAAC,CAAC,CACzBI,KAAK,CAAEJ,CAAgB,CAAC,CAAC,CAC7B,CACJ,CAAC,GAAAK,OAAA,IAAAC,OAAA,SAAAA,CAAA","ignoreList":[]}