"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[63639],{63639:(e,n,r)=>{r.r(n),r.d(n,{AddonModWorkshopAssessmentStrategyCommentsHandler:()=>a,AddonModWorkshopAssessmentStrategyCommentsHandlerLazyService:()=>m});var t=r(10467),o=r(79555),s=r(20984),d=r(54438);let m=(()=>{var e;class AddonModWorkshopAssessmentStrategyCommentsHandlerLazyService extends s.S{getComponent(){return(0,t.A)((function*(){const{AddonModWorkshopAssessmentStrategyCommentsComponent:e}=yield Promise.all([r.e(72076),r.e(4617)]).then(r.bind(r,4617));return e}))()}getOriginalValues(e){return(0,t.A)((function*(){const n=[];return e.fields.forEach(((r,t)=>{r.dimtitle=o.HT.instant("addon.mod_workshop_assessment_comments.dimensionnumber",{$a:r.number}),e.current[t]||(e.current[t]={}),n[t]={},n[t].peercomment=e.current[t].peercomment||"",n[t].number=r.number})),n}))()}hasDataChanged(e,n){for(const r in e)if(e[r].peercomment!=n[r].peercomment)return!0;return!1}prepareAssessmentData(e,n){return(0,t.A)((function*(){const r={},t={};let s=!1;if(n.fields.forEach(((d,m)=>{m<n.dimenssionscount&&(e[m].peercomment?r[`peercomment__idx_${m}`]=e[m].peercomment:(t[`peercomment_${m}`]=o.HT.instant("core.err_required"),s=!0),r[`gradeid__idx_${m}`]=parseInt(n.current[m].gradeid,10)||0,r[`dimensionid__idx_${m}`]=parseInt(d.dimensionid,10))})),s)throw t;return r}))()}}return(e=AddonModWorkshopAssessmentStrategyCommentsHandlerLazyService).ɵfac=(()=>{let n;return function AddonModWorkshopAssessmentStrategyCommentsHandlerLazyService_Factory(r){return(n||(n=d.xGo(e)))(r||e)}})(),e.ɵprov=d.jDH({token:e,factory:e.ɵfac,providedIn:"root"}),AddonModWorkshopAssessmentStrategyCommentsHandlerLazyService})();const a=(0,o.Qd)(m)}}]);