PageSourceSearch

https://forum.d2learn.org/assets/forum/groups-list.198eb9f2812b7202c720.min.js

js d2learn.org collected 2026-09-25 21:52:11 UTC 5,000 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[45490,99127,82858,34271,1091,49897],{37130:(T,v,i)=>{var p,m;p=[i(22410),i(81335),i(49897),i(40027),i(29930)],m=function(E,w,x,u,h){const l={};return l.init=function(){E.init(l.loadMoreGroups),$('button[data-action="new"]').on("click",function(){u.prompt("[[groups:new-group.group-name]]",function(n){n&&n.length&&x.post("/groups",{name:n}).then(f=>{ajaxify.go("groups/"+f.slug)}).catch(h.error)})});const a=utils.params();$("#search-sort").val(a.sort||"alpha"),$("#search-text").on("keyup",l.search),$("#search-button").on("click",l.search),$("#search-sort").on("change",function(){ajaxify.go("groups?sort="+$("#search-sort").val())})},l.loadMoreGroups=function(a){a<0||E.loadMore("/groups",{sort:$("#search-sort").val(),after:$('[component="groups/container"]').attr("data-nextstart")},function(n,f){n&&n.groups.length?w.render("partials/groups/list",{groups:n.groups}).then(function(g){$("#groups-list").append(g),f()}):f(),n&&n.nextStart&&$('[component="groups/container"]').attr("data-nextstart",n.nextStart)})},l.search=function(){const a=$("#groups-list"),n=$("#search-text"),f=$("#search-sort");return socket.emit("groups.search",{query:n.val(),options:{sort:f.val(),filterHidden:!0,showMembers:!0,hideEphemeralGroups:!0}},function(g,y){if(g)return h.error(g);y=y.filter(function(t){return t.name!=="registered-users"&&t.name!=="guests"}),w.render("partials/groups/list",{groups:y}).then(function(t){a.empty().append(t)})}),!1},l}.apply(v,p),m!==void 0&&(T.exports=m)},22410:(T,v,i)=>{var p,m;p=[i(91749),i(29930),i(49897)],m=function(E,w,x){const u={};let h,l=0,a=!1,n,f=0;u.init=function(t,o){const e=$("body");typeof t=="function"?(h=t,n=e):(h=o,n=t||e),l=$(window).scrollTop(),$(window).off("scroll",g).on("scroll",g),e.height()<=$(window).height()&&(!ajaxify.data.hasOwnProperty("pageCount")||ajaxify.data.pageCount>1)&&h(1)};function g(){f&&clearTimeout(f),f=setTimeout(function(){f=0,y()},60)}function y(){const t=utils.findBootstrapEnvironment(),o=(t==="xs"||t==="sm")&&$("html").hasClass("composing");if(a||o||app.flags._glance)return;const e=$(window).scrollTop(),r=$(window).height(),c=n.height()-r,d=n.offset()?n.offset().top:0,s=100*(e-d)/(c<=0?r:c),A=15,P=85,D=e>l?1:-1;(s<A&&e<l||s>P&&e>l||s<0&&D>0&&c<0)&&h(D),l=e}return u.loadMore=function(t,o,e){if(a)return;a=!0;const r={method:t,data:o};E.fire("action:infinitescroll.loadmore",r),(r.method.startsWith("/")?x.get:socket.emit)(r.method,r.data,function(d,s){if(d)return a=!1,w.error(d);e(s,function(){a=!1})})},u.loadMoreXhr=function(t,o){if(a)return;a=!0;const e=config.relative_path+"/api"+location.pathname.replace(new RegExp("^"+config.relative_path),""),r={url:e,data:t};E.fire("action:infinitescroll.loadmore.xhr",r),$.get(e,t,function(c){o(c,function(){a=!1})}).fail(function(c){a=!1,w.error(String(c.responseJSON||"[[error:no-connection]]"))})},u.removeExtra=function(t,o,e){let r=$();if(t.length<=e)return r;const c=t.length-e;if(o>0){const d=$(document).height(),s=$(window).scrollTop();r=t.slice(0,c).remove(),$(window).scrollTop(s+($(document).height()-d))}else r=t.slice(t.length-c).remove();return r},u}.apply(v,p),m!==void 0&&(T.exports=m)},49897:(T,v,i)=>{i.r(v),i.d(v,{del:()=>y,get:()=>l,head:()=>a,patch:()=>f,post:()=>n,put:()=>g});var p=i(91749),m=i.n(p),E=i(40027),w=i.n(E);const x=config.relative_path+"/api/v3";async function u(t,o){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:x+t.url,typeof o=="function"){h(t).then(e=>o(null,e),e=>o(e));return}try{return await h(t)}catch(e){if(e.message==="A valid login session was not found. Please log in and try again."){const{url:r}=await(0,p.fire)("filter:admin.reauth",{url:"login"});return(0,E.confirm)("[[error:api.reauth-required]]",c=>{c&&ajaxify.go(r)})}throw e}}async function h(t){const{url:o}=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,p.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const e=await fetch(o,t),{headers:r}=e,c=r.get("content-type"),d=c&&c.startsWith("application/json");let s;if(t.method!=="HEAD"&&(d?s=await e.json():s=await e.text()),!e.ok)throw s?new Error(d?s.status.message:s):new Error(e.statusText);return d&&s&&s.hasOwnProperty("status")&&s.hasOwnProperty("response")?s.response:s}function l(t,o,e){return u({url:t+(o&&Object.keys(o).length?"?"+$.param(o):"")},e)}function a(t,o,e){return u({url:t+(o&&Object.keys(o).length?"?"+$.param(o):""),method:"HEAD"},e)}function n(t,o,e){return u({url:t,method:"POST",data:o,headers:{"x-csrf-token":config.csrf_token}},e)}function f(t,o,e){return u({url:t,method:"PATCH",data:o,headers:{"x-csrf-token":config.csrf_token}},e)}function g(t,o,e){return u({url:t,method:"PUT",data:o,headers:{"x-csrf-token":config.csrf_token}},e)}function y(t,o,e){return u({url:t,method:"DELETE",data:o,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.