PageSourceSearch

https://mistarg.cn/assets/forum/groups-memberlist.04e34fe055a8c7549f8c.min.js

js mistarg.cn collected 2026-10-06 13:17:42 UTC 8,676 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,20644,22067,34271,43602,49897,87212,99127],{89664(x,E,l){var c,m;c=[l(49897),l(65303),l(29930),l(30076),l(81335)],m=(function(o,d,i,f,D){const w={};let P;w.init=function(a){P=a||"groups/details",O(),e(),u()},w.refresh=async function(a){const{group:t}=a||await o.get(`/api/groups/${ajaxify.data.group.slug}`),r=await v(t.members);$('[component="groups/members"] tbody').html(r),$('[component="group/member/count"]').text(f.humanReadableNumber(t.memberCount)),$('[component="group/pending/count"]').text(f.humanReadableNumber(t.pending.length)),$('[component="group/invited/count"]').text(f.humanReadableNumber(t.invited.length)),ajaxify.data.group.members=t.members,ajaxify.data.group.memberCount=t.memberCount,ajaxify.data.group.invited=t.invited,ajaxify.data.group.pending=t.pending};function O(){$('[component="groups/members/add"]').on("click",async function(){ajaxify.data.group.slug==="administrators"&&await o.post("/users/reauth/verify"),D.render("admin/partials/groups/add-members",{}).then(async function(t){const r=[],n=await d.dialog({title:"[[groups:details.add-member]]",message:t,buttons:{OK:{label:"[[groups:details.add-member]]",callback:function(){const s=[];n.find("[data-uid][data-selected]").each(function(h,p){s.push(r[$(p).attr("data-uid")])}),M(s).then(()=>{n.modal("hide")})}}}});n.on("click","[data-username]",function(){$(this).attr("data-selected")==="1"?$(this).removeAttr("data-selected"):$(this).attr("data-selected",1),$(this).find("i").toggleClass("invisible")}),n.find("input").on("keyup",function(){o.get("/api/users",{query:$(this).val(),paginate:!1},function(s,h){if(s)return i.error(s);h.users.forEach(function(p){r[p.uid]=p}),app.parseAndTranslate("admin/partials/groups/add-members","users",{users:h.users},function(p){n.find("#search-result").html(p)})})})})})}async function M(a){let t=[];for(const s of a)try{await o.put(`/groups/${ajaxify.data.group.slug}/membership/${s.uid}`),t.push(s)}catch(h){i.error(h)}const r=$('[component="groups/members"]');t=t.filter(s=>!r.find(`[data-uid="${s.uid}"]`).length);const n=await v(t);$('[component="groups/members"] tbody').prepend(n)}function e(){const a=$('[component="groups/members/search"]');a.on("keyup",utils.debounce(async function(){const t=a.val(),r=await o.get(`/groups/${ajaxify.data.group.slug}/members`,{query:t}),n=await v(r.users);$('[component="groups/members"] tbody').html(n),$('[component="groups/members"]').attr("data-nextstart",20)},250))}function u(){$('[component="groups/members"]').on("scroll",utils.debounce(function(){const a=$(this),t=(a[0].scrollHeight-a.innerHeight())*.9;a.scrollTop()>t&&!$('[component="groups/members/search"]').val()&&g()},250))}async function g(){const a=$('[component="groups/members"]');if(a.attr("loading"))return;a.attr("loading",1);const t=await o.get(`/groups/${ajaxify.data.group.slug}/members`,{after:a.attr("data-nextstart")}).catch(i.error);t&&t.users.length?(await b(t.users),a.removeAttr("loading"),a.attr("data-nextstart",t.nextStart)):a.removeAttr("loading")}async function b(a){a=a.filter(function(r){return!$('[component="groups/members"] [data-uid="'+r.uid+'"]').length});const t=await v(a);$('[component="groups/members"] tbody').append(t)}async function v(a){return await app.parseAndTranslate(P,"group.members",{group:{members:a,isOwner:ajaxify.data.group.isOwner}})}return w.toggleOwnership=async function(a,t,r){return await o[r?"del":"put"](`/groups/${a}/ownership/${encodeURIComponent(t)}`)},w.kickMember=async function(a,t){return await o.del(`/groups/${a}/membership/${encodeURIComponent(t)}`)},w}).apply(E,c),m!==void 0&&(x.exports=m)},49897(x,E,l){l.r(E),l.d(E,{del:()=>v,get:()=>M,head:()=>e,patch:()=>g,post:()=>u,put:()=>b});var c=l(91749),m=l.n(c),o=l(65303),d=l(17459),i=l.n(d),f=l(68636),D=l.n(f);const w=config.relative_path+"/api/v3";async function P(t,r){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:w+t.url,t.headers=t.headers||{},t.headers["x-return-to"]||(t.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof r=="function"){O(t).then(n=>r(null,n),n=>r(n));return}try{return await O(t)}catch(n){if(n.message===await d.translate("[[error:api.401]]",config.userLang)){const{url:s}=await(0,c.fire)("filter:admin.reauth",{url:"login"}),h=await d.translate("[[error:api.reauth-required]]",config.userLang);(0,o.confirm)(h,p=>{p&&(f.setItem("location-hash",window.location.hash),ajaxify.go(s))})}throw n}}async function O(t){const{url:r}=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,c.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const n=await fetch(r,t),{headers:s}=n;if(s.get("x-redirect"))return O({url:s.get("x-redirect"),...t});const h=s.get("content-type"),p=h&&h.startsWith("application/json");let y;if(t.method!=="HEAD"&&(p?y=await n.json():y=await n.text()),!n.ok){if(y){const _=p&&(y.status?.message||y.error||""),A=typeof y=="string"?y:n.statusText||`[[error:api.${n.status}]]`;throw new Error(p&&_?_:A)}throw new Error(n.statusText)}return p&&y&&y.hasOwnProperty("status")&&y.hasOwnProperty("response")?y.response:y}function M(t,r,n){return P({url:t+(r&&Object.keys(r).length?"?"+$.param(r):"")},n)}function e(t,r,n){return P({url:t+(r&&Object.keys(r).length?"?"+$.param(r):""),method:"HEAD"},n)}function u(t,r,n,s){return a("POST",t,r,n,s)}function g(t,r,n,s){return a("PATCH",t,r,n,s)}function b(t,r,n,s){return a("PUT",t,r,n,s)}function v(t,r,n,s){return a("DELETE",t,r,n,s)}function a(t,r,n,s,h){return typeof s=="function"&&(h=s,s={}),P({url:r,method:t,data:n,headers:{"x-csrf-token":config.csrf_token,...s}},h)}},65303(x,E,l){l.r(E),l.d(E,{alert:()=>f,confirm:()=>D,dialog:()=>i,prompt:()=>w,promptPassword:()=>P});var c=l(33530),m=l.n(c),o=l(17459),d=l.n(o);c.setDefaults({locale:config.userLang}),o.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(e=>{c.addLocale(config.userLang,{OK:e[0],CANCEL:e[1],CONFIRM:e[2]}
1),c.setLocale(config.userLang)});async function i(e){const[u,g,b]=await Promise.all([o.translate(e.title||""),O(e)||"",M(e.buttons)]);return c.dialog({...e,title:u,message:g,buttons:b})}async function f(e,u){const[g,b]=await Promise.all([e&&e.title?o.translate(e.title):null,O(e)]);return u=typeof u=="function"?u:e.callback,c.alert({...e,title:g,message:b,callback:u})}async function D(e,u){const[g,b]=await Promise.all([e&&e.title?o.translate(e.title):null,O(e)]);return u=typeof u=="function"?u:e.callback,c.confirm({...e,title:g,message:b,callback:u})}async function w(e,u){const[g,b]=await Promise.all([o.translate(typeof e=="string"?e:e.title),e&&e.message?O(e):null]);return u=typeof u=="function"?u:e.callback,c.prompt({...e,title:g,message:b,callback:u})}async function P(e){return typeof e=="string"&&(e={title:e}),e=e||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(u=>{w({...e,inputType:"password",required:!0,value:"",callback:u})})}function O(e){const u=e&&e.message?e.message:e;return u instanceof jQuery?u:o.translate(u||"")}async function M(e){if(!Object.keys(e||{}).length)return;const u=Object.values(e);return await Promise.all(u.map(async g=>({...g,label:await o.translateKey(g.label)})))}},68636(x,E,l){var c;c=(function(){function m(){this._store={},this._keys=[]}m.prototype.isMock=!0,m.prototype.setItem=function(i,f){i=String(i),this._keys.indexOf(i)===-1&&this._keys.push(i),this._store[i]=f},m.prototype.getItem=function(i){return i=String(i),this._keys.indexOf(i)===-1?null:this._store[i]},m.prototype.removeItem=function(i){i=String(i),this._keys=this._keys.filter(function(f){return f!==i}),this._store[i]=null},m.prototype.clear=function(){this._keys=[],this._store={}},m.prototype.key=function(i){return i=parseInt(i,10)||0,this._keys[i]},Object.defineProperty&&Object.defineProperty(m.prototype,"length",{get:function(){return this._keys.length}});let o;const d=Date.now().toString();try{if(o=window.localStorage,o.setItem(d,d),o.getItem(d)!==d)throw Error("localStorage behaved unexpectedly");return o.removeItem(d),o}catch(i){console.warn(i),console.warn("localStorage failed, falling back on sessionStorage");try{if(o=window.sessionStorage,o.setItem(d,d),o.getItem(d)!==d)throw Error("sessionStorage behaved unexpectedly");return o.removeItem(d),o}catch(f){return console.warn(f),console.warn("sessionStorage failed, falling back on memory storage"),new m}}}).call(E,l,E,x),c!==void 0&&(x.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.