PageSourceSearch

https://tchumim.com/assets/modules/composer-categoryList.dc80b28e4a0421190fcc.min.js

js tchumim.com collected 2026-09-24 13:32:05 UTC 15,634 bytes, 1 lines download raw bytes

1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,25764,33069,34271,43602,49897,69185,86198,87212,99127],{49897(b,A,c){"use strict";c.r(A),c.d(A,{del:()=>d,get:()=>C,head:()=>t,patch:()=>e,post:()=>i,put:()=>n});var E=c(91749),p=c.n(E),h=c(65303),w=c(17459),u=c.n(w),r=c(68636),f=c.n(r);const o=config.relative_path+"/api/v3";async function l(a,y){if(a.url=a.url.startsWith("/api")?config.relative_path+a.url:o+a.url,a.headers=a.headers||{},a.headers["x-return-to"]||(a.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof y=="function"){g(a).then(m=>y(null,m),m=>y(m));return}try{return await g(a)}catch(m){if(m.message===await w.translate("[[error:api.401]]",config.userLang)){const{url:v}=await(0,E.fire)("filter:admin.reauth",{url:"login"}),O=await w.translate("[[error:api.reauth-required]]",config.userLang);(0,h.confirm)(O,D=>{D&&(r.setItem("location-hash",window.location.hash),ajaxify.go(v))})}throw m}}async function g(a){const{url:y}=a;delete a.url,a.data&&!(a.data instanceof FormData)&&(a.data=JSON.stringify(a.data||{}),a.headers["content-type"]="application/json; charset=utf-8"),{options:a}=await(0,E.fire)("filter:api.options",{options:a}),a.data&&(a.body=a.data,delete a.data);const m=await fetch(y,a),{headers:v}=m;if(v.get("x-redirect"))return g({url:v.get("x-redirect"),...a});const O=v.get("content-type"),D=O&&O.startsWith("application/json");let P;if(a.method!=="HEAD"&&(D?P=await m.json():P=await m.text()),!m.ok){if(P){const k=D&&(P.status?.message||P.error||""),x=typeof P=="string"?P:m.statusText||`[[error:api.${m.status}]]`;throw new Error(D&&k?k:x)}throw new Error(m.statusText)}return D&&P&&P.hasOwnProperty("status")&&P.hasOwnProperty("response")?P.response:P}function C(a,y,m){return l({url:a+(y&&Object.keys(y).length?"?"+$.param(y):"")},m)}function t(a,y,m){return l({url:a+(y&&Object.keys(y).length?"?"+$.param(y):""),method:"HEAD"},m)}function i(a,y,m,v){return s("POST",a,y,m,v)}function e(a,y,m,v){return s("PATCH",a,y,m,v)}function n(a,y,m,v){return s("PUT",a,y,m,v)}function d(a,y,m,v){return s("DELETE",a,y,m,v)}function s(a,y,m,v,O){return typeof v=="function"&&(O=v,v={}),l({url:y,method:a,data:m,headers:{"x-csrf-token":config.csrf_token,...v}},O)}},96349(b,A,c){"use strict";var E,p;E=[c(29930),c(89336),c(49897)],p=(function(h,w,u){const r={};return r.init=function(f,o){let l=o.defaultCategories||null;o=o||{},o.privilege=o.privilege||"topics:read",o.states=o.states||["watching","tracking","notwatching","ignoring"],o.cacheList=o.hasOwnProperty("cacheList")?o.cacheList:!0;let g=[];Array.isArray(o.localCategories)&&(g=o.localCategories.map(n=>({...n})),l&&(l=[...g,...l])),o.selectedCids=o.selectedCids||ajaxify.data.selectedCids||[];const C=f.find('[component="category-selector-search"]');if(!C.length)return;const t=C.parents('[component="category/dropdown"]').length>0||C.parents('[component="category-selector"]').length>0;f.on("show.bs.dropdown",function(){t&&C.removeClass("hidden");function n(){const s=C.find("input").val();s.length>1||!s&&!l?i(s,function(a){l=o.cacheList&&(l||a),e(a)}):!s&&l&&e(l)}const d=C.find("input").val("");d.on("keydown",function(s){if(s.key==="ArrowDown"){const a=f.find('[component="category/list"] li[data-cid]:first a');a.length&&(a.focus(),s.stopPropagation(),s.preventDefault())}}),C.on("click",function(s){s.preventDefault(),s.stopPropagation()}),d.on("keyup",utils.debounce(n,300)),n()}),f.on("shown.bs.dropdown",function(){["xs","sm"].includes(utils.findBootstrapEnvironment())||C.find("input").focus()}),f.on("hide.bs.dropdown",function(){t&&C.addClass("hidden"),C.off("click"),C.find("input").off("keyup keydown")});function i(n,d){u.get("/search/categories",{search:n,query:utils.params(),parentCid:o.parentCid||0,selectedCids:o.selectedCids,privilege:o.privilege,states:o.states,showLinks:o.showLinks,localOnly:o.localOnly,hideUncategorized:o.hideUncategorized},function(s,{categories:a}){if(s)return h.error(s);d(g.concat(a))})}function e(n){const d=o.selectedCids.map(String),s=(o.disabledCids||[]).map(String);
1n.forEach(function(a){a.selected=d.includes(String(a.cid)),s.includes(String(a.cid))&&(a.disabledClass=!0)}),app.parseAndTranslate(o.template,{categoryItems:n.slice(0,200),selectedCategory:ajaxify.data.selectedCategory,allCategoriesUrl:ajaxify.data.allCategoriesUrl,hideAll:o.hideAll},function(a){f.find('[component="category/list"]').html(a.find('[component="category/list"]').html()),f.find('[component="category/list"] [component="category/no-matches"]').toggleClass("hidden",!!n.length);const y=w.Dropdown.getInstance(f.find(".dropdown-toggle").get(0));y&&y.update()})}},r}).apply(A,E),p!==void 0&&(b.exports=p)},65348(b,A,c){"use strict";var E,p;E=[c(96349),c(65303),c(91749),c(17459),c(81335)],p=(function(h,w,u,r,f){const o={};return o.init=function(l,g){if(!l||!l.length)return;g=g||{};const C=g.onSelect||function(){};g.states=g.states||["watching","tracking","notwatching","ignoring"],g.template=g.template||"partials/category/selector-dropdown-left",u.fire("action:category.selector.options",{el:l,options:g}),h.init(l,g);const t={el:l,selectedCategory:null};l.on("click","[data-cid]",function(){const e=$(this);return e.hasClass("disabled")?!1:(t.selectCategory(e.attr("data-cid")),C({...t.selectedCategory,categoryEl:e}))});let i=t.el.find('[component="category-selector-selected"]').html();return r.translate(i,e=>{i=e}),t.selectCategory=function(e,n=null){const d=n||t.el.find('[data-cid="'+e+'"]');t.selectedCategory={cid:e,name:d.attr("data-name")},d.length?t.el.find('[component="category-selector-selected"]').html(d.find('[component="category-markup"]').html()):t.el.find('[component="category-selector-selected"]').html(i)},t.getSelectedCategory=function(){return t.selectedCategory},t.getSelectedCid=function(){return t.selectedCategory?t.selectedCategory.cid:0},g.hasOwnProperty("selectedCategory")&&app.parseAndTranslate(g.template,{selectedCategory:g.selectedCategory},function(e){t.el.find('[component="category-selector-selected"]').html(e.find('[component="category-selector-selected"]').html())}),t},o.modal=async function(l){l=l||{},l.onSelect=l.onSelect||function(){},l.onSubmit=l.onSubmit||function(){};const g=await f.render("admin/partials/categories/select-category",{message:l.message}),C=await w.dialog({title:l.title||"[[modules:composer.select-category]]",message:g,buttons:{save:{label:"[[global:select]]",className:"btn-primary",callback:i}}}),t=o.init(C.find('[component="category-selector"]'),l);function i(e){return e.preventDefault(),t.selectedCategory&&(l.onSubmit(t.selectedCategory),C.modal("hide")),!1}l.openOnLoad&&C.on("shown.bs.modal",function(){C.find(".dropdown-toggle").dropdown("toggle")}),C.find("form").on("submit",i)},o}).apply(A,E),p!==void 0&&(b.exports=p)},13342(b,A,c){b.exports=c(41644)},65303(b,A,c){"use strict";c.r(A),c.d(A,{alert:()=>r,confirm:()=>f,dialog:()=>u,prompt:()=>o,promptPassword:()=>l});var E=c(33530),p=c.n(E),h=c(17459),w=c.n(h);E.setDefaults({locale:config.userLang}),h.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{E.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),E.setLocale(config.userLang)});async function u(t){const[i,e,n]=await Promise.all([h.translate(t.title||""),g(t)||"",C(t.buttons)]);return E.dialog({...t,title:i,message:e,buttons:n})}async function r(t,i){const[e,n]=await Promise.all([t&&t.title?h.translate(t.title):null,g(t)]);return i=typeof i=="function"?i:t.callback,E.alert({...t,title:e,message:n,callback:i})}async function f(t,i){const[e,n]=await Promise.all([t&&t.title?h.translate(t.title):null,g(t)]);return i=typeof i=="function"?i:t.callback,E.confirm({...t,title:e,message:n,callback:i})}async function o(t,i){const[e,n]=await Promise.all([h.translate(typeof t=="string"?t:t.title),t&&t.message?g(t):null]);return i=typeof i=="function"?i:t.callback,E.prompt({...t,title:e,message:n,callback:i})}async function l(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(i=>{o({...t,inputType:"password",required:!0,value:"",callback:i})})}function g(t){const i=t&&t.message?t.message:t;return i instanceof jQuery?i:h.translate(i||"")}async function C(t){if(!Object.keys(t||{}).length)return;const i=Object.values(t);return await Promise.all(i.map(async e=>({...e,label:await h.translateKey(e.label)})))}},68636(b,A,c){"use strict";var E;E=(function(){function p(){this._store={},this._keys=[]}p.prototype.isMock=!0,p.prototype.setItem=function(u,r){u=String(u),this._keys.indexOf(u)===-1&&this._keys.push(u),this._store[u]=r},p.prototype.getItem=function(u){return u=String(u),this._keys.indexOf(u)===-1?null:this._store[u]},p.prototype.removeItem=function(u){u=String(u),this._keys=this._keys.filter(function(r){return r!==u}),this._store[u]=null},p.prototype.clear=function(){this._keys=[],this._store={}},p.prototype.key=function(u){return u=parseInt(u,10)||0,this._keys[u]},Object.defineProperty&&Object.defineProperty(p.prototype,"length",{get:function(){return this._keys.length}});let h;const w=Date.now().toString();try{if(h=window.localStorage,h.setItem(w,w),h.getItem(w)!==w)throw Error("localStorage behaved unexpectedly");return h.removeItem(w),h}catch(u){console.warn(u),console.warn("localStorage failed, falling back on sessionStorage");try{if(h=window.sessionStorage,h.setItem(w,w),h.getItem(w)!==w)throw Error("sessionStorage behaved unexpectedly");return h.removeItem(w),h}catch(r){return console.warn(r),console.warn("sessionStorage failed, falling back on memory storage"),new p}}}).call(A,c,A,b),E!==void 0&&(b.exports=E)},14063(b,A,c){"use strict";b=c.nmd(b);var E,p;E=[c(17459),c(91749),c(30076)],p=(function(h,w,u){const r={};let f=!1;r.init=function(){if(r.taskbar=$('[component="taskbar"]'),r.tasklist=r.taskbar.find("ul"),!r.taskbar.length||!r.tasklist.length){f=!0;return}r.taskbar.on("click","li",async function(){const t=$(this),i=t.attr("data-module"),e=t.attr("data-uuid"),n=await app.require(i);return t.hasClass("active")?n.minimize(e):(l(),n.load(e),r.toggleNew(e,!1),r.tasklist.removeClass("active"),t.addClass("active")),!1}),$(window).on("action:app.loggedOut",function(){r.closeAll()})},r.close=async function(t,i){if(f)return;if(r.tasklist.find('[data-module="'+b+'"][data-uuid="'+i+'"]').length){const n=await app.require(t);n&&typeof n.close=="function"&&n.close(i)}},r.closeAll=function(t){if(f)return;let i="[data-uuid]";t&&(i='[data-module="'+t+'"]'+i),r.tasklist.find(i).each(function(e,n){r.close(t||n.getAttribute("data-module"),n.getAttribute("data-uuid"))})},r.discard=function(t,i){if(f)return;r.tasklist.find('[data-module="'+t+'"][data-uuid="'+i+'"]').remove(),o()},r.push=function(t,i,e,n){if(n=n||function(){},f)return n();const d=r.tasklist.find('li[data-uuid="'+i+'"]'),s={module:t,uuid:i,options:e,element:d};w.fire("filter:taskbar.push",s),!d.length&&s.module?g(s,n):n(d)},r.get=function(t){return f?[]:$('[data-module="'+t+'"]').map(function(e,n){return $(n).data()})},r.minimize=function(t,i){if(f)return;r.tasklist.find('[data-module="'+t+'"][data-uuid="'+i+'"]').toggleClass("active",!1)},r.toggleNew=function(t,i,e){if(f)return;r.tasklist.find('[data-uuid="'+t+'"]').toggleClass("new",i),e||w.fire("action:taskbar.toggleNew",t)},r.updateActive=function(t){if(f)return;const i=r.tasklist.find("li");i.removeClass("active"),i.filter('[data-uuid="'+t+'"]').addClass("active"),$("[data-uuid]:not([data-module])").toggleClass("modal-unfocused",!0),$('[data-uuid="'+t+'"]:not([data-module])').toggleClass("modal-unfocused",!1)},r.isActive=function(t){return f?!1:r.tasklist.find('li[data-uuid="'+t+'"]').hasClass("active")};function o(){if(f)return;r.tasklist.find("li").length>0?r.taskbar.attr("data-active","1"):r.taskbar.removeAttr("data-active")}function l(){f||r.tasklist.find(".active").removeClass("active")}function g(t,i){if(f)return i();h.translate(t.options.title,function(e){const n=u.escape(e||"NodeBB Task"),d=t.options.image?u.escape(t.options.image):"",s=t.options.icon?u.escape(t.options.icon):"",a=$(`<li title="${n}"></li>
1`).addClass(t.options.className).html('<a href="#"'+(d?` style="background-image: url('${d}'); background-size: cover;"`:"")+">"+(s?`<i class="fa ${s}"></i> `:"")+`<span aria-label="${n}" component="taskbar/title">${n}</span></a>`).attr({"data-module":t.module,"data-uuid":t.uuid}).addClass(t.options.state!==void 0?t.options.state:"active");(!t.options.state||t.options.state==="active")&&l(),r.tasklist.append(a),o(),t.element=a,a.data(t),w.fire("action:taskbar.pushed",t),i(a)})}const C=function(t,i,e){switch(i){case"title":t.find('[component="taskbar/title"]').text(e);break;case"icon":t.find("i").attr("class","fa fa-"+e);break;case"image":t.find("a").css("background-image",e?'url("'+e.replace(/&#x2F;/g,"/")+'")':"");break;case"background-color":t.find("a").css("background-color",e);break;case"color":t.find("a").css("color",e);break}};return r.update=function(t,i,e){if(f)return;const n=r.tasklist.find('[data-module="'+t+'"][data-uuid="'+i+'"]');if(!n.length)return;const d=n.data();Object.keys(e).forEach(function(s){d[s]=e[s],C(n,s,e[s])}),n.data(d)},r}).apply(A,E),p!==void 0&&(b.exports=p)},41644(b,A,c){"use strict";var E,p;E=[c(65348),c(14063),c(49897),c(29930)],p=(function(h,w,u,r){const f={};let o,l;f.init=function(e,n){const d=e.find(".category-list-container");d.length&&(e.on("action:composer.resize",function(){g(e)}),f.updateTaskbar(e,n),o=h.init(d.find('[component="category-selector"]'),{privilege:"topics:create",states:["watching","tracking","notwatching","ignoring"],onSelect:function(s){n.hasOwnProperty("cid")&&(i(e,n,s),l.selectCategory(s.cid,s.categoryEl))}}),o&&(l=h.init(e.find('.mobile-navbar [component="category-selector"]'),{privilege:"topics:create",states:["watching","tracking","notwatching","ignoring"],onSelect:function(s){n.hasOwnProperty("cid")&&(i(e,n,s),o.selectCategory(s.cid,s.categoryEl))}}),n.cid&&n.category?(o.selectedCategory={cid:n.cid,name:n.category.name},l&&(l.selectedCategory={cid:n.cid,name:n.category.name})):ajaxify.data.template.compose&&ajaxify.data.selectedCategory&&(o.selectedCategory={cid:ajaxify.data.cid,name:ajaxify.data.selectedCategory},l&&(l.selectedCategory={cid:ajaxify.data.cid,name:ajaxify.data.selectedCategory})),g(e)))};function g(e){e.find('.category-list-container [component="category-selector"]').toggleClass("dropup",e.outerHeight()<$(window).height()/2)}f.getSelectedCid=function(){let e;return o&&(e=o.getSelectedCategory()),e?e.cid:0}
1,f.updateTaskbar=function(e,n){n.cid&&u.get(`/categories/${n.cid}`,{}).then(function(d){C(e,d)}).catch(r.error)};function C(e,n){if(n){const d=e.attr("data-uuid");w.update("composer",d,{image:n.backgroundImage,color:n.color,"background-color":n.bgColor,icon:n.icon&&n.icon.slice(3)})}}function t(e,n,d){const s=e.find("textarea.write").val(),a=d&&d.topicTemplate;n&&(!s.length||s===a)&&s!==n.topicTemplate&&e.find("textarea.write").val(n.topicTemplate).trigger("input")}async function i(e,n,d){const s=n.category;n.cid=d.cid;const a=await window.fetch(`${config.relative_path}/api/category/${encodeURIComponent(d.cid)}`).then(y=>y.json());n.category=a,C(e,a),t(e,a,s),c.e(56382).then(function(){var y=[c(72573),c(52543),c(92762)];(function(m,v,O){m.onChangeCategory(a),v.onChangeCategory(e,n,d.cid,a),O.onChangeCategory(e,n),$(window).trigger("action:composer.changeCategory",{postContainer:e,postData:n,selectedCategory:d,categoryData:a})}).apply(null,y)}).catch(c.oe)}return f}).apply(A,E),p!==void 0&&(b.exports=p)}}]);

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.