1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,4884,12533,22765,34271,92747],{92747(D,_,f){var d,h;d=[f(49897),f(33530),f(29930),f(2269)],h=(function(p,m,i){const s={},g={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"};s.open=function(r){config.enablePostHistory&&p.get(`/posts/${encodeURIComponent(r)}/diffs`,{}).then(c=>{E(c).then(l=>{const o=m.dialog({title:"[[topic:diffs.title]]",message:l,size:"large",onEscape:!0,backdrop:!0});if(!c.timestamps.length)return;const a=o.find("select"),t=o.find('button[data-action="restore"]'),n=o.find('button[data-action="delete"]'),e=o.find("ul.posts-list"),y=o.find(".number-of-diffs strong");a.on("change",function(){s.load(r,this.value,e),t.prop("disabled",c.timestamps.indexOf(this.value)===0),n.prop("disabled",c.timestamps.indexOf(this.value)===0)}),t.on("click",function(){s.restore(r,a.val(),o)}),n.on("click",function(){s.delete(r,a.val(),a,y)}),o.on("shown.bs.modal",function(){s.load(r,a.val(),e),t.prop("disabled",!0),n.prop("disabled",!0)})})}).catch(i.error)},s.load=function(r,c,l){config.enablePostHistory&&p.get(`/posts/${encodeURIComponent(r)}/diffs/${c}`,{}).then(o=>{o.deleted=!!parseInt(o.deleted,10),app.parseAndTranslate("partials/posts_list","posts",{posts:[o]},function(a){l.empty().append(a),l.find(".timeago").timeago()})}).catch(i.error)},s.restore=function(r,c,l){config.enablePostHistory&&p.put(`/posts/${encodeURIComponent(r)}/diffs/${c}`,{}).then(()=>{l.modal("hide"),i.success("[[topic:diffs.post-restored]]")}).catch(i.error)},s.delete=function(r,c,l,o){p.del(`/posts/${encodeURIComponent(r)}/diffs/${c}`).then(a=>{E(a,"diffs").then(t=>{l.empty().append(t),l.trigger("change");const n=l.find("option").length;o.text(n),i.success("[[topic:diffs.deleted]]")})}).catch(i.error)};function E(r,c){return new Promise(l=>{const o=[{diffs:r.revisions.map(function(a){const t=parseInt(a.timestamp,10);return{username:a.username,timestamp:t,pretty:new Date(t).toLocaleString(config.userLang.replace("_","-"),g)}}),numDiffs:r.timestamps.length,editable:r.editable,deletable:r.deletable},function(a){l(a)}];c&&o.unshift(c),app.parseAndTranslate("modals/post-history",...o)})}return s}).apply(_,d),h!==void 0&&(D.exports=h)},2269(D,_){var f,d;f=[],d=(function(){const h={},p=/-resized(\.[\w]+)?$/;return h.wrapImagesInLinks=function(m){m.find('[component="post/content"] img:not(.emoji)').each(function(){h.wrapImageInLink($(this))})},h.wrapImageInLink=function(m){let i=m.attr("src")||"";if(i!=="about:blank"&&!m.parent().is("a")){utils.isRelativeUrl(i)&&p.test(i)&&(i=i.replace(p,"$1"));const s=m.attr("alt")||"",g=i.split(".").slice(1).pop(),E=s.split("/").pop(),r=E.split(".").slice(1).pop();m.wrap('<a href="'+i+'" '+(!g&&r?' download="'+utils.escapeHTML(E)+'" ':"")+' target="_blank" rel="noopener">')}},h}).apply(_,f),d!==void 0&&(D.exports=d)},49897(D,_,f){f.r(_),f.d(_,{del:()=>a,get:()=>E,head:()=>r,patch:()=>l,post:()=>c,put:()=>o});var d=f(91749),h=f.n(d),p=f(33530),m=f.n(p);const i=config.relative_path+"/api/v3";async function s(t,n){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:i+t.url,typeof n=="function"){g(t).then(e=>n(null,e),e=>n(e));return}try{return await g(t)}catch(e){if(e.message==="A valid login session was not found. Please log in and try again."){const{url:y}=await(0,d.fire)("filter:admin.reauth",{url:"login"});return(0,p.confirm)("[[error:api.reauth-required]]",b=>{b&&ajaxify.go(y)})}throw e}}async function g(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,d.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const e=await fetch(n,t),{headers:y}=e;if(y.get("x-redirect"))return g({url:y.get("x-redirect"),...t});const b=y.get("content-type"),P=b&&b.startsWith("application/json");let u;if(t.method!=="HEAD"&&(P?u=await e.json():u=await e.text()),!e.ok){if(u){const A=P&&(u.status?.message||u.error||"");throw new Error(P&&A?A:u)}throw new Error(e.statusText)}return P&&u&&u.hasOwnProperty("status")&&u.hasOwnProperty("response")?u.response:u}function E(t,n,e){return s({url:t+(n&&Object.keys(n).length?"?"+$.param(n):"")},e)}function r(t,n,e){return s({url:t+(n&&Object.keys(n).length?"?"+$.param(n):""),method:"HEAD"},e)}function c(t,n,e){return s({url:t,method:"POST",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function l(t,n,e){return s({url:t,method:"PATCH",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function o(t,n,e){return s({url:t,method:"PUT",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function a(t,n,e){return s({url:t,method:"DELETE",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}}}]);
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.