1(self.webpackChunkyesmagapp_v2=self.webpackChunkyesmagapp_v2||[]).push([[2821],{2821:(n,e,i)=>{"use strict";i.r(e),i.d(e,{TrainerPageModule:()=>j});var t=i(8583),o=i(665),c=i(2859),r=i(5503),s=i(7824),a=i(5353),l=i(6215),d=i(9112),u=i(8002),g=i(5435),h=i(3190),p=i(8049),f=i(2627),m=i(7716),b=i(4092),v=i(3065),Z=i(5260),C=i(9944),w=i(4382);let A=(()=>{class n{transform(n,...e){if(!n)return n;const i=n.indexOf("(ici");return i>0?n.substr(0,i):n}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=m.Yjl({name:"vocabulary",type:n,pure:!0}),n})();function x(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-col",17),m.TgZ(1,"ion-button",3),m.NdJ("click",function(){return m.CHM(n),m.oxw().hide("english")}),m._uU(2,"Cacher"),m.qZA(),m.qZA()}}function O(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-col",17),m.TgZ(1,"ion-button",3),m.NdJ("click",function(){return m.CHM(n),m.oxw().showAll()}),m._uU(2,"Afficher"),m.qZA(),m.qZA()}}function M(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-col",18),m.TgZ(1,"ion-button",3),m.NdJ("click",function(){return m.CHM(n),m.oxw().hide("french")}),m._uU(2,"Cacher"),m.qZA(),m.qZA()}}function _(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-col",18),m.TgZ(1,"ion-button",3),m.NdJ("click",function(){return m.CHM(n),m.oxw().showAll()}),m._uU(2,"Afficher"),m.qZA(),m.qZA()}}function q(n,e){1&n&&(m.TgZ(0,"ion-item"),m.TgZ(1,"p"),m._uU(2,'Pour remplir votre carnet de vocabulaire, vous aurez \xe0 cliquer sur les mots propos\xe9s dans les bulles bleues. Vous pourrez ensuite faire passer votre vocabulaire "en cours" dans le vocabulaire "m\xe9moris\xe9"'),m.qZA(),m.qZA())}function T(n,e){1&n&&(m.TgZ(0,"ion-item"),m.TgZ(1,"p"),m._uU(2,'Une fois votre vocabulaire m\xe9moris\xe9, pour le faire passer dans "Mon vocabulaire m\xe9moris\xe9" cliquez sur le pictogramme "M\xe9moris\xe9" \xe0 partir de "Mon vocabulaire en cours"'),m.qZA(),m.qZA())}function y(n,e){if(1&n&&(m.TgZ(0,"span"),m._uU(1),m.qZA()),2&n){const n=m.oxw().$implicit;m.xp6(1),m.Oqu(n.english)}}function P(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-note",25),m.NdJ("click",function(){m.CHM(n);const e=m.oxw().$implicit;return m.oxw().wordVisible(e,"english")}),m._uU(1,"Cliquer pour devoiler"),m.qZA()}}function L(n,e){if(1&n&&(m.TgZ(0,"span"),m._uU(1),m.ALo(2,"vocabulary"),m.qZA()),2&n){const n=m.oxw().$implicit;m.xp6(1),m.Oqu(m.lcZ(2,1,n.french))}}function J(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-note",25),m.NdJ("click",function(){m.CHM(n);const e=m.oxw().$implicit;return m.oxw().wordVisible(e,"french")}),m._uU(1,"Cliquer pour devoiler"),m.qZA()}}function N(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-icon",26),m.NdJ("click",function(){m.CHM(n);const e=m.oxw().$implicit;return m.oxw().memorize(e)}),m.qZA()}}function k(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-icon",27),m.NdJ("click",function(){m.CHM(n);const e=m.oxw().$implicit;return m.oxw().unMemorize(e)}),m.qZA()}}function $(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-icon",26),m.NdJ("click",function(){m.CHM(n);const e=m.oxw().$implicit;return m.oxw().archive(e)}),m.qZA()}}function U(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-icon",27),m.NdJ("click",function(){m.CHM(n);const e=m.oxw().$implicit;return m.oxw().unArchive(e)}),m.qZA()}}function z(n,e){if(1&n){const n=m.EpF();m.TgZ(0,"ion-icon",28),m.NdJ("click",function(){m.CHM(n);const e=m.oxw().$implicit;return m.oxw().delete(e)}),m.qZA()}}function Y(n,e){if(1&n&&(m.TgZ(0,"ion-row"),m.TgZ(1,"ion-col",19),m.YNc(2,y,2,1,"span",13),m.YNc(3,P,2,0,"ion-note",20),m.qZA(),m.TgZ(4,"ion-col",18),m.YNc(5,L,3,3,"span",13),m.YNc(6,J,2,0,"ion-note",20),m.qZA(),m.TgZ(7,"ion-col",21),m.YNc(8,N,1,0,"ion-icon",22),m.ALo(9,"async"),m.YNc(10,k,1,0,"ion-icon",23),m.ALo(11,"async"),m.YNc(12,$,1,0,"ion-icon",22),m.ALo(13,"async"),m.YNc(14,U,1,0,"ion-icon",23),m.ALo(15,"async"),m.YNc(16,z,1,0,"ion-icon",24),m.ALo(17,"async"),m.qZA(),m.qZA()),2&n){const n=e.$implicit,i=m.oxw();m.xp6(2),m.Q6J("ngIf","english"!==i.hidden||"english"===n.visible),m.xp6(1),m.Q6J("ngIf","english"===i.hidden&&!n.visible),m.xp6(2),m.Q6J("ngIf","french"!==i.hidden||"french"===n.visible),m.xp6(1),m.Q6J("ngIf","french"===i.hidden&&!n.visible),m.xp6(2),m.Q6J("ngIf","standard"===m.lcZ(9,9,i.activeList$)),m.xp6(2),m.Q6J("ngIf","memorized"===m.lcZ(11,11,i.activeList$)),m.xp6(2),m.Q6J("ngIf","memorized"===m.lcZ(13,13,i.activeList$)),m.xp6(2),m.Q6J("ngIf","archived"===m.lcZ(1
15,15,i.activeList$)),m.xp6(2),m.Q6J("ngIf","archived"===m.lcZ(17,17,i.activeList$))}}const I=[{path:"",component:(()=>{class n{constructor(n,e,i,t,o,c,r,s,a){this.userContent=n,this.store=e,this.alertCtrl=i,this.toastCtrl=t,this.analytics=o,this.popoverCtrl=c,this.account=r,this.router=s,this.dbService=a,this.vocabulary=[],this.hidden="",this.order$=new l.X("date"),this.order="date",this.filter="",this.filter$=new l.X(""),this.activeListSubject$=new l.X("standard"),this.activeList$=this.activeListSubject$.asObservable(),this.activeList="standard",this.vocabulary$=this.userContent.vocabulary$().pipe((0,u.U)(n=>{const e=[];for(const i in n)e.push(n[i]);return e})),this.subscription=(0,d.aj)(this.vocabulary$,this.order$,this.activeList$,this.filter$).pipe((0,u.U)(n=>{const[e,i,t,o]=n;return{words:e,order:i,activeList:t,filter:o}}),(0,u.U)(n=>Object.assign(Object.assign({},n),{words:n.words.filter(e=>this.isWordVisible(e,n.activeList))})),(0,u.U)(n=>""===n.filter?n:Object.assign(Object.assign({},n),{words:n.words.filter(e=>n.filter===e.type)})),(0,u.U)(n=>("alphabetic"===n.order?n.words=n.words.sort((n,e)=>n.english.toLocaleLowerCase().trim().localeCompare(e.english.toLocaleLowerCase().trim())):"date"===n.order&&(n.words=n.words.sort((n,e)=>n.added<e.added?1:-1)),n))).subscribe(n=>{this.vocabulary=n.words}),this.checkForNotLogged()}checkForNotLogged(){this.dbService.dbLoaded.pipe((0,g.h)(n=>n),(0,h.w)(()=>this.account.isLoggedIn$()),(0,p.P)()).subscribe(n=>(0,a.mG)(this,void 0,void 0,function*(){n||(yield this.alertCtrl.create({message:"Pour sauvegarder le contenu de votre carnet de vocabulaire, vous devez \xeatre connect\xe9(e)",buttons:[{text:"Fermer",handler:n=>{console.log("Cancel clicked")}},{text:"SE CONNECTER",handler:n=>{this.router.navigateByUrl("/login")}},{text:"CREER UN COMPTE",handler:n=>{this.router.navigateByUrl("/create-account")}}]})).present()}))}hide(n){this.hidden=n,this.deleteWordVisible(this.vocabulary)}showAll(){this.hidden="",this.vocabulary=this.deleteWordVisible(this.vocabulary)}deleteWordVisible(n){return n.map(n=>Object.assign(Object.assign({},n),{visible:""}))}wordVisible(n,e){n.visible===e&&(n=Object.assign(Object.assign({},n),{visible:""})),n=Object.assign(Object.assign({},n),{visible:e}),this.vocabulary=this.vocabulary.map(e=>n.english===e.english?n:e)}orderChanged(n){this.order$.next(n.value)}isWordVisible(n,e){return!("standard"!==e||n.archived||n.memorized||n.deleted)||!("memorized"!==e||n.archived||!n.memorized||n.deleted)||!("archived"!==e||!n.archived||n.memorized||n.deleted)}showActiveList(n){this.activeListSubject$.next(n)}archive(n){this.store.dispatch((0,f.iO)(n))}memorize(n){this.store.dispatch((0,f.cb)(n)),this.vocabulary$.pipe((0,u.U)(n=>n.filter(n=>n.memorized||n.archived||n.deleted)),(0,p.P)()).subscribe(n=>{this.showLearnedWords(n.length)})}unArchive(n){this.store.dispatch((0,f.cb)(n))}unMemorize(n){this.store.dispatch((0,f.m8)(n))}delete(n){this.store.dispatch((0,f.x8)(n))}showAddWord(){return(0,a.mG)(this,void 0,void 0,function*(){(yield this.alertCtrl.create({header:"Ajouter un mot manuellement",inputs:[{name:"english",placeholder:"Anglais"},{name:"french",placeholder:"Fran\xe7ais"}],buttons:[{text:"Fermer",handler:n=>{console.log("Cancel clicked")}},{text:"Ajouter",handler:n=>{console.log("Saved clicked",n);const e=Object.assign(Object.assign({},n),{added:new Date});if(!e.english||!e.french)return this.missinFieldsPrompt(),!1;this.store.dispatch((0,f.ge)(e))}}]})).present()})}missinFieldsPrompt(){return(0,a.mG)(this,void 0,void 0,function*(){(yield this.alertCtrl.create({message:"Merci de remplir les deux champs de texte.",buttons:[{text:"Ok",handler:n=>{console.log("Cancel clicked")}}]})).present()})}openHelp(){this.router.navigateByUrl("/help/trainer")}showLearnedWords(n){return(0,a.mG)(this,void 0,void 0,function*(){(yield this.toastCtrl.create({message:`Vous avez appris ${n} nouveaux mots !`,duration:4e3})).present()})}ionViewWillEnter(){this.analytics.trackView("trainer")}ionViewDidLeave(){this.subscription&&this.subscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(m.Y36(b.s),m.Y36(v.yh),m.Y36(c.Br),m.Y36(c.yF),m.Y36(Z.y),m.Y36(c.Dh),m.Y36(C.B),m.Y36(s.F0),m.Y36(w.k))},n.\u0275cmp=m.Xpm({type:n,selectors:[["app-trainer"]],decls:37,vars:13,consts:[["color","primary"],["slot","start"],["slot","end"],["fill","outline",3,"click"],["name","add-outline"],["name","help-circle-outline",1,"help-icon"],[3,"ngModel","ngModelChange","ionChange"],["value","standard"],["value","memorized"],["value","archived"],[1,"visibilitybuttons"],["size","4",4,"ngIf"],["size","7",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["value","date"],["value","alphabetic"],["size","4"],["size","7"],["size","4",1,"english"],[3,"click",4,"ngIf"],["size","1"],["name","checkbox-outline",3,"click",4,"ngIf"],["name","arrow-undo-outline",3,"click",4,"ngIf"],["name","trash",3,"click",4,"ngIf"],[3,"click"],["name","checkbox-outline",3,"click"],["name","arrow-undo-outline",3,"click"],["name","trash",3,"click"]],template:function(n,e){1&n&&(m.TgZ(0,"ion-header"),m.TgZ(1,"ion-toolbar",0),m.TgZ(2,"ion-buttons",1),m._UZ(3,"ion-menu-button"),m.qZA(),m.TgZ(4,"ion-buttons",2),m.TgZ(5,"ion-button",3),m.NdJ("click",function(){return e.showAddWord()}),m._UZ(6,"ion-icon",4),m.qZA(),m.TgZ(7,"ion-button",3),m.NdJ("click",function(){return e.openHelp()}),m._UZ(8,"ion-icon",5),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.TgZ(9,"ion-content"),m.TgZ(10,"ion-toolbar"),m.TgZ(11,"ion-row"),m.TgZ(12,"ion-segment",6),m.NdJ("ngModelChange",function(n){return e.activeList=n})("ionChange",function(){return e.showActiveList(e.activeList)}),m.TgZ(13,"ion-segment-button",7),m._uU(14," en cours "),m.qZA(),m.TgZ(15,"ion-segment-button",8),m._uU(16," m\xe9moris\xe9 "),m.qZA(),m.TgZ(17,"ion-segment-button",9),m._uU(18," archiv\xe9 "),m.qZA(),m.qZA(),m.qZA(),m.TgZ(19,"ion-row",10),m.YNc(20,x,3,0,"ion-col",11),m.YNc(21,O,3,0,"ion-col",11),m.YNc(22,M,3,0,"ion-col",12),m.YNc(23,_,3,0,"ion-col",12),m.qZA(),m.qZA(),m.TgZ(24,"ion-list"),m.YNc(25,q,3,0,"ion-item",13),m.ALo(26,"async"),m.YNc(27,T,3,0,"ion-item",13),m.ALo(28,"async"),m.TgZ(29,"ion-grid"),m.YNc(30,Y,18,19,"ion-row",14),m.qZA(),m.qZA(),m.qZA(),m.TgZ(31,"ion-footer"),m.TgZ(32,"ion-segment",6),m.NdJ("ngModelChange",function(n){return e.order=n})("ionChange",function(n){return e.orderChanged(n)}),m.TgZ(33,"ion-segment-button",15),m._uU(34," Classement par date "),m.qZA(),m.TgZ(35,"i
1on-segment-button",16),m._uU(36," Ordre alphab\xe9tique "),m.qZA(),m.qZA(),m.qZA()),2&n&&(m.xp6(12),m.Q6J("ngModel",e.activeList),m.xp6(8),m.Q6J("ngIf","english"!==e.hidden),m.xp6(1),m.Q6J("ngIf","english"===e.hidden),m.xp6(1),m.Q6J("ngIf","french"!==e.hidden),m.xp6(1),m.Q6J("ngIf","french"===e.hidden),m.xp6(2),m.Q6J("ngIf",0===e.vocabulary.length&&"standard"===m.lcZ(26,9,e.activeList$)),m.xp6(2),m.Q6J("ngIf",0===e.vocabulary.length&&"memorized"===m.lcZ(28,11,e.activeList$)),m.xp6(3),m.Q6J("ngForOf",e.vocabulary),m.xp6(2),m.Q6J("ngModel",e.order))},directives:[c.Gu,c.sr,c.Sm,c.fG,c.YG,c.gu,c.W2,c.Nd,c.cJ,c.QI,o.JJ,o.On,c.GO,t.O5,c.q_,c.jY,t.sg,c.fr,c.wI,c.Ie,c.uN],pipes:[t.Ov,A],styles:["ion-note.note-ios[_ngcontent-%COMP%], ion-note.note-md[_ngcontent-%COMP%]{color:#989898;font-size:1.2rem}ion-col[_ngcontent-%COMP%], ion-item[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{white-space:normal}.label-ios[_ngcontent-%COMP%], .label-md[_ngcontent-%COMP%]{margin:5px 0}ion-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{padding:0}ion-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{line-height:0}ion-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%] .button-ios[_ngcontent-%COMP%], ion-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%] .button-md[_ngcontent-%COMP%]{height:2.6rem;margin:0}.content[_ngcontent-%COMP%] .fixed-content[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%]{padding-left:0}.content[_ngcontent-%COMP%] .fixed-content[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .item-inner[_ngcontent-%COMP%]{padding-right:0;border-bottom:none}.content[_ngcontent-%COMP%] .fixed-content[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%]{margin:0}.content[_ngcontent-%COMP%] .fixed-content[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .visibilitybuttons[_ngcontent-%COMP%]{padding:8px 0 4px 16px}ion-icon[_ngcontent-%COMP%]{padding:5px}"]}),n})()}];let F=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=m.oAB({type:n}),n.\u0275inj=m.cJS({imports:[[s.Bz.forChild(I)],s.Bz]}),n})(),j=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=m.oAB({type:n}),n.\u0275inj=m.cJS({imports:[[t.ez,o.u5,c.Pc,F,r.D]]}),n})()}}]);
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.