!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.swh=n():(e.swh=e.swh||{},e.swh.badges=n())}(self,(function(){return function(){"use strict";var e={d:function(n,t){for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};function t(e,n){var t,o,r=n;if("origin"===e)t=Urls.swh_badge(e,n),o=Urls.browse_origin()+"?origin_url="+n;else{var i=n.indexOf(";");-1!==i?(r=n.slice(0,i),t=Urls.swh_badge_swhid(r),$(".swhid").each((function(e,n){n.id===r&&(o=n.pathname)}))):(t=Urls.swh_badge_swhid(n),o=Urls.browse_swhid(n))}var a=""+window.location.origin+t,d=""+window.location.origin+o,l='\n  <a href="'+d+'">\n    <img class="swh-badge" src="'+a+'" alt="Archived | '+n+'"/>\n  </a>\n  <div>\n    <label>HTML</label>\n    <pre><code class="swh-badge-html html">&lt;a href="'+d+'"&gt;\n    &lt;img src="'+a+'" alt="Archived | '+r+'"/&gt;\n&lt;/a&gt;</code></pre>\n  </div>\n  <div>\n    <label>Markdown</label>\n    <pre><code class="swh-badge-md markdown">[![SWH]('+a+")]("+d+')</code></pre>\n  </div>\n  <div>\n    <label>reStructuredText</label>\n    <pre class="swh-badge-rst">.. image:: '+a+"\n    :target: "+d+"</pre>\n  </div>";swh.webapp.showModalHtml("Software Heritage badge integration",l),swh.webapp.highlightCode(!1,".swh-badge-html"),swh.webapp.highlightCode(!1,".swh-badge-md")}return e.r(n),e.d(n,{showBadgeInfoModal:function(){return t}}),n}()}));
//# sourceMappingURL=badges.fba53d5f61bed948ddd4.js.map