PageSourceSearch

https://tchumim.com/assets/modules/categoryFilter.e35a749fa1651129a8bd.min.js

js tchumim.com collected 2026-09-24 13:33:25 UTC 9,645 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,34271,43602,49897,51831,69185,87212,99127],{49897(O,P,d){d.r(P),d.d(P,{del:()=>p,get:()=>m,head:()=>e,patch:()=>c,post:()=>i,put:()=>u});var h=d(91749),E=d.n(h),f=d(65303),y=d(17459),l=d.n(y),w=d(68636),_=d.n(w);const n=config.relative_path+"/api/v3";async function a(t,o){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:n+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 o=="function"){r(t).then(s=>o(null,s),s=>o(s));return}try{return await r(t)}catch(s){if(s.message===await y.translate("[[error:api.401]]",config.userLang)){const{url:C}=await(0,h.fire)("filter:admin.reauth",{url:"login"}),A=await y.translate("[[error:api.reauth-required]]",config.userLang);(0,f.confirm)(A,v=>{v&&(w.setItem("location-hash",window.location.hash),ajaxify.go(C))})}throw s}}async function r(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,h.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const s=await fetch(o,t),{headers:C}=s;if(C.get("x-redirect"))return r({url:C.get("x-redirect"),...t});const A=C.get("content-type"),v=A&&A.startsWith("application/json");let D;if(t.method!=="HEAD"&&(v?D=await s.json():D=await s.text()),!s.ok){if(D){const I=v&&(D.status?.message||D.error||""),L=typeof D=="str
1ing"?D:s.statusText||`[[error:api.${s.status}]]`;throw new Error(v&&I?I:L)}throw new Error(s.statusText)}return v&&D&&D.hasOwnProperty("status")&&D.hasOwnProperty("response")?D.response:D}function m(t,o,s){return a({url:t+(o&&Object.keys(o).length?"?"+$.param(o):"")},s)}function e(t,o,s){return a({url:t+(o&&Object.keys(o).length?"?"+$.param(o):""),method:"HEAD"},s)}function i(t,o,s,C){return g("POST",t,o,s,C)}function c(t,o,s,C){return g("PATCH",t,o,s,C)}function u(t,o,s,C){return g("PUT",t,o,s,C)}function p(t,o,s,C){return g("DELETE",t,o,s,C)}function g(t,o,s,C,A){return typeof C=="function"&&(A=C,C={}),a({url:o,method:t,data:s,headers:{"x-csrf-token":config.csrf_token,...C}},A)}},39259(O,P,d){var h,E;h=[d(96349),d(49897),d(91749)],E=(function(f,y,l){const w={};w.init=function(n,a){if(!n||!n.length)return;a=a||{},a.states=a.states||["watching","tracking","notwatching","ignoring"],a.template=a.template||"partials/category/filter-dropdown-left",l.fire("action:category.filter.options",{el:n,options:a}),f.init(n,a);let r=[],m=[];Array.isArray(a.selectedCids)?r=a.selectedCids.map(String):Array.isArray(ajaxify.data.selectedCids)&&(r=ajaxify.data.selectedCids.map(String)),m=r.slice(),n.on("hidden.bs.dropdown",function(){let e=m.length!==r.length;if(m.forEach(function(i,c){i!==r[c]&&(e=!0)}),m=r.slice(),e&&(a.updateButton?a.updateButton({el:n,changed:e,selectedCids:r.slice()}):a.updateButton!==!1&&_(n,r)),a.onHidden){a.onHidden({changed:e,selectedCids:r.slice()});return}if(e){let i=window.location.pathname;const c=utils.params();r.length?c.cid=r:delete c.cid,delete c.page,Object.keys(c).length&&(i+="?"+$.param(c)),ajaxify.go(i)}}),n.on("click",'[component="category/list"] [data-cid]',function(e){const i=n.find('[component="category/list"]'),c=$(this),u=c.find("a").attr("href");if(u&&u!=="#"&&u.length){e.stopPropagation();return}const p=c.attr("data-cid"),g=c.find('[component="category/select/icon"]');return p!=="all"?(r.includes(p)?r.splice(r.indexOf(p),1):r.push(p),r.sort(function(t,o){return t-o}),g.toggleClass("invisible"),i.find('[data-cid="all"] [component="category/select/icon"]').toggleClass("invisible",!!r.length)):(n.find('[component="category/select/icon"]').addClass("invisible"),i.find('[data-cid="all"] [component="category/select/icon"]').removeClass("invisible"),r=[]),a.selectedCids=r,a.onSelect&&a.onSelect({cid:p,selectedCids:r.slice()}),!1})};function _(n,a){a.length>1?r({icon:"fa-plus",name:"[[unread:multiple-categories-selected]]",bgColor:"#ddd"}):a.length===1?y.get(`/categories/${a[0]}`,{}).then(r):r();function r(m){app.parseAndTranslate("partials/category/filter-dropdown-content",{selectedCategory:m},function(e){n.find("button").replaceWith($("<div/>").html(e).find("button"))})}}return w}).apply(P,h),E!==void 0&&(O.exports=E)},96349(O,P,d){var h,E;h=[d(29930),d(89336),d(49897)],E=(function(f,y,l){const w={};return w.init=function(_,n){let a=n.defaultCategories||null;n=n||{},n.privilege=n.privilege||"topics:read",n.states=n.states||["watching","tracking","notwatching","ignoring"],n.cacheList=n.hasOwnProperty("cacheList")?n.cacheList:!0;let r=[];Array.isArray(n.localCategories)&&(r=n.localCategories.map(u=>({...u})),a&&(a=[...r,...a])),n.selectedCids=n.selectedCids||ajaxify.data.selectedCids||[];const m=_.find('[component="category-selector-search"]');if(!m.length)return;const e=m.parents('[component="category/dropdown"]').length>0||m.parents('[component="category-selector"]').length>0;_.on("show.bs.dropdown",function(){e&&m.removeClass("hidden");function u(){const g=m.find("input").val();g.length>1||!g&&!a?i(g,function(t){a=n.cacheList&&(a||t),c(t)}):!g&&a&&c(a)}const p=m.find("input").val("");p.on("keydown",function(g){if(g.key==="ArrowDown"){const t=_.find('[component="category/list"] li[data-cid]:first a');t.length&&(t.focus(),g.stopPropagation(),g.preventDefault())}}),m.on("click",function(g){g.preventDefault(),g.stopPropagation()}),p.on("keyup",utils.debounce(u,300)),u()}),_.on("shown.bs.dropdown",function(){["xs","sm"].includes(utils.findBootstrapEnvironment())||m.find("input").focus()}),_.on("hide.bs.dropdown",function(){e&&m.addClass("hidden"),m.off("click"),m.find("input").off("keyup keydown")});function i(u,p){l.get("/search/categories",{search:u,query:utils.params(),parentCid:n.parentCid||0,selectedCids:n.selectedCids,privilege:n.privilege,states:n.states,showLinks:n.showLinks,localOnly:n.localOnly,hideUncategorized:n.hideUncategorized},function(g,{categories:t}){if(g)return f.error(g);p(r.concat(t))})}function c(u){const p=n.selectedCids.map(String),g=(n.disabledCids||[]).map(String);u.forEach(function(t){t.selected=p.includes(String(t.cid)),g.includes(String(t.cid))&&(t.disabledClass=!0)}),app.parseAndTranslate(n.template,{categoryItems:u.slice(0,200),selectedCategory:ajaxify.data.selectedCategory,allCategoriesUrl:ajaxify.data.allCategoriesUrl,hideAll:n.hideAll},function(t){_.find('[component="category/list"]').html(t.find('[component="category/list"]').html()),_.find('[component="category/list"] [component="category/no-matches"]').toggleClass("hidden",!!u.length);const o=y.Dropdown.getInstance(_.find(".dropdown-toggle").get(0));o&&o.update()})}},w}).apply(P,h),E!==void 0&&(O.exports=E)},65303(O,P,d){d.r(P),d.d(P,{alert:()=>w,confirm:()=>_,dialog:()=>l,prompt:()=>n,promptPassword:()=>a});var h=d(33530),E=d.n(h),f=d(17459),y=d.n(f);h.setDefaults({locale:config.userLang}),f.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(e=>{h.addLocale(config.userLang,{OK:e[0],CANCEL:e[1],CONFIRM:e[2]}),h.setLocale(config.userLang)});async function l(e){const[i,c,u]=await Promise.all([f.translate(e.title||""),r(e)||"",m(e.buttons)]);return h.dialog({...e,title:i,message:c,buttons:u})}async function w(e,i){const[c,u]=await Promise.all([e&&e.title?f.translate(e.title):null,r(e)]);return i=typeof i=="function"?i:e.callback,h.alert({...e,title:c,message:u,callback:i})}async function _(e,i){const[c,u]=await Promise.all([e&&e.title?f.translate(e.title):null,r(e)]);return i=typeof i=="function"?i:e.callback,h.confirm({...e,title:c,message:u,callback:i})}async function n(e,i){const[c,u]=await Promise.all([f.translate(typeof e=="string"?e:e.title),e&&e.message?r(e):null]);return i=typeof i=="function"?i:e.callback,h.prompt({...e,title:c,message:u,callback:i})}async function a(e){return typeof e=="string"&&(e={title:e}),e=e||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(i=>{n({...e,inputType:"password",required:!0,value:"",callback:i})})}function r(e){const i=e&&e.message?e.message:e;return i instanceof jQuery?i:f.translate(i||"")}async function m(e){if(!Object.keys(e||{}).length)return;const i=Object.values(e);return await Promise.all(i.map(async c=>({...c,label:await f.translateKey(c.label)})))}},68636(O,P,d){var h;h=(function(){function E(){this._store={},this._keys=[]}E.prototype.isMock=!0,E.prototype.setItem=function(l,w){l=String(l),this._keys.indexOf(l)===-1&&this._keys.push(l),this._store[l]=w},E.prototype.getItem=function(l){return l=String(l),this._keys.indexOf(l)===-1?null:this._store[l]},E.prototype.removeItem=function(l){l=String(l),this._keys=this._keys.filter(function(w){return w!==l}),this._store[l]=null},E.prototype.clear=function(){this._keys=[],this._store={}},E.prototype.key=function(l){return l=parseInt(l,10)||0,this._keys[l]},Object.defineProperty&&Object.defineProperty(E.prototype,"length",{get:function(){return this._keys.length}});let f;const y=Date.now().toString();try{if(f=window.localStorage,f.setItem(y,y),f.getItem(y)!==y)throw Error("localStorage behaved unexpectedly");return f.removeItem(y),f}catch(l){console.warn(l),console.warn("localStorage failed, falling back on sessionStorage");try{if(f=window.sessionStorage,f.setItem(y,y),f.getItem(y)!==y)throw Error("sessionStorage behaved unexpectedly");return f.removeItem(y),f}catch(w){return console.warn(w),console.warn("sessionStorage failed, falling back on memory storage"),new E}}}
1).call(P,d,P,O),h!==void 0&&(O.exports=h)}}]);

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.