{"version":3,"sources":["jsdelivr-header.js","/npm/connect-send-xml@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,OAAO,QAAQ,IAAM,SAAU,GAG7B,SAAS,EAAa,GAEpB,IAAI,EAAM,KAGV,IAAK,EACH,MAAM,IAAI,MAAM,+DAGd,EACF,EAAI,UAAU,eAAgB,mBAI9B,OAAO,EAGT,EAAI,IAAI,EACV,CASA,OA7BA,EAAO,GAAQ,CAAC,EAsBhB,SAAgB,EAAK,EAAK,GACnB,EAAI,MACP,EAAI,IAAM,GAEZ,GACF,CAGF","file":"/npm/connect-send-xml@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/connect-send-xml@1.0.0/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","'use strict';\n\nmodule.exports.xml = function (opts) {\n  opts = opts || {};\n\n  function sendResponse(data) {\n    /*jshint validthis:true*/\n    var res = this\n      ;\n\n    if (!res) {\n      throw new Error('You called `xml()`, detatched send from the response object');\n    }\n\n    if (data) {\n      res.setHeader('Content-Type', 'application/xml');\n      // TODO ensure valid xml?\n      // add <?xml version=\"1.0\" encoding=\"UTF-8\"?> if not present?\n    } else {\n      data = undefined;\n    }\n\n    res.end(data);\n  }\n\n  function attach(req, res, next) {\n    if (!res.xml) {\n      res.xml = sendResponse;\n    }\n    next();\n  }\n\n  return attach;\n};\n"]}