0&&(e=[e]),"object"==typeof e&&e.length>0){let n=[],o=!1;return"string"!=typeof t&&(t=paramsToStr(t),o=!0),$.each(t.split("&"),((t,o)=>{let i=!1,c=decodeURIComponent(o);$.each(e,((t,e)=>{i||0!==c.indexOf(e+"=")&&0!==c.indexOf(e+"[")||(i=!0)})),i||n.push(o)})),n.length>0&&(n=n.join("&")),o&&(n=paramsToObj(n)),n}return t}function paramsToObj(t,e){let n={};return"string"==typeof t&&(t.search("&")>-1||t.search("=")>-1)&&$.each(excludeParams(t,e).split("&"),((t,e)=>{if((e=e.split("+").join(" ")).length>0){let t=e.indexOf("="),o=t>-1?e.substr(0,t):e,i=t>-1?decodeURIComponent(e.substr(t+1)):"",c=o.indexOf("[");if(-1==c)n[decodeURIComponent(o)]=i;else{let t=o.indexOf("]",c),e=decodeURIComponent(o.substring(c+1,t));o=decodeURIComponent(o.substring(0,c)),n[o]||(n[o]=[]),e?n[o][e]=i:n[o].push(i)}}})),$.each(n,((t,e)=>{"object"==typeof n[t]&&(n[t]=$.extend(!0,{},n[t]))})),n}function paramsToStr(t,e){return"object"==typeof t&&null!=t?excludeParams($.param(t),e):""}const onDocumentClick=t=>{if("function"==typeof t){let e,n="click touchend";"ontouchstart"in window&&(n="touchend"),$(document).on("touchstart",(function(){e=!0})),$(document).on("touchmove",(function(){e=!1})),$(document).on(n,(function(n){"click"==n.type&&(e=!0),e&&t(n)}))}},htmlConsole=function(t=!1){this.add=e=>{if(0==$("#html-console").length)var n=$('').appendTo("body");else n=$("#html-console");n.append("0?' style="border-top:1px solid #ccc;margin-top:0.5rem;padding-top:0.5rem"':"")+">"+(t?Date.now()+": ":"")+e+"
"),n.show()},this.reset=()=>{$("#html-console").length>0&&$("#html-console").html("").hide()}};function closePrint(){document.body.removeChild(this.__container__)}function initPrint(){this.contentWindow.__container__=this,this.contentWindow.onbeforeunload=closePrint,this.contentWindow.onafterprint=closePrint,this.contentWindow.focus(),this.contentWindow.print()}function printPage(t){var e=document.createElement("iframe");e.onload=initPrint,e.style.position="fixed",e.style.right="0",e.style.bottom="0",e.style.width="0",e.style.height="0",e.style.border="0",e.src=t,document.body.appendChild(e)}function buildAjaxRequestUrl(t,e,n){let l=t,a={},o={};return"string"==typeof n&&n.length>0&&$.each(paramsToObj(n),((t,e)=>{a[t]=e,o[t]=!0})),"string"==typeof e&&e.length>0&&$.each(paramsToObj(e),((t,e)=>{null==o[t]&&(a[t]=e)})),a=paramsToStr(a),a.length>0?l+="?"+a:"string"==typeof n&&n.length>0&&(l+="?"+n),l}function ajaxGetRequest(t,e){const n={url:"index.php",get:null,cache:!1,action:null,timeout:null,callback:null,debugger:()=>{}};if(null==t.url||"string"==typeof t.url){let l=$.extend({},n,t);if("function"==typeof l.callback&&"function"!=typeof e&&(e=l.callback),!0!==l.cache&&!1!==l.cache&&(l.cache=!1),"string"==typeof l.get&&l.get.indexOf("=")>-1?l.get=paramsToObj(l.get):"object"==typeof l.get&&null!=l.get||(l.get={}),l.url.indexOf("?")>-1){let t=l.url.split("?");l.url=t[0],l.get=t[1].length>0?$.extend(paramsToObj(t[1]),l.get):l.get}return"string"==typeof l.action&&l.action.length>0?l.get.ajaxRequest=l.action:null==l.get.ajaxRequest&&(l.get.ajaxRequest="1"),l.get=paramsToStr(l.get),l.url=l.get.length>0?l.url+"?"+l.get:l.url,$.ajax({url:l.url,type:"GET",cache:l.cache,timeout:l.timeout,success:t=>{if("function"==typeof e)try{e(JSON.parse(t))}catch(n){e(t)}},error:(t,e,n)=>{"function"==typeof l.debugger&&l.debugger(t,e,n,l)}})}}function ajaxPostRequest(t,e){const n={url:"index.php",get:null,post:null,action:null,timeout:null,callback:null,debugger:()=>{}};if(null==t.url||"string"==typeof t.url){let l=$.extend({},n,t);if("function"==typeof l.callback&&"function"!=typeof e&&(e=l.callback),"object"==typeof l.post&&null!=l.post?l.post=paramsToStr(l.post):"string"==typeof l.post&&l.post.indexOf("=")>-1?l.post=0===l.post.indexOf("&")?l.post.replace("&",""):l.post:l.post=null,"string"==typeof l.get&&l.get.indexOf("=")>-1?l.get=paramsToObj(l.get):"object"==typeof l.get&&null!=l.get||(l.get={}),l.url.indexOf("?")>-1){let t=l.url.split("?");l.url=t[0],l.get=t[1].length>0?$.extend(paramsToObj(t[1]),l.get):l.get}return"string"==typeof l.action&&l.action.length>0?l.get.ajaxRequest=l.action:null==l.get.ajaxRequest&&(l.get.ajaxRequest="1"),l.get=paramsToStr(l.get),l.url=l.get.length>0?l.url+"?"+l.get:l.url,$.ajax({url:l.url,data:l.post,type:"POST",cache:!1,timeout:l.timeout,success:t=>{if("function"==typeof e)try{e(JSON.parse(t))}catch(n){e(t)}},error:(t,e,n)=>{"function"==typeof l.debugger&&l.debugger(t,e,n,l)}})}}function getBoxOutput(t,e,n,l,a){if("string"==typeof t&&"function"==typeof a){let o={boxKey:t};return"string"==typeof e&&0!=e.length||(e=jsRequestUrl),"string"==typeof l&&(l=paramsToObj(l)),ajaxPostRequest({url:e,get:n,post:l="object"==typeof l&&null!=l?$.extend(l,o):o,action:"getBoxOutput",callback:t=>{let e="";"success"==t.status&&(e=t.output),a(e)}})}}function getAppOutput(t,e,n,l,a){if("string"==typeof t&&"function"==typeof a){let o={application:t};return"string"==typeof e&&0!=e.length||(e=jsRequestUrl),"string"==typeof n&&(n=paramsToObj(n)),ajaxPostRequest({url:e,get:n="object"==typeof n&&null!=n?$.extend(n,o):o,post:l,action:"getAppOutput",callback:t=>{let e="";"success"==t.status&&(e=t.output),a(e)}})}}function updateMetaTags(t){"object"==typeof t&&($("link[rel='canonical'], link[rel='prev'], link[rel='next'], link[rel='alternate']").remove(),$.each(t,((t,e)=>{switch(e.element){case"title":$(document).attr("title",e.values);break;case"robots":case"keywords":case"description":$("meta[name='"+e.element+"']").attr("content",e.values);break;case"prev":case"next":case"canonical":case"hreflang":$(e.output).insertBefore("title")}})))}const ezeeDialog=function(t){let e=this,a=$(document.activeElement);"object"!=typeof t&&(t={});let o=$.extend({},{timeout:!1,duration:300,closeButtonEnabled:!0,closeOnHistoryBack:!0,closeOnOverlayClick:!0,closeOnEscapeKeydown:!0,i18n:{linkCloseTitle:"Close dialog",linkCloseText:"x",errorHeader:"Error",errorContent:"The requested page was not found."}},t);"object"==typeof ezeeDialogI18N&&(o.i18n=$.extend(o.i18n,ezeeDialogI18N)),e.wrapper=null,e.hasContents=null!=o.content&&(null!=o.header||null!=o.details||null!=o.buttons);const i=t=>{let a=!1;if(null!=e.wrapper&&e.wrapper.is(":visible")){let o=e.wrapper.find("form");a=!(o.length>0)||t==o.serialize()}return a},l=()=>{if("number"==typeof a.length&&a.length>0&&(a.trigger("focus"),!a.is(":focus"))){let t,e;"-1"==a.attr("tabindex")&&(a.removeAttr("tabindex"),t=!0),a.prop("disabled")&&(a.prop("disabled",!1),e=!0),a.trigger("focus"),t&&a.attr("tabindex","-1"),e&&a.prop("disabled",!0)}},n=function(t=!0){let a=$(".dialog-overlay");if(a.length>0){t&&null!==history.state&&void 0!==history.state.dialogId&&history.state.dialogId==e.dialogId&&($(window).off("popstate.dialog-"+e.dialogId),window.history.back());let i=a.find(".dialog-wrapper:not(.inactive)"),n=i.filter("[data-keep-open='1']"),r=!0,s=0,p=i.length-1;n.length>0&&i.each((function(t){t{a.remove(),d(),"function"==typeof o.onClose&&o.onClose(e),clearTimeout(o.to)})),l()):i.each((function(t){t==p?e.wrapper.addClass("inactive").fadeTo(o.duration,0,(()=>{e.wrapper.remove(),d(),"function"==typeof o.onClose&&o.onClose(e),clearTimeout(o.to),a.find(".dialog-wrapper").last().removeClass("dialog-hidden").fadeTo(o.duration,1,(()=>{l()}))})):t>s&&$(this).remove()}))}},d=()=>{$(document).off("keydown.dialog-"+e.dialogId),e.dialogId=e.wrapper=e.hasContents=null},r=(t=!0)=>{if(t&&c(),e.hasContents){let t=content=details=buttons=selector=width="";null!=o.header&&(t='
"),"string"==typeof o.content?content=o.content:(content+=null!=o.content.left&&o.content.left.length>0?''+o.content.left+"
":"",content+=null!=o.content.right&&o.content.right.length>0?''+o.content.right+"
":""),content='0&&content.indexOf("dialog-content-right")>0?" multiple":"")+'">'+content+"
",null!=o.details&&("string"==typeof o.details?details=o.details:(details+=null!=o.details.left&&o.details.left.length>0?''+o.details.left+"
":"",details+=null!=o.details.right&&o.details.right.length>0?''+o.details.right+"
":"")),null!=o.buttons&&("string"==typeof o.buttons?buttons=o.buttons:(buttons+=null!=o.buttons.left&&o.buttons.left.length>0?''+o.buttons.left+"
":"",buttons+=null!=o.buttons.right&&o.buttons.right.length>0?''+o.buttons.right+"
":""),buttons='0&&buttons.indexOf("dialog-buttons-right")>0?" multiple":"")+'">'+buttons+"
"),null!=o.selector&&(selector=" "+o.selector),null!=o.width&&(width=' style="width:'+("number"==typeof o.width?(o.width>=160?o.width:160)+"px":o.width)+'"'),s('"+t+content+details+buttons+"
")}else{let t={};$.each(o,((e,a)=>{"function"!=typeof a&&"duration"!=e&&"timeout"!=e&&(t[e]=a)}));let e=ajaxPostRequest({url:jsRequestUrl,post:{dialog:t},action:"getDialogOutput"}),a=$.Deferred((t=>{$(".dialog-overlay").fadeTo(o.duration,1,(()=>{t.resolve()}))}));$.when(e,a).done((t=>{try{t=JSON.parse(t[0])}catch(e){ajaxPostRequest({url:jsRequestUrl,post:{message:"Dialog::_Create - unable to parse JSON data - error message: "+e+" - response: "+t},action:"addError"})}null!=t.status&&"success"==t.status?null!=t.script?EzeeFileLoader.add(t.script,(()=>{s(t.output)})):s(t.output):new ezeeDialog({header:o.i18n.errorHeader,content:o.i18n.errorContent}).open()}))}},s=t=>{let a,i=$(".dialog-overlay"),l=i.find(".dialog-wrapper"),n=$(t);n.hasClass("dialog-overlay")?(a=n.find(".dialog-wrapper"),$.each(n.prop("attributes"),(function(){"class"==this.name?i.addClass(this.value):i.attr(this.name,this.value)}))):a=n,i.hasClass("init")?(i.removeClass("init loading"),e.hasContents?(i.css("opacity",0),i.append(a),i.fadeTo(o.duration,1,(()=>{e.init(a)}))):(a.css("opacity",0),i.append(a),a.fadeTo(o.duration,1,(()=>{e.init(a)})))):(i.removeClass("loading"),l.hide().addClass("dialog-hidden"),a.css("opacity",0),a.appendTo(i),a.fadeTo(o.duration,1,(()=>{e.init(a)})))},p=t=>{let e=!1,a=document.querySelector(".dialog-wrapper:not(.dialog-hidden)");if(a){let o=a.querySelector(".dialog-element");o.scrollHeight-o.offsetHeight>1&&t.target.matches(".dialog-element, .dialog-element *")&&(e=!0)}if(!e)return t.preventDefault(),t.stopPropagation(),!1},c=()=>{if(!e.scrollEventsSet){let t=document.querySelector(".dialog-overlay");t&&(["scroll","touchmove","wheel"].forEach((e=>{t.addEventListener(e,p,{passive:!1})})),e.scrollEventsSet=!0)}};e.init=a=>{if("object"==typeof a&&a.length>0){if(e.wrapper=a,e.dialogId=null!=e.wrapper.attr("data-id")?e.wrapper.attr("data-id"):"dialog-"+(e.wrapper.index()+1),e.dialogName=null!=e.wrapper.attr("data-name")?e.wrapper.attr("data-name"):e.dialogId,null==t.duration&&null!=e.wrapper.attr("data-duration")&&(o.duration=isNaN(e.wrapper.attr("data-duration"))?0:parseInt(e.wrapper.attr("data-duration"))),null==t.timeout&&null!=e.wrapper.attr("data-timeout")&&(o.timeout=!isNaN(e.wrapper.attr("data-timeout"))&&parseInt(e.wrapper.attr("data-timeout"))),null==t.closeButtonEnabled&&null!=e.wrapper.attr("data-close-button-enabled")&&(o.closeButtonEnabled="0"!=e.wrapper.attr("data-close-button-enabled")),null==t.closeOnEscapeKeydown&&null!=e.wrapper.attr("data-close-on-escape-keydown")&&(o.closeOnEscapeKeydown="0"!=e.wrapper.attr("data-close-on-escape-keydown")),null==t.closeOnHistoryBack&&null!=e.wrapper.attr("data-close-on-history-back")&&(o.closeOnHistoryBack="0"!=e.wrapper.attr("data-close-on-history-back")),null==t.closeOnOverlayClick&&null!=e.wrapper.attr("data-close-on-overlay-click")&&(o.closeOnOverlayClick="0"!=e.wrapper.attr("data-close-on-overlay-click")),null==e.wrapper.attr("data-id")&&e.wrapper.attr("data-id",e.dialogId),o.closeOnOverlayClick||null!=e.wrapper.attr("data-close-on-overlay-click")||e.wrapper.attr("data-close-on-overlay-click","0"),null==e.wrapper.attr("aria-labelledby")){let t=e.dialogId+"-header",a=e.dialogId+"-content";-1===e.dialogId.indexOf("dialog-")&&(t="dialog-"+t,a="dialog-"+a),e.wrapper.attr("aria-labelledby",t),e.wrapper.attr("aria-describedby",a),e.wrapper.find(".dialog-header").attr("id",t),e.wrapper.find(".dialog-content").attr("id",a)}$("body").trigger(e.dialogName+"-dialog-init");let l=e.wrapper.closest(".dialog-overlay"),d=!1;l.on("mousedown",(function(t){d=$(t.target).is(".dialog-wrapper, .dialog-wrapper *")})),l.hasClass("has-click-event")||(l.on("mouseup",(function(t){let e=$(this).find(".dialog-wrapper:visible");if(!d&&!e.is("[data-close-on-overlay-click='0']")&&!$(t.target).is(".dialog-wrapper, .dialog-wrapper *")){let t=e.find(".dialog-close").first();t.length>0?t.trigger("click"):n()}})),l.addClass("has-click-event")),e.wrapper.find(".dialog-close").on("click",(function(){return n(),!1}));let r=e.wrapper.find("form"),s=r.length>0?r.serialize():null;e.wrapper.find(".dialog-header").attr("tabindex","0").css("outline","none").trigger("focus").removeAttr("tabindex");let p=e.wrapper.find("[href], button:not([disabled]), input:not([disabled], [type='hidden']), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])"),c=p.first(),u=p.last();$(document).on("keydown.dialog-"+e.dialogId,(function(t){null!=e.wrapper&&(27==t.keyCode&&o.closeOnEscapeKeydown?i(s)&&n():9==t.keyCode&&(p.length<=1?t.preventDefault():t.shiftKey?document.activeElement==c[0]&&(t.preventDefault(),u.trigger("focus")):document.activeElement==u[0]&&(t.preventDefault(),c.trigger("focus"))))})),$(window).on("popstate.dialog-"+e.dialogId,(function(){return l.find(".dialog-wrapper:visible").attr("data-id")==e.dialogId&&(o.closeOnHistoryBack&&i(s)?(n(!1),$(window).off("popstate.dialog-"+e.dialogId)):history.pushState({dialogId:e.dialogId},"",String(window.location.href))),!1})),history.pushState({dialogId:e.dialogId},"",String(window.location.href)),"function"==typeof productListingAddToCartEvents&&productListingAddToCartEvents(e.wrapper),"function"==typeof productListingAddToWishlistEvents&&productListingAddToWishlistEvents(e.wrapper),"object"==typeof EzeeSlider&&e.wrapper.find("div[data-slider-status='1'][data-slider-initialized!='1']").length>0&&EzeeSlider.loadSliders(),"function"==typeof o.onInit&&o.onInit(e),"number"==typeof o.timeout&&o.timeout>0&&(o.to=setTimeout((()=>{n(),"function"==typeof o.onTimeout&&o.onTimeout(e)}),o.timeout))}},e.open=()=>{if("object"==typeof o&&(null!=o.source||null!=o.content))if($(".dialog-overlay").length>0){let t=$(".dialog-wrapper:visible");if(t.length>0){c();let e=!1;t.fadeTo(o.duration,0,(function(){e||($(".dialog-overlay").addClass("loading"),r(!1),e=!0),$(this).hide()}))}else r()}else e.hasContents?($('').appendTo("body"),r()):($('').appendTo("body"),r())},e.close=()=>{n()},e.showLoadingAnimation=()=>{0==$(".dialog-overlay").length&&$('').appendTo("body").fadeTo(o.duration,1)},c()};function initPhpDialogs(){$(".dialog-wrapper:not(.js-dialog)").length>0&&$(".dialog-wrapper:not(.js-dialog)").each((function(){(new ezeeDialog).init($(this))}))}function initDialogLinks(t){null==t&&(t=$("body")),t.find("[data-dialog]").off().on("click",(function(){let t=$(this).data("dialog");return null==t.timeout&&(t.timeout=!1),new ezeeDialog(t).open(),!1}))}let ezeeFileLoader=function(e){let l,t,i=this,s=[],o=[],r=[],n=!1,a=e,f=0,d=0,h=0,c=0,p=0;i.add=(e,l,t)=>(b("add() called: "+JSON.stringify(e),"add",d),s.push((()=>y(e,l,t,"add",h++))),u("add",d),d++,i),i.load=(e,l,t)=>(b("load() called: "+JSON.stringify(e),"load",c),s.unshift((()=>y(e,l,t,"load",p++))),u("load",c),c++,i),i.enableLog=()=>(a=!0,i),i.disableLog=()=>(a=!1,i);let g=e=>{$("script[src]").each((function(){let l=$(this).prop("src");null!=l&&l.length>0&&(e&&k(l)||o.push(l))})),$("link[rel='stylesheet']").each((function(){let l=$(this).prop("href");null!=l&&l.length>0&&(e&&k(l)||o.push(l))}))},u=(e,l)=>{if(b("_Process() called",e,l),n)b("_Process() skipped",e,l);else{b("_Process() start",e,l),n=!0;let t=new Promise((e=>{e()}));for(;s.length>0;)t=t.then(s.shift());t.then((()=>{n=!1,b("_Process() done",e,l),s.length>0&&(b("_Process() restart",e,l),u(e,l))}))}return i},y=(e,l,t,i,s)=>{b("_Load() start: "+JSON.stringify(e),i,s);let o=L(e);o&&void 0===r[o.key]&&(r[o.key]={loaded:!1,error:!1});let n=new Promise(((l,t)=>{if(o||(m("_Load(): Unable to get list of files: "+JSON.stringify(e),i,s),l("error_GetFileset")),r[o.key].error)l(r[o.key].error);else if(r[o.key].loaded)b("_Load(): fileset already loaded: "+o.key,i,s),l("loaded");else{let e=_(o,i,s);e.then((()=>{l("success")})),e.catch((e=>{r[o.key].error="error_LoadFileset",m("_Load(): Unable to load list of files: "+o.key,i,s),l("error_LoadFileset")}))}}));return n.then((n=>{switch(b("_Load(): done->"+n+": "+(o?o.key:JSON.stringify(e)),i,s),n){case"error_GetFileset":case"error_LoadFileset":"function"==typeof t&&t(n,F());break;default:r[o.key].loaded=!0,"function"==typeof l&&l(n)}})),n},_=(e,l,t)=>new Promise(((i,s)=>{let r=[],n=!0;for(let i of e.files)r.push((()=>new Promise((e=>{if(n)if(b("_LoadFileset(): starting to load file "+i.file,l,t),g(!0),k(i.file))b("_LoadFileset(): skipping file "+i.file,l,t),e();else if(b("_LoadFileset(): requesting file "+i.file,l,t),"css"==i.type){$("").appendTo("head").attr({type:"text/css",rel:"stylesheet",href:i.url}).on("load",(function(){o.push(i.file),b("_LoadFileset(): finished loading file "+i.file,l,t),e()}));let s=setTimeout((()=>{k(i.file)||(m("Unable to load file "+i.file,l,t),e("error"),clearTimeout(s))}),1e3)}else{let s={url:i.url,cache:!0};"js"==i.type&&(s.dataType="script"),$.ajax(s).done((()=>{o.push(i.file),b("_LoadFileset(): finished loading file "+i.file,l,t),e()})).fail(((s,o,r)=>{m("_LoadFileset(): Unable to load file "+i.file+" - TextStatus: "+o+" - ErrorThrown: "+r,l,t),e("error")}))}else e("error")})).then((e=>{"error"==e&&(n=!1)}))));let a=new Promise((e=>{e()}));for(;r.length>0;)a=a.then(r.shift());a.then((()=>{n?i():s()}))})),L=e=>{let l=[],t=typeof e;if("string"==t?l.push({file:e}):"object"==t&&"string"==typeof e.file?l.push(e):"object"==t&&$.each(e,((e,t)=>{"string"==typeof t?l.push({file:t}):"object"==typeof t&&"string"==typeof t.file&&l.push(t)})),l.length>0){let e={files:[],key:[]};if($.each(l,((l,t)=>{if(t.file.indexOf("?")>-1){let e=t.file.split("?");var i=e[0],s=e[1]}else i=t.file,s="";let o=i.split(".").pop().toLowerCase(),r=null==t.cache||!1!==t.cache;0==r&&(s=(s.length>0?s+"&":"")+"_ts="+(new Date).getTime());let n=i+(s.length>0?"?"+s:"");"js"!=o&&"css"!=o&&"gif"!=o&&"png"!=o&&"jpg"!=o&&"jpeg"!=o||(e.files.push({file:i,type:o,url:n,cache:r}),e.key.push(i))})),e.files.length==l.length)return e.key=e.key.join("|"),e}},k=e=>{let l=!1;for(index=0;indexl||!1,m=(e,t,i)=>{l=e,b(e,t,i,!0)},b=(e,l,i,s)=>{if(s||a){t||(t=(new Date).getTime()),f++;let r="FL"+f+" - "+l+"["+(null==i?"x":i+1)+"] - "+e+" (Time: "+((new Date).getTime()-t).toString()+" ms, Length: "+o.length+")";!0===s?console.error(r):console.log(r)}};g(),b("_Init(): FileLoader initialized - "+o.length+" files already loaded","init")}; Seite generiert in 0.198s - 92 Datenbankabfragen in 0.013s