1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,34271,36422,38395,43602,44864,49897,87212,99127],{36422(D,P,s){var c,f;c=[s(16227),s(29930),s(49897)],f=(function(a,o,r){const g={};let d,E,_,y;g.init=function(){y=ajaxify.data.tid,$(window).off("action:ajaxify.end",m).on("action:ajaxify.end",m),!d&&app.parseAndTranslate("modals/delete-posts",{},function(A){d=A,$("body").append(d),E=d.find("#delete_posts_confirm"),_=d.find("#purge_posts_confirm"),d.find("#delete_posts_cancel").on("click",p),a.init(function(){h(),n()},{allowMainPostSelect:!0}),n(),E.on("click",function(){t(E,O=>`/posts/${encodeURIComponent(O)}/state`)}),_.on("click",function(){t(_,O=>`/posts/${encodeURIComponent(O)}`)})})};function m(){(ajaxify.data.template.name!=="topic"||ajaxify.data.tid!==y)&&(p(),$(window).off("action:ajaxify.end",m))}function t(A,O){A.attr("disabled",!0),Promise.all(a.pids.map(e=>r.del(O(e),{}))).then(p).catch(o.error).finally(()=>{A.removeAttr("disabled")})}function n(){a.pids.length?d.find("#pids").translateText("[[topic:fork-pid-count, "+a.pids.length+"]]"):d.find("#pids").translateText("[[topic:fork-no-pids]]")}function h(){a.pids.length?(E.removeAttr("disabled"),_.removeAttr("disabled")):(E.attr("disabled",!0),_.attr("disabled",!0))}function p(){d&&(d.remove(),d=null,a.disable())}return g}).apply(P,c),f!==void 0&&(D.exports=f)},49897(D,P,s){s.r(P),s.d(P,{del:()=>A,get:()=>m,head:()=>t,patch:()=>h,post:()=>n,put:()=>p});var c=s(91749),f=s.n(c),a=s(65303),o=s(17459),r=s.n(o),g=s(68636),d=s.n(g);const E=config.relative_path+"/api/v3";async function _(e,l){if(e.url=e.url.startsWith("/api")?config.relative_path+e.url:E+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 l=="function"){y(e).then(i=>l(null,i),i=>l(i));return}try{return await y(e)}catch(i){if(i.message===await o.translate("[[error:api.401]]",config.userLang)){const{url:u}=await(0,c.fire)("filter:admin.reauth",{url:"login"}),M=await o.translate("[[error:api.reauth-required]]",config.userLang);(0,a.confirm)(M,C=>{C&&(g.setItem("location-hash",window.location.hash),ajaxify.go(u))})}throw i}}async function y(e){const{url:l}=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,c.fire)("filter:api.options",{options:e}),e.data&&(e.body=e.data,delete e.data);const i=await fetch(l,e),{headers:u}=i;if(u.get("x-redirect"))return y({url:u.get("x-redirect"),...e});const M=u.get("content-type"),C=M&&M.startsWith("application/json");let w;if(e.method!=="HEAD"&&(C?w=await i.json():w=await i.text()),!i.ok){if(w){const x=C&&(w.status?.message||w.error||""),I=typeof w=="string"?w:i.statusText||`[[error:api.${i.status}]]`;throw new Error(C&&x?x:I)}throw new Error(i.statusText)}return C&&w&&w.hasOwnProperty("status")&&w.hasOwnProperty("response")?w.response:w}function m(e,l,i){return _({url:e+(l&&Object.keys(l).length?"?"+$.param(l):"")},i)}function t(e,l,i){return _({url:e+(l&&Object.keys(l).length?"?"+$.param(l):""),method:"HEAD"},i)}function n(e,l,i,u){return O("POST",e,l,i,u)}function h(e,l,i,u){return O("PATCH",e,l,i,u)}function p(e,l,i,u){return O("PUT",e,l,i,u)}function A(e,l,i,u){return O("DELETE",e,l,i,u)}function O(e,l,i,u,M){return typeof u=="function"&&(M=u,u={}),_({url:l,method:e,data:i,headers:{"x-csrf-token":config.csrf_token,...u}},M)}},65303(D,P,s){s.r(P),s.d(P,{alert:()=>g,confirm:()=>d,dialog:()=>r,prompt:()=>E,promptPassword:()=>_});var c=s(33530),f=s.n(c),a=s(17459),o=s.n(a);c.setDefaults({locale:config.userLang}),a.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{c.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),c.setLocale(config.userLang)});async function r(t){const[n,h,p]=await Promise.all([a.translate(t.title||""),y(t)||"",m(t.buttons)]);return c.dialog({...t,title:n,message:h,buttons:p})}async function g(t,n){const[h,p]=await Promise.all([t&&t.title?a.translate(t.title):null,y(t)]);return n=typeof n=="function"?n:t.callback,c.alert({...t,title:h,message:p,callback:n})}async function d(t,n){const[h,p]=await Promise.all([t&&t.title?a.translate(t.title):null,y(t)]);return n=typeof n=="function"?n:t.callback,c.confirm({...t,title:h,message:p,callback:n})}async function E(t,n){const[h,p]=await Promise.all([a.translate(typeof t=="string"?t:t.title),t&&t.message?y(t):null]);return n=typeof n=="function"?n:t.callback,c.prompt({...t,title:h,message:p,callback:n})}async function _(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(n=>{E({...t,inputType:"password",required:!0,value:"",callback:n})})}function y(t){const n=t&&t.message?t.message:t;return n instanceof jQuery?n:a.translate(n||"")}async function m(t){if(!Object.keys(t||{}).length)return;const n=Object.values(t);return await Promise.all(n.map(async h=>({...h,label:await a.translateKey(h.label)})))}},16227(D,P,s){var c,f;c=[s(52473)],f=(function(a){const o={};let r;o.pids=[];let g=!1;o.init=function(m,t){o.pids.length=0,r=m,t=t||{},g=t.allowMainPostSelect||!1,$("#content").on("click",'[component="topic"] [component="post"]',d),_()};function d(m){m.stopPropagation();const t=$(this).attr("data-pid"),n=$('[component="topic"] [data-pid="'+t+'"]');!g&&parseInt($(this).attr("data-index"),10)===0||o.togglePostSelection(n,t)}o.disable=function(){o.pids.forEach(function(m){a.get("post","pid",m).toggleClass("selected",!1)}),$("#content").off("click",'[component="topic"] [component="post"]',d),y()},o.togglePostSelection=function(m,t){if(t){const n=o.pids.indexOf(t);n===-1?(o.pids.push(t),m.toggleClass("selected",!0)):(o.pids.splice(n,1),m.toggleClass("selected",!1)),o.pids.length&&o.pids.sort(function(h,p){return h-p}),typeof r=="function"&&r()}};function E(){return!1}function _(){$("#content").on("click",'[component="post"] button, [component="post"] a',E)}function y(){$("#content").off("click",'[component="post"] button, [component="post"] a',E)}return o}
1).apply(P,c),f!==void 0&&(D.exports=f)},68636(D,P,s){var c;c=(function(){function f(){this._store={},this._keys=[]}f.prototype.isMock=!0,f.prototype.setItem=function(r,g){r=String(r),this._keys.indexOf(r)===-1&&this._keys.push(r),this._store[r]=g},f.prototype.getItem=function(r){return r=String(r),this._keys.indexOf(r)===-1?null:this._store[r]},f.prototype.removeItem=function(r){r=String(r),this._keys=this._keys.filter(function(g){return g!==r}),this._store[r]=null},f.prototype.clear=function(){this._keys=[],this._store={}},f.prototype.key=function(r){return r=parseInt(r,10)||0,this._keys[r]},Object.defineProperty&&Object.defineProperty(f.prototype,"length",{get:function(){return this._keys.length}});let a;const o=Date.now().toString();try{if(a=window.localStorage,a.setItem(o,o),a.getItem(o)!==o)throw Error("localStorage behaved unexpectedly");return a.removeItem(o),a}catch(r){console.warn(r),console.warn("localStorage failed, falling back on sessionStorage");try{if(a=window.sessionStorage,a.setItem(o,o),a.getItem(o)!==o)throw Error("sessionStorage behaved unexpectedly");return a.removeItem(o),a}catch(g){return console.warn(g),console.warn("sessionStorage failed, falling back on memory storage"),new f}}}).call(P,s,P,D),c!==void 0&&(D.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.