!function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}window.UniGrazOembed=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://oembed.uni-graz.at/oembed/",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return t};if("object"===t(e))if("string"==typeof o)if("function"==typeof n){var r=[];e.forEach((function(t,e){r[e]={href:t.getAttribute("href")}}));var i={urls:JSON.stringify(r)},c=new URL(o);c.search=new URLSearchParams(i),fetch(c,{headers:{"Content-Type":"application/json"}}).then((function(t){return t.json()})).then((function(o){o.hasOwnProperty("oembeds")&&e.forEach((function(e,r){var i=o.oembeds[r];try{i=n(i)}catch(t){}if(null!==i&&"object"===t(i)&&"html"in i&&"string"==typeof i.html&&i.html){var c=document.createElement("template");c.innerHTML=i.html.trim(),e.replaceWith(c.content.firstChild)}}))})).catch((function(t){console.error("Error:",t)}))}else console.error("format of callback has to be function, "+t(o)+" given");else console.error("format of webservice has to be string, "+t(o)+" given");else console.error("format of links has to be object, "+t(e)+" given")}}();
