(function(e,g,k,l){e.copyToClipboard=function(a,c){var d=g("#"+a).val();if(window.clipboardData)window.clipboardData.setData("Text",d),showSuccess(a+"Alert","Erfolgreich kopiert.");else{var b;b=document.createElement("input");b.setAttribute("value",d);b.contentEditable=!0;b.readOnly=!1;document.body.appendChild(b);try{var f=document.createRange();f.selectNodeContents(b);b.select();var h=window.getSelection();h.removeAllRanges();h.addRange(f);b.setSelectionRange(0,999999);document.execCommand("copy")?
showSuccess(a+"Alert","Erfolgreich kopiert."):manualCopy(a)}catch(m){manualCopy(a)}document.body.removeChild(b)}_paqPush(["trackEvent","Product","Copy Promotion Code",c])};e.openShopTab=function(a){var c=a;-1===a.indexOf("http://")&&-1===a.indexOf("https://")&&(c="http://".concat(a));window.open(c,"_blank").focus()};e.attachPromotionCodeProvider=function(a,c,d){g(d).on("shown.bs.modal",function(b){getNextPromotionCode(a,c,d)})};getNextPromotionCode=function(a,c,d){var b=g(d).find("#promotionalCodeInput");
""===b.val()&&Liferay.Service("/mivo_pc.promotioncodelist/use-next-code",{companyId:Liferay.ThemeDisplay.getCompanyId(),groupId:Liferay.ThemeDisplay.getScopeGroupId(),userId:Liferay.ThemeDisplay.getUserId(),productResourcePrimKey:c,ipAddress:a},function(f){b.val(f.promotionCode)})};e.addAnswer=function(a,c,d){Liferay.Service("/mivo_pq.answer/add-answer",{questionId:a,userId:c,answer:d});document.getElementById("Question").style.display="none";showSuccess("QuestionAnswered","Danke f\u00fcr die Beantwortung der Frage.")}})(window.PDP=
window.PDP||{},AUI.$);
