1var I=Object.defineProperty;var k=(t,e,i)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var s=(t,e,i)=>(k(t,typeof e!="symbol"?e+"":e,i),i);import{m as C,ar as S,bY as R,em as U,ei as O,bD as h,B as p,P as M,az as $,aE as B,O as A,_ as E,o as f,c as P,b,w as j,a as r,bH as V,t as _,h as g,g as H,l as N,aI as T}from"./vendor-147ef0d1.js";import{_ as q}from"./vdlNotes-1287e15d.js";import{aj as L,al as F,bQ as Y,bX as W,m as G,cb as z,cc as Q,c2 as X,c6 as D,a7 as J}from"./common-4ebc591d.js";import{_ as K}from"./vdlUserInfo-2fcba52c.js";import{s as Z}from"./deliverable-8af2c07f.js";import{g as x}from"./offers-c3145e9b.js";import"./getMinutesPassed-9927a987.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"[email protected]"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a88830d3-701d-4b87-a56a-db119f710539",t._sentryDebugIdIdentifier="sentry-dbid-a88830d3-701d-4b87-a56a-db119f710539")}catch{}})();var ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,l=(t,e,i,n)=>{for(var a=n>1?void 0:n?te(e,i):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(a=(n?d(e,i,a):d(a))||a);return n&&a&&ee(e,i,a),a};let o=class extends C(L,F){constructor(){super(...arguments);s(this,"uploadingSample",!1);s(this,"currentService","voice_over");s(this,"loading",!1);s(this,"buyerNotes",[]);s(this,"projectOffers");s(this,"isProvider");s(this,"attributes");s(this,"offerComments");s(this,"projectDeliverable");s(this,"getProvider");s(this,"createOfferComment");s(this,"getOfferComments");s(this,"getProviderById");s(this,"getProjectDeliverable");s(this,"getDeliverable");s(this,"deleteCommentOffer");s(this,"setDeliverableAsReviewed");s(this,"id");s(this,"deliverableId");s(this,"parentPage")}checkProjectDeliverable(e,i={}){e.id&&(this.$emit("deliverable-loaded",e),this.fileProcessingMonitor.handle(e,i),this.clearRecordingProcessingHash(e))}get projectOwner(){return Object.keys(this.currentProject).length>0&&Y(this.currentProject)}get clientUser(){return Object.keys(this.currentProject).length>0&&this.currentProject.users[0]}get providerStats(){let e="";return Object.keys(this.getProvider).length&&this.getProvider.user.last_interaction&&(e=`Last online: ${this.format.relativeTime(this.getProvider.user.last_interaction)}`),e}get userRole(){return this.projectOwner&&Object.keys(this.projectDeliverable).length&&this.getOfferComments(this.projectDeliverable),this.projectOwner&&"projectOwner"||this.isProvider&&this.deliverableModel.provider_id===this.activeUser.provider_id&&"deliverableOwner"||"buyer"}get comments(){return this.offerComments}get deliverableModel(){return S(this.projectDeliverable)}get deliverableSchema(){let e=Z;e=e.filter(n=>n.attribute!=="file");const i=this.buildCustomSampleSchema();return this.displayIf(["projectOwner"])?i.playerActions=[{name:"download",label:"Download recording",icon:R,handler:this.downloadRecording}]:this.displayIf(["deliverableOwner"])&&W(this.deliverableModel,"deliverable")&&(i.playerActions=[{name:"retry",label:"Upload again",icon:U,handler:()=>this.retryDeliverableUpload()}]),e.unshift(i),G(this.attributes,e)}get deliverableStatus(){if(this.deliverableModel.id)return x(this.deliverableModel,!0)}get fileProcessingMonitor(){return new z({type:"deliverable",processingRouteHash:"#recording-processing",successMessage:"Recording submitted",retryButtonId:"retry-deliverable-audio",routeHash:()=>this.$route.hash,isOwner:e=>this.isDeliverableOwner(e),refresh:()=>this.deliverableId?this.getDeliverable(this.deliverableId):this.getProjectDeliverable(this.currentProject.public_hash),retry:()=>this.retryDeliverableUpload(),showMessage:e=>this.showMessage(e),showFailure:e=>this.eventBus.emit("snackbar",e)})}async addComment(e){await this.createOfferComment({offer:this.deliverableModel,message:e}),this.showMessage("Your note has been added")}commentOwner(e){return this.activeUser&&e.user_id===this.activeUser.id||this.activeUser&&this.activeUser.roles&&this.activeUser.roles.includes("admin")||this.currentProject&&this.currentProject.user_id&&this.currentProject.user_id.includes(this.activeUser.id)}async deleteComment(e){await this.deleteCommentOffer({offerId:this.deliverableModel.id,commentId:e,projectId:this.deliverableModel.project_id,providerId:this.deliverableModel.provider_id}),this.showMessage("Your note has been deleted")}profileView(){if(this.getProvider&&this.getProvider.user.username){const e={id:this.getProvider.user.username};this.$router.push({name:"profileView",params:e})}}displayIf(e){return e.some(i=>i===this.userRole)}
1formattedLink(){return`<a target='_blank' id="external_download_link" href='#'>Download file</a>`}buildCustomSampleSchema(){let e;return Object.keys(this.projectDeliverable).length&&this.projectDeliverable.file&&this.projectDeliverable.file.type==="link"?e={attribute:"file",type:"hide",svgIcon:O,name:"Finished recording",view:"formatted_read_only",textFormat:this.formattedLink}:e={attribute:"file",type:"hide",svgIcon:O,name:"Finished recording",view:"audition_player",disabledCaption:i=>D({file:i},"deliverable")?"Error processing audio.":"Processing audio...",targetCondition:function(i){return i.file},isDisabled:i=>D({file:i},"deliverable"),isError(i){return D({file:i},"deliverable")},listenedAudio(){return()=>{}},voiceCredentials(i){return i.signed}},e}isDeliverableOwner(e){return this.isProvider&&e.provider_id!==void 0&&e.provider_id===this.activeUser.provider_id}retryDeliverableUpload(){const e={id:this.currentProject.public_hash||this.id,slug:this.currentProject.slug};this.$router.push({name:"specsView",params:e})}clearRecordingProcessingHash(e){Q({item:e,type:"deliverable",routeHash:this.$route.hash,path:this.$route.path,query:this.$route.query,replace:i=>this.$router.replace(i)})}async downloadRecording(){if(this.activeUser.type!=="undesirable"){if(this.deliverableModel.file&&this.deliverableModel.file.type!=="link")await this.downloadAuditionHelper(this.deliverableModel,this.getProvider);else{const e=this.deliverableModel.file.url;window.open(e.startsWith("http")?e:`//${e}`,"_blank"),await this.setAsDownloaded(this.deliverableModel)}this.currentProject.charge_status!=="pending"&&this.currentProject.status==="booking-accepted"?this.eventBus.emit("open-accept-confirmation-dialog"):this.currentProject.charge_status==="pending"&&this.eventBus.emit("open-payment-pending-dialog")}}async mounted(){var e,i,n,a,c,d,m,y;if(this.loading=!0,(i=(e=this.parentPage)==null?void 0:e.showProgress)==null||i.call(e),Object.keys(this.projectDeliverable).length===0){const u=this.deliverableId?this.deliverableId:this.id;this.deliverableId?await this.getDeliverable(this.deliverableId):await this.getProjectDeliverable(u)}await this.getProviderById(this.projectDeliverable.provider_id),(n=this.projectDeliverable)!=null&&n.id&&((a=this.projectDeliverable)==null?void 0:a.status)==="processing"&&this.fileProcessingMonitor.handle(this.projectDeliverable),(c=this.projectDeliverable)!=null&&c.id&&((d=this.projectDeliverable)==null?void 0:d.status)!=="processing"&&this.clearRecordingProcessingHash(this.projectDeliverable),this.eventBus.on("download-recording",()=>{this.downloadRecording()}),(y=(m=this.parentPage)==null?void 0:m.hideProgress)==null||y.call(m),this.loading=!1,this.$nextTick(()=>{var u;if(((u=this.deliverableModel.file)==null?void 0:u.type)==="link"){const w=document.getElementById("external_download_link");w&&(w.onclick=()=>{if(this.activeUser.provider_id!==this.deliverableModel.provider_id)this.downloadRecording();else{const v=this.deliverableModel.file.url;window.open(v.startsWith("http")?v:`//${v}`,"_blank")}return!1})}})}beforeUnmount(){this.fileProcessingMonitor.clearPoll(),this.eventBus.off("download-recording",()=>{})}};l([h],o.prototype,"projectOffers",2);l([h],o.prototype,"isProvider",2);l([h],o.prototype,"attributes",2);l([h],o.prototype,"offerComments",2);l([h],o.prototype,"projectDeliverable",2);l([h],o.prototype,"getProvider",2);l([h],o.prototype,"activeUser",2);l([p],o.prototype,"createOfferComment",2);l([p],o.prototype,"getOfferComments",2);l([p("getProvider")],o.prototype,"getProviderById",2);l([p],o.prototype,"getProjectDeliverable",2);l([p],o.prototype,"getDeliverable",2);l([p],o.prototype,"deleteCommentOffer",2);l([p],o.prototype,"setDeliverableAsReviewed",2);l([M()],o.prototype,"id",2);l([M()],o.prototype,"deliverableId",2);l([$({from:X})],o.prototype,"parentPage",2);l([B("projectDeliverable")],o.prototype,"checkProjectDeliverable",1);o=l([A({})],o);const ie={key:0,class:"deliverable-content"},re={class:"md-scrollbar"},se={class:"field-item"},oe={key:0,class:"md-list-item step-title"},le={class:"md-list-item-container"},ae={class:"md-list-text-container"},ne={class:"md-title"},de={key:1,class:"md-list-item step-title"},ce={class:"md-list-item-container"},he=r("div",null,null,-1),pe={class:"md-list-item step-title"},me={class:"md-list-item-container"},ue={class:"md-list-text-container"},ve={class:"md-title"},fe={class:"md-list-item step-title"},be={class:"md-list-item-container"},_e=["innerHTML"],ge={class:"md-list-item step-title"},ye={class:"md-list-item-container"},we={class:"md-list-text-container"},Pe={class:"md-title"},je={class:"md-list-item field-item-list"},De={class:"md-list-item-container"},Oe={class:"md-list-item step-title"},Me={class:"md-list-item-container"},Ie={class:"md-list-text-container"},ke={class:"md-title"},Ce={key:0,class:"full-width"};function Se(t,e,i,n,a,c){const d=K,m=J,y=N,u=q,w=T;return t.loading?g("",!0):(f(),P("section",ie,[b(w,{class:"details"},{default:j(()=>[r("div",re,[b(m,{schema:t.deliverableSchema,modelValue:t.deliverableModel,"onUpdate:modelValue":e[0]||(e[0]=v=>t.deliverableModel=v),ref:"DeliverableDetailsViewer"},V({_:2},[t.displayIf(["projectOwner","deliverableOwner","bystander"])?{name:"data-viewer_top__field",fn:j(()=>[r("div",se,[t.deliverableModel.revision_request?(f(),P("li",oe,[r("div",le,[r("div",ae,[r("span",ne,_(t.$t("Revision request comments")),1)])])])):g("",!0),t.deliverableModel.revision_request?(f(),P("li",de,[r("div",ce,[b(d,{name:t.clientUser.name,picture:t.clientUser.picture},{content:j(()=>[r("div",null,[r("p",null,_(t.deliverableModel.revision_request.message),1)])]),_:1},8,["name","picture"]),he])])):g("",!0),r("li",pe,[r("div",me,[r("div",ue,[r("span",ve,_(t.$t("Recording status")),1)])])]),r("li",fe,[r("div",be,[r("div",{innerHTML:t.deliverableStatus},null,8,_e)])]),r("li",ge,[r("div",ye,[r("div",we,[r("span",Pe,_(t.$t("Voice actor")),1)])])]),r("li",je,[r("div",De,[t.getProvider&&t.getProvider.user?(f(),H(d,{key:0,name:t.getProvider.user.name,picture:t.getProvider.user.picture_medium,provider:t.getProvider,"membership-type":t.getProvider.membership_product_name,onClick:t.profileView,content:t.providerStats},null,8,["name","picture","provider","membership-type","onClick","content"])):g("",!0)])]),r("li",Oe,[r("div",Me,[r("div",Ie,[r("span",ke,_(t.$t("Recording details")),1)])])])])]),key:"0"}
1:void 0]),1032,["schema","modelValue"])]),t.displayIf(["projectOwner"])?(f(),P("div",Ce,[b(y,{class:"md-outset"}),b(u,{notes:t.comments,onAddNote:t.addComment,onDeleteNote:t.deleteComment,noteOwner:t.commentOwner},null,8,["notes","onAddNote","onDeleteNote","noteOwner"])])):g("",!0)]),_:1})]))}const Ne=E(o,[["render",Se]]);export{Ne as default}; 2//# sourceMappingURL=index-88532edb.js.map
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.