1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,3097,13417,17205,18314,22067,34271,38395,43602,49897,87212,99127],{17205(D,_,u){var d,h;d=[u(16227),u(34405),u(29930),u(49897)],h=(function(r,a,s,E){const O={};let l,w,y=0;O.init=function(g){l||app.parseAndTranslate("modals/change-owner",{},function(m){l=m,w=l.find("#change_owner_commit"),$("body").append(l),l.find("#change_owner_cancel").on("click",i),l.find("#username").on("keyup",t),r.init(e,{allowMainPostSelect:!0}),P(),g&&r.togglePostSelection(g,g.attr("data-pid")),w.on("click",function(){f()}),a.user(l.find("#username"),{filters:["notbanned"]},function(n,c){y=c.item.user.uid,t()})})};function P(){r.pids.length?l.find("#pids").translateText("[[topic:fork-pid-count, "+r.pids.length+"]]"):l.find("#pids").translateText("[[topic:fork-no-pids]]")}function t(){y&&l.find("#username").length&&l.find("#username").val().length&&r.pids.length?w.removeAttr("disabled"):w.attr("disabled",!0)}function e(){t(),P()}function f(){y&&E.post("/posts/owner",{pids:r.pids,uid:y}).then(()=>{ajaxify.go(`/post/${r.pids[0]}`),i()}).catch(s.error)}function i(){l&&(l.remove(),l=null,r.disable())}return O}).apply(_,d),h!==void 0&&(D.exports=h)},49897(D,_,u){u.r(_),u.d(_,{del:()=>g,get:()=>P,head:()=>t,patch:()=>f,post:()=>e,put:()=>i});var d=u(91749),h=u.n(d),r=u(65303),a=u(17459),s=u.n(a),E=u(68636),O=u.n(E);const l=config.relative_path+"/api/v3";async function w(n,c){if(n.url=n.url.startsWith("/api")?config.relative_path+n.url:l+n.url,n.headers=n.headers||{},n.headers["x-return-to"]||(n.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof c=="function"){y(n).then(o=>c(null,o),o=>c(o));return}try{return await y(n)}catch(o){if(o.message===await a.translate("[[error:api.401]]",config.userLang)){const{url:p}=await(0,d.fire)("filter:admin.reauth",{url:"login"}),M=await a.translate("[[error:api.reauth-required]]",config.userLang);(0,r.confirm)(M,C=>{C&&(E.setItem("location-hash",window.location.hash),ajaxify.go(p))})}throw o}}async function y(n){const{url:c}=n;delete n.url,n.data&&!(n.data instanceof FormData)&&(n.data=JSON.stringify(n.data||{}),n.headers["content-type"]="application/json; charset=utf-8"),{options:n}=await(0,d.fire)("filter:api.options",{options:n}),n.data&&(n.body=n.data,delete n.data);const o=await fetch(c,n),{headers:p}=o;if(p.get("x-redirect"))return y({url:p.get("x-redirect"),...n});const M=p.get("content-type"),C=M&&M.startsWith("application/json");let A;if(n.method!=="HEAD"&&(C?A=await o.json():A=await o.text()),!o.ok){if(A){const v=C&&(A.status?.message||A.error||""),x=typeof A=="string"?A:o.statusText||`[[error:api.${o.status}]]`;throw new Error(C&&v?v:x)}throw new Error(o.statusText)}return C&&A&&A.hasOwnProperty("status")&&A.hasOwnProperty("response")?A.response:A}function P(n,c,o){return w({url:n+(c&&Object.keys(c).length?"?"+$.param(c):"")},o)}function t(n,c,o){return w({url:n+(c&&Object.keys(c).length?"?"+$.param(c):""),method:"HEAD"},o)}function e(n,c,o,p){return m("POST",n,c,o,p)}function f(n,c,o,p){return m("PATCH",n,c,o,p)}function i(n,c,o,p){return m("PUT",n,c,o,p)}function g(n,c,o,p){return m("DELETE",n,c,o,p)}function m(n,c,o,p,M){return typeof p=="function"&&(M=p,p={}),w({url:c,method:n,data:o,headers:{"x-csrf-token":config.csrf_token,...p}},M)}},34405(D,_,u){var d,h;d=[u(49897),u(29930),u(36e3),u(9787),u(35786)],h=(function(r,a,{Textcomplete:s},{TextareaEditor:E},{ContenteditableEditor:O}){const l={},w={delay:200,appendTo:null};l.init=t=>{const e={...w,...t},{input:f,onSelect:i}=e;app.loadJQueryUI(function(){f.autocomplete({position:y(),...e,open:function(){$(this).autocomplete("widget").css("z-index",100005)},select:function(g,m){P(f,i,g,m)}})})},l.user=function(t,e,f){typeof e=="function"&&(f=e,e={}),e=e||{},l.init({input:t,onSelect:f,source:(i,g)=>{e.query=i.term,r.get("/api/users",e,function(m,n){if(m)return a.error(m);if(n&&n.users){const c=n.users.map(function(o){return o&&{label:o.username,value:o.username,user:{uid:o.uid,name:o.username,slug:o.userslug,username:o.username,userslug:o.userslug,displayname:o.displayname,picture:o.picture,banned:o.banned,"icon:text":o["icon:text"],"icon:bgColor":o["icon:bgColor"]}}});g(c)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},l.group=function(t,e){l.init({input:t,onSelect:e,source:(f,i)=>{r.get("/groups",{query:f.term},function(g,m){if(g)return a.error(g);if(m&&m.groups.length){const n=m.groups.map(function(c){return c&&{label:c.name,value:c.name,group:c}});i(n)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},l.tag=function(t,e){l.init({input:t,onSelect:e,delay:100,source:(f,i)=>{socket.emit("topics.autocompleteTags",{query:f.term,cid:ajaxify.data.cid||0},function(g,m){if(g)return a.error(g);m&&i(m),$(".ui-autocomplete a").attr("data-ajaxify","false")})}})};function y(){const t=document.querySelector("html").getAttribute("data-dir")==="rtl"?"right":"left";return{my:`${t} top`,at:`${t} bottom`,collision:"none"}}function P(t,e,f,i){e=e||function(){};const g=jQuery.Event("keypress");g.which=13,g.keyCode=13,setTimeout(function(){t.trigger(g)},100),e(f,i)}return l.setup=function({element:t,strategies:e,options:f}){const i=t.get(0);if(!i)return;let g;if(i.nodeName==="TEXTAREA"||i.nodeName==="INPUT"?g=new E(i):i.nodeName==="DIV"&&i.getAttribute("contenteditable")==="true"&&(g=ne
1w O(i)),!g)throw new Error("unknown target element type");i.setAttribute("dir",document.querySelector("html").getAttribute("data-dir"));const m=new s(g,e,{dropdown:f});return m.on("rendered",function(){m.dropdown.items.length&&m.dropdown.items[0].activate()}),m},l}).apply(_,d),h!==void 0&&(D.exports=h)},65303(D,_,u){u.r(_),u.d(_,{alert:()=>E,confirm:()=>O,dialog:()=>s,prompt:()=>l,promptPassword:()=>w});var d=u(33530),h=u.n(d),r=u(17459),a=u.n(r);d.setDefaults({locale:config.userLang}),r.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{d.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),d.setLocale(config.userLang)});async function s(t){const[e,f,i]=await Promise.all([r.translate(t.title||""),y(t)||"",P(t.buttons)]);return d.dialog({...t,title:e,message:f,buttons:i})}async function E(t,e){const[f,i]=await Promise.all([t&&t.title?r.translate(t.title):null,y(t)]);return e=typeof e=="function"?e:t.callback,d.alert({...t,title:f,message:i,callback:e})}async function O(t,e){const[f,i]=await Promise.all([t&&t.title?r.translate(t.title):null,y(t)]);return e=typeof e=="function"?e:t.callback,d.confirm({...t,title:f,message:i,callback:e})}async function l(t,e){const[f,i]=await Promise.all([r.translate(typeof t=="string"?t:t.title),t&&t.message?y(t):null]);return e=typeof e=="function"?e:t.callback,d.prompt({...t,title:f,message:i,callback:e})}async function w(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(e=>{l({...t,inputType:"password",required:!0,value:"",callback:e})})}function y(t){const e=t&&t.message?t.message:t;return e instanceof jQuery?e:r.translate(e||"")}async function P(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async f=>({...f,label:await r.translateKey(f.label)})))}},16227(D,_,u){var d,h;d=[u(52473)],h=(function(r){const a={};let s;a.pids=[];let E=!1;a.init=function(P,t){a.pids.length=0,s=P,t=t||{},E=t.allowMainPostSelect||!1,$("#content").on("click",'[component="topic"] [component="post"]',O),w()};function O(P){P.stopPropagation();const t=$(this).attr("data-pid"),e=$('[component="topic"] [data-pid="'+t+'"]');!E&&parseInt($(this).attr("data-index"),10)===0||a.togglePostSelection(e,t)}a.disable=function(){a.pids.forEach(function(P){r.get("post","pid",P).toggleClass("selected",!1)}),$("#content").off("click",'[component="topic"] [component="post"]',O),y()},a.togglePostSelection=function(P,t){if(t){const e=a.pids.indexOf(t);e===-1?(a.pids.push(t),P.toggleClass("selected",!0)):(a.pids.splice(e,1),P.toggleClass("selected",!1)),a.pids.length&&a.pids.sort(function(f,i){return f-i}),typeof s=="function"&&s()}};function l(){return!1}function w(){$("#content").on("click",'[component="post"] button, [component="post"] a',l)}function y(){$("#content").off("click",'[component="post"] button, [component="post"] a',l)}return a}).apply(_,d),h!==void 0&&(D.exports=h)},68636(D,_,u){var d;d=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(s,E){s=String(s),this._keys.indexOf(s)===-1&&this._keys.push(s),this._store[s]=E},h.prototype.getItem=function(s){return s=String(s),this._keys.indexOf(s)===-1?null:this._store[s]},h.prototype.removeItem=function(s){s=String(s),this._keys=this._keys.filter(function(E){return E!==s}),this._store[s]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(s){return s=parseInt(s,10)||0,this._keys[s]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let r;const a=Date.now().toString();try{if(r=window.localStorage,r.setItem(a,a),r.getItem(a)!==a)throw Error("localStorage behaved unexpectedly");return r.removeItem(a),r}catch(s){console.warn(s),console.warn("localStorage failed, falling back on sessionStorage");try{if(r=window.sessionStorage,r.setItem(a,a),r.getItem(a)!==a)throw Error("sessionStorage behaved unexpectedly");return r.removeItem(a),r}catch(E){return console.warn(E),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(_,u,_,D),d!==void 0&&(D.exports=d)}}]);
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.