{"version":3,"sources":["jsdelivr-header.js","/npm/unwrap-node-simple@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACMA,SAAS,OAAQ,EAAQ,GAEvB,IAAI,EAAY,EAahB,IAdK,IAAQ,EAAS,EAAO,aAM7B,EAAK,EAAO,aACF,EAAG,WAAa,KAAK,WAA8B,MAAjB,EAAG,YAC7C,EAAO,YAAY,GACnB,EAAK,MAKA,EAAO,WAAW,OAAS,GAChC,EAAK,EAAO,WAAW,GAClB,IAAO,EAAQ,GAEpB,EAAO,aAAa,EAAI,GAI1B,EAAO,WAAW,YAAY,EAChC,CApCA,OAAO,QAAU","file":"/npm/unwrap-node-simple@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/unwrap-node-simple@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","module.exports = unwrap;\n\n/**\n * Unwraps the given `source` DOM element by prepending all of its child nodes\n * into `target` before finally removing `source` from the DOM.\n *\n * @param {Element} source - DOM element to unwrap and then remove from the DOM\n * @param {Element} [target] - Optional DOM element where `sources` children\n *   should be inserted. Defaults to `source.parentNode`\n * @public\n */\n\nfunction unwrap (source, target) {\n  if (!target) target = source.parentNode;\n  var start, end, el;\n\n  // if the first child is a TextNode with the 0-width space inside of it,\n  // then we can safely remove it from the `source`, so that we don't end\n  // up transferring it to the `target` element\n  el = source.firstChild;\n  if (el && el.nodeType === Node.TEXT_NODE && el.nodeValue === '\\u200B') {\n    source.removeChild(el);\n    el = null;\n  }\n\n  // transfer child nodes to *before* the `source` element in the `target` DOM\n  // element\n  while (source.childNodes.length > 0) {\n    el = source.childNodes[0];\n    if (!start) start = el;\n    end = el;\n    target.insertBefore(el, source);\n  }\n\n  // remove `source` from the DOM\n  source.parentNode.removeChild(source);\n}\n"]}