1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[7417],{43839:(U,O,r)=>{r.d(O,{I:()=>M});var x=r(97582),e=r(5e3),P=r(54849);let f=(()=>{class h{constructor(l){this.connectSvc=l}favourite(l,w){return(0,x.mG)(this,void 0,void 0,function*(){try{return yield this.connectSvc.create("favourites",{favouritable_id:w,favouritable_type:l},!0)}catch(y){return this.connectSvc.handleError(y),null}})}removeFavourite(l){return(0,x.mG)(this,void 0,void 0,function*(){try{return yield this.connectSvc.delete(`favourites/${l}`,!0),!1}catch(w){return this.connectSvc.handleError(w),!0}})}}return h.\u0275fac=function(l){return new(l||h)(e.LFG(P.F))},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})();var m=r(69808),c=r(90603);function _(h,v){if(1&h){const l=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(y){return e.CHM(l),e.oxw().action(y)}),e._UZ(1,"ion-icon",3),e.qZA()}if(2&h){const l=e.oxw();e.Q6J("disabled",l.loading),e.xp6(1),e.Q6J("name",l.favourite?"heart":"heart-outline")}}function d(h,v){if(1&h){const l=e.EpF();e.TgZ(0,"ion-button",4),e.NdJ("click",function(y){return e.CHM(l),e.oxw().action(y)}
1),e._UZ(1,"ion-icon",3),e.qZA()}if(2&h){const l=e.oxw();e.Q6J("disabled",l.loading),e.xp6(1),e.Q6J("name",l.favourite?"heart":"heart-outline")}}let M=(()=>{class h{constructor(l){this.favouriteSvc=l,this.favouriteChanged=new e.vpe,this.loading=!1}action(l){return(0,x.mG)(this,void 0,void 0,function*(){if(l.stopPropagation(),this.loading=!0,this.favourite)this.favourite=yield this.favouriteSvc.removeFavourite(this.favouriteId),this.favouriteChange({is_favourite:!1,id:this.id});else{const w=yield this.favouriteSvc.favourite(this.type,this.id);w&&w.id&&(this.favourite=!0,this.favouriteId=w.id,this.favouriteChange({is_favourite:!0,favourite:w,id:this.id}))}this.loading=!1})}favouriteChange(l){this.favouriteChanged.emit(l)}}return h.\u0275fac=function(l){return new(l||h)(e.Y36(f))},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-favourite"]],inputs:{alternate:"alternate",favourite:"favourite",type:"type",id:"id",favouriteId:"favouriteId"},outputs:{favouriteChanged:"favouriteChanged"},decls:2,vars:2,consts:[["type","button","class","button button_icon button-right",3,"disabled","click",4,"ngIf"],["fill","clear",3,"disabled","click",4,"ngIf"],["type","button",1,"button","button_icon","button-right",3,"disabled","click"],[3,"name"],["fill","clear",3,"disabled","click"]],template:function(l,w){1&l&&(e.YNc(0,_,2,2,"button",0),e.YNc(1,d,2,2,"ion-button",1)),2&l&&(e.Q6J("ngIf",!w.alternate),e.xp6(1),e.Q6J("ngIf",w.alternate))},directives:[m.O5,c.gu,c.YG],styles:["[_nghost-%COMP%] button[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:24px;color:var(--color-dark-green)}ion-button[_ngcontent-%COMP%]{width:48px;height:48px;margin:0;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-100);border-radius:9px;--padding-start: 0;--padding-end: 0}ion-button[disabled][_ngcontent-%COMP%], ion-button.button-disabled[_ngcontent-%COMP%]{opacity:.8}ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:24px}"]}),h})()},4794:(U,O,r)=>{r.d(O,{P:()=>f});var x=r(77579),e=r(5e3),P=r(90603);let f=(()=>{class m{constructor(){this.changeDone$=new x.x}}return m.\u0275fac=function(_){return new(_||m)},m.\u0275cmp=e.Xpm({type:m,selectors:[["app-mark-as-done-button"]],inputs:{isDone:"isDone"},outputs:{changeDone$:"changeDone$"},decls:4,vars:8,consts:[["size","small","color","secondary","id","done-button",3,"click"],["name","checkmark-sharp",3,"color"],[1,"mark-done-button-text"]],template:function(_,d){1&_&&(e.TgZ(0,"ion-button",0),e.NdJ("click",function(){return d.changeDone$.next(!d.isDone)}
1),e._UZ(1,"ion-icon",1),e.TgZ(2,"span",2),e._uU(3),e.qZA()()),2&_&&(e.Tol(d.isDone?"mark-done-button":"mark-as-done-button"),e.xp6(1),e.Tol(d.isDone?"done-icon":"mark-as-done-icon"),e.Q6J("color",d.isDone?"light":"tertiary"),e.xp6(1),e.ekj("done",d.isDone),e.xp6(1),e.Oqu(d.isDone?"Done":"Mark as done"))},directives:[P.YG,P.gu],styles:["[_nghost-%COMP%]{height:28px;display:flex}[_nghost-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:18px}[_nghost-%COMP%] ion-button[_ngcontent-%COMP%]{height:27px;padding-left:unset;padding-right:unset;--padding-start: 11px;--padding-end: 11px;background-color:var(--ion-color-secondary)}[_nghost-%COMP%] .mark-done-button[_ngcontent-%COMP%]{margin:0;pointer-events:none;text-transform:none;text-transform:initial;--border-style: solid;--border-color: var(--color-gray-400);--border-width: .1px;--box-shadow: none}[_nghost-%COMP%] .mark-as-done-button[_ngcontent-%COMP%]{margin:0;text-transform:none;text-transform:initial;--border-style: solid;--border-color: var(--color-gray-400);--border-width: .1px;--box-shadow: none}[_nghost-%COMP%] .mark-as-done-icon[_ngcontent-%COMP%]{margin-left:-11px;padding:4px;border-radius:5px 0 0 5px;background-color:var(--color-white)}[_nghost-%COMP%] .done-icon[_ngcontent-%COMP%]{margin-left:-14px;margin-top:-10px;margin-bottom:-10px;padding:5px;border-radius:5px 0 0 5px;background-color:var(--color-dark-green)}[_nghost-%COMP%] .mark-done-button-text[_ngcontent-%COMP%]:not(.done){font-size:13px;font-weight:600;margin-left:10px;letter-spacing:.78px;color:var(--color-dark-green)}[_nghost-%COMP%] .mark-done-button-text.done[_ngcontent-%COMP%]{font-size:13px;font-weight:600;margin-left:10px;letter-spacing:.78px;color:var(--color-black)}"]}),m})()},7417:(U,O,r)=>{r.d(O,{R:()=>he});var x=r(97582),e=r(5e3),P=r(15439),f=r(26997),m=r(69808),c=r(90603),_=r(85399),d=r(25730),M=r(82933),h=r(43839),v=r(89931),l=r(2693),w=r(57719),y=r(9145),A=r(4794),R=r(17951),N=r(53338),F=r(49695),Z=r(52382),Y=r(54849);function Q(i,s){if(1&i&&(e.TgZ(0,"div",12),e._UZ(1,"img",13),e.TgZ(2,"span"),e._uU(3,"Calories"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&i){const t=e.oxw();e.xp6(5),e.Oqu(t.exploreRecipe.calories)}}function z(i,s){if(1&i&&(e.TgZ(0,"div",12),e._UZ(1,"img",14),e.TgZ(2,"span"),e._uU(3,"Carbohydrate"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&i){const t=e.oxw();e.xp6(5),e.hij("",t.exploreRecipe.carbs,"g")}}function H(i,s){if(1&i&&(e.TgZ(0,"div",12),e._UZ(1,"img",15),e.TgZ(2,"span"),e._uU(3,"Fibre"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&i){const t=e.oxw();e.xp6(5),e.hij("",t.exploreRecipe.fibre,"g")}}function L(i,s){if(1&i&&(e.TgZ(0,"div",12),e._UZ(1,"img",16),e.TgZ(2,"span"),e._uU(3,"Protein"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&i){const t=e.oxw();e.xp6(5),e.hij("",t.exploreRecipe.protein,"g")}}function G(i,s){if(1&i&&(e.TgZ(0,"div",12),e._UZ(1,"img",17),e.TgZ(2,"span"),e._uU(3,"Fat"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&i){const t=e.oxw();e.xp6(5),e.hij("",t.exploreRecipe.fat,"g")}}function j(i,s){if(1&i&&(e.TgZ(0,"span",20),e._uU(1),e.qZA()),2&i){const t=s.$implicit;e.xp6(1),e.Oqu(t.tag)}}function B(i,s){if(1&i&&(e.TgZ(0,"div",18),e.YNc(1,j,2,1,"span",19),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.tags)}}const W=["Restrictions","Suitable for"];let $=(()=>{class i{constructor(t,n){this.mealsSvc=t,this.connectSvc=n,this.units=f.nL.Metric,this.mealSwapped=new e.vpe,this.favouriteChanged=new e.vpe,this.viewRecipe=new e.vpe,this.showPopup=!1}get tags(){return this.exploreRecipe.tags.filter(t=>t.tag_group&&W.includes(t.tag_group))}swapMeal(){return(0,x.mG)(this,void 0,void 0,function*(){try{yield this.mealsSvc.swapMeal(this.mealId,this.exploreRecipe.id),this.mealSwapped.emit()}catch(t){this.connectSvc.handleError(t)}})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(_.T),e.Y36(Y.F))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-suggested-recipe"]],inputs:{mealId:"mealId",mealServings:"mealServings",exploreRecipe:"exploreRecipe",units:"units"},outputs:{mealSwapped:"mealSwapped",favouriteChanged:"favouriteChanged",viewRecipe:"viewRecipe"},decls:21,vars:8,consts:[[1,"suggested-recipe"],[1,"suggested-recipe__figure"],["alt","",3,"src"],[1,"suggested-recipe__details"],[1,"suggested-recipe__title"],[1,"suggested-recipe__meta"],["class","suggested-recipe__meta-item",4,"ngIf"],["class","suggested-recipe__tags",4,"ngIf"],[1,"d-flex","gap-1"],["size","small","color","secondary",1,"suggested-recipe__button","swap-meal",3,"click"],["src","assets/images/icons/swap.svg","alt",""],["size","small","color","secondary",1,"suggested-recipe__button","view-meal",3,"click"],[1,"suggested-recipe__meta-item"],["src","assets/images/icons/calories.svg","alt",""],["src","assets/images/icons/carbohydrate.svg","alt",""],["src","assets/images/icons/fibre.svg","alt",""],["src","assets/images/icons/protein.svg","alt",""],["src","assets/images/icons/fat.svg","alt",""],[1,"suggested-recipe__tags"],["class","suggested-recipe__tag-item",4,"ngFor","ngForOf"],[1,"suggested-recipe__tag-item"]],template:function(t,n){1&t&&(e.TgZ(0,"li",0)(1,"figure",1),e._UZ(2,"img",2),e.qZA(),e.TgZ(3,"div",3)(4,"strong",4),e._uU(5),e.qZA(),e.TgZ(6,"div",5),e.YNc(7,Q,6,1,"div",6),e.YNc(8,z,6,1,"div",6),e.YNc(9,H,6,1,"div",6),e.YNc(10,L,6,1,"div",6),e.YNc(11,G,6,1,"div",6),e.qZA(),e.YNc(12,B,2,1,"div",7),e.TgZ(13,"div",8)(14,"ion-button",9),e.NdJ("click",function(){return n.swapMeal()}),e._UZ(15,"img",10),e.TgZ(16,"span"),e._uU(17,"Swap"),e.qZA()(),e.TgZ(18,"ion-button",11),e.NdJ("click",function(){return n.viewRecipe.emit(n.exploreRecipe)}
1),e.TgZ(19,"span"),e._uU(20,"View Recipe"),e.qZA()()()()()),2&t&&(e.xp6(2),e.Q6J("src",n.exploreRecipe.thumbnail_image_url,e.LSH),e.xp6(3),e.Oqu(n.exploreRecipe.name),e.xp6(2),e.Q6J("ngIf",n.exploreRecipe.calories),e.xp6(1),e.Q6J("ngIf",n.exploreRecipe.carbs),e.xp6(1),e.Q6J("ngIf",n.exploreRecipe.fibre),e.xp6(1),e.Q6J("ngIf",n.exploreRecipe.protein),e.xp6(1),e.Q6J("ngIf",n.exploreRecipe.fat),e.xp6(1),e.Q6J("ngIf",n.tags.length))},directives:[m.O5,m.sg,c.YG],styles:[".suggested-recipe[_ngcontent-%COMP%]{display:flex;align-items:center;gap:24px}@media only screen and (max-width: 767px){.suggested-recipe[_ngcontent-%COMP%]{flex-direction:column;gap:8px}}.suggested-recipe__figure[_ngcontent-%COMP%]{flex:none;width:224px;height:203px;overflow:hidden}@media only screen and (max-width: 767px){.suggested-recipe__figure[_ngcontent-%COMP%]{width:100%;height:200px}}.suggested-recipe__figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:10px;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.suggested-recipe__details[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}@media only screen and (max-width: 767px){.suggested-recipe__details[_ngcontent-%COMP%]{width:100%}}.suggested-recipe__title[_ngcontent-%COMP%]{font-size:20px;font-style:normal;font-weight:600;line-height:150%;color:var(--color-dark)}.suggested-recipe__meta[_ngcontent-%COMP%]{margin-top:8px;display:grid;grid-row-gap:6px;row-gap:6px;grid-column-gap:80px;-moz-column-gap:80px;column-gap:80px;grid-template-columns:1fr 1fr}@media only screen and (max-width: 767px){.suggested-recipe__meta[_ngcontent-%COMP%]{row-gap:4px;grid-template-columns:1fr}}.suggested-recipe__meta-item[_ngcontent-%COMP%]{display:flex;align-items:center}.suggested-recipe__meta-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{flex:none;width:18px;height:18px;margin-right:8px}.suggested-recipe__meta-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .suggested-recipe__meta-item[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-gray-700)}.suggested-recipe__meta-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:16px;font-weight:400;line-height:150%}.suggested-recipe__meta-item[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:150%}.suggested-recipe__tags[_ngcontent-%COMP%]{margin-top:16px;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.suggested-recipe__tag-item[_ngcontent-%COMP%]{height:21px;display:flex;align-items:center;padding:0 8px;border-radius:11px;background:var(--color-light-green);text-align:center;font-size:13px;font-weight:400;line-height:160%;letter-spacing:.4px;color:var(--color-dark)}.suggested-recipe__button[_ngcontent-%COMP%]{align-self:flex-start;margin:16px 0 0;text-transform:none;transition:none;--border-style: solid;--border-color: #e5e5e5;--border-width: .1px;--box-shadow: none;--padding-start: 0px;--padding-end: 0px;--background: var(--color-gray-100)}.suggested-recipe__button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;padding:6px;border-radius:0;background-color:var(--color-white)}.suggested-recipe__button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 10px;color:var(--color-dark-green)}"]}),i})();var K=r(98868);function X(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",36),e.NdJ("click",function(){const g=e.CHM(t).$implicit;return e.oxw(4).selectTag(g)}),e._uU(1),e.qZA()}if(2&i){const t=s.$implicit;e.ekj("active",t.selected),e.xp6(1),e.hij(" ",t.name," ")}}function V(i,s){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.TgZ(2,"div",34),e.YNc(3,X,2,3,"div",35),e.qZA()()),2&i){const t=s.$implicit;e.xp6(1),e.hij(" ",t.name," "),e.xp6(2),e.Q6J("ngForOf",t.tags)}}function ee(i,s){if(1&i&&(e.TgZ(0,"div",32),e.YNc(1,V,4,2,"div",33),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.tagsSvc.tagGroups)}}function ne(i,s){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",24)(2,"form",25)(3,"button",26),e.NdJ("click",function(){return e.CHM(t),e.oxw().getData(!0)}),e._UZ(4,"img",27),e.qZA(),e.TgZ(5,"input",28),e.NdJ("ngModelChange",function(a){return e.CHM(t),e.oxw().query=a})("keydown.enter",function(){return e.CHM(t),e.oxw().getData(!0)}),e.qZA()(),e.TgZ(6,"div",29),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return a.expanded=!a.expanded}
1),e.TgZ(7,"span"),e._uU(8,"Show filters"),e.qZA(),e._UZ(9,"img",30),e.qZA()(),e.YNc(10,ee,2,1,"div",31),e.BQk()}if(2&i){const t=e.oxw();e.xp6(5),e.Q6J("ngModel",t.query),e.xp6(4),e.ekj("reverse",t.expanded),e.xp6(1),e.Q6J("ngIf",t.expanded)}}function te(i,s){if(1&i&&(e.TgZ(0,"div",37)(1,"span"),e._uU(2),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.AsE("YOUR ",t.recipes.length," FAVOURITE RECIPE",t.recipes.length>1?"S":"","")}}function oe(i,s){if(1&i&&(e.TgZ(0,"div",37)(1,"span"),e._uU(2),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.AsE("",t.recipes.length," SEARCH RECIPE",t.recipes.length>1?"S":"","")}}function ie(i,s){if(1&i&&(e.TgZ(0,"div",37)(1,"span"),e._uU(2),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.AsE("",t.recipes.length," SUGGESTED RECIPE",t.recipes.length>1?"S":"","")}}function q(i,s){if(1&i&&(e.TgZ(0,"div",37)(1,"span"),e._uU(2),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.AsE("",t.recipes.length," SHAKES RECIPE",t.recipes.length>1?"S":"","")}}function ae(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"app-suggested-recipe",41),e.NdJ("mealSwapped",function(){return e.CHM(t),e.oxw(2).swapMeal()})("viewRecipe",function(a){return e.CHM(t),e.oxw(2).viewRecipe.emit(a)}),e.qZA()}if(2&i){const t=s.$implicit,n=e.oxw(2);e.Q6J("exploreRecipe",t)("mealId",n.mealId)("mealServings",n.mealServings)("units",n.units)}}function p(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"ion-button",42),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).loadMore()}),e._uU(1,"Load More"),e.qZA()}}function C(i,s){if(1&i&&(e.TgZ(0,"section",38)(1,"ul"),e.YNc(2,ae,1,4,"app-suggested-recipe",39),e.qZA(),e.YNc(3,p,2,0,"ion-button",40),e.qZA()),2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngForOf",t.recipes),e.xp6(1),e.Q6J("ngIf",!t.loading&&(null==t.pagination?null:t.pagination.next_page))}}function o(i,s){1&i&&e._UZ(0,"app-loader",43),2&i&&e.Q6J("block",!0)}let u=(()=>{class i{constructor(t,n,a){this.tagsSvc=t,this.recipesSvc=n,this.firebaseAnalyticsSvc=a,this.loading=!1,this.query=null,this.mode="suggested",this.mealSwapped=new e.vpe,this.closeEventEmitter=new e.vpe,this.viewRecipe=new e.vpe,this.units=f.nL.Metric,this.expanded=!1}get recipeId(){return this.mealRecipe.id}ngOnInit(){this.tagsSvc.getTags(),this.getData()}changeMode(t){this.mode!==t&&(this.expanded=("favourites"===this.mode&&"search"===t||"search"===this.mode&&"favourites"===t)&&this.expanded,this.mode=t,this.getData(),this.pagination=(0,R.sh)())}dismiss(){this.closeEventEmitter.emit()}getData(t=!1){var n;return(0,x.mG)(this,void 0,void 0,function*(){switch(this.recipes=[],this.loading=!0,this.mode){case"suggested":yield this.recipesSvc.getSuggestedRecipes(this.recipeId),this.recipes=this.recipesSvc.suggestedRecipes;break;case"shakes":yield this.recipesSvc.getShakeRecipes(),this.recipes=this.recipesSvc.shakeRecipes;break;case"search":case"favourites":if(yield this.recipesSvc.getRecipes(this.query,this.tagsSvc.getSelectedTags(),"favourites"===this.mode),this.recipes=this.recipesSvc.recipes,this.query||this.tagsSvc.getSelectedTags().length>0){let a=(null===(n=this.tagsSvc.tagGroups)||void 0===n?void 0:n.map(J=>J.tags.filter(ve=>ve.selected)))||[];a=a.flat();const g=[...new Set(a.map(J=>J.groupName))],T=[...new Set(a.map(J=>J.name))],fe={search_term:this.query,search_filter_groups:g.join(","),search_filter_tags:T.join(",")};this.firebaseAnalyticsSvc.logEvent("swap_search",fe),t&&(this.expanded=!1)}}this.loading=!1,this.pagination=this.recipesSvc.pagination})}selectTag(t){var n,a;t.selected=!t.selected,t.groupName=(null===(a=null===(n=this.tagsSvc.tagGroups)||void 0===n?void 0:n.find(g=>g.tags.map(T=>T.id).includes(t.id)))||void 0===a?void 0:a.name)||"",this.getData()}loadMore(){return(0,x.mG)(this,void 0,void 0,function*(){switch(this.loading=!0,this.mode){case"suggested":yield this.recipesSvc.getMoreSuggestedRecipes(this.recipeId,{page:this.pagination.next_page}),this.recipes=this.recipesSvc.suggestedRecipes;break;case"shakes":yield this.recipesSvc.getMoreShakesRecipes({page:this.pagination.next_page}),this.recipes=this.recipesSvc.shakeRecipes;break;case"favourites":case"search":yield this.recipesSvc.getMoreRecipes(this.query,this.tagsSvc.getSelectedTags(),"favourites"===this.mode,this.pagination.next_page),this.recipes=this.recipesSvc.recipes}this.pagination=this.recipesSvc.pagination,this.loading=!1})}swapMeal(){this.mealSwapped.emit()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(N.i),e.Y36(F.v),e.Y36(w.B))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-swap-meal-popup"]],inputs:{mealId:"mealId",mealRecipe:"mealRecipe",mealServings:"mealServings",units:"units"},outputs:{mealSwapped:"mealSwapped",closeEventEmitter:"closeEventEmitter",viewRecipe:"viewRecipe"},decls:34,vars:49,consts:[[1,"popup","popup-wider","popup-new"],[1,"popup__wrapper","popup__wrapper-new"],[1,"popup__header-wrapper","ion-no-border"],[1,"popup__header-inner"],["type","button",1,"button","button_icon","popup__header-close",3,"click"],["src","assets/images/icons/cross.svg","alt",""],[1,"popup__content-wrapper"],[1,"popup__article","popup__article-new"],[1,"popup__outer","popup__outer-new"],[1,"swap-meal__current-meal"],[1,"swap-meal__current-meal__figure"],["alt","",3,"src"],[1,"swap-meal__current-meal__details"],[1,"swap-meal__current-meal__details__label"],[1,"swap-meal__current-meal__details__title"],[1,"swap-meal__segments"],["type","button","id","suggested-segment",1,"button","button_medium","button_rounded","button_outline",3,"click"],["type","button","id","shakes-segment",1,"button","button_medium","button_rounded","button_outline",3,"click"],["type","button","id","favourites-segment",1,"button","button_medium","button_rounded","button_outline",3,"click"],["type","button","id","search-segment",1,"button","button_medium","button_rounded","button_outline",3,"click"],[4,"ngIf"],["class","swap-meal__sub-heading",4,"ngIf"],["class","recipes-list",4,"ngIf"],[3,"block",4,"ngIf"],[1,"search-form-filter-button"],["method","get","action","",1,"search-form"],["type","submit",1,"button","button_icon",3,"click"],["src","assets/images/icons/search-icon.svg","alt",""],["id","search-input","type","text","name","search","placeholder","Search for an ingredient or recipe",3,"ngModel","ngModelChange","keydown.enter"],[1,"filter-button",3,"click"],["src","assets/images/icons/down-arrow-icon.svg","alt",""],["class","swap-meal__tag-section",4,"ngIf"],[1,"swap-meal__tag-section"],[4,"ngFor","ngForOf"],[1,"swap-meal__tag-group"],["class","swap-meal__tag",3,"active","click",4,"ngFor","ngForOf"],[1,"swap-meal__tag",3,"click"],[1,"swap-meal__sub-heading"],[1,"recipes-list"],[3,"exploreRecipe","mealId","mealServings","units","mealSwapped","viewRecipe",4,"ngFor","ngForOf"],["class","load-more",3,"click",4,"ngIf"],[3,"exploreRecipe","mealId","mealServings","units","mealSwapped","viewRecipe"],[1,"load-more",3,"click"],[3,"block"]],template:function(t,n){1&t&&(e.TgZ(0,"section",0)(1,"div",1)(2,"ion-header",2)(3,"div",3),e._uU(4," Swap meal "),e.qZA(),e.TgZ(5,"button",4),e.NdJ("click",function(){return n.dismiss()}),e._UZ(6,"img",5),e.qZA()(),e.TgZ(7,"ion-content",6)(8,"article",7)(9,"div",8)(10,"div",9)(11,"figure",10),e._UZ(12,"img",11),e.qZA(),e.TgZ(13,"div",12)(14,"span",13),e._uU(15,"Current meal"),e.qZA(),e.TgZ(16,"strong",14),e._uU(17),e.qZA()()(),e.TgZ(18,"div",15)(19,"button",16),e.NdJ("click",function(){return n.changeMode("suggested")}),e._uU(20," Suggested "),e.qZA(),e.TgZ(21,"button",17),e.NdJ("click",function(){return n.changeMode("shakes")}),e._uU(22," Shakes "),e.qZA(),e.TgZ(23,"button",18),e.NdJ("click",function(){return n.changeMode("favourites")}),e._uU(24," Favourites "),e.qZA(),e.TgZ(25,"button",19),e.NdJ("click",function(){return n.changeMode("search")}),e._uU(26," Search "),e.qZA()(),e.YNc(27,ne,11,4,"ng-container",20),e.YNc(28,te,3,2,"div",21),e.YNc(29,oe,3,2,"div",21),e.YNc(30,ie,3,2,"div",21),e.YNc(31,q,3,2,"div",21),e.YNc(32,C,4,2,"section",22),e.YNc(33,o,1,1,"app-loader",23),e.qZA()()()()()),2&t&&(e.xp6(12),e.Q6J("src",n.mealRecipe.thumbnail_image_url,e.LSH),e.xp6(
15),e.Oqu(n.mealRecipe.name),e.xp6(2),e.ekj("button_green-text","suggested"!==n.mode)("button_outline-green","suggested"!==n.mode)("button_fill","suggested"===n.mode)("button_outline-transparent","suggested"===n.mode)("button_fill-dark-green","suggested"===n.mode),e.xp6(2),e.ekj("button_green-text","shakes"!==n.mode)("button_outline-green","shakes"!==n.mode)("button_fill","shakes"===n.mode)("button_outline-transparent","shakes"===n.mode)("button_fill-dark-green","shakes"===n.mode),e.xp6(2),e.ekj("button_green-text","favourites"!==n.mode)("button_outline-green","favourites"!==n.mode)("button_fill","favourites"===n.mode)("button_outline-transparent","favourites"===n.mode)("button_fill-dark-green","favourites"===n.mode),e.xp6(2),e.ekj("button_green-text","search"!==n.mode)("button_outline-green","search"!==n.mode)("button_fill","search"===n.mode)("button_outline-transparent","search"===n.mode)("button_fill-dark-green","search"===n.mode),e.xp6(2),e.Q6J("ngIf","favourites"===n.mode||"search"===n.mode),e.xp6(1),e.Q6J("ngIf","favourites"===n.mode),e.xp6(1),e.Q6J("ngIf","search"===n.mode),e.xp6(1),e.Q6J("ngIf","suggested"===n.mode),e.xp6(1),e.Q6J("ngIf","shakes"===n.mode),e.xp6(1),e.Q6J("ngIf",(null==n.recipes?null:n.recipes.length)>0),e.xp6(1),e.Q6J("ngIf",n.loading))},directives:[c.Gu,c.W2,m.O5,Z._Y,Z.JL,Z.F,Z.Fj,Z.JJ,Z.On,m.sg,$,c.YG,K.R],styles:[".search-form-filter-button[_ngcontent-%COMP%]{margin-top:16px;display:flex;align-items:center;gap:40px}@media only screen and (max-width: 767px){.search-form-filter-button[_ngcontent-%COMP%]{gap:20px}}.search-form[_ngcontent-%COMP%]{flex:1;height:48px;padding:12px;border:1px solid #e5e5e5;border-radius:9px;display:flex;flex-direction:row;align-items:center;gap:10px}.search-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:none;width:24px;height:24px}.search-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:0}.search-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1;border:none;background:none;padding:0;font-size:16px;font-weight:400;line-height:150%;color:var(--color-gray-600)}.filter-button[_ngcontent-%COMP%]{flex:none;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.filter-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:24px;height:24px}.filter-button[_ngcontent-%COMP%] img.reverse[_ngcontent-%COMP%]{rotate:180deg}.filter-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:400;line-height:150%;color:var(--color-dark-green)}.popup__article[_ngcontent-%COMP%]{padding-top:0}.swap-meal__current-meal[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:16px;padding:16px 32px 16px 16px;border-radius:9px;background:var(--color-gray-200)}.swap-meal__current-meal__figure[_ngcontent-%COMP%]{width:90px;height:64px;flex:none}.swap-meal__current-meal__figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:10px;-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.swap-meal__current-meal__details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.swap-meal__current-meal__details__label[_ngcontent-%COMP%], .swap-meal__current-meal__details__title[_ngcontent-%COMP%]{color:var(--color-dark);line-height:150%}.swap-meal__current-meal__details__label[_ngcontent-%COMP%]{font-size:16px;font-weight:400}.swap-meal__current-meal__details__title[_ngcontent-%COMP%]{font-size:20px;font-weight:600}.swap-meal__segments[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px;margin-top:32px}.swap-meal__tag-section[_ngcontent-%COMP%]{padding-top:16px;font-size:16px}.swap-meal__tag[_ngcontent-%COMP%]{padding:4px 16px;color:#367e70;background:#f5f7f8;box-shadow:inset 0 0 0 1px #48a190;border-radius:36px;margin:0 4px 8px 0;cursor:pointer}.swap-meal__tag-group[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;padding-bottom:8px}.swap-meal__tag-group[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{color:#f5f7f8;background:#367e70}.swap-meal__sub-heading[_ngcontent-%COMP%]{margin-top:32px;display:flex;align-items:center}.swap-meal__sub-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;font-weight:600;line-height:160%;letter-spacing:1.5px;text-transform:uppercase;color:var(--color-gray-700)}.recipes-list[_ngcontent-%COMP%]{margin-top:16px}.recipes-list[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}.recipes-list[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:150px;--background: #367e70;text-transform:capitalize;--border-radius: 9px;display:block;margin:0 auto}.load-more[_ngcontent-%COMP%]{margin-top:20px!important}"]}),i})();var b=r(47391);function k(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"app-swap-meal-popup",17),e.NdJ("closeEventEmitter",function(){return e.CHM(t),e.oxw().toggleSwapMealPopup()})("mealSwapped",function(){return e.CHM(t),e.oxw().swapMeal()})("viewRecipe",function(a){return e.CHM(t),e.oxw().onViewRecipe(a)}),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("mealId",t.mealId)("mealRecipe",t.mealRecipe)("mealServings",t.mealServings)}}function D(i,s){if(1&i){const t=e.EpF();
1e.TgZ(0,"app-recipe-popup",18),e.NdJ("closeEventEmitter",function(){return e.CHM(t),e.oxw().onCloseRecipe()})("swapEventEmitter",function(){return e.CHM(t),e.oxw().onSwapMeal()})("favouriteChanged",function(a){return e.CHM(t),e.oxw().favouriteChange(a)}),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("id",t.exploreRecipe.id)("showSwap",!0)("numberServings",t.mealServings)("units",t.units)}}let S=(()=>{class i{constructor(t,n,a,g,T){this.mealSvc=t,this.weeklyGoalsSvc=n,this.firebaseAnalyticsSvc=a,this.mealsSvc=g,this.connectSvc=T,this.units=f.nL.Metric,this.isDoneChange=new e.vpe,this.popupOpen=new e.vpe,this.mealSwapped=new e.vpe,this.favouriteChanged=new e.vpe,this.showSwapMealPopup=!1,this.exploreRecipe=null}get showRecipePopup(){return null!==this.exploreRecipe}favouriteChange(t){this.favouriteChanged.emit(t)}toggleSwapMealPopup(){this.showSwapMealPopup=!this.showSwapMealPopup,this.firebaseAnalyticsSvc.logScreenViewEvent(v.U.SWAP_MEAL),this.popupOpen.emit(this.showSwapMealPopup)}swapMeal(){this.mealSwapped.emit(),this.showSwapMealPopup=!1,this.exploreRecipe=null,this.popupOpen.emit(!1)}changeDone(t){return(0,x.mG)(this,void 0,void 0,function*(){if(this.isDone)return;const n=yield this.mealSvc.updateMealAsDone(this.mealId,t);t&&this.weeklyGoalsSvc.fetchWeeklyGoals(),n&&(this.isDone=t,this.isDoneChange.emit(this.isDone))})}onViewRecipe(t){this.exploreRecipe=t,this.firebaseAnalyticsSvc.logScreenViewEvent(v.U.RECIPE_VIEWER)}onCloseRecipe(){this.exploreRecipe=null}onSwapMeal(){return(0,x.mG)(this,void 0,void 0,function*(){try{yield this.mealsSvc.swapMeal(this.mealId,this.exploreRecipe.id),this.swapMeal()}catch(t){this.connectSvc.handleError(t)}})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(_.T),e.Y36(l._),e.Y36(w.B),e.Y36(_.T),e.Y36(y.F))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-common-dropdown"]],inputs:{mealId:"mealId",mealRecipe:"mealRecipe",mealServings:"mealServings",isDone:"isDone",units:"units"},outputs:{isDoneChange:"isDoneChange",popupOpen:"popupOpen",mealSwapped:"mealSwapped",favouriteChanged:"favouriteChanged"},decls:41,vars:6,consts:[[1,"dropdown"],[1,"ion-hide-sm-up","ion-no-padding","dropdown__meta-item-size"],[1,"ion-no-padding"],[3,"isDone","changeDone$"],[1,"ion-no-padding","ion-text-end"],[1,"meal-swap-mobile"],["size","small","color","secondary",1,"mark-as-done-btn",3,"click"],["src","assets/images/icons/swap.svg","alt","",1,"mark-as-done-img"],[1,"mark-as-done-text"],[1,"ion-hide-sm-down","ion-hide-md-up"],[1,"ion-no-margin","ion-no-padding"],[1,"meal-swap"],["size","small","color","secondary","id","toggle-button",1,"mark-as-done-btn",3,"click"],[1,"ion-hide-lg-up","ion-hide-md-down","ion-no-padding","dropdown__meta-item-size"],[1,"ion-hide-lg-down"],[3,"mealId","mealRecipe","mealServings","closeEventEmitter","mealSwapped","viewRecipe",4,"ngIf"],[3,"id","showSwap","numberServings","units","closeEventEmitter","swapEventEmitter","favouriteChanged",4,"ngIf"],[3,"mealId","mealRecipe","mealServings","closeEventEmitter","mealSwapped","viewRecipe"],[3,"id","showSwap","numberServings","units","closeEventEmitter","swapEventEmitter","favouriteChanged"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"ion-row",1)(2,"ion-col",2)(3,"app-mark-as-done-button",3),e.NdJ("changeDone$",function(g){return n.changeDone(g)}),e.qZA()(),e.TgZ(4,"ion-col",4)(5,"div",5)(6,"ion-button",6),e.NdJ("click",function(){return n.toggleSwapMealPopup()}),e._UZ(7,"img",7),e.TgZ(8,"span",8),e._uU(9,"Swap"),e.qZA()()()()(),e.TgZ(10,"ion-row",9)(11,"ion-col",10)(12,"app-mark-as-done-button",3),e.NdJ("changeDone$",function(g){return n.changeDone(g)}),e.qZA()()(),e.TgZ(13,"ion-row",9)(14,"ion-col",10)(15,"div",11)(16,"ion-button",12),e.NdJ("click",function(){return n.toggleSwapMealPopup()}),e._UZ(17,"img",7),e.TgZ(18,"span",8),e._uU(19,"Swap"),e.qZA()()()()(),e.TgZ(20,"ion-row",13)(21,"ion-col",2)(22,"app-mark-as-done-button",3),e.NdJ("changeDone$",function(g){return n.changeDone(g)}),e.qZA()(),e.TgZ(23,"ion-col",4)(24,"div",5)(25,"ion-button",6),e.NdJ("click",function(){return n.toggleSwapMealPopup()}),e._UZ(26,"img",7),e.TgZ(27,"span",8),e._uU(28,"Swap"),e.qZA()()()()(),e.TgZ(29,"ion-row",14)(30,"ion-col",10)(31,"app-mark-as-done-button",3),e.NdJ("changeDone$",function(g){return n.changeDone(g)}),e.qZA()()(),e.TgZ(32,"ion-row",14)(33,"ion-col",10)(34,"div",11)(35,"ion-button",12),e.NdJ("click",function(){return n.toggleSwapMealPopup()}),e._UZ(36,"img",7),e.TgZ(37,"span",8),e._uU(38,"Swap"),e.qZA()()()()()(),e.YNc(39,k,1,3,"app-swap-meal-popup",15),e.YNc(40,D,1,4,"app-recipe
1-popup",16)),2&t&&(e.xp6(3),e.Q6J("isDone",n.isDone),e.xp6(9),e.Q6J("isDone",n.isDone),e.xp6(10),e.Q6J("isDone",n.isDone),e.xp6(9),e.Q6J("isDone",n.isDone),e.xp6(8),e.Q6J("ngIf",n.showSwapMealPopup),e.xp6(1),e.Q6J("ngIf",n.showRecipePopup))},directives:[c.Nd,c.wI,A.P,c.YG,m.O5,u,b.Y],styles:["[_nghost-%COMP%]{display:inline-block}.dropdown[_ngcontent-%COMP%]{position:relative;margin-top:10px;margin-bottom:0}.dropdown__meta-item-size[_ngcontent-%COMP%]{font-size:14px}.dropdown[_ngcontent-%COMP%] .mark-done-btn[_ngcontent-%COMP%]{margin:0;pointer-events:none;text-transform:none;text-transform:initial;--border-style: solid;--border-color: var(--color-gray-400);--border-width: .1px;--box-shadow: none}.dropdown[_ngcontent-%COMP%] .mark-as-done-btn[_ngcontent-%COMP%]{margin:0;text-transform:none;text-transform:initial;--border-style: solid;--border-color: var(--color-gray-400);--border-width: .1px;--box-shadow: none}.dropdown[_ngcontent-%COMP%] .mark-as-done-icon[_ngcontent-%COMP%]{margin-left:-11px;padding:4px;border-radius:5px 0 0 5px;background-color:var(--color-white)}.dropdown[_ngcontent-%COMP%] .mark-as-done-img[_ngcontent-%COMP%]{margin-left:-11px;padding:6px;border-radius:5px 0 0 5px;background-color:var(--color-white)}.dropdown[_ngcontent-%COMP%] .done-icon[_ngcontent-%COMP%]{margin-left:-14px;margin-top:-10px;margin-bottom:-10px;padding:5px;border-radius:5px 0 0 5px;background-color:var(--color-dark-green)}.dropdown[_ngcontent-%COMP%] .mark-done-text[_ngcontent-%COMP%]{margin-left:10px}.dropdown[_ngcontent-%COMP%] .mark-as-done-text[_ngcontent-%COMP%]{margin-left:10px;color:var(--color-dark-green)}.dropdown[_ngcontent-%COMP%] .mark-as-done[_ngcontent-%COMP%]{color:var(--color-green);width:75px;margin-left:-8px}.dropdown[_ngcontent-%COMP%] .meal-mark-done[_ngcontent-%COMP%]{margin-left:-8px}.dropdown[_ngcontent-%COMP%] .meal-mark-done-mobile[_ngcontent-%COMP%]{margin-left:-2px}.dropdown[_ngcontent-%COMP%] .meal-swap[_ngcontent-%COMP%]{margin-left:-8x}.dropdown[_ngcontent-%COMP%] .meal-swap-mobile[_ngcontent-%COMP%]{display:flex;justify-content:end}"]}),i})();function I(i,s){1&i&&e._UZ(0,"img",31)}function E(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"app-recipe-popup",32),e.NdJ("closeEventEmitter",function(){return e.CHM(t),e.oxw().onClosePopup()})("isDoneChange",function(a){return e.CHM(t),e.oxw().meal.is_done=a})("favouriteChanged",function(a){return e.CHM(t),e.oxw().favouriteChange(a)}),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("id",t.recipeId)("mealId",t.meal.id)("showDone",!0)("isRepeated",t.isRepeated)("isDone",t.meal.is_done)("numberServings",t.meal.servings)("units",t.units)}}let re=(()=>{class i{constructor(t,n,a){this.mealSvc=t,this.alertSvc=n,this._tabsService=a,this.showPopup=!1,this.units=f.nL.Metric,this.popupOpen=new e.vpe,this.favouriteChanged=new e.vpe,this.isDoneChange=new e.vpe,this.mealSwapped=new e.vpe}togglePopup(t){this.recipeId=t.id,this.showPopup=!this.showPopup,this.emitPopupShown(this.showPopup),this._tabsService.hideTabs()}onClosePopup(){this.showPopup=!1,this.emitPopupShown(this.showPopup),this._tabsService.showTabs()}toggleSwapPopup(t){this.emitPopupShown(t),t?this._tabsService.hideTabs():this._tabsService.showTabs()}favouriteChange(t){this.meal.recipe.is_favourite=t.is_favourite,this.meal.recipe.favourite=t.favourite,this.favouriteChanged.emit(t)}swapMeal(){this.mealSwapped.emit()}changeServings(t){return(0,x.mG)(this,void 0,void 0,function*(){if("minus"===t&&1===this.meal.servings)return;let n;n="minus"===t?this.meal.servings-1:this.meal.servings+1,this.updateServings(n)})}updateServings(t){return(0,x.mG)(this,void 0,void 0,function*(){try{yield this.mealSvc.updateServings(this.meal.id,t),this.meal.servings=t}catch(n){this.alertSvc.presentAlert("Error","","We were unable to update the servings","Ok")}})}emitPopupShown(t){this.popupOpen.emit(t)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(_.T),e.Y36(d.c),e.Y36(M.x))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-meal"]],inputs:{meal:"meal",isRepeated:"isRepeated",units:"units"},outputs:{popupOpen:"popupOpen",favouriteChanged:"favouriteChanged",isDoneChange:"isDoneChange",mealSwapped:"mealSwapped"},decls:112,vars:30,consts:[[1,"meal"],[1,"meal__figure",3,"click"],["src","assets/images/icons/repeated-marker.svg","class","meal__repeated-meal","alt","Repeated meal","title","Repeated meal",4,"ngIf"],[1,"meal__content"],[1,"ion-hide-md-up","ion-no-padding"],[1,"meal__day-time"],[1,"meal__meta-item-size","ion-hide-sm-up"],[1,"ion-no-padding"],[1,"meal__meta-item"],[1,"ion-hide-md-up","ion-float-end"],["type","button","id","minus-button",1,"button","button_outline","button_tiny","button_green-text","ml-1","mr-1",3,"click"],["name","remove-outline",1,"meal__meal-serving"],["type","button","id","plus-button",1,"button","button_outline","button_tiny","button_green-text",3,"click"],["name","add-outline",1,"meal__meal-serving"],[1,"ion-hide-sm-down"],[1,"meal__meal-calories"],[1,"meal__meta-item","mr-1"],[1,"meal__meta-title"],[1,"meal__meal-servings"],[1,"ion-hide-lg-up","ion-hide-md-down","ion-no-padding"],[1,"meal__meta-item-size"],[1,"ion-hide-md-down","ion-float-end"],["type","button","id","minus-button",1,"button","button_outline","button_tiny","button_green-text","ml-1",3,"click"],["type","button","id","plus-button",1,"button","button_outline","button_tiny","button_green-text","ml-1",3,"click"],[1,"ion-hide-lg-down"],[1,"meal_title"],[1,"meal_title__text"],[3,"click"],["type","Recipe",3,"favourite","id","favouriteId","favouriteChanged"],[3,"mealId","mealRecipe","mealServings","units","isDone","mealSwapped","isDoneChange","popupOpen","favouriteChanged"],[3,"id","mealId","showDone","isRepeated","isDone","numberServings","units","closeEventEmitter","isDoneChange","favouriteChanged",4,"ngIf"],["src","assets/images/icons/repeated-marker.svg","alt","Repeated meal","title","Repeated meal",1,"meal__repeated-meal"],[3,"id","mealId","showDone","isRepeated","isDone","numberServings","units","closeEventEmitter","isDoneChange","favouriteChanged"]],template:function(t,n){1&t&&(e.TgZ(0,"section",0)(1,"figure",1),e.NdJ("click",function(){return n.togglePopup(n.meal.recipe)}),e.YNc(2,I,1,0,"img",2),e.qZA(),e.TgZ(3,"div",3)(4,"div",4)(5,"div",5)(6,"span"),e._uU(7),e.qZA()(),e.TgZ(8,"ion-row",6)(9,"ion-col",7)(10,"div")(11,"span",8)(12,"span"),e._uU(13),e.qZA()(),e.TgZ(14,"span"),e._uU(15," calories"),e.qZA()()(),e.TgZ(16,"ion-col",7)(17,"div",9)(18,"span",8)(19,"span"),e._uU(20),e.qZA()(),e.TgZ(21,"span"),e._uU(22),e.qZA(),e.TgZ(23,"button",10),e.NdJ("click",function(){return n.changeServings("minus")}),e._UZ(24,"ion-icon",11),e.qZA(),e.TgZ(25,"button",12),e.NdJ("click",function(){return n.changeServings("plus")}),e._UZ(26,"ion-icon",13),e.qZA()()()(),e.TgZ(27,"ion-row",14)(28,"ion-col",7)(29,"div",15)(30,"span",16)(31,"span"),e._uU(32),e.qZA()(),e.TgZ(33,"span",17),e._uU(34,"calories"),e.qZA()()()(),e.TgZ(35,"i
1on-row",14)(36,"ion-col",7)(37,"div",18)(38,"span",8)(39,"span"),e._uU(40),e.qZA()(),e.TgZ(41,"span",17),e._uU(42),e.qZA(),e.TgZ(43,"button",10),e.NdJ("click",function(){return n.changeServings("minus")}),e._UZ(44,"ion-icon",11),e.qZA(),e.TgZ(45,"button",12),e.NdJ("click",function(){return n.changeServings("plus")}),e._UZ(46,"ion-icon",13),e.qZA()()()()(),e.TgZ(47,"div",19)(48,"div",5)(49,"span"),e._uU(50),e.qZA()(),e.TgZ(51,"ion-row",20)(52,"ion-col",7)(53,"div")(54,"span",8)(55,"span"),e._uU(56),e.qZA()(),e.TgZ(57,"span"),e._uU(58," calories"),e.qZA()()(),e.TgZ(59,"ion-col",7)(60,"div",21)(61,"span",8)(62,"span"),e._uU(63),e.qZA()(),e.TgZ(64,"span"),e._uU(65),e.qZA(),e.TgZ(66,"button",22),e.NdJ("click",function(){return n.changeServings("minus")}),e._UZ(67,"ion-icon",11),e.qZA(),e.TgZ(68,"button",23),e.NdJ("click",function(){return n.changeServings("plus")}),e._UZ(69,"ion-icon",13),e.qZA()(),e.TgZ(70,"div",9)(71,"span",8)(72,"span"),e._uU(73),e.qZA()(),e.TgZ(74,"span"),e._uU(75),e.qZA(),e.TgZ(76,"button",10),e.NdJ("click",function(){return n.changeServings("minus")}),e._UZ(77,"ion-icon",11),e.qZA(),e.TgZ(78,"button",12),e.NdJ("click",function(){return n.changeServings("plus")}),e._UZ(79,"ion-icon",13),e.qZA()()()()(),e.TgZ(80,"div",24)(81,"div",5)(82,"span"),e._uU(83),e.qZA()(),e.TgZ(84,"ion-row")(85,"ion-col",7)(86,"div",15)(87,"span",16)(88,"span"),e._uU(89),e.qZA()(),e.TgZ(90,"span",17),e._uU(91,"calories"),e.qZA()()()()(),e.TgZ(92,"div",24)(93,"ion-row")(94,"ion-col",7)(95,"div",18)(96,"span",8)(97,"span"),e._uU(98),e.qZA()(),e.TgZ(99,"span",17),e._uU(100),e.qZA(),e.TgZ(101,"button",10),e.NdJ("click",function(){return n.changeServings("minus")}),e._UZ(102,"ion-icon",11),e.qZA(),e.TgZ(103,"button",12),e.NdJ("click",function(){return n.changeServings("plus")}),e._UZ(104,"ion-icon",13),e.qZA()()()()(),e.TgZ(105,"div",25)(106,"div",26)(107,"ion-text",27),e.NdJ("click",function(){return n.togglePopup(n.meal.recipe)}),e._uU(108),e.qZA()(),e.TgZ(109,"app-favourite",28),e.NdJ("favouriteChanged",function(g){return n.favouriteChange(g)}),e.qZA()(),e.TgZ(110,"app-common-dropdown",29),e.NdJ("mealSwapped",function(){return n.swapMeal()})("isDoneChange",function(g){return n.meal.is_done=g})("popupOpen",function(g){return n.toggleSwapPopup(g)})("favouriteChanged",function(g){return n.favouriteChange(g)}),e.qZA()()(),e.YNc(111,E,1,7,"app-recipe-popup",30)),2&t&&(e.xp6(1),e.Udp("background-image","url("+n.meal.recipe.thumbnail_image_url+")"),e.xp6(1),e.Q6J("ngIf",n.isRepeated),e.xp6(5),e.Oqu(n.meal.name),e.xp6(6),e.Oqu(n.meal.recipe.calories),e.xp6(7),e.Oqu(n.meal.servings),e.xp6(2),e.Oqu(1===n.meal.servings?" serving":" servings"),e.xp6(10),e.Oqu(n.meal.recipe.calories),e.xp6(8),e.Oqu(n.meal.servings),e.xp6(2),e.Oqu(1===n.meal.servings?" serving":" servings"),e.xp6(8),e.Oqu(n.meal.name),e.xp6(6),e.Oqu(n.meal.recipe.calories),e.xp6(7),e.Oqu(n.meal.servings),e.xp6(2),e.Oqu(1===n.meal.servings?" serving":" servings"),e.xp6(8),e.Oqu(n.meal.servings),e.xp6(2),e.Oqu(1===n.meal.servings?" serving":" servings"),e.xp6(8),e.Oqu(n.meal.name),e.xp6(6),e.Oqu(n.meal.recipe.calories),e.xp6(9),e.Oqu(n.meal.servings),e.xp6(2),e.Oqu(1===n.meal.servings?" serving":" servings"),e.xp6(8),e.Oqu(n.meal.recipe.name),e.xp6(1),e.Q6J("favourite",null==n.meal.recipe?null:n.meal.recipe.is_favourite)("id",null==n.meal.recipe?null:n.meal.recipe.id)("favouriteId",null==n.meal.recipe||null==n.meal.recipe.favourite?null:n.meal.recipe.favourite.id),e.xp6(1),e.Q6J("mealId",n.meal.id)("mealRecipe",n.meal.recipe)("mealServings",n.meal.servings)("units",n.units)("isDone",n.meal.is_done),e.xp6(1),e.Q6J("ngIf",n.showPopup))},directives:[m.O5,c.Nd,c.wI,c.gu,c.yW,h.I,S,b.Y],styles:['[_nghost-%COMP%]{flex:1;display:flex}.meal[_ngcontent-%COMP%]{flex:1;padding:0;display:flex;flex-direction:column}.meal__figure[_ngcontent-%COMP%]{flex:none;cursor:pointer;position:relative;height:160px;width:100%;background-position:center center;background-repeat:no-repeat;background-size:cover;border-radius:10px}.meal__content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.meal__repeated-meal[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;border-radius:0}
1.meal__day-time[_ngcontent-%COMP%]{flex:none;display:flex;margin-top:8px;color:var(--color-dark-green)}.meal__day-time[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;font-weight:600;line-height:1.6em;letter-spacing:1.5px;text-transform:uppercase}.meal__day-time[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{flex:none;margin-top:2px;margin-left:16px;width:14px;height:14px}.meal__meta[_ngcontent-%COMP%]{flex:none;display:flex;flex-direction:row;align-items:center;font-size:14px;font-weight:400;line-height:1.5em;color:var(--color-gray-700);margin:4px 0}.meal__thumb[_ngcontent-%COMP%]{border-radius:10px;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.meal__meta-item-size[_ngcontent-%COMP%]{font-size:14px}.meal__meal-serving[_ngcontent-%COMP%]{margin-bottom:-2px;--ionicon-stroke-width: 75px}.meal__meta-item[_ngcontent-%COMP%]{font-weight:700;position:relative}.meal__meta-item[_ngcontent-%COMP%]:not(:first-child){padding-left:16px}.meal__meta-item[_ngcontent-%COMP%]:not(:first-child):before{content:"";position:absolute;left:10px;top:10px;width:2px;height:2px;border-radius:2px;background:var(--color-green)}.meal__meta-item-group[_ngcontent-%COMP%]{display:flex}.meal__meta-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{line-height:24px}.meal__meal-calories[_ngcontent-%COMP%]{padding-left:8px;font-size:14px;margin-left:-9px}.meal__meal-calories[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{line-height:24px}.meal__meal-servings[_ngcontent-%COMP%]{padding-left:8px;font-size:14px;margin-left:-9px}.meal__meal-servings[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{line-height:24px}.meal__common-dropdown[_ngcontent-%COMP%]{margin-left:8px}.meal__meta-icon[_ngcontent-%COMP%]{height:15px}.meal[_ngcontent-%COMP%] .meal_title[_ngcontent-%COMP%]{flex:1;display:flex;margin-top:12px}.meal[_ngcontent-%COMP%] .meal_title__text[_ngcontent-%COMP%]{flex:1;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:20px;font-weight:600;color:var(--color-dark)}.meal[_ngcontent-%COMP%] .meal_title[_ngcontent-%COMP%] ion-text[_ngcontent-%COMP%]{cursor:pointer;line-height:24px}.meal[_ngcontent-%COMP%] .meal_title[_ngcontent-%COMP%] app-favourite[_ngcontent-%COMP%]{flex:none;display:flex;align-self:start;margin-top:4px}@media only screen and (max-width: 576px){.meal[_ngcontent-%COMP%]{padding:8px 0}}']}),i})();var pe=r(83691);const se=["mealsWrapper"];function ce(i,s){1&i&&e._UZ(0,"ion-icon",18)}function le(i,s){1&i&&e._UZ(0,"ion-icon",19)}function ge(i,s){if(1&i&&(e.TgZ(0,"div",15),e.YNc(1,ce,1,0,"ion-icon",16),e.YNc(2,le,1,0,"ion-icon",17),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.expanded),e.xp6(1),e.Q6J("ngIf",t.expanded)}}function _e(i,s){1&i&&(e.TgZ(0,"span"),e._UZ(1,"img",20),e._uU(2," Fasting day "),e.qZA())}function de(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"ion-col",21)(1,"app-meal",22),e.NdJ("popupOpen",function(a){return e.CHM(t),e.oxw().onPopupOpen(a)})("favouriteChanged",function(a){return e.CHM(t),e.oxw().favouriteChange(a)})("mealSwapped",function(){return e.CHM(t),e.oxw().swapMeal()}),e.qZA()()}if(2&i){const t=s.$implicit,n=e.oxw();e.xp6(1),e.Q6J("meal",t)("isRepeated",n.isRepeated(t.recipe.id,t.id))("units",n.units)}}const ue=function(){return["/recipes"]};function me(i,s){1&i&&(e.TgZ(0,"a",23)(1,"div",24)(2,"ion-text"),e._uU(3,"Plan your weekly meals"),e.qZA(),e._UZ(4,"ion-icon",25),e.qZA()()),2&i&&e.Q6J("routerLink",e.DdM(1,ue))}let he=(()=>{class i{constructor(t){this.elementRef=t,this.collapsible=!1,this.footer=!1,this.units=f.nL.Metric,this.popupOpen=new e.vpe,this.favouriteChanged=new e.vpe,this.mealSwapped=new e.vpe,this.expanded=!1,this.loadingFirstTime=!0}ngAfterViewInit(){this.day&&P().isoWeekday()===this.day.day&&setTimeout(()=>{this.expand()})}ngOnChanges(){var t;if(void 0!==this.currentWeek&&void 0!==this.weekNumber){const n=this.currentWeek-this.weekNumber;this.date=P().subtract(n,"weeks").startOf("week").add(this.dayToShow,"day")}void 0!==this.week&&void 0!==this.dayToShow&&(this.day=null!==(t=this.week.days.find(n=>n.day===this.dayToShow))&&void 0!==t?t:null)}onPopupOpen(t){this.popupOpen.emit(t)}favouriteChange(t){this.favouriteChanged.emit(t)}swapMeal(){this.mealSwapped.emit()}
1trackByMealId(t,n){var a,g;return null!==(g=null===(a=null==n?void 0:n.recipe)||void 0===a?void 0:a.id)&&void 0!==g?g:t}isRepeated(t,n){let a=!1;return this.week.days.forEach(g=>{g.meals.forEach(T=>{(T.id!==n&&T.recipe.id)===t&&(a=!0)})}),a}expand(){return(0,x.mG)(this,void 0,void 0,function*(){if(!this.collapsible)return;const t=this.elementRef.nativeElement.querySelector(".animation-wrapper");this.expanded?(this.rotate(this.elementRef.nativeElement.querySelector("#iconUp"),"180"),t.style.height=0,t.style.overflow="hidden"):(this.rotate(this.elementRef.nativeElement.querySelector("#iconDown"),"-180"),t.style.height="100%",t.style.overflow="visible"),setTimeout(()=>{this.expanded=!this.expanded},600)})}rotate(t,n){t.style.webkitTransform=`rotate(${n}deg)`,t.style.transform=`rotate(${n}deg)`}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-meals"]],viewQuery:function(t,n){if(1&t&&e.Gf(se,5),2&t){let a;e.iGM(a=e.CRH())&&(n.mealsWrapper=a.first)}},inputs:{collapsible:"collapsible",footer:"footer",week:"week",dayToShow:"dayToShow",units:"units",currentWeek:"currentWeek",weekNumber:"weekNumber"},outputs:{popupOpen:"popupOpen",favouriteChanged:"favouriteChanged",mealSwapped:"mealSwapped"},features:[e.TTD],decls:44,vars:18,consts:[[1,"meals"],[1,"meals__header-bar","ion-hide-lg-down",3,"click"],[1,"meals__header"],[1,"content-box","meals__wrapper"],[1,"ion-hide-lg-up"],[1,"meals__header-bar",3,"click"],["class","expand-collapse",4,"ngIf"],["mealsWrapper",""],["slot","header"],[1,"meals__calories-inner"],[4,"ngIf"],["slot","content"],[1,"meals__grid"],["size","12","size-sm","4",4,"ngFor","ngForOf","ngForTrackBy"],[3,"routerLink",4,"ngIf"],[1,"expand-collapse"],["id","iconDown","name","chevron-down-outline",4,"ngIf"],["id","iconUp","name","chevron-up-outline",4,"ngIf"],["id","iconDown","name","chevron-down-outline"],["id","iconUp","name","chevron-up-outline"],["src","assets/images/icons/fasting.svg","alt","",1,"mr-1"],["size","12","size-sm","4"],[3,"meal","isRepeated","units","popupOpen","favouriteChanged","mealSwapped"],[3,"routerLink"],["tappable","",1,"footer-link-dashboard-components"],["name","chevron-forward-outline"]],template:function(t,n){1&t&&(e.TgZ(0,"section",0)(1,"div",1),e.NdJ("click",function(){return n.expand()}),e.TgZ(2,"header",2),e._uU(3),e.qZA()(),e.TgZ(4,"div")(5,"div",3)(6,"div",4)(7,"div",5),e.NdJ("click",function(){return n.expand()}),e.TgZ(8,"header",2),e._uU(9),e.qZA(),e.YNc(10,ge,3,2,"div",6),e.qZA()(),e.TgZ(11,"div")(12,"div",null,7)(14,"ion-accordion-group")(15,"ion-accordion")(16,"ion-item",8)(17,"ion-label")(18,"div",9),e.YNc(19,_e,3,0,"span",10),e.TgZ(20,"span"),e._uU(21),e.TgZ(22,"small"),e._uU(23,"calories"),e.qZA()()()()(),e.TgZ(24,"ion-list",11)(25,"ion-item")(26,"ion-label")(27,"div"),e._uU(28),e.TgZ(29,"small"),e._uU(30,"protein"),e.qZA(),e._uU(31),e.TgZ(32,"small"),e._uU(33,"carbohydrates"),e.qZA(),e._uU(34),e.TgZ(35,"small"),e._uU(36,"fat"),e.qZA(),e._uU(37),e.TgZ(38,"small"),e._uU(39,"fibre"),e.qZA()()()()()()(),e.TgZ(40,"ion-grid",12)(41,"ion-row"),e.YNc(42,de,2,3,"ion-col",13),e.qZA()(),e.YNc(43,me,5,2,"a",14),e.qZA()()()()()),2&t&&(e.xp6(3),e.Oqu(null==n.day?null:n.day.name),e.xp6(2),e.ekj("accordion-expanded",n.expanded),e.xp6(4),e.Oqu(null==n.day?null:n.day.name),e.xp6(1),e.Q6J("ngIf",n.collapsible),e.xp6(1),e.ekj("animation-wrapper",n.collapsible),e.xp6(4),e.ekj("fasting",null==n.day?null:n.day.is_fasting_day),e.xp6(4),e.Q6J("ngIf",null==n.day?null:n.day.is_fasting_day),e.xp6(2),e.hij(" ",null==n.day?null:n.day.total_calories," "),e.xp6(7),e.hij(" ",null==n.day?null:n.day.total_proteins,"g "),e.xp6(3),e.hij(" \xb7 ",null==n.day?null:n.day.total_carbs,"g "),e.xp6(3),e.hij(" \xb7 ",null==n.day?null:n.day.total_fats,"g "),e.xp6(3),e.hij(" \xb7 ",null==n.day?null:n.day.total_fibers,"g "),e.xp6(5),e.Q6J("ngForOf",null==n.day?null:n.day.meals)("ngForTrackBy",n.trackByMealId),e.xp6(1),e.Q6J("ngIf",n.footer))},directives:[m.O5,c.gu,c.eh,c.We,c.Ie,c.Q$,c.q_,c.jY,c.Nd,m.sg,c.wI,re,c.Fo,pe.yS,c.yW],styles:['.meals[_ngcontent-%COMP%] .expand-collapse[_ngcontent-%COMP%]{display:none}.meals__grid[_ngcontent-%COMP%]{padding:8px 0}@media only screen and (max-width: 991px){.meals__grid[_ngcontent-%COMP%]{padding:4px 0}.meals[_ngcontent-%COMP%] .expand-collapse[_ngcontent-%COMP%]{display:block;position:absolute;right:18px}.meals[_ngcontent-%COMP%] .expand-collapse[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{transition:all .6s ease-in-out}.meals[_ngcontent-%COMP%] .rotate[_ngcontent-%COMP%]{transform:rotate(180deg)}.meals[_ngcontent-%COMP%] .animation-wrapper[_ngcontent-%COMP%]{transition:height .6s;overflow:hidden;height:0}}@media only screen and (min-width: 992px){.meals[_ngcontent-%COMP%] .rotate[_ngcontent-%COMP%]{transform:rotate(180deg)}.meals[_ngcontent-%COMP%] .animation-wrapper[_ngcontent-%COMP%]{overflow:visible!important;height:100%!important}}.meals__header-bar[_ngcontent-%COMP%]{display:flex}.meals__header[_ngcontent-%COMP%]{margin-top:12px;font-size:22px;font-weight:600;line-height:1.12em;letter-spacing:.25px;color:var(--color-dark);margin-bottom:6px;margin-left:16px}.meals[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:var(--color-dark-green)}.meals__wrapper[_ngcontent-%COMP%]{padding:8px 16px;background:var(--color-white)}.meals__wrapper[_ngcontent-%COMP%] ion-col[_ngcontent-%COMP%]{display:flex}.meals__wrapper[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{margin:0}.meals__wrapper[_ngcontent-%COMP%] .expand-collapse[_ngcontent-%COMP%]{height:16px;display:flex;margin-top:4px;cursor:pointer}.meals__calories[_ngcontent-%COMP%]{font-size:18px;line-height:112%;color:var(--color-darkest-green);height:40px;padding:0 16px;border-radius:4px;background:var(--color-gray-100);display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:6px;cursor:pointer}.meals__calories-inner[_ngcontent-%COMP%]{flex:1}.meals__calories-content[_ngcontent-%COMP%]{padding:0 18px;display:flex;overflow:hidden;flex-direction:row;justify-content:left;color:var(--color-darkest-green);font-size:18px;line-height:112%;align-items:center;background:var(--color-gray-100);border-radius:0 0 4px 4px}.meals__calories-content-fasting[_ngcontent-%COMP%], .meals__calories_fasting[_ngcontent-%COMP%]{background:var(--color-light-green)}.meals__calories_fasting[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(:first-child){padding-left:16px;position:relative}.meals__calories_fasting[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(:first-child):before{content:"";position:absolute;
1left:7px;top:12px;width:2px;height:2px;border-radius:2px;background:var(--color-green)}.meals__footer[_ngcontent-%COMP%]{border-top:1px solid var(--color-gray-200);padding:0 16px;display:flex;align-items:center;flex-direction:row;height:40px;margin:10px -16px -4px}.meals__footer[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-green)}.meals[_ngcontent-%COMP%] .footer-link-dashboard-components[_ngcontent-%COMP%]{padding-bottom:8px}ion-accordion.accordion-collapsed[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%], ion-accordion.accordion-collapsing[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%], ion-accordion.accordion-expanding[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%], ion-accordion.accordion-expanded[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%]{--background: var(--color-gray-100);--color: var(--color-darkest-green);border-radius:6px;height:45px;font-size:18px}ion-accordion.accordion-collapsing[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%], ion-accordion.accordion-expanding[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%], ion-accordion.accordion-expanded[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%]{border-radius:6px 6px 0 0}ion-accordion.accordion-collapsed[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%], ion-accordion.accordion-collapsing[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%], ion-accordion.accordion-expanding[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%], ion-accordion.accordion-expanded[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%]{padding-top:0}ion-accordion.accordion-collapsed[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%], ion-accordion.accordion-collapsing[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%], ion-accordion.accordion-expanding[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%], ion-accordion.accordion-expanded[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%]{--background: var(--color-gray-100);--color: var(--color-darkest-green);font-size:18px;border-radius:0 0 6px 6px;border:0;--inner-border-width: 0}ion-accordion.accordion-collapsed[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%], ion-accordion.accordion-collapsing[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%], ion-accordion.accordion-expanding[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%], ion-accordion.accordion-expanded[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%]{white-space:normal}ion-accordion.fasting[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%]{--background: var(--color-light-green)}ion-accordion.fasting[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(:first-child){padding-left:16px;position:relative}ion-accordion.fasting[_ngcontent-%COMP%] ion-item[slot=header][_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(:first-child):before{content:"";position:absolute;left:7px;top:12px;width:2px;height:2px;border-radius:2px;background:var(--color-green)}ion-accordion.fasting[_ngcontent-%COMP%] ion-list[slot=content][_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%]{--background: var(--color-light-green);--color: var(--color-darkest-green)}@media only screen and (max-width: 991px){.meals__header[_ngcontent-%COMP%]{margin-top:12px;font-size:14px;font-weight:600;line-height:1.6em;letter-spacing:1.5px;text-transform:uppercase;margin-bottom:0;margin-left:0}.meals__calories[_ngcontent-%COMP%]{margin-top:16px}}']}),i})()},47391:(U,O,r)=>{r.d(O,{Y:()=>ae});var x=r(97582),e=r(5e3),P=r(26997),f=r(59583),m=r(68429),c=r(13374),_=r(95216),d=r(49695),M=r(85399),h=r(2693),v=r(90603),l=r(85e3),w=r(28663),y=r(63323),A=r(46217),R=r(69808),N=r(4794),F=r(43839),Z=r(21355);function Y(p,C){if(1&p&&(e.TgZ(0,"li",9),e._UZ(1,"img",10),e.TgZ(2,"span"),e._uU(3,"Carbohydrate"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&p){const o=e.oxw(2);e.xp6(5),e.Oqu(o.carbohydrate+"g")}}function Q(p,C){if(1&p&&(e.TgZ(0,"li",11),e._UZ(1,"img",12),e.TgZ(2,"span"),e._uU(3,"Fibre"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&p){const o=e.oxw(2);e.xp6(5),e.Oqu(o.fibre+"g")}}function z(p,C){if(1&p&&(e.TgZ(0,"li",13),e._UZ(1,"img",14),e.TgZ(2,"span"),e._uU(3,"Protein"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&p){const o=e.oxw(2);e.xp6(5),e.Oqu(o.protein+"g")}}function H(p,C){if(1&p&&(e.TgZ(0,"li",15),e._UZ(1,"img",16),e.TgZ(2,"span"),e._uU(3,"Fat"),e.qZA(),e.TgZ(4,"strong"),e._uU(5),e.qZA()()),2&p){const o=e.oxw(2);e.xp6(5),e.Oqu(o.fat+"g")}}function L(p,C){if(1&p&&(e.TgZ(0,"ul",4),e.YNc(1,Y,6,1,"li",5),e.YNc(2,Q,6,1,"li",6),e.YNc(3,z,6,1,"li",7),e.YNc(4,H,6,1,"li",8),e.qZA()),2&p){const o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.carbohydrate),e.xp6(1),e.Q6J("ngIf",o.fibre),e.xp6(1),e.Q6J("ngIf",o.protein),e.xp6(1),e.Q6J("ngIf",o.fat)}}let G=(()=>{class p{}
1return p.\u0275fac=function(o){return new(o||p)},p.\u0275cmp=e.Xpm({type:p,selectors:[["app-nutrition-facts"]],inputs:{calories:"calories",carbohydrate:"carbohydrate",protein:"protein",fat:"fat",fibre:"fibre"},decls:9,vars:2,consts:[[1,"nutrition-facts__wrapper","content-box"],["id","calories",1,"nutrition-facts__header"],["src","assets/images/icons/calories.svg","alt",""],["class","nutrition-facts__list",4,"ngIf"],[1,"nutrition-facts__list"],["id","carbohydrate",4,"ngIf"],["id","fibre",4,"ngIf"],["id","protein",4,"ngIf"],["id","fat",4,"ngIf"],["id","carbohydrate"],["src","assets/images/icons/carbohydrate.svg","alt",""],["id","fibre"],["src","assets/images/icons/fibre.svg","alt",""],["id","protein"],["src","assets/images/icons/protein.svg","alt",""],["id","fat"],["src","assets/images/icons/fat.svg","alt",""]],template:function(o,u){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"strong"),e._uU(3),e.qZA(),e.TgZ(4,"span"),e._UZ(5,"img",2),e.TgZ(6,"span"),e._uU(7,"Calories per serve"),e.qZA()()(),e.YNc(8,L,5,4,"ul",3),e.qZA()),2&o&&(e.xp6(3),e.Oqu(u.calories),e.xp6(5),e.Q6J("ngIf",u.carbohydrate||u.fibre||u.protein||u.fat))},directives:[R.O5],styles:["[_nghost-%COMP%]{display:flex}.nutrition-facts__wrapper[_ngcontent-%COMP%]{background:var(--color-gray-100);padding:16px;border-radius:9px;flex:1;display:flex;flex-direction:column;gap:16px}.nutrition-facts__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;border-radius:9px;background:#fff;padding:16px;text-align:center}.nutrition-facts__header[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:22px;font-style:normal;font-weight:600;line-height:112%;letter-spacing:.25px;color:var(--color-dark)}.nutrition-facts__header[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.nutrition-facts__header[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{flex:none;width:16px;height:16px;margin-right:8px;border-radius:0}.nutrition-facts__header[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:none;font-size:16px;font-style:normal;font-weight:400;line-height:150%;color:var(--color-gray-600)}.nutrition-facts__list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.nutrition-facts__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:disc outside none;list-style:initial;display:flex;justify-content:flex-start;align-items:center;color:var(--color-gray-700)}.nutrition-facts__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{flex:none;width:18px;height:18px;margin-right:8px;border-radius:0}.nutrition-facts__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:18px;font-style:normal;font-weight:400;line-height:150%}.nutrition-facts__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{flex:none;margin-left:4px;font-size:18px;font-style:normal;font-weight:600;line-height:150%}"]}
1),p})();var j=r(22252);function B(p,C){if(1&p){const o=e.EpF();e.TgZ(0,"app-mark-as-done-button",10),e.NdJ("changeDone$",function(b){return e.CHM(o),e.oxw().changeDone(b)}),e.qZA()}if(2&p){const o=e.oxw();e.Q6J("isDone",o.isDone)}}function W(p,C){if(1&p){const o=e.EpF();e.TgZ(0,"ion-button",11),e.NdJ("click",function(){return e.CHM(o),e.oxw().swapMeal()}),e._UZ(1,"img",12),e.TgZ(2,"span"),e._uU(3,"Swap"),e.qZA()()}}function $(p,C){1&p&&(e.TgZ(0,"div",50),e._UZ(1,"img",51),e.TgZ(2,"span"),e._uU(3,"Repeated meal"),e.qZA()())}function K(p,C){1&p&&(e.TgZ(0,"div",52),e._uU(1," You\u2019ve chosen to have this meal again later in the week. If you want to cook extra portions now, to save as leftovers for later, then change the servings on the recipe. "),e.qZA())}function X(p,C){1&p&&(e.TgZ(0,"div",53),e._uU(1," Changing servings on a recipe will not alter your meal plan or shopping list. Make sure to adjust the servings on the meal plan itself if you wish to save these changes and recalculate your shopping list accordingly. "),e.qZA())}function V(p,C){if(1&p&&(e.TgZ(0,"span",56),e._uU(1),e.qZA()),2&p){const o=C.$implicit;e.xp6(1),e.Oqu(o.tag)}}function ee(p,C){if(1&p&&(e.TgZ(0,"div",54),e.YNc(1,V,2,1,"span",55),e.qZA()),2&p){const o=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",o.mainTags)}}function ne(p,C){if(1&p&&(e.TgZ(0,"div",57)(1,"div",40)(2,"h2",41),e._UZ(3,"ion-icon",58),e.TgZ(4,"span"),e._uU(5,"Notes"),e.qZA()()(),e._UZ(6,"div",47),e.qZA()),2&p){const o=e.oxw(2);e.xp6(6),e.Q6J("innerHtml",null==o.recipe?null:o.recipe.notes,e.oJD)}}function te(p,C){if(1&p&&(e.TgZ(0,"span",56),e._uU(1),e.qZA()),2&p){const o=C.$implicit;e.xp6(1),e.Oqu(o.tag)}}function oe(p,C){if(1&p&&(e.TgZ(0,"div",59),e.YNc(1,te,2,1,"span",55),e.qZA()),2&p){const o=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",o.otherTags)}}function ie(p,C){if(1&p){const o=e.EpF();e.TgZ(0,"article",13)(1,"div",14)(2,"figure"),e._UZ(3,"img",15),e.YNc(4,$,4,0,"div",16),e.TgZ(5,"div",17)(6,"app-favourite",18),e.NdJ("favouriteChanged",function(b){return e.CHM(o),e.oxw().favouriteChange(b)}),e.qZA(),e.TgZ(7,"ion-button",19),e.NdJ("click",function(){return e.CHM(o),e.oxw().print()}),e._UZ(8,"ion-icon",20),e.qZA()()(),e.TgZ(9,"h1"),e._uU(10),e.qZA(),e._UZ(11,"p",21),e.YNc(12,K,2,0,"div",22),e.YNc(13,X,2,0,"div",23),e.TgZ(14,"div",24)(15,"div",25)(16,"div",26)(17,"div",27)(18,"div",28)(19,"ion-button",29),e.NdJ("click",function(){return e.CHM(o),e.oxw().changeServings("minus")}),e._UZ(20,"ion-icon",30),e.qZA(),e.TgZ(21,"strong"),e._uU(22),e.qZA(),e.TgZ(23,"ion-button",31),e.NdJ("click",function(){return e.CHM(o),e.oxw().changeServings("plus")}),e._UZ(24,"ion-icon",32),e.qZA()(),e.TgZ(25,"span"),e._uU(26),e.qZA()(),e._UZ(27,"div",33),e.TgZ(28,"div",34),e._UZ(29,"strong",35),e.TgZ(30,"span"),e._uU(31,"Prepare"),e.qZA()(),e._UZ(32,"div",33),e.TgZ(33,"div",36),e._UZ(34,"strong",35),e.TgZ(35,"span"),e._uU(36,"Cook"),e.qZA()()(),e.YNc(37,ee,2,1,"div",37),e.qZA(),e._UZ(38,"app-nutrition-facts",38),e.qZA(),e.TgZ(39,"div",39)(40,"div",40)(41,"h2",41),e._uU(42,"Ingredients"),e.qZA(),e.TgZ(43,"div",42)(44,"button",43),e.NdJ("click",function(){e.CHM(o);const b=e.oxw();return b.switchUnits(b.Units.Metric)}),e._uU(45," Metric units "),e.qZA(),e.TgZ(46,"button",44),e.NdJ("click",function(){e.CHM(o);const b=e.oxw();return b.switchUnits(b.Units.Imperial)}),e._uU(47," Imperial units "),e.qZA()()(),e._UZ(48,"app-ingredients-table",45),e.qZA(),e.TgZ(49,"div",46)(50,"div",40)(51,"h2",41),e._uU(52,"Method"),e.qZA()(),e._UZ(53,"div",47),e.qZA(),e.YNc(54,ne,7,1,"div",48),e.YNc(55,oe,2,1,"div",49),e.qZA()()}if(2&p){const o=e.oxw();e.xp6(3),e.Q6J("src",null==o.recipe?null:o.recipe.image_url,e.LSH),e.xp6(1),e.Q6J("ngIf",o.isRepeated),e.xp6(2),e.Q6J("favourite",null==o.recipe?null:o.recipe.is_favourite)("id",null==o.recipe?null:o.recipe.id)("favouriteId",null==o.recipe||null==o.recipe.favourite?null:o.recipe.favourite.id),e.xp6(4),e.hij(" ",null==o.recipe?null:o.recipe.name," "),e.xp6(1),e.Q6J("innerHTML",null==o.recipe?null:o.recipe.summary,e.oJD),e.xp6(1),e.Q6J("ngIf",o.isRepeated),e.xp6(1),e.Q6J("ngIf",o.servingsChanged),e.xp6(9),e.Oqu(o.numberServings),e.xp6(4),e.hij("Serving",o.numberServings>1?"s":"",""),e.xp6(3),e.Q6J("innerHtml",o.formatTime(null==o.recipe?null:o.recipe.prep_time),e.oJD),e.xp6(
15),e.Q6J("innerHtml",o.formatTime(null==o.recipe?null:o.recipe.cook_time),e.oJD),e.xp6(3),e.Q6J("ngIf",(null==o.mainTags?null:o.mainTags.length)>0),e.xp6(1),e.Q6J("calories",null==o.recipe?null:o.recipe.calories)("carbohydrate",null==o.recipe?null:o.recipe.carbs)("protein",null==o.recipe?null:o.recipe.protein)("fat",null==o.recipe?null:o.recipe.fat)("fibre",null==o.recipe?null:o.recipe.fibre),e.xp6(6),e.ekj("button_green-text",o.units!==o.Units.Metric)("button_outline-green",o.units!==o.Units.Metric)("button_fill",o.units===o.Units.Metric)("button_outline-transparent",o.units===o.Units.Metric)("button_fill-dark-green",o.units===o.Units.Metric),e.xp6(2),e.ekj("button_green-text",o.units!==o.Units.Imperial)("button_outline-green",o.units!==o.Units.Imperial)("button_fill",o.units===o.Units.Imperial)("button_outline-transparent",o.units===o.Units.Imperial)("button_fill-dark-green",o.units===o.Units.Imperial),e.xp6(2),e.Q6J("ingredients",o.getIngredients(o.recipe,o.units)),e.xp6(5),e.Q6J("innerHtml",null==o.recipe?null:o.recipe.cooking_method,e.oJD),e.xp6(1),e.Q6J("ngIf",!!o.recipe.notes),e.xp6(1),e.Q6J("ngIf",(null==o.otherTags?null:o.otherTags.length)>0)}}const q=["Restrictions","Suitable for"];let ae=(()=>{class p{constructor(o,u,b,k,D,S,I,E){this.recipesSvc=o,this.mealSvc=u,this.weeklyGoalsSvc=b,this.platform=k,this.printer=D,this.pdfGenerator=S,this.file=I,this.printSvc=E,this.servingsChanged=!1,this.getMeasure=f.t,this.formatTime=_.m,this.getIngredients=_.A,this.generateRecipePrintableHTML=c.t,this.Units=P.nL,this.numberServings=1,this.units=P.nL.Metric,this.closeEventEmitter=new e.vpe,this.swapEventEmitter=new e.vpe,this.favouriteChanged=new e.vpe,this.isDoneChange=new e.vpe,this.recipeNotFound=new e.vpe}get isNative(){return(0,m.LR)(this.platform)}get isIos(){return this.platform.is("ios")}ngOnInit(){return(0,x.mG)(this,void 0,void 0,function*(){yield this.getRecipe()})}dismiss(){this.closeEventEmitter.emit()}getRecipe(){return(0,x.mG)(this,void 0,void 0,function*(){this.recipe=yield this.recipesSvc.getRecipe(this.id,this.numberServings),this.recipe?(this.mainTags=this.recipe.tags.filter(o=>o.tag_group&&q.includes(o.tag_group)),this.otherTags=this.recipe.tags.filter(o=>o.tag_group&&!q.includes(o.tag_group))):this.recipeNotFound.emit()})}switchUnits(o){this.units=o}changeServings(o){return(0,x.mG)(this,void 0,void 0,function*(){if(this.servingsChanged=!0,"minus"!==o||1!==this.numberServings){switch(o){case"plus":this.numberServings+=1;break;case"minus":this.numberServings-=1}yield this.getRecipe()}})}favouriteChange(o){this.favouriteChanged.emit(o)}
1changeDone(o){return(0,x.mG)(this,void 0,void 0,function*(){const u=yield this.mealSvc.updateMealAsDone(this.mealId,o);o&&this.weeklyGoalsSvc.fetchWeeklyGoals(),u&&(this.isDone=o,this.isDoneChange.emit(this.isDone))})}swapMeal(){this.swapEventEmitter.emit()}print(){if(this.recipe)if(this.isNative){const o=this.generateRecipePrintableHTML(this.recipe,this.numberServings,this.units,this.isRepeated);this.downloadPDF(o)}else{const o=window.open("","","left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0");o.document.write(this.generateRecipePrintableHTML(this.recipe,this.numberServings,this.units,this.isRepeated)),o.document.close(),o.focus(),o.print()}}downloadPDF(o){var u;return(0,x.mG)(this,void 0,void 0,function*(){const b=(null===(u=this.recipe)||void 0===u?void 0:u.name)?this.recipe.name:"Recipe";if(this.isIos){const k="printSingleRecipePDF.pdf";this.pdfGenerator.fromData(o,{documentSize:"A4",type:"base64"}).then(S=>{this.printSvc.savebase64AsPDF(this.file.tempDirectory,k,S,"application/pdf",b)}).catch(S=>S)}else this.printSvc.printFile(o,b)})}}return p.\u0275fac=function(o){return new(o||p)(e.Y36(d.v),e.Y36(M.T),e.Y36(h._),e.Y36(v.t4),e.Y36(l.F),e.Y36(w.r),e.Y36(y.$),e.Y36(A.$))},p.\u0275cmp=e.Xpm({type:p,selectors:[["app-recipe-popup"]],inputs:{id:"id",mealId:"mealId",showDone:"showDone",showSwap:"showSwap",isDone:"isDone",isRepeated:"isRepeated",numberServings:"numberServings",units:"units"},outputs:{closeEventEmitter:"closeEventEmitter",swapEventEmitter:"swapEventEmitter",favouriteChanged:"favouriteChanged",isDoneChange:"isDoneChange",recipeNotFound:"recipeNotFound"},decls:10,vars:3,consts:[[1,"popup","popup-wider","popup-new"],[1,"popup__wrapper","popup__wrapper-new"],[1,"popup__header-wrapper","ion-no-border"],[1,"popup__header-inner"],["alternate","true",3,"isDone","changeDone$",4,"ngIf"],["size","small","color","secondary","class","popup__header-button",3,"click",4,"ngIf"],["type","button","id","close-button","tappable","",1,"button","button_icon","popup__header-close",3,"click"],["src","assets/images/icons/cross.svg","alt",""],[1,"popup__content-wrapper"],["class","popup__article popup__article-new","id","recipeArea",4,"ngIf"],["alternate","true",3,"isDone","changeDone$"],["size","small","color","secondary",1,"popup__header-button",3,"click"],["src","assets/images/icons/swap.svg","alt",""],["id","recipeArea",1,"popup__article","popup__article-new"],[1,"popup__outer","popup__outer-new"],["alt","",1,"w-100",3,"src"],["class","repeated-meal",4,"ngIf"],[1,"right-buttons"],["alternate","true","type","Recipe",3,"favourite","id","favouriteId","favouriteChanged"],["fill","clear","title","Print",1,"print-button",3,"click"],["name","print-outline","slot","icon-only"],["id","summary","appLinkText","",1,"rich-text",3,"innerHTML"],["class","popup__recipe-repeated-message",4,"ngIf"],["class","popup__recipe-warning-message",4,"ngIf"],[1,"two-columns"],[1,"two-rows"],[1,"popup__article-meta"],[1,"popup__article-meta-item","popup__article-meta-item_full"],[1,"popup__article-meta-item-inner"],["id","minus-button","size","small",3,"click"],["name","remove-outline"],["id","plus-button","size","small",3,"click"],["name","add-outline"],[1,"popup__divider"],["id","prep_time",1,"popup__article-meta-item"],[3,"innerHtml"],["id","cook_time",1,"popup__article-meta-item"],["class","popup__recipe-tags",4,"ngIf"],[3,"calories","carbohydrate","protein","fat","fibre"],[1,"popup_recipe-ingredients"],[1,"popup__subheader"],[1,"popup__subheader__title"],[1,"unit-buttons"],["type","button","id","switch-metric-unit",1,"button","button_medium","button_rounded","button_outline",3,"click"],["type","button","id","switch-imperial-unit",1,"button","button_medium","button_rounded","button_outline",3,"click"],[3,"ingredients"],[1,"popup__recipe-method"],["appLinkText","",1,"rich-text","medium",3,"innerHtml"],["class","popup__recipe-notes",4,"ngIf"],["class","popup__recipe-tags popup__recipe-tags-bottom",4,"ngIf"],[1,"repeated-meal"],["src","assets/images/icons/repeated-marker.svg","alt","Repeated meal"],[1,"popup__recipe-repeated-message"],[1,"popup__recipe-warning-message"],[1,"popup__recipe-tags"],["class","popup__recipe-tag",4,"ngFor","ngForOf"],[1,"popup__recipe-tag"],[1,"popup__recipe-notes"],["name","information-circle-outline"],[1,"popup__recipe-tags","popup__recipe-tags-bottom"]],template:function(o,u){1&o&&(e.TgZ(0,"section",0)(1,"div",1)(2,"ion-header",2)(3,"div",3),e.YNc(4,B,1,1,"app-mark-as-done-button",4),e.YNc(5,W,4,0,"ion-button",5),e.qZA(),e.TgZ(6,"button",6),e.NdJ("click",function(){return u.dismiss()}),e._UZ(7,"img",7),e.qZA()(),e.TgZ(8,"ion-content",8),e.YNc(9,ie,56,43,"article",9),e.qZA()()()),2&o&&(e.xp6(4),e.Q6J("ngIf",u.recipe&&u.mealId&&u.showDone),e.xp6(1),e.Q6J("ngIf",u.recipe&&u.showSwap),e.xp6(4),e.Q6J("ngIf",u.recipe))},directives:[v.Gu,R.O5,N.P,v.YG,v.W2,F.I,v.gu,Z.v,R.sg,G,j.K],styles:[".popup__article[_ngcontent-%COMP%]{padding-top:0}.popup__outer.popup__outer-new[_ngcontent-%COMP%]{padding-top:20px}figure[_ngcontent-%COMP%]{position:relative;display:flex}figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:440px;-o-object-fit:cover;object-fit:cover;border-radius:9px}@media only screen and (max-width: 767px){figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:240px}}figure[_ngcontent-%COMP%] .repeated-meal[_ngcontent-%COMP%]{position:absolute;
1left:24px;bottom:24px;height:36px;padding:8px 12px 8px 6px;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-100);color:var(--color-dark-green);border-radius:9px;font-size:16px;font-weight:600;line-height:20px;gap:2px}@media only screen and (max-width: 767px){figure[_ngcontent-%COMP%] .repeated-meal[_ngcontent-%COMP%]{padding:8px 12px}}figure[_ngcontent-%COMP%] .repeated-meal[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:0}@media only screen and (max-width: 767px){figure[_ngcontent-%COMP%] .repeated-meal[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}}@media only screen and (max-width: 767px){figure[_ngcontent-%COMP%] .repeated-meal[_ngcontent-%COMP%]{left:16px;bottom:16px}}figure[_ngcontent-%COMP%] .right-buttons[_ngcontent-%COMP%]{position:absolute;right:24px;bottom:24px;display:flex;gap:16px}@media only screen and (max-width: 767px){figure[_ngcontent-%COMP%] .right-buttons[_ngcontent-%COMP%]{right:16px;bottom:16px}}figure[_ngcontent-%COMP%] .right-buttons[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:48px;height:48px;margin:0;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-100);border-radius:9px;--padding-start: 0;--padding-end: 0}figure[_ngcontent-%COMP%] .right-buttons[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:24px}h1[_ngcontent-%COMP%]{margin:48px 0 0;font-size:24px;font-weight:600;line-height:112%}@media only screen and (max-width: 767px){h1[_ngcontent-%COMP%]{margin-top:16px;font-size:20px}}p[_ngcontent-%COMP%]{margin:16px 0 0;font-size:16px;font-weight:400;line-height:150%}@media only screen and (max-width: 767px){p[_ngcontent-%COMP%]{margin-top:8px}}p[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.popup__recipe-warning-message[_ngcontent-%COMP%]{margin-top:24px;background:var(--color-lighter-red);border-radius:15px;padding:16px;font-size:18px;font-weight:400;line-height:150%;color:var(--color-gray-600)}@media only screen and (max-width: 767px){.popup__recipe-warning-message[_ngcontent-%COMP%]{font-size:16px}}.popup__recipe-repeated-message[_ngcontent-%COMP%]{margin-top:24px;background:var(--color-light-green);border-radius:15px;padding:16px;font-size:18px;font-weight:400;line-height:150%;color:var(--color-gray-600)}@media only screen and (max-width: 767px){.popup__recipe-repeated-message[_ngcontent-%COMP%]{font-size:16px}}.two-columns[_ngcontent-%COMP%]{margin-top:24px;display:flex;gap:16px}@media only screen and (max-width: 767px){.two-columns[_ngcontent-%COMP%]{flex-direction:column;margin-top:16px}}.two-rows[_ngcontent-%COMP%]{flex:1;padding:16px;background:var(--color-gray-100);display:flex;flex-direction:column;gap:16px;border-radius:9px}@media only screen and (max-width: 767px){.two-rows[_ngcontent-%COMP%]{padding:0;background:transparent}}.popup__article-meta[_ngcontent-%COMP%]{background:#fff;border-radius:9px;padding:16px;display:flex;gap:16px}@media only screen and (max-width: 767px){.popup__article-meta[_ngcontent-%COMP%]{background:var(--color-gray-100)}}.popup__divider[_ngcontent-%COMP%]{width:1px;height:100%;background:var(--color-gray-200)}.popup__article-meta-item[_ngcontent-%COMP%]{flex:1;text-align:center;display:flex;flex-direction:column;gap:4px}.popup__article-meta-item[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:22px;font-weight:600;line-height:112%;letter-spacing:.25px;color:var(--color-dark)}.popup__article-meta-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:400;line-height:150%;color:var(--color-gray-600)}.popup__article-meta-item-inner[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:center;justify-content:center}.popup__article-meta-item-inner[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:24px;height:24px;flex:none;margin:0;--border-radius: 4px;--background: #fff;--color: var(--ion-color-primary);--padding-start: 0;--padding-end: 0;--box-shadow: 0px 1px 0px 0px #efefef, 0px -1px 0px 0px #efefef, -1px 0px 0px 0px #efefef, 1px 0px 0px 0px #efefef;--ripple-color: var(--color-light-green);--background-hover-opacity: .1;--background-hover: var(--color-light-green);--background-activated-opacity: .2;--background-activated: var(--color-light-green)}.popup__article-meta-item-inner[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:18px;--ionicon-stroke-width: 64px}.popup__article-meta-item-inner[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{flex:none}app-nutrition-facts[_ngcontent-%COMP%]{flex:none;width:100%;max-width:290px}@media only screen and (max-width: 767px){app-nutrition-facts[_ngcontent-%COMP%]{max-width:100%}}.popup__recipe-tags[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap}.popup__recipe-tags-bottom[_ngcontent-%COMP%]{margin-top:40px}.popup__recipe-tag[_ngcontent-%COMP%]{display:inline-block;color:var(--color-dark);background:var(--color-light-green);padding:8px 12px;font-size:16px;font-weight:400;line-height:150%;border-radius:131px}.popup__subheader[_ngcontent-%COMP%]{margin:0;display:flex;align-items:center;justify-content:space-between}@media only screen and (max-width: 767px){.popup__subheader[_ngcontent-%COMP%]{flex-direction:column;gap:8px;align-items:flex-start}}.popup__subheader__title[_ngcontent-%COMP%]{margin:0;font-size:24px;font-weight:600;line-height:112%;display:flex;align-items:center;gap:8px;color:var(--color-dark)}.popup__subheader__title[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{flex:none;font-size:24px}.popup__subheader__title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{line-height:inherit}@media only screen and (max-width: 767px){.popup__subheader__title[_ngcontent-%COMP%]{text-transform:none;font-size:20px}}.popup_recipe-ingredients[_ngcontent-%COMP%]{margin-top:40px}.unit-buttons[_ngcontent-%COMP%]{display:flex;gap:10px}app-ingredients-table[_ngcontent-%COMP%]{margin-top:16px}.popup__recipe-method[_ngcontent-%COMP%]{margin-top:40px}.popup__recipe-method[_ngcontent-%COMP%] .rich-text[_ngcontent-%COMP%]{font-size:18px;font-weight:400;line-height:150%;color:var(--color-gray-700)}@media only screen and (max-width: 767px){.popup__recipe-method[_ngcontent-%COMP%] .rich-text[_ngcontent-%COMP%]{font-size:16px}}.popup__recipe-notes[_ngcontent-%COMP%]{margin-top:40px;background:var(--color-light-green);border-radius:15px;padding:16px;display:flex;flex-direction:column;gap:4px}.popup__recipe-notes[_ngcontent-%COMP%] .popup__subheader__title[_ngcontent-%COMP%]{font-size:20px;line-height:112%}@media only screen and (max-width: 767px){.popup__recipe-notes[_ngcontent-%COMP%] .popup__subheader__title[_ngcontent-%COMP%]{font-size:18px}}.popup__recipe-notes[_ngcontent-%COMP%] .rich-text[_ngcontent-%COMP%]{font-size:18px;font-weight:400;line-height:150%;color:var(--color-gray-600)}@media only screen and (max-width: 767px){.popup__recipe-notes[_ngcontent-%COMP%] .rich-text[_ngcontent-%COMP%]{font-size:16px}}.print[_ngcontent-%COMP%]{text-align:end}"]}),p})()},82933:(U,O,r)=>{r.d(O,{x:()=>P});var x=r(5e3),e=r(49306);let P=(()=>{class f{constructor(c){this._onboardingWalkthroughsService=c}hideTabs(){var c,_;const d=document.getElementById("myTabBar"),M=document.getElementById("home-page-days-header");this._onboardingWalkthroughsService.changeOnboardingFlagsChecked(!0),d&&"none"!==(null===(c=d.style)||void 0===c?void 0:c.display)&&(d.style.display="none"),M&&"none"!==(null===(_=M.style)||void 0===_?void 0:_.display)&&(M.style.display="none")}showTabs(){var c,_;const d=document.getElementById("myTabBar"),M=document.getElementById("home-page-days-header");d&&"flex"!==(null===(c=null==d?void 0:d.style)||void 0===c?void 0:c.display)&&(d.style.display="flex"),M&&"flex"!==(null===(_=null==M?void 0:M.style)||void 0===_?void 0:_.display)&&(M.style.display="flex")}}return f.\u0275fac=function(c){return new(c||f)(x.LFG(e.G))},f.\u0275prov=x.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"}),f})()},21355:(U,O,r)=>{r.d(O,{v:()=>d});var x=r(97582),e=r(92340),P=r(68429),f=r(5e3),m=r(90603),c=r(83691),_=r(22834);let d=(()=>{class M{constructor(v,l,w,y){this.platform=v,this.router=l,this.ngZone=w,this.nativeAuth=y}clickHandler(v){const l=v.target.closest("a");if((null==l?void 0:l.href)&&l.href.includes(e.N.appURL)){const w=l.href.replace(e.N.appURL,"");v.preventDefault(),this.ngZone.run(()=>{this.router.navigateByUrl(w)})}else null!==l&&(v.preventDefault(),this.openLink(l.href))}openLink(v){return(0,x.mG)(this,void 0,void 0,function*(){(0,P.LR)(this.platform)?this.nativeAuth.openUrl(v):window.open(v,"_blank")})}}return M.\u0275fac=function(v){return new(v||M)(f.Y36(m.t4),f.Y36(c.F0),f.Y36(f.R0b),f.Y36(_.$))},M.\u0275dir=f.lG2({type:M,selectors:[["","appLinkText",""]],hostBindings:function(v,l){1&v&&f.NdJ("click",function(y){return l.clickHandler(y)})}}),M})()},53338:(U,O,r)=>{r.d(O,{i:()=>f});var x=r(97582),e=r(5e3),P=r(54849);let f=(()=>{class m{constructor(_){this.connectSvc=_}getTags(){return(0,x.mG)(this,void 0,void 0,function*(){try{this.tagGroups=yield this.connectSvc.get("tag_groups",!0)}catch(_){this.connectSvc.handleError(_)}})}getSelectedTags(){var _;let d=[];return null===(_=this.tagGroups)||void 0===_||_.forEach(M=>d=d.concat(M.tags.filter(h=>h.selected).map(h=>h.id))),d}unselectTags(){this.tagGroups.forEach(_=>
1_.tags.forEach(d=>d.selected=!1))}}return m.\u0275fac=function(_){return new(_||m)(e.LFG(P.F))},m.\u0275prov=e.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"}),m})()}}]);
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.