/*
 =======================================================================*\
|| ###################################################################### ||
|| # vBulletin 6.2.3
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2026 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
vBulletin.precache("cancel delete_posts delete_thread inline_moved inlinemod_auth inlinemod_auth_password_empty loading login manage_content manage_deleted merge_posts merge_threads_ginlinemod move_posts move_threads_ginlinemod not_much_would_be_accomplished_by_merging options please_select_at_least_one_post please_select_at_least_two_posts remove_redirects this_post_has_been_successfully_approved this_post_has_been_successfully_unapproved this_topic_has_been_stuck this_topic_has_been_successfully_approved this_topic_has_been_successfully_opened this_topic_has_been_successfully_unapproved this_topic_has_been_successfully_unstuck this_topic_is_closed this_topic_is_deleted this_topic_is_undeleted thread_redirects_removed unapproved you_did_not_select_any_valid_threads".split(" "),
[]);
(function(a,F,x,l,t){function q(){x.deleteCookie(u)}function z(b,d){return new Promise((c,e)=>{l.openTemplateConfirmDialog(t,{title:"spam_management",width:500,dialogClass:"inlinemod-spam-dialog",yesPhrase:"proceed_ellipsis",noPhrase:"cancel",onClickYes:f=>{f=f.find(".spam-form");d.userids=[];f.find(":input[name='userids[]']:checked").each(function(){d.userids.push(a(this).val())});d.banusergroupid=f.find(":input[name=usergroupid]").val();d.period=f.find(":input[name=period]").val();d.banreason=f.find(":input[name=banreason]").val();
d.report=b.find(":input[name=report]").is(":checked")?1:0;vBulletin.AJAX({url:vBulletin.normalizeAjaxUrl(f.attr("action")),cpaction:!0,data:d,title_phrase:"spam_management",error_phrase:"error_deleting_posts",success:function(g){c({response:g,postData:d})}})}},{name:"inlinemod_delete_spam",data:{nodeIds:d.nodeids,banusers:d.banusers}}).then(f=>{f.find(".spam-form").offon("submit",g=>{g.preventDefault()})})})}function A(b,d,c){c||(c="approve");var e=p(a(b)),f=c+"_threads",g="approve"==c?1:0;classes=
"unapproved";itemSelector=".list-item";statusPrefix="this_topic_has_been_successfully_";d&&(classes+=" b-post--unapproved",itemSelector=".js-post",statusPrefix="this_post_has_been_successfully_");if(0==e.length)r(f);else return vBulletin.AJAX({call:"/ajax/api/node/setApproved",cpaction:!0,data:{nodeids:e,approved:g},title_phrase:f,error_phrase:"error_un_approving_topics",allowEmptyResponse:!0,success:function(h){vBulletin.inlinemod.clear.apply(b);if(h)if("thread"==m){-1!=a.inArray(a(b).attr("data-node-id"),
h)&&a(".canvas-widget").toggleClass("unapproved",g);let n=a(".inlinemod-item .cb_inlinemod",k).filter((B,v)=>-1!=a.inArray(v.value,h));n.closest(itemSelector).toggleClass(classes,g);n.closest(".js-imcb-container").find(".js-unapprove-label").toggleClass("h-hide-imp",g);l.showStatusMessage(statusPrefix+(g?"approved":"unapproved"),"approve")}else C(b);else vBulletin.warning(f,"nothing_to_do")}}),!1}function C(b){(b=a(".filter-wrapper",a(b).parents(".conversation-toolbar")).data("object-instance"))&&
"function"==typeof b.applyFilters&&b.forceApplyFilters()}function D(b){(b.is(".inlinemod-item")?b:b.find(".inlinemod-item")).each(function(){var d=a(this);if(d.find(".js-photo-preview").length||d.find(".js-post-attachments").length)d.addClass("im-attach");else for(var c=a(".js-post__content-text",this),e=["img","iframe.restrain"],f=0;f<e.length;f++){var g=a(e[f],c).length,h=a(".bbcode_container "+e[f],c).length;if(0<g&&g!=h){d.addClass("im-attach");break}}})}function r(b){vBulletin.warning(b,"please_select_at_least_one_post")}
function p(b){return(b=b.attr("data-node-id"))?[b]:w()}function w(){var b=x.getCookie(u),d=[];b&&(d=b.split(","));return d}let u,m,k;F.ensureObj("inlinemod");vBulletin.inlinemod.delete_form_thread=function(){var b=this,d=p(a(b));0==d.length?r("delete_thread"):l.openTemplateConfirmDialog(t,{title:"delete_thread",width:500,dialogClass:"no-buttons-while-loading",yesPhrase:"delete_thread",noPhrase:"cancel",onClickYes:function(c){var e=c.find(".delete-posts-form"),f=e.find("input:radio[name=deletetype]:checked").val()||
1,g={hard:2==f?1:0,reason:e.find(":input[name=deletereason]").val(),nodeids:d,deleteother:e.find(":input[name=deleteother]").is(":checked")?1:0,report:e.find(":input[name=report]").is(":checked")?1:0,banusers:"ban"==e.find("input:radio[name=useraction]:checked").val()?1:0};g.deleteother||g.banusers||g.report?setTimeout(()=>{z(e,g).then(h=>{q();"thread"==m&&2==f?location.replace(a("#breadcrumbs .crumb a:last").attr("href")):(h=a(".filter-wrapper",a(b).parents(".conversation-toolbar")).data("object-instance"))&&
"function"==typeof h.applyFilters?h.forceApplyFilters():location.reload()})},500):vBulletin.AJAX({url:vBulletin.normalizeAjaxUrl(e.attr("action")),cpaction:!0,data:g,title_phrase:"delete_thread",error_phrase:"error_deleting_posts",success:function(h){q();if("thread"==m&&2==f)-1!=a.inArray(a(b).attr("data-node-id"),h)||-1!=a.inArray(pageData.nodeid,h)?location.replace(a("#breadcrumbs .crumb a:last").attr("href")):a("input.cb_inlinemod[type=checkbox]:checked",k).each(function(){-1!=a.inArray(a(this).val(),
h)&&a(this).parents(".inlinemod-item").remove()});else{-1!=a.inArray(a(b).attr("data-node-id"),h)&&a(".conversation-content-widget").addClass("deleted");var n=a(".filter-wrapper",a(b).parents(".conversation-toolbar")).data("object-instance");n&&"function"==typeof n.applyFilters?n.forceApplyFilters():location.reload()}}})}},{name:"inlinemod_delete_form",data:{postcount:d.length,nodeids:d,deleteposts:1,removeposts:1,firstpost:1}})};vBulletin.inlinemod.delete_dialog=function(b,d){l.openTemplateConfirmDialog(t,
{title:"delete_posts",width:500,dialogClass:"no-buttons-while-loading",yesPhrase:"delete_posts",noPhrase:"cancel",onClickYes:c=>{var e=c.find(".delete-posts-form"),f={hard:2==(e.find("input:radio[name=deletetype]:checked").val()||1)?1:0,reason:e.find(":input[name=deletereason]").val(),nodeids:b,deleteother:e.find(":input[name=deleteother]").is(":checked")?1:0,report:e.find(":input[name=report]").is(":checked")?1:0,banusers:"ban"==e.find("input:radio[name=useraction]:checked").val()?1:0};f.deleteother||
f.banusers||f.report?setTimeout(()=>{z(e,f).then(g=>{vBulletin.ensureFun(d)(g.response,g.postData);vBulletin.inlinemod.clear()})},500):vBulletin.AJAX({url:vBulletin.normalizeAjaxUrl(e.attr("action")),cpaction:!0,data:f,title_phrase:"delete_posts",error_phrase:"error_deleting_posts",success:g=>{vBulletin.ensureFun(d)(g,f);vBulletin.inlinemod.clear()}})}},{name:"inlinemod_delete_form",data:{postcount:b.length,nodeids:b,deleteposts:1,removeposts:1,firstpost:1}})};vBulletin.inlinemod.delete_form=function(){var b=
a(this),d=p(b);0==d.length?r("delete_posts"):vBulletin.inlinemod.delete_dialog(d,function(c,e){if(e.nodeids&&a.isArray(e.nodeids)){var f=!1;a.each(e.nodeids,function(g,h){-1==a.inArray(h,c)&&(f=!0)});f&&vBulletin.warning("delete_posts","error_deleting_one_or_more_posts")}q();m&&"thread"==m&&1==e.hard?!b||-1==a.inArray(b.attr("data-node-id"),c)&&-1==a.inArray(pageData.nodeid,c)?a("input.cb_inlinemod[type=checkbox]:checked",k).each(function(){-1!=a.inArray(a(this).val(),c)&&a(this).closest(".inlinemod-item").remove()}):
location.replace(a("#breadcrumbs .crumb a:last").attr("href")):(e=a(".filter-wrapper",b.parents(".conversation-toolbar")).data("object-instance"))&&"function"==typeof e.applyFilters?e.forceApplyFilters():location.reload()})};vBulletin.inlinemod.moveThreads=function(){var b=p(a(this));movephrase="move_threads_ginlinemod";0==b.length?r(movephrase):l.openTemplateConfirmDialog(t,{title:movephrase,width:500,dialogClass:"inlinemod-move-dialog",yesPhrase:movephrase,noPhrase:"cancel",onClickYes:d=>{d=d.find(".move-posts-form");
var c={};d.find("input[name=enableredirect]").prop("checked")&&(c.redirect=d.find("#rb_redirect_perm").prop("checked")?"perm":"expires","expires"==c.redirect&&(c.period=d.find("select[name=period]").val(),c.frame=d.find("select[name=frame]").val()));c={to_parent:d.find("select[name=destchannelid]").val(),nodeids:b,leaveRedirectData:c};vBulletin.AJAX({url:vBulletin.normalizeAjaxUrl(d.attr("action")),cpaction:!0,data:c,type:d.attr("method"),title_phrase:movephrase,error_phrase:"error_moving_threads",
success:function(e){q();l.alert(movephrase,"inline_moved","",()=>location.reload())}})}},{name:"inlinemod_move_form",data:{postcount:b.length},title_phrase:movephrase,error_phrase:"error_loading_move_form"})};vBulletin.inlinemod.movePosts=function(){var b=this,d=p(a(b));0==d.length?r("move_posts"):l.openTemplateConfirmDialog(t,{title:"move_posts",width:500,dialogClass:"inlinemod-moveposts-dialog",yesPhrase:"move_posts",noPhrase:"cancel",onClickYes:c=>{c=c.find(".move-posts-form");var e=c.find("input:radio[name=type]:checked").val()||
0;c={newtitle:c.find(':input[name="title"]').val(),to_parent:0==e?c.find(':input[name="destchannelid"]').val():c.find(':input[name="mergethreadurl"]').val().replace(pageData.baseurl+"/",""),nodeids:d,makeTopic:!0};vBulletin.AJAX({call:"/ajax/api/node/moveNodes",cpaction:!0,data:c,title_phrase:"move_posts",error_phrase:"error_moving_posts",success:function(f){q();if("thread"==m)-1!=a.inArray(a(b).attr("data-node-id"),f)||-1!=a.inArray(pageData.nodeid,f)?location.replace(a("#breadcrumbs .crumb a:last").attr("href")):
a("input.cb_inlinemod[type=checkbox]:checked",k).each(function(){-1!=a.inArray(a(this).val(),f)&&a(this).parents(".inlinemod-item").remove()});else{var g=a(".filter-wrapper",a(b).parents(".conversation-toolbar")).data("object-instance");g&&"function"==typeof g.applyFilters&&g.forceApplyFilters()}vBulletin.AJAX({call:"/ajax/api/route/getNodeUrl",data:{nodeid:f[0]},success:function(h){location.href=pageData.baseurl+h}})}})}},{name:"inlinemod_movePosts",data:{postcount:d.length},title_phrase:"move_posts",
error_phrase:"error_loading_move_form"})};vBulletin.inlinemod.stickThreads=function(b){b=b||"stick";let d=this,c=p(a(d)),e="stick"==b;if(0==c.length)r(b+"_threads");else return vBulletin.AJAX({call:"/ajax/api/node/setSticky",cpaction:!0,data:{nodeids:c,stick:e?1:0},title_phrase:b+"_threads",error_phrase:"error_sticking_topics",success:function(f){vBulletin.inlinemod.clear.apply(d);"thread"==m?(a(".canvas-widget").toggleClass("sticky",e),l.showStatusMessage(e?"this_topic_has_been_stuck":"this_topic_has_been_successfully_unstuck",
"stick")):(f=a(".filter-wrapper",a(d).parents(".conversation-toolbar")).data("object-instance"))&&"function"==typeof f.applyFilters&&("topic"==m&&f.updatePageNumber(1),f.forceApplyFilters())}}),!1};vBulletin.inlinemod.unstickThreads=function(){return vBulletin.inlinemod.stickThreads.apply(this,["unstick"])};vBulletin.inlinemod.openCloseThreads=function(b){var d=this,c=p(a(d));b||(b="open");if(0==c.length)return r(b+"_threads"),!1;vBulletin.AJAX({call:"/ajax/api/node/"+b+"Node",cpaction:!0,data:{nodeid:c},
title_phrase:b+"_threads",error_phrase:"error_open_close_topic",success:function(e){vBulletin.inlinemod.clear.apply(d);"thread"==m?(e=a(".canvas-widget"),"open"==b?(e.removeClass("showclosed"),"0"==a(".canvas-widget #canmoderate").val()&&e.removeClass("closed_content-entry-box"),e="this_topic_has_been_successfully_opened"):(e.addClass("showclosed"),"0"==a(".canvas-widget #canmoderate").val()&&e.addClass("closed_content-entry-box"),e="this_topic_is_closed"),l.showStatusMessage(e,"close")):(e=a(".filter-wrapper",
a(d).parents(".conversation-toolbar")).data("object-instance"))&&"function"==typeof e.applyFilters&&e.forceApplyFilters()}});return!1};vBulletin.inlinemod.approvePosts=function(b){return A(this,!0,b)};vBulletin.inlinemod.approveThreads=function(b){return A(this,!1,b)};vBulletin.inlinemod.changeAnswer=function(b){var d=a(this),c=p(d),e=d.data("starter")||0,f="set"==b,g=b+"asanswer",h="setAsAnswer",n={};b||(b="approve");if("remove"!=b){if(0==c.length||1<c.length||c[0]==e){vBulletin.warning(g,"setasanswer_onlyone");
return}n={nodeid:c[0],set:f?1:0}}else h="removeAnswers",n={nodeids:c};vBulletin.AJAX({call:"/ajax/api/node/"+h,cpaction:!0,data:n,title_phrase:g,error_phrase:"error_setasanswer",success:function(B){vBulletin.inlinemod.clear.apply(d[0]);if(B)if(l.showStatusMessage(f?"setasanswer_success":"unsetasanswer_success","setasanswer"),"thread"==m)if("remove"==b){let v=a(".js-post.pinned-answer");v.hide("slow",()=>{v.remove()});a(".js-post.isanswer").toggleClass("isanswer",!1)}else c.forEach(v=>{a('li.js-post[data-node-id="'+
v+'"]').toggleClass("isanswer",f)});else C(d[0]);else vBulletin.warning(g,"nothing_to_do")}});return!1};vBulletin.inlinemod.unfeatureThreads=function(){vBulletin.inlinemod.featureThreads.apply(this,["unfeature"])};vBulletin.inlinemod.featureThreads=function(b){b=b||"feature";let d=this,c=p(a(d)),e="feature"==b;if(0==c.length)r(b+"_threads");else return vBulletin.AJAX({call:"/ajax/api/node/setFeatured",cpaction:!0,data:{nodeids:c,set:e?1:0},title_phrase:b+"_threads",error_phrase:"error_featuring_topics",
success:function(f){vBulletin.inlinemod.clear.apply(d);if("thread"==m)-1!=a.inArray(a(d).attr("data-node-id"),f)&&a(".canvas-widget").toggleClass("featured",e),a(".inlinemod-item .cb_inlinemod",k).each(function(){-1!=a.inArray(this.value,f)&&a(this).closest(".list-item").toggleClass("unfeatured",!e)}),l.showStatusMessage("this_topic_has_been_"+(e?"featured":"unfeatured"),"feature");else{var g=a(".filter-wrapper",a(d).parents(".conversation-toolbar")).data("object-instance");g&&"function"==typeof g.applyFilters&&
g.forceApplyFilters()}}}),!1};vBulletin.inlinemod.undelete=function(){var b=this,d=p(a(b));if(0==d.length)r("undelete_threads");else return vBulletin.AJAX({call:"/ajax/api/node/undeleteNodes",cpaction:!0,data:{nodeids:d},title_phrase:"undelete_threads",error_phrase:"error_undeleting_topics",success:function(c){vBulletin.inlinemod.clear.apply(b);if("thread"==m)-1!=a.inArray(a(b).attr("data-node-id"),c)&&a(".conversation-content-widget").removeClass("deleted"),a(".inlinemod-item .cb_inlinemod",k).each(function(){-1!=
a.inArray(this.value,c)&&a(this).closest(".js-post").removeClass("deleted b-post--deleted")}),l.showStatusMessage("this_topic_is_undeleted","delete");else{var e=a(".filter-wrapper",a(b).parents(".conversation-toolbar")).data("object-instance");e&&"function"==typeof e.applyFilters&&e.forceApplyFilters()}}}),!1};vBulletin.inlinemod.unapprovePosts=function(){return vBulletin.inlinemod.approvePosts.apply(this,["unapprove"])};vBulletin.inlinemod.unapproveThreads=function(){return vBulletin.inlinemod.approveThreads.apply(this,
["unapprove"])};vBulletin.inlinemod.viewSelectedPosts=function(){0<w().length?window.location=pageData.baseurl+"/search?searchJSON="+encodeURIComponent(JSON.stringify({specific:w()})):vBulletin.error("inline_mod","nothing_to_view")};vBulletin.inlinemod.mergePosts=function(){let b=this,d=p(a(b));2>d.length?vBulletin.warning("merge_posts","please_select_at_least_two_posts"):l.openTemplateConfirmDialog(t,{title:"merge_posts",width:600,dialogClass:"inlinemod-mergeposts-dialog",yesPhrase:"merge_posts",
noPhrase:"cancel",onClickYes:c=>{var e=c.find("#hiddenVar_mergePosts").closest("form");e.find("[name=securitytoken]").remove();var f=e.serializeArray();f.push({name:"destnodeid",value:c.find(':input[name="destnodeid"]').val()});f.push({name:"destauthorid",value:c.find(':input[name="destauthorid"]').val()});f.push({name:"contenttype",value:e.attr("data-content-type")});vBulletin.AJAX({call:"/ajax/api/node/mergePosts",cpaction:!0,data:{input:f},title_phrase:"merge_posts",error_phrase:"error_merging_posts",
success:function(g){q();(g=a(".filter-wrapper",a(b).parents(".conversation-toolbar")).data("object-instance"))&&"function"==typeof g.applyFilters?g.forceApplyFilters():location.reload()}})}},{name:"inlinemod_mergePosts",data:{posts:d.join(","),postcount:d.length},title_phrase:"merge_posts",error_phrase:"error_loading_merge_form"}).then(c=>{let e=a(".js-content-entry form",c).data("content-type");a("body").trigger(e+"_editform_onload",[c,()=>{}])})};vBulletin.inlinemod.copyPosts=function(){var b=this,
d=p(a(b));0==d.length?r("copy_posts"):l.openTemplateConfirmDialog(t,{title:"copy_posts",width:500,dialogClass:"inlinemod-copyposts-dialog",yesPhrase:"copy_posts",noPhrase:"cancel",onClickYes:c=>{c=c.find(".copy-posts-form");var e=c.find("input:radio[name=type]:checked").val()||0;e={newtitle:c.find(':input[name="title"]').val(),to_parent:0==e?c.find(':input[name="destchannelid"]').val():c.find(':input[name="mergethreadurl"]').val().replace(pageData.baseurl+"/",""),nodeids:d};vBulletin.AJAX({url:vBulletin.normalizeAjaxUrl(c.attr("action")),
cpaction:!0,data:e,type:c.attr("method"),title_phrase:"copy_posts",error_phrase:"error_copying_posts",success:function(f){q();if("thread"==m){if(a.isPlainObject(f)){var g=0;a.each(f,function(h,n){if(a(".js-post[data-node-id={0}]".format(h)).hasClass("js-conversation-starter"))return g=n,!1});g||a.each(f,function(h,n){g=n;return!1});vBulletin.AJAX({call:"/ajax/api/route/getNodeUrl",data:{nodeid:g},success:function(h){location.href=pageData.baseurl+h}})}}else(f=a(".filter-wrapper",a(b).parents(".conversation-toolbar")).data("object-instance"))&&
"function"==typeof f.applyFilters?f.forceApplyFilters():location.reload()}})}},{name:"inlinemod_copyPosts",data:{postcount:d.length},title_phrase:"copy_posts",error_phrase:"error_loading_copy_posts_form"}).then(c=>{const e=c.find(".js-copy-to-existing"),f=c.find(".js-copy-to-new"),g=c.find(".js-check-existing");c=c.find(".js-check-new");a(g).offon("click change input",h=>{e.prop("checked",!0);console.log(h)});a(c).offon("click change input",h=>{f.prop("checked",!0);console.log(h)})})};vBulletin.inlinemod.mergeThreads=
function(){var b=this,d=w();2>d.length?vBulletin.warning("merge_threads_ginlinemod",1==d.length?"not_much_would_be_accomplished_by_merging":"you_did_not_select_any_valid_threads"):l.openTemplateConfirmDialog(t,{title:"merge_threads_ginlinemod",width:500,dialogClass:"inlinemod-merge-dialog",yesPhrase:"merge_threads_ginlinemod",noPhrase:"cancel",onClickYes:c=>{c=c.find(".merge-threads-form");var e={};c.find("input[name=enableredirect]").prop("checked")&&(e.redirect=c.find("#rb_redirect_perm").prop("checked")?
"perm":"expires","expires"==e.redirect&&(e.period=c.find("select[name=period]").val(),e.frame=c.find("select[name=frame]").val()));e={targetnodeid:c.find('select[name="targetnodeid"]').val(),nodeids:d,leaveRedirectData:e};vBulletin.AJAX({url:vBulletin.normalizeAjaxUrl(c.attr("action")),cpaction:!0,data:e,type:c.attr("method"),title_phrase:"merge_threads_ginlinemod",error_phrase:"error_merging_threads",success:function(f){q();(f=a(".filter-wrapper",a(b).parents(".conversation-toolbar")).data("object-instance"))&&
"function"==typeof f.applyFilters?f.forceApplyFilters():location.reload()}})}},{name:"inlinemod_mergeThreads",data:{postcount:d.length,nodeids:d},title_phrase:"merge_threads_ginlinemod"})};vBulletin.inlinemod.manage_deleted_form=function(b){function d(){var f=a(".manage-deleted-form"),g=a(".manage-deleted-form input:radio[name=deletetype]:checked").val();g&&(a("input:checkbox[name=keep_attachments]",f).prop("disabled",1!=g),a("input:checkbox[name=topicopen]",f).prop("disabled",2!=g),a("input:checkbox[name=topicsticky]",
f).prop("disabled",2!=g),a("input:checkbox[name=topicvisible]",f).prop("disabled",2!=g));f.find("select.prefixid").selectBox()}var c=a(this),e=b?b:c.parents(".js-post").attr("data-node-id");l.openTemplateConfirmDialog(t,{title:b?"manage_content":"manage_deleted",width:510,dialogClass:"inlinemod-delete-dialog",yesPhrase:"save",noPhrase:"cancel",onClickYes:f=>{f=f.find(".manage-deleted-form");vBulletin.AJAX({url:vBulletin.normalizeAjaxUrl(f.attr("action")),cpaction:!0,data:{nodeid:e,params:{deletetype:f.find("input:radio[name=deletetype]:checked").val()||
0,reason:f.find(":input[name=deletereason]").val(),prefixid:f.find("select[name=prefixid]").val()||0,topictitle:f.find("input:text[name=topic_title]").val()||"",moderator_notes:f.find("textarea[name=moderator_notes]").val()||"",post_icon:f.find("input:radio[name=iconid]:checked").val()||0,keep_attachments:f.find("input:checkbox[name=keep_attachments]:checked").val()?1:0,option_open:f.find("input:checkbox[name=topicopen]:checked").val()?1:0,option_sticky:f.find("input:checkbox[name=topicsticky]:checked").val()?
1:0,option_visible:f.find("input:checkbox[name=topicvisible]:checked").val()?1:0}},success:function(g){q();(g=a(".conversation-toolbar .filter-wrapper",a(c).parents(".inlinemod-container")).data("object-instance"))&&"function"==typeof g.applyFilters?g.forceApplyFilters():location.reload()},error_phrase:"error_moderating_post"})}},{name:"inlinemod_manage_deleted",data:{nodeid:e,isblogcomment:1==c.parents(".js-comments--blog").length?1:0,isarticlecomment:1==c.parents(".js-comments--article").length?
1:0}}).then(f=>{f.dialog("option","position",{of:window});a(document).offon("click",".manage-deleted-form input:radio[name=deletetype]",d);d()})};vBulletin.inlinemod.editTopic=function(){var b=a(this).attr("data-node-id");vBulletin.inlinemod.manage_deleted_form(b)};vBulletin.inlinemod.removeRedirect=function(){var b=a(this).attr("data-node-id");vBulletin.AJAX({call:"/ajax/api/content_redirect/removeRedirectsFromNode",data:{nodeid:b},success:function(d){vBulletin.alert("remove_redirects","thread_redirects_removed")}})};
vBulletin.inlinemod.selectAll=function(){E(a(this),!0,"")};vBulletin.inlinemod.selectNone=function(){vBulletin.inlinemod.clear.apply(this)};vBulletin.inlinemod.selectClass=function(b){E(a(this),!0,"."+b)};vBulletin.inlinemod.invertSelection=function(){a(".inlinemod-item .cb_inlinemod",a(this).parents(".inlinemod-container")).each(function(){var b=a(this);b.prop("checked",!b.prop("checked"));y(b)})};vBulletin.inlinemod.clear=function(){var b=a(this).parents(".inlinemod-container");a(".inlinemod-item .cb_inlinemod:checked",
b).each(function(){a(this).prop("checked",!1).closest(".inlinemod-item").removeClass("inlinemod_highlight")});a(".js-inlinemod-main-checkbox",b).prop("checked",!1);q()};var E=function(b,d,c){a(".inlinemod-item"+c+" .cb_inlinemod",b.parents(".inlinemod-container")).each(function(){var e=a(this);e.prop("checked",d);y(e)})},y=function(b){var d=b.val(),c=w();if(b.prop("checked"))b.closest(".inlinemod-item").addClass("inlinemod_highlight"),-1==a.inArray(d,c)&&c.push(d),d=a(".inlinemod-item .cb_inlinemod",
k),d.length==d.filter(":checked").length&&a(".js-inlinemod-main-checkbox",k).prop("checked",!0);else{b.closest(".inlinemod-item").removeClass("inlinemod_highlight");b=[];for(var e=0;e<c.length;e++)c[e]!=d&&b.push(c[e]);c=b;a(".js-inlinemod-main-checkbox",k).prop("checked",!1)}cookie_str=c.join(",");x.setCookie(u,cookie_str)};vBulletin.inlinemod.markRead=function(){var b=a(this).closest(".channel-content-widget").attr("data-node-id");vBulletin.markchannelsread(b,{success:function(){location.reload()}})};
vBulletin.inlinemod.init=function(b){b=b instanceof a?b:a(b);0==b.length&&(b=a("body"));k=b.hasClass("inlinemod-container")?b:a(".inlinemod-container",b);m=a(".moderationmenu_container",k).attr("data-view");u=pageData.inlinemod_cookie_name+"_"+m;var d=w();if(0<d.length){var c=0;b=a(".inlinemod-item .cb_inlinemod",k).each(function(){-1!=a.inArray(this.value,d)&&(c++,a(this).prop("checked",!0),a(this).closest(".inlinemod-item").addClass("inlinemod_highlight"))});a(".js-inlinemod-main-checkbox",k).prop("checked",
0<c&&c==b.length)}D(k);a(document).on("vb-loadnewposts",function(e,f){D(f.insertedHtml)})};a(document).ready(function(){k=a(".inlinemod-container");u||(k.is(":visible")?vBulletin.inlinemod.init(k):u=pageData.inlinemod_cookie_name);a(".inlinemod-container .js-inlinemod-main-checkbox").off("click mouseover").on("click",function(){vBulletin.inlinemod[this.checked?"selectAll":"selectNone"].apply(this)}).on("mouseover",function(){this.title=this.checked?a(this).attr("data-title-unselect"):a(this).attr("data-title-select")});
a(".inlinemod-container").off("click",".inlinemod-item input.cb_inlinemod").on("click",".inlinemod-item input.cb_inlinemod",function(b){y(a(this))});a(".moderationmenu_container .moderation-action a[data-action], .js-markread").off("click").on("click",function(b){b.stopPropagation();a(this).closest(".js-comp-menu-dropdown").removeClass("b-comp-menu-dropdown--open");var d=a(this).attr("data-action");if(!d)return console.warn("Unable to find the inline moderation function name."),!1;b=vBulletin.inlinemod[d];
"function"==typeof b?(d=(d=a(this).attr("data-params"))?d.split(","):[],b.apply(this,d)):console.warn('Unable to find the inline moderation function "{0}". Please ensure that it is defined in inlinemod.js.'.format("vBulletin.inlinemod."+d));return!1});a(".conversation-content-widget").off("click",".conversation-status-message .close").on("click",".conversation-status-message .close",function(){a(this).parent().fadeOut("slow")});return!1})})(jQuery,vBulletin,vBulletin.storagetools,vBulletin.dialogtools,
vBulletin.ajaxtools);
