1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4511],{9958:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var o=n(9347),i={key:0},a={key:0,class:"card mb-10"},r=["href"],c={key:0,class:"text-grey text-12 m-0"},s=["onClick"],l=["onClick"],d={class:"font-bold m-0"},m=["href"],h=["onClick"],u={class:"font-bold m-0"},p=["href"],f=["onClick"];const g={data:function(){return{invitations:null}},mounted:function(){window.App.signedIn&&this.getInvitations()},methods:{formatDate:function(e){var t=moment.utc(e).local(),n=moment().startOf("day");return t.isSame(n,"d")?"at "+t.format("h:mm A"):"on "+t.format("MMM D, YYYY, h:mm A")},classNames:function(e){var t="py-15 px-5 flex items-center justify-between";return e+1!=this.invitations.length&&(t+=" border-b border-blue-lighter"),t},needsResponse:function(e){return!e.pivot.confirmed_at&&!e.pivot.declined_at},getInvitations:function(){var e=this;axios.get("".concat(window.location.origin,"/widgets/case-reports/invitations")).then(function(t){return e.invitations=t.data}).catch(function(t){console.log(t),e.$toasted.show("Something went wrong when checking for authorship requests. Please refresh the page and try again.",{position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})})},acceptInvitation:function(e){var t=this;axios.post("".concat(window.location.origin,"/widgets/case-reports/").concat(e.id,"/confirm")).then(function(t){return e.pivot=t.data.pivot}).catch(function(n){console.log(n),t.$toasted.show("Something went wrong when joining ".concat(e.name,". Please refresh the page and try again."),{position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})})},declineInvitation:function(e){if(confirm("Are you sure you want to decline this invitation?")){var t=this;axios.post("".concat(window.location.origin,"/widgets/case-reports/").concat(e.id,"/decline")).then(function(t){return e.pivot=t.data.pivot}).catch(function(n){console.log(n),t.$toasted.show("Something went wrong when declining ".concat(e.name,". Please refresh the page and try again."),{position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})})}},resetInvitation:function(e){axios.post("".concat(window.location.origin,"/widgets/case-reports/").concat(e.id,"/reset")).then(function(t){return e.pivot=t.data.pivot}).catch(function(e){console.log(e),this.$toasted.show("Something went wrong. Please refresh the page and try again.",{position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})})},postUrl:function(e){return"".concat(window.location.origin,"/posts/").concat(e.id)}}};const v=(0,n(6262).A)(g,[["render",function(e,t,n,g,v,w){return null!=v.invitations&&v.invitations.length>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",i,[t[5]||(t[5]=(0,o.createElementVNode)("h2",{class:"mb-625 leading-tight"}," Case Report Authorship Requests ",-1)),v.invitations.length>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",a,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(v.invitations,function(e,n){return(0,o.openBlock)(),(0,o.createElementBlock)("div",{key:e.id},[w.needsResponse(e)?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(w.classNames(n))},[(0,o.createElementVNode)("div",null,[(0,o.createElementVNode)("a",{href:w.postUrl(e),class:"font-bold m-0"},(0,o.toDisplayString)(e.title),9,r),e.created_at?((0,o.openBlock)(),(0,o.createElementBlock)("p",c," Invited "+(0,o.toDisplayString)(w.formatDate(e.created_at))+" by "+(0,o.toDisplayString)(e.author.name),1)):(0,o.createCommentVNode)("",!0)]),(0,o.createElementVNode)("div",null,[(0,o.createElementVNode)("a",{class:"inline-block pr-3125 text-14",href:"#",onClick:(0,o.withModifiers)(function(t){return w.acceptInvitation(e)},["prevent"])}," Approve ",8,s),t[0]||(t[0]=(0,o.createTextVNode)(" | ",-1)),(0,o.createElementVNode)("a",{class:"inline-block pl-3125 text-14 text-red",href:"#",onClick:(0,o.withModifiers)(function(t){return w.declineInvitation(e)},["prevent"])}," Decline ",8,l)])],2)):(0,o.createCommentVNode)("",!0),e.pivot.confirmed_at?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(w.classNames(n))},[(0,o.createElementVNode)("p",d,[t[1]||(t[1]=(0,o.createTextVNode)(" You've been added as an author ",-1)),(0,o.createElementVNode)("a",{href:w.postUrl(e)},(0,o.toDisplayString)(e.title),9,m),t[2]||(t[2]=(0,o.createTextVNode)("! ",-1))]),(0,o.createElementVNode)("a",{class:"text-grey-light text-14",href:"#",onClick:(0,o.withModifiers)(function(t){return w.resetInvitation(e)},["prevent"])}," Undo ",8,h)],2)):(0,o.createCommentVNode)("",!0),e.pivot.declined_at?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:2,class:(0,o.normalizeClass)(w.classNames(n))},[(0,o.createElementVNode)("p",u,[t[3]||(t[3]=(0,o.createTextVNode)(" You've declined ",-1)),(0,o.createElementVNode)("a",{href:w.postUrl(e)},(0,o.toDisplayString)(e.title),9,p),t[4]||(t[4]=(0,o.createTextVNode)("! ",-1))]),(0,o.createElementVNode)("a",{class:"text-grey-light text-14",href:"#",onClick:(0,o.withModifiers)(function(t){return w.resetInvitation(e)},["prevent"])}," Undo ",8,f)],2)):(0,o.createCommentVNode)("",!0)])}),128))])):(0,o.createCommentVNode)("",!0)])):(0,o.createCommentVNode)("",!0)}]])}}]);
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.