"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[25285,27810,33085,34405,98088],{22148:(F,M,e)=>{var S,A;S=[e(22410),e(60984),e(8454),e(57642),e(47536),e(96352),e(43349),e(95692),e(52473),e(68636),e(91749),e(49897),e(29930),e(40027),e(57576)],A=function(E,v,d,m,u,o,p,k,s,a,c,f,h,b,T){const x={};let g="0",D="";$(window).on("action:ajaxify.start",function(n,l){m.removeListeners(),String(l.url).startsWith("topic/")||(o.disable(),s.get("navbar/title").find("span").text("").hide(),h.remove("bookmark"))}),x.init=async function(){const n=g==="0"||String(g)!==String(ajaxify.data.tid);g=String(ajaxify.data.tid),D=ajaxify.currentPage,c.fire("action:topic.loading"),app.enterRoom("topic_"+g),n&&(u.signaturesShown={}),await u.onTopicPageLoad(s.get("post")),o.init('[component="topic"]>[component="post"]',ajaxify.data.postcount,x.toTop,x.toBottom,x.navigatorCallback),d.init(g),v.init(g,$(".topic")),m.init(),p.handleSort("topicPostSort","topic/"+ajaxify.data.slug),config.usePagination||E.init($('[component="topic"]'),u.loadMorePosts),t(),y(),j(),w(),B(),H(),U(g),L(),$(window).on("scroll",utils.debounce(Q,250)),O(),c.fire("action:topic.loaded",ajaxify.data)};function O(){Promise.resolve().then(function(){var n=[e(6411)];(l=>{config.topicSearchEnabled&&e.e(69749).then(function(){var i=[e(69749)];(function(r){l.bind(["command+f","ctrl+f"],function(C){C.preventDefault();let R=$('[component="navbar"] [component="search/form"]');R.length||(R=$('[component="sidebar/right"] [component="search/form"]')),R.find('[component="search/fields"] input[name="query"]').val("in:topic-"+ajaxify.data.tid+" "),r.showAndFocusInput(R)}),c.onPage("action:ajaxify.cleanup",()=>{l.unbind(["command+f","ctrl+f"])})}).apply(null,i)}).catch(e.oe),l.bind("j",i=>{if(i.target.classList.contains("mousetrap"))return;const r=o.getIndex(),C=o.getCount();r!==C&&o.scrollToIndex(r,!0,0)}),l.bind("k",i=>{if(i.target.classList.contains("mousetrap"))return;const r=o.getIndex();r!==1&&o.scrollToIndex(r-2,!0,0)})}).apply(null,n)}).catch(e.oe)}x.toTop=function(){o.scrollTop(0)},x.toBottom=function(){socket.emit("topics.postcount",ajaxify.data.tid,function(n,l){if(n)return h.error(n);o.scrollBottom(l-1)})};function U(n){if(window.location.hash){const r=$(utils.escapeHTML(window.location.hash));if(r.length){const C=r.parents("[data-pid]");return o.scrollToElement(C,!0,0)}}const l=ajaxify.data.bookmark||a.getItem("topic:"+n+":bookmark"),i=ajaxify.data.postIndex;if(I(i),o.shouldScrollToPost(i))return o.scrollToPostIndex(i-1,!0,0);l&&(!config.usePagination||config.usePagination&&ajaxify.data.pagination.currentPage===1)&&ajaxify.data.postcount>ajaxify.data.bookmarkThreshold&&h.alert({alert_id:"bookmark",message:"[[topic:bookmark-instructions]]",timeout:15e3,type:"info",clickfn:function(){o.scrollToIndex(Math.max(0,parseInt(l,10)-1),!0)},closefn:function(){a.removeItem("topic:"+n+":bookmark")}})}function L(){const n=document.querySelector('[component="topic/thumb/list"]');n&&n.addEventListener("click",async l=>{const i=l.target.closest("a");if(i){const r=Array.from(i.parentNode.children).indexOf(i);l.stopPropagation(),l.preventDefault();const C=ajaxify.data.thumbs.map(P=>({...P}));C.forEach((P,N)=>{P.selected=N===r});const R=await app.parseAndTranslate("modals/topic-thumbs-view",{src:i.href,thumbs:C});b.dialog({size:"lg",onEscape:!0,backdrop:!0,message:R}).on("click",'[component="topic/thumb/select"]',function(){$('[component="topic/thumb/select"]').removeClass("border-primary"),$(this).addClass("border-primary"),$('[component="topic/thumb/current"]').attr("src",$(this).attr("src"))})}})}function t(){s.get("topic").on("click","blockquote .toggle",function(){const n=$(this).parent("blockquote"),l=$(this);n.toggleClass("uncollapsed");const i=!n.hasClass("uncollapsed");l.toggleClass("fa-angle-down",i).toggleClass("fa-angle-up",!i)})}function y(){new T('[component="copy/code/btn"]',{text:function(l){const i=$(l);i.find("i").removeClass("fa-copy").addClass("fa-check"),setTimeout(()=>i.find("i").removeClass("fa-check").addClass("fa-copy"),2e3);const r=i.parent().find("code");return r.attr("data-lines")&&r.find(".hljs-ln-code[data-line-number]").length?r.find(".hljs-ln-code[data-line-number]").map((C,R)=>R.textContent).get().join(`
`):r.text()}});function n(){function l(P){return P.scrollHeight>P.clientHeight}function i(P){if(P.length){if(!P[0].scrollHeight)return setTimeout(i,100,P);l(P.get(0))&&P.parent().parent().find('[component="copy/code/btn"]').css({margin:"0.5rem 1.5rem 0 0"})}}let r=$('[component="topic"] [component="post/content"] code:not([data-button-added])');r=r.filter((P,N)=>$(N).text().includes(`
`));const C=$('
'),R=$(''),W=r.parent();W.wrap(C).parent().append(R),W.parent().find('[component="copy/code/btn"]').translateAttr("title","[[topic:copy-code]]"),W.each((P,N)=>{i($(N).find("code"))}),r.attr("data-button-added",1)}c.registerPage("action:posts.loaded",n),c.registerPage("action:topic.loaded",n),c.registerPage("action:posts.edited",n)}function j(){function n(l,i){const r=$('[component="topic"]>[component="post"][data-pid="'+i+'"]');if(r.length)return l.preventDefault(),o.scrollToIndex(r.attr("data-index"),!0),!1}s.get("topic").on("click",'[component="post/parent"]',function(l){const i=$(this),r=i.find('[component="post/parent/content"]');if(r.length){const C=r.hasClass("line-clamp-1");if(r.toggleClass("line-clamp-1"),i.find(".timeago").toggleClass("hidden"),i.toggleClass("flex-column").toggleClass("flex-row"),C)return!1}else return n(l,i.attr("data-topid"))}),s.get("topic").on("click",'[component="post/parent"] .timeago',function(l){return n(l,$(this).parents("[data-parent-pid]").attr("data-parent-pid"))})}function w(){$('[component="topic"]').on("click",'[component="post/reply-count"]',function(){const n=$(this);e.e(18631).then(function(){var l=[e(18631)];(function(i){i.init(n)}).apply(null,l)}).catch(e.oe)})}function B(){if(!ajaxify.data.showPostPreviewsOnHover||utils.isMobile())return;let n=0,l=!1;const i={};function r(){clearTimeout(n),$("#post-tooltip").remove(),l=!0}$(window).one("action:ajaxify.start",r),$('[component="topic"]').on("mouseenter",'a[component="post/parent"], [component="post/content"] a, [component="topic/event"] a',async function(){const C=$(this);l=!1;async function R(K){const Y=i[K]||await f.get(`/posts/${encodeURIComponent(K)}/summary`);if($("#post-tooltip").remove(),Y&&ajaxify.data.template.topic){i[K]=Y;const z=await app.parseAndTranslate("partials/topic/post-preview",{post:Y});if(l)return;z.hide().find(".timeago").timeago(),z.appendTo($("body")).fadeIn(300);const G=C.parents('[component="topic"]').find('[component="post/content"]').first(),Z=G.offset(),q=G.width(),_=C.offset();z.css({top:_.top+30,left:Z.left,width:q})}}const W=C.attr("href"),P=utils.urlToLocation(W),N=P.pathname,J=W&&W!=="#"&&window.location.hostname===P.hostname;$("#post-tooltip").remove();const V=J&&N&&N.match(/\/post\/([\d]+|(?:[\w_.~!$&'()*+,;=:@-]|%[\dA-F]{2})+)/),X=J&&N&&N.match(/\/topic\/([\da-z-]+)/);if(V){const K=V[1];if(encodeURIComponent(C.parents('[component="post"]').attr("data-pid"))===encodeURIComponent(K))return;n=setTimeout(async()=>{R(K)},300)}else X&&(n=setTimeout(async()=>{const K=X[1],Y=await f.get("/topics/"+K,{});R(Y.mainPid)},300))}).on("mouseleave",'[component="post"] a, [component="topic/event"] a',r)}function H(){(config.enableQuickReply||config.theme&&config.theme.enableQuickReply)&&k.init()}function Q(){const n=s.get("navbar/title").find("span");$(window).scrollTop()>50&&n.hasClass("hidden")?n.html(ajaxify.data.title).removeClass("hidden"):$(window).scrollTop()<=50&&!n.hasClass("hidden")&&n.html("").addClass("hidden"),$(window).scrollTop()>300&&h.remove("bookmark")}x.navigatorCallback=function(n,l){if(!ajaxify.data.template.topic||o.scrollActive)return;const i="topic/"+ajaxify.data.slug+(n>1?"/"+n:"");if(i!==D&&(D=i,n>=l&&app.user.uid&&f.put(`/topics/${ajaxify.data.tid}/read`),I(n),ajaxify.data.updateUrlWithPostIndex&&history.replaceState)){let r=window.location.search||"";config.usePagination||(r=r&&!/^\?page=\d+$/.test(r)?r:""),history.replaceState({url:i+r},null,window.location.protocol+"//"+window.location.host+config.relative_path+"/"+i+r)}};function I(n){const l="topic:"+ajaxify.data.tid+":bookmark",i=ajaxify.data.bookmark||a.getItem(l);config.topicPostSort==="newest_to_oldest"&&(n=Math.max(1,ajaxify.data.postcount-n+2)),ajaxify.data.postcount>ajaxify.data.bookmarkThreshold&&(!i||parseInt(n,10)>parseInt(i,10)||ajaxify.data.postcount=parseInt(i,10))&&h.remove("bookmark")}return x}.apply(M,S),A!==void 0&&(F.exports=A)},34405:(F,M,e)=>{var S,A;S=[e(49897),e(29930),e(36e3),e(9787),e(35786)],A=function(E,v,{Textcomplete:d},{TextareaEditor:m},{ContenteditableEditor:u}){const o={},p={delay:200,appendTo:null};o.init=s=>{const a={...p,...s},{input:c,onSelect:f}=a;app.loadJQueryUI(function(){c.autocomplete({...a,open:function(){$(this).autocomplete("widget").css("z-index",100005)},select:function(h,b){k(c,f,h,b)}})})},o.user=function(s,a,c){typeof a=="function"&&(c=a,a={}),a=a||{},o.init({input:s,onSelect:c,source:(f,h)=>{a.query=f.term,E.get("/api/users",a,function(b,T){if(b)return v.error(b);if(T&&T.users){const x=T.users.map(function(g){const D=$("").html(g.username).text();return g&&{label:D,value:D,user:{uid:g.uid,name:g.username,slug:g.userslug,username:g.username,userslug:g.userslug,picture:g.picture,banned:g.banned,"icon:text":g["icon:text"],"icon:bgColor":g["icon:bgColor"]}}});h(x)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},o.group=function(s,a){o.init({input:s,onSelect:a,source:(c,f)=>{socket.emit("groups.search",{query:c.term},function(h,b){if(h)return v.error(h);if(b&&b.length){const T=b.map(function(x){return x&&{label:x.name,value:x.name,group:x}});f(T)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},o.tag=function(s,a){o.init({input:s,onSelect:a,delay:100,source:(c,f)=>{socket.emit("topics.autocompleteTags",{query:c.term,cid:ajaxify.data.cid||0},function(h,b){if(h)return v.error(h);b&&f(b),$(".ui-autocomplete a").attr("data-ajaxify","false")})}})};function k(s,a,c,f){a=a||function(){};const h=jQuery.Event("keypress");h.which=13,h.keyCode=13,setTimeout(function(){s.trigger(h)},100),a(c,f)}return o.setup=function({element:s,strategies:a,options:c}){const f=s.get(0);if(f){var h;if(f.nodeName==="TEXTAREA"||f.nodeName==="INPUT"?h=new m(f):f.nodeName==="DIV"&&f.getAttribute("contenteditable")==="true"&&(h=new u(f)),!h)throw new Error("unknown target element type");f.setAttribute("dir",document.querySelector("html").getAttribute("data-dir"));var b=new d(h,a,{dropdown:c});return b.on("rendered",function(){b.dropdown.items.length&&b.dropdown.items[0].activate()}),b}},o}.apply(M,S),A!==void 0&&(F.exports=A)},43103:(F,M,e)=>{var S,A;S=[e(29930)],A=function(E){const v={};return v.init=function(d){const m=d.uploadFormEl;if(m.length&&(m.attr("action",config.relative_path+d.route),d.dragDropAreaEl&&v.handleDragDrop({container:d.dragDropAreaEl,callback:function(u){v.ajaxSubmit({uploadForm:m,upload:u,callback:d.callback})}}),d.pasteEl&&v.handlePaste({container:d.pasteEl,callback:function(u){v.ajaxSubmit({uploadForm:m,upload:u,callback:d.callback})}}),d.uploadBtnEl)){const u=m.find('input[name="files[]"]');d.uploadBtnEl.on("click",function(){return u.trigger("click"),!1}),u.on("change",function(o){const p=(o.target||{}).files||($(this).val()?[{name:$(this).val(),type:utils.fileMimeType($(this).val())}]:null);p&&v.ajaxSubmit({uploadForm:m,upload:{files:p,fileNames:Array.from(p).map(k=>k.name)},callback:d.callback})})}},v.handleDragDrop=function(d){let m=!1;const u=d.container,o=d.container.find(".imagedrop");u.on("dragenter",function(){m||(o.css("top","0px"),o.css("height",u.height()+"px"),o.css("line-height",u.height()+"px"),o.show(),o.on("dragleave",function(){o.hide(),o.off("dragleave")}))}),o.on("drop",function(s){s.preventDefault();const a=s.originalEvent.dataTransfer.files;if(a.length){let f;if(window.FormData){f=new FormData;for(var c=0;cparseInt(config.maximumFileSize,10)*1024)return d.uploadForm[0].reset(),E.error("[[error:file-too-big, "+config.maximumFileSize+"]]")}const u=Date.now();d.uploadForm.off("submit").on("submit",function(){return $(this).ajaxSubmit({headers:{"x-csrf-token":config.csrf_token},resetForm:!0,clearForm:!0,formData:d.upload.formData,error:function(o){let p=o.responseJSON&&(o.responseJSON.error||o.responseJSON.status&&o.responseJSON.status.message)||"[[error:parse-error]]";o&&o.status===413&&(p=o.statusText||"Request Entity Too Large"),E.error(p),E.remove(u)},uploadProgress:function(o,p,k,s){E.alert({alert_id:u,message:"[[modules:composer.uploading, "+s+"%]]"})},success:function(o){const p=o.response.images;if(p&&p.length)for(var k=0;k{var S,A;S=[e(52473)],A=function(E){const v={};return v.handleSort=function(d,m){const u=E.get("thread/sort");u.find("i").removeClass("fa-check");const o=utils.params().sort||config[d];u.find('a[data-sort="'+o+'"]').find("i").addClass("fa-check"),$("body").off("click",'[component="thread/sort"] a[data-sort]').on("click",'[component="thread/sort"] a[data-sort]',function(){const k=$(this).attr("data-sort"),s=utils.params();s.sort=k;const a=decodeURIComponent($.param(s));ajaxify.go(m+(a?"?"+a:""))})},v}.apply(M,S),A!==void 0&&(F.exports=A)},57642:(F,M,e)=>{var S,A;S=[e(8454),e(60984),e(47536),e(2269),e(52473),e(17459),e(91749),e(30076)],A=function(E,v,d,m,u,o,p,k){const s={},a={"event:user_status_change":c,"event:voted":f,"event:bookmarked":h,"event:topic_deleted":v.setDeleteState,"event:topic_restored":v.setDeleteState,"event:topic_purged":b,"event:topic_locked":v.setLockedState,"event:topic_unlocked":v.setLockedState,"event:topic_pinned":v.setPinnedState,"event:topic_unpinned":v.setPinnedState,"event:topic_moved":T,"event:post_edited":x,"event:post_purged":g,"event:post_deleted":D,"event:post_restored":D,"posts.bookmark":O,"posts.unbookmark":O,"posts.upvote":U,"posts.downvote":U,"posts.unvote":U,"event:new_notification":L,"event:new_post":d.onNewPost};s.init=function(){s.removeListeners();for(const t in a)a.hasOwnProperty(t)&&socket.on(t,a[t])},s.removeListeners=function(){for(const t in a)a.hasOwnProperty(t)&&socket.removeListener(t,a[t])};function c(t){app.updateUserStatus($('[data-uid="'+t.uid+'"] [component="user/status"]'),t.status)}function f(t){const y=$('[data-pid="'+t.post.pid+'"] [component="post/vote-count"]').filter(function(w,B){return $(B).closest("[data-pid]").attr("data-pid")===String(t.post.pid)}),j=$('.reputation[data-uid="'+t.post.uid+'"]');y.html(t.post.votes).attr("data-votes",t.post.votes),j.html(t.user.reputation).attr("data-reputation",t.user.reputation)}function h(t){$('[data-pid="'+t.post.pid+'"] .bookmarkCount').filter(function(y,j){return $(j).closest("[data-pid]").attr("data-pid")===String(t.post.pid)}).html(t.post.bookmarks).attr("data-bookmarks",t.post.bookmarks)}function b(t){ajaxify.data.category&&ajaxify.data.category.slug&&String(t.tid)===String(ajaxify.data.tid)&&ajaxify.go("category/"+ajaxify.data.category.slug,null,!0)}function T(t){t&&t.slug&&String(t.tid)===String(ajaxify.data.tid)&&ajaxify.go("topic/"+t.slug,null,!0)}function x(t){if(!t||!t.post||String(t.post.tid)!==String(ajaxify.data.tid))return;const y=u.get("post/content",t.post.pid).filter(function(I,n){return String($(n).closest("[data-pid]").attr("data-pid"))===String(t.post.pid)}),j=$(`[data-pid="${t.post.pid}"]`),w=j.find('[component="post/editor"]').filter(function(I,n){return String($(n).closest("[data-pid]").attr("data-pid"))===String(t.post.pid)}),B=u.get("topic/title"),H=u.get("navbar/title").find("span"),Q=u.get("breadcrumb/current");if(t.topic.rescheduled)return ajaxify.go("topic/"+t.topic.slug,null,!0);if(B.length&&t.topic.title&&t.topic.renamed){ajaxify.data.title=t.topic.title;const I="topic/"+t.topic.slug+(window.location.search?window.location.search:"");history.replaceState({url:I},null,window.location.protocol+"//"+window.location.host+config.relative_path+"/"+I),B.fadeOut(250,function(){B.html(t.topic.title).fadeIn(250)}),Q.fadeOut(250,function(){Q.html(t.topic.title).fadeIn(250)}),H.fadeOut(250,function(){H.html(t.topic.title).fadeIn(250)})}if(t.post.changed){y.fadeOut(250,function(){if(y.html(o.unescape(t.post.content)),y.find("img:not(.not-responsive)").addClass("img-fluid"),m.wrapImagesInLinks(y.parent()),d.addBlockquoteEllipses(y.parent()),y.fadeIn(250),t.post.edited){const n={editor:t.editor,editedISO:utils.toISOString(t.post.edited)};app.parseAndTranslate("partials/topic/post-editor",n,function(l){w.replaceWith(l),j.find('[component="post/edit-indicator"]').removeClass("hidden").translateAttr("title",`[[global:edited-timestamp, ${k.isoTimeToLocaleString(n.editedISO,config.userLang)}]]`),j.find('[component="post/editor"] .timeago').timeago(),p.fire("action:posts.edited",t)})}});const I=$(`[component="post/parent"][data-parent-pid="${t.post.pid}"]`);I.length&&(I.find('[component="post/parent/content"]').html(o.unescape(t.post.content)),I.find("img:not(.not-responsive)").addClass("img-fluid"),I.find('[component="post/parent/content]" img:not(.emoji)').each(function(){m.wrapImageInLink($(this))}))}else p.fire("action:posts.edited",t);t.topic.tags&&t.topic.tagsupdated&&Promise.all([e.e(20056),e.e(63)]).then(function(){var I=[e(63)];(function(n){n.updateTopicTags([t.topic])}).apply(null,I)}).catch(e.oe),E.removeMenu(u.get("post","pid",t.post.pid))}function g(t){!t||String(t.tid)!==String(ajaxify.data.tid)||(u.get("post","pid",t.pid).fadeOut(500,function(){$(this).remove(),d.showBottomPostBar()}),ajaxify.data.postcount-=1,E.updatePostCount(ajaxify.data.postcount),e.e(18631).then(function(){var y=[e(18631)];(function(j){j.onPostPurged(t)}).apply(null,y)}).catch(e.oe),$(`[component="post/parent"][data-parent-pid="${t.pid}"]`).remove())}function D(t){const y=u.get("post","pid",t.pid),{isAdminOrMod:j}=ajaxify.data.privileges,w=String(t.uid)===String(app.user.uid),B=!!t.deleted;y.length&&(y.toggleClass("deleted"),E.toggle(t.pid,B),!j&&!w&&(y.find('[component="post/tools"]').toggleClass("hidden",B),B?y.find('[component="post/content"]').translateHtml("[[topic:post-is-deleted]]"):y.find('[component="post/content"]').html(o.unescape(t.content))));const H=$(`[component="post/parent"][data-parent-pid="${t.pid}"]`);H.length&&H.each((Q,I)=>{const n=$(I);B?n.find('[component="post/parent/content"]').translateHtml("[[topic:post-is-deleted]]"):n.find('[component="post/parent/content"]').html(o.unescape(t.content))})}function O(t){const y=$('[data-pid="'+t.post.pid+'"] [component="post/bookmark"]').filter(function(j,w){return $(w).closest("[data-pid]").attr("data-pid")===String(t.post.pid)});y.length&&(y.attr("data-bookmarked",t.isBookmarked),y.find('[component="post/bookmark/on"]').toggleClass("hidden",!t.isBookmarked),y.find('[component="post/bookmark/off"]').toggleClass("hidden",t.isBookmarked))}function U(t){const y=$('[data-pid="'+t.post.pid+'"]');y.find('[component="post/upvote"]').filter(function(j,w){return $(w).closest("[data-pid]").attr("data-pid")===String(t.post.pid)}).toggleClass("upvoted",t.upvote),y.find('[component="post/downvote"]').filter(function(j,w){return $(w).closest("[data-pid]").attr("data-pid")===String(t.post.pid)}).toggleClass("downvoted",t.downvote)}function L(t){const y=ajaxify.data.tid;t&&t.tid&&String(t.tid)===String(y)&&socket.emit("topics.markTopicNotificationsRead",[y])}return s}.apply(M,S),A!==void 0&&(F.exports=A)},95692:(F,M,e)=>{var S,A;S=[e(52473),e(34405),e(49897),e(29930),e(43103),e(6411),e(68636),e(91749)],A=function(E,v,d,m,u,o,p,k){const s={_autocomplete:null};s.init=function(){const c=E.get("topic/quickreply/text"),f=`qr:draft:tid:${ajaxify.data.tid}`,h={element:c,strategies:[],options:{style:{"z-index":100}}};a(),$(window).one("action:ajaxify.start",()=>{a()}),$(window).trigger("composer:autocomplete:init",h),s._autocomplete=v.setup(h),o.bind("ctrl+return",x=>{x.target===c.get(0)&&E.get("topic/quickreply/button").get(0).click()}),u.init({uploadBtnEl:$('[component="topic/quickreply/upload/button"]'),dragDropAreaEl:$('[component="topic/quickreply/container"] .quickreply-message'),pasteEl:c,uploadFormEl:$('[component="topic/quickreply/upload"]'),inputEl:c,route:"/api/post/upload",callback:function(x){let g=c.val();x.forEach(D=>{g=g+(g?`
`:"")+(D.isImage?"!":"")+`[${D.filename}](${D.url})`}),c.val(g)}});let b=!0;E.get("topic/quickreply/button").on("click",function(x){if(x.preventDefault(),!b)return;const g=E.get("topic/quickreply/text").val(),D={tid:ajaxify.data.tid,handle:void 0,content:g},O=g.length;if(OparseInt(config.maximumPostLength,10))return m.error("[[error:content-too-long, "+config.maximumPostLength+"]]");b=!1,d.post(`/topics/${ajaxify.data.tid}`,D,function(U,L){if(b=!0,U)return m.error(U);L&&L.queued&&m.alert({type:"success",title:"[[global:alert.success]]",message:L.message,timeout:1e4,clickfn:function(){ajaxify.go(`/post-queue/${L.id}`)}}),E.get("topic/quickreply/text").val(""),p.removeItem(f),s._autocomplete.hide(),k.fire("action:quickreply.success",{data:L})})});const T=p.getItem(f);T&&c.val(T),c.on("keyup",utils.debounce(function(){const x=c.val();x?p.setItem(f,x):p.removeItem(f)},1e3)),E.get("topic/quickreply/expand").on("click",x=>{x.preventDefault(),p.removeItem(f);const g=E.get("topic/quickreply/text");k.fire("action:composer.post.new",{tid:ajaxify.data.tid,title:ajaxify.data.titleRaw,body:g.val()}),g.val("")})};function a(){s._autocomplete&&(s._autocomplete.destroy(),s._autocomplete=null)}return s}.apply(M,S),A!==void 0&&(F.exports=A)}}]);