(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[5785,33085,34405,61861,69749,87212,92717,97650],{10870:(h,E,c)=>{"use strict";var y,m;y=[c(40027),c(17459),c(68636),c(29930),c(91749)],m=function(p,u,a,l,f){const e={};let r,g;e.show=function(){f.one("action:ajaxify.end",()=>{o(),t(),e.showEmailConfirmWarning()})},e.showEmailConfirmWarning=function(n){if(!config.emailPrompt||!app.user.uid||parseInt(a.getItem("email-confirm-dismiss"),10)===1)return;const i={alert_id:"email_confirm",type:"warning",timeout:0,closefn:()=>{a.setItem("email-confirm-dismiss",1)}};!app.user.email&&!app.user.isEmailConfirmSent?(i.message="[[error:no-email-to-confirm]]",i.clickfn=function(){l.remove("email_confirm"),ajaxify.go("user/"+app.user.userslug+"/edit/email")},l.alert(i)):!app.user["email:confirmed"]&&!app.user.isEmailConfirmSent?(i.message=n||"[[error:email-not-confirmed]]",i.clickfn=function(){l.remove("email_confirm"),ajaxify.go("/me/edit/email")},l.alert(i)):!app.user["email:confirmed"]&&app.user.isEmailConfirmSent&&(i.message="[[error:email-not-confirmed-email-sent]]",l.alert(i))};function t(){!config.cookies.enabled||!navigator.cookieEnabled||app.inAdmin||a.getItem("cookieconsent")==="1"||(config.cookies.message=u.unescape(config.cookies.message),config.cookies.dismiss=u.unescape(config.cookies.dismiss),config.cookies.link=u.unescape(config.cookies.link),config.cookies.link_url=u.unescape(config.cookies.link_url),app.parseAndTranslate("partials/cookie-consent",config.cookies,function(n){$(document.body).append(n),$(document.body).addClass("cookie-consent-open");const i=$(".cookie-consent");i.find("button").on("click",function(){a.setItem("cookieconsent","1"),i.remove(),$(document.body).removeClass("cookie-consent-open")})}))}function o(){const n=utils.params({full:!0});r=n.has("loggedin"),g=n.get("register"),r&&(l.alert({type:"success",title:"[[global:welcome-back]] "+app.user.username+"!",message:"[[global:you-have-successfully-logged-in]]",timeout:5e3}),n.delete("loggedin")),g&&(p.alert({message:utils.escapeHTML(decodeURIComponent(g))}),n.delete("register")),n.has("lang")&&n.get("lang")===config.defaultLang&&(console.info(`The "lang" parameter was passed in to set the language to "${n.get("lang")}", but that is already the forum default language.`),n.delete("lang"));const i=n.toString();ajaxify.updateHistory(ajaxify.currentPage+(i?`?${i}`:"")+document.location.hash,!0)}return e.showInvalidSession=function(){p.alert({title:"[[error:invalid-session]]",message:"[[error:invalid-session-text]]",closeButton:!1,callback:function(){window.location.reload()}})},e.showSessionMismatch=function(){p.alert({title:"[[error:session-mismatch]]",message:"[[error:session-mismatch-text]]",closeButton:!1,callback:function(){window.location.reload()}})},e}.apply(E,y),m!==void 0&&(h.exports=m)},13342:(h,E,c)=>{h.exports=c(41644)},31494:(h,E,c)=>{h.exports=c(36244)},34405:(h,E,c)=>{"use strict";var y,m;y=[c(49897),c(29930),c(36e3),c(9787),c(35786)],m=function(p,u,{Textcomplete:a},{TextareaEditor:l},{ContenteditableEditor:f}){const e={},r={delay:200,appendTo:null};e.init=t=>{const o={...r,...t},{input:n,onSelect:i}=o;app.loadJQueryUI(function(){n.autocomplete({...o,open:function(){$(this).autocomplete("widget").css("z-index",100005)},select:function(s,d){g(n,i,s,d)}})})},e.user=function(t,o,n){typeof o=="function"&&(n=o,o={}),o=o||{},e.init({input:t,onSelect:n,source:(i,s)=>{o.query=i.term,p.get("/api/users",o,function(d,C){if(d)return u.error(d);if(C&&C.users){const v=C.users.map(function(x){const b=$("
").html(x.username).text();return x&&{label:b,value:b,user:{uid:x.uid,name:x.username,slug:x.userslug,username:x.username,userslug:x.userslug,picture:x.picture,banned:x.banned,"icon:text":x["icon:text"],"icon:bgColor":x["icon:bgColor"]}}});s(v)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},e.group=function(t,o){e.init({input:t,onSelect:o,source:(n,i)=>{socket.emit("groups.search",{query:n.term},function(s,d){if(s)return u.error(s);if(d&&d.length){const C=d.map(function(v){return v&&{label:v.name,value:v.name,group:v}});i(C)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},e.tag=function(t,o){e.init({input:t,onSelect:o,delay:100,source:(n,i)=>{socket.emit("topics.autocompleteTags",{query:n.term,cid:ajaxify.data.cid||0},function(s,d){if(s)return u.error(s);d&&i(d),$(".ui-autocomplete a").attr("data-ajaxify","false")})}})};function g(t,o,n,i){o=o||function(){};const s=jQuery.Event("keypress");s.which=13,s.keyCode=13,setTimeout(function(){t.trigger(s)},100),o(n,i)}return e.setup=function({element:t,strategies:o,options:n}){const i=t.get(0);if(i){var s;if(i.nodeName==="TEXTAREA"||i.nodeName==="INPUT"?s=new l(i):i.nodeName==="DIV"&&i.getAttribute("contenteditable")==="true"&&(s=new f(i)),!s)throw new Error("unknown target element type");i.setAttribute("dir",document.querySelector("html").getAttribute("data-dir"));var d=new a(s,o,{dropdown:n});return d.on("rendered",function(){d.dropdown.items.length&&d.dropdown.items[0].activate()}),d}},e}.apply(E,y),m!==void 0&&(h.exports=m)},41088:(h,E,c)=>{"use strict";var y;y=function(){const m={};return m.apply=function(p){$(p).on("mousewheel",function(u){const a=this.scrollTop,l=this.scrollHeight,f=Math.round(this.getBoundingClientRect().height);if(u.originalEvent.deltaY<0&&a===0||u.originalEvent.deltaY>0&&f+a>=l)return!1})},m}.call(E,c,E,h),y!==void 0&&(h.exports=y)},43103:(h,E,c)=>{"use strict";var y,m;y=[c(29930)],m=function(p){const u={};return u.init=function(a){const l=a.uploadFormEl;if(l.length&&(l.attr("action",config.relative_path+a.route),a.dragDropAreaEl&&u.handleDragDrop({container:a.dragDropAreaEl,callback:function(f){u.ajaxSubmit({uploadForm:l,upload:f,callback:a.callback})}}),a.pasteEl&&u.handlePaste({container:a.pasteEl,callback:function(f){u.ajaxSubmit({uploadForm:l,upload:f,callback:a.callback})}}),a.uploadBtnEl)){const f=l.find('input[name="files[]"]');a.uploadBtnEl.on("click",function(){return f.trigger("click"),!1}),f.on("change",function(e){const r=(e.target||{}).files||($(this).val()?[{name:$(this).val(),type:utils.fileMimeType($(this).val())}]:null);r&&u.ajaxSubmit({uploadForm:l,upload:{files:r,fileNames:Array.from(r).map(g=>g.name)},callback:a.callback})})}},u.handleDragDrop=function(a){let l=!1;const f=a.container,e=a.container.find(".imagedrop");f.on("dragenter",function(){l||(e.css("top","0px"),e.css("height",f.height()+"px"),e.css("line-height",f.height()+"px"),e.show(),e.on("dragleave",function(){e.hide(),e.off("dragleave")}))}),e.on("drop",function(t){t.preventDefault();const o=t.originalEvent.dataTransfer.files;if(o.length){let i;if(window.FormData){i=new FormData;for(var n=0;nparseInt(config.maximumFileSize,10)*1024)return a.uploadForm[0].reset(),p.error("[[error:file-too-big, "+config.maximumFileSize+"]]")}const f=Date.now();a.uploadForm.off("submit").on("submit",function(){return $(this).ajaxSubmit({headers:{"x-csrf-token":config.csrf_token},resetForm:!0,clearForm:!0,formData:a.upload.formData,error:function(e){let r=e.responseJSON&&(e.responseJSON.error||e.responseJSON.status&&e.responseJSON.status.message)||"[[error:parse-error]]";e&&e.status===413&&(r=e.statusText||"Request Entity Too Large"),p.error(r),p.remove(f)},uploadProgress:function(e,r,g,t){p.alert({alert_id:f,message:"[[modules:composer.uploading, "+t+"%]]"})},success:function(e){const r=e.response.images;if(r&&r.length)for(var g=0;g{h.exports=c(28721)},65348:(h,E,c)=>{"use strict";var y,m;y=[c(96349),c(40027),c(91749),c(17459)],m=function(p,u,a,l){const f={};return f.init=function(e,r){if(!e||!e.length)return;r=r||{};const g=r.onSelect||function(){};r.states=r.states||["watching","tracking","notwatching","ignoring"],r.template=r.template||"partials/category/selector-dropdown-left",a.fire("action:category.selector.options",{el:e,options:r}),p.init(e,r);const t={el:e,selectedCategory:null};e.on("click","[data-cid]",function(){const n=$(this);return n.hasClass("disabled")?!1:(t.selectCategory(n.attr("data-cid")),g(t.selectedCategory))});let o=t.el.find('[component="category-selector-selected"]').html();return l.translate(o,n=>{o=n}),t.selectCategory=function(n){const i=t.el.find('[data-cid="'+n+'"]');t.selectedCategory={cid:n,name:i.attr("data-name")},i.length?t.el.find('[component="category-selector-selected"]').html(i.find('[component="category-markup"]').html()):t.el.find('[component="category-selector-selected"]').html(o)},t.getSelectedCategory=function(){return t.selectedCategory},t.getSelectedCid=function(){return t.selectedCategory?t.selectedCategory.cid:0},r.hasOwnProperty("selectedCategory")&&app.parseAndTranslate(r.template,{selectedCategory:r.selectedCategory},function(n){t.el.find('[component="category-selector-selected"]').html(n.find('[component="category-selector-selected"]').html())}),t},f.modal=function(e){e=e||{},e.onSelect=e.onSelect||function(){},e.onSubmit=e.onSubmit||function(){},app.parseAndTranslate("admin/partials/categories/select-category",{message:e.message},function(r){const g=u.dialog({title:e.title||"[[modules:composer.select-category]]",message:r,buttons:{save:{label:"[[global:select]]",className:"btn-primary",callback:o}}}),t=f.init(g.find('[component="category-selector"]'),e);function o(n){return n.preventDefault(),t.selectedCategory&&(e.onSubmit(t.selectedCategory),g.modal("hide")),!1}e.openOnLoad&&g.on("shown.bs.modal",function(){g.find(".dropdown-toggle").dropdown("toggle")}),g.find("form").on("submit",o)})},f}.apply(E,y),m!==void 0&&(h.exports=m)},68636:(h,E,c)=>{"use strict";var y;y=function(){function m(){this._store={},this._keys=[]}m.prototype.isMock=!0,m.prototype.setItem=function(a,l){a=String(a),this._keys.indexOf(a)===-1&&this._keys.push(a),this._store[a]=l},m.prototype.getItem=function(a){return a=String(a),this._keys.indexOf(a)===-1?null:this._store[a]},m.prototype.removeItem=function(a){a=String(a),this._keys=this._keys.filter(function(l){return l!==a}),this._store[a]=null},m.prototype.clear=function(){this._keys=[],this._store={}},m.prototype.key=function(a){return a=parseInt(a,10)||0,this._keys[a]},Object.defineProperty&&Object.defineProperty(m.prototype,"length",{get:function(){return this._keys.length}});let p;const u=Date.now().toString();try{if(p=window.localStorage,p.setItem(u,u),p.getItem(u)!==u)throw Error("localStorage behaved unexpectedly");return p.removeItem(u),p}catch(a){console.warn(a),console.warn("localStorage failed, falling back on sessionStorage");try{if(p=window.sessionStorage,p.setItem(u,u),p.getItem(u)!==u)throw Error("sessionStorage behaved unexpectedly");return p.removeItem(u),p}catch(l){return console.warn(l),console.warn("sessionStorage failed, falling back on memory storage"),new m}}}.call(E,c,E,h),y!==void 0&&(h.exports=y)},69749:(h,E,c)=>{"use strict";var y,m;y=[c(17459),c(68636),c(91749),c(29930),c(89336)],m=function(p,u,a,l,f){const e={current:{}};e.init=function(t){if(!config.searchEnabled)return;t=t||{in:config.searchDefaultInQuick||"titles"},$('[component="search/form"]').each((n,i)=>{r($(i),t)})};function r(t,o){const n=t.find('[component="search/button"]'),i=t.find('[component="search/fields"]'),s=i.find('input[name="query"]'),d=i.find("#quick-search-container"),C=i.hasClass("hidden"),v=/^(@|acct:)?[\w-]+@.+$/;C&&i.off("focusout").on("focusout",function(){setTimeout(function(){i.find(":focus").length||(i.addClass("hidden"),n.removeClass("hidden"))},200)}),s.off("focus");const x={inputEl:s,resultEl:d};e.enableQuickSearch({searchOptions:o,searchElements:x}),n.off("click").on("click",function(b){return!config.loggedIn&&!app.user.privileges["search:content"]?(l.alert({message:"[[error:search-requires-login]]",timeout:3e3}),ajaxify.go("login"),!1):(b.stopPropagation(),e.showAndFocusInput(t),!1)}),t.off("submit").on("submit",function(){const b=$(this).find('input[name="query"]'),S=e.getSearchPreferences();return S.term=b.val(),S.in=o.in,v.test(S.term)&&(S.in="users"),a.fire("action:search.submit",{searchOptions:S,searchElements:x}),e.query(S,function(){b.val(""),s.trigger("blur")}),!1})}e.enableQuickSearch=function(t){if(!config.searchEnabled||!app.user.privileges["search:content"])return;const o=Object.assign({in:config.searchDefaultInQuick||"titles"},t.searchOptions),n=t.searchElements.resultEl,i=t.searchElements.inputEl;let s=i.val();const d=n.find(".filter-category");function C(){ajaxify.data.template.category&&ajaxify.data.cid&&p.translate("[[search:search-in-category, "+ajaxify.data.name+"]]",function(w){const k=$("
").html(w).text();d.find(".name").text(k)}),d.toggleClass("hidden",!(ajaxify.data.template.category&&ajaxify.data.cid))}function v(){t.searchOptions=Object.assign({},o),t.searchOptions.term=i.val(),C(),ajaxify.data.template.category&&ajaxify.data.cid&&d.find('input[type="checkbox"]').is(":checked")&&(t.searchOptions.categories=[ajaxify.data.cid],t.searchOptions.searchChildren=!0),t.hideDuringSearch||(n.removeClass("hidden").find(".quick-search-results-container").html(""),n.find(".loading-indicator").removeClass("hidden")),a.fire("action:search.quick.start",t),t.searchOptions.searchOnly=1,e.api(t.searchOptions,function(w){if(n.find(".loading-indicator").addClass("hidden"),!w.posts||t.hideOnNoMatches&&!w.posts.length)return n.addClass("hidden").find(".quick-search-results-container").html("");w.posts.forEach(function(k){const _=$("
"+k.content+"
").text(),I=i.val().toLowerCase().replace(/^in:topic-\d+/,""),D=Math.max(0,_.toLowerCase().indexOf(I)-40);k.snippet=utils.escapeHTML((D>0?"...":"")+_.slice(D,D+80)+(_.length-D>80?"...":""))}),w.dropdown={maxWidth:"400px",maxHeight:"500px",...t.dropdown},app.parseAndTranslate("partials/quick-search-results",w,function(k){k.length&&k.find(".timeago").timeago(),n.toggleClass("hidden",!k.length||!i.is(":focus")).find(".quick-search-results-container").html(k.length?k:"");const _=n.find(".quick-search-results .quick-search-title, .quick-search-results .snippet");e.highlightMatches(t.searchOptions.term,_),a.fire("action:search.quick.complete",{data:w,options:t})})})}n.find('.filter-category input[type="checkbox"]').on("change",function(){i.focus(),v()}),i.off("keyup").on("keyup",utils.debounce(function(){if(i.val().length<3){n.addClass("hidden"),s=i.val();return}if(i.val()!==s){if(s=i.val(),!i.is(":focus"))return n.addClass("hidden");v()}},500)),n.on("mousedown",".quick-search-results > *",function(){$(window).one("mouseup",function(){n.addClass("hidden")})});const x=i.parent(),b=n.parent();x.on("focusout",S),b.on("focusout",S);function S(){setTimeout(function(){!x.find(":focus").length&&!b.find(":focus").length&&!n.hasClass("hidden")&&n.addClass("hidden")},200)}let A=!1;a.on("action:ajaxify.end",function(){ajaxify.isCold()||(A=!0),n.addClass("hidden")}),i.on("focus",function(){const w=i.val();s=w,w&&n.find("#quick-search-results").children().length&&(C(),A?(v(),A=!1):n.removeClass("hidden"),i[0].setSelectionRange(w.startsWith("in:topic")?w.indexOf(" ")+1:0,w.length))}),i.off("refresh").on("refresh",function(){v()})},e.showAndFocusInput=function(t){const o=t.parents(".dropdown-menu");if(o.length){const n=o.siblings("[data-bs-toggle]"),i=f.Dropdown.getOrCreateInstance(n[0]);i&&i.show()}else t.find('[component="search/fields"]').removeClass("hidden"),t.find('[component="search/button"]').addClass("hidden"),t.find('[component="search/fields"] input[name="query"]').trigger("focus")},e.query=function(t,o){o=o||function(){},ajaxify.go("search?"+g(t),o)},e.api=function(t,o){const n=config.relative_path+"/api/search?"+g(t);t.hasOwnProperty("searchOnly")&&delete t.searchOnly;const i=config.relative_path+"/search?"+g(t);$.get(n,function(s){s.url=i,o(s)})};function g(t){const o=t.in||"titles";let n=t.term.replace(/^[ ?#]*/,"");try{n=encodeURIComponent(n)}catch{return l.error("[[error:invalid-search-term]]")}const i={...t,term:n,in:o};return a.fire("action:search.createQueryString",{query:i,data:t}),decodeURIComponent($.param(i))}return e.getSearchPreferences=function(){try{return JSON.parse(u.getItem("search-preferences")||"{}")}catch{return{}}},e.highlightMatches=function(t,o){if(!t||!o.length)return;t=utils.escapeHTML(t.replace(/^"/,"").replace(/"$/,"").trim());const n=t.split(" ").filter(s=>s.length>1).map(function(s){return utils.escapeRegexChars(s)}).join("|"),i=new RegExp("("+n+")","gi");o.each(function(){const s=$(this),d=[];s.find("*").each(function(){$(this).after(""),d.push($("
").append($(this)))}),s.html(s.html().replace(i,function(C,v){return''+v+""})),d.forEach(function(C,v){s.html(s.html().replace("",function(){return C.html()}))})}),$(".search-results .content").find("img:not(.not-responsive)").addClass("img-fluid")},e}.apply(E,y),m!==void 0&&(h.exports=m)},71431:(h,E,c)=>{h.exports=c(49641)},72573:(h,E,c)=>{h.exports=c(59367)},88518:(h,E,c)=>{h.exports=c(54516)},92762:(h,E,c)=>{h.exports=c(94252)},96349:(h,E,c)=>{"use strict";var y,m;y=[c(29930),c(89336),c(49897)],m=function(p,u,a){const l={};return l.init=function(f,e){let r=null;e=e||{},e.privilege=e.privilege||"topics:read",e.states=e.states||["watching","tracking","notwatching","ignoring"],e.cacheList=e.hasOwnProperty("cacheList")?e.cacheList:!0;let g=[];Array.isArray(e.localCategories)&&(g=e.localCategories.map(s=>({...s}))),e.selectedCids=e.selectedCids||ajaxify.data.selectedCids||[];const t=f.find('[component="category-selector-search"]');if(!t.length)return;const o=t.parents('[component="category/dropdown"]').length>0||t.parents('[component="category-selector"]').length>0;f.on("show.bs.dropdown",function(){o&&t.removeClass("hidden");function s(){const d=t.find("input").val();d.length>1||!d&&!r?n(d,function(C){r=e.cacheList&&(r||C),i(C)}):!d&&r&&i(r)}t.on("click",function(d){d.preventDefault(),d.stopPropagation()}),t.find("input").val("").on("keyup",utils.debounce(s,300)),s()}),f.on("shown.bs.dropdown",function(){["xs","sm"].includes(utils.findBootstrapEnvironment())||t.find("input").focus()}),f.on("hide.bs.dropdown",function(){o&&t.addClass("hidden"),t.off("click"),t.find("input").off("keyup")});function n(s,d){a.get("/search/categories",{search:s,query:utils.params(),parentCid:e.parentCid||0,selectedCids:e.selectedCids,privilege:e.privilege,states:e.states,showLinks:e.showLinks},function(C,{categories:v}){if(C)return p.error(C);d(g.concat(v))})}function i(s){const d=e.selectedCids.map(String);s.forEach(function(C){C.selected=d.includes(String(C.cid))}),app.parseAndTranslate(e.template,{categoryItems:s.slice(0,200),selectedCategory:ajaxify.data.selectedCategory,allCategoriesUrl:ajaxify.data.allCategoriesUrl},function(C){f.find('[component="category/list"]').html(C.find('[component="category/list"]').html()),f.find('[component="category/list"] [component="category/no-matches"]').toggleClass("hidden",!!s.length);const v=u.Dropdown.getInstance(f.find(".dropdown-toggle").get(0));v&&v.update()})}},l}.apply(E,y),m!==void 0&&(h.exports=m)}}]);