﻿(()=>{"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 c.reduceRight(((e,t)=>a=>t(a,e)),(e=>{let n,r,{url:c,path:o,endpoint:s,headers:i,body:l,data:p,...d}=e;"string"==typeof s&&(n=a.replace(/^\/|\/$/g,""),r=s.replace(/^\//,""),o=r?n+"/"+r:n),"string"==typeof o&&(-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),c=t+o),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(c||o||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)},c=[];function o(e,t={}){const{target:a,scope:r=e,...c}=t;if(void 0===e.wpcf7?.schema)return;const o={...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(o,d,t);for(const t of p){if(void 0===t.dataset.name)continue;const c=t.dataset.name;if(n.has(c)){const{error:t,validInputs:a}=n.get(c);i(e,c),void 0!==t&&s(e,c,t,{scope:r}),l(e,c,null!=a?a:[])}if(t.contains(a))break}}})).finally((()=>{n(e,f)}))}r.use=e=>{c.unshift(e)};const s=(e,t,a,n)=>{const{scope:r=e,...c}=null!=n?n:{},o=`${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",o),s&&s.id?t.insertAdjacentHTML("beforeend",`<a href="#${s.id}">${a}</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",o),"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 c=new FormData(e);t.submitter&&t.submitter.name&&c.append(t.submitter.name,t.submitter.value);const 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(c,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:c};r({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((t=>{const r=n(e,t.status);return o.status=t.status,o.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(r)?a(e,r,o):["sent","failed"].includes(r)&&a(e,`mail${r}`,o),a(e,"submit",o),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),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(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:c}}).then((t=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,n(e,"mail_sent")):n(e,"init"),c.apiResponse=t,a(e,"reset",c)})).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",'<span class="wpcf7-spinner"></span>')})),(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")),c=t(e.getAttribute("data-minimum-value")),o=e.classList.contains("down")?n-a.value.trim().length:a.value.trim().length;e.setAttribute("data-current-value",o),e.innerText=o,r&&r<a.value.length?e.classList.add("too-long"):e.classList.remove("too-long"),c&&a.value.length<c?e.classList.add("too-short"):e.classList.remove("too-short")},n=t=>{t={init:!1,...t},e.querySelectorAll(".wpcf7-character-count").forEach((n=>{const r=n.getAttribute("data-target-name"),c=e.querySelector(`[name="${r}"]`);c&&(c.value=c.defaultValue,a(n,c),t.init&&c.addEventListener("keyup",(e=>{a(n,c)})))}))};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:o,schemas:new Map,...null!==(a=wpcf7)&&void 0!==a?a:{}},document.querySelectorAll("form .wpcf7[data-wpcf7-id]").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.")}))})();
jQuery(function(t){if("undefined"==typeof wc_add_to_cart_params)return!1;var a=function(){this.requests=[],this.addRequest=this.addRequest.bind(this),this.run=this.run.bind(this),this.$liveRegion=this.createLiveRegion(),t(document.body).on("click",".add_to_cart_button:not(.wc-interactive)",{addToCartHandler:this},this.onAddToCart).on("keydown",".add_to_cart_button:not(.wc-interactive)",{addToCartHandler:this},t=>{" "===t.key&&(t.preventDefault(),t.target.click())}).on("click",".remove_from_cart_button",{addToCartHandler:this},this.onRemoveFromCart).on("keydown",".remove_from_cart_button",this.onKeydownRemoveFromCart).on("added_to_cart",{addToCartHandler:this},this.onAddedToCart).on("removed_from_cart",{addToCartHandler:this},this.onRemovedFromCart).on("ajax_request_not_sent.adding_to_cart",this.updateButton)};a.prototype.addRequest=function(t){this.requests.push(t),1===this.requests.length&&this.run()},a.prototype.run=function(){var a=this,e=a.requests[0].complete;a.requests[0].complete=function(){"function"==typeof e&&e(),a.requests.shift(),a.requests.length>0&&a.run()},t.ajax(this.requests[0])},a.prototype.onAddToCart=function(a){var e=t(this);if(e.is(".ajax_add_to_cart")){if(!e.attr("data-product_id"))return!0;if(a.data.addToCartHandler.$liveRegion.text("").removeAttr("aria-relevant"),a.preventDefault(),e.removeClass("added"),e.addClass("loading"),!1===t(document.body).triggerHandler("should_send_ajax_request.adding_to_cart",[e]))return t(document.body).trigger("ajax_request_not_sent.adding_to_cart",[!1,!1,e]),!0;var r={};t.each(e.data(),function(t,a){r[t]=a}),t.each(e[0].dataset,function(t,a){r[t]=a}),t(document.body).trigger("adding_to_cart",[e,r]),a.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),data:r,success:function(a){a&&(a.error&&a.product_url?window.location=a.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?t(document.body).trigger("added_to_cart",[a.fragments,a.cart_hash,e]):window.location=wc_add_to_cart_params.cart_url)},dataType:"json"})}},a.prototype.onRemoveFromCart=function(a){var e=t(this),r=e.closest(".woocommerce-mini-cart-item");a.data.addToCartHandler.$liveRegion.text("").removeAttr("aria-relevant"),a.preventDefault(),r.block({message:null,overlayCSS:{opacity:.6}}),a.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),data:{cart_item_key:e.data("cart_item_key")},success:function(a){a&&a.fragments?t(document.body).trigger("removed_from_cart",[a.fragments,a.cart_hash,e]):window.location=e.attr("href")},error:function(){window.location=e.attr("href")},dataType:"json"})},a.prototype.onKeydownRemoveFromCart=function(a){" "===a.key&&(a.preventDefault(),t(this).trigger("click"))},a.prototype.updateButton=function(a,e,r,o){if(o=void 0!==o&&o){if(o.removeClass("loading"),e&&o.addClass("added"),e&&!wc_add_to_cart_params.is_cart&&0===o.parent().find(".added_to_cart").length){var d=document.createElement("a");d.href=wc_add_to_cart_params.cart_url,d.className="added_to_cart wc-forward",d.title=wc_add_to_cart_params.i18n_view_cart,d.textContent=wc_add_to_cart_params.i18n_view_cart,o.after(d)}t(document.body).trigger("wc_cart_button_updated",[o])}},a.prototype.updateFragments=function(a,e){e&&(t.each(e,function(a){t(a).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),t.each(e,function(a,e){t(a).replaceWith(e),t(a).stop(!0).css("opacity","1").unblock()}),t(document.body).trigger("wc_fragments_loaded"))},a.prototype.alertCartUpdated=function(t,a,e,r){if(r=void 0!==r&&r){var o=r.data("success_message");if(!o)return;t.data.addToCartHandler.$liveRegion.delay(1e3).text(o).attr("aria-relevant","all")}},a.prototype.createLiveRegion=function(){var a=t(".widget_shopping_cart_live_region");return a.length?a:t('<div class="widget_shopping_cart_live_region screen-reader-text" role="status"></div>').appendTo("body")},a.prototype.onAddedToCart=function(t,a,e,r){t.data.addToCartHandler.updateButton(t,a,e,r),t.data.addToCartHandler.updateFragments(t,a),t.data.addToCartHandler.alertCartUpdated(t,a,e,r)},a.prototype.onRemovedFromCart=function(t,a,e,r){t.data.addToCartHandler.updateFragments(t,a),t.data.addToCartHandler.alertCartUpdated(t,a,e,r)},new a});
var AwsHooks=AwsHooks||{};AwsHooks.filters=AwsHooks.filters||{};(function($){"use strict";var selector=".aws-container";var instance=0;var pluginPfx="aws_opts";var translate={sale:aws_vars.sale,sku:aws_vars.sku,showmore:aws_vars.showmore,noresults:aws_vars.noresults};var awsData=new Array;AwsHooks.add_filter=function(tag,callback,priority){if(typeof priority==="undefined"){priority=10}AwsHooks.filters[tag]=AwsHooks.filters[tag]||[];AwsHooks.filters[tag].push({priority:priority,callback:callback})};AwsHooks.apply_filters=function(tag,value,options){var filters=[];if(typeof AwsHooks.filters[tag]!=="undefined"&&AwsHooks.filters[tag].length>0){AwsHooks.filters[tag].forEach(function(hook){filters[hook.priority]=filters[hook.priority]||[];filters[hook.priority].push(hook.callback)});filters.forEach(function(AwsHooks){AwsHooks.forEach(function(callback){value=callback(value,options)})})}return value};$.fn.aws_search=function(options){var methods={init:function(){var appendResultsTo=AwsHooks.apply_filters("aws_results_append_to","body",{instance:instance,form:self,data:d});$(appendResultsTo).append('<div id="aws-search-result-'+instance+'" class="aws-search-result" style="display: none;"></div>');methods.addClasses();setTimeout(function(){methods.resultLayout()},500)},onKeyup:function(e){searchFor=$searchField.val();searchFor=searchFor.trim();searchFor=searchFor.replace(/<>\{\}\[\]\\\/]/gi,"");searchFor=searchFor.replace(/\s\s+/g," ");for(var i=0;i<requests.length;i++){requests[i].abort()}methods.searchRequest()},searchRequest:function(){if(!d.ajaxSearch){if(searchFor!==""){methods.showResultsBlock()}return}if(searchFor===""){$(d.resultBlock).html("").hide();methods.hideLoader();methods.resultsHide();return}if(cachedResponse.hasOwnProperty(searchFor)){methods.showResults(cachedResponse[searchFor]);return}if(searchFor.length<d.minChars){$(d.resultBlock).html("");methods.hideLoader();return}if(d.showLoader){methods.showLoader()}var searchTimeout=d.searchTimeout>100?d.searchTimeout:300;clearTimeout(keyupTimeout);keyupTimeout=setTimeout(function(){methods.ajaxRequest()},searchTimeout)},ajaxRequest:function(){var data={action:"aws_action",keyword:searchFor,aws_page:d.pageId,aws_tax:d.tax,lang:d.lang,pageurl:window.location.href,typedata:"json"};data=AwsHooks.apply_filters("aws_ajax_request_params",data,{instance:instance,form:self,data:d});ajaxUrl=AwsHooks.apply_filters("aws_ajax_request_url",ajaxUrl,{instance:instance,form:self,data:d,ajaxData:data});requests.push($.ajax({type:"POST",url:ajaxUrl,data:data,dataType:"json",success:function(response){methods.showResults(response);methods.showResultsBlock();cachedResponse[searchFor]=response},error:function(jqXHR,textStatus,errorThrown){console.log("Request failed: "+textStatus);methods.hideLoader()}}))},showResults:function(response){var resultNum=0;var taxName="";var html="<ul>";if(typeof response.data!=="undefined"){if(typeof response.data.top_text!=="undefined"&&response.data.top_text){html+='<div class="aws_top_text">'+response.data.top_text+"</div>"}if(typeof response.data.notices!=="undefined"){$.each(response.data.notices,function(i,notice){html+='<div class="aws_top_text">'+notice+"</div>"})}if(typeof response.data.top_results!=="undefined"){$.each(response.data.top_results,function(i,topResults){var topResultsName=i;if(typeof topResults!=="undefined"&&topResults.length>0){$.each(topResults,function(i,topResult){var linkData=typeof topResult.link_data!=="undefined"?topResult.link_data:"";html+='<li class="aws_result_item aws_result_top_custom_item aws_result_top_custom_item_'+topResultsName+'" style="position:relative;">';html+='<div class="aws_result_link">';html+='<a class="aws_result_link_top" '+linkData+' href="'+topResult.link+'">'+topResult.name+"</a>";html+='<span class="aws_result_content">';html+='<span class="aws_result_title">';if(typeof taxitem.heading!=="undefined"&&taxitem.heading){html+='<span class="aws_result_heading">'+taxitem.heading+"</span>"}html+=topResult.name;html+="</span>";if(typeof topResult.content!=="undefined"&&topResult.content){html+='<span class="aws_result_excerpt">'+topResult.content+"</span>"}html+="</span>";html+="</div>";html+="</li>"})}})}}if(typeof response.tax!=="undefined"){$.each(response.tax,function(i,taxes){taxName=i;if(typeof taxes!=="undefined"&&taxes.length>0){$.each(taxes,function(i,taxitem){resultNum++;html+='<li class="aws_result_item aws_result_tag aws_result_tax_'+taxName+'" style="position:relative;">';html+='<div class="aws_result_link">';html+='<a class="aws_result_link_top" href="'+taxitem.link+'">'+taxitem.name+"</a>";html+='<span class="aws_result_content">';html+='<span class="aws_result_title">';if(typeof taxitem.heading!=="undefined"&&taxitem.heading){html+='<span class="aws_result_heading">'+taxitem.heading+"</span>"}html+=taxitem.name;if(taxitem.count){html+='<span class="aws_result_count">&nbsp;('+taxitem.count+")</span>"}if(typeof taxitem.hierarchy!=="undefined"&&taxitem.hierarchy){html+='<span class="aws_result_hierarchy">'+taxitem.hierarchy+"</span>"}html+="</span>";if(typeof taxitem.excerpt!=="undefined"&&taxitem.excerpt){html+='<span class="aws_result_excerpt">'+taxitem.excerpt+"</span>"}html+="</span>";html+="</div>";html+="</li>"})}})}if(typeof response.products!=="undefined"&&response.products.length>0){$.each(response.products,function(i,result){resultNum++;html+='<li class="aws_result_item" style="position:relative;">';html+='<div class="aws_result_link">';html+='<a class="aws_result_link_top" href="'+result.link+'">'+result.title.replace(/(<[\s\S]*>)/gm,"")+"</a>";if(result.image){html+='<span class="aws_result_image">';html+='<img src="'+result.image+'">';html+="</span>"}html+='<span class="aws_result_content">';html+='<span class="aws_result_title">';html+=result.title;if(result.featured){html+='<span class="aws_result_featured" title="Featured"><svg version="1.1" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd" stroke="none" stroke-width="1"><g transform="translate(-296.000000, -422.000000)"><g transform="translate(296.000000, 422.500000)"><path d="M10,15.273 L16.18,19 L14.545,11.971 L20,7.244 L12.809,6.627 L10,0 L7.191,6.627 L0,7.244 L5.455,11.971 L3.82,19 L10,15.273 Z"/></g></g></g></svg></span>'}html+="</span>";if(result.stock_status){var statusClass=result.stock_status.status?"in":"out";html+='<span class="aws_result_stock '+statusClass+'">';html+=result.stock_status.text;html+="</span>"}if(result.sku){html+='<span class="aws_result_sku">'+translate.sku+result.sku+"</span>"}if(result.excerpt){html+='<span class="aws_result_excerpt">'+result.excerpt+"</span>"}if(result.price){html+='<span class="aws_result_price">'+result.price+"</span>"}html+="</span>";if(result.on_sale){html+='<span class="aws_result_sale">';html+='<span class="aws_onsale">'+translate.sale+"</span>";html+="</span>"}html+="</div>";html+="</li>"});if(d.showMore&&d.showPage){html+='<li class="aws_result_item aws_search_more"><a href="#">'+translate.showmore+"</a></li>"}}if(!resultNum){methods.createAndDispatchEvent(document,"awsNoResults",{term:searchFor,instance:instance,form:self,data:d});html+='<li class="aws_result_item aws_no_result">'+translate.noresults+"</li>"}html+="</ul>";html=AwsHooks.apply_filters("aws_results_html",html,{response:response,data:d,translate:translate});methods.hideLoader();$(d.resultBlock).html(html);methods.showResultsBlock();if(eShowResults){self[0].dispatchEvent(eShowResults)}if(!cachedResponse.hasOwnProperty(searchFor)){methods.analytics(searchFor,false,resultNum!==0)}},showResultsBlock:function(){methods.resultLayout();methods.resultsShow()},showLoader:function(){$searchForm.addClass("aws-processing")},hideLoader:function(){$searchForm.removeClass("aws-processing")},resultsShow:function(){$(d.resultBlock).show();$searchForm.addClass("aws-form-active")},resultsHide:function(){$(d.resultBlock).hide();$searchForm.removeClass("aws-form-active")},onFocus:function(event){var show=AwsHooks.apply_filters("aws_show_modal_layout",false,{instance:instance,form:self,data:d});if(!$("body").hasClass("aws-overlay")&&(methods.isMobile()&&d.mobileScreen&&!methods.isFixed()||show)){methods.showMobileLayout()}if(searchFor!==""){methods.showResultsBlock()}},hideResults:function(event){if(!$(event.target).closest(".aws-container").length&&!$(event.target).closest(self).length&&!$(event.target).closest(d.resultBlock).length){methods.resultsHide()}},isResultsVisible:function(){return $(d.resultBlock).is(":visible")},removeHovered:function(){$(d.resultBlock).find(".aws_result_item").removeClass("hovered")},resultLayout:function(){var $resultsBlock=$(d.resultBlock);var offset=self.offset();var bodyOffset=$("body").offset();var bodyPosition=$("body").css("position");var bodyHeight=$(document).height();var resultsHeight=$resultsBlock.height();var forcePosition=AwsHooks.apply_filters("aws_results_force_position",false,{resultsBlock:$resultsBlock,form:self});if(offset&&bodyOffset){var styles={width:self.outerWidth(),top:0,left:0};if(bodyPosition==="relative"||bodyPosition==="absolute"||bodyPosition==="fixed"){styles.top=offset.top+$(self).innerHeight()-bodyOffset.top;styles.left=offset.left-bodyOffset.left}else{styles.top=offset.top+$(self).innerHeight();styles.left=offset.left}if(bodyHeight-offset.top<500&&!forcePosition||forcePosition&&forcePosition=="top"){resultsHeight=methods.getResultsBlockHeight();if(bodyHeight-offset.top<resultsHeight&&offset.top>=resultsHeight||forcePosition){styles.top=styles.top-resultsHeight-$(self).innerHeight()}}styles=AwsHooks.apply_filters("aws_results_layout",styles,{resultsBlock:$resultsBlock,form:self});$resultsBlock.css(styles)}},getResultsBlockHeight:function(){var $resultsBlock=$(d.resultBlock);var resultsHeight=$resultsBlock.height();if(resultsHeight===0){var copied_elem=$resultsBlock.clone().attr("id",false).css({visibility:"hidden",display:"block",position:"absolute"});$("body").append(copied_elem);resultsHeight=copied_elem.height();copied_elem.remove()}return resultsHeight},forceNewSearch:function(term,submit){if(term&&term!==""){$searchField.val(term);searchFor=term;window.setTimeout(function(){methods.searchRequest();$searchField.focus();if(submit||!d.ajaxSearch){$searchForm.submit()}},50)}},showMobileLayout:function(){self.after('<div class="aws-placement-container"></div>');self.addClass("aws-mobile-fixed").prepend('<div class="aws-mobile-fixed-close"><svg width="17" height="17" viewBox="1.5 1.5 21 21"><path d="M22.182 3.856c.522-.554.306-1.394-.234-1.938-.54-.543-1.433-.523-1.826-.135C19.73 2.17 11.955 10 11.955 10S4.225 2.154 3.79 1.783c-.438-.371-1.277-.4-1.81.135-.533.537-.628 1.513-.25 1.938.377.424 8.166 8.218 8.166 8.218s-7.85 7.864-8.166 8.219c-.317.354-.34 1.335.25 1.805.59.47 1.24.455 1.81 0 .568-.456 8.166-7.951 8.166-7.951l8.167 7.86c.747.72 1.504.563 1.96.09.456-.471.609-1.268.1-1.804-.508-.537-8.167-8.219-8.167-8.219s7.645-7.665 8.167-8.218z"></path></svg></div>');$("body").addClass("aws-overlay").append('<div class="aws-overlay-mask"></div>').append(self);$searchField.focus()},hideMobileLayout:function(){$(".aws-placement-container").after(self).remove();self.removeClass("aws-mobile-fixed");$("body").removeClass("aws-overlay");$(".aws-mobile-fixed-close").remove();$(".aws-overlay-mask").remove()},isFixed:function(){var $checkElements=self.add(self.parents());var isFixed=false;$checkElements.each(function(){if($(this).css("position")==="fixed"){isFixed=true;return false}});return isFixed},getUrlParam:function(name){const url=new URL(window.location.href);return url.searchParams.get(name)},analytics:function(label,submit,hasResults){methods.createAndDispatchEvent(document,"awsAnalytics",{term:label,instance:instance,form:self,data:d});if(d.useAnalytics){try{var sPage=submit?"":"/?s="+encodeURIComponent("ajax-search:"+label);var tagF=false;if(typeof gtag!=="undefined"&&gtag!==null){tagF=gtag}else if(typeof window.dataLayer!=="undefined"&&window.dataLayer!==null){tagF=function(){window.dataLayer.push(arguments)}}if(tagF){tagF("event","AWS search",{event_label:label,event_category:"AWS Search Term",transport_type:"beacon"});tagF("event","aws_search",{aws_search_term:label,aws_has_results:hasResults});if(hasResults===false){tagF("event","aws_search_no_results",{aws_search_term:label,event_label:label})}if(sPage){tagF("event","page_view",{page_path:sPage,page_title:"AWS search"})}}if(typeof ga!=="undefined"&&ga!==null){ga("send","event","AWS search","AWS Search Term",label);if(hasResults===false){ga("send","event","AWS search no results","AWS Search Term",label)}if(sPage){ga("send","pageview",sPage)}}if(typeof pageTracker!=="undefined"&&pageTracker!==null){if(sPage){pageTracker._trackPageview(sPage)}pageTracker._trackEvent("AWS search","AWS search","AWS Search Term",label);if(hasResults===false){pageTracker._trackEvent("AWS search no results","AWS search no results","AWS Search Term",label)}}if(typeof _gaq!=="undefined"&&_gaq!==null){_gaq.push(["_trackEvent","AWS search","AWS Search Term",label]);if(hasResults===false){_gaq.push(["_trackEvent","AWS search no results","AWS Search Term",label])}if(sPage){_gaq.push(["_trackPageview",sPage])}}if(typeof __gaTracker!=="undefined"&&__gaTracker!==null){__gaTracker("send","event","AWS search","AWS Search Term",label);if(sPage){__gaTracker("send","pageview",sPage)}if(hasResults===false){__gaTracker("send","event","AWS search no results","AWS Search Term",label)}}}catch(error){}}},addClasses:function(){if(methods.isMobile()||d.showClear){$searchForm.addClass("aws-show-clear")}},isMobile:function(){var check=false;(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check=true})(navigator.userAgent||navigator.vendor||window.opera);return check},createCustomEvent:function(event,params){var customEvent=false;params=params||null;if(typeof window.CustomEvent==="function"){customEvent=new CustomEvent(event,{bubbles:true,cancelable:true,detail:params})}else if(document.createEvent){customEvent=document.createEvent("CustomEvent");customEvent.initCustomEvent(event,true,true,params)}return customEvent},createAndDispatchEvent:function(obj,event,params){var customEvent=methods.createCustomEvent(event,params);if(customEvent){obj.dispatchEvent(customEvent)}}};var self=$(this),$searchForm=self.find(".aws-search-form"),$searchField=self.find(".aws-search-field"),$searchButton=self.find(".aws-search-btn"),haveResults=false,eShowResults=false,requests=Array(),searchFor="",keyupTimeout,cachedResponse=new Array;var ajaxUrl=self.data("url")!==undefined?self.data("url"):false;if(document.createEvent){eShowResults=document.createEvent("Event");eShowResults.initEvent("awsShowingResults",true,true);eShowResults.eventName="awsShowingResults"}if(options==="relayout"){var d=self.data(pluginPfx);methods.resultLayout();return}instance++;self.data(pluginPfx,{minChars:self.data("min-chars")!==undefined?self.data("min-chars"):1,lang:self.data("lang")!==undefined?self.data("lang"):false,showLoader:self.data("show-loader")!==undefined?self.data("show-loader"):true,showMore:self.data("show-more")!==undefined?self.data("show-more"):true,ajaxSearch:self.data("ajax-search")!==undefined?self.data("ajax-search"):true,showPage:self.data("show-page")!==undefined?self.data("show-page"):true,showClear:self.data("show-clear")!==undefined?self.data("show-clear"):false,mobileScreen:self.data("mobile-screen")!==undefined?self.data("mobile-screen"):false,useAnalytics:self.data("use-analytics")!==undefined?self.data("use-analytics"):false,searchTimeout:self.data("timeout")!==undefined?parseInt(self.data("timeout")):300,instance:instance,resultBlock:"#aws-search-result-"+instance,pageId:self.data("page-id")!==undefined?self.data("page-id"):0,tax:self.data("tax")!==undefined?self.data("tax"):0});var d=self.data(pluginPfx);methods.createAndDispatchEvent(document,"awsLoaded",{instance:instance,form:self,data:d});if($searchForm.length>0){methods.init.call(this)}$searchField.on("keyup input",function(e){if(e.keyCode!=40&&e.keyCode!=38){methods.onKeyup(e)}});$searchField.on("focus",function(e){$searchForm.addClass("aws-focus");methods.onFocus(e)});$searchField.on("focusout",function(e){$searchForm.removeClass("aws-focus")});$searchField.on("aws_search_force",function(e,term){methods.forceNewSearch(term,false)});$searchForm.on("keypress",function(e){if(e.keyCode==13&&(!d.showPage||$searchField.val()==="")){e.preventDefault()}});$searchButton.on("click",function(e){if(d.showPage&&$searchField.val()!==""){$searchForm.submit()}});$searchForm.find(".aws-search-clear").on("click",function(e){$searchField.val("");$searchField.focus();methods.resultsHide();$(d.resultBlock).html("");searchFor=""});var pageSearchQuery=window.location.search;if(pageSearchQuery.indexOf("type_aws=true")!==-1&&typeof awsData["pageEvent"]=="undefined"){if(!d.ajaxSearch){awsData["pageEvent"]=true;methods.analytics($searchField.val(),true,!$("body").hasClass("aws-no-results"))}}$(document).on("click",function(e){methods.hideResults(e)});$(window).on("resize",function(e){methods.resultLayout()});$(window).on("scroll",function(e){if($(d.resultBlock).css("display")=="block"){methods.resultLayout()}});$(d.resultBlock).on("mouseenter",".aws_result_item",function(){methods.removeHovered();$(this).addClass("hovered");$searchField.trigger("mouseenter")});$(d.resultBlock).on("mouseleave",".aws_result_item",function(){methods.removeHovered()});$(d.resultBlock).on("click",".aws_search_more",function(e){e.preventDefault();$searchForm.submit()});$(d.resultBlock).on("click","span[href], [data-link]",function(e){e.preventDefault();var link=$(this).data("link")?$(this).data("link"):$(this).attr("href");if(link===""||link==="#"){return}e.stopPropagation();if(link){window.location=link}});$(d.resultBlock).on("click","[data-aws-term-submit]",function(e){e.preventDefault();var term=$(this).data("aws-term-submit");var submit=$(this).data("aws-term-submit-form")?true:false;methods.forceNewSearch(term,submit)});$(self).on("click",".aws-mobile-fixed-close",function(e){methods.hideMobileLayout()});$(window).on("keydown",function(e){if(e.keyCode==40||e.keyCode==38){if(methods.isResultsVisible()){e.stopPropagation();e.preventDefault();var $item=$(d.resultBlock).find(".aws_result_item");var $hoveredItem=$(d.resultBlock).find(".aws_result_item.hovered");var $itemsList=$(d.resultBlock).find("ul");if(e.keyCode==40){if($hoveredItem.length>0){methods.removeHovered();$hoveredItem.next().addClass("hovered")}else{$item.first().addClass("hovered")}}if(e.keyCode==38){if($hoveredItem.length>0){methods.removeHovered();$hoveredItem.prev().addClass("hovered")}else{$item.last().addClass("hovered")}}var activeItemOffset=$(".aws_result_item.hovered").position();if(activeItemOffset){$itemsList.animate({scrollTop:activeItemOffset.top+$itemsList.scrollTop()},400)}}}})};var awsInit=false;var awsInitAttempts=0;setTimeout(function(){if(!awsInit){awsInitWhenReady()}},2e3);function awsInitWhenReady(){awsInitAttempts++;if(awsInit||awsInitAttempts>10){return}if(typeof $.fn.aws_search==="undefined"){setTimeout(awsInitWhenReady,1e3);return}awsInitForAll()}function awsInitForAll(){$(selector).each(function(){$(this).aws_search()});awsInit=true}$(document).ready(function(){awsInitForAll();$("[data-avia-search-tooltip]").on("click",function(){window.setTimeout(function(){$(selector).aws_search()},1e3)});var $filters_widget=$(".woocommerce.widget_layered_nav_filters");var searchQuery=window.location.search;if($filters_widget.length>0&&searchQuery){if(searchQuery.indexOf("type_aws=true")!==-1){var $filterLinks=$filters_widget.find("ul li.chosen a");if($filterLinks.length>0){var addQuery="&type_aws=true";$filterLinks.each(function(){var filterLink=$(this).attr("href");if(filterLink&&filterLink.indexOf("post_type=product")!==-1){$(this).attr("href",filterLink+addQuery)}})}}}$("[data-aws-term-submit]").on("click",function(e){e.preventDefault();var $btn=$(this);var term=$btn.data("aws-term-submit");var searchForm;if($btn.closest(".aws-search-result").length>0){return}if(term&&term!==""){if($btn.data("aws-selector")!=="undefined"){var selector=$btn.data("aws-selector");searchForm=$($btn.data("aws-selector"));if(searchForm.length>0&&!searchForm.hasClass("aws-search-form")){searchForm=searchForm.find(".aws-search-form")}}else if($btn.prev(".aws-container").length>0){searchForm=$btn.prev(".aws-container").find(".aws-search-form")}else if($btn.next(".aws-container").length>0){searchForm=$btn.next(".aws-container").find(".aws-search-form")}else if($btn.closest(".aws-container").length>0){searchForm=$btn.closest(".aws-container").find(".aws-search-form")}if(typeof searchForm==="undefined"||!searchForm.length>0){var parentCount=0;var parentElem;do{parentCount++;parentElem=typeof parentElem!=="undefined"?parentElem.parent():$btn.parent();searchForm=parentElem.find(".aws-search-form")}while(parentCount<4&&!searchForm.length>0);if((typeof searchForm==="undefined"||!searchForm.length>0)&&$(".aws-container:visible:first").length>0){searchForm=$(".aws-container:visible:first .aws-search-form")}}if(searchForm&&searchForm.length>0){var $searchField=searchForm.find(".aws-search-field");$searchField.trigger("aws_search_force",[term])}}})})})(jQuery);
(function($){
'use strict';
$(document).ready(function (){
$('body').on('adding_to_cart', function(event, $button){
if($button&&$button.hasClass('vc_gitem-link') ){
$button
.addClass('vc-gitem-add-to-cart-loading-btn')
.parents('.vc_grid-item-mini')
.addClass('vc-woocommerce-add-to-cart-loading')
.append($('<div class="vc_wc-load-add-to-loader-wrapper"><div class="vc_wc-load-add-to-loader"></div></div>') );
}}).on('added_to_cart', function(event, fragments, cart_hash, $button){
if('undefined'===typeof($button) ){
$button=$('.vc-gitem-add-to-cart-loading-btn');
}
if($button&&$button.hasClass('vc_gitem-link') ){
$button
.removeClass('vc-gitem-add-to-cart-loading-btn')
.parents('.vc_grid-item-mini')
.removeClass('vc-woocommerce-add-to-cart-loading')
.find('.vc_wc-load-add-to-loader-wrapper').remove();
}});
});
})(window.jQuery);
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports&&"function"==typeof require?require("jquery"):jQuery)}((function(e){"use strict";function t(n,o){var s=this;s.element=n,s.el=e(n),s.suggestions=[],s.badQueries=[],s.selectedIndex=-1,s.currentValue=s.element.value,s.timeoutId=null,s.cachedResponse={},s.onChangeTimeout=null,s.onChange=null,s.isLocal=!1,s.suggestionsContainer=null,s.noSuggestionsContainer=null,s.options=e.extend(!0,{},t.defaults,o),s.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},s.hint=null,s.hintValue="",s.selection=null,s.initialize(),s.setOptions(o)}var n={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t}},o=27,s=9,i=13,a=38,r=39,l=40,u=e.noop;t.utils=n,e.Autocomplete=t,t.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:function(e,t){if(!t)return e.value;var o="("+n.escapeRegExChars(t)+")";return e.value.replace(new RegExp(o,"gi"),"<strong>$1</strong>").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;(\/?strong)&gt;/g,"<$1>")},formatGroup:function(e,t){return'<div class="autocomplete-group">'+t+"</div>"},delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:u,onSearchComplete:u,onSearchError:u,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(e,t,n){return-1!==e.value.toLowerCase().indexOf(n)},paramName:"query",transformResult:function(e){return"string"==typeof e?JSON.parse(e):e},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1},t.prototype={initialize:function(){var n,o=this,s="."+o.classes.suggestion,i=o.classes.selected,a=o.options;o.element.setAttribute("autocomplete","off"),o.noSuggestionsContainer=e('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),o.suggestionsContainer=t.utils.createNode(a.containerClass),(n=e(o.suggestionsContainer)).appendTo(a.appendTo||"body"),"auto"!==a.width&&n.css("width",a.width),n.on("mouseover.autocomplete",s,(function(){o.activate(e(this).data("index"))})),n.on("mouseout.autocomplete",(function(){o.selectedIndex=-1,n.children("."+i).removeClass(i)})),n.on("click.autocomplete",s,(function(){o.select(e(this).data("index"))})),n.on("click.autocomplete",(function(){clearTimeout(o.blurTimeoutId)})),o.fixPositionCapture=function(){o.visible&&o.fixPosition()},e(window).on("resize.autocomplete",o.fixPositionCapture),o.el.on("keydown.autocomplete",(function(e){o.onKeyPress(e)})),o.el.on("keyup.autocomplete",(function(e){o.onKeyUp(e)})),o.el.on("blur.autocomplete",(function(){o.onBlur()})),o.el.on("focus.autocomplete",(function(){o.onFocus()})),o.el.on("change.autocomplete",(function(e){o.onKeyUp(e)})),o.el.on("input.autocomplete",(function(e){o.onKeyUp(e)}))},onFocus:function(){var e=this;e.fixPosition(),e.el.val().length>=e.options.minChars&&e.onValueChange()},onBlur:function(){var e=this;e.blurTimeoutId=setTimeout((function(){e.hide()}),200)},abortAjax:function(){var e=this;e.currentRequest&&(e.currentRequest.abort(),e.currentRequest=null)},setOptions:function(t){var n=this,o=e.extend({},n.options,t);n.isLocal=Array.isArray(o.lookup),n.isLocal&&(o.lookup=n.verifySuggestionsFormat(o.lookup)),o.orientation=n.validateOrientation(o.orientation,"bottom"),e(n.suggestionsContainer).css({"max-height":o.maxHeight+"px",width:o.width+"px","z-index":o.zIndex}),this.options=o},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var e=this;e.disabled=!0,clearTimeout(e.onChangeTimeout),e.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this,n=e(t.suggestionsContainer),o=n.parent().get(0);if(o===document.body||t.options.forceFixPosition){var s=t.options.orientation,i=n.outerHeight(),a=t.el.outerHeight(),r=t.el.offset(),l={top:r.top,left:r.left};if("auto"===s){var u=e(window).height(),c=e(window).scrollTop(),g=-c+r.top-i,p=c+u-(r.top+a+i);s=Math.max(g,p)===g?"top":"bottom"}if(l.top+="top"===s?-i:a,o!==document.body){var d,h=n.css("opacity");t.visible||n.css("opacity",0).show(),d=n.offsetParent().offset(),l.top-=d.top,l.top+=o.scrollTop,l.left-=d.left,t.visible||n.css("opacity",h).hide()}"auto"===t.options.width&&(l.width=t.el.outerWidth()+"px"),n.css(l)}},isCursorAtEnd:function(){var e,t=this.el.val().length,n=this.element.selectionStart;return"number"==typeof n?n===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){var t=this;if(t.disabled||t.visible||e.which!==l||!t.currentValue){if(!t.disabled&&t.visible){switch(e.which){case o:t.el.val(t.currentValue),t.hide();break;case r:if(t.hint&&t.options.onHint&&t.isCursorAtEnd()){t.selectHint();break}return;case s:if(t.hint&&t.options.onHint)return void t.selectHint();if(-1===t.selectedIndex)return void t.hide();if(t.select(t.selectedIndex),!1===t.options.tabDisabled)return;break;case i:if(-1===t.selectedIndex)return void t.hide();t.select(t.selectedIndex);break;case a:t.moveUp();break;case l:t.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else t.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.which){case a:case l:return}clearTimeout(t.onChangeTimeout),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeTimeout=setTimeout((function(){t.onValueChange()}),t.options.deferRequestBy):t.onValueChange())}},onValueChange:function(){if(!this.ignoreValueChange){var t=this,n=t.options,o=t.el.val(),s=t.getQuery(o);return t.selection&&t.currentValue!==s&&(t.selection=null,(n.onInvalidateSelection||e.noop).call(t.element)),clearTimeout(t.onChangeTimeout),t.currentValue=o,t.selectedIndex=-1,n.triggerSelectOnValidInput&&t.isExactMatch(s)?void t.select(0):void(s.length<n.minChars?t.hide():t.getSuggestions(s))}this.ignoreValueChange=!1},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},getQuery:function(e){var t,n=this.options.delimiter;return n?(t=e.split(n))[t.length-1].trim():e},getSuggestionsLocal:function(t){var n,o=this.options,s=t.toLowerCase(),i=o.lookupFilter,a=parseInt(o.lookupLimit,10);return n={suggestions:e.grep(o.lookup,(function(e){return i(e,t,s)}))},a&&n.suggestions.length>a&&(n.suggestions=n.suggestions.slice(0,a)),n},getSuggestions:function(t){var n,o,s,i,a=this,r=a.options,l=r.serviceUrl;if(r.params[r.paramName]=t,!1!==r.onSearchStart.call(a.element,r.params)){if(o=r.ignoreParams?null:r.params,"function"==typeof r.lookup)return void r.lookup(t,(function(e){a.suggestions=e.suggestions,a.suggest(),r.onSearchComplete.call(a.element,t,e.suggestions)}));a.isLocal?n=a.getSuggestionsLocal(t):("function"==typeof l&&(l=l.call(a.element,t)),s=l+"?"+e.param(o||{}),n=a.cachedResponse[s]),n&&Array.isArray(n.suggestions)?(a.suggestions=n.suggestions,a.suggest(),r.onSearchComplete.call(a.element,t,n.suggestions)):a.isBadQuery(t)?r.onSearchComplete.call(a.element,t,[]):(a.abortAjax(),i={url:l,data:o,type:r.type,dataType:r.dataType},e.extend(i,r.ajaxSettings),a.currentRequest=e.ajax(i).done((function(e){var n;a.currentRequest=null,n=r.transformResult(e,t),a.processResponse(n,t,s),r.onSearchComplete.call(a.element,t,n.suggestions)})).fail((function(e,n,o){r.onSearchError.call(a.element,t,e,n,o)})))}},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,n=t.length;n--;)if(0===e.indexOf(t[n]))return!0;return!1},hide:function(){var t=this,n=e(t.suggestionsContainer);"function"==typeof t.options.onHide&&t.visible&&t.options.onHide.call(t.element,n),t.visible=!1,t.selectedIndex=-1,clearTimeout(t.onChangeTimeout),e(t.suggestionsContainer).hide(),t.signalHint(null)},suggest:function(){if(this.suggestions.length){var t,n=this,o=n.options,s=o.groupBy,i=o.formatResult,a=n.getQuery(n.currentValue),r=n.classes.suggestion,l=n.classes.selected,u=e(n.suggestionsContainer),c=e(n.noSuggestionsContainer),g=o.beforeRender,p="",d=function(e,n){var i=e.data[s];return t===i?"":(t=i,o.formatGroup(e,t))};return o.triggerSelectOnValidInput&&n.isExactMatch(a)?void n.select(0):(e.each(n.suggestions,(function(e,t){s&&(p+=d(t,0)),p+='<div class="'+r+'" data-index="'+e+'">'+i(t,a,e)+"</div>"})),this.adjustContainerWidth(),c.detach(),u.html(p),"function"==typeof g&&g.call(n.element,u,n.suggestions),n.fixPosition(),u.show(),o.autoSelectFirst&&(n.selectedIndex=0,u.scrollTop(0),u.children("."+r).first().addClass(l)),n.visible=!0,void n.findBestHint())}this.options.showNoSuggestionNotice?this.noSuggestions():this.hide()},noSuggestions:function(){var t=this,n=t.options.beforeRender,o=e(t.suggestionsContainer),s=e(t.noSuggestionsContainer);this.adjustContainerWidth(),s.detach(),o.empty(),o.append(s),"function"==typeof n&&n.call(t.element,o,t.suggestions),t.fixPosition(),o.show(),t.visible=!0},adjustContainerWidth:function(){var t,n=this,o=n.options,s=e(n.suggestionsContainer);"auto"===o.width?(t=n.el.outerWidth(),s.css("width",t>0?t:300)):"flex"===o.width&&s.css("width","")},findBestHint:function(){var t=this,n=t.el.val().toLowerCase(),o=null;n&&(e.each(t.suggestions,(function(e,t){var s=0===t.value.toLowerCase().indexOf(n);return s&&(o=t),!s})),t.signalHint(o))},signalHint:function(t){var n="",o=this;t&&(n=o.currentValue+t.value.substr(o.currentValue.length)),o.hintValue!==n&&(o.hintValue=n,o.hint=t,(this.options.onHint||e.noop)(n))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,(function(e){return{value:e,data:null}})):t},validateOrientation:function(t,n){return t=(t||"").trim().toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=n),t},processResponse:function(e,t,n){var o=this,s=o.options;e.suggestions=o.verifySuggestionsFormat(e.suggestions),s.noCache||(o.cachedResponse[n]=e,s.preventBadQueries&&!e.suggestions.length&&o.badQueries.push(t)),t===o.getQuery(o.currentValue)&&(o.suggestions=e.suggestions,o.suggest())},activate:function(t){var n,o=this,s=o.classes.selected,i=e(o.suggestionsContainer),a=i.find("."+o.classes.suggestion);return i.find("."+s).removeClass(s),o.selectedIndex=t,-1!==o.selectedIndex&&a.length>o.selectedIndex?(n=a.get(o.selectedIndex),e(n).addClass(s),n):null},selectHint:function(){var t=this,n=e.inArray(t.hint,t.suggestions);t.select(n)},select:function(e){this.hide(),this.onSelect(e)},moveUp:function(){var t=this;if(-1!==t.selectedIndex)return 0===t.selectedIndex?(e(t.suggestionsContainer).children("."+t.classes.suggestion).first().removeClass(t.classes.selected),t.selectedIndex=-1,t.ignoreValueChange=!1,t.el.val(t.currentValue),void t.findBestHint()):void t.adjustScroll(t.selectedIndex-1)},moveDown:function(){var e=this;e.selectedIndex!==e.suggestions.length-1&&e.adjustScroll(e.selectedIndex+1)},adjustScroll:function(t){var n=this,o=n.activate(t);if(o){var s,i,a,r=e(o).outerHeight();s=o.offsetTop,a=(i=e(n.suggestionsContainer).scrollTop())+n.options.maxHeight-r,s<i?e(n.suggestionsContainer).scrollTop(s):s>a&&e(n.suggestionsContainer).scrollTop(s-n.options.maxHeight+r),n.options.preserveInput||(n.ignoreValueChange=!0,n.el.val(n.getValue(n.suggestions[t].value))),n.signalHint(null)}},onSelect:function(e){var t=this,n=t.options.onSelect,o=t.suggestions[e];t.currentValue=t.getValue(o.value),t.currentValue===t.el.val()||t.options.preserveInput||t.el.val(t.currentValue),t.signalHint(null),t.suggestions=[],t.selection=o,"function"==typeof n&&n.call(t.element,o)},getValue:function(e){var t,n,o=this.options.delimiter;return o?1===(n=(t=this.currentValue).split(o)).length?e:t.substr(0,t.length-n[n.length-1].length)+e:e},dispose:function(){var t=this;t.el.off(".autocomplete").removeData("autocomplete"),e(window).off("resize.autocomplete",t.fixPositionCapture),e(t.suggestionsContainer).remove()}},e.fn.devbridgeAutocomplete=function(n,o){var s="autocomplete";return arguments.length?this.each((function(){var i=e(this),a=i.data(s);"string"==typeof n?a&&"function"==typeof a[n]&&a[n](o):(a&&a.dispose&&a.dispose(),a=new t(this,n),i.data(s,a))})):this.first().data(s)},e.fn.autocomplete||(e.fn.autocomplete=e.fn.devbridgeAutocomplete)})),jQuery(document).ready((function(e){"use strict";e(".searchform").each((function(){var t=e(this),n=t.find(".live-search-list"),o=t.find("#cat, #product_cat, #portfolio_cat"),s="undefined"!=typeof theme&&theme.ajax_url?theme.ajax_url:"undefined"!=typeof js_porto_vars&&js_porto_vars.ajax_url?js_porto_vars.ajax_url:ajaxurl,i=s+(-1===s.indexOf("?")?"?":"&")+"action=porto_ajax_search_posts&nonce="+porto_live_search.nonce,a="",r="";t.find('input[name="post_type"]').length&&t.find('input[name="post_type"]').val()&&(r="&post_type="+t.find('input[name="post_type"]').val(),i+=r),o.length&&(o.val()&&"0"!=o.val()&&(i+="&cat="+o.val()),o.on("change",(function(e){"object"==typeof a?(o.val()&&"0"!=o.val()?a.setOptions({serviceUrl:s+(-1===s.indexOf("?")?"?":"&")+"action=porto_ajax_search_posts&nonce="+porto_live_search.nonce+"&cat="+o.val()+r}):a.setOptions({serviceUrl:s+(-1===s.indexOf("?")?"?":"&")+"action=porto_ajax_search_posts&nonce="+porto_live_search.nonce+r}),a.hide(),a.onValueChange()):i=s+(-1===s.indexOf("?")?"?":"&")+"action=porto_ajax_search_posts&nonce="+porto_live_search.nonce+"&cat="+o.val()+r}))),t.find('input[type="text"]').on("focus keyup",(function(){var o=e(this);o.hasClass("porto-search-init")||o.closest("#side-nav-panel").length>0||(o.devbridgeAutocomplete({minChars:3,appendTo:n,triggerSelectOnValidInput:!1,serviceUrl:i,deferRequestBy:300,onSearchStart:function(){t.find("button").addClass("loading porto-ajax-loading").find(".porto-loading-icon").length||t.find("button").append('<span class="porto-loading-icon"></span>')},onSelect:function(e){-1!=e.id&&"undefined"!=typeof theme&&(window.location.href=e.url)},onHide:function(){n.removeClass("porto-opened")},onSearchComplete:function(){t.find("button").removeClass("loading").removeClass("porto-ajax-loading").find(".porto-loading-icon")},beforeRender:function(t){e(t).removeAttr("style")},formatResult:function(t,o){var s="("+e.Autocomplete.utils.escapeRegExChars(o)+")",i="";return t.img&&"undefined"!=typeof theme&&(i+='<img class="search-image" src="'+t.img+'">'),(t.sku||t.tag)&&(i+='<div class="search-info-wrap">'),i+='<div class="search-name">'+t.value.replace(new RegExp(s,"gi"),"<strong>$1</strong>")+"</div>",t.sku&&(i+='<div class="search-sku"><span>'+porto_live_search.sku+"</span>"+t.sku.replace(new RegExp(s,"gi"),"<strong>$1</strong>")+"</div>"),t.tag&&(i+='<div class="search-tag"><span>'+porto_live_search.product_tags+"</span>"+t.tag.replace(new RegExp(s,"gi"),"<strong>$1</strong>")+"</div>"),(t.sku||t.tag)&&(i+="</div>"),t.price&&"undefined"!=typeof theme&&(i+='<span class="search-price">'+t.price+"<span>"),n.addClass("porto-opened"),i}}),a=o.devbridgeAutocomplete(),o.addClass("porto-search-init"))}))}))}));
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}},{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)});
!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
document.addEventListener("DOMContentLoaded",(e=>{var t;wpcf7_recaptcha={...null!==(t=wpcf7_recaptcha)&&void 0!==t?t:{}};const c=wpcf7_recaptcha.sitekey,{homepage:n,contactform:a}=wpcf7_recaptcha.actions,o=e=>{const{action:t,func:n,params:a}=e;grecaptcha.execute(c,{action:t}).then((e=>{const c=new CustomEvent("wpcf7grecaptchaexecuted",{detail:{action:t,token:e}});document.dispatchEvent(c)})).then((()=>{"function"==typeof n&&n(...a)})).catch((e=>console.error(e)))};if(grecaptcha.ready((()=>{o({action:n})})),document.addEventListener("change",(e=>{o({action:a})})),"undefined"!=typeof wpcf7&&"function"==typeof wpcf7.submit){const e=wpcf7.submit;wpcf7.submit=(t,c={})=>{o({action:a,func:e,params:[t,c]})}}document.addEventListener("wpcf7grecaptchaexecuted",(e=>{const t=document.querySelectorAll('form.wpcf7-form input[name="_wpcf7_recaptcha_response"]');for(let c=0;c<t.length;c++)t[c].setAttribute("value",e.detail.token)}))}));
window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode&&"a"!==E.activeElement.tagName.toLowerCase())return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o<i;o++)(n=d[o]).addEventListener("touchstart",a),n.addEventListener("click",a)}}function l(e){var t,n,d=g(b.temporaryFormId);d&&h&&(g(b.parentIdFieldId).value="0",t=d.textContent,d.parentNode.replaceChild(h,d),this.style.display="none",n=(d=(d=g(b.commentReplyTitleId))&&d.firstChild)&&d.nextSibling,d&&d.nodeType===Node.TEXT_NODE&&t&&(n&&"A"===n.nodeName&&n.id!==b.cancelReplyId&&(n.style.display=""),d.textContent=t),e.preventDefault())}function a(e){var t=g(b.commentReplyTitleId),t=t&&t.firstChild.textContent,n=this,d=m(n,"belowelement"),o=m(n,"commentid"),i=m(n,"respondelement"),r=m(n,"postid"),n=m(n,"replyto")||t;d&&o&&i&&r&&!1===v.addComment.moveForm(d,o,i,r,n)&&e.preventDefault()}function o(e){for(var t=e.length;t--;)if(e[t].addedNodes.length)return void d()}function m(e,t){return n?e.dataset[t]:e.getAttribute("data-"+t)}function g(e){return E.getElementById(e)}return r&&"loading"!==E.readyState?t():r&&v.addEventListener("DOMContentLoaded",t,!1),{init:d,moveForm:function(e,t,n,d,o){var i,r,l,a,m,c,s,e=g(e),n=(h=g(n),g(b.parentIdFieldId)),y=g(b.postIdFieldId),p=g(b.commentReplyTitleId),u=(p=p&&p.firstChild)&&p.nextSibling;if(e&&h&&n){void 0===o&&(o=p&&p.textContent),a=h,m=b.temporaryFormId,c=g(m),s=(s=g(b.commentReplyTitleId))?s.firstChild.textContent:"",c||((c=E.createElement("div")).id=m,c.style.display="none",c.textContent=s,a.parentNode.insertBefore(c,a)),d&&y&&(y.value=d),n.value=t,I.style.display="",e.parentNode.insertBefore(h,e.nextSibling),p&&p.nodeType===Node.TEXT_NODE&&(u&&"A"===u.nodeName&&u.id!==b.cancelReplyId&&(u.style.display="none"),p.textContent=o),I.onclick=function(){return!1};try{for(var f=0;f<C.elements.length;f++)if(i=C.elements[f],r=!1,"getComputedStyle"in v?l=v.getComputedStyle(i):E.documentElement.currentStyle&&(l=i.currentStyle),(i.offsetWidth<=0&&i.offsetHeight<=0||"hidden"===l.visibility)&&(r=!0),"hidden"!==i.type&&!i.disabled&&!r){i.focus();break}}catch(e){}return!1}}}}(window);
document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",(()=>{for(var e=["-webkit-","-moz-","-ms-","-o-",""],t=0;t<e.length;t++)e[t]+"transform"in document.documentElement.style&&(document.documentElement.className+=" vc_transform ")})(),(c=>{"function"!=typeof window.vc_js&&(window.vc_js=function(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),vc_ttaToggleBehaviour(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}),"function"!=typeof window.vc_plugin_flexslider&&(window.vc_plugin_flexslider=function(e){(e?e.find(".wpb_flexslider"):jQuery(".wpb_flexslider")).each(function(){var e=jQuery(this),t=1e3*parseInt(e.attr("data-interval"),10),i=e.attr("data-flex_fx"),o=0==t?!1:!0;e.is(":visible")&&setTimeout(function(){e.flexslider({animation:i,slideshow:o,slideshowSpeed:t,sliderSpeed:800,smoothHeight:!0})},1)})}),"function"!=typeof window.vc_googleplus&&(window.vc_googleplus=function(){var e,t;0<jQuery(".wpb_googleplus").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/plusone.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_pinterest&&(window.vc_pinterest=function(){var e,t;0<jQuery(".wpb_pinterest").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://assets.pinterest.com/js/pinit.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_progress_bar&&(window.vc_progress_bar=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".vc_progress_bar").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.find(".vc_single_bar").each(function(e){var t=jQuery(this).find(".vc_bar"),i=t.data("percentage-value");setTimeout(function(){t.css({width:i+"%"})},200*e)})},{offset:"85%"})})}),"function"!=typeof window.vc_waypoints&&(window.vc_waypoints=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.addClass("wpb_start_animation animated")},{offset:"85%"})})}),"function"!=typeof window.vc_toggleBehaviour&&(window.vc_toggleBehaviour=function(e){function t(e){e&&e.preventDefault&&e.preventDefault();var t=jQuery(this).closest(".vc_toggle"),e=t.find(".vc_toggle_content");t.hasClass("vc_toggle_active")?e.slideUp({duration:300,complete:function(){t.removeClass("vc_toggle_active")}}):e.slideDown({duration:300,complete:function(){t.addClass("vc_toggle_active")}})}(e?e.hasClass("vc_toggle_title")?e.unbind("click"):e.find(".vc_toggle_title").off("click"):jQuery(".vc_toggle_title").off("click")).on("click",t)}),"function"!=typeof window.vc_ttaToggleBehaviour&&(window.vc_ttaToggleBehaviour=function(e){function t(){var e=jQuery(this);e.toggleClass("wpb-tta-toggle-active"),e.parent().parent().parent().find(".vc_pagination-item").each(function(){if(!c(this).hasClass("vc_active"))return c(this).find("a").click(),!1})}(e?e.find(".wpb-tta-toggle"):jQuery(".wpb-tta-toggle")).off("click").on("click",t),setTimeout(function(){jQuery(".wpb-tta-toggle").each(function(){var e=jQuery(this);e.parent().parent().parent().find(".vc_tta-panels-container .vc_pagination li:first").hasClass("vc_active")||e.addClass("wpb-tta-toggle-active")})},1e3)}),"function"!=typeof window.vc_tabsBehaviour&&(window.vc_tabsBehaviour=function(e){var t,o;jQuery.ui&&(e=e||jQuery(".wpb_tabs, .wpb_tour"),t=jQuery.ui&&jQuery.ui.version?jQuery.ui.version.split("."):"1.10",o=1===parseInt(t[0],10)&&parseInt(t[1],10)<9,e.each(function(){var e=jQuery(this).attr("data-interval"),t=[],i=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(e,t){wpb_prepare_tab_content(e,t)},activate:function(e,t){wpb_prepare_tab_content(e,t)}});if(e&&0<e)try{i.tabs("rotate",1e3*e)}catch(e){window.console&&window.console.warn&&console.warn("tabs behaviours error",e)}jQuery(this).find(".wpb_tab").each(function(){t.push(this.id)}),jQuery(this).find(".wpb_tabs_nav li").on("click",function(e){return e&&e.preventDefault&&e.preventDefault(),o?i.tabs("select",jQuery("a",this).attr("href")):i.tabs("option","active",jQuery(this).index()),!1}),jQuery(this).find(".wpb_prev_slide a, .wpb_next_slide a").on("click",function(e){var t;e&&e.preventDefault&&e.preventDefault(),o?(t=i.tabs("option","selected"),jQuery(this).parent().hasClass("wpb_next_slide")?t++:t--,t<0?t=i.tabs("length")-1:t>=i.tabs("length")&&(t=0),i.tabs("select",t)):(t=i.tabs("option","active"),e=i.find(".wpb_tab").length,t=jQuery(this).parent().hasClass("wpb_next_slide")?e<=t+1?0:t+1:t-1<0?e-1:t-1,i.tabs("option","active",t))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(){var e=jQuery(this),t=(e.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0<parseInt(e.data("active-tab"),10)&&parseInt(e.data("active-tab"),10)-1),i=!1===t||"yes"===e.data("collapsible"),t=e.find(".wpb_accordion_wrapper").accordion({header:"> div > h3",autoHeight:!1,heightStyle:"content",active:t,collapsible:i,navigation:!0,activate:vc_accordionActivate,change:function(e,t){void 0!==jQuery.fn.isotope&&t.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(t.newPanel)}});!0===e.data("vcDisableKeydown")&&(t.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var o={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var e=jQuery(this),t=e.find(".wpb_thumbnails"),i=t.attr("data-layout-mode");t.isotope({itemSelector:".isotope-item",layoutMode:void 0===o[i]?"fitRows":o[i]}),e.find(".categories_filter a").data("isotope",t).on("click",function(e){e&&e.preventDefault&&e.preventDefault();e=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),e.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).on("load resize",function(){t.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function(e){(e?e.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var e=jQuery(this);!0!==e.data("carousel_enabled")&&e.is(":visible")&&(e.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(e=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":e.css("margin-left"),"margin-left":0}),(e=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(e.width()+300))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(){var e,t,i=jQuery(this);i.hasClass("wpb_slider_nivo")?(0===(t=1e3*i.attr("data-interval"))&&(t=9999999999),jQuery.fn.nivoSlider&&!i.data("nivo-initialized")&&(i.data("nivo-initialized",!0),i.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:t,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"}))):i.hasClass("wpb_image_grid")&&i.find(".wpb_image_grid_ul")&&i.find(".wpb_image_grid_ul").isotope&&(jQuery.fn.imagesLoaded?e=i.find(".wpb_image_grid_ul").imagesLoaded(function(){e.isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0})}):i.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1<location.href.indexOf("#!prettyPhoto")&&(location.hash="")},social_tools:""})}catch(e){window.console&&window.console.warn&&window.console.warn("vc_prettyPhoto initialize error",e)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return window.console&&window.console.warn&&window.console.warn("function vc_google_fonts is deprecated, no need to use it"),!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){var s=window.jQuery;function e(){var e;void 0!==window.wpb_disable_full_width_row_js&&window.wpb_disable_full_width_row_js||(e=s('[data-vc-full-width="true"]'),s.each(e,function(){var e,t,i,o,n,a,r,c=s(this),d=(c.addClass("vc_hidden"),c.next(".vc_row-full-width"));(d=d.length?d:c.parent().next(".vc_row-full-width")).length&&(c.removeAttr("data-vc-full-width-temp"),e=parseInt(c.css("margin-left"),10),t=parseInt(c.css("margin-right"),10),i=0-d.offset().left-e,o=s(window).width(),n={position:"relative",left:i="rtl"===c.css("direction")?(i=i-d.width()+o)+e+t:i,"box-sizing":"border-box",width:o,"max-width":o},c.css(n),c.data("vcStretchContent")||("rtl"===c.css("direction")?((a=i)<0&&(a=0),(r=i)<0&&(r=0)):(r=o-(a=(a=-1*i)<0?0:a)-d.width()+e+t)<0&&(r=0),c.css({"padding-left":a+"px","padding-right":r+"px"})),c.attr("data-vc-full-width-init","true"),c.removeClass("vc_hidden"),s(document).trigger("vc-full-width-row-single",{el:c,offset:i,marginLeft:e,marginRight:t,elFull:d,width:o,maxWidth:o}))}),s(document).trigger("vc-full-width-row",e))}function t(){var e,t,i=s(".vc_row-o-full-height:first");i.length&&(e=s(window).height(),(t=i.offset().top)<e)&&i.css("min-height",100-t/(e/100)+"vh"),s(document).trigger("vc-full-height-row",i)}s(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",e).on("resize.vcRowBehaviour",t),e(),t(),(0<window.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./))&&s(".vc_row-o-full-height").each(function(){"flex"===s(this).css("display")&&s(this).wrap('<div class="vc_ie-flexbox-fixer"></div>')}),vc_initVideoBackgrounds();var n=!1;if(window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),s(".vc_parallax-inner").remove(),s("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),s("[data-vc-parallax]").each(function(){var e,t,i,o;n=!0,"on"===s(this).data("vcParallaxOFade")&&s(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),e=100*s(this).data("vcParallax"),(t=s("<div />").addClass("vc_parallax-inner").appendTo(s(this))).height(e+"%"),i=s(this).data("vcParallaxImage"),(o=vcExtractYoutubeId(i))?insertYoutubeVideoAsBackground(t,o):void 0!==i&&t.css("background-image","url("+i+")"),t.attr("data-bottom-top","top: "+-(e-100)+"%;").attr("data-top-bottom","top: 0%;")}),n&&window.skrollr)window.vcParallaxSkroll=skrollr.init({forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}}),window.vcParallaxSkroll}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(e){for(var t=!1,i=1;!1===t;){if(e.hasClass("columns_count_"+i))return t=!0,i;i++}}),"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(e,t){var i=t.panel||t.newPanel,o=i.find(".vc_pie_chart:not(.vc_ready)"),n=i.find(".vc_round-chart"),a=i.find(".vc_line-chart"),r=i.find('[data-ride="vc_carousel"]');vc_carouselBehaviour(),vc_plugin_flexslider(i),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),i.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&i.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),o.length&&jQuery.fn.vcChat&&o.vcChat(),n.length&&jQuery.fn.vcRoundChart&&n.vcRoundChart({reload:!1}),a.length&&jQuery.fn.vcLineChart&&a.vcLineChart({reload:!1}),r.length&&jQuery.fn.carousel&&r.carousel("resizeAction"),t=i.find(".isotope, .wpb_image_grid_ul"),o=i.find(".wpb_gmaps_widget"),0<t.length&&t.isotope("layout"),o.length&&!o.is(".map_ready")&&((n=o.find("iframe")).attr("src",n.attr("src")),o.addClass("map_ready")),i.parents(".isotope").length&&i.parents(".isotope").each(function(){jQuery(this).isotope("layout")}),c(document).trigger("wpb_prepare_tab_content",i)}),"function"!=typeof window.vc_ttaActivation&&(window.vc_ttaActivation=function(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var t=window.jQuery,i={};i.newPanel=t(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,i)})}),"function"!=typeof window.vc_accordionActivate&&(window.vc_accordionActivate=function(e,t){var i,o,n,a;t.newPanel.length&&t.newHeader.length&&(i=t.newPanel.find(".vc_pie_chart:not(.vc_ready)"),o=t.newPanel.find(".vc_round-chart"),n=t.newPanel.find(".vc_line-chart"),a=t.newPanel.find('[data-ride="vc_carousel"]'),void 0!==jQuery.fn.isotope&&t.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),vc_carouselBehaviour(t.newPanel),vc_plugin_flexslider(t.newPanel),i.length&&jQuery.fn.vcChat&&i.vcChat(),o.length&&jQuery.fn.vcRoundChart&&o.vcRoundChart({reload:!1}),n.length&&jQuery.fn.vcLineChart&&n.vcLineChart({reload:!1}),a.length&&jQuery.fn.carousel&&a.carousel("resizeAction"),t.newPanel.parents(".isotope").length)&&t.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.initVideoBackgrounds&&(window.initVideoBackgrounds=function(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}),"function"!=typeof window.vc_initVideoBackgrounds&&(window.vc_initVideoBackgrounds=function(){c(".vc_video-bg").remove(),c("[data-vc-video-bg]").each(function(){var e,i=jQuery(this);i.data("vcVideoBg")?(e=i.data("vcVideoBg"),(e=vcExtractYoutubeId(e))&&(i.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground(i,e)),jQuery(window).on("grid:items:added",function(e,t){i.has(t).length&&vcResizeVideoBackground(i)})):i.find(".vc_video-bg").remove()})}),"function"!=typeof window.insertYoutubeVideoAsBackground&&(window.insertYoutubeVideoAsBackground=function(e,t,i){if("undefined"==typeof YT||void 0===YT.Player)return 100<(i=void 0===i?0:i)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground(e,t,i++)},100);var o=e.prepend('<div class="vc_video-bg"><div class="inner"></div></div>').find(".inner");new YT.Player(o[0],{width:"100%",height:"100%",videoId:t,playerVars:{playlist:t,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,mute:1,wmode:"transparent"},events:{onReady:function(e){e.target.mute().setLoop(!0)}}}),vcResizeVideoBackground(e),jQuery(window).on("resize",function(){vcResizeVideoBackground(e)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function(e){var t,i,o,n,a=e.innerWidth(),r=e.innerHeight();a/r<16/9?(t=r*(16/9),i=r,o=-Math.round((t-a)/2)+"px",n=-Math.round((i-r)/2)+"px"):(i=(t=a)*(9/16),n=-Math.round((i-r)/2)+"px",o=-Math.round((t-a)/2)+"px"),t+="px",i+="px",e.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:o,marginTop:n,width:t,height:i})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(e){return void 0!==e&&null!==(e=e.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/))&&e[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var e=window.jQuery,t=e(".wpb_gmaps_widget");t.on("click",function(){e("iframe",this).css("pointer-events","auto")}),t.on("mouseleave",function(){e("iframe",this).css("pointer-events","none")}),e(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(e){e.each(function(){var e=jQuery(this),t=e.width();e.css("perspective",4*t+"px")})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(e){e.each(function(){var e=jQuery(this),t=e.find(".vc-hoverbox-inner"),i=(t.css("min-height",0),e.find(".vc-hoverbox-front-inner").outerHeight()),e=e.find(".vc-hoverbox-back-inner").outerHeight(),i=e<i?i:e;t.css("min-height",(i=i<250?250:i)+"px")})}),"function"!=typeof window.vc_prepareHoverBox&&(window.vc_prepareHoverBox=function(){var e=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(e),vc_setHoverBoxPerspective(e)}),jQuery(document).ready(window.vc_prepareHoverBox),jQuery(window).on("resize",window.vc_prepareHoverBox),jQuery(document).ready(function(){window.vc_js()})})(window.jQuery);
(function (global, factory){
typeof exports==='object'&&typeof module!=='undefined' ? module.exports=factory() :
typeof define==='function'&&define.amd ? define(factory) :
(global=typeof globalThis!=='undefined' ? globalThis:global||self, global.bootstrap=factory());
}(this, (function (){ 'use strict';
const NODE_TEXT=3;
const SelectorEngine={
find(selector, element=document.documentElement){
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element=document.documentElement){
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector){
return [].concat(...element.children).filter(child=> child.matches(selector));
},
parents(element, selector){
const parents=[];
let ancestor=element.parentNode;
while (ancestor&&ancestor.nodeType===Node.ELEMENT_NODE&&ancestor.nodeType!==NODE_TEXT){
if(ancestor.matches(selector)){
parents.push(ancestor);
}
ancestor=ancestor.parentNode;
}
return parents;
},
prev(element, selector){
let previous=element.previousElementSibling;
while (previous){
if(previous.matches(selector)){
return [previous];
}
previous=previous.previousElementSibling;
}
return [];
},
next(element, selector){
let next=element.nextElementSibling;
while (next){
if(next.matches(selector)){
return [next];
}
next=next.nextElementSibling;
}
return [];
}};
const MAX_UID=1000000;
const MILLISECONDS_MULTIPLIER=1000;
const TRANSITION_END='transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType=obj=> {
if(obj===null||obj===undefined){
return `${obj}`;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
const getUID=prefix=> {
do {
prefix +=Math.floor(Math.random() * MAX_UID);
} while (document.getElementById(prefix));
return prefix;
};
const getSelector=element=> {
let selector=element.getAttribute('data-bs-target');
if(!selector||selector==='#'){
let hrefAttr=element.getAttribute('href');
if(!hrefAttr||!hrefAttr.includes('#')&&!hrefAttr.startsWith('.')){
return null;
}
if(hrefAttr.includes('#')&&!hrefAttr.startsWith('#')){
hrefAttr=`#${hrefAttr.split('#')[1]}`;
}
selector=hrefAttr&&hrefAttr!=='#' ? hrefAttr.trim():null;
}
return selector;
};
const getSelectorFromElement=element=> {
const selector=getSelector(element);
if(selector){
return document.querySelector(selector) ? selector:null;
}
return null;
};
const getElementFromSelector=element=> {
const selector=getSelector(element);
return selector ? document.querySelector(selector):null;
};
const getTransitionDurationFromElement=element=> {
if(!element){
return 0;
}
let {
transitionDuration,
transitionDelay
}=window.getComputedStyle(element);
const floatTransitionDuration=Number.parseFloat(transitionDuration);
const floatTransitionDelay=Number.parseFloat(transitionDelay);
if(!floatTransitionDuration&&!floatTransitionDelay){
return 0;
}
transitionDuration=transitionDuration.split(',')[0];
transitionDelay=transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd=element=> {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement$1=obj=> {
if(!obj||typeof obj!=='object'){
return false;
}
if(typeof obj.jquery!=='undefined'){
obj=obj[0];
}
return typeof obj.nodeType!=='undefined';
};
const getElement=obj=> {
if(isElement$1(obj)){
return obj.jquery ? obj[0]:obj;
}
if(typeof obj==='string'&&obj.length > 0){
return SelectorEngine.findOne(obj);
}
return null;
};
const emulateTransitionEnd=(element, duration)=> {
let called=false;
const durationPadding=5;
const emulatedDuration=duration + durationPadding;
function listener(){
called=true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(()=> {
if(!called){
triggerTransitionEnd(element);
}}, emulatedDuration);
};
const typeCheckConfig=(componentName, config, configTypes)=> {
Object.keys(configTypes).forEach(property=> {
const expectedTypes=configTypes[property];
const value=config[property];
const valueType=value&&isElement$1(value) ? 'element':toType(value);
if(!new RegExp(expectedTypes).test(valueType)){
throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
}});
};
const isVisible=element=> {
if(!element){
return false;
}
if(element.style&&element.parentNode&&element.parentNode.style){
const elementStyle=getComputedStyle(element);
const parentNodeStyle=getComputedStyle(element.parentNode);
return elementStyle.display!=='none'&&parentNodeStyle.display!=='none'&&elementStyle.visibility!=='hidden';
}
return false;
};
const isDisabled=element=> {
if(!element||element.nodeType!==Node.ELEMENT_NODE){
return true;
}
if(element.classList.contains('disabled')){
return true;
}
if(typeof element.disabled!=='undefined'){
return element.disabled;
}
return element.hasAttribute('disabled')&&element.getAttribute('disabled')!=='false';
};
const findShadowRoot=element=> {
if(!document.documentElement.attachShadow){
return null;
}
if(typeof element.getRootNode==='function'){
const root=element.getRootNode();
return root instanceof ShadowRoot ? root:null;
}
if(element instanceof ShadowRoot){
return element;
}
if(!element.parentNode){
return null;
}
return findShadowRoot(element.parentNode);
};
const noop=()=> {};
const reflow=element=> element.offsetHeight;
const getjQuery=()=> {
const {
jQuery
}=window;
if(jQuery&&!document.body.hasAttribute('data-bs-no-jquery')){
return jQuery;
}
return null;
};
const onDOMContentLoaded=callback=> {
if(document.readyState==='loading'){
document.addEventListener('DOMContentLoaded', callback);
}else{
callback();
}};
const isRTL=()=> document.documentElement.dir==='rtl';
const defineJQueryPlugin=plugin=> {
onDOMContentLoaded(()=> {
const $=getjQuery();
if($){
const name=plugin.NAME;
const JQUERY_NO_CONFLICT=$.fn[name];
$.fn[name]=plugin.jQueryInterface;
$.fn[name].Constructor=plugin;
$.fn[name].noConflict=()=> {
$.fn[name]=JQUERY_NO_CONFLICT;
return plugin.jQueryInterface;
};}});
};
const execute=callback=> {
if(typeof callback==='function'){
callback();
}};
const elementMap=new Map();
var Data={
set(element, key, instance){
if(!elementMap.has(element)){
elementMap.set(element, new Map());
}
const instanceMap=elementMap.get(element);
if(!instanceMap.has(key)&&instanceMap.size!==0){
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
return;
}
instanceMap.set(key, instance);
},
get(element, key){
if(elementMap.has(element)){
return elementMap.get(element).get(key)||null;
}
return null;
},
remove(element, key){
if(!elementMap.has(element)){
return;
}
const instanceMap=elementMap.get(element);
instanceMap.delete(key);
if(instanceMap.size===0){
elementMap.delete(element);
}}
};
const namespaceRegex=/[^.]*(?=\..*)\.|.*/;
const stripNameRegex=/\..*/;
const stripUidRegex=/::\d+$/;
const eventRegistry={};
let uidEvent=1;
const customEvents={
mouseenter: 'mouseover',
mouseleave: 'mouseout'
};
const customEventsRegex=/^(mouseenter|mouseleave)/i;
const nativeEvents=new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
function getUidEvent(element, uid){
return uid&&`${uid}::${uidEvent++}`||element.uidEvent||uidEvent++;
}
function getEvent(element){
const uid=getUidEvent(element);
element.uidEvent=uid;
eventRegistry[uid]=eventRegistry[uid]||{};
return eventRegistry[uid];
}
function bootstrapHandler(element, fn){
return function handler(event){
event.delegateTarget=element;
if(handler.oneOff){
EventHandler.off(element, event.type, fn);
}
return fn.apply(element, [event]);
};}
function bootstrapDelegationHandler(element, selector, fn){
return function handler(event){
const domElements=element.querySelectorAll(selector);
for (let {
target
}=event; target&&target!==this; target=target.parentNode){
for (let i=domElements.length; i--;){
if(domElements[i]===target){
event.delegateTarget=target;
if(handler.oneOff){
EventHandler.off(element, event.type, selector, fn);
}
return fn.apply(target, [event]);
}}
}
return null;
};}
function findHandler(events, handler, delegationSelector=null){
const uidEventList=Object.keys(events);
for (let i=0, len=uidEventList.length; i < len; i++){
const event=events[uidEventList[i]];
if(event.originalHandler===handler&&event.delegationSelector===delegationSelector){
return event;
}}
return null;
}
function normalizeParams(originalTypeEvent, handler, delegationFn){
const delegation=typeof handler==='string';
const originalHandler=delegation ? delegationFn:handler;
let typeEvent=getTypeEvent(originalTypeEvent);
const isNative=nativeEvents.has(typeEvent);
if(!isNative){
typeEvent=originalTypeEvent;
}
return [delegation, originalHandler, typeEvent];
}
function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff){
if(typeof originalTypeEvent!=='string'||!element){
return;
}
if(!handler){
handler=delegationFn;
delegationFn=null;
}
if(customEventsRegex.test(originalTypeEvent)){
const wrapFn=fn=> {
return function (event){
if(!event.relatedTarget||event.relatedTarget!==event.delegateTarget&&!event.delegateTarget.contains(event.relatedTarget)){
return fn.call(this, event);
}};};
if(delegationFn){
delegationFn=wrapFn(delegationFn);
}else{
handler=wrapFn(handler);
}}
const [delegation, originalHandler, typeEvent]=normalizeParams(originalTypeEvent, handler, delegationFn);
const events=getEvent(element);
const handlers=events[typeEvent]||(events[typeEvent]={});
const previousFn=findHandler(handlers, originalHandler, delegation ? handler:null);
if(previousFn){
previousFn.oneOff=previousFn.oneOff&&oneOff;
return;
}
const uid=getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
const fn=delegation ? bootstrapDelegationHandler(element, handler, delegationFn):bootstrapHandler(element, handler);
fn.delegationSelector=delegation ? handler:null;
fn.originalHandler=originalHandler;
fn.oneOff=oneOff;
fn.uidEvent=uid;
handlers[uid]=fn;
element.addEventListener(typeEvent, fn, delegation);
}
function removeHandler(element, events, typeEvent, handler, delegationSelector){
const fn=findHandler(events[typeEvent], handler, delegationSelector);
if(!fn){
return;
}
element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
delete events[typeEvent][fn.uidEvent];
}
function removeNamespacedHandlers(element, events, typeEvent, namespace){
const storeElementEvent=events[typeEvent]||{};
Object.keys(storeElementEvent).forEach(handlerKey=> {
if(handlerKey.includes(namespace)){
const event=storeElementEvent[handlerKey];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}});
}
function getTypeEvent(event){
event=event.replace(stripNameRegex, '');
return customEvents[event]||event;
}
const EventHandler={
on(element, event, handler, delegationFn){
addHandler(element, event, handler, delegationFn, false);
},
one(element, event, handler, delegationFn){
addHandler(element, event, handler, delegationFn, true);
},
off(element, originalTypeEvent, handler, delegationFn){
if(typeof originalTypeEvent!=='string'||!element){
return;
}
const [delegation, originalHandler, typeEvent]=normalizeParams(originalTypeEvent, handler, delegationFn);
const inNamespace=typeEvent!==originalTypeEvent;
const events=getEvent(element);
const isNamespace=originalTypeEvent.startsWith('.');
if(typeof originalHandler!=='undefined'){
if(!events||!events[typeEvent]){
return;
}
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler:null);
return;
}
if(isNamespace){
Object.keys(events).forEach(elementEvent=> {
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
});
}
const storeElementEvent=events[typeEvent]||{};
Object.keys(storeElementEvent).forEach(keyHandlers=> {
const handlerKey=keyHandlers.replace(stripUidRegex, '');
if(!inNamespace||originalTypeEvent.includes(handlerKey)){
const event=storeElementEvent[keyHandlers];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}});
},
trigger(element, event, args){
if(typeof event!=='string'||!element){
return null;
}
const $=getjQuery();
const typeEvent=getTypeEvent(event);
const inNamespace=event!==typeEvent;
const isNative=nativeEvents.has(typeEvent);
let jQueryEvent;
let bubbles=true;
let nativeDispatch=true;
let defaultPrevented=false;
let evt=null;
if(inNamespace&&$){
jQueryEvent=$.Event(event, args);
$(element).trigger(jQueryEvent);
bubbles = !jQueryEvent.isPropagationStopped();
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented=jQueryEvent.isDefaultPrevented();
}
if(isNative){
evt=document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
}else{
evt=new CustomEvent(event, {
bubbles,
cancelable: true
});
}
if(typeof args!=='undefined'){
Object.keys(args).forEach(key=> {
Object.defineProperty(evt, key, {
get(){
return args[key];
}});
});
}
if(defaultPrevented){
evt.preventDefault();
}
if(nativeDispatch){
element.dispatchEvent(evt);
}
if(evt.defaultPrevented&&typeof jQueryEvent!=='undefined'){
jQueryEvent.preventDefault();
}
return evt;
}};
const VERSION='5.0.1';
class BaseComponent {
constructor(element){
element=getElement(element);
if(!element){
return;
}
this._element=element;
Data.set(this._element, this.constructor.DATA_KEY, this);
}
dispose(){
Data.remove(this._element, this.constructor.DATA_KEY);
EventHandler.off(this._element, this.constructor.EVENT_KEY);
Object.getOwnPropertyNames(this).forEach(propertyName=> {
this[propertyName]=null;
});
}
_queueCallback(callback, element, isAnimated=true){
if(!isAnimated){
execute(callback);
return;
}
const transitionDuration=getTransitionDurationFromElement(element);
EventHandler.one(element, 'transitionend', ()=> execute(callback));
emulateTransitionEnd(element, transitionDuration);
}
static getInstance(element){
return Data.get(element, this.DATA_KEY);
}
static get VERSION(){
return VERSION;
}
static get NAME(){
throw new Error('You have to implement the static method "NAME", for each component!');
}
static get DATA_KEY(){
return `bs.${this.NAME}`;
}
static get EVENT_KEY(){
return `.${this.DATA_KEY}`;
}}
const NAME$c='alert';
const DATA_KEY$b='bs.alert';
const EVENT_KEY$b=`.${DATA_KEY$b}`;
const DATA_API_KEY$8='.data-api';
const SELECTOR_DISMISS='[data-bs-dismiss="alert"]';
const EVENT_CLOSE=`close${EVENT_KEY$b}`;
const EVENT_CLOSED=`closed${EVENT_KEY$b}`;
const EVENT_CLICK_DATA_API$7=`click${EVENT_KEY$b}${DATA_API_KEY$8}`;
const CLASS_NAME_ALERT='alert';
const CLASS_NAME_FADE$6='fade';
const CLASS_NAME_SHOW$9='show';
class Alert extends BaseComponent {
static get NAME(){
return NAME$c;
}
close(element){
const rootElement=element ? this._getRootElement(element):this._element;
const customEvent=this._triggerCloseEvent(rootElement);
if(customEvent===null||customEvent.defaultPrevented){
return;
}
this._removeElement(rootElement);
}
_getRootElement(element){
return getElementFromSelector(element)||element.closest(`.${CLASS_NAME_ALERT}`);
}
_triggerCloseEvent(element){
return EventHandler.trigger(element, EVENT_CLOSE);
}
_removeElement(element){
element.classList.remove(CLASS_NAME_SHOW$9);
const isAnimated=element.classList.contains(CLASS_NAME_FADE$6);
this._queueCallback(()=> this._destroyElement(element), element, isAnimated);
}
_destroyElement(element){
if(element.parentNode){
element.parentNode.removeChild(element);
}
EventHandler.trigger(element, EVENT_CLOSED);
}
static jQueryInterface(config){
return this.each(function (){
let data=Data.get(this, DATA_KEY$b);
if(!data){
data=new Alert(this);
}
if(config==='close'){
data[config](this);
}});
}
static handleDismiss(alertInstance){
return function (event){
if(event){
event.preventDefault();
}
alertInstance.close(this);
};}}
EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
defineJQueryPlugin(Alert);
const NAME$b='button';
const DATA_KEY$a='bs.button';
const EVENT_KEY$a=`.${DATA_KEY$a}`;
const DATA_API_KEY$7='.data-api';
const CLASS_NAME_ACTIVE$3='active';
const SELECTOR_DATA_TOGGLE$5='[data-bs-toggle="button"]';
const EVENT_CLICK_DATA_API$6=`click${EVENT_KEY$a}${DATA_API_KEY$7}`;
class Button extends BaseComponent {
static get NAME(){
return NAME$b;
}
toggle(){
this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
}
static jQueryInterface(config){
return this.each(function (){
let data=Data.get(this, DATA_KEY$a);
if(!data){
data=new Button(this);
}
if(config==='toggle'){
data[config]();
}});
}}
EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event=> {
event.preventDefault();
const button=event.target.closest(SELECTOR_DATA_TOGGLE$5);
let data=Data.get(button, DATA_KEY$a);
if(!data){
data=new Button(button);
}
data.toggle();
});
defineJQueryPlugin(Button);
function normalizeData(val){
if(val==='true'){
return true;
}
if(val==='false'){
return false;
}
if(val===Number(val).toString()){
return Number(val);
}
if(val===''||val==='null'){
return null;
}
return val;
}
function normalizeDataKey(key){
return key.replace(/[A-Z]/g, chr=> `-${chr.toLowerCase()}`);
}
const Manipulator={
setDataAttribute(element, key, value){
element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
},
removeDataAttribute(element, key){
element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
},
getDataAttributes(element){
if(!element){
return {};}
const attributes={};
Object.keys(element.dataset).filter(key=> key.startsWith('bs')).forEach(key=> {
let pureKey=key.replace(/^bs/, '');
pureKey=pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
attributes[pureKey]=normalizeData(element.dataset[key]);
});
return attributes;
},
getDataAttribute(element, key){
return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
},
offset(element){
const rect=element.getBoundingClientRect();
return {
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft
};},
position(element){
return {
top: element.offsetTop,
left: element.offsetLeft
};}};
const NAME$9='collapse';
const DATA_KEY$8='bs.collapse';
const EVENT_KEY$8=`.${DATA_KEY$8}`;
const DATA_API_KEY$5='.data-api';
const Default$8={
toggle: true,
parent: ''
};
const DefaultType$8={
toggle: 'boolean',
parent: '(string|element)'
};
const EVENT_SHOW$5=`show${EVENT_KEY$8}`;
const EVENT_SHOWN$5=`shown${EVENT_KEY$8}`;
const EVENT_HIDE$5=`hide${EVENT_KEY$8}`;
const EVENT_HIDDEN$5=`hidden${EVENT_KEY$8}`;
const EVENT_CLICK_DATA_API$4=`click${EVENT_KEY$8}${DATA_API_KEY$5}`;
const CLASS_NAME_SHOW$8='show';
const CLASS_NAME_COLLAPSE='collapse';
const CLASS_NAME_COLLAPSING='collapsing';
const CLASS_NAME_COLLAPSED='collapsed';
const WIDTH='width';
const HEIGHT='height';
const SELECTOR_ACTIVES='.show, .collapsing';
const SELECTOR_DATA_TOGGLE$4='[data-bs-toggle="collapse"]';
class Collapse extends BaseComponent {
constructor(element, config){
super(element);
this._isTransitioning=false;
this._config=this._getConfig(config);
this._triggerArray=SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target="#${this._element.id}"]`);
const toggleList=SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
for (let i=0, len=toggleList.length; i < len; i++){
const elem=toggleList[i];
const selector=getSelectorFromElement(elem);
const filterElement=SelectorEngine.find(selector).filter(foundElem=> foundElem===this._element);
if(selector!==null&&filterElement.length){
this._selector=selector;
this._triggerArray.push(elem);
}}
this._parent=this._config.parent ? this._getParent():null;
if(!this._config.parent){
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
}
if(this._config.toggle){
this.toggle();
}}
static get Default(){
return Default$8;
}
static get NAME(){
return NAME$9;
}
toggle(){
if(this._element.classList.contains(CLASS_NAME_SHOW$8)){
this.hide();
}else{
this.show();
}}
show(){
if(this._isTransitioning||this._element.classList.contains(CLASS_NAME_SHOW$8)){
return;
}
let actives;
let activesData;
if(this._parent){
actives=SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem=> {
if(typeof this._config.parent==='string'){
return elem.getAttribute('data-bs-parent')===this._config.parent;
}
return elem.classList.contains(CLASS_NAME_COLLAPSE);
});
if(actives.length===0){
actives=null;
}}
const container=SelectorEngine.findOne(this._selector);
if(actives){
const tempActiveData=actives.find(elem=> container!==elem);
activesData=tempActiveData ? Data.get(tempActiveData, DATA_KEY$8):null;
if(activesData&&activesData._isTransitioning){
return;
}}
const startEvent=EventHandler.trigger(this._element, EVENT_SHOW$5);
if(startEvent.defaultPrevented){
return;
}
if(actives){
actives.forEach(elemActive=> {
if(container!==elemActive){
Collapse.collapseInterface(elemActive, 'hide');
}
if(!activesData){
Data.set(elemActive, DATA_KEY$8, null);
}});
}
const dimension=this._getDimension();
this._element.classList.remove(CLASS_NAME_COLLAPSE);
this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.style[dimension]=0;
if(this._triggerArray.length){
this._triggerArray.forEach(element=> {
element.classList.remove(CLASS_NAME_COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this.setTransitioning(true);
const complete=()=> {
this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
this._element.style[dimension]='';
this.setTransitioning(false);
EventHandler.trigger(this._element, EVENT_SHOWN$5);
};
const capitalizedDimension=dimension[0].toUpperCase() + dimension.slice(1);
const scrollSize=`scroll${capitalizedDimension}`;
this._queueCallback(complete, this._element, true);
this._element.style[dimension]=`${this._element[scrollSize]}px`;
}
hide(){
if(this._isTransitioning||!this._element.classList.contains(CLASS_NAME_SHOW$8)){
return;
}
const startEvent=EventHandler.trigger(this._element, EVENT_HIDE$5);
if(startEvent.defaultPrevented){
return;
}
const dimension=this._getDimension();
this._element.style[dimension]=`${this._element.getBoundingClientRect()[dimension]}px`;
reflow(this._element);
this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
const triggerArrayLength=this._triggerArray.length;
if(triggerArrayLength > 0){
for (let i=0; i < triggerArrayLength; i++){
const trigger=this._triggerArray[i];
const elem=getElementFromSelector(trigger);
if(elem&&!elem.classList.contains(CLASS_NAME_SHOW$8)){
trigger.classList.add(CLASS_NAME_COLLAPSED);
trigger.setAttribute('aria-expanded', false);
}}
}
this.setTransitioning(true);
const complete=()=> {
this.setTransitioning(false);
this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE);
EventHandler.trigger(this._element, EVENT_HIDDEN$5);
};
this._element.style[dimension]='';
this._queueCallback(complete, this._element, true);
}
setTransitioning(isTransitioning){
this._isTransitioning=isTransitioning;
}
_getConfig(config){
config={ ...Default$8,
...config
};
config.toggle=Boolean(config.toggle);
typeCheckConfig(NAME$9, config, DefaultType$8);
return config;
}
_getDimension(){
return this._element.classList.contains(WIDTH) ? WIDTH:HEIGHT;
}
_getParent(){
let {
parent
}=this._config;
parent=getElement(parent);
const selector=`${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
SelectorEngine.find(selector, parent).forEach(element=> {
const selected=getElementFromSelector(element);
this._addAriaAndCollapsedClass(selected, [element]);
});
return parent;
}
_addAriaAndCollapsedClass(element, triggerArray){
if(!element||!triggerArray.length){
return;
}
const isOpen=element.classList.contains(CLASS_NAME_SHOW$8);
triggerArray.forEach(elem=> {
if(isOpen){
elem.classList.remove(CLASS_NAME_COLLAPSED);
}else{
elem.classList.add(CLASS_NAME_COLLAPSED);
}
elem.setAttribute('aria-expanded', isOpen);
});
}
static collapseInterface(element, config){
let data=Data.get(element, DATA_KEY$8);
const _config={ ...Default$8,
...Manipulator.getDataAttributes(element),
...(typeof config==='object'&&config ? config:{})
};
if(!data&&_config.toggle&&typeof config==='string'&&/show|hide/.test(config)){
_config.toggle=false;
}
if(!data){
data=new Collapse(element, _config);
}
if(typeof config==='string'){
if(typeof data[config]==='undefined'){
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}}
static jQueryInterface(config){
return this.each(function (){
Collapse.collapseInterface(this, config);
});
}}
EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event){
if(event.target.tagName==='A'||event.delegateTarget&&event.delegateTarget.tagName==='A'){
event.preventDefault();
}
const triggerData=Manipulator.getDataAttributes(this);
const selector=getSelectorFromElement(this);
const selectorElements=SelectorEngine.find(selector);
selectorElements.forEach(element=> {
const data=Data.get(element, DATA_KEY$8);
let config;
if(data){
if(data._parent===null&&typeof triggerData.parent==='string'){
data._config.parent=triggerData.parent;
data._parent=data._getParent();
}
config='toggle';
}else{
config=triggerData;
}
Collapse.collapseInterface(element, config);
});
});
defineJQueryPlugin(Collapse);
var top='top';
var bottom='bottom';
var right='right';
var left='left';
var auto='auto';
var basePlacements=[top, bottom, right, left];
var start='start';
var end='end';
var clippingParents='clippingParents';
var viewport='viewport';
var popper='popper';
var reference='reference';
var variationPlacements=basePlacements.reduce(function (acc, placement){
return acc.concat([placement + "-" + start, placement + "-" + end]);
}, []);
var placements=[].concat(basePlacements, [auto]).reduce(function (acc, placement){
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
}, []);
var beforeRead='beforeRead';
var read='read';
var afterRead='afterRead';
var beforeMain='beforeMain';
var main='main';
var afterMain='afterMain';
var beforeWrite='beforeWrite';
var write='write';
var afterWrite='afterWrite';
var modifierPhases=[beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
function getNodeName(element){
return element ? (element.nodeName||'').toLowerCase():null;
}
function getWindow(node){
if(node==null){
return window;
}
if(node.toString()!=='[object Window]'){
var ownerDocument=node.ownerDocument;
return ownerDocument ? ownerDocument.defaultView||window:window;
}
return node;
}
function isElement(node){
var OwnElement=getWindow(node).Element;
return node instanceof OwnElement||node instanceof Element;
}
function isHTMLElement(node){
var OwnElement=getWindow(node).HTMLElement;
return node instanceof OwnElement||node instanceof HTMLElement;
}
function isShadowRoot(node){
if(typeof ShadowRoot==='undefined'){
return false;
}
var OwnElement=getWindow(node).ShadowRoot;
return node instanceof OwnElement||node instanceof ShadowRoot;
}
function applyStyles(_ref){
var state=_ref.state;
Object.keys(state.elements).forEach(function (name){
var style=state.styles[name]||{};
var attributes=state.attributes[name]||{};
var element=state.elements[name];
if(!isHTMLElement(element)||!getNodeName(element)){
return;
}
Object.assign(element.style, style);
Object.keys(attributes).forEach(function (name){
var value=attributes[name];
if(value===false){
element.removeAttribute(name);
}else{
element.setAttribute(name, value===true ? '':value);
}});
});
}
function effect$2(_ref2){
var state=_ref2.state;
var initialStyles={
popper: {
position: state.options.strategy,
left: '0',
top: '0',
margin: '0'
},
arrow: {
position: 'absolute'
},
reference: {}};
Object.assign(state.elements.popper.style, initialStyles.popper);
state.styles=initialStyles;
if(state.elements.arrow){
Object.assign(state.elements.arrow.style, initialStyles.arrow);
}
return function (){
Object.keys(state.elements).forEach(function (name){
var element=state.elements[name];
var attributes=state.attributes[name]||{};
var styleProperties=Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name]:initialStyles[name]);
var style=styleProperties.reduce(function (style, property){
style[property]='';
return style;
}, {});
if(!isHTMLElement(element)||!getNodeName(element)){
return;
}
Object.assign(element.style, style);
Object.keys(attributes).forEach(function (attribute){
element.removeAttribute(attribute);
});
});
};}
var applyStyles$1={
name: 'applyStyles',
enabled: true,
phase: 'write',
fn: applyStyles,
effect: effect$2,
requires: ['computeStyles']
};
function getBasePlacement(placement){
return placement.split('-')[0];
}
function getBoundingClientRect(element){
var rect=element.getBoundingClientRect();
return {
width: rect.width,
height: rect.height,
top: rect.top,
right: rect.right,
bottom: rect.bottom,
left: rect.left,
x: rect.left,
y: rect.top
};}
function getLayoutRect(element){
var clientRect=getBoundingClientRect(element);
var width=element.offsetWidth;
var height=element.offsetHeight;
if(Math.abs(clientRect.width - width) <=1){
width=clientRect.width;
}
if(Math.abs(clientRect.height - height) <=1){
height=clientRect.height;
}
return {
x: element.offsetLeft,
y: element.offsetTop,
width: width,
height: height
};}
function contains(parent, child){
var rootNode=child.getRootNode&&child.getRootNode();
if(parent.contains(child)){
return true;
}
else if(rootNode&&isShadowRoot(rootNode)){
var next=child;
do {
if(next&&parent.isSameNode(next)){
return true;
}
next=next.parentNode||next.host;
} while (next);
}
return false;
}
function getComputedStyle$1(element){
return getWindow(element).getComputedStyle(element);
}
function isTableElement(element){
return ['table', 'td', 'th'].indexOf(getNodeName(element)) >=0;
}
function getDocumentElement(element){
return ((isElement(element) ? element.ownerDocument :
element.document)||window.document).documentElement;
}
function getParentNode(element){
if(getNodeName(element)==='html'){
return element;
}
return (
element.assignedSlot ||
element.parentNode||(
isShadowRoot(element) ? element.host:null) ||
getDocumentElement(element)
);
}
function getTrueOffsetParent(element){
if(!isHTMLElement(element)||// https://github.com/popperjs/popper-core/issues/837
getComputedStyle$1(element).position==='fixed'){
return null;
}
return element.offsetParent;
}
function getContainingBlock(element){
var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;
var isIE=navigator.userAgent.indexOf('Trident')!==-1;
if(isIE&&isHTMLElement(element)){
var elementCss=getComputedStyle$1(element);
if(elementCss.position==='fixed'){
return null;
}}
var currentNode=getParentNode(element);
while (isHTMLElement(currentNode)&&['html', 'body'].indexOf(getNodeName(currentNode)) < 0){
var css=getComputedStyle$1(currentNode);
if(css.transform!=='none'||css.perspective!=='none'||css.contain==='paint'||['transform', 'perspective'].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==='filter'||isFirefox&&css.filter&&css.filter!=='none'){
return currentNode;
}else{
currentNode=currentNode.parentNode;
}}
return null;
}
function getOffsetParent(element){
var window=getWindow(element);
var offsetParent=getTrueOffsetParent(element);
while (offsetParent&&isTableElement(offsetParent)&&getComputedStyle$1(offsetParent).position==='static'){
offsetParent=getTrueOffsetParent(offsetParent);
}
if(offsetParent&&(getNodeName(offsetParent)==='html'||getNodeName(offsetParent)==='body'&&getComputedStyle$1(offsetParent).position==='static')){
return window;
}
return offsetParent||getContainingBlock(element)||window;
}
function getMainAxisFromPlacement(placement){
return ['top', 'bottom'].indexOf(placement) >=0 ? 'x':'y';
}
var max=Math.max;
var min=Math.min;
var round=Math.round;
function within(min$1, value, max$1){
return max(min$1, min(value, max$1));
}
function getFreshSideObject(){
return {
top: 0,
right: 0,
bottom: 0,
left: 0
};}
function mergePaddingObject(paddingObject){
return Object.assign({}, getFreshSideObject(), paddingObject);
}
function expandToHashMap(value, keys){
return keys.reduce(function (hashMap, key){
hashMap[key]=value;
return hashMap;
}, {});
}
var toPaddingObject=function toPaddingObject(padding, state){
padding=typeof padding==='function' ? padding(Object.assign({}, state.rects, {
placement: state.placement
})):padding;
return mergePaddingObject(typeof padding!=='number' ? padding:expandToHashMap(padding, basePlacements));
};
function arrow(_ref){
var _state$modifiersData$;
var state=_ref.state,
name=_ref.name,
options=_ref.options;
var arrowElement=state.elements.arrow;
var popperOffsets=state.modifiersData.popperOffsets;
var basePlacement=getBasePlacement(state.placement);
var axis=getMainAxisFromPlacement(basePlacement);
var isVertical=[left, right].indexOf(basePlacement) >=0;
var len=isVertical ? 'height':'width';
if(!arrowElement||!popperOffsets){
return;
}
var paddingObject=toPaddingObject(options.padding, state);
var arrowRect=getLayoutRect(arrowElement);
var minProp=axis==='y' ? top:left;
var maxProp=axis==='y' ? bottom:right;
var endDiff=state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
var startDiff=popperOffsets[axis] - state.rects.reference[axis];
var arrowOffsetParent=getOffsetParent(arrowElement);
var clientSize=arrowOffsetParent ? axis==='y' ? arrowOffsetParent.clientHeight||0:arrowOffsetParent.clientWidth||0:0;
var centerToReference=endDiff / 2 - startDiff / 2;
var min=paddingObject[minProp];
var max=clientSize - arrowRect[len] - paddingObject[maxProp];
var center=clientSize / 2 - arrowRect[len] / 2 + centerToReference;
var offset=within(min, center, max);
var axisProp=axis;
state.modifiersData[name]=(_state$modifiersData$={}, _state$modifiersData$[axisProp]=offset, _state$modifiersData$.centerOffset=offset - center, _state$modifiersData$);
}
function effect$1(_ref2){
var state=_ref2.state,
options=_ref2.options;
var _options$element=options.element,
arrowElement=_options$element===void 0 ? '[data-popper-arrow]':_options$element;
if(arrowElement==null){
return;
}
if(typeof arrowElement==='string'){
arrowElement=state.elements.popper.querySelector(arrowElement);
if(!arrowElement){
return;
}}
if(!contains(state.elements.popper, arrowElement)){
return;
}
state.elements.arrow=arrowElement;
}
var arrow$1={
name: 'arrow',
enabled: true,
phase: 'main',
fn: arrow,
effect: effect$1,
requires: ['popperOffsets'],
requiresIfExists: ['preventOverflow']
};
var unsetSides={
top: 'auto',
right: 'auto',
bottom: 'auto',
left: 'auto'
};
function roundOffsetsByDPR(_ref){
var x=_ref.x,
y=_ref.y;
var win=window;
var dpr=win.devicePixelRatio||1;
return {
x: round(round(x * dpr) / dpr)||0,
y: round(round(y * dpr) / dpr)||0
};}
function mapToStyles(_ref2){
var _Object$assign2;
var popper=_ref2.popper,
popperRect=_ref2.popperRect,
placement=_ref2.placement,
offsets=_ref2.offsets,
position=_ref2.position,
gpuAcceleration=_ref2.gpuAcceleration,
adaptive=_ref2.adaptive,
roundOffsets=_ref2.roundOffsets;
var _ref3=roundOffsets===true ? roundOffsetsByDPR(offsets):typeof roundOffsets==='function' ? roundOffsets(offsets):offsets,
_ref3$x=_ref3.x,
x=_ref3$x===void 0 ? 0:_ref3$x,
_ref3$y=_ref3.y,
y=_ref3$y===void 0 ? 0:_ref3$y;
var hasX=offsets.hasOwnProperty('x');
var hasY=offsets.hasOwnProperty('y');
var sideX=left;
var sideY=top;
var win=window;
if(adaptive){
var offsetParent=getOffsetParent(popper);
var heightProp='clientHeight';
var widthProp='clientWidth';
if(offsetParent===getWindow(popper)){
offsetParent=getDocumentElement(popper);
if(getComputedStyle$1(offsetParent).position!=='static'){
heightProp='scrollHeight';
widthProp='scrollWidth';
}}
offsetParent=offsetParent;
if(placement===top){
sideY=bottom;
y -=offsetParent[heightProp] - popperRect.height;
y *=gpuAcceleration ? 1:-1;
}
if(placement===left){
sideX=right;
x -=offsetParent[widthProp] - popperRect.width;
x *=gpuAcceleration ? 1:-1;
}}
var commonStyles=Object.assign({
position: position
}, adaptive&&unsetSides);
if(gpuAcceleration){
var _Object$assign;
return Object.assign({}, commonStyles, (_Object$assign={}, _Object$assign[sideY]=hasY ? '0':'', _Object$assign[sideX]=hasX ? '0':'', _Object$assign.transform=(win.devicePixelRatio||1) < 2 ? "translate(" + x + "px, " + y + "px)":"translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
}
return Object.assign({}, commonStyles, (_Object$assign2={}, _Object$assign2[sideY]=hasY ? y + "px":'', _Object$assign2[sideX]=hasX ? x + "px":'', _Object$assign2.transform='', _Object$assign2));
}
function computeStyles(_ref4){
var state=_ref4.state,
options=_ref4.options;
var _options$gpuAccelerat=options.gpuAcceleration,
gpuAcceleration=_options$gpuAccelerat===void 0 ? true:_options$gpuAccelerat,
_options$adaptive=options.adaptive,
adaptive=_options$adaptive===void 0 ? true:_options$adaptive,
_options$roundOffsets=options.roundOffsets,
roundOffsets=_options$roundOffsets===void 0 ? true:_options$roundOffsets;
var commonStyles={
placement: getBasePlacement(state.placement),
popper: state.elements.popper,
popperRect: state.rects.popper,
gpuAcceleration: gpuAcceleration
};
if(state.modifiersData.popperOffsets!=null){
state.styles.popper=Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
offsets: state.modifiersData.popperOffsets,
position: state.options.strategy,
adaptive: adaptive,
roundOffsets: roundOffsets
})));
}
if(state.modifiersData.arrow!=null){
state.styles.arrow=Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
offsets: state.modifiersData.arrow,
position: 'absolute',
adaptive: false,
roundOffsets: roundOffsets
})));
}
state.attributes.popper=Object.assign({}, state.attributes.popper, {
'data-popper-placement': state.placement
});
}
var computeStyles$1={
name: 'computeStyles',
enabled: true,
phase: 'beforeWrite',
fn: computeStyles,
data: {}};
var passive={
passive: true
};
function effect(_ref){
var state=_ref.state,
instance=_ref.instance,
options=_ref.options;
var _options$scroll=options.scroll,
scroll=_options$scroll===void 0 ? true:_options$scroll,
_options$resize=options.resize,
resize=_options$resize===void 0 ? true:_options$resize;
var window=getWindow(state.elements.popper);
var scrollParents=[].concat(state.scrollParents.reference, state.scrollParents.popper);
if(scroll){
scrollParents.forEach(function (scrollParent){
scrollParent.addEventListener('scroll', instance.update, passive);
});
}
if(resize){
window.addEventListener('resize', instance.update, passive);
}
return function (){
if(scroll){
scrollParents.forEach(function (scrollParent){
scrollParent.removeEventListener('scroll', instance.update, passive);
});
}
if(resize){
window.removeEventListener('resize', instance.update, passive);
}};}
var eventListeners={
name: 'eventListeners',
enabled: true,
phase: 'write',
fn: function fn(){},
effect: effect,
data: {}};
var hash$1={
left: 'right',
right: 'left',
bottom: 'top',
top: 'bottom'
};
function getOppositePlacement(placement){
return placement.replace(/left|right|bottom|top/g, function (matched){
return hash$1[matched];
});
}
var hash={
start: 'end',
end: 'start'
};
function getOppositeVariationPlacement(placement){
return placement.replace(/start|end/g, function (matched){
return hash[matched];
});
}
function getWindowScroll(node){
var win=getWindow(node);
var scrollLeft=win.pageXOffset;
var scrollTop=win.pageYOffset;
return {
scrollLeft: scrollLeft,
scrollTop: scrollTop
};}
function getWindowScrollBarX(element){
return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
}
function getViewportRect(element){
var win=getWindow(element);
var html=getDocumentElement(element);
var visualViewport=win.visualViewport;
var width=html.clientWidth;
var height=html.clientHeight;
var x=0;
var y=0;
if(visualViewport){
width=visualViewport.width;
height=visualViewport.height;
if(!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){
x=visualViewport.offsetLeft;
y=visualViewport.offsetTop;
}}
return {
width: width,
height: height,
x: x + getWindowScrollBarX(element),
y: y
};}
function getDocumentRect(element){
var _element$ownerDocumen;
var html=getDocumentElement(element);
var winScroll=getWindowScroll(element);
var body=(_element$ownerDocumen=element.ownerDocument)==null ? void 0:_element$ownerDocumen.body;
var width=max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth:0, body ? body.clientWidth:0);
var height=max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight:0, body ? body.clientHeight:0);
var x=-winScroll.scrollLeft + getWindowScrollBarX(element);
var y=-winScroll.scrollTop;
if(getComputedStyle$1(body||html).direction==='rtl'){
x +=max(html.clientWidth, body ? body.clientWidth:0) - width;
}
return {
width: width,
height: height,
x: x,
y: y
};}
function isScrollParent(element){
var _getComputedStyle=getComputedStyle$1(element),
overflow=_getComputedStyle.overflow,
overflowX=_getComputedStyle.overflowX,
overflowY=_getComputedStyle.overflowY;
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
}
function getScrollParent(node){
if(['html', 'body', '#document'].indexOf(getNodeName(node)) >=0){
return node.ownerDocument.body;
}
if(isHTMLElement(node)&&isScrollParent(node)){
return node;
}
return getScrollParent(getParentNode(node));
}
function listScrollParents(element, list){
var _element$ownerDocumen;
if(list===void 0){
list=[];
}
var scrollParent=getScrollParent(element);
var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null ? void 0:_element$ownerDocumen.body);
var win=getWindow(scrollParent);
var target=isBody ? [win].concat(win.visualViewport||[], isScrollParent(scrollParent) ? scrollParent:[]):scrollParent;
var updatedList=list.concat(target);
return isBody ? updatedList :
updatedList.concat(listScrollParents(getParentNode(target)));
}
function rectToClientRect(rect){
return Object.assign({}, rect, {
left: rect.x,
top: rect.y,
right: rect.x + rect.width,
bottom: rect.y + rect.height
});
}
function getInnerBoundingClientRect(element){
var rect=getBoundingClientRect(element);
rect.top=rect.top + element.clientTop;
rect.left=rect.left + element.clientLeft;
rect.bottom=rect.top + element.clientHeight;
rect.right=rect.left + element.clientWidth;
rect.width=element.clientWidth;
rect.height=element.clientHeight;
rect.x=rect.left;
rect.y=rect.top;
return rect;
}
function getClientRectFromMixedType(element, clippingParent){
return clippingParent===viewport ? rectToClientRect(getViewportRect(element)):isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent):rectToClientRect(getDocumentRect(getDocumentElement(element)));
}
function getClippingParents(element){
var clippingParents=listScrollParents(getParentNode(element));
var canEscapeClipping=['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >=0;
var clipperElement=canEscapeClipping&&isHTMLElement(element) ? getOffsetParent(element):element;
if(!isElement(clipperElement)){
return [];
} // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
return clippingParents.filter(function (clippingParent){
return isElement(clippingParent)&&contains(clippingParent, clipperElement)&&getNodeName(clippingParent)!=='body';
});
}
function getClippingRect(element, boundary, rootBoundary){
var mainClippingParents=boundary==='clippingParents' ? getClippingParents(element):[].concat(boundary);
var clippingParents=[].concat(mainClippingParents, [rootBoundary]);
var firstClippingParent=clippingParents[0];
var clippingRect=clippingParents.reduce(function (accRect, clippingParent){
var rect=getClientRectFromMixedType(element, clippingParent);
accRect.top=max(rect.top, accRect.top);
accRect.right=min(rect.right, accRect.right);
accRect.bottom=min(rect.bottom, accRect.bottom);
accRect.left=max(rect.left, accRect.left);
return accRect;
}, getClientRectFromMixedType(element, firstClippingParent));
clippingRect.width=clippingRect.right - clippingRect.left;
clippingRect.height=clippingRect.bottom - clippingRect.top;
clippingRect.x=clippingRect.left;
clippingRect.y=clippingRect.top;
return clippingRect;
}
function getVariation(placement){
return placement.split('-')[1];
}
function computeOffsets(_ref){
var reference=_ref.reference,
element=_ref.element,
placement=_ref.placement;
var basePlacement=placement ? getBasePlacement(placement):null;
var variation=placement ? getVariation(placement):null;
var commonX=reference.x + reference.width / 2 - element.width / 2;
var commonY=reference.y + reference.height / 2 - element.height / 2;
var offsets;
switch (basePlacement){
case top:
offsets={
x: commonX,
y: reference.y - element.height
};
break;
case bottom:
offsets={
x: commonX,
y: reference.y + reference.height
};
break;
case right:
offsets={
x: reference.x + reference.width,
y: commonY
};
break;
case left:
offsets={
x: reference.x - element.width,
y: commonY
};
break;
default:
offsets={
x: reference.x,
y: reference.y
};}
var mainAxis=basePlacement ? getMainAxisFromPlacement(basePlacement):null;
if(mainAxis!=null){
var len=mainAxis==='y' ? 'height':'width';
switch (variation){
case start:
offsets[mainAxis]=offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
break;
case end:
offsets[mainAxis]=offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
break;
}}
return offsets;
}
function detectOverflow(state, options){
if(options===void 0){
options={};}
var _options=options,
_options$placement=_options.placement,
placement=_options$placement===void 0 ? state.placement:_options$placement,
_options$boundary=_options.boundary,
boundary=_options$boundary===void 0 ? clippingParents:_options$boundary,
_options$rootBoundary=_options.rootBoundary,
rootBoundary=_options$rootBoundary===void 0 ? viewport:_options$rootBoundary,
_options$elementConte=_options.elementContext,
elementContext=_options$elementConte===void 0 ? popper:_options$elementConte,
_options$altBoundary=_options.altBoundary,
altBoundary=_options$altBoundary===void 0 ? false:_options$altBoundary,
_options$padding=_options.padding,
padding=_options$padding===void 0 ? 0:_options$padding;
var paddingObject=mergePaddingObject(typeof padding!=='number' ? padding:expandToHashMap(padding, basePlacements));
var altContext=elementContext===popper ? reference:popper;
var referenceElement=state.elements.reference;
var popperRect=state.rects.popper;
var element=state.elements[altBoundary ? altContext:elementContext];
var clippingClientRect=getClippingRect(isElement(element) ? element:element.contextElement||getDocumentElement(state.elements.popper), boundary, rootBoundary);
var referenceClientRect=getBoundingClientRect(referenceElement);
var popperOffsets=computeOffsets({
reference: referenceClientRect,
element: popperRect,
strategy: 'absolute',
placement: placement
});
var popperClientRect=rectToClientRect(Object.assign({}, popperRect, popperOffsets));
var elementClientRect=elementContext===popper ? popperClientRect:referenceClientRect;
var overflowOffsets={
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
};
var offsetData=state.modifiersData.offset;
if(elementContext===popper&&offsetData){
var offset=offsetData[placement];
Object.keys(overflowOffsets).forEach(function (key){
var multiply=[right, bottom].indexOf(key) >=0 ? 1:-1;
var axis=[top, bottom].indexOf(key) >=0 ? 'y':'x';
overflowOffsets[key] +=offset[axis] * multiply;
});
}
return overflowOffsets;
}
function computeAutoPlacement(state, options){
if(options===void 0){
options={};}
var _options=options,
placement=_options.placement,
boundary=_options.boundary,
rootBoundary=_options.rootBoundary,
padding=_options.padding,
flipVariations=_options.flipVariations,
_options$allowedAutoP=_options.allowedAutoPlacements,
allowedAutoPlacements=_options$allowedAutoP===void 0 ? placements:_options$allowedAutoP;
var variation=getVariation(placement);
var placements$1=variation ? flipVariations ? variationPlacements:variationPlacements.filter(function (placement){
return getVariation(placement)===variation;
}):basePlacements;
var allowedPlacements=placements$1.filter(function (placement){
return allowedAutoPlacements.indexOf(placement) >=0;
});
if(allowedPlacements.length===0){
allowedPlacements=placements$1;
}
var overflows=allowedPlacements.reduce(function (acc, placement){
acc[placement]=detectOverflow(state, {
placement: placement,
boundary: boundary,
rootBoundary: rootBoundary,
padding: padding
})[getBasePlacement(placement)];
return acc;
}, {});
return Object.keys(overflows).sort(function (a, b){
return overflows[a] - overflows[b];
});
}
function getExpandedFallbackPlacements(placement){
if(getBasePlacement(placement)===auto){
return [];
}
var oppositePlacement=getOppositePlacement(placement);
return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
}
function flip(_ref){
var state=_ref.state,
options=_ref.options,
name=_ref.name;
if(state.modifiersData[name]._skip){
return;
}
var _options$mainAxis=options.mainAxis,
checkMainAxis=_options$mainAxis===void 0 ? true:_options$mainAxis,
_options$altAxis=options.altAxis,
checkAltAxis=_options$altAxis===void 0 ? true:_options$altAxis,
specifiedFallbackPlacements=options.fallbackPlacements,
padding=options.padding,
boundary=options.boundary,
rootBoundary=options.rootBoundary,
altBoundary=options.altBoundary,
_options$flipVariatio=options.flipVariations,
flipVariations=_options$flipVariatio===void 0 ? true:_options$flipVariatio,
allowedAutoPlacements=options.allowedAutoPlacements;
var preferredPlacement=state.options.placement;
var basePlacement=getBasePlacement(preferredPlacement);
var isBasePlacement=basePlacement===preferredPlacement;
var fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipVariations ? [getOppositePlacement(preferredPlacement)]:getExpandedFallbackPlacements(preferredPlacement));
var placements=[preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement){
return acc.concat(getBasePlacement(placement)===auto ? computeAutoPlacement(state, {
placement: placement,
boundary: boundary,
rootBoundary: rootBoundary,
padding: padding,
flipVariations: flipVariations,
allowedAutoPlacements: allowedAutoPlacements
}):placement);
}, []);
var referenceRect=state.rects.reference;
var popperRect=state.rects.popper;
var checksMap=new Map();
var makeFallbackChecks=true;
var firstFittingPlacement=placements[0];
for (var i=0; i < placements.length; i++){
var placement=placements[i];
var _basePlacement=getBasePlacement(placement);
var isStartVariation=getVariation(placement)===start;
var isVertical=[top, bottom].indexOf(_basePlacement) >=0;
var len=isVertical ? 'width':'height';
var overflow=detectOverflow(state, {
placement: placement,
boundary: boundary,
rootBoundary: rootBoundary,
altBoundary: altBoundary,
padding: padding
});
var mainVariationSide=isVertical ? isStartVariation ? right:left:isStartVariation ? bottom:top;
if(referenceRect[len] > popperRect[len]){
mainVariationSide=getOppositePlacement(mainVariationSide);
}
var altVariationSide=getOppositePlacement(mainVariationSide);
var checks=[];
if(checkMainAxis){
checks.push(overflow[_basePlacement] <=0);
}
if(checkAltAxis){
checks.push(overflow[mainVariationSide] <=0, overflow[altVariationSide] <=0);
}
if(checks.every(function (check){
return check;
})){
firstFittingPlacement=placement;
makeFallbackChecks=false;
break;
}
checksMap.set(placement, checks);
}
if(makeFallbackChecks){
var numberOfChecks=flipVariations ? 3:1;
var _loop=function _loop(_i){
var fittingPlacement=placements.find(function (placement){
var checks=checksMap.get(placement);
if(checks){
return checks.slice(0, _i).every(function (check){
return check;
});
}});
if(fittingPlacement){
firstFittingPlacement=fittingPlacement;
return "break";
}};
for (var _i=numberOfChecks; _i > 0; _i--){
var _ret=_loop(_i);
if(_ret==="break") break;
}}
if(state.placement!==firstFittingPlacement){
state.modifiersData[name]._skip=true;
state.placement=firstFittingPlacement;
state.reset=true;
}}
var flip$1={
name: 'flip',
enabled: true,
phase: 'main',
fn: flip,
requiresIfExists: ['offset'],
data: {
_skip: false
}};
function getSideOffsets(overflow, rect, preventedOffsets){
if(preventedOffsets===void 0){
preventedOffsets={
x: 0,
y: 0
};}
return {
top: overflow.top - rect.height - preventedOffsets.y,
right: overflow.right - rect.width + preventedOffsets.x,
bottom: overflow.bottom - rect.height + preventedOffsets.y,
left: overflow.left - rect.width - preventedOffsets.x
};}
function isAnySideFullyClipped(overflow){
return [top, right, bottom, left].some(function (side){
return overflow[side] >=0;
});
}
function hide$1(_ref){
var state=_ref.state,
name=_ref.name;
var referenceRect=state.rects.reference;
var popperRect=state.rects.popper;
var preventedOffsets=state.modifiersData.preventOverflow;
var referenceOverflow=detectOverflow(state, {
elementContext: 'reference'
});
var popperAltOverflow=detectOverflow(state, {
altBoundary: true
});
var referenceClippingOffsets=getSideOffsets(referenceOverflow, referenceRect);
var popperEscapeOffsets=getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
var isReferenceHidden=isAnySideFullyClipped(referenceClippingOffsets);
var hasPopperEscaped=isAnySideFullyClipped(popperEscapeOffsets);
state.modifiersData[name]={
referenceClippingOffsets: referenceClippingOffsets,
popperEscapeOffsets: popperEscapeOffsets,
isReferenceHidden: isReferenceHidden,
hasPopperEscaped: hasPopperEscaped
};
state.attributes.popper=Object.assign({}, state.attributes.popper, {
'data-popper-reference-hidden': isReferenceHidden,
'data-popper-escaped': hasPopperEscaped
});
}
var hide$2={
name: 'hide',
enabled: true,
phase: 'main',
requiresIfExists: ['preventOverflow'],
fn: hide$1
};
function distanceAndSkiddingToXY(placement, rects, offset){
var basePlacement=getBasePlacement(placement);
var invertDistance=[left, top].indexOf(basePlacement) >=0 ? -1:1;
var _ref=typeof offset==='function' ? offset(Object.assign({}, rects, {
placement: placement
})):offset,
skidding=_ref[0],
distance=_ref[1];
skidding=skidding||0;
distance=(distance||0) * invertDistance;
return [left, right].indexOf(basePlacement) >=0 ? {
x: distance,
y: skidding
}:{
x: skidding,
y: distance
};}
function offset(_ref2){
var state=_ref2.state,
options=_ref2.options,
name=_ref2.name;
var _options$offset=options.offset,
offset=_options$offset===void 0 ? [0, 0]:_options$offset;
var data=placements.reduce(function (acc, placement){
acc[placement]=distanceAndSkiddingToXY(placement, state.rects, offset);
return acc;
}, {});
var _data$state$placement=data[state.placement],
x=_data$state$placement.x,
y=_data$state$placement.y;
if(state.modifiersData.popperOffsets!=null){
state.modifiersData.popperOffsets.x +=x;
state.modifiersData.popperOffsets.y +=y;
}
state.modifiersData[name]=data;
}
var offset$1={
name: 'offset',
enabled: true,
phase: 'main',
requires: ['popperOffsets'],
fn: offset
};
function popperOffsets(_ref){
var state=_ref.state,
name=_ref.name;
state.modifiersData[name]=computeOffsets({
reference: state.rects.reference,
element: state.rects.popper,
strategy: 'absolute',
placement: state.placement
});
}
var popperOffsets$1={
name: 'popperOffsets',
enabled: true,
phase: 'read',
fn: popperOffsets,
data: {}};
function getAltAxis(axis){
return axis==='x' ? 'y':'x';
}
function preventOverflow(_ref){
var state=_ref.state,
options=_ref.options,
name=_ref.name;
var _options$mainAxis=options.mainAxis,
checkMainAxis=_options$mainAxis===void 0 ? true:_options$mainAxis,
_options$altAxis=options.altAxis,
checkAltAxis=_options$altAxis===void 0 ? false:_options$altAxis,
boundary=options.boundary,
rootBoundary=options.rootBoundary,
altBoundary=options.altBoundary,
padding=options.padding,
_options$tether=options.tether,
tether=_options$tether===void 0 ? true:_options$tether,
_options$tetherOffset=options.tetherOffset,
tetherOffset=_options$tetherOffset===void 0 ? 0:_options$tetherOffset;
var overflow=detectOverflow(state, {
boundary: boundary,
rootBoundary: rootBoundary,
padding: padding,
altBoundary: altBoundary
});
var basePlacement=getBasePlacement(state.placement);
var variation=getVariation(state.placement);
var isBasePlacement = !variation;
var mainAxis=getMainAxisFromPlacement(basePlacement);
var altAxis=getAltAxis(mainAxis);
var popperOffsets=state.modifiersData.popperOffsets;
var referenceRect=state.rects.reference;
var popperRect=state.rects.popper;
var tetherOffsetValue=typeof tetherOffset==='function' ? tetherOffset(Object.assign({}, state.rects, {
placement: state.placement
})):tetherOffset;
var data={
x: 0,
y: 0
};
if(!popperOffsets){
return;
}
if(checkMainAxis||checkAltAxis){
var mainSide=mainAxis==='y' ? top:left;
var altSide=mainAxis==='y' ? bottom:right;
var len=mainAxis==='y' ? 'height':'width';
var offset=popperOffsets[mainAxis];
var min$1=popperOffsets[mainAxis] + overflow[mainSide];
var max$1=popperOffsets[mainAxis] - overflow[altSide];
var additive=tether ? -popperRect[len] / 2:0;
var minLen=variation===start ? referenceRect[len]:popperRect[len];
var maxLen=variation===start ? -popperRect[len]:-referenceRect[len];
var arrowElement=state.elements.arrow;
var arrowRect=tether&&arrowElement ? getLayoutRect(arrowElement):{
width: 0,
height: 0
};
var arrowPaddingObject=state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding:getFreshSideObject();
var arrowPaddingMin=arrowPaddingObject[mainSide];
var arrowPaddingMax=arrowPaddingObject[altSide];
var arrowLen=within(0, referenceRect[len], arrowRect[len]);
var minOffset=isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue:minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
var maxOffset=isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue:maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
var arrowOffsetParent=state.elements.arrow&&getOffsetParent(state.elements.arrow);
var clientOffset=arrowOffsetParent ? mainAxis==='y' ? arrowOffsetParent.clientTop||0:arrowOffsetParent.clientLeft||0:0;
var offsetModifierValue=state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis]:0;
var tetherMin=popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
var tetherMax=popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
if(checkMainAxis){
var preventedOffset=within(tether ? min(min$1, tetherMin):min$1, offset, tether ? max(max$1, tetherMax):max$1);
popperOffsets[mainAxis]=preventedOffset;
data[mainAxis]=preventedOffset - offset;
}
if(checkAltAxis){
var _mainSide=mainAxis==='x' ? top:left;
var _altSide=mainAxis==='x' ? bottom:right;
var _offset=popperOffsets[altAxis];
var _min=_offset + overflow[_mainSide];
var _max=_offset - overflow[_altSide];
var _preventedOffset=within(tether ? min(_min, tetherMin):_min, _offset, tether ? max(_max, tetherMax):_max);
popperOffsets[altAxis]=_preventedOffset;
data[altAxis]=_preventedOffset - _offset;
}}
state.modifiersData[name]=data;
}
var preventOverflow$1={
name: 'preventOverflow',
enabled: true,
phase: 'main',
fn: preventOverflow,
requiresIfExists: ['offset']
};
function getHTMLElementScroll(element){
return {
scrollLeft: element.scrollLeft,
scrollTop: element.scrollTop
};}
function getNodeScroll(node){
if(node===getWindow(node)||!isHTMLElement(node)){
return getWindowScroll(node);
}else{
return getHTMLElementScroll(node);
}}
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed){
if(isFixed===void 0){
isFixed=false;
}
var documentElement=getDocumentElement(offsetParent);
var rect=getBoundingClientRect(elementOrVirtualElement);
var isOffsetParentAnElement=isHTMLElement(offsetParent);
var scroll={
scrollLeft: 0,
scrollTop: 0
};
var offsets={
x: 0,
y: 0
};
if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){
if(getNodeName(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078
isScrollParent(documentElement)){
scroll=getNodeScroll(offsetParent);
}
if(isHTMLElement(offsetParent)){
offsets=getBoundingClientRect(offsetParent);
offsets.x +=offsetParent.clientLeft;
offsets.y +=offsetParent.clientTop;
}else if(documentElement){
offsets.x=getWindowScrollBarX(documentElement);
}}
return {
x: rect.left + scroll.scrollLeft - offsets.x,
y: rect.top + scroll.scrollTop - offsets.y,
width: rect.width,
height: rect.height
};}
function order(modifiers){
var map=new Map();
var visited=new Set();
var result=[];
modifiers.forEach(function (modifier){
map.set(modifier.name, modifier);
});
function sort(modifier){
visited.add(modifier.name);
var requires=[].concat(modifier.requires||[], modifier.requiresIfExists||[]);
requires.forEach(function (dep){
if(!visited.has(dep)){
var depModifier=map.get(dep);
if(depModifier){
sort(depModifier);
}}
});
result.push(modifier);
}
modifiers.forEach(function (modifier){
if(!visited.has(modifier.name)){
sort(modifier);
}});
return result;
}
function orderModifiers(modifiers){
var orderedModifiers=order(modifiers);
return modifierPhases.reduce(function (acc, phase){
return acc.concat(orderedModifiers.filter(function (modifier){
return modifier.phase===phase;
}));
}, []);
}
function debounce(fn){
var pending;
return function (){
if(!pending){
pending=new Promise(function (resolve){
Promise.resolve().then(function (){
pending=undefined;
resolve(fn());
});
});
}
return pending;
};}
function mergeByName(modifiers){
var merged=modifiers.reduce(function (merged, current){
var existing=merged[current.name];
merged[current.name]=existing ? Object.assign({}, existing, current, {
options: Object.assign({}, existing.options, current.options),
data: Object.assign({}, existing.data, current.data)
}):current;
return merged;
}, {});
return Object.keys(merged).map(function (key){
return merged[key];
});
}
var DEFAULT_OPTIONS={
placement: 'bottom',
modifiers: [],
strategy: 'absolute'
};
function areValidElements(){
for (var _len=arguments.length, args=new Array(_len), _key=0; _key < _len; _key++){
args[_key]=arguments[_key];
}
return !args.some(function (element){
return !(element&&typeof element.getBoundingClientRect==='function');
});
}
function popperGenerator(generatorOptions){
if(generatorOptions===void 0){
generatorOptions={};}
var _generatorOptions=generatorOptions,
_generatorOptions$def=_generatorOptions.defaultModifiers,
defaultModifiers=_generatorOptions$def===void 0 ? []:_generatorOptions$def,
_generatorOptions$def2=_generatorOptions.defaultOptions,
defaultOptions=_generatorOptions$def2===void 0 ? DEFAULT_OPTIONS:_generatorOptions$def2;
return function createPopper(reference, popper, options){
if(options===void 0){
options=defaultOptions;
}
var state={
placement: 'bottom',
orderedModifiers: [],
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
modifiersData: {},
elements: {
reference: reference,
popper: popper
},
attributes: {},
styles: {}};
var effectCleanupFns=[];
var isDestroyed=false;
var instance={
state: state,
setOptions: function setOptions(options){
cleanupModifierEffects();
state.options=Object.assign({}, defaultOptions, state.options, options);
state.scrollParents={
reference: isElement(reference) ? listScrollParents(reference):reference.contextElement ? listScrollParents(reference.contextElement):[],
popper: listScrollParents(popper)
};
var orderedModifiers=orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers)));
state.orderedModifiers=orderedModifiers.filter(function (m){
return m.enabled;
});
runModifierEffects();
return instance.update();
},
forceUpdate: function forceUpdate(){
if(isDestroyed){
return;
}
var _state$elements=state.elements,
reference=_state$elements.reference,
popper=_state$elements.popper;
if(!areValidElements(reference, popper)){
return;
}
state.rects={
reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy==='fixed'),
popper: getLayoutRect(popper)
};
state.reset=false;
state.placement=state.options.placement;
state.orderedModifiers.forEach(function (modifier){
return state.modifiersData[modifier.name]=Object.assign({}, modifier.data);
});
for (var index=0; index < state.orderedModifiers.length; index++){
if(state.reset===true){
state.reset=false;
index=-1;
continue;
}
var _state$orderedModifie=state.orderedModifiers[index],
fn=_state$orderedModifie.fn,
_state$orderedModifie2=_state$orderedModifie.options,
_options=_state$orderedModifie2===void 0 ? {}:_state$orderedModifie2,
name=_state$orderedModifie.name;
if(typeof fn==='function'){
state=fn({
state: state,
options: _options,
name: name,
instance: instance
})||state;
}}
},
update: debounce(function (){
return new Promise(function (resolve){
instance.forceUpdate();
resolve(state);
});
}),
destroy: function destroy(){
cleanupModifierEffects();
isDestroyed=true;
}};
if(!areValidElements(reference, popper)){
return instance;
}
instance.setOptions(options).then(function (state){
if(!isDestroyed&&options.onFirstUpdate){
options.onFirstUpdate(state);
}});
function runModifierEffects(){
state.orderedModifiers.forEach(function (_ref3){
var name=_ref3.name,
_ref3$options=_ref3.options,
options=_ref3$options===void 0 ? {}:_ref3$options,
effect=_ref3.effect;
if(typeof effect==='function'){
var cleanupFn=effect({
state: state,
name: name,
instance: instance,
options: options
});
var noopFn=function noopFn(){};
effectCleanupFns.push(cleanupFn||noopFn);
}});
}
function cleanupModifierEffects(){
effectCleanupFns.forEach(function (fn){
return fn();
});
effectCleanupFns=[];
}
return instance;
};}
var createPopper$2=popperGenerator();
var defaultModifiers$1=[eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
var createPopper$1=popperGenerator({
defaultModifiers: defaultModifiers$1
});
var defaultModifiers=[eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$2];
var createPopper=popperGenerator({
defaultModifiers: defaultModifiers
});
var Popper=Object.freeze({
__proto__: null,
popperGenerator: popperGenerator,
detectOverflow: detectOverflow,
createPopperBase: createPopper$2,
createPopper: createPopper,
createPopperLite: createPopper$1,
top: top,
bottom: bottom,
right: right,
left: left,
auto: auto,
basePlacements: basePlacements,
start: start,
end: end,
clippingParents: clippingParents,
viewport: viewport,
popper: popper,
reference: reference,
variationPlacements: variationPlacements,
placements: placements,
beforeRead: beforeRead,
read: read,
afterRead: afterRead,
beforeMain: beforeMain,
main: main,
afterMain: afterMain,
beforeWrite: beforeWrite,
write: write,
afterWrite: afterWrite,
modifierPhases: modifierPhases,
applyStyles: applyStyles$1,
arrow: arrow$1,
computeStyles: computeStyles$1,
eventListeners: eventListeners,
flip: flip$1,
hide: hide$2,
offset: offset$1,
popperOffsets: popperOffsets$1,
preventOverflow: preventOverflow$1
});
const NAME$8='dropdown';
const DATA_KEY$7='bs.dropdown';
const EVENT_KEY$7=`.${DATA_KEY$7}`;
const DATA_API_KEY$4='.data-api';
const ESCAPE_KEY$2='Escape';
const SPACE_KEY='Space';
const TAB_KEY='Tab';
const ARROW_UP_KEY='ArrowUp';
const ARROW_DOWN_KEY='ArrowDown';
const RIGHT_MOUSE_BUTTON=2;
const REGEXP_KEYDOWN=new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
const EVENT_HIDE$4=`hide${EVENT_KEY$7}`;
const EVENT_HIDDEN$4=`hidden${EVENT_KEY$7}`;
const EVENT_SHOW$4=`show${EVENT_KEY$7}`;
const EVENT_SHOWN$4=`shown${EVENT_KEY$7}`;
const EVENT_CLICK=`click${EVENT_KEY$7}`;
const EVENT_CLICK_DATA_API$3=`click${EVENT_KEY$7}${DATA_API_KEY$4}`;
const EVENT_KEYDOWN_DATA_API=`keydown${EVENT_KEY$7}${DATA_API_KEY$4}`;
const EVENT_KEYUP_DATA_API=`keyup${EVENT_KEY$7}${DATA_API_KEY$4}`;
const CLASS_NAME_SHOW$7='show';
const CLASS_NAME_DROPUP='dropup';
const CLASS_NAME_DROPEND='dropend';
const CLASS_NAME_DROPSTART='dropstart';
const CLASS_NAME_NAVBAR='navbar';
const SELECTOR_DATA_TOGGLE$3='[data-bs-toggle="dropdown"]';
const SELECTOR_MENU='.dropdown-menu';
const SELECTOR_NAVBAR_NAV='.navbar-nav';
const SELECTOR_VISIBLE_ITEMS='.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
const PLACEMENT_TOP=isRTL() ? 'top-end':'top-start';
const PLACEMENT_TOPEND=isRTL() ? 'top-start':'top-end';
const PLACEMENT_BOTTOM=isRTL() ? 'bottom-end':'bottom-start';
const PLACEMENT_BOTTOMEND=isRTL() ? 'bottom-start':'bottom-end';
const PLACEMENT_RIGHT=isRTL() ? 'left-start':'right-start';
const PLACEMENT_LEFT=isRTL() ? 'right-start':'left-start';
const Default$7={
offset: [0, 2],
boundary: 'clippingParents',
reference: 'toggle',
display: 'dynamic',
popperConfig: null,
autoClose: true
};
const DefaultType$7={
offset: '(array|string|function)',
boundary: '(string|element)',
reference: '(string|element|object)',
display: 'string',
popperConfig: '(null|object|function)',
autoClose: '(boolean|string)'
};
class Dropdown extends BaseComponent {
constructor(element, config){
super(element);
this._popper=null;
this._config=this._getConfig(config);
this._menu=this._getMenuElement();
this._inNavbar=this._detectNavbar();
this._addEventListeners();
}
static get Default(){
return Default$7;
}
static get DefaultType(){
return DefaultType$7;
}
static get NAME(){
return NAME$8;
}
toggle(){
if(isDisabled(this._element)){
return;
}
const isActive=this._element.classList.contains(CLASS_NAME_SHOW$7);
if(isActive){
this.hide();
return;
}
this.show();
}
show(){
if(isDisabled(this._element)||this._menu.classList.contains(CLASS_NAME_SHOW$7)){
return;
}
const parent=Dropdown.getParentFromElement(this._element);
const relatedTarget={
relatedTarget: this._element
};
const showEvent=EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget);
if(showEvent.defaultPrevented){
return;
}
if(this._inNavbar){
Manipulator.setDataAttribute(this._menu, 'popper', 'none');
}else{
if(typeof Popper==='undefined'){
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement=this._element;
if(this._config.reference==='parent'){
referenceElement=parent;
}else if(isElement$1(this._config.reference)){
referenceElement=getElement(this._config.reference);
}else if(typeof this._config.reference==='object'){
referenceElement=this._config.reference;
}
const popperConfig=this._getPopperConfig();
const isDisplayStatic=popperConfig.modifiers.find(modifier=> modifier.name==='applyStyles'&&modifier.enabled===false);
this._popper=createPopper(referenceElement, this._menu, popperConfig);
if(isDisplayStatic){
Manipulator.setDataAttribute(this._menu, 'popper', 'static');
}}
if('ontouchstart' in document.documentElement&&!parent.closest(SELECTOR_NAVBAR_NAV)){
[].concat(...document.body.children).forEach(elem=> EventHandler.on(elem, 'mouseover', noop));
}
this._element.focus();
this._element.setAttribute('aria-expanded', true);
this._menu.classList.toggle(CLASS_NAME_SHOW$7);
this._element.classList.toggle(CLASS_NAME_SHOW$7);
EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
}
hide(){
if(isDisabled(this._element)||!this._menu.classList.contains(CLASS_NAME_SHOW$7)){
return;
}
const relatedTarget={
relatedTarget: this._element
};
this._completeHide(relatedTarget);
}
dispose(){
if(this._popper){
this._popper.destroy();
}
super.dispose();
}
update(){
this._inNavbar=this._detectNavbar();
if(this._popper){
this._popper.update();
}}
_addEventListeners(){
EventHandler.on(this._element, EVENT_CLICK, event=> {
event.preventDefault();
this.toggle();
});
}
_completeHide(relatedTarget){
const hideEvent=EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
if(hideEvent.defaultPrevented){
return;
}
if('ontouchstart' in document.documentElement){
[].concat(...document.body.children).forEach(elem=> EventHandler.off(elem, 'mouseover', noop));
}
if(this._popper){
this._popper.destroy();
}
this._menu.classList.remove(CLASS_NAME_SHOW$7);
this._element.classList.remove(CLASS_NAME_SHOW$7);
this._element.setAttribute('aria-expanded', 'false');
Manipulator.removeDataAttribute(this._menu, 'popper');
EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);
}
_getConfig(config){
config={ ...this.constructor.Default,
...Manipulator.getDataAttributes(this._element),
...config
};
typeCheckConfig(NAME$8, config, this.constructor.DefaultType);
if(typeof config.reference==='object'&&!isElement$1(config.reference)&&typeof config.reference.getBoundingClientRect!=='function'){
throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
}
return config;
}
_getMenuElement(){
return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
}
_getPlacement(){
const parentDropdown=this._element.parentNode;
if(parentDropdown.classList.contains(CLASS_NAME_DROPEND)){
return PLACEMENT_RIGHT;
}
if(parentDropdown.classList.contains(CLASS_NAME_DROPSTART)){
return PLACEMENT_LEFT;
}
const isEnd=getComputedStyle(this._menu).getPropertyValue('--bs-position').trim()==='end';
if(parentDropdown.classList.contains(CLASS_NAME_DROPUP)){
return isEnd ? PLACEMENT_TOPEND:PLACEMENT_TOP;
}
return isEnd ? PLACEMENT_BOTTOMEND:PLACEMENT_BOTTOM;
}
_detectNavbar(){
return this._element.closest(`.${CLASS_NAME_NAVBAR}`)!==null;
}
_getOffset(){
const {
offset
}=this._config;
if(typeof offset==='string'){
return offset.split(',').map(val=> Number.parseInt(val, 10));
}
if(typeof offset==='function'){
return popperData=> offset(popperData, this._element);
}
return offset;
}
_getPopperConfig(){
const defaultBsPopperConfig={
placement: this._getPlacement(),
modifiers: [{
name: 'preventOverflow',
options: {
boundary: this._config.boundary
}}, {
name: 'offset',
options: {
offset: this._getOffset()
}}]
};
if(this._config.display==='static'){
defaultBsPopperConfig.modifiers=[{
name: 'applyStyles',
enabled: false
}];
}
return { ...defaultBsPopperConfig,
...(typeof this._config.popperConfig==='function' ? this._config.popperConfig(defaultBsPopperConfig):this._config.popperConfig)
};}
_selectMenuItem(event){
const items=SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
if(!items.length){
return;
}
let index=items.indexOf(event.target);
if(event.key===ARROW_UP_KEY&&index > 0){
index--;
}
if(event.key===ARROW_DOWN_KEY&&index < items.length - 1){
index++;
}
index=index===-1 ? 0:index;
items[index].focus();
}
static dropdownInterface(element, config){
let data=Data.get(element, DATA_KEY$7);
const _config=typeof config==='object' ? config:null;
if(!data){
data=new Dropdown(element, _config);
}
if(typeof config==='string'){
if(typeof data[config]==='undefined'){
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}}
static jQueryInterface(config){
return this.each(function (){
Dropdown.dropdownInterface(this, config);
});
}
static clearMenus(event){
if(event&&(event.button===RIGHT_MOUSE_BUTTON||event.type==='keyup'&&event.key!==TAB_KEY)){
return;
}
const toggles=SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
for (let i=0, len=toggles.length; i < len; i++){
const context=Data.get(toggles[i], DATA_KEY$7);
if(!context||context._config.autoClose===false){
continue;
}
if(!context._element.classList.contains(CLASS_NAME_SHOW$7)){
continue;
}
const relatedTarget={
relatedTarget: context._element
};
if(event){
const composedPath=event.composedPath();
const isMenuTarget=composedPath.includes(context._menu);
if(composedPath.includes(context._element)||context._config.autoClose==='inside'&&!isMenuTarget||context._config.autoClose==='outside'&&isMenuTarget){
continue;
}
if(context._menu.contains(event.target)&&(event.type==='keyup'&&event.key===TAB_KEY||/input|select|option|textarea|form/i.test(event.target.tagName))){
continue;
}
if(event.type==='click'){
relatedTarget.clickEvent=event;
}}
context._completeHide(relatedTarget);
}}
static getParentFromElement(element){
return getElementFromSelector(element)||element.parentNode;
}
static dataApiKeydownHandler(event){
if(/input|textarea/i.test(event.target.tagName) ? event.key===SPACE_KEY||event.key!==ESCAPE_KEY$2&&(event.key!==ARROW_DOWN_KEY&&event.key!==ARROW_UP_KEY||event.target.closest(SELECTOR_MENU)):!REGEXP_KEYDOWN.test(event.key)){
return;
}
const isActive=this.classList.contains(CLASS_NAME_SHOW$7);
if(!isActive&&event.key===ESCAPE_KEY$2){
return;
}
event.preventDefault();
event.stopPropagation();
if(isDisabled(this)){
return;
}
const getToggleButton=()=> this.matches(SELECTOR_DATA_TOGGLE$3) ? this:SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
if(event.key===ESCAPE_KEY$2){
getToggleButton().focus();
Dropdown.clearMenus();
return;
}
if(!isActive&&(event.key===ARROW_UP_KEY||event.key===ARROW_DOWN_KEY)){
getToggleButton().click();
return;
}
if(!isActive||event.key===SPACE_KEY){
Dropdown.clearMenus();
return;
}
Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
}}
EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event){
event.preventDefault();
Dropdown.dropdownInterface(this);
});
defineJQueryPlugin(Dropdown);
const SELECTOR_FIXED_CONTENT='.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
const SELECTOR_STICKY_CONTENT='.sticky-top';
const getWidth=()=> {
const documentWidth=document.documentElement.clientWidth;
return Math.abs(window.innerWidth - documentWidth);
};
const hide=(width=getWidth())=> {
_disableOverFlow();
_setElementAttributes('body', 'paddingRight', calculatedValue=> calculatedValue + width);
_setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue=> calculatedValue + width);
_setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue=> calculatedValue - width);
};
const _disableOverFlow=()=> {
const actualValue=document.body.style.overflow;
if(actualValue){
Manipulator.setDataAttribute(document.body, 'overflow', actualValue);
}
document.body.style.overflow='hidden';
};
const _setElementAttributes=(selector, styleProp, callback)=> {
const scrollbarWidth=getWidth();
SelectorEngine.find(selector).forEach(element=> {
if(element!==document.body&&window.innerWidth > element.clientWidth + scrollbarWidth){
return;
}
const actualValue=element.style[styleProp];
const calculatedValue=window.getComputedStyle(element)[styleProp];
Manipulator.setDataAttribute(element, styleProp, actualValue);
element.style[styleProp]=`${callback(Number.parseFloat(calculatedValue))}px`;
});
};
const reset=()=> {
_resetElementAttributes('body', 'overflow');
_resetElementAttributes('body', 'paddingRight');
_resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
_resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
};
const _resetElementAttributes=(selector, styleProp)=> {
SelectorEngine.find(selector).forEach(element=> {
const value=Manipulator.getDataAttribute(element, styleProp);
if(typeof value==='undefined'){
element.style.removeProperty(styleProp);
}else{
Manipulator.removeDataAttribute(element, styleProp);
element.style[styleProp]=value;
}});
};
const Default$6={
isVisible: true,
isAnimated: false,
rootElement: document.body,
clickCallback: null
};
const DefaultType$6={
isVisible: 'boolean',
isAnimated: 'boolean',
rootElement: 'element',
clickCallback: '(function|null)'
};
const NAME$7='backdrop';
const CLASS_NAME_BACKDROP='modal-backdrop';
const CLASS_NAME_FADE$5='fade';
const CLASS_NAME_SHOW$6='show';
const EVENT_MOUSEDOWN=`mousedown.bs.${NAME$7}`;
class Backdrop {
constructor(config){
this._config=this._getConfig(config);
this._isAppended=false;
this._element=null;
}
show(callback){
if(!this._config.isVisible){
execute(callback);
return;
}
this._append();
if(this._config.isAnimated){
reflow(this._getElement());
}
this._getElement().classList.add(CLASS_NAME_SHOW$6);
this._emulateAnimation(()=> {
execute(callback);
});
}
hide(callback){
if(!this._config.isVisible){
execute(callback);
return;
}
this._getElement().classList.remove(CLASS_NAME_SHOW$6);
this._emulateAnimation(()=> {
this.dispose();
execute(callback);
});
}
_getElement(){
if(!this._element){
const backdrop=document.createElement('div');
backdrop.className=CLASS_NAME_BACKDROP;
if(this._config.isAnimated){
backdrop.classList.add(CLASS_NAME_FADE$5);
}
this._element=backdrop;
}
return this._element;
}
_getConfig(config){
config={ ...Default$6,
...(typeof config==='object' ? config:{})
};
config.rootElement=config.rootElement||document.body;
typeCheckConfig(NAME$7, config, DefaultType$6);
return config;
}
_append(){
if(this._isAppended){
return;
}
this._config.rootElement.appendChild(this._getElement());
EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, ()=> {
execute(this._config.clickCallback);
});
this._isAppended=true;
}
dispose(){
if(!this._isAppended){
return;
}
EventHandler.off(this._element, EVENT_MOUSEDOWN);
this._getElement().parentNode.removeChild(this._element);
this._isAppended=false;
}
_emulateAnimation(callback){
if(!this._config.isAnimated){
execute(callback);
return;
}
const backdropTransitionDuration=getTransitionDurationFromElement(this._getElement());
EventHandler.one(this._getElement(), 'transitionend', ()=> execute(callback));
emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
}}
const NAME$6='modal';
const DATA_KEY$6='bs.modal';
const EVENT_KEY$6=`.${DATA_KEY$6}`;
const DATA_API_KEY$3='.data-api';
const ESCAPE_KEY$1='Escape';
const Default$5={
backdrop: true,
keyboard: true,
focus: true
};
const DefaultType$5={
backdrop: '(boolean|string)',
keyboard: 'boolean',
focus: 'boolean'
};
const EVENT_HIDE$3=`hide${EVENT_KEY$6}`;
const EVENT_HIDE_PREVENTED=`hidePrevented${EVENT_KEY$6}`;
const EVENT_HIDDEN$3=`hidden${EVENT_KEY$6}`;
const EVENT_SHOW$3=`show${EVENT_KEY$6}`;
const EVENT_SHOWN$3=`shown${EVENT_KEY$6}`;
const EVENT_FOCUSIN$2=`focusin${EVENT_KEY$6}`;
const EVENT_RESIZE=`resize${EVENT_KEY$6}`;
const EVENT_CLICK_DISMISS$2=`click.dismiss${EVENT_KEY$6}`;
const EVENT_KEYDOWN_DISMISS$1=`keydown.dismiss${EVENT_KEY$6}`;
const EVENT_MOUSEUP_DISMISS=`mouseup.dismiss${EVENT_KEY$6}`;
const EVENT_MOUSEDOWN_DISMISS=`mousedown.dismiss${EVENT_KEY$6}`;
const EVENT_CLICK_DATA_API$2=`click${EVENT_KEY$6}${DATA_API_KEY$3}`;
const CLASS_NAME_OPEN='modal-open';
const CLASS_NAME_FADE$4='fade';
const CLASS_NAME_SHOW$5='show';
const CLASS_NAME_STATIC='modal-static';
const SELECTOR_DIALOG='.modal-dialog';
const SELECTOR_MODAL_BODY='.modal-body';
const SELECTOR_DATA_TOGGLE$2='[data-bs-toggle="modal"]';
const SELECTOR_DATA_DISMISS$2='[data-bs-dismiss="modal"]';
class Modal extends BaseComponent {
constructor(element, config){
super(element);
this._config=this._getConfig(config);
this._dialog=SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
this._backdrop=this._initializeBackDrop();
this._isShown=false;
this._ignoreBackdropClick=false;
this._isTransitioning=false;
}
static get Default(){
return Default$5;
}
static get NAME(){
return NAME$6;
}
toggle(relatedTarget){
return this._isShown ? this.hide():this.show(relatedTarget);
}
show(relatedTarget){
if(this._isShown||this._isTransitioning){
return;
}
if(this._isAnimated()){
this._isTransitioning=true;
}
const showEvent=EventHandler.trigger(this._element, EVENT_SHOW$3, {
relatedTarget
});
if(this._isShown||showEvent.defaultPrevented){
return;
}
this._isShown=true;
hide();
document.body.classList.add(CLASS_NAME_OPEN);
this._adjustDialog();
this._setEscapeEvent();
this._setResizeEvent();
EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event=> this.hide(event));
EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, ()=> {
EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event=> {
if(event.target===this._element){
this._ignoreBackdropClick=true;
}});
});
this._showBackdrop(()=> this._showElement(relatedTarget));
}
hide(event){
if(event){
event.preventDefault();
}
if(!this._isShown||this._isTransitioning){
return;
}
const hideEvent=EventHandler.trigger(this._element, EVENT_HIDE$3);
if(hideEvent.defaultPrevented){
return;
}
this._isShown=false;
const isAnimated=this._isAnimated();
if(isAnimated){
this._isTransitioning=true;
}
this._setEscapeEvent();
this._setResizeEvent();
EventHandler.off(document, EVENT_FOCUSIN$2);
this._element.classList.remove(CLASS_NAME_SHOW$5);
EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
this._queueCallback(()=> this._hideModal(), this._element, isAnimated);
}
dispose(){
[window, this._dialog].forEach(htmlElement=> EventHandler.off(htmlElement, EVENT_KEY$6));
this._backdrop.dispose();
super.dispose();
EventHandler.off(document, EVENT_FOCUSIN$2);
}
handleUpdate(){
this._adjustDialog();
}
_initializeBackDrop(){
return new Backdrop({
isVisible: Boolean(this._config.backdrop),
isAnimated: this._isAnimated()
});
}
_getConfig(config){
config={ ...Default$5,
...Manipulator.getDataAttributes(this._element),
...config
};
typeCheckConfig(NAME$6, config, DefaultType$5);
return config;
}
_showElement(relatedTarget){
const isAnimated=this._isAnimated();
const modalBody=SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE){
document.body.appendChild(this._element);
}
this._element.style.display='block';
this._element.removeAttribute('aria-hidden');
this._element.setAttribute('aria-modal', true);
this._element.setAttribute('role', 'dialog');
this._element.scrollTop=0;
if(modalBody){
modalBody.scrollTop=0;
}
if(isAnimated){
reflow(this._element);
}
this._element.classList.add(CLASS_NAME_SHOW$5);
if(this._config.focus){
this._enforceFocus();
}
const transitionComplete=()=> {
if(this._config.focus){
this._element.focus();
}
this._isTransitioning=false;
EventHandler.trigger(this._element, EVENT_SHOWN$3, {
relatedTarget
});
};
this._queueCallback(transitionComplete, this._dialog, isAnimated);
}
_enforceFocus(){
EventHandler.off(document, EVENT_FOCUSIN$2);
EventHandler.on(document, EVENT_FOCUSIN$2, event=> {
if(document!==event.target&&this._element!==event.target&&!this._element.contains(event.target)){
this._element.focus();
}});
}
_setEscapeEvent(){
if(this._isShown){
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event=> {
if(this._config.keyboard&&event.key===ESCAPE_KEY$1){
event.preventDefault();
this.hide();
}else if(!this._config.keyboard&&event.key===ESCAPE_KEY$1){
this._triggerBackdropTransition();
}});
}else{
EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1);
}}
_setResizeEvent(){
if(this._isShown){
EventHandler.on(window, EVENT_RESIZE, ()=> this._adjustDialog());
}else{
EventHandler.off(window, EVENT_RESIZE);
}}
_hideModal(){
this._element.style.display='none';
this._element.setAttribute('aria-hidden', true);
this._element.removeAttribute('aria-modal');
this._element.removeAttribute('role');
this._isTransitioning=false;
this._backdrop.hide(()=> {
document.body.classList.remove(CLASS_NAME_OPEN);
this._resetAdjustments();
reset();
EventHandler.trigger(this._element, EVENT_HIDDEN$3);
});
}
_showBackdrop(callback){
EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event=> {
if(this._ignoreBackdropClick){
this._ignoreBackdropClick=false;
return;
}
if(event.target!==event.currentTarget){
return;
}
if(this._config.backdrop===true){
this.hide();
}else if(this._config.backdrop==='static'){
this._triggerBackdropTransition();
}});
this._backdrop.show(callback);
}
_isAnimated(){
return this._element.classList.contains(CLASS_NAME_FADE$4);
}
_triggerBackdropTransition(){
const hideEvent=EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
if(hideEvent.defaultPrevented){
return;
}
const isModalOverflowing=this._element.scrollHeight > document.documentElement.clientHeight;
if(!isModalOverflowing){
this._element.style.overflowY='hidden';
}
this._element.classList.add(CLASS_NAME_STATIC);
const modalTransitionDuration=getTransitionDurationFromElement(this._dialog);
EventHandler.off(this._element, 'transitionend');
EventHandler.one(this._element, 'transitionend', ()=> {
this._element.classList.remove(CLASS_NAME_STATIC);
if(!isModalOverflowing){
EventHandler.one(this._element, 'transitionend', ()=> {
this._element.style.overflowY='';
});
emulateTransitionEnd(this._element, modalTransitionDuration);
}});
emulateTransitionEnd(this._element, modalTransitionDuration);
this._element.focus();
}
_adjustDialog(){
const isModalOverflowing=this._element.scrollHeight > document.documentElement.clientHeight;
const scrollbarWidth=getWidth();
const isBodyOverflowing=scrollbarWidth > 0;
if(!isBodyOverflowing&&isModalOverflowing&&!isRTL()||isBodyOverflowing&&!isModalOverflowing&&isRTL()){
this._element.style.paddingLeft=`${scrollbarWidth}px`;
}
if(isBodyOverflowing&&!isModalOverflowing&&!isRTL()||!isBodyOverflowing&&isModalOverflowing&&isRTL()){
this._element.style.paddingRight=`${scrollbarWidth}px`;
}}
_resetAdjustments(){
this._element.style.paddingLeft='';
this._element.style.paddingRight='';
}
static jQueryInterface(config, relatedTarget){
return this.each(function (){
const data=Modal.getInstance(this)||new Modal(this, typeof config==='object' ? config:{});
if(typeof config!=='string'){
return;
}
if(typeof data[config]==='undefined'){
throw new TypeError(`No method named "${config}"`);
}
data[config](relatedTarget);
});
}}
EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event){
const target=getElementFromSelector(this);
if(['A', 'AREA'].includes(this.tagName)){
event.preventDefault();
}
EventHandler.one(target, EVENT_SHOW$3, showEvent=> {
if(showEvent.defaultPrevented){
return;
}
EventHandler.one(target, EVENT_HIDDEN$3, ()=> {
if(isVisible(this)){
this.focus();
}});
});
const data=Modal.getInstance(target)||new Modal(target);
data.toggle(this);
});
defineJQueryPlugin(Modal);
const NAME$5='offcanvas';
const DATA_KEY$5='bs.offcanvas';
const EVENT_KEY$5=`.${DATA_KEY$5}`;
const DATA_API_KEY$2='.data-api';
const EVENT_LOAD_DATA_API$1=`load${EVENT_KEY$5}${DATA_API_KEY$2}`;
const ESCAPE_KEY='Escape';
const Default$4={
backdrop: true,
keyboard: true,
scroll: false
};
const DefaultType$4={
backdrop: 'boolean',
keyboard: 'boolean',
scroll: 'boolean'
};
const CLASS_NAME_SHOW$4='show';
const OPEN_SELECTOR='.offcanvas.show';
const EVENT_SHOW$2=`show${EVENT_KEY$5}`;
const EVENT_SHOWN$2=`shown${EVENT_KEY$5}`;
const EVENT_HIDE$2=`hide${EVENT_KEY$5}`;
const EVENT_HIDDEN$2=`hidden${EVENT_KEY$5}`;
const EVENT_FOCUSIN$1=`focusin${EVENT_KEY$5}`;
const EVENT_CLICK_DATA_API$1=`click${EVENT_KEY$5}${DATA_API_KEY$2}`;
const EVENT_CLICK_DISMISS$1=`click.dismiss${EVENT_KEY$5}`;
const EVENT_KEYDOWN_DISMISS=`keydown.dismiss${EVENT_KEY$5}`;
const SELECTOR_DATA_DISMISS$1='[data-bs-dismiss="offcanvas"]';
const SELECTOR_DATA_TOGGLE$1='[data-bs-toggle="offcanvas"]';
class Offcanvas extends BaseComponent {
constructor(element, config){
super(element);
this._config=this._getConfig(config);
this._isShown=false;
this._backdrop=this._initializeBackDrop();
this._addEventListeners();
}
static get NAME(){
return NAME$5;
}
static get Default(){
return Default$4;
}
toggle(relatedTarget){
return this._isShown ? this.hide():this.show(relatedTarget);
}
show(relatedTarget){
if(this._isShown){
return;
}
const showEvent=EventHandler.trigger(this._element, EVENT_SHOW$2, {
relatedTarget
});
if(showEvent.defaultPrevented){
return;
}
this._isShown=true;
this._element.style.visibility='visible';
this._backdrop.show();
if(!this._config.scroll){
hide();
this._enforceFocusOnElement(this._element);
}
this._element.removeAttribute('aria-hidden');
this._element.setAttribute('aria-modal', true);
this._element.setAttribute('role', 'dialog');
this._element.classList.add(CLASS_NAME_SHOW$4);
const completeCallBack=()=> {
EventHandler.trigger(this._element, EVENT_SHOWN$2, {
relatedTarget
});
};
this._queueCallback(completeCallBack, this._element, true);
}
hide(){
if(!this._isShown){
return;
}
const hideEvent=EventHandler.trigger(this._element, EVENT_HIDE$2);
if(hideEvent.defaultPrevented){
return;
}
EventHandler.off(document, EVENT_FOCUSIN$1);
this._element.blur();
this._isShown=false;
this._element.classList.remove(CLASS_NAME_SHOW$4);
this._backdrop.hide();
const completeCallback=()=> {
this._element.setAttribute('aria-hidden', true);
this._element.removeAttribute('aria-modal');
this._element.removeAttribute('role');
this._element.style.visibility='hidden';
if(!this._config.scroll){
reset();
}
EventHandler.trigger(this._element, EVENT_HIDDEN$2);
};
this._queueCallback(completeCallback, this._element, true);
}
dispose(){
this._backdrop.dispose();
super.dispose();
EventHandler.off(document, EVENT_FOCUSIN$1);
}
_getConfig(config){
config={ ...Default$4,
...Manipulator.getDataAttributes(this._element),
...(typeof config==='object' ? config:{})
};
typeCheckConfig(NAME$5, config, DefaultType$4);
return config;
}
_initializeBackDrop(){
return new Backdrop({
isVisible: this._config.backdrop,
isAnimated: true,
rootElement: this._element.parentNode,
clickCallback: ()=> this.hide()
});
}
_enforceFocusOnElement(element){
EventHandler.off(document, EVENT_FOCUSIN$1);
EventHandler.on(document, EVENT_FOCUSIN$1, event=> {
if(document!==event.target&&element!==event.target&&!element.contains(event.target)){
element.focus();
}});
element.focus();
}
_addEventListeners(){
EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, ()=> this.hide());
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event=> {
if(this._config.keyboard&&event.key===ESCAPE_KEY){
this.hide();
}});
}
static jQueryInterface(config){
return this.each(function (){
const data=Data.get(this, DATA_KEY$5)||new Offcanvas(this, typeof config==='object' ? config:{});
if(typeof config!=='string'){
return;
}
if(data[config]===undefined||config.startsWith('_')||config==='constructor'){
throw new TypeError(`No method named "${config}"`);
}
data[config](this);
});
}}
EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event){
const target=getElementFromSelector(this);
if(['A', 'AREA'].includes(this.tagName)){
event.preventDefault();
}
if(isDisabled(this)){
return;
}
EventHandler.one(target, EVENT_HIDDEN$2, ()=> {
if(isVisible(this)){
this.focus();
}});
const allReadyOpen=SelectorEngine.findOne(OPEN_SELECTOR);
if(allReadyOpen&&allReadyOpen!==target){
Offcanvas.getInstance(allReadyOpen).hide();
}
const data=Data.get(target, DATA_KEY$5)||new Offcanvas(target);
data.toggle(this);
});
EventHandler.on(window, EVENT_LOAD_DATA_API$1, ()=> {
SelectorEngine.find(OPEN_SELECTOR).forEach(el=> (Data.get(el, DATA_KEY$5)||new Offcanvas(el)).show());
});
defineJQueryPlugin(Offcanvas);
const uriAttrs=new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
const ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i;
const SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
const DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
const allowedAttribute=(attr, allowedAttributeList)=> {
const attrName=attr.nodeName.toLowerCase();
if(allowedAttributeList.includes(attrName)){
if(uriAttrs.has(attrName)){
return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue)||DATA_URL_PATTERN.test(attr.nodeValue));
}
return true;
}
const regExp=allowedAttributeList.filter(attrRegex=> attrRegex instanceof RegExp);
for (let i=0, len=regExp.length; i < len; i++){
if(regExp[i].test(attrName)){
return true;
}}
return false;
};
const DefaultAllowlist={
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
a: ['target', 'href', 'title', 'rel'],
area: [],
b: [],
br: [],
col: [],
code: [],
div: [],
em: [],
hr: [],
h1: [],
h2: [],
h3: [],
h4: [],
h5: [],
h6: [],
i: [],
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
li: [],
ol: [],
p: [],
pre: [],
s: [],
small: [],
span: [],
sub: [],
sup: [],
strong: [],
u: [],
ul: []
};
function sanitizeHtml(unsafeHtml, allowList, sanitizeFn){
if(!unsafeHtml.length){
return unsafeHtml;
}
if(sanitizeFn&&typeof sanitizeFn==='function'){
return sanitizeFn(unsafeHtml);
}
const domParser=new window.DOMParser();
const createdDocument=domParser.parseFromString(unsafeHtml, 'text/html');
const allowlistKeys=Object.keys(allowList);
const elements=[].concat(...createdDocument.body.querySelectorAll('*'));
for (let i=0, len=elements.length; i < len; i++){
const el=elements[i];
const elName=el.nodeName.toLowerCase();
if(!allowlistKeys.includes(elName)){
el.parentNode.removeChild(el);
continue;
}
const attributeList=[].concat(...el.attributes);
const allowedAttributes=[].concat(allowList['*']||[], allowList[elName]||[]);
attributeList.forEach(attr=> {
if(!allowedAttribute(attr, allowedAttributes)){
el.removeAttribute(attr.nodeName);
}});
}
return createdDocument.body.innerHTML;
}
const NAME$4='tooltip';
const DATA_KEY$4='bs.tooltip';
const EVENT_KEY$4=`.${DATA_KEY$4}`;
const CLASS_PREFIX$1='bs-tooltip';
const BSCLS_PREFIX_REGEX$1=new RegExp(`(^|\\s)${CLASS_PREFIX$1}\\S+`, 'g');
const DISALLOWED_ATTRIBUTES=new Set(['sanitize', 'allowList', 'sanitizeFn']);
const DefaultType$3={
animation: 'boolean',
template: 'string',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
offset: '(array|string|function)',
container: '(string|element|boolean)',
fallbackPlacements: 'array',
boundary: '(string|element)',
customClass: '(string|function)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
allowList: 'object',
popperConfig: '(null|object|function)'
};
const AttachmentMap={
AUTO: 'auto',
TOP: 'top',
RIGHT: isRTL() ? 'left':'right',
BOTTOM: 'bottom',
LEFT: isRTL() ? 'right':'left'
};
const Default$3={
animation: true,
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
selector: false,
placement: 'top',
offset: [0, 6],
container: false,
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
boundary: 'clippingParents',
customClass: '',
sanitize: true,
sanitizeFn: null,
allowList: DefaultAllowlist,
popperConfig: null
};
const Event$2={
HIDE: `hide${EVENT_KEY$4}`,
HIDDEN: `hidden${EVENT_KEY$4}`,
SHOW: `show${EVENT_KEY$4}`,
SHOWN: `shown${EVENT_KEY$4}`,
INSERTED: `inserted${EVENT_KEY$4}`,
CLICK: `click${EVENT_KEY$4}`,
FOCUSIN: `focusin${EVENT_KEY$4}`,
FOCUSOUT: `focusout${EVENT_KEY$4}`,
MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
};
const CLASS_NAME_FADE$3='fade';
const CLASS_NAME_MODAL='modal';
const CLASS_NAME_SHOW$3='show';
const HOVER_STATE_SHOW='show';
const HOVER_STATE_OUT='out';
const SELECTOR_TOOLTIP_INNER='.tooltip-inner';
const TRIGGER_HOVER='hover';
const TRIGGER_FOCUS='focus';
const TRIGGER_CLICK='click';
const TRIGGER_MANUAL='manual';
class Tooltip extends BaseComponent {
constructor(element, config){
if(typeof Popper==='undefined'){
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
}
super(element);
this._isEnabled=true;
this._timeout=0;
this._hoverState='';
this._activeTrigger={};
this._popper=null;
this._config=this._getConfig(config);
this.tip=null;
this._setListeners();
}
static get Default(){
return Default$3;
}
static get NAME(){
return NAME$4;
}
static get Event(){
return Event$2;
}
static get DefaultType(){
return DefaultType$3;
}
enable(){
this._isEnabled=true;
}
disable(){
this._isEnabled=false;
}
toggleEnabled(){
this._isEnabled = !this._isEnabled;
}
toggle(event){
if(!this._isEnabled){
return;
}
if(event){
const context=this._initializeOnDelegatedTarget(event);
context._activeTrigger.click = !context._activeTrigger.click;
if(context._isWithActiveTrigger()){
context._enter(null, context);
}else{
context._leave(null, context);
}}else{
if(this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)){
this._leave(null, this);
return;
}
this._enter(null, this);
}}
dispose(){
clearTimeout(this._timeout);
EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if(this.tip&&this.tip.parentNode){
this.tip.parentNode.removeChild(this.tip);
}
if(this._popper){
this._popper.destroy();
}
super.dispose();
}
show(){
if(this._element.style.display==='none'){
throw new Error('Please use show on visible elements');
}
if(!(this.isWithContent()&&this._isEnabled)){
return;
}
const showEvent=EventHandler.trigger(this._element, this.constructor.Event.SHOW);
const shadowRoot=findShadowRoot(this._element);
const isInTheDom=shadowRoot===null ? this._element.ownerDocument.documentElement.contains(this._element):shadowRoot.contains(this._element);
if(showEvent.defaultPrevented||!isInTheDom){
return;
}
const tip=this.getTipElement();
const tipId=getUID(this.constructor.NAME);
tip.setAttribute('id', tipId);
this._element.setAttribute('aria-describedby', tipId);
this.setContent();
if(this._config.animation){
tip.classList.add(CLASS_NAME_FADE$3);
}
const placement=typeof this._config.placement==='function' ? this._config.placement.call(this, tip, this._element):this._config.placement;
const attachment=this._getAttachment(placement);
this._addAttachmentClass(attachment);
const {
container
}=this._config;
Data.set(tip, this.constructor.DATA_KEY, this);
if(!this._element.ownerDocument.documentElement.contains(this.tip)){
container.appendChild(tip);
EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
}
if(this._popper){
this._popper.update();
}else{
this._popper=createPopper(this._element, tip, this._getPopperConfig(attachment));
}
tip.classList.add(CLASS_NAME_SHOW$3);
const customClass=typeof this._config.customClass==='function' ? this._config.customClass():this._config.customClass;
if(customClass){
tip.classList.add(...customClass.split(' '));
}
if('ontouchstart' in document.documentElement){
[].concat(...document.body.children).forEach(element=> {
EventHandler.on(element, 'mouseover', noop);
});
}
const complete=()=> {
const prevHoverState=this._hoverState;
this._hoverState=null;
EventHandler.trigger(this._element, this.constructor.Event.SHOWN);
if(prevHoverState===HOVER_STATE_OUT){
this._leave(null, this);
}};
const isAnimated=this.tip.classList.contains(CLASS_NAME_FADE$3);
this._queueCallback(complete, this.tip, isAnimated);
}
hide(){
if(!this._popper){
return;
}
const tip=this.getTipElement();
const complete=()=> {
if(this._isWithActiveTrigger()){
return;
}
if(this._hoverState!==HOVER_STATE_SHOW&&tip.parentNode){
tip.parentNode.removeChild(tip);
}
this._cleanTipClass();
this._element.removeAttribute('aria-describedby');
EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);
if(this._popper){
this._popper.destroy();
this._popper=null;
}};
const hideEvent=EventHandler.trigger(this._element, this.constructor.Event.HIDE);
if(hideEvent.defaultPrevented){
return;
}
tip.classList.remove(CLASS_NAME_SHOW$3);
if('ontouchstart' in document.documentElement){
[].concat(...document.body.children).forEach(element=> EventHandler.off(element, 'mouseover', noop));
}
this._activeTrigger[TRIGGER_CLICK]=false;
this._activeTrigger[TRIGGER_FOCUS]=false;
this._activeTrigger[TRIGGER_HOVER]=false;
const isAnimated=this.tip.classList.contains(CLASS_NAME_FADE$3);
this._queueCallback(complete, this.tip, isAnimated);
this._hoverState='';
}
update(){
if(this._popper!==null){
this._popper.update();
}}
isWithContent(){
return Boolean(this.getTitle());
}
getTipElement(){
if(this.tip){
return this.tip;
}
const element=document.createElement('div');
element.innerHTML=this._config.template;
this.tip=element.children[0];
return this.tip;
}
setContent(){
const tip=this.getTipElement();
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
}
setElementContent(element, content){
if(element===null){
return;
}
if(isElement$1(content)){
content=getElement(content);
if(this._config.html){
if(content.parentNode!==element){
element.innerHTML='';
element.appendChild(content);
}}else{
element.textContent=content.textContent;
}
return;
}
if(this._config.html){
if(this._config.sanitize){
content=sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
}
element.innerHTML=content;
}else{
element.textContent=content;
}}
getTitle(){
let title=this._element.getAttribute('data-bs-original-title');
if(!title){
title=typeof this._config.title==='function' ? this._config.title.call(this._element):this._config.title;
}
return title;
}
updateAttachment(attachment){
if(attachment==='right'){
return 'end';
}
if(attachment==='left'){
return 'start';
}
return attachment;
}
_initializeOnDelegatedTarget(event, context){
const dataKey=this.constructor.DATA_KEY;
context=context||Data.get(event.delegateTarget, dataKey);
if(!context){
context=new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.set(event.delegateTarget, dataKey, context);
}
return context;
}
_getOffset(){
const {
offset
}=this._config;
if(typeof offset==='string'){
return offset.split(',').map(val=> Number.parseInt(val, 10));
}
if(typeof offset==='function'){
return popperData=> offset(popperData, this._element);
}
return offset;
}
_getPopperConfig(attachment){
const defaultBsPopperConfig={
placement: attachment,
modifiers: [{
name: 'flip',
options: {
fallbackPlacements: this._config.fallbackPlacements
}}, {
name: 'offset',
options: {
offset: this._getOffset()
}}, {
name: 'preventOverflow',
options: {
boundary: this._config.boundary
}}, {
name: 'arrow',
options: {
element: `.${this.constructor.NAME}-arrow`
}}, {
name: 'onChange',
enabled: true,
phase: 'beforeMain',
fn: data=> this._handlePopperPlacementChange(data)
}],
};
return { ...defaultBsPopperConfig,
...(typeof this._config.popperConfig==='function' ? this._config.popperConfig(defaultBsPopperConfig):this._config.popperConfig)
};}
_addAttachmentClass(attachment){
this.getTipElement().classList.add(`${CLASS_PREFIX$1}-auto`);
}
_getAttachment(placement){
return AttachmentMap[placement.toUpperCase()];
}
_setListeners(){
const triggers=this._config.trigger.split(' ');
triggers.forEach(trigger=> {
if(trigger==='click'){
EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event=> this.toggle(event));
}else if(trigger!==TRIGGER_MANUAL){
const eventIn=trigger===TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN;
const eventOut=trigger===TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;
EventHandler.on(this._element, eventIn, this._config.selector, event=> this._enter(event));
EventHandler.on(this._element, eventOut, this._config.selector, event=> this._leave(event));
}});
this._hideModalHandler=()=> {
if(this._element){
this.hide();
}};
EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if(this._config.selector){
this._config={ ...this._config,
trigger: 'manual',
selector: ''
};}else{
this._fixTitle();
}}
_fixTitle(){
const title=this._element.getAttribute('title');
const originalTitleType=typeof this._element.getAttribute('data-bs-original-title');
if(title||originalTitleType!=='string'){
this._element.setAttribute('data-bs-original-title', title||'');
if(title&&!this._element.getAttribute('aria-label')&&!this._element.textContent&&'DIV'!=this._element.tagName){
this._element.setAttribute('aria-label', title);
}
this._element.setAttribute('title', '');
}}
_enter(event, context){
context=this._initializeOnDelegatedTarget(event, context);
if(event){
context._activeTrigger[event.type==='focusin' ? TRIGGER_FOCUS:TRIGGER_HOVER]=true;
}
if(context.getTipElement().classList.contains(CLASS_NAME_SHOW$3)||context._hoverState===HOVER_STATE_SHOW){
context._hoverState=HOVER_STATE_SHOW;
return;
}
clearTimeout(context._timeout);
context._hoverState=HOVER_STATE_SHOW;
if(!context._config.delay||!context._config.delay.show){
context.show();
return;
}
context._timeout=setTimeout(()=> {
if(context._hoverState===HOVER_STATE_SHOW){
context.show();
}}, context._config.delay.show);
}
_leave(event, context){
context=this._initializeOnDelegatedTarget(event, context);
if(event){
context._activeTrigger[event.type==='focusout' ? TRIGGER_FOCUS:TRIGGER_HOVER]=context._element.contains(event.relatedTarget);
}
if(context._isWithActiveTrigger()){
return;
}
clearTimeout(context._timeout);
context._hoverState=HOVER_STATE_OUT;
if(!context._config.delay||!context._config.delay.hide){
context.hide();
return;
}
context._timeout=setTimeout(()=> {
if(context._hoverState===HOVER_STATE_OUT){
context.hide();
}}, context._config.delay.hide);
}
_isWithActiveTrigger(){
for (const trigger in this._activeTrigger){
if(this._activeTrigger[trigger]){
return true;
}}
return false;
}
_getConfig(config){
const dataAttributes=Manipulator.getDataAttributes(this._element);
Object.keys(dataAttributes).forEach(dataAttr=> {
if(DISALLOWED_ATTRIBUTES.has(dataAttr)){
delete dataAttributes[dataAttr];
}});
config={ ...this.constructor.Default,
...dataAttributes,
...(typeof config==='object'&&config ? config:{})
};
config.container=config.container===false ? document.body:getElement(config.container);
if(typeof config.delay==='number'){
config.delay={
show: config.delay,
hide: config.delay
};}
if(typeof config.title==='number'){
config.title=config.title.toString();
}
if(typeof config.content==='number'){
config.content=config.content.toString();
}
typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
if(config.sanitize){
config.template=sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
}
return config;
}
_getDelegateConfig(){
const config={};
if(this._config){
for (const key in this._config){
if(this.constructor.Default[key]!==this._config[key]){
config[key]=this._config[key];
}}
}
return config;
}
_cleanTipClass(){
const tip=this.getTipElement();
const tabClass=tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
if(tabClass!==null&&tabClass.length > 0){
tabClass.map(token=> token.trim()).forEach(tClass=> tip.classList.remove(tClass));
}}
_handlePopperPlacementChange(popperData){
const {
state
}=popperData;
if(!state){
return;
}
this.tip=state.elements.popper;
this._cleanTipClass();
this._addAttachmentClass(this._getAttachment(state.placement));
this.tip.setAttribute('data-popper-placement', state.placement);
}
static jQueryInterface(config){
return this.each(function (){
let data=Data.get(this, DATA_KEY$4);
const _config=typeof config==='object'&&config;
if(!data&&/dispose|hide/.test(config)){
return;
}
if(!data){
data=new Tooltip(this, _config);
}
if(typeof config==='string'){
if(typeof data[config]==='undefined'){
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}});
}}
defineJQueryPlugin(Tooltip);
const NAME$3='popover';
const DATA_KEY$3='bs.popover';
const EVENT_KEY$3=`.${DATA_KEY$3}`;
const CLASS_PREFIX='bs-popover';
const BSCLS_PREFIX_REGEX=new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
const Default$2={ ...Tooltip.Default,
placement: 'right',
offset: [0, 8],
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
};
const DefaultType$2={ ...Tooltip.DefaultType,
content: '(string|element|function)'
};
const Event$1={
HIDE: `hide${EVENT_KEY$3}`,
HIDDEN: `hidden${EVENT_KEY$3}`,
SHOW: `show${EVENT_KEY$3}`,
SHOWN: `shown${EVENT_KEY$3}`,
INSERTED: `inserted${EVENT_KEY$3}`,
CLICK: `click${EVENT_KEY$3}`,
FOCUSIN: `focusin${EVENT_KEY$3}`,
FOCUSOUT: `focusout${EVENT_KEY$3}`,
MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
};
const CLASS_NAME_FADE$2='fade';
const CLASS_NAME_SHOW$2='show';
const SELECTOR_TITLE='.popover-header';
const SELECTOR_CONTENT='.popover-body';
class Popover extends Tooltip {
static get Default(){
return Default$2;
}
static get NAME(){
return NAME$3;
}
static get Event(){
return Event$1;
}
static get DefaultType(){
return DefaultType$2;
}
isWithContent(){
return this.getTitle()||this._getContent();
}
setContent(){
const tip=this.getTipElement();
this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
let content=this._getContent();
if(typeof content==='function'){
content=content.call(this._element);
}
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
}
_addAttachmentClass(attachment){
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
}
_getContent(){
return this._element.getAttribute('data-bs-content')||this._config.content;
}
_cleanTipClass(){
const tip=this.getTipElement();
const tabClass=tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if(tabClass!==null&&tabClass.length > 0){
tabClass.map(token=> token.trim()).forEach(tClass=> tip.classList.remove(tClass));
}}
static jQueryInterface(config){
return this.each(function (){
let data=Data.get(this, DATA_KEY$3);
const _config=typeof config==='object' ? config:null;
if(!data&&/dispose|hide/.test(config)){
return;
}
if(!data){
data=new Popover(this, _config);
Data.set(this, DATA_KEY$3, data);
}
if(typeof config==='string'){
if(typeof data[config]==='undefined'){
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}});
}}
defineJQueryPlugin(Popover);
const NAME$2='scrollspy';
const DATA_KEY$2='bs.scrollspy';
const EVENT_KEY$2=`.${DATA_KEY$2}`;
const DATA_API_KEY$1='.data-api';
const Default$1={
offset: 10,
method: 'auto',
target: ''
};
const DefaultType$1={
offset: 'number',
method: 'string',
target: '(string|element)'
};
const EVENT_ACTIVATE=`activate${EVENT_KEY$2}`;
const EVENT_SCROLL=`scroll${EVENT_KEY$2}`;
const EVENT_LOAD_DATA_API=`load${EVENT_KEY$2}${DATA_API_KEY$1}`;
const CLASS_NAME_DROPDOWN_ITEM='dropdown-item';
const CLASS_NAME_ACTIVE$1='active';
const SELECTOR_DATA_SPY='[data-bs-spy="scroll"]';
const SELECTOR_NAV_LIST_GROUP$1='.nav, .list-group';
const SELECTOR_NAV_LINKS='.nav-link';
const SELECTOR_NAV_ITEMS='.nav-item';
const SELECTOR_LIST_ITEMS='.list-group-item';
const SELECTOR_DROPDOWN$1='.dropdown';
const SELECTOR_DROPDOWN_TOGGLE$1='.dropdown-toggle';
const METHOD_OFFSET='offset';
const METHOD_POSITION='position';
class ScrollSpy extends BaseComponent {
constructor(element, config){
super(element);
this._scrollElement=this._element.tagName==='BODY' ? window:this._element;
this._config=this._getConfig(config);
this._selector=`${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
this._offsets=[];
this._targets=[];
this._activeTarget=null;
this._scrollHeight=0;
EventHandler.on(this._scrollElement, EVENT_SCROLL, ()=> this._process());
this.refresh();
this._process();
}
static get Default(){
return Default$1;
}
static get NAME(){
return NAME$2;
}
refresh(){
const autoMethod=this._scrollElement===this._scrollElement.window ? METHOD_OFFSET:METHOD_POSITION;
const offsetMethod=this._config.method==='auto' ? autoMethod:this._config.method;
const offsetBase=offsetMethod===METHOD_POSITION ? this._getScrollTop():0;
this._offsets=[];
this._targets=[];
this._scrollHeight=this._getScrollHeight();
const targets=SelectorEngine.find(this._selector);
targets.map(element=> {
const targetSelector=getSelectorFromElement(element);
const target=targetSelector ? SelectorEngine.findOne(targetSelector):null;
if(target){
const targetBCR=target.getBoundingClientRect();
if(targetBCR.width||targetBCR.height){
if(this._scrollElement===this._scrollElement.window&&'offset'==offsetMethod){
return [targetBCR.top + this._scrollElement.window.pageYOffset + offsetBase, targetSelector];
}
return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
}}
return null;
}).filter(item=> item).sort((a, b)=> a[0] - b[0]).forEach(item=> {
this._offsets.push(item[0]);
this._targets.push(item[1]);
});
}
dispose(){
EventHandler.off(this._scrollElement, EVENT_KEY$2);
super.dispose();
}
_getConfig(config){
config={ ...Default$1,
...Manipulator.getDataAttributes(this._element),
...(typeof config==='object'&&config ? config:{})
};
if(typeof config.target!=='string'&&isElement$1(config.target)){
let {
id
}=config.target;
if(!id){
id=getUID(NAME$2);
config.target.id=id;
}
config.target=`#${id}`;
}
typeCheckConfig(NAME$2, config, DefaultType$1);
return config;
}
_getScrollTop(){
return this._scrollElement===window ? this._scrollElement.pageYOffset:this._scrollElement.scrollTop;
}
_getScrollHeight(){
return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
}
_getOffsetHeight(){
return this._scrollElement===window ? window.innerHeight:this._scrollElement.getBoundingClientRect().height;
}
_process(){
const scrollTop=this._getScrollTop() + this._config.offset;
const scrollHeight=this._getScrollHeight();
const maxScroll=this._config.offset + scrollHeight - this._getOffsetHeight();
if(this._scrollHeight!==scrollHeight){
this.refresh();
}
if(scrollTop >=maxScroll){
const target=this._targets[this._targets.length - 1];
if(this._activeTarget!==target){
this._activate(target);
}
return;
}
if(this._activeTarget&&scrollTop < this._offsets[0]&&this._offsets[0] > 0){
this._activeTarget=null;
this._clear();
return;
}
for (let i=this._offsets.length; i--;){
const isActiveTarget=this._activeTarget!==this._targets[i]&&scrollTop >=this._offsets[i]&&(typeof this._offsets[i + 1]==='undefined'||scrollTop < this._offsets[i + 1]);
if(isActiveTarget){
this._activate(this._targets[i]);
}}
}
_activate(target){
this._activeTarget=target;
this._clear();
const queries=this._selector.split(',').map(selector=> `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
const link=SelectorEngine.findOne(queries.join(','));
if(link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)){
SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
link.classList.add(CLASS_NAME_ACTIVE$1);
}else{
link.classList.add(CLASS_NAME_ACTIVE$1);
SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup=> {
SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`).forEach(item=> item.classList.add(CLASS_NAME_ACTIVE$1));
SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(navItem=> {
SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(item=> item.classList.add(CLASS_NAME_ACTIVE$1));
});
});
}
EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
relatedTarget: target
});
}
_clear(){
SelectorEngine.find(this._selector).filter(node=> node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node=> node.classList.remove(CLASS_NAME_ACTIVE$1));
}
static jQueryInterface(config){
return this.each(function (){
const data=ScrollSpy.getInstance(this)||new ScrollSpy(this, typeof config==='object' ? config:{});
if(typeof config!=='string'){
return;
}
if(typeof data[config]==='undefined'){
throw new TypeError(`No method named "${config}"`);
}
data[config]();
});
}}
EventHandler.on(window, EVENT_LOAD_DATA_API, ()=> {
SelectorEngine.find(SELECTOR_DATA_SPY).forEach(spy=> new ScrollSpy(spy));
});
defineJQueryPlugin(ScrollSpy);
const NAME$1='tab';
const DATA_KEY$1='bs.tab';
const EVENT_KEY$1=`.${DATA_KEY$1}`;
const DATA_API_KEY='.data-api';
const EVENT_HIDE$1=`hide${EVENT_KEY$1}`;
const EVENT_HIDDEN$1=`hidden${EVENT_KEY$1}`;
const EVENT_SHOW$1=`show${EVENT_KEY$1}`;
const EVENT_SHOWN$1=`shown${EVENT_KEY$1}`;
const EVENT_CLICK_DATA_API=`click${EVENT_KEY$1}${DATA_API_KEY}`;
const CLASS_NAME_DROPDOWN_MENU='dropdown-menu';
const CLASS_NAME_ACTIVE='active';
const CLASS_NAME_FADE$1='fade';
const CLASS_NAME_SHOW$1='show';
const SELECTOR_DROPDOWN='.dropdown';
const SELECTOR_NAV_LIST_GROUP='.nav, .list-group';
const SELECTOR_ACTIVE='.active';
const SELECTOR_ACTIVE_UL=':scope > li > .active';
const SELECTOR_DATA_TOGGLE='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
const SELECTOR_DROPDOWN_TOGGLE='.dropdown-toggle';
const SELECTOR_DROPDOWN_ACTIVE_CHILD=':scope > .dropdown-menu .active';
class Tab extends BaseComponent {
static get NAME(){
return NAME$1;
}
show(){
if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(CLASS_NAME_ACTIVE)){
return;
}
let previous;
const target=getElementFromSelector(this._element);
const listElement=this._element.closest(SELECTOR_NAV_LIST_GROUP);
if(listElement){
const itemSelector=listElement.nodeName==='UL'||listElement.nodeName==='OL' ? SELECTOR_ACTIVE_UL:SELECTOR_ACTIVE;
previous=SelectorEngine.find(itemSelector, listElement);
previous=previous[previous.length - 1];
}
const hideEvent=previous ? EventHandler.trigger(previous, EVENT_HIDE$1, {
relatedTarget: this._element
}):null;
const showEvent=EventHandler.trigger(this._element, EVENT_SHOW$1, {
relatedTarget: previous
});
if(showEvent.defaultPrevented||hideEvent!==null&&hideEvent.defaultPrevented){
return;
}
this._activate(this._element, listElement);
const complete=()=> {
EventHandler.trigger(previous, EVENT_HIDDEN$1, {
relatedTarget: this._element
});
EventHandler.trigger(this._element, EVENT_SHOWN$1, {
relatedTarget: previous
});
};
if(target){
this._activate(target, target.parentNode, complete);
}else{
complete();
}}
_activate(element, container, callback){
const activeElements=container&&(container.nodeName==='UL'||container.nodeName==='OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container):SelectorEngine.children(container, SELECTOR_ACTIVE);
const active=activeElements[0];
const isTransitioning=callback&&active&&active.classList.contains(CLASS_NAME_FADE$1);
const complete=()=> this._transitionComplete(element, active, callback);
if(active&&isTransitioning){
active.classList.remove(CLASS_NAME_SHOW$1);
this._queueCallback(complete, element, true);
}else{
complete();
}}
_transitionComplete(element, active, callback){
if(active){
active.classList.remove(CLASS_NAME_ACTIVE);
const dropdownChild=SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
if(dropdownChild){
dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
}
if(active.getAttribute('role')==='tab'){
active.setAttribute('aria-selected', false);
}}
element.classList.add(CLASS_NAME_ACTIVE);
if(element.getAttribute('role')==='tab'){
element.setAttribute('aria-selected', true);
}
reflow(element);
if(element.classList.contains(CLASS_NAME_FADE$1)){
element.classList.add(CLASS_NAME_SHOW$1);
}
let parent=element.parentNode;
if(parent&&parent.nodeName==='LI'){
parent=parent.parentNode;
}
if(parent&&parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)){
const dropdownElement=element.closest(SELECTOR_DROPDOWN);
if(dropdownElement){
SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown=> dropdown.classList.add(CLASS_NAME_ACTIVE));
}
element.setAttribute('aria-expanded', true);
}
if(callback){
callback();
}}
static jQueryInterface(config){
return this.each(function (){
const data=Data.get(this, DATA_KEY$1)||new Tab(this);
if(typeof config==='string'){
if(typeof data[config]==='undefined'){
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}});
}}
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event){
if(['A', 'AREA'].includes(this.tagName)){
event.preventDefault();
}
if(isDisabled(this)){
return;
}
const data=Data.get(this, DATA_KEY$1)||new Tab(this);
data.show();
});
defineJQueryPlugin(Tab);
const NAME='toast';
const DATA_KEY='bs.toast';
const EVENT_KEY=`.${DATA_KEY}`;
const EVENT_CLICK_DISMISS=`click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER=`mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT=`mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN=`focusin${EVENT_KEY}`;
const EVENT_FOCUSOUT=`focusout${EVENT_KEY}`;
const EVENT_HIDE=`hide${EVENT_KEY}`;
const EVENT_HIDDEN=`hidden${EVENT_KEY}`;
const EVENT_SHOW=`show${EVENT_KEY}`;
const EVENT_SHOWN=`shown${EVENT_KEY}`;
const CLASS_NAME_FADE='fade';
const CLASS_NAME_HIDE='hide';
const CLASS_NAME_SHOW='show';
const CLASS_NAME_SHOWING='showing';
const DefaultType={
animation: 'boolean',
autohide: 'boolean',
delay: 'number'
};
const Default={
animation: true,
autohide: true,
delay: 5000
};
const SELECTOR_DATA_DISMISS='[data-bs-dismiss="toast"]';
class Toast extends BaseComponent {
constructor(element, config){
super(element);
this._config=this._getConfig(config);
this._timeout=null;
this._hasMouseInteraction=false;
this._hasKeyboardInteraction=false;
this._setListeners();
}
static get DefaultType(){
return DefaultType;
}
static get Default(){
return Default;
}
static get NAME(){
return NAME;
}
show(){
const showEvent=EventHandler.trigger(this._element, EVENT_SHOW);
if(showEvent.defaultPrevented){
return;
}
this._clearTimeout();
if(this._config.animation){
this._element.classList.add(CLASS_NAME_FADE);
}
const complete=()=> {
this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.add(CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_SHOWN);
this._maybeScheduleHide();
};
this._element.classList.remove(CLASS_NAME_HIDE);
reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation);
}
hide(){
if(!this._element.classList.contains(CLASS_NAME_SHOW)){
return;
}
const hideEvent=EventHandler.trigger(this._element, EVENT_HIDE);
if(hideEvent.defaultPrevented){
return;
}
const complete=()=> {
this._element.classList.add(CLASS_NAME_HIDE);
EventHandler.trigger(this._element, EVENT_HIDDEN);
};
this._element.classList.remove(CLASS_NAME_SHOW);
this._queueCallback(complete, this._element, this._config.animation);
}
dispose(){
this._clearTimeout();
if(this._element.classList.contains(CLASS_NAME_SHOW)){
this._element.classList.remove(CLASS_NAME_SHOW);
}
super.dispose();
}
_getConfig(config){
config={ ...Default,
...Manipulator.getDataAttributes(this._element),
...(typeof config==='object'&&config ? config:{})
};
typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
}
_maybeScheduleHide(){
if(!this._config.autohide){
return;
}
if(this._hasMouseInteraction||this._hasKeyboardInteraction){
return;
}
this._timeout=setTimeout(()=> {
this.hide();
}, this._config.delay);
}
_onInteraction(event, isInteracting){
switch (event.type){
case 'mouseover':
case 'mouseout':
this._hasMouseInteraction=isInteracting;
break;
case 'focusin':
case 'focusout':
this._hasKeyboardInteraction=isInteracting;
break;
}
if(isInteracting){
this._clearTimeout();
return;
}
const nextElement=event.relatedTarget;
if(this._element===nextElement||this._element.contains(nextElement)){
return;
}
this._maybeScheduleHide();
}
_setListeners(){
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, ()=> this.hide());
EventHandler.on(this._element, EVENT_MOUSEOVER, event=> this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_MOUSEOUT, event=> this._onInteraction(event, false));
EventHandler.on(this._element, EVENT_FOCUSIN, event=> this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_FOCUSOUT, event=> this._onInteraction(event, false));
}
_clearTimeout(){
clearTimeout(this._timeout);
this._timeout=null;
}
static jQueryInterface(config){
return this.each(function (){
let data=Data.get(this, DATA_KEY);
const _config=typeof config==='object'&&config;
if(!data){
data=new Toast(this, _config);
}
if(typeof config==='string'){
if(typeof data[config]==='undefined'){
throw new TypeError(`No method named "${config}"`);
}
data[config](this);
}});
}}
defineJQueryPlugin(Toast);
var index_umd={
Alert,
Button,
Collapse,
Dropdown,
Modal,
Offcanvas,
Popover,
ScrollSpy,
Tab,
Toast,
Tooltip
};
return index_umd;
})));
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(e){var n=/\+/g;function o(e){return r.raw?e:encodeURIComponent(e)}function i(e,o){var i=r.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(n," ")),r.json?JSON.parse(e):e}catch(o){}}(e);return"function"==typeof o?o(i):i}var r=e.cookie=function(n,t,u){if(t!==undefined&&"function"!=typeof t){if("number"==typeof(u=e.extend({},r.defaults,u)).expires){var c=u.expires,f=u.expires=new Date;f.setTime(+f+864e5*c)}return document.cookie=[o(n),"=",function(e){return o(r.json?JSON.stringify(e):String(e))}(t),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}for(var d,a=n?undefined:{},p=document.cookie?document.cookie.split("; "):[],s=0,m=p.length;s<m;s++){var x=p[s].split("="),y=(d=x.shift(),r.raw?d:decodeURIComponent(d)),k=x.join("=");if(n&&n===y){a=i(k,t);break}n||(k=i(k))===undefined||(a[y]=k)}return a};r.defaults={},e.removeCookie=function(n,o){return e.cookie(n)!==undefined&&(e.cookie(n,"",e.extend({},o,{expires:-1})),!e.cookie(n))}});
!function(t,e,i,s){function n(e,i){this.settings=null,this.options=t.extend({},n.Defaults,i),this.$element=t(e),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},t.each(["onResize","onThrottledResize"],t.proxy((function(e,i){this._handlers[i]=t.proxy(this[i],this)}),this)),t.each(n.Plugins,t.proxy((function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)}),this)),t.each(n.Workers,t.proxy((function(e,i){this._pipe.push({filter:i.filter,run:t.proxy(i.run,this)})}),this)),this.setup(),this.initialize()}n.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:e,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},n.Width={Default:"default",Inner:"inner",Outer:"outer"},n.Type={Event:"event",State:"state"},n.Plugins={},n.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,n={width:"auto","margin-left":s?e:"","margin-right":s?"":e};!i&&this.$stage.children().css(n),t.css=n}},{filter:["width","items","settings"],run:function(t){var e=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,i=null,s=this._items.length,n=!this.settings.autoWidth,o=[];for(t.items={merge:!1,width:e};s--;)i=this._mergers[s],i=this.settings.mergeFit&&Math.min(i,this.settings.items)||i,t.items.merge=i>1||t.items.merge,o[s]=n?e*i:this._items[s].width();this._widths=o}},{filter:["items","settings"],run:function(){var e=[],i=this._items,s=this.settings,n=Math.max(2*s.items,4),o=2*Math.ceil(i.length/2),r=s.loop&&i.length?s.rewind?n:Math.max(n,o):0,a="",h="";for(r/=2;r>0;)e.push(this.normalize(e.length/2,!0)),a+=i[e[e.length-1]][0].outerHTML,e.push(this.normalize(i.length-1-(e.length-1)/2,!0)),h=i[e[e.length-1]][0].outerHTML+h,r-=1;this._clones=e,t(a).addClass("cloned").appendTo(this.$stage),t(h).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=0,n=0,o=[];++i<e;)s=o[i-1]||0,n=this._widths[this.relative(i)]+this.settings.margin,o.push(s+n*t);this._coordinates=o}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for(i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],n.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=t("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(t("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},n.prototype.initializeItems=function(){var e=this.$element.find(".owl-item");if(e.length)return this._items=e.get().map((function(e){return t(e)})),this._mergers=this._items.map((function(){return 1})),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},n.prototype.initialize=function(){var t,e,i;(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading"))&&(t=this.$element.find("img"),e=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:s,i=this.$element.children(e).width(),t.length&&i<=0&&this.preloadAutoWidthImages(t));this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},n.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},n.prototype.setup=function(){var e=this.viewport(),i=this.options.responsive,s=-1,n=null;i?(t.each(i,(function(t){t<=e&&t>s&&(s=Number(t))})),"function"==typeof(n=t.extend({},this.options,i[s])).stagePadding&&(n.stagePadding=n.stagePadding()),delete n.responsive,n.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+s))):n=t.extend({},this.options),this.trigger("change",{property:{name:"settings",value:n}}),this._breakpoint=s,this.settings=n,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},n.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},n.prototype.prepare=function(e){var i=this.trigger("prepare",{content:e});return i.data||(i.data=t("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(e)),this.trigger("prepared",{content:i.data}),i.data},n.prototype.update=function(){for(var e=0,i=this._pipe.length,s=t.proxy((function(t){return this[t]}),this._invalidated),n={};e<i;)(this._invalidated.all||t.grep(this._pipe[e].filter,s).length>0)&&this._pipe[e].run(n),e++;this._invalidated={},!this.is("valid")&&this.enter("valid")},n.prototype.width=function(t){switch(t=t||n.Width.Default){case n.Width.Inner:case n.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},n.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},n.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},n.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},n.prototype.registerEventHandlers=function(){t.support.transition&&this.$stage.on(t.support.transition.end+".owl.core",t.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(e,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",(function(){return!1}))),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",t.proxy(this.onDragEnd,this)))},n.prototype.onDragStart=function(e){var s=null;3!==e.which&&(t.support.transform?s={x:(s=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===s.length?12:4],y:s[16===s.length?13:5]}:(s=this.$stage.position(),s={x:this.settings.rtl?s.left+this.$stage.width()-this.width()+this.settings.margin:s.left,y:s.top}),this.is("animating")&&(t.support.transform?this.animate(s.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===e.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=t(e.target),this._drag.stage.start=s,this._drag.stage.current=s,this._drag.pointer=this.pointer(e),t(i).on("mouseup.owl.core touchend.owl.core",t.proxy(this.onDragEnd,this)),t(i).one("mousemove.owl.core touchmove.owl.core",t.proxy((function(e){var s=this.difference(this._drag.pointer,this.pointer(e));t(i).on("mousemove.owl.core touchmove.owl.core",t.proxy(this.onDragMove,this)),Math.abs(s.x)<Math.abs(s.y)&&this.is("valid")||(e.preventDefault(),this.enter("dragging"),this.trigger("drag"))}),this)))},n.prototype.onDragMove=function(t){var e=null,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(e=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-e,o.x=((o.x-e)%i+i)%i+e):(e=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),s=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,e+s),i+s)),this._drag.stage.current=o,this.animate(o.x))},n.prototype.onDragEnd=function(e){var s=this.difference(this._drag.pointer,this.pointer(e)),n=this._drag.stage.current,o=s.x>0^this.settings.rtl?"left":"right";t(i).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==s.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(n.x,0!==s.x?o:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=o,(Math.abs(s.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",(function(){return!1}))),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},n.prototype.closest=function(e,i){var n=-1,o=this.width(),r=this.coordinates();return this.settings.freeDrag||t.each(r,t.proxy((function(t,a){return"left"===i&&e>a-30&&e<a+30?n=t:"right"===i&&e>a-o-30&&e<a-o+30?n=t+1:this.op(e,"<",a)&&this.op(e,">",r[t+1]!==s?r[t+1]:a-o)&&(n="left"===i?t+1:t),-1===n}),this)),this.settings.loop||(this.op(e,">",r[this.minimum()])?n=e=this.minimum():this.op(e,"<",r[this.maximum()])&&(n=e=this.maximum())),n},n.prototype.animate=function(e){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),i&&(this.enter("animating"),this.trigger("translate")),t.support.transform3d&&t.support.transition?this.$stage.css({transform:"translate3d("+e+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):i?this.$stage.animate({left:e+"px"},this.speed(),this.settings.fallbackEasing,t.proxy(this.onTransitionEnd,this)):this.$stage.css({left:e+"px"})},n.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},n.prototype.current=function(t){if(t===s)return this._current;if(0===this._items.length)return s;if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});e.data!==s&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},n.prototype.invalidate=function(e){return"string"==typeof e&&(this._invalidated[e]=!0,this.is("valid")&&this.leave("valid")),t.map(this._invalidated,(function(t,e){return e}))},n.prototype.reset=function(t){(t=this.normalize(t))!==s&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},n.prototype.normalize=function(t,e){var i=this._items.length,n=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=s:(t<0||t>=i+n)&&(t=((t-n/2)%i+i)%i+n/2),t},n.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},n.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=this.$element.width();e--&&!((i+=this._items[e].width()+this.settings.margin)>s););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},n.prototype.minimum=function(t){return t?0:this._clones.length/2},n.prototype.items=function(t){return t===s?this._items.slice():(t=this.normalize(t,!0),this._items[t])},n.prototype.mergers=function(t){return t===s?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},n.prototype.clones=function(e){var i=this._clones.length/2,n=i+this._items.length,o=function(t){return t%2==0?n+t/2:i-(t+1)/2};return e===s?t.map(this._clones,(function(t,e){return o(e)})):t.map(this._clones,(function(t,i){return t===e?o(i):null}))},n.prototype.speed=function(t){return t!==s&&(this._speed=t),this._speed},n.prototype.coordinates=function(e){var i,n=1,o=e-1;return e===s?t.map(this._coordinates,t.proxy((function(t,e){return this.coordinates(e)}),this)):(this.settings.center?(this.settings.rtl&&(n=-1,o=e+1),i=this._coordinates[e],i+=(this.width()-i+(this._coordinates[o]||0))/2*n):i=this._coordinates[o]||0,i=Math.ceil(i))},n.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},n.prototype.to=function(t,e){var i=this.current(),s=null,n=t-this.relative(i),o=(n>0)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(s=(((t=i+n)-a)%r+r)%r+a)!==t&&s-n<=h&&s-n>0&&(i=s-n,t=s,this.reset(i))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(i,t,e)),this.current(t),this.isVisible()&&this.update()},n.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},n.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},n.prototype.onTransitionEnd=function(t){if(t!==s&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},n.prototype.viewport=function(){var s;return this.options.responsiveBaseElement!==e?s=t(this.options.responsiveBaseElement).width():e.innerWidth?s=e.innerWidth:i.documentElement&&i.documentElement.clientWidth?s=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),s},n.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter((function(){return 1===this.nodeType})).each(t.proxy((function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)}),this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},n.prototype.add=function(e,i){var n=this.relative(this._current);i=i===s?this._items.length:this.normalize(i,!0),e=e instanceof jQuery?e:t(e),this.trigger("add",{content:e,position:i}),e=this.prepare(e),0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(e),0!==this._items.length&&this._items[i-1].after(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(e),this._items.splice(i,0,e),this._mergers.splice(i,0,1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[n]&&this.reset(this._items[n].index()),this.invalidate("items"),this.trigger("added",{content:e,position:i})},n.prototype.remove=function(t){(t=this.normalize(t,!0))!==s&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},n.prototype.preloadAutoWidthImages=function(e){e.each(t.proxy((function(e,i){this.enter("pre-loading"),i=t(i),t(new Image).one("load",t.proxy((function(t){i.attr("src",t.target.src),i.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()}),this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))}),this))},n.prototype.destroy=function(){for(var s in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),t(i).off(".owl.core"),!1!==this.settings.responsive&&(e.clearTimeout(this.resizeTimer),this.off(e,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[s].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},n.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?t>i:t<i;case">":return s?t<i:t>i;case">=":return s?t<=i:t>=i;case"<=":return s?t>=i:t<=i}},n.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},n.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},n.prototype.trigger=function(e,i,s,o,r){var a={item:{count:this._items.length,index:this.current()}},h=t.camelCase(t.grep(["on",e,s],(function(t){return t})).join("-").toLowerCase()),l=t.Event([e,"owl",s||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},a,i));return this._supress[e]||(t.each(this._plugins,(function(t,e){e.onTrigger&&e.onTrigger(l)})),this.register({type:n.Type.Event,name:e}),this.$element.trigger(l),this.settings&&"function"==typeof this.settings[h]&&this.settings[h].call(this,l)),l},n.prototype.enter=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy((function(t,e){this._states.current[e]===s&&(this._states.current[e]=0),this._states.current[e]++}),this))},n.prototype.leave=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy((function(t,e){this._states.current[e]--}),this))},n.prototype.register=function(e){if(e.type===n.Type.Event){if(t.event.special[e.name]||(t.event.special[e.name]={}),!t.event.special[e.name].owl){var i=t.event.special[e.name]._default;t.event.special[e.name]._default=function(t){return!i||!i.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&t.namespace.indexOf("owl")>-1:i.apply(this,arguments)},t.event.special[e.name].owl=!0}}else e.type===n.Type.State&&(this._states.tags[e.name]?this._states.tags[e.name]=this._states.tags[e.name].concat(e.tags):this._states.tags[e.name]=e.tags,this._states.tags[e.name]=t.grep(this._states.tags[e.name],t.proxy((function(i,s){return t.inArray(i,this._states.tags[e.name])===s}),this)))},n.prototype.suppress=function(e){t.each(e,t.proxy((function(t,e){this._supress[e]=!0}),this))},n.prototype.release=function(e){t.each(e,t.proxy((function(t,e){delete this._supress[e]}),this))},n.prototype.pointer=function(t){var i={x:null,y:null};return(t=(t=t.originalEvent||t||e.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i},n.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},n.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.fn.owlCarousel=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each((function(){var s=t(this),o=s.data("owl.carousel");o||(o=new n(this,"object"==typeof e&&e),s.data("owl.carousel",o),t.each(["next","prev","to","destroy","refresh","replace","add","remove"],(function(e,i){o.register({type:n.Type.Event,name:i}),o.$element.on(i+".owl.carousel.core",t.proxy((function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([i]),o[i].apply(this,[].slice.call(arguments,1)),this.release([i]))}),o))}))),"string"==typeof e&&"_"!==e.charAt(0)&&o[e].apply(o,i)}))},t.fn.owlCarousel.Constructor=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={autoRefresh:!0,autoRefreshInterval:500},n.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=e.setInterval(t.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},n.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},n.prototype.destroy=function(){var t,i;for(t in e.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoRefresh=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":t.proxy((function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type)){var i=this._core.settings,s=i.center&&Math.ceil(i.items/2)||i.items,n=i.center&&-1*s||0,o=(e.property&&undefined!==e.property.value?e.property.value:this._core.current())+n,r=this._core.clones().length,a=t.proxy((function(t,e){this.load(e)}),this);for(i.lazyLoadEager>0&&(s+=i.lazyLoadEager,i.loop&&(o-=i.lazyLoadEager,s++));n++<s;)this.load(r/2+this._core.relative(o)),r&&t.each(this._core.clones(this._core.relative(o)),a),o++}}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={lazyLoad:!1,lazyLoadEager:0},n.prototype.load=function(i){var s=this._core.$stage.children().eq(i),n=s&&s.find(".owl-lazy");!n||t.inArray(s.get(0),this._loaded)>-1||(n.each(t.proxy((function(i,s){var n,o=t(s),r=e.devicePixelRatio>1&&o.attr("data-src-retina")||o.attr("data-src")||o.attr("data-srcset");this._core.trigger("load",{element:o,url:r},"lazy"),o.is("img")?o.one("load.owl.lazy",t.proxy((function(){o.addClass("owl-lazy-loaded"),this._core.trigger("loaded",{element:o,url:r},"lazy")}),this)).attr("src",r):o.is("source")?o.one("load.owl.lazy",t.proxy((function(){this._core.trigger("loaded",{element:o,url:r},"lazy")}),this)).attr("srcset",r):((n=new Image).onload=t.proxy((function(){o.css({"background-image":'url("'+r+'")',opacity:"1"}),this._core.trigger("loaded",{element:o,url:r},"lazy")}),this),n.src=r)}),this)),this._loaded.push(s.get(0)))},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(i){this._core=i,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.autoHeight&&this.update()}),this),"changed.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()}),this),"loaded.owl.lazy":t.proxy((function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var s=this;t(e).on("load",(function(){s._core.settings.autoHeight&&s.update()})),t(e).on("resize",(function(){s._core.settings.autoHeight&&(null!=s._intervalId&&clearTimeout(s._intervalId),s._intervalId=setTimeout((function(){s.update()}),250))}))};n.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},n.prototype.update=function(){var e=this._core._current,i=e+this._core.settings.items,s=this._core.settings.lazyLoad,n=this._core.$stage.children().toArray().slice(e,i),o=[],r=0;t.each(n,(function(e,i){o.push(t(i).height())})),(r=Math.max.apply(null,o))<=1&&s&&this._previousHeight&&(r=this._previousHeight),this._previousHeight=r,this._core.$stage.parent().height(r).addClass(this._core.settings.autoHeightClass)},n.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":t.proxy((function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})}),this),"resize.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()}),this),"refreshed.owl.carousel":t.proxy((function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()}),this),"changed.owl.carousel":t.proxy((function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()}),this),"prepared.owl.carousel":t.proxy((function(e){if(e.namespace){var i=t(e.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,t(e.content)))}}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy((function(t){this.play(t)}),this))};n.Defaults={video:!1,videoHeight:!1,videoWidth:!1},n.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if((s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)i="youtube";else if(s[3].indexOf("vimeo")>-1)i="vimeo";else{if(!(s[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},n.prototype.thumbnail=function(e,i){var s,n,o=i.width&&i.height?"width:"+i.width+"px;height:"+i.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings,c=function(i){'<div class="owl-video-play-icon"></div>',s=l.lazyLoad?t("<div/>",{class:"owl-video-tn "+h,srcType:i}):t("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+i+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')};if(e.wrap(t("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return c(r.attr(a)),r.remove(),!1;"youtube"===i.type?(n="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",c(n)):"vimeo"===i.type?t.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,c(n)}}):"vzaar"===i.type&&t.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,c(n)}})},n.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},n.prototype.play=function(e){var i,s=t(e.target).closest("."+this._core.settings.itemClass),n=this._videos[s.attr("data-video")],o=n.width||"100%",r=n.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),s=this._core.items(this._core.relative(s.index())),this._core.reset(s.index()),(i=t('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",r),i.attr("width",o),"youtube"===n.type?i.attr("src","//www.youtube.com/embed/"+n.id+"?autoplay=1&rel=0&v="+n.id):"vimeo"===n.type?i.attr("src","//player.vimeo.com/video/"+n.id+"?autoplay=1"):"vzaar"===n.type&&i.attr("src","//view.vzaar.com/"+n.id+"/player?autoplay=true"),t(i).wrap('<div class="owl-video-frame" />').insertAfter(s.find(".owl-video")),this._playing=s.addClass("owl-video-playing"))},n.prototype.isInFullScreen=function(){var e=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return e&&t(e).parent().hasClass("owl-video-frame")},n.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this.core=e,this.core.options=t.extend({},n.Defaults,this.core.options),this.swapping=!0,this.previous=s,this.next=s,this.handlers={"change.owl.carousel":t.proxy((function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)}),this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy((function(t){t.namespace&&(this.swapping="translated"==t.type)}),this),"translate.owl.carousel":t.proxy((function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()}),this)},this.core.$element.on(this.handlers)};n.Defaults={animateOut:!1,animateIn:!1},n.prototype.swap=function(){if(1===this.core.settings.items&&t.support.animation&&t.support.transition){this.core.speed(0);var e,i=t.proxy(this.clear,this),s=this.core.$stage.children().eq(this.previous),n=this.core.$stage.children().eq(this.next),o=this.core.settings.animateIn,r=this.core.settings.animateOut;this.core.current()!==this.previous&&(r&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),s.one(t.support.animation.end,i).css({left:e+"px"}).addClass("animated owl-animated-out").addClass(r)),o&&n.one(t.support.animation.end,i).addClass("animated owl-animated-in").addClass(o))}},n.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":t.proxy((function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)}),this),"initialized.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.autoplay&&this.play()}),this),"play.owl.autoplay":t.proxy((function(t,e,i){t.namespace&&this.play(e,i)}),this),"stop.owl.autoplay":t.proxy((function(t){t.namespace&&this.stop()}),this),"mouseover.owl.autoplay":t.proxy((function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()}),this),"mouseleave.owl.autoplay":t.proxy((function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()}),this),"touchstart.owl.core":t.proxy((function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()}),this),"touchend.owl.core":t.proxy((function(){this._core.settings.autoplayHoverPause&&this.play()}),this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},n.Defaults,this._core.options)};n.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},n.prototype._next=function(s){this._call=e.setTimeout(t.proxy(this._next,this,s),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||i.hidden||this._core.next(s||this._core.settings.autoplaySpeed)},n.prototype.read=function(){return(new Date).getTime()-this._time},n.prototype.play=function(i,s){var n;this._core.is("rotating")||this._core.enter("rotating"),i=i||this._core.settings.autoplayTimeout,n=Math.min(this._time%(this._timeout||i),i),this._paused?(this._time=this.read(),this._paused=!1):e.clearTimeout(this._call),this._time+=this.read()%i-n,this._timeout=i,this._call=e.setTimeout(t.proxy(this._next,this,s),i-n)},n.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,e.clearTimeout(this._call),this._core.leave("rotating"))},n.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,e.clearTimeout(this._call))},n.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){"use strict";var n=function(e){this._core=e,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy((function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")}),this),"added.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())}),this),"remove.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)}),this),"changed.owl.carousel":t.proxy((function(t){t.namespace&&"position"==t.property.name&&this.draw()}),this),"initialized.owl.carousel":t.proxy((function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))}),this),"refreshed.owl.carousel":t.proxy((function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers)};n.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" aria-label="Owl carousel Navigation" role="button"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},n.prototype.initialize=function(){var e,i=this._core.settings;for(e in this._controls.$relative=(i.navContainer?t(i.navContainer):t("<div>").addClass(i.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=t("<"+i.navElement+">").addClass(i.navClass[0]).html(i.navText[0]).prependTo(this._controls.$relative).on("click",t.proxy((function(t){this.prev(i.navSpeed)}),this)),this._controls.$next=t("<"+i.navElement+">").addClass(i.navClass[1]).html(i.navText[1]).appendTo(this._controls.$relative).on("click",t.proxy((function(t){this.next(i.navSpeed)}),this)),i.dotsData||(this._templates=[t('<button aria-label="Owl Carousel Pagination"  role="button">').addClass(i.dotClass).append(t("<span>")).prop("outerHTML")]),this._controls.$absolute=(i.dotsContainer?t(i.dotsContainer):t("<div>").addClass(i.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",t.proxy((function(e){var s=t(e.target).parent().is(this._controls.$absolute)?t(e.target).index():t(e.target).parent().index();e.preventDefault(),this.to(s,i.dotsSpeed)}),this)),this._overrides)this._core[e]=t.proxy(this[e],this)},n.prototype.destroy=function(){var t,e,i,s,n;for(t in n=this._core.settings,this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},n.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0,0;t<s;t++){if(e>=r||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0}e+=this._core.mergers(this._core.relative(t))}},n.prototype.draw=function(){var e,i=this._core.settings,s=this._core.items().length<=i.items,n=this._core.relative(this._core.current()),o=i.loop||i.rewind;this._controls.$relative.toggleClass("disabled",!i.nav||s),i.nav&&(this._controls.$previous.toggleClass("disabled",!o&&n<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!o&&n>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!i.dots||s),i.dots&&(e=this._pages.length-this._controls.$absolute.children().length,i.dotsData&&0!==e?this._controls.$absolute.html(this._templates.join("")):e>0?this._controls.$absolute.append(new Array(e+1).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(t.inArray(this.current(),this._pages)).addClass("active"))},n.prototype.onTrigger=function(e){var i=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}},n.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,t.proxy((function(t,i){return t.start<=e&&t.end>=e}),this)).pop()},n.prototype.getPosition=function(e){var i,s,n=this._core.settings;return"page"==n.slideBy?(i=t.inArray(this.current(),this._pages),s=this._pages.length,e?++i:--i,i=this._pages[(i%s+s)%s].start):(i=this._core.relative(this._core.current()),s=this._core.items().length,e?i+=n.slideBy:i-=n.slideBy),i},n.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},n.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},n.prototype.to=function(e,i,s){var n;!s&&this._pages.length?(n=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%n+n)%n].start,i)):t.proxy(this._overrides.to,this._core)(e,i)},t.fn.owlCarousel.Constructor.Plugins.Navigation=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){"use strict";var n=function(i){this._core=i,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy((function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")}),this),"prepared.owl.carousel":t.proxy((function(e){if(e.namespace){var i=t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=e.content}}),this),"changed.owl.carousel":t.proxy((function(i){if(i.namespace&&"position"===i.property.name){var s=this._core.items(this._core.relative(this._core.current())),n=t.map(this._hashes,(function(t,e){return t===s?e:null})).join();if(!n||e.location.hash.slice(1)===n)return;e.location.hash=n}}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy((function(t){var i=e.location.hash.substring(1),s=this._core.$stage.children(),n=this._hashes[i]&&s.index(this._hashes[i]);undefined!==n&&n!==this._core.current()&&this._core.to(this._core.relative(n),!1,!0)}),this))};n.Defaults={URLhashListener:!1},n.prototype.destroy=function(){var i,s;for(i in t(e).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(i,this._handlers[i]);for(s in Object.getOwnPropertyNames(this))"function"!=typeof this[s]&&(this[s]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=t("<support>").get(0).style,o="Webkit Moz O ms".split(" "),r={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},a=function(){return!!c("transform")},h=function(){return!!c("perspective")},l=function(){return!!c("animation")};function c(e,i){var r=!1,a=e.charAt(0).toUpperCase()+e.slice(1);return t.each((e+" "+o.join(a+" ")+a).split(" "),(function(t,e){if(n[e]!==s)return r=!i||e,!1})),r}function p(t){return c(t,!0)}(function(){return!!c("transition")})()&&(t.support.transition=new String(p("transition")),t.support.transition.end=r.transition.end[t.support.transition]),l()&&(t.support.animation=new String(p("animation")),t.support.animation.end=r.animation.end[t.support.animation]),a()&&(t.support.transform=new String(p("transform")),t.support.transform3d=h())}(window.jQuery||window.Zepto,window,document);
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,Array.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=Array.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).trigger('focus'),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).trigger('focus')},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
"function"!=typeof Object.create&&(Object.create=function(o){function e(){}return e.prototype=o,new e}),function(o,e,i,t){var n={init:function(e,i){var t=this;t.elem=i,t.$elem=o(i),t.imageSrc=t.$elem.data("zoom-image")?t.$elem.data("zoom-image"):t.$elem.attr("href")?t.$elem.attr("href"):t.$elem.data("original")?t.$elem.data("original"):t.$elem.attr("src"),t.options=o.extend({},o.fn.elevateZoom.options,e),t.options.tint&&(t.options.lensColour="none",t.options.lensOpacity="1"),"inner"==t.options.zoomType&&(t.options.showLens=!1),t.options.zoomContainer?t.$container=o(t.options.zoomContainer):t.$container=o("body"),t.$elem.parent().removeAttr("title").removeAttr("alt"),t.zoomImage=t.imageSrc,t.refresh(1),o("#"+t.options.gallery+" a").on("click",(function(e){return t.options.galleryActiveClass&&(o("#"+t.options.gallery+" a").removeClass(t.options.galleryActiveClass),o(this).addClass(t.options.galleryActiveClass)),e.preventDefault(),o(this).data("zoom-image")?t.zoomImagePre=o(this).data("zoom-image"):t.zoomImagePre=o(this).data("image"),t.swaptheimage(o(this).data("image"),t.zoomImagePre),!1}))},refresh:function(o){var e=this;setTimeout((function(){e.fetch(e.imageSrc)}),o||e.options.refresh)},fetch:function(o){var e=this,i=new Image;i.onload=function(){e.largeWidth=i.width,e.largeHeight=i.height,e.startZoom(),e.currentImage=e.imageSrc,e.options.onZoomedImageLoaded(e.$elem)},i.src=o},startZoom:function(){var i=this;if(i.nzWidth=i.$elem.width(),i.nzHeight=i.$elem.height(),i.isWindowActive=!1,i.isLensActive=!1,i.isTintActive=!1,i.overWindow=!1,i.options.imageCrossfade&&(i.zoomWrap=i.$elem.wrap('<div style="height:'+i.nzHeight+"px;width:"+i.nzWidth+'px;" class="zoomWrapper" />'),i.$elem.css("position","absolute")),i.zoomLock=1,i.scrollingLock=!1,i.changeBgSize=!1,i.currentZoomLevel=i.options.zoomLevel,i.nzOffset=i.$elem.offset(),i.ctOffset=i.$container.offset(),i.widthRatio=i.largeWidth/i.currentZoomLevel/i.nzWidth,i.heightRatio=i.largeHeight/i.currentZoomLevel/i.nzHeight,"window"==i.options.zoomType&&(i.zoomWindowStyle="overflow: hidden;background-position: 0px 0px;text-align:center;background-color: "+String(i.options.zoomWindowBgColour)+";width: "+String(i.options.zoomWindowWidth)+"px;height: "+String(i.options.zoomWindowHeight)+"px;float: left;background-size: "+i.largeWidth/i.currentZoomLevel+"px "+i.largeHeight/i.currentZoomLevel+"px;display: none;z-index:100;border: "+String(i.options.borderSize)+"px solid "+i.options.borderColour+";background-repeat: no-repeat;position: absolute;"),"inner"==i.options.zoomType){i.$elem.css("border-left-width");i.zoomWindowStyle="overflow: hidden;margin-left: -"+String(i.options.borderSize)+"px;margin-top: -"+String(i.options.borderSize)+"px;background-position: 0px 0px;width: "+String(i.nzWidth)+"px;height: "+String(i.nzHeight)+"px;float: left;display: none;cursor:"+i.options.cursor+";border: "+String(i.options.borderSize)+"px solid "+i.options.borderColour+";background-repeat: no-repeat;position: absolute;"}if("window"==i.options.zoomType&&(i.nzHeight<i.options.zoomWindowWidth/i.widthRatio?lensHeight=i.nzHeight:lensHeight=String(i.options.zoomWindowHeight/i.heightRatio),i.largeWidth<i.options.zoomWindowWidth?lensWidth=i.nzWidth:lensWidth=i.options.zoomWindowWidth/i.widthRatio,i.lensStyle="background-position: 0px 0px;width: "+String(i.options.zoomWindowWidth/i.widthRatio)+"px;height: "+String(i.options.zoomWindowHeight/i.heightRatio)+"px;float: right;display: none;overflow: hidden;z-index: 999;-webkit-transform: translateZ(0);opacity:"+i.options.lensOpacity+";filter: alpha(opacity="+100*i.options.lensOpacity+"); zoom:1;width:"+lensWidth+"px;height:"+lensHeight+"px;background-color:"+i.options.lensColour+";cursor:"+i.options.cursor+";border: "+i.options.lensBorderSize+"px solid "+i.options.lensBorderColour+";background-repeat: no-repeat;position: absolute;"),i.tintStyle="display: block;position: absolute;background-color: "+i.options.tintColour+";filter:alpha(opacity=0);opacity: 0;width: "+i.nzWidth+"px;height: "+i.nzHeight+"px;",i.lensRound="","lens"==i.options.zoomType&&(i.lensStyle="background-position: 0px 0px;float: left;display: none;border: "+String(i.options.borderSize)+"px solid "+i.options.borderColour+";width:"+String(i.options.lensSize)+"px;height:"+String(i.options.lensSize)+"px;background-repeat: no-repeat;position: absolute;"),"round"==i.options.lensShape&&(i.lensRound="border-top-left-radius: "+String(i.options.lensSize/2+i.options.borderSize)+"px;border-top-right-radius: "+String(i.options.lensSize/2+i.options.borderSize)+"px;border-bottom-left-radius: "+String(i.options.lensSize/2+i.options.borderSize)+"px;border-bottom-right-radius: "+String(i.options.lensSize/2+i.options.borderSize)+"px;"),void 0!==i.ctOffset){i.$container.find(".zoomContainer").length&&i.$container.find(".zoomContainer").remove(),i.zoomContainer=o('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:'+(i.nzOffset.left-i.ctOffset.left)+"px;top:"+(i.nzOffset.top-i.ctOffset.top)+"px;height:"+i.nzHeight+"px;width:"+i.nzWidth+'px;"></div>'),i.$container.append(i.zoomContainer),i.options.containLensZoom&&"lens"==i.options.zoomType&&i.zoomContainer.css("overflow","hidden"),"inner"!=i.options.zoomType&&(i.zoomLens=o("<div class='zoomLens' style='"+i.lensStyle+i.lensRound+"'>&nbsp;</div>").appendTo(i.zoomContainer).on("click",(function(){i.$elem.trigger("click")})),i.options.tint&&(i.tintContainer=o("<div/>").addClass("tintContainer"),i.zoomTint=o("<div class='zoomTint' style='"+i.tintStyle+"'></div>"),i.zoomLens.wrap(i.tintContainer),i.zoomTintcss=i.zoomLens.after(i.zoomTint),i.zoomTintImage=o('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: '+i.nzWidth+"px; height: "+i.nzHeight+'px;" src="'+i.imageSrc+'">').appendTo(i.zoomLens).on("click",(function(){i.$elem.trigger("click")})))),isNaN(i.options.zoomWindowPosition)?i.zoomWindow=o("<div style='z-index:999;left:"+i.windowOffsetLeft+"px;top:"+i.windowOffsetTop+"px;"+i.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo(i.$container).on("click",(function(){i.$elem.trigger("click")})):i.zoomWindow=o("<div style='z-index:999;left:"+i.windowOffsetLeft+"px;top:"+i.windowOffsetTop+"px;"+i.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo(i.zoomContainer).on("click",(function(){i.$elem.trigger("click")})),i.zoomWindowContainer=o("<div/>").addClass("zoomWindowContainer").css("width",i.options.zoomWindowWidth),i.zoomWindow.wrap(i.zoomWindowContainer),"lens"==i.options.zoomType&&i.zoomLens.css({backgroundImage:"url('"+i.imageSrc+"')"}),"window"==i.options.zoomType&&i.zoomWindow.css({backgroundImage:"url('"+i.imageSrc+"')"}),"inner"==i.options.zoomType&&i.zoomWindow.css({backgroundImage:"url('"+i.imageSrc+"')"});var t=navigator.userAgent.toLowerCase(),n=t.indexOf("chrome")>-1&&(t.indexOf("windows")>-1||t.indexOf("macintosh")>-1||t.indexOf("linux")>-1)&&t.indexOf("mobile")<0&&t.indexOf("android")<0,s="ontouchstart"in e&&!n;"dbltouch"==i.options.zoomActivation&&e.theme&&theme.is_device_mobile&&s?(o.fn.doubletap||(o.fn.doubletap=function(o){this.on("doubletap",o)},o.event.special.doubletap={setup:function(){var i,t,n=this,s=o(n),a=!1;s.on("touchstart",(function o(e){return(!e.which||1===e.which)&&(s.data("doubletapped",!1),i=e.target,s.data("callee1",o),e.originalEvent,!0)})).on("touchend",(function h(d){var l=Date.now(),r=l-(s.data("lastTouch")||l+1);if(e.clearTimeout(t),s.data("callee2",h),r<350&&d.target==i&&r>100){if(s.data("doubletapped",!0),!a){var p=d.type;d.type="doubletap",o.event.dispatch.call(n,d),d.type=p,firstTap=null}a=!0,e.setTimeout((function(){a=!1}),350)}else s.data("lastTouch",l),t=e.setTimeout((function(){firstTap=null,e.clearTimeout(t)}),350,[d]);s.data("lastTouch",l)}))},remove:function(){o(this).off("touchstart",o(this).data.callee1).off("touchend",o(this).data.callee2)}}),i.zoomContainer.on("doubletap",(function(o){var e=!1;if("inner"==i.options.zoomType?i.isWindowActive?i.showHideWindow("hide"):(i.showHideWindow("show"),e=!0):i.options.showLens&&(i.isLensActive?(i.showHideLens("hide"),i.options.tint&&i.showHideTint("hide")):(i.showHideLens("show"),i.options.tint&&i.showHideTint("show"),e=!0)),e){var t=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];i.setPosition(t)}})),i.$elem.on("touchmove",(function(o){o.preventDefault();var e=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];i.setPosition(e)})),i.zoomContainer.on("touchmove",(function(o){if(!("inner"==i.options.zoomType&&!i.isWindowActive||i.options.showLens&&!i.isLensActive)){o.preventDefault(),o.stopPropagation();var e=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];i.setPosition(e)}})),i.options.showLens&&i.zoomLens.on("touchmove",(function(o){o.preventDefault();var e=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];i.setPosition(e)}))):(i.$elem.on("touchmove",(function(o){o.preventDefault();var e=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];i.setPosition(e)})),i.zoomContainer.on("touchmove",(function(o){"inner"==i.options.zoomType&&i.showHideWindow("show"),o.preventDefault();var e=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];i.setPosition(e)})),i.zoomContainer.on("touchend",(function(o){i.showHideWindow("hide"),i.options.showLens&&i.showHideLens("hide"),i.options.tint&&"inner"!=i.options.zoomType&&i.showHideTint("hide")})),i.$elem.on("touchend",(function(o){i.showHideWindow("hide"),i.options.showLens&&i.showHideLens("hide"),i.options.tint&&"inner"!=i.options.zoomType&&i.showHideTint("hide")})),i.options.showLens&&(i.zoomLens.on("touchmove",(function(o){o.preventDefault();var e=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];i.setPosition(e)})),i.zoomLens.on("touchend",(function(o){i.showHideWindow("hide"),i.options.showLens&&i.showHideLens("hide"),i.options.tint&&"inner"!=i.options.zoomType&&i.showHideTint("hide")}))),i.$elem.on("mousemove",(function(o){0==i.overWindow&&i.setElements("show"),i.lastX===o.clientX&&i.lastY===o.clientY||(i.setPosition(o),i.currentLoc=o),i.lastX=o.clientX,i.lastY=o.clientY})),i.zoomContainer.on("mousemove",(function(o){0==i.overWindow&&i.setElements("show"),i.lastX===o.clientX&&i.lastY===o.clientY||(i.setPosition(o),i.currentLoc=o),i.lastX=o.clientX,i.lastY=o.clientY})),"inner"!=i.options.zoomType&&i.zoomLens.on("mousemove",(function(o){i.lastX===o.clientX&&i.lastY===o.clientY||(i.setPosition(o),i.currentLoc=o),i.lastX=o.clientX,i.lastY=o.clientY})),i.options.tint&&"inner"!=i.options.zoomType&&i.zoomTint.on("mousemove",(function(o){i.lastX===o.clientX&&i.lastY===o.clientY||(i.setPosition(o),i.currentLoc=o),i.lastX=o.clientX,i.lastY=o.clientY})),"inner"==i.options.zoomType&&i.zoomWindow.on("mousemove",(function(o){i.lastX===o.clientX&&i.lastY===o.clientY||(i.setPosition(o),i.currentLoc=o),i.lastX=o.clientX,i.lastY=o.clientY})),i.zoomContainer.add(i.$elem).on("mouseenter",(function(){0==i.overWindow&&i.setElements("show")})).on("mouseleave",(function(){i.scrollLock||i.setElements("hide")})),"inner"!=i.options.zoomType&&i.zoomWindow.on("mouseenter",(function(){i.overWindow=!0,i.setElements("hide")})).on("mouseleave",(function(){i.overWindow=!1}))),i.options.zoomLevel,i.options.minZoomLevel?i.minZoomLevel=i.options.minZoomLevel:i.minZoomLevel=2*i.options.scrollZoomIncrement,i.options.scrollZoom&&i.zoomContainer.add(i.$elem).on("mousewheel DOMMouseScroll MozMousePixelScroll",(function(e){i.scrollLock=!0,clearTimeout(o.data(this,"timer")),o.data(this,"timer",setTimeout((function(){i.scrollLock=!1}),250));var t=e.originalEvent.wheelDelta||-1*e.originalEvent.detail;return e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t/120>0?i.currentZoomLevel>=i.minZoomLevel&&i.changeZoomLevel(i.currentZoomLevel-i.options.scrollZoomIncrement):i.options.maxZoomLevel?i.currentZoomLevel<=i.options.maxZoomLevel&&i.changeZoomLevel(parseFloat(i.currentZoomLevel)+i.options.scrollZoomIncrement):i.changeZoomLevel(parseFloat(i.currentZoomLevel)+i.options.scrollZoomIncrement),!1}))}},setElements:function(o){var e=this;if(!e.options.zoomEnabled)return!1;"show"==o&&e.isWindowSet&&("inner"==e.options.zoomType&&e.showHideWindow("show"),"window"==e.options.zoomType&&e.showHideWindow("show"),e.options.showLens&&e.showHideLens("show"),e.options.tint&&"inner"!=e.options.zoomType&&e.showHideTint("show")),"hide"==o&&("window"==e.options.zoomType&&e.showHideWindow("hide"),e.options.tint||e.showHideWindow("hide"),e.options.showLens&&e.showHideLens("hide"),e.options.tint&&e.showHideTint("hide"))},setPosition:function(o){var e=this;if(!e.options.zoomEnabled)return!1;e.nzHeight=e.$elem.height(),e.nzWidth=e.$elem.width(),e.nzOffset=e.$elem.offset(),e.ctOffset=e.$container.offset(),e.options.tint&&"inner"!=e.options.zoomType&&(e.zoomTint.css({top:0}),e.zoomTint.css({left:0})),e.options.responsive&&!e.options.scrollZoom&&e.options.showLens&&(e.nzHeight<e.options.zoomWindowWidth/e.widthRatio?lensHeight=e.nzHeight:lensHeight=String(e.options.zoomWindowHeight/e.heightRatio),e.largeWidth<e.options.zoomWindowWidth?lensWidth=e.nzWidth:lensWidth=e.options.zoomWindowWidth/e.widthRatio,e.widthRatio=e.largeWidth/e.nzWidth,e.heightRatio=e.largeHeight/e.nzHeight,"lens"!=e.options.zoomType&&(e.nzHeight<e.options.zoomWindowWidth/e.widthRatio?lensHeight=e.nzHeight:lensHeight=String(e.options.zoomWindowHeight/e.heightRatio),e.options.zoomWindowWidth<e.options.zoomWindowWidth?lensWidth=e.nzWidth:lensWidth=e.options.zoomWindowWidth/e.widthRatio,e.zoomLens.css("width",lensWidth),e.zoomLens.css("height",lensHeight),e.options.tint&&(e.zoomTintImage.css("width",e.nzWidth),e.zoomTintImage.css("height",e.nzHeight))),"lens"==e.options.zoomType&&e.zoomLens.css({width:String(e.options.lensSize)+"px",height:String(e.options.lensSize)+"px"})),e.zoomContainer.css({top:e.nzOffset.top-e.ctOffset.top}),e.zoomContainer.css({left:e.nzOffset.left-e.ctOffset.left}),e.mouseLeft=parseInt(o.pageX-e.nzOffset.left),e.mouseTop=parseInt(o.pageY-e.nzOffset.top),"window"==e.options.zoomType&&(e.Etoppos=e.mouseTop<e.zoomLens.height()/2,e.Eboppos=e.mouseTop>e.nzHeight-e.zoomLens.height()/2-2*e.options.lensBorderSize,e.Eloppos=e.mouseLeft<0+e.zoomLens.width()/2,e.Eroppos=e.mouseLeft>e.nzWidth-e.zoomLens.width()/2-2*e.options.lensBorderSize),"inner"==e.options.zoomType&&(e.Etoppos=e.mouseTop<e.nzHeight/2/e.heightRatio,e.Eboppos=e.mouseTop>e.nzHeight-e.nzHeight/2/e.heightRatio,e.Eloppos=e.mouseLeft<0+e.nzWidth/2/e.widthRatio,e.Eroppos=e.mouseLeft>e.nzWidth-e.nzWidth/2/e.widthRatio-2*e.options.lensBorderSize),e.mouseLeft<=0||e.mouseTop<0||e.mouseLeft>e.nzWidth||e.mouseTop>e.nzHeight?e.setElements("hide"):(e.options.showLens&&(e.lensLeftPos=String(e.mouseLeft-e.zoomLens.width()/2),e.lensTopPos=String(e.mouseTop-e.zoomLens.height()/2)),e.Etoppos&&(e.lensTopPos=0),e.Eloppos&&(e.windowLeftPos=0,e.lensLeftPos=0,e.tintpos=0),"window"==e.options.zoomType&&(e.Eboppos&&(e.lensTopPos=Math.max(e.nzHeight-e.zoomLens.height()-2*e.options.lensBorderSize,0)),e.Eroppos&&(e.lensLeftPos=e.nzWidth-e.zoomLens.width()-2*e.options.lensBorderSize)),"inner"==e.options.zoomType&&(e.Eboppos&&(e.lensTopPos=Math.max(e.nzHeight-2*e.options.lensBorderSize,0)),e.Eroppos&&(e.lensLeftPos=e.nzWidth-e.nzWidth-2*e.options.lensBorderSize)),"lens"==e.options.zoomType&&(e.windowLeftPos=String(-1*((o.pageX-e.nzOffset.left)*e.widthRatio-e.zoomLens.width()/2)),e.windowTopPos=String(-1*((o.pageY-e.nzOffset.top)*e.heightRatio-e.zoomLens.height()/2)),e.zoomLens.css({backgroundPosition:e.windowLeftPos+"px "+e.windowTopPos+"px"}),e.changeBgSize&&(e.nzHeight>e.nzWidth?("lens"==e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"})):("lens"==e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"})),e.changeBgSize=!1),e.setWindowPostition(o)),e.options.tint&&"inner"!=e.options.zoomType&&e.setTintPosition(o),"window"==e.options.zoomType&&e.setWindowPostition(o),"inner"==e.options.zoomType&&e.setWindowPostition(o),e.options.showLens&&(e.fullwidth&&"lens"!=e.options.zoomType&&(e.lensLeftPos=0),e.zoomLens.css({left:e.lensLeftPos+"px",top:e.lensTopPos+"px"})))},showHideWindow:function(o){var e=this;"show"==o&&(e.isWindowActive||(e.options.zoomWindowFadeIn?e.zoomWindow.stop(!0,!0,!1).fadeIn(e.options.zoomWindowFadeIn):e.zoomWindow.show(),e.isWindowActive=!0)),"hide"==o&&e.isWindowActive&&(e.options.zoomWindowFadeOut?e.zoomWindow.stop(!0,!0).fadeOut(e.options.zoomWindowFadeOut):e.zoomWindow.hide(),e.isWindowActive=!1)},showHideLens:function(o){var e=this;"show"==o&&(e.isLensActive||(e.options.lensFadeIn?e.zoomLens.stop(!0,!0,!1).fadeIn(e.options.lensFadeIn):e.zoomLens.show(),e.isLensActive=!0)),"hide"==o&&e.isLensActive&&(e.options.lensFadeOut?e.zoomLens.stop(!0,!0).fadeOut(e.options.lensFadeOut):e.zoomLens.hide(),e.isLensActive=!1)},showHideTint:function(o){var e=this;"show"==o&&(e.isTintActive||(e.options.zoomTintFadeIn?e.zoomTint.css({opacity:e.options.tintOpacity}).animate().stop(!0,!0).fadeIn("slow"):(e.zoomTint.css({opacity:e.options.tintOpacity}).animate(),e.zoomTint.show()),e.isTintActive=!0)),"hide"==o&&e.isTintActive&&(e.options.zoomTintFadeOut?e.zoomTint.stop(!0,!0).fadeOut(e.options.zoomTintFadeOut):e.zoomTint.hide(),e.isTintActive=!1)},setLensPostition:function(o){},setWindowPostition:function(e){var i=this;if(isNaN(i.options.zoomWindowPosition))i.externalContainer=o("#"+i.options.zoomWindowPosition),i.externalContainerWidth=i.externalContainer.width(),i.externalContainerHeight=i.externalContainer.height(),i.externalContainerOffset=i.externalContainer.offset(),i.windowOffsetTop=i.externalContainerOffset.top,i.windowOffsetLeft=i.externalContainerOffset.left;else switch(i.options.zoomWindowPosition){case 1:i.windowOffsetTop=i.options.zoomWindowOffety,i.windowOffsetLeft=+i.nzWidth;break;case 2:i.options.zoomWindowHeight>i.nzHeight&&(i.windowOffsetTop=-1*(i.options.zoomWindowHeight/2-i.nzHeight/2),i.windowOffsetLeft=i.nzWidth);break;case 3:i.windowOffsetTop=i.nzHeight-i.zoomWindow.height()-2*i.options.borderSize,i.windowOffsetLeft=i.nzWidth;break;case 4:i.windowOffsetTop=i.nzHeight,i.windowOffsetLeft=i.nzWidth;break;case 5:i.windowOffsetTop=i.nzHeight,i.windowOffsetLeft=i.nzWidth-i.zoomWindow.width()-2*i.options.borderSize;break;case 6:i.options.zoomWindowHeight>i.nzHeight&&(i.windowOffsetTop=i.nzHeight,i.windowOffsetLeft=-1*(i.options.zoomWindowWidth/2-i.nzWidth/2+2*i.options.borderSize));break;case 7:i.windowOffsetTop=i.nzHeight,i.windowOffsetLeft=0;break;case 8:i.windowOffsetTop=i.nzHeight,i.windowOffsetLeft=-1*(i.zoomWindow.width()+2*i.options.borderSize);break;case 9:i.windowOffsetTop=i.nzHeight-i.zoomWindow.height()-2*i.options.borderSize,i.windowOffsetLeft=-1*(i.zoomWindow.width()+2*i.options.borderSize);break;case 10:i.options.zoomWindowHeight>i.nzHeight&&(i.windowOffsetTop=-1*(i.options.zoomWindowHeight/2-i.nzHeight/2),i.windowOffsetLeft=-1*(i.zoomWindow.width()+2*i.options.borderSize));break;case 11:i.windowOffsetTop=i.options.zoomWindowOffety,i.windowOffsetLeft=-1*(i.zoomWindow.width()+2*i.options.borderSize);break;case 12:i.windowOffsetTop=-1*(i.zoomWindow.height()+2*i.options.borderSize),i.windowOffsetLeft=-1*(i.zoomWindow.width()+2*i.options.borderSize);break;case 13:i.windowOffsetTop=-1*(i.zoomWindow.height()+2*i.options.borderSize),i.windowOffsetLeft=0;break;case 14:i.options.zoomWindowHeight>i.nzHeight&&(i.windowOffsetTop=-1*(i.zoomWindow.height()+2*i.options.borderSize),i.windowOffsetLeft=-1*(i.options.zoomWindowWidth/2-i.nzWidth/2+2*i.options.borderSize));break;case 15:i.windowOffsetTop=-1*(i.zoomWindow.height()+2*i.options.borderSize),i.windowOffsetLeft=i.nzWidth-i.zoomWindow.width()-2*i.options.borderSize;break;case 16:i.windowOffsetTop=-1*(i.zoomWindow.height()+2*i.options.borderSize),i.windowOffsetLeft=i.nzWidth;break;default:i.windowOffsetTop=i.options.zoomWindowOffety,i.windowOffsetLeft=i.nzWidth}i.isWindowSet=!0,i.windowOffsetTop=i.windowOffsetTop+i.options.zoomWindowOffety,i.windowOffsetLeft=i.windowOffsetLeft+i.options.zoomWindowOffetx,i.zoomWindow.css({top:i.windowOffsetTop}),i.zoomWindow.css({left:i.windowOffsetLeft}),"inner"==i.options.zoomType&&(i.zoomWindow.css({top:0}),i.zoomWindow.css({left:0})),i.windowLeftPos=String(-1*((e.pageX-i.nzOffset.left)*i.widthRatio-i.zoomWindow.width()/2)),i.windowTopPos=String(-1*((e.pageY-i.nzOffset.top)*i.heightRatio-i.zoomWindow.height()/2)),i.Etoppos&&(i.windowTopPos=0),i.Eloppos&&(i.windowLeftPos=0),i.Eboppos&&(i.windowTopPos=-1*(i.largeHeight/i.currentZoomLevel-i.zoomWindow.height())),i.Eroppos&&(i.windowLeftPos=-1*(i.largeWidth/i.currentZoomLevel-i.zoomWindow.width())),i.fullheight&&(i.windowTopPos=0),i.fullwidth&&(i.windowLeftPos=0),"window"!=i.options.zoomType&&"inner"!=i.options.zoomType||(1==i.zoomLock&&(i.widthRatio<=1&&(i.windowLeftPos=0),i.heightRatio<=1&&(i.windowTopPos=0)),i.largeHeight<i.options.zoomWindowHeight&&(i.windowTopPos=0),i.largeWidth<i.options.zoomWindowWidth&&(i.windowLeftPos=0),i.options.easing?(i.xp||(i.xp=0),i.yp||(i.yp=0),i.loop||(i.loop=setInterval((function(){i.xp+=(i.windowLeftPos-i.xp)/i.options.easingAmount,i.yp+=(i.windowTopPos-i.yp)/i.options.easingAmount,i.scrollingLock?(clearInterval(i.loop),i.xp=i.windowLeftPos,i.yp=i.windowTopPos,i.xp=-1*((e.pageX-i.nzOffset.left)*i.widthRatio-i.zoomWindow.width()/2),i.yp=-1*((e.pageY-i.nzOffset.top)*i.heightRatio-i.zoomWindow.height()/2),i.changeBgSize&&(i.nzHeight>i.nzWidth?("lens"==i.options.zoomType&&i.zoomLens.css({"background-size":i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"}),i.zoomWindow.css({"background-size":i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"})):("lens"!=i.options.zoomType&&i.zoomLens.css({"background-size":i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvalueheight+"px"}),i.zoomWindow.css({"background-size":i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"})),i.changeBgSize=!1),i.zoomWindow.css({backgroundPosition:i.windowLeftPos+"px "+i.windowTopPos+"px"}),i.scrollingLock=!1,i.loop=!1):(i.changeBgSize&&(i.nzHeight>i.nzWidth?("lens"==i.options.zoomType&&i.zoomLens.css({"background-size":i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"}),i.zoomWindow.css({"background-size":i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"})):("lens"!=i.options.zoomType&&i.zoomLens.css({"background-size":i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"}),i.zoomWindow.css({"background-size":i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"})),i.changeBgSize=!1),i.zoomWindow.css({backgroundPosition:i.xp+"px "+i.yp+"px"}))}),16))):(i.changeBgSize&&(i.nzHeight>i.nzWidth?("lens"==i.options.zoomType&&i.zoomLens.css({"background-size":i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"}),i.zoomWindow.css({"background-size":i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"})):("lens"==i.options.zoomType&&i.zoomLens.css({"background-size":i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"}),i.largeHeight/i.newvaluewidth<i.options.zoomWindowHeight?i.zoomWindow.css({"background-size":i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"}):i.zoomWindow.css({"background-size":i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"})),i.changeBgSize=!1),i.zoomWindow.css({backgroundPosition:i.windowLeftPos+"px "+i.windowTopPos+"px"})))},setTintPosition:function(o){var e=this;e.nzOffset=e.$elem.offset(),e.tintpos=String(-1*(o.pageX-e.nzOffset.left-e.zoomLens.width()/2)),e.tintposy=String(-1*(o.pageY-e.nzOffset.top-e.zoomLens.height()/2)),e.Etoppos&&(e.tintposy=0),e.Eloppos&&(e.tintpos=0),e.Eboppos&&(e.tintposy=-1*(e.nzHeight-e.zoomLens.height()-2*e.options.lensBorderSize)),e.Eroppos&&(e.tintpos=-1*(e.nzWidth-e.zoomLens.width()-2*e.options.lensBorderSize)),e.options.tint&&(e.fullheight&&(e.tintposy=0),e.fullwidth&&(e.tintpos=0),e.zoomTintImage.css({left:e.tintpos+"px"}),e.zoomTintImage.css({top:e.tintposy+"px"}))},swaptheimage:function(e,i){var t=this,n=new Image;t.options.loadingIcon&&(t.spinner=o("<div style=\"background: url('"+t.options.loadingIcon+"') no-repeat center;height:"+t.nzHeight+"px;width:"+t.nzWidth+'px;z-index: 2000;position: absolute; background-position: center center;"></div>'),t.$elem.after(t.spinner)),t.options.onImageSwap(t.$elem),n.onload=function(){t.largeWidth=n.width,t.largeHeight=n.height,t.zoomImage=i,void 0!==t.zoomWindow&&(t.zoomWindow.css({"background-size":t.largeWidth+"px "+t.largeHeight+"px"}),t.zoomWindow.css({"background-size":t.largeWidth+"px "+t.largeHeight+"px"}),t.swapAction(e,i))},n.src=i},swapAction:function(e,i){var t=this,n=new Image;if(n.onload=function(){t.nzHeight=n.height,t.nzWidth=n.width,t.options.onImageSwapComplete(t.$elem),t.doneCallback()},n.src=e,t.currentZoomLevel=t.options.zoomLevel,t.options.maxZoomLevel=!1,"lens"==t.options.zoomType&&t.zoomLens.css({backgroundImage:"url('"+i+"')"}),"window"==t.options.zoomType&&t.zoomWindow.css({backgroundImage:"url('"+i+"')"}),"inner"==t.options.zoomType&&t.zoomWindow.css({backgroundImage:"url('"+i+"')"}),t.currentImage=i,t.options.imageCrossfade){var s=t.$elem,a=s.clone();if(t.$elem.attr("src",e),t.$elem.after(a),a.stop(!0).fadeOut(t.options.imageCrossfade,(function(){o(this).remove()})),t.$elem.width("auto").removeAttr("width"),t.$elem.height("auto").removeAttr("height"),s.fadeIn(t.options.imageCrossfade),t.options.tint&&"inner"!=t.options.zoomType){var h=t.zoomTintImage,d=h.clone();t.zoomTintImage.attr("src",i),t.zoomTintImage.after(d),d.stop(!0).fadeOut(t.options.imageCrossfade,(function(){o(this).remove()})),h.fadeIn(t.options.imageCrossfade),t.zoomTint.css({height:t.$elem.height()}),t.zoomTint.css({width:t.$elem.width()})}t.zoomContainer.css("height",t.$elem.height()),t.zoomContainer.css("width",t.$elem.width()),"inner"==t.options.zoomType&&(t.options.constrainType||(t.zoomWrap.parent().css("height",t.$elem.height()),t.zoomWrap.parent().css("width",t.$elem.width()),t.zoomWindow.css("height",t.$elem.height()),t.zoomWindow.css("width",t.$elem.width()))),t.options.imageCrossfade&&(t.zoomWrap.css("height",t.$elem.height()),t.zoomWrap.css("width",t.$elem.width()))}else t.$elem.attr("src",e),t.options.tint&&(t.zoomTintImage.attr("src",i),t.zoomTintImage.attr("height",t.$elem.height()),t.zoomTintImage.css({height:t.$elem.height()}),t.zoomTint.css({height:t.$elem.height()})),t.zoomContainer.css("height",t.$elem.height()),t.zoomContainer.css("width",t.$elem.width()),t.options.imageCrossfade&&(t.zoomWrap.css("height",t.$elem.height()),t.zoomWrap.css("width",t.$elem.width()));t.options.constrainType&&("height"==t.options.constrainType&&(t.zoomContainer.css("height",t.options.constrainSize),t.zoomContainer.css("width","auto"),t.options.imageCrossfade?(t.zoomWrap.css("height",t.options.constrainSize),t.zoomWrap.css("width","auto"),t.constwidth=t.zoomWrap.width()):(t.$elem.css("height",t.options.constrainSize),t.$elem.css("width","auto"),t.constwidth=t.$elem.width()),"inner"==t.options.zoomType&&(t.zoomWrap.parent().css("height",t.options.constrainSize),t.zoomWrap.parent().css("width",t.constwidth),t.zoomWindow.css("height",t.options.constrainSize),t.zoomWindow.css("width",t.constwidth)),t.options.tint&&(t.tintContainer.css("height",t.options.constrainSize),t.tintContainer.css("width",t.constwidth),t.zoomTint.css("height",t.options.constrainSize),t.zoomTint.css("width",t.constwidth),t.zoomTintImage.css("height",t.options.constrainSize),t.zoomTintImage.css("width",t.constwidth))),"width"==t.options.constrainType&&(t.zoomContainer.css("height","auto"),t.zoomContainer.css("width",t.options.constrainSize),t.options.imageCrossfade?(t.zoomWrap.css("height","auto"),t.zoomWrap.css("width",t.options.constrainSize),t.constheight=t.zoomWrap.height()):(t.$elem.css("height","auto"),t.$elem.css("width",t.options.constrainSize),t.constheight=t.$elem.height()),"inner"==t.options.zoomType&&(t.zoomWrap.parent().css("height",t.constheight),t.zoomWrap.parent().css("width",t.options.constrainSize),t.zoomWindow.css("height",t.constheight),t.zoomWindow.css("width",t.options.constrainSize)),t.options.tint&&(t.tintContainer.css("height",t.constheight),t.tintContainer.css("width",t.options.constrainSize),t.zoomTint.css("height",t.constheight),t.zoomTint.css("width",t.options.constrainSize),t.zoomTintImage.css("height",t.constheight),t.zoomTintImage.css("width",t.options.constrainSize))))},doneCallback:function(){var o=this;o.options.loadingIcon&&o.spinner.hide(),o.nzOffset=o.$elem.offset(),o.nzWidth=o.$elem.width(),o.nzHeight=o.$elem.height(),o.currentZoomLevel=o.options.zoomLevel,o.widthRatio=o.largeWidth/o.nzWidth,o.heightRatio=o.largeHeight/o.nzHeight,"window"==o.options.zoomType&&(o.nzHeight<o.options.zoomWindowWidth/o.widthRatio?lensHeight=o.nzHeight:lensHeight=String(o.options.zoomWindowHeight/o.heightRatio),o.options.zoomWindowWidth<o.options.zoomWindowWidth?lensWidth=o.nzWidth:lensWidth=o.options.zoomWindowWidth/o.widthRatio,o.zoomLens&&(o.zoomLens.css("width",lensWidth),o.zoomLens.css("height",lensHeight)))},getCurrentImage:function(){return this.zoomImage},getGalleryList:function(){var e=this;return e.gallerylist=[],e.options.gallery?o("#"+e.options.gallery+" a").each((function(){var i="";o(this).data("zoom-image")?i=o(this).data("zoom-image"):o(this).data("image")&&(i=o(this).data("image")),i==e.zoomImage?e.gallerylist.unshift({href:""+i,title:o(this).find("img").attr("title")}):e.gallerylist.push({href:""+i,title:o(this).find("img").attr("title")})})):e.gallerylist.push({href:""+e.zoomImage,title:o(this).find("img").attr("title")}),e.gallerylist},changeZoomLevel:function(o){var e=this;e.scrollingLock=!0,e.newvalue=parseFloat(o).toFixed(2),newvalue=parseFloat(o).toFixed(2),maxheightnewvalue=e.largeHeight/(e.options.zoomWindowHeight/e.nzHeight*e.nzHeight),maxwidthtnewvalue=e.largeWidth/(e.options.zoomWindowWidth/e.nzWidth*e.nzWidth),"inner"!=e.options.zoomType&&(maxheightnewvalue<=newvalue?(e.heightRatio=e.largeHeight/maxheightnewvalue/e.nzHeight,e.newvalueheight=maxheightnewvalue,e.fullheight=!0):(e.heightRatio=e.largeHeight/newvalue/e.nzHeight,e.newvalueheight=newvalue,e.fullheight=!1),maxwidthtnewvalue<=newvalue?(e.widthRatio=e.largeWidth/maxwidthtnewvalue/e.nzWidth,e.newvaluewidth=maxwidthtnewvalue,e.fullwidth=!0):(e.widthRatio=e.largeWidth/newvalue/e.nzWidth,e.newvaluewidth=newvalue,e.fullwidth=!1),"lens"==e.options.zoomType&&(maxheightnewvalue<=newvalue?(e.fullwidth=!0,e.newvaluewidth=maxheightnewvalue):(e.widthRatio=e.largeWidth/newvalue/e.nzWidth,e.newvaluewidth=newvalue,e.fullwidth=!1))),"inner"==e.options.zoomType&&(maxheightnewvalue=parseFloat(e.largeHeight/e.nzHeight).toFixed(2),maxwidthtnewvalue=parseFloat(e.largeWidth/e.nzWidth).toFixed(2),newvalue>maxheightnewvalue&&(newvalue=maxheightnewvalue),newvalue>maxwidthtnewvalue&&(newvalue=maxwidthtnewvalue),maxheightnewvalue<=newvalue?(e.heightRatio=e.largeHeight/newvalue/e.nzHeight,newvalue>maxheightnewvalue?e.newvalueheight=maxheightnewvalue:e.newvalueheight=newvalue,e.fullheight=!0):(e.heightRatio=e.largeHeight/newvalue/e.nzHeight,newvalue>maxheightnewvalue?e.newvalueheight=maxheightnewvalue:e.newvalueheight=newvalue,e.fullheight=!1),maxwidthtnewvalue<=newvalue?(e.widthRatio=e.largeWidth/newvalue/e.nzWidth,newvalue>maxwidthtnewvalue?e.newvaluewidth=maxwidthtnewvalue:e.newvaluewidth=newvalue,e.fullwidth=!0):(e.widthRatio=e.largeWidth/newvalue/e.nzWidth,e.newvaluewidth=newvalue,e.fullwidth=!1)),scrcontinue=!1,"inner"==e.options.zoomType&&(e.nzWidth>e.nzHeight&&(e.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,e.fullheight=!0,e.fullwidth=!0)),e.nzHeight>e.nzWidth&&(e.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,e.fullheight=!0,e.fullwidth=!0))),"inner"!=e.options.zoomType&&(scrcontinue=!0),scrcontinue&&(e.zoomLock=0,e.changeZoom=!0,e.options.zoomWindowHeight/e.heightRatio<=e.nzHeight&&(e.currentZoomLevel=e.newvalueheight,"lens"!=e.options.zoomType&&"inner"!=e.options.zoomType&&(e.changeBgSize=!0,e.zoomLens.css({height:String(e.options.zoomWindowHeight/e.heightRatio)+"px"})),"lens"!=e.options.zoomType&&"inner"!=e.options.zoomType||(e.changeBgSize=!0)),e.options.zoomWindowWidth/e.widthRatio<=e.nzWidth&&("inner"!=e.options.zoomType&&e.newvaluewidth>e.newvalueheight&&(e.currentZoomLevel=e.newvaluewidth),"lens"!=e.options.zoomType&&"inner"!=e.options.zoomType&&(e.changeBgSize=!0,e.zoomLens.css({width:String(e.options.zoomWindowWidth/e.widthRatio)+"px"})),"lens"!=e.options.zoomType&&"inner"!=e.options.zoomType||(e.changeBgSize=!0)),"inner"==e.options.zoomType&&(e.changeBgSize=!0,e.nzWidth>e.nzHeight&&(e.currentZoomLevel=e.newvaluewidth),e.nzHeight>e.nzWidth&&(e.currentZoomLevel=e.newvaluewidth))),e.currentLoc&&e.setPosition(e.currentLoc)},closeAll:function(){self.zoomWindow&&self.zoomWindow.hide(),self.zoomLens&&self.zoomLens.hide(),self.zoomTint&&self.zoomTint.hide()},changeState:function(o){"enable"==o&&(this.options.zoomEnabled=!0),"disable"==o&&(this.options.zoomEnabled=!1)}};o.fn.elevateZoom=function(e){return this.each((function(){var i=Object.create(n);i.init(e,this),o.data(this,"elevateZoom",i)}))},o.fn.elevateZoom.options={zoomActivation:"hover",zoomEnabled:!0,preloading:1,zoomLevel:1,scrollZoom:!1,scrollZoomIncrement:.1,minZoomLevel:!1,maxZoomLevel:!1,easing:!1,easingAmount:12,lensSize:200,zoomWindowWidth:400,zoomWindowHeight:400,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",lensFadeIn:!1,lensFadeOut:!1,debug:!1,zoomWindowFadeIn:!1,zoomWindowFadeOut:!1,zoomWindowAlwaysShow:!1,zoomTintFadeIn:!1,zoomTintFadeOut:!1,borderSize:4,showLens:!0,borderColour:"#888",lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:!1,lensColour:"white",lensOpacity:.4,lenszoom:!1,tint:!1,tintColour:"#333",tintOpacity:.4,gallery:!1,galleryActiveClass:"zoomGalleryActive",imageCrossfade:!1,constrainType:!1,constrainSize:!1,loadingIcon:!1,cursor:"default",responsive:!0,onComplete:o.noop,onZoomedImageLoaded:function(){},onImageSwap:o.noop,onImageSwapComplete:o.noop,zoomContainer:"body"}}(jQuery,window,document);
jQuery('.tips').each(function(){
let $this=jQuery(this);
$this.attr('data-bs-title', $this.data('title') );
});
if(!String.prototype.endsWith){
String.prototype.endsWith=function(search, this_len){
if(this_len===undefined||this_len > this.length){
this_len=this.length;
}
return this.substring(this_len - search.length, this_len)===search;
};}
if(window.NodeList&&!NodeList.prototype.forEach){
NodeList.prototype.forEach=Array.prototype.forEach;
}
if(!String.prototype.trim){
String.prototype.trim=function(){
return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
};}
(function($, sr){
'use strict';
var debounce=function(func, threshold, execAsap){
var timeout;
return function debounced(){
var obj=this, args=arguments;
function delayed(){
if(!execAsap)
func.apply(obj, args);
timeout=null;
}
if(timeout&&timeout.val)
theme.deleteTimeout(timeout);
else if(execAsap)
func.apply(obj, args);
timeout=theme.requestTimeout(delayed, threshold||100);
};};
jQuery.fn[sr]=function(fn){ return fn ? this.on('resize', debounce(fn) ):this.trigger(sr); };})(jQuery, 'smartresize');
jQuery.extend(jQuery.easing, {
def: 'easeOutQuad',
swing: function(x, t, b, c, d){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeOutQuad: function(x, t, b, c, d){
return -c *(t /=d) *(t - 2) + b;
},
easeInOutQuart: function(x, t, b, c, d){
if(( t /=d / 2) < 1) return c / 2 * t * t * t * t + b;
return -c / 2 *(( t -=2) * t * t * t - 2) + b;
},
easeOutQuint: function(x, t, b, c, d){
return c *(( t=t / d - 1) * t * t * t * t + 1) + b;
}});
(function($){
$.fn.visible=function(partial, hidden, direction, container){
if(this.length < 1)
return;
var $t=this.length > 1 ? this.eq(0):this,
isContained=typeof container!=='undefined'&&container!==null,
$w=isContained ? $(container):$(window),
wPosition=isContained ? $w.position():0,
t=$t.get(0),
vpWidth=$w.outerWidth(),
vpHeight=$w.outerHeight(),
direction=(direction) ? direction:'both',
clientSize=hidden===true ? t.offsetWidth * t.offsetHeight:true;
if(typeof t.getBoundingClientRect==='function'){
var rec=t.getBoundingClientRect(),
tViz=isContained ?
rec.top - wPosition.top >=0&&rec.top < vpHeight + wPosition.top :
rec.top >=0&&rec.top < vpHeight,
bViz=isContained ?
rec.bottom - wPosition.top > 0&&rec.bottom <=vpHeight + wPosition.top :
rec.bottom > 0&&rec.bottom <=vpHeight,
lViz=isContained ?
rec.left - wPosition.left >=0&&rec.left < vpWidth + wPosition.left :
rec.left >=0&&rec.left < vpWidth,
rViz=isContained ?
rec.right - wPosition.left > 0&&rec.right < vpWidth + wPosition.left :
rec.right > 0&&rec.right <=vpWidth,
vVisible=partial ? tViz||bViz:tViz&&bViz,
hVisible=partial ? lViz||rViz:lViz&&rViz;
if(direction==='both')
return clientSize&&vVisible&&hVisible;
else if(direction==='vertical')
return clientSize&&vVisible;
else if(direction==='horizontal')
return clientSize&&hVisible;
}else{
var viewTop=isContained ? 0:wPosition,
viewBottom=viewTop + vpHeight,
viewLeft=$w.scrollLeft(),
viewRight=viewLeft + vpWidth,
position=$t.position(),
_top=position.top,
_bottom=_top + $t.height(),
_left=position.left,
_right=_left + $t.width(),
compareTop=partial===true ? _bottom:_top,
compareBottom=partial===true ? _top:_bottom,
compareLeft=partial===true ? _right:_left,
compareRight=partial===true ? _left:_right;
if(direction==='both')
return !!clientSize&&(( compareBottom <=viewBottom)&&(compareTop >=viewTop) )&&(( compareRight <=viewRight)&&(compareLeft >=viewLeft) );
else if(direction==='vertical')
return !!clientSize&&(( compareBottom <=viewBottom)&&(compareTop >=viewTop) );
else if(direction==='horizontal')
return !!clientSize&&(( compareRight <=viewRight)&&(compareLeft >=viewLeft) );
}};})(jQuery);
window.theme||(window.theme={});
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
rtl: js_porto_vars.rtl=='1' ? true:false,
rtl_browser: $('html').hasClass('browser-rtl'),
ajax_url: js_porto_vars.ajax_url,
request_error: js_porto_vars.request_error,
change_logo: js_porto_vars.change_logo=='1' ? true:false,
show_sticky_header: js_porto_vars.show_sticky_header=='1' ? true:false,
show_sticky_header_tablet: js_porto_vars.show_sticky_header_tablet=='1' ? true:false,
show_sticky_header_mobile: js_porto_vars.show_sticky_header_mobile=='1' ? true:false,
category_ajax: js_porto_vars.category_ajax=='1' ? true:false,
prdctfltr_ajax: js_porto_vars.prdctfltr_ajax=='1' ? true:false,
container_width: parseInt(js_porto_vars.container_width),
grid_gutter_width: parseInt(js_porto_vars.grid_gutter_width),
screen_xl: parseInt(js_porto_vars.screen_xl),
screen_xxl: parseInt(js_porto_vars.screen_xxl),
slider_loop: js_porto_vars.slider_loop=='1' ? true:false,
slider_autoplay: js_porto_vars.slider_autoplay=='1' ? true:false,
slider_autoheight: js_porto_vars.slider_autoheight=='1' ? true:false,
slider_speed: js_porto_vars.slider_speed ? js_porto_vars.slider_speed:5000,
slider_nav: js_porto_vars.slider_nav=='1' ? true:false,
slider_nav_hover: js_porto_vars.slider_nav_hover=='1' ? true:false,
slider_margin: js_porto_vars.slider_margin=='1' ? 40:0,
slider_dots: js_porto_vars.slider_dots=='1' ? true:false,
slider_animatein: js_porto_vars.slider_animatein ? js_porto_vars.slider_animatein:'',
slider_animateout: js_porto_vars.slider_animateout ? js_porto_vars.slider_animateout:'',
product_thumbs_count: js_porto_vars.product_thumbs_count ? parseInt(js_porto_vars.product_thumbs_count, 10):4,
product_zoom: js_porto_vars.product_zoom=='1' ? true:false,
product_zoom_mobile: js_porto_vars.product_zoom_mobile=='1' ? true:false,
product_image_popup: js_porto_vars.product_image_popup=='1' ? 'fadeOut':false,
innerHeight: window.innerHeight,
animation_support: !$('html').hasClass('no-csstransitions'),
owlConfig: {
rtl: js_porto_vars.rtl=='1' ? true:false,
loop: js_porto_vars.slider_loop=='1' ? true:false,
autoplay: js_porto_vars.slider_autoplay=='1' ? true:false,
autoHeight: js_porto_vars.slider_autoheight=='1' ? true:false,
autoplayTimeout: js_porto_vars.slider_speed ? js_porto_vars.slider_speed:7000,
autoplayHoverPause: true,
lazyLoad: true,
nav: js_porto_vars.slider_nav=='1' ? true:false,
navText: ["", ""],
dots: js_porto_vars.slider_dots=='1' ? true:false,
stagePadding:(js_porto_vars.slider_nav_hover!='1'&&js_porto_vars.slider_margin=='1') ? 40:0,
animateOut: js_porto_vars.slider_animateout ? js_porto_vars.slider_animateout:'',
animateIn: js_porto_vars.slider_animatein ? js_porto_vars.slider_animatein:''
},
sticky_nav_height: 0,
is_device_mobile: /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent||navigator.vendor||window.opera)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(( navigator.userAgent||navigator.vendor||window.opera).substr(0, 4) ),
getScrollbarWidth: function(){
if(this.scrollbarSize===undefined){
this.scrollbarSize=window.innerWidth - document.documentElement.clientWidth;
}
return this.scrollbarSize;
},
isTablet: function(){
if(window.innerWidth < 992)
return true;
return false;
},
isMobile: function(){
if(window.innerWidth <=480)
return true;
return false;
},
isIOS: function (){
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
|| (navigator.userAgent.includes("Mac")&&"ontouchend" in document);
},
refreshVCContent: function($elements){
if($elements||$(document.body).hasClass('elementor-page') ){
$(window).trigger('resize', [ $elements ]);
}
theme.refreshStickySidebar(true);
if(typeof window.vc_js=='function')
window.vc_js();
$(document.body).trigger('porto_refresh_vc_content', [$elements]);
},
adminBarHeight: function(){
if(theme.adminBarHeightNum||0===theme.adminBarHeightNum){
return theme.adminBarHeightNum;
}
var obj=document.getElementById('wpadminbar'),
fixed_top=$('.porto-scroll-progress.fixed-top:not(.fixed-under-header)');
if(fixed_top.length&&'0px'==fixed_top.css('margin-top') ){
theme.adminBarHeightNum=fixed_top.height();
}else{
theme.adminBarHeightNum=0;
}
if(obj&&obj.offsetHeight&&window.innerWidth > 600){
theme.adminBarHeightNum +=obj.offsetHeight;
}
return theme.adminBarHeightNum;
},
refreshStickySidebar: function(timeout, $sticky_sidebar){
if(typeof $sticky_sidebar=='undefined'){
$sticky_sidebar=$('.sidebar [data-plugin-sticky]');
}
if($sticky_sidebar.get(0) ){
if(timeout){
theme.requestTimeout(function(){
$sticky_sidebar.trigger('recalc.pin');
}, 400);
}else{
$sticky_sidebar.trigger('recalc.pin');
}}
},
scrolltoContainer: function($container, timeout){
if($container.get(0) ){
if(window.innerWidth < 992){
$('.sidebar-overlay').trigger('click');
}
if(!timeout){
timeout=600;
}
$('html, body').stop().animate({
scrollTop: $container.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height - 18
}, timeout, 'easeOutQuad');
}},
requestFrame: function(fn){
var handler=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;
if(!handler){
return setTimeout(fn, 1000 / 60);
}
var rt=new Object()
rt.val=handler(fn);
return rt;
},
requestTimeout: function(fn, delay){
var handler=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;
if(!handler){
return setTimeout(fn, delay);
}
var start, rt=new Object();
function loop(timestamp){
if(!start){
start=timestamp;
}
var progress=timestamp - start;
progress >=delay ? fn.call():rt.val=handler(loop);
};
rt.val=handler(loop);
return rt;
},
deleteTimeout: function(timeoutID){
if(!timeoutID){
return;
}
var handler=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame;
if(!handler){
return clearTimeout(timeoutID);
}
if(timeoutID.val){
return handler(timeoutID.val);
}},
execPluginFunction: function(functionName, context){
var args=Array.prototype.slice.call(arguments, 2);
var namespaces=functionName.split(".");
var func=namespaces.pop();
for(var i=0; i < namespaces.length; i++){
context=context[namespaces[i]];
}
return context[func].apply(context, args);
},
getOptions: function(opts){
if(typeof(opts)=='object'){
return opts;
}else if(typeof(opts)=='string'){
try {
return JSON.parse(opts.replace(/'/g, '"').replace(';', '') );
} catch(e){
return {};}}else{
return {};}},
mergeOptions: function(obj1, obj2){
var obj3={};
for(var attrname in obj1){ obj3[attrname]=obj1[attrname]; }
for(var attrname in obj2){ obj3[attrname]=obj2[attrname]; }
return obj3;
},
intObs: function(selector, functionName, accY){
var $el;
if(typeof selector=='string'){
$el=document.querySelectorAll(selector);
}else{
$el=selector;
}
var intersectionObserverOptions={
rootMargin: '200px'
}
if(typeof accY!='undefined'){
intersectionObserverOptions.rootMargin='0px 0px ' + Number(accY) + 'px 0px';
}
var observer=new IntersectionObserver(function(entries){
for(var i=0; i < entries.length; i++){
var entry=entries[i];
if(entry.intersectionRatio > 0){
var $this=$(entry.target),
opts;
if(typeof functionName=='string'){
var pluginOptions=theme.getOptions($this.data('plugin-options') );
if(pluginOptions)
opts=pluginOptions;
theme.execPluginFunction(functionName, $this, opts);
}else{
var callback=functionName;
callback.call($this);
}
observer.unobserve(entry.target);
}}
}, intersectionObserverOptions);
Array.prototype.forEach.call($el, function(obj){
observer.observe(obj);
});
},
dynIntObsInit: function(selector, functionName, pluginDefaults){
var $el;
if(typeof selector=='string'){
$el=document.querySelectorAll(selector);
}else{
$el=selector;
}
Array.prototype.forEach.call($el, function(obj){
var $this=$(obj),
opts;
if($this.data('observer-init') ){
return;
}
var pluginOptions=theme.getOptions($this.data('plugin-options') );
if(pluginOptions)
opts=pluginOptions;
var mergedPluginDefaults=theme.mergeOptions(pluginDefaults, opts)
var intersectionObserverOptions={
rootMargin: '0px 0px 200px 0px',
thresholds: 0
}
if(mergedPluginDefaults.accY){
intersectionObserverOptions.rootMargin='0px 0px ' + Number(mergedPluginDefaults.accY) + 'px 0px';
}
var observer=new IntersectionObserver(function(entries){
for(var i=0; i < entries.length; i++){
var entry=entries[i];
if(entry.intersectionRatio > 0){
theme.execPluginFunction(functionName, $this, mergedPluginDefaults);
observer.unobserve(entry.target);
}}
}, intersectionObserverOptions);
observer.observe(obj);
$this.data('observer-init', true);
});
}});
if(theme.isIOS()){
document.body.classList.add('ios');
}
$.extend(theme, {
add_query_arg: function(key, value){
key=escape(key); value=escape(value);
var s=document.location.search;
var kvp=key + "=" + value;
var r=new RegExp("(&|\\?)" + key + "=[^\&]*");
s=s.replace(r, "$1" + kvp);
if(!RegExp.$1){ s +=(s.length > 0 ? '&':'?') + kvp; };
return s;
},
addUrlParam: function (href, name, value){
var url=document.createElement('a'), s, r;
href=decodeURIComponent(decodeURI(href));
url.href=href;
s=url.search;
if(0 <=s.indexOf(name + '=')){
r=s.replace(new RegExp(name + '=[^&]*'), name + '=' + value);
}else{
r=(s.length&&0 <=s.indexOf('?')) ? s:'?';
r.endsWith('?')||(r +='&');
r +=name + '=' + value;
}
return encodeURI(href.replace(s, '') + r.replace(/&+/, '&'));
},
removeUrlParam: function (href, name){
var url=document.createElement('a'), s, r;
href=decodeURIComponent(decodeURI(href));
url.href=href;
s=url.search;
if(0 <=s.indexOf(name + '=')){
r=s.replace(new RegExp(name + '=[^&]*'), '').replace(/&+/, '&').replace('?&', '?');
r.endsWith('&')&&(r=r.substr(0, r.length - 1));
r.endsWith('?')&&(r=r.substr(0, r.length - 1));
r=r.replace('&&', '&');
}else{
r=s;
}
return encodeURI(href.replace(s, '') + r);
}});
}).apply(this, [window.theme, jQuery]);
!function(){ "use strict"; if("object"==typeof window) if("IntersectionObserver" in window&&"IntersectionObserverEntry" in window&&"intersectionRatio" in window.IntersectionObserverEntry.prototype) "isIntersecting" in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype, "isIntersecting", { get: function(){ return this.intersectionRatio > 0 }}); else { var t=function(t){ for(var e=window.document, o=i(e); o;)o=i(e=o.ownerDocument); return e }(), e=[], o=null, n=null; s.prototype.THROTTLE_TIMEOUT=100, s.prototype.POLL_INTERVAL=null, s.prototype.USE_MUTATION_OBSERVER = !0, s._setupCrossOriginUpdater=function(){ return o||(o=function(t, o){ n=t&&o ? l(t, o):{ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }, e.forEach(function(t){ t._checkForIntersections() }) }), o }, s._resetCrossOriginUpdater=function(){ o=null, n=null }, s.prototype.observe=function(t){ if(!this._observationTargets.some(function(e){ return e.element==t }) ){ if(!t||1!=t.nodeType) throw new Error("target must be an Element"); this._registerInstance(), this._observationTargets.push({ element: t, entry: null }), this._monitorIntersections(t.ownerDocument), this._checkForIntersections() }}, s.prototype.unobserve=function(t){ this._observationTargets=this._observationTargets.filter(function(e){ return e.element!=t }), this._unmonitorIntersections(t.ownerDocument), 0==this._observationTargets.length&&this._unregisterInstance() }, s.prototype.disconnect=function(){ this._observationTargets=[], this._unmonitorAllIntersections(), this._unregisterInstance() }, s.prototype.takeRecords=function(){ var t=this._queuedEntries.slice(); return this._queuedEntries=[], t }, s.prototype._initThresholds=function(t){ var e=t||[0]; return Array.isArray(e)||(e=[e]), e.sort().filter(function(t, e, o){ if("number"!=typeof t||isNaN(t)||t < 0||t > 1) throw new Error("threshold must be a number between 0 and 1 inclusively"); return t!==o[e - 1] }) }, s.prototype._parseRootMargin=function(t){ var e=(t||"0px").split(/\s+/).map(function(t){ var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t); if(!e) throw new Error("rootMargin must be specified in pixels or percent"); return { value: parseFloat(e[1]), unit: e[2] }}); return e[1]=e[1]||e[0], e[2]=e[2]||e[0], e[3]=e[3]||e[1], e }, s.prototype._monitorIntersections=function(e){ var o=e.defaultView; if(o&&-1==this._monitoringDocuments.indexOf(e) ){ var n=this._checkForIntersections, r=null, s=null; this.POLL_INTERVAL ? r=o.setInterval(n, this.POLL_INTERVAL):(h(o, "resize", n, !0), h(e, "scroll", n, !0), this.USE_MUTATION_OBSERVER&&"MutationObserver" in o&&(s=new o.MutationObserver(n) ).observe(e, { attributes: !0, childList: !0, characterData: !0, subtree: !0 }) ), this._monitoringDocuments.push(e), this._monitoringUnsubscribes.push(function(){ var t=e.defaultView; t&&(r&&t.clearInterval(r), c(t, "resize", n, !0) ), c(e, "scroll", n, !0), s&&s.disconnect() }); var u=this.root&&(this.root.ownerDocument||this.root)||t; if(e!=u){ var a=i(e); a&&this._monitorIntersections(a.ownerDocument) }} }, s.prototype._unmonitorIntersections=function(e){ var o=this._monitoringDocuments.indexOf(e); if(-1!=o){ var n=this.root&&(this.root.ownerDocument||this.root)||t; if(!this._observationTargets.some(function(t){ var o=t.element.ownerDocument; if(o==e) return !0; for(; o&&o!=n;){ var r=i(o); if(( o=r&&r.ownerDocument)==e) return !0 } return !1 }) ){ var r=this._monitoringUnsubscribes[o]; if(this._monitoringDocuments.splice(o, 1), this._monitoringUnsubscribes.splice(o, 1), r(), e!=n){ var s=i(e); s&&this._unmonitorIntersections(s.ownerDocument) }} }}, s.prototype._unmonitorAllIntersections=function(){ var t=this._monitoringUnsubscribes.slice(0); this._monitoringDocuments.length=0, this._monitoringUnsubscribes.length=0; for(var e=0; e < t.length; e++)t[e]() }, s.prototype._checkForIntersections=function(){ if(this.root||!o||n){ var t=this._rootIsInDom(), e=t ? this._getRootRect():{ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }; this._observationTargets.forEach(function(n){ var i=n.element, s=u(i), h=this._rootContainsTarget(i), c=n.entry, a=t&&h && this._computeTargetAndRootIntersection(i, s, e), l=null; this._rootContainsTarget(i) ? o&&!this.root||(l=e):l={ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }; var f=n.entry=new r( { time: window.performance&&performance.now&&performance.now(), target: i, boundingClientRect: s, rootBounds: l, intersectionRect: a }); c ? t&&h ? this._hasCrossedThreshold(c, f)&&this._queuedEntries.push(f):c&&c.isIntersecting&&this._queuedEntries.push(f):this._queuedEntries.push(f) }, this), this._queuedEntries.length&&this._callback(this.takeRecords(), this) }}, s.prototype._computeTargetAndRootIntersection=function(e, i, r){ if("none"!=window.getComputedStyle(e).display){ for(var s, h, c, a, f, d, g, m, v=i, _=p(e), b = !1; !b&&_;){ var w=null, y=1==_.nodeType ? window.getComputedStyle(_):{}; if("none"==y.display) return null; if(_==this.root||9==_.nodeType) if(b = !0, _==this.root||_==t) o&&!this.root ? !n||0==n.width&&0==n.height ?(_=null, w=null, v=null):w=n:w=r; else { var I=p(_), E=I&&u(I), T=I&&this._computeTargetAndRootIntersection(I, E, r); E&&T ?(_=I, w=l(E, T) ):(_=null, v=null) }else{ var R=_.ownerDocument; _!=R.body&&_!=R.documentElement&&"visible"!=y.overflow&&(w=u(_) ) } if(w&&(s=w, h=v, c=void 0, a=void 0, f=void 0, d=void 0, g=void 0, m=void 0, c=Math.max(s.top, h.top), a=Math.min(s.bottom, h.bottom), f=Math.max(s.left, h.left), d=Math.min(s.right, h.right), m=a - c, v=(g=d - f) >=0&&m >=0&&{ top: c, bottom: a, left: f, right: d, width: g, height: m }||null), !v) break; _=_&&p(_) } return v }}, s.prototype._getRootRect=function(){ var e; if(this.root&&!d(this.root) ) e=u(this.root); else { var o=d(this.root) ? this.root:t, n=o.documentElement, i=o.body; e={ top: 0, left: 0, right: n.clientWidth||i.clientWidth, width: n.clientWidth||i.clientWidth, bottom: n.clientHeight||i.clientHeight, height: n.clientHeight||i.clientHeight }} return this._expandRectByRootMargin(e) }, s.prototype._expandRectByRootMargin=function(t){ var e=this._rootMarginValues.map(function(e, o){ return "px"==e.unit ? e.value:e.value *(o % 2 ? t.width:t.height) / 100 }), o={ top: t.top - e[0], right: t.right + e[1], bottom: t.bottom + e[2], left: t.left - e[3] }; return o.width=o.right - o.left, o.height=o.bottom - o.top, o }, s.prototype._hasCrossedThreshold=function(t, e){ var o=t&&t.isIntersecting ? t.intersectionRatio||0:-1, n=e.isIntersecting ? e.intersectionRatio||0:-1; if(o!==n) for(var i=0; i < this.thresholds.length; i++){ var r=this.thresholds[i]; if(r==o||r==n||r < o!=r < n) return !0 }}, s.prototype._rootIsInDom=function(){ return !this.root||f(t, this.root) }, s.prototype._rootContainsTarget=function(e){ var o=this.root&&(this.root.ownerDocument||this.root)||t; return f(o, e)&&(!this.root||o==e.ownerDocument) }, s.prototype._registerInstance=function(){ e.indexOf(this) < 0&&e.push(this) }, s.prototype._unregisterInstance=function(){ var t=e.indexOf(this); -1!=t&&e.splice(t, 1) }, window.IntersectionObserver=s, window.IntersectionObserverEntry=r } function i(t){ try { return t.defaultView&&t.defaultView.frameElement||null } catch(t){ return null }} function r(t){ this.time=t.time, this.target=t.target, this.rootBounds=a(t.rootBounds), this.boundingClientRect=a(t.boundingClientRect), this.intersectionRect=a(t.intersectionRect||{ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }), this.isIntersecting = !!t.intersectionRect; var e=this.boundingClientRect, o=e.width * e.height, n=this.intersectionRect, i=n.width * n.height; this.intersectionRatio=o ? Number(( i / o).toFixed(4) ):this.isIntersecting ? 1:0 } function s(t, e){ var o, n, i, r=e||{}; if("function"!=typeof t) throw new Error("callback must be a function"); if(r.root&&1!=r.root.nodeType&&9!=r.root.nodeType) throw new Error("root must be a Document or Element"); this._checkForIntersections=(o=this._checkForIntersections.bind(this), n=this.THROTTLE_TIMEOUT, i=null, function(){ i||(i=setTimeout(function(){ o(), i=null }, n) ) }), this._callback=t, this._observationTargets=[], this._queuedEntries=[], this._rootMarginValues=this._parseRootMargin(r.rootMargin), this.thresholds=this._initThresholds(r.threshold), this.root=r.root||null, this.rootMargin=this._rootMarginValues.map(function(t){ return t.value + t.unit }).join(" "), this._monitoringDocuments=[], this._monitoringUnsubscribes=[] } function h(t, e, o, n){ "function"==typeof t.addEventListener ? t.addEventListener(e, o, n||!1):"function"==typeof t.attachEvent&&t.attachEvent("on" + e, o) } function c(t, e, o, n){ "function"==typeof t.removeEventListener ? t.removeEventListener(e, o, n||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on" + e, o) } function u(t){ var e; try { e=t.getBoundingClientRect() } catch(t){ } return e ?(e.width&&e.height||(e={ top: e.top, right: e.right, bottom: e.bottom, left: e.left, width: e.right - e.left, height: e.bottom - e.top }), e):{ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }} function a(t){ return !t||"x" in t ? t:{ top: t.top, y: t.top, bottom: t.bottom, left: t.left, x: t.left, right: t.right, width: t.width, height: t.height }} function l(t, e){ var o=e.top - t.top, n=e.left - t.left; return { top: o, left: n, height: e.height, width: e.width, bottom: o + e.height, right: n + e.width }} function f(t, e){ for(var o=e; o;){ if(o==t) return !0; o=p(o) } return !1 } function p(e){ var o=e.parentNode; return 9==e.nodeType&&e!=t ? i(e):(o&&o.assignedSlot&&(o=o.assignedSlot.parentNode), o&&11==o.nodeType&&o.host ? o.host:o) } function d(t){ return t&&9===t.nodeType }}();
(function($){
'use strict';
$.extend({
browserSelector: function(){
var hasTouch='ontouchstart' in window||navigator.msMaxTouchPoints;
var u=navigator.userAgent,
ua=u.toLowerCase(),
is=function(t){
return ua.indexOf(t) > -1;
},
g='gecko',
w='webkit',
s='safari',
o='opera',
h=document.documentElement,
b=[(!(/opera|webtv/i.test(ua) )&&/msie\s(\d)/.test(ua) ) ?('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1]) ):is('firefox/2') ? g + ' ff2':is('firefox/3.5') ? g + ' ff3 ff3_5':is('firefox/3') ? g + ' ff3':is('gecko/') ? g:is('opera') ? o +(/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1:(/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2:'') ):is('konqueror') ? 'konqueror':is('chrome') ? w + ' chrome':is('iron') ? w + ' iron':is('applewebkit/') ? w + ' ' + s +(/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1:''):is('mozilla/') ? g:'', is('j2me') ? 'mobile':is('iphone') ? 'iphone':is('ipod') ? 'ipod':is('mac') ? 'mac':is('darwin') ? 'mac':is('webtv') ? 'webtv':is('win') ? 'win':is('freebsd') ? 'freebsd':(is('x11')||is('linux') ) ? 'linux':'', 'js'];
var c=b.join(' ');
if(theme.is_device_mobile){
c +=' mobile';
}
if(hasTouch){
c +=' touch';
}
h.className +=' ' + c;
var isIE11 = !(window.ActiveXObject)&&"ActiveXObject" in window;
if(isIE11){
$('html').removeClass('gecko').addClass('ie ie11');
return;
}}
});
$.browserSelector();
})(jQuery);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__accordion';
var Accordion=function($el, opts){
return this.initialize($el, opts);
};
Accordion.defaults={
};
Accordion.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Accordion.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var polyfillCollapse=function(selector){
$(selector).each(function(){
let $this=$(this);
$this.addClass('show');
$this.prev().find('.accordion-toggle').removeClass('collapsed').attr('aria-expanded', true);
});
}
var $el=this.options.wrapper,
$collapse=$el.find('.collapse'),
collapsible=$el.data('collapsible'),
active_num=$el.data('active-tab');
if($collapse.length > 0){
if($el.data('use-accordion')&&'yes'==$el.data('use-accordion') ){
$el.find('.collapse').attr('data-bs-parent', '#' + $el.attr('id') );
}
if(collapsible=='yes'){
if($.fn.collapse){
$collapse.collapse({ toggle: false, parent: '#' + $el.attr('id') });
}}else if(!isNaN(active_num)&&active_num==parseInt(active_num)&&$el.find('.collapse').length >=active_num){
if(!$.fn.collapse){
polyfillCollapse($el.find('.collapse').eq(active_num - 1) );
}else{
$el.find('.collapse').collapse({ toggle: false, parent: '#' + $el.attr('id') });
$el.find('.collapse').eq(active_num - 1).collapse('toggle');
}}else{
if(!$.fn.collapse){
polyfillCollapse($el.find('.collapse') );
}else{
$el.find('.collapse').collapse({ parent: '#' + $el.attr('id') });
}}
}
return this;
}};
$.extend(theme, {
Accordion: Accordion
});
$.fn.themeAccordion=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.Accordion($this, opts);
}});
};}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__accordionMenu';
var AccordionMenu=function($el, opts){
return this.initialize($el, opts);
};
AccordionMenu.defaults={
};
AccordionMenu.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, AccordionMenu.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var self=this,
$el=this.options.wrapper;
$el.find('li.menu-item.active').each(function(){
var $this=$(this);
if($this.find('> .arrow').get(0) )
$this.find('> .arrow').trigger('click');
});
$el.on('click', '.arrow', function(e){
e.preventDefault();
e.stopPropagation();
var $this=$(this),
$parent=$this.closest('li');
if(typeof self.options.open_one!='undefined'){
$parent.siblings('.open').children('.arrow').next().hide();
$parent.siblings('.open').removeClass('open');
$this.next().stop().toggle();
}else{
$this.next().stop().slideToggle();
}
if($parent.hasClass('open') ){
$parent.removeClass('open');
}else{
$parent.addClass('open');
}
if($this.closest('.header-side-nav .sidebar-menu').length){
$('.header-side-nav [data-plugin-sticky]').trigger('recalc.pin');
}
return false;
});
$el.find('.menu-item-has-children').each(function (){
var $this=$(this);
if($this.find('>.sub-menu > li:not(.hidden-item)').length==0){
$this.addClass('hidden-item');
}});
return this;
}};
$.extend(theme, {
AccordionMenu: AccordionMenu
});
$.fn.themeAccordionMenu=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.AccordionMenu($this, opts);
}});
};}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__flickrZoom';
var FlickrZoom=function($el, opts){
return this.initialize($el, opts);
};
FlickrZoom.defaults={
};
FlickrZoom.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, FlickrZoom.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var $el=this.options.wrapper,
links=[],
i=0,
$flickr_links=$el.find('.flickr_badge_image > a');
$flickr_links.each(function(){
var slide={},
$image=$(this).find('> img');
slide.src=$image.attr('src').replace('_s.', '_b.');
slide.title=$image.attr('title');
links[i]=slide;
i++;
});
$flickr_links.on('click', function(e){
e.preventDefault();
if($.fn.magnificPopup){
$.magnificPopup.close();
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, {
items: links,
gallery: {
enabled: true
},
type: 'image'
}), $flickr_links.index($(this) ));
}});
return this;
}};
$.extend(theme, {
FlickrZoom: FlickrZoom
});
$.fn.themeFlickrZoom=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.FlickrZoom($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__masonry';
var Masonry=function($el, opts){
return this.initialize($el, opts);
};
Masonry.defaults={
itemSelector: 'li',
isOriginLeft: !theme.rtl
};
Masonry.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Masonry.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
if(!$.fn.isotope){
return this;
}
var self=this,
$el=this.options.wrapper,
trigger_timer=null;
$el.isotope(this.options);
$el.isotope('on', 'layoutComplete', function(){
if(typeof this.options.callback=='function'){
this.options.callback.call();
}
if($el.find('.porto-lazyload:not(.lazy-load-loaded):visible').length){
$(window).trigger('scroll');
}});
$el.isotope('layout');
self.resize();
$(window).smartresize(function(){
self.resize()
});
return this;
},
resize: function(){
var self=this,
$el=this.options.wrapper;
if(self.resizeTimer){
theme.deleteTimeout(self.resizeTimer);
}
self.resizeTimer=theme.requestTimeout(function(){
if($el.data('isotope') ){
$el.isotope('layout');
}
delete self.resizeTimer;
}, 600);
}};
$.extend(theme, {
Masonry: Masonry
});
$.fn.themeMasonry=function(opts){
return this.map(function(){
var $this=$(this);
imagesLoaded(this, function(){
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.Masonry($this, opts);
}});
});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__toggle';
var Toggle=function($el, opts){
return this.initialize($el, opts);
};
Toggle.defaults={
};
Toggle.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Toggle.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var $el=this.options.wrapper;
if($el.hasClass('active') )
$el.find("> div.toggle-content").stop().slideDown(350, function(){
$(this).attr('style', '').show();
});
$el.on('click', "> label", function(e){
var parentSection=$(this).parent(),
parentWrapper=$(this).closest("div.toogle"),
parentToggles=$(this).closest(".porto-toggles"),
isAccordion=parentWrapper.hasClass("toogle-accordion"),
toggleContent=parentSection.find("> div.toggle-content");
if(isAccordion&&typeof(e.originalEvent)!="undefined"){
parentWrapper.find("section.toggle.active > label").trigger("click");
}
if(!parentSection.hasClass("active") ){
if(parentToggles.length){
if(parentToggles.data('view')=='one-toggle'){
parentToggles.find('.toggle').each(function(){
$(this).removeClass('active');
$(this).find("> div.toggle-content").stop().slideUp(350, function(){
$(this).attr('style', '').hide();
});
});
}}
toggleContent.stop().slideDown(350, function(){
$(this).attr('style', '').show();
theme.refreshVCContent(toggleContent);
});
parentSection.addClass("active");
}else{
if(!parentToggles.length||parentToggles.data('view')!='one-toggle'){
toggleContent.stop().slideUp(350, function(){
$(this).attr('style', '').hide();
});
parentSection.removeClass("active");
}}
});
return this;
}};
$.extend(theme, {
Toggle: Toggle
});
$.fn.themeToggle=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.Toggle($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
$.fn.themePin=function(options){
var scrollY=0, lastScrollY=0, elements=[], disabled=false, $window=$(window), fixedSideTop=[], fixedSideBottom=[], prevDataTo=[];
options=options||{};
var recalculateLimits=function(){
for(var i=0, len=elements.length; i < len; i++){
var $this=elements[i];
if(options.minWidth&&window.innerWidth < options.minWidth){
if($this.parent().hasClass("pin-wrapper") ){
if(options.hasWrap){
$this.parent().css('height', '');
}else{
$this.unwrap();
}}
$this.css({ width: "", left: "", top: "", position: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
disabled=true;
continue;
}else{
disabled=false;
}
var $container=options.containerSelector ?($this.closest(options.containerSelector).length ? $this.closest(options.containerSelector):$(options.containerSelector) ):$(document.body),
offset=$this.offset();
if(options.hasWrap&&$container.height() < $this.closest('.pin-wrapper').outerHeight()){
$container=$this.closest('.pin-wrapper');
}
var containerOffset=$container.offset();
if(typeof containerOffset=='undefined'){
continue;
}
if(!$this.parent().hasClass("pin-wrapper") ){
$this.wrap("<div class='pin-wrapper'>");
if($this.hasClass('elementor-element-populated') ){
var $el_cont=$this.closest('.elementor-container');
if($el_cont.length){
var matches=$el_cont.attr('class').match(/elementor-column-gap-([a-z]*)/g);
if(matches&&matches.length){
var gap=matches[0].replace('elementor-column-gap-', '');
$this.addClass('porto-gap-' + gap);
}}
}}
var parentOffset=$this.parent().offset();
var pad=$.extend({
top: 0,
bottom: 0
}, options.padding||{});
var $pin=$this.parent(),
pt=parseInt($pin.parent().css('padding-top') ), pb=parseInt($pin.parent().css('padding-bottom') );
if(options.autoInit){
if($('#header').hasClass('header-side') ){
pad.top=theme.adminBarHeight();
}else{
pad.top=theme.adminBarHeight();
if($('#header > .main-menu-wrap').length||!$('#header').hasClass('sticky-menu-header') ){
pad.top +=(theme.StickyHeader.sticky_height ? theme.StickyHeader.sticky_height:0);
}}
if(typeof options.paddingOffsetTop!='undefined'){
pad.top +=parseInt(options.paddingOffsetTop, 10);
}else{
pad.top +=18;
}
if(typeof options.paddingOffsetBottom!='undefined'){
pad.bottom=parseInt(options.paddingOffsetBottom, 10);
}else{
pad.bottom=0;
}}
var bb=$this.css('border-bottom'), h=$this.outerHeight();
$this.css('border-bottom', '1px solid transparent');
var o_h=$this.outerHeight() - h - 1;
$this.css('border-bottom', bb);
$this.css({ width: $this.outerWidth() <=$pin.width() ? $this.outerWidth():$pin.width() });
$pin.css("height", $this.outerHeight() + o_h);
if(( !options.autoFit&&!options.fitToBottom)||$this.outerHeight() <=$window.height()){
$this.data("themePin", {
pad: pad,
from:(options.containerSelector ? containerOffset.top:offset.top) - pad.top + pt,
pb: pb,
parentTop: parentOffset.top - pt,
offset: o_h,
stickyOffset: options.stickyOffset ? options.stickyOffset:0
});
}else{
$this.data("themePin", {
pad: pad,
fromFitTop:(options.containerSelector ? containerOffset.top:offset.top) - pad.top + pt,
from:(options.containerSelector ? containerOffset.top:offset.top) + $this.outerHeight() - window.innerHeight + pt,
pb: pb,
parentTop: parentOffset.top - pt,
offset: o_h,
stickyOffset: options.stickyOffset ? options.stickyOffset:0
});
}}
};
var onScroll=function(){
if(disabled){ return; }
scrollY=$window.scrollTop();
var window_height=window.innerHeight||$window.height();
for(var i=0, len=elements.length; i < len; i++){
var $this=$(elements[i]),
data=$this.data("themePin"),
sidebarTop;
let contentWrap=$this.closest('.porto-products-filter-body');
let sidebarWrap=$this.closest('.sidebar');
if(contentWrap.length&&sidebarWrap.length){
if($.contains(contentWrap[0], sidebarWrap[0])&&!contentWrap.hasClass('opened') ){
continue;
}}
if(!data||typeof data.pad=='undefined'){
continue;
}
var $container=options.containerSelector ?($this.closest(options.containerSelector).length ? $this.closest(options.containerSelector):$(options.containerSelector) ):$(document.body),
isFitToTop=(!options.autoFit&&!options.fitToBottom)||($this.outerHeight() + data.pad.top) <=window_height;
if(options.hasWrap&&$container.height() < $this.closest('.pin-wrapper').outerHeight()){
$container=$this.closest('.pin-wrapper');
}
data.end=$container.offset().top + $container.height();
if(isFitToTop){
data.to=$container.offset().top + $container.height() - $this.outerHeight() - data.pad.bottom - data.pb;
}else{
data.to=$container.offset().top + $container.height() - window_height - data.pb;
data.to2=$container.height() - $this.outerHeight() - data.pad.bottom - data.pb;
}
if(prevDataTo[i]===0){
prevDataTo[i]=data.to;
}
if(isFitToTop){
var from=data.from - data.pad.bottom,
to=data.to - data.pad.top - data.offset,
$parent=$this.closest('.sticky-nav-wrapper'),
widgetTop;
if($parent.length){
widgetTop=$parent.offset().top - data.pad.top;
if(widgetTop > from){
from=widgetTop;
}}
if(typeof data.fromFitTop!='undefined'&&data.fromFitTop){
from=data.fromFitTop - data.pad.bottom;
}
if(from + $this.outerHeight() > data.end||from >=to){
$this.css({ position: "", top: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
continue;
}
if(scrollY > from + data.stickyOffset&&scrollY < to){
!($this.css("position")=="fixed")&&$this.css({
left: $this.offset().left,
top: data.pad.top
}).css("position", "fixed");
if(options.activeClass){ $this.addClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
}else if(scrollY >=to){
$this.css({
left: "",
top: to - data.parentTop + data.pad.top
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }
if($this.hasClass('sticky-absolute') ) $this.addClass('sticky-transition');
$this.addClass('sticky-absolute');
}else{
$this.css({ position: "", top: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
}}else if(options.fitToBottom){
var from=data.from,
to=data.to;
if(data.from + window_height > data.end||data.from >=to){
$this.css({ position: "", top: "", bottom: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
continue;
}
if(scrollY > from&&scrollY < to){
!($this.css("position")=="fixed")&&$this.css({
left: $this.offset().left,
bottom: data.pad.bottom,
top: ""
}).css("position", "fixed");
if(options.activeClass){ $this.addClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
}else if(scrollY >=to){
$this.css({
left: "",
top: data.to2,
bottom: ""
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }
if($this.hasClass('sticky-absolute') ) $this.addClass('sticky-transition');
$this.addClass('sticky-absolute');
}else{
$this.css({ position: "", top: "", bottom: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
}}else{
var this_height=$this.outerHeight()
if(prevDataTo[i]!=data.to){
if(fixedSideBottom[i]&&this_height + $this.offset().top + data.pad.bottom < scrollY + window_height){
fixedSideBottom[i]=false;
}}
if(( this_height + data.pad.top + data.pad.bottom) > window_height||fixedSideTop[i]||fixedSideBottom[i]){
var padTop=parseInt($this.parent().parent().css('padding-top') );
if(scrollY + data.pad.top - padTop <=data.parentTop){
$this.css({ position: "", top: "", bottom: "", left: "" });
fixedSideTop[i]=fixedSideBottom[i]=false;
if(options.activeClass){ $this.removeClass(options.activeClass); }}else if(scrollY >=data.to){
$this.css({
left: "",
top: data.to2,
bottom: ""
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }}else{
if(scrollY >=lastScrollY){
if(fixedSideTop[i]){
fixedSideTop[i]=false;
sidebarTop=$this.offset().top - data.parentTop;
$this.css({
left: "",
top: sidebarTop,
bottom: ""
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }}else if(!fixedSideBottom[i]&&this_height + $this.offset().top + data.pad.bottom < scrollY + window_height){
fixedSideBottom[i]=true;
!($this.css("position")=="fixed")&&$this.css({
left: $this.offset().left,
bottom: data.pad.bottom,
top: ""
}).css("position", "fixed");
if(options.activeClass){ $this.addClass(options.activeClass); }}
}else if(scrollY < lastScrollY){
if(fixedSideBottom[i]){
fixedSideBottom[i]=false;
sidebarTop=$this.offset().top - data.parentTop;
$this.css({
left: "",
top: sidebarTop,
bottom: ""
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }}else if(!fixedSideTop[i]&&$this.offset().top >=scrollY + data.pad.top){
fixedSideTop[i]=true;
!($this.css("position")=="fixed")&&$this.css({
left: $this.offset().left,
top: data.pad.top,
bottom: ''
}).css("position", "fixed");
if(options.activeClass){ $this.addClass(options.activeClass); }}else if(!fixedSideBottom[i]&&fixedSideTop[i]&&$this.css('position')=='absolute'&&$this.offset().top >=scrollY + data.pad.top){
fixedSideTop[i]=false;
}}
}}else{
if(scrollY >=(data.parentTop - data.pad.top) ){
$this.css({
position: 'fixed',
top: data.pad.top
});
}else{
$this.css({ position: "", top: "", bottom: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }}
fixedSideTop[i]=fixedSideBottom[i]=false;
}}
prevDataTo[i]=data.to;
}
lastScrollY=scrollY;
};
var update=function(){ recalculateLimits(); onScroll(); },
r_timer=null;
this.each(function(){
var $this=$(this),
data=$this.data('themePin')||{};
if(data&&data.update){ return; }
elements.push($this);
$("img", this).one("load", function(){
if(r_timer){
theme.deleteTimeout(r_timer);
}
r_timer=theme.requestFrame(recalculateLimits);
});
data.update=update;
$this.data('themePin', data);
fixedSideTop.push(false);
fixedSideBottom.push(false);
prevDataTo.push(0);
});
window.addEventListener('touchmove', onScroll, { passive: true });
window.addEventListener('scroll', onScroll, { passive: true });
recalculateLimits();
if(!theme.isLoaded){
$window.on('load', update);
}else{
update();
}
$(this).on('recalc.pin', function(){
recalculateLimits();
onScroll();
});
return this;
};
theme=theme||{};
var instanceName='__sticky';
var Sticky=function($el, opts){
return this.initialize($el, opts);
};
Sticky.defaults={
autoInit: false,
minWidth: 767,
activeClass: 'sticky-active',
padding: {
top: 0,
bottom: 0
},
offsetTop: 0,
offsetBottom: 0,
autoFit: false,
fitToBottom: false,
stickyOffset: 0
};
Sticky.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Sticky.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
if(!$.fn.themePin){
return this;
}
var self=this,
$el=this.options.wrapper,
stickyResizeTrigger;
if($el.hasClass('porto-sticky-nav') ){
this.options.padding.top=(theme.StickyHeader.sticky_height ? theme.StickyHeader.sticky_height:0) + theme.adminBarHeight();
this.options.activeClass='sticky-active';
this.options.containerSelector='.main-content-wrap';
theme.sticky_nav_height=$el.outerHeight();
if(this.options.minWidth > window.innerWidth)
theme.sticky_nav_height=0;
var porto_progress_obj=$('.porto-scroll-progress.fixed-top:not(.fixed-under-header)');
if(porto_progress_obj.length){
var flag=false;
if(porto_progress_obj.is(':hidden') ){
porto_progress_obj.show();
flag=true;
}
if(flag){
porto_progress_obj.hide();
}}
var offset=theme.adminBarHeight() +(theme.StickyHeader.sticky_height ? theme.StickyHeader.sticky_height:0) - 1,
$transitionOffset=(offset > 100) ? offset:100;
this.options.stickyOffset=theme.sticky_nav_height + $transitionOffset;
var init_filter_widget_sticky=function(){
var prevScrollPos=$el.data('prev-pos') ? $el.data('prev-pos'):0,
scrollUpOffset=0,
objHeight=$el.outerHeight() + parseInt($el.css('margin-bottom') ),
scrollTop=$(window).scrollTop();
if($('.page-wrapper').hasClass('sticky-scroll-up') ){
if(scrollTop > prevScrollPos){
$el.addClass('scroll-down');
}else{
$el.removeClass('scroll-down');
}
scrollUpOffset=- theme.StickyHeader.sticky_height;
if('undefined'==typeof(theme.StickyHeader.sticky_height) ){
$el.data('prev-pos', 0);
}else{
if($el.parent().offset().top + objHeight + $transitionOffset < scrollTop + offset + scrollUpOffset){
$el.addClass('sticky-ready');
}else{
$el.removeClass('sticky-ready');
}
$el.data('prev-pos', scrollTop);
}}
}
if(this.options.minWidth <=window.innerWidth){
window.removeEventListener('scroll', init_filter_widget_sticky);
window.addEventListener('scroll', init_filter_widget_sticky, { passive: true });
init_filter_widget_sticky();
}}
$el.themePin(this.options);
$(window).smartresize(function(){
if(stickyResizeTrigger){
clearTimeout(stickyResizeTrigger);
}
stickyResizeTrigger=setTimeout(function(){
$el.trigger('recalc.pin');
}, 800);
var $parent=$el.parent();
$el.outerWidth($parent.width());
if($el.css('position')=='fixed'){
$el.css('left', $parent.offset().left);
}
if($el.hasClass('porto-sticky-nav') ){
theme.sticky_nav_height=$el.outerHeight();
if(self.options.minWidth > window.innerWidth)
theme.sticky_nav_height=0;
}});
return this;
}};
$.extend(theme, {
Sticky: Sticky
});
$.fn.themeSticky=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
$this.trigger('recalc.pin');
setTimeout(function(){
$this.trigger('recalc.pin');
}, 800);
return $this.data(instanceName);
}else{
return new theme.Sticky($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
$(function(){
$(document.body).on('click', '.mobile-toggle', function(e){
var $nav_panel=$('#nav-panel');
if($nav_panel.length > 0){
if($(this).closest('.header-main').length&&$nav_panel.closest('.header-builder-p').length&&!$nav_panel.parent('.header-main').length){
$nav_panel.appendTo($(this).closest('.header-main') );
}else if($(this).closest('.header-main').length&&$nav_panel.closest('.wp-block-template-part').length){
$nav_panel.insertAfter($(this).closest('.header-main') );
}
if($nav_panel.is(':visible')&&$('#header').hasClass('sticky-header') ){
var h_h=$('#header').height(), p_h=$nav_panel.outerHeight();
if(h_h > p_h + 30){
$('#header').css('height', h_h - p_h);
}}
$nav_panel.stop().slideToggle();
}else if($('#side-nav-panel').length > 0){
$('html').toggleClass('panel-opened');
$('.panel-overlay').toggleClass('active');
if($('#side-nav-panel').hasClass('panel-right') ){
$('html').addClass('panel-right-opened');
}}
if($('#nav-panel .skeleton-body, #side-nav-panel .skeleton-body').length){
theme.lazyload_menu(1, 'mobile_menu');
}
e.preventDefault();
});
$(document.body).on('click', '.panel-overlay', function(){
$('html').css('transition', 'margin .3s').removeClass('panel-opened').removeClass('panel-right-opened');
theme.requestTimeout(function(){
$('html').css('transition', '');
}, 260);
$(this).removeClass('active');
});
$(document.body).on('click', '.side-nav-panel-close', function(e){
e.preventDefault();
$('.panel-overlay').trigger('click');
});
$(document.body).on('click', '#side-nav-panel .mobile-tab-items .nav-item', function(e){
e.preventDefault();
var $this=$(this),
$id=$this.attr('pane-id'),
$parent=$this.closest('.mobile-tabs');
if($id){
$parent.find('.active').removeClass('active');
$this.addClass('active');
$parent.find('.mobile-tab-content [tab-id="' + $id + '"]').addClass('active');
}});
$(window).on('resize', function(){
if(window.innerWidth > 991){
$('#nav-panel').hide();
if($('html').hasClass('panel-opened') ){
$('.panel-overlay').trigger('click');
}}
});
});
}).apply(this, [window.theme, jQuery]);
var scrolltotop={
setting: { startline: 100, scrollto: 0, scrollduration: 1000, fadeduration: [500, 100] },
controlHTML: '<img src="assets/img/up.png" style="width:40px; height:40px" />',
controlattrs: { offsetx: 10, offsety: 10 },
anchorkeyword: '#top',
state: { isvisible: false, shouldvisible: false },
scrollup: function(){
if(!this.cssfixedsupport)
this.$control.css({ opacity: 0 });
var dest=isNaN(this.setting.scrollto) ? this.setting.scrollto:parseInt(this.setting.scrollto);
if(typeof dest=="string"&&jQuery('#' + dest).length==1)
dest=jQuery('#' + dest).offset().top;
else
dest=0;
this.$body.stop().animate({ scrollTop: dest }, this.setting.scrollduration);
},
keepfixed: function(){
var $window=jQuery(window);
var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx;
var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety;
this.$control.css({ left: controlx + 'px', top: controly + 'px' });
},
togglecontrol: function(){
var scrolltop=jQuery(window).scrollTop();
if(!this.cssfixedsupport)
this.keepfixed();
this.state.shouldvisible=(scrolltop >=this.setting.startline) ? true:false;
if(this.state.shouldvisible&&!this.state.isvisible){
this.$control.stop().animate({ opacity: 1 }, this.setting.fadeduration[0]);
this.state.isvisible=true;
}
else if(this.state.shouldvisible==false&&this.state.isvisible){
this.$control.stop().animate({ opacity: 0 }, this.setting.fadeduration[1]);
this.state.isvisible=false;
}},
init: function(){
jQuery(document).ready(function($){
var mainobj=scrolltotop;
var iebrws=document.all;
mainobj.cssfixedsupport = !iebrws||iebrws&&document.compatMode=="CSS1Compat"&&window.XMLHttpRequest
mainobj.$body=(window.opera) ?(document.compatMode=="CSS1Compat" ? $('html'):$('body') ):$('html,body');
mainobj.$control=$('<div id="topcontrol">' + mainobj.controlHTML + '</div>')
.css({ position: mainobj.cssfixedsupport ? 'fixed':'absolute', bottom: mainobj.controlattrs.offsety, opacity: 0, cursor: 'pointer' })
.attr({ title: '' })
.on('click', function(){ mainobj.scrollup(); return false; })
.appendTo('body');
if(document.all&&!window.XMLHttpRequest&&mainobj.$control.text()!='')
mainobj.$control.css({ width: mainobj.$control.width() });
mainobj.togglecontrol();
$('a[href="' + mainobj.anchorkeyword + '"]').on('click', function(){
mainobj.scrollup();
return false;
});
$(window).on('scroll resize', function(e){
mainobj.togglecontrol();
});
});
}};
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
ScrollToTop: {
defaults: {
html: '<i class="fas fa-chevron-up"></i>',
offsetx: 10,
offsety: 0
},
initialize: function(html, offsetx, offsety){
if($('#topcontrol').length){
return this;
}
this.html=(html||this.defaults.html);
this.offsetx=(offsetx||this.defaults.offsetx);
this.offsety=(offsety||this.defaults.offsety);
this.build();
return this;
},
build: function(){
var self=this;
if(typeof scrolltotop!=='undefined'){
scrolltotop.controlHTML=self.html;
scrolltotop.controlattrs={ offsetx: self.offsetx, offsety: self.offsety };
scrolltotop.init();
}
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
MegaMenu: {
defaults: {
menu: $('.mega-menu')
},
initialize: function($menu){
this.$menu=($menu||this.defaults.menu);
this.events();
return this;
},
popupWidth: function(){
var winWidth=window.innerWidth,
popupWidth=theme.bodyWidth - theme.grid_gutter_width * 2;
if(!$('body').hasClass('wide') ){
if(winWidth >=1140 + theme.grid_gutter_width&&winWidth <=theme.container_width + 2 * theme.grid_gutter_width - 1&&theme.container_width >=1360)
popupWidth=1140 - theme.grid_gutter_width;
else if(winWidth >=theme.container_width + theme.grid_gutter_width - 1)
popupWidth=theme.container_width - theme.grid_gutter_width;
else if(winWidth >=992)
popupWidth=960 - theme.grid_gutter_width;
else if(winWidth >=768)
popupWidth=720 - theme.grid_gutter_width;
}
return popupWidth;
},
calcMenuPosition: function(menu_obj, is_left){
var menu=menu_obj,
$menuWrap;
if($(menu).closest('.elementor-top-section').length){
$menuWrap=$(menu).closest('.elementor-top-section');
}else if($(menu).closest('.e-con.e-parent').length){
$menuWrap=$(menu).closest('.e-con.e-parent');
}else if($(menu).closest('.e-con').length){
$menuWrap=$(menu).closest('.e-con');
}else if($(menu).closest('.header-main').length){
$menuWrap=$(menu).closest('.header-main');
}else if($(menu).closest('.main-menu-wrap').length){
$menuWrap=$(menu).closest('.main-menu-wrap');
}else if($(menu).closest('.header-top').length){
$menuWrap=$(menu).closest('.header-top');
}else if($(menu).closest('.header-bottom').length){
$menuWrap=$(menu).closest('.header-bottom');
}else{
$menuWrap=$(menu).closest('.top-row');
}
var $headerContainer=$menuWrap;
var ctSpacing=0;
if($menuWrap.children('.elementor-container').length){
$headerContainer=$menuWrap.children('.elementor-container');
}else if($menuWrap.find('.container-fluid').length){
$headerContainer=$menuWrap.find('.container-fluid');
}else if($menuWrap.find('.container').length){
$headerContainer=$menuWrap.find('.container');
}else if($menuWrap.find('.e-con-inner').length){
$headerContainer=$menuWrap.find('.e-con-inner');
}else if($menuWrap.find('.vc_column_container').length){
ctSpacing=2 * parseInt($menuWrap.find('.vc_column_container').css('padding-left') );
}
if($headerContainer.length >=1){
var isParent=false;
$headerContainer.each(function (){
var $this=$(this);
if($this.find(menu).length&&! isParent){
$headerContainer=$this;
isParent=true;
}});
if(! isParent){
$headerContainer=$menuWrap;
}}
if(! $headerContainer.length){
return;
}
var menuContainerWidth=$headerContainer.outerWidth() - parseInt($headerContainer.css('padding-left') ) - parseInt($headerContainer.css('padding-right') ) - ctSpacing;
if(menuContainerWidth < 900) return;
if(menu.parent().hasClass('pos-fullwidth') ){
menu.get(0).style.width=menuContainerWidth + 'px';
}
var browserWidth=document.body.offsetWidth,
menuLeftPos=menu.offset().left -(( browserWidth - menuContainerWidth) / 2),
l=false;
if('center'==is_left){
var remainWidth=menuContainerWidth -(menuLeftPos + menu.width());
if(remainWidth <=0){
l=remainWidth;
}else if(menuLeftPos <=0){
l=-menuLeftPos;
}}else if('justify'==is_left){
if(window.theme.rtl){
menuLeftPos=browserWidth -(menu.offset().left + menu.outerWidth()) -(browserWidth - menuContainerWidth) / 2;
}
var menuWidth=menu.width(),
remainWidth=menuContainerWidth -(menuLeftPos + menuWidth);
if(menuLeftPos > remainWidth&&menuLeftPos < menuWidth){
l=(menuLeftPos + remainWidth) / 3;
}
if(remainWidth <=0){
l=-remainWidth;
}}else if(false!==is_left){
var remainWidth=menuContainerWidth -(menuLeftPos + menu.width());
if(remainWidth <=0){
l=-remainWidth;
}}else if(menuLeftPos <=0){
l=-menuLeftPos;
}
return l;
},
build: function($menu){
var self=this;
if(!$menu){
$menu=self.$menu;
}
$menu.each(function(){
var $menu=$(this),
$menu_container=$menu.closest('.container'),
container_width=self.popupWidth();
if($menu.closest('.porto-popup-menu').length){
return false;
}
var $menu_items=$menu.children('li.has-sub');
$menu_items.each(function(){
var $menu_item=$(this),
$popup=$menu_item.children('.popup');
if($popup.length){
var popup_obj=$popup.get(0);
popup_obj.style.display='block';
if($menu_item.hasClass('wide') ){
popup_obj.style.left=0;
var padding=parseInt($popup.css('padding-left') ) + parseInt($popup.css('padding-right') ) +
parseInt($popup.find('> .inner').css('padding-left') ) + parseInt($popup.find('> .inner').css('padding-right') );
var row_number=4;
if($menu_item.hasClass('col-1') ) row_number=1;
if($menu_item.hasClass('col-2') ) row_number=2;
if($menu_item.hasClass('col-3') ) row_number=3;
if($menu_item.hasClass('col-4') ) row_number=4;
if($menu_item.hasClass('col-5') ) row_number=5;
if($menu_item.hasClass('col-6') ) row_number=6;
if(window.innerWidth < 992)
row_number=1;
var col_length=0;
$popup.find('> .inner > ul > li').each(function(){
var cols=parseFloat($(this).attr('data-cols') );
if(cols <=0||!cols)
cols=1;
if(cols > row_number)
cols=row_number;
col_length +=cols;
});
if(col_length > row_number) col_length=row_number;
var popup_max_width=$popup.data('popup-mw') ? $popup.data('popup-mw'):$popup.find('.inner').css('max-width'),
col_width=container_width / row_number;
if('none'!==popup_max_width&&parseInt(popup_max_width) < container_width){
col_width=parseInt(popup_max_width) / row_number;
}
$popup.find('> .inner > ul > li').each(function(){
var cols=parseFloat($(this).data('cols') );
if(cols <=0)
cols=1;
if(cols > row_number)
cols=row_number;
if($menu_item.hasClass('pos-center')||$menu_item.hasClass('pos-left')||$menu_item.hasClass('pos-right') )
this.style.width=(100 / col_length * cols) + '%';
else
this.style.width=(100 / row_number * cols) + '%';
});
if($menu_item.hasClass('pos-center') ){
var width=col_width * col_length - padding;
$popup.find('> .inner > ul').get(0).style.width=width + 'px';
var left_position=($menu_item.outerWidth() - width) / 2;
popup_obj.style.left=left_position + 'px';
popup_obj.style.right='auto';
self.SetMenuPosition(popup_obj, $popup, 'center', left_position);
}else if($menu_item.hasClass('pos-left') ){
$popup.find('> .inner > ul').get(0).style.width=(col_width * col_length - padding) + 'px';
popup_obj.style.left='0';
popup_obj.style.right='auto';
self.SetMenuPosition(popup_obj, $popup);
}else if($menu_item.hasClass('pos-right') ){
$popup.find('> .inner > ul').get(0).style.width=(col_width * col_length - padding) + 'px';
popup_obj.style.right='0';
popup_obj.style.left='auto';
self.SetMenuPosition(popup_obj, $popup, false);
}else if($menu_item.hasClass('pos-fullwidth') ){
popup_obj.style.right='auto';
popup_obj.style.left='0';
self.SetMenuPosition(popup_obj, $popup);
}else{
$popup.find('> .inner > ul').get(0).style.width=(container_width - padding) + 'px';
if(theme.rtl){
popup_obj.style.right='0';
popup_obj.style.left='auto';
}else{
popup_obj.style.left='0';
popup_obj.style.right='auto';
}
self.SetMenuPosition(popup_obj, $popup, 'justify');
}}else{
if($menu_item.hasClass('pos-left') ){
if($popup.offset().left + $popup.width() > window.innerWidth){
$menu_item.removeClass('pos-left').addClass('pos-right');
}}else if($menu_item.hasClass('pos-right') ){
if($popup.offset().left < 0){
$menu_item.removeClass('pos-right').addClass('pos-left');
}}else{
if($popup.offset().left + $popup.width() > window.innerWidth){
$menu_item.addClass('pos-right');
}else if($popup.find('> .inner > ul').length){
var $sub_menu=$popup.find('> .inner > ul').eq(0);
if($sub_menu.offset().left + $sub_menu.width() + 200 > window.innerWidth){
$sub_menu.addClass('pos-left');
}}
}}
$menu_item.addClass('sub-ready');
}});
});
return self;
},
SetMenuPosition: function(popup_obj, $popup, is_left=true, offsetWidth=0){
setTimeout(()=> {
var self=this,
left_position=self.calcMenuPosition($popup, is_left);
if(0!==left_position){
if('center'==is_left){
if(false!==left_position){
popup_obj.style.left=(offsetWidth + left_position) + 'px';
popup_obj.style.right='auto';
}}else if('justify'==is_left){
if(theme.rtl){
popup_obj.style.left='auto';
if(left_position){
popup_obj.style.right='-' + left_position + 'px';
}else{
if(! $('body').hasClass('wide') ){
popup_obj.style.right='-15px';
}else{
popup_obj.style.right='0';
}}
}else{
popup_obj.style.right='auto';
if(left_position){
popup_obj.style.left='-' + left_position + 'px';
}else{
if(! $('body').hasClass('wide') ){
popup_obj.style.left='-15px';
}else{
popup_obj.style.left='0';
}}
}}else{
if(is_left){
popup_obj.style.right='auto';
if(false!==left_position){
popup_obj.style.left='-' + left_position + 'px';
}else{
if(! $('body').hasClass('wide') ){
popup_obj.style.left='-15px';
}else{
popup_obj.style.left='0';
}}
}else{
popup_obj.style.left='auto';
if(false!==left_position){
popup_obj.style.right='-' + left_position + 'px';
}else{
if(! $('body').hasClass('wide') ){
popup_obj.style.right='-15px';
}else{
popup_obj.style.right='0';
}}
}}
}
$popup.parent().addClass('loaded');
});
},
events: function(){
var self=this;
$(window).smartresize(function(e){
if(e.originalEvent){
self.build();
}});
if(theme.isLoaded){
theme.requestFrame(function(){
self.build();
});
}else{
$(window).on('load', function(){
theme.requestFrame(function(){
self.build();
});
});
}
if(self.$menu.length){
self.$menu.on('mouseenter', '.menu-item.has-sub', function(e){
var $thePopup=$(e.currentTarget).find('>.popup');
if($thePopup.find('.owl-carousel:not(.owl-loaded)').length==0){
return;
}
$thePopup.find('.owl-carousel:not(.owl-loaded)').each(function(){
var $this=$(this),
opts;
if(! $this.hasClass('owl-loaded') ){
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
if($.fn.themeCarousel){
$this.themeCarousel(opts);
}}
});
});
}
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
StickyHeader: {
defaults: {
header: $('#header')
},
initialize: function($header){
this.$header=($header||this.defaults.header);
this.sticky_height=0;
this.sticky_pos=0;
this.change_logo=theme.change_logo;
if(!theme.show_sticky_header||!this.$header.length||$('.side-header-narrow-bar').length)
return this;
var self=this;
var $menu_wrap=self.$header.find('> .main-menu-wrap');
if($menu_wrap.length){
self.$menu_wrap=$menu_wrap;
self.menu_height=$menu_wrap.height();
}else{
self.$menu_wrap=false;
}
self.$header_main=self.$header.find('.header-main');
if(self.$header_main.length > 1){
self.$header_main=$(self.$header_main[0]);
}
if(!self.$header_main.length&&self.$header.children('.elementor-location-header').length){
self.$header_main=self.$header.children('.elementor-location-header').last().addClass('header-main');
}
if(!self.$header_main.length){
return this;
}
self.reveal=self.$header.parents('.header-wrapper').hasClass('header-reveal');
self.is_sticky=false;
self.reset()
.build()
.events();
return self;
},
build: function(){
var self=this;
if(!self.is_sticky&&(window.innerHeight + self.header_height + theme.adminBarHeight() + parseInt(self.$header.css('border-top-width') ) >=$(document).height()) ){
return self;
}
if(window.innerHeight > $(document.body).height())
window.scrollTo(0, 0);
var scroll_top=$(window).scrollTop(),
$pageWrapper=$('.page-wrapper');
if(self.$menu_wrap&&!theme.isTablet()){
self.$header_main.stop().css('top', 0);
if(self.$header.parent().hasClass('fixed-header') )
self.$header.parent().attr('style', '');
if($('.page-wrapper').hasClass('sticky-scroll-up') ){
scroll_top -=self.sticky_height;
if(scroll_top > self.sticky_pos + 100){
self.$header.addClass('sticky-ready');
}else{
self.$header.removeClass('sticky-ready');
}}
if(scroll_top > self.sticky_pos){
if(!self.$header.hasClass('sticky-header')&&(! $pageWrapper.hasClass('sticky-scroll-up')||($pageWrapper.hasClass('sticky-scroll-up')&&'undefined'!==typeof($pageWrapper.data('prev-scrollpos') )) )){
var header_height=self.$header.outerHeight();
self.$header.addClass('sticky-header').css('height', header_height);
self.$menu_wrap.stop().css('top', theme.adminBarHeight());
var selectric=self.$header.find('.header-main .searchform select').data('selectric');
if(selectric&&typeof selectric.close!='undefined')
selectric.close();
if(self.$header.parent().hasClass('fixed-header') ){
self.$header_main.hide();
self.$header.css('height', '');
}
if(!self.init_toggle_menu){
self.init_toggle_menu=true;
theme.MegaMenu.build();
if($('#main-toggle-menu').length){
if($('#main-toggle-menu').hasClass('show-always') ){
$('#main-toggle-menu').data('show-always', true);
$('#main-toggle-menu').removeClass('show-always');
}
$('#main-toggle-menu').addClass('closed');
$('#main-toggle-menu .menu-title').addClass('closed');
$('#main-toggle-menu .toggle-menu-wrap').attr('style', '');
}}
self.is_sticky=true;
}}else{
if(self.$header.hasClass('sticky-header') ){
self.$header.removeClass('sticky-header');
self.$header.css('height', '');
self.$menu_wrap.stop().css('top', 0);
self.$header_main.show();
var selectric=self.$header.find('.main-menu-wrap .searchform select').data('selectric');
if(selectric&&typeof selectric.close!='undefined')
selectric.close();
if(self.init_toggle_menu){
self.init_toggle_menu=false;
theme.MegaMenu.build();
if($('#main-toggle-menu').length){
if($('#main-toggle-menu').data('show-always') ){
$('#main-toggle-menu').addClass('show-always');
$('#main-toggle-menu').removeClass('closed');
$('#main-toggle-menu .menu-title').removeClass('closed');
$('#main-toggle-menu .toggle-menu-wrap').attr('style', '');
}}
}
self.is_sticky=false;
}}
}else{
self.$header_main.show();
if(self.$header.parent().hasClass('fixed-header')&&$('#wpadminbar').length&&$('#wpadminbar').css('position')=='absolute'){
}else if(self.$header.parent().hasClass('fixed-header') ){
self.$header.parent().attr('style', '');
}else{
if(self.$header.parent().hasClass('fixed-header') )
self.$header.parent().attr('style', '');
}
if(self.$header.hasClass('sticky-menu-header')&&!theme.isTablet()){
self.$header_main.stop().css('top', 0);
if(self.change_logo) self.$header_main.removeClass('change-logo');
self.$header_main.removeClass('sticky');
self.$header.removeClass('sticky-header');
self.is_sticky=false;
self.sticky_height=0;
}else{
if(self.$menu_wrap)
self.$menu_wrap.stop().css('top', 0);
if($pageWrapper.hasClass('sticky-scroll-up') ){
scroll_top -=self.sticky_height;
if(scroll_top > self.sticky_pos + 100){
self.$header.addClass('sticky-ready');
}else{
self.$header.removeClass('sticky-ready');
}}
if(scroll_top > self.sticky_pos&&(!theme.isTablet()||(theme.isTablet()&&(!theme.isMobile()&&theme.show_sticky_header_tablet)||(theme.isMobile()&&theme.show_sticky_header_tablet&&theme.show_sticky_header_mobile) )) ){
if(! self.$header.hasClass('sticky-header')&&(! $pageWrapper.hasClass('sticky-scroll-up')||($pageWrapper.hasClass('sticky-scroll-up')&&'undefined'!==typeof($pageWrapper.data('prev-scrollpos') )) )){
var header_height=self.$header.outerHeight();
self.$header.addClass('sticky-header').css('height', header_height);
self.$header_main.addClass('sticky');
if(self.change_logo) self.$header_main.addClass('change-logo');
self.$header_main.stop().css('top', theme.adminBarHeight());
if(!self.init_toggle_menu){
self.init_toggle_menu=true;
theme.MegaMenu.build();
if($('#main-toggle-menu').length){
if($('#main-toggle-menu').hasClass('show-always') ){
$('#main-toggle-menu').data('show-always', true);
$('#main-toggle-menu').removeClass('show-always');
}
$('#main-toggle-menu').addClass('closed');
$('#main-toggle-menu .menu-title').addClass('closed');
$('#main-toggle-menu .toggle-menu-wrap').attr('style', '');
}}
self.is_sticky=true;
}}else{
if(self.$header.hasClass('sticky-header') ){
if(self.change_logo) self.$header_main.removeClass('change-logo');
self.$header_main.removeClass('sticky');
self.$header.removeClass('sticky-header');
self.$header.css('height', '');
self.$header_main.stop().css('top', 0);
if(self.init_toggle_menu){
self.init_toggle_menu=false;
theme.MegaMenu.build();
if($('#main-toggle-menu').length){
if($('#main-toggle-menu').data('show-always') ){
$('#main-toggle-menu').addClass('show-always');
$('#main-toggle-menu').removeClass('closed');
$('#main-toggle-menu .menu-title').removeClass('closed');
$('#main-toggle-menu .toggle-menu-wrap').attr('style', '');
}}
}
self.is_sticky=false;
}}
}}
if(!self.$header.hasClass('header-loaded') )
self.$header.addClass('header-loaded');
if(!self.$header.find('.logo').hasClass('logo-transition') )
self.$header.find('.logo').addClass('logo-transition');
if(self.$header.find('.overlay-logo').get(0)&&!self.$header.find('.overlay-logo').hasClass('overlay-logo-transition') )
self.$header.find('.overlay-logo').addClass('overlay-logo-transition');
return self;
},
reset: function(){
var self=this;
if(self.$header.find('.logo').hasClass('logo-transition') )
self.$header.find('.logo').removeClass('logo-transition');
if(self.$header.find('.overlay-logo').get(0)&&self.$header.find('.overlay-logo').hasClass('overlay-logo-transition') )
self.$header.find('.overlay-logo').removeClass('overlay-logo-transition');
if(self.$menu_wrap&&!theme.isTablet()){
self.$header.addClass('sticky-header sticky-header-calc');
self.$header_main.addClass('sticky');
if(self.change_logo) self.$header_main.addClass('change-logo');
self.sticky_height=self.$menu_wrap.height() + parseInt(self.$menu_wrap.css('padding-top') ) + parseInt(self.$menu_wrap.css('padding-bottom') );
if(self.change_logo) self.$header_main.removeClass('change-logo');
self.$header_main.removeClass('sticky');
self.$header.removeClass('sticky-header sticky-header-calc');
self.header_height=self.$header.height() + parseInt(self.$header.css('margin-top') );
self.menu_height=self.$menu_wrap.height() + parseInt(self.$menu_wrap.css('padding-top') ) + parseInt(self.$menu_wrap.css('padding-bottom') );
self.sticky_pos=(self.header_height - self.sticky_height) + parseInt($('body').css('padding-top') ) + parseInt(self.$header.css('border-top-width') );
if($('.banner-before-header').length){
self.sticky_pos +=$('.banner-before-header').height();
}
if($('.porto-block-html-top').length){
self.sticky_pos +=$('.porto-block-html-top').height();
}}else{
self.$header.addClass('sticky-header sticky-header-calc');
self.$header_main.addClass('sticky');
if(self.change_logo) self.$header_main.addClass('change-logo');
self.sticky_height=self.$header_main.outerHeight();
if(self.change_logo) self.$header_main.removeClass('change-logo');
self.$header_main.removeClass('sticky');
self.$header.removeClass('sticky-header sticky-header-calc');
self.header_height=self.$header.height() + parseInt(self.$header.css('margin-top') );
self.main_height=self.$header_main.height();
if(!(!theme.isTablet()||(theme.isTablet()&&!theme.isMobile()&&theme.show_sticky_header_tablet)||(theme.isMobile()&&theme.show_sticky_header_tablet&&theme.show_sticky_header_mobile) )){
self.sticky_height=0;
}
self.sticky_pos=self.$header.offset().top + self.header_height - self.sticky_height - theme.adminBarHeight() + parseInt(self.$header.css('border-top-width') );
}
if(self.reveal){
if(self.menu_height){
self.sticky_pos +=self.menu_height + 30;
}else{
self.sticky_pos +=30;
}}
if(self.sticky_pos < 0){
self.sticky_pos=0;
}
self.init_toggle_menu=false;
self.$header_main.removeAttr('style');
if(!theme.isTablet()&&self.$header.hasClass('header-side')&&typeof self.$header.attr('data-plugin-sticky')!='undefined'){
self.$header.css('height', '');
}else{
self.$header.removeAttr('style');
}
return self;
},
events: function(){
var self=this, win_width=0;
$(window).smartresize(function(){
if(win_width!=window.innerWidth){
self.reset().build();
win_width=window.innerWidth;
}});
var scrollEffect=function (){
theme.requestFrame(function(){
self.build();
var $pageWrapper=$('.page-wrapper');
if($pageWrapper.hasClass('sticky-scroll-up')&&! $('html').hasClass('porto-search-opened') ){
var prevScrollPos=0,
scrollTop=$(window).scrollTop();
if($pageWrapper.data('prev-scrollpos') ){
prevScrollPos=$pageWrapper.data('prev-scrollpos');
}
if(scrollTop > prevScrollPos){
self.$header.addClass('scroll-down');
}else{
self.$header.removeClass('scroll-down');
}
$pageWrapper.data('prev-scrollpos', scrollTop);
}});
}
window.addEventListener('scroll', scrollEffect, { passive: true });
scrollEffect();
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
HashScroll: {
initialize: function(){
this.build()
.events();
return this;
},
build: function(){
var self=this;
try {
var hash=window.location.hash;
var target=$(hash);
if(target.length&&!(hash=='#review_form'||hash=='#reviews'||hash.indexOf('#comment-')!=-1) ){
$('html, body').delay(600).stop().animate({
scrollTop: target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1
}, 600, 'easeOutQuad');
}
return self;
} catch(err){
return self;
}},
getTarget: function(href){
if('#'==href||href.endsWith('#') ){
return false;
}
var target;
if(href.indexOf('#')==0){
target=$(href);
}else{
var url=window.location.href;
url=url.substring(url.indexOf('://') + 3);
if(url.indexOf('#')!=-1)
url=url.substring(0, url.indexOf('#') );
href=href.substring(href.indexOf('://') + 3);
href=href.substring(href.indexOf(url) + url.length);
if(href.indexOf('#')==0){
target=$(href);
}}
return target;
},
activeMenuItem: function(){
var self=this;
var scroll_pos=$(window).scrollTop();
var $menu_items=$('.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"]');
if($menu_items.length){
$menu_items.each(function(){
var $this=$(this),
href=$this.attr('href'),
target=self.getTarget(href);
if(target&&target.get(0) ){
if($this.parent().is(':last-child')&&scroll_pos + window.innerHeight >=target.offset().top + target.outerHeight()){
$this.parent().siblings().removeClass('active');
$this.parent().addClass('active');
}else{
var scroll_to=target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1,
$parent=$this.parent();
if(scroll_to <=scroll_pos + 5){
$parent.siblings().removeClass('active');
$parent.addClass('active');
if($parent.closest('.secondary-menu').length){
$parent.closest('#header').find('.main-menu').eq(0).children('.menu-item.active').removeClass('active');
}}else{
$parent.removeClass('active');
}}
}});
}
return self;
},
events: function(){
var self=this;
$('.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"], a[href*="#"].hash-scroll, .hash-scroll-wrap a[href*="#"]').on('click', function(e){
e.preventDefault();
var $this=$(this),
href=$this.attr('href'),
target=self.getTarget(href);
if(target&&target.get(0) ){
var $parent=$this.parent();
var scroll_to=target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1;
$('html, body').stop().animate({
scrollTop: scroll_to
}, 600, 'easeOutQuad', function(){
$parent.siblings().removeClass('active');
$parent.addClass('active');
});
if($this.closest('.porto-popup-menu.opened').length){
$this.closest('.porto-popup-menu.opened').children('.hamburguer-btn').trigger('click');
}}else if(( '#'!=href||!$this.closest('.porto-popup-menu.opened').length)&&!$this.hasClass('nolink') ){
window.location.href=$this.attr('href');
}});
var $menu_items=$('.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"]');
$menu_items.each(function(){
var rootMargin='-20% 0px -79.9% 0px',
isLast=$(this).parent().is(':last-child');
if(isLast){
var obj=document.getElementById(this.hash.replace('#', '') );
if(obj&&document.body.offsetHeight - obj.offsetTop < window.innerHeight){
var ratio=(window.innerHeight - document.body.offsetHeight + obj.offsetTop) / window.innerHeight * 0.8;
ratio=Math.round(ratio * 100);
rootMargin='-' +(20 + ratio) + '% 0px -' +(79.9 - ratio) + '% 0px';
}}
var callback=function(){
if(this&&typeof this[0]!='undefined'&&this[0].id){
$('.menu-item > a[href*="#' + this[0].id + '"], .porto-sticky-nav .nav > li > a[href*="#' + this[0].id + '"]').parent().addClass('active').siblings().removeClass('active');
}};
self.scrollSpyIntObs(this.hash, callback, {
rootMargin: rootMargin,
thresholds: 0
}, true, isLast, true, $menu_items, $(this).parent().index());
});
return self;
},
scrollSpyIntObs: function(selector, functionName, intObsOptions, alwaysObserve, isLast, firstLoad, $allItems, index){
if(typeof IntersectionObserver=='undefined'){
return this;
}
var obj=document.getElementById(selector.replace('#', '') );
if(!obj){
return this;
}
var self=this;
var intersectionObserverOptions={
rootMargin: '0px 0px 200px 0px'
}
if(Object.keys(intObsOptions).length){
intersectionObserverOptions=$.extend(intersectionObserverOptions, intObsOptions);
}
var observer=new IntersectionObserver(function(entries){
for(var i=0; i < entries.length; i++){
var entry=entries[i];
if(entry.intersectionRatio > 0){
if(typeof functionName==='string'){
var func=Function('return ' + functionName)();
}else{
var callback=functionName;
callback.call($(entry.target) );
}}else{
if(firstLoad==false){
if(isLast&&! $allItems.closest('.porto-sticky-nav').length){
$allItems.filter('[href*="' + entry.target.id + '"]').parent().prev().addClass('active').siblings().removeClass('active');
}}
firstLoad=false;
}}
}, intersectionObserverOptions);
observer.observe(obj);
return this;
}}
});
}).apply(this, [window.theme, jQuery]);
function porto_init($wrap='', initial=false){
jQuery(window).on('touchstart', function(){ });
if(!$wrap){
$wrap=jQuery(document.body);
}
var wrapObj=$wrap.get(0);
$wrap.trigger('porto_init_start', [wrapObj]);
(function($){
if($.fn.themeAccordion){
$(function(){
$wrap.find('.accordion:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeAccordion(opts);
});
});
}
if($.fn.themeAccordionMenu){
$(function(){
$wrap.find('.accordion-menu:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeAccordionMenu(opts);
});
});
}
if($.fn.themeFlickrZoom){
$(function(){
$wrap.find('.wpb_flickr_widget:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeFlickrZoom(opts);
});
});
}
if($.fn.themeMasonry){
$(function(){
$wrap.find('[data-plugin-masonry]:not(.manual)').each(function(){
var $this=$(this),
opts;
if($this.hasClass('elementor-row') ){
$this.children('.elementor-column').addClass('porto-grid-item');
}
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeMasonry(opts);
});
$wrap.find('.posts-masonry .posts-container:not(.manual)').each(function(){
var pluginOptions=$(this).data('plugin-options');
if(!pluginOptions){
pluginOptions={};}
pluginOptions.itemSelector='.post';
$(this).themeMasonry(pluginOptions);
});
$wrap.find('.page-portfolios .portfolio-row:not(.manual)').each(function(){
if($(this).closest('.porto-grid-container').length > 0||typeof $(this).attr('data-plugin-masonry')!='undefined'){
return;
}
var $parent=$(this).parent(), layoutMode='masonry', options, columnWidth='.portfolio:not(.w2)', timer=null;
if($parent.hasClass('portfolios-grid') ){
}else if($parent.hasClass('portfolios-masonry') ){
if(!$parent.children('.bounce-loader').length){
$parent.append('<div class="bounce-loader"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>');
}}
options={
itemSelector: '.portfolio',
layoutMode: layoutMode,
callback: function(){
timer&&clearTimeout(timer);
timer=setTimeout(function(){
if(typeof theme.FilterZoom!=='undefined'){
theme.FilterZoom.initialize($('.page-portfolios') );
}
$parent.addClass('portfolio-iso-active');
}, 400);
}};
if(layoutMode=='masonry'){
if(!$parent.find('.portfolio:not(.w2)').length)
columnWidth='.portfolio';
options=$.extend(true, {}, options, {
masonry: { columnWidth: columnWidth }});
}
$(this).themeMasonry(options);
});
$wrap.find('.page-members .member-row:not(.manual)').each(function(){
$(this).themeMasonry({
itemSelector: '.member',
callback: function(){
setTimeout(function(){
if(typeof theme.FilterZoom!=='undefined'){
theme.FilterZoom.initialize($('.page-members') );
}}, 400);
}});
});
});
}
if($.fn.themeToggle){
$(function(){
$wrap.find('section.toggle:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeToggle(opts);
});
});
}
if($.fn.themeSticky){
$(function(){
$wrap.find('[data-plugin-sticky]:not(.manual), .porto-sticky:not(.manual), .porto-sticky-nav:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
if($this.is(':visible') ){
$this.themeSticky(opts);
}});
});
}
if(typeof bootstrap!='undefined'&&typeof wrapObj!='undefined'){
var tooltipTriggerList=[].slice.call(wrapObj.querySelectorAll("[data-bs-tooltip]:not(.manual), [data-toggle='tooltip']:not(.manual), .star-rating:not(.manual)") );
tooltipTriggerList.map(function(tooltipTriggerEl){
return new bootstrap.Tooltip(tooltipTriggerEl)
});
}
$wrap.find('a[data-bs-toggle="tab"]').off('shown.bs.tab').on('shown.bs.tab', function(e){
let $this=$(this);
if($this.closest('.custom-nav-sidebar').length){
return;
}
$this.parents('.nav-tabs').find('.active').removeClass('active');
$this.addClass('active').parent().addClass('active');
if($this.closest('.tabs') ){
var _tabCarousel=$this.closest('.tabs').find('.tab-content>.active').find('.owl-carousel');
if(! _tabCarousel.data('owl.carousel') ){
_tabCarousel.themeCarousel(_tabCarousel.data('plugin-options'));
}}
});
if(typeof theme.initAsync=='function'){
theme.initAsync($wrap, wrapObj);
}else{
$(document.body).on('porto_async_init', function(){
theme.initAsync($wrap, wrapObj);
});
}})(jQuery);
jQuery(document.body).trigger('porto_init', [$wrap, initial]);
}
(function(theme, $){
'use strict';
$(document).ready(function(){
var win_width=0;
$(window).smartresize(function(){
if(win_width!=window.innerWidth){
theme.adminBarHeightNum=null;
win_width=window.innerWidth;
}
theme.bodyWidth=document.body.offsetWidth;
});
if(typeof theme.ScrollToTop!=='undefined'){
theme.ScrollToTop.initialize();
}
setTimeout(function(){
if(typeof theme.StickyHeader!=='undefined'){
theme.StickyHeader.initialize();
}
porto_init($(document.body), true);
}, 0);
(function(){
theme.bodyWidth=theme.bodyWidth||document.body.offsetWidth;
if(typeof theme.MegaMenu!=='undefined'){
theme.MegaMenu.initialize();
}})();
setTimeout(()=> {
if(typeof theme.HashScroll!=='undefined'){
theme.HashScroll.initialize();
}});
$(document).trigger('porto_theme_init');
theme.isReady=true;
});
$(window).on('load', function(){
$(document).on('click', '.sidebar-toggle', function(e){
e.preventDefault();
var $html=$('html'),
$main=$('#main'),
$this=$(this);
if($this.siblings('.porto-product-filters').length){
if($html.hasClass('filter-sidebar-opened') ){
$html.removeClass('filter-sidebar-opened');
$this.siblings('.sidebar-overlay').removeClass('active');
if($html.hasClass('sidebar-right-opened') ){
$html.removeClass('sidebar-right-opened');
}}else{
$html.removeClass('sidebar-opened');
$html.addClass('filter-sidebar-opened');
$this.siblings('.sidebar-overlay').addClass('active');
if($main.hasClass('column2-right-sidebar')||$main.hasClass('column2-wide-right-sidebar') ){
$html.addClass('sidebar-right-opened');
}}
}else{
if($html.hasClass('sidebar-opened') ){
$html.removeClass('sidebar-opened');
$('.sidebar-overlay').removeClass('active');
if($html.hasClass('sidebar-right-opened') ){
$html.removeClass('sidebar-right-opened');
}}else{
$html.addClass('sidebar-opened');
$('.sidebar-overlay').addClass('active');
if($main.hasClass('column2-right-sidebar')||$main.hasClass('column2-wide-right-sidebar') ){
$html.addClass('sidebar-right-opened');
}}
}});
$('#header .mini-cart').on('click', function(e){
let $body=$('body');
if(js_porto_vars.cart_url&&($body.hasClass('woocommerce-cart')||$body.hasClass('woocommerce-checkout') )){
location.href=js_porto_vars.cart_url;
}});
$('.minicart-offcanvas .cart-head').on('click', function(){
let $body=$('body');
if(js_porto_vars.cart_url&&($body.hasClass('woocommerce-cart')||$body.hasClass('woocommerce-checkout') )){
return;
}
var $this=$(this);
$this.closest('.minicart-offcanvas').toggleClass('minicart-opened');
if($this.closest('.minicart-offcanvas').hasClass('minicart-opened') ){
$('html').css('margin-right', theme.getScrollbarWidth());
$('html').css('overflow', 'hidden');
}else{
$('html').css('overflow', '');
$('html').css('margin-right', '');
}});
$('.minicart-offcanvas .minicart-overlay').on('click', function(){
$(this).closest('.minicart-offcanvas').removeClass('minicart-opened');
$('.d-none .minicart-offcanvas.minicart-opened').removeClass('minicart-opened');
$('html').css('overflow', '');
$('html').css('margin-right', '');
});
$(document.body).on('click', '.sidebar-overlay', function(){
var $html=$('html');
$html.removeClass('sidebar-opened');
$html.removeClass('filter-sidebar-opened');
$(this).removeClass('active');
$html.removeClass('sidebar-right-opened');
});
$(document.body).on('click', '.section-tabs .nav-link', function(e){
e.preventDefault();
var $this=$(this),
nav_id=$this.data('tab'),
$section_tab=$this.closest('.section-tabs'),
$nav_wrap=$section_tab.children('ul.nav'),
$tab_content=$section_tab.children('.tab-content');
if(nav_id){
$nav_wrap.find('.active').removeClass('active');
$this.addClass('active').parent('.nav-item').addClass('active');
$tab_content.find('>.active').removeClass('show active');
$tab_content.find('>.tab-pane[id="' + nav_id + '"]').addClass('active');
let _offsetHeight=$tab_content.find('>.active').get(0).offsetHeight;
$tab_content.find('>.active').addClass('show');
var _tabCarousel=$tab_content.find('>.active').find('.owl-carousel');
if(! _tabCarousel.data('owl.carousel') ){
_tabCarousel.themeCarousel(_tabCarousel.data('plugin-options'));
}}
});
$(window).on('resize', function(e){
if(e.originalEvent&&window.innerWidth > 991&&$('html').hasClass('sidebar-opened') ){
$('.sidebar-overlay').trigger('click');
}});
var $matchHeightObj=$('.tabs-simple .featured-box .box-content, .porto-content-box .featured-box .box-content, .vc_general.vc_cta3, .match-height');
if($matchHeightObj.length){
if($.fn.matchHeight){
$matchHeightObj.matchHeight();
}else{
var script=document.createElement("script");
script.addEventListener("load", function(event){
$matchHeightObj.matchHeight();
});
script.src=js_porto_vars.ajax_loader_url.replace('/images/ajax-loader@2x.gif', '/js/libs/jquery.matchHeight.min.js');
script.async=true;
document.body.appendChild(script);
}}
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){
$('.share-whatsapp').css('display', 'inline-block');
}
$(document).ajaxComplete(function(event, xhr, options){
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){
$('.share-whatsapp').css('display', 'inline-block');
}});
var ua=window.navigator.userAgent,
ie12=ua.indexOf('Edge/') > 0;
if(ie12) $('html').addClass('ie12');
$(document).on('click', '.portfolios-lightbox a.portfolio-link', function(e){
$(this).find('.thumb-info-zoom').trigger('click');
return false;
});
$('.porto-faqs').each(function(){
if($(this).find('.faq .toggle.active').length < 1){
$(this).find('.faq').eq(0).find('.toggle').addClass('active');
$(this).find('.faq').eq(0).find('.toggle-content').show();
}});
$(document).on('shown.bs.collapse', '.collapse', function(){
var panel=$(this);
theme.refreshVCContent(panel);
});
$(document).on('shown.bs.tab', 'a[data-bs-toggle="tab"]', function(e){
var panel=$($(e.target).attr('href') );
theme.refreshVCContent(panel);
});
$('.porto-tooltip .tooltip-icon').on('click', function(){
if($(this).parent().children(".tooltip-popup").css("display")=="none"){
$(this).parent().children(".tooltip-popup").fadeIn(200);
}else{
$(this).parent().children(".tooltip-popup").fadeOut(200);
}});
$('.porto-tooltip .tooltip-close').on('click', function(){
$(this).parent().fadeOut(200);
});
$('body').css('--porto-scroll-w', theme.getScrollbarWidth() + 'px');
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $, undefined){
"use strict";
$(document).ready(function(){
$(window).on('vc_reload', function(){
porto_init();
$('.type-post').addClass('post');
$('.type-portfolio').addClass('portfolio');
$('.type-member').addClass('member');
$('.type-block').addClass('block');
});
});
var timelineHeightAdjust={
$timeline: $('#exp-timeline'),
$timelineBar: $('#exp-timeline .timeline-bar'),
$firstTimelineItem: $('#exp-timeline .timeline-box').first(),
$lastTimelineItem: $('#exp-timeline .timeline-box').last(),
build: function(){
var self=this;
self.adjustHeight();
},
adjustHeight: function(){
var self=this,
calcFirstItemHeight=(self.$firstTimelineItem.outerHeight(true) / 2) + 5,
calcLastItemHeight=(self.$lastTimelineItem.outerHeight(true) / 2) + 5;
self.$timelineBar.css({
top: calcFirstItemHeight,
bottom: calcLastItemHeight
});
}}
if($('#exp-timeline').get(0) ){
var timeline_timer=null;
$(window).smartresize(function(){
if(timeline_timer){
clearTimeout(timeline_timer);
}
timeline_timer=setTimeout(function(){
timelineHeightAdjust.build();
}, 800);
});
timelineHeightAdjust.build();
}
$('.custom-view-our-location').on('click', function(e){
e.preventDefault();
var this_=$(this);
$('.custom-googlemap').slideDown('1000', function(){
this_.delay(700).hide();
});
});
window.addEventListener('LazyLoad::Initialized',
function(event){
theme.w3tcLazyLoadInstance=event.detail.instance;
},
false
);
})(window.theme, jQuery);
(function(theme, $, undefined){
'use strict';
window.addEventListener('load', function(){
theme.isLoaded=true;
});
$(window).on('elementor/frontend/init', function(){
if(typeof elementorFrontend!='undefined'){
elementorFrontend.hooks.addFilter('frontend/handlers/menu_anchor/scroll_top_distance', function(scrollTop){
if(theme&&theme.StickyHeader&&typeof theme.sticky_nav_height!='undefined'){
if(elementorFrontend.elements.$wpAdminBar.length){
scrollTop +=elementorFrontend.elements.$wpAdminBar.height();
}
scrollTop=scrollTop - theme.adminBarHeight() - theme.StickyHeader.sticky_height - theme.sticky_nav_height + 1;
}
return scrollTop;
});
elementorFrontend.elements.$window.on('elementor/nested-tabs/activate', function(e, content){
var _tabCarousel=$(content).find('.owl-carousel');
if(! _tabCarousel.data('owl.carousel') ){
_tabCarousel.themeCarousel(_tabCarousel.data('plugin-options') );
}});
}});
$('#footer .widget_wysija .wysija-submit:not(.btn)').addClass('btn btn-default');
if($('[data-vc-parallax] .owl-carousel').length){
theme.requestTimeout(function(){ if(typeof window.vcParallaxSkroll=='object'){ window.vcParallaxSkroll.refresh(); }}, 200);
}
if($('.page-content > .alignfull, .post-content > .alignfull').length){
var initAlignFull=function(){
$('.page-content > .alignfull, .post-content > .alignfull').each(function(){
$(this).css('left', -1 * $(this).parent().offset().left).css('right', -1 * $(this).parent().offset().left).css('width', $('body').width() -(parseInt($(this).css('margin-left'), 10) + parseInt($(this).css('margin-right'), 10) ));
});
};
initAlignFull();
$(window).smartresize(function(){
initAlignFull();
});
}})(window.theme, jQuery);
(function(e,n){"use strict";e=e||{},n.extend(e,{lazyload_menu:function(a,o,i){if((js_porto_vars.lazyload_menu||"mobile_menu"==o)&&o){var l=!1,r={action:"porto_lazyload_menu",menu_type:o,nonce:js_porto_vars.porto_nonce};i&&(r.menu_id=i);var t=function(i){if(i){var m=n(i);if("mobile_menu"!=o&&a.each((function(a){var o=n(this),i=m.children(".mega-menu, .sidebar-menu").eq(a);i.length||(i=m.find(".mega-menu, .sidebar-menu").eq(a)),o.children("li.menu-item-has-children").each((function(e){var a=i.children("li.menu-item-has-children").eq(e).children(".popup, .sub-menu");a.hasClass("popup")&&(a=a.children(".inner")),a.length&&(n(this).children(".popup").length?n(this).children(".popup").children(".inner").replaceWith(a):o.hasClass("overlay")?(n(this).children(".sub-menu").remove(),n(this).append(a)):n(this).children(".sub-menu").replaceWith(a))})),o.hasClass("mega-menu")?e.MegaMenu.build(o):o.hasClass("side-menu-accordion")?o.themeAccordionMenu({open_one:!0}):e.SidebarMenu.build(o),o.addClass("sub-ready").trigger("sub-loaded")})),m.find("#nav-panel, #side-nav-panel").length||"mobile_menu"==o){var d=!1;if(n("#nav-panel").length)(u=m.find(".mobile-nav-wrap > *")).length?(n("#nav-panel .mobile-nav-wrap > *").replaceWith(u),n("#nav-panel .mobile-nav-wrap").removeClass("skeleton-body porto-ajax-loading"),n("#nav-panel .accordion-menu").themeAccordionMenu()):d=!0;else if(n("#side-nav-panel").length){var u;(u=m.find("#side-nav-panel")).length?(n("#side-nav-panel").replaceWith(u),n("#side-nav-panel .accordion-menu").themeAccordionMenu()):d=!0}if(d&&!l){l=!0,d=!1;var s=r;s.porto_lazyload_menu_2=1,n.post(window.location.href,s,t)}}"object"==typeof a&&a.length&&(n.fn.themePluginLazyLoad&&a.find(".porto-lazyload:not(.lazy-load-loaded)").themePluginLazyLoad({}),a.find(".porto-carousel").each((function(){n(this).themeCarousel(n(this).data("plugin-options"))})),a.find("[data-appear-animation]").each((function(){n(this).themeAnimate(n(this).data("plugin-options"))})))}},m=window.location.href;e.WooEvents&&e.WooEvents.removeParameterFromUrl&&(m=e.WooEvents.removeParameterFromUrl(m,"add-to-cart")),n.post(m,r,t)}}})}).apply(this,[window.theme,jQuery]),jQuery(document).ready((function(e){if(js_porto_vars.lazyload_menu){var n;function a(e,n,a){var o=!1;"pageload"==js_porto_vars.lazyload_menu?theme.lazyload_menu(e,n,a):"firsthover"==js_porto_vars.lazyload_menu&&e.one("mouseenter touchstart","li.menu-item-has-children",(function(){if(o)return!0;theme.lazyload_menu(e,n,a),o=!0}))}e(".secondary-menu.mega-menu").length&&(n="secondary_menu",a(e(".secondary-menu.mega-menu"),n)),e(".mega-menu.main-menu:not(.scroll-wrapper):not(.secondary-menu)").length&&(n="main_menu",a(e(".mega-menu.main-menu:not(.scroll-wrapper):not(.secondary-menu)"),n)),e(".toggle-menu-wrap .sidebar-menu").length&&(n="toggle_menu",a(e(".toggle-menu-wrap .sidebar-menu"),n)),e(".main-sidebar-menu .sidebar-menu").length&&(n="sidebar_menu",e(".main-sidebar-menu .sidebar-menu").each((function(){let o=e(this);a(o,n,o.closest(".main-sidebar-menu").data("menu"))}))),e(".header-side-nav .sidebar-menu").length&&(n="header_side_menu",a(e(".header-side-nav .sidebar-menu"),n)),e("#nav-panel .skeleton-body, #side-nav-panel .skeleton-body").length&&"pageload"==js_porto_vars.lazyload_menu&&theme.lazyload_menu(1,"mobile_menu")}}));
(function($){
window.theme=window.theme||{};
if(typeof window.theme.animation_support=='undefined'){
theme.animation_support = !window.jQuery('html').hasClass('no-csstransitions');
theme.getOptions=function(opts){
if(typeof(opts)=='object'){
return opts;
}else if(typeof(opts)=='string'){
try {
return JSON.parse(opts.replace(/'/g, '"').replace(';', '') );
} catch(e){
return {};}}else{
return {};}}
theme.execPluginFunction=function(functionName, context){
var args=Array.prototype.slice.call(arguments, 2);
var namespaces=functionName.split(".");
var func=namespaces.pop();
for(var i=0; i < namespaces.length; i++){
context=context[namespaces[i]];
}
return context[func].apply(context, args);
}
theme.mergeOptions=function(obj1, obj2){
var obj3={};
for(var attrname in obj1){ obj3[attrname]=obj1[attrname]; }
for(var attrname in obj2){ obj3[attrname]=obj2[attrname]; }
return obj3;
}
theme.dynIntObsInit=function(selector, functionName, pluginDefaults){
var $el;
if(typeof selector=='string'){
$el=document.querySelectorAll(selector);
}else{
$el=selector;
}
Array.prototype.forEach.call($el, function(obj){
var $this=$(obj),
opts;
if($this.data('observer-init') ){
return;
}
var pluginOptions=theme.getOptions($this.data('plugin-options') );
if(pluginOptions)
opts=pluginOptions;
var mergedPluginDefaults=theme.mergeOptions(pluginDefaults, opts)
var intersectionObserverOptions={
rootMargin: '0px 0px 200px 0px',
thresholds: 0
}
if(mergedPluginDefaults.accY){
intersectionObserverOptions.rootMargin='0px 0px ' + Number(mergedPluginDefaults.accY) + 'px 0px';
}
var observer=new IntersectionObserver(function(entries){
for(var i=0; i < entries.length; i++){
var entry=entries[i];
if(entry.intersectionRatio > 0){
theme.execPluginFunction(functionName, $this, mergedPluginDefaults);
observer.unobserve(entry.target);
}}
}, intersectionObserverOptions);
observer.observe(obj);
$this.data('observer-init', true);
});
}}
})(window.jQuery);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__animate';
var Animate=function($el, opts){
return this.initialize($el, opts);
};
Animate.defaults={
accX: 0,
accY: -120,
delay: 1,
duration: 1000
};
Animate.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, true);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Animate.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var self=this,
$el=this.options.wrapper,
delay=0,
duration=0;
if($el.data('appear-animation-svg') ){
$el.find('[data-appear-animation]').each(function(){
var $this=$(this),
opts;
var pluginOptions=theme.getOptions($this.data('plugin-options') );
if(pluginOptions)
opts=pluginOptions;
$this.themeAnimate(opts);
});
return this;
}
$el.addClass('appear-animation');
var el_obj=$el.get(0);
delay=Math.abs($el.data('appear-animation-delay') ? $el.data('appear-animation-delay'):self.options.delay);
duration=Math.abs($el.data('appear-animation-duration') ? $el.data('appear-animation-duration'):self.options.duration);
if('undefined'!==typeof $el.data('appear-animation')&&$el.data('appear-animation').includes('revealDir') ){
if(delay > 1){
el_obj.style.setProperty('--porto-reveal-animation-delay', delay + 'ms');
}
if(duration!=1000){
el_obj.style.setProperty('--porto-reveal-animation-duration', duration + 'ms');
}
if($el.data('animation-reveal-clr') ){
el_obj.style.setProperty('--porto-reveal-clr', $el.data('animation-reveal-clr') );
}}else{
if(delay > 1){
el_obj.style.animationDelay=delay + 'ms';
}
if(duration!=1000){
el_obj.style.animationDuration=duration + 'ms';
}}
$el.addClass($el.data('appear-animation') + ' appear-animation-visible');
return this;
}};
$.extend(theme, {
Animate: Animate
});
$.fn.themeAnimate=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this;
}else{
return new theme.Animate($this, opts);
}});
};}).apply(this, [window.theme, jQuery]);
(function(theme, $){
theme=theme||{};
var funcAnimate=function($wrap, wrapObj){
if($.fn.themeAnimate&&typeof wrapObj!='undefined'){
$(function(){
var svgAnimates=wrapObj.querySelectorAll('svg [data-appear-animation]');
if(svgAnimates.length){
$(svgAnimates).closest('svg').attr('data-appear-animation-svg', '1');
}
var $animates=wrapObj.querySelectorAll('[data-plugin-animate], [data-appear-animation], [data-appear-animation-svg]');
if($animates.length){
var animateResize=function(){
if(window.innerWidth < 768){
window.removeEventListener('resize', animateResize);
$animates.forEach(function(o){
o.classList.add('appear-animation-visible');
});
}};
if(theme.animation_support){
window.addEventListener('resize', animateResize);
theme.dynIntObsInit($animates, 'themeAnimate', theme.Animate.defaults);
}else{
$animates.forEach(function(o){
o.classList.add('appear-animation-visible');
});
}}
});
}}
funcAnimate('', document.body);
$(document.body).on('porto_after_async_init', function(e, $wrap, wrapObj){
if(theme.isAsyncInit!=-1){
funcAnimate($wrap, wrapObj);
}});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
mfpConfig: {
tClose: js_porto_vars.popup_close,
tLoading: '<div class="porto-ajax-loading"><i class="porto-loading-icon"></i></div>',
gallery: {
tPrev: js_porto_vars.popup_prev,
tNext: js_porto_vars.popup_next,
tCounter: js_porto_vars.mfp_counter
},
image: {
tError: js_porto_vars.mfp_img_error
},
ajax: {
tError: js_porto_vars.mfp_ajax_error
},
callbacks: {
open: function(){
$('body').addClass('lightbox-opened');
var fixed=this.st.fixedContentPos;
if(fixed){
$('#header.sticky-header .header-main.sticky, #header.sticky-header .main-menu-wrap, .fixed-header #header.sticky-header .header-main, .fixed-header #header.sticky-header .main-menu-wrap').css(theme.rtl_browser ? 'left':'right', theme.getScrollbarWidth());
}
var that=$(this._lastFocusedEl);
if(( that.closest('.portfolios-lightbox').hasClass('with-thumbs') )&&$(document).width() >=1024){
var portfolio_lightbox_thumbnails_base=that.closest('.portfolios-lightbox.with-thumbs').find('.porto-portfolios-lighbox-thumbnails').clone(),
magnificPopup=$.magnificPopup.instance;
$('body').prepend(portfolio_lightbox_thumbnails_base);
var $portfolios_lightbox_thumbnails=$('body > .porto-portfolios-lighbox-thumbnails'),
$portfolios_lightbox_thumbnails_carousel=$portfolios_lightbox_thumbnails.children('.owl-carousel');
$portfolios_lightbox_thumbnails_carousel.themeCarousel($portfolios_lightbox_thumbnails_carousel.data('plugin-options') );
$portfolios_lightbox_thumbnails_carousel.trigger('refresh.owl.carousel');
var $carousel_items_wrapper=$portfolios_lightbox_thumbnails_carousel.find('.owl-stage');
$carousel_items_wrapper.find('.owl-item').removeClass('current');
$carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current');
$.magnificPopup.instance.next=function(){
var magnificPopup=$.magnificPopup.instance;
$.magnificPopup.proto.next.call(this);
$carousel_items_wrapper.find('.owl-item').removeClass('current');
$carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current');
};
$.magnificPopup.instance.prev=function(){
var magnificPopup=$.magnificPopup.instance;
$.magnificPopup.proto.prev.call(this);
$carousel_items_wrapper.find('.owl-item').removeClass('current');
$carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current');
};
$carousel_items_wrapper.find('.owl-item').on('click', function(){
$carousel_items_wrapper.find('.owl-item').removeClass('current');
$.magnificPopup.instance.goTo($(this).index());
$(this).addClass('current');
});
}
},
close: function(){
$('body').removeClass('lightbox-opened');
var fixed=this.st.fixedContentPos;
if(fixed){
$('#header.sticky-header .header-main.sticky, #header.sticky-header .main-menu-wrap, .fixed-header #header.sticky-header .header-main, .fixed-header #header.sticky-header .main-menu-wrap').css(theme.rtl_browser ? 'left':'right', '');
}
$('.owl-carousel .owl-stage').each(function(){
var $this=$(this),
w=$this.width() + parseInt($this.css('padding-left') ) + parseInt($this.css('padding-right') );
$this.css({ 'width': w + 200 });
setTimeout(function(){
$this.css({ 'width': w });
}, 0);
});
var that=$(this._lastFocusedEl);
if(( that.parents('.portfolios-lightbox').hasClass('with-thumbs') )&&$(document).width() >=1024){
$(' body > .porto-portfolios-lighbox-thumbnails').remove();
}
}}
},
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
Search: {
defaults: {
popup: $('.searchform-popup'),
form: $('.searchform')
},
initialize: function($popup, $form){
this.$popup=($popup||this.defaults.popup);
this.$form=($form||this.defaults.form);
this.form_layout=this.$form.hasClass('search-layout-overlay') ? 'overlay':this.$form.hasClass('search-layout-reveal') ? 'reveal':false;
this.build()
.events();
return this;
},
build: function(){
var self=this;
var $search_form_texts=self.$form.find('.text input'),
$search_form_cats=self.$form.find('.cat');
if($('.searchform .cat').get(0)&&$.fn.selectric){
$('.searchform .cat').selectric({
arrowButtonMarkup: '',
expandToItemText: true,
maxHeight: 240
});
}
$search_form_texts.on('change', function(){
var $this=$(this),
val=$this.val();
$search_form_texts.each(function(){
if($this!=$(this) ) $(this).val(val);
});
});
$search_form_cats.on('change', function(){
var $this=$(this),
val=$this.val();
$search_form_cats.each(function(){
if($this!=$(this) ) $(this).val(val);
});
});
$(document).on('focus', '.searchform-popup .text input', function (e){
let $this=$(this);
$this.trigger('porto_sh_before_open');
if($this.closest('.searchform-popup').find('.search-list:not(.search-history-list)').length){
$this.closest('.searchform-popup').find('.search-lists').addClass('show');
}});
return this;
},
events: function(){
var self=this;
$('body').on('click', '.searchform-popup', function(e){
e.stopPropagation();
});
$('body').off('click', '.searchform-popup .search-toggle').on('click', '.searchform-popup .search-toggle', function(e){
var $this=$(this),
$form=$this.next();
$this.toggleClass('opened');
if('overlay'==self.form_layout){
$this.siblings('.search-layout-overlay').addClass('show');
$('html').addClass('porto-search-opened porto-search-overlay-wrap');
$this.closest('.vc_row.vc_row-flex>.vc_column_container>.vc_column-inner').css('z-index', '999');
}else if('reveal'==self.form_layout){
self.parents=[];
var $element=self.$popup;
while(!(( $element.hasClass('elementor-container')&&! $element.parent().hasClass('elementor-inner-container') )||($element.hasClass('e-con-inner')&&! $element.parent().hasClass('e-child') )||($element.parent().hasClass('vc_row')&&! $element.parent().hasClass('vc_inner') )||'header'==$element.parent().attr('id')||$element.parent().hasClass('header-main')||$element.parent().hasClass('header-top')||$element.parent().hasClass('header-bottom') )){
$element=$element.parent();
$element.addClass('position-static');
self.parents.push($element);
}
if('static'==$element.parent().css('position') ){
self.topParent=$element.parent();
self.topParent.addClass('position-relative');
}
$form.toggle();
window.setTimeout(function (){
$('body').addClass('porto-search-opened');
$form.find('.text>input[name="s"]').focus();
}, 100);
}else{
$form.toggle();
}
if($this.hasClass('opened') ){
$('#mini-cart.open').removeClass('open');
$this.next().find('input[type="text"]').focus();
if(self.$popup.find('.btn-close-search-form').length){
self.$popup.parent().addClass('position-static');
}}else if('reveal'==self.form_layout){
self.removeFormStyle();
}
e.preventDefault();
e.stopPropagation();
});
$('html,body').on('click', function(){
self.removeFormStyle();
$('.search-lists').removeClass('show');
});
if(!('ontouchstart' in document) ){
$(window).on('resize', function(){
self.removeFormStyle();
});
}
$('.btn-close-search-form').on('click', function(e){
e.preventDefault();
self.removeFormStyle();
});
return self;
},
removeFormStyle: function(){
this.$form.removeAttr('style');
var $searchToggle=this.$popup.find('.search-toggle');
$searchToggle.removeClass('opened');
if('overlay'==this.form_layout){
$('html').removeClass('porto-search-opened porto-search-overlay-wrap');
$searchToggle.siblings('.search-layout-overlay').removeClass('show');
$searchToggle.closest('.vc_row.vc_row-flex>.vc_column_container>.vc_column-inner').css('z-index', '');
}else if('reveal'==this.form_layout&&this.parents&&this.parents.length >=1){
$('body').removeClass('porto-search-opened');
this.parents.forEach($element=> {
$element.removeClass('position-static');
});
if(this.topParent){
this.topParent.removeClass('position-relative');
}}
if(this.$popup.find('.btn-close-search-form').length){
this.$popup.parent().removeClass('position-static');
}}
}});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__carousel';
var Carousel=function($el, opts){
return this.initialize($el, opts);
};
Carousel.defaults=$.extend({}, {
loop: true,
navText: [],
themeConfig: false,
lazyLoad: true,
lg: 0,
md: 0,
sm: 0,
xs: 0,
single: false,
rtl: theme.rtl
});
Carousel.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, true);
return this;
},
setOptions: function(opts){
if(( opts&&opts.themeConfig)||!opts){
this.options=$.extend(true, {}, Carousel.defaults, theme.owlConfig, opts, {
wrapper: this.$el,
themeConfig: true
});
}else{
this.options=$.extend(true, {}, Carousel.defaults, opts, {
wrapper: this.$el
});
}
return this;
},
calcOwlHeight: function($el){
var h=0;
$el.find('.owl-item.active').each(function(){
if(h < $(this).height())
h=$(this).height();
});
$el.children('.owl-stage-outer').height(h);
},
build: function(){
if(!$.fn.owlCarousel){
return this;
}
var $el=this.options.wrapper,
loop=this.options.loop,
lg=this.options.lg,
md=this.options.md,
sm=this.options.sm,
xs=this.options.xs,
single=this.options.single,
zoom=$el.find('.zoom').filter(function(){
if($(this).closest('.tb-image-type-slider').length){
return false;
}
return true;
}).get(0),
responsive={},
items,
count=$el.find('.owl-item').length > 0 ? $el.find('.owl-item:not(.cloned)').length:$el.find('> *').length,
fullscreen=typeof this.options.fullscreen=='undefined' ? false:this.options.fullscreen;
/*if(fullscreen){
$el.children().width(window.innerWidth - theme.getScrollbarWidth());
$el.children().height($el.closest('.fullscreen-carousel').length ? $el.closest('.fullscreen-carousel').height():window.innerHeight);
$el.children().css('max-height', '100%');
$(window).on('resize', function(){
$el.find('.owl-item').children().width(window.innerWidth - theme.getScrollbarWidth());
$el.find('.owl-item').children().height($el.closest('.fullscreen-carousel').length ? $el.closest('.fullscreen-carousel').height():window.innerHeight);
$el.find('.owl-item').children().css('max-height', '100%');
});
}*/
if(single){
items=1;
}else if(typeof this.options.responsive!='undefined'){
for(var w in this.options.responsive){
var number_items=Number(this.options.responsive[w]);
responsive[Number(w)]={ items: number_items, loop:(loop&&count >=number_items) ? true:false };}}else{
items=this.options.items ? this.options.items:(lg ? lg:1);
var isResponsive=(this.options.xxl||this.options.xl||lg||md||sm||xs);
if(isResponsive){
if(this.options.xxl){
responsive[theme.screen_xxl]={ items: this.options.xxl, loop:(loop&&count > this.options.xxl) ? true:false, mergeFit: this.options.mergeFit };}else if(lg&&items > lg + 1){
responsive[theme.screen_xxl]={ items: items, loop:(loop&&count > items) ? true:false, mergeFit: this.options.mergeFit };
responsive[theme.screen_xl]={ items: lg + 1, loop:(loop&&count > lg + 1) ? true:false, mergeFit: this.options.mergeFit };}
if(this.options.xl){
responsive[theme.screen_xl]={ items: this.options.xl, loop:(loop&&count > this.options.xl) ? true:false, mergeFit: this.options.mergeFit };}else if(typeof responsive[theme.screen_xl]=='undefined'&&(! lg||items!=lg) ){
responsive[theme.screen_xl]={ items: items, loop:(loop&&count >=items) ? true:false, mergeFit: this.options.mergeFit };}
if(lg) responsive[992]={ items: lg, loop:(loop&&count >=lg) ? true:false, mergeFit: this.options.mergeFit_lg };
if(md) responsive[768]={ items: md, loop:(loop&&count > md) ? true:false, mergeFit: this.options.mergeFit_md };
if(sm){
responsive[576]={ items: sm, loop:(loop&&count > sm) ? true:false, mergeFit: this.options.mergeFit_sm };}else{
if(xs&&xs > 1){
responsive[576]={ items: xs, loop:(loop&&count > xs) ? true:false, mergeFit: this.options.mergeFit_sm };}else{
responsive[576]={ items: 1, mergeFit: false };}}
if(xs){
responsive[0]={ items: xs, loop:(loop&&count > xs) ? true:false, mergeFit: this.options.mergeFit_xs };}else{
responsive[0]={ items: 1 };}}
}
if(!$el.hasClass('show-nav-title')&&this.options.themeConfig&&theme.slider_nav&&theme.slider_nav_hover){
$el.addClass('show-nav-hover');
}
this.options=$.extend(true, {}, this.options, {
items: items,
loop:(loop&&count > items) ? true:false,
responsive: responsive,
onInitialized: function(){
if($el.hasClass('stage-margin') ){
$el.find('.owl-stage-outer').css({
'margin-left': this.options.stagePadding,
'margin-right': this.options.stagePadding
});
}
var heading_cls='.porto-u-heading, .vc_custom_heading, .slider-title, .elementor-widget-heading, .porto-heading';
if($el.hasClass('show-dots-title')&&($el.prev(heading_cls).length||$el.closest('.slider-wrapper').prev(heading_cls).length||$el.closest('.porto-recent-posts').prev(heading_cls).length||$el.closest('.elementor-widget-porto_recent_posts, .elementor-section').prev(heading_cls).length) ){
var $obj=$el.prev(heading_cls);
if(!$obj.length){
$obj=$el.closest('.slider-wrapper').prev(heading_cls);
}
if(!$obj.length){
$obj=$el.closest('.porto-recent-posts').prev(heading_cls);
}
if(!$obj.length){
$obj=$el.closest('.elementor-widget-porto_recent_posts, .elementor-section').prev(heading_cls);
}
try {
var innerWidth=$obj.addClass('w-auto').css('display', 'inline-block').width();
$obj.removeClass('w-auto').css('display', '');
if(innerWidth + 15 + $el.find('.owl-dots').width() <=$obj.width()){
$el.find('.owl-dots').css(( $('body').hasClass('rtl') ? 'right':'left'), innerWidth + 15 +($el.width() - $obj.width()) / 2);
$el.find('.owl-dots').css('top', -1 * $obj.height() / 2 - parseInt($obj.css('margin-bottom') ) - $el.find('.owl-dots').height() / 2 + 2);
}else{
$el.find('.owl-dots').css('position', 'static');
}} catch(e){ }}
}});
if(this.options.autoHeight){
var thisobj=this;
$(window).on('resize', function(){
thisobj.calcOwlHeight($el);
});
if(theme.isLoaded){
setTimeout(function(){
thisobj.calcOwlHeight($el);
}, 100);
}else{
$(window).on('load', function(){
thisobj.calcOwlHeight($el);
});
}}
var links=false;
if(zoom){
links=[];
var i=0;
$el.find('.zoom').each(function(){
var slide={},
$zoom=$(this);
slide.src=$zoom.data('src') ? $zoom.data('src'):$zoom.data('mfp-src');
slide.title=$zoom.data('title');
links[i]=slide;
$zoom.data('index', i);
i++;
});
}
if($el.hasClass('show-nav-title') ){
this.options.stagePadding=0;
}else{
if(this.options.themeConfig&&theme.slider_nav&&theme.slider_nav_hover)
$el.addClass('show-nav-hover');
if(this.options.themeConfig&&!theme.slider_nav_hover&&theme.slider_margin)
$el.addClass('stage-margin');
}
if($el.hasClass('has-ccols-spacing') ){
$el.removeClass('has-ccols-spacing');
}
$el.owlCarousel(this.options);
if(zoom&&links){
$el.on('click', '.zoom', function(e){
e.preventDefault();
if($.fn.magnificPopup){
var image_index=$(this).data('index');
if(typeof image_index=='undefined'){
image_index=($(this).closest('.owl-item').index() - $el.find('.cloned').length / 2) % $el.data('owl.carousel').items().length;
}
$.magnificPopup.close();
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, {
items: links,
gallery: {
enabled: true
},
type: 'image'
}), image_index);
}
return false;
});
}
return this;
}}
$.extend(theme, {
Carousel: Carousel
});
$.fn.themeCarousel=function(opts, zoom){
if(typeof $.fn.owlCarousel!='function'){
return this;
}
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this;
}else{
return new theme.Carousel($this, opts, zoom);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__lightbox';
var Lightbox=function($el, opts){
return this.initialize($el, opts);
};
Lightbox.defaults={
callbacks: {
open: function(){
$('body').addClass('lightbox-opened');
},
close: function(){
$('body').removeClass('lightbox-opened');
}}
};
Lightbox.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Lightbox.defaults, theme.mfpConfig, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
if(!$.fn.magnificPopup){
return this;
}
this.options.wrapper.magnificPopup(this.options);
return this;
}};
$.extend(theme, {
Lightbox: Lightbox
});
$.fn.themeLightbox=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.Lightbox($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
PostFilter: {
cache: {
},
defaults: {
elements: '.portfolio-filter'
},
initialize: function($elements, post_type){
this.$elements=($elements||$(this.defaults.elements) );
this.build(post_type);
return this;
},
filterFn: function(e){
if(typeof e=='undefined'||typeof e.data=='undefined'||typeof e.data.elements=='undefined'||!e.data.elements||!e.data.elements.length){
return;
}
var self=e.data.selfobj;
if(self.isLoading){
return false;
}
var $this=e.data.thisobj,
$elements=e.data.elements,
position=e.data.position,
post_type=e.data.post_type,
$parent=e.data.parent,
$posts_wrap=e.data.posts_wrap,
use_ajax=e.data.use_ajax,
page_path=e.data.page_path,
infinite_load=e.data.infinite_load,
load_more=e.data.load_more;
e.preventDefault();
if($(this).hasClass('active') ){
return;
}
self.isLoading=true;
var selector=$(this).attr('data-filter');
if('sidebar'==position){
$('.sidebar-overlay').trigger('click');
}
$this.find('.active').removeClass('active');
if(use_ajax){
var current_cat='*'==selector ? '':selector;
if(!page_path){
page_path=$posts_wrap.data('page_path');
}
if(page_path){
$posts_wrap.data('page_path', page_path.replace(/&category=[^&]*&/, '&category=' + current_cat + '&') );
}
$(this).addClass('active');
self.load_posts(current_cat, infinite_load||load_more ? true:false, $parent, post_type, $posts_wrap, undefined, $(this).children('a').attr('href') );
}else if('faq'==post_type){
$parent.find('.faq').each(function(){
var $that=$(this), easing="easeInOutQuart", timeout=300;
if(selector=='*'){
if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){
$(this).attr('style', '').show();
});
selected++;
}else{
if($that.hasClass(selector) ){
if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){
$(this).attr('style', '').show();
});
selected++;
}else{
if($that.css('display')!='none') $that.stop(true).slideUp(timeout, easing, function(){
$(this).attr('style', '').hide();
});
}}
});
if(!selected&&$parent.find('.faqs-infinite').length&&typeof($.fn.infinitescroll)!='undefined'){
$parent.find('.faqs-infinite').infinitescroll('retrieve');
}}else if($parent.hasClass('portfolios-timeline') ){
var selected=0;
$parent.find('.portfolio').each(function(){
var $that=$(this), easing="easeInOutQuart", timeout=300;
if(selector=='*'){
if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){
$(this).attr('style', '').show();
});
selected++;
}else{
if($that.hasClass(selector) ){
if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){
$(this).attr('style', '').show();
});
selected++;
}else{
if($that.css('display')!='none') $that.stop(true).slideUp(timeout, easing, function(){
$(this).attr('style', '').hide();
});
}}
});
if(!selected&&$parent.find('.portfolios-infinite').length&&typeof($.fn.infinitescroll)!='undefined'){
$parent.find('.portfolios-infinite').infinitescroll('retrieve');
}
setTimeout(function(){
theme.FilterZoom.initialize($parent);
}, 400);
}else{
$parent.find('.' + post_type + '-row').isotope({
filter: selector=='*' ? selector:'.' + selector
});
}
if(!use_ajax){
$(this).addClass('active');
self.isLoading=false;
}
if(position=='sidebar'){
self.$elements.each(function(){
var $that=$(this);
if($that==$this&&$that.data('position')!='sidebar') return;
$that.find('li').removeClass('active');
$that.find('li[data-filter="' + selector + '"]').addClass('active');
});
}
if(!use_ajax){
window.location.hash='#' + selector;
}
theme.refreshVCContent();
return false;
},
build: function(post_type_param){
var self=this;
self.$elements.each(function(){
var $this=$(this),
position=$this.data('position'),
$parent,
post_type;
if(typeof post_type_param=='undefined'){
if($this.hasClass('member-filter') ){
post_type='member';
}else if($this.hasClass('faq-filter') ){
post_type='faq';
}else if($this.hasClass('product-filter') ){
post_type='product';
}else if($this.hasClass('post-filter') ){
post_type='post';
}else if($this.hasClass('portfolio-filter') ){
post_type='portfolio';
}else{
post_type=$this.attr('data-filter-type');
}}else{
post_type=post_type_param;
}
if('sidebar'==position){
$parent=$('.main-content .page-' + post_type + 's');
}else if('global'==position){
$parent=$('.main-content .page-' + post_type + 's');
}else{
$parent=$this.closest('.page-' + post_type + 's');
}
if(!$parent.length){
$parent=$this.closest('.porto-posts-grid');
}
if(!$parent||!$parent.length){
return;
}
var use_ajax=$this.hasClass('porto-ajax-filter'),
infinite_load=$parent.hasClass('load-infinite'),
load_more=$parent.hasClass('load-more');
var $posts_wrap=$parent.find('.' + post_type + 's-container'),
page_path;
if(use_ajax&&(( !infinite_load&&!load_more)||!$parent.data('ajax_load_options') )){
var current_url=window.location.href;
if(-1!==current_url.indexOf('#') ){
current_url=current_url.split('#')[0];
}
page_path=theme.ajax_url +(-1===theme.ajax_url.indexOf('?') ? '?':'&')  + 'action=porto_ajax_posts&nonce=' + js_porto_vars.porto_nonce + '&post_type=' + post_type + '&current_link=' + current_url + '&category=&page=%cur_page%';
if($parent.data('post_layout') ){
page_path +='&post_layout=' + $parent.data('post_layout');
}
$posts_wrap.data('page_path', page_path);
}
$this.find('li').on('click', { thisobj: $this, selfobj: self, elements: self.$elements, position: position, parent: $parent, post_type: post_type, posts_wrap: $posts_wrap, use_ajax: use_ajax, page_path: page_path, infinite_load: infinite_load, load_more: load_more }, self.filterFn);
});
$(window).on('hashchange', { elements: self.$elements }, self.hashchange);
self.hashchange({ data: { elements: self.$elements }});
return self;
},
hashchange: function(e){
if(typeof e=='undefined'||typeof e.data=='undefined'||typeof e.data.elements=='undefined'||!e.data.elements||!e.data.elements.length){
return;
}
var $elements=e.data.elements,
$filter=$($elements.get(0) ),
hash=window.location.hash;
if(hash){
var $o=$filter.find('li[data-filter="' + hash.replace('#', '') + '"]');
if(!$o.hasClass('active') ){
$o.trigger('click');
}}
},
set_elements: function($elements){
var self=this;
if(typeof $elements=='undefined'||!$elements||!$elements.length){
self.destroy(self.$elements);
return;
}
self.$elements=$elements;
$(window).off('hashchange', self.hashchange).on('hashchange', { elements: $elements }, self.hashchange);
},
destroy: function($elements){
if(typeof $elements=='undefined'||!$elements||!$elements.length){
return;
}
var self=this;
$elements.find('li').off('click', self.filterFn);
$(window).off('hashchange', self.hashchange);
},
load_posts: function(cat, is_infinite, $parent, post_type, $posts_wrap, default_args, page_url){
var _gridcookie='';
if($parent.hasClass('archive-products') ){
_gridcookie=new URLSearchParams(location.search.substring(1) ).get('gridcookie');
if(!(_gridcookie==null||_gridcookie==''||_gridcookie=='grid') ){
page_url=theme.addUrlParam(page_url, 'gridcookie', _gridcookie);
}}
var pid=$parent.attr('id'),
self=this,
is_archive=$parent.hasClass('archive-posts'),
successfn=function(res, directcall){
if(!res){
return;
}
if(( typeof directcall=='undefined'||true!==directcall)&&typeof default_args=='undefined'&&pid){
if(!self.cache[pid]){
self.cache[pid]={};}
self.cache[pid][cat + _gridcookie]=res;
}
var $res=$(res),
is_shop=$parent.hasClass('archive-products'),
$posts=$res.find(is_archive ? '.archive-posts .posts-wrap':'.posts-wrap').children();
if(!$posts.length){
return;
}
if(typeof $posts_wrap=='undefined'||is_archive){
$posts_wrap=$parent.find('.' + post_type + 's-container');
}
if(!$posts_wrap.length){
return;
}
if($posts_wrap.data('isotope') ){
$posts_wrap.isotope('remove', $posts_wrap.children());
}else{
$posts_wrap.children().remove();
}
if($posts_wrap.hasClass('owl-loaded') ){
$posts_wrap.removeClass('owl-loaded');
}
$posts.children().addClass('fadeInUp animated');
$posts_wrap.append($posts);
theme.refreshVCContent($posts);
var $old_filter=$parent.find('.' + post_type + '-filter');
if($old_filter.length&&!$old_filter.hasClass('porto-ajax-filter')&&!$parent.hasClass('load-infinite')&&!$parent.hasClass('load-more') ){
var $new_filter=$res.find(( is_archive ? '.archive-posts ':'') + '.' + post_type + '-filter');
if($new_filter.length){
$old_filter.find('li:first-child').trigger('click');
theme.PostFilter.destroy($old_filter);
$old_filter.replaceWith($new_filter);
theme.PostFilter.initialize($new_filter, post_type);
theme.PostFilter.set_elements($('ul[data-filter-type], ul.portfolio-filter, ul.member-filter, ul.faq-filter, .porto-ajax-filter.product-filter, .porto-ajax-filter.post-filter') );
}}
porto_init($parent);
var behavior_action='';
if(post_type!='product'&&post_type!='member'&&post_type!='faq'&&post_type!='portfolio'&&post_type!='post'){
behavior_action='ptu';
}else{
behavior_action=post_type;
}
theme.PostsInfinite[behavior_action + 'Behavior']($posts, $posts_wrap);
$(document.body).trigger('porto_init_countdown', [$posts_wrap]);
var $old_pagination=$parent.find('.pagination-wrap'),
$new_pagination=$res.find(( is_archive ? '.archive-posts ':'') + '.pagination-wrap').eq(0),
has_pagination=false,
nst_pagination=false;
if($old_pagination.length){
if($new_pagination.length){
$old_pagination.replaceWith($new_pagination);
has_pagination=true;
nst_pagination=true;
}else{
$old_pagination.children().remove();
}}else if($new_pagination.length){
$parent.append($new_pagination);
has_pagination=true;
nst_pagination=true;
}
if(is_shop){
let _paginationWrap=$('.woocommerce-pagination');
var $old_pagination=_paginationWrap.find('ul.page-numbers'),
$new_pagination=$res.find('.woocommerce-pagination ul.page-numbers').eq(0),
has_pagination=false;
if($old_pagination.length){
if($new_pagination.length){
$old_pagination.replaceWith($new_pagination);
has_pagination=true;
}else{
$old_pagination.children().remove();
}}else if($new_pagination.length){
_paginationWrap.append($new_pagination);
has_pagination=true;
}}
if(is_infinite){
var infinitescroll_ins=$posts_wrap.data('infinitescroll');
if(has_pagination||(is_shop&&nst_pagination) ){
var $new_posts_wrap=$res.find(is_archive ? '.archive-posts .posts-wrap':'.posts-wrap');
if($new_posts_wrap.data('cur_page') ){
$posts_wrap.data('cur_page', $new_posts_wrap.data('cur_page') );
$posts_wrap.data('max_page', $new_posts_wrap.data('max_page') );
}
var should_init_again=true;
if(infinitescroll_ins){
if(infinitescroll_ins.options.state.isDestroyed){
$posts_wrap.removeData('infinitescroll');
}else{
should_init_again=false;
if($new_posts_wrap.data('cur_page') ){
infinitescroll_ins.update({
maxPage: $new_posts_wrap.data('max_page'),
state: {
currPage: $new_posts_wrap.data('cur_page')
}});
}
if(infinitescroll_ins.options.state.isPaused){
infinitescroll_ins.resume();
}}
}
if(should_init_again){
var ins=$posts_wrap.data('__postsinfinite');
if(ins){
ins.destroy();
}
var selector_product='.' + post_type + ', .timeline-date';
if(is_shop){
selector_product='.archive-products .product';
if($('.elementor-widget-wc-archive-products').length){
selector_product='.elementor-widget-wc-archive-products .product';
}}
new theme.PostsInfinite($posts_wrap, selector_product, $posts_wrap.data('infiniteoptions'), post_type);
}
if(is_archive){
var page_path=$posts_wrap.siblings('.pagination-wrap').find('.next').attr('href');
if(page_path){
page_path +=(-1!==page_path.indexOf('?') ? '&':'?') + 'portoajax=1&load_posts_only=2';
page_path=page_path.replace(/(paged=)(\d+)|(page\/)(\d+)/, '$1$3%cur_page%');
$posts_wrap.data('page_path', page_path);
}}
var selector_product='.' + post_type + ', .timeline-date';
if(is_shop){
selector_product='.archive-products .product';
if($('.elementor-widget-wc-archive-products').length){
selector_product='.elementor-widget-wc-archive-products .product';
}}
new theme.PostsInfinite($posts_wrap, selector_product, $posts_wrap.data('infiniteoptions'), post_type);
}}
if(is_archive){
$('.sidebar-content').each(function(index){
var $this=$(this),
$that=$($res.find('.sidebar-content').get(index) );
$this.html($that.html());
if(is_shop){
if(typeof updateSelect2!='undefined'&&updateSelect2){
if(jQuery().selectWoo){
var porto_wc_layered_nav_select=function(){
$this.find('select.woocommerce-widget-layered-nav-dropdown').each(function(){
$(this).selectWoo({
placeholder: $(this).find('option').eq(0).text(),
minimumResultsForSearch: 5,
width: '100%',
allowClear: typeof $(this).attr('multiple')!='undefined'&&$(this).attr('multiple')=='multiple' ? 'false':'true'
});
});
};
porto_wc_layered_nav_select();
}
$('body').children('span.select2-container').remove();
}}
});
if(is_shop){
var $script=$res.filter('script:contains("var woocommerce_price_slider_params")').first();
if($script&&$script.length&&$script.text().indexOf('{')!==-1&&$script.text().indexOf('}')!==-1){
var arrStr=$script.text().substring($script.text().indexOf('{'), $script.text().indexOf('}') + 1);
window.woocommerce_price_slider_params=JSON.parse(arrStr);
}
var $title=$('.entry-title');
if($title.length){
var $newTitle=$res.find('.entry-title').eq(0);
if($newTitle.length){
$title.html($newTitle.html());
}}
var $desc=$('.entry-description');
if($desc.length){
var $newDesc=$res.find('.entry-description').eq(0);
if($newDesc.length){
$desc.html($newDesc.html());
}}
var shop_before='.shop-loop-before',
$shop_before=$(shop_before);
if($shop_before.length){
if($res.find(shop_before).length){
$shop_before.each(function(index){
var $res_shop_before=$res.find(shop_before).eq(index);
if($res_shop_before.length){
$(this).html($res_shop_before.html()).show();
}});
}else{
$shop_before.empty();
}}
var $count=$('.woocommerce-result-count');
if($count.length){
var $newCount=$res.find('.woocommerce-result-count').eq(0);
if($newCount.length){
$count[0].outerHTML=$newCount.length ? $newCount[0].outerHTML:'';
}}
$(document).trigger('yith_wcan_init_shortcodes');
$(document).trigger('yith-wcan-ajax-filtered');
}
if(page_url&&!navigator.userAgent.match(/msie/i) ){
window.history.pushState({ 'pageTitle':(res&&res.pageTitle)||'' }, '', page_url);
}}
$(document.body).trigger('porto_load_posts_end', [$parent.parent()]);
};
if(typeof default_args=='undefined'&&typeof self.cache[pid]!='undefined'&&typeof self.cache[pid][cat+ _gridcookie]!='undefined'&&self.cache[pid][cat+ _gridcookie]){
successfn(self.cache[pid][cat+ _gridcookie], true);
self.isLoading=false;
$parent.removeClass('porto-ajax-loading').removeClass('loading').find('.porto-loading-icon').remove();
return;
}
var ajax_load_options=$parent.data('ajax_load_options');
if(( $parent.hasClass('archive-products')&&-1!=js_porto_vars.use_skeleton_screen.indexOf('shop') ) ||
(is_archive&&-1!=js_porto_vars.use_skeleton_screen.indexOf('blog') )){
$posts_wrap=$parent.find('.' + post_type + 's-container');
if(ajax_load_options){
var tag_name='div';
if('product'==post_type&&'ul'==$posts_wrap.get(0).tagName.toLowerCase()){
tag_name='li';
}
$posts_wrap.addClass('skeleton-body').empty();
for(var i=0; i < Number(ajax_load_options.count||(ajax_load_options.columns&&ajax_load_options.columns * 3)||12); i++){
$posts_wrap.append('<' + tag_name + ' class="porto-tb-item post ' + post_type +('product'==post_type ? ' product-col':'') + '"></' + tag_name + '>');
}}else{
$posts_wrap.addClass('skeleton-body').children().empty();
}}else{
if(!$parent.children('.porto-loading-icon').length){
$parent.append('<i class="porto-loading-icon"></i>');
}
$parent.addClass('porto-ajax-loading');
}
var current_url=window.location.href;
if(-1!==current_url.indexOf('#') ){
current_url=current_url.split('#')[0];
}
var args, load_url=theme.ajax_url;
if($parent.hasClass('archive-posts') ){
args={
portoajax: true,
load_posts_only: true
};
if($parent.closest('.porto-block').length){
args['builder_id']=$parent.closest('.porto-block').data('id');
}
load_url=typeof page_url!='undefined' ? page_url:current_url;
}else{
args={
action: 'porto_ajax_posts',
nonce: js_porto_vars.porto_nonce,
post_type: post_type,
current_link: current_url
};
if($parent.data('post_layout') ){
args['post_layout']=$parent.data('post_layout');
}
if(ajax_load_options){
args['extra']=ajax_load_options;
}
if(typeof default_args!='undefined'){
args=$.extend(args, default_args);
}}
if(cat){
args['category']=cat;
}
$.ajax({
url: load_url,
type: 'post',
data: args,
success: successfn,
complete: function(){
self.isLoading=false;
$posts_wrap.removeClass('skeleton-body');
$parent.removeClass('porto-ajax-loading').removeClass('loading').find('.porto-loading-icon').remove();
}});
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
FilterZoom: {
defaults: {
elements: null
},
initialize: function($elements){
this.$elements=($elements||this.defaults.elements);
this.build();
return this;
},
build: function(){
var self=this;
self.$elements.each(function(){
var $this=$(this),
zoom=$this.find('.zoom, .thumb-info-zoom').get(0);
if(!zoom) return;
$this.find('.zoom, .thumb-info-zoom').off('click');
var links=[];
var i=0;
$this.find('article').each(function(){
var $that=$(this);
if($that.css('display')!='none'){
var $zoom=$that.find('.zoom, .thumb-info-zoom'),
slide,
src=$zoom.data('src'),
title=$zoom.data('title');
$zoom.data('index', i);
if(Array.isArray(src) ){
$.each(src, function(index, value){
slide={};
slide.src=value;
slide.title=title[index];
links[i]=slide;
i++;
});
}else{
slide={};
slide.src=src;
slide.title=title;
links[i]=slide;
i++;
}}
});
$this.find('article').each(function(){
var $that=$(this);
if($that.css('display')!='none'){
$that.off('click', '.zoom, .thumb-info-zoom').on('click', '.zoom, .thumb-info-zoom', function(e){
var $zoom=$(this), $parent=$zoom.parents('.thumb-info'), offset=0;
if($parent.get(0) ){
var $slider=$parent.find('.porto-carousel');
if($slider.get(0) ){
offset=$slider.data('owl.carousel').current() - $slider.find('.cloned').length / 2;
}}
e.preventDefault();
if($.fn.magnificPopup){
$.magnificPopup.close();
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, {
items: links,
gallery: {
enabled: true
},
type: 'image'
}), $zoom.data('index') + offset);
}
return false;
});
}});
});
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
theme.initAsync=function($wrap, wrapObj){
if($.fn.themeCarousel){
$(function(){
var portoImgNavMiddle=function($el){
var $images=$el.find('.owl-item img'),
height=0;
for(var i=0; i < $images.length; i++){
var imgHeight=$images.eq(i).height();
if(height < imgHeight){
height=imgHeight;
}}
if($el.hasClass('products-slider') ){
$el.children('.owl-nav').css('top',(5 + height / 2) + 'px');
}else{
$el.children('.owl-nav').css('top', height / 2 + 'px');
}};
var portoCarouselInit=function(e){
var $this=$(e.currentTarget);
$this.find('[data-appear-animation]:not(.appear-animation)').addClass('appear-animation');
if($this.find('.owl-item.cloned').length){
var $not_loaded=$this.find('img.lazy:not(.loaded)');
if($not_loaded.length){
if(typeof window.w3tc_lazyload=='object'){
window.w3tc_lazyload.update();
}else if(theme.w3tcLazyLoadInstance){
theme.w3tcLazyLoadInstance.update();
}}
if($.fn.themePluginLazyLoad){
$this.find('.porto-lazyload:not(.lazy-load-loaded)').themePluginLazyLoad({ effect: 'fadeIn', effect_speed: 400 });
}
var $animates=e.currentTarget.querySelectorAll('.appear-animation');
if($animates.length){
if(theme.animation_support){
}else{
$animates.forEach(function(o){
o.classList.add('appear-animation-visible');
});
}}
if($.fn.themePluginAnimatedLetters&&($(this).find('.owl-item.cloned [data-plugin-animated-letters]:not(.manual)').length) ){
theme.dynIntObsInit($(this).find('.owl-item.cloned [data-plugin-animated-letters]:not(.manual)'), 'themePluginAnimatedLetters');
}}
setTimeout(function(){
var $hiddenItems=$this.find('.owl-item:not(.active)');
if(theme.animation_support){
$hiddenItems.find('.appear-animation').removeClass('appear-animation-visible');
$hiddenItems.find('.appear-animation').each(function(){
var $el=$(this),
delay=Math.abs($el.data('appear-animation-delay') ? $el.data('appear-animation-delay'):0);
if(delay > 1){
this.style.animationDelay=delay + 'ms';
}
var duration=Math.abs($el.data('appear-animation-duration') ? $el.data('appear-animation-duration'):1000);
if(1000!=duration){
this.style.animationDuration=duration + 'ms';
}});
}
if(window.innerWidth >=1200){
$hiddenItems.find('[data-vce-animate]').removeAttr('data-vcv-o-animated');
}
if($this.hasClass('nav-center-images-only') ){
portoImgNavMiddle($this);
}}, 300);
};
var portoCarouselTranslated=function(e){
var $this=$(e.currentTarget);
var $active=$this.find('.owl-item.active');
if($active.hasClass('translating') ){
$active.removeClass('translating');
return;
}
$this.find('.owl-item.translating').removeClass('translating');
$this.find('[data-plugin-animated-letters]').removeClass('invisible');
$this.find('.owl-item.active [data-plugin-animated-letters]').trigger('animated.letters.initialize');
if(window.innerWidth > 767){
$this.find('.appear-animation').removeClass('appear-animation-visible');
$active.find('.appear-animation').each(function(){
var $animation_item=$(this),
anim_name=$animation_item.data('appear-animation');
$animation_item.addClass(anim_name + ' appear-animation-visible');
});
}
if(window.innerWidth > 991){
if($this.closest('[data-plugin-sticky]').length){
theme.refreshStickySidebar(false, $this.closest('[data-plugin-sticky]') );
}}
$active.find('.slide-animate').each(function(){
var $animation_item=$(this),
settings=$animation_item.data('settings');
if(settings&&(settings._animation||settings.animation) ){
var animation=settings._animation||settings.animation,
delay=settings._animation_delay||settings.animation_delay||0;
theme.requestTimeout(function(){
$animation_item.removeClass('elementor-invisible').addClass('animated ' + animation);
}, delay);
}});
if(window.innerWidth >=1200){
$this.find('[data-vce-animate]').removeAttr('data-vcv-o-animated').removeAttr('data-vcv-o-animated-fully');
$active.find('[data-vce-animate]').each(function(){
var $animation_item=$(this);
if($animation_item.data('porto-origin-anim') ){
var anim_name=$animation_item.data('porto-origin-anim');
$animation_item.attr('data-vce-animate', anim_name).attr('data-vcv-o-animated', true);
var duration=parseFloat(window.getComputedStyle(this)['animationDuration']) * 1000,
delay=parseFloat(window.getComputedStyle(this)['animationDelay']) * 1000;
window.setTimeout(function(){
$animation_item.attr('data-vcv-o-animated-fully', true);
}, delay + duration + 5);
}});
}};
var portoCarouselTranslateVC=function(e){
var $this=$(e.currentTarget);
$this.find('.owl-item.active').addClass('translating');
if(window.innerWidth >=1200){
$this.find('[data-vce-animate]').each(function(){
var $animation_item=$(this);
$animation_item.data('porto-origin-anim', $animation_item.data('vce-animate') ).attr('data-vce-animate', '');
});
}};
var portoCarouselTranslateElementor=function(e){
var $this=$(e.currentTarget);
$this.find('.owl-item.active').addClass('translating');
$this.find('.owl-item:not(.active) .slide-animate').addClass('elementor-invisible');
$this.find('.slide-animate').each(function(){
var $animation_item=$(this),
settings=$animation_item.data('settings');
if(settings._animation||settings.animation){
$animation_item.removeClass(settings._animation||settings.animation);
}});
};
var portoCarouselTranslateWPB=function(e){
if(window.innerWidth > 767){
var $this=$(e.currentTarget);
$this.find('.owl-item.active').addClass('translating');
$this.find('.appear-animation').each(function(){
var $animation_item=$(this);
$animation_item.removeClass($animation_item.data('appear-animation') );
});
}};
var carouselItems=$wrap.find('.owl-carousel:not(.manual)');
carouselItems.on('initialized.owl.carousel refreshed.owl.carousel', portoCarouselInit).on('translated.owl.carousel', portoCarouselTranslated);
carouselItems.on('translate.owl.carousel', function(){
$(this).find('[data-plugin-animated-letters]').addClass('invisible');
$(this).find('[data-plugin-animated-letters]').trigger('animated.letters.destroy');
});
carouselItems.on('resized.owl.carousel', function (){
var $this=$(this);
if($this.hasClass('nav-center-images-only') ){
portoImgNavMiddle($this);
}})
carouselItems.filter(function(){
if($(this).find('[data-vce-animate]').length){
return true;
}
return false;
}).on('translate.owl.carousel', portoCarouselTranslateVC);
carouselItems.filter(function(){
var $anim_obj=$(this).find('.elementor-invisible');
if($anim_obj.length){
$anim_obj.addClass('slide-animate');
return true;
}
return false;
}).on('translate.owl.carousel', portoCarouselTranslateElementor);
carouselItems.filter(function(){
if($(this).find('.appear-animation, [data-appear-animation]').length){
return true;
}
return false;
}).on('translate.owl.carousel', portoCarouselTranslateWPB);
$wrap.find('[data-plugin-carousel]:not(.manual), .porto-carousel:not(.manual)').each(function(){
var $this=$(this),
opts;
if($this.closest('.tab-pane').length&&! $this.closest('.tab-pane').hasClass('active') ){
return;
}
if($this.closest('.e-n-tabs-content > .e-con').length&&! $this.closest('.e-n-tabs-content > .e-con').hasClass('e-active') ){
return;
}
if($this.closest('.sidebar-menu:not(.side-menu-accordion) .menu-block').length){
return;
}
if($this.closest('.mega-menu .menu-block').length){
return;
}
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
setTimeout(function(){
$this.themeCarousel(opts);
}, 0);
});
});
}
$wrap.find('.video-fixed').each(function(){
var $this=$(this),
$video=$this.find('video, iframe');
if($video.length){
window.addEventListener('scroll', function(){
var offset=$(window).scrollTop() - $this.position().top + theme.adminBarHeight();
$video.css("cssText", "top: " + offset + "px !important;");
}, { passive: true });
}});
setTimeout(function(){
if(typeof theme.Search!=='undefined'){
theme.Search.initialize();
}}, 0);
if(typeof theme.isAsyncInit=='undefined'){
theme.isAsyncInit=-1;
}
$(document.body).trigger('porto_after_async_init', [ $wrap, wrapObj ]);
theme.isAsyncInit=1;
};
$(document.body).trigger('porto_async_init');
}).apply(this, [window.theme, jQuery]);
jQuery(document).ready(function($){
'use strict';
function porto_modal_open($this){
var trigger=$this.data('trigger-id'),
overlayClass=$this.data('overlay-class'),
disableOverlay=$this.data('disable-overlay'),
extraClass=$this.data('extra-class') ? $this.data('extra-class'):'',
type=$this.data('type'),
buttonPopup=false,
isExist=0;
if(typeof trigger!='undefined'){
if(typeof type=='undefined'){
type='inline';
}
if(type=='inline'){
trigger='#' + escape(trigger);
}
if(typeof $.magnificPopup.instance!='undefined'&&$.magnificPopup.instance.isOpen){
isExist=350;
$.magnificPopup.close();
}
try {
if(document.querySelector(trigger) ){
if('script'==document.querySelector(trigger).nodeName.toLowerCase()){
trigger=$(trigger).html();
disableOverlay=$(trigger).data('disable-overlay');
overlayClass=$(trigger).data('overlay-class');
extraClass='button-popup ';
buttonPopup=true;
}}
} catch(e){
}
var args={
items: {
src: trigger
},
type: type,
mainClass: extraClass +(disableOverlay ? ' popup-builder-disable-overlay ':''),
prependTo: $('.page-wrapper')
};
if(trigger=='#popup-builder'){
args['fixedContentPos']=true;
}
var $popupModal=$this;
if(buttonPopup){
args['fixedContentPos']=true;
if(disableOverlay){
args['closeOnBgClick']=false;
args['fixedContentPos']=false;
args['focus']='.bb-none';
}
args['callbacks']={
'open': function (){
if(disableOverlay){
$('.button-popup.mfp-bg').remove();
}
var $popup_builder=$('.button-popup.mfp-wrap');
if(typeof theme.porto_init_builder_tooltip=='function'){
theme.porto_init_builder_tooltip($popup_builder.get(0));
}
porto_init($popup_builder);
if($popup_builder.find('.wpcf7').length){
var $wpcf7=$popup_builder.find('.wpcf7 .wpcf7-form');
if(typeof wpcf7=='object'){
if(typeof wpcf7.initForm=='function'){
wpcf7.initForm($wpcf7);
}else if(typeof wpcf7.init=='function'){
wpcf7.init($wpcf7.get(0) );
$wpcf7.get(0).classList.replace("no-js", "js");
}}
}
if($popup_builder.find('.wpforms-container').length){
if(typeof wpforms=='object'&&typeof wpforms.init=='function'){
wpforms.init();
}}
}};}
if($this.hasClass('porto-onload')||$this.hasClass('porto-exit-intent') ){
if(disableOverlay){
args['closeOnBgClick']=false;
args['fixedContentPos']=false;
args['focus']='.bb-none';
}
args['callbacks']={
'beforeClose': function(){
if($('.mfp-wrap .porto-disable-modal-onload').length&&($('.mfp-wrap .porto-disable-modal-onload').is(':checked')||$('.mfp-wrap .porto-disable-modal-onload input[type="checkbox"]').is(':checked') )){
$.cookie('porto_modal_disable_onload', 'true', { expires: 7 });
}else if('undefined'!==typeof $popupModal.data('expired')&&'undefined'!==typeof $popupModal.data('popup-id') ){
$.cookie('porto_modal_disable_period_onload_' + $popupModal.data('popup-id'), $popupModal.data('expired'), { expires: $popupModal.data('expired') });
}},
'afterClose': function(){
if($('#header .minicart-opened').length){
$('html').css(theme.rtl_browser ? 'margin-left':'margin-right', theme.getScrollbarWidth());
$('html').css('overflow', 'hidden');
}},
'open': function (){
if(disableOverlay){
$('.popup-builder.mfp-bg').remove();
}
var $popup_builder=$('.mfp-wrap .porto-block[data-bs-original-title]');
if($popup_builder.length){
bootstrap.Tooltip.getInstance($popup_builder[0]).update();
}
if($popup_builder.find('.marquee').length&&$.isFunction($.fn.marquee) ){
$popup_builder.find('.marquee').marquee({
duration: 5000,
gap: 0,
delayBeforeStart: 0,
direction: 'left',
duplicated: true
});
}
if($('.mfp-wrap .porto-block .owl-carousel') ){
$('.mfp-wrap .porto-block .owl-carousel').trigger('refresh.owl.carousel');
}}
};}
if(typeof overlayClass!="undefined"&&overlayClass){
args.mainClass +=escape(overlayClass);
}
setTimeout(()=> {
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, args), 0);
}, isExist);
}}
theme.porto_modal_open=porto_modal_open;
function porto_init_magnific_popup_functions($wrap){
if(typeof $wrap=='undefined'||!$wrap.length){
$wrap=$(document.body);
}
$wrap.find('.lightbox:not(.manual)').each(function(){
var $this=$(this),
opts;
if($this.find('>.lb-dataContainer').length){
return;
}
var pluginOptions=$this.data('lightbox-options');
if(pluginOptions){
opts=pluginOptions;
}else{
pluginOptions=$this.data('plugin-options');
if(typeof pluginOptions!='object'){
pluginOptions=JSON.parse(pluginOptions);
}
if(pluginOptions){
opts=pluginOptions;
}}
$this.themeLightbox(opts);
});
$wrap.find('.porto-popup-iframe').magnificPopup($.extend(true, {}, theme.mfpConfig, {
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
}) );
$wrap.find('.porto-popup-ajax').magnificPopup($.extend(true, {}, theme.mfpConfig, {
type: 'ajax'
}) );
$wrap.find('.porto-popup-content').each(function(){
var animation=$(this).attr('data-animation');
$(this).magnificPopup($.extend(true, {}, theme.mfpConfig, {
type: 'inline',
fixedContentPos: false,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: animation
}) );
});
$wrap.find('.popup-youtube, .popup-vimeo, .popup-gmaps').each(function(index){
var overlayClass=$(this).find('.porto-modal-trigger').data('overlay-class'),
args={
type: 'iframe',
removalDelay: 160,
preloader: false,
fixedContentPos: false
};
if(typeof overlayClass!="undefined"&&overlayClass){
args.mainClass=escape(overlayClass);
}
$(this).magnificPopup(args);
});
$wrap.find('[href*=porto-action_popup-id-]').each(function(){
var $this=$(this), popupId=$this.attr('href');
if(popupId=popupId.match(/#porto-action_popup-id-(\d+)/)[1]){
$this.attr('data-trigger-id', 'popup-id-' + popupId);
$this.addClass('porto-modal-trigger');
}});
if($wrap.find('.porto-modal-trigger.porto-onload').length){
var $obj=$wrap.find('.porto-modal-trigger.porto-onload').eq(0),
timeout=0;
if($obj.data('timeout') ){
timeout=parseInt($obj.data('timeout'), 10);
}
setTimeout(function(){
porto_modal_open($obj);
}, timeout);
}
$wrap.on('click', '.porto-modal-trigger', function(e){
e.preventDefault();
porto_modal_open($(this) );
});
if($wrap.hasClass('login-popup') ){
$wrap.find('.porto-link-login, .porto-link-register').magnificPopup({
items: {
src: theme.ajax_url +(-1===theme.ajax_url.indexOf('?') ? '?':'&')  + 'action=porto_account_login_popup&nonce=' + js_porto_vars.porto_nonce,
type: 'ajax'
},
tLoading: '<i class="porto-loading-icon"></i>',
callbacks: {
ajaxContentAdded: function(){
$(window).trigger('porto_login_popup_opened');
}}
});
}
if(typeof PhotoSwipe!='undefined'){
let _images=$wrap.find('.product-images'), links=[], i=0;
_images.find('img').each(function(){
var slide={};
slide.src=$(this).attr('href');
slide.title=$(this).attr('alt');
slide.w=parseInt($(this).attr('data-large_image_width') );
slide.h=parseInt($(this).attr('data-large_image_height') );
links[i]=slide;
i++;
});
_images.data('links', links);
_images.on('click', '.img-thumbnail a.zoom', function(e){
e.preventDefault();
var options=$.extend({
index: $(this).closest('.img-thumbnail').index(),
addCaptionHTMLFn: function(item, captionEl){
if(! item.title){
captionEl.children[0].textContent='';
return false;
}
captionEl.children[0].textContent=item.title;
return true;
}}, wc_single_product_params.photoswipe_options);
var photoswipe=new PhotoSwipe($('.pswp')[0], PhotoSwipeUI_Default, _images.data('links'), options);
photoswipe.init();
});
}else{
$wrap.find('.product-images').magnificPopup($.extend(true, {}, theme.mfpConfig, {
delegate: '.img-thumbnail a.zoom',
type: 'image',
gallery: { enabled: true }})
);
}
$wrap.find('.porto-posts-grid').each(function(){
$(this).magnificPopup($.extend(true, {}, theme.mfpConfig, {
delegate: '.porto-tb-featured-image span.zoom, .porto-tb-featured-image a.zoom, .post-image span.zoom',
type: 'image',
gallery: { enabled: true }})
);
});
$wrap.find('.porto-posts-grid .tb-image-type-slider div.zoom').each(function(){
var $this=$(this),
links=[];
$this.find('a').each(function(){
var slide={};
slide.src=$(this).attr('href');
slide.title=$(this).attr('title');
links.push(slide);
});
if(links.length){
$this.on('click', function(){
var $slider=$this.siblings('.porto-carousel');
if($slider.length){
var offset=$slider.data('owl.carousel').current() - $slider.find('.cloned').length / 2;
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, {
items: links,
gallery: {
enabled: true
},
type: 'image'
}), offset);
}});
}});
}
if($.fn.magnificPopup){
porto_init_magnific_popup_functions();
}else{
setTimeout(function(){
if($.fn.magnificPopup){
porto_init_magnific_popup_functions();
}}, 500);
}
$(document.body).on('porto_load_posts_end', function(e, $posts_wrap){
if($.fn.magnificPopup){
porto_init_magnific_popup_functions($posts_wrap);
}});
if(typeof theme.PostFilter!=='undefined'){
var $postFilterElements=$('ul[data-filter-type], .portfolio-filter, .member-filter, .faq-filter, .porto-ajax-filter.product-filter, .porto-ajax-filter.post-filter');
if($postFilterElements.length){
theme.PostFilter.initialize($postFilterElements);
}}
$('body').on('click', '.porto-ajax-load .pagination:not(.load-more) .page-numbers', function(e){
var $this=$(this);
if($this.hasClass('current')||$this.hasClass('dots') ){
return;
}
e.preventDefault();
var $wrap=$this.closest('.porto-ajax-load'),
post_type=$wrap.data('post_type'),
$obj=$wrap.find('.' + post_type + 's-container');
if(!$obj.length||$wrap.hasClass('loading') ){
return;
}
$wrap.addClass('loading');
var $filter=$wrap.find('.porto-ajax-filter'),
cat=$filter.length&&$filter.children('.active').length&&$filter.children('.active').data('filter');
if('*'==cat){
cat='';
}
var default_args={},
page=$this.attr('href').match(/paged=(\d+)|page\/(\d+)/);
if(page&&Array.isArray(page)&&(page[1]||page[2]) ){
default_args['page']=parseInt(page[1]||page[2]);
}else{
if($this.hasClass('prev') ){
default_args['page']=parseInt($this.next().text());
}else if($this.hasClass('next') ){
default_args['page']=parseInt($this.prev().text());
}else{
default_args['page']=parseInt($this.text());
}}
if(cat==''&&$wrap.find('input[type=hidden].category').length){
cat=$wrap.find('input[type=hidden].category').val();
default_args['taxonomy']=$wrap.find('input[type=hidden].taxonomy').val();
}
theme.PostFilter.load_posts(cat, $wrap.hasClass('load-infinite'), $wrap, post_type, $obj, default_args, $this.attr('href') );
});
if(typeof theme.FilterZoom!=='undefined'){
theme.FilterZoom.initialize($('.page-portfolios') );
theme.FilterZoom.initialize($('.page-members') );
theme.FilterZoom.initialize($('.blog-posts-related') );
}
var $minicart_offcanvas=$('.minicart-offcanvas'),
$wl_offcanvas=$('.wishlist-offcanvas'),
$mobile_sidebar=$('.mobile-sidebar'),
$mobile_panel=$('#side-nav-panel'),
$overlay_search=$('#header .btn-close-search-form'),
$html=$('html');
if($minicart_offcanvas.length||$wl_offcanvas.length||$mobile_sidebar.length||$mobile_panel.length||$('.skeleton-loading').length||$overlay_search.length){
$(document.documentElement).on('keyup', function(e){
try {
if(e.keyCode==27){
$minicart_offcanvas.removeClass('minicart-opened');
$wl_offcanvas.removeClass('minicart-opened');
if($mobile_sidebar.length){
$html.removeClass('filter-sidebar-opened');
$html.removeClass('sidebar-opened');
$('.sidebar-overlay').removeClass('active');
$('html').css('overflow', '');
$('html').css(theme.rtl_browser ? 'margin-left':'margin-right', '');
}
if($mobile_panel.length&&$html.hasClass('panel-opened') ){
$html.removeClass('panel-opened');
$('.panel-overlay').removeClass('active');
}
if($overlay_search.length){
$overlay_search.trigger('click');
}}
} catch(err){ }});
$('.skeleton-loading').on('skeleton-loaded', function(){
$mobile_sidebar=$('.mobile-sidebar');
});
}});
!function(e){var i,o,t;e(window).on("load",(function(){var n=function(n){var r=e(n);if(r.length){var a=!1;i.length&&i.is(":hidden")&&(a=!0,o.length&&o.is(":visible")?o.click():t.length&&t.is(":visible")&&t.click()),"#review_form"==n&&r.is(":hidden")&&(e(".cr-ajax-reviews-add-review").length?e(".cr-ajax-reviews-add-review").trigger("click"):r=e("#reviews")),setTimeout((function(){r.is(":visible")&&e("html, body").stop().animate({scrollTop:r.offset().top-theme.StickyHeader.sticky_height-theme.adminBarHeight()-14},600,"easeOutQuad")}),a?400:0)}};i=e("#tab-reviews"),o=i.prev(".resp-accordion"),t=e("#tab-title-reviews"),e(document.body).on("click",".woocommerce-review-link, .woocommerce-write-review-link",(function(i){if(e(this).closest(".quickview-wrap").length)return!0;n(this.hash),i.preventDefault()})),"#review_form"!=window.location.hash&&"#reviews"!=window.location.hash&&-1==window.location.hash.indexOf("#comment-")||n(window.location.hash)})),e(".skeleton-loading").on("skeleton-loaded",(function(){i=e("#tab-reviews"),o=i.prev(".resp-accordion"),t=e("#tab-title-reviews")}))}(window.jQuery);
(function(){
'use strict';
if(typeof yith_wcwl_l10n!='undefined'){
yith_wcwl_l10n.enable_tooltip=false;
}
jQuery(document).on('yith_wcwl_add_to_wishlist_data yith_woocompare_product_added', function(e, $el){
if($el.length){
$el.tooltip('dispose');
}
if($el.$initiator){
$el.$initiator.tooltip('dispose');
}});
jQuery(document).on('click', 'a.compare.added', function(e){
jQuery(this).tooltip('dispose');
});
function portoCalcSliderButtonsPosition($parent, padding){
var $buttons=$parent.find('.show-nav-title .owl-nav');
if($buttons.length){
if(window.theme.rtl){
$buttons.css('left', padding);
}else{
$buttons.css('right', padding);
}
if($buttons.closest('.porto-products').length&&$buttons.closest('.porto-products').parent().children('.products-slider-title').length){
var $title=$buttons.closest('.porto-products').parent().children('.products-slider-title'), newMT=$title.offset().top - $parent.offset().top - parseInt($title.css('padding-top'), 10) - parseInt($title.css('line-height'), 10) / 2 + $buttons.children().outerHeight() - parseInt($buttons.children().css('margin-top'), 10);
$buttons.css('margin-top', newMT);
}}
}
if(typeof jQuery.fn.owlCarousel=='function'){
(function(theme, $){
theme=theme||{};
var instanceName='__wooProductsSlider';
var WooProductsSlider=function($el, opts){
return this.initialize($el, opts);
};
WooProductsSlider.defaults={
rtl: theme.rtl,
autoplay: theme.slider_autoplay=='1' ? true:false,
autoplayTimeout: theme.slider_speed ? theme.slider_speed:5000,
loop: theme.slider_loop,
nav: false,
navText: ["", ""],
dots: false,
autoplayHoverPause: true,
items: 1,
responsive: {},
autoHeight: true,
lazyLoad: true
};
WooProductsSlider.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, true);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, WooProductsSlider.defaults, opts, {
wrapper: this.$el
});
return this;
},
calcOwlHeight: function($el){
var h=0;
$el.find('.owl-item.active').each(function(){
if(h < $(this).height())
h=$(this).height();
});
$el.find('.owl-stage-outer').height(h);
},
build: function(){
var self=this,
$el=this.options.wrapper,
lg=this.options.lg,
md=this.options.md,
xs=this.options.xs,
ls=this.options.ls,
$slider_wrapper=$el.closest('.slider-wrapper'),
single=this.options.single,
dots=this.options.dots,
nav=this.options.nav,
responsive={},
items,
scrollWidth=0,
count=$el.find('> *').length,
w_xs=576 - scrollWidth,
w_md=768 - scrollWidth,
w_xl=theme.screen_xl - scrollWidth,
w_sl=theme.screen_xxl - scrollWidth;
if($el.find('.product-col').get(0) ){
portoCalcSliderButtonsPosition($slider_wrapper, $el.find('.product-col').css('padding-left') );
}
if(single){
items=1;
}else{
items=lg ? lg:1;
if(this.options.xl){
responsive[w_sl]={ items: this.options.xl, loop:(this.options.loop&&count > this.options.xl) ? true:false };}
responsive[w_xl]={ items: items, loop:(this.options.loop&&count > items) ? true:false };
if(md) responsive[w_md]={ items: md, loop:(this.options.loop&&count > md) ? true:false };
if(xs) responsive[w_xs]={ items: xs, loop:(this.options.loop&&count > xs) ? true:false };
if(ls) responsive[0]={ items: ls, loop:(this.options.loop&&count > ls) ? true:false };}
this.options=$.extend(true, {}, this.options, {
loop:(this.options.loop&&count > items) ? true:false,
items: items,
responsive: responsive,
onRefresh: function(){
if($el.find('.product-col').get(0) ){
portoCalcSliderButtonsPosition($slider_wrapper, $el.find('.product-col').css('padding-left') );
}},
onInitialized: function(){
if($el.find('.product-col').get(0) ){
portoCalcSliderButtonsPosition($slider_wrapper, $el.find('.product-col').css('padding-left') );
}
if($el.find('.owl-item.cloned').length){
setTimeout(function(){
if($.fn.themePluginLazyLoad){
var ins=$el.find('.owl-item.cloned .porto-lazyload:not(.lazy-load-loaded)').themePluginLazyLoad({ effect: 'fadeIn', effect_speed: 400 });
if(ins&&ins.loadAndDestroy){
ins.loadAndDestroy();
}}
}, 100);
}},
touchDrag:(count==1) ? false:true,
mouseDrag:(count==1) ? false:true
});
if(this.options.autoHeight){
var thisobj=this;
$(window).on('resize', function(){
thisobj.calcOwlHeight($el);
});
if(theme.isLoaded){
setTimeout(function(){
thisobj.calcOwlHeight($el);
}, 100);
}else{
$(window).on('load', function(){
thisobj.calcOwlHeight($el);
});
}}
if($el.hasClass('has-ccols-spacing') ){
$el.removeClass('has-ccols-spacing');
}
$el.owlCarousel(this.options);
return this;
}};
$.extend(theme, {
WooProductsSlider: WooProductsSlider
});
$.fn.themeWooProductsSlider=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this;
}else{
return new theme.WooProductsSlider($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
}
(function(theme, $){
var $supports_html5_storage;
try {
$supports_html5_storage=('sessionStorage' in window&&window.sessionStorage!==null);
window.sessionStorage.setItem('wc', 'test');
window.sessionStorage.removeItem('wc');
} catch(err){
$supports_html5_storage=false;
}
var setCartCreationTimestamp=function(){
if($supports_html5_storage){
sessionStorage.setItem('wc_cart_created',(new Date()).getTime());
}};
var setCartHash=function(cart_hash){
if($supports_html5_storage&&wc_cart_fragments_params){
localStorage.setItem(wc_cart_fragments_params.cart_hash_key, cart_hash);
sessionStorage.setItem(wc_cart_fragments_params.cart_hash_key, cart_hash);
}};
var initAjaxRemoveCartItem=function(){
$(document).off('click', '.widget_shopping_cart .remove-product, .shop_table.cart .remove-product, .shop_table.review-order .remove-product').on('click', '.widget_shopping_cart .remove-product, .shop_table.cart .remove-product, .shop_table.review-order .remove-product', function(e){
e.preventDefault();
var $this=$(this);
var cart_id=$this.data("cart_id");
var product_id=$this.data("product_id");
var is_checkout=false;
$this.closest('li').find('.ajax-loading').show();
if('undefined'==typeof cart_id){
is_checkout=true;
cart_id=$this.closest('.cart_item').data('key');
}
$.ajax({
type: 'POST',
dataType: 'json',
url: theme.ajax_url,
data: {
action: "porto_cart_item_remove",
nonce: js_porto_vars.porto_nonce,
cart_id: cart_id
},
success: function(response){
updateCartFragment(response);
$(document.body).trigger('wc_fragments_refreshed');
var this_page=window.location.toString(),
item_count=$(response.fragments['div.widget_shopping_cart_content']).find('.mini_cart_item').length;
this_page=this_page.replace('add-to-cart', 'added-to-cart');
$('.viewcart-' + product_id).removeClass('added');
$('.porto_cart_item_' + cart_id).remove();
if(item_count==0&&($('body').hasClass('woocommerce-cart')||$('body').hasClass('woocommerce-checkout') )){
$('.page-content').fadeTo(400, 0.8).block({
message: null,
overlayCSS: {
opacity: 0.2
}});
}else{
$('form.woocommerce-cart-form, #order_review, .updating, .cart_totals').fadeTo(400, 0.8).block({
message: null,
overlayCSS: {
opacity: 0.2
}});
}
$('.widget_shopping_cart, .updating').stop(true).css('opacity', '1').unblock();
if(item_count==0&&($('body').hasClass('woocommerce-cart')||$('body').hasClass('woocommerce-checkout') )){
$('.page-content').load(this_page + ' .page-content:eq(0) > *', function(){
$('.page-content').stop(true).css('opacity', '1').unblock();
});
}else{
$('form.woocommerce-cart-form').load(this_page + ' form.woocommerce-cart-form:eq(0) > *', function(){
$('form.woocommerce-cart-form').stop(true).css('opacity', '1').unblock();
});
$('.cart_totals').load(this_page + ' .cart_totals:eq(0) > *', function(){
$('.cart_totals').stop(true).css('opacity', '1').unblock();
});
$('#order_review').load(this_page + ' #order_review:eq(0) > *', function(){
$('#order_review').stop(true).css('opacity', '1').unblock();
});
}}
});
return false;
});
};
var refreshCartFragment=function(){
initAjaxRemoveCartItem();
if($.cookie('woocommerce_items_in_cart') > 0){
$('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').show();
}else{
$('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').hide();
}};
var updateCartFragment=function(data){
if(data&&data.fragments){
var fragments=data.fragments,
cart_hash=data.cart_hash;
$.each(fragments, function(key, value){
$(key).replaceWith(value);
});
if(typeof wc_cart_fragments_params==='undefined'){
return;
}
if($supports_html5_storage){
var prev_cart_hash=sessionStorage.getItem('wc_cart_hash');
if(prev_cart_hash===null||prev_cart_hash===undefined||prev_cart_hash===''){
setCartCreationTimestamp();
}
sessionStorage.setItem(wc_cart_fragments_params.fragment_name, JSON.stringify(fragments) );
setCartHash(cart_hash);
}}
};
$(function(){
refreshCartFragment();
$(document).on('click', '.add_to_cart_button', function(e){
var $this=$(this);
if(typeof theme.noAjaxCart=='undefined'){
theme.noAjaxCart = ! $('#wc-add-to-cart-js').length;
}
if($this.is('.product_type_simple')||$this.is('.jck_wssv_add_to_cart') ){
if('SPAN'==$this.prop('tagName')&&(theme.noAjaxCart||! $this.attr('data-product_id') )){
window.location.href=$this.attr('href');
}
if($.fn.tooltip){
$this.tooltip('hide');
}
if($this.attr('data-product_id') ){
$this.addClass('product-adding');
if($this.hasClass('viewcart-style-2')||$this.hasClass('viewcart-style-3') ){
if($this.closest('.porto-hotspot').length==0&&$this.closest('.menu-block').length==0&&! $('#loading-mask').length){
$('body').append('<div id="loading-mask"><div class="background-overlay"></div></div>');
}
if(!$(this).closest('.product').find('.loader-container').length){
$(this).closest('.product').find('.product-image').append('<div class="loader-container"><div class="loader"><i class="porto-ajax-loader"></i></div></div>');
}
$(this).closest('.product').find('.loader-container').show();
}}
}else if('SPAN'==$this.prop('tagName') ){
window.location.href=$this.attr('href');
}});
$(document.body).on('added_to_cart', function(){
$('ul.products li.product .added_to_cart, .porto-tb-item .added_to_cart').remove();
initAjaxRemoveCartItem();
});
$(document.body).on('wc_cart_button_updated', function(){
$('ul.products li.product .added_to_cart, .porto-tb-item .added_to_cart').remove();
});
$(document.body).on('wc_fragments_refreshed wc_fragments_loaded', function(){
refreshCartFragment();
});
$(document).on('click', '.product-image .viewcart, .after-loading-success-message .viewcart', function(e){
if(wc_add_to_cart_params.cart_url){
window.location.href=wc_add_to_cart_params.cart_url;
}
e.preventDefault();
});
var porto_product_add_cart_timer=null;
$(document).on('added_to_cart', 'body', function(event){
var $mc_item=$('#mini-cart .cart-items');
if($mc_item.length){
$mc_item.addClass('count-updating');
setTimeout(function(){
$mc_item.removeClass('count-updating');
}, 1000);
}
$('body #loading-mask').remove();
$('.add_to_cart_button.product-adding').each(function(){
var $link=$(this);
$link.removeClass('product-adding');
if($('.woocommerce-wishlist.woocommerce-page').length){
return;
}
if($link.hasClass('viewcart-style-1') ){
$link.closest('.product').find('.viewcart').addClass('added');
$('.minicart-offcanvas').addClass('minicart-opened');
}else{
$link.closest('.product').find('.loader-container').hide();
if($link.closest('li.outofstock').length){
return;
}
var $msg;
if($link.hasClass('viewcart-style-2') ){
$msg=$('.after-loading-success-message .success-message-container').eq(0);
$msg.find('.product-name').text($link.closest('.product').find('.woocommerce-loop-product__title, .product-loop-title, .post-title a').text());
}else{
$msg=$('.after-loading-success-message .success-message-container').last().clone().removeClass('d-none');
$msg.find('.product-name').empty().append($link.closest('.product').find('.product-loop-title, .post-title a').clone());
}
$msg.find('.msg-box img').remove();
if($link.closest('.product').find('.product-image img').length){
var $img=$link.closest('.product').find('.product-image img').eq(0);
$('<img />').attr('src', $img.data('oi') ? $img.data('oi'):$img.attr('src') ).appendTo($msg.find('.msg-box') ).attr('alt', $msg.find('.msg .product-name').text());
}else if(typeof js_porto_vars.wc_placeholder_img!='undefined'){
$('<img />').attr('src', js_porto_vars.wc_placeholder_img).appendTo($msg.find('.msg-box') ).attr('alt', $msg.find('.msg .product-name').text());
}
$('.after-loading-success-message').eq(0).stop().show();
if($link.hasClass('viewcart-style-2') ){
if(porto_product_add_cart_timer){
clearTimeout(porto_product_add_cart_timer);
}
porto_product_add_cart_timer=setTimeout(function(){ $('.after-loading-success-message').eq(0).hide(); }, 4000);
}else{
$msg.prependTo('.after-loading-success-message');
theme.requestTimeout(function(){
$msg.addClass('active');
}, 50);
setTimeout(function(){ $msg.find('.mfp-close').trigger('click'); }, 5000);
}}
});
});
$('.after-loading-success-message .continue_shopping').on('click', function(){
$('.after-loading-success-message').eq(0).fadeOut(200);
});
$('.after-loading-success-message').on('click', '.mfp-close', function(){
var $obj=$(this).closest('.success-message-container');
$obj.removeClass('active');
theme.requestTimeout(function(){
$obj.slideUp(300, function(){
$obj.remove();
});
}, 350);
});
$(document.body).on('click', '.variations_form .variations .filter-item-list .filter-color, .variations_form .variations .filter-item-list .filter-item', function(e){
e.preventDefault();
var $this=$(this),
$selector=$this.closest('ul').siblings('select');
if(!$selector.length||$this.hasClass('disabled') ){
return;
}
var $li_obj=$this.closest('li');
if($li_obj.hasClass('active') ){
$li_obj.removeClass('active');
$selector.val('');
}else{
$li_obj.addClass('active').siblings().removeClass('active');
$selector.val($this.data('value') );
}
$selector.trigger('change.wc-variation-form');
});
$(document.body).on('click', '.porto-general-swatch .filter-color, .porto-general-swatch .filter-item', function(e){
e.preventDefault();
var $this=$(this),
$swatch_li=$this.parent();
var $product=$(this).closest('.product, .product-col');
var $product_img;
if($product.hasClass('porto-tb-item') ){
$product_img=$product.find('.porto-tb-featured-image img').eq(0);
}else if($product.hasClass('product-col') ){
$product_img=$product.find('div.product-image .inner img:first-child');
}
var srcOrig=$product_img.data('original-src'),
srcsetOrig=$product_img.data('original-srcset '),
sizesOrig=$product_img.data('original-sizes');
if(typeof srcOrig=='undefined'){
$product_img.data('original-src', $product_img.attr('src') );
if(typeof srcsetOrig=='undefined'&&$product_img.attr('srcset') ){
$product_img.data('original-srcset', $product_img.attr('srcset') );
}
if(typeof sizesOrig=='undefined'&&$product_img.attr('sizes') ){
$product_img.data('original-sizes', $product_img.attr('sizes') );
}}
var image_src='',
image_srcset='',
image_sizes='';
if($this.parent().hasClass('active') ){
$swatch_li.removeClass('active');
}else{
$this.closest('ul').find('li').removeClass('active');
$swatch_li.addClass('active');
if($swatch_li.data('image-src') ){
image_src=$swatch_li.data('image-src');
image_srcset=$swatch_li.data('image-srcset');
image_sizes=$swatch_li.data('image-sizes');
}}
if(! image_src){
var $active_swatch=$this.closest('.porto-general-swatch').find('li.active');
if($active_swatch.length&&$active_swatch.data('image-src') ){
image_src=$active_swatch.data('image-src');
image_srcset=$active_swatch.data('image-srcset');
image_sizes=$active_swatch.data('image-sizes');
}else{
if($product_img.data('original-src') ){
image_src=$product_img.data('original-src');
}
if($product_img.data('original-srcset') ){
image_srcset=$product_img.data('original-srcset');
}
if($product_img.data('original-sizes') ){
image_sizes=$product_img.data('original-sizes');
}}
}
if(image_src){
$product_img.attr('src', image_src).attr('srcset', image_srcset).attr('image_sizes', image_sizes);
var $image_slider=$product.find('.owl-carousel');
if($image_slider.length){
$image_slider.trigger('to.owl.carousel', [0, 300, true]);
}}
});
$(document).on('wc_variation_form', '.variations_form', function(){
$(this).addClass('vf_init');
if($(this).find('.filter-item-list').length < 1){
return;
}
$(this).find('.variations select').trigger('focusin');
});
$(document).on('updated_wc_div', function(){
if($.fn.themePluginLazyLoad){
$('.woocommerce-cart-form .porto-lazyload').themePluginLazyLoad();
}});
$(document).on('found_variation reset_data', '.variations_form', function(e, args){
var $this=$(this);
if($this.find('.product-attr-description').length){
if(typeof args=='undefined'){
$this.find('.product-attr-description').removeClass('active');
}else{
$this.find('.product-attr-description').addClass('active');
$this.find('.product-attr-description .attr-desc').removeClass('active');
$this.find('.variations select').each(function(){
var $obj=$(this);
$this.find('.product-attr-description .attr-desc[data-attrid="' + $obj.val() + '"]').addClass('active');
});
}}
if($this.find(".filter-item-list").length < 1){
return;
}
$this.find(".filter-item-list").each(function(){
if($(this).next("select").length < 1){
return;
}
var selector=$(this).next("select"),
$list=$(this);
$list.find('li.active').removeClass('active');
$list.find('.filter-color, .filter-item').removeClass('enabled').removeClass('disabled');
selector.children("option").each(function(){
if(!$(this).val()){
return;
}
$list.find('[data-value="' + $(this).val().replace(/"/g, '\\\"') + '"]').addClass('enabled');
if($(this).val()==selector.val()){
$list.find('[data-value="' + $(this).val().replace(/"/g, '\\\"') + '"]').parent().addClass('active');
}
/*html +='<li';
if($(this).val()==selector.val()){
html +=' class="active"';
}
html +='><a href="#" data-value="'+ escape($(this).val()) +'" class="' + spanClass + '"';
if(isColor){
html +=' style="background-color: #' + escape($(this).data('color').replace('#','')) + '"';
}
if(isImage){
html +=' style="background-image:url(' + $(this).data('image') + ')"';
}
html +='>';
if(!isColor){
html +=$(this).text();
}
html +='</a></li>';*/
});
$list.find('.filter-color:not(.enabled), .filter-item:not(.enabled)').addClass('disabled');
});
});
$(document).on('found_variation reset_data', '.variations_form', function(e, obj){
var $wrapper=$(this).closest('.product'),
$timer=$wrapper.find('.sale-product-daily-deal.for-some-variations');
if(!$timer.length){
$timer=$wrapper.find('.porto-product-sale-timer').eq(0);
if(!$timer.length){
return;
}}
if(obj&&obj.is_purchasable&&typeof obj.porto_date_on_sale_to!='undefined'&&obj.porto_date_on_sale_to){
var saleTimer=$timer.find('.porto_countdown-dateAndTime');
if(saleTimer.data('terminal-date')!=obj.porto_date_on_sale_to){
var newDate=new Date(obj.porto_date_on_sale_to);
saleTimer.porto_countdown('option', { until: newDate });
saleTimer.data('terminal-date', obj.porto_date_on_sale_to);
}
$timer.slideDown();
}else{
if($timer.is(':hidden') ){
$timer.hide();
}else{
$timer.slideUp();
}}
});
$('body').on('click', '.product-attr-description > a', function(e){
e.preventDefault();
$(this).next().stop().slideToggle(400);
});
if($(document.body).hasClass('single-product') ){
$(document).on('woocommerce_variation_has_changed', '.variations_form', function(e, variation){
$(document.body).removeClass('single-add-to-cart');
});
$(document).on('found_variation', '.variations_form', function(e, variation){
try {
var cart_items=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name) );
if(cart_items['div.widget_shopping_cart_content']){
var cart_item=$(cart_items['div.widget_shopping_cart_content']).find('.porto-variation-' + variation.variation_id);
if(cart_item.length){
theme.requestFrame(function(){
$(document.body).addClass('single-add-to-cart');
});
}}
} catch(e){
}});
}
var timeout;
$(document).on('change input', '.cart_list .quantity .qty, .woocommerce-checkout-review-order-table .quantity .qty', function(){
var input=$(this);
var itemID='';
var qtyVal=input.val();
var maxValue=input.attr('max');
var is_checkout=false;
clearTimeout(timeout);
if(parseInt(qtyVal) > parseInt(maxValue) ){
qtyVal=maxValue;
}
if(input.closest('.cart_list').length){
itemID=input.parents('.woocommerce-mini-cart-item').data('key');
}else{
is_checkout=true;
itemID=input.closest('.cart_item').data('key');
}
timeout=setTimeout(function(){
if(! is_checkout){
input.parents('.mini_cart_item').find('.ajax-loading').show();
}
$.ajax({
url:theme.ajax_url,
data:{
action:'porto_update_cart_item',
item_id: itemID,
qty:qtyVal
},
success:function(data){
if(data&&data.fragments){
updateCartFragment(data);
$(document.body).trigger('wc_fragments_refreshed');
}
if(is_checkout){
input.closest('form.checkout').trigger('update');
}else{
input.parents('.mini_cart_item').find('.ajax-loading').hide();
}},
dataType: 'json',
method:'GET'
});
}, 500);
});
if($('form.woocommerce-cart-form button.update-button-hidden').length > 0){
$(document).on('change input', 'form.woocommerce-cart-form .product-quantity input', function (){
var $form=$(this).closest('form'),
$updateBtn=$form.find('.update-button-hidden');
$updateBtn.removeAttr('disabled');
$updateBtn.click();
});
}
if('undefined'!==typeof yith_wcwl_l10n&&yith_wcwl_l10n.reload_on_found_variation&&$('.products-container .variations_form').length){
var porto_update_reload_wishlist_fn=function(){
yith_wcwl_l10n.reload_on_found_variation=true;
if($(this).closest('.products-container').length){
yith_wcwl_l10n.reload_on_found_variation=false;
}};
$('.products-container').one('woocommerce_variation_has_changed woocommerce_variation_select_change', '.variations_form', function(){
yith_wcwl_l10n.reload_on_found_variation=true;
$(document).off('update_variation_values', '.variations_form', porto_update_reload_wishlist_fn);
});
$(document).on('update_variation_values', '.variations_form', porto_update_reload_wishlist_fn);
}});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
theme=theme||{};
var duration=300,
flag=false;
$.extend(theme, {
WooProductImageSlider: {
defaults: {
elements: '.product-image-slider'
},
initialize: function($elements){
this.$elements=($elements||$(this.defaults.elements) );
if(!this.$elements.length&&!$('.product-images-block').length){
return this;
}
/*
if(!$.fn.owlCarousel){
this.$elements.each(function(){
var links=[],
$this=$(this);
if(theme.product_image_popup){
var i=0;
$this.find('img').each(function(){
var slide={};
slide.src=$(this).attr('href');
slide.title=$(this).attr('alt');
slide.w=parseInt($(this).attr('data-large_image_width') );
slide.h=parseInt($(this).attr('data-large_image_height') );
links[i]=slide;
i++;
});
}
$this.data('links', links);
if(theme.product_image_popup){
var $zoom_buttons=$this.siblings('.zoom');
$zoom_buttons.off('click').on('click', function(e){
if(! $this.data('links').length){
return;
}
e.preventDefault();
if(typeof PhotoSwipe=='undefined'){
return;
}
var options=$.extend({
index: 0,
addCaptionHTMLFn: function(item, captionEl){
if(! item.title){
captionEl.children[0].textContent='';
return false;
}
captionEl.children[0].textContent=item.title;
return true;
}}, wc_single_product_params.photoswipe_options);
var photoswipe=new PhotoSwipe($('.pswp')[0], PhotoSwipeUI_Default, $this.data('links'), options);
photoswipe.init();
});
}});
return false;
}
*/
this.build();
return this;
},
build: function(){
var self=this,
thumbs_count=theme.product_thumbs_count;
if(theme.product_zoom&&(!('ontouchstart' in document)||(( 'ontouchstart' in document)&&theme.product_zoom_mobile) )){
var zoomConfig={
responsive: true,
zoomWindowFadeIn: 200,
zoomWindowFadeOut: 100,
zoomType: js_porto_vars.zoom_type,
cursor: 'grab'
};
if(js_porto_vars.zoom_type=='lens'){
zoomConfig.scrollZoom=js_porto_vars.zoom_scroll;
zoomConfig.lensSize=js_porto_vars.zoom_lens_size;
zoomConfig.lensShape=js_porto_vars.zoom_lens_shape;
zoomConfig.containLensZoom=js_porto_vars.zoom_contain_lens;
zoomConfig.lensBorderSize=js_porto_vars.zoom_lens_border;
zoomConfig.borderColour=js_porto_vars.zoom_border_color;
}
if(js_porto_vars.zoom_type=='inner'){
zoomConfig.borderSize=0;
}else{
zoomConfig.borderSize=js_porto_vars.zoom_border;
}
zoomConfig.zoomActivation='dbltouch';
if(!self.$elements.length){
var $images_grid=$('.product-images-block');
if($images_grid.length){
self.initZoom($images_grid, zoomConfig);
}}
}
self.$elements.each(function(){
var $this=$(this),
$product=$this.closest('.product');
if(!$product.length){
$product=$this.closest('.product_layout, .product-layout-image').eq(0);
}
var $thumbs_slider=$product.find('.product-thumbs-slider'),
$thumbs=$product.find('.product-thumbnails-inner'),
$thumbs_vertical_slider=$product.find('.product-thumbs-vertical-slider'),
currentSlide=0,
count=$this.find('> *').length;
$this.find('> *:first-child').imagesLoaded(function(){
var links=[];
if(theme.product_image_popup){
var i=0;
$this.find('.img-thumbnail img').each(function(){
var slide={}, _imageItem=$(this);
if(_imageItem.closest('.vd-image').length){
return;
}
slide.src=_imageItem.attr('href');
slide.title=_imageItem.attr('alt');
slide.w=parseInt(_imageItem.attr('data-large_image_width') );
slide.h=parseInt(_imageItem.attr('data-large_image_height') );
links[i]=slide;
i++;
});
}
if($.fn.owlCarousel){
$thumbs_slider.removeClass('has-ccols-spacing');
$thumbs_slider.owlCarousel({
rtl: theme.rtl,
loop: false,
autoplay: false,
items: thumbs_count,
nav: false,
navText: ["", ""],
dots: false,
rewind: true,
margin: 8,
stagePadding: 1,
lazyLoad: true,
onInitialized: function(){
self.selectThumb(null, $thumbs_slider, 0);
if($thumbs_slider.find('.owl-item').length >=thumbs_count)
$thumbs_slider.append('<div class="thumb-nav"><div class="thumb-prev"></div><div class="thumb-next"></div></div>');
}}).on('click', '.owl-item', function(){
self.selectThumb($this, $thumbs_slider, $(this).index());
});
if($thumbs_vertical_slider.length > 0&&typeof $.fn.slick=='function'){
var slickOptions={
dots: false,
vertical: true,
slidesToShow: thumbs_count,
slidesToScroll: 1,
infinite: false,
}
if(thumbs_count >=5){
slickOptions['responsive']=[
{
breakpoint: 992,
settings: {
slidesToShow: 4,
}},
{
breakpoint: 768,
settings: {
slidesToShow: 3,
}}
]
}
$thumbs_vertical_slider.slick(slickOptions).on('click', '.slick-slide', function(){
self.selectVerticalSliderThumb($this, $thumbs_vertical_slider, $(this).data('slick-index') );
});
$('.product-layout-transparent .product-image-slider').on('resized.owl.carousel', function(){
$(window).trigger('resize.slick');
});
self.selectVerticalSliderThumb(null, $thumbs_vertical_slider, 0);
if($thumbs_vertical_slider.find('.porto-lazyload').length){
theme.requestTimeout(function(){
$thumbs_vertical_slider.find('.slick-cloned .porto-lazyload:not(.lazy-load-loaded)').each(function(){
$(this).attr('src', $(this).data('oi') ).removeAttr('data-oi').addClass('lazy-load-loaded');
});
}, 100);
}}
self.selectVerticalThumb(null, $thumbs, 0);
$thumbs.off('click', '.img-thumbnail').on('click', '.img-thumbnail', function(){
self.selectVerticalThumb($this, $thumbs, $(this).index());
});
$thumbs_slider.off('click', '.thumb-prev').on('click', '.thumb-prev', function(e){
var currentThumb=$thumbs_slider.data('currentThumb');
self.selectThumb($this, $thumbs_slider, --currentThumb);
});
$thumbs_slider.off('click', '.thumb-next').on('click', '.thumb-next', function(e){
var currentThumb=$thumbs_slider.data('currentThumb');
self.selectThumb($this, $thumbs_slider, ++currentThumb);
});
var itemsCount=typeof $this.data('items')!='undefined' ? $this.data('items'):1,
itemsResponsive=typeof $this.data('responsive')!='undefined' ? $this.data('responsive'):{},
centerItem=typeof $this.data('centeritem')!='undefined' ? true:false,
margin=typeof $this.data('margin')!='undefined' ? $this.data('margin'):0,
loop=(count > 1) ?(typeof $this.data('loop')!='undefined' ? $this.data('loop'):true):false;
for(var itemCount in itemsResponsive){
itemsResponsive[itemCount]={ items: itemsResponsive[itemCount] };}
$this.removeClass('has-ccols-spacing');
$this.owlCarousel({
rtl: theme.rtl,
loop: loop,
autoplay: false,
items: itemsCount,
margin: margin,
responsive: itemsResponsive,
autoHeight: true,
nav: true,
navText: ["", ""],
dots: false,
rewind: true,
lazyLoad: true,
center: centerItem,
onInitialized: function(){
if($this.find('.owl-item.cloned').length){
setTimeout(function(){
if($.fn.themePluginLazyLoad){
var ins=$this.find('.owl-item.cloned .porto-lazyload:not(.lazy-load-loaded)').themePluginLazyLoad({ effect: 'fadeIn', effect_speed: 400 });
if(ins&&ins.loadAndDestroy){
ins.loadAndDestroy();
}}
}, 100);
}
self.initZoom($this, zoomConfig);
},
onTranslate: function(event){
currentSlide=event.item.index - $this.find('.cloned').length / 2;
currentSlide=(currentSlide + event.item.count) % event.item.count;
self.selectThumb(null, $thumbs_slider, currentSlide);
self.selectVerticalThumb(null, $thumbs, currentSlide);
self.selectVerticalSliderThumb(null, $thumbs_vertical_slider, currentSlide);
},
onRefreshed: function(){
if(theme.product_zoom&&(!('ontouchstart' in document)||(( 'ontouchstart' in document)&&theme.product_zoom_mobile) )){
$this.find('img').each(function(){
var $this=$(this),
src=typeof $this.attr('href')!='undefined' ? $this.attr('href'):($this.data('oi') ? $this.data('oi'):$this.attr('src') ),
elevateZoom=$this.data('elevateZoom'),
smallImage=$this.data('src') ? $this.data('src'):($this.data('oi') ? $this.data('oi'):$this.attr('src') );
if(typeof elevateZoom!='undefined'){
elevateZoom.startZoom();
elevateZoom.swaptheimage(smallImage, src);
}else if($.fn.elevateZoom){
zoomConfig.zoomContainer=$this.parent();
if(! $this.closest('.vd-image').length){
$this.elevateZoom(zoomConfig);
}}
});
}}
});
}else{
self.initZoom($this, zoomConfig);
}
$this.data('links', links);
if(theme.product_image_popup){
var $zoom_buttons=$this.siblings('.zoom');
$zoom_buttons.off('click').on('click', function(e){
if(! $this.data('links').length){
return;
}
e.preventDefault();
if(typeof PhotoSwipe=='undefined'){
return;
}
var options=$.extend({
index: currentSlide ? currentSlide:0,
addCaptionHTMLFn: function(item, captionEl){
if(! item.title){
captionEl.children[0].textContent='';
return false;
}
captionEl.children[0].textContent=item.title;
return true;
}}, wc_single_product_params.photoswipe_options);
var photoswipe=new PhotoSwipe($('.pswp')[0], PhotoSwipeUI_Default, $this.data('links'), options);
photoswipe.init();
});
}});
});
return self;
},
selectThumb: function($image_slider, $thumbs_slider, index){
if(flag||!$thumbs_slider.length) return;
flag=true;
var len=$thumbs_slider.find('.owl-item').length,
actives=[],
i=0;
index=(index + len) % len;
if($image_slider){
$image_slider.trigger('to.owl.carousel', [index, duration, true]);
}
$thumbs_slider.find('.owl-item').removeClass('selected');
$thumbs_slider.find('.owl-item:eq(' + index + ')').addClass('selected');
$thumbs_slider.data('currentThumb', index);
$thumbs_slider.find('.owl-item.active').each(function(){
actives[i++]=$(this).index();
});
if($.inArray(index, actives)==-1){
if(Math.abs(index - actives[0]) > Math.abs(index - actives[actives.length - 1]) ){
$thumbs_slider.trigger('to.owl.carousel', [(index - actives.length + 1) % len, duration, true]);
}else{
$thumbs_slider.trigger('to.owl.carousel', [index % len, duration, true]);
}}
flag=false;
},
selectVerticalSliderThumb: function($image_slider, $thumbs_vertical_slider, index){
if(flag||!$thumbs_vertical_slider.length) return;
flag=true;
if('undefined'==typeof $thumbs_vertical_slider[0].slick){
return;
}
var len=$thumbs_vertical_slider[0].slick.slideCount,
actives=[],
i=0;
index=(index + len) % len;
if($image_slider){
$image_slider.trigger('to.owl.carousel', [index, duration, true]);
}
$thumbs_vertical_slider.find('.slick-slide').removeClass('selected');
$thumbs_vertical_slider.find('.slick-slide:eq(' + index + ')').addClass('selected');
$thumbs_vertical_slider.data('currentThumb', index);
$thumbs_vertical_slider.find('.slick-slide.slick-active').each(function(){
actives[i++]=$(this).index();
});
if($.inArray(index, actives)==-1){
if(Math.abs(index - actives[0]) > Math.abs(index - actives[actives.length - 1]) ){
$thumbs_vertical_slider.get(0).slick.goTo(( index - actives.length + 1) % len, false);
}else{
$thumbs_vertical_slider.get(0).slick.goTo(index % len, false);
}}
flag=false;
},
selectVerticalThumb: function($image_slider, $thumbs, index){
if(flag||!$thumbs.length) return;
flag=true;
var len=$thumbs.find('.img-thumbnail').length,
i=0;
index=(index + len) % len;
if($image_slider){
$image_slider.trigger('to.owl.carousel', [index, duration, true]);
}
$thumbs.find('.img-thumbnail').removeClass('selected');
$thumbs.find('.img-thumbnail:eq(' + index + ')').addClass('selected');
$thumbs.data('currentThumb', index);
flag=false;
},
initZoom: function($this, zoomConfig){
if(theme.product_zoom&&(!('ontouchstart' in document)||(( 'ontouchstart' in document)&&theme.product_zoom_mobile) )){
$this.find('img').each(function(){
var $this=$(this);
zoomConfig.zoomContainer=$this.parent();
if($.fn.elevateZoom){
if(! $this.closest('.vd-image').length){
$this.elevateZoom(zoomConfig);
}}else{
setTimeout(function(){
if($.fn.elevateZoom){
if(! $this.closest('.vd-image').length){
$this.elevateZoom(zoomConfig);
}}
}, 1000);
}});
}}
}});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
theme=theme||{};
$.extend(theme, {
WooQuickView: {
initialize: function(){
this.events();
return this;
},
events: function(){
var self=this;
$(document).on('click', '.quickview', function(e){
e.preventDefault();
if(!$.fn.elevateZoom&&!$('#porto-script-jquery-elevatezoom').length){
var js=document.createElement('script');
js.id='porto-script-jquery-elevatezoom';
$(js).appendTo('body').attr('src', js_porto_vars.ajax_loader_url.replace('/images/ajax-loader@2x.gif', '/js/libs/jquery.elevatezoom.min.js') );
}
var $this=$(this),
pid=$this.attr('data-id');
function init_quick_view_window(){
var args={
href: theme.ajax_url,
ajax: {
data: {
action: 'porto_product_quickview',
variation_flag: typeof wc_add_to_cart_variation_params!=='undefined',
pid: pid,
nonce: js_porto_vars.porto_nonce
}},
type: 'ajax',
helpers: {
overlay: {
locked: true,
fixed: true
}},
tpl: {
error: '<p class="fancybox-error">' + theme.request_error + '</p>',
closeBtn: '<a title="' + js_porto_vars.popup_close + '" class="fancybox-item fancybox-close" href="javascript:;"></a>',
next: '<a title="' + js_porto_vars.popup_next + '" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
prev: '<a title="' + js_porto_vars.popup_prev + '" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
},
autoSize: true,
autoWidth: true,
afterShow: function(flag){
theme.requestTimeout(function(){
var $quickviewEl=$('.quickview-wrap-' + pid);
if($quickviewEl.length==0&&$('.woocommerce-wishlist').length){
$quickviewEl=$('.quickview-wrap');
}
if(typeof flag=='undefined'||flag){
porto_woocommerce_init();
}
theme.WooProductImageSlider.initialize($quickviewEl.find('.product-image-slider') );
if($(document.body).hasClass('yith-booking') ){
$(document).trigger('yith-wcbk-init-booking-form');
}
var form_variation=$quickviewEl.find('form.variations_form');
if(form_variation.length > 0){
form_variation.wc_variation_form();
}
if($('.quickview-wrap-' + pid + ' .porto_countdown').length&&! theme.isFirstLoad&&typeof $.fn.porto_countdown=='undefined'){
theme.isFirstLoad=true;
var scripts=['countdown.min.js', 'countdown-loader.min.js'];
for(let index=0; index < scripts.length; index++){
if(!document.getElementById(scripts[index]) ){
var wf, script;
wf=document.createElement('script');
script=document.scripts[0];
wf.id=scripts[index];
wf.src=js_porto_vars.func_url + 'shortcodes/assets/js/' + scripts[index];
script.parentNode.insertBefore(wf, script);
}}
}
$(document.body).trigger('porto_init_countdown', [$quickviewEl]);
if(( 'undefined'!==typeof yith_wcwl_l10n)&&yith_wcwl_l10n.enable_ajax_loading){
if($('.fancybox-opened .wishlist-fragment').length){
var options={},
$product=$('.fancybox-opened .wishlist-fragment'),
id=$product.attr('class').split(' ').filter(( val)=> {
return val.length&&val!=='exists';
}).join(yith_wcwl_l10n.fragments_index_glue);
options[id]=$product.data('fragment-options');
if(!options){
return;
}
var ajaxData={
action: yith_wcwl_l10n.actions.load_fragments,
context: 'frontend',
fragments: options
};
if(typeof yith_wcwl_l10n.nonce!='undefined'){
ajaxData.nonce=yith_wcwl_l10n.nonce.load_fragments_nonce;
}
$.ajax({
ajaxData,
method: 'post',
success: function(data){
if(typeof data.fragments!=='undefined'){
$.each(data.fragments, function(i, v){
var itemSelector='.' + i.split(yith_wcwl_l10n.fragments_index_glue).filter(( val)=> { return val.length&&val!=='exists'&&val!=='with-count'; }).join('.'),
toReplace=$(itemSelector);
var replaceWith=$(v).filter(itemSelector);
if(!replaceWith.length){
replaceWith=$(v).find(itemSelector);
}
if(toReplace.length&&replaceWith.length){
toReplace.replaceWith(replaceWith);
}});
}},
url: yith_wcwl_l10n.ajax_url
});
}}
$(document).trigger('woo_variation_gallery_init');
}, 200);
},
onUpdate: function(){
theme.requestTimeout(function(){
var $quickviewEl=$('.quickview-wrap-' + pid);
if($quickviewEl.length==0&&$('.woocommerce-wishlist').length){
$quickviewEl=$('.quickview-wrap');
}
if(js_porto_vars.use_skeleton_screen.indexOf('quickview')==-1||!js_porto_vars.quickview_skeleton){
porto_woocommerce_init();
}
var $slider=$quickviewEl.find('.product-image-slider');
if(typeof $slider.data('owl.carousel')!='undefined'&&typeof $slider.data('owl.carousel')._invalidated!='undefined')
$slider.data('owl.carousel')._invalidated.width=true;
$slider.trigger('refresh.owl.carousel');
$(document.body).trigger('porto_init_countdown', [$quickviewEl]);
}, 300);
}};
if(js_porto_vars.use_skeleton_screen.indexOf('quickview')!=-1&&js_porto_vars.quickview_skeleton){
delete args['href'];
delete args['ajax'];
args['type']='inline';
$.fancybox.open(js_porto_vars.quickview_skeleton,
args
);
$.ajax({
url: theme.ajax_url,
type: 'post',
dataType: 'html',
data: {
action: 'porto_product_quickview',
variation_flag: typeof wc_add_to_cart_variation_params!=='undefined',
pid: pid,
nonce: js_porto_vars.porto_nonce
},
success: function(res){
var $res=$(res);
$res.imagesLoaded(function(){
$('.skeleton-body.product').replaceWith($res);
theme.WooQtyField.initialize();
$(window).trigger('resize');
args['afterShow'].call(false);
});
}});
}else{
if(typeof $.fancybox=='function'){
$.fancybox(args);
}else if(typeof $.fancybox=='object'&&$.fancybox.version&&0===$.fancybox.version.indexOf('3') ){
args['src']=args['href'];
args['ajax']['settings']={
data: args['ajax']['data']
};
$.fancybox.open(args);
}}
}
if($.fn.fancybox){
init_quick_view_window();
}else if(!$('#porto-script-jquery-fancybox').length){
var js1=document.createElement('script');
js1.id='porto-script-jquery-fancybox';
$(js1).appendTo('body').on('load', function(){
init_quick_view_window();
}).attr('src', js_porto_vars.ajax_loader_url.replace('/images/ajax-loader@2x.gif', '/js/libs/jquery.fancybox.min.js') );
}
return false;
});
if(typeof wc_add_to_cart_params!='undefined'){
$(document.body).on('click', '.single-product .single_add_to_cart_button:not(.disabled, .wpcbn-btn)', function(e){
if($(this).closest('.single-product').hasClass('product-type-external')||$(this).closest('.single-product').hasClass('product-type-grouped') ){
return true;
}
if($(this).hasClass('readmore') ){
return true;
}
e.preventDefault();
var $button=$(this),
product_id=$button.val(),
variation_id=$button.closest('form').find('input[name="variation_id"]').val(),
quantity=$button.closest('form').find('input[name="quantity"]').val();
if($button.hasClass('loading') ){
return false;
}
$button.removeClass('added');
$button.addClass('loading');
$button.parent().addClass('porto-ajax-loading');
if(!$button.siblings('.porto-loading-icon').length){
let $last=$button.siblings('button:last-of-type');
$('<span class="porto-loading-icon"></span>').insertAfter($last.length ? $last:$button);
}
var data={
action: 'porto_add_to_cart',
product_id: variation_id ? variation_id:product_id,
quantity: quantity
};
if(variation_id){
var $variations=$button.closest('form').find('.variations select');
if($variations.length){
$variations.each(function(){
var name=$(this).data('attribute_name'),
val=$(this).val();
if(name&&val){
data[name]=val;
}});
}}
$(document.body).trigger('adding_to_cart', [$button, data]);
$.ajax({
type: 'POST',
url: theme.ajax_url,
data: data,
dataType: 'json',
success: function(response){
$button.parent().removeClass('porto-ajax-loading');
if(!response){
return;
}
if(response.error&&response.product_url){
window.location=response.product_url;
return;
}
if(wc_add_to_cart_params.cart_redirect_after_add==='yes'){
window.location=wc_add_to_cart_params.cart_url;
return;
}
$(document.body).trigger('added_to_cart', [response.fragments, response.cart_hash, $button]);
}});
});
}
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
theme=theme||{};
$.extend(theme, {
WooQtyField: {
initialize: function(){
this.build()
.events();
return this;
},
qty_handler: function(){
var $obj=$(this);
if($obj.closest('.quantity').next('.add_to_cart_button[data-quantity]').length){
var count=$obj.val();
if(count){
$obj.closest('.quantity').next('.add_to_cart_button[data-quantity]').attr('data-quantity', count);
}}
},
build: function(){
var self=this;
$('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('<button type="button" value="+" class="plus">+</button>').prepend('<button type="button" value="-" class="minus">-</button>');
$('input.qty:not(.product-quantity input.qty)').each(function(){
var min=parseFloat($(this).attr('min') );
if(min&&min > 0&&parseFloat($(this).val()) < min){
$(this).val(min);
}});
$('input.qty:not(.product-quantity input.qty)').off('change', self.qty_handler).on('change', self.qty_handler);
$(document).off('click', '.quantity .plus, .quantity .minus').on('click', '.quantity .plus, .quantity .minus', function(){
var $qty=$(this).closest('.quantity').find('.qty'),
currentVal=parseFloat($qty.val()),
max=parseFloat($qty.attr('max') ),
min=parseFloat($qty.attr('min') ),
step=$qty.attr('step');
if(!currentVal||currentVal===''||currentVal==='NaN') currentVal=0;
if(max===''||max==='NaN') max='';
if(min===''||min==='NaN') min=0;
if(step==='any'||step===''||step===undefined||parseFloat(step)==='NaN') step=1;
if($(this).is('.plus') ){
if(max&&(max==currentVal||currentVal > max) ){
$qty.val(max);
}else{
$qty.val(currentVal + parseFloat(step) );
}}else{
if(min&&(min==currentVal||currentVal < min) ){
$qty.val(min);
}else if(currentVal > 0){
$qty.val(currentVal - parseFloat(step) );
}}
$qty.trigger('change');
});
return self;
},
events: function(){
var self=this;
$(document).ajaxComplete(function(event, xhr, options){
self.build();
});
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
theme=theme||{};
var duration=300;
$.extend(theme, {
WooVariationForm: {
initialize: function(){
this.init().events();
return this;
},
init: function(){
$('.variations_form').each(function(){
var $variation_form=$(this),
$reset_variations=$variation_form.find('.reset_variations');
if($reset_variations.css('visibility')=='hidden')
$reset_variations.hide();
});
return this;
},
events: function(){
var self=this;
$(document).on('check_variations', '.variations_form', function(event, exclude, focus){
var $variation_form=$(this),
$reset_variations=$variation_form.find('.reset_variations');
if($reset_variations.css('visibility')=='hidden')
$reset_variations.hide();
});
$(document).on('reset_image', '.variations_form', function(event){
var $product=$(this).closest('.product, .product-col'),
$product_img=$product.find('div.product-images .woocommerce-main-image');
if($product.hasClass('porto-tb-item') ){
$product_img=$product.find('.porto-tb-featured-image img').eq(0);
}else if($product.hasClass('product-col') ){
$product_img=$product.find('div.product-image .inner img:first-child');
}
var o_src=$product_img.attr('data-o_src'),
o_title=$product_img.attr('data-o_title'),
o_href=$product_img.attr('data-o_href'),
$thumb_img=$product.find('.woocommerce-main-thumb'),
o_thumb_src=$thumb_img.attr('data-o_src');
var $image_slider=$product.find('.product-image-slider'),
$thumbs_slider=$product.find('.product-thumbs-slider'),
links;
if($image_slider.length){
$image_slider.trigger('to.owl.carousel', [0, duration, true]);
links=$image_slider.data('links');
}
if($thumbs_slider.length){
$thumbs_slider.trigger('to.owl.carousel', [0, duration, true]);
$thumbs_slider.find('.owl-item:eq(0)').trigger('click');
}
if(o_src){
$product_img
.attr('src', o_src)
.attr('srcset', '')
.attr('alt', o_title)
.attr('href', o_href);
$product_img.each(function(){
var elevateZoom=$(this).data('elevateZoom');
if(typeof elevateZoom!='undefined'){
elevateZoom.swaptheimage($(this).attr('src'), $(this).attr('src') );
}});
if(theme.product_image_popup&&typeof links!='undefined'){
links[0].src=o_href;
links[0].title=o_title;
}}
if(o_thumb_src){
$thumb_img.attr('src', o_thumb_src);
}});
$(document).on('found_variation', '.variations_form', function(event, variation){
if(typeof variation=='undefined'){
return;
}
var $product=$(this).closest('.product, .product-col'),
$image_slider=$product.find('.product-image-slider'),
$thumbs_slider=$product.find('.product-thumbs-slider'),
links;
if($image_slider.length){
$image_slider.trigger('to.owl.carousel', [0, duration, true]);
links=$image_slider.data('links');
}
if($thumbs_slider.length){
$thumbs_slider.trigger('to.owl.carousel', [0, duration, true]);
$thumbs_slider.find('.owl-item:eq(0)').trigger('click');
}
var $shop_single_image=$product.find('div.product-images .woocommerce-main-image').length ? $product.find('div.product-images .woocommerce-main-image'):$('.single-product div.product-images .woocommerce-main-image'),
productimage=$shop_single_image.attr('data-o_src'),
imagetitle=$shop_single_image.attr('data-o_title'),
imagehref=$shop_single_image.attr('data-o_href'),
$shop_thumb_image=$product.find('.woocommerce-main-thumb'),
thumbimage=$shop_thumb_image.attr('data-o_src'),
variation_image=variation.image_src,
variation_link=variation.image_link,
variation_title=variation.image_title,
variation_thumb=variation.image_thumb;
if($product.hasClass('porto-tb-item') ){
$shop_single_image=$product.find('.porto-tb-featured-image img').eq(0);
productimage=$shop_single_image.attr('data-o_src');
variation_image=variation.image.thumb_src;
}else if($product.hasClass('product-col') ){
$shop_single_image=$product.find('div.product-image .inner img:first-child');
productimage=$shop_single_image.attr('data-o_src');
variation_image=variation.image.thumb_src;
}
if(!productimage){
productimage=$shop_single_image.attr('data-oi') ? $shop_single_image.attr('data-oi'):(( !$shop_single_image.attr('src') ) ? '':$shop_single_image.attr('src') );
$shop_single_image.attr('data-o_src', productimage);
}
if(!imagehref){
imagehref=(!$shop_single_image.attr('href') ) ? '':$shop_single_image.attr('href');
$shop_single_image.attr('data-o_href', imagehref);
}
if(!imagetitle){
imagetitle=(!$shop_single_image.attr('alt') ) ? '':$shop_single_image.attr('alt');
$shop_single_image.attr('data-o_title', imagetitle);
}
if(!thumbimage){
thumbimage=$shop_thumb_image.attr('data-oi') ? $shop_thumb_image.attr('data-oi'):(( !$shop_thumb_image.attr('src') ) ? '':$shop_thumb_image.attr('src') );
$shop_thumb_image.attr('data-o_src', thumbimage);
}
if(variation_image){
$shop_single_image.attr('src', variation_image);
$shop_single_image.attr('srcset', '');
$shop_single_image.attr('alt', variation_title);
$shop_single_image.attr('href', variation_link);
$shop_thumb_image.attr('src', variation_thumb);
if(theme.product_image_popup&&typeof links!='undefined'){
links[0].src=variation_link;
links[0].title=variation_title;
}}else{
$shop_single_image.attr('src', productimage);
$shop_single_image.attr('srcset', '');
$shop_single_image.attr('alt', imagetitle);
$shop_single_image.attr('href', imagehref);
$shop_thumb_image.attr('src', thumbimage);
if(theme.product_image_popup&&typeof links!='undefined'){
links[0].src=imagehref;
links[0].title=imagetitle;
}}
$shop_single_image.each(function(){
var elevateZoom=$(this).data('elevateZoom');
if(typeof elevateZoom!='undefined'){
elevateZoom.swaptheimage($(this).attr('src'), $(this).attr('src') );
}});
});
var porto_fb_update_trigger=null;
$(document).on('found_variation reset_image', '.variations_form', function(event, variation){
if($(this).closest('.fancybox-inner').length&&$.fancybox){
$(window).off('resize.fb', $.fancybox.update);
if(porto_fb_update_trigger){
theme.deleteTimeout(porto_fb_update_trigger);
}
porto_fb_update_trigger=theme.requestTimeout(function(){
$(window).on('resize.fb', $.fancybox.update);
$.fancybox.reposition();
porto_fb_update_trigger=false;
}, 600);
}});
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
theme=theme||{};
$.extend(theme, {
WooEvents: {
initialize: function(){
this.events();
return this;
},
events: function(){
var self=this;
$(document).on('click', '.wcml-switcher li', function(){
if($(this).parent().attr('disabled')=='disabled')
return;
var currency=$(this).attr('rel');
self.loadCurrency(currency);
});
$(document).on('click', '.woocs-switcher li', function(){
if($(this).parent().attr('disabled')=='disabled')
return;
var currency=$(this).attr('rel');
self.loadWoocsCurrency(currency);
});
return self;
},
loadCurrency: function(currency){
$('.wcml-switcher').attr('disabled', 'disabled');
$('.wcml-switcher').append('<li class="loading"></li>');
var data={ action: 'wcml_switch_currency', currency: currency };
$.ajax({
type: 'post',
url: theme.ajax_url,
data: {
action: 'wcml_switch_currency',
currency: currency
},
success: function(response){
$('.wcml-switcher').removeAttr('disabled');
$('.wcml-switcher').find('.loading').remove();
window.location=window.location.href;
}});
},
loadWoocsCurrency: function(currency){
$('.woocs-switcher').attr('disabled', 'disabled');
$('.woocs-switcher').append('<li class="loading"></li>');
var l=window.location.href;
l=l.split('?');
l=l[0];
var string_of_get='?';
woocs_array_of_get.currency=currency;
if(Object.keys(woocs_array_of_get).length > 0){
jQuery.each(woocs_array_of_get, function(index, value){
string_of_get=string_of_get + "&" + index + "=" + value;
});
}
window.location=l + string_of_get;
},
removeParameterFromUrl: function(url, parameter){
return url
.replace(new RegExp('[?&]' + parameter + '=[^&#]*(#.*)?$'), '$1')
.replace(new RegExp('([?&])' + parameter + '=[^&]*&'), '$1');
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
$(document).ready(function(){
if(typeof theme.WooQtyField!=='undefined'){
theme.WooQtyField.initialize();
}
if(typeof theme.WooQuickView!=='undefined'){
theme.WooQuickView.initialize();
}
if(typeof theme.WooEvents!=='undefined'){
theme.WooEvents.initialize();
}
if(!('ontouchstart' in document) ){
$('.mini-cart').on('hide.bs.dropdown', function(){
return false;
});
}else{
$('#mini-cart .cart-head').on('click', function(e){
$(this).parent().toggleClass('open');
});
$('html,body').on('click', function(e){
if($('#mini-cart').hasClass('open')&&!$(e.target).closest('#mini-cart').length){
$('#mini-cart').removeClass('open');
}});
}
$(document).on('tabactivate', '.woocommerce-tabs', function(e, ui){
var label=$(ui).attr('data-target');
var panel=$(ui).closest('.woocommerce-tabs').find('[aria-labelledby="' + label + '"');
theme.refreshVCContent(panel);
});
$(document).find('.pwb-columns a[href="' + window.location.href + '"').each(function(){
$(this).addClass('active');
})
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $, undefined){
$(document).ready(function(){
if(! theme.isMobile()){
$(document).on('yith_wcwl_init_after_ajax', function(){
$('.product-col .add_to_wishlist:not([data-bs-original-title]), .product-col .yith-wcwl-wishlistaddedbrowse > a:not([data-bs-original-title]), .product-col .yith-wcwl-wishlistexistsbrowse > a:not([data-bs-original-title])').each(function(){
let _this=$(this);
if(! _this.attr('title') ){
_this.attr('title', _this.text().trim());
}
_this.tooltip();
});
});
}
theme.WooVariationForm.initialize();
if(typeof theme.initAsync=='function'){
theme.WooProductImageSlider.initialize();
porto_woocommerce_init();
}else{
$.when(theme.asyncDeferred).done(function(){
theme.WooProductImageSlider.initialize();
porto_woocommerce_init();
});
}
$(document).on('yith_wccl_product_gallery_loaded', function(){
theme.WooProductImageSlider.initialize();
});
$(window).on('vc_reload', function(){
porto_woocommerce_init();
$('.type-product').addClass('product');
});
$(document).on('click', '.porto-product-filters-toggle a', function(e){
e.preventDefault();
$(this).closest('.porto-product-filters-toggle').toggleClass('opened');
var $products_wrapper=$(this).closest('#main').find('.main-content').find('ul.products'), offset, $main=$(this).closest('#main').find('.main-content-wrap');
$main.toggleClass('opened');
if($main.hasClass('opened') ){
offset=-1;
}else{
offset=1;
}
if($products_wrapper.hasClass('grid') ){
var cols_lg_index=0, cols_md_index=0, width_lg_index=0, width_md_index=0;
for(var i=1; i <=8; i++){
if(!cols_lg_index&&$products_wrapper.hasClass('ccols-xl-' + i) ){
cols_lg_index=i;
if(i + offset >=1){
$products_wrapper.removeClass('ccols-xl-' + i);
$products_wrapper.addClass('ccols-xl-' +(i + offset) );
}}
if(!cols_md_index&&$products_wrapper.hasClass('ccols-lg-' + i) ){
cols_md_index=i;
if(i + offset >=1){
$products_wrapper.removeClass('ccols-lg-' + i);
if(offset===-1){
$products_wrapper.addClass('ccols-md-' + i);
}
$products_wrapper.addClass('ccols-lg-' +(i + offset) );
}}
if(!width_lg_index&&$products_wrapper.hasClass('pwidth-lg-' + i) ){
width_lg_index=i;
if(i + offset >=1){
$products_wrapper.removeClass('pwidth-lg-' + i);
$products_wrapper.addClass('pwidth-lg-' +(i + offset) );
}}
if(!width_md_index&&$products_wrapper.hasClass('pwidth-md-' + i) ){
width_md_index=i;
if(i + offset >=1){
$products_wrapper.removeClass('pwidth-md-' + i);
$products_wrapper.addClass('pwidth-md-' +(i + offset) );
}}
}}
theme.requestTimeout(function(){
$(window).trigger('scroll');
$(document).find('.owl-carousel').each(function(e){
var $this=$(this);
if($this.data('owl.carousel') ){
$this.trigger('refresh.owl.carousel');
}});
$(document).find('.swiper-container').each(function(e){
var $this=$(this),
$instance=$this.data('swiper');
if($instance){
$instance.update();
}});
}, 300);
if($main.hasClass('opened') ){
$.cookie('porto_horizontal_filter', 'opened');
}else{
$.cookie('porto_horizontal_filter', 'closed');
}
theme.refreshStickySidebar(true);
return false;
});
if($.cookie&&'opened'==$.cookie('porto_horizontal_filter')&&$('#main .porto-products-filter-body').length&&!theme.isTablet()){
$('.porto-product-filters-toggle a').trigger('click');
$('#main .porto-products-filter-body [data-plugin-sticky]:not(.manual)').addClass('manual');
setTimeout(function(){
var $obj=$('#main .porto-products-filter-body [data-plugin-sticky].manual'),
pluginOptions=$obj.data('plugin-options');
$obj.removeClass('manual').themeSticky(pluginOptions);
theme.requestTimeout(function(){
$(window).trigger('scroll');
}, 100);
}, 500);
}
$(document).on('click', '.porto-product-filters.style2 .widget-title', function(e){
e.preventDefault();
if($(this).next().is(':hidden') ){
$('.porto-product-filters.style2 .widget-title').next().hide();
$('.porto-product-filters.style2 .widget').removeClass('opened');
$(this).next().show();
$(this).next().find('input[type="text"]:first-child').focus();
}else{
$(this).next().hide();
}
$(this).parent().toggleClass('opened');
return false;
});
$('body').on('click', function(e){
if(!$(e.target).is('.porto-product-filters')&&!$(e.target).is('.porto-product-filters *') ){
$('.porto-product-filters.style2 .widget-title').next().hide();
$('.porto-product-filters.style2 .widget').removeClass('opened');
}});
$('body').on('click', '#login-form-popup form .woocommerce-Button', function(e){
var $this=$(this),
$form=$this.closest('form'),
isLogin=$this.hasClass('login-btn');
if(!isLogin&&!$this.hasClass('register-btn') ){
isLogin=$form.hasClass('login');
}
$form.find('#email').val($form.find('#username').val());
$form.find('p.status').show().text(js_porto_vars.login_popup_waiting_msg ? js_porto_vars.login_popup_waiting_msg:'Please wait...').addClass('loading');
$form.find('button[type=submit]').attr('disabled', 'disabled');
$.ajax({
type: 'POST',
dataType: 'json',
url: theme.ajax_url,
data: $form.serialize() + '&action=porto_account_login_popup_' +(isLogin ? 'login':'register'),
success: function(data){
$form.find('p.status').html(data.message.replace('/<script.*?\/script>/s', '') ).removeClass('loading');
$form.find('button[type=submit]').removeAttr('disabled');
if(data.loggedin===true){
window.location.reload();
}}
});
e.preventDefault();
});
var $ajax_tab_cache={};
$(document).on('click', '.porto-products.show-category .product-categories a', function(e){
e.preventDefault();
var $this=$(this), $form=$this.closest('.porto-products').find('.pagination-form'), id=$this.closest('.porto-products').attr('id'), group=[];
$(this).parent().siblings().removeClass('current');
$(this).parent().addClass('current');
if(typeof $this.data('sort_id')!='undefined'){
$form.find('input[name="orderby"]').val($this.data('sort_id') );
group=$this.data('sort_id');
$form.find('input[name="category"]').val('');
}
if(typeof $this.data('cat_id')!='undefined'){
if(typeof $this.data('sort_id')=='undefined'){
$form.find('input[name="orderby"]').val($form.find('input[name="original_orderby"]').val());
group=$form.find('input[name="original_orderby"]').val();
}
if(typeof $form.data('original_cat_id')=='undefined'){
$form.data('original_cat_id', $form.find('input[name="category"]').val());
group=$form.find('input[name="category"]').val();
}
if($this.data('cat_id') ){
$form.find('input[name="category"]').val($this.data('cat_id') );
group=$this.data('cat_id');
}else{
if($form.data('original_cat_id') ){
$form.find('input[name="category"]').val($form.data('original_cat_id') );
group=$form.data('original_cat_id');
}else{
$form.find('input[name="category"]').val('');
group='';
}}
}
var data=$form.serialize() + '&product-page=1&action=porto_woocommerce_shortcodes_products&nonce=' + js_porto_vars.porto_nonce;
$this.closest('.porto-products').find('ul.products').trigger('porto_update_products', [data, '', $this, id, group]);
});
$(document).on('click', '.porto-products .page-numbers a', function(e){
var $this=$(this), pagination_style,
$shop_container=$this.closest('.porto-products').find('ul.products'),
cur_page=$shop_container.data('cur_page'),
max_page=$shop_container.data('max_page'),
$form=$this.closest('.porto-products').find('.pagination-form');
e.preventDefault();
if($this.closest('.pagination').hasClass('load-more') ){
if(!cur_page||!max_page||++cur_page > max_page){
return;
}
pagination_style='load_more';
$this.data('text', $this.text());
$this.text(js_porto_vars.loader_text);
}else{
var url=new RegExp("product-page(=|/)([^(&|/)]*)", "i").exec(this.href);
cur_page=url&&unescape(url[2])||"";
pagination_style='default';
}
var page_var=cur_page ? '&product-page=' + escape(cur_page):'', data=$form.serialize() + page_var + '&action=porto_woocommerce_shortcodes_products&nonce=' + js_porto_vars.porto_nonce;
$shop_container.trigger('porto_update_products', [data, pagination_style, $this]);
if('default'==pagination_style){
theme.scrolltoContainer($shop_container);
}});
$(document).on('porto_update_products', 'ul.products', function(e, data, pagination_style, $obj, id, group){
var $this=$(this);
if(undefined==$ajax_tab_cache[id]||-1==Object.keys($ajax_tab_cache[id]).indexOf(group) ){
porto_ajax_load_products($this, data, pagination_style, $ajax_tab_cache, id, group);
}else{
var response=$ajax_tab_cache[id][group];
$this.css('opacity', 0);
$this.animate({
'opacity': 1,
},
400,
function(){
$this.css('opacity', '');
}
);
porto_ajax_load_products_success($this, response, pagination_style);
}});
var skeletonLoadingTrigger;
$('.skeleton-loading').on('skeleton-loaded', function(){
var $this=$(this);
if(skeletonLoadingTrigger){
theme.deleteTimeout(skeletonLoadingTrigger);
}
porto_woocommerce_variations_init($this);
if($this.hasClass('products')||$this.hasClass('product') ){
$(document).trigger('yith_infs_added_elem');
}
skeletonLoadingTrigger=theme.requestTimeout(function(){
porto_woocommerce_init();
if($('body').hasClass('single-product') ){
theme.WooVariationForm.init();
var $image_slider=$('.product-image-slider');
if($image_slider.length&&$image_slider.data('owl.carousel') ){
$image_slider.trigger('refresh.owl.carousel');
}else{
theme.WooProductImageSlider.initialize();
}
$('.wc-tabs-wrapper, .woocommerce-tabs, #rating').trigger('init');
if($(document.body).hasClass('yith-booking') ){
$(document).trigger('yith-wcbk-init-booking-form');
}}
if($this.find('.widget_shopping_cart_content').length){
$(document.body).trigger('wc_fragment_refresh');
}}, 100);
});
});
var stickyShop=function(){
var $sticky_product_obj=$('.single-product .sticky-product'),
is_elementor_editor=$(document.body).hasClass('elementor-editor-active'),
$sticky_product_form;
var init_sticky_add_to_cart_fn=function($sticky_product_obj, is_elementor_editor){
if(is_elementor_editor&&elementorFrontend&&elementorFrontend.hooks){
elementorFrontend.hooks.addAction('frontend/element_ready/porto_cp_addcart_sticky.default', function($obj){
$sticky_product_obj=$('.single-product .sticky-product');
window.dispatchEvent(new Event('scroll') );
});
}
$sticky_product_form=$('form.cart:visible').eq(0);
window.addEventListener('scroll', function(){
var scrollTop=$(window).scrollTop(),
offset=theme.adminBarHeight() +(theme.StickyHeader.sticky_height > 1 ? theme.StickyHeader.sticky_height:0),
prevScrollPos=$sticky_product_obj.data('prev-pos') ? $sticky_product_obj.data('prev-pos'):0;
if(! $sticky_product_obj.hasClass('show-mobile')&&$(window).width() < 768){
$('body').css('padding-bottom', '');
}else if($sticky_product_form.length&&$sticky_product_form.offset().top + $sticky_product_form.height() / 2 <=scrollTop + offset){
if($('.page-wrapper').hasClass('sticky-scroll-up')&&! $('html').hasClass('porto-search-opened')&&$sticky_product_obj.hasClass('pos-top') ){
if(scrollTop >=prevScrollPos){
$sticky_product_obj.addClass('scroll-down');
}else{
$sticky_product_obj.removeClass('scroll-down');
}
var scrollUpOffset=- theme.StickyHeader.sticky_height;
if('undefined'==typeof(theme.StickyHeader.sticky_height) ){
$sticky_product_obj.data('prev-pos', 0);
}else{
var $transitionOffset=(offset > 100) ? offset:100;
if($('form.cart').offset().top + $sticky_product_obj.outerHeight() + $transitionOffset < scrollTop + offset + scrollUpOffset){
$sticky_product_obj.addClass('sticky-ready');
}else{
$sticky_product_obj.removeClass('sticky-ready');
}
$sticky_product_obj.data('prev-pos', scrollTop);
}}
var porto_progress_obj=$('.porto-scroll-progress.fixed-top.fixed-under-header');
if(porto_progress_obj.length > 0){
offset +=porto_progress_obj.height();
}
$sticky_product_obj.removeClass('hide');
if(!$sticky_product_obj.hasClass('pos-bottom') ){
$sticky_product_obj.css('top', offset);
}else if($sticky_product_obj.hasClass('show-mobile')||(! $sticky_product_obj.hasClass('show-mobile')&&$(window).width() >=768) ){
$('body').css('padding-bottom', $sticky_product_obj.outerHeight());
}}else{
$sticky_product_obj.addClass('hide');
if($sticky_product_obj.hasClass('pos-bottom')&&($sticky_product_obj.hasClass('show-mobile')||(! $sticky_product_obj.hasClass('show-mobile')&&$(window).width() >=768) )){
$('body').css('padding-bottom', '');
}}
}, { passive: true });
$sticky_product_obj.find('.add-to-cart .button').on('click', function(e){
e.preventDefault();
if($sticky_product_obj.find('.add-to-cart .qty').length){
$('.single-product form .quantity .qty').filter(function(){
if($(this).closest('.product-col').length){
return false;
}
return true;
}).val($sticky_product_obj.find('.add-to-cart .qty').val());
}
$('.single-product form .single_add_to_cart_button').filter(function(){
if($(this).closest('.product-col').length){
return false;
}
return true;
}).eq(0).trigger('click');
});
$('.single-product .entry-summary .quantity').clone().prependTo('.single-product .sticky-product .add-to-cart');
var origin_img=$sticky_product_obj.find('.sticky-image img').data('oi') ? $sticky_product_obj.find('.sticky-image img').data('oi'):$sticky_product_obj.find('.sticky-image img').attr('src'),
origin_price=$sticky_product_obj.find('.price').html(),
origin_stock=$sticky_product_obj.find('.availability').html(),
is_variation=false;
$(document).on('found_variation reset_data', '.variations_form', function(e, obj){
if($(e.currentTarget).closest('.product-col').length==0){
if(obj){
is_variation=true;
$sticky_product_obj.find('.sticky-image img').attr('src', obj.image_thumb ? obj.image_thumb:origin_img);
$sticky_product_obj.find('.price').replaceWith(obj.price_html);
$sticky_product_obj.find('.availability').html(obj.availability_html ? obj.availability_html:origin_stock);
}else if(is_variation){
is_variation=false;
$sticky_product_obj.find('.sticky-image img').attr('src', origin_img);
$sticky_product_obj.find('.price').html(origin_price);
$sticky_product_obj.find('.availability').html(origin_stock);
}}
});
};
if($sticky_product_obj.length||is_elementor_editor){
init_sticky_add_to_cart_fn($sticky_product_obj, is_elementor_editor);
}else if($('div.product.skeleton-loading').length){
$('div.product.skeleton-loading').on('skeleton-loaded', function(){
$sticky_product_obj=$('.single-product .sticky-product');
init_sticky_add_to_cart_fn($sticky_product_obj, is_elementor_editor);
});
}else{
$(document.body).on('porto_elementor_editor_init', function(){
var $sticky_product_obj=$('.single-product .sticky-product'),
is_elementor_editor=$(document.body).hasClass('elementor-editor-active');
if($sticky_product_obj.length||is_elementor_editor){
init_sticky_add_to_cart_fn($sticky_product_obj, is_elementor_editor);
}});
}
if(1===$('.shop-loop-before').length){
var porto_progress_obj=$('.porto-scroll-progress.fixed-top.fixed-under-header'),
porto_progress_height=0;
if(porto_progress_obj.length > 0){
var flag=false;
if(porto_progress_obj.is(':hidden') ){
porto_progress_obj.show();
flag=true;
}
porto_progress_height=porto_progress_obj.height();
if(flag){
porto_progress_obj.hide();
}}else{
porto_progress_height=0;
}
var init_filter_sticky=function(){
var $obj=$('.shop-loop-before'),
prevScrollPos=$obj.data('prev-pos') ? $obj.data('prev-pos'):0,
scrollUpOffset=0,
$pageWrapper=$('.page-wrapper');
if('none'==$obj.css('display') ){
return;
}
if(!$obj.prev('.filter-placeholder').length){
$('<div class="filter-placeholder m-0"></div>').insertBefore($obj);
}
var $ph=$obj.prev('.filter-placeholder'),
scrollTop=$(window).scrollTop(),
offset=theme.adminBarHeight() + theme.StickyHeader.sticky_height + porto_progress_height - 1,
objHeight=$obj.outerHeight() + parseInt($obj.css('margin-bottom') );
if($('.page-wrapper').hasClass('sticky-scroll-up') ){
if(scrollTop >=prevScrollPos){
$obj.addClass('scroll-down');
}else{
$obj.removeClass('scroll-down');
}
scrollUpOffset=- theme.StickyHeader.sticky_height;
if('undefined'==typeof(theme.StickyHeader.sticky_height) ){
$obj.data('prev-pos', 0);
}else{
var $transitionOffset=(offset > 100) ? offset:100;
if($ph.offset().top + objHeight + $transitionOffset < scrollTop + offset + scrollUpOffset){
$obj.addClass('sticky-ready');
}else{
$obj.removeClass('sticky-ready');
}
$obj.data('prev-pos', scrollTop);
}}
if(( $ph.offset().top + objHeight < scrollTop + offset + scrollUpOffset) ){
if(! $pageWrapper.hasClass('sticky-scroll-up')||($pageWrapper.hasClass('sticky-scroll-up')&&0!==prevScrollPos) ){
$ph.css('height', objHeight);
$obj.css('top', offset);
$obj.addClass('sticky');
}}else{
$ph.css('height', '');
$obj.removeClass('sticky').css('top', '');
}};
if(window.innerWidth < 992){
window.removeEventListener('scroll', init_filter_sticky);
window.addEventListener('scroll', init_filter_sticky, { passive: true });
init_filter_sticky();
}
var request_timer=null,
old_win_width=window.innerWidth;
$(window).on('resize', function(){
if(old_win_width!=window.innerWidth){
if(request_timer){
theme.deleteTimeout(request_timer);
request_timer=false;
}
if(window.innerWidth < 992){
request_timer=theme.requestTimeout(function(){
window.removeEventListener('scroll', init_filter_sticky);
window.addEventListener('scroll', init_filter_sticky, { passive: true });
$(window).trigger('scroll');
}, 100);
}else{
window.removeEventListener('scroll', init_filter_sticky);
$('.shop-loop-before').removeClass('sticky').css('top', '').prev('.filter-placeholder').css('height', '');
}
if($sticky_product_obj.length){
$sticky_product_form=$('form.cart:visible').eq(0);
}
old_win_width=window.innerWidth;
}});
}}
if(theme.isReady){
stickyShop();
}
$(document).on('porto_theme_init', stickyShop);
$('.cart-v2 .cart_totals .accordion-toggle.out').removeClass('out');
$(document).ajaxComplete(function(event, xhr, options){
$('.cart-v2 .cart_totals .accordion-toggle.out').each(function(){
if($($(this).attr('href') ).length&&$($(this).attr('href') ).is(':hidden') ){
$(this).removeClass('collapsed');
$($(this).attr('href') ).addClass('show');
}});
});
$('.porto_products_filter_form .btn-submit').on('click', function(e){
e.preventDefault();
var data=$(this).closest('form').serializeArray(),
submit_data='';
for(var i in data){
var param=data[i];
if(param.value){
if(submit_data){
submit_data +='&';
}
submit_data +=param.name + '=' + param.value;
if('min_price'==param.name){
var max_price=$(this).closest('form').find('.porto_dropdown_price_range option:selected').data('maxprice');
if(max_price){
submit_data +='&max_price=' + max_price;
}}
}}
var action_url=$(this).closest('form').attr('action');
location.href=action_url +(-1===action_url.indexOf('?') ? '?':'&') + submit_data;
});
if($('.wishlist_table.responsive').length){
$(window).on('resize', function(){
var media=window.matchMedia('(max-width: 768px)'),
$wishlist_table=$('.wishlist_table.responsive');
if($wishlist_table.hasClass('traditional') ){
if(media.matches){
$wishlist_table.addClass('mobile');
}else{
$wishlist_table.removeClass('mobile');
}}
});
}
if(js_porto_vars.pre_order){
var porto_pre_order={
init: function(){
this.$add_to_cart_btn=$('.product-summary-wrap .single_add_to_cart_button:not(.wpcbn-btn)');
this.add_to_cart_label=this.$add_to_cart_btn.html();
$('.product-summary-wrap form.variations_form').on('show_variation', function(e, v, p){
if(v.porto_pre_order){
porto_pre_order.$add_to_cart_btn.html(v.porto_pre_order_label);
if(v.porto_pre_order_date){
$(this).find('.woocommerce-variation-description').append(v.porto_pre_order_date);
}}else{
porto_pre_order.$add_to_cart_btn.html(porto_pre_order.add_to_cart_label);
}}).on('hide_variation', function(){
porto_pre_order.$add_to_cart_btn.html(porto_pre_order.add_to_cart_label);
});
}};
if($('div.product.skeleton-loading').length){
$('div.product.skeleton-loading').on('skeleton-loaded', function(){
porto_pre_order.init();
});
}else{
porto_pre_order.init();
}}
if($('#header .my-wishlist .wishlist-count').length){
$(document.body).on('added_to_wishlist removed_from_wishlist added_to_cart', function(e){
var $obj=$('#header .my-wishlist .wishlist-count');
if($obj.text()){
$.ajax({
type: 'POST',
dataType: 'json',
url: theme.ajax_url,
data: {
action: 'porto_refresh_wishlist_count',
nonce: js_porto_vars.porto_nonce,
},
success: function(response){
if(response||0===response){
$obj.addClass('count-updating').text(Number(response) );
setTimeout(function(){
$obj.removeClass('count-updating');
}, 1000);
}}
});
}});
}
if($(document.body).hasClass('woocommerce-cart')&&$('.wpcf7 .screen-reader-response').length){
$('.wpcf7 .screen-reader-response').attr('role', '');
}
$('#dokan-store-listing-filter-form-wrap .store-search-input').on('keydown', function(e){
if(e.which&&event.which==13){
$(this).closest('form').find('#apply-filter-btn').trigger('click');
e.preventDefault();
}});
if($.fn.block){
var funcBlock=$.fn.block;
$.fn.block=function(opts){
if(this.hasClass('yith-wcwl-add-to-wishlist') ){
this.children().addClass('pe-none opacity-6');
return this;
}
if(this.is('.woocommerce-checkout') ){
this.append('<div class="loader-container d-block"><div class="loader"><i class="porto-ajax-loader"></i></div></div>');
}
return funcBlock.call(this, opts);
}
var funcUnblock=$.fn.unblock;
$.fn.unblock=function(opts){
if(this.hasClass('yith-wcwl-add-to-wishlist') ){
this.children().removeClass('pe-none opacity-6');
return this;
}
funcUnblock.call(this, opts);
this.is('.processing')||(this.is('.woocommerce-checkout')&&this.children('.loader-container').remove());
return this;
}}
$('body').on('click', '.single_add_to_cart_button.scroll-to-sticky', function (e){
$('html, body').animate({ scrollTop: $('form.cart').offset().top - 200 }
);
})
})(window.theme, jQuery);
(function(theme, $){
$('body').on('click', '.yith_woocompare_colorbox #cboxClose, #cboxOverlay', function(){
$('html').css({ 'overflow': '', 'margin-right': '' });
});
})(window.theme, window.jQuery);
})();
function porto_woocommerce_init($wrap){
'use strict';
if(!$wrap){
$wrap=jQuery(document.body);
}
(function($){
if($.fn.themeWooWidgetToggle){
$(function(){
$wrap.find('.widget_filter_by_brand, .widget_product_categories, .widget_price_filter, .widget_layered_nav, .widget_layered_nav_filters, .widget_rating_filter, .widget-woof, .porto_widget_price_filter, #wcfmmp-store .widget.sidebar-box, #wcfmmp-store-lists-sidebar .sidebar-box').find('.widget-title').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeWooWidgetToggle(opts);
});
});
}
if($.fn.themeWooWidgetAccordion){
$(function(){
$wrap.find('.widget_filter_by_brand, .widget_product_categories, .widget_price_filter, .widget_layered_nav, .widget_layered_nav_filters, .widget_rating_filter, .widget-woof, #wcfmmp-store .widget.sidebar-box, #wcfmmp-store-lists-sidebar .sidebar-box').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeWooWidgetAccordion(opts);
});
});
}
if($.fn.themeWooProductsSlider){
$(function(){
var $direct_carousels=$wrap.find('.products-slider:not(.manual)').filter(function(){
if($(this).closest('.porto-carousel:not(.owl-loaded)').length){
return false;
}
return true;
});
var $parent_carousel=$wrap.find('.porto-carousel:not(.owl-loaded)').filter(function(){
if($(this).find('.products-slider:not(.manual)').length){
return true;
}
return false;
});
if($parent_carousel.length){
$parent_carousel.one('initialized.owl.carousel', function(){
$(this).find('.products-slider:not(.manual)').each(function(){
var $this=$(this);
$this.themeWooProductsSlider($this.data('plugin-options') );
});
});
}
$direct_carousels.each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
setTimeout(function(){
$this.themeWooProductsSlider(opts);
}, 0);
});
});
}
if(! theme.isMobile()){
$wrap.find('.product-col .quickview, .product-col .add_to_cart_read_more, .product-col .add_to_cart_button, .product-col a.compare, .product-col .add_to_wishlist, .product-col .yith-wcwl-wishlistaddedbrowse > a, .product-col .yith-wcwl-wishlistexistsbrowse > a').each(function(){
let _this=$(this);
let $productCol=_this.closest('.product-col');
if(_this.closest('.porto-tb-woo-link').hasClass('no-tooltip') ){
return;
}
if(_this.hasClass('add_to_cart_read_more')||_this.hasClass('add_to_cart_button') ){
if($productCol.hasClass('product-wq_onimage')||$productCol.hasClass('product-onimage')||$productCol.hasClass('product-outimage')||$productCol.hasClass('product-default') ){
return;
}
if(_this.closest('ul.products').hasClass('list') ){
return;
}}
if(_this.hasClass('quickview') ){
if($productCol.hasClass('product-wq_onimage')||$productCol.hasClass('product-onimage3')||$productCol.hasClass('product-onimage2')||$productCol.hasClass('product-onimage')||$productCol.hasClass('product-outimage_aq_onimage') ){
return;
}}
if(! _this.attr('title') ){
_this.attr('title', _this.text().trim());
}
_this.tooltip();
});
}})(jQuery);
}
function porto_woocommerce_variations_init($parent_obj){
'use strict';
theme.requestTimeout(function(){
var form_variation=$parent_obj.find('form.variations_form:not(.vf_init)');
if(form_variation.length&&jQuery.fn.wc_variation_form){
form_variation.each(function(){
var data_a=jQuery._data(this, 'events');
if(!data_a||!data_a['show_variation']){
jQuery(this).wc_variation_form();
}});
}}, 100);
}
function porto_ajax_load_products($obj, data, pagination_style, $ajax_tab_cache, id, group){
'use strict';
(function($){
if($obj.hasClass('loading') ){
return;
}
$obj.addClass('loading');
if('load_more'!=pagination_style){
$obj.addClass('yith-wcan-loading');
if(!$obj.children('.porto-loading-icon').length){
$obj.append('<i class="porto-loading-icon"></i>');
}}
if($ajax_tab_cache[id]==undefined){
$ajax_tab_cache[id]={};}
$.ajax({
url: theme.ajax_url,
data: data,
type: 'post',
success: function(response){
if($(response).length){
$ajax_tab_cache[id][group]=$(response).html();
}else{
$ajax_tab_cache[id][group]='';
}
porto_ajax_load_products_success($obj, response, pagination_style);
},
complete: function(){
$obj.removeClass('loading');
}});
})(jQuery);
}
function porto_ajax_load_products_success($obj, success, pagination_style){
'use strict';
(function($){
let _successProducts=$(success).find('ul.products');
if($obj.data('cur_page')&&_successProducts.data('cur_page') ){
$obj.data('cur_page', _successProducts.data('cur_page') );
}
if(!($obj.hasClass('grid-creative')&&typeof $obj.attr('data-plugin-masonry')!='undefined') ){
_successProducts.children(':not(.grid-col-sizer)').addClass('fadeInUp animated');
}
if('load_more'==pagination_style){
$obj.append(_successProducts.html());
}else{
if($obj.hasClass('owl-carousel') ){
$obj.parent().css('min-height', $obj.parent().height());
}
if($obj.hasClass('grid-creative')&&typeof $obj.attr('data-plugin-masonry')!='undefined'){
$obj.isotope('remove', $obj.children());
$obj.find('.grid-col-sizer').remove();
var newItems=_successProducts.children();
$obj.append(newItems);
$obj.isotope('appended', newItems);
$obj.imagesLoaded(function(){
$obj.isotope('layout');
});
}else{
if($(success).length){
$obj.html(_successProducts.html());
}else{
$obj.html('');
}}
}
if($obj.hasClass('owl-carousel')&&$.fn.themeWooProductsSlider){
$obj.trigger('destroy.owl.carousel');
theme.requestTimeout(function(){
var pluginOptions=$obj.data('plugin-options'), opts;
if(pluginOptions)
opts=pluginOptions;
$obj.data('__wooProductsSlider', '').themeWooProductsSlider(opts);
$obj.parent().css('min-height', '');
}, 100);
}
if($obj.closest('.porto-products').find('.shop-loop-after').length){
if($(success).find('.shop-loop-after').length){
$obj.closest('.porto-products').find('.shop-loop-after').replaceWith($(success).find('.shop-loop-after') );
}else{
$obj.closest('.porto-products').find('.shop-loop-after').remove();
}}
if(typeof $obj.data('infinitescroll')!='undefined'){
var infinitescrollData=$obj.data('infinitescroll');
infinitescrollData.options.state.currPage=1;
$obj.data('infinitescroll', infinitescrollData);
}
$obj.removeClass('yith-wcan-loading');
if('load_more'==pagination_style&&typeof $obj!='undefined'&&typeof $obj.data('text')!='undefined'){
$obj.text($obj.data('text') );
}
$(document).trigger("yith-wcan-ajax-filtered");
})(jQuery);
};
(function(t,e){t=t||{};var n="__wooWidgetToggle",i=function(t,e){return this.initialize(t,e)};i.defaults={},i.prototype={initialize:function(t,e){return t.data(n)||(this.$el=t,this.setData().setOptions(e).build()),this},setData:function(){return this.$el.data(n,this),this},setOptions:function(t){return this.options=e.extend(!0,{},i.defaults,t,{wrapper:this.$el}),this},build:function(){var e=this.options.wrapper;return e.parent().removeClass("closed"),e.find(".toggle").length||e.append('<span class="toggle"></span>'),e.find(".toggle").on("click",(function(n){return n.preventDefault(),n.stopPropagation(),e.next().is(":visible")?e.parent().addClass("closed"):e.parent().removeClass("closed"),e.next().stop().slideToggle(200),t.refreshVCContent(),!1})),this}},e.extend(t,{WooWidgetToggle:i}),e.fn.themeWooWidgetToggle=function(i){return this.map((function(){var s=e(this);return s.data(n)?s.data(n):new t.WooWidgetToggle(s,i)}))}}).apply(this,[window.theme,jQuery]),function(t,e){t=t||{};var n="__wooWidgetAccordion",i=function(t,e){return this.initialize(t,e)};i.defaults={},i.prototype={initialize:function(t,e){return t.data(n)||(this.$el=t,this.setData().setOptions(e).build()),this},setData:function(){return this.$el.data(n,this),this},setOptions:function(t){return this.options=e.extend(!0,{},i.defaults,t,{wrapper:this.$el}),this},build:function(){var n=this.options.wrapper;return n.find("ul.children").each((function(){var n=e(this);n.prev().hasClass("toggle")||n.before(e('<span class="toggle"></span>').on("click",(function(){var n=e(this);n.next().is(":visible")?n.parent().removeClass("open").addClass("closed"):n.parent().addClass("open").removeClass("closed"),n.next().stop().slideToggle(200),t.refreshVCContent()})))})),n.find('li[class*="current-"]').addClass("current"),this}},e.extend(t,{WooWidgetAccordion:i}),e.fn.themeWooWidgetAccordion=function(i){return this.map((function(){var s=e(this);return s.data(n)?s.data(n):new t.WooWidgetAccordion(s,i)}))}}.apply(this,[window.theme,jQuery]);
let cmplz_cookie_data=[],cmplzCleanCookieInterval;function cmplz_create_element(e,t){e=document.createElement(e);return e.innerHtml=t,e}function cmplz_add_event(e,t,c){document.addEventListener(e,e=>{e.target.closest(t)&&c(e)})}function cmplz_is_hidden(e){return null===e.offsetParent}function cmplz_html_decode(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}function cmplz_trap_focus(){var e;cmplz_banner&&complianz.soft_cookiewall&&(cmplz_original_active_element=document.activeElement,document.body.classList.add("cmplz-banner-active"),cmplz_banner.addEventListener("keydown",cmplz_handle_tab_navigation),0<(e=cmplz_banner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).length)&&e[0].focus()}function cmplz_handle_tab_navigation(e){var t,c;"Tab"===e.key&&0!==(c=cmplz_banner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).length&&(t=c[0],c=c[c.length-1],e.shiftKey?document.activeElement===t&&(e.preventDefault(),c.focus()):document.activeElement===c&&(e.preventDefault(),t.focus()))}function cmplz_release_focus_trap(){if(cmplz_banner&&cmplz_banner.removeEventListener("keydown",cmplz_handle_tab_navigation),document.body.classList.remove("cmplz-banner-active"),cmplz_original_active_element&&cmplz_original_active_element.focus)try{cmplz_original_active_element.focus()}catch(e){document.body.focus()}}function cmplzLoadConsentAreaContent(e,l){document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(t=>{let c=t.getAttribute("data-category"),n=t.getAttribute("data-service");var o=t.getAttribute("data-post_id"),a=t.getAttribute("data-block_id");if(e===c||l===n){let e=new XMLHttpRequest;e.open("GET",complianz.url+"consent-area/"+o+"/"+a,!0),e.setRequestHeader("Content-type","application/json"),e.send(),t.classList.remove("cmplz-placeholder"),e.onload=function(){t.innerHTML=JSON.parse(e.response),t.querySelectorAll("script").forEach(e=>{cmplz_run_script(e.innerHTML,c,n,"inline",e)})}}})}document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(e=>{e.addEventListener("click",e=>{let t=e.target;(t=t.classList.contains("cmplz-consent-area")?t:e.target.closest(".cmplz-consent-area.cmplz-placeholder"))&&(cmplz_set_service_consent(e=t.getAttribute("data-service"),!0),cmplzLoadConsentAreaContent(!1,e),cmplz_enable_category(null,e),cmplz_set_banner_status("dismissed"))}),document.addEventListener("cmplz_enable_category",function(e){cmplzLoadConsentAreaContent(e.detail.category,e.detail.service)})}),document.addEventListener("cmplz_manage_consent_container_loaded",function(){var e,t=window.location.href;-1!=t.indexOf("#")&&(e=-1!=t.lastIndexOf("?")?t.lastIndexOf("?"):void 0,t=t.substring(t.indexOf("#")+1,e),e=document.getElementById(t))&&(t=e.getBoundingClientRect().top+window.pageYOffset-200,window.scrollTo({top:t,behavior:"smooth"}))}),complianz.locale=complianz.locale+"&token="+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),(()=>{function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),c}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)})();let cmplz_banner,cmplz_banner_container=document.getElementById("cmplz-cookiebanner-container"),cmplz_manage_consent_button,cmplz_waiting_inline_scripts=[],cmplz_waiting_scripts=[],cmplz_fired_scripts=[],cmplz_placeholder_class_index=0,cmplz_all_scripts_hook_fired=!1,cmplz_consent_stored_once=!1,cmplz_fired_category_events=["functional"],cmplz_fired_service_events=[],cmplz_categories=["functional","preferences","statistics","marketing"];var cmplz_original_active_element=null;window.cmplz_get_cookie=function(t){if("undefined"!=typeof document){t=complianz.prefix+t;var c=document.cookie.split(";");for(let e=0;e<c.length;e++){var n=c[e].trim();if(n.startsWith(t+"="))return n.substring(t.length+1)}}return""},window.cmplz_set_cookie=function(e,t,c){var n,o,a,l;"undefined"!=typeof document&&(c=void 0===c||c,n="https:"===window.location.protocol?";secure":"",(o=new Date).setTime(o.getTime()+24*complianz.cookie_expiry*60*60*1e3),o=";expires="+o.toGMTString(),a=0<(a=cmplz_get_cookie_domain()).length?";domain="+a:"",c=c?complianz.prefix:"",l=cmplz_get_cookie_path(),document.cookie=""+c+e+`=${t};SameSite=Lax${n}${o}${a};path=`+l)},window.cmplz_in_array=function(e,t){return t.includes(e)},window.cmplz_highest_accepted_category=function(){var t=cmplz_accepted_categories(),c=["marketing","statistics","preferences"];for(let e=0;e<c.length;e++)if(cmplz_in_array(c[e],t))return c[e];return"functional"};let cmplz_set_category_as_body_class=()=>{let c=document.body.classList;for(let e=c.length-1;0<=e;e--)c[e].startsWith("cmplz-")&&"cmplz-document"!==c[e]&&c.remove(c[e]);var e=cmplz_accepted_categories(),e=(Object.values(e).forEach(e=>{"string"==typeof e&&c.add("cmplz-"+e)}),cmplz_get_all_service_consents()),e=(Object.entries(e).forEach(([e,t])=>{t&&c.add("cmplz-"+e)}),c.add("cmplz-"+complianz.region,"cmplz-"+complianz.consenttype),new CustomEvent("cmplz_set_category_as_bodyclass"));document.dispatchEvent(e)},cmplz_append_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(e)),t.appendChild(c)},cmplz_load_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.href=e,t.appendChild(c)};function cmplz_run_script(t,c,n,e,o){var a=document.createElement("script");if("inline"!==e?a.src=t:("string"!=typeof t&&(t=t.innerHTML),a.innerHTML=[t,"cmplzScriptLoaded();"].join("\n")),!cmplz_in_array(t,cmplz_fired_scripts)){cmplzCopyAttributes(o,a);try{"inline"!==e?a.onload=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)}:window.cmplzScriptLoaded=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)},document.head.appendChild(a)}catch(e){throw cmplz_run_after_all_scripts(c,n),"Something went wrong "+e+" while loading "+t}}}function cmplz_maybe_run_waiting_scripts(e,t,c,n){var o=cmplz_get_waiting_script(cmplz_waiting_scripts,e),o=(o&&cmplz_run_script(o,t,c,"src",n),cmplz_get_waiting_script(cmplz_waiting_inline_scripts,e));o&&cmplz_run_script(o,t,c,"inline",n)}let cmplzLazyLoader=()=>{var e=document.querySelectorAll(".cmplz-blocked-content-container");let t=new IntersectionObserver((e,n)=>{e.forEach(e=>{var t,c;e.isIntersecting&&((t=(e=e.target).getAttribute("data-placeholder-image"))&&(c=e.getAttribute("data-placeholder_class_index"),cmplz_append_css(".cmplz-placeholder-"+c+" {background-image: url("+t+") !important;}"),cmplz_set_blocked_content_container_aspect_ratio(e,t,c)),n.unobserve(e))})});e.forEach(e=>{t.observe(e)})};function cmplz_set_blocked_content_container(){document.querySelectorAll(".cmplz-image").forEach(e=>{var t,c,n,o;e.classList.contains("cmplz-processed")||(e.classList.add("cmplz-processed"),t=e.getAttribute("data-service"),c=e.getAttribute("data-category"),(n=e.parentElement).classList.add("cmplz-blocked-content-container"),o=n.getAttribute("data-placeholder_class_index"),"lazy"===e.getAttribute("loading")&&(e.removeAttribute("loading"),e.setAttribute("data-deferlazy",1)),null==o&&(cmplz_placeholder_class_index++,n.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),n.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(n,c,t)))}),document.querySelectorAll(".cmplz-placeholder-element").forEach(t=>{if(!t.classList.contains("cmplz-processed")){t.classList.add("cmplz-processed");var c=t.getAttribute("data-service"),n=t.getAttribute("data-category");let e;null===(e=t.classList.contains("cmplz-iframe")?("lazy"===t.getAttribute("loading")&&(t.removeAttribute("loading"),t.setAttribute("data-deferlazy",1)),t.parentElement):t).getAttribute("data-placeholder_class_index")&&(cmplz_placeholder_class_index++,e.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),e.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(e,n,c),n=t.getAttribute("data-placeholder-image"))&&void 0!==n&&n.length&&e.setAttribute("data-placeholder-image",n)}}),cmplzLazyLoader(),cmplz_has_consent("statistics")&&cmplz_enable_category("statistics"),cmplz_has_consent("marketing")&&cmplz_enable_category("marketing")}function cmplz_insert_placeholder_text(e,n,o){if(!e.querySelector(".cmplz-blocked-content-notice")){let t=complianz.placeholdertext;n=n||"marketing";let c;if(void 0!==t){if(1==complianz.clean_cookies){let e=o?o.replace("-"," "):"";e=e.charAt(0).toUpperCase()+e.slice(1),t=t.replace("{service}",e),(c=cmplz_create_element("div",t)).innerHTML=t,c.classList.add("cmplz-blocked-content-notice");var a=c.querySelector("button"),a=(a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{service}",e)),complianz.page_links[complianz.region]),l=c.querySelector(".cmplz-links a");a&&a.hasOwnProperty("cookie-statement")?(l.setAttribute("href",a["cookie-statement"].url),"{title}"===l.innerText&&(l.innerText=a["cookie-statement"].title)):l&&(l.parentElement.style.display="none")}else{a=cmplz_create_element("button",""),l=complianz.categories.hasOwnProperty(n)?complianz.categories[n]:"marketing";a.innerText=t.replace("{category}",l),a.classList.add("cmplz-blocked-content-notice","cmplz-accept-category","cmplz-accept-"+n),a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{category}",n)),c=a}("VIDEO"!==e.tagName?e:e.parentElement).appendChild(c)}}}function cmplz_set_blocked_content_container_aspect_ratio(t,c,n){var e;null!=t&&((e=new Image).addEventListener("load",function(){var e=this.naturalWidth||1,e=this.naturalHeight*(t.clientWidth/e),e=-1===c.indexOf("placeholder.jpg")?"height:"+e+"px;":"";cmplz_append_css(".cmplz-placeholder-"+n+" {"+e+"}")}),e.src=c)}let cmplzResizeTimer;function cmplz_has_blocked_scripts(){return 0<document.querySelectorAll("script[data-category], script[data-service]").length}function cmplz_enable_category(o,a){1==complianz.tm_categories&&""!==o&&cmplz_run_tm_event(o);var t={},t=(t.category=o,t.categories=cmplz_accepted_categories(),t.region=complianz.region,new CustomEvent("cmplz_before_category",{detail:t}));if(document.dispatchEvent(t),a=void 0!==a?a:"do_not_match","functional"!==(o=""===o?"do_not_match":o)){"marketing"===o&&cmplz_set_integrations_cookies();let e;e="do_not_match"!==a?'.cmplz-blocked-content-notice [data-service="'+a+'"]':1!=complianz.clean_cookies?".cmplz-blocked-content-notice.cmplz-accept-"+o:'.cmplz-blocked-content-notice [data-category="'+o+'"]',document.querySelectorAll(e).forEach(e=>{var t=e.getAttribute("data-service");e.parentNode.classList.contains("cmplz-blocked-content-notice")&&(e=e.parentNode),cmplz_is_service_denied(t)||e.parentNode.removeChild(e)}),document.querySelectorAll('[data-category="'+o+'"], [data-service="'+a+'"]').forEach(t=>{var e=t.getAttribute("data-service");if(!cmplz_is_service_denied(e)&&"functional"!==t.getAttribute("data-category")&&!t.classList.contains("cmplz-activated")){var e=t.tagName;if("LINK"===e){t.classList.add("cmplz-activated");var c=t.getAttribute("data-href");cmplz_load_css(c,o)}else if("IMG"===e){t.classList.add("cmplz-activated");c=t.getAttribute("data-src-cmplz");t.setAttribute("src",c),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),cmplz_remove_placeholder(t)}else if("IFRAME"===e){t.classList.add("cmplz-activated");let e=t.getAttribute("data-src-cmplz");c=t.getAttribute("data-cmplz-target")?t.getAttribute("data-cmplz-target"):"src";"1"===cmplz_get_url_parameter(t.getAttribute(c),"autoplay")&&(e+="&autoplay=1"),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),t.addEventListener("load",()=>{cmplz_remove_placeholder(t)}),t.setAttribute(c,e)}else t.classList.contains("cmplz-placeholder-element")&&(t.classList.add("cmplz-activated"),e=t.getAttribute("data-placeholder_class_index"),t.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+e))}});t=document.querySelectorAll('script[data-category="'+o+'"], script[data-service="'+a+'"]');t.forEach(e=>{var t=e.getAttribute("data-waitfor"),c=e.getAttribute("data-cmplz-src");t&&(c?cmplz_waiting_scripts[t]=c:0<e.innerText.length&&(cmplz_waiting_inline_scripts[t]=e)),e.parentElement&&e.parentElement.removeChild(e)}),t.forEach(e=>{var t,c,n=e.getAttribute("type");!e.classList.contains("cmplz-activated")&&n&&"text/javascript"!==n&&(e.classList.add("cmplz-activated"),(n=e.getAttribute("data-cmplz-src"))?(e.removeAttribute("type"),cmplz_is_waiting_script(cmplz_waiting_scripts,n)||(e.getAttribute("data-post_scribe_id")?(t="#"+e.getAttribute("data-post_scribe_id"),(c=document.querySelector(t))&&(c.innerHtml(""),postscribe(t,"<script src="+n+"><\/script>"))):cmplz_run_script(n,o,a,"src",e))):0<e.innerText.length&&(cmplz_is_waiting_script(cmplz_waiting_inline_scripts,e.innerText)||cmplz_run_script(e.innerText,o,a,"inline",e)))}),cmplz_run_after_all_scripts(o,a)}}function cmplz_remove_placeholder(e){var t,c=e.closest(".cmplz-blocked-content-container");c&&(t=c.getAttribute("data-placeholder_class_index"),c.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+t)),e.classList.remove("cmplz-iframe-styles","cmplz-iframe","video-wrap")}function cmplz_get_waiting_script(e,t){for(var c in e){var n;if(e.hasOwnProperty(c))if(-1!==t.indexOf(c))return n=e[c],delete e[c],n}return!1}function cmplz_array_is_empty(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function cmplz_is_waiting_script(t,c){for(var n in t)if(t.hasOwnProperty(n)){let e=t[n];if("string"!=typeof e&&(e=e.innerText),-1!==c.indexOf(e)||-1!==e.indexOf(c))return!0}return!1}function cmplz_run_after_all_scripts(e,t){var c="do_not_match"!==t&&!cmplz_in_array(t,cmplz_fired_service_events),n="do_not_match"!==e&&!cmplz_in_array(e,cmplz_fired_category_events);(n||c)&&(n&&cmplz_fired_category_events.push(e),c&&cmplz_fired_service_events.push(t),(n={}).category=e,n.service=t,n.categories=cmplz_accepted_categories(),n.services=cmplz_get_all_service_consents(),n.region=complianz.region,c=new CustomEvent("cmplz_enable_category",{detail:n}),document.dispatchEvent(c)),!cmplz_all_scripts_hook_fired&&cmplz_array_is_empty(cmplz_waiting_inline_scripts)&&cmplz_array_is_empty(cmplz_waiting_scripts)&&(n=new CustomEvent("cmplz_run_after_all_scripts",{detail:e,service:t}),document.dispatchEvent(n),cmplz_all_scripts_hook_fired=!0)}window.addEventListener("resize",function(){clearTimeout(cmplzResizeTimer),cmplzResizeTimer=setTimeout(cmplz_set_blocked_content_container,500)},!0),1==complianz.block_ajax_content&&setInterval(function(){cmplz_set_blocked_content_container()},2e3);let cmplz_fired_events=[];function cmplz_run_tm_event(e){-1===cmplz_fired_events.indexOf(e)&&(cmplz_fired_events.push(e),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"cmplz_event_"+e}),e=new CustomEvent("cmplz_tag_manager_event",{detail:e}),document.dispatchEvent(e))}function cmplz_fire_before_categories_consent(e){var t={},e=(t.categories=e,t.region=complianz.region,new CustomEvent("cmplz_before_categories_consent",{detail:t}));document.dispatchEvent(e)}function cmplz_check_cookie_policy_id(){var e=cmplz_get_cookie("policy_id");e&&parseInt(complianz.current_policy_id)!==parseInt(e)&&(cmplz_deny_all(),cmplz_set_banner_status("show"),cmplz_clear_cookies("cmplz"))}function cmplz_do_not_track(){var e="doNotTrack"in navigator&&"1"===navigator.doNotTrack,t="globalPrivacyControl"in navigator&&navigator.globalPrivacyControl;return!(!complianz.do_not_track_enabled||!t&&!e)}function cmplz_get_services_on_page(){let c=[];return document.querySelectorAll("[data-service]").forEach(e=>{var t=e.getAttribute("data-service"),e=e.getAttribute("data-category");-1==c.indexOf(t)&&c.push({category:e,service:t})}),c}function cmplz_is_bot(){var e=new RegExp("(googlebot/|Googlebot-Mobile|Google-InspectionTool|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)","i"),t=navigator.userAgent;return e.test(t)}function cmplz_is_speedbot(){var e=navigator.userAgent;return new RegExp("(GTmetrix|pingdom|pingbot|Lighthouse)","i").test(e)}function cmplz_exists_service_consent(){var e,t=cmplz_get_cookie("consented_services");try{for(var c in e=JSON.parse(t))if(e.hasOwnProperty(c)&&1==e[c])return!0}catch(e){}return!1}function cmplz_set_service_consent(e,t){var c=cmplz_get_cookie("consented_services");let n;try{n=JSON.parse(c)}catch(e){n={}}n[e]=t,cmplz_set_cookie("consented_services",JSON.stringify(n));c={},c.service=e,c.value=t,c.region=complianz.region,cmplz_all_scripts_hook_fired=!1,e=new CustomEvent("cmplz_status_change_service",{detail:c});document.dispatchEvent(e)}function cmplz_clear_all_service_consents(){cmplz_set_cookie("consented_services","")}function cmplz_get_all_service_consents(){var e=cmplz_get_cookie("consented_services");let t;try{t=JSON.parse(e)}catch(e){t={}}return t}function cmplz_get_cookie_path(){return void 0!==complianz.cookie_path&&""!==complianz.cookie_path?complianz.cookie_path:"/"}function cmplz_get_cookie_domain(){return 1==complianz.set_cookies_on_root&&3<complianz.cookie_domain.length&&!complianz.cookie_domain.includes("localhost")?complianz.cookie_domain:""}function cmplz_reload_browser_compatible(){var e;-1<navigator.userAgent.toLowerCase().indexOf("firefox")?((e=new URL(window.location.href)).searchParams.set("cmplz-force-reload",Date.now().toString()),window.location.href=e.toString()):window.location.reload()}window.cmplz_accept_all=function(){for(var e in cmplz_clear_all_service_consents(),cmplz_fire_before_categories_consent(cmplz_categories),cmplz_categories)cmplz_categories.hasOwnProperty(e)&&cmplz_set_consent(cmplz_categories[e],"allow");cmplz_sync_category_checkboxes()},window.cmplz_deny_all=function(){for(var e in cmplz_categories)cmplz_categories.hasOwnProperty(e)&&cmplz_set_consent(cmplz_categories[e],"deny");let t=!1;"functional"===cmplz_highest_accepted_category()&&!cmplz_exists_service_consent()||(t=!0),cmplz_clear_cookies("cmplz_service")&&(t=!0),cmplz_clear_all_service_consents(),cmplz_integrations_revoke(),cmplz_fire_categories_event(),cmplz_track_status();var c=new CustomEvent("cmplz_revoke",{detail:t});document.dispatchEvent(c),!complianz.tcf_active&&t&&cmplz_reload_browser_compatible()},window.conditionally_show_banner=function(){complianz=cmplz_merge_object(complianz,cmplz_user_data),cmplz_maybe_auto_redirect(),cmplz_set_blocked_content_container(),window.wp_consent_type=complianz.consenttype;var e,t,c,n=new CustomEvent("wp_consent_type_defined"),o=(document.dispatchEvent(n),n=new CustomEvent("cmplz_before_cookiebanner"),document.dispatchEvent(n),1==complianz.forceEnableStats&&"optin"===complianz.consenttype&&cmplz_set_consent("statistics","allow"),cmplz_categories.reverse()),a=[];for(e in o)o.hasOwnProperty(e)&&(t=cmplz_categories[e],cmplz_has_consent(t))&&a.push(t);for(c in cmplz_fire_before_categories_consent(a),a)o.hasOwnProperty(c)&&cmplz_enable_category(a[c]);if(cmplz_exists_service_consent()){cmplz_enable_category("","general");var l,r,i,s=cmplz_get_services_on_page();for(l in s)s.hasOwnProperty(l)&&(r=s[l].service,i=s[l].category,cmplz_has_service_consent(r,i))&&(document.querySelectorAll('.cmplz-accept-service[data-service="'+r+'"]').forEach(e=>{e.checked=!0}),cmplz_enable_category("",r))}cmplz_sync_category_checkboxes(),cmplz_integrations_init(),cmplz_check_cookie_policy_id(),cmplz_set_up_auto_dismiss(),cmplz_load_manage_consent_container(),n=new CustomEvent("cmplz_cookie_banner_data",{detail:complianz}),document.dispatchEvent(n),""===cmplz_get_cookie("saved_categories")&&("optin"!==complianz.consenttype&&"optout"!==complianz.consenttype?cmplz_track_status("no_warning"):cmplz_do_not_track()&&cmplz_track_status("do_not_track")),cmplz_set_category_as_body_class(),cmplz_fire_categories_event(),cmplz_do_not_track()?(console.log("global privacy control or do not track detected: no banner."),cmplz_track_status("do_not_track")):("optin"===complianz.consenttype?(complianz.forceEnableStats&&cmplz_enable_category("statistics"),console.log("opt-in"),show_cookie_banner):"optout"===complianz.consenttype?(console.log("opt-out"),show_cookie_banner):(console.log("other consent type, no cookie warning"),cmplz_accept_all))()},window.show_cookie_banner=function(){let t=complianz.disable_cookiebanner||cmplz_is_speedbot(),e=!1;(document.querySelector("#cmplz-manage-consent-container")||document.querySelector(".cmplz-dropdown-cookiepolicy"))&&(e=!0);var c=document.getElementById("cmplz-cookiebanner-container"),c=(c&&document.body.prepend(c),document.createElement("link"));let n=complianz.page_links[complianz.region];(cmplz_banner=document.querySelector(".cmplz-cookiebanner.banner-"+complianz.user_banner_id+"."+complianz.consenttype))||(t=!0),cmplz_manage_consent_button=document.querySelector("#cmplz-manage-consent .cmplz-manage-consent.manage-consent-"+complianz.user_banner_id);var o=complianz.css_file.replace("{type}",complianz.consenttype).replace("{banner_id}",complianz.user_banner_id),o=(-1!==complianz.css_file.indexOf("cookiebanner/css/defaults/banner")&&console.log("Fallback default css file used. Please re-save banner settings, or check file writing permissions in uploads directory"),c.href=o,c.type="text/css",c.rel="stylesheet",c.onload=function(){var e;t||(cmplz_banner.classList.remove("cmplz-hidden"),cmplz_manage_consent_button.classList.remove("cmplz-hidden"),"show"===cmplz_get_banner_status()&&(cmplz_trap_focus(),e=cmplz_banner.querySelector(".cmplz-close"))&&e.focus())},document.getElementsByTagName("head")[0].appendChild(c),cmplz_banner&&!t&&(cmplz_banner.querySelectorAll(".cmplz-links a:not(.cmplz-external), .cmplz-buttons a:not(.cmplz-external)").forEach(e=>{var t,c=e;for(t in c.classList.add("cmplz-hidden"),n)n.hasOwnProperty(t)&&c.classList.contains(t)&&(c.setAttribute("href",n[t].url+c.getAttribute("data-relative_url")),"{title}"===c.innerText&&(c.innerText=cmplz_html_decode(n[t].title)),c.classList.remove("cmplz-hidden"))}),cmplz_set_banner_status(),e)&&(cmplz_banner.classList.remove("cmplz-show"),cmplz_banner.classList.add("cmplz-dismissed"),cmplz_manage_consent_button.classList.remove("cmplz-dismissed"),cmplz_manage_consent_button.classList.add("cmplz-show")),new CustomEvent("cmplz_cookie_warning_loaded",{detail:complianz.region}));document.dispatchEvent(o)},window.cmplz_get_banner_status=function(){return cmplz_get_cookie("banner-status")},window.cmplz_set_banner_status=function(e){let t=cmplz_get_cookie("banner-status");(e=void 0!==e?e:t)!==t&&cmplz_set_cookie("banner-status",e),0===e.length&&(e="show"),t="show"===e?"dismissed":"show",cmplz_banner&&0<e.length&&(cmplz_banner.classList.remove("cmplz-"+t),cmplz_banner.classList.add("cmplz-"+e),cmplz_manage_consent_button)&&(cmplz_manage_consent_button.classList.add("cmplz-"+t),cmplz_manage_consent_button.classList.remove("cmplz-"+e)),cmplz_banner_container&&complianz.soft_cookiewall&&(cmplz_banner_container.classList.remove("cmplz-"+t),cmplz_banner_container.classList.add("cmplz-"+e,"cmplz-soft-cookiewall"));var c=new CustomEvent("cmplz_banner_status",{detail:e});document.dispatchEvent(c),cmplz_start_clean(),"show"===e?(cmplz_trap_focus(),(c=cmplz_banner.querySelector(".cmplz-close"))&&c.focus()):cmplz_release_focus_trap()},window.cmplz_has_consent=function(e){if(cmplz_is_bot())return!0;if("functional"===e)return!0;let t,c;return t=cmplz_do_not_track()?(c=cmplz_get_cookie(e),"allow"===c):(c=cmplz_get_cookie(e),("optout"===complianz.consenttype||"other"===complianz.consenttype)&&""===c||"allow"===c)},window.cmplz_is_service_denied=function(e){var t=cmplz_get_cookie("consented_services");let c;try{c=JSON.parse(t)}catch(e){c={}}return!!c.hasOwnProperty(e)&&!c[e]},window.cmplz_has_service_consent=function(e,t){var c=cmplz_get_cookie("consented_services");let n;try{n=JSON.parse(c)}catch(e){n={}}return n.hasOwnProperty(e)?n[e]:cmplz_has_consent(t)},window.cmplz_set_consent=function(e,t){cmplz_set_accepted_cookie_policy_id(),t="functional"===e?"allow":t;var c,n=cmplz_get_cookie(e);let o="allow"===t;document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=o}),n!==t&&(cmplz_set_cookie(e,t),"allow"===t&&cmplz_enable_category(e),cmplz_wp_set_consent(e,t),"statistics"===e&&cmplz_wp_set_consent("statistics-anonymous","allow"),(c=new Object).category=e,c.value=t,c.region=complianz.region,c.categories=cmplz_accepted_categories(),cmplz_all_scripts_hook_fired=!1,c=new CustomEvent("cmplz_status_change",{detail:c}),document.dispatchEvent(c),"marketing"===e)&&"deny"===t&&"allow"===n&&(cmplz_integrations_revoke(),setTimeout(function(){cmplz_reload_browser_compatible()},500))};let cmplz_user_data=[];if("undefined"!=typeof Storage&&sessionStorage.cmplz_user_data&&(cmplz_user_data=JSON.parse(sessionStorage.cmplz_user_data)),1!=complianz.geoip||0!=cmplz_user_data.length&&cmplz_user_data.version===complianz.version&&cmplz_user_data.banner_version===complianz.banner_version)conditionally_show_banner();else{let e=new XMLHttpRequest,t=cmplz_get_url_parameter(window.location.href,"cmplz_user_region");t=t?"&cmplz_user_region="+t:"",e.open("GET",complianz.url+"banner?"+complianz.locale+t,!0),e.setRequestHeader("Content-type","application/json"),e.send(),e.onload=function(){cmplz_user_data=JSON.parse(e.response),sessionStorage.cmplz_user_data=JSON.stringify(cmplz_user_data),conditionally_show_banner()}}if(1==complianz.store_consent){let e=cmplz_get_cookie("id"),t="",c="";"undefined"!=typeof Storage&&sessionStorage.cmplz_id&&(t=JSON.parse(sessionStorage.cmplz_id)),0==e.length&&0<t.length&&(c=t,cmplz_set_cookie("id",c)),0<e.length&&0==t.length&&(c=e),"undefined"!=typeof Storage&&(sessionStorage.cmplz_id=JSON.stringify(c))}function cmplz_track_status_end(){cmplz_consent_stored_once||cmplz_track_status()}function cmplz_set_up_auto_dismiss(){if("dismissed"!==cmplz_get_banner_status()){if("optout"===complianz.consenttype&&1==complianz.dismiss_on_scroll){let e=function(){window.pageYOffset>Math.floor(400)&&(window.removeEventListener("scroll",e),this.onWindowScroll=null,"dismissed"!==cmplz_get_banner_status())&&(cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status())};window.addEventListener("scroll",e)}var e=parseInt(complianz.dismiss_timeout);"optout"===complianz.consenttype&&0<e&&window.setTimeout(function(){"dismissed"!==cmplz_get_banner_status()&&(cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status())},Math.floor(e))}}function cmplz_fire_categories_event(){var e=new Object,e=(e.category=cmplz_highest_accepted_category(),e.categories=cmplz_accepted_categories(),e.region=complianz.region,new CustomEvent("cmplz_fire_categories",{detail:e}));document.dispatchEvent(e)}function cmplz_track_status(e){let t=[];e=void 0!==e&&e;var c=new CustomEvent("cmplz_track_status",{detail:e});document.dispatchEvent(c),t=e?[e]:cmplz_accepted_categories(),cmplz_set_category_as_body_class();let n,o;try{n=JSON.parse(cmplz_get_cookie("saved_categories"))}catch(e){n={}}try{o=JSON.parse(cmplz_get_cookie("saved_services"))}catch(e){o={}}var c=cmplz_get_all_service_consents();cmplz_equals(n,t)&&cmplz_equals(o,c)||1!=complianz.store_consent||cmplz_is_bot()||cmplz_is_speedbot()||(cmplz_set_cookie("saved_categories",JSON.stringify(t)),cmplz_set_cookie("saved_services",JSON.stringify(c)),cmplz_consent_stored_once=!0,e={consented_categories:t,consented_services:c,consenttype:window.wp_consent_type},(c=new XMLHttpRequest).open("POST",complianz.url+"track",!0),c.setRequestHeader("Content-type","application/json"),c.send(JSON.stringify(e)))}function cmplz_accepted_categories(){let e=cmplz_categories,t=[];for(var c in e)e.hasOwnProperty(c)&&(c=e[c],cmplz_has_consent(c))&&t.push(c);return e=e.filter(function(e){return cmplz_in_array(e,t)})}function cmplz_sync_category_checkboxes(){for(var e in cmplz_categories)cmplz_categories.hasOwnProperty(e)&&(e=cmplz_categories[e],cmplz_has_consent(e)||"functional"===e?document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=!0}):document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=!1})),document.querySelectorAll(".cmplz-accept-service").forEach(e=>{var t=e.getAttribute("data-service"),c=e.getAttribute("data-category");cmplz_has_service_consent(t,c)?e.checked=!0:cmplz_is_service_denied(t)?e.checked=!1:e.checked=!!cmplz_has_consent(c)})}function cmplz_merge_object(e,t){var c,n,o={};for(c in t)t.hasOwnProperty(c)&&(o[c]=t[c]);for(n in e)t.hasOwnProperty(n)&&void 0!==t[n]||e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function cmplz_clear_cookies(t){if("undefined"==typeof document)return!1;let a=!1,l="https:"===window.location.protocol?";secure":"",r="expires="+(new Date).toGMTString(),i=location.pathname.replace(/^\/|\/$/g,"").split("/");return document.cookie.split("; ").forEach(function(e){let n=e.split(";")[0].split("=")[0];if(-1!==n.indexOf(t)){a=!0;let c=window.location.hostname.split(".");var o=1<c.length;for(i.forEach(function(e){e="/"+e;document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain=."+c.join(".")+";path="+e,document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain=."+c.join(".")+";path="+e+"/"});0<c.length;){let t="."+c.join(".");c.shift(),o&&1===c.length&&c.shift(),i.forEach(function(e){e="/"+e;document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain="+t+";path="+e,document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain="+t+";path="+e+"/"})}}}),cmplz_set_accepted_cookie_policy_id(),a}function cmplz_set_accepted_cookie_policy_id(){cmplz_set_cookie("policy_id",complianz.current_policy_id)}function cmplz_integrations_init(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&"1"===t[e][1]&&cmplz_set_cookie(e,t[e][1],!1)}function cmplz_integrations_revoke(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&(cmplz_set_cookie(e,t[e][1],!1),0==t[e][1])&&cmplz_clear_cookies(e)}function cmplz_set_integrations_cookies(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&cmplz_set_cookie(e,t[e][0],!1)}function cmplz_get_url_parameter(e,t){if(e&&void 0!==e&&-1!==e.indexOf("?")){e=e.split("?")[1];if(e){var c=e.split("&");for(let e=0;e<c.length;e++){var n=c[e].split("=");if(n[0]===t)return void 0===n[1]||decodeURIComponent(n[1])}}}return!1}function cmplz_maybe_auto_redirect(){var e=cmplz_get_url_parameter(window.location.href,"cmplz_region_redirect"),t=cmplz_get_url_parameter(window.location.href,"cmplz-region");e&&!t&&(e=window.location.href.split("#")[0]+"&cmplz-region="+complianz.region,t=window.location.hash,window.location.href=e+t)}function cmplz_wp_set_consent(e,t){"function"==typeof wp_set_consent&&wp_set_consent(e,t)}function cmplz_start_clean(){if(1==complianz.clean_cookies)if((cmplz_cookie_data="undefined"!=typeof Storage?JSON.parse(sessionStorage.getItem("cmplz_cookie_data")):cmplz_cookie_data)&&0!==cmplz_cookie_data.length)cmplz_setup_clean_interval();else{let e=new XMLHttpRequest;e.open("GET",complianz.url+"cookie_data",!0),e.setRequestHeader("Content-type","application/json"),e.send(),e.onload=function(){cmplz_cookie_data=JSON.parse(e.response),sessionStorage.setItem("cmplz_cookie_data",JSON.stringify(cmplz_cookie_data)),cmplz_setup_clean_interval()}}}function cmplz_do_cleanup(){var e;for(e of["preferences","statistics","marketing"])if(!cmplz_has_consent(e)&&cmplz_cookie_data.hasOwnProperty(e)){var t,c,n=cmplz_cookie_data[e];for(t in n)if(!cmplz_has_service_consent(t,e))for(c of n[t])cmplz_clear_cookies(c),cmplz_clear_storage(c)}}function cmplz_setup_clean_interval(){!cmplz_cookie_data||cmplzCleanCookieInterval||(cmplz_do_cleanup(),cmplzCleanCookieInterval=setInterval(cmplz_do_cleanup,1e3))}function cmplz_clear_storage(e){"undefined"!=typeof Storage&&(localStorage.getItem(e)&&localStorage.removeItem(e),sessionStorage.getItem(e))&&sessionStorage.removeItem(e)}function cmplz_load_manage_consent_container(){let c=document.querySelector(".cmplz-manage-consent-container");if(c){let t=new XMLHttpRequest;t.open("GET",complianz.url+"manage_consent_html?"+complianz.locale,!0),t.setRequestHeader("Content-type","application/json"),t.send(),t.onload=function(){var e=JSON.parse(t.response);c.insertAdjacentHTML("beforeend",e),cmplz_sync_category_checkboxes();document.querySelector("#cmplz-manage-consent-container-nojavascript").style.display="none",c.style.display="block";e=new CustomEvent("cmplz_manage_consent_container_loaded");document.dispatchEvent(e)}}}function cmplz_equals(c,n){if("object"!=typeof c||null===c||Array.isArray(c)||"object"!=typeof n||null===n||Array.isArray(n)){if(Array.isArray(c)||(c=Object.keys(c),n=Object.keys(n)),!c||!n)return!1;if(c.length!==n.length)return!1;for(let e=0,t=c.length;e<t;e++)if(c[e]instanceof Array&&n[e]instanceof Array){if(!cmplz_equals(c[e],n[e]))return!1}else if(c[e]!==n[e])return!1}else{var e;for(e of[...new Set([...Object.keys(c),...Object.keys(n)])])if(c[e]!==n[e])return!1}return!0}function cmplzCopyAttributes(e,t){let c=["type","data-service","data-category","async"];Array.from(e.attributes).forEach(e=>{"data-script-type"===e.nodeName&&"module"===e.nodeValue?(t.setAttribute("type","module"),t.removeAttribute("data-script-type")):c.includes(e.nodeName)||t.setAttribute(e.nodeName,e.nodeValue)})}document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&cmplz_track_status_end()}),window.addEventListener("pagehide",cmplz_track_status_end,!1),window.addEventListener("beforeunload",cmplz_track_status_end,!1),document.addEventListener("cmplz_consent_action",function(e){cmplz_set_consent(e.detail.category,"allow"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-accept",function(e){e.preventDefault(),setTimeout(()=>{cmplz_accept_all(),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()},0)}),cmplz_add_event("click",".cmplz-accept-category, .cmplz-accept-marketing",function(e){e.preventDefault();var e=e.target,t=e.getAttribute("data-service"),e=e.getAttribute("data-category")||"marketing";1==complianz.clean_cookies&&void 0!==t&&t?(cmplz_set_service_consent(t,!0),cmplz_enable_category("","general"),cmplz_enable_category("",t)):cmplz_set_consent(e,"allow"),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-accept-service",function(e){var e=e.target;"INPUT"!==e.tagName&&(void 0!==(e=e.getAttribute("data-service"))&&(cmplz_set_service_consent(e,!0),cmplz_enable_category("","general"),cmplz_enable_category("",e)),cmplz_fire_categories_event(),cmplz_track_status())}),cmplz_add_event("change",".cmplz-accept-service",function(e){var t=e.target,c=t.tagName,n=t.getAttribute("data-service");void 0!==n&&("INPUT"===c?(cmplz_set_banner_status("dismissed"),t.checked?(cmplz_set_service_consent(n,!0),cmplz_enable_category("",n)):(cmplz_set_service_consent(n,!1),setTimeout(function(){cmplz_reload_browser_compatible()},500))):(e.preventDefault(),cmplz_set_service_consent(n,!0),cmplz_enable_category("","general"),cmplz_enable_category("",n),setTimeout(function(){cmplz_reload_browser_compatible()},500))),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-save-preferences",function(e){var t,c,n,o,a,e=e.target,l=(cmplz_banner=e.closest(".cmplz-cookiebanner"),[]);for(t in cmplz_categories)cmplz_categories.hasOwnProperty(t)&&(c=cmplz_categories[t],n=cmplz_banner.querySelector("input.cmplz-"+c))&&n.checked&&l.push(c);for(o in cmplz_fire_before_categories_consent(l),cmplz_categories)cmplz_categories.hasOwnProperty(o)&&(a=cmplz_categories[o],l.includes(a)?cmplz_set_consent(a,"allow"):cmplz_set_consent(a,"deny"));cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-close",function(){cmplz_set_banner_status("dismissed")}),cmplz_add_event("click",".cmplz-view-preferences",function(e){var e=e.target;(cmplz_banner=e.closest(".cmplz-cookiebanner")).querySelector(".cmplz-categories").classList.contains("cmplz-fade-in")?(cmplz_banner.classList.remove("cmplz-categories-visible"),cmplz_banner.querySelector(".cmplz-categories").classList.remove("cmplz-fade-in"),cmplz_banner.querySelector(".cmplz-view-preferences").style.display="block",cmplz_banner.querySelector(".cmplz-save-preferences").style.display="none"):(cmplz_banner.classList.add("cmplz-categories-visible"),cmplz_banner.querySelector(".cmplz-categories").classList.add("cmplz-fade-in"),cmplz_banner.querySelector(".cmplz-view-preferences").style.display="none",cmplz_banner.querySelector(".cmplz-save-preferences").style.display="block",(e=cmplz_banner.querySelector(".cmplz-categories .cmplz-category"))&&(e=e.querySelector("summary"))&&(e.setAttribute("tabindex","0"),e.focus()))}),cmplz_add_event("change",".cmplz-manage-consent-container .cmplz-category",function(){for(var e in cmplz_categories){var t;cmplz_categories.hasOwnProperty(e)&&(e=cmplz_categories[e],t=document.querySelector(".cmplz-manage-consent-container input.cmplz-"+e))&&(t.checked?cmplz_set_consent(e,"allow"):cmplz_set_consent(e,"deny"),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status())}}),cmplz_add_event("click",".cmplz-deny",function(e){e.preventDefault(),cmplz_set_banner_status("dismissed"),cmplz_deny_all()}),cmplz_add_event("click","button.cmplz-manage-settings",function(e){e.preventDefault();var e=document.querySelector(".cmplz-cookiebanner .cmplz-categories"),t=document.querySelector(".cmplz-save-settings"),c=document.querySelector("button.cmplz-manage-settings");cmplz_is_hidden(e)?(t.style.display="block",c.style.display="none",e.style.display="block"):(t.style.display="none",c.style.display="block",e.style.display="none")}),cmplz_add_event("click","button.cmplz-manage-consent",function(e){e.preventDefault(),cmplz_set_banner_status("show")}),cmplz_add_event("keypress",".cmplz-banner-slider label",function(e){32==(e.keyCode||e.which)&&document.activeElement.click()}),cmplz_add_event("keypress",".cmplz-cookiebanner .cmplz-header .cmplz-close",function(e){13==(e.keyCode||e.which)&&document.activeElement.click()});let cmplz_has_wp_video=document.querySelector(".cmplz-wp-video-shortcode"),cmplz_times_checked=0;void 0!==window.jQuery&&jQuery(document).ready(function(i){if(cmplz_has_wp_video){document.addEventListener("cmplz_enable_category",function(){t()});let e=setInterval(function(){cmplz_times_checked+=1,document.querySelector(".cmplz-wp-video-shortcode")&&cmplz_times_checked<100?t():clearInterval(e)},500)}function t(){if(document.querySelector(".cmplz-wp-video-shortcode")){var e,t,n,o=cmplz_accepted_categories(),a=cmplz_get_all_service_consents(),l=[];for(e in o)if(o.hasOwnProperty(e)){var r=o[e];if("functional"===r)break;l.push('.cmplz-wp-video-shortcode[data-category="'+r+'"]')}for(t in a)a.hasOwnProperty(t)&&l.push('.cmplz-wp-video-shortcode[data-service="'+t+'"]');n=l.join(",");let c=!1;0<n.length&&document.querySelectorAll(n).forEach(e=>{c=!0,e.setAttribute("controls","controls"),e.classList.add("wp-video-shortcode","cmplz-processed"),e.classList.remove("cmplz-wp-video-shortcode"),e.closest(".cmplz-wp-video").classList.remove("cmplz-wp-video");var t=e.closest(".wp-video").querySelector(".cmplz-blocked-content-notice");t&&t.parentElement.removeChild(t),e.classList.remove("cmplz-blocked-content-container")}),c&&(window.wp.mediaelement?window.wp.mediaelement.initialize():(n={videoWidth:"100%",videoHeight:"100%",enableAutosize:!0},i(".wp-video-shortcode").mediaelementplayer(n)))}}function c(e){e=i(e);"function"==typeof e.parent().fitVids&&e.parent().fitVids()}document.querySelectorAll(".cmplz-video.cmplz-activated").forEach(e=>{c(e)}),document.addEventListener("cmplz_enable_category",function(){document.querySelectorAll(".cmplz-video.cmplz-activated").forEach(e=>{c(e)})})});
(function(i,t){"use strict";i=i||{};var o=['<div class="loading-overlay">','<div class="loader"></div>',"</div>"].join(""),s=function(i,t){return this.initialize(i,t)};s.prototype={options:{css:{}},initialize:function(i,t){this.$wrapper=i,this.setVars().setOptions(t).build().events(),this.$wrapper.data("loadingOverlay",this)},setVars:function(){return this.$overlay=this.$wrapper.find(".loading-overlay"),this},setOptions:function(i){return this.$overlay.get(0)||this.matchProperties(),this.options=t.extend(!0,{},this.options,i),this.loaderClass=this.getLoaderClass(this.options.css.backgroundColor),this},build:function(){return this.$overlay.closest(document.documentElement).get(0)||(this.$cachedOverlay?this.$overlay=this.$cachedOverlay.clone():(this.$overlay=t(o).clone(),this.options.css&&(this.$overlay.css(this.options.css),this.$overlay.find(".loader").addClass(this.loaderClass))),this.$wrapper.append(this.$overlay)),this.$cachedOverlay||(this.$cachedOverlay=this.$overlay.clone()),this},events:function(){var i=this;return this.options.startShowing&&i.show(),(this.$wrapper.is("body")||this.options.hideOnWindowLoad)&&t(window).on("load error",(function(){i.hide()})),this.options.listenOn&&t(this.options.listenOn).on("loading-overlay:show beforeSend.ic",(function(t){t.stopPropagation(),i.show()})).on("loading-overlay:hide complete.ic",(function(t){t.stopPropagation(),i.hide()})),this.$wrapper.on("loading-overlay:show beforeSend.ic",(function(t){t.stopPropagation(),i.show()})).on("loading-overlay:hide complete.ic",(function(t){t.stopPropagation(),i.hide()})),this},show:function(){this.build(),this.position=this.$wrapper.css("position").toLowerCase(),"relative"==this.position&&"absolute"==this.position&&"fixed"==this.position||this.$wrapper.css({position:"relative"}),this.$wrapper.addClass("loading-overlay-showing")},hide:function(){var i=this;this.$wrapper.removeClass("loading-overlay-showing"),setTimeout((function(){"relative"==this.position&&"absolute"==this.position&&"fixed"==this.position||i.$wrapper.css({position:""})}),500)},matchProperties:function(){var i,o,s;for(o=(s=["backgroundColor","borderRadius"]).length,i=0;i<o;i++){var e={};e[s[i]]=this.$wrapper.css(s[i]),t.extend(this.options.css,e)}},getLoaderClass:function(i){if(!i||"transparent"===i||"inherit"===i)return"black";var t,o,s,e;return(o=i).indexOf("#")>-1?s=o.replace("#",""):(e=o.match(/\d+/g),s=("0"+parseInt(e[0],10).toString(16)).slice(-2)+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)),3===s.length&&(s+=s),t=s,(299*parseInt(t.substr(0,2),16)+587*parseInt(t.substr(2,2),16)+114*parseInt(t.substr(4,2),16))/1e3>=128?"black":"white"}},t.extend(i,{LoadingOverlay:s}),t.fn.loadingOverlay=function(i){return this.each((function(){var o=t(this),e=o.data("loadingOverlay");if(e)return e;var n=i||o.data("loading-overlay-options")||{};return new s(o,n)}))},t("body.loading-overlay-showing, [data-loading-overlay]").loadingOverlay()}).apply(this,[window.theme,jQuery]);
!function(r){var o=this.SelectBox=function(e,t){if(e instanceof jQuery){if(!(0<e.length))return;e=e[0]}return this.typeTimer=null,this.typeSearch="",this.isMac=navigator.platform.match(/mac/i),t="object"==typeof t?t:{},this.selectElement=e,!(!t.mobile&&navigator.userAgent.match(/iPad|iPhone|Android|IEMobile|BlackBerry/i))&&"select"===e.tagName.toLowerCase()&&void this.init(t)};o.prototype.version="1.2.0",o.prototype.init=function(t){var e=r(this.selectElement);if(e.data("selectBox-control"))return!1;var s,o=r('<a class="selectBox" />'),a=e.attr("multiple")||1<parseInt(e.attr("size")),n=t||{},l=parseInt(e.prop("tabindex"))||0,i=this;o.width(e.outerWidth()).addClass(e.attr("class")).attr("title",e.attr("title")||"").attr("tabindex",l).css("display","inline-block").bind("focus.selectBox",function(){this!==document.activeElement&&document.body!==document.activeElement&&r(document.activeElement).blur(),o.hasClass("selectBox-active")||(o.addClass("selectBox-active"),e.trigger("focus"))}).bind("blur.selectBox",function(){o.hasClass("selectBox-active")&&(o.removeClass("selectBox-active"),e.trigger("blur"))}),r(window).data("selectBox-bindings")||r(window).data("selectBox-bindings",!0).bind("scroll.selectBox",this.hideMenus).bind("resize.selectBox",this.hideMenus),e.attr("disabled")&&o.addClass("selectBox-disabled"),e.bind("click.selectBox",function(e){o.focus(),e.preventDefault()}),a?(t=this.getOptions("inline"),o.append(t).data("selectBox-options",t).addClass("selectBox-inline selectBox-menuShowing").bind("keydown.selectBox",function(e){i.handleKeyDown(e)}).bind("keypress.selectBox",function(e){i.handleKeyPress(e)}).bind("mousedown.selectBox",function(e){1!==e.which||(r(e.target).is("A.selectBox-inline")&&e.preventDefault(),o.hasClass("selectBox-focus"))||o.focus()}).insertAfter(e),e[0].style.height||(l=e.attr("size")?parseInt(e.attr("size")):5,(a=o.clone().removeAttr("id").css({position:"absolute",top:"-9999em"}).show().appendTo("body")).find(".selectBox-options").html("<li><a> </a></li>"),s=parseInt(a.find(".selectBox-options A:first").html("&nbsp;").outerHeight()),a.remove(),o.height(s*l))):(a=r('<span class="selectBox-label" />'),s=r('<span class="selectBox-arrow" />'),a.attr("class",this.getLabelClass()).text(this.getLabelText()),(t=this.getOptions("dropdown")).appendTo("BODY"),o.data("selectBox-options",t).addClass("selectBox-dropdown").append(a).append(s).bind("mousedown.selectBox",function(e){1===e.which&&(o.hasClass("selectBox-menuShowing")?i.hideMenus():(e.stopPropagation(),t.data("selectBox-down-at-x",e.screenX).data("selectBox-down-at-y",e.screenY),i.showMenu()))}).bind("keydown.selectBox",function(e){i.handleKeyDown(e)}).bind("keypress.selectBox",function(e){i.handleKeyPress(e)}).bind("open.selectBox",function(e,t){t&&!0===t._selectBox||i.showMenu()}).bind("close.selectBox",function(e,t){t&&!0===t._selectBox||i.hideMenus()}).insertAfter(e),l=o.width()-s.outerWidth()-parseInt(a.css("paddingLeft"))||0-parseInt(a.css("paddingRight"))||0,a.width(l)),this.disableSelection(o),e.addClass("selectBox").data("selectBox-control",o).data("selectBox-settings",n).hide()},o.prototype.getOptions=function(e){var t,s=r(this.selectElement),o=this,a=function(e,t){return e.children("OPTION, OPTGROUP").each(function(){var e;r(this).is("OPTION")?0<r(this).length?o.generateOptions(r(this),t):t.append("<li> </li>"):((e=r('<li class="selectBox-optgroup" />')).text(r(this).attr("label")),t.append(e),t=a(r(this),t))}),t};switch(e){case"inline":return t=r('<ul class="selectBox-options" />'),(t=a(s,t)).find("A").bind("mouseover.selectBox",function(e){o.addHover(r(this).parent())}).bind("mouseout.selectBox",function(e){o.removeHover(r(this).parent())}).bind("mousedown.selectBox",function(e){1!==e.which||(e.preventDefault(),s.selectBox("control").hasClass("selectBox-active"))||s.selectBox("control").focus()}).bind("mouseup.selectBox",function(e){1===e.which&&(o.hideMenus(),o.selectOption(r(this).parent(),e))}),this.disableSelection(t),t;case"dropdown":t=r('<ul class="selectBox-dropdown-menu selectBox-options" />'),(t=a(s,t)).data("selectBox-select",s).css("display","none").appendTo("BODY").find("A").bind("mousedown.selectBox",function(e){1===e.which&&(e.preventDefault(),e.screenX===t.data("selectBox-down-at-x"))&&e.screenY===t.data("selectBox-down-at-y")&&(t.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y"),o.hideMenus())}).bind("mouseup.selectBox",function(e){1!==e.which||e.screenX===t.data("selectBox-down-at-x")&&e.screenY===t.data("selectBox-down-at-y")||(t.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y"),o.selectOption(r(this).parent()),o.hideMenus())}).bind("mouseover.selectBox",function(e){o.addHover(r(this).parent())}).bind("mouseout.selectBox",function(e){o.removeHover(r(this).parent())});var n=s.attr("class")||"";if(""!==n)for(var l in n=n.split(" "))t.addClass(n[l]+"-selectBox-dropdown-menu");return this.disableSelection(t),t}},o.prototype.getLabelClass=function(){return("selectBox-label "+(r(this.selectElement).find("OPTION:selected").attr("class")||"")).replace(/\s+$/,"")},o.prototype.getLabelText=function(){return r(this.selectElement).find("OPTION:selected").text()||" "},o.prototype.setLabel=function(){var e=r(this.selectElement).data("selectBox-control");e&&e.find(".selectBox-label").attr("class",this.getLabelClass()).text(this.getLabelText())},o.prototype.destroy=function(){var e=r(this.selectElement),t=e.data("selectBox-control");t&&(t.data("selectBox-options").remove(),t.remove(),e.removeClass("selectBox").removeData("selectBox-control").data("selectBox-control",null).removeData("selectBox-settings").data("selectBox-settings",null).show())},o.prototype.refresh=function(){var e=r(this.selectElement),t=e.data("selectBox-control"),s=t.hasClass("selectBox-dropdown"),t=t.hasClass("selectBox-menuShowing");e.selectBox("options",e.html()),s&&t&&this.showMenu()},o.prototype.showMenu=function(){var t=this,e=r(this.selectElement),s=e.data("selectBox-control"),o=e.data("selectBox-settings"),a=s.data("selectBox-options");if(s.hasClass("selectBox-disabled"))return!1;this.hideMenus();var n=parseInt(s.css("borderBottomWidth"))||0;if(a.width(s.innerWidth()).css({top:s.offset().top+s.outerHeight()-n,left:s.offset().left}),e.triggerHandler("beforeopen"))return!1;var l=function(){e.triggerHandler("open",{_selectBox:!0})};switch(o.menuTransition){case"fade":a.fadeIn(o.menuSpeed,l);break;case"slide":a.slideDown(o.menuSpeed,l);break;default:a.show(o.menuSpeed,l)}o.menuSpeed||l();n=a.find(".selectBox-selected:first");this.keepOptionInView(n,!0),this.addHover(n),s.addClass("selectBox-menuShowing"),r(document).bind("mousedown.selectBox",function(e){1!==e.which||r(e.target).parents().andSelf().hasClass("selectBox-options")||t.hideMenus()})},o.prototype.hideMenus=function(){0!==r(".selectBox-dropdown-menu:visible").length&&(r(document).unbind("mousedown.selectBox"),r(".selectBox-dropdown-menu").each(function(){var e=r(this),t=e.data("selectBox-select"),s=t.data("selectBox-control"),o=t.data("selectBox-settings");if(t.triggerHandler("beforeclose"))return!1;var a=function(){t.triggerHandler("close",{_selectBox:!0})};if(o){switch(o.menuTransition){case"fade":e.fadeOut(o.menuSpeed,a);break;case"slide":e.slideUp(o.menuSpeed,a);break;default:e.hide(o.menuSpeed,a)}o.menuSpeed||a(),s.removeClass("selectBox-menuShowing")}else r(this).hide(),r(this).triggerHandler("close",{_selectBox:!0}),r(this).removeClass("selectBox-menuShowing")}))},o.prototype.selectOption=function(e,t){var s,o=r(this.selectElement),a=(e=r(e),o.data("selectBox-control"));o.data("selectBox-settings");if(a.hasClass("selectBox-disabled"))return!1;if(0===e.length||e.hasClass("selectBox-disabled"))return!1;o.attr("multiple")?t.shiftKey&&a.data("selectBox-last-selected")?(e.toggleClass("selectBox-selected"),s=(s=e.index()>a.data("selectBox-last-selected").index()?e.siblings().slice(a.data("selectBox-last-selected").index(),e.index()):e.siblings().slice(e.index(),a.data("selectBox-last-selected").index())).not(".selectBox-optgroup, .selectBox-disabled"),e.hasClass("selectBox-selected")?s.addClass("selectBox-selected"):s.removeClass("selectBox-selected")):this.isMac&&t.metaKey||!this.isMac&&t.ctrlKey?e.toggleClass("selectBox-selected"):(e.siblings().removeClass("selectBox-selected"),e.addClass("selectBox-selected")):(e.siblings().removeClass("selectBox-selected"),e.addClass("selectBox-selected")),a.hasClass("selectBox-dropdown")&&a.find(".selectBox-label").text(e.text());var n=0,l=[];return o.attr("multiple")?a.find(".selectBox-selected A").each(function(){l[n++]=r(this).attr("rel")}):l=e.find("A").attr("rel"),a.data("selectBox-last-selected",e),o.val()!==l&&(o.val(l),this.setLabel(),o.trigger("change")),!0},o.prototype.addHover=function(e){e=r(e),r(this.selectElement).data("selectBox-control").data("selectBox-options").find(".selectBox-hover").removeClass("selectBox-hover"),e.addClass("selectBox-hover")},o.prototype.getSelectElement=function(){return this.selectElement},o.prototype.removeHover=function(e){e=r(e),r(this.selectElement).data("selectBox-control").data("selectBox-options").find(".selectBox-hover").removeClass("selectBox-hover")},o.prototype.keepOptionInView=function(e,t){var s,o,a;e&&0!==e.length&&(o=(s=r(this.selectElement).data("selectBox-control")).data("selectBox-options"),s=s.hasClass("selectBox-dropdown")?o:o.parent(),o=parseInt(e.offset().top-s.position().top),a=parseInt(o+e.outerHeight()),t?s.scrollTop(e.offset().top-s.offset().top+s.scrollTop()-s.height()/2):(o<0&&s.scrollTop(e.offset().top-s.offset().top+s.scrollTop()),a>s.height()&&s.scrollTop(e.offset().top+e.outerHeight()-s.offset().top+s.scrollTop()-s.height())))},o.prototype.handleKeyDown=function(e){var t=r(this.selectElement),s=t.data("selectBox-control"),o=s.data("selectBox-options"),a=t.data("selectBox-settings"),n=0,l=0;if(!s.hasClass("selectBox-disabled"))switch(e.keyCode){case 8:e.preventDefault(),this.typeSearch="";break;case 9:case 27:this.hideMenus(),this.removeHover();break;case 13:s.hasClass("selectBox-menuShowing")?(this.selectOption(o.find("LI.selectBox-hover:first"),e),s.hasClass("selectBox-dropdown")&&this.hideMenus()):this.showMenu();break;case 38:case 37:if(e.preventDefault(),s.hasClass("selectBox-menuShowing")){for(var i=o.find(".selectBox-hover").prev("LI"),n=o.find("LI:not(.selectBox-optgroup)").length,l=0;(0===i.length||i.hasClass("selectBox-disabled")||i.hasClass("selectBox-optgroup"))&&(0===(i=i.prev("LI")).length&&(i=a.loopOptions?o.find("LI:last"):o.find("LI:first")),!(++l>=n)););this.addHover(i),this.selectOption(i,e),this.keepOptionInView(i)}else this.showMenu();break;case 40:case 39:if(e.preventDefault(),s.hasClass("selectBox-menuShowing")){var c=o.find(".selectBox-hover").next("LI");for(n=o.find("LI:not(.selectBox-optgroup)").length,l=0;(0===c.length||c.hasClass("selectBox-disabled")||c.hasClass("selectBox-optgroup"))&&(0===(c=c.next("LI")).length&&(c=a.loopOptions?o.find("LI:first"):o.find("LI:last")),!(++l>=n)););this.addHover(c),this.selectOption(c,e),this.keepOptionInView(c)}else this.showMenu()}},o.prototype.handleKeyPress=function(e){var t=r(this.selectElement).data("selectBox-control"),s=t.data("selectBox-options");if(!t.hasClass("selectBox-disabled"))switch(e.keyCode){case 9:case 27:case 13:case 38:case 37:case 40:case 39:break;default:t.hasClass("selectBox-menuShowing")||this.showMenu(),e.preventDefault(),clearTimeout(this.typeTimer),this.typeSearch+=String.fromCharCode(e.charCode||e.keyCode),s.find("A").each(function(){if(r(this).text().substr(0,this.typeSearch.length).toLowerCase()===this.typeSearch.toLowerCase())return this.addHover(r(this).parent()),this.selectOption(r(this).parent(),e),this.keepOptionInView(r(this).parent()),!1}),this.typeTimer=setTimeout(function(){this.typeSearch=""},1e3)}},o.prototype.enable=function(){var e=r(this.selectElement),e=(e.prop("disabled",!1),e.data("selectBox-control"));e&&e.removeClass("selectBox-disabled")},o.prototype.disable=function(){var e=r(this.selectElement),e=(e.prop("disabled",!0),e.data("selectBox-control"));e&&e.addClass("selectBox-disabled")},o.prototype.setValue=function(t){var e,s=r(this.selectElement),o=(s.val(t),null===(t=s.val())&&(t=s.children().first().val(),s.val(t)),s.data("selectBox-control"));o&&(e=s.data("selectBox-settings"),o=o.data("selectBox-options"),this.setLabel(),o.find(".selectBox-selected").removeClass("selectBox-selected"),o.find("A").each(function(){if("object"==typeof t)for(var e=0;e<t.length;e++)r(this).attr("rel")==t[e]&&r(this).parent().addClass("selectBox-selected");else r(this).attr("rel")==t&&r(this).parent().addClass("selectBox-selected")}),e.change)&&e.change.call(s)},o.prototype.setOptions=function(e){var t,s=r(this.selectElement),o=s.data("selectBox-control");s.data("selectBox-settings");switch(typeof e){case"string":s.html(e);break;case"object":for(var a in s.html(""),e)if(null!==e[a])if("object"==typeof e[a]){var n,l=r('<optgroup label="'+a+'" />');for(n in e[a])l.append('<option value="'+n+'">'+e[a][n]+"</option>");s.append(l)}else{var i=r('<option value="'+a+'">'+e[a]+"</option>");s.append(i)}}if(o)switch(o.data("selectBox-options").remove(),t=o.hasClass("selectBox-dropdown")?"dropdown":"inline",e=this.getOptions(t),o.data("selectBox-options",e),t){case"inline":o.append(e);break;case"dropdown":this.setLabel(),r("BODY").append(e)}},o.prototype.disableSelection=function(e){r(e).css("MozUserSelect","none").bind("selectstart",function(e){e.preventDefault()})},o.prototype.generateOptions=function(e,t){var s=r("<li />"),o=r("<a />");s.addClass(e.attr("class")),s.data(e.data()),o.attr("rel",e.val()).text(e.text()),s.append(o),e.attr("disabled")&&s.addClass("selectBox-disabled"),e.attr("selected")&&s.addClass("selectBox-selected"),t.append(s)},r.extend(r.fn,{selectBox:function(s,e){var t;switch(s){case"control":return r(this).data("selectBox-control");case"settings":if(!e)return r(this).data("selectBox-settings");r(this).each(function(){r(this).data("selectBox-settings",r.extend(!0,r(this).data("selectBox-settings"),e))});break;case"options":if(undefined===e)return r(this).data("selectBox-control").data("selectBox-options");r(this).each(function(){(t=r(this).data("selectBox"))&&t.setOptions(e)});break;case"value":if(undefined===e)return r(this).val();r(this).each(function(){(t=r(this).data("selectBox"))&&t.setValue(e)});break;case"refresh":r(this).each(function(){(t=r(this).data("selectBox"))&&t.refresh()});break;case"enable":r(this).each(function(){(t=r(this).data("selectBox"))&&t.enable(this)});break;case"disable":r(this).each(function(){(t=r(this).data("selectBox"))&&t.disable()});break;case"destroy":r(this).each(function(){(t=r(this).data("selectBox"))&&(t.destroy(),r(this).data("selectBox",null))});break;case"instance":return r(this).data("selectBox");default:r(this).each(function(e,t){r(t).data("selectBox")||r(t).data("selectBox",new o(t,s))})}return r(this)}})}(jQuery);
!function(t){function e(){var t=location.href;return hashtag=-1!==t.indexOf("#prettyPhoto")&&decodeURI(t.substring(t.indexOf("#prettyPhoto")+1,t.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function i(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==i?"":i[1]}t.prettyPhoto={version:"3.1.6"},t.fn.prettyPhoto=function(o){o=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> \t\t\t\t\t\t<div class="ppt">&nbsp;</div> \t\t\t\t\t\t<div class="pp_top"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_content_container"> \t\t\t\t\t\t\t<div class="pp_left"> \t\t\t\t\t\t\t<div class="pp_right"> \t\t\t\t\t\t\t\t<div class="pp_content"> \t\t\t\t\t\t\t\t\t<div class="pp_loaderIcon"></div> \t\t\t\t\t\t\t\t\t<div class="pp_fade"> \t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_expand" title="Expand the image">Expand</a> \t\t\t\t\t\t\t\t\t\t<div class="pp_hoverContainer"> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_next" href="#">next</a> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_previous" href="#">previous</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t<div id="pp_full_res"></div> \t\t\t\t\t\t\t\t\t\t<div class="pp_details"> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_nav"> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t\t\t\t\t<p class="currentTextHolder">0/0</p> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t\t<p class="pp_description"></p> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_social">{pp_social}</div> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_close" href="#">Close</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_bottom"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t<div> \t\t\t\t\t\t\t\t\t<ul> \t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t</div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="https://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"><\/script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},o);var p,a,s,n,l,r,d,h=this,c=!1,_=t(window).height(),g=t(window).width();function m(){t(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(_/2-p.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:p.contentHeight,width:p.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:g/2-p.containerWidth/2<0?0:g/2-p.containerWidth/2,width:p.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(p.height).width(p.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==y(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(p.resized?t("a.pp_expand,a.pp_contract").show():t("a.pp_expand").hide()),!settings.autoplay_slideshow||d||a||t.prettyPhoto.startSlideshow(),settings.changepicturecallback(),a=!0}),isSet&&settings.overlay_gallery&&"image"==y(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((p.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,0==totalPage?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,t.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").off("mouseenter mouseleave"),o.ajaxcallback()}function f(e){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){t(".pp_loaderIcon").show(),e()})}function u(t,e){if(resized=!1,v(t,e),imageWidth=t,imageHeight=e,(r>g||l>_)&&doresize&&settings.allow_resize&&!c){for(resized=!0,fitting=!1;!fitting;)r>g?(imageWidth=g-200,imageHeight=e/t*imageWidth):l>_?(imageHeight=_-200,imageWidth=t/e*imageHeight):fitting=!0,l=imageHeight,r=imageWidth;(r>g||l>_)&&u(r,l),v(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(l),containerWidth:Math.floor(r)+2*settings.horizontal_padding,contentHeight:Math.floor(s),contentWidth:Math.floor(n),resized:resized}}function v(e,i){e=parseFloat(e),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(e),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(e).appendTo(t("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(e),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(t("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),s=i+detailsHeight,n=e,l=s+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),r=e}function y(t){return t.match(/youtube\.com\/watch/i)||t.match(/youtu\.be/i)?"youtube":t.match(/vimeo\.com/i)?"vimeo":t.match(/\b.mov\b/i)?"quicktime":t.match(/\b.swf\b/i)?"flash":t.match(/\biframe=true\b/i)?"iframe":t.match(/\bajax=true\b/i)?"ajax":t.match(/\bcustom=true\b/i)?"custom":"#"==t.substr(0,1)?"inline":"image"}function w(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=b(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=_/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>_)return;$pp_pic_holder.css({top:projectedTop,left:g/2+scroll_pos.scrollLeft-contentwidth/2})}}function b(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function k(e){if(settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href))),settings.markup=settings.markup.replace("{pp_social}",""),t("body").append(settings.markup),$pp_pic_holder=t(".pp_pic_holder"),$ppt=t(".ppt"),$pp_overlay=t("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="";for(var i=0;i<pp_images.length;i++)pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[i]):(classname="default",img_src=""),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=t(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").on("click",function(){return t.prettyPhoto.changeGalleryPage("next"),t.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").on("click",function(){return t.prettyPhoto.changeGalleryPage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").on("mouseenter",function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()}).on("mouseleave",function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(e){t(this).find("a").on("click",function(){return t.prettyPhoto.changePage(e),t.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").on("click",function(){return t.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:t(document).height(),width:t(window).width()}).on("click",function(){settings.modal||t.prettyPhoto.close()}),t("a.pp_close").on("click",function(){return t.prettyPhoto.close(),!1}),settings.allow_expand&&t("a.pp_expand").on("click",function(e){return t(this).hasClass("pp_expand")?(t(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(t(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),f(function(){t.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").on("click",function(){return t.prettyPhoto.changePage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").on("click",function(){return t.prettyPhoto.changePage("next"),t.prettyPhoto.stopSlideshow(),!1}),w()}return doresize=!0,scroll_pos=b(),t(window).off("resize.prettyphoto").on("resize.prettyphoto",function(){w(),_=t(window).height(),g=t(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(t(document).height()).width(g)}),o.keyboard_shortcuts&&t(document).off("keydown.prettyphoto").on("keydown.prettyphoto",function(e){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(e.keyCode){case 37:t.prettyPhoto.changePage("previous"),e.preventDefault();break;case 39:t.prettyPhoto.changePage("next"),e.preventDefault();break;case 27:settings.modal||t.prettyPhoto.close(),e.preventDefault()}}),t.prettyPhoto.initialize=function(){return settings=o,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=t(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?jQuery.map(h,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("href")}):t.makeArray(t(this).attr("href")),pp_titles=isSet?jQuery.map(h,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).find("img").attr("alt")?t(e).find("img").attr("alt"):""}):t.makeArray(t(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(h,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("title")?t(e).attr("title"):""}):t.makeArray(t(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(t(this).attr("href"),pp_images),rel_index=isSet?set_position:t("a["+settings.hook+"^='"+theRel+"']").index(t(this)),k(this),settings.allow_resize&&t(window).on("scroll.prettyphoto",function(){w()}),t.prettyPhoto.open(),!1},t.prettyPhoto.open=function(e){return"undefined"==typeof settings&&(settings=o,pp_images=t.makeArray(arguments[0]),pp_titles=arguments[1]?t.makeArray(arguments[1]):t.makeArray(""),pp_descriptions=arguments[2]?t.makeArray(arguments[2]):t.makeArray(""),isSet=pp_images.length>1,set_position=arguments[3]?arguments[3]:0,k(e.target)),settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),t(pp_images).length>1?t(".pp_nav").show():t(".pp_nav").hide(),t(".pp_loaderIcon").show(),settings.deeplinking&&function(){if("undefined"==typeof theRel)return;location.hash=theRel+"/"+rel_index+"/"}(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+t(pp_images).length),"undefined"!=typeof pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString(),c=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(t(window).height()*parseFloat(movie_height)/100-150),c=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(t(window).width()*parseFloat(movie_width)/100-150),c=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;"),imgPreloader="",skipInjection=!1,y(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position<t(pp_images).length-1&&(nextImage.src=pp_images[set_position+1]),prevImage=new Image,isSet&&pp_images[set_position-1]&&(prevImage.src=pp_images[set_position-1]),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]),imgPreloader.onload=function(){p=u(imgPreloader.width,imgPreloader.height),m()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),t.prettyPhoto.close()},imgPreloader.src=pp_images[set_position];break;case"youtube":p=u(movie_width,movie_height),movie_id=i("v",pp_images[set_position]),""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="//www.youtube.com/embed/"+movie_id,i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":p=u(movie_width,movie_height),movie_id=pp_images[set_position];var e=movie_id.match(/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/);movie="//player.vimeo.com/video/"+e[3]+"?title=0&amp;byline=0&amp;portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=p.width+"/embed/?moog_width="+p.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,p.height).replace(/{path}/g,movie);break;case"quicktime":(p=u(movie_width,movie_height)).height+=15,p.contentHeight+=15,p.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":p=u(movie_width,movie_height),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":p=u(movie_width,movie_height),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,p=u(movie_width,movie_height),doresize=!0,skipInjection=!0,t.get(pp_images[set_position],function(t){toInject=settings.inline_markup.replace(/{content}/g,t),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,m()});break;case"custom":p=u(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=t(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(t("body")).show(),doresize=!1,p=u(t(myClone).width(),t(myClone).height()),doresize=!0,t(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,t(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,m())}),!1},t.prettyPhoto.changePage=function(e){currentGalleryPage=0,"previous"==e?(set_position--,set_position<0&&(set_position=t(pp_images).length-1)):"next"==e?(set_position++,set_position>t(pp_images).length-1&&(set_position=0)):set_position=e,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&t(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),f(function(){t.prettyPhoto.open()})},t.prettyPhoto.changeGalleryPage=function(t){"next"==t?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==t?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=t,slide_speed="next"==t||"previous"==t?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},t.prettyPhoto.startSlideshow=function(){void 0===d?($pp_pic_holder.find(".pp_play").off("click").removeClass("pp_play").addClass("pp_pause").on("click",function(){return t.prettyPhoto.stopSlideshow(),!1}),d=setInterval(t.prettyPhoto.startSlideshow,settings.slideshow)):t.prettyPhoto.changePage("next")},t.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").off("click").removeClass("pp_pause").addClass("pp_play").on("click",function(){return t.prettyPhoto.startSlideshow(),!1}),clearInterval(d),d=undefined},t.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(t.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),t("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){t(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),t(this).remove(),t(window).off("scroll.prettyphoto"),-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto"),settings.callback(),doresize=!0,a=!1,delete settings}))},!pp_alreadyInitialized&&e()&&(pp_alreadyInitialized=!0,hashIndex=e(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){t("a["+o.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.off("click.prettyphoto").on("click.prettyphoto",t.prettyPhoto.initialize)}}(jQuery);var pp_alreadyInitialized=!1;
jQuery(function(d){function a(){"undefined"!=typeof d.fn.selectBox&&d("select.selectBox").filter(":visible").not(".enhanced").selectBox().addClass("enhanced")}function e(){var t,e,i,n;"undefined"!=typeof d.prettyPhoto&&(t={hook:"data-rel",social_tools:!1,theme:"pp_woocommerce yith-wcwl-pp-modal",horizontal_padding:20,opacity:.8,deeplinking:!1,overlay_gallery:!1,keyboard_shortcuts:!1,default_width:500,changepicturecallback:function(){a(),d(".wishlist-select").filter(":visible").change(),d(document).trigger("yith_wcwl_popup_opened",[this])},markup:'<div class="pp_pic_holder"><div class="pp_content_container"><div class="pp_content"><div class="pp_loaderIcon"></div><div class="pp_fade"><a href="#" class="pp_expand" title="Expand the image">Expand</a><div class="pp_hoverContainer"><a class="pp_next" href="#">next</a><a class="pp_previous" href="#">previous</a></div><div id="pp_full_res"></div><div class="pp_details"><a class="pp_close" href="#">Close</a></div></div></div></div></div><div class="pp_overlay yith-wcwl-overlay"></div>'},d('a[data-rel^="prettyPhoto[add_to_wishlist_"]').add('a[data-rel="prettyPhoto[ask_an_estimate]"]').add('a[data-rel="prettyPhoto[create_wishlist]"]').off("click").prettyPhoto(t),d('a[data-rel="prettyPhoto[move_to_another_wishlist]"]').on("click",function(){var t=d(this),e=d("#move_to_another_wishlist").find("form"),i=e.find(".row-id"),t=t.closest("[data-row-id]").data("row-id"),i=(i.length&&i.remove(),d("<input>",{type:"hidden",name:"row_id","class":"row-id"}).val(t));e.append(i)}).prettyPhoto(t),e=function(t,e){"undefined"!=typeof t.classList&&t.classList.contains("yith-wcwl-overlay")&&(t="remove"===e?"removeClass":"addClass",d("body")[t]("yith-wcwl-with-pretty-photo"))},i=function(t){e(t,"add")},n=function(t){e(t,"remove")},new MutationObserver(function(t){for(var e in t){e=t[e];"childList"===e.type&&("undefined"!=typeof e.addedNodes&&"function"==typeof e.addedNodes.forEach&&e.addedNodes.forEach(i),"undefined"!=typeof e.removedNodes)&&"function"==typeof e.addedNodes.forEach&&e.removedNodes.forEach(n)}}).observe(document.body,{childList:!0}))}function i(){d(".wishlist_table").find('.product-checkbox input[type="checkbox"]').off("change").on("change",function(){var t=d(this);t.parent().removeClass("checked").removeClass("unchecked").addClass(t.is(":checked")?"checked":"unchecked")}).trigger("change")}function n(){d(".add_to_cart").filter("[data-icon]").not(".icon-added").each(function(){var t=d(this),e=t.data("icon"),e=e.match(/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)?/gi)?d("<img/>",{src:e}):d("<i/>",{"class":"fa "+e});t.prepend(e).addClass("icon-added")})}function c(){a(),e(),i(),n(),r(),o(),f(),_(),h(),w(),d(document).trigger("yith_wcwl_init_after_ajax")}function o(){yith_wcwl_l10n.enable_tooltip&&d(".yith-wcwl-add-to-wishlist").find("[data-title]").each(function(){var t=d(this);t.hasClass("tooltip-added")||(t.on("mouseenter",function(){var t=d(this),e=d("<span>",{"class":"yith-wcwl-tooltip",text:t.data("title")}),i=(t.append(e),e.outerWidth()+6);e.outerWidth(i),e.fadeIn(200),t.addClass("with-tooltip")}).on("mouseleave",function(){var t=d(this);t.find(".yith-wcwl-tooltip").fadeOut(200,function(){t.removeClass("with-tooltip").find(".yith-wcwl-tooltip").remove()})}),t.addClass("tooltip-added"))})}function r(){d(".yith-wcwl-add-button").filter(".with-dropdown").on("mouseleave",function(){var t=d(this).find(".yith-wcwl-dropdown");t.length&&t.fadeOut(200)}).children("a").on("mouseenter",function(){var t=d(this).closest(".with-dropdown"),e=t.find(".yith-wcwl-dropdown");e.length&&e.children().length&&t.find(".yith-wcwl-dropdown").fadeIn(200)})}function _(){"undefined"!=typeof yith_wcwl_l10n.enable_drag_n_drop&&yith_wcwl_l10n.enable_drag_n_drop&&d(".wishlist_table").filter(".sortable").not(".no-interactions").each(function(){var n=d(this),a=!1;n.sortable({items:"[data-row-id]",scroll:!0,helper:function(t,e){return e.children().each(function(){d(this).width(d(this).width())}),e},update:function(){var t=n.find("[data-row-id]"),e=[],i=0;t.length&&(a&&a.abort(),t.each(function(){var t=d(this);t.find('input[name*="[position]"]').val(i++),e.push(t.data("row-id"))}),a=d.ajax({data:{action:yith_wcwl_l10n.actions.sort_wishlist_items,nonce:yith_wcwl_l10n.nonce.sort_wishlist_items_nonce,context:"frontend",positions:e,wishlist_token:n.data("token"),page:n.data("page"),per_page:n.data("per-page")},method:"POST",url:yith_wcwl_l10n.ajax_url}))}})})}function h(){var o,s;d(".wishlist_table").on("change",".product-quantity :input",function(){var t=d(this),e=t.closest("[data-row-id]"),i=e.data("row-id"),n=t.closest(".wishlist_table"),a=n.data("token");clearTimeout(s),e.find(".add_to_cart").attr("data-quantity",t.val()),s=setTimeout(function(){o&&o.abort(),o=d.ajax({beforeSend:function(){j(n)},complete:function(){C(n)},data:{action:yith_wcwl_l10n.actions.update_item_quantity,nonce:yith_wcwl_l10n.nonce.update_item_quantity_nonce,context:"frontend",product_id:i,wishlist_token:a,quantity:t.val()},method:"POST",url:yith_wcwl_l10n.ajax_url})},1e3)})}function w(){d(".copy-trigger").on("click",function(){var t=d(".copy-target");0<t.length&&(t.is("input")?(l()?t[0].setSelectionRange(0,9999):t.select(),document.execCommand ("copy")):(t=d("<input/>",{val:t.text(),type:"text"}),d("body").append(t),l()?t[0].setSelectionRange(0,9999):t.select(),document.execCommand ("copy"),t.remove()))})}function f(){d(".wishlist_table").filter(".images_grid").not(".enhanced").on("click","[data-row-id] .product-thumbnail a",function(t){var e,i,n;yith_wcwl_l10n.disable_popup_grid_view||(i=(e=d(this).closest("[data-row-id]")).siblings("[data-row-id]"),n=e.find(".item-details"),t.preventDefault(),n.length&&(i.removeClass("show"),e.toggleClass("show")))}).on("click","[data-row-id] a.close",function(t){var e=d(this).closest("[data-row-id]"),i=e.find(".item-details");t.preventDefault(),i.length&&e.removeClass("show")}).on("click","[data-row-id] a.remove_from_wishlist",function(t){var e=d(this);return t.stopPropagation(),u(e),!1}).addClass("enhanced"),d(document).on("click",function(t){d(t.target).closest("[data-row-id]").length||d(".wishlist_table").filter(".images_grid").find(".show").removeClass("show")}).on("added_to_cart",function(){d(".wishlist_table").filter(".images_grid").find(".show").removeClass("show")})}function p(e,t,i){e.action=yith_wcwl_l10n.actions.move_to_another_wishlist_action,e.nonce=yith_wcwl_l10n.nonce.move_to_another_wishlist_nonce,e.context="frontend",""!==e.wishlist_token&&""!==e.destination_wishlist_token&&""!==e.item_id&&d.ajax({beforeSend:t,url:yith_wcwl_l10n.ajax_url,data:e,dataType:"json",method:"post",success:function(t){i(t),c(),d("body").trigger("moved_to_another_wishlist",[d(this),e.item_id])}})}function u(e){var t=e.parents(".cart.wishlist_table"),i=e.parents("[data-row-id]"),n=i.data("row-id"),a=t.data("id"),o=t.data("token"),a={action:yith_wcwl_l10n.actions.remove_from_wishlist_action,nonce:yith_wcwl_l10n.nonce.remove_from_wishlist_nonce,context:"frontend",remove_from_wishlist:n,wishlist_id:a,wishlist_token:o,fragments:S(n)};d.ajax({beforeSend:function(){j(t)},complete:function(){C(t)},data:a,method:"post",success:function(t){"undefined"!=typeof t.fragments&&D(t.fragments),c(),d("body").trigger("removed_from_wishlist",[e,i])},url:yith_wcwl_l10n.ajax_url})}function m(t){var e=d(this),i=e.closest(".wishlist_table"),n=null;t.preventDefault(),(n=i.length?e.closest("[data-wishlist-id]").find(".wishlist-title"):e.parents(".wishlist-title")).next().css("display","inline-block").find('input[type="text"]').focus(),n.hide()}function y(t){var e=d(this);t.preventDefault(),e.parents(".hidden-title-form").hide(),e.parents(".hidden-title-form").prev().show()}function v(t){var e=d(this),i=e.closest(".hidden-title-form"),e=e.closest("[data-wishlist-id]").data("wishlist-id"),n=i.find('input[type="text"]'),a=n.val();t.preventDefault(),a?(e=e||d("#wishlist_id").val(),t={action:yith_wcwl_l10n.actions.save_title_action,nonce:yith_wcwl_l10n.nonce.save_title_nonce,context:"frontend",wishlist_id:e,title:a,fragments:S()},d.ajax({type:"POST",url:yith_wcwl_l10n.ajax_url,data:t,dataType:"json",beforeSend:function(){j(i)},complete:function(){C(i)},success:function(t){var e=t.fragments;t.result?(i.hide(),i.prev().find(".wishlist-anchor, h1, h2").text(a).end().show()):(i.addClass("woocommerce-invalid"),n.focus()),void 0!==e&&D(e),c()}})):(i.addClass("woocommerce-invalid"),n.focus())}function g(){var t=d(this),e=t.val(),t=t.closest("[data-wishlist-id]").data("wishlist-id"),t={action:yith_wcwl_l10n.actions.save_privacy_action,nonce:yith_wcwl_l10n.nonce.save_privacy_nonce,context:"frontend",wishlist_id:t,privacy:e,fragments:S()};d.ajax({type:"POST",url:yith_wcwl_l10n.ajax_url,data:t,dataType:"json",success:function(t){t=t.fragments;void 0!==t&&D(t)}})}function b(t,e){if("undefined"!=typeof d.prettyPhoto&&"undefined"!=typeof d.prettyPhoto.close)if(void 0!==t){var i,n=d(".pp_content_container"),a=n.find(".pp_content"),n=n.find(".yith-wcwl-popup-form"),o=n.closest(".pp_pic_holder");n.length&&((i=d("<div/>",{"class":"yith-wcwl-popup-feedback"})).append(d("<i/>",{"class":"fa heading-icon "+("error"===e?"fa-exclamation-triangle":"fa-check")})),i.append(d("<p/>",{"class":"feedback",html:t})),i.css("display","none"),a.css("height","auto"),n.after(i),n.fadeOut(200,function(){i.fadeIn()}),o.addClass("feedback"),o.css("left",d(window).innerWidth()/2-o.outerWidth()/2+"px"),"undefined"!=typeof yith_wcwl_l10n.auto_close_popup&&!yith_wcwl_l10n.auto_close_popup||setTimeout(b,yith_wcwl_l10n.popup_timeout))}else try{d.prettyPhoto.close(),yith_wcwl_l10n.redirect_after_ask_estimate&&window.location.replace(yith_wcwl_l10n.ask_estimate_redirect_url)}catch(s){}}function k(t){var e=d("#yith-wcwl-popup-message"),i=d("#yith-wcwl-message"),n="undefined"!=typeof yith_wcwl_l10n.popup_timeout?yith_wcwl_l10n.popup_timeout:3e3;"undefined"!=typeof yith_wcwl_l10n.enable_notices&&!yith_wcwl_l10n.enable_notices||(i.html(t),e.css("margin-left","-"+d(e).width()+"px").fadeIn(),window.setTimeout(function(){e.fadeOut()},n))}function x(o){var t=d("select.wishlist-select"),e=d("ul.yith-wcwl-dropdown");t.each(function(){var i=d(this),t=i.find("option"),e=t.filter('[value="new"]');t.not(e).remove(),d.each(o,function(t,e){d("<option>",{value:e.id,html:e.wishlist_name}).appendTo(i)}),i.append(e)}),e.each(function(){var i=d(this),t=i.find("li"),e=i.closest(".yith-wcwl-add-button").children("a.add_to_wishlist"),n=e.attr("data-product-id"),a=e.attr("data-product-type");t.remove(),d.each(o,function(t,e){e["default"]||d("<li>").append(d("<a>",{rel:"nofollow",html:e.wishlist_name,"class":"add_to_wishlist",href:e.add_to_this_wishlist_url,"data-product-id":n,"data-product-type":a,"data-wishlist-id":e.id})).appendTo(i)})})}function j(t){"undefined"!=typeof d.fn.block&&t.fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+yith_wcwl_l10n.ajax_loader_url+") no-repeat center",backgroundSize:"40px 40px",opacity:1}})}function C(t){"undefined"!=typeof d.fn.unblock&&t.stop(!0).css("opacity","1").unblock()}function T(){if(navigator.cookieEnabled)return 1;document.cookie="cookietest=1";var t=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}function S(t){var i={},e=null;return t?"object"==typeof t?(e=(t=d.extend({fragments:null,s:"",container:d(document),firstLoad:!1},t)).fragments||t.container.find(".wishlist-fragment"),t.s&&(e=e.not("[data-fragment-ref]").add(e.filter('[data-fragment-ref="'+t.s+'"]'))),t.firstLoad&&(e=e.filter(".on-first-load"))):(e=d(".wishlist-fragment"),"string"!=typeof t&&"number"!=typeof t||(e=e.not("[data-fragment-ref]").add(e.filter('[data-fragment-ref="'+t+'"]')))):e=d(".wishlist-fragment"),e.length?(e.each(function(){var t=d(this),e=t.attr("class").split(" ").filter(t=>t.length&&"exists"!==t).join(yith_wcwl_l10n.fragments_index_glue);i[e]=t.data("fragment-options")}),i):null}function P(e){var i=S(e=d.extend({firstLoad:!0},e));i&&d.ajax({data:{action:yith_wcwl_l10n.actions.load_fragments,nonce:yith_wcwl_l10n.nonce.load_fragments_nonce,context:"frontend",fragments:i},method:"post",success:function(t){"undefined"!=typeof t.fragments&&(D(t.fragments,e),c(),d(document).trigger("yith_wcwl_fragments_loaded",[i,t.fragments,e.firstLoad]))},url:yith_wcwl_l10n.ajax_url})}function D(t,e={}){d.each(t,function(t,e){var t="."+t.split(yith_wcwl_l10n.fragments_index_glue).filter(t=>t.length&&"exists"!==t&&"with-count"!==t).join("."),i=d(t),n=d(e).filter(t);n.length||(n=d(e).find(t)),i.length&&n.length&&i.replaceWith(n)}),d(document.body).trigger("yith_wcwl_fragments_replaced",{fragments:t,data:e})}function t(){var t=d(".product-checkbox input:checked");s.prop("disabled",!t.length)}var s;function l(){return navigator.userAgent.match(/ipad|iphone/i)}function O(t){return!0===t||"yes"===t||"1"===t||1===t}d(document).on("yith_wcwl_init",function(){var l,t=d(this),s="undefined"!=typeof wc_add_to_cart_params&&null!==wc_add_to_cart_params?wc_add_to_cart_params.cart_redirect_after_add:"";t.on("click",".add_to_wishlist",function(t){var n=d(this),e=n.attr("data-product-id"),a=d(".add-to-wishlist-"+e),e={action:yith_wcwl_l10n.actions.add_to_wishlist_action,nonce:yith_wcwl_l10n.nonce.add_to_wishlist_nonce,context:"frontend",add_to_wishlist:e,product_type:n.data("product-type"),wishlist_id:n.data("wishlist-id"),fragments:S(e)};if((i=d(document).triggerHandler("yith_wcwl_add_to_wishlist_data",[n,e]))&&(e=i),t.preventDefault(),jQuery(document.body).trigger("adding_to_wishlist"),yith_wcwl_l10n.multi_wishlist&&yith_wcwl_l10n.modal_enable){var i=n.parents(".yith-wcwl-popup-footer").prev(".yith-wcwl-popup-content"),t=i.find(".wishlist-select"),o=i.find(".wishlist-name"),i=i.find(".wishlist-visibility").filter(":checked");if(e.wishlist_id=t.is(":visible")?t.val():"new",e.wishlist_name=o.val(),e.wishlist_visibility=i.val(),"new"===e.wishlist_id&&!e.wishlist_name)return o.closest("p").addClass("woocommerce-invalid"),!1;o.closest("p").removeClass("woocommerce-invalid")}if(T())return d.ajax({type:"POST",url:yith_wcwl_l10n.ajax_url,data:e,dataType:"json",beforeSend:function(){j(n)},complete:function(){C(n)},success:function(t){var e=t.result,i=t.message;yith_wcwl_l10n.multi_wishlist&&yith_wcwl_l10n.modal_enable?(b(i,e),"undefined"!=typeof t.user_wishlists&&x(t.user_wishlists)):k(i),"true"!==e&&"exists"!==e||("undefined"!=typeof t.fragments&&D(t.fragments),yith_wcwl_l10n.multi_wishlist&&!yith_wcwl_l10n.hide_add_button||a.find(".yith-wcwl-add-button").remove(),a.addClass("exists")),c(),d("body").trigger("added_to_wishlist",[n,a])}}),!1;window.alert(yith_wcwl_l10n.labels.cookie_disabled)}),t.on("click",".wishlist_table .remove_from_wishlist",function(t){var e=d(this);return t.preventDefault(),u(e),!1}),t.on("adding_to_cart","body",function(t,e,i){void 0!==e&&void 0!==i&&e.closest(".wishlist_table").length&&(i.remove_from_wishlist_after_add_to_cart=e.closest("[data-row-id]").data("row-id"),i.wishlist_id=e.closest(".wishlist_table").data("id"),"undefined"!=typeof wc_add_to_cart_params&&(wc_add_to_cart_params.cart_redirect_after_add=yith_wcwl_l10n.redirect_to_cart),"undefined"!=typeof yith_wccl_general)&&(yith_wccl_general.cart_redirect=O(yith_wcwl_l10n.redirect_to_cart))}),t.on("added_to_cart","body",function(t,e,i,n){var a,o;void 0!==n&&n.closest(".wishlist_table").length&&("undefined"!=typeof wc_add_to_cart_params&&(wc_add_to_cart_params.cart_redirect_after_add=s),"undefined"!=typeof yith_wccl_general&&(yith_wccl_general.cart_redirect=O(s)),o=(a=n.closest("[data-row-id]")).closest(".wishlist-fragment").data("fragment-options"),n.removeClass("added"),a.find(".added_to_cart").remove(),yith_wcwl_l10n.remove_from_wishlist_after_add_to_cart)&&o.is_user_owner&&a.remove()}),t.on("added_to_cart","body",function(){var t=d(".woocommerce-message");0===t.length?d("#yith-wcwl-form").prepend(yith_wcwl_l10n.labels.added_to_cart_message):t.fadeOut(300,function(){d(this).replaceWith(yith_wcwl_l10n.labels.added_to_cart_message).fadeIn()})}),t.on("cart_page_refreshed","body",c),t.on("click",".show-title-form",m),t.on("click",".wishlist-title-with-form h2",m),t.on("click",".remove_from_all_wishlists",function(t){var e=d(this),i=e.attr("data-product-id"),n=e.data("wishlist-id"),a=e.closest(".content"),e={action:yith_wcwl_l10n.actions.remove_from_all_wishlists,nonce:yith_wcwl_l10n.nonce.remove_from_all_wishlists_nonce,context:"frontend",prod_id:i,wishlist_id:n,fragments:S(i)};t.preventDefault(),d.ajax({beforeSend:function(){j(a)},complete:function(){C(a)},data:e,dataType:"json",method:"post",success:function(t){"undefined"!=typeof t.fragments&&D(t.fragments),c()},url:yith_wcwl_l10n.ajax_url})}),t.on("click",".hide-title-form",y),t.on("click",".save-title-form",v),t.on("change",".wishlist_manage_table .wishlist-visibility",g),t.on("change",".change-wishlist",function(){var t=d(this),e=t.parents(".cart.wishlist_table"),i=e.data("token"),n=t.parents("[data-row-id]").data("row-id");p({wishlist_token:i,destination_wishlist_token:t.val(),item_id:n,fragments:S()},function(){j(e)},function(t){"undefined"!=typeof t.fragments&&D(t.fragments),C(e)})}),t.on("click",".yith-wcwl-popup-footer .move_to_wishlist",function(){var i=d(this),t=i.attr("data-product-id"),e=i.data("origin-wishlist-id"),n=i.closest("form"),a=n.find(".wishlist-select").val(),o=n.find(".wishlist-name"),s=o.val(),n=n.find(".wishlist-visibility").filter(":checked").val();if("new"===a&&!s)return o.closest("p").addClass("woocommerce-invalid"),!1;o.closest("p").removeClass("woocommerce-invalid"),p({wishlist_token:e,destination_wishlist_token:a,item_id:t,wishlist_name:s,wishlist_visibility:n,fragments:S(t)},function(){j(i)},function(t){var e=t.message;yith_wcwl_l10n.multi_wishlist?(b(e),"undefined"!=typeof t.user_wishlists&&x(t.user_wishlists)):k(e),"undefined"!=typeof t.fragments&&D(t.fragments),c(),C(i)})}),t.on("click",".delete_item",function(){var i=d(this),t=i.attr("data-product-id"),e=i.data("item-id"),n=d(".add-to-wishlist-"+t),e={action:yith_wcwl_l10n.actions.delete_item_action,nonce:yith_wcwl_l10n.nonce.delete_item_nonce,context:"frontend",item_id:e,fragments:S(t)};return d.ajax({url:yith_wcwl_l10n.ajax_url,data:e,dataType:"json",beforeSend:function(){j(i)},complete:function(){C(i)},method:"post",success:function(t){var e=t.fragments,t=t.message;yith_wcwl_l10n.multi_wishlist&&b(t),i.closest(".yith-wcwl-remove-button").length||k(t),void 0!==e&&D(e),c(),d("body").trigger("removed_from_wishlist",[i,n])}}),!1}),t.on("change",".yith-wcwl-popup-content .wishlist-select",function(){var t=d(this);"new"===t.val()?t.parents(".yith-wcwl-first-row").next(".yith-wcwl-second-row").show():t.parents(".yith-wcwl-first-row").next(".yith-wcwl-second-row").hide()}),t.on("change","#bulk_add_to_cart",function(){var t=d(this),e=t.closest(".wishlist_table").find("[data-row-id]").find('input[type="checkbox"]:not(:disabled)');(t.is(":checked")?e.prop("checked","checked"):e.prop("checked",!1)).change()}),t.on("submit",".wishlist-ask-an-estimate-popup",function(){var t=d(this),i=t.closest("form"),n=t.closest(".pp_content"),t=i.serializeArray().reduce((t,e)=>(t[e.name]=e.value,t),{});return t.action=yith_wcwl_l10n.actions.ask_an_estimate,t.nonce=yith_wcwl_l10n.nonce.ask_an_estimate_nonce,t.context="frontend",d.ajax({beforeSend:function(){j(i)},complete:function(){C(i)},data:t,dataType:"json",method:"post",success:function(t){var e;"undefined"!=typeof t.result&&t.result?void 0!==(e=t.template)&&(i.replaceWith(e),n.css("height","auto"),setTimeout(b,yith_wcwl_l10n.time_to_close_prettyphoto)):"undefined"!=typeof t.message&&(i.find(".woocommerce-error").remove(),i.find(".popup-description").after(d("<div>",{text:t.message,"class":"woocommerce-error"})))},url:yith_wcwl_l10n.ajax_url}),!1}),t.on("click",".yith-wfbt-add-wishlist",function(t){t.preventDefault();var i,e,n,a,o,s,t=d(this),l=d("#yith-wcwl-form");d("html, body").animate({scrollTop:l.offset().top},500),i=l,t=(l=t).attr("data-product-id"),e=d(document).find(".cart.wishlist_table"),n=e.data("pagination"),a=e.data("per-page"),o=e.data("id"),s=e.data("token"),n={action:yith_wcwl_l10n.actions.reload_wishlist_and_adding_elem_action,nonce:yith_wcwl_l10n.nonce.reload_wishlist_and_adding_elem_nonce,context:"frontend",pagination:n,per_page:a,wishlist_id:o,wishlist_token:s,add_to_wishlist:t,product_type:l.data("product-type")},T()?d.ajax({type:"POST",url:yith_wcwl_l10n.ajax_url,data:n,dataType:"html",beforeSend:function(){j(e)},complete:function(){C(e)},success:function(t){var t=d(t),e=t.find("#yith-wcwl-form"),t=t.find(".yith-wfbt-slider-wrapper");i.replaceWith(e),d(".yith-wfbt-slider-wrapper").replaceWith(t),c(),d(document).trigger("yith_wcwl_reload_wishlist_from_frequently")}}):window.alert(yith_wcwl_l10n.labels.cookie_disabled)}),t.on("submit",".yith-wcwl-popup-form",function(){return!1}),t.on("yith_infs_added_elem",function(){e()}),t.on("found_variation",function(t,e){var i=d(t.target).data("product_id"),n=e.variation_id,t=d(".yith-wcwl-add-to-wishlist").find('[data-product-id="'+i+'"]'),e=d(".yith-wcwl-add-to-wishlist").find('[data-original-product-id="'+i+'"]'),e=t.add(e),t=e.closest(".wishlist-fragment").filter(":visible");i&&n&&e.length&&(e.each(function(){var t=d(this),e=t.closest(".yith-wcwl-add-to-wishlist");t.attr("data-original-product-id",i),t.attr("data-product-id",n),e.length&&(void 0!==(t=e.data("fragment-options"))&&(t.product_id=n,e.data("fragment-options",t)),e.removeClass(function(t,e){return e.match(/add-to-wishlist-\S+/g).join(" ")}).addClass("add-to-wishlist-"+n).attr("data-fragment-ref",n))}),yith_wcwl_l10n.reload_on_found_variation)&&(j(t),P({fragments:t,firstLoad:!1}))}),t.on("reset_data",function(t){var n=d(t.target).data("product_id"),t=d('[data-original-product-id="'+n+'"]'),e=t.closest(".wishlist-fragment").filter(":visible");n&&t.length&&(t.each(function(){var t=d(this),e=t.closest(".yith-wcwl-add-to-wishlist"),i=t.attr("data-product-id");t.attr("data-product-id",n),t.attr("data-original-product-id",""),e.length&&(void 0!==(t=e.data("fragment-options"))&&(t.product_id=n,e.data("fragment-options",t)),e.removeClass("add-to-wishlist-"+i).addClass("add-to-wishlist-"+n).attr("data-fragment-ref",n))}),yith_wcwl_l10n.reload_on_found_variation)&&(j(e),P({fragments:e,firstLoad:!1}))}),t.on("yith_wcwl_reload_fragments",(t,e)=>P(e)),t.on("yith_wcwl_reload_after_ajax",c),t.on("yith_infs_added_elem",function(t,e){P({container:e,firstLoad:!1})}),t.on("yith_wcwl_fragments_loaded",function(t,e,i,n){n&&d(".variations_form").find(".variations select").last().change()}),t.on("click",".yith-wcwl-popup-feedback .close-popup",function(t){t.preventDefault(),b()}),"undefined"!=typeof yith_wcwl_l10n.enable_notices&&!yith_wcwl_l10n.enable_notices||!d(".yith-wcwl-add-to-wishlist").length||d("#yith-wcwl-popup-message").length||(t=d("<div>").attr("id","yith-wcwl-message"),t=d("<div>").attr("id","yith-wcwl-popup-message").html(t).hide(),d("body").prepend(t)),o(),r(),_(),h(),f(),d(document).on("click",".show-tab",function(t){var e=d(this),i=e.closest(".yith-wcwl-popup-content"),n=e.data("tab"),a=i.find(".tab").filter("."+n);if(t.preventDefault(),!a.length)return!1;e.addClass("active").siblings(".show-tab").removeClass("active"),a.show().siblings(".tab").hide(),"create"===n?i.prepend('<input type="hidden" id="new_wishlist_selector" class="wishlist-select" value="new">'):i.find("#new_wishlist_selector").remove(),d(document).trigger("yith_wcwl_tab_selected",[n,a])}),d(document).on("change",".wishlist-select",function(){var t=d(this),e=t.closest(".yith-wcwl-popup-content"),i=t.closest(".tab"),n=e.find(".tab.create"),e=e.find(".show-tab"),a=e.filter('[data-tab="create"]');"new"===t.val()&&n.length&&(i.hide(),n.show(),e.removeClass("active"),a.addClass("active"),t.find("option:selected").prop("selected",!1),t.change())}),a(),i(),e(),n(),l=!1,yith_wcwl_l10n.is_wishlist_responsive&&d(window).on("resize",function(){var t=d(".wishlist_table.responsive"),e=t.is(".mobile"),i=window.matchMedia("(max-width: "+yith_wcwl_l10n.mobile_media_query+"px)"),n=t.closest("form"),a=n.attr("class"),n=n.data("fragment-options"),o={},s=!1;t.length&&(i.matches&&t&&!e?(n.is_mobile="yes",s=!0):!i.matches&&t&&e&&(n.is_mobile="no",s=!0),s)&&(l&&l.abort(),o[a.split(" ").join(yith_wcwl_l10n.fragments_index_glue)]=n,l=d.ajax({beforeSend:function(){j(t)},complete:function(){C(t)},data:{action:yith_wcwl_l10n.actions.load_mobile_action,nonce:yith_wcwl_l10n.nonce.load_mobile_nonce,context:"frontend",fragments:o},method:"post",success:function(t){"undefined"!=typeof t.fragments&&(D(t.fragments),c(),d(document).trigger("yith_wcwl_responsive_template",[e,t.fragments]))},url:yith_wcwl_l10n.ajax_url}))}),w(),yith_wcwl_l10n.enable_ajax_loading&&P()}).trigger("yith_wcwl_init"),d("form#yith-wcwl-form .wishlist_table .product-quantity input").on("keypress",function(t){if("13"==t.keyCode)return t.preventDefault(),!1}),d(document).ready(function(){"thumbnails"===yith_wcwl_l10n.yith_wcwl_button_position&&d(".woocommerce-product-gallery + div.yith-wcwl-add-to-wishlist").appendTo(".woocommerce-product-gallery")}),d(document).on("keydown",'#yith-wcwl-form input[name="wishlist_name"]',function(t){var e,i=t.key;["Enter","Escape"].includes(i)&&(e=d(this).closest(".wishlist-title-container"),("Enter"===i?e.find("a.save-title-form"):e.find("a.hide-title-form")).trigger("click"),t.preventDefault())}),s=d('input[name="apply_bulk_actions"]'),d(document).on("change",".product-checkbox input",t),t()});
!function(t){t.fn.extend({easyResponsiveTabs:function(a){var e=a=t.extend({type:"default",width:"auto",fit:!0,closed:!1,activate:function(){}},a),s=e.type,i=e.fit,n=e.width,r=window.location.hash;!window.history||history.replaceState;t(this).on("tabactivate",(function(t,e){"function"==typeof a.activate&&a.activate.call(e,t)})),this.each((function(){var e=t(this);if(!(e.find(".resp-accordion").length>0)){var c,d=e.find("ul.resp-tabs-list"),o=e.attr("id");e.find("ul.resp-tabs-list li").addClass("resp-tab-item"),e.css({display:"block",width:n}),e.find(".resp-tabs-container > div").addClass("resp-tab-content"),function(){"vertical"==s&&e.addClass("resp-vtabs");1==i&&e.css({width:"100%"});"accordion"==s&&(e.addClass("resp-easy-accordion"),e.find(".resp-tabs-list").css("display","none"))}(),e.find(".resp-tab-content").before("<h2 class='resp-accordion'><span class='resp-arrow'></span></h2>");var l=0;e.find(".resp-accordion").each((function(){c=t(this),0==l&&(!a.closed||window.innerWidth>767)&&c.addClass("resp-tab-active");var s=e.find(".resp-tab-item:eq("+l+")"),i=e.find(".resp-accordion:eq("+l+")");i.append(s.html()),i.data(s.data()),c.attr("data-target","tab_item-"+l),l++}));var p=0;e.find(".resp-tab-item").each((function(){$tabItem=t(this),$tabItem.attr("data-target","tab_item-"+p),$tabItem.attr("role","tab");var a=0;e.find(".resp-tab-content").each((function(){t(this).attr("aria-labelledby","tab_item-"+a),a++})),p++}));var b=0;if(""!=r){var v=r.match(new RegExp(o+"([0-9]+)"));null!==v&&2===v.length&&(b=parseInt(v[1],10)-1)>p&&(b=0)}t(e.find(".resp-tab-item")[b]).addClass("resp-tab-active"),!0===a.closed||"accordion"===a.closed&&!d.is(":visible")||"tabs"===a.closed&&d.is(":visible")?t(e.find(".resp-tab-content")[b]).addClass("resp-tab-content-active resp-accordion-closed"):(t(e.find(".resp-accordion")[b]).addClass("resp-tab-active"),t(e.find(".resp-tab-content")[b]).addClass("resp-tab-content-active").attr("style","display:block")),e.find("ul.resp-tabs-list li[role=tab], .resp-accordion[data-target]").each((function(){var a=t(this),s=!1;a.on("click",(function(){var a=t(this),i=a.attr("aria-controls");if(i||(i=a.attr("data-target")),!s&&a.hasClass("resp-accordion")&&a.hasClass("resp-tab-active"))return s=!0,e.find(".resp-tab-content-active").slideUp("",(function(){s=!1,t(this).addClass("resp-accordion-closed")})),a.removeClass("resp-tab-active"),!1;!a.hasClass("resp-tab-active")&&a.hasClass("resp-accordion")?s||(s=!0,e.find(".resp-tab-active").removeClass("resp-tab-active"),e.find(".resp-tab-content-active").slideUp().removeClass("resp-tab-content-active resp-accordion-closed"),e.find("[data-target="+i+"]").addClass("resp-tab-active"),e.find(".resp-tab-content[aria-labelledby="+i+"]").slideDown("",(function(){s=!1})).addClass("resp-tab-content-active")):(e.find(".resp-tab-active").removeClass("resp-tab-active"),e.find(".resp-tab-content-active").removeAttr("style").removeClass("resp-tab-content-active").removeClass("resp-accordion-closed"),e.find("[data-target="+i+"]").addClass("resp-tab-active"),e.find(".resp-tab-content[aria-labelledby="+i+"]").addClass("resp-tab-content-active").attr("style","display:block")),a.trigger("tabactivate",a)}))})),t(window).on("resize",(function(a,s){s&&s.length&&t.contains(e,s)&&e.find(".resp-accordion-closed").removeAttr("style")}))}}))}})}(jQuery);
(function(e,i){"use strict";e=e||{},i.extend(e,{SidebarMenu:{defaults:{menu:i(".sidebar-menu:not(.side-menu-accordion)"),toggle:i(".widget_sidebar_menu .widget-title .toggle"),menu_toggle:i("#main-toggle-menu .menu-title")},rtl:e.rtl,initialize:function(e,t,s){return this.$menu&&this.$menu.length&&e&&e.length?(this.$menu=i.uniqueSort(i.merge(this.$menu,e)),this.build(),this):(this.$menu=e||this.defaults.menu,this.$menu.length?(this.$toggle=t||this.defaults.toggle,this.$menu_toggle=s||this.defaults.menu_toggle,this.events(),this):this)},isRightSidebar:function(e){var t=!1;t=this.rtl?!(i("#main").hasClass("column2-right-sidebar")||i("#main").hasClass("column2-wide-right-sidebar")):i("#main").hasClass("column2-right-sidebar")||i("#main").hasClass("column2-wide-right-sidebar"),e.closest("#main-toggle-menu").length&&(t=!!this.rtl);var s=e.closest(".header-wrapper");return s.length&&s.hasClass("header-side-nav")&&(t=!!this.rtl,i(".page-wrapper").hasClass("side-nav-right")&&(t=!this.rtl)),t},popupWidth:function(){var t=window.innerWidth,s=e.bodyWidth-2*e.grid_gutter_width;return i("body").hasClass("wide")||(t>=1140+e.grid_gutter_width&&t<=e.container_width+2*e.grid_gutter_width-1&&e.container_width>=1360?s=1140-e.grid_gutter_width:t>=e.container_width+e.grid_gutter_width-1?s=e.container_width-e.grid_gutter_width:t>=992?s=960-e.grid_gutter_width:t>=768&&(s=720-e.grid_gutter_width)),s},build:function(t){var s=this;if(t||(t=s.$menu),t.length){t.find(".menu-item-has-children").each((function(){var e=i(this);e.find(">.popup").length>0&&0==e.find(">.popup>.inner>.sub-menu > li:not(.hidden-item)").length&&e.addClass("hidden-item")}));var n=t.parent(".toggle-menu-wrap"),a=null;if(n.length&&n.is(":hidden")&&((a=n.get(0)).style.display="block",a.style.visibility="hidden"),t.each((function(){var n,a=this,o=i(this);if(!a.classList.contains("side-menu-slide")){if(window.innerWidth<992)n=s.popupWidth();else{var l=this.offsetWidth?this.offsetWidth:o.width();n=s.popupWidth()-l-45}var d=s.isRightSidebar(o),h=o.children("li");h.each((function(){var s=i(this),l=s.children(".popup");if(l.length){var r=l.get(0),u=!1;if(l.is(":visible")?u=!0:r.style.display="block",s.hasClass("wide")){o.hasClass("side-menu-columns")||(r.style.left=0);var c=4;s.hasClass("col-1")&&(c=1),s.hasClass("col-2")&&(c=2),s.hasClass("col-3")&&(c=3),s.hasClass("col-4")&&(c=4),s.hasClass("col-5")&&(c=5),s.hasClass("col-6")&&(c=6),window.innerWidth<992&&(c=1);var m=0;l.find("> .inner > ul > li").each((function(){var e=parseFloat(i(this).data("cols"));(!e||e<=0)&&(e=1),e>c&&(e=c),m+=e})),m>c&&(m=c);var p=l.data("popup-mw")?l.data("popup-mw"):l.find(".inner").css("max-width"),f=n/c;"none"!==p&&parseInt(p)<n&&(f=parseInt(p)/c),l.find("> .inner > ul > li").each((function(){var e=parseFloat(i(this).data("cols"));e<=0&&(e=1),e>c&&(e=c),s.hasClass("pos-center")||s.hasClass("pos-left")||s.hasClass("pos-right")?this.style.width=100/m*e+"%":this.style.width=100/c*e+"%"})),r.children[0].children[0].style.width=f*m+1+"px",o.hasClass("side-menu-columns")||(d?(r.style.left="auto",r.style.right=(this.offsetWidth?this.offsetWidth:i(this).width())+"px"):(r.style.left=(this.offsetWidth?this.offsetWidth:i(this).width())+"px",r.style.right="auto"))}u||(r.style.display="none"),a.classList.contains("side-menu-accordion")||a.classList.contains("side-menu-slide")||s.hasClass("sub-ready")||(!("ontouchstart"in document)&&window.innerWidth>991?s.on("mouseenter",(function(){if(h.find(".popup").hide(),l.show(),l.parent().addClass("open"),!o.hasClass("side-menu-columns")&&"static"!==l.parent().css("position")){let i=this.getBoundingClientRect().top;if(this.offsetParent&&i+r.offsetHeight>e.innerHeight){let t=i+r.offsetHeight-e.innerHeight,s=i-this.parentNode.getBoundingClientRect().top;s<t&&(t=s),r.style.top=-1*t+"px",r.style.setProperty("--porto-sd-menu-popup-top",-1*t+"px")}else r.style.top="",r.style.setProperty("--porto-sd-menu-popup-top","")}l.find(".owl-carousel").length&&l.find(".owl-carousel").each((function(){var e,t=i(this);if(!t.hasClass("owl-loaded")){var s=t.data("plugin-options");s&&(e=s),t.themeCarousel(e)}}))})).on("mouseleave",(function(){l.hide(),l.parent().removeClass("open")})):s.on("click",".arrow",(function(){!o.hasClass("side-menu-columns")&&!l.parent().hasClass("open")&&window.innerWidth>991&&t.children("li.has-sub").removeClass("open").children(".popup").hide(),l.slideToggle(),l.parent().toggleClass("open")})),s.addClass("sub-ready"))}}))}})),t.hasClass("side-menu-slide")){var o={$mainNav:t,$mainNavItem:t.find("li"),build:function(){this.menuNav()},initSub:function(e){var i=e.closest("ul"),t=e.parent().find("ul").first();t.children(".menu-item").children(".go-back").length<1&&t.prepend('<li class="menu-item"><a class="go-back" href="#">'+js_porto_vars.submenu_back+"</a></li>"),i.addClass("next-menu"),t.addClass("visible"),i.css({overflow:"visible","overflow-y":"visible"}),t.outerHeight()<t.closest(".header-main").outerHeight()-100&&t.css({height:t.outerHeight()+t.find("> li").outerHeight()});var s=t.find("> li").length*t.find("> li").outerHeight()-t.outerHeight();s>0&&t.css({overflow:"hidden","overflow-y":"scroll"}),t.css({"padding-top":s+"px"})},menuNav:function(){var e=this;e.$mainNav.find(".menu-item-has-children > a.nolink").removeClass("nolink").attr("href",""),e.$mainNav.find(".menu-item-has-children > a:not(.go-back)").off("click").on("click",(function(t){t.stopImmediatePropagation(),t.preventDefault();var s=i(this);js_porto_vars.lazyload_menu&&!e.$mainNav.hasClass("sub-ready")?(e.initSub(s),e.$mainNav.on("sub-loaded",(function(){e.initSub(s)}))):e.initSub(s)}))}};o.build()}return a&&(a.style.display="",a.style.visibility=""),s}},events:function(){var e,t=this;(t.$toggle.on("click",(function(){var e=i(this).parent().parent(),s=i(this);s.hasClass("closed")?(s.removeClass("closed"),e.removeClass("closed"),e.find(".sidebar-menu-wrap").stop().slideDown(400,(function(){i(this).attr("style","").show(),t.build()}))):(s.addClass("closed"),e.addClass("closed"),e.find(".sidebar-menu-wrap").stop().slideUp(400,(function(){i(this).attr("style","").hide()})))})),this.$menu_toggle.on("click",(function(){var e=i(this).parent();if(!e.hasClass("show-always")&&!e.hasClass("show-hover")){var s=i(this);s.hasClass("closed")?(s.removeClass("closed"),e.removeClass("closed"),e.find(".toggle-menu-wrap").stop().slideDown(400,(function(){i(this).attr("style","").show()})),t.build()):(s.addClass("closed"),e.addClass("closed"),e.find(".toggle-menu-wrap").stop().slideUp(400,(function(){i(this).attr("style","").hide()})))}})),t.$menu.hasClass("side-menu-slide")&&t.$menu.on("click",".go-back",(function(e){e.preventDefault();var t=i(this).closest(".next-menu"),s=0;t.length&&t.find("> li").length&&(s=t.find("> li").length*t.find("> li").outerHeight()-t.outerHeight()),t.removeClass("next-menu"),i(this).closest("ul").removeClass("visible"),s>0&&t.css({overflow:"hidden","overflow-y":"scroll"})})),i(".sidebar-menu:not(.side-menu-accordion)").closest("[data-plugin-sticky]").length)?i(window).smartresize((function(){e&&clearTimeout(e),e=setTimeout((function(){t.build()}),800)})):i(window).smartresize((function(e){e.originalEvent&&t.build()}));return setTimeout((function(){t.build()}),400),"ontouchstart"in document&&i(document.body).on("click",(function(e){window.innerWidth>991&&(i(e.target).closest("li.has-sub.open").length||t.$menu.each((function(){var e=i(this);e.hasClass("side-menu-accordion")||e.hasClass("side-menu-slide")||e.hasClass("side-menu-columns")||e.children("li.has-sub").removeClass("open").children(".popup").hide()})))})),t}}})}).apply(this,[window.theme,jQuery]),jQuery(document).ready((function(e){void 0!==theme.SidebarMenu&&(theme.bodyWidth||(theme.bodyWidth=theme.bodyWidth||document.body.offsetWidth),theme.SidebarMenu.initialize(),e.fn.themeAccordionMenu&&e(".sidebar-menu.side-menu-accordion").themeAccordionMenu({open_one:!0}))}));
!function(n,t){var r,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,r=n._,(e=n._=t()).noConflict=function(){return n._=r,e})}(this,function(){var n="1.13.7",t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,V=Object.prototype,F="undefined"!=typeof Symbol?Symbol.prototype:null,P=e.push,f=e.slice,s=V.toString,q=V.hasOwnProperty,r="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,U=Array.isArray,W=Object.keys,z=Object.create,L=r&&ArrayBuffer.isView,$=isNaN,C=isFinite,K=!{toString:null}.propertyIsEnumerable("toString"),J=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],G=Math.pow(2,53)-1;function l(u,o){return o=null==o?u.length-1:+o,function(){for(var n=Math.max(arguments.length-o,0),t=Array(n),r=0;r<n;r++)t[r]=arguments[r+o];switch(o){case 0:return u.call(this,t);case 1:return u.call(this,arguments[0],t);case 2:return u.call(this,arguments[0],arguments[1],t)}for(var e=Array(o+1),r=0;r<o;r++)e[r]=arguments[r];return e[o]=t,u.apply(this,e)}}function o(n){var t=typeof n;return"function"==t||"object"==t&&!!n}function H(n){return void 0===n}function Q(n){return!0===n||!1===n||"[object Boolean]"===s.call(n)}function i(n){var t="[object "+n+"]";return function(n){return s.call(n)===t}}var X=i("String"),Y=i("Number"),Z=i("Date"),nn=i("RegExp"),tn=i("Error"),rn=i("Symbol"),en=i("ArrayBuffer"),a=i("Function"),t=t.document&&t.document.childNodes,p=a="function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof t?function(n){return"function"==typeof n||!1}:a,t=i("Object"),un=u&&(!/\[native code\]/.test(String(DataView))||t(new DataView(new ArrayBuffer(8)))),a="undefined"!=typeof Map&&t(new Map),u=i("DataView");var h=un?function(n){return null!=n&&p(n.getInt8)&&en(n.buffer)}:u,v=U||i("Array");function y(n,t){return null!=n&&q.call(n,t)}var on=i("Arguments"),an=(!function(){on(arguments)||(on=function(n){return y(n,"callee")})}(),on);function fn(n){return Y(n)&&$(n)}function cn(n){return function(){return n}}function ln(t){return function(n){n=t(n);return"number"==typeof n&&0<=n&&n<=G}}function sn(t){return function(n){return null==n?void 0:n[t]}}var d=sn("byteLength"),pn=ln(d),hn=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var vn=r?function(n){return L?L(n)&&!h(n):pn(n)&&hn.test(s.call(n))}:cn(!1),g=sn("length");function yn(n,t){t=function(t){for(var r={},n=t.length,e=0;e<n;++e)r[t[e]]=!0;return{contains:function(n){return!0===r[n]},push:function(n){return r[n]=!0,t.push(n)}}}(t);var r=J.length,e=n.constructor,u=p(e)&&e.prototype||V,o="constructor";for(y(n,o)&&!t.contains(o)&&t.push(o);r--;)(o=J[r])in n&&n[o]!==u[o]&&!t.contains(o)&&t.push(o)}function b(n){if(!o(n))return[];if(W)return W(n);var t,r=[];for(t in n)y(n,t)&&r.push(t);return K&&yn(n,r),r}function dn(n,t){var r=b(t),e=r.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=r[o];if(t[i]!==u[i]||!(i in u))return!1}return!0}function m(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)}function gn(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,d(n))}m.VERSION=n,m.prototype.valueOf=m.prototype.toJSON=m.prototype.value=function(){return this._wrapped},m.prototype.toString=function(){return String(this._wrapped)};var bn="[object DataView]";function mn(n,t,r,e){var u;return n===t?0!==n||1/n==1/t:null!=n&&null!=t&&(n!=n?t!=t:("function"==(u=typeof n)||"object"==u||"object"==typeof t)&&function n(t,r,e,u){t instanceof m&&(t=t._wrapped);r instanceof m&&(r=r._wrapped);var o=s.call(t);if(o!==s.call(r))return!1;if(un&&"[object Object]"==o&&h(t)){if(!h(r))return!1;o=bn}switch(o){case"[object RegExp]":case"[object String]":return""+t==""+r;case"[object Number]":return+t!=+t?+r!=+r:0==+t?1/+t==1/r:+t==+r;case"[object Date]":case"[object Boolean]":return+t==+r;case"[object Symbol]":return F.valueOf.call(t)===F.valueOf.call(r);case"[object ArrayBuffer]":case bn:return n(gn(t),gn(r),e,u)}o="[object Array]"===o;if(!o&&vn(t)){var i=d(t);if(i!==d(r))return!1;if(t.buffer===r.buffer&&t.byteOffset===r.byteOffset)return!0;o=!0}if(!o){if("object"!=typeof t||"object"!=typeof r)return!1;var i=t.constructor,a=r.constructor;if(i!==a&&!(p(i)&&i instanceof i&&p(a)&&a instanceof a)&&"constructor"in t&&"constructor"in r)return!1}e=e||[];u=u||[];var f=e.length;for(;f--;)if(e[f]===t)return u[f]===r;e.push(t);u.push(r);if(o){if((f=t.length)!==r.length)return!1;for(;f--;)if(!mn(t[f],r[f],e,u))return!1}else{var c,l=b(t);if(f=l.length,b(r).length!==f)return!1;for(;f--;)if(c=l[f],!y(r,c)||!mn(t[c],r[c],e,u))return!1}e.pop();u.pop();return!0}(n,t,r,e))}function c(n){if(!o(n))return[];var t,r=[];for(t in n)r.push(t);return K&&yn(n,r),r}function jn(e){var u=g(e);return function(n){if(null==n)return!1;var t=c(n);if(g(t))return!1;for(var r=0;r<u;r++)if(!p(n[e[r]]))return!1;return e!==_n||!p(n[wn])}}var wn="forEach",t=["clear","delete"],u=["get","has","set"],U=t.concat(wn,u),_n=t.concat(u),r=["add"].concat(t,wn,"has"),u=a?jn(U):i("Map"),t=a?jn(_n):i("WeakMap"),U=a?jn(r):i("Set"),a=i("WeakSet");function j(n){for(var t=b(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=n[t[u]];return e}function An(n){for(var t={},r=b(n),e=0,u=r.length;e<u;e++)t[n[r[e]]]=r[e];return t}function xn(n){var t,r=[];for(t in n)p(n[t])&&r.push(t);return r.sort()}function Sn(f,c){return function(n){var t=arguments.length;if(c&&(n=Object(n)),!(t<2||null==n))for(var r=1;r<t;r++)for(var e=arguments[r],u=f(e),o=u.length,i=0;i<o;i++){var a=u[i];c&&void 0!==n[a]||(n[a]=e[a])}return n}}var On=Sn(c),w=Sn(b),Mn=Sn(c,!0);function En(n){var t;return o(n)?z?z(n):((t=function(){}).prototype=n,n=new t,t.prototype=null,n):{}}function Bn(n){return v(n)?n:[n]}function _(n){return m.toPath(n)}function Nn(n,t){for(var r=t.length,e=0;e<r;e++){if(null==n)return;n=n[t[e]]}return r?n:void 0}function In(n,t,r){n=Nn(n,_(t));return H(n)?r:n}function Tn(n){return n}function A(t){return t=w({},t),function(n){return dn(n,t)}}function kn(t){return t=_(t),function(n){return Nn(n,t)}}function x(u,o,n){if(void 0===o)return u;switch(null==n?3:n){case 1:return function(n){return u.call(o,n)};case 3:return function(n,t,r){return u.call(o,n,t,r)};case 4:return function(n,t,r,e){return u.call(o,n,t,r,e)}}return function(){return u.apply(o,arguments)}}function Dn(n,t,r){return null==n?Tn:p(n)?x(n,t,r):(o(n)&&!v(n)?A:kn)(n)}function Rn(n,t){return Dn(n,t,1/0)}function S(n,t,r){return m.iteratee!==Rn?m.iteratee(n,t):Dn(n,t,r)}function Vn(){}function Fn(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))}m.toPath=Bn,m.iteratee=Rn;var O=Date.now||function(){return(new Date).getTime()};function Pn(t){function r(n){return t[n]}var n="(?:"+b(t).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return e.test(n=null==n?"":""+n)?n.replace(u,r):n}}var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},qn=Pn(r),r=Pn(An(r)),Un=m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Wn=/(.)^/,zn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ln=/\\|'|\r|\n|\u2028|\u2029/g;function $n(n){return"\\"+zn[n]}var Cn=/^\s*(\w|\$)+\s*$/;var Kn=0;function Jn(n,t,r,e,u){return e instanceof t?(e=En(n.prototype),o(t=n.apply(e,u))?t:e):n.apply(r,u)}var M=l(function(u,o){function i(){for(var n=0,t=o.length,r=Array(t),e=0;e<t;e++)r[e]=o[e]===a?arguments[n++]:o[e];for(;n<arguments.length;)r.push(arguments[n++]);return Jn(u,i,this,this,r)}var a=M.placeholder;return i}),Gn=(M.placeholder=m,l(function(t,r,e){var u;if(p(t))return u=l(function(n){return Jn(t,u,r,this,e.concat(n))});throw new TypeError("Bind must be called on a function")})),E=ln(g);function B(n,t,r,e){if(e=e||[],t||0===t){if(t<=0)return e.concat(n)}else t=1/0;for(var u=e.length,o=0,i=g(n);o<i;o++){var a=n[o];if(E(a)&&(v(a)||an(a)))if(1<t)B(a,t-1,r,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else r||(e[u++]=a)}return e}var Hn=l(function(n,t){var r=(t=B(t,!1,!1)).length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var e=t[r];n[e]=Gn(n[e],n)}return n});var Qn=l(function(n,t,r){return setTimeout(function(){return n.apply(null,r)},t)}),Xn=M(Qn,m,1);function Yn(n){return function(){return!n.apply(this,arguments)}}function Zn(n,t){var r;return function(){return 0<--n&&(r=t.apply(this,arguments)),n<=1&&(t=null),r}}var nt=M(Zn,2);function tt(n,t,r){t=S(t,r);for(var e,u=b(n),o=0,i=u.length;o<i;o++)if(t(n[e=u[o]],e,n))return e}function rt(o){return function(n,t,r){t=S(t,r);for(var e=g(n),u=0<o?0:e-1;0<=u&&u<e;u+=o)if(t(n[u],u,n))return u;return-1}}var et=rt(1),ut=rt(-1);function ot(n,t,r,e){for(var u=(r=S(r,e,1))(t),o=0,i=g(n);o<i;){var a=Math.floor((o+i)/2);r(n[a])<u?o=a+1:i=a}return o}function it(o,i,a){return function(n,t,r){var e=0,u=g(n);if("number"==typeof r)0<o?e=0<=r?r:Math.max(r+u,e):u=0<=r?Math.min(r+1,u):r+u+1;else if(a&&r&&u)return n[r=a(n,t)]===t?r:-1;if(t!=t)return 0<=(r=i(f.call(n,e,u),fn))?r+e:-1;for(r=0<o?e:u-1;0<=r&&r<u;r+=o)if(n[r]===t)return r;return-1}}var at=it(1,et,ot),ft=it(-1,ut);function ct(n,t,r){t=(E(n)?et:tt)(n,t,r);if(void 0!==t&&-1!==t)return n[t]}function N(n,t,r){if(t=x(t,r),E(n))for(u=0,o=n.length;u<o;u++)t(n[u],u,n);else for(var e=b(n),u=0,o=e.length;u<o;u++)t(n[e[u]],e[u],n);return n}function I(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=t(n[a],a,n)}return o}function lt(f){return function(n,t,r,e){var u=3<=arguments.length;return function(n,t,r,e){var u=!E(n)&&b(n),o=(u||n).length,i=0<f?0:o-1;for(e||(r=n[u?u[i]:i],i+=f);0<=i&&i<o;i+=f){var a=u?u[i]:i;r=t(r,n[a],a,n)}return r}(n,x(t,e,4),r,u)}}var st=lt(1),pt=lt(-1);function T(n,e,t){var u=[];return e=S(e,t),N(n,function(n,t,r){e(n,t,r)&&u.push(n)}),u}function ht(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!t(n[i],i,n))return!1}return!0}function vt(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(t(n[i],i,n))return!0}return!1}function k(n,t,r,e){return E(n)||(n=j(n)),0<=at(n,t,r="number"==typeof r&&!e?r:0)}var yt=l(function(n,r,e){var u,o;return p(r)?o=r:(r=_(r),u=r.slice(0,-1),r=r[r.length-1]),I(n,function(n){var t=o;if(!t){if(null==(n=u&&u.length?Nn(n,u):n))return;t=n[r]}return null==t?t:t.apply(n,e)})});function dt(n,t){return I(n,kn(t))}function gt(n,e,t){var r,u,o=-1/0,i=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&o<r&&(o=r);else e=S(e,t),N(n,function(n,t,r){u=e(n,t,r),(i<u||u===-1/0&&o===-1/0)&&(o=n,i=u)});return o}var bt=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function mt(n){return n?v(n)?f.call(n):X(n)?n.match(bt):E(n)?I(n,Tn):j(n):[]}function jt(n,t,r){if(null==t||r)return(n=E(n)?n:j(n))[Fn(n.length-1)];for(var e=mt(n),r=g(e),u=(t=Math.max(Math.min(t,r),0),r-1),o=0;o<t;o++){var i=Fn(o,u),a=e[o];e[o]=e[i],e[i]=a}return e.slice(0,t)}function D(o,t){return function(r,e,n){var u=t?[[],[]]:{};return e=S(e,n),N(r,function(n,t){t=e(n,t,r);o(u,n,t)}),u}}var wt=D(function(n,t,r){y(n,r)?n[r].push(t):n[r]=[t]}),_t=D(function(n,t,r){n[r]=t}),At=D(function(n,t,r){y(n,r)?n[r]++:n[r]=1}),xt=D(function(n,t,r){n[r?0:1].push(t)},!0);function St(n,t,r){return t in r}var Ot=l(function(n,t){var r={},e=t[0];if(null!=n){p(e)?(1<t.length&&(e=x(e,t[1])),t=c(n)):(e=St,t=B(t,!1,!1),n=Object(n));for(var u=0,o=t.length;u<o;u++){var i=t[u],a=n[i];e(a,i,n)&&(r[i]=a)}}return r}),Mt=l(function(n,r){var t,e=r[0];return p(e)?(e=Yn(e),1<r.length&&(t=r[1])):(r=I(B(r,!1,!1),String),e=function(n,t){return!k(r,t)}),Ot(n,e,t)});function Et(n,t,r){return f.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))}function Bt(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[0]:Et(n,n.length-t)}function R(n,t,r){return f.call(n,null==t||r?1:t)}var Nt=l(function(n,t){return t=B(t,!0,!0),T(n,function(n){return!k(t,n)})}),It=l(function(n,t){return Nt(n,t)});function Tt(n,t,r,e){Q(t)||(e=r,r=t,t=!1),null!=r&&(r=S(r,e));for(var u=[],o=[],i=0,a=g(n);i<a;i++){var f=n[i],c=r?r(f,i,n):f;t&&!r?(i&&o===c||u.push(f),o=c):r?k(o,c)||(o.push(c),u.push(f)):k(u,f)||u.push(f)}return u}var kt=l(function(n){return Tt(B(n,!0,!0))});function Dt(n){for(var t=n&&gt(n,g).length||0,r=Array(t),e=0;e<t;e++)r[e]=dt(n,e);return r}var Rt=l(Dt);function Vt(n,t){return n._chain?m(t).chain():t}function Ft(r){return N(xn(r),function(n){var t=m[n]=r[n];m.prototype[n]=function(){var n=[this._wrapped];return P.apply(n,arguments),Vt(this,t.apply(m,n))}}),m}N(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=e[t];m.prototype[t]=function(){var n=this._wrapped;return null!=n&&(r.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Vt(this,n)}}),N(["concat","join","slice"],function(n){var t=e[n];m.prototype[n]=function(){var n=this._wrapped;return Vt(this,n=null!=n?t.apply(n,arguments):n)}});n=Ft({__proto__:null,VERSION:n,restArguments:l,isObject:o,isNull:function(n){return null===n},isUndefined:H,isBoolean:Q,isElement:function(n){return!(!n||1!==n.nodeType)},isString:X,isNumber:Y,isDate:Z,isRegExp:nn,isError:tn,isSymbol:rn,isArrayBuffer:en,isDataView:h,isArray:v,isFunction:p,isArguments:an,isFinite:function(n){return!rn(n)&&C(n)&&!isNaN(parseFloat(n))},isNaN:fn,isTypedArray:vn,isEmpty:function(n){var t;return null==n||("number"==typeof(t=g(n))&&(v(n)||X(n)||an(n))?0===t:0===g(b(n)))},isMatch:dn,isEqual:function(n,t){return mn(n,t)},isMap:u,isWeakMap:t,isSet:U,isWeakSet:a,keys:b,allKeys:c,values:j,pairs:function(n){for(var t=b(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=[t[u],n[t[u]]];return e},invert:An,functions:xn,methods:xn,extend:On,extendOwn:w,assign:w,defaults:Mn,create:function(n,t){return n=En(n),t&&w(n,t),n},clone:function(n){return o(n)?v(n)?n.slice():On({},n):n},tap:function(n,t){return t(n),n},get:In,has:function(n,t){for(var r=(t=_(t)).length,e=0;e<r;e++){var u=t[e];if(!y(n,u))return!1;n=n[u]}return!!r},mapObject:function(n,t,r){t=S(t,r);for(var e=b(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=t(n[a],a,n)}return o},identity:Tn,constant:cn,noop:Vn,toPath:Bn,property:kn,propertyOf:function(t){return null==t?Vn:function(n){return In(t,n)}},matcher:A,matches:A,times:function(n,t,r){var e=Array(Math.max(0,n));t=x(t,r,1);for(var u=0;u<n;u++)e[u]=t(u);return e},random:Fn,now:O,escape:qn,unescape:r,templateSettings:Un,template:function(o,n,t){n=Mn({},n=!n&&t?t:n,m.templateSettings);var r,t=RegExp([(n.escape||Wn).source,(n.interpolate||Wn).source,(n.evaluate||Wn).source].join("|")+"|$","g"),i=0,a="__p+='";if(o.replace(t,function(n,t,r,e,u){return a+=o.slice(i,u).replace(Ln,$n),i=u+n.length,t?a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",t=n.variable){if(!Cn.test(t))throw new Error("variable is not a bare identifier: "+t)}else a="with(obj||{}){\n"+a+"}\n",t="obj";a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t,"_",a)}catch(n){throw n.source=a,n}function e(n){return r.call(this,n,m)}return e.source="function("+t+"){\n"+a+"}",e},result:function(n,t,r){var e=(t=_(t)).length;if(!e)return p(r)?r.call(n):r;for(var u=0;u<e;u++){var o=null==n?void 0:n[t[u]];void 0===o&&(o=r,u=e),n=p(o)?o.call(n):o}return n},uniqueId:function(n){var t=++Kn+"";return n?n+t:t},chain:function(n){return(n=m(n))._chain=!0,n},iteratee:Rn,partial:M,bind:Gn,bindAll:Hn,memoize:function(e,u){function o(n){var t=o.cache,r=""+(u?u.apply(this,arguments):n);return y(t,r)||(t[r]=e.apply(this,arguments)),t[r]}return o.cache={},o},delay:Qn,defer:Xn,throttle:function(r,e,u){function o(){l=!1===u.leading?0:O(),i=null,c=r.apply(a,f),i||(a=f=null)}function n(){var n=O(),t=(l||!1!==u.leading||(l=n),e-(n-l));return a=this,f=arguments,t<=0||e<t?(i&&(clearTimeout(i),i=null),l=n,c=r.apply(a,f),i||(a=f=null)):i||!1===u.trailing||(i=setTimeout(o,t)),c}var i,a,f,c,l=0;return u=u||{},n.cancel=function(){clearTimeout(i),l=0,i=a=f=null},n},debounce:function(t,r,e){function u(){var n=O()-i;n<r?o=setTimeout(u,r-n):(o=null,e||(f=t.apply(c,a)),o||(a=c=null))}var o,i,a,f,c,n=l(function(n){return c=this,a=n,i=O(),o||(o=setTimeout(u,r),e&&(f=t.apply(c,a))),f});return n.cancel=function(){clearTimeout(o),o=a=c=null},n},wrap:function(n,t){return M(t,n)},negate:Yn,compose:function(){var r=arguments,e=r.length-1;return function(){for(var n=e,t=r[e].apply(this,arguments);n--;)t=r[n].call(this,t);return t}},after:function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},before:Zn,once:nt,findKey:tt,findIndex:et,findLastIndex:ut,sortedIndex:ot,indexOf:at,lastIndexOf:ft,find:ct,detect:ct,findWhere:function(n,t){return ct(n,A(t))},each:N,forEach:N,map:I,collect:I,reduce:st,foldl:st,inject:st,reduceRight:pt,foldr:pt,filter:T,select:T,reject:function(n,t,r){return T(n,Yn(S(t)),r)},every:ht,all:ht,some:vt,any:vt,contains:k,includes:k,include:k,invoke:yt,pluck:dt,where:function(n,t){return T(n,A(t))},max:gt,min:function(n,e,t){var r,u,o=1/0,i=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&r<o&&(o=r);else e=S(e,t),N(n,function(n,t,r){((u=e(n,t,r))<i||u===1/0&&o===1/0)&&(o=n,i=u)});return o},shuffle:function(n){return jt(n,1/0)},sample:jt,sortBy:function(n,e,t){var u=0;return e=S(e,t),dt(I(n,function(n,t,r){return{value:n,index:u++,criteria:e(n,t,r)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(e<r||void 0===r)return 1;if(r<e||void 0===e)return-1}return n.index-t.index}),"value")},groupBy:wt,indexBy:_t,countBy:At,partition:xt,toArray:mt,size:function(n){return null==n?0:(E(n)?n:b(n)).length},pick:Ot,omit:Mt,first:Bt,head:Bt,take:Bt,initial:Et,last:function(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[n.length-1]:R(n,Math.max(0,n.length-t))},rest:R,tail:R,drop:R,compact:function(n){return T(n,Boolean)},flatten:function(n,t){return B(n,t,!1)},without:It,uniq:Tt,unique:Tt,union:kt,intersection:function(n){for(var t=[],r=arguments.length,e=0,u=g(n);e<u;e++){var o=n[e];if(!k(t,o)){for(var i=1;i<r&&k(arguments[i],o);i++);i===r&&t.push(o)}}return t},difference:Nt,unzip:Dt,transpose:Dt,zip:Rt,object:function(n,t){for(var r={},e=0,u=g(n);e<u;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},range:function(n,t,r){null==t&&(t=n||0,n=0),r=r||(t<n?-1:1);for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),o=0;o<e;o++,n+=r)u[o]=n;return u},chunk:function(n,t){if(null==t||t<1)return[];for(var r=[],e=0,u=n.length;e<u;)r.push(f.call(n,e,e+=t));return r},mixin:Ft,default:m});return n._=n});
window.wp=window.wp||{},function(r){var t="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(a){var n,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(t){var e=document.querySelector("script#tmpl-"+a);if(e)return(n=n||_.template(r(e).html(),s))(t);throw new Error("Template not found: #tmpl-"+a)}}),wp.ajax={settings:t.ajax||{},post:function(t,e){return wp.ajax.send({data:_.isObject(t)?t:_.extend(e||{},{action:t})})},send:function(n,t){var e,a;return _.isObject(n)?t=n:(t=t||{}).data=_.extend(t.data||{},{action:n}),t=_.defaults(t||{},{type:"POST",url:wp.ajax.settings.url,context:this}),(e=(a=r.Deferred(function(a){t.success&&a.done(t.success),t.error&&a.fail(t.error),delete t.success,delete t.error,a.jqXHR=r.ajax(t).done(function(t){var e;"1"!==t&&1!==t||(t={success:!0}),_.isObject(t)&&!_.isUndefined(t.success)?(e=this,a.done(function(){n&&n.data&&"query-attachments"===n.data.action&&a.jqXHR.hasOwnProperty("getResponseHeader")&&a.jqXHR.getResponseHeader("X-WP-Total")?e.totalAttachments=parseInt(a.jqXHR.getResponseHeader("X-WP-Total"),10):e.totalAttachments=0}),a[t.success?"resolveWith":"rejectWith"](this,[t.data])):a.rejectWith(this,[t])}).fail(function(){a.rejectWith(this,arguments)})})).promise()).abort=function(){return a.jqXHR.abort(),this},e}}}(jQuery);
!function(t,a,i,e){var r=function(t){var a=this;a.$form=t,a.$attributeFields=t.find(".variations select"),a.$singleVariation=t.find(".single_variation"),a.$singleVariationWrap=t.find(".single_variation_wrap"),a.$resetVariations=t.find(".reset_variations"),a.$resetAlert=t.find(".reset_variations_alert"),a.$product=t.closest(".product"),a.variationData=t.data("product_variations"),a.useAjax=!1===a.variationData,a.xhr=!1,a.loading=!0,a.$singleVariationWrap.show(),a.$form.off(".wc-variation-form"),a.getChosenAttributes=a.getChosenAttributes.bind(a),a.findMatchingVariations=a.findMatchingVariations.bind(a),a.isMatch=a.isMatch.bind(a),a.toggleResetLink=a.toggleResetLink.bind(a),a.showNoMatchingVariationsMsg=a.showNoMatchingVariationsMsg.bind(a),t.on("click.wc-variation-form",".reset_variations",{variationForm:a},a.onReset),t.on("reload_product_variations",{variationForm:a},a.onReload),t.on("hide_variation",{variationForm:a},a.onHide),t.on("show_variation",{variationForm:a},a.onShow),t.on("click",".single_add_to_cart_button",{variationForm:a},a.onAddToCart),t.on("reset_data",{variationForm:a},a.onResetDisplayedVariation),t.on("reset_focus",{variationForm:a},a.onResetVariationFocus),t.on("announce_reset",{variationForm:a},a.onAnnounceReset),t.on("clear_reset_announcement",{variationForm:a},a.onClearResetAnnouncement),t.on("reset_image",{variationForm:a},a.onResetImage),t.on("change.wc-variation-form",".variations select",{variationForm:a},a.onChange),t.on("found_variation.wc-variation-form",{variationForm:a},a.onFoundVariation),t.on("check_variations.wc-variation-form",{variationForm:a},a.onFindVariation),t.on("update_variation_values.wc-variation-form",{variationForm:a},a.onUpdateAttributes),t.on("keydown.wc-variation-form",".reset_variations",{variationForm:a},a.onResetKeyDown),setTimeout(function(){t.trigger("check_variations"),t.trigger("wc_variation_form",a),a.loading=!1},100)};r.prototype.onReset=function(t){t.preventDefault(),t.data.variationForm.$attributeFields.val("").trigger("change"),t.data.variationForm.$form.trigger("announce_reset"),t.data.variationForm.$form.trigger("reset_data"),t.data.variationForm.$form.trigger("reset_focus")},r.prototype.onReload=function(t){var a=t.data.variationForm;a.variationData=a.$form.data("product_variations"),a.useAjax=!1===a.variationData,a.$form.trigger("check_variations")},r.prototype.onHide=function(t){t.preventDefault(),t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-is-unavailable").addClass("disabled wc-variation-selection-needed"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")},r.prototype.onShow=function(a,i,e){a.preventDefault(),e?(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("disabled wc-variation-selection-needed wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-disabled").addClass("woocommerce-variation-add-to-cart-enabled")):(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-selection-needed").addClass("disabled wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")),wp.mediaelement&&a.data.variationForm.$form.find(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!t(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(wp.mediaelement.settings)},r.prototype.onAddToCart=function(i){t(this).is(".disabled")&&(i.preventDefault(),t(this).is(".wc-variation-is-unavailable")?a.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):t(this).is(".wc-variation-selection-needed")&&a.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))},r.prototype.onResetDisplayedVariation=function(t){var a=t.data.variationForm;a.$product.find(".product_meta").find(".sku").wc_reset_content(),a.$product.find(".product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value").wc_reset_content(),a.$product.find(".product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value").wc_reset_content(),a.$form.trigger("reset_image"),a.$singleVariation.slideUp(200).trigger("hide_variation")},r.prototype.onAnnounceReset=function(t){t.data.variationForm.$resetAlert.text(wc_add_to_cart_variation_params.i18n_reset_alert_text)},r.prototype.onResetVariationFocus=function(t){t.data.variationForm.$attributeFields[0].focus()},r.prototype.onClearResetAnnouncement=function(t){t.data.variationForm.$resetAlert.text("")},r.prototype.onResetImage=function(t){t.data.variationForm.$form.wc_variations_image_update(!1)},r.prototype.onFindVariation=function(a,i){var e=a.data.variationForm,r=void 0!==i?i:e.getChosenAttributes(),o=r.data;if(r.count&&r.count===r.chosenCount)if(e.useAjax)e.xhr&&e.xhr.abort(),e.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),o.product_id=parseInt(e.$form.data("product_id"),10),o.custom_data=e.$form.data("custom_data"),e.xhr=t.ajax({url:wc_add_to_cart_variation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:o,success:function(t){t?e.$form.trigger("found_variation",[t]):(e.$form.trigger("reset_data"),r.chosenCount=0,e.loading||e.showNoMatchingVariationsMsg())},complete:function(){e.$form.unblock()}});else{e.$form.trigger("update_variation_values");var n=e.findMatchingVariations(e.variationData,o).shift();n?e.$form.trigger("found_variation",[n]):(e.$form.trigger("reset_data"),r.chosenCount=0,e.loading||e.showNoMatchingVariationsMsg())}else e.$form.trigger("update_variation_values"),e.$form.trigger("reset_data");e.toggleResetLink(r.chosenCount>0)},r.prototype.onFoundVariation=function(a,i){var e=a.data.variationForm,r=e.$product.find(".product_meta").find(".sku"),n=e.$product.find(".product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value"),s=e.$product.find(".product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value"),c=e.$singleVariationWrap.find('.quantity input.qty[name="quantity"]'),_=c.closest(".quantity"),d=!0,m=!1,v="";if(i.sku?r.wc_set_content(i.sku):r.wc_reset_content(),i.weight?n.wc_set_content(i.weight_html):n.wc_reset_content(),i.dimensions?s.wc_set_content(t.parseHTML(i.dimensions_html)[0].data):s.wc_reset_content(),e.$form.wc_variations_image_update(i),i.variation_is_visible?(m=o("variation-template"),i.variation_id):m=o("unavailable-variation-template"),v=(v=(v=m({variation:i})).replace("/*<![CDATA[*/","")).replace("/*]]>*/",""),e.$form.find('input[name="variation_id"], input.variation_id').val(i.variation_id).trigger("change"),"yes"===i.is_sold_individually)c.val("1").attr("min","1").attr("max","").trigger("change"),_.hide();else{var l=parseFloat(c.val());l=isNaN(l)?i.min_qty:(l=l>parseFloat(i.max_qty)?i.max_qty:l)<parseFloat(i.min_qty)?i.min_qty:l,c.attr("min",i.min_qty).attr("max",i.max_qty).val(l).trigger("change"),_.show()}i.is_purchasable&&i.is_in_stock&&i.variation_is_visible||(d=!1),setTimeout(function(){e.$singleVariation.html(v),e.$singleVariation.text().trim()?e.$singleVariation.slideDown(200).trigger("show_variation",[i,d]):e.$singleVariation.show().trigger("show_variation",[i,d])},300)},r.prototype.onChange=function(t){var a=t.data.variationForm;a.$form.find('input[name="variation_id"], input.variation_id').val("").trigger("change"),a.$form.trigger("clear_reset_announcement"),a.$form.find(".wc-no-matching-variations").parent().remove(),a.useAjax?a.$form.trigger("check_variations"):(a.$form.trigger("woocommerce_variation_select_change"),a.$form.trigger("check_variations")),a.$form.trigger("woocommerce_variation_has_changed")},r.prototype.addSlashes=function(t){return t=(t=t.replace(/'/g,"\\'")).replace(/"/g,'\\"')},r.prototype.onUpdateAttributes=function(a){var i=a.data.variationForm,e=i.getChosenAttributes().data;i.useAjax||(i.$attributeFields.each(function(a,r){var o,n=t(r),s=n.data("attribute_name")||n.attr("name"),c=t(r).data("show_option_none"),_=":gt(0)",d=t("<select/>"),m=n.val()||"",v=!0;if(!n.data("attribute_html")){var l=n.clone();l.find("option").removeAttr("attached").prop("disabled",!1).prop("selected",!1),n.data("attribute_options",l.find("option"+_).get()),n.data("attribute_html",l.html())}d.html(n.data("attribute_html"));var g=t.extend(!0,{},e);g[s]="";var u=i.findMatchingVariations(i.variationData,g);for(var f in u)if("undefined"!=typeof u[f]){var h=u[f].attributes;for(var p in h)if(h.hasOwnProperty(p)){var w=h[p],b="";if(p===s)if(u[f].variation_is_active&&(b="enabled"),w){w=t("<div/>").html(w).text();var $=d.find("option");if($.length)for(var y=0,F=$.length;y<F;y++){var x=t($[y]);if(w===x.val()){x.addClass("attached "+b);break}}}else d.find("option:gt(0)").addClass("attached "+b)}}o=d.find("option.attached").length,m&&(v=!1,0!==o&&d.find("option.attached.enabled").each(function(){var a=t(this).val();if(m===a)return v=!0,!1})),o>0&&m&&v&&"no"===c&&(d.find("option:first").remove(),_=""),d.find("option"+_+":not(.attached)").remove(),n.html(d.html()),n.find("option"+_+":not(.enabled)").prop("disabled",!0),m?v?n.val(m):n.val("").trigger("change"):n.val("")}),i.$form.trigger("woocommerce_update_variation_values"))},r.prototype.getChosenAttributes=function(){var a={},i=0,e=0;return this.$attributeFields.each(function(){var r=t(this).data("attribute_name")||t(this).attr("name"),o=t(this).val()||"";o.length>0&&e++,i++,a[r]=o}),{count:i,chosenCount:e,data:a}},r.prototype.findMatchingVariations=function(t,a){for(var i=[],e=0;e<t.length;e++){var r=t[e];this.isMatch(r.attributes,a)&&i.push(r)}return i},r.prototype.isMatch=function(t,a){var i=!0;for(var e in t)if(t.hasOwnProperty(e)){var r=t[e],o=a[e];void 0!==r&&void 0!==o&&0!==r.length&&0!==o.length&&r!==o&&(i=!1)}return i},r.prototype.toggleResetLink=function(t){t?"hidden"===this.$resetVariations.css("visibility")&&this.$resetVariations.css("visibility","visible").hide().fadeIn():this.$resetVariations.css("visibility","hidden")},r.prototype.showNoMatchingVariationsMsg=function(){this.$form.find(".single_variation").after('<div role="alert"><p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p></div>").next("div").find(".wc-no-matching-variations").slideDown(200)},r.prototype.onResetKeyDown=function(t){"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),t.data.variationForm.onReset(t))},t.fn.wc_variation_form=function(){return new r(this),this},t.fn.wc_set_content=function(t){void 0===this.attr("data-o_content")&&this.attr("data-o_content",this.text()),this.text(t)},t.fn.wc_reset_content=function(){void 0!==this.attr("data-o_content")&&this.text(this.attr("data-o_content"))},t.fn.wc_set_variation_attr=function(t,a){void 0===this.attr("data-o_"+t)&&this.attr("data-o_"+t,this.attr(t)?this.attr(t):""),!1===a?this.removeAttr(t):this.attr(t,a)},t.fn.wc_reset_variation_attr=function(t){void 0!==this.attr("data-o_"+t)&&this.attr(t,this.attr("data-o_"+t))},t.fn.wc_maybe_trigger_slide_position_reset=function(a){var i=t(this),e=i.closest(".product").find(".images"),r=!1,o=a&&a.image_id?a.image_id:"";i.attr("current-image")!==o&&(r=!0),i.attr("current-image",o),r&&e.trigger("woocommerce_gallery_reset_slide_position")},t.fn.wc_variations_image_update=function(i){var e=this,r=e.closest(".product"),o=r.find(".images"),n=r.find(".flex-control-nav"),s=n.find("li:eq(0) img"),c=o.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),_=c.find(".wp-post-image"),d=c.find("a").eq(0);if(i&&i.image&&i.image.src&&i.image.src.length>1){n.find('li img[data-o_src="'+i.image.gallery_thumbnail_src+'"]').length>0&&e.wc_variations_image_reset();var m=n.find('li img[src="'+i.image.gallery_thumbnail_src+'"]');if(m.length>0)return m.trigger("flexslider-click"),e.attr("current-image",i.image_id),void a.setTimeout(function(){t(a).trigger("resize"),o.trigger("woocommerce_gallery_init_zoom")},20);_.wc_set_variation_attr("src",i.image.src),_.wc_set_variation_attr("height",i.image.src_h),_.wc_set_variation_attr("width",i.image.src_w),_.wc_set_variation_attr("srcset",i.image.srcset),_.wc_set_variation_attr("sizes",i.image.sizes),_.wc_set_variation_attr("title",i.image.title),_.wc_set_variation_attr("data-caption",i.image.caption),_.wc_set_variation_attr("alt",i.image.alt),_.wc_set_variation_attr("data-src",i.image.full_src),_.wc_set_variation_attr("data-large_image",i.image.full_src),_.wc_set_variation_attr("data-large_image_width",i.image.full_src_w),_.wc_set_variation_attr("data-large_image_height",i.image.full_src_h),c.wc_set_variation_attr("data-thumb",i.image.src),s.wc_set_variation_attr("src",i.image.gallery_thumbnail_src),d.wc_set_variation_attr("href",i.image.full_src)}else e.wc_variations_image_reset();a.setTimeout(function(){t(a).trigger("resize"),e.wc_maybe_trigger_slide_position_reset(i),o.trigger("woocommerce_gallery_init_zoom")},20)},t.fn.wc_variations_image_reset=function(){var t=this.closest(".product"),a=t.find(".images"),i=t.find(".flex-control-nav").find("li:eq(0) img"),e=a.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),r=e.find(".wp-post-image"),o=e.find("a").eq(0);r.wc_reset_variation_attr("src"),r.wc_reset_variation_attr("width"),r.wc_reset_variation_attr("height"),r.wc_reset_variation_attr("srcset"),r.wc_reset_variation_attr("sizes"),r.wc_reset_variation_attr("title"),r.wc_reset_variation_attr("data-caption"),r.wc_reset_variation_attr("alt"),r.wc_reset_variation_attr("data-src"),r.wc_reset_variation_attr("data-large_image"),r.wc_reset_variation_attr("data-large_image_width"),r.wc_reset_variation_attr("data-large_image_height"),e.wc_reset_variation_attr("data-thumb"),i.wc_reset_variation_attr("src"),o.wc_reset_variation_attr("href")},t(function(){"undefined"!=typeof wc_add_to_cart_variation_params&&t(".variations_form").each(function(){t(this).wc_variation_form()})});var o=function(t){var e=i.getElementById("tmpl-"+t).textContent,r=!1;return(r=(r=(r=r||/<#\s?data\./.test(e))||/{{{?\s?data\.(?!variation\.).+}}}?/.test(e))||/{{{?\s?data\.variation\.[\w-]*[^\s}]/.test(e))?wp.template(t):function(t){var i=t.variation||{};return e.replace(/({{{?)\s?data\.variation\.([\w-]*)\s?(}}}?)/g,function(t,e,r,o){if(e.length!==o.length)return"";var n=i[r]||"";return 2===e.length?a.escape(n):n})}}}(jQuery,window,document);