1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,34271,37147,43602,49897,87212,99127],{53309(D,y,i){var l,h;l=[i(52473),i(49897),i(29930)],h=(function(s,u,a){const d={};let _=[];d.init=function(t){t=t||{},_.length=0,s.get("chat/search").on("keyup",utils.debounce(O,250));const n=$('[component="chat/search/list"]');n.on("click","[data-uid]",function(){t.onSelect&&t.onSelect(_.find(f=>String(f.uid)===String($(this).attr("data-uid")))),P(n)})};function P(t){s.get("chat/search").val(""),m(t),t.find('[component="chat/search/no-users"]').addClass("hidden"),t.find('[component="chat/search/start-typing"]').removeClass("hidden")}function O(){const t=$('[component="chat/search/list"]'),n=s.get("chat/search").val();if(!n)return P(t);t.find('[component="chat/search/start-typing"]').addClass("hidden"),u.get("/api/users",{query:n,searchBy:"username",paginate:!1}).then(v).catch(a.error)}function m(t){_.length=0,t.find("[data-uid]").remove()}async function v(t){const n=$('[component="chat/search/list"]');if(m(n),t.users=t.users.filter(function(E){return parseInt(E.uid,10)!==parseInt(app.user.uid,10)}),_=t.users,!t.users.length)return n.find('[component="chat/search/no-users"]').removeClass("hidden");n.find('[component="chat/search/no-users"]').addClass("hidden");const f=await app.parseAndTranslate("modals/create-room","searchUsers",{searchUsers:t.users});n.append(f),n.parent().toggleClass("show",!0)}return d}).apply(y,l),h!==void 0&&(D.exports=h)},49897(D,y,i){i.r(y),i.d(y,{del:()=>M,get:()=>v,head:()=>t,patch:()=>f,post:()=>n,put:()=>E});var l=i(91749),h=i.n(l),s=i(65303),u=i(17459),a=i.n(u),d=i(68636),_=i.n(d);const P=config.relative_path+"/api/v3";async function O(e,o){if(e.url=e.url.startsWith("/api")?config.relative_path+e.url:P+e.url,e.headers=e.headers||{},e.headers["x-return-to"]||(e.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof o=="function"){m(e).then(r=>o(null,r),r=>o(r));return}try{return await m(e)}catch(r){if(r.message===await u.translate("[[error:api.401]]",config.userLang)){const{url:c}=await(0,l.fire)("filter:admin.reauth",{url:"login"}),w=await u.translate("[[error:api.reauth-required]]",config.userLang);(0,s.confirm)(w,p=>{p&&(d.setItem("location-hash",window.location.hash),ajaxify.go(c))})}throw r}}async function m(e){const{url:o}=e;delete e.url,e.data&&!(e.data instanceof FormData)&&(e.data=JSON.stringify(e.data||{}),e.headers["content-type"]="application/json; charset=utf-8"),{options:e}=await(0,l.fire)("filter:api.options",{options:e}),e.data&&(e.body=e.data,delete e.data);const r=await fetch(o,e),{headers:c}=r;if(c.get("x-redirect"))return m({url:c.get("x-redirect"),...e});const w=c.get("content-type"),p=w&&w.startsWith("application/json");let g;if(e.method!=="HEAD"&&(p?g=await r.json():g=await r.text()),!r.ok){if(g){const C=p&&(g.status?.message||g.error||""),A=typeof g=="string"?g:r.statusText||`[[error:api.${r.status}]]`;throw new Error(p&&C?C:A)}throw new Error(r.statusText)}return p&&g&&g.hasOwnProperty("status")&&g.hasOwnProperty("response")?g.response:g}function v(e,o,r){return O({url:e+(o&&Object.keys(o).length?"?"+$.param(o):"")},r)}function t(e,o,r){return O({url:e+(o&&Object.keys(o).length?"?"+$.param(o):""),method:"HEAD"},r)}function n(e,o,r,c){return I("POST",e,o,r,c)}function f(e,o,r,c){return I("PATCH",e,o,r,c)}function E(e,o,r,c){return I("PUT",e,o,r,c)}function M(e,o,r,c){return I("DELETE",e,o,r,c)}function I(e,o,r,c,w){return typeof c=="function"&&(w=c,c={}),O({url:o,method:e,data:r,headers:{"x-csrf-token":config.csrf_token,...c}},w)}},65303(D,y,i){i.r(y),i.d(y,{alert:()=>d,confirm:()=>_,dialog:()=>a,prompt:()=>P,promptPassword:()=>O});var l=i(33530),h=i.n(l),s=i(17459),u=i.n(s);l.setDefaults({locale:config.userLang}),s.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{l.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),l.setLocale(config.userLang)});async function a(t){const[n,f,E]=await Promise.all([s.translate(t.title||""),m(t)||"",v(t.buttons)]);return l.dialog({...t,title:n,message:f,buttons:E})}async function d(t,n){const[f,E]=await Promise.all([t&&t.title?s.translate(t.title):null,m(t)]);return n=typeof n=="function"?n:t.callback,l.alert({...t,title:f,message:E,callback:n})}async function _(t,n){const[f,E]=await Promise.all([t&&t.title?s.translate(t.title):null,m(t)]);return n=typeof n=="function"?n:t.callback,l.confirm({...t,title:f,message:E,callback:n})}async function P(t,n){const[f,E]=await Promise.all([s.translate(typeof t=="string"?t:t.title),t&&t.message?m(t):null]);return n=typeof n=="function"?n:t.callback,l.prompt({...t,title:f,message:E,callback:n})}async function O(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(n=>{P({...t,inputType:"password",required:!0,value:"",callback:n})})}function m(t){const n=t&&t.message?t.message:t;return n instanceof jQuery?n:s.translate(n||"")}async function v(t){if(!Object.keys(t||{}).length)return;const n=Object.values(t);return await Promise.all(n.map(async f=>({...f,label:await s.translateKey(f.label)})))}},68636(D,y,i){var l;l=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(a,d){a=String(a),this._keys.indexOf(a)===-1&&this._keys.push(a),this._store[a]=d},h.prototype.getItem=function(a){return a=String(a),this._keys.indexOf(a)===-1?null:this._store[a]},h.prototype.removeItem=function(a){a=String(a),this._keys=this._keys.filter(function(d){return d!==a}),this._store[a]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(a){return a=parseInt(a,10)||0,this._keys[a]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let s;const u=Date.now().toString();try{if(s=window.localStorage,s.setItem(u,u),s.getItem(u)!==u)throw Error("localStorage behaved unexpectedly");return s.removeItem(u),s}
1catch(a){console.warn(a),console.warn("localStorage failed, falling back on sessionStorage");try{if(s=window.sessionStorage,s.setItem(u,u),s.getItem(u)!==u)throw Error("sessionStorage behaved unexpectedly");return s.removeItem(u),s}catch(d){return console.warn(d),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(y,i,y,D),l!==void 0&&(D.exports=l)}}]);
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.