1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cd3dad95-5da0-59ad-b60c-7283f490b944")}catch(e){}}(); 3import{c as ot,d as rt}from"./chunk-ZVBDUT2M.js";import{a as Ze,b as et,c as tt,d as it,e as nt}from"./chunk-5HA3EBXJ.js";import{a as xe}from"./chunk-M34NNQGK.js";import{b as Z}from"./chunk-DI5QYZQB.js";import{a as fe}from"./chunk-RYPSEP4C.js";import"./chunk-JARC4VEB.js";import"./chunk-HXMI2QMR.js";import{a as Ce}from"./chunk-C6EGUEMF.js";import"./chunk-G6V4EC3J.js";import{a as Je,b as Ke,c as Xe}from"./chunk-LYWBHDNF.js";import"./chunk-D2NYEW4J.js";import{x as X}from"./chunk-A6RGZMXC.js";import"./chunk-G7QIRMNQ.js";import"./chunk-WCSLZPNH.js";import"./chunk-LVL7DOC5.js";import"./chunk-R2JMUQ77.js";import"./chunk-ITQWMIEL.js";import"./chunk-5YM3O5I6.js";import"./chunk-ZZG5IPKY.js";import"./chunk-2SRUAFBD.js";import{b as K}from"./chunk-KRNZR6YH.js";import"./chunk-VKKAQZP5.js";import"./chunk-26TGM6QC.js";import"./chunk-PWTDXLFQ.js";import"./chunk-NU27DJEQ.js";import"./chunk-6MIUUXBY.js";import"./chunk-IDEEGTYH.js";import"./chunk-JU73QFWT.js";import"./chunk-N3LX3THL.js";import"./chunk-FEYFR4YX.js";import"./chunk-E6YGJNAQ.js";import{a as Qe}from"./chunk-VZCLJPEW.js";import"./chunk-P4U5MZI6.js";import"./chunk-6FL5NH35.js";import{c as _e}from"./chunk-KYKGDHNG.js";import"./chunk-CGOHAIKO.js";import"./chunk-J6TAHOQ5.js";import"./chunk-ZNBR7H42.js";import"./chunk-2B2LYKQP.js";import"./chunk-LG75LMIH.js";import"./chunk-XLFNES36.js";import{$a as $e,C as xt,Ld as I,Md as N,Nd as j,ab as bt,db as J,eb as Ie,kc as ge,l as qe,lc as We,m as Be,n as Ge,xd as he,yd as Ye,z as H}from"./chunk-EHJF6UKK.js";import{U as $,V as Oe,ba as ue,ca as He,d as G,e as Pe,h as vt}from"./chunk-7XEC5R2G.js";import{k as Ue,n as de,r as ze}from"./chunk-OV4F6N7I.js";import"./chunk-J5NV6OCA.js";import{c as Y,i as Me,j as Q,k as ye}from"./chunk-PF63PJ47.js";import{L as pe,O as me,v as A}from"./chunk-4MUTHA5V.js";import{D as V,i as ce,k as q,l as k,v as je,y as B}from"./chunk-W7MJW6UT.js";import{$c as y,Bb as M,Ib as c,Ja as L,Jb as f,Lc as _,Nc as u,Tc as ke,Uc as Ae,Va as v,Vc as Re,Wa as b,Yc as Fe,Zb as E,Zc as p,Zd as ne,_c as D,ec as x,f as De,gd as T,hc as m,ic as re,id as se,kd as Ve,ma as Te,od as ae,qd as le,ra as ft,sa as Ct,tc as n,uc as r,ud as Ne,vc as C,zc as P}from"./chunk-7RQO36LL.js";import{a as W,b as Se}from"./chunk-IGDKMAHN.js";import"./chunk-2EFPAZRG.js";import"./chunk-XHJ7RZ2T.js";import"./chunk-DMQT3QOG.js";import"./chunk-43G5BLPL.js";import"./chunk-GCEDPD4V.js";import"./chunk-YUF7ANVY.js";import{a as Ee,j as _t,m as w}from"./chunk-7Q6MBNO6.js";V();me();Me();V();We();Ge();Pe();ye();j();var ee=function(t){return t[t.TITLE=26]="TITLE",t[t.DESCRIPTION=1e4]="DESCRIPTION",t[t.CERTIFICATE_MSG=500]="CERTIFICATE_MSG",t[t.TOPIC=100]="TOPIC",t[t.LESSON_TITLE=35]="LESSON_TITLE",t}(ee||{});ne();me();He();Ie();j();Oe();Ge();var Ot=["lottieFileInput"],St=t=>({disabled:t});function Mt(t,h){if(t&1&&(n(0,"div",19),C(1,"img",20),r()),t&2){let e=u(2);c(),m("src",e.icon==null||e.icon.value==null?null:e.icon.value.thumbnailUrl,M)}}function yt(t,h){if(t&1){let e=P();n(0,"div",12)(1,"button",13),_("click",function(){v(e);let i=u(2);return b(i.clearAsset())}),p(2," Remove "),r()()}t&2&&re("margin-left",12,"px")}function It(t,h){if(t&1&&(n(0,"div",21),C(1,"lottie-loader",22),r()),t&2){let e=u(2);c(),m("path",e.lottieUrl==null?null:e.lottieUrl.value)}}function Lt(t,h){if(t&1){let e=P();n(0,"div",12)(1,"button",13),_("click",function(){v(e);let i=u(2);return b(i.clearLottie())}),p(2," Remove "),r()()}t&2&&re("margin-left",12,"px")}function Et(t,h){if(t&1){let e=P();n(0,"div",7)(1,"div",8)(2,"div",9),p(3,"Icon"),r(),n(4,"div",10),x(5,Mt,2,1,"div",11),n(6,"div",12)(7,"button",13),_("click",function(){v(e);let i=u();return b(i.openAssetLibrary())}),p(8),r()(),x(9,yt,3,2,"div",14),r(),n(10,"div"),p(11,"512x512 pix"),r()(),n(12,"div",8)(13,"div",9),p(14,"Lottie"),r(),n(15,"div",10),x(16,It,2,1,"div",15),n(17,"div",12)(18,"button",13),_("click",function(){v(e);let i=u();return b(i.openLottieInputClick())}),p(19),r()(),x(20,Lt,3,2,"div",14),r()(),n(21,"div",16),C(22,"text-input",17),r(),n(23,"div",16),C(24,"text-input",17),p(25," Max 26 Characters "),r(),n(26,"div",18)(27,"button",13),_("click",function(){v(e);let i=u();return b(i.save())}),p(28,"Save"),r()()()}if(t&2){let e=u();c(5),m("ngIf",e.icon==null||e.icon.value==null?null:e.icon.value.thumbnailUrl),c(3),y(" ",!(e.icon==null||e.icon.value==null)&&e.icon.value.thumbnailUrl?"Replace":"Add"," "),c(),m("ngIf",e.icon==null?null:e.icon.value),
3c(7),m("ngIf",e.lottieUrl==null?null:e.lottieUrl.value),c(3),y(" ",e.lottieUrl!=null&&e.lottieUrl.value?"Replace":"Add"," "),c(),m("ngIf",e.lottieUrl==null?null:e.lottieUrl.value),c(2),m("inputFormControl",e.lottieUrl)("label","Lottie URL")("highlightOnFocus",!1),c(),re("margin-top",32,"px"),c(),m("inputFormControl",e.title)("label","Title")("highlightOnFocus",!1),c(2),m("ngClass",se(15,St,e.detailsFormGroup==null?null:e.detailsFormGroup.invalid))}}var R=function(t){return t.TITLE="title",t.Icon="icon",t.LottieURL="lottie",t}(R||{}),dt=(()=>{class t extends Q{get courseId(){return this.data&&this.data.courseId}get header(){return this.data&&this.data.header}get title(){return this.detailsFormGroup&&this.detailsFormGroup.get(R.TITLE)}get icon(){return this.detailsFormGroup&&this.detailsFormGroup.get(R.Icon)}get lottieUrl(){return this.detailsFormGroup&&this.detailsFormGroup.get(R.LottieURL)}constructor(e,a,i,d,g,O,te,z){super(z),this.formBuilder=e,this.requestsService=a,this.adminRequestsService=i,this.spinnerService=d,this.dialogHelperService=g,this.adapterService=O,this.notifier=te,this.data=z,this.lottieFileInput=null,this.SPINNER_ID="course-dialog-spinner",this.allowedThumbnailFileTypes="application/JSON",this.initialize=()=>w(this,null,function*(){let s={};if(this.courseId){let o=yield this.getCourse();s=this.adapterService.adapt(o)}this.initializeDetailsFormGroup(s)}),this.getCourse=()=>w(this,null,function*(){try{return this.spinnerService.spin(this.SPINNER_ID,!0),yield this.adminRequestsService.getAdminCourse(this.courseId)}catch(s){console.error(s),this.notifier.error("Course details failed to load")}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.initializeDetailsFormGroup=(s={})=>{this.detailsFormGroup=this.formBuilder.group({[R.TITLE]:[s.title||"",[A.required,A.maxLength(ee.TITLE)]],[R.Icon]:[s.thumbnailAssetId?{thumbnailUrl:s.thumbnail,assetId:s.thumbnailAssetId}:null],[R.LottieURL]:[s.lottie||""]},{validators:this.customValidator}),this.isFormReady=!0},this.customValidator=s=>{let o=s.get(R.Icon).value,l=s.get(R.LottieURL).value;return!o&&!l?A.required:null},this.clearAsset=()=>{this.icon.setValue(null)},this.clearLottie=()=>{this.lottieUrl.setValue("")},this.openAssetLibrary=()=>{let s=new Ce;s.assetType="image",s.assetSubType="thumbnail",s.level="desk",s.ratio="square",s.header="Select Image Asset",s.onSubmit=this.setAsset,s.onClose=this.dialogHelperService.close;let o=new I;o.panelClass="assets-uploads-library-modal-dialog",this.dialogHelperService.open(s,fe,o)},this.setAsset=s=>{if(s){let o=this.getAssetValue(s);this.icon.setValue(o)}this.dialogHelperService.close()},this.getAssetValue=s=>{let l=new K().create(s);return{assetId:l.assetId,thumbnailUrl:l.getThumbnailUrl()}},this.openLottieInputClick=()=>{this.lottieFileInput.nativeElement.click()},this.onLottieUpdate=s=>w(this,null,function*(){let o=s.target.files,l=new FileReader,S;l.readAsText(o[0],"UTF-8"),l.onload=()=>{typeof l.result=="string"&&(S=JSON.parse(l.result),this.uploadLottie(S,s))},l.onerror=ie=>{console.error(ie),this.notifier.error("Lottie upload failed"),s.target.value=null}}),this.uploadLottie=(s,o)=>w(this,null,function*(){try{let l=yield this.requestsService.uploadLottie(s);this.lottieUrl.setValue(l.url)}catch{this.notifier.error("Lottie upload failed")}finally{o.target.value=null}}),this.save=()=>w(this,null,function*(){if(!this.detailsFormGroup.invalid)try{this.spinnerService.spin(this.SPINNER_ID,!0),this.courseId?yield this.updateCourse():yield this.createCourse(),this.data.onSubmit(),this.notifier.success("Course saved successfully")}catch(s){this.notifier.error("Failed to save your course"),console.error(s)}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.updateCourse=()=>this.adminRequestsService.updateCourse(this.courseId,this.title.value,this.icon.value?this.icon.value?.assetId:"",this.lottieUrl.value?this.lottieUrl.value:""),this.createCourse=()=>this.adminRequestsService.createCourse(this.title.value,this.data.lang,this.icon.value?.assetId,this.lottieUrl.value)}ngOnInit(){this.initialize()}static{this.\u0275fac=function(a){return new(a||t)(f(pe),f(ue),f(X),f(J),f(N),f(Z),f($),f(Y))}}static{this.\u0275cmp=L({type:t,selectors:[["edit-course-dialog"]],viewQuery:function(a,i){if(a&1&&ke(Ot,5),a&2){let d;Ae(d=Re())&&(i.lottieFileInput=d.first)}},standalone:!0,features:[E,T],decls:9,vars:4,consts:[["lottieFileInput",""],[1,"dialog-close-button-container"],[1,"dialog-close-button",3,"click"],[1,"dialog-title"],["class","details-form-container",4,"ngIf"],[3,"name"],["type","file","aria-label","thumbnail upload",1,"hidden-element",3,"change","accept"],[1,"details-form-container"],[1,"details-container"],[1,"detail-label"],[1,"asset-input-container"],["class","asset-preview-container",4,"ngIf"],[1,"add-asset-button-container"],[3,"click"],["class","add-asset-button-container",3,"margin-left",4,"ngIf"],["class","lottie-wrapper",4,"ngIf"],[1,"text-field-input-container"],[3,"inputFormControl","label","highlightOnFocus"],[1,"save-button-container",3,"ngClass"],[1,"asset-preview-container"],["alt","image",3,"src"],[1,"lottie-wrapper"],[3,"path"]],template:function(a,i){if(a&1){let d=P();
vendor: 4,112 bytes, lines 3-4
3n(0,"div",1)(1,"div",2),_("click",function(){return v(d),b(i.close())}),r()(),n(2,"div",3),p(3),r(),x(4,Et,29,17,"div",4),n(5,"ngx-spinner",5),C(6,"lottie-loader"),r(),n(7,"input",6,0),_("change",function(O){return v(d),b(i.onLottieUpdate(O))}),r()}a&2&&(c(3),y(" ",i.header,` 4`),c(),m("ngIf",i.isFormReady),c(),m("name",i.SPINNER_ID),c(2),m("accept",i.allowedThumbnailFileTypes))},dependencies:[k,ge,ot,ce,Be,qe,G],styles:['.details-form-container[_ngcontent-%COMP%]{margin-top:20px;display:flex;flex-direction:column;align-items:center}.text-field-input-container[_ngcontent-%COMP%]{width:75%;margin-bottom:12px}.topics-input-container[_ngcontent-%COMP%]{margin-bottom:12px;border-radius:10px;background-color:#7b8db114;padding:5px 12px;cursor:text!important} .topics-input-container mat-chip-list mat-chip button{width:14px;height:14px;padding:0;border-radius:100%;background-color:#ffffffb3;display:flex;justify-content:center;align-items:center;margin-right:4px} .topics-input-container mat-chip-list mat-chip button img{width:100%;height:100%;object-fit:contain;object-position:center}.lessons-section[_ngcontent-%COMP%]{padding:5px;height:360px;margin:40px 0 70px}.section-label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.section-label-container[_ngcontent-%COMP%] .label-text[_ngcontent-%COMP%]{font-size:16px;font-family:Inter-SemiBold}.lesson-list-container[_ngcontent-%COMP%]{height:100%;overflow:scroll;margin:15px auto;padding-right:10px}.lesson-container[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.lesson-details-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:85%}.drag-handle[_ngcontent-%COMP%]{width:18px;height:34px;position:relative;margin-right:5px;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}.drag-handle[_ngcontent-%COMP%]:before{content:".";position:absolute;inset:0;width:100%;height:100%;text-shadow:0 5px #000,0 10px #000,5px 0 #000,5px 5px #000,5px 10px #000,10px 0 #000,10px 5px #000,10px 10px #000}.lesson-thumbnail-container[_ngcontent-%COMP%]{width:80px;height:70px;margin-right:20px;border-radius:6px;overflow:hidden;background-color:#000}.lesson-thumbnail-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}.lesson-title[_ngcontent-%COMP%]{font-size:16px;font-family:Inter-SemiBold;width:70%}.lesson-container[_ngcontent-%COMP%]:hover .lesson-ctas-container[_ngcontent-%COMP%]{display:flex}.cta-button-container[_ngcontent-%COMP%]{width:18px;height:18px;margin-right:20px}.cta-button-container[_ngcontent-%COMP%]:last-child{margin-right:0}.cta-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;height:100%;padding:0}.cta-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;object-position:center}.save-button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:140px;height:36px;margin:10px auto;background-color:#00abfe;border-radius:10px}.save-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;height:100%;padding:0;color:#fff;font-size:14px;font-family:Inter-SemiBold}.disabled[_ngcontent-%COMP%]{cursor:default;pointer-events:none;opacity:.4}.hidden-element[_ngcontent-%COMP%]{display:none}.lottie-wrapper[_ngcontent-%COMP%]{width:100px} .course-icon-wrapper lottie-loader ng-lottie div{width:100%!important;height:100%!important}.asset-preview-container[_ngcontent-%COMP%]{width:108px;height:100px;border-radius:10px;overflow:hidden;background-color:#000;margin-right:8px}.asset-preview-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}',".lesson-details-container[_ngcontent-%COMP%]{margin:20px auto}.detail-label[_ngcontent-%COMP%]{font-size:14px;font-family:Inter-SemiBold;width:60px}.details-container[_ngcontent-%COMP%]{width:75%;margin-bottom:20px;
4display:flex;gap:24px;align-items:stretch}.details-flex[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;width:120px}.asset-input-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end}.asset-thumbnail-preview-container[_ngcontent-%COMP%]{width:178px;height:100px;border-radius:10px;overflow:hidden;background-color:#000;margin-right:8px}.asset-thumbnail-preview-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}.add-asset-button-container[_ngcontent-%COMP%]{width:60px;height:24px;background-color:#00abfe;border-radius:6px;display:flex;justify-content:center;align-items:center}.add-asset-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:12px;color:#fff;font-family:Inter-SemiBold;width:100%;height:100%;padding:0}.course-lesson-submit-button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin:60px auto 10px;width:120px;height:36px;background-color:#00abfe;border-radius:10px}.course-lesson-submit-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;height:100%;padding:0;color:#fff;font-size:14px;font-family:Inter-SemiBold}.disabled[_ngcontent-%COMP%]{cursor:default;pointer-events:none;opacity:.4}"]})}}return t})();j();Se();var be=class extends W{};V();Se();ye();Me();Pe();ne();V();function Dt(t,h){if(t&1&&C(0,"img",14),t&2){let e=u().$implicit;m("src",e==null||e.asset==null?null:e.asset.thumbnailUrl,M)}}function Tt(t,h){if(t&1&&C(0,"img",14),t&2){let e=u().$implicit;m("src",e==null?null:e.thumbnail,M)}}function kt(t,h){if(t&1&&(n(0,"div",15),C(1,"lottie-loader",16),r()),t&2){let e=u().$implicit;c(),m("path",e.lottie)}}function At(t,h){if(t&1&&(n(0,"div",7)(1,"div",8),C(2,"div",9),n(3,"div",10),x(4,Dt,1,1,"img",11)(5,Tt,1,1,"img",11)(6,kt,2,1,"div",12),r(),n(7,"div",13),p(8),r()()()),t&2){let e=h.$implicit,a=u();c(4),m("ngIf",a.data.isChapter&&(e==null||e.asset==null?null:e.asset.thumbnailUrl)),c(),m("ngIf",!a.data.isChapter&&(e==null?null:e.thumbnail)&&!(e!=null&&e.lottie)),c(),m("ngIf",!a.data.isChapter&&(e==null?null:e.lottie)),c(2),D(e==null?null:e.title)}}var U=class extends W{},oe=(()=>{class t extends Q{constructor(e){super(e),this.data=e,this.swap=a=>{let{previousIndex:i,currentIndex:d}=a;Ze(this.list,i,d)},this.getReorderedLessonIds=()=>this.list.map(a=>a.id),this.save=()=>{this.submit(this.getReorderedLessonIds())}}ngOnInit(){this.list=this.data.list}static{this.\u0275fac=function(a){return new(a||t)(f(Y))}}static{this.\u0275cmp=L({type:t,selectors:[["app-admin-course-reorder"]],standalone:!0,features:[E,T],decls:9,vars:1,consts:[[1,"dialog-close-button-container"],[1,"dialog-close-button",3,"click"],[1,"dialog-title"],["cdkDropList","",1,"lesson-list-container",3,"cdkDropListDropped"],["class","lesson-container","cdkDragBoundary",".lesson-list-container","cdkDrag","",4,"ngFor","ngForOf"],[1,"save-button-container"],[3,"click"],["cdkDragBoundary",".lesson-list-container","cdkDrag","",1,"lesson-container"],[1,"lesson-details-container"],["cdkDragHandle","",1,"drag-handle"],[1,"lesson-thumbnail-container"],["alt","image",3,"src",4,"ngIf"],["class","lottie-wrapper",4,"ngIf"],[1,"lesson-title"],["alt","image",3,"src"],[1,"lottie-wrapper"],[3,"path"]],template:function(a,i){a&1&&(n(0,"div",0)(1,"div",1),_("click",function(){return i.close()}),r()(),n(2,"div",2),p(3,` Reorder List 5`),r(),n(4,"div",3),_("cdkDropListDropped",function(g){return i.swap(g)}),x(5,At,9,4,"div",4),r(),n(6,"div",5)(7,"button",6),_("click",function(){return i.save()}),p(8,"Save"),r()()),a&2&&(c(5),m("ngForOf",i.list))},dependencies:[B,q,k,nt,it,tt,et,G],styles:['.lesson-list-container[_ngcontent-%COMP%]{height:400px;overflow:scroll;margin:15px auto;padding-right:10px}.lesson-container[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.lesson-details-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:85%}.drag-handle[_ngcontent-%COMP%]{width:18px;height:34px;position:relative;margin-right:5px;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}.drag-handle[_ngcontent-%COMP%]:before{content:".";position:absolute;inset:0;width:100%;height:100%;text-shadow:0 5px #000,0 10px #000,5px 0 #000,5px 5px #000,5px 10px #000,10px 0 #000,10px 5px #000,10px 10px #000}.lesson-thumbnail-container[_ngcontent-%COMP%]{width:80px;height:70px;margin-right:20px;border-radius:6px;overflow:hidden;background-color:#000;display:flex;align-items:center;justify-content:center}.lesson-thumbnail-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}.lesson-title[_ngcontent-%COMP%]{font-size:16px;font-family:Inter-SemiBold;width:70%}.lesson-container[_ngcontent-%COMP%]:hover .lesson-ctas-container[_ngcontent-%COMP%]{display:flex}.save-button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:140px;height:36px;margin:10px auto;background-color:#00abfe;border-radius:10px}.save-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;height:100%;padding:0;color:#fff;font-size:14px;font-family:Inter-SemiBold}.lottie-wrapper[_ngcontent-%COMP%]{width:60%!important;height:60%!important} .lesson-thumbnail-container lottie-loader ng-lottie div{width:100%!important;height:100%!important}']})}}return t})();ft();Ct();Pe();ne();Ye();He();Ie();j();Oe();ze();V();var Vt=(t,h,e)=>({id:"admin-courses",itemsPerPage:t,currentPage:h,totalItems:e});function Nt(t,h){if(t&1){let e=P();n(0,"div",6)(1,"button",7),_("click",function(){v(e);let i=u();return b(i.openCourseEditDialog())}),p(2," Create "),r()()}}function jt(t,h){if(t&1){let e=P();n(0,"div",6)(1,"button",7),_("click",function(){v(e);let i=u();return b(i.openCoursesReorderDialog())}),p(2," Reorder "),r()()}}function Ut(t,h){if(t&1){let e=P();n(0,"div",6)(1,"button",7),_("click",function(){v(e);let i=u();return b(i.openWhatsNewDialog())}),p(2," Show What`s New "),r()()}}function zt(t,h){if(t&1&&(n(0,"div",15),C(1,"img",16),r()),t&2){let e=u().$implicit;c(),m("src",e.thumbnail,M)}}function qt(t,h){if(t&1&&(n(0,"div",15)(1,"div",17),C(2,"lottie-loader",18),r()()),t&2){let e=u().$implicit;c(2),m("path",e.lottie)}}function Bt(t,h){if(t&1){let e=P();n(0,"button",19),_("click",function(i){v(e);let d=u().$implicit,g=u(2);return i.stopPropagation(),b(g.onEditVideos(d))}),C(1,"img",20),r()}}function Gt(t,h){if(t&1){let e=P();n(0,"td",21)(1,"div",22)(2,"button",19),_("click",function(i){v(e);let d=u().$implicit,g=u(2);
5return i.stopPropagation(),b(g.onRemovalRequest(d))}),C(3,"img",23),r()()()}}function Ht(t,h){if(t&1){let e=P();n(0,"tr",9),_("click",function(){let i=v(e).$implicit,d=u(2);return b(d.openCourseEditDialog(i))}),n(1,"td")(2,"div",10),x(3,zt,2,1,"div",11)(4,qt,3,1,"div",11),r()(),n(5,"td"),p(6),r(),n(7,"td")(8,"div",12)(9,"div"),p(10),r(),x(11,Bt,2,0,"button",13),r()(),x(12,Gt,4,0,"td",14),r()}if(t&2){let e=h.$implicit,a=u(2);c(3),m("ngIf",e.thumbnail),c(),m("ngIf",e.lottie),c(2),D(e.title),c(4),y(" ",e.lessonCount," Videos "),c(),m("ngIf",a.isSuperAdmin),c(),m("ngIf",a.isSuperAdmin)}}function $t(t,h){if(t&1&&(n(0,"table")(1,"thead")(2,"tr")(3,"th"),p(4,"Icon/lottie"),r(),n(5,"th"),p(6,"Title"),r(),n(7,"th"),p(8,"Videos"),r(),C(9,"th"),r()(),n(10,"tbody"),x(11,Ht,13,6,"tr",8),ae(12,"paginate"),r()()),t&2){let e=u();c(11),m("ngForOf",le(12,1,e.courses,Ve(4,Vt,e.itemsPerPage,e.currentPage,e.totalNumberOfItems)))}}function Wt(t,h){t&1&&(n(0,"div",25),p(1," No courses found "),r())}function Yt(t,h){if(t&1&&x(0,Wt,2,0,"div",24),t&2){let e=u();m("ngIf",!e.isLoading)}}function Qt(t,h){if(t&1){let e=P();n(0,"div",26)(1,"pagination-controls",27),_("pageChange",function(i){v(e);let d=u();return b(d.onPageChange(i))}),r()()}}var mt=(()=>{class t extends xe{constructor(e,a,i,d,g,O,te,z,s){super(e,void 0,_e.cursor),this.permissionService=e,this.requestService=a,this.adminRequestService=i,this.spinnerService=d,this.adapterService=g,this.dialogService=O,this.notifier=te,this.router=z,this.adminCourseDataService=s,this.unsubscribe$=new De,this.currentLang="en",this.setLang=o=>{this.currentLang!==o&&(this.currentLang=o,this.resetPagination(),this.getCourses(),this.setLessonList())},this.getCourses=()=>w(this,null,function*(){try{this.spinnerService.spin("admin-spinner",!0),this.isLoading=!0;let o=yield this.getCourseListPromise();this.parseDataForPagination(o),this.adaptCourseList(o.result)}catch(o){this.notifier.error("Failed to load courses list"),console.error(o)}finally{this.spinnerService.stop("admin-spinner"),this.isLoading=!1}}),this.getCourseListPromise=()=>this.getCurrentPageUrl()!==""?this.requestService.pullPaginationNextUrl(this.getCurrentPageUrl()):this.requestService.getCourselist(this.itemsPerPage,void 0,this.currentLang),this.adaptCourseList=o=>{this.courses=[],o.forEach(l=>{this.courses.push(this.adapterService.adapt(l))})},this.adaptCoursesVideoList=o=>{this.whatsNewList=[],o.forEach(l=>{this.whatsNewList.push(this.adapterService.adaptVideoLesson(l))})},this.setLessonList=()=>w(this,null,function*(){let o=yield this.requestService.getCourseVideoList(100,this.currentLang);this.adaptCoursesVideoList(o.result)}),this.openCourseEditDialog=o=>{let l=new be;l.courseId=o&&o.id,l.lang=this.currentLang,l.header=o?"Edit Course":"Create Course",l.onClose=this.dialogService.close,l.onSubmit=this.afterEditCourseList;let S=new I;S.panelClass="course-edit-dialog-content",this.dialogService.open(l,dt,S)},this.afterEditCourseList=()=>{this.resetPagination(),this.getCourses(),this.dialogService.close()},this.openCoursesReorderDialog=()=>{let o=new U;o.list=this.courses,o.onClose=this.dialogService.close,o.onSubmit=this.afterReorder;let l=new I;l.panelClass="course-edit-dialog-content",this.dialogService.open(o,oe,l)},this.afterReorder=o=>w(this,null,function*(){try{this.dialogService.close(),yield this.adminRequestService.reorderCourses(o,this.currentLang),this.resetPagination(),this.getCourses()}catch(l){console.error(l)}}),this.openWhatsNewDialog=()=>{let o=new U;o.list=this.whatsNewList,o.onClose=this.dialogService.close,o.onSubmit=this.afterWhatsNew;let l=new I;l.panelClass="course-edit-dialog-content",this.dialogService.open(o,oe,l)},this.afterWhatsNew=o=>w(this,null,function*(){try{this.dialogService.close(),yield this.adminRequestService.reorderVideoList(o,this.currentLang),this.resetPagination(),this.getCourses()}catch(l){console.error(l)}}),this.onEditVideos=o=>{this.router.navigate(["admin","courses",o.id])},this.onRemovalRequest=o=>{this.courseToRemoveId=o.id,this.dialogService.showUiConfirmationDialog({title:"Delete Course",msg:"Are you sure you wish to delete this course?",confirmationText:"Yes",cancellationText:"Cancel",onSubmit:this.removeCourse})},this.removeCourse=()=>w(this,null,function*(){try{this.spinnerService.spin("admin-spinner",!0),yield this.adminRequestService.removeCourse(this.courseToRemoveId);let o=this.courses.findIndex(l=>l.id===this.courseToRemoveId);o>-1&&this.courses.splice(o,1),this.dialogService.close(),this.notifier.success("Course removed successfully")}catch(o){this.notifier.error("Failed to remove the course"),console.error(o)}finally{this.spinnerService.stop("admin-spinner")}}),this.setItemsPerPage(100),this.setOnPageChangeCallback(this.getCourses)}ngOnInit(){this.resetPagination(),this.getCourses(),this.setLessonList(),this.adminCourseDataService.observeCourseLang().pipe(Te(this.unsubscribe$)).subscribe(this.setLang)}ngOnDestroy(){super.ngOnDestroy(),this.unsubscribe$.next(),this.unsubscribe$.unsubscribe()}static{this.\u0275fac=function(a){return new(a||t)(f(he),f(ue),f(X),f(J),f(Z),f(N),f($),f(de),f(rt))}}static{this.\u0275cmp=L({type:t,selectors:[["app-admin-courses-list"]],standalone:!0,features:[E,T],decls:12,vars:6,consts:[["showNoContentMessage",""],[1,"admin-courses-list"],[1,"buttons-section"],["class","cta-button-container",4,"ngIf"],[4,"ngIf","ngIfElse"],["class","pagination-controls-container",4,"ngIf"],[1,"cta-button-container"],[1,"bigvu-btn-apply",3,"click"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"icon-lottie-preview"],["class","course-icon-wrapper",4,"ngIf"],[1,"video-edit"],["aria-label","Delete",3,"click",4,"ngIf"],["class","ctas-container",4,"ngIf"],[1,"course-icon-wrapper"],["alt","Icon",3,"src"],[1,"lottie-wrapper"],[3,"path"],["aria-label","Delete",3,"click"],["src","/img/edit-black.svg","alt","Delete"],[1,"ctas-container"],[1,"remove-button-container"],["src","/img/delete_icon.svg","alt","Delete"],["class","empty-list-msg",4,"ngIf"],[1,"empty-list-msg"],[1,"pagination-controls-container"],["id","admin-courses","previousLabel","","nextLabel","",3,"pageChange"]],template:function(a,i){if(a&1&&(n(0,"div",1)(1,"header")(2,"div",2),x(3,Nt,3,0,"div",3)(4,jt,3,0,"div",3)(5,Ut,3,0,"div",3),r()(),n(6,"main"),x(7,$t,13,8,"table",4)(8,Yt,1,1,"ng-template",null,0,Ne),r(),n(10,"footer"),x(11,Qt,2,0,"div",5),r()()),a&2){let d=Fe(9);c(3),m("ngIf",i.isSuperAdmin),c(),m("ngIf",i.isSuperAdmin&&(i.courses==null?null:i.courses.length)>0),c(),m("ngIf",i.isSuperAdmin&&(i.whatsNewList==null?null:i.whatsNewList.length)>0),c(2),m("ngIf",(i.courses==null?null:i.courses.length)>0)("ngIfElse",d),c(4),m("ngIf",i.totalNumberOfItems>0)}},dependencies:[B,q,k,Xe,Je,Ke,G],styles:[".admin-courses-list[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{cursor:pointer}.buttons-section[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;gap:24px}.bigvu-btn-apply[_ngcontent-%COMP%]{font-weight:700}.course-icon-wrapper[_ngcontent-%COMP%]{width:48px;height:48px;background:#fff;border-radius:50%;border:1px solid rgba(123,141,177,.3);overflow:hidden;display:flex;justify-content:center;align-items:center}.lottie-wrapper[_ngcontent-%COMP%]{width:60%!important;height:60%!important}.icon-lottie-preview[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px} .course-icon-wrapper lottie-loader ng-lottie div{width:100%!important;height:100%!important}.course-icon-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-position:center;object-fit:contain}.video-edit[_ngcontent-%COMP%]{display:flex;align-items:center}.hidden-element[_ngcontent-%COMP%]{display:none}.empty-list-msg[_ngcontent-%COMP%]{margin-top:24px;width:100%;display:flex;justify-content:center}","table[_ngcontent-%COMP%] .user-info-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center}table[_ngcontent-%COMP%] .user-info-container[_ngcontent-%COMP%] .user-img-container[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;overflow:hidden;margin-right:15px}table[_ngcontent-%COMP%] .user-info-container[_ngcontent-%COMP%] .user-img-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}.controls-cursor-pagination[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;margin:12px auto}header[_ngcontent-%COMP%]{margin-top:2rem;display:flex;align-items:center;justify-content:space-between}main[_ngcontent-%COMP%]{display:flex!important;align-items:baseline!important;justify-content:flex-start!important}.action-td[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:70px}.title[_ngcontent-%COMP%]{font-size:32px;font-family:Inter-ExtraBold;color:#253658}.sub-title[_ngcontent-%COMP%]{text-align:left;font-size:12px;font-family:Inter-Bold;color:#253658}table[_ngcontent-%COMP%]{width:100%;border-collapse:separate;border-spacing:0 12px;table-layout:auto}.sort-arrow[_ngcontent-%COMP%]{margin-left:4px}.sortable[_ngcontent-%COMP%]{display:inline-block}.filters[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;font-weight:700;gap:20px}.filter-wrapper[_ngcontent-%COMP%]{width:145px;height:36px;border-radius:10px;background-color:#7b8db114;font-size:12px;text-align:center;font-weight:700;color:#7b8db1;cursor:pointer}.highlighted[_ngcontent-%COMP%]{color:#0d80dc!important;cursor:pointer}.menu-wrapper[_ngcontent-%COMP%]{width:160px}.menu-wrapper[_ngcontent-%COMP%] label.search-error-msg[_ngcontent-%COMP%]{color:red;margin-top:10px} .menu-wrapper autocomplete-menu .autocomplete-menu-container{border-radius:10px;background-color:#7b8db114;padding:5px 12px;
5height:46px;cursor:text} .menu-wrapper autocomplete-menu .autocomplete-menu-container input{color:#253658;font-size:14px} .filter-wrapper select-menu .mat-mdc-menu-panel{width:135px!important}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-weight:500;font-size:14px;line-height:normal;letter-spacing:.22px;color:#000;padding:9px 14px;text-align:start;text-overflow:ellipsis;overflow:hidden;background-color:#7b8db108;line-break:auto}td[_ngcontent-%COMP%]:first-child{border-radius:10px 0 0 10px;-moz-border-radius:10px 0 0 10px;-webkit-border-radius:10px 0 0 10px}td[_ngcontent-%COMP%]:last-child{border-radius:0 10px 10px 0;-moz-border-radius:0 10px 10px 0;-webkit-border-radius:0 10px 10px 0}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] span[_ngcontent-%COMP%] .caret[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:middle;border-top:12px solid;border-bottom:12px solid;border-color:transparent}table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{width:100%;background-color:#fff}table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{height:61px;font-size:10px;font-weight:600;color:#25365899;text-align:start;padding:18px 15px 17px;text-transform:uppercase}@media only screen and (max-width: 1023px){table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:18px 10px 17px;font-size:11px}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:17px 16px 16px;font-size:12px}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:10px}}@media only screen and (max-width: 767px){table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:10px}.filters[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:12px}}"]})}}return t})();V();j();Se();var we=class extends W{};me();Me();We();V();ye();j();ne();me();j();var Jt=t=>({disabled:t});function Kt(t,h){if(t&1&&(n(0,"div",14),C(1,"img",15),r()),t&2){let e=u();c(),m("src",e.assetControl==null||e.assetControl.value==null?null:e.assetControl.value.thumbnailUrl,M)}}function Xt(t,h){if(t&1&&(n(0,"div",14),C(1,"img",15),r()),t&2){let e=u();c(),m("src",e.thumbnailControl==null||e.thumbnailControl.value==null?null:e.thumbnailControl.value.thumbnailUrl,M)}}var F=function(t){return t.TITLE="title",t.DESCRIPTION="description",t.ASSET="asset",t.THUMBNAIL="thumbnail",t}(F||{}),ut=(()=>{class t extends Q{get header(){return this.data&&this.data.header}get asset(){return this.data&&this.data.asset}get thumbnailAsset(){return this.data&&this.data.thumbnailAsset}get id(){return this.data&&this.data.id}get title(){return this.data&&this.data.title}get description(){return this.data&&this.data.description}get descriptionControl(){return this.lessonDetailsFormGroup&&this.lessonDetailsFormGroup.get(F.DESCRIPTION)}get titleControl(){return this.lessonDetailsFormGroup&&this.lessonDetailsFormGroup.get(F.TITLE)}get assetControl(){return this.lessonDetailsFormGroup&&this.lessonDetailsFormGroup.get(F.ASSET)}get thumbnailControl(){return this.lessonDetailsFormGroup&&this.lessonDetailsFormGroup.get(F.THUMBNAIL)}constructor(e,a,i){super(i),this.formBuilder=e,this.dialogHelperService=a,this.data=i,this.initializeLessonDetailsFormGroup=()=>{this.lessonDetailsFormGroup=this.formBuilder.group({[F.TITLE]:[this.title||"",[A.required,A.maxLength(ee.LESSON_TITLE)]],[F.DESCRIPTION]:[this.description||"",[A.required,A.maxLength(ee.DESCRIPTION)]],[F.ASSET]:[this.asset||null,[A.required]],[F.THUMBNAIL]:[this.thumbnailAsset||null,[]]})},this.getAssetValue=d=>{let O=new K().create(d);return{assetId:O.assetId,thumbnailUrl:O.getThumbnailUrl()}},this.openAssetLibrary=(d=!1)=>{let g=new Ce;g.assetType=d?"image":"video",d&&(g.assetSubType="thumbnail"),g.level="desk",g.ratio="horizontal",g.header=d?"Select Image Asset":"Select Video Asset",g.onSubmit=d?this.setThumbnailAsset:this.setAsset,g.onClose=this.dialogHelperService.close;let O=new I;O.panelClass="assets-uploads-library-modal-dialog",this.dialogHelperService.open(g,fe,O)},this.setAsset=d=>{if(d){let g=this.getAssetValue(d);this.assetControl.setValue(g)}this.dialogHelperService.close()},this.setThumbnailAsset=d=>{if(d){let g=this.getAssetValue(d);this.thumbnailControl.setValue(g)}this.dialogHelperService.close()},this.submit=()=>{this.data.onSubmit(Ee({id:this.id}
5,this.lessonDetailsFormGroup.value))}}ngOnInit(){this.initializeLessonDetailsFormGroup()}static{this.\u0275fac=function(a){return new(a||t)(f(pe),f(N),f(Y))}}static{this.\u0275cmp=L({type:t,selectors:[["edit-course-lesson-dialog"]],standalone:!0,features:[E,T],decls:43,vars:14,consts:[[1,"dialog-close-button-container"],[1,"dialog-close-button",3,"click"],[1,"dialog-title"],[1,"lesson-details-container"],[1,"details-container"],[1,"details-flex"],[1,"detail-label"],[1,"asset-input-container"],["class","asset-thumbnail-preview-container",4,"ngIf"],[1,"add-asset-button-container"],[3,"click"],[1,"text-field-input-container"],[3,"inputFormControl","label","highlightOnFocus"],[1,"course-lesson-submit-button-container",3,"ngClass"],[1,"asset-thumbnail-preview-container"],["alt","image",3,"src"]],template:function(a,i){a&1&&(n(0,"div",0)(1,"div",1),_("click",function(){return i.close()}),r()(),n(2,"div",2),p(3),r(),n(4,"div",3)(5,"div",4)(6,"div",5)(7,"div",6),p(8,"Video"),r(),n(9,"div",6),p(10,"16 9 Format"),r()(),n(11,"div",7),x(12,Kt,2,1,"div",8),n(13,"div",9)(14,"button",10),_("click",function(){return i.openAssetLibrary()}),p(15),r()()()(),n(16,"div",4)(17,"div",5)(18,"div",6),p(19,"Thumbnail"),r(),n(20,"div",6),p(21,"1920x1089"),r()(),n(22,"div",7),x(23,Xt,2,1,"div",8),n(24,"div",9)(25,"button",10),_("click",function(){return i.openAssetLibrary(!0)}),p(26),r()()()(),n(27,"div",4)(28,"div",5)(29,"div",6),p(30,"Title"),r()(),n(31,"div",11),C(32,"text-input",12),p(33," Max 35 Characters "),r()(),n(34,"div",4)(35,"div",5)(36,"div",6),p(37,"Description"),r()(),n(38,"div",11),C(39,"text-area-input",12),r()()(),n(40,"div",13)(41,"button",10),_("click",function(){return i.submit()}),p(42,"Save"),r()()),a&2&&(c(3),y(" ",i.header,` 6`),c(9),m("ngIf",i.assetControl==null||i.assetControl.value==null?null:i.assetControl.value.thumbnailUrl),c(3),y(" ",i.assetControl!=null&&i.assetControl.value?"Replace":"Add"," "),c(8),m("ngIf",i.thumbnailControl==null||i.thumbnailControl.value==null?null:i.thumbnailControl.value.thumbnailUrl),c(3),y(" ",i.thumbnailControl!=null&&i.thumbnailControl.value?"Replace":"Add"," "),c(6),m("inputFormControl",i.titleControl)("label","Title")("highlightOnFocus",!1),c(7),m("inputFormControl",i.descriptionControl)("label","Description")("highlightOnFocus",!1),c(),m("ngClass",se(12,Jt,i.lessonDetailsFormGroup==null?null:i.lessonDetailsFormGroup.invalid)))},dependencies:[ge,k,ce,Qe],styles:[".lesson-details-container[_ngcontent-%COMP%]{margin:20px auto}.detail-label[_ngcontent-%COMP%]{font-size:14px;font-family:Inter-SemiBold;width:60px}.details-container[_ngcontent-%COMP%]{width:75%;margin-bottom:20px;display:flex;gap:24px;align-items:stretch}.details-flex[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;width:120px}.asset-input-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end}.asset-thumbnail-preview-container[_ngcontent-%COMP%]{width:178px;height:100px;border-radius:10px;overflow:hidden;background-color:#000;margin-right:8px}.asset-thumbnail-preview-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}.add-asset-button-container[_ngcontent-%COMP%]{width:60px;height:24px;background-color:#00abfe;border-radius:6px;display:flex;justify-content:center;align-items:center}.add-asset-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:12px;color:#fff;font-family:Inter-SemiBold;width:100%;height:100%;padding:0}.course-lesson-submit-button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin:60px auto 10px;width:120px;height:36px;background-color:#00abfe;border-radius:10px}.course-lesson-submit-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;height:100%;padding:0;color:#fff;font-size:14px;font-family:Inter-SemiBold}.disabled[_ngcontent-%COMP%]{cursor:default;pointer-events:none;opacity:.4}"]})}}return t})();var gt=_t(vt());bt();xt();ne();Ye();Ie();j();Oe();ze();V();function Zt(t,h){if(t&1){let e=P();n(0,"div",7)(1,"button",8),_("click",function(){v(e);let i=u();return b(i.openLessonEditDialog())}),p(2," Create "),r()()}}function ei(t,h){if(t&1){let e=P();n(0,"div",7)(1,"button",8),_("click",function(){v(e);let i=u();return b(i.openLessonReorderDialog())}),p(2," Reorder "),r()()}}function ti(t,h){if(t&1){let e=P();n(0,"td",18)(1,"div",19)(2,"button",20),_("click",function(i){v(e);let d=u().index,g=u(2);return i.stopPropagation(),b(g.openLessonEditDialog(d))}),p(3," Edit Properties "),C(4,"img",21),r()()()}}function ii(t,h){if(t&1){let e=P();n(0,"td",18)(1,"div",19)(2,"button",20),_("click",function(i){v(e);let d=u().index,g=u(2);return i.stopPropagation(),b(g.deepLink(d))}),p(3," Deeplink "),C(4,"img",22),r()()()}}function ni(t,h){if(t&1){let e=P();n(0,"td",18)(1,"div",19)(2,"button",20),_("click",function(i){v(e);let d=u().index,g=u(2);
6return i.stopPropagation(),b(g.onRemovalRequest(d))}),C(3,"img",23),r()()()}}function oi(t,h){if(t&1){let e=P();n(0,"div",24),_("click",function(i){let d=v(e).$implicit,g=u().index,O=u(2);return i.stopPropagation(),b(O.selectPlatform(d.value,g))}),n(1,"div",25),C(2,"div",26),r(),n(3,"div",27),p(4),r()()}if(t&2){let e=h.$implicit,a=u().$implicit;c(2),m("hidden",!a.platforms.includes(e.value)),c(2),D(e.name)}}function ri(t,h){if(t&1){let e=P();n(0,"tr",10),_("click",function(){let i=v(e).index,d=u(2);return b(d.openLessonEditDialog(i))}),n(1,"td")(2,"div",11),C(3,"img",12),r()(),n(4,"td"),p(5),r(),n(6,"td"),p(7),r(),n(8,"td"),p(9),ae(10,"number"),r(),x(11,ti,5,0,"td",13)(12,ii,5,0,"td",13)(13,ni,4,0,"td",13),n(14,"td"),p(15),r(),n(16,"td")(17,"div",14),x(18,oi,5,2,"div",15),r()(),n(19,"td")(20,"div",16)(21,"select-menu",17),_("click",function(i){return v(e),b(i.stopPropagation())})("onSelection",function(i){let d=v(e).index,g=u(2);return b(g.selectUseInWhatNew(i,d))}),r()()()()}if(t&2){let e=h.$implicit,a=u(2);c(3),m("src",e==null||e.asset==null?null:e.asset.thumbnailUrl,M),c(2),D(e.title),c(2),D(e.description),c(2),D(le(10,12,e.duration,"1.1-2")),c(2),m("ngIf",a.isSuperAdmin),c(),m("ngIf",a.isSuperAdmin),c(),m("ngIf",a.isSuperAdmin),c(2),D(e.lastChanged),c(3),m("ngForOf",a.platformOptions),c(3),m("selectedOption",e.useInWhatNew)("menuOptions",a.whatsNewOptions)("toggleMenuIconClass","grey-triangle closed")}}function si(t,h){if(t&1&&(n(0,"table")(1,"thead")(2,"tr"),C(3,"th"),n(4,"th"),p(5,"Title"),r(),n(6,"th"),p(7,"Description"),r(),n(8,"th"),p(9,"Duration"),r(),C(10,"th")(11,"th")(12,"th"),n(13,"th"),p(14,"Last Modification"),r(),n(15,"th"),p(16,"Platform"),r(),n(17,"th"),p(18,"What`s New"),r()()(),n(19,"tbody"),x(20,ri,22,15,"tr",9),r()()),t&2){let e=u();c(20),m("ngForOf",e.lessonList)}}var ht=(()=>{class t extends xe{constructor(e,a,i,d,g,O,te,z){super(e,void 0,_e.cursor),this.permissionService=e,this.adminRequestsService=a,this.spinnerService=i,this.adapterService=d,this.dialogHelperService=g,this.notifier=O,this.route=te,this.router=z,this.SPINNER_ID="spinner-single-course",this.initCourse=()=>w(this,null,function*(){let s=yield this.adminRequestsService.getAdminCourse(this.courseId);this.setLessonList(s)}),this.getCourseIdRouteParam=()=>this.route.snapshot.paramMap.get("courseId"),this.openLessonEditDialog=s=>{let o=this.lessonList[s],l=new we;l.header=o?"Edit Lesson":"Add Lesson",l.id=o?o.id:null,l.title=o?o.title:"",l.description=o?o.description:"",l.asset=o?o.asset:null,l.thumbnailAsset=o?o.thumbnail:null,l.onClose=this.dialogHelperService.close,l.onSubmit=this.editLessonList;let S=new I;S.panelClass="edit-course-lesson-dialog-content",this.dialogHelperService.open(l,ut,S)},this.editLessonList=s=>w(this,null,function*(){let o=yield this.saveLesson(s);this.setLessonList(o),this.dialogHelperService.close()}),this.deepLink=s=>w(this,null,function*(){let o=this.lessonList[s];try{let l=`https://${window.location.host}/course/${this.courseId}/${o.id}`;yield window.navigator.clipboard.writeText(l),this.notifier.info("Copied to clipboard")}catch{this.notifier.error("Failed to copy your data to clipboard")}}),this.saveLesson=s=>w(this,null,function*(){try{return this.spinnerService.spin(this.SPINNER_ID,!0),s.id?yield this.updateLesson(s):yield this.createLessons(s)}catch(o){this.notifier.error("Failed to save lesson changes"),console.error(o)}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.createLessons=s=>this.adminRequestsService.addCourseLessons(this.courseId,s.title,s.description,s.asset?.assetId,s?.thumbnail&&s.thumbnail?.assetId?s.thumbnail?.assetId:void 0),this.updateLesson=s=>{let o=this.lessonList.find(l=>l.id===s.id);return this.adminRequestsService.updateCourseLesson(this.courseId,s.id,s.title,s.description,o.useInWhatNew?.value,s.asset?.assetId,s?.thumbnail&&s.thumbnail?.assetId?s.thumbnail?.assetId:void 0,o.platforms)},this.setLessonList=(s={})=>{this.lessonList=[];let{chapters:o}=s;o&&o.forEach(l=>{let ie=new K().create(l.asset);this.lessonList.push({id:l.id,title:l.title,description:l.description,duration:ie.getDuration(),lastChanged:(0,gt.default)(s.lastUpdate).format("DD/MM/YYYY HH:mm:ss"),useInWhatNew:new H(l.inChaptersVideosList,l.inChaptersVideosList?"Yes":"No"),asset:{assetId:ie.assetId,thumbnailUrl:ie.getThumbnailUrl()},thumbnail:l.thumbnailAssetId?{assetId:l.thumbnailAssetId,thumbnailUrl:l.thumbnails[
60].url}:void 0,platforms:l.platforms||[]})})},this.onRemovalRequest=s=>{this.lessonToRemoveIndex=s,this.dialogHelperService.showUiConfirmationDialog({title:"Remove Lesson",msg:"Are you sure you wish to remove this lesson?",confirmationText:"Yes",cancellationText:"Cancel",onSubmit:this.removeLesson})},this.removeLesson=()=>w(this,null,function*(){try{let s=this.lessonList[this.lessonToRemoveIndex];s.id&&(this.spinnerService.spin(this.SPINNER_ID,!0),yield this.adminRequestsService.removeCourseLessons(this.courseId,[s.id]),this.notifier.success("Lesson removed successfully")),this.dialogHelperService.close(),this.lessonList.splice(this.lessonToRemoveIndex,1)}catch(s){this.notifier.error("Failed to remove the selected lesson"),console.error(s)}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.openLessonReorderDialog=()=>{let s=new U;s.list=this.lessonList,s.isChapter=!0,s.onClose=this.dialogHelperService.close,s.onSubmit=this.afterReorder;let o=new I;o.panelClass="course-edit-dialog-content",this.dialogHelperService.open(s,oe,o)},this.afterReorder=s=>w(this,null,function*(){try{this.dialogHelperService.close(),yield this.adminRequestsService.updateCourse(this.courseId,void 0,void 0,void 0,s),yield this.initCourse()}catch(o){console.error(o)}}),this.selectUseInWhatNew=(s,o)=>w(this,null,function*(){this.lessonList[o].useInWhatNew=s;try{this.spinnerService.spin(this.SPINNER_ID,!0),yield this.updateLesson(this.lessonList[o])}catch(l){this.notifier.error("Failed to save lesson changes"),console.error(l)}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.backToCourses=()=>{this.router.navigate(["admin","courses"])},this.selectPlatform=(s,o)=>w(this,null,function*(){let l;if(this.lessonList[o].platforms.includes(s)?this.lessonList[o].platforms.length>1?(this.lessonList[o].platforms=this.lessonList[o].platforms.filter(S=>S!=s),l=!0):(this.notifier.error("You have to select at least 1 platform"),l=!1):(this.lessonList[o].platforms.push(s),l=!0),!!l)try{this.spinnerService.spin(this.SPINNER_ID,!0),yield this.updateLesson(this.lessonList[o])}catch(S){this.notifier.error("Failed to save lesson changes"),console.error(S)}finally{this.spinnerService.stop(this.SPINNER_ID)}}),this.whatsNewOptions=[new H(!0,"Yes"),new H(!1,"No")],this.platformOptions=[new H("web","Web App"),new H("mobile","Mobile")]}ngOnInit(){return w(this,null,function*(){this.courseId=this.getCourseIdRouteParam(),yield this.initCourse()})}static{this.\u0275fac=function(a){return new(a||t)(f(he),f(X),f(J),f(Z),f(N),f($),f(Ue),f(de))}}static{this.\u0275cmp=L({type:t,selectors:[["app-admin-courses-single"]],standalone:!0,features:[E,T],decls:14,vars:4,consts:[[1,"admin-course-single-component"],[1,"back-btn",3,"click"],[1,"info-controls"],[1,"sub-title"],[1,"buttons-section"],["class","cta-button-container",4,"ngIf"],[4,"ngIf"],[1,"cta-button-container"],[1,"bigvu-btn-apply",3,"click"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"course-icon-wrapper"],["alt","Icon",3,"src"],["class","ctas-container",4,"ngIf"],[1,"platform-wrapper"],["class","platform-container",3,"click",4,"ngFor","ngForOf"],[1,"whats-new-select"],[3,"click","onSelection","selectedOption","menuOptions","toggleMenuIconClass"],[1,"ctas-container"],[1,"remove-button-container"],["aria-label","Delete",3,"click"],["src","/img/edit-black.svg","alt","Edit"],["src","/img/link-icon.svg","alt","Edit"],["src","/img/delete_icon.svg","alt","Delete"],[1,"platform-container",3,"click"],[1,"checkbox-container"],[1,"checkmark",3,"hidden"],[1,"web-s-text"]],template:function(a,i){a&1&&(n(0,"div",0)(1,"header")(2,"div",1),_("click",function(){return i.backToCourses()}),p(3," < Back to List of Courses "),r(),n(4,"section",2)(5,"div",3),p(6," Title "),r(),n(7,"div",3),p(8),r(),n(9,"div",4),x(10,Zt,3,0,"div",5)(11,ei,3,0,"div",5),r()()(),n(12,"main"),x(13,si,21,1,"table",6),r()()),a&2&&(c(8),y(" ",i.lessonList==null?null:i.lessonList.length," videos "),c(2),m("ngIf",i.isSuperAdmin),c(),m("ngIf",i.isSuperAdmin&&(i.lessonList==null?null:i.lessonList.length)>0),c(2),m("ngIf",(i.lessonList==null?null:i.lessonList.length)>0))},dependencies:[B,q,k,je,$e],styles:[".admin-course-single-component[_ng
6content-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{cursor:pointer}.admin-course-single-component[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%]{font-size:16px;font-weight:800;cursor:pointer}.admin-course-single-component[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{margin-top:2rem;display:flex;flex-direction:column;align-items:flex-start;gap:12px}.admin-course-single-component[_ngcontent-%COMP%] .buttons-section[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;gap:24px}.admin-course-single-component[_ngcontent-%COMP%] .bigvu-btn-apply[_ngcontent-%COMP%]{font-weight:700}.course-icon-wrapper[_ngcontent-%COMP%]{width:120px;height:80px;border-radius:12px;overflow:hidden}.course-icon-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}.info-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:64px}.sub-title[_ngcontent-%COMP%]{font-size:24px!important;font-weight:700;color:#253658}.whats-new-select[_ngcontent-%COMP%]{width:90px}.platform-wrapper[_ngcontent-%COMP%]{display:flex;align-items:flex-start;flex-direction:column;gap:4px;min-width:86px}.platform-container[_ngcontent-%COMP%]{display:flex;align-items:center}.platform-container[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%]{cursor:pointer;width:16px;height:16px;margin:2px 8px 2px 0;border:1px solid #979797;position:relative}.platform-container[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{background-color:#12b1fe;width:12px;height:12px;position:absolute;left:0;right:0;margin:1px auto}","table[_ngcontent-%COMP%] .user-info-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center}table[_ngcontent-%COMP%] .user-info-container[_ngcontent-%COMP%] .user-img-container[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;overflow:hidden;margin-right:15px}table[_ngcontent-%COMP%] .user-info-container[_ngcontent-%COMP%] .user-img-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:center}.controls-cursor-pagination[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;margin:12px auto}header[_ngcontent-%COMP%]{margin-top:2rem;display:flex;align-items:center;justify-content:space-between}main[_ngcontent-%COMP%]{display:flex!important;align-items:baseline!important;justify-content:flex-start!important}.action-td[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:70px}.title[_ngcontent-%COMP%]{font-size:32px;font-family:Inter-ExtraBold;color:#253658}.sub-title[_ngcontent-%COMP%]{text-align:left;font-size:12px;font-family:Inter-Bold;color:#253658}table[_ngcontent-%COMP%]{width:100%;border-collapse:separate;border-spacing:0 12px;table-layout:auto}.sort-arrow[_ngcontent-%COMP%]{margin-left:4px}.sortable[_ngcontent-%COMP%]{display:inline-block}.filters[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;font-weight:700;gap:20px}.filter-wrapper[_ngcontent-%COMP%]{width:145px;height:36px;border-radius:10px;background-color:#7b8db114;font-size:12px;text-align:center;font-weight:700;color:#7b8db1;cursor:pointer}.highlighted[_ngcontent-%COMP%]{color:#0d80dc!important;cursor:pointer}.menu-wrapper[_ngcontent-%COMP%]{width:160px}.menu-wrapper[_ngcontent-%COMP%] label.search-error-msg[_ngcontent-%COMP%]{color:red;margin-top:10px} .menu-wrapper autocomplete-menu .autocomplete-menu-container{border-radius:10px;background-color:#7b8db114;padding:5px 12px;height:46px;cursor:text} .menu-wrapper autocomplete-menu .autocomplete-menu-container input{color:#253658;font-size:14px} .filter-wrapper select-menu .mat-mdc-menu-panel{width:135px!important}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-weight:500;font-size:14px;line-height:normal;letter-spacing:.22px;color:#000;padding:9px 14px;text-align:start;text-overflow:ellipsis;overflow:hidden;background-color:#7b8db108;line-break:auto}td[_ngcontent-%COMP%]:first-child{border-radius:10px 0 0 10px;-moz-border-radius:10px 0 0 10px;-webkit-border-radius:10px 0 0 10px}td[_ngcontent-%COMP%]:last-child{border-radius:0 10px 10px 0;-moz-border-radius:0 10px 10px 0;-webkit-border-radius:0 10px 10px 0}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] span[_ngcontent-%COMP%] .caret[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:middle;border-top:12px solid;border-bottom:12px solid;border-color:transparent}table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{width:100%;background-color:#fff}table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{height:61px;font-size:10px;font-weight:600;color:#25365899;text-align:start;padding:18px 15px 17px;text-transform:uppercase}@media only screen and (max-width: 1023px){table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:18px 10px 17px;font-size:11px}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:17px 16px 16px;font-size:12px}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:10px}}@media only screen and (max-width: 767px){table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:10px}.filters[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:12px}}"]})}}return t})();var En=[{path:"",component:mt,data:{title:"Admin Panel"}},{path:":courseId",component:ht,data:{title:"Admin Panel"}}];export{En as routes}; 7/**i18n:a22416d48d5d315853b2ff30dd429c3cf66bb88014970864ad6c2ff7ea890e29*/ 8 9//# debugId=cd3dad95-5da0-59ad-b60c-7283f490b944
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.