1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[36558,70565,83014,99617,11383,55253],{55253:(y,E,r)=>{var g,_;g=[r(3547),r(7927),r(74344)],_=function(l,a,m){const c={};let o,d,u,P;c.init=function(){P=ajaxify.data.tid,$(window).off("action:ajaxify.end",i).on("action:ajaxify.end",i),!o&&app.parseAndTranslate("modals/delete-posts",{},function(e){o=e,$("body").append(o),d=o.find("#delete_posts_confirm"),u=o.find("#purge_posts_confirm"),o.find("#delete_posts_cancel").on("click",n),l.init(function(){t(),p()}),p(),d.on("click",function(){s(d,h=>`/posts/${h}/state`)}),u.on("click",function(){s(u,h=>`/posts/${h}`)})})};function i(){(ajaxify.data.template.name!=="topic"||ajaxify.data.tid!==P)&&(n(),$(window).off("action:ajaxify.end",i))}function s(e,h){e.attr("disabled",!0),Promise.all(l.pids.map(k=>m.del(h(k),{}))).then(n).catch(a.error).finally(()=>{e.removeAttr("disabled")})}function p(){l.pids.length?o.find("#pids").translateHtml("[[topic:fork_pid_count, "+l.pids.length+"]]"):o.find("#pids").translateHtml("[[topic:fork_no_pids]]")}function t(){l.pids.length?(d.removeAttr("disabled"),u.removeAttr("disabled")):(d.attr("disabled",!0),u.attr("disabled",!0))}function n(){o&&(o.remove(),o=null,l.disable())}return c}.apply(E,g),_!==void 0&&(y.exports=_)},74344:(y,E,r)=>{r.r(E),r.d(E,{del:()=>p,get:()=>d,head:()=>u,patch:()=>i,post:()=>P,put:()=>s});var g=r(85233),_=r.n(g),l=r(63281),a=r.n(l);const m=config.relative_path+"/api/v3";async function c(t,n){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:m+t.url,typeof n=="function"){o(t).then(e=>n(null,e),e=>n(e));return}try{return await o(t)}catch(e){if(e.message==="A valid login session was not found. Please log in and try again.")return(0,l.confirm)("[[error:api.reauth-required]]",h=>{h&&ajaxify.go("login")});throw e}}async function o(t){const{url:n}=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,g.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const e=await fetch(n,t),{headers:h}=e,k=h.get("content-type"),A=k&&k.startsWith("application/json");let f;if(t.method!=="head"&&(A?f=await e.json():f=await e.text()),!e.ok)throw f?new Error(A?f.status.message:f):new Error(e.statusText);return A&&f&&f.hasOwnProperty("status")&&f.hasOwnProperty("response")?f.response:f}function d(t,n,e){return c({url:t+(n&&Object.keys(n).length?"?"+$.param(n):"")},e)}function u(t,n,e){return c({url:t+(n&&Object.keys(n).length?"?"+$.param(n):""),method:"head"},e)}function P(t,n,e){return c({url:t,method:"post",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function i(t,n,e){return c({url:t,method:"patch",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function s(t,n,e){return c({url:t,method:"put",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function p(t,n,e){return c({url:t,method:"delete",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}},3547:(y,E,r)=>{var g,_;g=[r(7237)],_=function(l){const a={};let m;a.pids=[];let c=!1;a.init=function(i,s){a.pids.length=0,m=i,s=s||{},c=s.allowMainPostSelect||!1,$("#content").on("click",'[component="topic"] [component="post"]',o),u()};function o(i){i.stopPropagation();const s=$(this).attr("data-pid"),p=$('[component="topic"] [data-pid="'+s+'"]');!c&&parseInt($(this).attr("data-index"),10)===0||a.togglePostSelection(p,s)}a.disable=function(){a.pids.forEach(function(i){l.get("post","pid",i).toggleClass("selected",!1)}),$("#content").off("click",'[component="topic"] [component="post"]',o),P()},a.togglePostSelection=function(i,s){if(s){const p=a.pids.indexOf(s);p===-1?(a.pids.push(s),i.toggleClass("selected",!0)):(a.pids.splice(p,1),i.toggleClass("selected",!1)),a.pids.length&&a.pids.sort(function(t,n){return t-n}),typeof m=="function"&&m()}};function d(){return!1}function u(){$("#content").on("click",'[component="post"] button, [component="post"] a',d)}function P(){$("#content").off("click",'[component="post"] button, [component="post"] a',d)}return a}.apply(E,g),_!==void 0&&(y.exports=_)}}]);
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.