1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,5719,34271,36228,42289,99127],{10281:((j,p,r)=>{var m,y;m=[r(52473),r(17459),r(81335),r(28061),r(47283),r(49897),r(33530),r(29930)],y=(function(E,A,x,u,f,c,a,o){const s={};s.init=function(){$("#state").val(ajaxify.data.state).removeAttr("disabled"),$("#assignee").val(ajaxify.data.assignee).removeAttr("disabled"),$("#content > div").on("click","[data-action]",function(){const l=this.getAttribute("data-action"),t=$(this).parents("[data-uid]").attr("data-uid"),n=document.getElementById("note");switch(l){case"assign":$("#assignee").val(app.user.uid);case"update":{const e=$("#attributes").serializeArray().reduce((i,h)=>(i[h.name]=h.value,i),{});c.put(`/flags/${ajaxify.data.flagId}`,e).then(({history:i})=>{o.success("[[flags:updated]]"),s.reloadHistory(i)}).catch(o.error);break}case"addEditNote":{const e=this.closest('[component="flag/note"]');let i,h;if(e){i=e.getAttribute("data-datetime");const b=e.getAttribute("data-index");h=ajaxify.data.notes[b].content}a.prompt({title:`[[flags:${i?"edit":"add"}-note]]`,inputType:"textarea",rows:3,value:h,callback:b=>{b&&c.post(`/flags/${ajaxify.data.flagId}/notes`,{note:b,datetime:i}).then(g=>{o.success("[[flags:note-added]]"),s.reloadNotes(g.notes),s.reloadHistory(g.history)}).catch(o.error)}});break}case"appendNote":c.post(`/flags/${ajaxify.data.flagId}/notes`,{note:n.value,datetime:parseInt(n.getAttribute("data-datetime"),10)}).then(e=>{o.success("[[flags:note-added]]"),s.reloadNotes(e.notes),s.reloadHistory(e.history),n.removeAttribute("data-datetime")}).catch(o.error);break;case"delete-note":{const e=parseInt(this.closest("[data-datetime]").getAttribute("data-datetime"),10);a.confirm("[[flags:delete-note-confirm]]",function(i){i&&c.del(`/flags/${ajaxify.data.flagId}/notes/${e}`,{}).then(h=>{o.success("[[flags:note-deleted]]"),s.reloadNotes(h.notes),s.reloadHistory(h.history)}).catch(o.error)});break}case"chat":r.e(92619).then(function(){var e=[r(92619)];(function(i){i.newChat(t)}).apply(null,e)}).catch(r.oe);break;case"ban":u.banAccount(t,ajaxify.refresh);break;case"unban":u.unbanAccount(t);break;case"mute":u.muteAccount(t,ajaxify.refresh);break;case"unmute":u.unmuteAccount(t);break;case"delete-account":f.account(t,ajaxify.refresh);break;case"delete-content":f.content(t,ajaxify.refresh);break;case"delete-all":f.purge(t,ajaxify.refresh);break;case"delete-post":d("delete",c.del,`/posts/${ajaxify.data.target.pid}/state`);break;case"purge-post":d("purge",c.del,`/posts/${ajaxify.data.target.pid}`);break;case"restore-post":d("restore",c.put,`/posts/${ajaxify.data.target.pid}/state`);break;case"delete-flag":{a.confirm("[[flags:delete-flag-confirm]]",function(e){e&&c.del(`/flags/${ajaxify.data.flagId}`,{}).then(()=>{o.success("[[flags:flag-deleted]]"),ajaxify.go("flags")}).catch(o.error)});break}}})};function d(l,t,n){A.translate("[[topic:post-"+l+"-confirm]]",function(e){a.confirm(e,function(i){i&&t(n).then(ajaxify.refresh).catch(o.error)})})}return s.reloadNotes=function(l){ajaxify.data.notes=l,x.render("flags/detail",{notes:l},"notes").then(function(t){const n=E.get("flag/notes");n.empty(),n.html(t),n.find("span.timeago").timeago()})},s.reloadHistory=function(l){app.parseAndTranslate("flags/detail","history",{history:l},function(t){const n=E.get("flag/history");n.empty(),n.html(t),n.find("span.timeago").timeago()})},s}).apply(p,m),y!==void 0&&(j.exports=y)}),28061:((j,p,r)=>{var m,y;m=[r(81335),r(49897),r(33530),r(29930)],y=(function(E,A,x,u){const f={};f.banAccount=function(a,o){a=a||ajaxify.data.theirid,c({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",onSubmit:function(s){const d=s.length>0?Date.now()+s.length*1e3*60*60*(parseInt(s.unit,10)?24:1):0;A.put("/users/"+a+"/ban",{until:d,reason:s.reason||""}).then(()=>{if(typeof o=="function")return o();ajaxify.refresh()}).catch(u.error)}})},f.unbanAccount=function(a){c({tpl:"modals/unban",title:"[[user:unban-account]]",onSubmit:function(o){A.del("/users/"+a+"/ban",{reason:o.reason||""}).then(()=>{ajaxify.refresh()}).catch(u.error)}})},f.muteAccount=function(a,o){a=a||ajaxify.data.theirid,c({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",onSubmit:function(s){const d=s.length>0?Date.now()+s.length*1e3*60*60*(parseInt(s.unit,10)?24:1):0;A.put("/users/"+a+"/mute",{until:d,reason:s.reason||""}).then(()=>
1{if(typeof o=="function")return o();ajaxify.refresh()}).catch(u.error)}})},f.unmuteAccount=function(a){c({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(o){A.del("/users/"+a+"/mute",{reason:o.reason||""}).then(()=>{ajaxify.refresh()}).catch(u.error)}})};function c(a){E.render(a.tpl,{}).then(function(o){const s=x.dialog({title:a.title,message:o,show:!0,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:a.title,callback:function(){const d=s.find("form").serializeArray().reduce(function(l,t){return l[t.name]=t.value,l},{});a.onSubmit(d)}}}})})}return f}).apply(p,m),y!==void 0&&(j.exports=y)}),47283:((j,p,r)=>{var m,y;m=[r(49897),r(33530),r(29930)],y=(function(E,A,x){const u={};u.account=function(c,a){f(c,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",a)},u.content=function(c,a){f(c,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",a)},u.purge=function(c,a){f(c,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",a)};function f(c,a,o,s,d){A.confirm(a,function(l){l&&E.del(`/users/${encodeURIComponent(c)}${o}`,{}).then(()=>{if(x.success(s),typeof d=="function")return d()}).catch(x.error)})}return u}).apply(p,m),y!==void 0&&(j.exports=y)}),49897:((j,p,r)=>{r.r(p),r.d(p,{del:()=>l,get:()=>c,head:()=>a,patch:()=>s,post:()=>o,put:()=>d});var m=r(91749),y=r.n(m),E=r(33530),A=r.n(E);const x=config.relative_path+"/api/v3";async function u(t,n){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:x+t.url,typeof n=="function"){f(t).then(e=>n(null,e),e=>n(e));return}try{return await f(t)}catch(e){if(e.message==="A valid login session was not found. Please log in and try again."){const{url:i}=await(0,m.fire)("filter:admin.reauth",{url:"login"});return(0,E.confirm)("[[error:api.reauth-required]]",h=>{h&&ajaxify.go(i)})}throw e}}async function f(t){const{url:n}=t;delete t.url,t.data&&!(t.data instanceof FormData)&&(t.data=JSON.stringify(t.data||{}),t.headers["content-type"]="application/json; charset=utf-8"),{options:t}=await(0,m.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const e=await fetch(n,t),{headers:i}=e;if(i.get("x-redirect"))return f({url:i.get("x-redirect"),...t});const h=i.get("content-type"),b=h&&h.startsWith("application/json");let g;if(t.method!=="HEAD"&&(b?g=await e.json():g=await e.text()),!e.ok)throw g?new Error(b?g.status.message:g):new Error(e.statusText);return b&&g&&g.hasOwnProperty("status")&&g.hasOwnProperty("response")?g.response:g}function c(t,n,e){return u({url:t+(n&&Object.keys(n).length?"?"+$.param(n):"")},e)}function a(t,n,e){return u({url:t+(n&&Object.keys(n).length?"?"+$.param(n):""),method:"HEAD"},e)}function o(t,n,e){return u({url:t,method:"POST",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function s(t,n,e){return u({url:t,method:"PATCH",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function d(t,n,e){return u({url:t,method:"PUT",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function l(t,n,e){return u({url:t,method:"DELETE",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}})}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.