/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/csg-html-plugin-insert@1.0.0/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var assign=require("lodash.assign"),forEach=require("lodash.foreach");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var _fs=require("fs"),_fs2=_interopRequireDefault(_fs);function MyPlugin(t){this.options=t}MyPlugin.prototype.apply=function(t){t.plugin("compilation",(function(t){function n(n,s,e){n&&n.length&&forEach(n,(function(n,i){var o=e;"function"==typeof e&&(o=e(n,t,i)),!n.attributes&&(n.attributes={}),n.attributes[s]=o}))}t.plugin("html-webpack-plugin-alter-asset-tags",(function(t,s){t.body.unshift({attributes:{type:"text/javascript"},closeTag:!0,tagName:"script",innerHTML:'Sentry.init({dsn: "'+process.env.dsn+'",release: "'+process.env.release+'"})'}),t.body.unshift({attributes:{src:"https://browser.sentry-cdn.com/5.27.2/bundle.tracing.min.js",type:"text/javascript",integrity:"sha384-rpbR8aO7ZS39FLWobN304qdytlzvMSYnMFEJgiCC2dUEWmaD1W9bSWfy20JHFU6Q",crossorigin:"anonymous"},closeTag:!0,tagName:"script"}),t.body.unshift({attributes:{src:"https://browser.sentry-cdn.com/5.27.2/bundle.min.js",type:"text/javascript",integrity:"sha384-+69fdGw+g5z0JJXjw46U9Ls/d9Y4Zi6KUlCcub+qIWsUoIlyimCujtv+EnTTHPTD",crossorigin:"anonymous"},closeTag:!0,tagName:"script"});var e=assign({},null,t.plugin.options&&t.plugin.options.attributes);if(forEach(e,(function(s,e){"string"!=typeof s&&"function"!=typeof s||(n(t.head,e,s),n(t.body,e,s))})),"function"!=typeof s)return t;s(null,t)}))})),t.plugin("done",(function(t){const n=/\.map$/;let s=Object.keys(t.compilation.assets).filter((function(t){return n.test(t)}));forEach(s,(function(n){var s=t.compilation.assets[n].existsAt;_fs.existsSync(s)&&_fs2.default.unlinkSync(s)}))}))},module.exports=MyPlugin;
//# sourceMappingURL=/sm/2823a6d34c2b182b7149c991ab87ebc33a4c2fb01a846b3e51c656a0570bcdc8.map