function toggleVisibility(e){var s=document.getElementById(e);"block"==s.style.display?s.style.display="none":s.style.display="block"}function countChars(e,s){s.value=e.value.length}function sfwd_do_condshow_match(e,s){return void 0!==s&&(matches=!0,jQuery.each(s,(function(e,s){if(cur=jQuery("[name="+e+"]"),type=cur.attr("type"),"checkbox"!=type&&"radio"!=type||(cur=jQuery("input[name="+e+"]:checked")),cur=cur.val(),cur!=s)return matches=!1,!1})),matches?jQuery("#"+e).show():jQuery("#"+e).hide(),matches)}function sfwd_add_condshow_handlers(e,s){void 0!==s&&jQuery.each(s,(function(n,t){jQuery("[name="+n+"]").change((function(){sfwd_do_condshow_match(e,s)}))}))}function sfwd_do_condshow(e){void 0!==sfwd_data.condshow&&jQuery.each(sfwd_data.condshow,(function(e,s){sfwd_do_condshow_match(e,s),sfwd_add_condshow_handlers(e,s)}))}function sfwd_show_pointer(e,s){void 0!==jQuery(s.pointer_target).pointer&&jQuery(s.pointer_target).pointer({content:s.pointer_text,close:function(){jQuery.post(ajaxurl,{pointer:e,action:"dismiss-wp-pointer"})}}).pointer("open")}function learndash_lesson_edit_page_javascript(){jQuery("input[name='sfwd-lessons_lesson_assignment_upload']").on("change",(function(){checked=jQuery("input[name=sfwd-lessons_lesson_assignment_upload]:checked").length,checked?(jQuery("#sfwd-lessons_auto_approve_assignment").slideDown(),jQuery("#sfwd-lessons_lesson_assignment_points_enabled").slideDown(),jQuery("#sfwd-lessons_assignment_upload_limit_extensions").slideDown(),jQuery("#sfwd-lessons_assignment_upload_limit_size").slideDown(),jQuery("input[name='sfwd-lessons_lesson_assignment_points_enabled']").change(),jQuery("input[name='sfwd-lessons_lesson_video_enabled']").length&&(jQuery("input[name='sfwd-lessons_lesson_video_enabled']").attr("checked",!1),jQuery("#sfwd-lessons_lesson_video_enabled").hide()),jQuery("#sfwd-lessons_lesson_assignment_deletion_enabled").slideDown()):(jQuery("#sfwd-lessons_auto_approve_assignment").slideUp(),jQuery("#sfwd-lessons_lesson_assignment_points_enabled").slideUp(),jQuery("#sfwd-lessons_assignment_upload_limit_extensions").slideUp(),jQuery("#sfwd-lessons_assignment_upload_limit_size").slideUp(),jQuery("#sfwd-lessons_lesson_assignment_deletion_enabled").slideUp(),jQuery("input[name='sfwd-lessons_lesson_assignment_points_enabled']").attr("checked",!1),jQuery("input[name='sfwd-lessons_lesson_assignment_points_enabled']").change(),jQuery("input[name='sfwd-lessons_lesson_video_enabled']").length&&jQuery("#sfwd-lessons_lesson_video_enabled").slideDown()),jQuery("[name='sfwd-lessons_auto_approve_assignment']").length&&jQuery("[name='sfwd-lessons_auto_approve_assignment']").change()})),jQuery("input[name='sfwd-lessons_lesson_assignment_upload']").length&&jQuery("input[name='sfwd-lessons_lesson_assignment_upload']").change(),jQuery("[name='sfwd-lessons_lesson_assignment_points_enabled']").on("change",(function(){checked=jQuery("[name=sfwd-lessons_lesson_assignment_points_enabled]:checked").length,checked?jQuery("#sfwd-lessons_lesson_assignment_points_amount").slideDown():(jQuery("#sfwd-lessons_lesson_assignment_points_amount").slideUp(),jQuery("[name='sfwd-lessons_lesson_assignment_points_amount']").val("0"))})),jQuery("[name='sfwd-lessons_lesson_assignment_points_enabled']").length&&jQuery("[name='sfwd-lessons_lesson_assignment_points_enabled']").change(),jQuery('[name="sfwd-lessons_auto_approve_assignment"]').on("change",(function(){checked=jQuery("[name=sfwd-lessons_lesson_assignment_upload]:checked").length,checked?(checked=jQuery("[name=sfwd-lessons_auto_approve_assignment]:checked").length,checked?(jQuery("#sfwd-lessons_assignment_upload_limit_count").slideUp(),jQuery("#sfwd-lessons_lesson_assignment_deletion_enabled").slideUp()):(jQuery("#sfwd-lessons_assignment_upload_limit_count").slideDown(),jQuery("#sfwd-lessons_lesson_assignment_deletion_enabled").slideDown())):(jQuery("#sfwd-lessons_assignment_upload_limit_count").slideUp(),jQuery("#sfwd-lessons_lesson_assignment_deletion_enabled").slideUp())})),jQuery("[name='sfwd-lessons_auto_approve_assignment']").length&&jQuery("[name='sfwd-lessons_auto_approve_assignment']").change();var e=!1,s=!1,n=!1,t=!1;jQuery("input[name='sfwd-lessons_lesson_video_enabled']").length&&(jQuery("input[name='sfwd-lessons_lesson_video_enabled']").on("change",(function(){(e=jQuery("input[name=sfwd-lessons_lesson_video_enabled]:checked").length)?(jQuery("#sfwd-lessons_lesson_video_url").slideDown(),jQuery("#sfwd-lessons_lesson_video_auto_start").slideDown(),jQuery("#sfwd-lessons_lesson_video_show_controls").slideDown(),jQuery("#sfwd-lessons_lesson_video_shown").slideDown(),jQuery("input[name='sfwd-lessons_lesson_assignment_upload']").length&&(jQuery("input[name='sfwd-lessons_lesson_assignment_upload']").attr("checked",!1),jQuery("#sfwd-lessons_lesson_assignment_upload").hide())):(jQuery("#sfwd-lessons_lesson_video_url").hide(),jQuery("#sfwd-lessons_lesson_video_auto_start").hide(),jQuery("#sfwd-lessons_lesson_video_show_controls").hide(),jQuery("#sfwd-lessons_lesson_video_shown").hide(),jQuery("#sfwd-lessons_lesson_video_auto_complete").hide(),jQuery("#sfwd-lessons_lesson_video_auto_complete_delay").hide(),jQuery("input[name='sfwd-lessons_lesson_assignment_upload']").length&&jQuery("#sfwd-lessons_lesson_assignment_upload").slideDown()),jQuery("select[name='sfwd-lessons_lesson_video_shown']").length&&jQuery("select[name='sfwd-lessons_lesson_video_shown']").change()})),jQuery("input[name='sfwd-lessons_lesson_video_enabled']").change()),jQuery("select[name='sfwd-lessons_lesson_video_shown']").length&&(jQuery("select[name='sfwd-lessons_lesson_video_shown']").on("change",(function(){s=jQuery("input[name=sfwd-lessons_lesson_video_enabled]:checked").length,n=jQuery("select[name='sfwd-lessons_lesson_video_shown']").val(),e&&s&&"AFTER"==n?jQuery("#sfwd-lessons_lesson_video_auto_complete").slideDown():jQuery("#sfwd-lessons_lesson_video_auto_complete").hide(),jQuery("input[name='sfwd-lessons_lesson_video_auto_complete']").length&&jQuery("input[name='sfwd-lessons_lesson_video_auto_complete']").change()})),jQuery("select[name='sfwd-lessons_lesson_video_shown']").change()),jQuery("input[name='sfwd-lessons_lesson_video_auto_complete']").length&&(jQuery("input[name='sfwd-lessons_lesson_video_auto_complete']").on("change",(function(){t=jQuery("input[name=sfwd-lessons_lesson_video_auto_complete]:checked").length,e&&"AFTER"==n&&t?(jQuery("#sfwd-lessons_lesson_video_auto_complete_delay").slideDown(),jQuery("#sfwd-lessons_lesson_video_hide_complete_button").slideDown()):(jQuery("#sfwd-lessons_lesson_video_auto_complete_delay").hide(),jQuery("#sfwd-lessons_lesson_video_hide_complete_button").hide())})),jQuery("input[name='sfwd-lessons_lesson_video_auto_complete']").change()),jQuery("input[name='sfwd-lessons_visible_after']").on("blur",(function(){var e=jQuery("input[name='sfwd-lessons_visible_after']").val();e=void 0!==e?parseInt(e):0,Math.abs(e)>0?(jQuery("#sfwd-lessons_visible_after_specific_date input").attr("disabled","disabled"),jQuery("#sfwd-lessons_visible_after_specific_date select").attr("disabled","disabled")):(jQuery("#sfwd-lessons_visible_after_specific_date input").removeAttr("disabled"),jQuery("#sfwd-lessons_visible_after_specific_date select").removeAttr("disabled"))})),jQuery("input[name='sfwd-lessons_visible_after']").length&&(jQuery("input[name='sfwd-lessons_visible_after']").blur(),jQuery("input[name='sfwd-lessons_visible_after']").on("change",(function(){jQuery("input[name='sfwd-lessons_visible_after']").blur()}))),jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector").on("change",(function(){var e=jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector select.ld_date_mm").val();void 0===e&&(e="");var s=jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector input.ld_date_jj").val();void 0===s&&(s="");var n=jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector input.ld_date_aa").val();void 0===n&&(n="");var t=jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector input.ld_date_hh").val();void 0===t&&(t="");var o=jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector input.ld_date_mn").val();void 0===o&&(o=""),""==e&&""==s&&""==n&&""==t&&""==o?jQuery("input[name='sfwd-lessons_visible_after']").removeAttr("disabled"):jQuery("input[name='sfwd-lessons_visible_after']").attr("disabled","disabled")})),jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector").length&&jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector").change(),jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector select.ld_date_mm").on("change",(function(){var e=jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector select.ld_date_mm").val();void 0===e&&(e=""),""==e&&(jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector input.ld_date_jj").val(""),jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector input.ld_date_aa").val(""),jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector input.ld_date_hh").val(""),jQuery("#sfwd-lessons_visible_after_specific_date .ld_date_selector input.ld_date_mn").val(""))}))}function learndash_course_edit_page_javascript(){jQuery("select[name=sfwd-courses_course_price_type]").on("change",(function(){var e=jQuery("select[name=sfwd-courses_course_price_type]").val();"open"==e||"free"==e?(jQuery("input[name=sfwd-courses_course_price]").val(""),jQuery("#sfwd-courses_course_price").hide()):jQuery("#sfwd-courses_course_price").show(),"closed"==e?jQuery("#sfwd-courses_custom_button_url").show():jQuery("#sfwd-courses_custom_button_url").hide(),"subscribe"==e?jQuery("#sfwd-courses_course_price_billing_cycle").show():jQuery("#sfwd-courses_course_price_billing_cycle").hide()})),jQuery("select[name=sfwd-courses_course_price_type]").change(),jQuery("input[name=sfwd-courses_expire_access]").on("change",(function(){null==jQuery("input[name=sfwd-courses_expire_access]:checked").val()?(jQuery("#sfwd-courses_expire_access_days").hide(),jQuery("#sfwd-courses_expire_access_delete_progress").hide()):(jQuery("#sfwd-courses_expire_access_days").slideDown("slow"),jQuery("#sfwd-courses_expire_access_delete_progress").slideDown("slow"))})),jQuery("input[name=sfwd-courses_expire_access]").change(),jQuery("select[name=sfwd-courses_course_lesson_per_page]").on("change",(function(){""==jQuery("select[name=sfwd-courses_course_lesson_per_page]").val()?jQuery("#sfwd-courses_course_lesson_per_page_custom").hide():jQuery("#sfwd-courses_course_lesson_per_page_custom").slideDown("slow")})),jQuery("select[name=sfwd-courses_course_lesson_per_page]").change(),jQuery("input[name=sfwd-courses_course_prerequisite_enabled]").on("change",(function(){null==jQuery("input[name=sfwd-courses_course_prerequisite_enabled]:checked").val()?(jQuery("#sfwd-courses_course_prerequisite").hide(),jQuery("#sfwd-courses_course_prerequisite_compare").hide()):(jQuery("#sfwd-courses_course_prerequisite").slideDown("slow"),jQuery("#sfwd-courses_course_prerequisite_compare").slideDown("slow"))})),jQuery("input[name=sfwd-courses_course_prerequisite_enabled]").change(),jQuery("input[name=sfwd-courses_course_points_enabled]").on("change",(function(){null==jQuery("input[name=sfwd-courses_course_points_enabled]:checked").val()?(jQuery("#sfwd-courses_course_points").hide(),jQuery("#sfwd-courses_course_points_access").hide()):(jQuery("#sfwd-courses_course_points").slideDown("slow"),jQuery("#sfwd-courses_course_points_access").slideDown("slow"))})),jQuery("input[name=sfwd-courses_course_points_enabled]").change()}function learndash_quiz_edit_page_javascript(){jQuery("select[name=sfwd-quiz_quiz_pro]").on("change",(function(){var e=jQuery("select[name=sfwd-quiz_quiz_pro]").val();if(window["sfwd-quiz_quiz_pro"]!=e){var s=jQuery("#sfwd-quiz_quiz_pro_html").html();void 0!==s&&s.length>10&&(window["sfwd-quiz_quiz_pro_html"]=s)}else jQuery("#sfwd-quiz_quiz_pro_html").show(),jQuery("input[name=disable_advance_quiz_save]").val(0);e>0?jQuery("#advanced_quiz_preview").attr("href",sfwd_data.advanced_quiz_preview_link+e):jQuery("#advanced_quiz_preview").attr("href","#"),jQuery.fn.wpProQuiz_preview()}));jQuery("select[name=sfwd-quiz_quiz_pro]").val();window["sfwd-quiz_quiz_pro"]=sfwd_data.quiz_pro,jQuery("form#post").append("<div id='disable_advance_quiz_save'><input type='hidden' name='disable_advance_quiz_save' value='0'/></div>"),jQuery("select[name=sfwd-quiz_quiz_pro]").change(),jQuery("select[name=sfwd-quiz_course]").on("change",(function(){null==window.sfwd_quiz_lesson&&(window.sfwd_quiz_lesson=jQuery("select[name=sfwd-quiz_lesson]").val()),jQuery("select[name=sfwd-quiz_lesson]").html("<option>"+sfwd_data.loading_lang+"</option>");var e={action:"select_a_lesson_or_topic",course_id:jQuery(this).val()};jQuery.post(ajaxurl,e,(function(e){window.response=e,html='<option value="0">'+sfwd_data.select_a_lesson_or_topic_lang+"</option>",jQuery.each(e.opt,(function(e,s){""!=s.key&&"0"!=s.key&&(selected=s.key==window.sfwd_quiz_lesson?"selected=selected":"",html+="<option value='"+s.key+"' "+selected+">"+s.value+"</option>")})),jQuery("select[name=sfwd-quiz_lesson]").html(html)}),"json")}))}function learndash_assignment_edit_page_javascript(){jQuery("select[name=sfwd-assignment_course]").on("change",(function(){null==window["sfwd-assignment_lesson"]&&(window["sfwd-assignment_lesson"]=jQuery("select[name=sfwd-assignment_lesson]").val()),jQuery("select[name=sfwd-assignment_lesson]").html("<option>"+sfwd_data.loading_lang+"</option>");jQuery(this).val();var e={action:"select_a_lesson_or_topic",course_id:jQuery(this).val()};jQuery.post(ajaxurl,e,(function(e){window.response=e,html='<option value="0">'+sfwd_data.select_a_lesson_lang+"</option>",jQuery.each(e.opt,(function(e,s){""!=s.key&&"0"!=s.key&&(selected=s.key==window["sfwd-assignment_lesson"]?"selected=selected":"",html+="<option value='"+s.key+"' "+selected+">"+s.value+"</option>")})),jQuery("select[name=sfwd-assignment_lesson]").html(html)}),"json")}))}function learndash_topic_edit_page_javascript(){jQuery('[name="sfwd-topic_lesson_assignment_upload"]').on("change",(function(){checked=jQuery("[name=sfwd-topic_lesson_assignment_upload]:checked").length,checked?(jQuery("#sfwd-topic_auto_approve_assignment").slideDown(),jQuery("#sfwd-topic_lesson_assignment_points_enabled").slideDown(),jQuery("#sfwd-topic_assignment_upload_limit_extensions").slideDown(),jQuery("#sfwd-topic_assignment_upload_limit_size").slideDown(),jQuery("input[name='sfwd-topic_lesson_video_enabled']").length&&(jQuery("input[name='sfwd-topic_lesson_video_enabled']").attr("checked",!1),jQuery("#sfwd-topic_lesson_video_enabled").hide())):(jQuery("#sfwd-topic_auto_approve_assignment").slideUp(),jQuery("#sfwd-topic_assignment_upload_limit_count").slideUp(),jQuery("#sfwd-topic_lesson_assignment_points_enabled").slideUp(),jQuery("#sfwd-topic_assignment_upload_limit_extensions").slideUp(),jQuery("#sfwd-topic_assignment_upload_limit_size").slideUp(),jQuery("[name='sfwd-topic_lesson_assignment_points_enabled']").prop("checked",!1),jQuery("[name='sfwd-topic_lesson_assignment_points_enabled']").change(),jQuery("input[name='sfwd-topic_lesson_video_enabled']").length&&jQuery("#sfwd-topic_lesson_video_enabled").slideDown()),jQuery("[name='sfwd-topic_auto_approve_assignment']").length&&jQuery("[name='sfwd-topic_auto_approve_assignment']").change()})),jQuery("[name='sfwd-topic_lesson_assignment_upload']").length&&jQuery("[name='sfwd-topic_lesson_assignment_upload']").change(),jQuery('[name="sfwd-topic_lesson_assignment_points_enabled"]').on("change",(function(){checked=jQuery("[name=sfwd-topic_lesson_assignment_points_enabled]:checked").length,checked?jQuery("#sfwd-topic_lesson_assignment_points_amount").slideDown():(jQuery("#sfwd-topic_lesson_assignment_points_amount").slideUp(),jQuery("[name='sfwd-topic_lesson_assignment_points_amount']").val("0"))})),jQuery("[name='sfwd-topic_lesson_assignment_points_enabled']").length&&jQuery("[name='sfwd-topic_lesson_assignment_points_enabled']").change(),jQuery('[name="sfwd-topic_auto_approve_assignment"]').on("change",(function(){checked=jQuery("[name=sfwd-topic_lesson_assignment_upload]:checked").length,checked?(checked=jQuery("[name=sfwd-topic_auto_approve_assignment]:checked").length,checked?(jQuery("#sfwd-topic_assignment_upload_limit_count").slideUp(),jQuery("#sfwd-topic_lesson_assignment_deletion_enabled").slideUp()):(jQuery("#sfwd-topic_assignment_upload_limit_count").slideDown(),jQuery("#sfwd-topic_lesson_assignment_deletion_enabled").slideDown())):(jQuery("#sfwd-topic_assignment_upload_limit_count").slideUp(),jQuery("#sfwd-topic_lesson_assignment_deletion_enabled").slideUp())})),jQuery("[name='sfwd-topic_auto_approve_assignment']").length&&jQuery("[name='sfwd-topic_auto_approve_assignment']").change();var e=!1,s=!1,n=!1,t=!1;jQuery("input[name='sfwd-topic_lesson_video_enabled']").length&&(jQuery("input[name='sfwd-topic_lesson_video_enabled']").on("change",(function(){(e=jQuery("input[name=sfwd-topic_lesson_video_enabled]:checked").length)?(jQuery("#sfwd-topic_lesson_video_url").slideDown(),jQuery("#sfwd-topic_lesson_video_auto_start").slideDown(),jQuery("#sfwd-topic_lesson_video_show_controls").slideDown(),jQuery("#sfwd-topic_lesson_video_shown").slideDown(),jQuery("input[name='sfwd-topic_lesson_assignment_upload']").length&&(jQuery("input[name='sfwd-topic_lesson_assignment_upload']").attr("checked",!1),jQuery("#sfwd-topic_lesson_assignment_upload").hide())):(jQuery("#sfwd-topic_lesson_video_url").hide(),jQuery("#sfwd-topic_lesson_video_auto_start").hide(),jQuery("#sfwd-topic_lesson_video_show_controls").hide(),jQuery("#sfwd-topic_lesson_video_shown").hide(),jQuery("#sfwd-topic_lesson_video_auto_complete").hide(),jQuery("#sfwd-topic_lesson_video_auto_complete_delay").hide(),jQuery("input[name='sfwd-topic_lesson_assignment_upload']").length&&jQuery("#sfwd-topic_lesson_assignment_upload").slideDown()),jQuery("select[name='sfwd-topic_lesson_video_shown']").length&&jQuery("select[name='sfwd-topic_lesson_video_shown']").change()})),jQuery("input[name='sfwd-topic_lesson_video_enabled']").change()),jQuery("select[name='sfwd-topic_lesson_video_shown']").length&&(jQuery("select[name='sfwd-topic_lesson_video_shown']").on("change",(function(){s=jQuery("input[name=sfwd-topic_lesson_video_enabled]:checked").length,n=jQuery("select[name='sfwd-topic_lesson_video_shown']").val(),e&&s&&"AFTER"==n?jQuery("#sfwd-topic_lesson_video_auto_complete").slideDown():jQuery("#sfwd-topic_lesson_video_auto_complete").hide(),jQuery("input[name='sfwd-topic_lesson_video_auto_complete']").length&&jQuery("input[name='sfwd-topic_lesson_video_auto_complete']").change()})),jQuery("select[name='sfwd-topic_lesson_video_shown']").change()),jQuery("input[name='sfwd-topic_lesson_video_auto_complete']").length&&(jQuery("input[name='sfwd-topic_lesson_video_auto_complete']").on("change",(function(){t=jQuery("input[name=sfwd-topic_lesson_video_auto_complete]:checked").length,e&&"AFTER"==n&&t?(jQuery("#sfwd-topic_lesson_video_auto_complete_delay").slideDown(),jQuery("#sfwd-topic_lesson_video_hide_complete_button").slideDown()):(jQuery("#sfwd-topic_lesson_video_auto_complete_delay").hide(),jQuery("#sfwd-topic_lesson_video_hide_complete_button").hide())})),jQuery("input[name='sfwd-topic_lesson_video_auto_complete']").change()),jQuery("select[name=sfwd-topic_course]").on("change",(function(){null==window.sfwd_topic_lesson&&(window.sfwd_topic_lesson=jQuery("select[name=sfwd-topic_lesson]").val()),jQuery("select[name=sfwd-topic_lesson]").html("<option>"+sfwd_data.loading_lang+"</option>");var e={action:"select_a_lesson",course_id:jQuery(this).val()};jQuery.post(ajaxurl,e,(function(e){window.response=e,html='<option value="0">'+sfwd_data.select_a_lesson_lang+"</option>",jQuery.each(e.opt,(function(e,s){""!=s.key&&"0"!=s.key&&(selected=s.key==window.sfwd_quiz_lesson?"selected=selected":"",html+="<option value='"+s.key+"' "+selected+">"+s.value+"</option>")})),jQuery("select[name=sfwd-topic_lesson]").html(html)}),"json")}))}if(void 0!==sfwd_data.json&&(sfwd_data=sfwd_data.json.replace(/"/g,'"'),sfwd_data=jQuery.parseJSON(sfwd_data)),jQuery(".sfwd_datepicker").each((function(){jQuery("#"+jQuery(this).attr("id")).datepicker()})),jQuery((function(){"undefined"!=typeof sfwd_data&&void 0!==sfwd_data.condshow&&sfwd_do_condshow(sfwd_data.condshow)})),jQuery((function(){var e;jQuery(".sfwd_upload_image_button").on("click",(function(){return window.send_to_editor=newSendToEditor,e=jQuery(this).next(),formfield=e.attr("name"),tb_show("","media-upload.php?type=image&TB_iframe=true"),!1})),storeSendToEditor=window.send_to_editor,newSendToEditor=function(s){img_url=jQuery("img",s).attr("src"),e.val(img_url),tb_remove(),window.send_to_editor=storeSendToEditor}})),jQuery((function(){void 0!==sfwd_data.pointers&&jQuery.each(sfwd_data.pointers,(function(e,s){"undefined"!==s&&""!=s.pointer_text&&sfwd_show_pointer(e,s)})),jQuery(".sfwd_tab:not(:first)").hide(),jQuery(".sfwd_tab:first").show(),jQuery(".sfwd_header_tabs a").on("click",(function(){return string_ref=jQuery(this).attr("href").split("#")[1],jQuery(".sfwd_tab:not(#"+string_ref+")").hide(),jQuery(".sfwd_tab#"+string_ref).show(),jQuery(".sfwd_header_tab[href!=#"+string_ref+"]").removeClass("active"),jQuery(".sfwd_header_tab#[href=#"+string_ref+"]").addClass("active"),!1})),jQuery("body.post-type-sfwd-courses #categorydiv > h3 > span, body.post-type-sfwd-lessons #categorydiv > h3 > span, body.post-type-sfwd-topic #categorydiv > h3 > span, body.post-type-sfwd-courses #categorydiv > h3 > span").html(sfwd_data.learndash_categories_lang),jQuery(".sfwd-lessons_settings").length&&learndash_lesson_edit_page_javascript(),jQuery(".sfwd-courses_settings").length&&learndash_course_edit_page_javascript(),jQuery(".sfwd-topic_settings").length&&learndash_topic_edit_page_javascript(),jQuery("body.post-type-sfwd-assignment #learndash_assignment_metabox").length&&learndash_assignment_edit_page_javascript(),jQuery(".sfwd-quiz_settings").length&&learndash_quiz_edit_page_javascript()})),void 0===flip_expand_collapse)function flip_expand_collapse(e,s){return jQuery(e+"-"+s+" .list_arrow.flippable").hasClass("expand")?(jQuery(e+"-"+s+" .list_arrow.flippable").removeClass("expand"),jQuery(e+"-"+s+" .list_arrow.flippable").addClass("collapse"),jQuery(e+"-"+s+" .flip").slideUp()):(jQuery(e+"-"+s+" .list_arrow.flippable").removeClass("collapse"),jQuery(e+"-"+s+" .list_arrow.flippable").addClass("expand"),jQuery(e+"-"+s+" .flip").slideDown()),!1}if(void 0===flip_expand_all)function flip_expand_all(e){return jQuery(e+" .list_arrow.flippable").removeClass("collapse"),jQuery(e+" .list_arrow.flippable").addClass("expand"),jQuery(e+" .flip").slideDown(),!1}if(void 0===flip_collapse_all)function flip_collapse_all(e){return jQuery(e+" .list_arrow.flippable").removeClass("expand"),jQuery(e+" .list_arrow.flippable").addClass("collapse"),jQuery(e+" .flip").slideUp(),!1}function learndash_element_lazy_loader(e,s){var n=jQuery(e).siblings("span.learndash_lazy_loading");"undefined"==typeof spinner&&jQuery(n).show(),void 0===s.query_vars.paged&&(s.query_vars.paged=0),s.query_vars.paged=parseInt(s.query_vars.paged)+1;var t={action:"learndash_element_lazy_loader",query_data:s};jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",cache:!1,data:t,error:function(e,s,n){},success:function(s){"undefined"==typeof spinner&&jQuery(n).hide(),void 0!==s&&void 0!==s.html_options&&(""!=s.html_options?(jQuery(e).append(s.html_options),void 0!==s.query_data&&""!=s.query_data&&learndash_element_lazy_loader(e,s.query_data)):jQuery(e).attr("data",JSON.stringify(s)))}})}function update_user_course_progess_input(e,s,n){if(void 0!==s&&""!=s&&void 0!==s.user_id&&""!=s.user_id){var t=s.user_id;if(void 0!==s.course_id&&""!=s.course_id){var o=s.course_id,a=get_user_progress_data(t);if(!1!==a){if("quiz"==e){if(void 0!==s.quiz_id&&""!=s.quiz_id){var i=s.quiz_id;void 0!==a.quiz[o]&&null!=a.quiz[o]||(a.quiz[o]={}),a.quiz[o][i]=1==n?1:0}}else{if(void 0===a.course[o]){var r=get_course_data(o);if(!1===r)return;a.course[o]=r}if("topic"==e){if(void 0!==s.topic_id&&""!=s.topic_id){var l=s.topic_id;if(void 0===s.lesson_id||""==s.lesson_id)return;var _=s.lesson_id;1==n?(void 0!==a.course[o]&&null!=a.course[o]||(a.course[o]={}),void 0!==a.course[o].topics&&null!=a.course[o].topics||(a.course[o].topics={}),void 0!==a.course[o].topics[_]&&null!=a.course[o].topics[_]||(a.course[o].topics[_]={}),a.course[o].topics[_][l]=1):void 0!==a.course[o].topics[_][l]&&(delete a.course[o].topics[_][l],0===Object.keys(a.course[o].topics[_]).length&&delete a.course[o].topics[_])}}else if("lesson"==e){if(void 0===s.lesson_id||""==s.lesson_id)return;_=s.lesson_id;1==n?(void 0!==a.course[o]&&null!=a.course[o]||(a.course[o]={}),void 0!==a.course[o].lessons&&null!=a.course[o].lessons||(a.course[o].lessons={}),a.course[o].lessons[_]=1):void 0!==a.course[o].lessons[_]&&delete a.course[o].lessons[_]}}set_user_progress_data(t,a)}}}}function get_course_data(e){var s=!1;if(jQuery("#learndash-mark-course-complete-"+e).length){var n=jQuery("#learndash-mark-course-complete-"+e).attr("data-name");void 0!==n&&""!=n&&void 0!==(n=JSON.parse(n)).course_data&&(s=n.course_data)}return s}function get_user_progress_data(e){var s=!1;return jQuery("#user-progress-"+e).length&&void 0!==(s=jQuery("#user-progress-"+e).val())&&""!=s&&(s=JSON.parse(s)),s}function set_user_progress_data(e,s){jQuery("#user-progress-"+e).length&&jQuery("#user-progress-"+e).val(JSON.stringify(s))}jQuery((function(){jQuery("select[learndash_lazy_load_data]").each((function(){var e=jQuery(this).attr("learndash_lazy_load_data");void 0!==e&&""!=e&&learndash_element_lazy_loader(this,e=JSON.parse(e))}))}));var _click_type=null,_click_confirm=null,_click_checked=null;function learndash_get_checkbox_data(e){if(void 0!==e&&""!=e){var s=e.attr("data-name");if(void 0!==s&&""!=s)return s=JSON.parse(s)}return{}}function learndash_data_group_reports_do_ajax(e,s){if(void 0===e||""==e)return active_post_data={},!1;jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",cache:!1,data:e,error:function(e,s,n){},success:function(n){if(void 0!==n&&void 0!==n.data){var t=0;void 0!==n.data.total_count&&(t=parseInt(n.data.total_count));var o=0;if(void 0!==n.data.result_count&&(o=parseInt(n.data.result_count)),o<t){if(void 0!==s&&jQuery(s).length&&void 0!==n.data.progress_percent){var a=parseInt(n.data.progress_percent);jQuery(s).html(" "+a+"%")}e.data=n.data,learndash_data_group_reports_do_ajax(e,s)}else jQuery(".wrap-learndash-group-list table.groups a.learndash-data-group-reports-button").prop("disabled",!1),jQuery(s).html(""),void 0!==n.data.report_download_link&&""!=n.data.report_download_link&&(window.location.href=n.data.report_download_link)}}})}jQuery((function(){jQuery("#course_progress_details").on("click","a.learndash-profile-course-details-link",(function(){var e=jQuery(this),s=jQuery(e).next();return jQuery(".widget_course_return",s).hide(),jQuery(s).is(":visible")?jQuery(s).slideUp("fast"):jQuery(s).slideDown("slow"),!1}));var e=["select.ld_date_mm","input.ld_date_jj","input.ld_date_aa","input.ld_date_hh","input.ld_date_mn","input.learndash-user-courses-access-today"];function s(e){if("quiz"!=_click_type&&"topic"!=_click_type||!e.hasClass("learndash-mark-topic-complete")&&!e.hasClass("learndash-mark-lesson-quiz-complete")){if("quiz"==_click_type&&e.hasClass("learndash-mark-topic-quiz-complete")){var s=e.parents(".learndash-quiz-list"),n=jQuery(s).prop("id").replace("learndash-quiz-list-","");if(void 0!==n&&""!=n&&jQuery("#learndash-mark-topic-complete-"+n).length){r=jQuery("input.learndash-mark-topic-quiz-complete:checkbox",s).length,l=jQuery("input.learndash-mark-topic-quiz-complete:checkbox:checked",s).length;parseInt(r)==parseInt(l)&&!0,jQuery("#learndash-mark-topic-complete-"+n).trigger("click")}}else if(e.hasClass("learndash-mark-lesson-complete")||e.hasClass("learndash-mark-course-quiz-complete")){var t=e.parents(".course_navigation"),o=jQuery(t).prop("id").replace("course_navigation-","");if(void 0!==o&&""!=o&&jQuery("#learndash-mark-course-complete-"+o).length){r=jQuery("input.learndash-mark-lesson-complete:checkbox",t).length+jQuery("input.learndash-mark-course-quiz-complete:checkbox",t).length,l=jQuery("input.learndash-mark-lesson-complete:checkbox:checked",t).length+jQuery("input.learndash-mark-course-quiz-complete:checkbox:checked",t).length;parseInt(r)==parseInt(l)&&!0,jQuery("#learndash-mark-course-complete-"+o).trigger("click")}}}else{var a=e.parents(".learndash_topic_widget_list"),i=jQuery(a).prop("id").replace("learndash_topic_dots-","");if(void 0!==i&&""!=i&&jQuery("#learndash-mark-lesson-complete-"+i).length){var r=jQuery("input.learndash-mark-topic-complete:checkbox",a).length+jQuery("input.learndash-mark-lesson-quiz-complete:checkbox",a).length,l=jQuery("input.learndash-mark-topic-complete:checkbox:checked",a).length+jQuery("input.learndash-mark-lesson-quiz-complete:checkbox:checked",a).length;parseInt(r)==parseInt(l)&&!0,jQuery("#learndash-mark-lesson-complete-"+i).trigger("click")}}}jQuery("#course_progress_details").on("click","input.learndash-user-courses-access-changed",(function(){var s=jQuery(this),n=jQuery(s).parent(".learndash-user-courses-access-edit");void 0!==n&&(s.is(":checked")?jQuery.each(e,(function(e,s){jQuery(s,n).prop("disabled",!1)})):jQuery.each(e,(function(e,s){var t=jQuery(s,n).data("default");void 0!==t&&jQuery(s,n).val(t),jQuery(s,n).prop("disabled",!0)})))})),jQuery("#course_progress_details").on("click","input.learndash-user-courses-access-today",(function(){var e=jQuery(this),s=jQuery(e).parent(".learndash-user-courses-access-edit");if(void 0!==s&&jQuery("input.learndash-user-courses-access-changed",s).is(":checked")){var n=new Date,t=n.getFullYear();jQuery("input.ld_date_aa",s).val(t);var o=n.getMonth()+1;jQuery("select.ld_date_mm",s).val(o);var a=n.getDate();jQuery("input.ld_date_jj",s).val(a);var i=n.getHours();jQuery("input.ld_date_hh",s).val(i);var r=n.getMinutes();jQuery("input.ld_date_mn",s).val(r)}})),jQuery("#course_progress_details").on("click","input.learndash-mark-course-complete",(function(e){var s=jQuery(this);if(null===_click_type&&(_click_type="course",_click_confirm=null,_click_checked=s.is(":checked")),s.prop("checked",_click_checked),"course"==_click_type)if(1==_click_checked)_click_confirm=!0;else if(1!=_click_checked&&null==_click_confirm){var n=s.attr("data-title-unchecked-children");void 0!==n&&""!=n&&(_click_confirm=!!confirm(n))}if("course"==_click_type&&1==_click_confirm){var t=s.siblings(".course_navigation");jQuery("input:checkbox",t).length&&jQuery("input:checkbox",t).each((function(e,s){(jQuery(s).hasClass("learndash-mark-lesson-complete")||jQuery(s).hasClass("learndash-mark-course-quiz-complete"))&&jQuery(s).trigger("click")}))}"course"==_click_type&&(_click_type=null,_click_confirm=null,_click_checked=null)})),jQuery("#course_progress_details").on("click","input.learndash-mark-lesson-complete",(function(e){var n=jQuery(this);null===_click_type&&(_click_type="lesson",_click_confirm=null,_click_checked=jQuery(n).is(":checked")),n.prop("checked",_click_checked);var t=n.attr("data-name");if(void 0!==t&&""!=t&&update_user_course_progess_input("lesson",t=JSON.parse(t),_click_checked),"lesson"==_click_type)if(1==_click_checked)_click_confirm=!0;else if(1!=_click_checked&&null==_click_confirm){var o=n.attr("data-title-unchecked-children");void 0!==o&&""!=o&&(_click_confirm=!!confirm(o))}if("lesson"!=_click_type&&"topic"!=_click_type&&"quiz"!=_click_type||1==_click_checked||s(n),("lesson"==_click_type||"course"==_click_type)&&1==_click_confirm){var a=n.prop("id").replace("learndash-mark-lesson-complete-","");void 0!==a&&""!=a&&jQuery("input:checkbox","#learndash_topic_dots-"+a).length&&jQuery("input:checkbox","#learndash_topic_dots-"+a).each((function(e,s){(jQuery(s).hasClass("learndash-mark-topic-complete")||jQuery(s).hasClass("learndash-mark-lesson-quiz-complete"))&&jQuery(s).trigger("click")}))}"lesson"==_click_type&&(_click_type=null,_click_confirm=null,_click_checked=null)})),jQuery("#course_progress_details").on("click","input.learndash-mark-topic-complete",(function(e){var n=jQuery(this);null===_click_type&&(_click_type="topic",_click_confirm=null,_click_checked=jQuery(n).is(":checked")),n.prop("checked",_click_checked);var t=n.attr("data-name");if(void 0!==t&&""!=t&&update_user_course_progess_input("topic",t=JSON.parse(t),_click_checked),"topic"==_click_type)if(1==_click_checked)_click_confirm=!0;else if(1!=_click_checked&&null==_click_confirm){var o=n.attr("data-title-unchecked-children");void 0!==o&&""!=o&&(_click_confirm=!!confirm(o))}if("topic"!=_click_type&&"quiz"!=_click_type||1==_click_checked||s(n),("topic"==_click_type||"lesson"==_click_type||"course"==_click_type)&&1==_click_confirm){var a=n.prop("id").replace("learndash-mark-topic-complete-","");jQuery("input:checkbox","#learndash-quiz-list-"+a).length&&jQuery("input:checkbox","#learndash-quiz-list-"+a).each((function(e,s){jQuery(s).hasClass("learndash-mark-topic-quiz-complete")&&jQuery(s).trigger("click")}))}"topic"==_click_type&&(_click_type=null,_click_confirm=null,_click_checked=null)})),jQuery("#course_progress_details").on("click","input.learndash-mark-quiz-complete",(function(e){var n=jQuery(this);null===_click_type&&(_click_type="quiz",_click_confirm=null,_click_checked=jQuery(n).is(":checked")),n.prop("checked",_click_checked),"quiz"==_click_type&&1!=_click_checked&&s(n);var t=jQuery(this).attr("data-name");void 0!==t&&""!=t&&update_user_course_progess_input("quiz",t=JSON.parse(t),_click_checked),"quiz"==_click_type&&(_click_type=null,_click_confirm=null,_click_checked=null)}))})),jQuery((function(){jQuery("body.wp-admin.edit-php.post-type-sfwd-assignment form#posts-filter").length&&(jQuery("form#posts-filter button.assignment_approve_single").length&&jQuery("form#posts-filter button.assignment_approve_single").on("click",(function(e){e.preventDefault();var s=jQuery(this).attr("id").replace("assignment_approve_","");void 0!==s&&""!=s&&(jQuery("form#posts-filter input#cb-select-"+s).length&&jQuery("form#posts-filter input#cb-select-"+s).prop("checked",!0),jQuery("form#posts-filter select#bulk-action-selector-top").length&&jQuery("form#posts-filter select#bulk-action-selector-top").val("approve_assignment"),jQuery("form#posts-filter input#doaction").trigger("click"))})),jQuery("form#posts-filter input.learndash-award-points").length&&jQuery("form#posts-filter input.learndash-award-points").on("change",(function(e){jQuery(e.currentTarget).attr("data-learndash-input-changed","1")})),jQuery("form#posts-filter input#post-query-submit").on("click",(function(e){jQuery("form#posts-filter input.learndash-essay-points").attr("disabled",!0)})),jQuery("form#posts-filter input#doaction, form#posts-filter input#doaction2").on("submit",(function(e){jQuery("form#posts-filter input.learndash-award-points").attr("disabled",!0),jQuery('form#posts-filter input.learndash-award-points[data-learndash-input-changed="1"]').attr("disabled",!1)}))),jQuery("body.wp-admin.edit-php.post-type-sfwd-essays form#posts-filter").length&&(jQuery("form#posts-filter button.essay_approve_single").length&&jQuery("form#posts-filter button.essay_approve_single").on("click",(function(e){e.preventDefault();var s=jQuery(this).attr("id").replace("essay_approve_","");void 0!==s&&""!=s&&(jQuery("form#posts-filter input#cb-select-"+s).length&&jQuery("form#posts-filter input#cb-select-"+s).prop("checked",!0),jQuery("form#posts-filter select#bulk-action-selector-top").length&&jQuery("form#posts-filter select#bulk-action-selector-top").val("approve_essay"),jQuery("form#posts-filter input#doaction").trigger("click"))})),jQuery("form#posts-filter input.learndash-award-points").length&&jQuery("form#posts-filter input.learndash-award-points").on("change",(function(e){jQuery(e.currentTarget).attr("data-learndash-input-changed","1")})),jQuery("form#posts-filter input#post-query-submit").on("submit",(function(e){jQuery("form#posts-filter input.learndash-award-points").attr("disabled",!0)})),jQuery("form#posts-filter input#doaction, form#posts-filter input#doaction2").on("submit",(function(e){jQuery("form#posts-filter input.learndash-award-points").attr("disabled",!0),jQuery('form#posts-filter input.learndash-award-points[data-learndash-input-changed="1"]').attr("disabled",!1)}))),jQuery("body.wp-admin.edit-php.post-type-sfwd-transactions form#posts-filter").length&&jQuery("form#posts-filter button.ld_remove_access_single").length&&jQuery("form#posts-filter button.ld_remove_access_single").on("click",(function(e){e.preventDefault();var s=jQuery(this).attr("id").replace("ld_remove_access_","");void 0!==s&&""!=s&&(jQuery("form#posts-filter input#cb-select-"+s).length&&jQuery("form#posts-filter input#cb-select-"+s).prop("checked",!0),jQuery("form#posts-filter select#bulk-action-selector-top").length&&jQuery("form#posts-filter select#bulk-action-selector-top").val("remove_access"),jQuery("form#posts-filter input#doaction").trigger("click"))}))})),jQuery((function(){jQuery(".wrap-learndash-group-list table.groups a.learndash-data-group-reports-button").on("click",(function(e){e.preventDefault();var s=jQuery("input#ld-group-list-view-nonce").val(),n=(jQuery(e.target).attr("data-template"),jQuery(e.target).attr("data-slug")),t=jQuery(e.target).attr("data-nonce"),o=jQuery(e.target).attr("data-group-id"),a=jQuery("span.status",e.target);jQuery(".wrap-learndash-group-list table.groups a.learndash-data-group-reports-button").prop("disabled",!0),learndash_data_group_reports_do_ajax({action:"learndash_data_group_reports",nonce:s,data:{init:1,nonce:t,slug:n,group_id:o}},a)}))})),jQuery((function(e){function s(){return"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()}e("#email_group").on("click",(function(){e("button#email_group").attr("disabled",!0),e("span.sending_status").show(),e("span.sending_result").html("").hide();e("#group_email_ajaxurl").val();var n=e("#group_email_nonce").val(),t=e("#group_email_group_id").val(),o=e("#group_email_sub").val(),a="";if(s()?(tinymce.triggerSave(),a=tinymce.editors.groupemailtext.getContent()):a=e("#groupemailtext").val(),""!=t&&""!=n&&""!=a&&""!=o){e("span.empty_status").hide();var i={action:"learndash_group_emails",nonce:n,group_email_data:JSON.stringify({group_id:t,email_message:a,email_subject:o})};jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",cache:!1,data:i,error:function(e,s,n){},success:function(s){s&&void 0!==s&&void 0!==s.data.message&&""!=s.data.message&&e("span.sending_result").html(s.data.message).show(),e("span.sending_status").hide(),e("button#email_group").attr("disabled",!1)}})}else e("span.empty_status").show(),e("button#email_group").attr("disabled",!1),e("span.sending_status").hide(),e("span.sending_result").html("").hide()})),e("#email_reset").on("click",(function(){e("#group_email_sub").val(""),s()?tinyMCE.get("groupemailtext").setContent(""):e("#groupemailtext").val(""),e("button#email_group").attr("disabled",!1),e("span.sending_status").hide(),e("span.sending_result").html("").hide(),e("span.empty_status").hide()}))})),jQuery((function(e){if(jQuery("form#post input#post_type").length){var s=jQuery("form#post input#post_type").val();if(("sfwd-lessons"==s||"sfwd-topic"==s||"sfwd-quiz"==s)&&jQuery("#learndash_course_navigation_admin_meta input#ld-course-primary").length&&""!==jQuery("#learndash_course_navigation_admin_meta input#ld-course-primary").val()){var n=jQuery("#learndash_course_navigation_admin_meta input#ld-course-primary").val();if(void 0!==n&&""!==n&&"0"!==n&&(n=parseInt(n),jQuery("#learndash_course_navigation_admin_meta select#ld-course-switcher").length)){var t=jQuery("#learndash_course_navigation_admin_meta select#ld-course-switcher option:selected").data("course_id");if(void 0!==t&&""!==t&&(t=parseInt(t))!==n){var o="";jQuery("#learndash_course_navigation_admin_meta span.ld-course-message").length&&(o=jQuery("#learndash_course_navigation_admin_meta span.ld-course-message").html()),jQuery('select[name="'+s+'_course"]').length&&(jQuery('select[name="'+s+'_course"]').attr("disabled",!0),o.length&&jQuery("<p>"+o+"</p>").insertBefore('select[name="'+s+'_course"]')),jQuery('select[name="'+s+'_lesson"]').length&&(jQuery('select[name="'+s+'_lesson"]').attr("disabled",!0),o.length&&jQuery("<p>"+o+"</p>").insertBefore('select[name="'+s+'_lesson"]'))}}}}jQuery("#learndash_course_navigation_admin_meta select#ld-course-switcher").length&&jQuery("#learndash_course_navigation_admin_meta select#ld-course-switcher").on("change",(function(){this.value&&(window.location.href=this.value)})),jQuery("#learndash_admin_quiz_navigation select#ld-quiz-switcher").length&&jQuery("#learndash_admin_quiz_navigation select#ld-quiz-switcher").on("change",(function(){this.value&&(window.location.href=this.value)})),jQuery('#learndash_question_template input[name="templateLoad"]').length&&jQuery('#learndash_question_template input[name="templateLoad"]').on("click",(function(){if(jQuery("#learndash_question_template select#templateLoadId").length){var e=jQuery("#learndash_question_template select#templateLoadId").val();""!=e&&(window.location.href=e)}return!1})),jQuery('#learndash_quiz_templates input[name="templateLoad"]').length&&jQuery('#learndash_quiz_templates input[name="templateLoad"]').on("click",(function(){if(jQuery("#learndash_quiz_templates select#templateLoadId").length){var e=jQuery("#learndash_quiz_templates select#templateLoadId").val();""!=e&&(window.location.href=e)}return!1}))})),jQuery((function(){(jQuery("body.wp-admin.profile-php #quiz_progress_details").length||jQuery("body.wp-admin.user-edit-php #quiz_progress_details").length)&&jQuery("#quiz_progress_details").on("click","a.remove-quiz",(function(e){if(e.preventDefault(),jQuery("#ld-confirm-quiz-delete-message").length){var s=jQuery("#ld-confirm-quiz-delete-message").html();if(""!=s&&!confirm(s))return}var n=e.target,t=jQuery(n).data("quiz-nonce"),o=jQuery(n).data("quiz-user-id"),a=jQuery(n).parent("p");if(void 0!==a){var i=jQuery(a).prop("id").replace("ld-quiz-","");if(""!=t&&""!=i){var r={action:"learndash_remove_quiz",user_id:o,quiz_time:i,quiz_nonce:t};jQuery.post(ajaxurl,r,(function(e){jQuery(a).css("opacity","0.5"),jQuery(a).css("background-color","red"),jQuery(a).fadeOut("slow",(function(){jQuery(this).remove()}))}),"json")}}}))})),jQuery((function(){if(jQuery("body.wp-admin.profile-php #course_progress_details").length||jQuery("body.wp-admin.user-edit-php #course_progress_details").length){function e(e,s){jQuery.post(ajaxurl,s,(function(s){void 0!==s.success&&1==s.success&&(jQuery(e).attr("disabled","disabled"),void 0!==s.data.link_text&&jQuery(e).text(s.data.link_text))}),"json")}jQuery("#course_progress_details").on("click","a.learndash-course-exam-challenge-reset",(function(s){s.preventDefault();var n=s.currentTarget;if(!n.hasAttribute("disabled")){var t=jQuery(n).data("exam");void 0!==t&&(t.action="learndash_exam_process_reset",e(n,t))}})),jQuery("#course_progress_details").on("click","a.learndash-course-exam-challenge-complete",(function(s){s.preventDefault();var n=s.currentTarget;if(!n.hasAttribute("disabled")){var t=jQuery(n).data("exam");void 0!==t&&(t.action="learndash_exam_process_complete",e(n,t))}}))}})),jQuery(".learndash-notice-permanently-dismissible").length&&jQuery(".learndash-notice-permanently-dismissible").on("click",".notice-dismiss",(function(e,s){jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"learndash_notice_dismiss_permanently",nonce:jQuery(e.currentTarget).parent(".learndash-notice-permanently-dismissible").data("nonce"),id:jQuery(e.currentTarget).parent(".learndash-notice-permanently-dismissible").data("id")}})}));