!function(e){var n=function(a,b){this.options=b;this.$element=e(a);this.$container=e("\x3cdiv/\x3e",{"class":"ms-container"});this.$selectableContainer=e("\x3cdiv/\x3e",{"class":"ms-selectable"});this.$selectionContainer=e(".ms-selection");this.$selectableUl=e("\x3cul/\x3e",{"class":"ms-list",tabindex:"-1"});this.$target=e("#s-cont");this.$selectionUl=e("\x3cul/\x3e",{"class":"ms-list",tabindex:"-1"});this.scrollTo=0;this.elemsSelector="li:visible:not(.ms-optgroup-label,.ms-optgroup-container,."+
b.disabledClass+")"};n.prototype={constructor:n,init:function(){var a=this,b=this.$element;if(0===b.next(".ms-container").length){b.css({position:"absolute",left:"-9999px"});b.attr("id",b.attr("id")?b.attr("id"):Math.ceil(1E3*Math.random())+"multiselect");this.$container.attr("id","ms-"+b.attr("id"));this.$container.addClass(a.options.cssClass);var c={selectableUl:[],selectionUl:[],selectableOptgroups:{},selectionOptgroups:{}};b.find("option").each(function(d){a.generateListFromOption(this,d,null,
c)});a.$selectableUl.prepend(c.selectableUl.join(""));a.$selectionUl.prepend(c.selectionUl.join(""));for(var f in c.selectableOptgroups)a.$selectableUl.find("#optgroup-selectable-"+f+" ul.ms-optgroup").append(c.selectableOptgroups[f].join("")),a.$selectionUl.find("#optgroup-selection-"+f+" ul.ms-optgroup").append(c.selectionOptgroups[f].join(""));c=null;this.$selectionUl.find(".ms-optgroup-label").hide();a.options.selectableHeader&&a.$selectableContainer.append(a.options.selectableHeader);a.$selectableContainer.append(a.$selectableUl);
a.options.selectableFooter&&a.$selectableContainer.append(a.options.selectableFooter);a.options.selectionHeader&&a.$selectionContainer.append(a.options.selectionHeader);a.$selectionUl.children("li").appendTo(a.$target);a.$selectionUl=a.$target;a.$selectionUl.outerHTML=a.$selectionUl.outerHTML;a.$selectionContainer.outerHTML=a.$selectionContainer.outerHTML;a.$selectionContainer.append(a.$selectionUl);a.options.selectionFooter&&a.$selectionContainer.append(a.options.selectionFooter);a.$container.append(a.$selectableContainer);
b.after(a.$container);a.activeMouse(a.$selectableUl);a.activeKeyboard(a.$selectableUl);a.options.dblClick?(a.$selectableUl.on("dblclick",".ms-elem-selectable",function(){a.select(e(this).data("ms-value"))}),a.$selectionUl.on("dblclick",".ms-elem-selection",function(){a.deselect(e(this).data("ms-value"))})):(a.$selectableUl.on("mousedown",".ms-elem-selectable",function(d){a.$selectableUl.on("mouseup mousemove",".ms-elem-selectable",function l(g){"mouseup"===g.type&&a.select(e(this).data("ms-value"));
a.$selectableUl.off("mouseup mousemove",l)})}),a.$selectionUl.on("mousedown",".ms-elem-selection",function(d){a.$selectionUl.on("mouseup mousemove",".ms-elem-selection",function l(g){"mouseup"===g.type&&a.deselect(e(this).data("ms-value"),g);a.$selectionUl.off("mouseup mousemove",l)})}),a.$selectionUl.on("click",".check-item",function(d){let h=d.target.closest("li").getAttribute("data-ms-value");a.checkSelection(h,d)}),a.$selectionUl.on("click",".link-item",function(d){let h=d.target.closest("li").getAttribute("data-ms-value");
a.checkLink(h,d)}));a.activeMouse(a.$selectionUl);a.activeKeyboard(a.$selectionUl);b.on("focus",function(){a.$selectableUl.focus()})}b=b.find("option:selected").map(function(){return e(this).val()}).get();a.select(b,"init");"function"===typeof a.options.afterInit&&a.options.afterInit.call(this,this.$container)},generateListFromOption:function(a,b,c,f){var d=this;c=d.$element;for(var h="",g=e(a),l=0;l<a.attributes.length;l++){var k=a.attributes[l];"value"!==k.name&&"disabled"!==k.name&&(h+=k.name+
'\x3d"'+k.value+'" ')}k="true"===g.attr("is-level-one");a="";k||(a=g.val().includes("checked")?'\x3cinput class\x3d"check-item" type\x3d"checkbox" checked\x3e':'\x3cinput class\x3d"check-item" type\x3d"checkbox"\x3e');l="";k||(l=g.val().includes("link")?'\x3cinput class\x3d"link-item" type\x3d"checkbox" checked\x3e':'\x3cinput class\x3d"link-item" type\x3d"checkbox"\x3e');k=g.val();var m=d.sanitize(k),r=d.escapeHTML(g.text()),t=g.prop("disabled")||c.prop("disabled"),u=g.prop("selected")?!0:!1,v="true"===
g.attr("data-is-focus");c="\x3cli "+h+' data-ms-value\x3d"'+k+'" class\x3d"ms-elem-selectable'+(t?" "+d.options.disabledClass:"")+(u?" ms-selected":"")+'" id\x3d"ms-elem-'+m+'-selectable" style\x3d"'+(v?"color: #fff;\n  text-decoration: none;\n  background-color: #ad9c9c;":"")+'"\x3e\x3cspan\x3e'+r+"\x3c/span\x3e\x3c/li\x3e";h="\x3cli "+h+' data-ms-value\x3d"'+k+'" class\x3d"ms-elem-selection'+(t?" "+d.options.disabledClass:"")+(u?" ms-selected":"")+'" id\x3d"ms-elem-'+m+'-selection" style\x3d"'+
(v?"color: #fff;\n  text-decoration: none;\n  display: none;\n  background-color: #ad9c9c;":"display: none;")+'"\x3e\x3cspan\x3e'+r+a+l+"\x3c/span\x3e\x3c/li\x3e";var p=g.parent("optgroup");g="object"===typeof f;0<p.length?(m=p.attr("label"),a=d.sanitize(m),l=d.$selectableUl.find("#optgroup-selectable-"+a),k=d.$selectionUl.find("#optgroup-selection-"+a),0===l.length&&(m='\x3cul class\x3d"ms-optgroup"\x3e\x3cli class\x3d"ms-optgroup-label"\x3e\x3cspan\x3e'+m+"\x3c/span\x3e\x3c/li\x3e\x3c/ul\x3e",l=
e('\x3cli class\x3d"ms-optgroup-container"\x3e\x3c/li\x3e'),k=e('\x3cli class\x3d"ms-optgroup-container"\x3e\x3c/li\x3e'),l.attr("id","optgroup-selectable-"+a),k.attr("id","optgroup-selection-"+a),l.append(e(m)),k.append(e(m)),d.options.selectableOptgroup&&(l.find(".ms-optgroup-label").on("click",function(){var q=p.children(":not(:selected, :disabled)").map(function(){return e(this).val()}).get();d.select(q)}),k.find(".ms-optgroup-label").on("click",function(){var q=p.children(":selected:not(:disabled)").map(function(){return e(this).val()}).get();
d.deselect(q)})),d.$selectableUl.append(l),d.$selectionUl.append(k),g&&(f.selectableOptgroups[a]=[],f.selectionOptgroups[a]=[])),g?(b=void 0==b?f.selectableOptgroups[a].length:b,f.selectableOptgroups[a].splice(b,0,c),f.selectionOptgroups[a].splice(b,0,h)):(b=void 0==b?l.find("ul").children().length:b+1,e(c).insertAt(b,l.children()),e(h).insertAt(b,k.children()))):g?(b=void 0==b?f.selectableUl.length:b,f.selectableUl.splice(b,0,c),f.selectionUl.splice(b,0,h)):(b=void 0==b?d.$selectableUl.children().length:
b,e(c).insertAt(b,d.$selectableUl),e(h).insertAt(b,d.$selectionUl))},addOption:function(a){var b=this;void 0!==a.value&&null!==a.value&&(a=[a]);e.each(a,function(c,f){if(void 0!==f.value&&null!==f.value&&0===b.$element.find("option[value\x3d'"+f.value+"']").length){var d=e('\x3coption value\x3d"'+f.value+'"\x3e'+f.text+"\x3c/option\x3e"),h=void 0===f.nested?b.$element:e("optgroup[label\x3d'"+f.nested+"']");c=parseInt("undefined"===typeof f.index?h.children().length:f.index);f.optionClass&&d.addClass(f.optionClass);
f.disabled&&d.prop("disabled",!0);d.insertAt(c,h);b.generateListFromOption(d.get(0),c,f.nested)}})},escapeHTML:function(a){return e("\x3cdiv\x3e").text(a).html()},activeKeyboard:function(a){var b=this;a.on("focus",function(){e(this).addClass("ms-focus")}).on("blur",function(){e(this).removeClass("ms-focus")}).on("keydown",function(c){switch(c.which){case 40:case 38:c.preventDefault();c.stopPropagation();b.moveHighlight(e(this),38===c.which?-1:1);return;case 37:case 39:c.preventDefault();c.stopPropagation();
b.switchList(a);return;case 9:if(b.$element.is("[tabindex]")){c.preventDefault();var f=parseInt(b.$element.attr("tabindex"),10);f=c.shiftKey?f-1:f+1;e('[tabindex\x3d"'+f+'"]').focus();return}c.shiftKey&&b.$element.trigger("focus")}-1<e.inArray(c.which,b.options.keySelect)&&(c.preventDefault(),c.stopPropagation(),b.selectHighlighted(a))})},moveHighlight:function(a,b){var c=a.find(this.elemsSelector),f=c.filter(".ms-hover"),d=null,h=c.first().outerHeight(),g=a.height();this.$container.prop("id");c.removeClass("ms-hover");
1===b?(d=f.nextAll(this.elemsSelector).first(),0===d.length&&(b=f.parent(),b.hasClass("ms-optgroup")?(b=b.parent(),b=b.next(":visible"),d=0<b.length?b.find(this.elemsSelector).first():c.first()):d=c.first())):-1===b&&(d=f.prevAll(this.elemsSelector).first(),0===d.length&&(b=f.parent(),b.hasClass("ms-optgroup")?(b=b.parent(),b=b.prev(":visible"),d=0<b.length?b.find(this.elemsSelector).last():c.last()):d=c.last()));0<d.length&&(d.addClass("ms-hover"),c=a.scrollTop()+d.position().top-g/2+h/2,a.scrollTop(c))},
selectHighlighted:function(a){var b=a.find(this.elemsSelector),c=b.filter(".ms-hover").first();0<c.length&&(a.parent().hasClass("ms-selectable")?this.select(c.data("ms-value")):this.deselect(c.data("ms-value")),b.removeClass("ms-hover"))},switchList:function(a){a.blur();this.$container.find(this.elemsSelector).removeClass("ms-hover");a.parent().hasClass("ms-selectable")?this.$selectionUl.focus():this.$selectableUl.focus()},activeMouse:function(a){var b=this;this.$container.on("mouseenter",b.elemsSelector,
function(){e(this).parents(".ms-container").find(b.elemsSelector).removeClass("ms-hover");e(this).addClass("ms-hover")});this.$container.on("mouseleave",b.elemsSelector,function(){e(this).parents(".ms-container").find(b.elemsSelector).removeClass("ms-hover")})},refresh:function(){this.destroy();this.$element.dragAndDropSelect(this.options)},destroy:function(){e("#ms-"+this.$element.attr("id")).remove();this.$element.off("focus");this.$element.css("position","").css("left","");this.$element.removeData("multiselect")},
select:function(a,b){if("string"===typeof a||"number"===typeof a)a=[""+a];var c=this,f=this.$element,d=e.map(a,function(k){return c.sanitize(k)}),h=e("#ms-elem-"+d.join("-selectable, #ms-elem-")+"-selectable").filter(":not(."+c.options.disabledClass+")"),g=this.$selectionUl.find("#ms-elem-"+d.join("-selection, #ms-elem-")+"-selection").filter(":not(."+c.options.disabledClass+")"),l=f.find("option:not(:disabled)").filter(function(){return-1<e.inArray(this.value,a)});"init"===b&&(h=this.$selectableUl.find("#ms-elem-"+
d.join("-selectable, #ms-elem-")+"-selectable"),g=this.$selectionUl.find("#ms-elem-"+d.join("-selection, #ms-elem-")+"-selection"));0<h.length&&(h.addClass("ms-selected").hide(),g.addClass("ms-selected").show(),l.attr("selected","selected"),c.$container.find(c.elemsSelector).removeClass("ms-hover"),d=c.$selectableUl.children(".ms-optgroup-container"),0<d.length?(d.each(function(){var k=e(this).find(".ms-elem-selectable");k.length===k.filter(".ms-selected").length&&e(this).find(".ms-optgroup-label").hide()}),
c.$selectionUl.children(".ms-optgroup-container").each(function(){0<e(this).find(".ms-elem-selection").filter(".ms-selected").length&&e(this).find(".ms-optgroup-label").show()})):c.options.keepOrder&&"init"!==b&&(d=c.$selectionUl.find(".ms-selected"),1<d.length&&d.last().get(0)!=g.get(0)&&g.insertAfter(d.last())),"init"!==b&&(f.trigger("change"),"function"===typeof c.options.afterSelect&&c.options.afterSelect.call(this,a)))},checkSelection:function(a,b){let c;var f="";a.includes("link")&&(f="_link");
a.includes("checked")&&(a=a.split("_")[0]);b.target.checked?c=a+"_checked"+f:(c=a+f,a+="_checked"+f);if("string"===typeof a||"number"===typeof a)a=[""+a];var d=e("#selectedLevel1Categories");f=e("#selectedExpertCategories");let h=e("#selectedLevel2Categories");d=d.find("option").filter(function(){return-1<e.inArray(this.value,a)});void 0===d[0]&&(d=f.find("option").filter(function(){return-1<e.inArray(this.value,a)}),void 0===d[0]&&(d=h.find("option").filter(function(){return-1<e.inArray(this.value,
a)})));d[0].value=c;b.currentTarget.parentNode.parentNode.setAttribute("data-ms-value",c)},checkLink:function(a,b){let c;var f="";a.includes("checked")&&(f="_checked");a.includes("link")&&(a=a.split("_")[0]);b.target.checked?c=a+f+"_link":(c=a+f,a+=f+"_link");if("string"===typeof a||"number"===typeof a)a=[""+a];var d=e("#selectedLevel1Categories");f=e("#selectedExpertCategories");let h=e("#selectedLevel2Categories");d=d.find("option").filter(function(){return-1<e.inArray(this.value,a)});void 0===
d[0]&&(d=f.find("option").filter(function(){return-1<e.inArray(this.value,a)}),void 0===d[0]&&(d=h.find("option").filter(function(){return-1<e.inArray(this.value,a)})));d[0].value=c;b.currentTarget.parentNode.parentNode.setAttribute("data-ms-value",c)},deselect:function(a,b){if(null==b||"INPUT"!==b.target.nodeName){if("string"===typeof a||"number"===typeof a)a=[""+a];var c=this;b=this.$element;var f=e.map(a,function(g){return c.sanitize(g)}),d=e("#ms-elem-"+f.join("-selectable, #ms-elem-")+"-selectable");
f=this.$selectionUl.find("#ms-elem-"+f.join("-selection, #ms-elem-")+"-selection").filter(".ms-selected").filter(":not(."+c.options.disabledClass+")");var h=b.find("option").filter(function(){return-1<e.inArray(this.value,a)});0<f.length&&(d.removeClass("ms-selected").show(),f.removeClass("ms-selected").hide(),h.removeAttr("selected"),c.$container.find(c.elemsSelector).removeClass("ms-hover"),d=c.$selectableUl.children(".ms-optgroup-container"),0<d.length&&(d.each(function(){0<e(this).find(".ms-elem-selectable").filter(":not(.ms-selected)").length&&
e(this).find(".ms-optgroup-label").show()}),c.$selectionUl.children(".ms-optgroup-container").each(function(){0===e(this).find(".ms-elem-selection").filter(".ms-selected").length&&e(this).find(".ms-optgroup-label").hide()})),b.trigger("change"),"function"===typeof c.options.afterDeselect&&c.options.afterDeselect.call(this,a))}},select_all:function(){var a=this.$element,b=a.val();a.find('option:not(":disabled")').attr("selected","selected");this.$selectableUl.find(".ms-elem-selectable").filter(":not(."+
this.options.disabledClass+")").addClass("ms-selected").hide();this.$selectionUl.find(".ms-optgroup-label").show();this.$selectableUl.find(".ms-optgroup-label").hide();this.$selectionUl.find(".ms-elem-selection").filter(":not(."+this.options.disabledClass+")").addClass("ms-selected").show();this.$selectionUl.focus();a.trigger("change");"function"===typeof this.options.afterSelect&&(a=e.grep(a.val(),function(c){return 0>e.inArray(c,b)}),this.options.afterSelect.call(this,a))},deselect_all:function(){var a=
this.$element,b=a.val();a.find("option").removeAttr("selected");this.$selectableUl.find(".ms-elem-selectable").removeClass("ms-selected").show();this.$selectionUl.find(".ms-optgroup-label").hide();this.$selectableUl.find(".ms-optgroup-label").show();this.$selectionUl.find(".ms-elem-selection").removeClass("ms-selected").hide();this.$selectableUl.focus();a.trigger("change");"function"===typeof this.options.afterDeselect&&this.options.afterDeselect.call(this,b)},sanitize:function(a){var b=0;if(0==a.length)return b;
var c;var f=0;for(c=a.length;f<c;f++){var d=a.charCodeAt(f);b=(b<<5)-b+d;b|=0}return b}};e.fn.dragAndDropSelect=function(){var a=arguments[0],b=arguments;return this.each(function(){var c=e(this),f=c.data("multiselect"),d=e.extend({},e.fn.dragAndDropSelect.defaults,c.data(),"object"===typeof a&&a);f||c.data("multiselect",f=new n(this,d));if("string"===typeof a)f[a](b[1]);else f.init()})};e.fn.dragAndDropSelect.defaults={keySelect:[32],selectableOptgroup:!1,disabledClass:"disabled",dblClick:!1,keepOrder:!1,
cssClass:""};e.fn.dragAndDropSelect.Constructor=n;e.fn.insertAt=function(a,b){return this.each(function(){0===a?b.prepend(this):b.children().eq(a-1).after(this)})}}(window.jQuery);
!function t(q,u,v){function e(k,l){if(!u[k]){if(!q[k]){var g="function"==typeof require&&require;if(!l&&g)return g(k,!0);if(c)return c(k,!0);throw Error("Cannot find module '"+k+"'");}l=u[k]={exports:{}};q[k][0].call(l.exports,function(d){return e(q[k][1][d]||d)},l,l.exports,t,q,u,v)}return u[k].exports}for(var c="function"==typeof require&&require,h=0;h<v.length;h++)e(v[h]);return e}({1:[function(q,u,v){function r(){}function e(a){if(!(this instanceof e))throw new TypeError("Promises must be constructed via new");
if("function"!=typeof a)throw new TypeError("not a function");this._state=0;this._handled=!1;this._value=void 0;this._deferreds=[];d(a,this)}function c(a,b){for(;3===a._state;)a=a._value;0!==a._state?(a._handled=!0,e._immediateFn(function(){var f=1===a._state?b.onFulfilled:b.onRejected;if(null!==f){try{var p=f(a._value)}catch(n){return void k(b.promise,n)}h(b.promise,p)}else(1===a._state?h:k)(b.promise,a._value)})):a._deferreds.push(b)}function h(a,b){try{if(b===a)throw new TypeError("A promise cannot be resolved with itself.");
if(b&&("object"==typeof b||"function"==typeof b)){var f=b.then;if(b instanceof e)return a._state=3,a._value=b,void l(a);if("function"==typeof f)return void d((p=f,n=b,function(){p.apply(n,arguments)}),a)}a._state=1;a._value=b;l(a)}catch(z){k(a,z)}var p,n}function k(a,b){a._state=2;a._value=b;l(a)}function l(a){2===a._state&&0===a._deferreds.length&&e._immediateFn(function(){a._handled||e._unhandledRejectionFn(a._value)});for(var b=0,f=a._deferreds.length;b<f;b++)c(a,a._deferreds[b]);a._deferreds=
null}function g(a,b,f){this.onFulfilled="function"==typeof a?a:null;this.onRejected="function"==typeof b?b:null;this.promise=f}function d(a,b){var f=!1;try{a(function(p){f||(f=!0,h(b,p))},function(p){f||(f=!0,k(b,p))})}catch(p){f||(f=!0,k(b,p))}}var m=setTimeout;e.prototype.catch=function(a){return this.then(null,a)};e.prototype.then=function(a,b){var f=new this.constructor(r);return c(this,new g(a,b,f)),f};e.prototype.finally=function(a){var b=this.constructor;return this.then(function(f){return b.resolve(a()).then(function(){return f})},
function(f){return b.resolve(a()).then(function(){return b.reject(f)})})};e.all=function(a){return new e(function(b,f){function p(w,x){try{if(x&&("object"==typeof x||"function"==typeof x)){var A=x.then;if("function"==typeof A)return void A.call(x,function(B){p(w,B)},f)}n[w]=x;0==--z&&b(n)}catch(B){f(B)}}if(!a||void 0===a.length)return f(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(a);if(0===n.length)return b([]);for(var z=n.length,y=0;y<n.length;y++)p(y,n[y])})};
e.allSettled=function(a){return new this(function(b,f){function p(y,w){if(w&&("object"==typeof w||"function"==typeof w)){var x=w.then;if("function"==typeof x)return void x.call(w,function(A){p(y,A)},function(A){n[y]={status:"rejected",reason:A};0==--z&&b(n)})}n[y]={status:"fulfilled",value:w};0==--z&&b(n)}if(!a||void 0===a.length)return f(new TypeError(typeof a+" "+a+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(a);if(0===n.length)return b([]);
var z=n.length;for(f=0;f<n.length;f++)p(f,n[f])})};e.resolve=function(a){return a&&"object"==typeof a&&a.constructor===e?a:new e(function(b){b(a)})};e.reject=function(a){return new e(function(b,f){f(a)})};e.race=function(a){return new e(function(b,f){if(!a||void 0===a.length)return f(new TypeError("Promise.race accepts an array"));for(var p=0,n=a.length;p<n;p++)e.resolve(a[p]).then(b,f)})};e._immediateFn="function"==typeof setImmediate&&function(a){setImmediate(a)}||function(a){m(a,0)};e._unhandledRejectionFn=
function(a){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",a)};u.exports=e},{}],2:[function(q,u,v){var r=q("promise-polyfill");q=function(){function e(c){this.configuration=c;this.audion_id="605882ce589ef026631433b1";this.sprng_adswizz="622f7d8e4aedb205de3687f2"}return e.prototype.checkForConsent=function(){return new r((c=this,function(h,k){return window.__tcfapi?window.__tcfapi("addEventListener",2,function(l,g){try{"tcloaded"!==l.eventStatus&&"useractioncomplete"!==
l.eventStatus||window.__tcfapi("getCustomVendorConsents",2,function(d){d.grants&&d.grants[c.audion_id]&&d.grants[c.audion_id].vendorGrant?(console.debug("audion consent given"),c.configuration.consent={audion:!0},h()):d.grants&&d.grants[c.sprng_adswizz]&&d.grants[c.sprng_adswizz].vendorGrant?(console.debug("adswizz consent given"),c.configuration.consent={sprng:!0},h()):(console.debug("consent denied"),c.configuration.consent={audion:!1,sprng:!1},h())})}catch(d){return h()}finally{h()}}):(console.debug("no tcf api"),
h())}));var c},e.prototype.processConsent=function(c){return this.processConsent(c)},e.prototype.processConsent=function(c){var h,k;if(!this.configuration.consent)return c;if(!1===this.configuration.consent.audion&&-1<c.media.mp3.indexOf("zippycast")){var l=0;for(h=(k=Object.keys(c.media)).length;l<h;l++){var g=k[l];c.media[g]=c.media[g].replace("adn","main");c.media[g]=c.media[g].replace(/zippycast\/.*\/media/,"media")}}else if(!1===this.configuration.consent.sprng&&-1<c.media.mp3.indexOf("adswizz"))for(l=
0,h=(k=Object.keys(c.media)).length;l<h;l++)g=k[l],c.media[g]=c.media[g].replace("adn","main"),c.media[g]=c.media[g].replace(/adswizz\/media/,"media");return c},e}();u.exports=q},{"promise-polyfill":1}],3:[function(q,u,v){var r;var e=q("./iframe_resizer.coffee");var c=q("./subscribe_button_trigger.coffee");var h=q("./cmp_consent.coffee");var k=function(){function g(d){this.elem=d;d=this.elem.getAttribute("data-configuration").replace(/(^\s+|\s+$)/g,"");this.id=this.randomId(d);this.configuration=
"string"==typeof d?d.match(/^{/)?JSON.parse(d):this.getInSiteConfig(d)||{json_config:d}:d;this.configuration.parentLocationHash=window.location.hash;this.configuration.embedCode=this.elem.outerHTML;try{this.configuration.customOptions=JSON.parse(this.elem.getAttribute("data-options"))}catch(m){console.debug("[Podigee Podcast Player] data-options has invalid JSON")}this.url="https://player.podigee-cdn.net/podcast-player/podigee-podcast-player.html?v\x3d2188c\x26id\x3d"+this.id+"\x26iframeMode\x3dscript";
this.buildIframe();this.setupListeners();this.replaceElem();this.configuration&&this.injectConfiguration();this.setupSubscribeButton()}return g.prototype.getInSiteConfig=function(d){var m,a;return 0!==d.indexOf("http")&&d.match(/\./)&&!d.match(/^\//)?(m=d.split("."),a=null,m.forEach(function(b){return a=null===a?window[b]:a[b]}),a):window[d]},g.prototype.randomId=function(d){var m,a,b;if(m=0,0===d.length)return m;var f=function(n){if(!isNaN(n))return m=(m<<5)-m+n,m&=m};var p=a=0;for(b=d.length;0<=
b?a<=b:a>=b;p=0<=b?++a:--a)f(d.charCodeAt(p));return"pdg-"+m.toString(16).substring(1)},g.prototype.origin=function(){var d;return(this.elem.src||this.elem.getAttribute("src")||(null!=(d=document.currentScript)?d.src:void 0)||l).match(/(^.*\/)/)[0].replace(/javascripts\/$/,"").replace(/\/$/,"")},g.prototype.buildIframe=function(){return this.iframe=document.createElement("iframe"),this.iframe.id=this.id,this.iframe.scrolling="no",this.iframe.src=this.url,this.iframe.style.border="0",this.iframe.style.overflowY=
"hidden",this.iframe.style.transition="height 100ms linear",this.iframe.style.minWidth="100%",this.iframe.width="1px",this.iframe.title="Podcast",this.iframe.setAttribute("aria-label","Podcast"),this.iframe.setAttribute("allow","autoplay"),this.iframe},g.prototype.setupListeners=function(){return e.listen("resizePlayer",this.iframe)},g.prototype.setupSubscribeButton=function(){return window.addEventListener("message",(d=this,function(m){try{var a=JSON.parse(m.data||m.originalEvent.data)}catch(b){return}if(a.id===
d.iframe.id&&"loadSubscribeButton"===a.listenTo)return(new c(d.iframe)).listen()}),!1);var d},g.prototype.replaceElem=function(){return this.iframe.className+=this.elem.className,this.elem.parentNode.replaceChild(this.iframe,this.elem)},g.prototype.injectConfiguration=function(){return window.addEventListener("message",(d=this,function(m){try{var a=JSON.parse(m.data||m.originalEvent.data)}catch(b){return}if(a.id===d.iframe.id&&"sendConfig"===a.listenTo)return(new h(d.configuration)).checkForConsent().then(function(){var b,
f;return b=d.configuration.constructor===String?d.configuration:JSON.stringify(d.configuration),null!=(f=d.iframe.contentWindow)?f.postMessage(b,"*"):void 0})}),!1);var d},g}();new (r=function(){var g,d,m,a;if(a=[],0!==(d=document.querySelectorAll('script.podigee-podcast-player:not([data-loaded\x3d"true"]), div.podigee-podcast-player:not([data-loaded\x3d"true"])')).length){var b=0;for(m=d.length;b<m;b++)(g=d[b]).setAttribute("data-loaded","true"),a.push(new k(g));window.podigeePodcastPlayers=a}});
new function(){var g;document.currentScript.getAttribute("data-continuous-loading")&&(g=new MutationObserver(function(d){return d.forEach(function(m){return new r})}),document.addEventListener("DOMContentLoaded",function(){return g.observe(document.body,{childList:!0,subtree:!0,characterData:!1,attributes:!1})},!1))};var l=document.currentScript.src},{"./cmp_consent.coffee":2,"./iframe_resizer.coffee":4,"./subscribe_button_trigger.coffee":6}],4:[function(q,u,v){q=function(){function r(){}return r.listen=
function(e,c,h,k){return null==h&&(h={}),window.addEventListener("message",function(l){var g,d;try{var m=JSON.parse(l.data||l.originalEvent.data)}catch(a){return}if(m.id===c.id&&m.listenTo===e)return g=m.height+(h.height||0),d=/%$/.test(m.width)?m.width:m.width+(h.width||0),c.style.height=g+"px",c.style.maxHeight=g+"px",c.style.width=d+"px",c.style.maxWidth=d+"px",null!=k?k(c):void 0},!1)},r}();u.exports=q},{}],5:[function(q,u,v){!function(){var r;"function"==typeof window.CustomEvent||-1<this.CustomEvent.toString().indexOf("CustomEventConstructor")||
((r=function(e,c){var h;return c=c||{bubbles:!1,cancelable:!1,detail:void 0},(h=document.createEvent("CustomEvent")).initCustomEvent(e,c.bubbles,c.cancelable,c.detail),h}).prototype=window.Event.prototype,window.CustomEvent=r)}()},{}],6:[function(q,u,v){q("./polyfills/custom_event.coffee");q=function(){function r(e){this.referenceElement=e;this.referenceId=this.referenceElement.id;this.id=this.randomId(this.referenceElement.toString());this.buildTags();this.insert()}return r.prototype.buildTags=function(){return this.scriptTag=
document.createElement("script"),this.scriptTag.className="podlove-subscribe-button",this.scriptTag.src="https://player.podigee-cdn.net/subscribe-button/javascripts/app.js",this.scriptTag.dataset.language="en",this.scriptTag.dataset.size="medium",this.scriptTag.setAttribute("data-hide",!0),this.scriptTag.setAttribute("data-buttonid",this.id),this.button=document.createElement("button"),this.button.style.display="none",this.button.className="podlove-subscribe-button-"+this.id},r.prototype.insert=function(){return this.referenceElement.parentNode.insertBefore(this.scriptTag,
this.referenceElement.nextSibling),this.referenceElement.parentNode.insertBefore(this.button,this.referenceElement.nextSibling)},r.prototype.randomId=function(e){var c,h,k,l;if(h=Math.floor(65536*(1+Math.random())).toString(16).substring(1),c=0,0===(e+=h).length)return c;h=function(d){if(!isNaN(d))return c=(c<<5)-c+d,c&=c};var g=k=0;for(l=e.length;0<=l?k<=l:k>=l;g=0<=l?++k:--k)h(e.charCodeAt(g));return c.toString(16).substring(1)},r.prototype.listen=function(){return window.addEventListener("message",
(e=this,function(c){var h;try{var k=JSON.parse(c.data||c.originalEvent.data)}catch(l){return}if("subscribeButtonTrigger"===k.listenTo&&k.id===e.referenceId)return(h=k.detail).id=e.id,c=new CustomEvent("openSubscribeButtonPopup",{detail:h}),document.body.dispatchEvent(c)}),!1);var e},r}();u.exports=q},{"./polyfills/custom_event.coffee":5}]},{},[3]);
