Skip Navigation

[Closed] Uncaught TypeError: t is undefined

This support ticket is created 2 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 2 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#2488893

a.R

!function(e){var t={};function r(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(a,i,function(t){return e[t]}.bind(null,i));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=222)}({222:function(e,t,r){"use strict";r.r(t);r(223),r(224);document.addEventListener("DOMContentLoaded",(function(){var e=function(){document.querySelectorAll(".tb-masonry").forEach((function(e){e.querySelector(".tb-brick")&&new window.toolsetCommonEs.Masonry(e)}))};e();window.jQuery&&(jQuery(document).on("js_event_wpv_pagination_completed",e),jQuery(document).on("js_event_wpv_parametric_search_form_updated",(function(){setTimeout(e,300)})),jQuery(document).on("js_event_wpv_parametric_search_form_updated_without_data",(function(){setTimeout(e,300)})),jQuery(document).on("js_event_wpv_parametric_search_started",(function(e,t){jQuery(".js-wpv-custom-search-loading-overlay").show()})),jQuery(document).on("js_event_wpv_parametric_search_results_updated",(function(e,t){jQuery(".js-wpv-custom-search-loading-overlay").hide()})))}))},223:function(e,t,r){},224:function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=a||{},i={};window.wpvPaginationAjaxLoaded={},window.wpvPaginationAnimationFinished={},window.wpvPaginationQueue={},jQuery.fn.wpv_clone=function(){for(var e=jQuery.fn.clone.apply(this,arguments),t=this.find("textarea").add(this.filter("textarea")),r=e.find("textarea").add(e.filter("textarea")),a=this.find("select").add(this.filter("select")),i=e.find("select").add(e.filter("select")),n=0,o=t.length;n<o;++n)jQuery(r[n]).val(jQuery(t[n]).val());for(n=0,o=a.length;n<o;++n)for(var s=0,d=a[n].options.length;s<d;++s)!0===a[n].options[s].selected?i[n].options[s].selected=!0:i[n].options[s].selected=!1;return e},a.ViewFrontendUtils=function(e){var t=this;t.datepicker_style_id="js-toolset-datepicker-style",t.is_datepicker_style_loaded=!1,t.just_return=function(){},t.extract_url_query_parameters=function(e){var t={};if(""==e)return t;for(var r=e.split("&"),a=r.length,i=0;i<a;++i){var n=r[i].split("=");if(2==n.length){var o=n[0],s=decodeURIComponent(n[1].replace(/\+/g," "));o=(o=(o=(o=(o=(o=o.replace(/(\[)\d?(\])/,"")).replace("[]","")).replace(/(%5B)\d?(%5D)/,"")).replace("%5B%5D","")).replace(/(%255B)\d?(%255D)/,"")).replace("%255B%255D",""),t.hasOwnProperty(o)&&t[o]!=s?t[o]+="##URLARRAYVALHACK##"+s:t[o]=s}}return t},t.get_extra_url_query_parameters_by_form=function(e){var r=t.extract_url_query_parameters(window.location.search.substr(1)),a={},i=!(e.hasClass("js-wpv-dps-enabled")||e.hasClass("js-wpv-ajax-results-enabled")||e.hasClass("js-wpv-ajax-results-submit-enabled"));for(var n in r){var o=e.find('[name="'+n+'"], [name="'+n+'\\[\\]"]');r.hasOwnProperty(n)&&!a.hasOwnProperty(n)&&(i||0===o.length||o.filter(".js-wpv-extra-url-param").length>0)&&(a[n]=r[n])}return a},t.set_extra_url_query_parameters_by_form=function(r){var a=t.get_extra_url_query_parameters_by_form(r);e.each(a,(function(t,a){if(0===r.find('[name="'+t+'"], [name="'+t+'\\[\\]"]').length){var i=a.split("##URLARRAYVALHACK##"),n=i.length;if(n<2)e("<input>").attr({type:"hidden",name:t,value:a,class:"js-wpv-extra-url-param"}).appendTo(r);else for(var o=0;o<n;o++)e("<input>").attr({type:"hidden",name:t+"[]",value:i[o],class:"js-wpv-extra-url-param"}).appendTo(r)}}))},t.maybe_load_datepicker_style=function(){if(!t.is_datepicker_style_loaded)if(document.getElementById(t.datepicker_style_id))t.is_datepicker_style_loaded=!0;else{var e=document.getElementsByTagName("head")[0],r=document.createElement("link");r.id=t.datepicker_style_id,r.rel="stylesheet",r.type="text/css",r.href=wpv_pagination_local.datepicker_style_url,r.media="all",e.appendChild(r),t.is_datepicker_style_loaded=!0}},t.destroy_frontend_datepicker=function(){e(".js-wpv-frontend-datepicker.js-wpv-frontend-datepicker-inited").removeClass("js-wpv-frontend-datepicker-inited").datepicker("destroy")},t.render_frontend_datepicker=function(){e(".js-wpv-frontend-datepicker:not(.js-wpv-frontend-datepicker-inited)").each((function(){t.maybe_load_datepicker_style();var r=e(this);r.addClass("js-wpv-frontend-datepicker-inited").datepicker({onSelect:function(t,a){var i=r.data("param"),n="date="+t,o=r.closest("form");n+="&date-format="+e(".js-wpv-date-param-"+i+"-format").val(),n+="&action=wpv_format_date",e.post(wpv_pagination_local.front_ajaxurl,n,(function(e){e=JSON.parse(e),o.find(".js-wpv-date-param-"+i).html(e.display),o.find(".js-wpv-date-front-end-clear-"+i).show(),o.find(".js-wpv-date-param-"+i+"-value").val(e.timestamp).trigger("change")}))},dateFormat:"ddmmyy",minDate:wpv_pagination_local.datepicker_min_date,maxDate:wpv_pagination_local.datepicker_max_date,showOn:"button",buttonImage:wpv_pagination_local.calendar_image,buttonText:wpv_pagination_local.calendar_text,buttonImageOnly:!0,changeMonth:!0,changeYear:!0,yearRange:wpv_pagination_local.datepicker_min_year+":"+wpv_pagination_local.datepicker_max_year})}))},t.close_and_destroy_datepickers=function(){e(".js-wpv-frontend-datepicker-inited").each((function(){e(".js-wpv-frontend-datepicker.js-wpv-frontend-datepicker-inited").removeClass("js-wpv-frontend-datepicker-inited").datepicker("hide")}))},t.adjustPrice=function(e,t,r){var a=parseInt(Math.abs(e||0),10)+"",i=a.length>3?a.length%3:0,n=(i?a.substr(0,i)+r:"")+a.substr(i).replace(/(\d{3})(?=\d)/g,"$1"+r);return t.replace("%v",n)},t.adjustPriceFilterAmount=function(e,r,a){var i=e.data("currency"),n=e.find(".js-wpv-range-slider-amount");n.find("span.js-wpv-range-slider-amount-label-from").html(t.adjustPrice(r,i.format,i.thousand_separator)),n.find("span.js-wpv-range-slider-amount-label-to").html(t.adjustPrice(a,i.format,i.thousand_separator))},t.renderPriceFilter=function(){e(".js-wpv-range-slider:not(.js-wpv-frontend-slider-range-inited)").each((function(){var r=e(this),a=r.closest(".js-wpv-range-slider-wrapper"),i=a.find(".js-wpv-range-slider-amount-min"),n=a.find(".js-wpv-range-slider-amount-max"),o=a.find(".js-wpv-range-slider-amount"),s=i.data("min"),d=n.data("max"),p=o.data("step")||1,l=i.val(),u=n.val();r.find("input.js-wpv-range-slider-amount-min, input.js-wpv-range-slider-amount-max").hide(),a.find(".js-wpv-range-slider, .js-wpv-range-slider-amount-label").show(),s=parseInt(Math.abs(s||0),10),d=parseInt(Math.abs(d||0),10),l=parseInt(Math.abs(l||0),10),u=parseInt(Math.abs(u||0),10),r.addClass("js-wpv-frontend-slider-range-inited").slider({range:!0,animate:!0,min:s,max:d,step:parseInt(Math.abs(p||10),10),values:[l,u],create:function(){i.val(l),n.val(u),t.adjustPriceFilterAmount(a,l,u),e(document.body).trigger("wpv_range_slider_create",[l,u])},slide:function(r,i){t.adjustPriceFilterAmount(a,i.values[0],i.values[1]),e(document.body).trigger("wpv_range_slider_slide",[i.values[0],i.values[1]])},change:_.debounce((function(t,r){i.val(r.values[0]),n.val(r.values[1]),e(document.body).trigger("wpv_range_slider_change",[r.values[0],r.values[1]]),i.trigger("change")}),700)})}))},t.clone_form=function(t,r){var a=t.wpv_clone();r.each((function(){e(this).replaceWith(a)}))},t.render_frontend_media_shortcodes=function(t){t.find(".wp-audio-shortcode.mejs-container").each((function(){var t=e(this),r=t.find("audio.wp-audio-shortcode");t.replaceWith(r)})),t.find(".wp-audio-shortcode").each((function(){e(this).mediaelementplayer()})),t.find(".wp-video-shortcode.mejs-container").each((function(){var t=e(this),r=t.find("video.wp-video-shortcode[id$=_from_mejs]");t.replaceWith(r)})),t.find(".wp-video-shortcode").each((function(){e(this).mediaelementplayer()})),t.find(".wp-playlist").each((function(){e(this);return new WPPlaylistView({el:this})}))},t.get_form_element_type=function(e){return e.length>0?"INPUT"==e[0].tagName?e[0].type.toLowerCase():e[0].tagName.toLowerCase():""},t.get_hidden_item_width=function(e){var t=e.clone().css({display:"block",visibility:"visible",position:"absolute","z-index":"-99999",left:"99999999px",top:"0px","white-space":"nowrap"}).appendTo("body"),r=t.outerWidth();return t.remove(),r},t.get_updated_query_results=function(r,i,n,o){var s,d,p={},l={},u={},v=wpv_pagination_local.wpmlLang,c=n.data("parametric");switch(s=a.view_sorting.get_sort_data(r,n),c.environment.current_post_id>0&&(l.wpv_aux_current_post_id=c.environment.current_post_id),c.environment.parent_post_id>0&&(l.wpv_aux_parent_post_id=c.environment.parent_post_id),c.environment.parent_term_id>0&&(l.wpv_aux_parent_term_id=c.environment.parent_term_id),c.environment.parent_user_id>0&&(l.wpv_aux_parent_user_id=c.environment.parent_user_id),l.archive=c.environment.archive,n.find(".js-wpv-post-relationship-update").length&&(u.dps_pr=n.find(".js-wpv-post-relationship-update").serializeArray()),(n.hasClass("js-wpv-dps-enabled")||n.hasClass("js-wpv-ajax-results-enabled")||n.hasClass("js-wpv-ajax-results-submit-enabled"))&&(u.dps_general=n.find(".js-wpv-filter-trigger, .js-wpv-filter-trigger-delayed").serializeArray()),attributes=c.attributes,d=t.get_extra_url_query_parameters_by_form(n,!0),p={view_number:r,page:i,sort:s,attributes:attributes,environment:l,search:u,extra:d,expect:o},v&&(p.lang=v),c.query){case"archive":p.action="wpv_get_archive_query_results",p.loop=c.loop;break;default:p.action="wpv_get_view_query_results",p.id=c.id,n.attr("data-targetid")?p.target_id=n.data("targetid"):e(".js-wpv-form-only.js-wpv-filter-form-"+r).length>0&&(p.target_id=e(".js-wpv-form-only.js-wpv-filter-form-"+r).data("targetid")),p.wpv_view_widget_id=c.widget_id}return e.ajax({type:"POST",dataType:"json",url:wpv_pagination_local.front_ajaxurl,data:p}).done((function(t){t.success&&_.has(t.data,"playlist_templates")&&0===e("#tmpl-wp-playlist-current-item").length&&e("body").append(t.data.playlist_templates)}))},t.updateUrlQuery=function(e,t,r){r||(r=window.location.href);var a,i=new RegExp("([?&])"+e+"=.*?(&|#|$)(.*)","gi");if(i.test(r))return null!=t?r.replace(i,"$1"+e+"="+t+"$2$3"):(a=r.split("#"),r=a[0].replace(i,"$1$3").replace(/(&|\?)$/,""),void 0!==a[1]&&null!==a[1]&&(r+="#"+a[1]),r);if(null!=t){var n=-1!==r.indexOf("?")?"&":"?";return a=r.split("#"),r=a[0]+n+e+"="+t,void 0!==a[1]&&null!==a[1]&&(r+="#"+a[1]),r}return r},e(window).on("resize",_.debounce((function(){e(".js-wpv-layout-responsive").each((function(){e(this).css("width","")})).promise().done((function(){e(document).trigger("js_event_wpv_layout_responsive_resize_completed")}))}),wpv_pagination_local.resize_debounce_tolerance)),t.init=function(){t.render_frontend_datepicker(),t.renderPriceFilter()},t.init()},a.ViewSorting=function(e){var t=this;t.get_sort_data=function(e,t){var r={},i=t.data("parametric");if(r.wpv_orderby=i.sort.orderby,r.wpv_order=i.sort.order,r.wpv_sort_orderby=i.sort.orderby,r.wpv_sort_order=i.sort.order,r.wpv_sort_orderby_as=i.sort.orderby_as,r.wpv_sort_orderby_second=i.sort.orderby_second,r.wpv_sort_order_second=i.sort.order_second,t.find(".js-wpv-sort-control-orderby").length>0)switch(a.view_frontend_utils.get_form_element_type(t.find(".js-wpv-sort-control-orderby"))){case"select":r.wpv_sort_orderby=t.find(".js-wpv-sort-control-orderby").val(),t.find(".js-wpv-sort-control-orderby option:selected").data("orderbyas")?r.wpv_sort_orderby_as=t.find(".js-wpv-sort-control-orderby option:selected").data("orderbyas"):r.wpv_sort_orderby!=i.sort.orderby&&(r.wpv_sort_orderby_as="");break;case"radio":r.wpv_sort_orderby=t.find(".js-wpv-sort-control-orderby:checked").val(),t.find(".js-wpv-sort-control-orderby:checked").data("orderbyas")?r.wpv_sort_orderby_as=t.find(".js-wpv-sort-control-orderby:checked").data("orderbyas"):r.wpv_sort_orderby!=i.sort.orderby&&(r.wpv_sort_orderby_as="");break;case"text":case"hidden":r.wpv_sort_orderby=t.find(".js-wpv-sort-control-orderby").val(),t.find(".js-wpv-sort-control-orderby").data("orderbyas")?r.wpv_sort_orderby_as=t.find(".js-wpv-sort-control-orderby").data("orderbyas"):r.wpv_sort_orderby!=i.sort.orderby&&(r.wpv_sort_orderby_as="")}if(t.find(".js-wpv-sort-control-order").length>0)switch(a.view_frontend_utils.get_form_element_type(t.find(".js-wpv-sort-control-order"))){case"select":r.wpv_sort_order=t.find(".js-wpv-sort-control-order").val();break;case"radio":r.wpv_sort_order=t.find(".js-wpv-sort-control-order:checked").val();break;case"text":case"hidden":r.wpv_sort_order=t.find(".js-wpv-sort-control-order").val()}if(""===r.wpv_sort_order&&t.find(".js-wpv-sort-control-orderby").length>0)switch(a.view_frontend_utils.get_form_element_type(t.find(".js-wpv-sort-control-orderby"))){case"select":r.wpv_sort_order=t.find(".js-wpv-sort-control-orderby option:selected").data("forceorder");break;case"radio":r.wpv_sort_order=t.find(".js-wpv-sort-control-orderby:checked").data("forceorder");break;case"text":case"hidden":r.wpv_sort_order=t.find(".js-wpv-sort-control-orderby").data("forceorder")}return r},t.set_sort_data=function(e,r){return t.set_sort_data_inside_form(e,r).set_sort_data_outside_form(e,r),t.set_product_filter_by_price_fields(e,r),t},t.set_sort_data_for_pagination=function(e){var r={},i=e.data("parametric");if(e.find(".js-wpv-sort-control-orderby").length>0)switch(a.view_frontend_utils.get_form_element_type(e.find(".js-wpv-sort-control-orderby"))){case"select":r.orderby=e.find(".js-wpv-sort-control-orderby").val(),e.find(".js-wpv-sort-control-orderby option:selected").data("orderbyas")?r.orderby_as=e.find(".js-wpv-sort-control-orderby option:selected").data("orderbyas"):r.orderby!=i.sort.orderby&&(r.orderby_as=""),e.find(".js-wpv-sort-control-order option:selected")?r.order=e.find(".js-wpv-sort-control-order option:selected").val():e.find(".js-wpv-sort-control-orderby option:selected").data("forceorder")&&(r.order=e.find(".js-wpv-sort-control-orderby option:selected").data("forceorder"));break;case"radio":r.orderby=e.find(".js-wpv-sort-control-orderby:checked").val(),e.find(".js-wpv-sort-control-orderby:checked").data("orderbyas")?r.orderby_as=e.find(".js-wpv-sort-control-orderby:checked").data("orderbyas"):r.orderby!=i.sort.orderby&&(r.orderby_as=""),e.find(".js-wpv-sort-control-order:checked")?r.order=e.find(".js-wpv-sort-control-order:checked").val():e.find(".js-wpv-sort-control-orderby:checked").data("forceorder")&&(r.order=e.find(".js-wpv-sort-control-orderby:checked").data("forceorder"));break;case"text":case"hidden":r.orderby=e.find(".js-wpv-sort-control-orderby").val(),e.find(".js-wpv-sort-control-orderby").data("orderbyas")?r.orderby_as=e.find(".js-wpv-sort-control-orderby").data("orderbyas"):r.orderby!=i.sort.orderby&&(r.orderby_as=""),e.find(".js-wpv-sort-control-order")?r.order=e.find(".js-wpv-sort-control-order").val():e.find(".js-wpv-sort-control-orderby").data("forceorder")&&(r.order=e.find(".js-wpv-sort-control-orderby").data("forceorder"))}t.set_sort_data(e,r)},t.set_sort_data_orderby_select=function(r,a){return 0==r.find('option[value="'+a.orderby+'"]').length&&r.append(e("<option>",{value:a.orderby,text:a.orderby})),r.val(a.orderby),_.has(a,"orderby_as")&&r.find("option:selected").data("orderbyas",a.orderby_as).attr("data-orderbyas",a.orderby_as),t},t.set_sort_data_orderby_text=function(e,r){return e.val(r.orderby),_.has(r,"orderby_as")&&e.data("orderbyas",r.orderby_as).attr("data-orderbyas",r.orderby_as),t},t.set_sort_data_orderby_radio=function(r,a,i){return 0==r.filter('[value="'+a.orderby+'"]').length&&i.append(e("<input>",{type:"radio",class:"js-wpv-sort-control-orderby",name:"wpv_sort_orderby",value:a.orderby})),i.find('.js-wpv-sort-control-orderby[value="'+a.orderby+'"]').prop("checked",!0),_.has(a,"orderby_as")&&i.find(".js-wpv-sort-control-orderby:checked").data("orderbyas",a.orderby_as).attr("data-orderbyas",a.orderby_as),t},t.maybe_set_sort_data_orderby_radio=function(e,r){return 0==e.filter('[value="'+r.orderby+'"]').length?e.prop("checked",!1):(e.filter('[value="'+r.orderby+'"]').prop("checked",!0),_.has(r,"orderby_as")&&e.filter(":checked").data("orderbyas",r.orderby_as).attr("data-orderbyas",r.orderby_as)),t},t.set_sort_data_orderby_list=function(e,r){var a=e.find('.js-wpv-sort-list-orderby[data-orderby="'+r.orderby+'"]');return 0==a.length||a.closest(".js-wpv-sort-list-item").hasClass("wpv-sort-list-current")||(e.find("span.wpv-sort-list-current").removeClass("wpv-sort-list-current"),e.find(".js-wpv-sort-list-item").css({display:"none"}),a.closest(".js-wpv-sort-list-item").addClass("wpv-sort-list-current").css({display:"block"}),e.find(".js-wpv-sort-list").prepend(a.closest(".js-wpv-sort-list-item"))),t},t.set_sort_data_order_select=function(r,a){if(0==r.find('option[value="'+a.order+'"]').length&&r.append(e("<option>",{value:a.order,text:a.order})),r.val(a.order),_.has(a,"orderby")&&void 0!==r.data("labels")){var i=r.data("labels"),n={},o=a.orderby.toLowerCase();_.has(i,o)?n=i[o]:_.has(i,"default")&&(n=i.default),_.has(n,"asc")&&r.find('option[value="asc"]').html(n.asc),_.has(n,"desc")&&r.find('option[value="desc"]').html(n.desc)}return t},t.set_sort_data_order_text=function(e,r){return e.val(r.order),t},t.set_sort_data_order_radio=function(r,a,i){if(0==r.filter('[value="'+a.order+'"]').length&&i.append(e("<input>",{type:"radio",class:"js-wpv-sort-control-order",name:"wpv_sort_order",value:a.order})),i.find('.js-wpv-sort-control-order[value="'+a.order+'"]').prop("checked",!0),_.has(a,"orderby")&&void 0!==r.data("labels")){var n=r.data("labels"),o={},s=a.orderby.toLowerCase(),d=null,p=null;_.has(n,s)?o=n[s]:_.has(n,"default")&&(o=n.default),_.has(o,"asc")&&(d=r.filter('[value="asc"]').closest("label"),p=r.filter('[value="asc"]').detach(),d.html(o.asc).prepend(p)),_.has(o,"desc")&&(d=r.filter('[value="desc"]').closest("label"),p=r.filter('[value="desc"]').detach(),d.html(o.desc).prepend(p))}return t},t.maybe_set_sort_data_order_radio=function(e,r){return 0==e.filter('[value="'+r.order+'"]').length?e.prop("checked",!0):e.filter('[value="'+r.order+'"]').prop("checked",!0),t},t.set_sort_data_order_list=function(e,r){var a=e.find('.js-wpv-sort-list-order[data-order="'+r.order+'"]');if(0==a.length||a.closest(".js-wpv-sort-list-item").hasClass("wpv-sort-list-current")||(e.find("span.wpv-sort-list-current").removeClass("wpv-sort-list-current"),e.find(".js-wpv-sort-list-item").css({display:"none"}),a.closest(".js-wpv-sort-list-item").addClass("wpv-sort-list-current").css({display:"block"}),e.find(".js-wpv-sort-list").prepend(a.closest(".js-wpv-sort-list-item"))),_.has(r,"orderby")&&void 0!==e.data("labels")){var i=e.data("labels"),n={},o=r.orderby.toLowerCase(),s=!1;_.has(i,o)?n=i[o]:_.has(i,"default")&&(n=i.default),_.has(n,"asc")&&(e.find('.js-wpv-sort-list-order[data-order="asc"] span').html(n.asc),s=!0),_.has(n,"desc")&&(e.find('.js-wpv-sort-list-order[data-order="desc"] span').html(n.desc),s=!0),s&&t.adjust_sort_list_width(e)}return t},t.set_product_filter_by_price_fields=function(r,i){if(_.has(i,"orderby"))if(r.find(".js-wpv-sort-control-product-orderby").length>0){var n=r.find(".js-wpv-sort-control-product-orderby");switch(a.view_frontend_utils.get_form_element_type(n)){case"select":t.set_sort_data_orderby_select(n,i);break;case"text":case"hidden":t.set_sort_data_orderby_text(n,i);break;case"radio":t.set_sort_data_orderby_radio(n,i,r)}}else{var o={type:"hidden",class:"js-wpv-sort-control-product-orderby",name:"wpv_orderby",value:i.orderby};e("<input>").attr(o).appendTo(r)}if(_.has(i,"order"))if(r.find(".js-wpv-sort-control-product-order").length>0){var s=r.find(".js-wpv-sort-control-product-order");switch(a.view_frontend_utils.get_form_element_type(s)){case"select":t.set_sort_data_order_select(s,i);break;case"text":case"hidden":t.set_sort_data_order_text(s,i);break;case"radio":t.set_sort_data_order_radio(s,i,r)}}else e("<input>").attr({type:"hidden",class:"js-wpv-sort-control-product-order",name:"wpv_order",value:i.order}).appendTo(r)},t.set_sort_data_inside_form=function(r,i){if(_.has(i,"orderby")){if(r.find(".js-wpv-sort-control-orderby").length>0){var n=r.find(".js-wpv-sort-control-orderby");switch(a.view_frontend_utils.get_form_element_type(n)){case"select":t.set_sort_data_orderby_select(n,i);break;case"text":case"hidden":t.set_sort_data_orderby_text(n,i);break;case"radio":t.set_sort_data_orderby_radio(n,i,r)}}else{var o={type:"hidden",class:"js-wpv-sort-control-orderby",name:"wpv_sort_orderby",value:i.orderby};_.has(i,"orderby_as")&&(o["data-orderbyas"]=i.orderby_as),_.has(i,"forceorder")&&(o["data-forceorder"]=i.forceorder),e("<input>").attr(o).appendTo(r)}if(_.has(i,"orderby_as")&&(r.find(".js-wpv-sort-control-orderby-as").length>0&&r.find(".js-wpv-sort-control-orderby-as").remove(),e("<input>").attr({type:"hidden",class:"js-wpv-sort-control-orderby-as",name:"wpv_sort_orderby_as",value:i.orderby_as}).appendTo(r)),r.find(".js-wpv-sort-list-orderby-dropdown").length>0){var s=r.find(".js-wpv-sort-list-orderby-dropdown");t.set_sort_data_orderby_list(s,i)}}if(_.has(i,"order")){if(r.find(".js-wpv-sort-control-order").length>0){var d=r.find(".js-wpv-sort-control-order");switch(a.view_frontend_utils.get_form_element_type(d)){case"select":t.set_sort_data_order_select(d,i);break;case"text":case"hidden":t.set_sort_data_order_text(d,i);break;case"radio":t.set_sort_data_order_radio(d,i,r)}}else e("<input>").attr({type:"hidden",class:"js-wpv-sort-control-order",name:"wpv_sort_order",value:i.order}).appendTo(r);if(r.find(".js-wpv-sort-list-order-dropdown").length>0){var p=r.find(".js-wpv-sort-list-order-dropdown");t.set_sort_data_order_list(p,i)}}return t},t.set_sort_data_outside_form=function(r,i){var n=r.data("viewnumber");if(_.has(i,"orderby")){var o=e('.js-wpv-sort-control-orderby[data-viewnumber="'+n+'"]:not(.js-wpv-filter-form .js-wpv-sort-control-orderby)'),s=e('.js-wpv-sort-list-orderby-dropdown[data-viewnumber="'+n+'"]:not(.js-wpv-filter-form .js-wpv-sort-list-orderby-dropdown)');if(o.length>0)switch(a.view_frontend_utils.get_form_element_type(o)){case"select":t.set_sort_data_orderby_select(o,i);break;case"text":case"hidden":t.set_sort_data_orderby_text(o,i);break;case"radio":t.maybe_set_sort_data_orderby_radio(o,i)}s.length>0&&t.set_sort_data_orderby_list(s,i)}if(_.has(i,"order")){var d=e('.js-wpv-sort-control-order[data-viewnumber="'+n+'"]:not(.js-wpv-filter-form .js-wpv-sort-control-order)'),p=e('.js-wpv-sort-list-order-dropdown[data-viewnumber="'+n+'"]:not(.js-wpv-filter-form .js-wpv-sort-list-order-dropdown)');if(d.length>0)switch(a.view_frontend_utils.get_form_element_type(d)){case"select":t.set_sort_data_order_select(d,i);break;case"text":case"hidden":t.set_sort_data_order_text(d,i);break;case"radio":t.maybe_set_sort_data_order_radio(d,i)}p.length>0&&t.set_sort_data_order_list(p,i)}return t},e(document).on("click",".js-wpv-sort-trigger",(function(r){r.preventDefault();var i,n=e(this),o=n.data("viewnumber"),s=e(".js-wpv-filter-form-"+o),d={orderby:void 0!==n.data("orderby")?n.data("orderby"):"",order:void 0!==n.data("order")?n.data("order"):"",orderby_as:void 0!==n.data("orderbyas")?n.data("orderbyas"):""};if(s.each((function(){i=e(this),t.set_sort_data(i,d),a.view_frontend_utils.set_extra_url_query_parameters_by_form(i)})),n.hasClass("js-wpv-column-header-click")||!s.hasClass("js-wpv-ajax-results-enabled")&&!s.hasClass("js-wpv-ajax-results-submit-enabled"))s.submit();else{var _={view_unique_id:o,form:s,force_results_update:s.hasClass("js-wpv-ajax-results-submit-enabled")};_=a.view_parametric_search.extend_wpv_parametric_search_triggered_data(_),e(document).trigger("js_event_wpv_parametric_search_triggered",[_])}})),e(document).on("change","select.js-wpv-sort-control-orderby",(function(){var r=e(this),n=r.find(":selected"),o={},s=r.data("viewnumber"),d=e(".js-wpv-filter-form-"+s),_={view_unique_id:s,form:d};o.orderby=r.val(),void 0!==n.data("orderbyas")&&(o.orderby_as=n.data("orderbyas")),void 0!==n.data("forceorder")&&""!==n.data("forceorder")&&(o.order=n.data("forceorder")),t.set_sort_data(d,o),i[s]=!0,r.hasClass("js-wpv-sort-control-force-apply-reload")?d.submit():(_=a.view_parametric_search.extend_wpv_parametric_search_triggered_data(_),r.hasClass("js-wpv-sort-control-force-apply-ajax")&&(_.update_results=!0),e(document).trigger("js_event_wpv_parametric_search_triggered",[_]))})),e(document).on("change","input.js-wpv-sort-control-orderby",(function(){var r={},n=e(this).data("viewnumber"),o=e('.js-wpv-sort-control-orderby[data-viewnumber="'+n+'"]:checked'),s=e(".js-wpv-filter-form-"+n),d={view_unique_id:n,form:s};r.orderby=o.val(),void 0!==o.data("orderbyas")&&(r.orderby_as=o.data("orderbyas")),void 0!==o.data("forceorder")&&""!==o.data("forceorder")&&(r.order=o.data("forceorder")),t.set_sort_data(s,r),i[n]=!0,d=a.view_parametric_search.extend_wpv_parametric_search_triggered_data(d),e(document).trigger("js_event_wpv_parametric_search_triggered",[d])})),e(document).on("click",".js-wpv-sort-list-orderby",(function(r){r.preventDefault();var n=e(this),o=n.data("orderby"),s=n.data("orderbyas"),d=n.data("forceorder"),_=n.closest(".wpv-sort-list"),p=n.closest("span.js-wpv-sort-list-item"),l=n.data("viewnumber"),u=e(".js-wpv-filter-form-"+l),v={orderby:o,orderby_as:s},c={view_unique_id:l,form:u};p.hasClass("wpv-sort-list-current")||(_.find("span.wpv-sort-list-current").removeClass("wpv-sort-list-current"),_.find(".js-wpv-sort-list-item").css({display:"none"}),p.addClass("wpv-sort-list-current").css({display:"block"}),_.prepend(p),""!==d&&(v.order=d),t.set_sort_data(u,v),i[l]=!0,n.hasClass("js-wpv-sort-control-force-apply-reload")?u.submit():(c=a.view_parametric_search.extend_wpv_parametric_search_triggered_data(c),n.hasClass("js-wpv-sort-control-force-apply-ajax")&&(c.update_results=!0),e(document).trigger("js_event_wpv_parametric_search_triggered",[c])))})),e(document).on("change","select.js-wpv-sort-control-order",(function(){var r=e(this),n={},o=r.data("viewnumber"),s=e(".js-wpv-filter-form-"+o),d={view_unique_id:o,form:s};n.order=r.val(),t.set_sort_data(s,n),i[o]=!0,r.hasClass("js-wpv-sort-control-force-apply-reload")?s.submit():(d=a.view_parametric_search.extend_wpv_parametric_search_triggered_data(d),r.hasClass("js-wpv-sort-control-force-apply-ajax")&&(d.update_results=!0),e(document).trigger("js_event_wpv_parametric_search_triggered",[d]))})),e(document).on("change","input.js-wpv-sort-control-order",(function(){var r={},n=e(this).data("viewnumber"),o=e('.js-wpv-sort-control-order[data-viewnumber="'+n+'"]:checked'),s=e(".js-wpv-filter-form-"+n),d={view_unique_id:n,form:s};r.order=o.val(),t.set_sort_data(s,r),i[n]=!0,d=a.view_parametric_search.extend_wpv_parametric_search_triggered_data(d),e(document).trigger("js_event_wpv_parametric_search_triggered",[d])})),e(document).on("click",".js-wpv-sort-list-order",(function(r){r.preventDefault();var n=e(this),o=n.data("order"),s=n.closest(".wpv-sort-list"),d=n.closest("span.js-wpv-sort-list-item"),_=n.data("viewnumber"),p=e(".js-wpv-filter-form-"+_),l={order:o},u={view_unique_id:_,form:p};d.hasClass("wpv-sort-list-current")||(s.find("span.wpv-sort-list-current").removeClass("wpv-sort-list-current"),s.find(".js-wpv-sort-list-item").css({display:"none"}),d.addClass("wpv-sort-list-current").css({display:"block"}),s.prepend(d),t.set_sort_data(p,l),i[_]=!0,n.hasClass("js-wpv-sort-control-force-apply-reload")?p.submit():(u=a.view_parametric_search.extend_wpv_parametric_search_triggered_data(u),n.hasClass("js-wpv-sort-control-force-apply-ajax")&&(u.update_results=!0),e(document).trigger("js_event_wpv_parametric_search_triggered",[u])))})),e(document).on("mouseenter",".js-wpv-sort-list-dropdown",(function(){e(this).find(".js-wpv-sort-list-item").css({display:"block"})})),e(document).on("mouseleave",".js-wpv-sort-list-dropdown",(function(){e(this).find(".js-wpv-sort-list-item:not(.wpv-sort-list-current)").css({display:"none"})})),t.init_sort_list_width=function(e){},t.adjust_sort_list_width=function(t){var r=t,a=0,i=r.find(".js-wpv-sort-list-item");r.find(".wpv-sort-list-anchor span").each((function(){var t=e(this).text().length;t>a&&(a=t)})),a=a<10?a+1:a,r.css({width:a+"em"}),i.css({width:a+"em"})},t.maybe_init_sort_data=function(r){r.find(".js-wpv-sort-list-dropdown").each((function(){var r=e(this);switch(r.hasClass("wpv-sort-list-orderby-dropdown")?"orderby":"order"){case"orderby":var a=(o=r.find(".wpv-sort-list-current .js-wpv-sort-list-orderby")).data("viewnumber"),i=e(".js-wpv-filter-form-"+a),n={orderby:o.data("orderby"),orderby_as:o.data("orderbyas"),forceorder:o.data("forceorder")};t.set_sort_data(i,n);break;case"order":var o;a=(o=r.find(".wpv-sort-list-current .js-wpv-sort-list-order")).data("viewnumber"),i=e(".js-wpv-filter-form-"+a),n={order:o.data("order")};t.set_sort_data(i,n)}})),r.find("select.js-wpv-sort-control-orderby").each((function(){var r=e(this);if(0==r.closest(".js-wpv-filter-form").length){var a=r.data("viewnumber"),i=e(".js-wpv-filter-form-"+a),n={orderby:r.val()};void 0!==r.find(":selected").data("orderbyas")&&(n.orderby_as=r.find(":selected").data("orderbyas")),t.set_sort_data(i,n)}})),r.find("select.js-wpv-sort-control-order").each((function(){var r=e(this);if(0==r.closest(".js-wpv-filter-form").length){var a=r.data("viewnumber"),i=e(".js-wpv-filter-form-"+a),n={order:r.val()};t.set_sort_data(i,n)}})),r.find("input.js-wpv-sort-control-orderby:checked").each((function(){var r=e(this);if(0==r.closest(".js-wpv-filter-form").length){var a=r.data("viewnumber"),i=e(".js-wpv-filter-form-"+a),n={orderby:r.val()};void 0!==r.data("orderbyas")&&(n.orderby_as=r.data("orderbyas")),t.set_sort_data(i,n)}})),r.find("input.js-wpv-sort-control-order:checked").each((function(){var r=e(this);if(0==r.closest(".js-wpv-filter-form").length){var a=r.data("viewnumber"),i=e(".js-wpv-filter-form-"+a),n={order:r.val()};t.set_sort_data(i,n)}}))},e(document).on("js_event_wpv_pagination_completed",(function(e,r){t.maybe_init_sort_data(r.layout),r.filter&&t.maybe_init_sort_data(r.filter)})),e(document).on("js_event_wpv_parametric_search_form_updated",(function(e,r){t.maybe_init_sort_data(r.view_changed_form)})),e(document).on("js_event_wpv_parametric_search_results_updated",(function(e,r){t.maybe_init_sort_data(r.layout)})),t.init=function(){t.maybe_init_sort_data(e("body"))},t.init()},a.ViewPagination=function(e){var t=this;t.rollover_running=[],t.rollover_stopped=[],t.rollover_paused=[],t.init_rollover_timing_fired=!1,t.pagination_queue={},t.pagination_effects={},t.pagination_effects_conditions={},t.pagination_effects_spinner={},t.paged_views={},t.paged_views_initial_page={},t.last_paginated_view=[],t.paginated_history_reach=0,t.add_paginated_history=!0,t.pagination_effect_state_push=["fade","slidev","slideh"],t.pagination_effect_state_replace=[],t.pagination_effect_state_keep=["infinite"],t.init_scrolling_event_fired=!1,t.slide_data_defaults={view_number:"",page:0,max_pages:0,speed:500,next:!0,effect:"fade",response:null,wpvPaginatorFilter:null,wpvPaginatorLayout:null,responseFilter:null,responseView:null,callback_next_func:a.view_frontend_utils.just_return},t.pagination_doing_ajax=[],t.add_view_parameters=function(t,r,a){var i=e("form.js-wpv-filter-form-"+a),n=i.find(".js-wpv-post-relationship-update"),o=i.data("environment");return t.action="wpv_get_page",t.page=r,t.view_number=a,t.wpv_sort_orderby=void 0!==i.data("orderby")?i.data("orderby"):"",t.wpv_sort_order=void 0!==i.data("order")?i.data("order"):"",t.wpv_sort_orderby_as=void 0!==i.data("orderbyas")?i.data("orderbyas"):"",t.wpv_sort_orderby_second=void 0!==i.data("orderbysecond")?i.data("orderbysecond"):"",t.wpv_sort_order_second=void 0!==i.data("ordersecond")?i.data("ordersecond"):"",t.wpv_view_widget_id=i.data("viewwidgetid"),t.view_hash=i.data("viewhash"),t.dps_pr={},t.dps_general={},o.current_post_id>0&&(t.wpv_aux_current_post_id=o.current_post_id),o.parent_post_id>0&&(t.wpv_aux_parent_post_id=o.parent_post_id),o.parent_term_id>0&&(t.wpv_aux_parent_term_id=o.parent_term_id),o.parent_user_id>0&&(t.wpv_aux_parent_user_id=o.parent_user_id),n.length&&(t.dps_pr=n.serializeArray()),(i.hasClass("js-wpv-dps-enabled")||i.hasClass("js-wpv-ajax-results-enabled"))&&(t.dps_general=i.find(".js-wpv-filter-trigger, .js-wpv-filter-trigger-delayed").serializeArray()),t},t.pagination_preload_pages=function(e){var r=parseInt(e.page,10),a=parseInt(e.max_pages,10),i=parseInt(e.max_reach,10);if(i>a&&(i=a),"enabled"==e.preload_pages)for(var n=1;n<i;)t.pagination_preload_next_page(e.view_number,r,a,n),t.pagination_preload_previous_page(e.view_number,r,a,n),n++;"enabled"==e.cache_pages&&t.pagination_cache_current_page(e.view_number,r)},t.pagination_cache_current_page=function(t,r){window.wpvCachedPages[t]=window.wpvCachedPages[t]||[],window.wpvCachedPages[t].hasOwnProperty(r)||a.view_frontend_utils.get_updated_query_results(t,r,e("form.js-wpv-filter-form-"+t),"full").done((function(a){a.success&&(window.wpvCachedPages[t][r]=a.data.full,e(a.data.full).find("img").each((function(){window.wpvCachedImages.push(this.src)})))}))},t.pagination_preload_next_page=function(t,r,i,n){window.wpvCachedPages[t]=window.wpvCachedPages[t]||[];var o=r+n;window.wpvCachedPages[t].hasOwnProperty(o)||o-1<i&&a.view_frontend_utils.get_updated_query_results(t,o,e("form.js-wpv-filter-form-"+t),"full").done((function(r){r.success&&(window.wpvCachedPages[t][o]=r.data.full,e(r.data.full).find("img").each((function(){window.wpvCachedImages.push(this.src)})))}))},t.pagination_preload_previous_page=function(t,r,i,n){window.wpvCachedPages[t]=window.wpvCachedPages[t]||[];var o=r-n;window.wpvCachedPages[t].hasOwnProperty(o)||(o+1>1?a.view_frontend_utils.get_updated_query_results(t,o,e("form.js-wpv-filter-form-"+t),"full").done((function(r){r.success&&(window.wpvCachedPages[t][o]=r.data.full,e(r.data.full).find("img").each((function(){window.wpvCachedImages.push(this.src)})))})):o+1===1&&a.view_frontend_utils.get_updated_query_results(t,i,e("form.js-wpv-filter-form-"+t),"full").done((function(r){r.success&&(window.wpvCachedPages[t][i]=r.data.full,window.wpvCachedPages[t][0]=r.data.full,e(r.data.full).find("img").each((function(){window.wpvCachedImages.push(this.src)})))})))},t.trigger_pagination=function(r,i){if(window.wpvPaginationAnimationFinished.hasOwnProperty(r)){if(!0!==window.wpvPaginationAnimationFinished[r])return window.wpvPaginationQueue.hasOwnProperty(r)||(window.wpvPaginationQueue[r]=[]),void window.wpvPaginationQueue[r].push(arguments)}else window.wpvPaginationAnimationFinished[r]=!1;window.wpvPaginationAnimationFinished[r]=!1;var n,o=e("#wpv-view-layout-"+r),s=e('form[name="wpv-filter-'+r+'"]'),d=!0,_=t.get_paged_view(r),p=parseInt(_.preload_reach)+1,l=a.view_frontend_utils.just_return;if("disabled"!=_.type&&"paged"!=_.type)!(_.effect in t.pagination_effects_conditions)||t.pagination_effects_conditions[_.effect](_,i)?(window.wpvPaginationAjaxLoaded[r]=!1,window.wpvCachedPages[r]=window.wpvCachedPages[r]||[],this.historyP.hasOwnProperty(r)&&(d=this.historyP[r]<i),""!==_.callback_next&&"function"!=typeof(l=window[_.callback_next])&&(l=a.view_frontend_utils.just_return),n={view_number:r,page:i,max_pages:parseInt(_.max_pages,10),speed:parseFloat(_.duration),next:d,effect:_.effect,wpvPaginatorFilter:s,wpvPaginatorLayout:o,responseView:null,callback_next_func:l},window.wpvCachedPages[r].hasOwnProperty(i)?(n.response=window.wpvCachedPages[r][i],t.prepare_slide(n)):("disabled"!==_.spinner&&(_.effect in t.pagination_effects_spinner?t.pagination_effects_spinner[_.effect](r,o):t.pagination_effects_spinner.fade(r,o)),a.view_frontend_utils.get_updated_query_results(r,i,e("form.js-wpv-filter-form-"+r),"full").done((function(e){e.success&&(n.response=e.data.full,t.prepare_slide(n))}))),t.pagination_preload_pages({view_number:r,cache_pages:_.cache_pages,preload_pages:_.preload_pages,page:i,max_reach:p,max_pages:_.max_pages}),this.historyP[r]=i):window.wpvPaginationAnimationFinished[r]=!0;else switch(_.query){case"archive":current_page_permalink=_.base_permalink.replace("WPV_PAGE_NUM",i),window.location.replace(current_page_permalink);break;default:a.view_frontend_utils.set_extra_url_query_parameters_by_form(s),e('input[name="wpv_paged"]').length>0?e('input[name="wpv_paged"]').attr("value",i):e("<input>").attr({type:"hidden",name:"wpv_paged",value:i}).appendTo(s),s[0].submit()}},t.prepare_slide=function(r){var a,i,n=e.extend({},t.slide_data_defaults,r),o=n.wpvPaginatorLayout.width(),s=n.wpvPaginatorLayout.outerWidth(),d=(n.wpvPaginatorLayout.height(),n.wpvPaginatorLayout.outerHeight()),_=e("<div></div>").append(n.response);n.responseView=_.find(".js-wpv-view-layout-"+n.view_number),n.responseFilterSelector=_.find("form.js-wpv-filter-form-"+n.view_number),n.responseFilter=_.find("form.js-wpv-filter-form-"+n.view_number).html(),n.pagination_page_permalink=n.responseView.data("permalink"),n.wpvPaginatorLayout.attr("id","wpv-view-layout-"+n.view_number+"-response").wrap('<div class="wpv_slide_remove" style="width:'+s+"px;height:"+d+'px;overflow:hidden;" />').css("width",o),n.responseView.attr("id","wpv-view-layout-"+n.view_number).css({visibility:"hidden",width:o}),n.wpvPaginatorLayout.hasClass("js-wpv-layout-preload-images")?(a=[],(i=n.responseView.find("img")).length<1?t.pagination_slide(n):i.one("load",(function(){a.push(e(this).attr("src")),a.length===i.length&&t.pagination_slide(n)})).each((function(){e(this).trigger("load")})),n.responseView.find(".js-wpv-layout-preload-images").css("visibility","visible")):t.pagination_slide(n)},t.pagination_slide=function(r){var a=e.extend({},t.slide_data_defaults,r);switch(a.effect){case"slideleft":a.next=!0,a.effect="slideh";break;case"slideright":case"sliderightforward":a.next=!1,a.effect="slideh";break;case"slidedown":case"slidedownforward":a.next=!1,a.effect="slidev";break;case"slideup":a.next=!0,a.effect="slidev"}!a.effect in t.pagination_effects&&(a.effect="fade"),t.pagination_effects[a.effect](a)},t.pagination_queue_trigger=function(e,r,a){var i,n,o;window.wpvPaginationQueue.hasOwnProperty(e)&&window.wpvPaginationQueue[e].length>0&&(window.wpvPaginationQueue[e].sort(),i=window.wpvPaginationQueue[e][0],window.wpvPaginationQueue[e].splice(0,1),(n=i[1])>(o=i[4])?n=1:n<1&&(n=o),t.trigger_pagination(e,n))},e(document).on("click",".js-wpv-pagination-next-link, .js-wpv-pagination-previous-link, .js-wpv-pagination-first-link, .js-wpv-pagination-last-link",(function(r){r.preventDefault();var n=e(this),o=n.data("viewnumber"),s=n.data("page"),d=e(".js-wpv-filter-form-"+o);a.view_sorting.set_sort_data_for_pagination(d),i[o]=!0,t.trigger_pagination(o,s)})),e(document).on("change",".js-wpv-page-selector",(function(r){r.preventDefault();var a=e(this),n=a.data("viewnumber"),o=a.val();i[n]=!0,t.trigger_pagination(n,o)})),e(document).on("click",".js-wpv-pagination-link",(function(r){r.preventDefault();var a,n=e(this),o={};for(o.view_number=n.data("viewnumber"),o.page=n.data("page"),a=1;a<=o.max_pages;a++)a===o.page?e(".js-wpv-page-link-"+o.view_number+"-"+a).addClass("wpv_page_current"):e(".js-wpv-page-link-"+o.view_number+"-"+a).removeClass("wpv_page_current");i[o.view_number]=!0,t.trigger_pagination(o.view_number,o.page)})),e(document).on("click",".js-wpv-archive-pagination-link, .js-wpv-archive-pagination-next-link, .js-wpv-archive-pagination-prev-link, .js-wpv-archive-pagination-links-next-link, .js-wpv-archive-pagination-links-prev-link, .js-wpv-archive-pagination-links-first-link, .js-wpv-archive-pagination-links-last-link",(function(r){r.preventDefault();var a=e(this),n=a.data("viewnumber"),o=a.data("page");i[n]=!0,t.trigger_pagination(n,o)})),e(document).on("js_event_wpv_pagination_completed",(function(e,r){a.view_frontend_utils.render_frontend_media_shortcodes(r.layout),a.view_frontend_utils.render_frontend_datepicker(),a.view_frontend_utils.renderPriceFilter(),t.init_paged_views(r.layout),t.init_preload_images(r.layout),t.init_preload_pages(r.layout),t.init_pagination_button_state()})),e(document).on("js_event_wpv_parametric_search_results_updated",(function(e,r){t.init_paged_view(r.view_unique_id),t.init_paged_views(r.layout),t.init_preload_images(r.layout),t.init_preload_pages(r.layout)})),t.REPLACE_BUFFER_MILISECONDS=20,t.init_effects=function(){t.pagination_effects={infinite:function(r){if(r.page!=t.get_paged_view(r.view_number).page+1)e(".js-wpv_slide_loading_img_"+r.view_number).fadeOut((function(){e(this).remove()})),r.wpvPaginatorLayout.animate({opacity:1},300).unwrap().attr("id","wpv-view-layout-"+r.view_number),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0;else{var a={},i={};if(a.view_unique_id=r.view_number,a.effect="infinite",a.speed=r.speed,i.view_number=r.view_number,i.page=r.page,i.effect="infinite",i.pagination_page_permalink=r.pagination_page_permalink,r.wpvPaginatorLayout.find(".js-wpv-loop").length>0&&r.responseView.find(".js-wpv-loop").length>0)r.responseView.find(".js-wpv-loop").children().addClass("wpv-loop-item-blink").css({opacity:"0.3"}),r.responseView.find(".js-wpv-loop").prepend(r.wpvPaginatorLayout.find(".js-wpv-loop").html()),r.wpvPaginatorLayout.html(r.responseView.html()),r.wpvPaginatorLayout.find(".wpv-loop-item-blink").removeClass("wpv-loop-item-blink").animate({opacity:1},r.speed);else{var n=r.wpvPaginatorLayout.html().split("\x3c!-- WPV_Infinite_Scroll --\x3e",3),o=n.length>2?n[1]:"";r.wpvPaginatorLayout.html(r.responseView.html().replace("\x3c!-- WPV_Infinite_Scroll_Insert --\x3e",o))}a.layout=r.wpvPaginatorLayout,e(".js-wpv_slide_loading_img_"+r.view_number).fadeOut((function(){e(this).remove()})),r.wpvPaginatorLayout.unwrap().attr("id","wpv-view-layout-"+r.view_number).animate({opacity:1},300,(function(){r.wpvPaginatorFilter.html(r.responseFilter),t.get_paged_view(r.view_number).page=r.page,window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(i),e(document).trigger("js_event_wpv_pagination_completed",[a]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))}},slideh:function(r){var a,i=r.wpvPaginatorLayout.height(),n=r.wpvPaginatorLayout.outerHeight(),o={},s={};o.view_unique_id=r.view_number,o.effect="slideh",o.speed=r.speed,o.layout=r.responseView,o.filter=r.responseFilterSelector,s.view_number=r.view_number,s.page=r.page,s.effect="slideh",s.pagination_page_permalink=r.pagination_page_permalink,!0===r.next?(r.wpvPaginatorLayout.css("float","left"),r.responseView.css({float:"left",visibility:"visible"}),r.wpvPaginatorLayout.after(r.responseView).parent().children().wrapAll('<div style="width:5000px;" />'),e(".js-wpv_slide_loading_img_"+r.view_number).fadeOut((function(){e(this).remove()})),setTimeout((function(){a=r.responseView.outerHeight(),n===a?r.wpvPaginatorLayout.parent().animate({marginLeft:"-"+r.wpvPaginatorLayout.outerWidth()+"px"},r.speed+500,(function(){r.responseView.css({position:"static",float:"none"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(s),e(document).trigger("js_event_wpv_pagination_completed",[o]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)})):n>a?r.wpvPaginatorLayout.parent().animate({marginLeft:"-"+r.wpvPaginatorLayout.outerWidth()+"px"},r.speed+500,(function(){r.wpvPaginatorLayout.parent().parent().animate({height:r.responseView.outerHeight()+"px"},r.speed/2,(function(){r.responseView.css({position:"static",float:"none"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(s),e(document).trigger("js_event_wpv_pagination_completed",[o]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))})):r.wpvPaginatorLayout.parent().parent().animate({height:r.responseView.outerHeight()+"px"},r.speed/2,(function(){r.wpvPaginatorLayout.parent().animate({marginLeft:"-"+r.wpvPaginatorLayout.outerWidth()+"px"},r.speed+500,(function(){r.responseView.css({position:"static",float:"none"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(s),e(document).trigger("js_event_wpv_pagination_completed",[o]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))}))}),t.REPLACE_BUFFER_MILISECONDS)):(r.wpvPaginatorLayout.css("float","right"),r.responseView.css({float:"right",visibility:"visible"}),r.wpvPaginatorLayout.after(r.responseView).parent().children().wrapAll('<div style="height:'+i+";width:"+(r.responseView.outerWidth()+r.wpvPaginatorLayout.outerWidth())+"px; margin-left:-"+r.wpvPaginatorLayout.outerWidth()+'px;" />'),e(".js-wpv_slide_loading_img_"+r.view_number).fadeOut((function(){e(this).remove()})),setTimeout((function(){a=r.responseView.outerHeight(),n===a?r.wpvPaginatorLayout.parent().animate({marginLeft:"0px"},r.speed+500,(function(){r.responseView.css({position:"static",margin:"0px",float:"none"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(s),e(document).trigger("js_event_wpv_pagination_completed",[o]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)})):n>a?r.wpvPaginatorLayout.parent().animate({marginLeft:"0px"},r.speed+500,(function(){r.wpvPaginatorLayout.parent().parent().animate({height:r.responseView.outerHeight()+"px"},r.speed/2,(function(){r.responseView.css({position:"static",margin:"0px",float:"none"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(s),e(document).trigger("js_event_wpv_pagination_completed",[o]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))})):r.wpvPaginatorLayout.parent().parent().animate({height:r.responseView.outerHeight()+"px"},r.speed/2,(function(){r.wpvPaginatorLayout.parent().animate({marginLeft:"0px"},r.speed+500,(function(){r.responseView.css({position:"static",margin:"0px",float:"none"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(s),e(document).trigger("js_event_wpv_pagination_completed",[o]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))}))}),t.REPLACE_BUFFER_MILISECONDS))},slidev:function(r){var a,i=r.wpvPaginatorLayout.outerHeight(),n={},o={};n.view_unique_id=r.view_number,n.effect="slidev",n.speed=r.speed,n.layout=r.responseView,n.filter=r.responseFilterSelector,o.view_number=r.view_number,o.page=r.page,o.effect="slidev",o.pagination_page_permalink=r.pagination_page_permalink,!0===r.next?(r.responseView.css("visibility","visible"),r.wpvPaginatorLayout.after(r.responseView).parent().children().wrapAll("<div />"),e(".js-wpv_slide_loading_img_"+r.view_number).fadeOut((function(){e(this).remove()})),setTimeout((function(){a=r.responseView.outerHeight(),i===a?r.wpvPaginatorLayout.parent().animate({marginTop:"-"+r.responseView.outerHeight()+"px"},r.speed+500,(function(){r.responseView.css({position:"static",margin:"0px"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(o),e(document).trigger("js_event_wpv_pagination_completed",[n]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)})):i>a?r.wpvPaginatorLayout.parent().animate({marginTop:"-"+i+"px"},r.speed+500,(function(){r.wpvPaginatorLayout.parent().parent().animate({height:r.responseView.outerHeight()+"px"},r.speed/2,(function(){r.responseView.css({position:"static",margin:"0px"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(o),e(document).trigger("js_event_wpv_pagination_completed",[n]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))})):r.wpvPaginatorLayout.parent().parent().animate({height:r.responseView.outerHeight()+"px"},r.speed/2,(function(){r.wpvPaginatorLayout.parent().animate({marginTop:"-"+i+"px"},r.speed+500,(function(){r.responseView.css({position:"static",margin:"0px"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(o),e(document).trigger("js_event_wpv_pagination_completed",[n]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))}))}),t.REPLACE_BUFFER_MILISECONDS)):(r.responseView.css("visibility","visible"),r.wpvPaginatorLayout.before(r.responseView).parent().children().wrapAll("<div />"),e(".js-wpv_slide_loading_img_"+r.view_number).fadeOut((function(){e(this).remove()})),setTimeout((function(){a=r.responseView.outerHeight(),r.wpvPaginatorLayout.parent().css({position:"relative","margin-top":"-"+r.responseView.outerHeight()+"px"}),i===a?r.wpvPaginatorLayout.parent().animate({marginTop:"0px"},r.speed+500,(function(){r.responseView.css({position:"static",margin:"0px"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(o),e(document).trigger("js_event_wpv_pagination_completed",[n]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)})):i>a?r.wpvPaginatorLayout.parent().animate({marginTop:"0px"},r.speed+500,(function(){r.wpvPaginatorLayout.parent().parent().animate({height:r.responseView.outerHeight()+"px"},r.speed/2,(function(){r.responseView.css({position:"static",margin:"0px"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(o),e(document).trigger("js_event_wpv_pagination_completed",[n]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))})):r.wpvPaginatorLayout.parent().parent().animate({height:r.responseView.outerHeight()+"px"},r.speed/2,(function(){r.wpvPaginatorLayout.parent().animate({marginTop:"0px"},r.speed+500,(function(){r.responseView.css({position:"static",margin:"0px"}),r.wpvPaginatorLayout.unwrap().unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(o),e(document).trigger("js_event_wpv_pagination_completed",[n]),t.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))}))}),t.REPLACE_BUFFER_MILISECONDS))},fade:function(r){var i,n=r.wpvPaginatorLayout.outerHeight(),o={},s={};o.view_unique_id=r.view_number,o.effect="fade",o.speed=r.speed,o.layout=r.responseView,o.filter=r.responseFilterSelector,s.view_number=r.view_number,s.page=r.page,s.effect="fade",s.pagination_page_permalink=r.pagination_page_permalink,e(".js-wpv_slide_loading_img_"+r.view_number).fadeOut((function(){e(this).remove()})),r.wpvPaginatorLayout.css({position:"absolute","z-index":"5"}).after(r.responseView).next().css("position","static"),setTimeout((function(){i=r.responseView.outerHeight(),n===i?(r.wpvPaginatorLayout.fadeOut(r.speed,(function(){r.wpvPaginatorLayout.unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter)})),r.responseView.hide().css("visibility","visible").fadeIn(r.speed,(function(){window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(s),e(document).trigger("js_event_wpv_pagination_completed",[o]),a.view_pagination.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))):r.wpvPaginatorLayout.fadeOut(r.speed,(function(){r.wpvPaginatorLayout.parent().animate({height:i+"px"},r.speed,(function(){r.wpvPaginatorLayout.unwrap().remove(),r.wpvPaginatorFilter.html(r.responseFilter),r.responseView.hide().css("visibility","visible").fadeIn(r.speed,(function(){window.wpvPaginationAjaxLoaded[r.view_number]=!0,window.wpvPaginationAnimationFinished[r.view_number]=!0,r.callback_next_func(),t.manage_browser_history(s),e(document).trigger("js_event_wpv_pagination_completed",[o]),a.view_pagination.pagination_queue_trigger(r.view_number,r.next,r.wpvPaginatorFilter)}))}))}))}),t.REPLACE_BUFFER_MILISECONDS)}}},t.manage_browser_history=function(e){"rollover"!=t.get_paged_view(e.view_number).type&&"enabled"==t.get_paged_view(e.view_number).manage_history&&(1==t.add_paginated_history?_.contains(t.pagination_effect_state_keep,e.effect)||(_.contains(t.pagination_effect_state_replace,e.effect)?history.replaceState(null,"",e.pagination_page_permalink):(t.last_paginated_view.push(e.view_number),state_obj={view_number:e.view_number,page:e.page},history.pushState(state_obj,"",e.pagination_page_permalink),t.paginated_history_reach=t.paginated_history_reach+1)):t.add_paginated_history=!0)},window.onpopstate=function(e){if(null==e.state){var r=t.last_paginated_view.pop();null!=r&&(t.add_paginated_history=!1,t.paged_views_initial_page[r]=t.paged_views_initial_page[r]||1,t.trigger_pagination(r,t.paged_views_initial_page[r]))}else _.has(e.state,"view_number")&&_.has(e.state,"page")&&(t.add_paginated_history=!1,t.trigger_pagination(e.state.view_number,e.state.page))},e(document).on("js_event_wpv_parametric_search_results_updated",(function(e,r){window.wpvCachedPages[r.view_unique_id]=[],t.last_paginated_view=[],t.paginated_history_reach>0&&(window.history.go(-Math.abs(t.paginated_history_reach)),t.paginated_history_reach=0),setTimeout((function(){history.replaceState(null,"",r.permalink)}),100),t.updateLanguageSwitcherURLs(r.permalink)})),t.updateLanguageSwitcherURLs=function(r){e(".wpml-ls-item").each((function(a,i){var n,o=t.parseURL(r),s=!1;if(e(i).is("a")?s=e(i).attr("href"):e(i).find("a").length>0&&(s=e(i).find("a").first().attr("href")),!1!==s&&"#"!==s){n=t.parseURL(s),delete o.params.lang;var d=e.extend({},n.params,o.params),_=s.replace(n.query,"");e(i).find("a").first().attr("href",_+"?"+e.param(d))}}))},t.parseURL=function(e){var t=document.createElement("a");return t.href=e,{source:e,protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port,query:t.search,params:function(){for(var e,a={},i=t.search.replace(/^\?/,"").split("&"),n=i.length,o=0;o<n;o++)if(i[o]){e=i[o].split("=");var s=decodeURI(e[0]),d=e[1];switch(r(a[s])){case"string":d=[a[s],e[1]];break;case"object":(d=a[s]).push(e[1])}a[s]=d}return a}(),file:(t.pathname.match(/\/([^/?#]+)$/i)||[,""])[1],hash:t.hash.replace("#",""),path:t.pathname.replace(/^([^/])/,"/$1"),relative:(t.href.match(/tps?:\/\/[^/]+(.+)/)||[,""])[1],segments:t.pathname.replace(/^\//,"").split("/")}},t.init_effects_conditions=function(){t.pagination_effects_conditions={infinite:function(e,t){return t==e.page+1}}},t.init_effects_spinner=function(){t.pagination_effects_spinner.fade=t.pagination_effects_spinner.slideleft=t.pagination_effects_spinner.slideright=t.pagination_effects_spinner.sliderightforward=t.pagination_effects_spinner.slideh=t.pagination_effects_spinner.slideup=t.pagination_effects_spinner.slidedown=t.pagination_effects_spinner.slidedownforward=t.pagination_effects_spinner.slidev=function(e,r){var a=new Image;a.src=t.get_paged_view(e).spinner_image,a.onload=function(){var i=r.position(),n='<div style="width:'+a.width+"px;height:"+a.height+"px;border:none;background:transparent 50% 50% no-repeat url("+t.get_paged_view(e).spinner_image+");position:absolute;z-index:99;top:"+(Math.round(i.top)+Math.round(r.height()/2)-Math.round(a.height/2))+"px;left:"+(Math.round(i.left)+Math.round(r.width()/2)-Math.round(a.width/2))+'px;" class="wpv_slide_loading_img js-wpv_slide_loading_img_'+e+'"></div>';r.before(n).animate({opacity:.5},300)}},t.pagination_effects_spinner.infinite=function(e,r){var a=new Image;a.src=t.get_paged_view(e).spinner_image,a.onload=function(){var i=r.position(),n='<div style="width:'+a.width+"px;height:"+a.height+"px;border:none;background:transparent 50% 50% no-repeat url("+t.get_paged_view(e).spinner_image+");position:absolute;z-index:99;top:"+(Math.round(i.top)+r.height()-Math.round(a.height/2))+"px;left:"+(Math.round(i.left)+Math.round(r.width()/2)-Math.round(a.width/2))+'px;" class="wpv_slide_loading_img js-wpv_slide_loading_img_'+e+'"></div>';r.before(n).animate({opacity:.5},300)}}},t.init_paged_views=function(r){var a=!1,n=!1;return this.historyP=this.historyP||[],window.wpvCachedPages=window.wpvCachedPages||[],window.wpvCachedImages=window.wpvCachedImages||[],e(".js-wpv-view-layout",r).each((function(){var r=e(this).data("viewnumber");if(t.init_paged_view(r),"infinite"==t.paged_views[r].effect&&1==t.paged_views[r].page&&(a=!0),"rollover"==t.paged_views[r].type&&!i.hasOwnProperty(r))if(n=!0,rollover_has_index=_.findIndex(t.rollover_running,(function(e){return e.view_number==r})),rollover_has_index<0){var o={view_number:r,page:1,force_reset:!1};t.rollover_running.push(o),t.init_rollover_timing_fired&&t.trigger_rollover(o)}else t.rollover_running[rollover_has_index]={view_number:r,page:1,force_reset:!0}})),!t.init_scrolling_event_fired&&a&&t.init_scrolling_event_callback(),!t.init_rollover_timing_fired&&n&&t.init_rollover_timing_callback(),t},t.init_paged_view=function(r){this.historyP=this.historyP||[],t.paged_views[r]=e("#wpv-view-layout-"+r).data("pagination"),t.paged_views_initial_page[r]=t.paged_views[r].page,this.historyP[r]=t.paged_views[r].page,window.wpvCachedPages[r]=[],"disabled"!=t.paged_views[r].type&&"paged"!=t.paged_views[r].type&&t.paged_views[r].page>1&&e("#wpv-view-layout-"+r).removeClass("js-wpv-layout-infinite-scrolling"),e("#wpv-view-layout-"+r).parents(".js-wpv-view-layout").length>0&&(t.paged_views[r].manage_history="disabled")},t.get_paged_view=function(e){return _.has(t.paged_views,e)||t.init_paged_view(e),t.paged_views[e]},t.is_infinite_triggable=function(r){var a=r,i=r.data("viewnumber");return infinite_tolerance=t.get_paged_view(i).infinite_tolerance,infinite_tolerance=isNaN(infinite_tolerance)?0:+infinite_tolerance,r.find(".js-wpv-loop").length>0&&(a=r.find(".js-wpv-loop")),a.offset().top+a.outerHeight()<=e(window).scrollTop()+e(window).height()+infinite_tolerance||e(window).scrollTop()+e(window).height()==e(document).height()},t.init_scrolling_event_callback=function(){e(window).on("scroll",_.debounce((function(){e(".js-wpv-layout-infinite-scrolling").each((function(){var r=e(this),a=r.data("viewnumber"),i=t.get_paged_view(a);i.page<i.max_pages&&t.is_infinite_triggable(r)&&t.trigger_pagination(a,i.page+1)}))}),1)),t.init_scrolling_event_fired=!0},t.trigger_rollover=function(r){var n=e.extend({},{view_number:"",page:1,force_reset:!1},r),o=n.view_number,s=t.get_paged_view(o);if(s.max_pages>1&&e("#wpv-view-layout-"+o).length>0){var d=1e3*s.speed-t.REPLACE_BUFFER_MILISECONDS;d<0&&(d=0),setTimeout((function(){var d=_.findIndex(t.rollover_paused,(function(e){return e.view_number==o}));if(t.rollover_paused[d]&&t.rollover_paused[d].view_number&&t.rollover_paused[d].view_number==o)setTimeout((function(){t.trigger_rollover(r)}),100);else if(!i.hasOwnProperty(o)&&e("#wpv-view-layout-"+o).length>0){var p=n.page;d=_.findIndex(t.rollover_running,(function(e){return e.view_number==o}));t.rollover_running[d].force_reset&&(t.rollover_running[d].force_reset=!1,p=1),"slideright"===s.effect||"slidedown"===s.effect?p<=1?p=s.max_pages:p-=1:p===s.max_pages?p=1:p+=1,t.rollover_running[d].page=p,a.view_pagination.trigger_pagination(o,p)}else{d=_.findIndex(t.rollover_running,(function(e){return e.view_number==o}));t.rollover_running.splice(d,1)}}),d)}else{var p=_.findIndex(t.rollover_running,(function(e){return e.view_number==o}));t.rollover_running.splice(p,1)}},t.init_rollover_timing_callback=function(){var e=t.rollover_running.slice(0);_.each(e,(function(e,r,a){t.trigger_rollover(e)})),t.init_rollover_timing_fired=!0},e(document).on("js_event_wpv_pagination_completed",(function(e,r){if("rollover"==t.get_paged_view(r.view_unique_id).type&&!i.hasOwnProperty(r.view_unique_id)){var a=_.findIndex(t.rollover_running,(function(e){return e.view_number==r.view_unique_id}));t.trigger_rollover(t.rollover_running[a])}})),e(document).on("js_event_wpv_parametric_search_results_updated",(function(e,r){if("rollover"==t.get_paged_view(r.view_unique_id).type&&!i.hasOwnProperty(r.view_unique_id)){var a=_.findIndex(t.rollover_running,(function(e){return e.view_number==r.view_unique_id}));t.trigger_rollover(t.rollover_running[a])}})),e(document).on("mouseenter",".js-wpv-view-layout",(function(){var r=e(this).data("viewnumber");if("enabled"==t.get_paged_view(r).pause_on_hover){var a={view_number:r};t.rollover_paused.push(a)}})),e(document).on("mouseleave",".js-wpv-view-layout",(function(){var r=e(this).data("viewnumber"),a=_.findIndex(t.rollover_paused,(function(e){return e.view_number==r}));t.rollover_paused.splice(a,1)})),t.init_preload_images=function(t){e(".js-wpv-layout-preload-images",t).css("visibility","hidden"),e(".js-wpv-layout-preload-images",t).each((function(){var t=[],r=e(this),a=r.find("img");a.length<1?r.css("visibility","visible"):(a.one("load",(function(){t.push(e(this).attr("src")),t.length===a.length&&r.css("visibility","visible")})).each((function(){this.complete&&e(this).trigger("load")})),setTimeout((function(){r.css("visibility","visible")}),3e3))}))},t.init_preload_pages=function(r){e(".js-wpv-layout-preload-pages",r).each((function(){var r=e(this).data("viewnumber"),a=t.get_paged_view(r),i=parseInt(a.max_pages,10),n=parseInt(a.preload_reach,10)+1;t.pagination_preload_pages({view_number:r,cache_pages:"disabled",preload_pages:"enabled",page:1,max_reach:n,max_pages:i})}))},t.init_pagination_button_state=function(){e(".pagination li:not(.disabled,.active)").has("span").addClass("disabled"),e(".pagination li.page-item:empty").remove()},t.init=function(){t.init_effects(),t.init_effects_conditions(),t.init_effects_spinner();var r=e("html");t.init_paged_views(r),t.init_preload_images(r),t.init_preload_pages(r),t.init_pagination_button_state()},t.init()},a.ViewParametricSearch=function(e){var t=this;t.manage_update_results=function(t){if(""!==t.ajax_before){var r=window[t.ajax_before];"function"==typeof r&&r(t.view_num)}var a={};a.view_unique_id=t.view_num,a.permalink=t.permalink,t.layout.fadeOut(200,(function(){t.layout.html(t.new_layout.html()).attr("data-pagination",t.new_layout.attr("data-pagination")).data("pagination",t.new_layout.data("pagination")).fadeIn("fast",(function(){var r=window[t.ajax_after];"function"==typeof r&&r(t.view_num),a.layout=t.layout,e(document).trigger("js_event_wpv_parametric_search_results_updated",[a])}))}))},t.manage_changed_form=function(r){var n,o,s,d,_,p,l,u=r.form,v=r.view_unique_id,c=r.timestamp,w=e("#wpv-view-layout-"+v),f=u.find(".js-wpv-filter-data-for-this-form"),g=f.data("ajaxprebefore"),m="full",h=e(".js-wpv-filter-form-"+v).not(u),y="both",b=u.find(".js-wpv-dps-spinner").add(h.find(".js-wpv-dps-spinner")),j=b.length;if(data_for_events={},data_for_manage_updated_results={},data_for_events.view_unique_id=v,data_for_manage_updated_results.view_num=v,data_for_manage_updated_results.ajax_before=f.data("ajaxbefore"),data_for_manage_updated_results.ajax_after=f.data("ajaxafter"),u.hasClass("js-wpv-form-only")&&(m="form"),r.update_form)if(h.length>0)if(n=h.not(".js-wpv-form-full"),o=h.not(".js-wpv-form-only"),"form"==m){if(y=o.length>0||r.update_results?"both":"form",r.update_results){if(""!==g)"function"==typeof(x=window[g])&&x(v);e(document).trigger("js_event_wpv_parametric_search_started",[data_for_events])}j&&e(b).fadeIn("fast"),i[v]=!0,a.view_frontend_utils.get_updated_query_results(v,1,u,y).done((function(i){c===u.prop("wpv-search-last-triggered")&&i.success&&(s=e("<div></div>").append(i.data.form),_=e("<div></div>").append(i.data.full),d=s.find(".js-wpv-filter-form-"+v),p=_.find(".js-wpv-filter-form-"+v),l=_.find(".js-wpv-view-layout-"+v),a.view_frontend_utils.close_and_destroy_datepickers(),u.html(d.html()),a.view_frontend_utils.clone_form(u,n),o.each((function(){e(this).html(p.html())})),data_for_events.view_changed_form=u,data_for_events.view_changed_form_additional_forms_only=n,data_for_events.view_changed_form_additional_forms_full=o,e(document).trigger("js_event_wpv_parametric_search_form_updated",[data_for_events]),r.update_results&&(data_for_manage_updated_results.layout=w,data_for_manage_updated_results.new_layout=l,data_for_manage_updated_results.permalink=i.data.parametric_permalink,t.manage_update_results(data_for_manage_updated_results)),b.hide())}))}else{if(y=n.length>0?"both":"full",r.update_results){if(""!==g)"function"==typeof(x=window[g])&&x(v);e(document).trigger("js_event_wpv_parametric_search_started",[data_for_events])}j&&e(b).fadeIn("fast"),i[v]=!0,a.view_frontend_utils.get_updated_query_results(v,1,u,y).done((function(i){c===u.prop("wpv-search-last-triggered")&&i.success&&(s=e("<div></div>").append(i.data.form),_=e("<div></div>").append(i.data.full),d=s.find(".js-wpv-filter-form-"+v),p=_.find(".js-wpv-filter-form-"+v),l=_.find(".js-wpv-view-layout-"+v),a.view_frontend_utils.close_and_destroy_datepickers(),u.html(p.html()),a.view_frontend_utils.clone_form(u,o),n.each((function(){e(this).html(d.html())})),data_for_events.view_changed_form=u,data_for_events.view_changed_form_additional_forms_only=n,data_for_events.view_changed_form_additional_forms_full=o,e(document).trigger("js_event_wpv_parametric_search_form_updated",[data_for_events]),r.update_results&&(data_for_manage_updated_results.layout=w,data_for_manage_updated_results.new_layout=l,data_for_manage_updated_results.permalink=i.data.parametric_permalink,t.manage_update_results(data_for_manage_updated_results)),b.hide())}))}else if("form"==m){if(y=r.update_results?"both":"form",r.update_results){if(""!==g)"function"==typeof(x=window[g])&&x(v);e(document).trigger("js_event_wpv_parametric_search_started",[data_for_events])}j&&e(b).fadeIn("fast"),i[v]=!0,a.view_frontend_utils.get_updated_query_results(v,1,u,y).done((function(i){c===u.prop("wpv-search-last-triggered")&&i.success&&(s=e("<div></div>").append(i.data.form),_=e("<div></div>").append(i.data.full),d=s.find(".js-wpv-filter-form-"+v),l=_.find(".js-wpv-view-layout-"+v),a.view_frontend_utils.close_and_destroy_datepickers(),u.html(d.html()),data_for_events.view_changed_form=u,data_for_events.view_changed_form_additional_forms_only=n,data_for_events.view_changed_form_additional_forms_full=o,e(document).trigger("js_event_wpv_parametric_search_form_updated",[data_for_events]),r.update_results&&(data_for_manage_updated_results.layout=w,data_for_manage_updated_results.new_layout=l,data_for_manage_updated_results.permalink=i.data.parametric_permalink,t.manage_update_results(data_for_manage_updated_results)),b.hide())}))}else{if(r.update_results){if(""!==g)"function"==typeof(x=window[g])&&x(v);e(document).trigger("js_event_wpv_parametric_search_started",[data_for_events])}j&&e(b).fadeIn("fast"),i[v]=!0,a.view_frontend_utils.get_updated_query_results(v,1,u,"full").done((function(i){c===u.prop("wpv-search-last-triggered")&&i.success&&(_=e("<div></div>").append(i.data.full),p=_.find(".js-wpv-filter-form-"+v),l=_.find(".js-wpv-view-layout-"+v),a.view_frontend_utils.close_and_destroy_datepickers(),u.html(p.html()),data_for_events.view_changed_form=u,data_for_events.view_changed_form_additional_forms_only=n,data_for_events.view_changed_form_additional_forms_full=o,e(document).trigger("js_event_wpv_parametric_search_form_updated",[data_for_events]),r.update_results&&(data_for_manage_updated_results.layout=w,data_for_manage_updated_results.new_layout=l,data_for_manage_updated_results.permalink=i.data.parametric_permalink,t.manage_update_results(data_for_manage_updated_results)),b.hide())}))}else if(h.length>0){if(n=h.not(".js-wpv-form-full"),o=h.not(".js-wpv-form-only"),"form"==m)if(a.view_frontend_utils.close_and_destroy_datepickers(),a.view_frontend_utils.clone_form(u,n),o.length>0||r.update_results){if(r.update_results){if(""!==g)"function"==typeof(x=window[g])&&x(v);e(document).trigger("js_event_wpv_parametric_search_started",[data_for_events])}j&&e(b).fadeIn("fast"),i[v]=!0,a.view_frontend_utils.get_updated_query_results(v,1,u,"full").done((function(i){c===u.prop("wpv-search-last-triggered")&&i.success&&(_=e("<div></div>").append(i.data.full),p=_.find(".js-wpv-filter-form-"+v),l=_.find(".js-wpv-view-layout-"+v),a.view_frontend_utils.close_and_destroy_datepickers(),o.each((function(){e(this).html(p.html())})),data_for_events.view_changed_form=u,data_for_events.view_changed_form_additional_forms_only=n,data_for_events.view_changed_form_additional_forms_full=o,e(document).trigger("js_event_wpv_parametric_search_form_updated",[data_for_events]),r.update_results&&(data_for_manage_updated_results.layout=w,data_for_manage_updated_results.new_layout=l,data_for_manage_updated_results.permalink=i.data.parametric_permalink,t.manage_update_results(data_for_manage_updated_results)),b.hide())}))}else data_for_events.view_changed_form=u,data_for_events.view_changed_form_additional_forms_only=n,data_for_events.view_changed_form_additional_forms_full=o,e(document).trigger("js_event_wpv_parametric_search_form_updated",[data_for_events]);else if(a.view_frontend_utils.close_and_destroy_datepickers(),a.view_frontend_utils.clone_form(u,o),a.view_frontend_utils.render_frontend_datepicker(),a.view_frontend_utils.renderPriceFilter(),n.length>0||r.update_results){if(y=n.length>0?"both":"full",r.update_results){if(""!==g)"function"==typeof(x=window[g])&&x(v);e(document).trigger("js_event_wpv_parametric_search_started",[data_for_events])}j&&e(b).fadeIn("fast"),i[v]=!0,a.view_frontend_utils.get_updated_query_results(v,1,u,y).done((function(i){c===u.prop("wpv-search-last-triggered")&&i.success&&(s=e("<div></div>").append(i.data.form),_=e("<div></div>").append(i.data.full),d=s.find(".js-wpv-filter-form-"+v),l=_.find(".js-wpv-view-layout-"+v),a.view_frontend_utils.close_and_destroy_datepickers(),n.each((function(){e(this).html(d.html())})),data_for_events.view_changed_form=u,data_for_events.view_changed_form_additional_forms_only=n,data_for_events.view_changed_form_additional_forms_full=o,e(document).trigger("js_event_wpv_parametric_search_form_updated",[data_for_events]),r.update_results&&(data_for_manage_updated_results.layout=w,data_for_manage_updated_results.new_layout=l,data_for_manage_updated_results.permalink=i.data.parametric_permalink,t.manage_update_results(data_for_manage_updated_results)),b.hide())}))}}else if(r.update_results){var x;if(""!==g)"function"==typeof(x=window[g])&&x(v);e(document).trigger("js_event_wpv_parametric_search_started",[data_for_events]),j&&e(b).fadeIn("fast"),i[v]=!0,a.view_frontend_utils.get_updated_query_results(v,1,u,"full").done((function(r){c===u.prop("wpv-search-last-triggered")&&r.success&&(e(document).trigger("js_event_wpv_parametric_search_form_updated_without_data",[]),_=e("<div></div>").append(r.data.full),l=_.find(".js-wpv-view-layout-"+v),data_for_manage_updated_results.layout=w,data_for_manage_updated_results.new_layout=l,data_for_manage_updated_results.permalink=r.data.parametric_permalink,t.manage_update_results(data_for_manage_updated_results),b.hide())}))}},t.extend_wpv_parametric_search_triggered_data=function(t){var r=e.extend({},{force_form_update:!1,force_results_update:!1},t),i=e("#wpv-view-layout-"+r.view_unique_id),n=Date.now();return 0==r.force_form_update&&(1==r.force_results_update||r.form.hasClass("js-wpv-ajax-results-enabled"))&&_.has(a.view_pagination.paged_views,r.view_unique_id)&&_.has(a.view_pagination.paged_views[r.view_unique_id],"has_controls_in_form")&&"enabled"==a.view_pagination.paged_views[r.view_unique_id].has_controls_in_form&&(r.force_form_update=!0),r.update_form=r.force_form_update||r.form.hasClass("js-wpv-dps-enabled"),r.update_results=i.length>0&&(r.force_results_update||r.form.hasClass("js-wpv-ajax-results-enabled")),r.timestamp=n,r.form.prop("wpv-search-last-triggered",n),r},e(document).on("click",".js-wpv-date-display",(function(){var t=e(this).data("param");e(this).closest("form").find(".js-wpv-date-front-end-"+t).datepicker("show")})),e(document).on("click",".js-wpv-date-front-end-clear",(function(t){t.preventDefault();var r=e(this),a=r.data("param"),i=r.closest("form");i.find(".js-wpv-date-param-"+a).html(""),i.find(".js-wpv-date-front-end-"+a).val(""),r.hide(),i.find(".js-wpv-date-param-"+a+"-value").val("").trigger("change")})),e(document).on("change",".js-wpv-post-relationship-update",(function(){var r,a=e(this),i=a.closest("form"),n=i.data("viewnumber"),o=e(".js-wpv-filter-form-"+n).not(i),s=a.data("currentposttype"),d=i.find(".js-wpv-"+s+"-watch").add(o.find(".js-wpv-"+s+"-watch")),_=d.length;if(_)for(r=0;r<_;r++)e(d[r]).attr("disabled",!0).removeAttr("checked").removeAttr("selected").not(":button, :submit, :reset, :hidden, :radio, :checkbox").val("0");var p={view_unique_id:n,form:i,force_form_update:!0};p=t.extend_wpv_parametric_search_triggered_data(p),e(document).trigger("js_event_wpv_parametric_search_triggered",[p])})),e(document).on("change",".js-wpv-filter-trigger",(function(){var r=e(this).closest("form"),a={view_unique_id:r.data("viewnumber"),form:r};a=t.extend_wpv_parametric_search_triggered_data(a),e(document).trigger("js_event_wpv_parametric_search_triggered",[a])})),e(document).on("click",".js-wpv-ajax-results-enabled .js-wpv-submit-trigger, .js-wpv-ajax-results-submit-enabled .js-wpv-submit-trigger",(function(r){r.preventDefault();var a=e(this).closest("form"),i={view_unique_id:a.data("viewnumber"),form:a,force_form_update:!1,force_results_update:!0};i=t.extend_wpv_parametric_search_triggered_data(i),e(document).trigger("js_event_wpv_parametric_search_triggered",[i])})),e(document).on("keypress",".js-wpv-ajax-results-enabled .js-wpv-filter-trigger-delayed, .js-wpv-ajax-results-submit-enabled .js-wpv-filter-trigger-delayed",(function(r){if(13==r.which){r.preventDefault();var a=e(this).closest("form"),i={view_unique_id:a.data("viewnumber"),form:a,force_results_update:!0};i=t.extend_wpv_parametric_search_triggered_data(i),e(document).trigger("js_event_wpv_parametric_search_triggered",[i])}})),e(document).on("click",".js-wpv-reset-trigger",(function(r){r.preventDefault();var i,n,o,s=e(this).closest("form"),d=s.data("viewnumber"),_=e(".js-wpv-filter-form-"+d).not(s),p=s.attr("action"),l=!1,u=!1;if(s.hasClass("js-wpv-form-only")){if(n=(i=s.find("input, select").add(_.find("input, select"))).length,l=s.hasClass("js-wpv-dps-enabled")||s.find(".js-wpv-post-relationship-update").length>0,(s.hasClass("js-wpv-ajax-results-enabled")||s.hasClass("js-wpv-ajax-results-submit-enabled"))&&(u=!0),n)for(o=0;o<n;o++)e(i[o]).hasClass("js-wpv-keep-on-clear")||e(i[o]).attr("disabled",l).removeAttr("checked").removeAttr("selected").not(":button, :submit, :reset, :hidden, :radio, :checkbox").val("");var v={view_unique_id:d,form:s,force_form_update:l,force_results_update:u};v=t.extend_wpv_parametric_search_triggered_data(v),!u&&e("#wpv-view-layout-"+s.data("viewnumber")).length>0?window.location.href=p:e(document).trigger("js_event_wpv_parametric_search_triggered",[v])}else if(s.hasClass("js-wpv-ajax-results-enabled")||s.hasClass("js-wpv-ajax-results-submit-enabled")){if(n=(i=s.find("input, select").add(_.find("input, select"))).length)for(o=0;o<n;o++)e(i[o]).hasClass("js-wpv-keep-on-clear")||e(i[o]).attr("disabled",!0).removeAttr("checked").removeAttr("selected").not(":button, :submit, :reset, :hidden, :radio, :checkbox").val("");v={view_unique_id:d,form:s,force_form_update:!0,force_results_update:!0};v=t.extend_wpv_parametric_search_triggered_data(v),e(document).trigger("js_event_wpv_parametric_search_triggered",[v])}else window.location.href=a.view_frontend_utils.updateUrlQuery("wpv_view_count",null,p)})),e(document).on("js_event_wpv_parametric_search_triggered",(function(e,r){t.manage_changed_form(r)})),e(document).on("change",".js-wpv-filter-trigger, .js-wpv-filter-trigger-delayed",(function(){var t=e(this).closest("form").data("viewnumber");i[t]=!0})),e(document).on("js_event_wpv_parametric_search_started",(function(e,t){})),e(document).on("js_event_wpv_parametric_search_form_updated",(function(e,t){a.view_frontend_utils.render_frontend_datepicker(),a.view_frontend_utils.renderPriceFilter()})),e(document).on("js_event_wpv_parametric_search_results_updated",(function(e,t){a.view_frontend_utils.render_frontend_media_shortcodes(t.layout)})),t.init=function(){},t.init()},jQuery((function(e){a.view_frontend_utils=new a.ViewFrontendUtils(e),a.view_sorting=new a.ViewSorting(e),a.view_pagination=new a.ViewPagination(e),a.view_parametric_search=new a.ViewParametricSearch(e)}))}});

#2489295

Hi,

Can you please share some background details and the exact steps for how and where this error can be seen?

If you need to be logged in to see this, please also include temporary admin login details.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

The topic ‘[Closed] Uncaught TypeError: t is undefined’ is closed to new replies.