text: webpackJsonp([117],{1834:function(n,l,e){"use strict";function t(n){return i._42(0,[(n()(),i._16(0,0,null,null,2,"ion-badge",[["item-end",""]],null,null,null,null,null)),i._15(1,16384,null,0,L.a,[k.a,i.p,i.K],{color:[0,"color"]},null),(n()(),i._40(2,null,["",""]))],function(n,l){n(l,1,0,l.parent.context.$implicit.usercompetency.proficiency?"success":"danger")},function(n,l){n(l,2,0,l.parent.context.$implicit.usercompetency.gradename)})}function u(n){return i._42(0,[(n()(),i._16(0,0,null,null,2,"ion-badge",[["item-end",""]],null,null,null,null,null)),i._15(1,16384,null,0,L.a,[k.a,i.p,i.K],{color:[0,"color"]},null),(n()(),i._40(2,null,["",""]))],function(n,l){n(l,1,0,l.parent.context.$implicit.usercompetencycourse.proficiency?"success":"danger")},function(n,l){n(l,2,0,l.parent.context.$implicit.usercompetencycourse.gradename)})}function c(n){return i._42(0,[(n()(),i._16(0,0,null,null,15,"a",[["class","item item-block"],["ion-item",""],["text-wrap",""]],[[8,"title",0],[2,"core-split-item-selected",null]],[[null,"click"]],function(n,l,e){var t=!0;if("click"===l){t=!1!==n.component.openCompetency(n.context.$implicit.competency.id)&&t}return t},R.b,R.a)),i._15(1,1097728,null,3,T.a,[j.a,k.a,i.p,i.K,[2,D.a]],null,null),i._37(335544320,2,{contentLabel:0}),i._37(603979776,3,{_buttons:1}),i._37(603979776,4,{_icons:1}),i._15(5,16384,null,0,O.a,[],null,null),(n()(),i._40(6,2,["\n                    "," "])),(n()(),i._16(7,0,null,2,1,"small",[],null,null,null,null,null)),(n()(),i._40(8,null,["",""])),(n()(),i._40(-1,2,["\n                    "])),(n()(),i._11(16777216,null,4,1,null,t)),i._15(11,16384,null,0,U.k,[i.W,i.T],{ngIf:[0,"ngIf"]},null),(n()(),i._40(-1,2,["\n                    "])),(n()(),i._11(16777216,null,4,1,null,u)),i._15(14,16384,null,0,U.k,[i.W,i.T],{ngIf:[0,"ngIf"]},null),(n()(),i._40(-1,2,["\n                "]))],function(n,l){n(l,11,0,l.context.$implicit.usercompetency);n(l,14,0,l.context.$implicit.usercompetencycourse)},function(n,l){n(l,0,0,l.context.$implicit.competency.shortname,l.context.$implicit.competency.id==l.component.competencyId);n(l,6,0,l.context.$implicit.competency.shortname);n(l,8,0,l.context.$implicit.competency.idnumber)})}function o(n){return i._42(0,[i._37(402653184,1,{splitviewCtrl:0}),(n()(),i._16(1,0,null,null,11,"ion-header",[],null,null,null,null,null)),i._15(2,16384,null,0,F.a,[k.a,i.p,i.K,[2,M.a]],null,null),(n()(),i._40(-1,null,["\n    "])),(n()(),i._16(4,0,null,null,7,"ion-navbar",[["class","toolbar"],["core-back-button",""]],[[8,"hidden",0],[2,"statusbar-padding",null]],null,null,W.b,W.a)),i._15(5,49152,null,0,A.a,[E.a,[2,M.a],[2,B.a],k.a,i.p,i.K],null,null),i._15(6,212992,null,0,J.a,[A.a,N.a,V.a,q.a],null,null),(n()(),i._40(-1,3,["\n        "])),(n()(),i._16(8,0,null,3,2,"ion-title",[],null,null,null,z.b,z.a)),i._15(9,49152,null,0,G.a,[k.a,i.p,i.K,[2,H.a],[2,A.a]],null,null),(n()(),i._40(10,0,["",""])),(n()(),i._40(-1,3,["\n    "])),(n()(),i._40(-1,null,["\n"])),(n()(),i._40(-1,null,["\n"])),(n()(),i._16(14,0,null,null,25,"core-split-view",[],null,null,null,Q.b,Q.a)),i._15(15,245760,[[1,4]],0,_.a,[[2,B.a],i.p,S.a,N.a,V.a],null,null),(n()(),i._40(-1,0,["\n    "])),(n()(),i._16(17,0,null,0,21,"ion-content",[],[[2,"statusbar-padding",null],[2,"has-refresher",null]],null,null,X.b,X.a)),i._15(18,4374528,null,0,Y.a,[k.a,N.a,Z.a,i.p,i.K,E.a,nn.a,i.D,[2,M.a],[2,B.a]],null,null),(n()(),i._40(-1,1,["\n        "])),(n()(),i._16(20,0,null,2,6,"ion-refresher",[],[[2,"refresher-active",null],[4,"top",null]],[[null,"ionRefresh"]],function(n,l,e){var t=!0;if("ionRefresh"===l){t=!1!==n.component.refreshCompetencies(e)&&t}return t},null,null)),i._15(21,212992,null,0,ln.a,[N.a,Y.a,i.D,en.l],{enabled:[0,"enabled"]},{ionRefresh:"ionRefresh"}),(n()(),i._40(-1,null,["\n            "])),(n()(),i._16(23,0,null,null,2,"ion-refresher-content",[],[[1,"state",0]],null,null,tn.b,tn.a)),i._15(24,114688,null,0,un.a,[ln.a,k.a],{pullingText:[0,"pullingText"]},null),i._32(131072,cn.a,[V.a,i.i]),(n()(),i._40(-1,null,["\n        "])),(n()(),i._40(-1,1,["\n        "])),(n()(),i._16(28,0,null,1,9,"core-loading",[],null,null,null,on.b,on.a)),i._15(29,638976,null,0,an.a,[V.a,i.p,q.a,rn.a],{hideUntil:[0,"hideUntil"]},null),(n()(),i._40(-1,0,["\n            "])),(n()(),i._16(31,0,null,0,5,"ion-list",[],null,null,null,null,null)),i._15(32,16384,null,0,sn.a,[k.a,i.p,i.K,N.a,en.l,Z.a],null,null),(n()(),i._40(-1,null,["\n                "])),(n()(),i._11(16777216,null,null,1,null,c)),i._15(35,802816,null,0,U.j,[i.W,i.T,i.v],{ngForOf:[0,"ngForOf"]},null),(n()(),i._40(-1,null,["\n            "])),(n()(),i._40(-1,0,["\n        "])),(n()(),i._40(-1,1,["\n    "])),(n()(),i._40(-1,0,["\n"]))],function(n,l){var e=l.component;n(l,6,0),n(l,15,0);n(l,21,0,e.competenciesLoaded);n(l,24,0,i._19(1,"",i._41(l,24,0,i._29(l,25).transform("core.pulltorefresh")),""));n(l,29,0,e.competenciesLoaded);n(l,35,0,e.competencies)},function(n,l){var e=l.component;n(l,4,0,i._29(l,5)._hidden,i._29(l,5)._sbPadding);n(l,10,0,e.title);n(l,17,0,i._29(l,18).statusbarPadding,i._29(l,18)._hasRefresher);n(l,20,0,"inactive"!==i._29(l,21).state,i._29(l,21)._top);n(l,23,0,i._29(l,24).r.state)})}Object.defineProperty(l,"__esModule",{value:!0});var i=e(1),a=(e(0),e(9),e(4)),r=e(29),s=e(30),p=e(5),_=e(35),d=e(205),m=function(){function n(n,l,e,t){this.translate=l,this.domUtils=e,this.competencyProvider=t,this.competenciesLoaded=!1,this.competencies=[],this.planId=n.get("planId"),this.courseId=n.get("courseId"),this.competencyId=n.get("competencyId"),this.userId=n.get("userId")}return n.prototype.ionViewDidLoad=function(){var n=this;this.competencyId&&this.openCompetency(this.competencyId),this.fetchCompetencies().then(function(){!n.competencyId&&n.splitviewCtrl.isOn()&&n.competencies.length>0&&n.openCompetency(n.competencies[0].id)}).finally(function(){n.competenciesLoaded=!0})},n.prototype.fetchCompetencies=function(){var n=this;return(this.planId?this.competencyProvider.getLearningPlan(this.planId):this.courseId?this.competencyProvider.getCourseCompetencies(this.courseId,this.userId):Promise.reject(null)).then(function(l){if(l.competencycount<=0)return Promise.reject(n.translate.instant("addon.competency.errornocompetenciesfound"));n.planId?(n.title=l.plan.name,n.userId=l.plan.userid):n.title=n.translate.instant("addon.competency.coursecompetencies"),n.competencies=l.competencies}).catch(function(l){n.domUtils.showErrorModalDefault(l,"Error getting competencies data.")})},n.prototype.openCompetency=function(n){this.competencyId=n;this.splitviewCtrl.push("AddonCompetencyCompetencyPage",this.planId?{competencyId:n,planId:this.planId}:{competencyId:n,courseId:this.courseId,userId:this.userId})},n.prototype.refreshCompetencies=function(n){var l=this;return(this.planId?this.competencyProvider.invalidateLearningPlan(this.planId):this.competencyProvider.invalidateCourseCompetencies(this.courseId,this.userId)).finally(function(){l.fetchCompetencies().finally(function(){n.complete()})})},n}(),f=function(){return function(){}}(),h=e(1345),y=e(1346),b=e(1347),I=e(1348),g=e(1349),v=e(1350),C=e(1351),x=e(1352),P=e(1353),$=e(1356),w=e(1357),K=e(1358),L=e(146),k=e(7),R=e(31),T=e(21),j=e(20),D=e(28),O=e(33),U=e(8),F=e(435),M=e(37),W=e(1354),A=e(200),E=e(34),B=e(22),J=e(663),N=e(15),V=e(19),q=e(13),z=e(1355),G=e(337),H=e(247),Q=e(437),S=e(67),X=e(185),Y=e(24),Z=e(32),nn=e(107),ln=e(145),en=e(39),tn=e(201),un=e(159),cn=e(27),on=e(49),an=e(48),rn=e(3),sn=e(78),pn=e(61),_n=i._14({encapsulation:2,styles:[],data:{}}),dn=i._12("page-addon-competency-competencies",m,function(n){return i._42(0,[(n()(),i._16(0,0,null,null,1,"page-addon-competency-competencies",[],null,null,null,o,_n)),i._15(1,49152,null,0,m,[pn.a,V.a,p.a,d.a],null,null)],null,null)},{},{},[]),mn=e(23),fn=e(333),hn=e(334),yn=e(336),bn=e(335),In=e(434),gn=e(662),vn=e(106),Cn=e(248);e.d(l,"AddonCompetencyCompetenciesPageModuleNgFactory",function(){return xn});var xn=i._13(f,[],function(n){return i._25([i._26(512,i.n,i._6,[[8,[h.a,y.a,b.a,I.a,g.a,v.a,C.a,x.a,P.a,$.a,w.a,K.a,dn]],[3,i.n],i.B]),i._26(4608,U.m,U.l,[i.x,[2,U.v]]),i._26(4608,mn.x,mn.x,[]),i._26(4608,mn.d,mn.d,[]),i._26(4608,fn.b,fn.a,[]),i._26(4608,hn.a,hn.b,[]),i._26(4608,yn.b,yn.a,[]),i._26(4608,bn.b,bn.a,[]),i._26(4608,V.a,V.a,[In.a,fn.b,hn.a,yn.b,bn.b,V.b,V.c]),i._26(512,U.b,U.b,[]),i._26(512,mn.v,mn.v,[]),i._26(512,mn.i,mn.i,[]),i._26(512,mn.s,mn.s,[]),i._26(512,gn.a,gn.a,[]),i._26(512,a.a,a.a,[]),i._26(512,s.a,s.a,[]),i._26(512,vn.a,vn.a,[]),i._26(512,r.a,r.a,[]),i._26(512,gn.b,gn.b,[]),i._26(512,f,f,[]),i._26(256,V.c,void 0,[]),i._26(256,V.b,void 0,[]),i._26(256,Cn.a,m,[])])})}});