{"version":3,"sources":["jsdelivr-header.js","/npm/vite-plugin-vue-pug-indent-fix@1.0.4/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,OAAO,QAAU,WACf,MAAO,CACL,KAAM,iCACN,SAAA,CAAU,EAAK,GACb,GAAG,UAAU,KAAK,GAAK,CACrB,GAAG,EAAI,WAAW,aAAc,CAC9B,MAAM,EAAc,EAAI,MAAM,uCAC9B,IAAI,EAAU,GAAe,EAAY,GACzC,MAAM,EAAa,EACb,EAAa,EAAQ,MAAM,gBAC3B,EAAS,GAAc,EAAW,GAExC,OADG,GAAW,IAAQ,EAAU,EAAQ,MAAM,MAAM,KAAI,GAAO,EAAI,QAAQ,EAAQ,MAAK,KAAK,OACtF,EAAI,QAAQ,EAAY,EACjC,CACA,MAAM,EAAO,EAAI,MAAM,gBACjB,EAAS,GAAQ,EAAK,GAC5B,OAAI,EAAe,EAAI,MAAM,MAAM,KAAI,GAAO,EAAI,QAAQ,EAAQ,MAAK,KAAK,MACrE,CACT,CACF,EAEJ","file":"/npm/vite-plugin-vue-pug-indent-fix@1.0.4/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/vite-plugin-vue-pug-indent-fix@1.0.4/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","module.exports = function vitePluginVuePugIndentFix() {\r\n  return {\r\n    name: 'vite-plugin-vue-pug-indent-fix',\r\n    transform(src, id) {\r\n      if(/\\.(vue)/.test(id)) {\r\n        if(src.startsWith(\"<template\")) { // Vue3 setup component\r\n          const contentTemp = src.match(/<template(?:.+?)>(.*?)<\\/template>/s)\r\n          let content = contentTemp && contentTemp[1]\r\n          const oldContent = content\r\n          const indentTemp = content.match(/^\\r?\\n?(\\s+)/)\r\n          const indent = indentTemp && indentTemp[1]\r\n          if(content && indent) content = content.split('\\n').map(str => str.replace(indent, '')).join('\\n')\r\n          return src.replace(oldContent, content)\r\n        }\r\n        const temp = src.match(/^\\r?\\n?(\\s+)/)\r\n        const indent = temp && temp[1]\r\n        if (indent) return src.split('\\n').map(str => str.replace(indent, '')).join('\\n')\r\n        return src\r\n      }\r\n    }\r\n  }\r\n}"]}