`});break;default:a()}}_getHash(e){return"#post"+e}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Forum/Ui/Post/Loader",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Dom/Change/Listener","WoltLabSuite/Core/Dom/Util"],(function(e,t,a,o,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=a.__importStar(o),r=a.__importStar(r),s=a.__importDefault(s),i=a.__importDefault(i);class n{constructor(e,t){this.postInlineEditor=null,this.postManager=e,this.postInlineEditor=t,document.querySelectorAll(".wbbPostDeleted").forEach((e=>{e.addEventListener("click",(e=>this.click(e)))}))}click(e){const t=e.target;if("A"===t.nodeName||"INPUT"===t.nodeName)return;const a=~~e.currentTarget.dataset.objectId;this.load([a])}load(e){o.api(this,{objectIDs:e})}_ajaxSuccess(e){var t;const a=document.createElement("div");let o;i.default.setInnerHtml(a,e.returnValues.template),Array.from(a.children).forEach((e=>{if("LI"===e.nodeName)o=e;else if("SCRIPT"===e.nodeName&&o)return void o.appendChild(e);const t=e.querySelector(".wbbPost").dataset.objectId,a=document.getElementById(`post${t}`);a.insertAdjacentElement("beforebegin",e),a.remove()})),this.postManager.rebuild(),null===(t=this.postInlineEditor)||void 0===t||t.rebuild(),r.reload(),s.default.trigger()}_ajaxSetup(){return{data:{actionName:"getPosts",className:"wbb\\data\\post\\PostAction",parameters:{showCollapsedPosts:!0}}}}}let l;t.init=function(e,t){l||(l=new n(e,t))}})),define("WoltLabSuite/Forum/Ui/Post/Manager",["require","exports","tslib","WoltLabSuite/Core/Core","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Ui/Message/Manager"],(function(e,t,a,o,r,s,i){"use strict";o=a.__importStar(o),r=a.__importStar(r),s=a.__importStar(s),i=a.__importDefault(i);class n extends i.default{constructor(e){super({className:"wbb\\data\\post\\PostAction",selector:".wbbPost"}),this.threadId=e,this.threadUpdateHandler=void 0}setThreadUpdateHandler(e){this.threadUpdateHandler=e}update(e,t,a){a.enableNote?this.setNote(e,"wbbPostDelayedNote",a.enableNote):super.update(e,t,a)}_updateState(e,t,a,o){switch(super._updateState(e,t,a,o),t){case"deleted":{const t=e.dataset.objectId;this._elements.delete(t),e.parentElement&&"LI"===e.parentElement.nodeName?e.parentElement.remove():e.remove();break}case"isClosed":if(o){const t=document.createElement("li");t.className="wbbPostClosed";const a=document.createElement("span");a.classList.add("jsTooltip","icon","icon16","fa-lock"),a.title=r.get("wbb.post.closed"),t.appendChild(a);const o=e.querySelector(".messageQuickOptions");null==o||o.insertAdjacentElement("afterbegin",t)}else{const t=e.querySelector(".wbbPostClosed");null==t||t.remove()}break;case"isDeleted":if(!o){const t=e.querySelector(".wbbPostDeleteNote");null==t||t.remove()}}}_ajaxSuccess(e){var t;if(Object.entries(e.returnValues.postData).forEach((([e,t])=>{void 0!==this._elements.get(e)&&this.updateItems([e],t)})),null===(t=e.returnValues.threadData)||void 0===t?void 0:t[this.threadId]){const t=e.returnValues.threadData[this.threadId];t.deleted?s.show(void 0,(()=>{window.location.href=t.deleted})):this.threadUpdateHandler&&this.threadUpdateHandler.update(this.threadId,t)}}}return o.enableLegacyInheritance(n),n})),define("WoltLabSuite/Forum/Controller/Thread",["require","exports","tslib","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Ui/Reaction/Handler","../Ui/Post/InlineEditor","../Ui/Post/Loader","../Ui/Post/Manager"],(function(e,t,a,o,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPostManager=t.getPostInlineEditor=t.getPostLikeHandler=t.init=void 0,o=a.__importStar(o),r=a.__importDefault(r),s=a.__importDefault(s),i=a.__importStar(i),n=a.__importDefault(n);let l=null,d=null,c=null,u=0;t.init=function(e,t,a){u=e,t.clipboard&&o.setup({hasMarkedItems:a.clipboard.hasMarkedItems,pageClassName:"wbb\\page\\ThreadPage",pageObjectId:u}),t.postLikeHandler&&(l=new r.default("com.woltlab.wbb.likeablePost",{containerSelector:".wbbPost:not(.messageCollapsed)"})),t.postManager&&(c=new n.default(e),t.postInlineEditor&&(d=new s.default(u,c,a.postInlineEditor)),t.postLoader&&i.init(c,d))},t.getPostLikeHandler=function(){return l},t.getPostInlineEditor=function(){return d},t.getPostManager=function(){return c}})),define("WoltLabSuite/Forum/Ui/Mobile",["require","exports","tslib","WoltLabSuite/Core/Ui/Mobile","WoltLabSuite/Core/Ui/Screen"],(function(e,t,a,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=a.__importStar(o),r=a.__importStar(r),t.init=function(){const e=document.querySelector(".wbbBoardList");if(!e)return;const t=e.getElementsByClassName("wbbBoardMain");r.on("screen-sm-down",{match:()=>o.rebuildShadow(t,".containerHeadline > h3 > a"),unmatch:()=>o.removeShadow(t),setup:()=>o.rebuildShadow(t,".containerHeadline > h3 > a")})}})),define("WoltLabSuite/Forum/Controller/Board/SubscriptionStatusHandler",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Language","WoltLabSuite/Core/Event/Handler"],(function(e,t,a,o,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionStatusHandler=void 0,o=a.__importStar(o),r=a.__importStar(r),s=a.__importStar(s),i=a.__importStar(i);class n{constructor(){this.dropdowns=new Map,document.querySelectorAll(".subscribeBoardStatusDropdown").forEach((e=>{if(!e.dataset.boardId)throw new Error("Missing boardID for '.subscribeBoardStatusDropdown' element.");const t=parseInt(e.dataset.boardId,10);this.dropdowns.has(t)||this.dropdowns.set(t,new Set),this.dropdowns.get(t).add(e),e.querySelectorAll(".subscribeBoardSelect").forEach((e=>{if(!e.dataset.status)throw new Error("Missing 'data-status' attribute for '.subscribeBoardSelect' element.");e.addEventListener("click",(e=>{this.click(e)}))}))}))}async click(e){e.preventDefault();const t=e.target,a=t.closest(".subscribeBoardStatusDropdown"),n=t.closest(".subscribeBoardSelect").dataset.status,l=parseInt(a.dataset.boardId,10),d=await o.dboAction("saveSubscriptionStatus","wbb\\data\\board\\BoardStatusAction").payload({boardID:l,status:n}).dispatch();this.dropdowns.has(d.boardID)&&this.dropdowns.get(d.boardID).forEach((e=>{var t;e.querySelectorAll(".subscribeBoardSelect").forEach((e=>{e.classList.remove("active")})),null===(t=e.querySelector(`.subscribeBoardSelect[data-status="${d.status}"]`))||void 0===t||t.classList.add("active")})),document.querySelectorAll(`.subscribeBoardStatusDropdownToggle[data-board-id="${d.boardID}"]`).forEach((e=>{const t=e.querySelector(".icon"),a=e.querySelector("span:not(.icon)");"normal"!==d.status?(e.classList.add("active"),t.classList.remove("fa-bookmark","fa-ban","fa-bookmark-o"),t.classList.add("ignoring"===d.status?"fa-ban":"fa-bookmark"),a.textContent=s.get("wbb.board.status."+("ignoring"===d.status?"ignoring":"watching"))):(e.classList.remove("active"),t.classList.remove("fa-bookmark","fa-ban"),t.classList.add("fa-bookmark-o"),a.textContent=s.get("wcf.user.objectWatch.button.subscribe")),e.dataset.isSubscribed="threadsOnly"===d.status?"1":"0"})),i.fire("com.woltlab.wcf.objectWatch","updatedSubscription"),r.show()}}t.SubscriptionStatusHandler=n,t.default=n})),define("WoltLabSuite/Forum/Controller/Board/WatchedList",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Core","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Confirmation"],(function(e,t,a,o,r,s,i){"use strict";function n(){return m.filter((e=>e.checked)).map((e=>~~e.dataset.objectId))}function l(){u(),b()}function d(){const e=r.stringToBool(p.dataset.hasUnmarkedBoards);m.forEach((t=>t.checked=e)),u(),b()}function c(){const e=n(),t=`wbb.board.watchedBoards.${e.length?"stopWatchingMarked":"stopWatchingAll"}.confirmMessage`;i.show({confirm(){o.apiOnce({data:{actionName:"stopWatching",className:"wbb\\data\\board\\BoardAction",objectIDs:e},success(){window.location.reload()}})},message:s.get(t)})}function u(){const e=n().length;h.textContent=e?s.get("wbb.board.watchedBoards.stopWatchingMarked",{count:e}):s.get("wbb.board.watchedBoards.stopWatchingAll")}function b(){const e=m.some((e=>!e.checked));p.dataset.hasUnmarkedBoards=e?"true":"false";const t=e?"markAll":"unmarkAll";p.textContent=s.get(`wbb.board.watchedBoards.${t}`)}let h;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=a.__importStar(o),r=a.__importStar(r),s=a.__importStar(s),i=a.__importStar(i);const m=[];let p;t.setup=function(){document.querySelectorAll(".wbbBoard .containerHeadline > h3").forEach((e=>{const t=document.createElement("input");t.type="checkbox";const a=e.closest(".wbbBoardContainer");t.dataset.objectId=a.dataset.boardId,t.addEventListener("change",l),t.style.setProperty("margin-right","7px",""),m.push(t),e.insertAdjacentElement("afterbegin",t)})),h=document.getElementById("stopWatchingButton"),h.addEventListener("click",c),p=document.getElementById("markAllWatchedBoards"),p.addEventListener("click",d),p.dataset.hasUnmarkedBoards="1"}})),define("WoltLabSuite/Forum/Controller/Thread/LabelCondition",["require","exports","tslib","WoltLabSuite/Core/Core","WoltLabSuite/Core/Dom/Util"],(function(e,t,a,o,r){"use strict";o=a.__importStar(o),r=a.__importDefault(r);class s{constructor(e,t){if(this._boardSelector=document.getElementById(e),null!==this._boardSelector)this._boardSelector.addEventListener("change",(()=>this.change()));else{if(this._boardSelector=document.getElementById(`${e}Container`),null===this._boardSelector)throw new Error(`Unknown board selector with id '${e}.`);this._boardSelector.querySelectorAll("input").forEach((e=>e.addEventListener("change",(()=>this.change()))))}if(this._labelGroupMapping=t,this._labelLists=Array.from(document.querySelectorAll(".labelList")),0===this._labelLists.length)return;this.change();this._labelLists[0].closest("form").addEventListener("submit",(()=>this.submit()))}change(){let e;e=this._boardSelector instanceof HTMLSelectElement?this._boardSelector.multiple?Array.from(this._boardSelector.options).filter((e=>e.selected)).map((e=>~~e.value)):[~~this._boardSelector.value]:Array.from(this._boardSelector.querySelectorAll("input")).filter((e=>e.checked)).map((e=>~~e.value));let t=[];e.length&&(t=this._labelGroupMapping[e[0]]||[],t=t.filter((t=>{for(const a of e){if(!(this._labelGroupMapping[a]||[]).includes(t))return!1}return!0}))),this._labelLists.forEach((e=>{const a=~~e.dataset.objectId,o=e.closest("dl");t.includes(a)?r.default.show(o):r.default.hide(o)}))}submit(){this._labelLists.forEach((e=>{const t=e.querySelector("dl");if(r.default.isHidden(t)){const t=e.querySelector(".labelChooser");window.jQuery(t).data("labelID",0)}}))}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Forum/Controller/Thread/SubscriptionStatusHandler",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Language","WoltLabSuite/Core/Event/Handler"],(function(e,t,a,o,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionStatusHandler=void 0,o=a.__importStar(o),r=a.__importStar(r),s=a.__importStar(s),i=a.__importStar(i);class n{constructor(){this.dropdowns=new Map,document.querySelectorAll(".subscribeThreadStatusDropdown").forEach((e=>{if(!e.dataset.threadId)throw new Error("Missing threadID for '.subscribeThreadStatusDropdown' element.");const t=parseInt(e.dataset.threadId,10);this.dropdowns.has(t)||this.dropdowns.set(t,new Set),this.dropdowns.get(t).add(e),e.querySelectorAll(".subscribeThreadSelect").forEach((e=>{if(!e.dataset.status)throw new Error("Missing 'data-status' attribute for '.subscribeThreadSelect' element.");e.addEventListener("click",(e=>{this.click(e)}))}))}))}async click(e){e.preventDefault();const t=e.target,a=t.closest(".subscribeThreadStatusDropdown"),n=t.closest(".subscribeThreadSelect").dataset.status,l=parseInt(a.dataset.threadId,10),d=await o.dboAction("saveSubscriptionStatus","wbb\\data\\thread\\ThreadStatusAction").payload({threadID:l,status:n}).dispatch();this.dropdowns.has(d.threadID)&&this.dropdowns.get(d.threadID).forEach((e=>{var t;e.querySelectorAll(".subscribeThreadSelect").forEach((e=>{e.classList.remove("active")})),null===(t=e.querySelector(`.subscribeThreadSelect[data-status="${d.status}"]`))||void 0===t||t.classList.add("active")})),document.querySelectorAll(`.subscribeThreadStatusDropdownToggle[data-thread-id="${d.threadID}"]`).forEach((e=>{const t=e.querySelector(".icon"),a=e.querySelector("span:not(.icon)");"normal"!==d.status?(e.classList.add("active"),t.classList.remove("fa-bookmark","fa-ban","fa-bookmark-o"),t.classList.add("ignoring"===d.status?"fa-ban":"fa-bookmark"),a.textContent=s.get(`wbb.thread.status.${d.status}`)):(e.classList.remove("active"),t.classList.remove("fa-bookmark","fa-ban"),t.classList.add("fa-bookmark-o"),a.textContent=s.get("wcf.user.objectWatch.button.subscribe")),e.dataset.isSubscribed="watching"===d.status?"1":"0"})),i.fire("com.woltlab.wcf.objectWatch","updatedSubscription"),r.show()}}t.SubscriptionStatusHandler=n,t.default=n})),define("WoltLabSuite/Forum/Controller/Thread/WatchedList",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Core","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Confirmation"],(function(e,t,a,o,r,s,i){"use strict";function n(){return m.filter((e=>e.checked)).map((e=>~~e.dataset.objectId))}function l(e){u();const t=e.currentTarget;b(),t.checked?t.closest("ol").classList.add("jsMarked"):t.closest("ol").classList.remove("jsMarked")}function d(){const e=r.stringToBool(p.dataset.hasUnmarkedThreads);m.forEach((t=>{t.checked=e,e?t.closest("ol").classList.add("jsMarked"):t.closest("ol").classList.remove("jsMarked")})),u(),b()}function c(){const e=n(),t=`wbb.thread.watchedThreads.${e.length?"stopWatchingMarked":"stopWatchingAll"}.confirmMessage`;i.show({confirm(){o.apiOnce({data:{actionName:"stopWatching",className:"wbb\\data\\thread\\ThreadAction",parameters:{threadIDs:e,stopWatchingAll:n().length?0:1}},success(){window.location.reload()}})},message:s.get(t)})}function u(){const e=n().length;h.textContent=e?s.get("wbb.thread.watchedThreads.stopWatchingMarked",{count:e}):s.get("wbb.thread.watchedThreads.stopWatchingAll")}function b(){const e=m.some((e=>!e.checked));p.dataset.hasUnmarkedThreads=e?"true":"false",e?p.closest("ol").classList.remove("jsMarked"):p.closest("ol").classList.add("jsMarked")}let h;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=a.__importStar(o),r=a.__importStar(r),s=a.__importStar(s),i=a.__importStar(i);const m=[];let p;t.setup=function(){document.querySelectorAll(".jsWatchedThread").forEach((e=>{e.addEventListener("change",l),m.push(e)})),h=document.getElementById("stopWatchingButton"),h.addEventListener("click",c),p=document.querySelector(".jsMarkAllWatchedThreads"),p.addEventListener("click",d),p.dataset.hasUnmarkedThreads="1"}})),define("WoltLabSuite/Forum/Handler/Thread/UpdateHandler",["require","exports","tslib","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Event/Handler"],(function(e,t,a,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateHandler=void 0,o=a.__importStar(o),r=a.__importStar(r);class s{constructor(){this.threads=new Map,document.querySelectorAll(".wbbThread").forEach((e=>{let t;if(!e.dataset.threadId)throw new Error("The threadID is not set for the `.wbbThread` element.");if(t=parseInt(e.dataset.threadId,10),this.threads.get(t))throw new Error(`The element with the threadId "${t}" is read multiple times.`);this.threads.set(t,e)}))}setMarkAsDoneHandler(){}update(e,t,a){if("moved"in t&&t.moved)window.location.reload();else{if(e=~~e,!this.getThread(e))throw new Error(`Unknown thread with the threadId "${e}".`);for(const a in t)this.updateProperty(e,a,t[a]);a&&o.reload()}}updateProperty(e,t,a){switch(/^is[a-zA-Z]+$/g.test(t)&&(this.getThread(e).dataset[t]=a),t){case"deleted":this.delete(e,a);break;case"isClosed":a?this.close(e):this.open(e);break;case"isDeleted":a?this.trash(e):this.restore(e);break;case"isDisabled":a?this.disable(e):this.enable(e);break;case"isDone":a?this.done(e):this.undone(e);break;case"isSticky":a?this.sticky(e):this.scrape(e);break;case"moved":this.moved(e);break;case"showMoveNotice":this.showMoveNotice(e);break;case"title":this.updateTitle(e,a);break;default:this.handleCustomEvent(e,t,a)}}handleCustomEvent(e,t,a){window.jQuery(this.getThread(e)).trigger("threadUpdateHandlerProperty",[e,t,a]),r.fire("com.woltlab.wbb.updateHandler",t,{threadId:e,value:a,thread:this.getThread(e)})}getValue(e,t){switch(e=~~e,t){case"isAnnouncement":case"isClosed":case"isDeleted":case"isDisabled":case"isDone":case"isSticky":case"isLink":case"canMarkAsDone":return"1"===this.getThread(e).dataset[t];default:throw new Error(`Unknown property "${t}".`)}}getThread(e){if(this.threads.get(e))return this.threads.get(e);throw new Error(`Unknown thread with the threadId "${e}".`)}}t.UpdateHandler=s,t.default=s})),define("WoltLabSuite/Forum/Handler/Thread/BoardUpdateHandler",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","./UpdateHandler","WoltLabSuite/Core/Language","WoltLabSuite/Core/Controller/Clipboard"],(function(e,t,a,o,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoardUpdateHandler=void 0,o=a.__importDefault(o),r=a.__importDefault(r),s=a.__importStar(s),i=a.__importStar(i);class n extends r.default{close(e){const t=this.getThread(e).querySelector(".statusIcons");if(!t)throw new Error(`".statusIcons" container not found for thread with id "${e}".`);t.appendChild(o.default.createFragmentFromHtml(`
`))}open(e){this.getThread(e).querySelector(".jsIconClosed").closest("li").remove()}delete(e,t){this.getThread(e).closest("li").remove(),this.threads.delete(e),i.reload()}disable(e){this.getThread(e).classList.add("messageDisabled")}enable(e){this.getThread(e).classList.remove("messageDisabled")}done(e){const t=this.getThread(e).querySelector(".jsMarkAsDone");if(!t)throw new Error(`".jsMarkAsDone" icon not found for thread with id "${e}".`);t.classList.remove("fa-square-o"),t.classList.add("fa-check-square-o"),t.title=s.get("wbb.thread.done")}undone(e){const t=this.getThread(e).querySelector(".jsMarkAsDone");if(!t)throw new Error(`".jsMarkAsDone" icon not found for thread with id "${e}".`);t.classList.remove("fa-check-square-o"),t.classList.add("fa-square-o"),t.title=s.get("wbb.thread.undone")}moved(e){window.location.reload()}trash(e){this.getThread(e).classList.add("messageDeleted")}restore(e){var t;this.getThread(e).classList.remove("messageDeleted"),null===(t=this.getThread(e).querySelector(".columnSubject > .wbbThreadDeleteNote"))||void 0===t||t.remove()}showMoveNotice(e){const t=this.getThread(e).querySelector(".columnAvatar > div");if(!t)throw new Error(`".columnAvatar > div" icon not found for thread with id "${e}".`);t.appendChild(o.default.createFragmentFromHtml(``))}sticky(e){}scrape(e){}updateTitle(e,t){}}t.BoardUpdateHandler=n,t.default=n})),define("WoltLabSuite/Forum/Handler/Thread/ThreadUpdateHandler",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","./UpdateHandler","WoltLabSuite/Core/Language","WoltLabSuite/Core/Timer/Repeating"],(function(e,t,a,o,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThreadUpdateHandler=void 0,o=a.__importDefault(o),r=a.__importDefault(r),s=a.__importStar(s),i=a.__importDefault(i);class n extends r.default{constructor(e){super(),this.boardID=0,this.boardID=e}setPostHandler(e){this.postHandler=e}update(e,t){this.threads.get(e)&&("isDeleted"in t&&!t.isDeleted&&"ignoreDeletedPosts"in t&&(this.restore(e,!0),delete t.isDeleted,delete t.ignoreDeletedPosts),"isDisabled"in t&&!t.isDisabled&&"ignoreDisabledPosts"in t&&(this.enable(e,!0),delete t.isDisabled,delete t.ignoreDisabledPosts)),super.update(e,t,!1)}close(e){this.getThread(e).querySelector(".contentHeaderMetaData").appendChild(o.default.createFragmentFromHtml(`
${s.get("wbb.thread.closed")}
`));const t=document.querySelector(".messageQuickReplyContent .redactor-box");if(t){if(!t.closest(".jsClosedThreadWarning")){const e=document.createElement("p");e.classList.add("warning","jsClosedThreadWarning"),e.textContent=s.get("wbb.thread.closedThread"),t.closest(".messageBody").insertBefore(e,t)}const e=document.querySelector('#settings_text input[name="closeThread"]');e&&(e.checked=!0)}}open(e){const t=this.getThread(e).querySelector(".jsIconClosed");if(!t)throw new Error(`".jsIconClosed" icon not found for thread with id "${e}".`);t.closest("li").remove();const a=document.querySelector(".jsClosedThreadWarning");a&&a.remove();const o=document.querySelector('#settings_text input[name="closeThread"]');o&&(o.checked=!1)}delete(e,t){new i.default((e=>{e.stop(),window.location.href=t}),1e3)}disable(e){var t;null===(t=this.postHandler)||void 0===t||t.updateAllItems({isDisabled:1}),this.getThread(e).classList.add("messageDisabled")}enable(e,t=!1){var a;t||null===(a=this.postHandler)||void 0===a||a.updateAllItems({isDisabled:0}),this.getThread(e).classList.remove("messageDisabled")}moved(e){window.location.reload()}showMoveNotice(e){window.location.reload()}sticky(e){this.getThread(e).querySelector(".contentHeaderIcon").appendChild(o.default.createFragmentFromHtml(``))}scrape(e){const t=this.getThread(e).querySelector(".jsIconSticky");null==t||t.remove()}trash(e){var t;null===(t=this.postHandler)||void 0===t||t.updateAllItems({isDeleted:1}),this.getThread(e).classList.add("messageDeleted")}restore(e,t=!1){var a;t||null===(a=this.postHandler)||void 0===a||a.updateAllItems({isDeleted:0}),this.getThread(e).classList.remove("messageDeleted")}done(e){const t=this.getThread(e).querySelector(".jsMarkAsDone");if(!t)throw new Error(`".jsMarkAsDone" icon not found for thread with id "${e}".`);const a=t.querySelector(".icon");a.classList.remove("fa-square-o"),a.classList.add("fa-check-square-o");t.querySelector("span:not(.icon)").textContent=s.get("wbb.thread.done")}undone(e){const t=this.getThread(e).querySelector(".jsMarkAsDone");if(!t)throw new Error(`".jsMarkAsDone" icon not found for thread with id "${e}".`);const a=t.querySelector(".icon");a.classList.remove("fa-check-square-o"),a.classList.add("fa-square-o");t.querySelector("span:not(.icon)").textContent=s.get("wbb.thread.undone")}updateTitle(e,t){}}t.ThreadUpdateHandler=n,t.default=n})),define("WoltLabSuite/Forum/Ui/Board/GlobalCreateThreadButton",["require","exports","tslib","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ajax"],(function(e,t,a,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.GlobalCreateThreadButton=void 0,o=a.__importDefault(o),r=a.__importStar(r);class i{constructor(e){e.addEventListener("click",(e=>{e.preventDefault(),this.loadDialog()}))}async loadDialog(){const e=await(0,s.dboAction)("createThreadBoardSelection","wbb\\data\\board\\BoardAction").dispatch();this.openDialog(e.template)}openDialog(e){o.default.open(this,e)}_dialogSetup(){return{id:"wbbGlobalCreateThreadDialog",options:{title:r.get("wbb.index.selectForumForNewThread")},source:null}}}t.GlobalCreateThreadButton=i,t.setup=function(){document.querySelectorAll(".globalCreateThreadButton").forEach((e=>{new i(e)}))},t.default=i})),define("WoltLabSuite/Forum/Ui/Board/Ignore",["require","exports","tslib","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ajax"],(function(e,t,a,o,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.Ignore=void 0,o=a.__importDefault(o),r=a.__importStar(r),s=a.__importStar(s),i=a.__importDefault(i);class l{constructor(e){e.addEventListener("click",(e=>{e.preventDefault(),this.loadDialog()}))}async loadDialog(){const e=await(0,n.dboAction)("loadIgnoredBoards","wbb\\data\\board\\BoardAction").dispatch();this.openDialog(e.template)}openDialog(e){o.default.open(this,e);const t=document.getElementById("wbbBoardIgnore");Array.from(t.querySelectorAll("input[type=checkbox]")).map((e=>{e.addEventListener("change",(e=>{this.disableChildInputs(e.currentTarget)}))}))}disableChildInputs(e){const t=e.closest("li"),a=null==t?void 0:t.querySelectorAll("input[type=checkbox]");a&&Array.from(a).forEach((t=>{t===e||t.disabled||(t.checked=e.checked)}))}async saveBoardIDs(e){const t=await(0,n.dboAction)("saveIgnoredBoards","wbb\\data\\board\\BoardAction").objectIds(e).dispatch();this.savedBoardIDs(t.template)}savedBoardIDs(e){s.show(),o.default.close(this);const t=o.default.getDialog(this);if(void 0===t)throw new Error("Dialog is undefined.");t.submitButton.disabled=!1;const a=document.querySelector(".wbbBoardList");i.default.setInnerHtml(a,e)}_dialogSetup(){return{id:"wbbBoardIgnore",options:{title:r.get("wbb.index.ignoreBoards")},source:null}}_dialogSubmit(){const e=o.default.getDialog(this);if(void 0===e)throw new Error("Dialog is undefined.");e.submitButton.disabled=!0;const t=Array.from(e.content.querySelectorAll("input[type=checkbox]:checked")).map((e=>parseInt(e.value,10)));this.saveBoardIDs(t)}}t.Ignore=l,t.setup=function(){document.querySelectorAll(".ignoreBoardsButton").forEach((e=>{new l(e)}))},t.default=l})),define("WoltLabSuite/Forum/Ui/Board/MarkAsRead",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Dom/Util"],(function(e,t,a,o,r){"use strict";async function s(e,t){const a=parseInt(e.dataset.boardId,10);await(0,o.dboAction)("markAsRead","wbb\\data\\board\\BoardAction").objectIds([a]).dispatch(),i(e,t)}function i(e,t){n(t),e.querySelectorAll("ul:first-of-type li").forEach((e=>{const t=e.querySelector(".markAsRead");t&&i(e,t)}))}function n(e){var t;const a=e.closest("li");a.classList.remove("new"),null===(t=a.querySelector(".new"))||void 0===t||t.classList.remove("new"),e.classList.remove("markAsRead"),a.querySelectorAll(".badge.badgeUpdate").forEach((e=>{r.default.hide(e)})),e.classList.contains("fa-folder-open")?(e.classList.remove("fa-folder-open"),e.classList.add("fa-folder-open-o")):e.classList.contains("fa-folder")&&(e.classList.remove("fa-folder"),e.classList.add("fa-folder-o")),e.removeAttribute("title")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.setAsRead=void 0,r=a.__importDefault(r);const l=new WeakSet;t.setAsRead=n,t.setup=function(){document.querySelectorAll(".wbbBoardList .markAsRead").forEach((e=>{l.has(e)||(l.add(e),e.addEventListener("dblclick",(t=>{if(t.preventDefault(),!e.classList.contains("markAsRead"))return;s(e.closest("li"),e)}),{once:!0}))}))}})),define("WoltLabSuite/Forum/Ui/Board/MarkAllAsRead",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Event/Handler","WoltLabSuite/Core/Ui/Notification","./MarkAsRead"],(function(e,t,a,o,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoardMarkAllAsRead=void 0,o=a.__importStar(o),r=a.__importStar(r),s=a.__importStar(s),i=a.__importStar(i);class n{constructor(e,t){e.addEventListener("click",(e=>this.click(e))),this.callback=t}_ajaxSetup(){return{data:{actionName:"markAllAsRead",className:"wbb\\data\\board\\BoardAction"}}}_ajaxSuccess(){this.callback&&this.callback(),document.querySelectorAll(".wbbThreadList, .wbbSidebarThreadList").forEach((e=>{e.querySelectorAll(".new").forEach((e=>e.classList.remove("new")))})),document.querySelectorAll(".mainMenu .active .badge").forEach((e=>e.remove()));const e=document.querySelector(".wbbBoardList");e&&e.querySelectorAll(".markAsRead").forEach((e=>{i.setAsRead(e)})),r.fire("com.woltlab.wcf.MainMenuMobile","updateButtonState"),s.show()}click(e){e.preventDefault(),o.api(this)}}t.BoardMarkAllAsRead=n,t.default=n})),define("WoltLabSuite/Forum/Ui/Board/MarkAllThreadsAsRead",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/Notification","./MarkAsRead"],(function(e,t,a,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=a.__importStar(r),s=a.__importStar(s),t.setup=function(e){document.querySelectorAll(".markAsReadButton").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),async function(e){await(0,o.dboAction)("markAsRead","wbb\\data\\board\\BoardAction").objectIds([e]).dispatch(),document.querySelectorAll(".wbbThreadList .new").forEach((e=>{e.classList.remove("new")}));const t=document.querySelector(".wbbBoardList");t&&t.querySelectorAll(".markAsRead").forEach((e=>{s.setAsRead(e)})),r.show()}(e)}))}))}})),define("WoltLabSuite/Forum/Ui/Post/IpAddressHandler",["require","exports","tslib","WoltLabSuite/Core/Dom/Change/Listener","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Language"],(function(e,t,a,o,r,s,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IpAddressHandler=void 0,o=a.__importStar(o),r=a.__importDefault(r),s=a.__importStar(s),i=a.__importStar(i);class n{constructor(){this.buttons=new WeakSet,this.cache=new Map,this.rebuild(),o.add("WoltLabSuite/Forum/Ui/Post/IpAddressHandler",(()=>this.rebuild()))}rebuild(){document.querySelectorAll(".jsIpAddress[data-post-id]").forEach((e=>{const t=~~e.dataset.postId;this.buttons.has(e)||(e.addEventListener("click",(e=>this.click(e,t))),this.buttons.add(e))}))}click(e,t){null==e||e.preventDefault(),this.cache.has(t)?r.default.open(this,this.cache.get(t)):s.api(this,{parameters:{postID:t}})}_ajaxSuccess(e){this.cache.set(e.returnValues.postID,e.returnValues.template),this.click(null,~~e.returnValues.postID)}_ajaxSetup(){return{data:{className:"wbb\\data\\post\\PostAction",actionName:"getIpLog"}}}_dialogSetup(){return{id:"wbbIpAddressLog",source:null,options:{title:i.get("wbb.post.ipAddress.title")}}}}t.IpAddressHandler=n,t.default=n})),define("WoltLabSuite/Forum/Ui/Post/Quote",["require","exports","WoltLabSuite/Core/Ui/Message/Quote"],(function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiPostQuote=void 0;class o extends a.UiMessageQuote{constructor(e){super(e,"wbb\\data\\post\\PostAction","com.woltlab.wbb.post",".message",".messageBody",".messageBody > .messageText",!0)}}t.UiPostQuote=o,t.default=o})),define("WoltLabSuite/Forum/Ui/Post/ThreadFormInline",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Event/Handler","WoltLabSuite/Core/Language"],(function(e,t,a,o,r,s,i){"use strict";function n(){const e={values:{}};return b.forEach(((t,a)=>{const o=document.getElementById(a);if(null===o&&t.elementRequired)throw new Error(`[WoltLabSuite/Forum/Ui/Post/ThreadFormInline] Unable to locate given element '${a}'.`);e.values[a]=t.valueCallback(o)})),e}function l(e){e.promises.push(new Promise(((e,t)=>{const a=~~c.closest("article").dataset.postId;o.apiOnce({data:{className:"wbb\\data\\post\\PostAction",actionName:"validateThreadFormValues",objectIDs:[a],parameters:n()},success(a){const o=Object.entries(a.returnValues.errors);0===o.length?e():(o.forEach((([e,t])=>{"empty"===t?t=i.get("wcf.global.form.error.empty"):"validationFailed"===t&&(t=i.get("wcf.acp.customOption.error.validationFailed"));const a=document.getElementById(e);r.default.innerError(a,t)})),window.jQuery(`.messageTabMenu[data-wysiwyg-container-id='${u}']`).messageTabMenu("showTab","threadFormOptions",!0),t())},failure:()=>(t(new Error("[WoltLabSuite/Forum/Ui/Post/ThreadFormInline] Unable to validate thread form data due an unknown validate error.")),!1)})})))}function d(e){e.threadFormOptions=n()}let c,u;Object.defineProperty(t,"__esModule",{value:!0}),t.registerElement=t.init=void 0,o=a.__importStar(o),r=a.__importDefault(r),s=a.__importStar(s),i=a.__importStar(i);const b=new Map;t.init=function(e,t){const a=document.getElementById(e);if(null===a)throw new Error("[WoltLabSuite/Forum/Ui/Post/ThreadFormInline] Unable to locate given container.");c=a,u=t,s.add("com.woltlab.wcf.redactor2",`submit_${u}`,d),s.add("com.woltlab.wcf.redactor2",`validate_${u}`,l)},t.registerElement=function(e,t,a=!0){"function"!=typeof t&&(t=e=>e.value),b.set(e,{valueCallback:t,elementRequired:a})}})),define("WoltLabSuite/Forum/Ui/Thread/BestAnswer",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Core","WoltLabSuite/Core/Dom/Change/Listener","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Confirmation"],(function(e,t,a,o,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=a.__importStar(o),r=a.__importStar(r),s=a.__importStar(s),i=a.__importStar(i),n=a.__importStar(n);class l{constructor(e,t){this.knownButtons=new WeakSet,this.threadId=e,this.container=document.querySelector(t||".wbbThreadPostList"),this.initButtons(),s.add(`WoltLabSuite/Forum/Ui/Thread/BestAnswer-${this.threadId}`,(()=>this.initButtons()))}initButtons(){this.container.querySelectorAll(".jsMarkAsBestAnswer").forEach((e=>{this.knownButtons.has(e)||(e.addEventListener("click",(t=>this.click(t,e))),this.knownButtons.add(e))}))}click(e,t){e.preventDefault();const a=~~t.dataset.objectId;r.stringToBool(t.dataset.isBestAnswer)?this.unmarkBestAnswer(a):n.show({confirm:()=>this.markBestAnswer(a),message:i.get("wbb.thread.markAsBestAnswer.confirmMessage")})}markBestAnswer(e){o.api(this,{actionName:"markAsBestAnswer",parameters:{postID:e}})}unmarkBestAnswer(e){o.api(this,{actionName:"unmarkAsBestAnswer",parameters:{postID:e}})}_ajaxSuccess(){window.location.reload()}_ajaxSetup(){return{data:{className:"wbb\\data\\thread\\ThreadAction",parameters:{threadID:this.threadId}}}}}let d;t.init=function(e,t){d||(d=new l(e,t))}})),define("WoltLabSuite/Forum/Ui/Thread/Enable",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Date/Picker","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Dialog"],(function(e,t,a,o,r,s,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=a.__importStar(o),r=a.__importDefault(r),s=a.__importDefault(s),i=a.__importStar(i),n=a.__importDefault(n);class l{constructor(e,t){this.objectId=e,this.callback=t}open(){o.api(this)}submit(e){e.preventDefault();if(document.getElementById("threadEnable_enableNow").checked){const e=document.getElementById("threadEnable_enableNowAndUpdateTime");this.callback(!0,e.checked),n.default.close(this)}else o.api(this,{actionName:"setEnableTime",parameters:{enableTime:r.default.getValue("threadEnable_enableTime")}})}_ajaxSuccess(e){"prepareEnable"===e.actionName?n.default.open(this,e.returnValues.template):(this.callback(!1),n.default.close(this))}_ajaxSetup(){return{data:{actionName:"prepareEnable",className:"wbb\\data\\thread\\ThreadAction",objectIDs:[this.objectId]}}}_dialogSetup(){return{id:"wbbThreadEnable",options:{onClose(){r.default.destroy("threadEnable_enableTime")},onShow:e=>{const t=document.getElementById("threadEnable_enableNow"),a=document.getElementById("threadEnable_enableNowAndUpdateTime");t.addEventListener("change",(()=>{s.default.toggle(document.getElementById("threadEnable_enableTimeContainer")),a.disabled=!a.disabled}));e.querySelector(".formSubmit > button").addEventListener("click",(e=>this.submit(e)))},title:i.get("wbb.thread.edit.enable")},source:null}}}let d;t.init=function(e,t){d||(d=new l(e,t)),d.open()}})),define("WoltLabSuite/Forum/Ui/Thread/LastPageHandler",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Language","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/StringUtil","WoltLabSuite/Core/Core","WoltLabSuite/Core/Dom/Change/Listener","WoltLabSuite/Core/Notification/Handler"],(function(e,t,a,o,r,s,i,n,l,d){"use strict";function c(){const e=document.getElementById("messageQuickReply");if(null!==e){const t=e.previousElementSibling;return t.classList.contains("messageListPagination")?t.previousElementSibling:t}return Array.from(document.querySelectorAll(".wbbThreadPostList .wbbPost")).pop().closest("li")}function u(e){void 0===p&&(p=document.createElement("li"),p.classList.add("wbbMorePostsNotice"),p.innerHTML='',p.addEventListener("click",(e=>{e.preventDefault(),async function(){const e=await(0,o.dboAction)("getNewPosts","wbb\\data\\thread\\ThreadAction").objectIds([parseInt(g.dataset.threadId||"",10)]).payload({countPosts:!1,lastPostTime:parseInt(S.dataset.lastPostTime||"",10),pageNo:parseInt(S.dataset.pageNo||"",10)}).dispatch();if("redirectURL"in e)window.location.href=e.redirectURL;else{if(p.remove(),s.insertHtml(e.template,c(),"after"),e.nextPageNotice){const t=`