1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[4884,15587,97082],{84485(g,v,c){"use strict";var p,f;p=[c(67910),c(29930),c(49897)],f=(function(h,t,o){const n={};return n.init=function(){h.init(),$('[data-action="consent"]').on("click",function(){socket.emit("user.gdpr.consent",{},function(a){if(a)return t.error(a);ajaxify.refresh()})}),e($('[data-action="export-profile"]'),"profile","[[user:consent.export-profile-success]]"),e($('[data-action="export-posts"]'),"posts","[[user:consent.export-posts-success]]"),e($('[data-action="export-uploads"]'),"uploads","[[user:consent.export-uploads-success]]");function e(a,i,u){a.on("click",function(){o.post(`/users/${ajaxify.data.uid}/exports/${i}`).then(()=>{t.success(u)}).catch(t.error)})}},n}).apply(v,p),f!==void 0&&(g.exports=f)},67910(g,v,c){"use strict";var p,f;p=[c(36684),c(72254),c(52473),c(17459),c(47283),c(28061),c(7524),c(49897),c(65303),c(29930)],f=(function(h,t,o,n,e,a,i,u,d,r){const s={};let b;s.init=function(){b=ajaxify.data.isAdmin||ajaxify.data.isSelf||ajaxify.data.isGlobalModerator,x(),b&&E(),o.get("account/follow").on("click",()=>C("follow")),o.get("account/unfollow").on("click",()=>C("unfollow")),o.get("account/chat").on("click",async function(){const{roomId:l}=await u.get(`/users/${encodeURIComponent(ajaxify.data.uid)}/chat`),m=await app.require("chat");l?m.openChat(l):m.newChat(ajaxify.data.uid)}),o.get("account/new-chat").on("click",async function(){(await app.require("chat")).newChat(ajaxify.data.uid,function(){o.get("account/chat").parent().removeClass("hidden")})}),o.get("account/ban").on("click",()=>a.banAccount(ajaxify.data.theirid)),o.get("account/mute").on("click",()=>a.muteAccount(ajaxify.data.theirid)),o.get("account/unban").on("click",()=>a.unbanAccount(ajaxify.data.theirid)),o.get("account/unmute").on("click",()=>a.unmuteAccount(ajaxify.data.theirid)),o.get("account/delete-account").on("click",()=>e.account(ajaxify.data.theirid)),o.get("account/delete-content").on("click",()=>e.content(ajaxify.data.theirid)),o.get("account/delete-all").on("click",()=>e.purge(ajaxify.data.theirid)),o.get("account/flag").on("click",w),o.get("account/already-flagged").on("click",k),o.get("account/block").on("click",()=>D("block")),o.get("account/unblock").on("click",()=>D("unblock"))};function x(){$('[component="profile/change/picture"]').on("click",function(){return i.openChangeModal(),!1})}function E(){h.init(o.get("account/cover"),function(l,m,y){socket.emit("user.updateCover",{uid:ajaxify.data.uid,imageData:l,position:m},y)},function(){t.show({title:"[[user:upload-cover-picture]]",socketMethod:"user.updateCover",aspectRatio:NaN,allowSkippingCrop:!0,restrictImageDimension:!1,paramName:"uid",paramValue:ajaxify.data.theirid,accept:".png,.jpg,.bmp"},function(l){l=(l.startsWith("http")?"":config.relative_path)+l+"?"+Date.now(),o.get("account/cover").css("background-image","url("+l+")")})},j)}function C(l){if(!app.user.uid){let y;return utils.isNumber(ajaxify.data.uid)?y=config.url+"/user/"+ajaxify.data.uid:y=ajaxify.data.userslug,c.e(91722).then(()=>c(91722)).then(({trigger:A})=>{A("follow",{object:y})}),!1}const m=isFinite(ajaxify.data.uid)?ajaxify.data.uid:encodeURIComponent(ajaxify.data.userslug);return u[l==="follow"?"put":"del"]("/users/"+m+"/follow",void 0,function(y){if(y)return r.error(y);o.get("account/follow").toggleClass("hide",l==="follow"),o.get("account/unfollow").toggleClass("hide",l==="unfollow"),r.success("[[global:alert."+l+", "+ajaxify.data.username+"]]")}),!1}function w(){c.e(6574).then(function(){var l=[c(6574)];(function(m){m.showFlagModal({type:"user",id:ajaxify.data.uid})}).apply(null,l)}).catch(c.oe)}function k(){const l=$(this).data("flag-id");c.e(6574).then(function(){var m=[c(6574)];(function(y){d.confirm("[[flags:modal-confirm-rescind]]",function(A){A&&y.rescind(l)})}).apply(null,m)}).catch(c.oe)}function D(l){return socket.emit("user.toggleBlock",{blockeeUid:ajaxify.data.uid,blockerUid:app.user.uid,action:l},function(m,y){if(m)return r.error(m);o.get("account/block").toggleClass("hidden",y),o.get("account/unblock").toggleClass("hidden",!y)}),!1}function j(){d.confirm("[[user:remove-cover-picture-confirm]]",function(l){l&&socket.emit("user.removeCover",{uid:ajaxify.data.uid},function(m){m?r.error(m):ajaxify.refresh()})})}return s}).apply(v,p),f!==void 0&&(g.exports=f)},47283(g,v,c){"use strict";var p,f;p=[c(49897),c(65303),c(29930)],f=(function(h,t,o){const n={};n.account=function(a,i){e(a,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",i)},n.content=function(a,i){e(a,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",i)},n.purge=function(a,i){e(a,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",i)};function e(a,i,u,d,r){t.confirm(i,function(s){s&&h.del(`/users/${encodeURIComponent(a)}${u}`,{}).then(()=>
1{if(o.success(d),typeof r=="function")return r()}).catch(o.error)})}return n}).apply(v,p),f!==void 0&&(g.exports=f)},28061(g,v,c){"use strict";var p,f;p=[c(49897),c(65303),c(29930),c(81335)],f=(function(h,t,o,n){const e={};e.banAccount=function(i,u){i=i||ajaxify.data.theirid,a({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(d){h.put("/users/"+encodeURIComponent(i)+"/ban",{until:d.until,reason:d.reason||""}).then(()=>{if(typeof u=="function")return u();ajaxify.refresh()}).catch(o.error)}})},e.unbanAccount=function(i){a({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(u){h.del("/users/"+encodeURIComponent(i)+"/ban",{reason:u.reason||""}).then(()=>{ajaxify.refresh()}).catch(o.error)}})},e.muteAccount=function(i,u){i=i||ajaxify.data.theirid,a({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(d){h.put("/users/"+i+"/mute",{until:d.until,reason:d.reason||""}).then(()=>{if(typeof u=="function")return u();ajaxify.refresh()}).catch(o.error)}})},e.unmuteAccount=function(i){a({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(u){h.del("/users/"+i+"/mute",{reason:u.reason||""}).then(()=>{ajaxify.refresh()}).catch(o.error)}})};async function a(i){const u=await socket.emit("user.getCustomReasons",{type:i.type||""}),d=await n.render(i.tpl,{reasons:u}),r=await t.dialog({title:i.title,message:d,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:i.title,callback:function(){const s=r.find("form").serializeArray().reduce(function(b,x){return b[x.name]=x.value,b},{});if(Object.hasOwn(s,"length")){const x=parseInt(s.unit,10)?24:1;s.until=s.length>0?Date.now()+s.length*36e5*x:0}else s.until=0;i.onSubmit(s)}}}});return r.find("[data-key]").on("click",function(){const s=u.find(b=>String(b.key)===$(this).attr("data-key"));s&&s.body&&r.find('[name="reason"]').val(s.body)}),r}return e.throwModal=a,e}).apply(v,p),f!==void 0&&(g.exports=f)},36684(g,v,c){"use strict";var p,f;p=[c(29930),c(18675)],f=(function(h){const t={coverEl:null,saveFn:null};t.init=function(n,e,a,i){t.coverEl=n,t.saveFn=e,n.find(".upload").on("click",a),n.find(".resize").on("click",function(){o(n)}),n.find(".remove").on("click",i),n.on("dragover",t.onDragOver).on("drop",t.onDrop),n.find(".save").on("click",t.save),n.addClass("initialised")},t.onDragOver=function(n){n.stopPropagation(),n.preventDefault(),n.originalEvent.dataTransfer.dropEffect="copy"},t.onDrop=function(n){n.stopPropagation(),n.preventDefault();const e=n.originalEvent.dataTransfer.files,a=new FileReader;e.length&&e[0].type.match("image.*")&&(a.onload=function(i){t.coverEl.css("background-image","url("+i.target.result+")"),t.newCover=i.target.result},a.readAsDataURL(e[0]),o(t.coverEl))};function o(n){n.toggleClass("active",1).backgroundDraggable({axis:"y",units:"percent"}),h.alert({alert_id:"drag_start",title:"[[modules:cover.dragging-title]]",message:"[[modules:cover.dragging-message]]",timeout:5e3})}return t.save=function(){t.coverEl.addClass("saving"),t.saveFn(t.newCover||void 0,t.coverEl.css("background-position"),function(n){n?h.error(n):(t.coverEl.toggleClass("active",0),t.coverEl.backgroundDraggable("disable"),t.coverEl.off("dragover",t.onDragOver),t.coverEl.off("drop",t.onDrop),h.success("[[modules:cover.saved]]")),t.coverEl.removeClass("saving")})},t}).apply(v,p),f!==void 0&&(g.exports=f)},18675(){(function(g){var v=g(window),c=function(t,o,n,e){if(arguments.length===3||e){if(n<t)return t;if(n>o)return o}return n},p=function(t){t.clientX=t.originalEvent.touches[0].clientX,t.clientY=t.originalEvent.touches[0].clientY},f=function(t){var o=(t.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1];if(o){var n={width:0,height:0},e=new Image;return e.onload=function(){if(t.css("background-size")=="cover"){var a=t.innerWidth(),i=t.innerHeight(),u=a/i,d=e.width/e.height,r=1;d>=u?r=i/e.height:r=a/e.width,n.width=e.width*r,n.height=e.height*r}else n.width=e.width,n.height=e.height},e.src=o,n}};function h(t,o){this.element=t,this.options=o,this.init()}h.prototype.init=function(){var t=g(this.element),o=(t.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1],n=this.options;
1if(o){var e={width:0,height:0};(n.bound||n.units=="percent")&&(e=f(t)),g(window).on("keydown.dbg",a=>{var i=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],u=parseInt(i[1])||0,d=parseInt(i[2])||0;n.units=="percent"&&(u=Math.round(u/-200*e.width),d=Math.round(d/-200*e.height));var r=0,s=0;return a.which===37?r=-5:a.which===39?r=5:a.which===38?s=-5:a.which===40&&(s=5),n.units==="percent"?(u=n.axis==="y"?u:c(-e.width/2,0,u+r,n.bound),d=n.axis==="x"?d:c(-e.height/2,0,d+s,n.bound),t.css("background-position",u/e.width*-200+"% "+d/e.height*-200+"%")):(u=n.axis==="y"?u:c(t.innerWidth()-e.width,0,u+r,n.bound),d=n.axis==="x"?d:c(t.innerHeight()-e.height,0,d+s,n.bound)),[37,38,39,40].includes(a.which)?!1:void 0}),t.on("mousedown.dbg touchstart.dbg",function(a){if(a.target===t[0]){if(a.preventDefault(),a.originalEvent.touches)p(a);else if(a.which!==1)return;var i=a.clientX,u=a.clientY,d=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],r=parseInt(d[1])||0,s=parseInt(d[2])||0;n.units=="percent"&&(r=Math.round(r/-200*e.width),s=Math.round(s/-200*e.height)),v.on("mousemove.dbg touchmove.dbg",function(b){b.preventDefault(),b.originalEvent.touches&&p(b);var x=b.clientX,E=b.clientY;n.units=="percent"?(r=n.axis==="y"?r:c(-e.width/2,0,r+x-i,n.bound),s=n.axis==="x"?s:c(-e.height/2,0,s+E-u,n.bound),t.css("background-position",r/e.width*-200+"% "+s/e.height*-200+"%")):(r=n.axis==="y"?r:c(t.innerWidth()-e.width,0,r+x-i,n.bound),s=n.axis==="x"?s:c(t.innerHeight()-e.height,0,s+E-u,n.bound),t.css("background-position",r+"px "+s+"px")),i=x,u=E}),v.on("mouseup.dbg touchend.dbg mouseleave.dbg",function(){n.done&&n.done(),v.off("mousemove.dbg touchmove.dbg"),v.off("mouseup.dbg touchend.dbg mouseleave.dbg")})}})}},h.prototype.disable=function(){var t=g(this.element);t.off("mousedown.dbg touchstart.dbg"),v.off("mousemove.dbg touchmove.dbg mouseup.dbg touchend.dbg mouseleave.dbg keydown.dbg")},g.fn.backgroundDraggable=function(t){var o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=g(this),e;typeof t>"u"||typeof t=="object"?(t=g.extend({},g.fn.backgroundDraggable.defaults,t),e=new h(this,t),n.data("dbg",e)):typeof t=="string"&&n.data("dbg")&&(e=n.data("dbg"),h.prototype[t].apply(e,o))})},g.fn.backgroundDraggable.defaults={bound:!0,axis:void 0,units:"pixels"}})(jQuery)}}]);
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.