1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,1977,2067,3417,3602,4271,7212,8314,9127,9897],{7341(O,v,i){var c,h;c=[i(5303),i(9930),i(4405)],h=(function(u,f,o){const E={};return E.init=function(){$('[data-action="clear"]').on("click",function(){return u.confirm("[[admin/advanced/events:confirm-delete-all-events]]",p=>{p&&socket.emit("admin.deleteAllEvents",function(d){if(d)return f.error(d);$(".events-list").empty()})}),!1}),$(".delete-event").on("click",function(){const p=$(this).parents("[data-eid]"),d=p.attr("data-eid");socket.emit("admin.deleteEvents",[d],function(D){if(D)return f.error(D);p.remove()})}),$("#user-group-select").on("change",function(){const p=$(this).val();$("#username").toggleClass("hidden",p!=="username"),p!=="username"&&$("#username").val(""),$("#group").toggleClass("hidden",p!=="group"),p!=="group"&&$("#group").val("")}),o.user($("#username")),o.group($("#group")),$("#apply").on("click",E.refresh)},E.refresh=function(p){p.preventDefault();const d=$("#filters");ajaxify.go("admin/advanced/events?"+d.serialize())},E}).apply(v,c),h!==void 0&&(O.exports=h)},9897(O,v,i){i.r(v),i.d(v,{del:()=>m,get:()=>I,head:()=>t,patch:()=>l,post:()=>e,put:()=>s});var c=i(1749),h=i.n(c),u=i(5303),f=i(7459),o=i.n(f),E=i(8636),p=i.n(E);const d=config.relative_path+"/api/v3";async function D(n,a){if(n.url=n.url.startsWith("/api")?config.relative_path+n.url:d+n.url,n.headers=n.headers||{},n.headers["x-return-to"]||(n.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof a=="function"){_(n).then(r=>a(null,r),r=>a(r));return}try{return await _(n)}catch(r){if(r.status===401){const{url:y}=await(0,c.fire)("filter:admin.reauth",{url:"login"}),w=await f.translate("[[error:api.reauth-required]]",config.userLang);(0,u.confirm)(w,A=>{A&&(E.setItem("location-hash",window.location.hash),ajaxify.go(y))})}throw r}}async function _(n){const{url:a}=n;delete n.url,n.data&&!(n.data instanceof FormData)&&(n.data=JSON.stringify(n.data||{}),n.headers["content-type"]="application/json; charset=utf-8"),{options:n}=await(0,c.fire)("filter:api.options",{options:n}),n.data&&(n.body=n.data,delete n.data);const r=await fetch(a,n),{headers:y}=r;if(y.get("x-redirect"))return _({url:y.get("x-redirect"),...n});const w=y.get("content-type"),A=w&&w.startsWith("application/json");let P;if(n.method!=="HEAD"&&(A?P=await r.json():P=await r.text()),!r.ok){let M=r.statusText;if(P){const T=A&&(P.status?.message||P.error||""),C=typeof P=="string"?P:r.statusText||`[[error:api.${r.status}]]`;M=A&&T?T:C}const x=new Error(M);throw x.status=r.status,x}return A&&P&&P.hasOwnProperty("status")&&P.hasOwnProperty("response")?P.response:P}function I(n,a,r){return D({url:n+(a&&Object.keys(a).length?"?"+$.param(a):"")},r)}function t(n,a,r){return D({url:n+(a&&Object.keys(a).length?"?"+$.param(a):""),method:"HEAD"},r)}function e(n,a,r,y){return g("POST",n,a,r,y)}function l(n,a,r,y){return g("PATCH",n,a,r,y)}function s(n,a,r,y){return g("PUT",n,a,r,y)}function m(n,a,r,y){return g("DELETE",n,a,r,y)}function g(n,a,r,y,w){return typeof y=="function"&&(w=y,y={}),D({url:a,method:n,data:r,headers:{"x-csrf-token":config.csrf_token,...y}},w)}},4405(O,v,i){var c,h;c=[i(9897),i(9930),i(6e3),i(9787),i(5786)],h=(function(u,f,{Textcomplete:o},{TextareaEditor:E},{ContenteditableEditor:p}){const d={},D={delay:200,appendTo:null};d.init=t=>{const e={...D,...t},{input:l,onSelect:s}=e;app.loadJQueryUI(function(){l.autocomplete({position:_(),...e,open:function(){$(this).autocomplete("widget").css("z-index",100005)},select:function(m,g){I(l,s,m,g)}})})},d.user=function(t,e,l){typeof e=="function"&&(l=e,e={}),e=e||{},d.init({input:t,onSelect:l,source:(s,m)=>{e.query=s.term,u.get("/api/users",e,function(g,n){if(g)return f.error(g);if(n&&n.users){const a=n.users.map(function(r){return r&&{label:r.username,value:r.username,user:{uid:r.uid,name:r.username,slug:r.userslug,username:r.username,userslug:r.userslug,displayname:r.displayname,picture:r.picture,banned:r.banned,"icon:text":r["icon:text"],"icon:bgColor":r["icon:bgColor"]}}});
1m(a)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},d.group=function(t,e){d.init({input:t,onSelect:e,source:(l,s)=>{u.get("/groups",{query:l.term},function(m,g){if(m)return f.error(m);if(g&&g.groups.length){const n=g.groups.map(function(a){return a&&{label:a.name,value:a.name,group:a}});s(n)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},d.tag=function(t,e){d.init({input:t,onSelect:e,delay:100,source:(l,s)=>{socket.emit("topics.autocompleteTags",{query:l.term,cid:ajaxify.data.cid||0},function(m,g){if(m)return f.error(m);g&&s(g),$(".ui-autocomplete a").attr("data-ajaxify","false")})}})};function _(){const t=document.querySelector("html").getAttribute("data-dir")==="rtl"?"right":"left";return{my:`${t} top`,at:`${t} bottom`,collision:"none"}}function I(t,e,l,s){e=e||function(){};const m=jQuery.Event("keypress");m.which=13,m.keyCode=13,setTimeout(function(){t.trigger(m)},100),e(l,s)}return d.setup=function({element:t,strategies:e,options:l}){const s=t.get(0);if(!s)return;let m;if(s.nodeName==="TEXTAREA"||s.nodeName==="INPUT"?m=new E(s):s.nodeName==="DIV"&&s.getAttribute("contenteditable")==="true"&&(m=new p(s)),!m)throw new Error("unknown target element type");s.setAttribute("dir",document.querySelector("html").getAttribute("data-dir"));const g=new o(m,e,{dropdown:l});return g.on("rendered",function(){g.dropdown.items.length&&g.dropdown.items[0].activate()}),g},d}).apply(v,c),h!==void 0&&(O.exports=h)},5303(O,v,i){i.r(v),i.d(v,{alert:()=>E,confirm:()=>p,dialog:()=>o,prompt:()=>d,promptPassword:()=>D});var c=i(3530),h=i.n(c),u=i(7459),f=i.n(u);c.setDefaults({locale:config.userLang}),u.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{c.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),c.setLocale(config.userLang)});async function o(t){const[e,l,s]=await Promise.all([u.translate(t.title||""),_(t)||"",I(t.buttons)]);return c.dialog({...t,title:e,message:l,buttons:s})}async function E(t,e){const[l,s]=await Promise.all([t&&t.title?u.translate(t.title):null,_(t)]);return e=typeof e=="function"?e:t.callback,c.alert({...t,title:l,message:s,callback:e})}async function p(t,e){const[l,s]=await Promise.all([t&&t.title?u.translate(t.title):null,_(t)]);return e=typeof e=="function"?e:t.callback,c.confirm({...t,title:l,message:s,callback:e})}async function d(t,e){const[l,s]=await Promise.all([u.translate(typeof t=="string"?t:t.title),t&&t.message?_(t):null]);return e=typeof e=="function"?e:t.callback,c.prompt({...t,title:l,message:s,callback:e})}async function D(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(e=>{d({...t,inputType:"password",required:!0,value:"",callback:e})})}function _(t){const e=t&&t.message?t.message:t;return e instanceof jQuery?e:u.translate(e||"")}async function I(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async l=>({...l,label:await u.translateKey(l.label)})))}},8636(O,v,i){var c;c=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(o,E){o=String(o),this._keys.indexOf(o)===-1&&this._keys.push(o),this._store[o]=E},h.prototype.getItem=function(o){return o=String(o),this._keys.indexOf(o)===-1?null:this._store[o]},h.prototype.removeItem=function(o){o=String(o),this._keys=this._keys.filter(function(E){return E!==o}),this._store[o]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(o){return o=parseInt(o,10)||0,this._keys[o]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let u;const f=Date.now().toString();try{if(u=window.localStorage,u.setItem(f,f),u.getItem(f)!==f)throw Error("localStorage behaved unexpectedly");return u.removeItem(f),u}catch(o){console.warn(o),console.warn("localStorage failed, falling back on sessionStorage");try{if(u=window.sessionStorage,u.setItem(f,f),u.getItem(f)!==f)throw Error("sessionStorage behaved unexpectedly");return u.removeItem(f),u}catch(E){return console.warn(E),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(v,i,v,O),c!==void 0&&(O.exports=c)}}]);
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.