try{var page_language='/';}catch(e){} try{function theChampLoadEvent(e){var t=window.onload;if(typeof window.onload!="function"){window.onload=e}else{window.onload=function(){t();e()}}};}catch(e){} try{var theChampDefaultLang='pl_PL',theChampCloseIconPath='https://biletinfo.pl/wp-content/plugins/super-socializer/images/close.png';}catch(e){} try{var theChampSiteUrl='https://biletinfo.pl',theChampVerified=0,theChampEmailPopup=0,heateorSsMoreSharePopupSearchText='Search';}catch(e){} try{var theChampFBKey='',theChampFBLang='pl_PL',theChampFbLikeMycred=0,theChampSsga=0,theChampCommentNotification=0,theChampHeateorFcmRecentComments=0,theChampFbIosLogin=0;;}catch(e){} try{var theChampFBCommentUrl='https://biletinfo.pl/';var theChampFBCommentColor='';var theChampFBCommentNumPosts='';var theChampFBCommentWidth='100%';var theChampFBCommentOrderby='';var theChampCommentingTabs="wordpress,facebook,disqus",theChampGpCommentsUrl='https://biletinfo.pl/',theChampDisqusShortname='',theChampScEnabledTabs='wordpress,fb',theChampScLabel='Leave a reply',theChampScTabLabels={"wordpress":"Default Comments (0)","fb":"Facebook Comments","disqus":"Disqus Comments"},theChampGpCommentsWidth=0,theChampCommentingId='respond';}catch(e){} try{var theChampSharingAjaxUrl='https://biletinfo.pl/wp-admin/admin-ajax.php',heateorSsFbMessengerAPI='https://www.facebook.com/dialog/send?app_id=595489497242932&display=popup&link=%encoded_post_url%&redirect_uri=%encoded_post_url%',heateorSsWhatsappShareAPI='web',heateorSsUrlCountFetched=[],heateorSsSharesText='Shares',heateorSsShareText='Share',theChampPluginIconPath='https://biletinfo.pl/wp-content/plugins/super-socializer/images/logo.png',theChampSaveSharesLocally=0,theChampHorizontalSharingCountEnable=0,theChampVerticalSharingCountEnable=0,theChampSharingOffset=-10,theChampCounterOffset=-10,theChampMobileStickySharingEnabled=1,heateorSsCopyLinkMessage="Link copied.";var heateorSsVerticalSharingShortUrl="https://biletinfo.pl/";}catch(e){} try{console.log('PixelYourSite Free version 9.7.2');}catch(e){} try{!function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),function(){var e=function(e){return RegExp("(^| )"+e+"( |$)")},t=function(e,t,n){for(var i=0;i0?" "+e:e)},this)},remove:function(){t(arguments,function(t){this.element.className=this.element.className.replace(e(t),"")},this)},toggle:function(e){return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)},contains:function(t){return e(t).test(this.element.className)},replace:function(e,t){this.remove(e),this.add(t)}},"classList"in Element.prototype||Object.defineProperty(Element.prototype,"classList",{get:function(){return new n(this)}}),window.DOMTokenList&&null==DOMTokenList.prototype.replace&&(DOMTokenList.prototype.replace=n.prototype.replace)}(),function(e,t,n){var i=new function(){this.cookiesAccepted=null,this.noticeContainer=null,this.setStatus=function(n){var i=this,o="",s="",c=new Date,a=new Date;cnArgs.onScroll&&e.removeEventListener("scroll",this.handleScroll),"accept"===n?(n="true",a.setTime(parseInt(c.getTime())+1e3*parseInt(cnArgs.cookieTime))):(n="false",a.setTime(parseInt(c.getTime())+1e3*parseInt(cnArgs.cookieTimeRejected))),cnArgs.globalCookie&&(o=this.getDomain(t.location.hostname)),"localhost"===t.location.hostname&&(s=t.location.pathname.split("/")[1]);var r="";"https:"===t.location.protocol&&(r=";secure"),t.cookie=cnArgs.cookieName+"="+n+";expires="+a.toUTCString()+";path=/"+s+";domain="+o+r,this.cookiesAccepted="true"===n;var d=new CustomEvent("setCookieNotice",{detail:{value:n,time:c,expires:a,data:cnArgs}});if(t.dispatchEvent(d),this.setBodyClass(["cookies-set","true"===n?"cookies-accepted":"cookies-refused"]),this.hideCookieNotice(),"automatic"===cnArgs.revokeCookiesOpt&&(this.noticeContainer.addEventListener("animationend",function e(){i.noticeContainer.removeEventListener("animationend",e),i.showRevokeNotice()}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){i.noticeContainer.removeEventListener("webkitAnimationEnd",e),i.showRevokeNotice()})),cnArgs.redirection&&("true"===n&&null===this.cookiesAccepted||n!==this.cookiesAccepted&&null!==this.cookiesAccepted)){var l=e.location.protocol+"//",h=e.location.host+"/"+e.location.pathname;cnArgs.cache?(l=l+h.replace("//","/")+(""===e.location.search?"?":e.location.search+"&")+"cn-reloaded=1"+e.location.hash,e.location.href=l):(l=l+h.replace("//","/")+e.location.search+e.location.hash,e.location.reload(!0));return}},this.getDomain=function(e){RegExp(/https?:\/\//).test(e)||(e="http://"+e);var t=new URL(e).hostname.split(".");return t.slice(0).slice(-(4===t.length?3:2)).join(".")},this.getStatus=function(e){var n=("; "+t.cookie).split("; cookie_notice_accepted=");if(2!==n.length)return null;var i=n.pop().split(";").shift();return e?"true"===i:i},this.showCookieNotice=function(){var e=this,n=new CustomEvent("showCookieNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.remove("cookie-notice-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated")})},this.hideCookieNotice=function(){var e=this,n=new CustomEvent("hideCookieNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-notice-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-notice-hidden")})},this.showRevokeNotice=function(){var e=this,n=new CustomEvent("showRevokeNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.remove("cookie-revoke-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated")})},this.hideRevokeNotice=function(){var e=this,n=new CustomEvent("hideRevokeNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-revoke-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-revoke-hidden")})},this.setBodyClass=function(e){t.body.classList.remove("cookies-revoke"),t.body.classList.remove("cookies-accepted"),t.body.classList.remove("cookies-refused"),t.body.classList.remove("cookies-set"),t.body.classList.remove("cookies-not-set");for(var n=0;nparseInt(cnArgs.onScrollOffset)&&this.setStatus("accept")},this.getClosest=function(e,n){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1});e&&e!==t;e=e.parentNode)if(e.matches(n))return e;return null},this.inIframe=function(){try{return e.self!==e.top}catch(t){return!0}},this.init=function(){var n=this;if(!0!==this.inIframe()&&(this.cookiesAccepted=this.getStatus(!0),this.noticeContainer=t.getElementById("cookie-notice"),this.noticeContainer)){var i=t.getElementsByClassName("cn-set-cookie"),o=t.getElementsByClassName("cn-revoke-cookie"),s=t.getElementById("cn-close-notice");this.noticeContainer.classList.add("cn-effect-"+cnArgs.hideEffect),null===this.cookiesAccepted?(cnArgs.onScroll&&e.addEventListener("scroll",function(e){n.handleScroll()}),cnArgs.onClick&&e.addEventListener("click",function(e){null===n.getClosest(e.target,"#cookie-notice")&&n.setStatus("accept")},!0),this.setBodyClass(["cookies-not-set"]),this.showCookieNotice()):(this.setBodyClass(["cookies-set",!0===this.cookiesAccepted?"cookies-accepted":"cookies-refused"]),cnArgs.revokeCookies&&"automatic"===cnArgs.revokeCookiesOpt&&this.showRevokeNotice());for(var c=0;c\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s});}catch(e){} try{/* * jQuery.bind-first library v0.2.3 * Copyright (c) 2013 Vladimir Zhuravlev * * Released under MIT License * @license * * Date: Thu Feb 6 10:13:59 ICT 2014 **/ (function(t){function e(e){return u?e.data("events"):t._data(e[0]).events}function n(t,n,r){var i=e(t),a=i[n];if(!u){var s=r?a.splice(a.delegateCount-1,1)[0]:a.pop();return a.splice(r?0:a.delegateCount||0,0,s),void 0}r?i.live.unshift(i.live.pop()):a.unshift(a.pop())}function r(e,r,i){var a=r.split(/\s+/);e.each(function(){for(var e=0;a.length>e;++e){var r=a[e].trim().match(/[^\.]+/i)[0];n(t(this),r,i)}})}function i(e){t.fn[e+"First"]=function(){var n=t.makeArray(arguments),i=n.shift();return i&&(t.fn[e].apply(this,arguments),r(this,i)),this}}var a=t.fn.jquery.split("."),s=parseInt(a[0]),f=parseInt(a[1]),u=1>s||1==s&&7>f;i("bind"),i("one"),t.fn.delegateFirst=function(){var e=t.makeArray(arguments),n=e[1];return n&&(e.splice(0,2),t.fn.delegate.apply(this,arguments),r(this,n,!0)),this},t.fn.liveFirst=function(){var e=t.makeArray(arguments);return e.unshift(this.selector),t.fn.delegateFirst.apply(t(document),e),this},u||(t.fn.onFirst=function(e,n){var i=t(this),a="string"==typeof n;if(t.fn.on.apply(i,arguments),"object"==typeof e)for(type in e)e.hasOwnProperty(type)&&r(i,type,a);else"string"==typeof e&&r(i,e,a);return i})})(jQuery);}catch(e){} try{!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if(i=e({path:"/"},t.defaults,i),"number"==typeof i.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}return r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[\(\)]/g,escape),document.cookie=[n,"=",r,i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],s=/(%[0-9A-Z]{2})+/g,d=0;d>>0;if(len===0){return false;} var n=fromIndex|0;var k=Math.max(n>=0?n:len-Math.abs(n),0);function sameValueZero(x,y){return x===y||(typeof x==='number'&&typeof y==='number'&&isNaN(x)&&isNaN(y));} while(k()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return re.test(email);} function getDomain(url){url=url.replace(/(https?:\/\/)?(www.)?/i,'');if(url.indexOf('/')!==-1){return url.split('/')[0];} return url;} function loadPixels(){if(!options.gdpr.all_disabled_by_api){if(!options.gdpr.facebook_disabled_by_api){Facebook.loadPixel();} if(!options.gdpr.analytics_disabled_by_api){Analytics.loadPixel();} if(!options.gdpr.pinterest_disabled_by_api){Pinterest.loadPixel();} if(!options.gdpr.bing_disabled_by_api){Bing.loadPixel();}} if(options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=="undefined"){if(typeof CS_Data.cs_google_analytics_consent_mode!=="undefined"&&CS_Data.cs_google_analytics_consent_mode==1){Analytics.loadPixel();}}} function checkSession(){if(Cookies.get('pys_start_session')===undefined||Cookies.get('pys_session_limit')===undefined){firstVisit=true;return true} return false} function getTrafficSource(){try{let referrer=document.referrer.toString(),source;let direct=referrer.length===0;let internal=direct?false:referrer.indexOf(options.siteUrl)===0;let external=!direct&&!internal;if(external===false){source='direct';}else{source=referrer;} if(source!=='direct'){return getDomain(source);}else{return source;}}catch(e){console.error(e);return'direct';}} function getQueryVars(){try{var result={},tmp=[];window.location.search.substr(1).split("&").forEach(function(item){tmp=item.split('=');if(tmp.length>1){result[tmp[0]]=tmp[1];}});return result;}catch(e){console.error(e);return{};}} function getLandingPageValue(){let name="pys_landing_page" if(options.visit_data_model==="last_visit"){name="last_pys_landing_page"} if(Cookies.get(name)&&Cookies.get(name)!=="undefined"){return Cookies.get(name);} else if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics.TrafficLanding){return options.tracking_analytics.TrafficLanding;}else{return"";}} function getTrafficSourceValue(){let name="pysTrafficSource" if(options.visit_data_model==="last_visit"){name="last_pysTrafficSource"} if(Cookies.get(name)&&Cookies.get(name)!=="undefined"){return Cookies.get(name);} else if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics.TrafficSource){return options.tracking_analytics.TrafficSource;}else{return"";}} function getUTMId(useLast=false){try{let cookiePrefix='pys_' let terms=[];if(useLast){cookiePrefix='last_pys_'} $.each(utmId,function(index,name){if(Cookies.get(cookiePrefix+name)){terms[name]=Cookies.get(cookiePrefix+name)} else if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics.TrafficUtmsId[name]){terms[name]=filterEmails(options.tracking_analytics.TrafficUtmsId[name])}});return terms;}catch(e){console.error(e);return[];}} function getUTMs(useLast=false){try{let cookiePrefix='pys_' if(useLast){cookiePrefix='last_pys_'} let terms=[];$.each(utmTerms,function(index,name){if(Cookies.get(cookiePrefix+name)){let value=Cookies.get(cookiePrefix+name);terms[name]=filterEmails(value);} else if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics.TrafficUtms[name]){terms[name]=filterEmails(options.tracking_analytics.TrafficUtms[name])}});return terms;}catch(e){console.error(e);return[];}} function getDateTime(){var dateTime=new Array();var date=new Date(),days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],months=['January','February','March','April','May','June','July','August','September','October','November','December'],hours=['00-01','01-02','02-03','03-04','04-05','05-06','06-07','07-08','08-09','09-10','10-11','11-12','12-13','13-14','14-15','15-16','16-17','17-18','18-19','19-20','20-21','21-22','22-23','23-24'];dateTime.push(hours[date.getHours()]);dateTime.push(days[date.getDay()]);dateTime.push(months[date.getMonth()]);return dateTime;} function filterEmails(value){return validateEmail(value)?undefined:value;} return{PRODUCT_SIMPLE:0,PRODUCT_VARIABLE:1,PRODUCT_BUNDLE:2,PRODUCT_GROUPED:3,utmTerms:utmTerms,utmId:utmId,fireEventForAllPixel:function(functionName,events){if(events.hasOwnProperty(Facebook.tag())) Facebook[functionName](events[Facebook.tag()]);if(events.hasOwnProperty(Analytics.tag())) Analytics[functionName](events[Analytics.tag()]);if(events.hasOwnProperty(Pinterest.tag())) Pinterest[functionName](events[Pinterest.tag()]);if(events.hasOwnProperty(Bing.tag())) Bing[functionName](events[Bing.tag()]);},setupPinterestObject:function(){Pinterest=window.pys.Pinterest||Pinterest;return Pinterest;},setupBingObject:function(){Bing=window.pys.Bing||Bing;return Bing;},copyProperties:function(from,to){for(var key in from){if("function"==typeof from[key]){continue;} to[key]=from[key];} return to;},manageCookies:function(){if(options.gdpr.cookiebot_integration_enabled&&typeof Cookiebot!=='undefined'){if(Cookiebot.consented===false&&!Cookiebot.consent['marketing']&&!Cookiebot.consent['statistics']){return;}} let cm_consent_not_expressed=false;if(options.gdpr.consent_magic_integration_enabled&&window.CS_Data!==undefined&&window.CS_Data.cs_refresh_after_consent==1){if(Cookies.get('cs_viewed_cookie_policy')===undefined){cm_consent_not_expressed=true;}} if(!cm_consent_not_expressed&&isNewSession&&!options.cookie.disabled_all_cookie&&!options.cookie.disabled_start_session_cookie){let duration=options.last_visit_duration*60000 var now=new Date();now.setTime(now.getTime()+duration);Cookies.set('pys_session_limit',true,{expires:now}) Cookies.set('pys_start_session',true);} if(options.gdpr.ajax_enabled&&!options.gdpr.consent_magic_integration_enabled){$.get({url:options.ajaxUrl,dataType:'json',data:{action:'pys_get_gdpr_filters_values'},success:function(res){if(res.success){options.gdpr.all_disabled_by_api=res.data.all_disabled_by_api;options.gdpr.facebook_disabled_by_api=res.data.facebook_disabled_by_api;options.gdpr.tiktok_disabled_by_api=res.data.tiktok_disabled_by_api;options.gdpr.analytics_disabled_by_api=res.data.analytics_disabled_by_api;options.gdpr.google_ads_disabled_by_api=res.data.google_ads_disabled_by_api;options.gdpr.pinterest_disabled_by_api=res.data.pinterest_disabled_by_api;options.gdpr.bing_disabled_by_api=res.data.bing_disabled_by_api;options.cookie.externalID_disabled_by_api=res.data.externalID_disabled_by_api;options.cookie.disabled_all_cookie=res.data.disabled_all_cookie;options.cookie.disabled_advanced_form_data_cookie=res.data.disabled_advanced_form_data_cookie;options.cookie.disabled_landing_page_cookie=res.data.disabled_landing_page_cookie;options.cookie.disabled_first_visit_cookie=res.data.disabled_first_visit_cookie;options.cookie.disabled_trafficsource_cookie=res.data.disabled_trafficsource_cookie;options.cookie.disabled_utmTerms_cookie=res.data.disabled_utmTerms_cookie;options.cookie.disabled_utmId_cookie=res.data.disabled_utmId_cookie;}}});} if(options.ajaxForServerEvent&&!Cookies.get('pbid')&&Facebook.isEnabled()){jQuery.ajax({url:options.ajaxUrl,dataType:'json',data:{action:'pys_get_pbid'},success:function(res){if(res.data&&res.data.pbid!=false&&options.send_external_id){if(!(options.cookie.disabled_all_cookie||options.cookie.externalID_disabled_by_api)){var expires=parseInt(options.external_id_expire||180);Cookies.set('pbid',res.data.pbid,{expires:expires,path:'/'});} if(options.hasOwnProperty('facebook')){options.facebook.advancedMatching={...options.facebook.advancedMatching,external_id:res.data.pbid};}}}});}else if(Cookies.get('pbid')&&Facebook.isEnabled()){if(Facebook.advancedMatching()&&Facebook.advancedMatching().external_id&&!(options.cookie.disabled_all_cookie||options.cookie.externalID_disabled_by_api)){let expires=parseInt(options.external_id_expire||180);Cookies.set('pbid',Facebook.advancedMatching().external_id,{expires:expires,path:'/'});}} let expires=parseInt(options.cookie_duration);let queryVars=getQueryVars();let landing=window.location.href.split('?')[0];try{if(Cookies.get('pys_first_visit')===undefined&&(!options.cookie.disabled_all_cookie)){if(!options.cookie.disabled_first_visit_cookie) {Cookies.set('pys_first_visit',true,{expires:expires});} else{Cookies.remove('pys_first_visit')} if(!options.cookie.disabled_trafficsource_cookie) {Cookies.set('pysTrafficSource',getTrafficSource(),{expires:expires});} else{Cookies.remove('pysTrafficSource')} if(!options.cookie.disabled_landing_page_cookie) {Cookies.set('pys_landing_page',landing,{expires:expires});} else{Cookies.remove('pys_landing_page')} if(!options.cookie.disabled_utmTerms_cookie) {$.each(utmTerms,function(index,name){if(queryVars.hasOwnProperty(name)){Cookies.set('pys_'+name,queryVars[name],{expires:expires});}else{Cookies.remove('pys_'+name)}});} else{$.each(utmTerms,function(index,name){Cookies.remove('pys_'+name)});} if(!options.cookie.disabled_utmId_cookie) {$.each(utmId,function(index,name){if(queryVars.hasOwnProperty(name)){Cookies.set('pys_'+name,queryVars[name],{expires:expires});}else{Cookies.remove('pys_'+name)}})} else{$.each(utmId,function(index,name){Cookies.remove('pys_'+name)});}} if(isNewSession&&(!options.cookie.disabled_all_cookie)){if(!options.cookie.disabled_trafficsource_cookie) {Cookies.set('last_pysTrafficSource',getTrafficSource(),{expires:expires});} else{Cookies.remove('last_pysTrafficSource')} if(!options.cookie.disabled_landing_page_cookie) {Cookies.set('last_pys_landing_page',landing,{expires:expires});} else{Cookies.remove('last_pys_landing_page')} if(!options.cookie.disabled_utmTerms_cookie) {$.each(utmTerms,function(index,name){if(queryVars.hasOwnProperty(name)){Cookies.set('last_pys_'+name,queryVars[name],{expires:expires});}else{Cookies.remove('last_pys_'+name)}});} else{$.each(utmTerms,function(index,name){Cookies.remove('last_pys_'+name)});} if(!options.cookie.disabled_utmId_cookie) {$.each(utmId,function(index,name){if(queryVars.hasOwnProperty(name)){Cookies.set('last_pys_'+name,queryVars[name],{expires:expires});}else{Cookies.remove('last_pys_'+name)}})} else{$.each(utmId,function(index,name){Cookies.remove('last_pys_'+name)});}} if(options.cookie.disabled_start_session_cookie){Cookies.remove('pys_start_session') Cookies.remove('pys_session_limit')} if(options.cookie.disabled_all_cookie) {Cookies.remove('pys_first_visit') Cookies.remove('pysTrafficSource') Cookies.remove('pys_landing_page') Cookies.remove('last_pys_landing_page') Cookies.remove('last_pysTrafficSource') Cookies.remove('pys_start_session') Cookies.remove('pys_session_limit') $.each(Utils.utmTerms,function(index,name){Cookies.remove('pys_'+name)});$.each(Utils.utmId,function(index,name){Cookies.remove('pys_'+name)}) $.each(Utils.utmTerms,function(index,name){Cookies.remove('last_pys_'+name)});$.each(Utils.utmId,function(index,name){Cookies.remove('last_pys_'+name)});}}catch(e){console.error(e);}},generateUniqueId:function(event){if(event.eventID.length==0||(event.type=="static"&&options.ajaxForServerStaticEvent)||(event.type!=="static"&&options.ajaxForServerEvent)){let idKey=event.hasOwnProperty('custom_event_post_id')?event.custom_event_post_id:event.e_id;if(!uniqueId.hasOwnProperty(idKey)){uniqueId[idKey]=pys_generate_token();} return uniqueId[idKey];} else if(event.eventID.length!==0) {return event.eventID;}},sendServerAjaxRequest:function(url,data){jQuery.ajax({type:'POST',url:url,data:data,headers:{'Cache-Control':'no-cache'},success:function(){},});},clone:function(obj){var copy;if(null==obj||"object"!=typeof obj)return obj;if(obj instanceof Date){copy=new Date();copy.setTime(obj.getTime());return copy;} if(obj instanceof Array){copy=[];for(var i=0,len=obj.length;i0&&link.indexOf('.')!==-1){link=link.substring(link.indexOf(".")+1);return link;}else{return"";}},getLinkFilename:function(link){link=link.substring(0,(link.indexOf("#")===-1)?link.length:link.indexOf("#"));link=link.substring(0,(link.indexOf("?")===-1)?link.length:link.indexOf("?"));link=link.substring(link.lastIndexOf("/")+1,link.length);if(link.length>0&&link.indexOf('.')!==-1){return link;}else{return"";}},isCheckoutPage:function(){return $('body').hasClass('woocommerce-checkout')||document.querySelector('.woocommerce-checkout')||$('body').hasClass('edd-checkout');},addCheckoutFields:function(){var utm="";var utms=getUTMs() $.each(utmTerms,function(index,name){if(index>0){utm+="|";} utm+=name+":"+utms[name];});var utmIdList="";var utmsIds=getUTMId() $.each(utmId,function(index,name){if(index>0){utmIdList+="|";} utmIdList+=name+":"+utmsIds[name];});var utmIdListLast="";var utmsIdsLast=getUTMId(true) $.each(utmId,function(index,name){if(index>0){utmIdListLast+="|";} utmIdListLast+=name+":"+utmsIdsLast[name];});var utmLast="";var utmsLast=getUTMs(true) $.each(utmTerms,function(index,name){if(index>0){utmLast+="|";} utmLast+=name+":"+utmsLast[name];});var dateTime=getDateTime();var landing=getLandingPageValue();var lastLanding=getLandingPageValue();var trafic=getTrafficSourceValue();var lastTrafic=getTrafficSourceValue();var $form=null;if($('body').hasClass('woocommerce-checkout')){$form=$("form.woocommerce-checkout");}else{$form=$("#edd_purchase_form");} var inputs={'pys_utm':utm,'pys_utm_id':utmIdList,'pys_browser_time':dateTime.join("|"),'pys_landing':landing,'pys_source':trafic,'pys_order_type':$(".wcf-optin-form").length>0?"wcf-optin":"normal",'last_pys_landing':lastLanding,'last_pys_source':lastTrafic,'last_pys_utm':utmLast,'last_pys_utm_id':utmIdListLast,} Object.keys(inputs).forEach(function(key,index){$form.append(" ");});},getAdvancedFormData:function(){let dataStr=Cookies.get("pys_advanced_form_data");if(dataStr===undefined){return{'first_name':"",'last_name':"",'email':"",'phone':""};}else{return JSON.parse(dataStr);}}};}(options);var Facebook=function(options){var defaultEventTypes=['PageView','ViewContent','Search','AddToCart','AddToWishlist','InitiateCheckout','AddPaymentInfo','Purchase','Lead','Subscribe','CustomizeProduct','FindLocation','StartTrial','SubmitApplication','Schedule','Contact','Donate'];var initialized=false;var genereateFbp=function(){return!Cookies.get('_fbp')?'fb.1.'+Date.now()+'.'+Math.floor(1000000000+Math.random()*9000000000):Cookies.get('_fbp');};var genereateFbc=function(){return getUrlParameter('fbclid')?'fb.1.'+Date.now()+'.'+getUrlParameter('fbclid'):''};var isApiDisabled=options.gdpr.all_disabled_by_api||options.gdpr.facebook_disabled_by_api||options.gdpr.cookiebot_integration_enabled||options.gdpr.consent_magic_integration_enabled||options.gdpr.cookie_notice_integration_enabled||options.gdpr.cookie_law_info_integration_enabled;function sendFbServerEvent(allData,name,params){let eventId=null;if(options.facebook.serverApiEnabled){if(allData.e_id==="woo_remove_from_cart"){Facebook.updateEventId(allData.name);allData.eventID=Facebook.getEventId(allData.name);}else{allData.eventID=Utils.generateUniqueId(allData);if(Cookies.get('_fbp')){params._fbp=Cookies.get('_fbp');} if(Cookies.get('_fbc')){params._fbc=Cookies.get('_fbc');} if(options.ajaxForServerEvent||isApiDisabled){var json={action:'pys_api_event',pixel:'facebook',event:name,data:params,ids:options.facebook.pixelIds,eventID:allData.eventID,url:window.location.href,ajax_event:options.ajax_event};if(allData.hasOwnProperty('woo_order')){json['woo_order']=allData.woo_order;} if(allData.hasOwnProperty('edd_order')){json['edd_order']=allData.edd_order;} if(allData.e_id==="automatic_event_internal_link"||allData.e_id==="automatic_event_outbound_link"){setTimeout(()=>Utils.sendServerAjaxRequest(options.ajaxUrl,json),500);}else if(allData.type!='static'){Utils.sendServerAjaxRequest(options.ajaxUrl,json);} if(allData.type=='static'&&options.ajaxForServerStaticEvent){Utils.sendServerAjaxRequest(options.ajaxUrl,json);}}} delete params._fbp;delete params._fbc;eventId=allData.eventID} return eventId;} function fireEvent(name,allData){if(typeof window.pys_event_data_filter==="function"&&window.pys_disable_event_filter(name,'facebook')){return;} var actionType=defaultEventTypes.includes(name)?'track':'trackCustom';var data=allData.params;var params={};var arg={};Utils.copyProperties(data,params);let eventId=sendFbServerEvent(allData,name,params) if("hCR"===name){return;} if(options.debug){console.log('[Facebook] '+name,params,"eventID",eventId);} if(eventId!=null){arg.eventID=eventId;} fbq(actionType,name,params,arg);} return{tag:function(){return"facebook";},isEnabled:function(){return options.hasOwnProperty('facebook');},disable:function(){initialized=false;},advancedMatching:function(){if(options.facebook.advancedMatchingEnabled){let advancedMatchingForm=Utils.getAdvancedFormData();let advancedMatching={};if(Object.keys(options.facebook.advancedMatching).length>0){advancedMatching=options.facebook.advancedMatching;} if(!advancedMatching.hasOwnProperty("em")&&advancedMatchingForm.hasOwnProperty("email")&&advancedMatchingForm["email"].length>0){advancedMatching["em"]=advancedMatchingForm["email"];} if(!advancedMatching.hasOwnProperty("ph")&&advancedMatchingForm.hasOwnProperty("phone")&&advancedMatchingForm["phone"].length>0){advancedMatching["ph"]=advancedMatchingForm["phone"];} if(!advancedMatching.hasOwnProperty("fn")&&advancedMatchingForm.hasOwnProperty("first_name")&&advancedMatchingForm["first_name"].length>0){advancedMatching["fn"]=advancedMatchingForm["first_name"];} if(!advancedMatching.hasOwnProperty("ln")&&advancedMatchingForm.hasOwnProperty("last_name")&&advancedMatchingForm["last_name"].length>0){advancedMatching["ln"]=advancedMatchingForm["last_name"];} if(!advancedMatching.hasOwnProperty("external_id")){if(Cookies.get('pbid')||(options.hasOwnProperty('pbid')&&options.pbid)){advancedMatching["external_id"]=Cookies.get('pbid')?Cookies.get('pbid'):options.pbid;}} else if(advancedMatching.external_id!=Cookies.get('pbid')) {advancedMatching["external_id"]=Cookies.get('pbid')?Cookies.get('pbid'):advancedMatching.external_id;} if(Object.keys(advancedMatching).length>0){return advancedMatching;}} return false},loadPixel:function(){if(initialized||!this.isEnabled()||!Utils.consentGiven('facebook')){return;} !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.agent='dvpixelyoursite';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');let expires=parseInt(options.cookie_duration);if(!Cookies.get('_fbp')){Cookies.set('_fbp',genereateFbp(),{expires:expires});} if(getUrlParameter('fbclid')){Cookies.set('_fbc',genereateFbc(),{expires:expires});} options.facebook.pixelIds.forEach(function(pixelId){if(options.facebook.removeMetadata){fbq('set','autoConfig',false,pixelId);} let advancedMatching=Facebook.advancedMatching();if(options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=="undefined"){if(!advancedMatching){fbq('init',pixelId);}else{var test_prefix=CS_Data.test_prefix;var cs_advanced_matching=Cookies.get('cs_enabled_advanced_matching'+test_prefix);if(jQuery('#cs_enabled_advanced_matching'+test_prefix).length>0){if(cs_advanced_matching=='yes'){fbq('init',pixelId,advancedMatching);}else{fbq('init',pixelId);}}else{fbq('init',pixelId,advancedMatching);}}}else{if(!advancedMatching){fbq('init',pixelId);}else{fbq('init',pixelId,advancedMatching);}}});initialized=true;Utils.fireStaticEvents('facebook');},fireEvent:function(name,data){if(!initialized||!this.isEnabled()){return false;} data.delay=data.delay||0;data.params=data.params||{};if(data.delay===0){fireEvent(name,data);}else{setTimeout(function(name,params){fireEvent(name,params);},data.delay*1000,name,data);} return true;},onCommentEvent:function(event){this.fireEvent(event.name,event);},onDownloadEvent:function(event){this.fireEvent(event.name,event);},onFormEvent:function(event){this.fireEvent(event.name,event);},onWooAddToCartOnButtonEvent:function(product_id){if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) return;var event=options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()];if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('facebook')){event=Utils.copyProperties(event,{}) Utils.copyProperties(window.pysWooProductData[product_id]['facebook'].params,event.params) this.fireEvent(event.name,event);}}},onWooAddToCartOnSingleEvent:function(product_id,qty,product_type,$form){window.pysWooProductData=window.pysWooProductData||[];if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) return;var event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(product_type===Utils.PRODUCT_VARIABLE&&!options.facebook.wooVariableAsSimple){product_id=parseInt($form.find('input[name="variation_id"]').val());} if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('facebook')){Utils.copyProperties(window.pysWooProductData[product_id]['facebook'].params,event.params);var groupValue=0;if(product_type===Utils.PRODUCT_GROUPED){$form.find(".woocommerce-grouped-product-list .qty").each(function(index){var childId=$(this).attr('name').replaceAll("quantity[","").replaceAll("]","");var quantity=parseInt($(this).val());if(isNaN(quantity)){quantity=0;} var childItem=window.pysWooProductData[product_id]['facebook'].grouped[childId];if(quantity==0){event.params.content_ids.forEach(function(el,index,array){if(el==childItem.content_id){array.splice(index,1);}});} if(event.params.hasOwnProperty('contents')){event.params.contents.forEach(function(el,index,array){if(el.id==childItem.content_id){if(quantity>0){el.quantity=quantity;}else{array.splice(index,1);}}});} groupValue+=childItem.price*quantity;});if(groupValue==0)return;} if(options.woo.addToCartOnButtonValueEnabled&&options.woo.addToCartOnButtonValueOption!=='global'){if(product_type===Utils.PRODUCT_GROUPED){event.params.value=groupValue;}else if(product_type===Utils.PRODUCT_BUNDLE){var data=$(".bundle_form .bundle_data").data("bundle_form_data");var items_sum=getBundlePriceOnSingleProduct(data);event.params.value=(parseInt(data.base_price)+items_sum)*qty;}else{event.params.value=event.params.value*qty;}} if(event.params.hasOwnProperty('contents')&&product_type!==Utils.PRODUCT_GROUPED){event.params.contents[0].quantity=qty;} this.fireEvent(event.name,event);}}},onWooRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){if(!options.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())) return;var event=Utils.clone(options.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);if(window.pysEddProductData.hasOwnProperty(download_id)){var index;if(price_index){index=download_id+'_'+price_index;}else{index=download_id;} if(window.pysEddProductData[download_id].hasOwnProperty(index)){if(window.pysEddProductData[download_id][index].hasOwnProperty('facebook')){Utils.copyProperties(window.pysEddProductData[download_id][index]['facebook']["params"],event.params) if(options.edd.addToCartOnButtonValueEnabled&&options.edd.addToCartOnButtonValueOption!=='global'){event.params.value=event.params.value*qty;} var contents=event.params.contents;contents[0].quantity=qty;event.params.contents=contents;this.fireEvent(event.name,event);}}}},onEddRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onPageScroll:function(event){this.fireEvent(event.name,event);},onTime:function(event){this.fireEvent(event.name,event);},initEventIdCookies:function(key){var ids={};ids[key]=pys_generate_token(36) Cookies.set('pys_fb_event_id',JSON.stringify(ids));},updateEventId:function(key){var cooData=Cookies.get("pys_fb_event_id") if(cooData===undefined){this.initEventIdCookies(key);}else{var data=JSON.parse(cooData);data[key]=pys_generate_token(36);Cookies.set('pys_fb_event_id',JSON.stringify(data));}},getEventId:function(key){var data=Cookies.get("pys_fb_event_id");if(data===undefined){this.initEventIdCookies(key);data=Cookies.get("pys_fb_event_id");} return JSON.parse(data)[key];},};}(options);var Analytics=function(options){var initialized=false;function fireEvent(name,data){if(typeof window.pys_event_data_filter==="function"&&window.pys_disable_event_filter(name,'ga')){return;} var eventParams=Utils.copyProperties(data,{});var _fireEvent=function(tracking_id,name,params){params['send_to']=tracking_id;if(options.debug){console.log('[Google Analytics #'+tracking_id+'] '+name,params);} gtag('event',name,params);};options.ga.trackingIds.forEach(function(tracking_id){var copyParams=Utils.copyProperties(eventParams,{});var params=mapParamsTov4(tracking_id,name,copyParams) _fireEvent(tracking_id,name,params);});} function mapParamsTov4(tag,name,param){delete param.landing_page;if(isv4(tag)){delete param.traffic_source;delete param.event_category;delete param.event_label;delete param.ecomm_prodid;delete param.ecomm_pagetype;delete param.ecomm_totalvalue;if(name==='search'){param['search']=param.search_term;delete param.search_term;delete param.dynx_itemid;delete param.dynx_pagetype;delete param.dynx_totalvalue;}} return param;} function isv4(tag){return tag.indexOf('G')===0;} return{tag:function(){return"ga";},isEnabled:function(){return options.hasOwnProperty('ga');},disable:function(){initialized=false;},loadPixel:function(){if(initialized||!this.isEnabled()||!Utils.consentGiven('analytics')){return;} Utils.loadGoogleTag(options.ga.trackingIds[0]);var config={};if(options.ga.crossDomainEnabled){config.linker={accept_incoming:options.ga.crossDomainAcceptIncoming,domains:options.ga.crossDomainDomains};} options.ga.trackingIds.forEach(function(trackingId,index){var obj=options.ga.isDebugEnabled;var searchValue="index_"+index;var config_for_tag=Object.assign({},options.config);config_for_tag.debug_mode=false;config_for_tag.send_page_view=!options.ga.custom_page_view_event;for(var key in obj){if(obj.hasOwnProperty(key)&&obj[key]===searchValue){config_for_tag.debug_mode=true;break;}} if(!config_for_tag.debug_mode) {delete config_for_tag.debug_mode;} if(isv4(trackingId)){if(options.ga.disableAdvertisingFeatures){config_for_tag.allow_google_signals=false} if(options.ga.disableAdvertisingPersonalization){config_for_tag.allow_ad_personalization_signals=false}} if(options.ga.hasOwnProperty('additionalConfig')){if(options.ga.additionalConfig.hasOwnProperty(trackingId)&&options.ga.additionalConfig[trackingId]){config_for_tag.first_party_collection=options.ga.additionalConfig[trackingId].first_party_collection;}} if(options.ga.hasOwnProperty('serverContainerUrls')){if(options.ga.serverContainerUrls.hasOwnProperty(trackingId)&&options.ga.serverContainerUrls[trackingId].enable_server_container!=false){if(options.ga.serverContainerUrls[trackingId].server_container_url!=''){config_for_tag.server_container_url=options.ga.serverContainerUrls[trackingId].server_container_url;} if(options.ga.serverContainerUrls[trackingId].transport_url!=''){config_for_tag.transport_url=options.ga.serverContainerUrls[trackingId].transport_url;}}} if(options.gdpr.cookiebot_integration_enabled&&typeof Cookiebot!=='undefined'){var cookiebot_consent_category=options.gdpr['cookiebot_analytics_consent_category'];if(options.gdpr['analytics_prior_consent_enabled']){if(Cookiebot.consented===true&&Cookiebot.consent[cookiebot_consent_category]){gtag('config',trackingId,config_for_tag);}}else{if(Cookiebot.consent[cookiebot_consent_category]){gtag('config',trackingId,config_for_tag);}}} else {gtag('config',trackingId,config_for_tag);}});initialized=true;Utils.fireStaticEvents('ga');},fireEvent:function(name,data){if(!initialized||!this.isEnabled()){return false;} data.delay=data.delay||0;data.params=data.params||{};data.params.eventID=Utils.generateUniqueId(data);if(data.delay===0){fireEvent(name,data.params);}else{setTimeout(function(name,params){fireEvent(name,params);},data.delay*1000,name,data.params);} return true;},onCommentEvent:function(event){this.fireEvent(event.name,event);},onDownloadEvent:function(event){this.fireEvent(event.name,event);},onFormEvent:function(event){this.fireEvent(event.name,event);},onWooAddToCartOnButtonEvent:function(product_id){if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) return;var event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('ga')){Utils.copyProperties(window.pysWooProductData[product_id]['ga'].params,event.params) this.fireEvent(event.name,event);}}},onWooAddToCartOnSingleEvent:function(product_id,qty,product_type,$form){window.pysWooProductData=window.pysWooProductData||[];if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) return;var event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(product_type===Utils.PRODUCT_VARIABLE&&!options.ga.wooVariableAsSimple){product_id=parseInt($form.find('input[name="variation_id"]').val());} if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('ga')){Utils.copyProperties(window.pysWooProductData[product_id]['ga'].params,event.params);if(product_type===Utils.PRODUCT_GROUPED){var groupValue=0;$form.find(".woocommerce-grouped-product-list .qty").each(function(index){var childId=$(this).attr('name').replaceAll("quantity[","").replaceAll("]","");var quantity=parseInt($(this).val());if(isNaN(quantity)){quantity=0;} var childItem=window.pysWooProductData[product_id]['ga'].grouped[childId];event.params.items.forEach(function(el,index,array){if(el.id==childItem.content_id){if(quantity>0){el.quantity=quantity;}else{array.splice(index,1);}}});groupValue+=childItem.price*quantity;});if(options.woo.addToCartOnButtonValueEnabled&&options.woo.addToCartOnButtonValueOption!=='global'&&event.params.hasOwnProperty('ecomm_totalvalue')){event.params.ecomm_totalvalue=groupValue;} if(groupValue==0)return;}else{event.params.items[0].quantity=qty;} if(options.woo.addToCartOnButtonValueEnabled&&options.woo.addToCartOnButtonValueOption!=='global'&&product_type!==Utils.PRODUCT_GROUPED) {if(event.params.hasOwnProperty('ecomm_totalvalue')){event.params.ecomm_totalvalue=event.params.items[0].price*qty;}} this.fireEvent(event.name,event);}}},onWooRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){if(!options.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())) return;var event=Utils.clone(options.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);if(window.pysEddProductData.hasOwnProperty(download_id)){var index;if(price_index){index=download_id+'_'+price_index;}else{index=download_id;} if(window.pysEddProductData[download_id].hasOwnProperty(index)){if(window.pysEddProductData[download_id][index].hasOwnProperty('ga')){Utils.copyProperties(window.pysEddProductData[download_id][index]['ga'].params,event.params);event.params.items[0].quantity=qty;this.fireEvent(event.name,event);}}}},onEddRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onPageScroll:function(event){this.fireEvent(event.name,event);},onTime:function(event){this.fireEvent(event.name,event);},};}(options);window.pys=window.pys||{};window.pys.Facebook=Facebook;window.pys.Analytics=Analytics;window.pys.Utils=Utils;$(document).ready(function(){if($("#pys_late_event").length>0){var events=JSON.parse($("#pys_late_event").attr("dir"));for(var key in events){var event={};event[events[key].e_id]=[events[key]];if(options.staticEvents.hasOwnProperty(key)){Object.assign(options.staticEvents[key],event);}else{options.staticEvents[key]=event;}}} var Pinterest=Utils.setupPinterestObject();var Bing=Utils.setupBingObject();if(options.hasOwnProperty('cookie')) {if(options.cookie.externalID_disabled_by_api||options.cookie.disabled_all_cookie) {Cookies.remove('pbid')} if(options.cookie.disabled_advanced_form_data_cookie||options.cookie.disabled_all_cookie) {Cookies.remove('pys_advanced_form_data')} if(options.cookie.disabled_landing_page_cookie||options.cookie.disabled_all_cookie) {Cookies.remove('pys_landing_page') Cookies.remove('last_pys_landing_page')} if(options.cookie.disabled_trafficsource_cookie||options.cookie.disabled_all_cookie) {Cookies.remove('pysTrafficSource') Cookies.remove('last_pysTrafficSource')} if(options.cookie.disabled_first_visit_cookie||options.cookie.disabled_all_cookie) {Cookies.remove('pys_first_visit')} if(options.cookie.disabled_utmTerms_cookie||options.cookie.disabled_all_cookie) {$.each(Utils.utmTerms,function(index,name){Cookies.remove('pys_'+name)});$.each(Utils.utmTerms,function(index,name){Cookies.remove('last_pys_'+name)});} if(options.cookie.disabled_utmId_cookie||options.cookie.disabled_all_cookie) {$.each(Utils.utmId,function(index,name){Cookies.remove('pys_'+name)}) $.each(Utils.utmId,function(index,name){Cookies.remove('last_pys_'+name)});}} if(options.gdpr.cookie_law_info_integration_enabled){var cli_cookie=Cookies.get('cookieyes-consent')??Cookies.get('viewed_cookie_policy');if(typeof cli_cookie!=='undefined'){if(cli_cookie===Cookies.get('cookieyes-consent')&&getCookieYes('analytics')=='yes'){Utils.manageCookies();}else if(cli_cookie===Cookies.get('viewed_cookie_policy')&&cli_cookie=='yes'){Utils.manageCookies();}}} if(options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=="undefined"){if(CS_Data.cs_script_cat.pys==CS_Data.cs_necessary_cat_id||CS_Data.cs_script_cat.pys==0){Utils.manageCookies();}else if(Cookies.get('cs_enabled_cookie_term'+CS_Data.test_prefix+'_'+CS_Data.cs_script_cat.pys)=='yes'){Utils.manageCookies();}}else{Utils.manageCookies();} Utils.setupGdprCallbacks();if(options.dynamicEvents.hasOwnProperty("automatic_event_scroll")){var singlePageScroll=function(){var docHeight=$(document).height()-$(window).height();var isFired=false;if(options.dynamicEvents.hasOwnProperty("automatic_event_scroll")){var pixels=Object.keys(options.dynamicEvents.automatic_event_scroll);for(var i=0;i0){if(options.dynamicEvents.hasOwnProperty("automatic_event_download")){var pixels=Object.keys(options.dynamicEvents.automatic_event_download);for(var i=0;i{var form_id=$(event.target).attr('data-formid');sendFormAction($(event.target),form_id);}) $(document).on('frmFormComplete',function(event,form,response){const form_id=$(form).find('input[name="form_id"]').val();sendFormAction($(event.target),form_id);});$(document).onFirst('nfFormSubmitResponse',function(event,data){const form_id=data.response.data.form_id;sendFormAction($(event.target),form_id);});var fluentForms=$('form.frm-fluent-form');fluentForms.each(function(){var $form=$(this);$form.on('fluentform_submission_success',function(event){var $formItem=$(this);var form_id=$formItem.attr('data-form_id');sendFormAction($(event.target),form_id);});});} Utils.loadPixels();if(Utils.isCheckoutPage()){Utils.addCheckoutFields();}});var sendFormAction=function(form_target,formId){var params={form_id:formId,text:form_target.find('[type="submit"]').is('input')?form_target.find('[type="submit"]').val():form_target.find('.forminator-button-submit').text()!=''?form_target.find('.forminator-button-submit').text():form_target.find('[type="submit"]').text()};if(options.dynamicEvents.hasOwnProperty("automatic_event_form")){var pixels=Object.keys(options.dynamicEvents.automatic_event_form);for(var i=0;i(c^crypto.getRandomValues(new Uint8Array(1))[0]&15>>c/4).toString(16));} function getBundlePriceOnSingleProduct(data){var items_sum=0;jQuery(".bundle_form .bundled_product").each(function(index){var id=jQuery(this).find(".cart").data("bundled_item_id");var item_price=data.prices[id];var item_quantity=jQuery(this).find(".bundled_qty").val();if(!jQuery(this).hasClass("bundled_item_optional")||jQuery(this).find(".bundled_product_optional_checkbox input").prop('checked')){items_sum+=item_price*item_quantity;}});return items_sum;} function getPixelBySlag(slug){switch(slug){case"facebook":return window.pys.Facebook;case"ga":return window.pys.Analytics;case"bing":return window.pys.Bing;case"pinterest":return window.pys.Pinterest;}} var getUrlParameter=function getUrlParameter(sParam){var sPageURL=window.location.search.substring(1),sURLVariables=sPageURL.split('&'),sParameterName,i;for(i=0;iObject.assign(ac,{[cv.split("=")[0].trim()]:cv.split("=")[1]}),{})["cookieyes-consent"];const{[key]:value}=cookies.split(",").reduce((obj,pair)=>((pair=pair.split(":")),(obj[pair[0]]=pair[1]),obj),{});return value;};}catch(e){} try{(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-PWMPP5Z');}catch(e){} try{wp.i18n.setLocaleData({'text direction\u0004ltr':['ltr']});}catch(e){} try{(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){if(this.formData={},this.tree={},!(t instanceof FormData))return this;this.formData=t;const e=()=>{const t=new Map;return t.largestIndex=0,t.set=function(e,i){""===e?e=t.largestIndex++:/^[0-9]+$/.test(e)&&(e=parseInt(e),t.largestIndex<=e&&(t.largestIndex=e+1)),Map.prototype.set.call(t,e,i)},t};this.tree=e();const i=/^(?[a-z][-a-z0-9_:]*)(?(?:\[(?:[a-z][-a-z0-9_:]*|[0-9]*)\])*)/i;for(const[t,s]of this.formData){const o=t.match(i);if(o)if(""===o.groups.array)this.tree.set(o.groups.name,s);else{const t=[...o.groups.array.matchAll(/\[([a-z][-a-z0-9_:]*|[0-9]*)\]/gi)].map((([t,e])=>e));t.unshift(o.groups.name);const i=t.pop();t.reduce(((t,i)=>{if(/^[0-9]+$/.test(i)&&(i=parseInt(i)),t.get(i)instanceof Map)return t.get(i);const s=e();return t.set(i,s),s}),this.tree).set(i,s)}}}t.r(e),t.d(e,{all:()=>D,any:()=>M,date:()=>f,dayofweek:()=>u,email:()=>r,enum:()=>h,file:()=>m,maxdate:()=>z,maxfilesize:()=>$,maxitems:()=>v,maxlength:()=>x,maxnumber:()=>b,mindate:()=>A,minfilesize:()=>j,minitems:()=>w,minlength:()=>g,minnumber:()=>y,number:()=>c,required:()=>n,requiredfile:()=>a,tel:()=>l,time:()=>d,url:()=>p}),i.prototype.entries=function(){return this.tree.entries()},i.prototype.get=function(t){return this.tree.get(t)},i.prototype.getAll=function(t){if(!this.has(t))return[];const e=t=>{const i=[];if(t instanceof Map)for(const[s,o]of t)i.push(...e(o));else""!==t&&i.push(t);return i};return e(this.get(t))},i.prototype.has=function(t){return this.tree.has(t)},i.prototype.keys=function(){return this.tree.keys()},i.prototype.values=function(){return this.tree.values()};const s=i;function o({rule:t,field:e,error:i,...s}){this.rule=t,this.field=e,this.error=i,this.properties=s}const n=function(t){if(0===t.getAll(this.field).length)throw new o(this)},a=function(t){if(0===t.getAll(this.field).length)throw new o(this)},r=function(t){if(!t.getAll(this.field).every((t=>{if((t=t.trim()).length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,i]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(i))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(i))return!1;const s=i.split(".");if(s.length<2)return!1;for(const t of s){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0})))throw new o(this)},p=function(t){const e=t.getAll(this.field);if(!e.every((t=>{if(""===(t=t.trim()))return!1;try{return(t=>-1!==["http","https","ftp","ftps","mailto","news","irc","irc6","ircs","gopher","nntp","feed","telnet","mms","rtsp","sms","svn","tel","fax","xmpp","webcal","urn"].indexOf(t))(new URL(t).protocol.replace(/:$/,""))}catch{return!1}})))throw new o(this)},l=function(t){if(!t.getAll(this.field).every((t=>(t=(t=t.trim()).replaceAll(/[()/.*#\s-]+/g,""),/^[+]?[0-9]+$/.test(t)))))throw new o(this)},c=function(t){if(!t.getAll(this.field).every((t=>(t=t.trim(),!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)))))throw new o(this)},f=function(t){if(!t.getAll(this.field).every((t=>{if(t=t.trim(),!/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.valueOf())})))throw new o(this)},d=function(t){if(!t.getAll(this.field).every((t=>{const e=t.trim().match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const i=parseInt(e[1]),s=parseInt(e[2]),o=e[3]?parseInt(e[3]):0;return 0<=i&&i<=23&&0<=s&&s<=59&&0<=o&&o<=59})))throw new o(this)},m=function(t){if(!t.getAll(this.field).every((t=>t instanceof File&&this.accept?.some((e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):(t=>{const e=[],i=t.match(/^(?[a-z]+)\/(?[*]|[a-z0-9.+-]+)$/i);if(i){const t=i.groups.toplevel.toLowerCase(),s=i.groups.sub.toLowerCase();for(const[o,n]of(()=>{const t=new Map;return t.set("jpg|jpeg|jpe","image/jpeg"),t.set("gif","image/gif"),t.set("png","image/png"),t.set("bmp","image/bmp"),t.set("tiff|tif","image/tiff"),t.set("webp","image/webp"),t.set("ico","image/x-icon"),t.set("heic","image/heic"),t.set("asf|asx","video/x-ms-asf"),t.set("wmv","video/x-ms-wmv"),t.set("wmx","video/x-ms-wmx"),t.set("wm","video/x-ms-wm"),t.set("avi","video/avi"),t.set("divx","video/divx"),t.set("flv","video/x-flv"),t.set("mov|qt","video/quicktime"),t.set("mpeg|mpg|mpe","video/mpeg"),t.set("mp4|m4v","video/mp4"),t.set("ogv","video/ogg"),t.set("webm","video/webm"),t.set("mkv","video/x-matroska"),t.set("3gp|3gpp","video/3gpp"),t.set("3g2|3gp2","video/3gpp2"),t.set("txt|asc|c|cc|h|srt","text/plain"),t.set("csv","text/csv"),t.set("tsv","text/tab-separated-values"),t.set("ics","text/calendar"),t.set("rtx","text/richtext"),t.set("css","text/css"),t.set("htm|html","text/html"),t.set("vtt","text/vtt"),t.set("dfxp","application/ttaf+xml"),t.set("mp3|m4a|m4b","audio/mpeg"),t.set("aac","audio/aac"),t.set("ra|ram","audio/x-realaudio"),t.set("wav","audio/wav"),t.set("ogg|oga","audio/ogg"),t.set("flac","audio/flac"),t.set("mid|midi","audio/midi"),t.set("wma","audio/x-ms-wma"),t.set("wax","audio/x-ms-wax"),t.set("mka","audio/x-matroska"),t.set("rtf","application/rtf"),t.set("js","application/javascript"),t.set("pdf","application/pdf"),t.set("swf","application/x-shockwave-flash"),t.set("class","application/java"),t.set("tar","application/x-tar"),t.set("zip","application/zip"),t.set("gz|gzip","application/x-gzip"),t.set("rar","application/rar"),t.set("7z","application/x-7z-compressed"),t.set("exe","application/x-msdownload"),t.set("psd","application/octet-stream"),t.set("xcf","application/octet-stream"),t.set("doc","application/msword"),t.set("pot|pps|ppt","application/vnd.ms-powerpoint"),t.set("wri","application/vnd.ms-write"),t.set("xla|xls|xlt|xlw","application/vnd.ms-excel"),t.set("mdb","application/vnd.ms-access"),t.set("mpp","application/vnd.ms-project"),t.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t.set("docm","application/vnd.ms-word.document.macroEnabled.12"),t.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),t.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),t.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),t.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),t.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),t.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),t.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),t.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),t.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),t.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),t.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),t.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),t.set("potm","application/vnd.ms-powerpoint.template.macroEnabled.12"),t.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),t.set("sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"),t.set("sldm","application/vnd.ms-powerpoint.slide.macroEnabled.12"),t.set("onetoc|onetoc2|onetmp|onepkg","application/onenote"),t.set("oxps","application/oxps"),t.set("xps","application/vnd.ms-xpsdocument"),t.set("odt","application/vnd.oasis.opendocument.text"),t.set("odp","application/vnd.oasis.opendocument.presentation"),t.set("ods","application/vnd.oasis.opendocument.spreadsheet"),t.set("odg","application/vnd.oasis.opendocument.graphics"),t.set("odc","application/vnd.oasis.opendocument.chart"),t.set("odb","application/vnd.oasis.opendocument.database"),t.set("odf","application/vnd.oasis.opendocument.formula"),t.set("wp|wpd","application/wordperfect"),t.set("key","application/vnd.apple.keynote"),t.set("numbers","application/vnd.apple.numbers"),t.set("pages","application/vnd.apple.pages"),t})())("*"===s&&n.startsWith(t+"/")||n===i[0])&&e.push(...o.split("|"))}return e})(e).some((e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase())))))))))throw new o(this)},h=function(t){if(!t.getAll(this.field).every((t=>this.accept?.some((e=>t===String(e))))))throw new o(this)},u=function(t){if(!t.getAll(this.field).every((t=>{const e=0===(i=new Date(t).getDay())?7:i;var i;return this.accept?.some((t=>e===parseInt(t)))})))throw new o(this)},w=function(t){if(t.getAll(this.field).length{"string"==typeof t&&(i+=t.length)})),0!==i&&i{"string"==typeof t&&(i+=t.length)})),parseInt(this.threshold)!(parseFloat(t)!(parseFloat(this.threshold)(t=t.trim(),!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&t(t=t.trim(),!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&this.threshold{t instanceof File&&(i+=t.size)})),i{t instanceof File&&(i+=t.size)})),parseInt(this.threshold){const{rule:s,...o}=t;return"function"==typeof e[s]&&("function"!=typeof e[s].matches||e[s].matches(o,i))},O=({ruleObj:t,formDataTree:i,options:s})=>{const{rule:o}=t;e[o].call(t,i,s)},E=[],k=t=>[...E].reduce(((t,e)=>i=>e(i,t)),t),D=function(t,e={}){const i=(this.rules??[]).filter((t=>I({ruleObj:t,options:e}))),s=k(O);if(!i.every((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;if(void 0!==t.error)throw t;return!1}return!0})))throw new o(this)},M=function(t,e={}){const i=(this.rules??[]).filter((t=>I({ruleObj:t,options:e}))),s=k(O);if(!i.some((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;return!1}return!0})))throw new o(this)};var F;window.swv={validators:e,validate:(t,e,i={})=>{const n=(t.rules??[]).filter((t=>I({ruleObj:t,options:i})));if(!n.length)return new Map;const a=k(O),r=new s(e),p=n.reduce(((t,e)=>{try{a({ruleObj:e,formDataTree:r,options:i})}catch(e){if(!(e instanceof o))throw e;if(void 0!==e.field&&!t.has(e.field)&&void 0!==e.error)return t.set(e.field,e)}return t}),new Map);for(const t of r.keys())p.has(t)||p.set(t,{validInputs:r.getAll(t)});return p},use:t=>{E.push(t)},...null!==(F=window.swv)&&void 0!==F?F:{}}})();}catch(e){} try{var wpcf7={"api":{"root":"https:\/\/biletinfo.pl\/wp-json\/","namespace":"contact-form-7\/v1"}};}catch(e){} try{(function(domain,translations){var localeData=translations.locale_data[domain]||translations.locale_data.messages;localeData[""].domain=domain;wp.i18n.setLocaleData(localeData,domain);})("contact-form-7",{"translation-revision-date":"2024-02-05 07:59:38+0000","generator":"GlotPress\/4.0.1","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=3; plural=(n == 1) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2);","lang":"pl"},"Error:":["B\u0142\u0105d:"]}},"comment":{"reference":"includes\/js\/index.js"}});}catch(e){} try{(()=>{"use strict";const e=window.wp.i18n,t=e=>Math.abs(parseInt(e,10)),a=(e,t,a)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:a});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=(e,t)=>{const n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["validating","validating"],["payment_required","payment-required"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const r=e.getAttribute("data-status");if(e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t){e.classList.remove(r);const t={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,prevStatus:r};a(e,"statuschanged",t)}return t},r=e=>{const{root:t,namespace:a="contact-form-7/v1"}=wpcf7.api;return o.reduceRight(((e,t)=>a=>t(a,e)),(e=>{let n,r,{url:o,path:c,endpoint:s,headers:i,body:l,data:p,...d}=e;"string"==typeof s&&(n=a.replace(/^\/|\/$/g,""),r=s.replace(/^\//,""),c=r?n+"/"+r:n),"string"==typeof c&&(-1!==t.indexOf("?")&&(c=c.replace("?","&")),c=c.replace(/^\//,""),o=t+c),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const f={code:"fetch_error",message:"You are probably offline."},u={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(o||c||window.location.href,{...d,headers:i,body:l}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw u}));throw u}))),(()=>{throw f}))}))(e)},o=[];function c(e,t={}){const{target:a,scope:r=e,...o}=t;if(void 0===e.wpcf7?.schema)return;const c={...e.wpcf7.schema};if(void 0!==a){if(!e.contains(a))return;if(!a.closest(".wpcf7-form-control-wrap[data-name]"))return;if(a.closest(".novalidate"))return}const p=r.querySelectorAll(".wpcf7-form-control-wrap"),d=Array.from(p).reduce(((e,t)=>(t.closest(".novalidate")||t.querySelectorAll(":where( input, textarea, select ):enabled").forEach((t=>{if(t.name)switch(t.type){case"button":case"image":case"reset":case"submit":break;case"checkbox":case"radio":t.checked&&e.append(t.name,t.value);break;case"select-multiple":for(const a of t.selectedOptions)e.append(t.name,a.value);break;case"file":for(const a of t.files)e.append(t.name,a);break;default:e.append(t.name,t.value)}})),e)),new FormData),f=e.getAttribute("data-status");Promise.resolve(n(e,"validating")).then((n=>{if(void 0!==swv){const n=swv.validate(c,d,t);for(const t of p){if(void 0===t.dataset.name)continue;const o=t.dataset.name;if(n.has(o)){const{error:t,validInputs:a}=n.get(o);i(e,o),void 0!==t&&s(e,o,t,{scope:r}),l(e,o,null!=a?a:[])}if(t.contains(a))break}}})).finally((()=>{n(e,f)}))}r.use=e=>{o.unshift(e)};const s=(e,t,a,n)=>{const{scope:r=e,...o}=null!=n?n:{},c=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,""),s=e.querySelector(`.wpcf7-form-control-wrap[data-name="${t}"] .wpcf7-form-control`);(()=>{const t=document.createElement("li");t.setAttribute("id",c),s&&s.id?t.insertAdjacentHTML("beforeend",`${a}`):t.insertAdjacentText("beforeend",a),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(t)})(),r.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{const t=document.createElement("span");t.classList.add("wpcf7-not-valid-tip"),t.setAttribute("aria-hidden","true"),t.insertAdjacentText("beforeend",a),e.appendChild(t),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.classList.add("wpcf7-not-valid"),e.setAttribute("aria-describedby",c),"function"==typeof e.setCustomValidity&&e.setCustomValidity(a),e.closest(".use-floating-validation-tip")&&(e.addEventListener("focus",(e=>{t.setAttribute("style","display: none")})),t.addEventListener("click",(e=>{t.setAttribute("style","display: none")})))}))}))},i=(e,t)=>{const a=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,"");e.wpcf7.parent.querySelector(`.screen-reader-response ul li#${a}`)?.remove(),e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{e.querySelector(".wpcf7-not-valid-tip")?.remove(),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid"),"function"==typeof e.setCustomValidity&&e.setCustomValidity("")}))}))},l=(e,t,a)=>{e.querySelectorAll(`[data-reflection-of="${t}"]`).forEach((e=>{if("output"===e.tagName.toLowerCase()){const t=e;0===a.length&&a.push(t.dataset.default),a.slice(0,1).forEach((e=>{e instanceof File&&(e=e.name),t.textContent=e}))}else e.querySelectorAll("output").forEach((e=>{e.hasAttribute("data-default")?0===a.length?e.removeAttribute("hidden"):e.setAttribute("hidden","hidden"):e.remove()})),a.forEach((a=>{a instanceof File&&(a=a.name);const n=document.createElement("output");n.setAttribute("name",t),n.textContent=a,e.appendChild(n)}))}))};function p(e,t={}){if(wpcf7.blocked)return d(e),void n(e,"submitting");const o=new FormData(e);t.submitter&&t.submitter.name&&o.append(t.submitter.name,t.submitter.value);const c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(o,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:o};r({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:o,wpcf7:{endpoint:"feedback",form:e,detail:c}}).then((t=>{const r=n(e,t.status);return c.status=t.status,c.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(r)?a(e,r,c):["sent","failed"].includes(r)&&a(e,`mail${r}`,c),a(e,"submit",c),t})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&t.invalid_fields.forEach((t=>{s(e,t.field,t.message)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:t,detail:r}=e.wpcf7;d(t),a(t,"beforesubmit",r),n(t,"submitting")}return t(e)}));const d=e=>{e.querySelectorAll(".wpcf7-form-control-wrap").forEach((t=>{t.dataset.name&&i(e,t.dataset.name)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function f(e){const t=new FormData(e),o={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(t,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:t};r({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:o}}).then((t=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,n(e,"mail_sent")):n(e,"init"),o.apiResponse=t,a(e,"reset",o)})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:t,detail:a}=e.wpcf7;d(t),n(t,"resetting")}return t(e)}));const u=(e,t)=>{for(const a in t){const n=t[a];e.querySelectorAll(`input[name="${a}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${a.replaceAll(":","")}`).forEach((e=>{e.setAttribute("src",n)}));const r=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);r&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${a}"]`).forEach((e=>{e.value=r[1]}))}},m=(e,t)=>{for(const a in t){const n=t[a][0],r=t[a][1];e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${a}"]`).forEach((e=>{e.querySelector(`input[name="${a}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${a}"]`).value=r}))}};function w(e){const a=new FormData(e);e.wpcf7={id:t(a.get("_wpcf7")),status:e.getAttribute("data-status"),pluginVersion:a.get("_wpcf7_version"),locale:a.get("_wpcf7_locale"),unitTag:a.get("_wpcf7_unit_tag"),containerPost:t(a.get("_wpcf7_container_post")),parent:e.closest(".wpcf7"),get schema(){return wpcf7.schemas.get(this.id)}},wpcf7.schemas.set(e.wpcf7.id,void 0),e.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'')})),(e=>{e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((t=>{t.addEventListener("change",(t=>{const a=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${a}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(e),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const a=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');a.disabled=!n.checked,e.addEventListener("change",(e=>{a.disabled=!n.checked,e.target===n&&n.checked&&a.focus()}))}))})(e),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let a=e.value.trim();a&&!a.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==a.indexOf(".")&&(a=a.replace(/^\/+/,""),a="http://"+a),e.value=a}))}))})(e),(e=>{if(!e.querySelector(".wpcf7-acceptance")||e.classList.contains("wpcf7-acceptance-as-validation"))return;const t=()=>{let t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((e=>{if(!t||e.classList.contains("optional"))return;const a=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&a.checked||!e.classList.contains("invert")&&!a.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(e),(e=>{const a=(e,a)=>{const n=t(e.getAttribute("data-starting-value")),r=t(e.getAttribute("data-maximum-value")),o=t(e.getAttribute("data-minimum-value")),c=e.classList.contains("down")?n-a.value.length:a.value.length;e.setAttribute("data-current-value",c),e.innerText=c,r&&r{t={init:!1,...t},e.querySelectorAll(".wpcf7-character-count").forEach((n=>{const r=n.getAttribute("data-target-name"),o=e.querySelector(`[name="${r}"]`);o&&(o.value=o.defaultValue,a(n,o),t.init&&o.addEventListener("keyup",(e=>{a(n,o)})))}))};n({init:!0}),e.addEventListener("wpcf7reset",(e=>{n()}))})(e),window.addEventListener("load",(t=>{wpcf7.cached&&e.reset()})),e.addEventListener("reset",(t=>{wpcf7.reset(e)})),e.addEventListener("submit",(t=>{wpcf7.submit(e,{submitter:t.submitter}),t.preventDefault()})),e.addEventListener("wpcf7submit",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("wpcf7reset",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("change",(t=>{t.target.closest(".wpcf7-form-control")&&wpcf7.validate(e,{target:t.target})})),e.addEventListener("wpcf7statuschanged",(t=>{const a=t.detail.status;e.querySelectorAll(".active-on-any").forEach((e=>{e.removeAttribute("inert"),e.classList.remove("active-on-any")})),e.querySelectorAll(`.inert-on-${a}`).forEach((e=>{e.setAttribute("inert","inert"),e.classList.add("active-on-any")}))}))}document.addEventListener("DOMContentLoaded",(t=>{var a;if("undefined"!=typeof wpcf7)if(void 0!==wpcf7.api)if("function"==typeof window.fetch)if("function"==typeof window.FormData)if("function"==typeof NodeList.prototype.forEach)if("function"==typeof String.prototype.replaceAll){wpcf7={init:w,submit:p,reset:f,validate:c,schemas:new Map,...null!==(a=wpcf7)&&void 0!==a?a:{}},document.querySelectorAll("form .wpcf7").forEach((t=>{const a=document.createElement("p");a.setAttribute("class","wpcf7-form-in-wrong-place");const n=document.createElement("strong");n.append((0,e.__)("Error:","contact-form-7"));const r=(0,e.__)("This contact form is placed in the wrong place.","contact-form-7");a.append(n," ",r),t.replaceWith(a)})),document.querySelectorAll(".wpcf7 > form").forEach((e=>{wpcf7.init(e),e.closest(".wpcf7").classList.replace("no-js","js")}));for(const e of wpcf7.schemas.keys())r({endpoint:`contact-forms/${e}/feedback/schema`,method:"GET"}).then((t=>{wpcf7.schemas.set(e,t)}))}else console.error("Your browser does not support String.replaceAll().");else console.error("Your browser does not support NodeList.forEach().");else console.error("Your browser does not support window.FormData().");else console.error("Your browser does not support window.fetch().");else console.error("wpcf7.api is not defined.");else console.error("wpcf7 is not defined.")}))})();}catch(e){} try{/** * CodeDropz Uploader * Copyright 2018 Glen Mongaya * CodeDrop Drag&Drop Uploader * @version 1.3.8.3 * @author CodeDropz, Glen Don L. Mongaya * @license The MIT License (MIT) */ !function(){let e=function(e){let t=document.querySelector("form.wpcf7-form");if(t){let r=new FormData;r.append("action","_wpcf7_check_nonce"),r.append("_ajax_nonce",dnd_cf7_uploader.ajax_nonce),fetch(dnd_cf7_uploader.ajax_url,{method:"POST",body:r}).then(e=>e.json()).then(({data:e,success:t})=>t&&(dnd_cf7_uploader.ajax_nonce=e)).catch(console.error)}var a=this;let d={handler:a,color:"#000",background:"",server_max_error:"Uploaded file exceeds the maximum upload size of your server.",max_file:a.dataset.max?a.dataset.max:10,max_upload_size:a.dataset.limit?a.dataset.limit:"10485760",supported_type:a.dataset.type?a.dataset.type:"jpg|jpeg|JPG|png|gif|pdf|doc|docx|ppt|pptx|odt|avi|ogg|m4a|mov|mp3|mp4|mpg|wav|wmv|xls",text:"Drag & Drop Files Here",separator:"or",button_text:"Browse Files",on_success:""},o=Object.assign({},d,e);var s=a.dataset.name+"_count_files";localStorage.setItem(s,1);let n=`
<${dnd_cf7_uploader.drag_n_drop_upload.tag}>${o.text} ${o.separator}
0 ${dnd_cf7_uploader.dnd_text_counter} ${parseInt(o.max_file)}
`,l=document.createElement("div");l.classList.add("codedropz-upload-wrapper"),o.handler.parentNode.insertBefore(l,o.handler),l.appendChild(o.handler),o.supported_type=o.supported_type.replace(/[^a-zA-Z0-9| ]/g,"");let p=o.handler.closest("form"),i=o.handler.closest(".codedropz-upload-wrapper"),c=p.querySelector('input[type="submit"], button[type="submit"]');o.handler.insertAdjacentHTML("afterend",n),["drag","dragstart","dragend","dragover","dragenter","dragleave","drop"].forEach(function(e){i.querySelector(".codedropz-upload-handler").addEventListener(e,function(e){e.preventDefault(),e.stopPropagation()})}),["dragover","dragenter"].forEach(function(e){i.querySelector(".codedropz-upload-handler").addEventListener(e,function(e){i.querySelector(".codedropz-upload-handler").classList.add("codedropz-dragover")})}),["dragleave","dragend","drop"].forEach(function(e){i.querySelector(".codedropz-upload-handler").addEventListener(e,function(e){i.querySelector(".codedropz-upload-handler").classList.remove("codedropz-dragover")})}),i.querySelector(".cd-upload-btn").addEventListener("click",function(e){e.preventDefault(),o.handler.value=null,o.handler.click()}),i.querySelector(".codedropz-upload-handler").addEventListener("drop",function(e){u(e.dataTransfer.files,"drop")}),o.handler.addEventListener("change",function(e){u(this.files,"click")}),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&a.removeAttribute("accept");var u=function(e,t){if(0==e.length)return;var r=new FormData;r.append("action","dnd_codedropz_upload"),r.append("type",t),r.append("security",dnd_cf7_uploader.ajax_nonce),r.append("form_id",a.dataset.id),r.append("upload_name",a.dataset.name);let d=o.handler.querySelector(".has-error"),n=i.querySelector(".codedropz-upload-handler");for(let l of(d&&d.remove(),e)){if(void 0!==r.delete&&r.delete("upload-file"),Number(localStorage.getItem(s))>o.max_file){if(!i.querySelector("span.has-error-msg")){var c=dnd_cf7_uploader.drag_n_drop_upload.max_file_limit,u=document.createElement("span");u.className="has-error-msg",u.textContent=c.replace("%count%",o.max_file),n.parentNode.insertBefore(u,n.nextSibling)}return!1}let f=m.createProgressBar(l);var g=!1;if(l.size>o.max_upload_size){let v=document.getElementById(f),h=document.createElement("span");h.classList.add("has-error"),h.textContent=dnd_cf7_uploader.drag_n_drop_upload.large_file,v.querySelector(".dnd-upload-details").appendChild(h),g=!0}if(regex_type=RegExp("(.*?).("+o.supported_type+")$"),!1!==g||regex_type.test(l.name.toLowerCase())||(document.querySelector("#"+f+" .dnd-upload-details").insertAdjacentHTML("beforeend",''+dnd_cf7_uploader.drag_n_drop_upload.inavalid_type+""),g=!0),localStorage.setItem(s,Number(localStorage.getItem(s))+1),!1===g){r.append("upload-file",l);var y=new XMLHttpRequest,x=document.getElementById(f),b=x.querySelector(".dnd-progress-bar"),S=x.querySelector(".dnd-upload-details"),$=p.querySelector('input[type="submit"], button[type="submit"]');y.open(p.getAttribute("method"),o.ajax_url),y.onreadystatechange=function(){if(4===this.readyState){if(200===this.status){var e=JSON.parse(this.responseText);e.success?(m.setProgressBar(f,100),"function"==typeof o.on_success&&o.on_success.call(this,a,f,e)):(b.remove(),S.insertAdjacentHTML("beforeend",''+e.data+""),$&&($.classList.remove("disabled"),$.removeAttribute("disabled")),x.classList.remove("in-progress"))}else b.remove(),S.insertAdjacentHTML("beforeend",''+o.server_max_error+""),$&&($.classList.remove("disabled"),$.removeAttribute("disabled")),x.classList.remove("in-progress")}},y.upload.addEventListener("progress",function(e){if(e.lengthComputable){var t=parseInt(100*(e.loaded/e.total));m.setProgressBar(f,t-1)}},!1),y.send(r)}}},m={createProgressBar:function(e){var t=i.querySelector(".codedropz-upload-handler"),r="dnd-file-"+Math.random().toString(36).substr(2,9),a=`
${e.name}(${m.bytesToSize(e.size)})
`,d=document.createElement("div");return d.id=r,d.className="dnd-upload-status",d.innerHTML=a,t.parentNode.insertBefore(d,t.nextSibling),r},setProgressBar:function(e,t){let r=document.getElementById(e),a=r.querySelector(".dnd-progress-bar");if(a){c&&m.disableBtn(c);let d=t*a.offsetWidth/100;r.classList.add("in-progress"),100==t?(a.querySelector("span").style.width="100%",a.querySelector("span").textContent=`${t}% `):(a.querySelector("span").style.width=d+"px",a.querySelector("span").textContent=`${t}% `),100==t&&(r.classList.add("complete"),r.classList.remove("in-progress"))}return!1},bytesToSize:function(e){return 0===e?"0":fileSize=(kBytes=e/1024)>=1024?(kBytes/1024).toFixed(2)+"MB":kBytes.toFixed(2)+"KB"},disableBtn:function(e){e&&(e.classList.add("disable"),e.disabled=!0)}}};document.addEventListener("click",function(e){if(e.target.classList.contains("dnd-icon-remove")){e.preventDefault();var t=e.target,r=t.closest(".dnd-upload-status"),a=t.closest(".codedropz-upload-wrapper"),d=t.parentElement.getAttribute("data-storage"),o=Number(localStorage.getItem(d));if(r.classList.contains("in-progress")||r.querySelector(".has-error"))return r.remove(),localStorage.setItem(d,o-1),!1;t.classList.add("deleting"),t.textContent=dnd_cf7_uploader.drag_n_drop_upload.delete.text+"...";var s=new XMLHttpRequest;s.open("POST",dnd_cf7_uploader.ajax_url),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){200===this.status&&JSON.parse(this.responseText).success&&(r.remove(),localStorage.setItem(d,o-1),a.querySelectorAll(".dnd-upload-status").length<=1&&a.querySelector(".has-error-msg")&&a.querySelector(".has-error-msg").remove(),a.querySelector(".dnd-upload-counter span").textContent=Number(localStorage.getItem(d))-1)},s.send("path="+r.querySelector('input[type="hidden"]').value+"&action=dnd_codedropz_upload_delete&security="+dnd_cf7_uploader.ajax_nonce),document.querySelectorAll(".has-error-msg").forEach(function(e){e.remove()})}}),HTMLElement.prototype.CodeDropz_Uploader=e}(); var dnd_upload_cf7_event = function(target, name, data) { var event = new CustomEvent('dnd_upload_cf7_' + name, { bubbles: true, detail: data }); target.dispatchEvent(event); } document.addEventListener('DOMContentLoaded', function() { document.addEventListener( 'wpcf7mailsent', function( event ) { const form = event.target; var inputFile = form.querySelectorAll('.wpcf7-drag-n-drop-file'); var status = form.querySelectorAll('.dnd-upload-status'); var counter = form.querySelector('.dnd-upload-counter span'); var error = form.querySelectorAll('span.has-error-msg'); if ( inputFile.length > 0 ) { inputFile.forEach( function(input) { localStorage.setItem( input.getAttribute('data-name') + '_count_files', 1 ); // Reset file counts }); } if (status) { status.forEach(function(statEl){ statEl.remove(); }); } if (counter) { counter.textContent = '0'; } if (error) { error.forEach(function(errEl){ errEl.remove(); }); } }, false ); window.initDragDrop = function () { var TextOJB = dnd_cf7_uploader.drag_n_drop_upload; var fileUpload = document.querySelectorAll('.wpcf7-drag-n-drop-file'); fileUpload.forEach(function(Upload) { Upload.CodeDropz_Uploader({ 'color': '#fff', 'ajax_url': dnd_cf7_uploader.ajax_url, 'text': TextOJB.text, 'separator': TextOJB.or_separator, 'button_text': TextOJB.browse, 'server_max_error': TextOJB.server_max_error, 'on_success': function(input, progressBar, response) { var progressDetails = document.querySelector('.codedropz-upload-wrapper #' + progressBar); var form = input.closest('form'); var span = form.querySelector('.wpcf7-acceptance'); var checkboxInput = ( span ? span.querySelector('input[type="checkbox"]') : '' ); const requiredMessage = input.closest('.codedropz-upload-wrapper').nextElementSibling; if( requiredMessage && requiredMessage.classList.contains('wpcf7-not-valid-tip') ){ requiredMessage.remove(); } if ( ( span && span.classList.contains('optional') ) || ! span || checkboxInput.checked || form.classList.contains('wpcf7-acceptance-as-validation')) { setTimeout(function(){ const submitButton = form.querySelector('button[type=submit], input[type=submit]'); if( submitButton ){ submitButton.removeAttribute('disabled'); } }, 1); } var detailsElement = progressDetails.querySelector('.dnd-upload-details'); var inputHTML = ''; detailsElement.insertAdjacentHTML('beforeend', inputHTML); var filesCounter = ( Number( localStorage.getItem( input.dataset.name + '_count_files' ) ) - 1); var counterElement = input.closest('.codedropz-upload-wrapper').querySelector('.dnd-upload-counter span'); counterElement.textContent = filesCounter; dnd_upload_cf7_event( progressDetails, 'success', response ); } }); }); } window.initDragDrop(); /*document.addEventListener( 'dnd_upload_cf7_success', function( event ) { console.log(event.detail); });*/ });}catch(e){} try{(function(){var container,button,menu,links,i,len;container=document.getElementById('site-navigation');if(!container){return;} button=container.getElementsByTagName('button')[0];if('undefined'===typeof button){return;} menu=container.getElementsByTagName('ul')[0];if('undefined'===typeof menu){button.style.display='none';return;} if(-1===menu.className.indexOf('nav-menu')){menu.className+=' nav-menu';} button.onclick=function(){if(-1!==container.className.indexOf('toggled')){container.className=container.className.replace(' toggled','');button.setAttribute('aria-expanded','false');}else{container.className+=' toggled';button.setAttribute('aria-expanded','true');}};document.addEventListener('click',function(event){var isClickInside=container.contains(event.target);if(!isClickInside){container.className=container.className.replace(' toggled','');button.setAttribute('aria-expanded','false');}});links=menu.getElementsByTagName('a');for(i=0,len=links.length;i a, .page_item_has_children > a');if('ontouchstart'in window){touchStartFn=function(e){var menuItem=this.parentNode;if(!menuItem.classList.contains('focus')){e.preventDefault();for(i=0;i-1?r:null}};function a(t){for(var n=[],e=1;e3?0:(t-t%10!=10?1:0)*t%10]}},m=a({},f),c=function(t){return m=a(m,t)},l=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},h=function(t,n){for(void 0===n&&(n=2),t=String(t);t.length0?"-":"+")+h(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4)},Z:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+h(Math.floor(Math.abs(n)/60),2)+":"+h(Math.abs(n)%60,2)}},M=function(t){return+t-1},D=[null,"[1-9]\\d?"],Y=[null,e],p=["isPm",e,function(t,n){var e=t.toLowerCase();return e===n.amPm[0]?0:e===n.amPm[1]?1:null}],y=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var n=(t+"").match(/([+-]|\d\d)/gi);if(n){var e=60*+n[1]+parseInt(n[2],10);return"+"===n[0]?e:-e}return 0}],S={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+e,function(t){return parseInt(t,10)}],M:["month","[1-9]\\d?",M],MM:["month","\\d\\d",M],YY:["year","\\d\\d",function(t){var n=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+t>68?n-1:n)+t)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond","\\d\\d",function(t){return 10*+t}],SSS:["millisecond","\\d{3}"],d:D,dd:D,ddd:Y,dddd:Y,MMM:["month",e,u("monthNamesShort")],MMMM:["month",e,u("monthNames")],a:p,A:p,ZZ:y,Z:y},v={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},H=function(t){return a(v,t)},b=function(t,e,o){if(void 0===e&&(e=v.default),void 0===o&&(o={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var u=[];e=(e=v[e]||e).replace(r,function(t,n){return u.push(n),"@@@"});var i=a(a({},m),o);return(e=e.replace(n,function(n){return g[n](t,i)})).replace(/@@@/g,function(){return u.shift()})};function w(t,e,o){if(void 0===o&&(o={}),"string"!=typeof e)throw new Error("Invalid format in fecha parse");if(e=v[e]||e,t.length>1e3)return null;var u={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],d=[],s=e.replace(r,function(t,n){return d.push(l(n)),"@@@"}),f={},c={};s=l(s).replace(n,function(t){var n=S[t],e=n[0],r=n[1],o=n[3];if(f[e])throw new Error("Invalid format. "+e+" specified twice in format");return f[e]=!0,o&&(c[o]=!0),i.push(n),"("+r+")"}),Object.keys(c).forEach(function(t){if(!f[t])throw new Error("Invalid format. "+t+" is required in specified format")}),s=s.replace(/@@@/g,function(){return d.shift()});var h=t.match(new RegExp(s,"i"));if(!h)return null;for(var g=a(a({},m),o),M=1;M'+this$1.lang('day-names-short')[(1+i)%7]+'';} return week;} for(var i$1=0;i$1<7;i$1++){week+=''+this$1.lang('day-names-short')[i$1]+'';} return week;};HotelDatepicker.prototype.getMonthDom=function getMonthDom(month){return document.getElementById(this.getMonthTableId(month));};HotelDatepicker.prototype.getMonthName=function getMonthName(m){return this.lang('month-names')[m];};HotelDatepicker.prototype.getDatepickerId=function getDatepickerId(){return'datepicker-'+this.generateId();};HotelDatepicker.prototype.getMonthTableId=function getMonthTableId(month){return'month-'+month+'-'+this.generateId();};HotelDatepicker.prototype.getCloseButtonId=function getCloseButtonId(){return'close-'+this.generateId();};HotelDatepicker.prototype.getTooltipId=function getTooltipId(){return'tooltip-'+this.generateId();};HotelDatepicker.prototype.getNextMonth=function getNextMonth(month){var _m=new Date(month.valueOf());return new Date(_m.setMonth(_m.getMonth()+1,1));};HotelDatepicker.prototype.getPrevMonth=function getPrevMonth(month){var _m=new Date(month.valueOf());return new Date(_m.setMonth(_m.getMonth()-1,1));};HotelDatepicker.prototype.getDateString=function getDateString(date,format){if(format===void 0)format=this.format;this.setFechaI18n();return fecha.format(date,format);};HotelDatepicker.prototype.parseDate=function parseDate(date,format){if(format===void 0)format=this.format;this.setFechaI18n();return fecha.parse(date,format);};HotelDatepicker.prototype.init=function init(){this.parent=this.container?this.container:this.input.parentElement;this.start=false;this.end=false;this.minDays=this.minNights>1?this.minNights+1:2;this.maxDays=this.maxNights>0?this.maxNights+1:0;if(this.startDate&&typeof this.startDate==='string'){this.startDate=this.parseDate(this.startDate);} if(this.endDate&&typeof this.endDate==='string'){this.endDate=this.parseDate(this.endDate);} if(this.isTouchDevice()){this.hoveringTooltip=false;} this.isOpen=false;this.changed=false;this.createDom();var defaultTime=new Date();if(this.startDate&&this.compareMonth(defaultTime,this.startDate)<0){defaultTime=new Date(this.startDate.getTime());} if(this.endDate&&this.compareMonth(this.getNextMonth(defaultTime),this.endDate)>0){defaultTime=new Date(this.getPrevMonth(this.endDate.getTime()));} if(this.disabledDates.length>0){this.parseDisabledDates();} this.showMonth(defaultTime,1);this.showMonth(this.getNextMonth(defaultTime),2);this.topBarDefaultText();this.addListeners();this.isFirstDisabledDate=0;};HotelDatepicker.prototype.addListeners=function addListeners(){var this$1=this;var nextButtons=this.datepicker.getElementsByClassName('datepicker__month-button--next');for(var i=0;i