-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjquery-ptlinked_plugin.min.js
More file actions
3 lines (3 loc) · 64.5 KB
/
jquery-ptlinked_plugin.min.js
File metadata and controls
3 lines (3 loc) · 64.5 KB
1
2
3
(function(e){function i(i,t){function r(){var i=t.api_root_url+"/predesigned/bodyregions/html",s=ae();s&&(i=t.api_root_url+"/predesigned/bodyregions/html2"),e.ajax({type:"GET",url:i,crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Load Categories AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","CAT"+e.status+" - "+e.statusText)},success:function(i,s,r){var o=ae();if(o){var n=e("#predesigned_filters--bodyregion-mobile");e.each(i,function(e,i){n.append(i)});var d=t.assets_cdn+"bodyregion_highlights/bodyregion--empty.png",c="All Programs";e(".ptlinked--m_bodyregion_highlight").find("img").attr("src",d),e(".ptlinked--m_bodyregion_highlight").find(".highlight-label").html(c),e(".ptlinked--m_bodyregion_highlight").show(),n.select2(),n.unbind("select2:select").on("select2:select",function(i){var s=e("#predesigned_filters--bodyregion-mobile").val(),r=e("#predesigned_filters--bodyregion-mobile").find(":selected").data("customcat");r>0&&(s=s.replace("c-",""));var a=e("#predesigned_filters--bodyregion-mobile").find(":selected").data("title"),o=e("#predesigned_filters--bodyregion-mobile").find(":selected").data("type"),d=xe.c,c=xe.c1,p=xe.f1,f=xe.f4;if(d!=s||c!=r){var g=De[s].types;e("#predesigned_filters--types-mobile").html(""),e("#predesigned_filters--types-mobile").html('<option selected="" value="0">Type</option>');for(var v=0;v<g.length;v++){var h='<option data-oid="'+g[v].type_id+'" data-filter_label="'+g[v].title+'" data-filter_type="type" value="'+g[v].type_id+'">'+g[v].title+"</option>";e("#predesigned_filters--types-mobile").append(h)}if(e("#predesigned_filters--types-mobile").select2(),0==s&&C(d,"","bodyregion","remove"),l("c",s),l("c1",r),r>0){C(xe.f4,"","condition","remove"),C(xe.f1,"","type","remove"),p>0&&l("f1",0),f>0&&l("f4",0),e("#predesigned_filters--conditions-mobile").val(0).trigger("change"),e("#predesigned_filters--types-mobile").val(0).trigger("change");var u=t.assets_cdn+"bodyregion_highlights/bodyregion--empty.png",m=a;e(".ptlinked--m_bodyregion_highlight").find("img").attr("src",u),e(".ptlinked--m_bodyregion_highlight").find(".highlight-label").html(m),e(".ptlinked--m_bodyregion_highlight").show()}else{C(xe.f4,"","condition","remove"),f>0&&l("f4",0);var _=!1;De[s].types.forEach(function(e,i,s){e.type_id==p&&(_=!0)}),_?e("#predesigned_filters--types-mobile").val(xe.f1).trigger("change"):(C(xe.f1,"","type","remove"),p>0&&l("f1",0),e("#predesigned_filters--types-mobile").val(0).trigger("change")),e("#predesigned_filters--conditions").val(0).trigger("change"),xe.f4=0;u=t.assets_cdn+"bodyregion_highlights/"+e("#predesigned_filters--bodyregion-mobile").find(":selected").data("highlight"),m=e("#predesigned_filters--bodyregion-mobile").find(":selected").data("title");e(".ptlinked--m_bodyregion_highlight").find("img").attr("src",u),e(".ptlinked--m_bodyregion_highlight").find(".highlight-label").html(m),e(".ptlinked--m_bodyregion_highlight").show()}C(s,a,o,"add"),Ae=0,S(),e(".mobile-filter-panel").hasClass("opened")&&e(".mobile-filter-panel").removeClass("opened");var b=n.parent().parent().find(".mobile-filter--clear");if(0==s){b.hasClass("active")&&b.removeClass("active");u=t.assets_cdn+"bodyregion_highlights/bodyregion--empty.png",m="All Programs";e(".ptlinked--m_bodyregion_highlight").find("img").attr("src",u),e(".ptlinked--m_bodyregion_highlight").find(".highlight-label").html(m),e(".ptlinked--m_bodyregion_highlight").show()}else b.hasClass("active")||b.addClass("active")}})}else a(i)}})}function a(i){var s=e("ul.category-bubbles-list");e.each(i,function(e,i){s.append(i)});var t=s.find("li[data-oid="+Ce+"]");t.hasClass("active-filter")||t.addClass("active-filter"),n(),e("ul.category-bubbles-list li").unbind("hover").hover(function(i){i.stopPropagation();var s=e(this);ye=setTimeout(function(){fe(s)},ke)},function(){clearTimeout(ye)}),e("ul.category-bubbles-list li").unbind("click").on("click",function(){var i=e(this).data("oid"),s=e(this).data("customcat"),t=e(this).data("title"),r=e(this).data("type"),a=xe.c,o=xe.c1,n=xe.f1,d=xe.f4;if(a!=i||o!=s){if(l("c",i),l("c1",s),s>0)C(xe.f4,"","condition","remove"),C(xe.f1,"","type","remove"),n>0&&l("f1",0),d>0&&l("f4",0),e("#predesigned_filters--conditions").val(0).trigger("change"),xe.f4=0,e("#predesigned_filters--types li").removeClass("selected");else{C(xe.f4,"","condition","remove"),d>0&&l("f4",0);var c=!1;De[i].types.forEach(function(e,i,s){e.type_id==n&&(c=!0)}),c||(C(xe.f1,"","type","remove"),n>0&&l("f1",0),e("#predesigned_filters--types li").removeClass("selected"),e("ul.filter--item_list li[data-oid='0']").addClass("selected")),e("#predesigned_filters--conditions").val(0).trigger("change"),xe.f4=0}C(i,t,r,"add"),Ae=0,S(),e("ul.category-bubbles-list li").removeClass("active-filter"),e(this).addClass("active-filter")}})}function l(e,i){xe[e]=i}function o(){e("ul.category-bubbles-list").html("")}function n(){var i=e(".scroll-container"),s=400,t=e(i).find("ul.category-bubbles-list"),r=e(".scroll-container").find(".left-arrow"),a=e(".scroll-container").find(".right-arrow"),l=(t.scrollLeft(),t.get(0).scrollWidth,0);e(a).click(function(){event.preventDefault(),e(".ptlinked--filter_dropdown").removeClass("show").delay(500).removeClass("display"),t.animate({scrollLeft:"+="+s+"px"},"slow",function(){var i=t.scrollLeft();t.get(0).scrollWidth;i>0&&(e(r).hasClass("show-arrow")||e(r).addClass("show-arrow"),i%s>0&&(e(a).hasClass("show-arrow")&&e(a).removeClass("show-arrow"),l=i%s))})}),e(r).click(function(){event.preventDefault(),e(".ptlinked--filter_dropdown").removeClass("show").delay(500).removeClass("display"),t.animate({scrollLeft:"-="+(s+l)+"px"},"slow",function(){l=0;var i=t.scrollLeft(),o=t.get(0).scrollWidth;i<=0?(e(r).hasClass("show-arrow")&&e(r).removeClass("show-arrow"),e(a).hasClass("show-arrow")||e(a).addClass("show-arrow")):i<o-s&&(e(a).hasClass("show-arrow")||e(a).addClass("show-arrow"))})})}function d(){e(".card--grid_filter").unbind("click").on("click",function(){var i=e("#grid-filter");i.hasClass("open")?i.removeClass("open"):i.addClass("open")})}function c(){var i=!1,s=!1;"none"!=e(".mobile-filter-panel").css("display")&&(s=!0),void 0!==xe.f1&&xe.f1>0&&(i=!0),void 0!==xe.f4&&xe.f4>0&&(i=!0),void 0!==xe.c1&&xe.c1>1&&(i=!0),s&&void 0!==xe.c&&xe.c>0&&(i=!0);var t=e(".card--grid_filter_clear"),r=e(".mobile--grid_filter_clear");i?(t.hasClass("active")||t.addClass("active"),t.unbind("click").on("click",f),r.hasClass("active")||r.addClass("active"),r.unbind("click").on("click",f),e("#ptl-mobile_filter_button").hasClass("active")||e("#ptl-mobile_filter_button").addClass("active")):(t.hasClass("active")&&t.removeClass("active"),t.unbind("click"),r.hasClass("active")&&r.removeClass("active"),r.unbind("click"),e("#ptl-mobile_filter_button").hasClass("active")&&e("#ptl-mobile_filter_button").removeClass("active"))}function p(){e("#predesigned_filters--types").html("")}function f(i){"none"!=e(".navbar-mobile--search_panel").css("display")&&(xe.c=0,xe.c1=0),xe.c1>0?xe.c1=1:xe.c1=0,xe.f1=0,xe.f4=0,Ae=0,we={bodyregion:{},type:{},condition:{}};var s=e(".predesigned--filter_crumbtrail"),t=e(".mobile-predesigned--filter_crumbtrail");s.html(""),t.html(""),b(),S()}function g(i){var s=e(this).parent().find("select").attr("id"),t=e(this).parent().find(".mobile-filter--value").data("f");"predesigned_filters--subcategories-mobile"==s||"predesigned_filters--subcategories"==s?e("#"+s).val(1).trigger("change"):e("#"+s).val(0).trigger("change"),e(this).hasClass("active")&&e(this).removeClass("active"),xe[t]=0,"c"==t?xe.c1=0:"c1"==t&&(xe.c1=1),"predesigned_filters--conditions-mobile"==s?(e("#predesigned_filters--types-mobile").val(0).trigger("change"),e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),xe.f1=0):"predesigned_filters--types-mobile"==s&&(e("#predesigned_filters--conditions-mobile").val(0).trigger("change"),e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),xe.f4=0),Ae=0,e(".mobile-filter-panel").hasClass("opened")&&e(".mobile-filter-panel").removeClass("opened"),S()}function v(){var i=t.api_root_url+"/predesigned/filters/html",s=ae();s&&(i=t.api_root_url+"/predesigned/filters/html2"),e.ajax({type:"GET",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:i,dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Load Filters AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","FIL"+e.status+" - "+e.statusText)},success:function(e,i,s){u(e)}})}function h(){var i=t.api_root_url+"/predesigned/bodyregions/lookup";e.ajax({type:"GET",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:i,dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Load Filters AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","FIL"+e.status+" - "+e.statusText)},success:function(e,i,s){De=e}})}function u(i){var s=e("ul.filter--item_list"),t=e("#predesigned_filters--types-mobile"),r=e("#grid-filter"),a=e(".mobile-filter-panel");s.html('<li data-oid="0" data-filter_label="View All" data-filter_type="type" class="selected"><span><i class="fa fa-angle-right mr-3 selection-hover"></i>View All</span></li>'),t.html("<option selected value='0'>Type</option>"),e.each(i.types,function(e,i){s.append(i),t.append(i)});var l=e("ul.filter--item_list li");t.select2(),l.unbind("click").on("click",function(){var i=e(this).data("oid"),s=e(this).data("filter_label"),t=e(this).data("filter_type"),a=e("#selected_bodyregion_id").val(),o=De[a].title;C(xe.c,"","bodyregion","remove"),e("ul.category-bubbles-list li").removeClass("active-filter"),C(a,o,"bodyregion","add"),e("ul.category-bubbles-list li[data-oid='"+a+"'][data-customcat='0']").addClass("active-filter"),xe.c=a,xe.c1>0&&(xe.c1=0),void 0!==xe.f1?xe.f1!=i?(1==xe.f1&&(C(xe.f4,"","condition","remove"),e("#predesigned_filters--conditions").val(0).trigger("change"),xe.f4=0),0==i?C(xe.f1,"","type","remove"):C(i,s,t,"add"),xe.f1=i,l.removeClass("selected"),e(this).addClass("selected"),r.hasClass("open")&&r.removeClass("open"),Ae=0,S()):(1==xe.f1&&(C(xe.f4,"","condition","remove"),e("#predesigned_filters--conditions").val(0).trigger("change"),xe.f4=0),0==i?C(xe.f1,"","type","remove"):C(i,s,t,"remove"),xe.f1=0,l.removeClass("selected"),e("ul.filter--item_list li[data-oid='0']").addClass("selected"),r.hasClass("open")&&r.removeClass("open"),Ae=0,S()):(0==i?C(xe.f1,"","type","remove"):C(i,s,t,"add"),xe.f1=i,l.removeClass("selected"),e(this).addClass("selected"),r.hasClass("open")&&r.removeClass("open"),Ae=0,S())}),t.unbind("select2:select").on("select2:select",function(i){var s=e("#predesigned_filters--types-mobile").val(),r=e("#predesigned_filters--types-mobile").find(":selected").data("filter_label"),l=e("#predesigned_filters--types-mobile").find(":selected").data("filter_type"),o=e("#predesigned_filters--bodyregion-mobile").val();De[o].title;if(void 0!==xe.f1)if(xe.f1!=s){1==xe.f1&&(C(xe.f4,"","condition","remove"),e("#predesigned_filters--conditions-mobile").val(0).trigger("change"),xe.f4=0),0==s?C(xe.f1,"","type","remove"):C(s,r,l,"add"),xe.f1=s,Ae=0,S(),a.hasClass("opened")&&a.removeClass("opened");var n=t.parent().parent().find(".mobile-filter--clear");0==s?n.hasClass("active")&&n.removeClass("active"):n.hasClass("active")||n.addClass("active")}else{1==xe.f1&&(C(xe.f4,"","condition","remove"),e("#predesigned_filters--conditions-mobile").val(0).trigger("change"),xe.f4=0),0==s?C(xe.f1,"","type","remove"):C(s,r,l,"remove"),xe.f1=0,Ae=0,S(),a.hasClass("opened")&&a.removeClass("opened");n=t.parent().parent().find(".mobile-filter--clear");0==s?n.hasClass("active")&&n.removeClass("active"):n.hasClass("active")||n.addClass("active")}else{0==s?C(xe.f1,"","type","remove"):C(s,r,l,"add"),xe.f1=s,Ae=0,S(),a.hasClass("opened")&&a.removeClass("opened");n=t.parent().parent().find(".mobile-filter--clear");0==s?n.hasClass("active")&&n.removeClass("active"):n.hasClass("active")||n.addClass("active")}}),e(".mobile-filter--clear").unbind("click").on("click",g),b()}function m(i){var s=e("#filter--condition_type"),t=e("#predesigned_filters--conditions-mobile"),r=e("#grid-filter"),a=e(".mobile-filter-panel");void 0===i?(e("#condition-filter").hide(),i=!1):i?e("#condition-filter").show():e("#condition-filter").hide(),s.html("<option selected value='0'>Filter by condition</option>"),t.html("<option selected value='0'>Condition</option>"),e.each(i,function(e,i){s.append(i),t.append(i)}),i.length<1||0==i?e("#predesigned_filters--conditions-mobile").prop("disabled",!0):e("#predesigned_filters--conditions-mobile").prop("disabled",!1),s.select2(),t.select2(),s.unbind("select2:select").on("select2:select",function(i){var s=e("#filter--condition_type").val(),t=e("#filter--condition_type").select2().find(":selected").data("title"),a=e("#filter--condition_type").select2().find(":selected").data("type"),l=e("#selected_bodyregion_id").val(),o=e(".ptlinked--dropdown_bodyregion_highlight").find(".highlight-label").html();C(xe.c,"","bodyregion","remove"),e("ul.category-bubbles-list li").removeClass("active-filter"),C(l,o,"bodyregion","add"),e("ul.category-bubbles-list li[data-oid='"+l+"'][data-customcat='0']").addClass("active-filter"),xe.c=l,void 0!==xe.f4?xe.f4!=s?(e(".clear-condition-filters").hasClass("hide")&&e(".clear-condition-filters").removeClass("hide"),xe.f4=s,C(s,t,a,"add"),e("ul.filter--item_list li").removeClass("selected"),e("ul.filter--item_list").find("li[data-oid=1]").addClass("selected"),C(xe.f1,"","type","remove"),xe.f1=1,r.hasClass("open")&&r.removeClass("open"),Ae=0,S()):(e("ul.filter--item_list li").removeClass("selected"),xe.f4>0&&(e("ul.filter--item_list").find("li[data-oid=1]").addClass("selected"),xe.f1=1),r.hasClass("open")&&r.removeClass("open"),Ae=0,S()):(xe.f4=s,e(".clear-condition-filters").hasClass("hide")&&e(".clear-condition-filters").removeClass("hide"),C(s,t,a,"add"),e("ul.filter--item_list li").removeClass("selected"),e("ul.filter--item_list").find("li[data-oid=1]").addClass("selected"),xe.f1=1,r.hasClass("open")&&r.removeClass("open"),Ae=0,S())}),t.unbind("select2:select").on("select2:select",function(i){var s=e("#predesigned_filters--conditions-mobile").val(),r=e("#predesigned_filters--conditions-mobile").select2().find(":selected").data("title"),l=e("#predesigned_filters--conditions-mobile").select2().find(":selected").data("type"),o=e("#predesigned_filters--bodyregion-mobile").val();De[o].title;if(void 0!==xe.f4)if(xe.f4!=s){0==s?C(xe.f4,"","condition","remove"):C(s,r,l,"add"),xe.f4=s,C(xe.f1,"","type","remove"),xe.f1=1,e("#predesigned_filters--types-mobile").val(0).trigger("change"),Ae=0,S(),a.hasClass("opened")&&a.removeClass("opened");var n=t.parent().parent().find(".mobile-filter--clear");0==s?n.hasClass("active")&&n.removeClass("active"):n.hasClass("active")||n.addClass("active");n=e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear");n.hasClass("active")&&n.removeClass("active")}else{0==s?C(xe.f4,"","condition","remove"):C(s,r,l,"add"),xe.f4=0,xe.f1=1,e("#predesigned_filters--types-mobile").val(0).trigger("change"),Ae=0,S(),a.hasClass("opened")&&a.removeClass("opened");n=t.parent().parent().find(".mobile-filter--clear");0==s?n.hasClass("active")&&n.removeClass("active"):n.hasClass("active")||n.addClass("active");n=e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear");n.hasClass("active")&&n.removeClass("active")}else{0==s?C(xe.f4,"","condition","remove"):C(s,r,l,"add"),xe.f4=s,C(s,r,l,"add"),xe.f1=1,Ae=0,S(),a.hasClass("opened")&&a.removeClass("opened");n=t.parent().parent().find(".mobile-filter--clear");0==s?n.hasClass("active")&&n.removeClass("active"):n.hasClass("active")||n.addClass("active");n=e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear");n.hasClass("active")&&n.removeClass("active")}}),e(".clear-condition-filters").unbind("click").on("click",function(){C(xe.f4,"","condition","remove"),e("#predesigned_filters--conditions").val(0).trigger("change"),xe.f4=0,xe.f1=0,e("ul.filter--item_list li").removeClass("selected"),e("ul.filter--item_list").find("li[data-oid=0]").addClass("selected"),e(".clear-condition-filters").hasClass("hide")||e(".clear-condition-filters").addClass("hide"),r.hasClass("open")&&r.removeClass("open"),Ae=0,S()}),void 0!==xe.f4&&xe.f4>0&&e("#filter--condition_type").val(xe.f4).trigger("change"),e("#predesigned_filters--conditions-mobile").val(xe.f4).trigger("change"),xe.f4>0?e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")||e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").addClass("active"):e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}function _(i){var s=e("#predesigned_filters--subcategories"),t=e("#predesigned_filters--subcategories-mobile"),r=e("#grid-filter"),a=e(".mobile-filter-panel");s.html("<option selected value='1'>Filter by sub-category</option>"),t.html("<option selected value='1'>Filter by sub-category</option>"),e.each(i,function(e,i){s.append(i),t.append(i)}),s.select2(),t.select2(),s.on("select2:select",function(i){var s=e("#predesigned_filters--subcategories").val();xe.c1=s,r.hasClass("open")&&r.removeClass("open"),Ae=0,S()}),t.on("select2:select",function(i){var s=e("#predesigned_filters--subcategories-mobile").val();xe.c1=s,Ae=0,S(),a.hasClass("opened")&&a.removeClass("opened");var r=t.parent().parent().find(".mobile-filter--clear");1==s?r.hasClass("active")&&r.removeClass("active"):r.hasClass("active")||r.addClass("active")}),void 0!==xe.c1&&xe.c1>1&&e("#predesigned_filters--subcategories").val(xe.c1).trigger("change"),e("#predesigned_filters--subcategories-mobile").val(xe.c1).trigger("change"),xe.c1>1?e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")||e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").addClass("active"):e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}function b(){if(Object.keys(xe).length>0){if(e(".category-bubbles-list li").removeClass("active-filter"),void 0!==xe.c&&xe.c>0?e(".category-bubbles-list").find("li[data-oid='"+xe.c+"'][data-customcat='"+xe.c1+"']").addClass("active-filter"):void 0!==xe.c&&-1==xe.c?e(".category-bubbles-list").find("li[data-oid='-1']").addClass("active-filter"):e(".category-bubbles-list").find("li[data-oid='0']").addClass("active-filter"),xe.c1>0?e("#predesigned_filters--bodyregion-mobile").val("c-"+xe.c).trigger("change"):e("#predesigned_filters--bodyregion-mobile").val(xe.c).trigger("change"),xe.c>0)e("#predesigned_filters--bodyregion-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")||e("#predesigned_filters--bodyregion-mobile").parent().parent().find(".mobile-filter--clear").addClass("active");else if(-1==xe.c)e("#predesigned_filters--bodyregion-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")||e("#predesigned_filters--bodyregion-mobile").parent().parent().find(".mobile-filter--clear").addClass("active");else{e("#predesigned_filters--bodyregion-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--bodyregion-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active");var i=t.assets_cdn+"bodyregion_highlights/bodyregion--empty.png",s="All Programs";e(".ptlinked--m_bodyregion_highlight").find("img").attr("src",i),e(".ptlinked--m_bodyregion_highlight").find(".highlight-label").html(s),e(".ptlinked--m_bodyregion_highlight").show()}if(e("#predesigned_filters--types li").removeClass("selected"),void 0!==xe.f1&&xe.f1>0&&e("#predesigned_filters--types").find("li[data-oid='"+xe.f1+"']").addClass("selected"),e("#predesigned_filters--types-mobile").val(xe.f1).trigger("change"),xe.f1>0)e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")||e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").addClass("active");else{var r=De[0].types;e("#predesigned_filters--types-mobile").html(""),e("#predesigned_filters--types-mobile").html('<option selected="" value="0">Type</option>');for(var a=0;a<r.length;a++){var l='<option data-oid="'+r[a].type_id+'" data-filter_label="'+r[a].title+'" data-filter_type="type" value="'+r[a].type_id+'">'+r[a].title+"</option>";e("#predesigned_filters--types-mobile").append(l)}e("#predesigned_filters--types-mobile").select2(),e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}e("#predesigned_filters--conditions").val(0).trigger("change"),void 0!==xe.f4&&xe.f4>0&&e("#predesigned_filters--conditions").val(xe.f4).trigger("change"),e("#predesigned_filters--conditions-mobile").val(xe.f4).trigger("change"),xe.f4>0?e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")||e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").addClass("active"):e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),e("#predesigned_filters--subcategories").val(1).trigger("change"),void 0!==xe.c1&&xe.c1>0&&e("#predesigned_filters--subcategories").val(xe.c1).trigger("change"),e("#predesigned_filters--subcategories-mobile").val(xe.c1).trigger("change"),xe.c1>1?e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")||e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").addClass("active"):e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}else{e(".category-bubbles-list li").removeClass("active-filter"),e(".category-bubbles-list").find("li[data-oid='0']").addClass("active-filter"),e("#predesigned_filters--bodyregion-mobile").val("").trigger("change"),e("#predesigned_filters--bodyregion-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--bodyregion-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),e("#predesigned_filters--types li").removeClass("active-filter"),e("#predesigned_filters--types-mobile").val(0).trigger("change");r=De[0].types;e("#predesigned_filters--types-mobile").html(""),e("#predesigned_filters--types-mobile").html('<option selected="" value="0">Type</option>');for(a=0;a<r.length;a++){l='<option data-oid="'+r[a].type_id+'" data-filter_label="'+r[a].title+'" data-filter_type="type" value="'+r[a].type_id+'">'+r[a].title+"</option>";e("#predesigned_filters--types-mobile").append(l)}e("#predesigned_filters--types-mobile").select2(),e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),e("#predesigned_filters--conditions").val(0).trigger("change"),e("#predesigned_filters--conditions-mobile").val(0).trigger("change"),e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),e("#predesigned_filters--subcategories").val(0).trigger("change"),e("#predesigned_filters--subcategories-mobile").val(0).trigger("change"),e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&e("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}}function y(){var i=e(".grid-filter--drop_down"),s=(e("ul.mobile-filter-panel_list"),xe.c1);s>0?(i.hasClass("custom-category-displayed")||i.addClass("custom-category-displayed"),i.find(".filter--drop_down_subcategories-wrapper").hasClass("active")||i.find(".filter--drop_down_subcategories-wrapper").addClass("active"),i.find(".filter--drop_down_conditions-wrapper").hasClass("active")&&i.find(".filter--drop_down_conditions-wrapper").removeClass("active"),e("#predesigned_filters--types-mobile").prop("disabled",!0),e("#predesigned_filters--conditions-mobile").prop("disabled",!0)):(i.hasClass("custom-category-displayed")&&i.removeClass("custom-category-displayed"),i.find(".filter--drop_down_subcategories-wrapper").hasClass("active")&&i.find(".filter--drop_down_subcategories-wrapper").removeClass("active"),i.find(".filter--drop_down_conditions-wrapper").hasClass("active")||i.find(".filter--drop_down_conditions-wrapper").addClass("active"),e("#predesigned_filters--types-mobile").prop("disabled",!1),e("#predesigned_filters--conditions-mobile").prop("disabled",!1))}function C(e,i,s,t){if("add"==t){var r={};r.oid=e,r.title=i,r.type=s,we[s]=r}else if("remove"==t){r={};r.oid=e,r.title=i,r.type=s,w(e,s)}k()}function w(e,i){we[i].oid==e&&(we[i]={}),k()}function k(){var i=e(".predesigned--filter_crumbtrail"),s=e(".mobile-predesigned--filter_crumbtrail"),t=we;if(i.html(""),s.html(""),void 0!==t.bodyregion.oid&&0!=t.bodyregion.oid){var r='<li class="service-bubble" data-oid="'+t.bodyregion.oid+'" data-type="'+t.bodyregion.type+'"><span class="bubble-button-label">'+t.bodyregion.title+'</span><span class="remove_filter"><i class="fa fa-times"></i></span></li>';i.append(r),s.append(r)}if(void 0!==t.type.oid){r='<li class="service-bubble" data-oid="'+t.type.oid+'" data-type="'+t.type.type+'"><span class="bubble-button-label">'+t.type.title+'</span><span class="remove_filter"><i class="fa fa-times"></i></span></li>';i.append(r),s.append(r)}if(void 0!==t.condition.oid){r='<li class="service-bubble" data-oid="'+t.condition.oid+'" data-type="'+t.condition.type+'"><span class="bubble-button-label">'+t.condition.title+'</span><span class="remove_filter"><i class="fa fa-times"></i></span></li>';i.append(r),s.append(r)}e("ul.predesigned--filter_crumbtrail li.service-bubble span.remove_filter").unbind("click").on("click",x),e("ul.mobile-predesigned--filter_crumbtrail li.service-bubble span.remove_filter").unbind("click").on("click",x)}function x(){var i=e(this).parent().data("oid"),s=e(this).parent().data("type");switch(s){case"bodyregion":xe.c=0,xe.c1=0,1==xe.f1&&(w(xe.f4,"condition"),xe.f4=0,w(1,"type"),xe.f1=0);break;case"type":xe.f1=0,1==xe.f1&&(w(xe.f4,"condition"),xe.f4=0,w(1,"type"),xe.f1=0);break;case"condition":w(xe.f4,"condition"),xe.f4=0,w(1,"type"),xe.f1=0}w(i,s),b(),k(),S()}function T(){var i=e("#header-search"),s=e("#mheader-search"),t=e(".header-search-bar-clear"),r=e(".mheader-search-bar-clear");i.val(""),s.val(""),i.unbind("keypress").on("keypress",function(s){13==s.keyCode&&(xe.v=e.trim(i.val()),""==xe.v?(i.val(""),Ae=0,M(),t.hasClass("active")&&t.removeClass("active")):(Ae=0,M(),t.hasClass("active")||t.addClass("active")))}),s.unbind("keypress").on("keypress",function(i){13==i.keyCode&&(xe.v=e.trim(s.val()),""==xe.v?(s.val(""),Ae=0,M(),r.hasClass("active")&&r.removeClass("active")):(Ae=0,M(),r.hasClass("active")||r.addClass("active"),e(".navbar-mobile--search_panel").hasClass("displayed")&&e(".navbar-mobile--search_panel").removeClass("displayed"),e(".ptl-mobile_search_button").hasClass("active")||e(".ptl-mobile_search_button").addClass("active")))}),e("#search-icon-legacy").unbind("click").on("click",function(s){var r=e("#header-search").val();r.length>2&&(xe.v=i.val(),""==xe.v?(i.val(""),t.hasClass("active")&&t.removeClass("active")):(Ae=0,M(),t.hasClass("active")||t.addClass("active")))}),e(".header-search-bar-clear").unbind("click").on("click",function(i){var s=e("#header-search").val();s.length>0?(e("#header-search").val(""),xe.v="",Ae=0,M(),t.hasClass("active")&&t.removeClass("active")):t.hasClass("active")&&t.removeClass("active")}),e("#ptl-mobile_search_button").unbind("click").on("click",function(i){var s=e("#mheader-search").val();s.length>2?(xe.v=s,""==xe.v?(e("#mheader-search").val(""),r.hasClass("active")&&r.removeClass("active")):(Ae=0,M(),r.hasClass("active")||r.addClass("active"),e(".navbar-mobile--search_panel").hasClass("displayed")&&e(".navbar-mobile--search_panel").removeClass("displayed"),e(".ptl-mobile_search_button").hasClass("active")||e(".ptl-mobile_search_button").addClass("active"))):xe.v.length>0&&s.length>2&&(xe.v="",Ae=0,M(),r.hasClass("active")&&r.removeClass("active"))}),e(".mheader-search-bar-clear").unbind("click").on("click",function(i){var s=e("#mheader-search").val();s.length>0?(e("#mheader-search").val(""),xe.v="",Ae=0,M(),r.hasClass("active")&&r.removeClass("active"),e(".navbar-mobile--search_panel").hasClass("displayed")&&e(".navbar-mobile--search_panel").removeClass("displayed"),e(".ptl-mobile_search_button").hasClass("active")&&e(".ptl-mobile_search_button").removeClass("active")):r.hasClass("active")&&r.removeClass("active")})}function S(){M(),c()}function M(){var i=Re;if(!i){Re=!0;var s=t.api_root_url+"/predesigned/html";Object.keys(xe).length>0&&(s+="?",e.each(xe,function(i,t){s+=i+"="+e.trim(t)+"&"}),s=s.substring(0,s.length-1)),s+="&i="+Ae+"&m="+Pe,e("#header-search").blur(),e("#mheader-search").blur(),e(".ui-menu.search-bar-autocomplete").blur(),e.ajax({type:"GET",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:s,dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Library Query AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","LIB"+e.status+" - "+e.statusText)},success:function(e,i,s){var t=s.status;200==t?(R(e),y(),m(e.conditions),_(e.subcategories),Ee||te("predesigned--results_display")):201==t&&(L(0,0),y(),m(e.conditions),_(e.subcategories),Ee||te("predesigned--no_results_display"),Re=!1)}})}}function R(i){var s=e("#predesigned--results_display");Se?Se=!1:s.html(""),s.find(".cards--grid_placeholder").remove(),e.each(i,function(e,i){"total_records"!=e&&"total_returned"!=e&&"conditions"!=e&&s.append(i)}),
setTimeout(function(){se(),L(i.total_returned,i.total_records),Re=!1},200),0==Ae&&e(".ptlinked--application_container > .scroll-on-hover").scrollTop(0),e(".cards--grid_container_item").not(".cards--grid_placeholder").unbind("click").on("click",P),-1==xe.c&&e(".cards--grid_container_item .btn-remove-favorite").unbind("click").on("click",function(i){i.stopPropagation();var s=e(this).data("exercise_program_id");e("#ptlinked--dialog-message").data("exercise_program_id",s),pe("Are you sure?","This action cannot be undone. Are you sure you want to remove this favorite exercise program?","Yes, Remove",A)})}function A(){var i=t.api_root_url+"/users/remove_favorite",s=e("#ptlinked--dialog-message").data("exercise_program_id");e.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:i,data:{exercise_program_id:s},dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Remove Favorite Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","USR"+e.status+" - "+e.statusText)},success:function(e,i,s){var t=s.status;200==t?M():201==t&&pe("Error","There was an error trying to remove the exercise program. Please refresh and try again.")}})}function P(i){var s=e(this).data("epid"),r=e(this).data("code"),a=e(this).find(".cards--program_title").text();if(s>0){Le=s,j();var l=[];l.title=a,l.url=t.app_root_url+"?e="+r,me("onViewExerciseProgram",l)}}function L(i,s){var t=Ae,r=Pe,a=t+r;a>=s?(e("#load-more-records").hide(),Me=!1):Me=!0}function j(){var i=t.api_root_url+"/exerciseprogram/"+Le+"/html3";e.ajax({type:"GET",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type,"ptlinked-videobg-x":t.video_bg},url:i,dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Load Exercise Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","PROG"+e.status+" - "+e.statusText)},success:function(i,s,t){var r=t.status;if(200==r)D(i);else if(201==r){var a=e("#predesigned--results_display");a.html("No Results")}}})}function E(){var i=t.api_root_url+"/exerciseprogram/resolve_code/"+je;e.ajax({type:"GET",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:i,dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Load Exercise Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","PROG"+e.status+" - "+e.statusText)},success:function(e,i,s){var t=s.status;if(200==t){var r=e;r>0&&(Le=r,j())}}})}function D(i){e("h1.viewer--header__title").html(i.meta.title),je=i.meta.code,e("#workout-preview__thumbslider").html(i.thumbnails),e("#viewer--exercise_container_wrapper").html("");for(var s=0;s<i.exercises.length;s++)e("#viewer--exercise_container_wrapper").append(i.exercises[s]);e(".viewer-item--exercise_video_player").unbind("click").on("click",I),z(),F(),O(),B();var t=e(".ptlinked--exercise_program_viewer");t.hasClass("displayed")||t.addClass("displayed"),e(".mdvip--viewer_overaly").hasClass("display")||e(".mdvip--viewer_overaly").addClass("display"),ce(),t.find("a#viewer--close_btn").unbind("click").on("click",function(){t.hasClass("displayed")&&t.removeClass("displayed"),e(".mdvip--viewer_overaly").hasClass("display")&&e(".mdvip--viewer_overaly").removeClass("display")}),e("#viewer--exercise_container_wrapper").scrollTop(0)}function z(){e(".exercise-thumb").unbind("click touchstart").bind("click touchstart",function(){if(e(this).hasClass("selected"));else{e(".exercise-thumb").each(function(){e(this).hasClass("selected")&&e(this).removeClass("selected")}),e(this).addClass("selected");var i=e(this).data("wrkitem");q("exercise-"+i)}})}function F(){var i=ae();i?e(".viewer-item--exercise_video_player").find("video").each(function(){var i=e(this).data("sd");e(this).data("hd");e(this).attr("src",i)}):e(".viewer-item--exercise_video_player").find("video").each(function(){e(this).data("sd");var i=e(this).data("hd");e(this).attr("src",i)})}function I(i){var s=e(this).find("video").attr("id"),t=document.getElementById(s);e(this).find("video").hasClass("hide")&&e(this).find("video").removeClass("hide"),e(this).find(".video-play-button").hasClass("hide")||e(this).find(".video-play-button").addClass("hide"),t.play()}function q(i){e("div[name='"+i+"']");var s=parseInt(i.replace("exercise-","")),t=e(".viewer--exercise_item[data-oid='"+s+"']").offset().top,r=e("#viewer--exercise_container_wrapper").offset().top,a=e("#viewer--exercise_container_wrapper").scrollTop(),l=t-r+a;e("#viewer--exercise_container_wrapper").animate({scrollTop:l},"slow")}function B(){var i=e("#viewer--filmstrip"),s=400,t=e(i).find("ul.workout-preview__thumbs"),r=(e(i).find(".workout-preview__filmstrip").find(".left-arrow"),e(i).find(".workout-preview__filmstrip").find(".right-arrow"),e(i).find(".workout-preview__filmstrip").get(0).offsetWidth),a=(t.scrollLeft(),t.get(0).scrollWidth+80);e(i).find(".left-arrow").hasClass("show-arrow")&&e(i).find(".left-arrow").removeClass("show-arrow"),t.scrollLeft(0),a>r&&(e(i).find(".right-arrow").hasClass("show-arrow")||e(i).find(".right-arrow").addClass("show-arrow")),e(i).find(".right-arrow").unbind("click").on("click",function(){event.preventDefault(),t.animate({scrollLeft:"+="+s+"px"},"slow",function(){var r=t.scrollLeft();t.get(0).scrollWidth;r>0&&(e(i).find(".left-arrow").hasClass("show-arrow")||e(i).find(".left-arrow").addClass("show-arrow"),r%s>0&&(e(i).find(".right-arrow").hasClass("show-arrow")&&e(i).find(".right-arrow").removeClass("show-arrow"),r%s))})}),e(i).find(".left-arrow").unbind("click").on("click",function(){event.preventDefault(),t.animate({scrollLeft:"-="+s+"px"},"slow",function(){0;var r=t.scrollLeft(),a=t.get(0).scrollWidth;r<=0?(e(i).find(".left-arrow").hasClass("show-arrow")&&e(i).find(".left-arrow").removeClass("show-arrow"),e(i).find(".right-arrow").hasClass("show-arrow")||e(i).find(".right-arrow").addClass("show-arrow")):r<a-s&&(e(i).find(".right-arrow").hasClass("show-arrow")||e(i).find(".right-arrow").addClass("show-arrow"))})})}function O(){e(".btn-save_program").unbind("click").on("click",function(i){var s=t.api_root_url+"/users/save_favorite";e.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:s,data:{exercise_program_id:Le},dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Save Favorite Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","USR"+e.status+" - "+e.statusText)},success:function(i,s,r){var a=r.status;if(200==a){i=[];i.exercise_program_link=t.app_root_url+"?e="+je,i.user_id=t.user_uid,i.exercise_program_title=e(".ptlinked--exercise_program_viewer").find("h1.viewer--header__title").text(),me("onSaveProgram",i),pe("Exercise Program Saved",'This exercise program has been successfully saved to your "My Favorites" folder.')}else 201==a&&pe("Exercise Program Already Saved",'This exercise program has already been saved to your "My Favorites" folder.')}})}),e(".btn-print_program").unbind("click").on("click",function(i){t.api_root_url,t.user_uid;var s={};s.exercise_program_link=t.app_root_url+"?e="+je,s.user_id=t.user_uid,s.exercise_program_title=e(".ptlinked--exercise_program_viewer").find("h1.viewer--header__title").text(),me("onPrintProgram",s),X(),H()}),e(".btn-share_program").unbind("click").on("click",function(i){var s=t.api_root_url+"/users/track_send";e.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:s,data:{exercise_program_id:Le},dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Save Favorite Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","USR"+e.status+" - "+e.statusText)},success:function(i,s,r){r.status,i={};i.exercise_program_link=t.app_root_url+"?e="+je,i.exercise_program_title=e("h1.viewer--header__title").text(),me("onSendProgram",i)}})})}function X(){var i=t.api_root_url+"/exerciseprogram/print_program",s=window.open("about:blank","_PDF_VIEWER"),r=G();e.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:i,data:{exercise_program_id:Le,parameters:r},dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Save Favorite Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","USR"+e.status+" - "+e.statusText)},success:function(e,i,t){t.status;s.location=e}})}function G(){var i={};return e(".viewer--exercise_item").each(function(){var s=e(this).data("oid");i[s]={},e(this).find(".workout-exercise__param-set").find("input.parameter-input").each(function(){var t={},r=e(this).data("param_index");t.id=e(this).attr("id").replace("param-",""),t.value=e(this).val(),i[s][r]=t})}),i}function H(){var i=t.api_root_url+"/users/track_print";e.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:i,data:{exercise_program_id:Le},dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Save Favorite Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","USR"+e.status+" - "+e.statusText)},success:function(e,i,s){s.status}})}function J(){be.append(W()).append(U()).append($());var i=be.find(".cards--grid_renderer");i.prepend(V()),$bel=e("body"),$bel.append(N()),$bel.append(Q()),$bel.append(Y()),$bel.append(K())}function W(){var e="";return e='<div class="navbar-mobile--search_panel"><div class="input-group search-input__outer-container"><input label="search" type="text" class="form-control search-input__search-container" id="mheader-search" placeholder="Find an exercise program"><div class="mheader-search-bar-clear" title="Clear search">X</div><div class="input-group-append"><button class="btn btn-secondary search-input__search-button" id="ptl-mobile_search_button" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" class="icon icon--search"><title>search</title><path d="M11,11a4.66,4.66,0,0,1-3.42,1.42A4.67,4.67,0,0,1,4.19,11,4.66,4.66,0,0,1,2.77,7.62,4.67,4.67,0,0,1,4.19,4.19,4.67,4.67,0,0,1,7.62,2.77,4.66,4.66,0,0,1,11,4.19a4.67,4.67,0,0,1,1.42,3.43A4.66,4.66,0,0,1,11,11m6.56,4.6-3.71-3.71a7.43,7.43,0,0,0,1.34-4.31,7.46,7.46,0,0,0-.6-3A7.65,7.65,0,0,0,13,2.22,7.54,7.54,0,0,0,10.57.6,7.58,7.58,0,0,0,4.66.6,7.4,7.4,0,0,0,.6,4.66a7.58,7.58,0,0,0,0,5.91A7.54,7.54,0,0,0,2.22,13a7.65,7.65,0,0,0,2.44,1.62,7.46,7.46,0,0,0,3,.6,7.43,7.43,0,0,0,4.31-1.34l3.71,3.7a1.38,1.38,0,0,0,2-1.95" fill="#c54905" fill-rule="evenodd" /></svg></button></div></div><div id="mobile-predesigned--filter_link"><div class="mobile-filter-link"><i class="fa fa-sliders"></i>FILTERS</div></div><div id="mobile-predesigned--crumbtrail_bubbles"><ul class="mobile-predesigned--filter_crumbtrail"></ul></div></div>',e}function U(){var e="";"mdvip"==t.category_slider_style&&(e="mdvip");var i="";return i='<div class="scroll-container '+e+'"><div class="divider-line"></div><div class="left-arrow"><svg class="icon icon--mdvip-arrow-left" aria-hidden="true" focusable="false" data-prefix="fal" data-icon="chevron-left" class="svg-inline--fa fa-chevron-left fa-w-8" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path fill="currentColor" d="M238.475 475.535l7.071-7.07c4.686-4.686 4.686-12.284 0-16.971L50.053 256 245.546 60.506c4.686-4.686 4.686-12.284 0-16.971l-7.071-7.07c-4.686-4.686-12.284-4.686-16.97 0L10.454 247.515c-4.686 4.686-4.686 12.284 0 16.971l211.051 211.05c4.686 4.686 12.284 4.686 16.97-.001z"></path></svg><svg class="icon icon--arrow-left" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 256 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"></path></svg></div><ul class="category-bubbles-list container-fluid"></ul><div class="right-arrow show-arrow"><svg class="icon icon--mdvip-arrow-right" aria-hidden="true" focusable="false" data-prefix="fal" data-icon="chevron-right" class="svg-inline--fa fa-chevron-right fa-w-8" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path fill="currentColor" d="M17.525 36.465l-7.071 7.07c-4.686 4.686-4.686 12.284 0 16.971L205.947 256 10.454 451.494c-4.686 4.686-4.686 12.284 0 16.971l7.071 7.07c4.686 4.686 12.284 4.686 16.97 0l211.051-211.05c4.686-4.686 4.686-12.284 0-16.971L34.495 36.465c-4.686-4.687-12.284-4.687-16.97 0z"></path></svg><svg class="icon icon--arrow-right" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 256 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"></path></svg></div></div>',i}function V(){var e="";return e='<div id="grid-filter" class=""><div class="grid-filter--wrapper"><div class="grid-filter--inner_wrapper"><div id="predesigned--crumbtrail_bubbles"><ul class="predesigned--filter_crumbtrail"></ul></div><div class="grid-filter--search_wrapper"><div class="input-group search-input__outer-container"><input label="search" type="text" class="form-control search-input__search-container" id="header-search" placeholder="Find an exercise program"><div class="header-search-bar-clear" title="Clear search">X</div><div class="input-group-append"><button class="btn btn-secondary search-input__search-button" id="search-icon-legacy" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" class="icon icon--search"><title>search</title><path d="M11,11a4.66,4.66,0,0,1-3.42,1.42A4.67,4.67,0,0,1,4.19,11,4.66,4.66,0,0,1,2.77,7.62,4.67,4.67,0,0,1,4.19,4.19,4.67,4.67,0,0,1,7.62,2.77,4.66,4.66,0,0,1,11,4.19a4.67,4.67,0,0,1,1.42,3.43A4.66,4.66,0,0,1,11,11m6.56,4.6-3.71-3.71a7.43,7.43,0,0,0,1.34-4.31,7.46,7.46,0,0,0-.6-3A7.65,7.65,0,0,0,13,2.22,7.54,7.54,0,0,0,10.57.6,7.58,7.58,0,0,0,4.66.6,7.4,7.4,0,0,0,.6,4.66a7.58,7.58,0,0,0,0,5.91A7.54,7.54,0,0,0,2.22,13a7.65,7.65,0,0,0,2.44,1.62,7.46,7.46,0,0,0,3,.6,7.43,7.43,0,0,0,4.31-1.34l3.71,3.7a1.38,1.38,0,0,0,2-1.95" fill="#c54905" fill-rule="evenodd" /></svg></button></div></div></div></div></div></div>',e}function $(){var e="";return e='<div class="container-fluid scroll-on-hover"><div class="cards--grid_renderer"><div id="predesigned--results_display" class="cards--grid_container"></div><div id="load-more-records" class="loading-more-wrapper"><div class="btn-load_more_records"><svg aria-hidden="true" focusable="false" data-prefix="fa" data-icon="spinner-third" class="svg-inline--fa fa-spinner-third fa-w-16 fa-spin margin-right-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M456.433 371.72l-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z"></path></svg>Loading...</div></div><div id="predesigned--no_results_display" class="cards--grid_container info-box-item"><div class="no_results--wrapper container text-left"><div class="no_results-flex_box"><i class="fa fa-exclamation-triangle"></i><h1 class="no_results--title">No Results</h1><p>Sorry, we are unable to find any exercise programs with the filters and/or search terms you are using.<br /><br />Please try a different combination of filters and/or search terms.</p></div><p class="subtext"><br /><br /><strong>NOTE:</strong> Every exercise program published on this site has been created and reviewed by a team of licensed physical therapists.</p></div></div><div id="predesigned--sys_error" class="cards--grid_container info-box-item"><div class="no_results--wrapper container text-center"><h1 class="no_results--title">Something Went Wrong</h1><p>Sorry, there seems to be an issue loading this component. Please refresh your browser.</p><p>If this problem persists, please contact technical support and provide them with the following error number:</p><p class="error-number">#ERR010203</p></div></div></div></div>',e}function Q(){var e="";return e='<div class="mobile-filter-panel"><ul class="mobile-filter-panel_list"><li class="double-divider" id="mbtn-close_filter_menu"><span class="mobile-grid_filter_title">Filters</span><span class="mobile--grid_filter_clear" id="mobile--filter_clear">Clear All Filters</span><span class="mobile--grid_filter_close"><i class="fa fa-times-circle"></i></span></li><li class="single-divider"><div class="mobile-filter--value" data-f="c"><select style="width: 100%; font-size: 1.4rem; height: 2.5rem;" id="predesigned_filters--bodyregion-mobile"></select></div></li><li class="single-divider types-mobile_dropdown"><div class="mobile-filter--value" data-f="f1"><select style="width: 100%; font-size: 1.4rem; height: 2.5rem;" id="predesigned_filters--types-mobile"></select></div></li><li class="single-divider conditions-mobile_dropdown active"><div class="mobile-filter--value" data-f="f4"><select style="width: 100%; font-size: 1.4rem; height: 2.5rem;" id="predesigned_filters--conditions-mobile"></select></div></li></ul><input type="hidden" id="selected_bodyregion_id__m" value="" /><div class="ptlinked--m_bodyregion_highlight"><div class="highlight-label">Hip</div><img src="'+t.assets_cdn+'bodyregion_highlights/bodyregion--hip.png" /></div></div>',e}function N(){var e="";"modal"==t.exercise_program_viewer&&(e="mdvip-modal");var i="";return i='<div class="ptlinked--exercise_program_viewer '+e+'"><div class="viewer--header"><div class="viewer--header_inner"><div class="viewer--header_main"><div class="metadata-block-wrapper">',i+='<span class="metadata-block text-right margin-left-20 is-clickable btn-print_program"><i class="fa fa-print"></i>Print</span>',!t.training_mode&&t.save_favorites&&(i+='<span class="metadata-block text-right margin-left-20 is-clickable btn-save_program"><i class="fa fa-save"></i>Save</span>'),t.training_mode||!t.secure_messaging||"physician"!=t.user_type&&"staff"!=t.user_type||(i+='<span class="metadata-block text-right margin-left-20 is-clickable btn-share_program"><i class="fa fa-share-square-o"></i>Send</span>'),i+='</div></div><div class="viewer--metadata-block-mobile-wrapper">',i+='<span class="metadata-block text-right margin-left-20 is-clickable btn-print_program" data-code="QDG081"><i class="fa fa-print"></i><span class="label">Print</span></span>',!t.training_mode&&t.save_favorites&&(i+='<span class="metadata-block text-right margin-left-20 is-clickable btn-save_program" data-code="QDG081"><i class="fa fa-save"></i>Save</span></span>'),t.training_mode||!t.secure_messaging||"physician"!=t.user_type&&"staff"!=t.user_type||(i+='<span class="metadata-block text-right margin-left-20 is-clickable btn-share_program" data-code="QDG081"><i class="fa fa-share-square-o"></i><span class="label">Send</span></span>'),i+='</div><div class="viewer--close_button"><a href="javascript:;" id="viewer--close_btn"><i class="fa fa-times-circle"></i></a></div></div><div class="viewer--header__title-wrapper"><h1 class="viewer--header__title viewer--program_title"></h1></div></div><div id="viewer--header" class="viewer--header_bar"><div id="viewer--filmstrip" class="viewer--filmstrip_container"><div class="workout-preview__filmstrip"><div class="left-arrow"><i class="fa fa-chevron-left"></i></div><ul class="workout-preview__thumbs" id="workout-preview__thumbslider"></ul><div class="right-arrow"><i class="fa fa-chevron-right"></i></div></div></div></div><div class="viewer--exercise_container" id="viewer--exercise_container_wrapper"></div></div>',i+='<div class="mdvip--viewer_overaly"></div>',i}function Y(){var e='<div id="ptlinked--dialog-message" title="" data-exercise_program_id=""><p class="ptlinked-dialog--message"></p></div>',i='<div class="modal fade" id="ptlinked--modal-dialog"><div class="modal-dialog min-width-600"><div class="modal-content"><div class="modal-header"><h4 class="modal-title"></h4><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button></div><div class="modal-body"><div class="row mb-3 justify-content-center"><div class="col-10 text-center"><p class="ptlinked-dialog--message"></p></div></div></div><div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">Close</a><a href="javascript:;" class="btn btn-success" id="ptlinked-modal--action_btn">Action Button</a></div></div></div></div>';return"bootstrap"==t.dialog_box_type?i:e}function K(){var e='<div class="ptlinked--filter_dropdown"><i class="arrow up left"></i><div class="ptlinked-dropdown_wrapper"><input type="hidden" id="selected_bodyregion_id" value="" /><div class="ptlinked--dropdown_bodyregion_highlight"><div class="highlight-label">Hip</div><img src="'+t.assets_cdn+'bodyregion_highlights/bodyregion--hip.png" /></div><div class="ptlinked--dropdown_filters" id="type-filter"><div class="ptlinked--filter_group"><div class="filter-label">View By Type</div><ul class="filter--item_list"></ul></div><div class="ptlinked--filter_group" id="condition-filter"><div class="filter-label">View By Condition</div><select id="filter--condition_type"><option value="0">Select a condition or diagnosis here</option></select><div class="clear-condition-filters hide" title="clear condition filter"><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="times" class="svg-inline--fa fa-times fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"></path></svg></div></div></div></div></div>';return e}function Z(){t.debug_mode&&console.log("----- Rendering User Interface"),J(),t.debug_mode&&console.log("----- Register User Session"),oe()}function ee(){t.debug_mode&&console.log("::::: Plugin Initialization :::::"),xe.c=0,xe.c1=0,xe.v="",xe.f1=0,xe.f4=0,Ae=0,Pe=25,we={bodyregion:{},type:{},condition:{},myfavorites:{},customcat:{}},t.debug_mode&&console.log("----- Calculate Plugin Container Height"),de(),t.debug_mode&&console.log("----- Process Page Request Parameters"),Te=le(),t.debug_mode&&console.log("----- Initializing the Filter Drop Down"),d(),t.debug_mode&&console.log("----- Initializing the Mobile Filter Menu"),ie(),t.debug_mode&&console.log("----- Initializing Search Bar"),T(),t.debug_mode&&console.log("----- Loading Categories"),o(),r(),t.debug_mode&&console.log("----- Loading Filters"),p(),v(),h(),t.debug_mode&&console.log("----- Requesting Initial Search Results"),M(),t.debug_mode&&console.log("----- Initialize Scroll Monitor"),re(),t.debug_mode&&console.log("----- Initialize Hover Monitor"),ge(),t.debug_mode&&console.log("----- Process URL Query"),ne(),t.debug_mode&&console.log("----- Trigger OnInit Callback"),me("onInit")}function ie(){e("#mobile-predesigned--filter_link").unbind("click").on("click",function(){e(".mobile-filter-panel").hasClass("opened")?e(".mobile-filter-panel").removeClass("opened"):e(".mobile-filter-panel").addClass("opened")}),e("#mbtn-close_filter_menu").unbind("click").on("click",function(){e(".mobile-filter-panel").hasClass("opened")&&e(".mobile-filter-panel").removeClass("opened")})}function se(){var i=e(".cards--grid_container_item").width()+10+10,s=e("#predesigned--results_display").width(),t=Math.floor(s/i),r=e(".cards--grid_container_item").length,a=t-(r-Math.floor(r/t)*t);a==t&&(a=0);var l='<div class="cards--grid_container_item cards--grid_placeholder"></div>',o=e("#predesigned--results_display");for($i=0;$i<a;$i++)o.append(l)}function te(i,s){"predesigned--results_display"==i?(e(".info-box-item").hasClass("active")&&e(".info-box-item").removeClass("active"),e("#predesigned--results_display").hasClass("display_info_box")&&e("#predesigned--results_display").removeClass("display_info_box")):("predesigned--sys_error"==i&&(e(".info-box-item").find("p.error-number").html("#"+s),be.find(".scroll-container").hide(),be.find("#grid-filter").hide()),e("#predesigned--results_display").hasClass("display_info_box")||e("#predesigned--results_display").addClass("display_info_box"),e(".info-box-item").hasClass("active")&&e(".info-box-item").removeClass("active"),e("#"+i).addClass("active"),e("#load-more-records").hide())}function re(){e(".scroll-on-hover").scroll(function(){var i=Me;i?(e("#load-more-records").show(),e(".scroll-on-hover").scrollTop()==Math.round(e(".cards--grid_renderer").height()-e(".scroll-on-hover").height())&&(Ae+=Pe,Se=!0,M())):e("#load-more-records").hide()})}function ae(){const e=window.matchMedia("only screen and (max-width: 1024px)").matches;return t.debug_mode&&(e?console.log("----- Mobile Device Detected"):console.log("----- Desktop Device Detected")),e}function le(){var e={};return document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g,function(){function i(e){return decodeURIComponent(e.split("+").join(" "))}e[i(arguments[1])]=i(arguments[2])}),e}function oe(){var i=t.api_root_url+"/users/register_plugin";e.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":t.api_key,"ptlinked-uid-x":t.user_uid,"ptlinked-utype-x":t.user_type},url:i,dataType:"json",error:function(e,i,s){t.debug_mode&&(console.log("::::: Register User AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),Ee=!0,te("predesigned--sys_error","REG"+e.status+" - "+e.statusText)},success:function(e,i,s){var t=s.status;200==t&&ee()}})}function ne(){if(Object.keys(Te).length>0&&void 0!==Te.e){var e=Te.e;""!=e&&(je=e,E())}}function de(){var i=0;t.header_element_class.split(",");i=Math.round(e("#block-siteheader").outerHeight()),t.debug_mode&&console.log("----- Calculated Page Header Height: "+i);var s=Math.round(e("body").outerHeight()),r=Math.round(s-i);be.css("height",r);var a=e(".scroll-container"),l=Math.round(e(a).outerHeight());e(".scroll-on-hover").css("height",Math.round(r-l))}function ce(){var i=e("."+t.viewer_header_element_class);i.length;var s=Math.round(e(window).height()),r=Math.round(e(i).outerHeight()),a=e("."+t.viewer_thumb_scroller_class),l=Math.round(e(a).outerHeight());t.debug_mode&&console.log("----- Calculated Viewer Container Height: "+s+" - ( "+r+" + "+l+" )"),e(".viewer--exercise_container").css("height",Math.round(s-(r+l))),e(".viewer--exercise_container").on("scroll",function(){e("#workout-preview__thumbslider li.exercise-thumb").removeClass("selected"),e("#workout-preview__thumbslider li.exercise-thumb").each(function(){var i=e(this).data("wrkitem");ve(i)&&e(this).addClass("selected")})})}function pe(i,s,r,a){if("jquery"==t.dialog_box_type){var l=e("#ptlinked--dialog-message");l.attr("title",i),l.find("p.ptlinked-dialog--message").html(s),r&&a?(l.find("#ptlinked-modal--action_btn").html(r),l.dialog({modal:!0,title:i,buttons:[{text:r,click:function(){e(this).dialog("close"),a()}},{text:"Cancel",click:function(){e(this).dialog("close")}}]})):l.dialog({modal:!0,title:i,buttons:[{text:"Ok",click:function(){e(this).dialog("close")}}]})}else{var o=[];o.title=i,o.content=s,o.confirmation_btn=r,o.confirmation_callbackn=a,me("onShowDialog",o)}}function fe(i){if(i.data("customcat")>0)e(".ptlinked--filter_dropdown").removeClass("display show");else{var s=t.assets_cdn+"bodyregion_highlights/"+i.data("highlight"),r=i.data("title"),a=i.data("oid");e("#selected_bodyregion_id").val(a);var l=e(".scroll-container").offset().top+e(".scroll-container").height()-12,o=i.offset().left,n=e("#ptlinked--application_container").width(),d=e(".ptlinked--filter_dropdown").width(),c=i.outerWidth();e(".ptlinked--filter_dropdown").css("top",l),e(".ptlinked--dropdown_bodyregion_highlight").find("img").attr("src",s),e(".ptlinked--dropdown_bodyregion_highlight").find(".highlight-label").html(r);var p=De[a].types;e("ul.filter--item_list li").each(function(){e(this).hasClass("hidden")||e(this).addClass("hidden")}),e("ul.filter--item_list li").removeClass("selected");for(var f=0;f<p.length;f++)e("ul.filter--item_list").find("li[data-oid='"+p[f].type_id+"']").hasClass("hidden")&&e("ul.filter--item_list").find("li[data-oid='"+p[f].type_id+"']").removeClass("hidden");e("ul.filter--item_list").find("li[data-oid='0']").hasClass("hidden")&&e("ul.filter--item_list").find("li[data-oid='0']").removeClass("hidden"),e("ul.filter--item_list li").removeClass("selected"),e("ul.filter--item_list li[data-oid='"+xe.f1+"']").addClass("selected");var g=De[a].conditions;if(m(g),0==xe.f4?(e(".clear-condition-filters").hasClass("hide")||e(".clear-condition-filters").addClass("hide"),e("#predesigned_filters--conditions").val(0).trigger("change")):e("#selected_bodyregion_id").val()!=xe.c?(e(".clear-condition-filters").hasClass("hide")||e(".clear-condition-filters").addClass("hide"),e("#predesigned_filters--conditions").val(0).trigger("change")):(e(".clear-condition-filters").hasClass("hide")&&e(".clear-condition-filters").removeClass("hide"),e("#predesigned_filters--conditions").val(xe.f4).trigger("change")),o+d>n){e(".ptlinked--filter_dropdown").css("left",o-d+c),e(".ptlinked--filter_dropdown .arrow").hasClass("left")&&e(".ptlinked--filter_dropdown .arrow").removeClass("left").addClass("right");var v=d-c/2-10;e(".ptlinked--filter_dropdown .arrow").css("left",v+"px")}else{e(".ptlinked--filter_dropdown").css("left",o),e(".ptlinked--filter_dropdown .arrow").hasClass("right")&&e(".ptlinked--filter_dropdown .arrow").removeClass("right").addClass("left");var h=c/2-10;e(".ptlinked--filter_dropdown .arrow").css("left",h+"px")}e(".ptlinked--filter_dropdown").addClass("display show")}}function ge(){e(document).mousemove(function(){
var i=!!navigator.userAgent.match(/Trident.*rv\:11\./);0!=e(".ptlinked--filter_dropdown:hover").length||0!=e(".scroll-container:hover").length||0!=e(".select2-container:hover").length||i||e(".ptlinked--filter_dropdown").hasClass("display")&&(0!=e(".select2-container--open").length&&e("#filter--condition_type").select2("close"),e(".ptlinked--filter_dropdown").removeClass("show display"))})}function ve(i){var s=e("#viewer--exercise_container_wrapper").height(),t=e(".viewer--exercise_item[data-oid='"+i+"']").offset().top;return t<s&&t>-170}function he(e,i){if(!i)return t[e];t[e]=i}function ue(){be.each(function(){var i=e(this);me("onDestroy"),i.removeData("plugin_"+s)})}function me(e,i){void 0!==t[e]&&t[e].call(_e,i)}var _e=i,be=e(i);t=e.extend({},e.fn[s].defaults,t);var ye,Ce=0,we={},ke=500,xe={},Te={},Se=!1,Me=!0,Re=!1,Ae=0,Pe=25,Le=0,je="",Ee=!1,De={};return Z(),{option:he,destroy:ue}}var s="ptlinkedLibrary";e.fn[s]=function(t){if("string"==typeof arguments[0]){var r,a=arguments[0],l=Array.prototype.slice.call(arguments,1);return this.each(function(){if(!e.data(this,"plugin_"+s)||"function"!=typeof e.data(this,"plugin_"+s)[a])throw new Error("Method "+a+" does not exist on jQuery."+s);r=e.data(this,"plugin_"+s)[a].apply(this,l)}),void 0!==r?r:this}if("object"==typeof t||!t)return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new i(this,t))})},e.fn[s].defaults={user_uid:0,user_type:"physician",secure_messaging:!1,training_mode:!1,save_favorites:!1,debug_mode:!1,api_root_url:"",api_key:"",app_root_url:"https://mdvip-plugin.ptlinked.com/test",assets_cdn:"https://d2fwkse1ezzmt8.cloudfront.net/images/",video_bg:"white",header_element_class:"block-siteheader",viewer_header_element_class:"viewer--header",viewer_thumb_scroller_class:"viewer--header_bar",dialog_box_type:"bootstrap",exercise_program_viewer:"modal",category_slider_style:"mdvip",onInit:function(){},onDestroy:function(){},onSendProgram:function(e){},onSaveProgram:function(e){},onPrintProgram:function(e){},onShowDialog:function(e){},onViewExerciseProgram:function(e){}}})(jQuery);