(function(e){function t(t){for(var n,a,s=t[0],c=t[1],u=t[2],d=0,l=[];d{child} al primario {parent}","merge_confirmation":"Sostituisci {source} con {target}","move_selection":"Scegli un primario {type} dove spostare {source}.","merge_selection":"Sostituisci tutte le voci di {source} con il {type} selezionato.","Root":"Radice","Ignore_Shopping":"Ignora lista della spesa","delete_confirmation":"Sei sicuro di voler eliminare {source}?","Description":"Descrizione","Icon":"Icona","Unit":"Unità","No_ID":"ID non trovato, non è possibile eliminare.","Recipe_Book":"Libro di Ricette","create_title":"Nuovo {type}","edit_title":"Modifica {type}","Name":"Nome","Recipe":"Ricetta","delete_title":"Elimina {type}","Unrated":"Senza valutazione","New_Unit":"Nuova unità di misura","move_title":"Sposta {type}","Food":"Alimento","Delete_Food":"Elimina alimento","Edit_Food":"Modifica alimento","Move_Food":"Sposta alimento","New_Food":"Nuovo alimento","Hide_Food":"Nascondi alimento","merge_title":"Unisci {type}","Key_Shift":"Maiusc","del_confirmation_tree":"Sei sicuro di voler eliminare {source} e tutti gli elementi dipendenti?","Disable_Amount":"Disabilita Quantità","Key_Ctrl":"Ctrl","No_Results":"Nessun risultato","Create_New_Shopping Category":"Crea nuova categoria di spesa","Create_New_Keyword":"Aggiungi nuova parola chiave","and_up":"& Su","step_time_minutes":"Tempo dello step in minuti","confirm_delete":"Sei sicuro di voler eliminare questo {object}?","Show_as_header":"Mostra come intestazione","Hide_as_header":"Nascondi come intestazione","Copy_template_reference":"Copia riferimento template","Save_and_View":"Salva & Mostra","Text":"Testo","Edit_Recipe":"Modifica Ricetta","Move_Up":"Sposta Sopra","Move_Down":"Sposta Sotto","Step_Name":"Nome dello Step","Step_Type":"Tipo di Step","Enable_Amount":"Abilita Quantità","Add_Step":"Aggiungi Step","Note":"Nota","Create_New_Food":"Aggiungi nuovo alimento","Make_Header":"Crea Intestazione","Make_Ingredient":"Crea Ingrediente","Create_New_Unit":"Aggiungi nuova unità","Instructions":"Istruzioni","Time":"Tempo","Shopping_Category":"Categoria di spesa","Meal_Plan_Days":"Piani alimentari futuri","tree_root":"Radice dell\'albero","Automation":"Automazione","Parameter":"Parametro","Type":"Tipo","Automate":"Automatizza","create_rule":"e crea automazione"}')},"118a":function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("tr",{on:{click:function(t){return e.$emit("checked-state-changed",e.ingredient)}}},[e.ingredient.is_header?[r("td",{attrs:{colspan:"5"}},[r("b",[e._v(e._s(e.ingredient.note))])])]:[e.detailed?r("td",{staticClass:"d-print-non"},[e.ingredient.checked?r("i",{staticClass:"far fa-check-circle text-success"}):e._e(),e.ingredient.checked?e._e():r("i",{staticClass:"far fa-check-circle text-primary"})]):e._e(),r("td",[0!==e.ingredient.amount?r("span",{domProps:{innerHTML:e._s(e.calculateAmount(e.ingredient.amount))}}):e._e()]),r("td",[null===e.ingredient.unit||e.ingredient.no_amount?e._e():r("span",[e._v(e._s(e.ingredient.unit.name))])]),r("td",[null!==e.ingredient.food?[null!==e.ingredient.food.recipe?r("a",{attrs:{href:e.resolveDjangoUrl("view_recipe",e.ingredient.food.recipe),target:"_blank",rel:"noopener noreferrer"}},[e._v(e._s(e.ingredient.food.name))]):e._e(),null===e.ingredient.food.recipe?r("span",[e._v(e._s(e.ingredient.food.name))]):e._e()]:e._e()],2),e.detailed?r("td",[e.ingredient.note?r("div",[e.ingredient.note.length>15?r("span",{directives:[{name:"b-popover",rawName:"v-b-popover.hover",value:e.ingredient.note,expression:"ingredient.note",modifiers:{hover:!0}}],staticClass:"d-print-none touchable"},[r("i",{staticClass:"far fa-comment"})]):r("span",[e._v(" "+e._s(e.ingredient.note)+" ")]),r("div",{staticClass:"d-none d-print-block"},[r("i",{staticClass:"far fa-comment-alt d-print-none"}),e._v(" "+e._s(e.ingredient.note)+" ")])]):e._e()]):e._e()]],2)},i=[],o=(r("a9e3"),r("fa7d")),a={name:"Ingredient",props:{ingredient:Object,ingredient_factor:{type:Number,default:1},detailed:{type:Boolean,default:!0}},mixins:[o["d"]],data:function(){return{checked:!1}},methods:{calculateAmount:function(e){return Object(o["g"])(e,this.ingredient_factor)}}},s=a,c=(r("1efb"),r("2877")),u=Object(c["a"])(s,n,i,!1,null,"18b1d8a0",null);t["a"]=u.exports},1263:function(e,t,r){},"1efb":function(e,t,r){"use strict";r("fe16")},2165:function(e){e.exports=JSON.parse('{"err_fetching_resource":"","err_creating_resource":"","err_updating_resource":"","err_deleting_resource":"","success_fetching_resource":"","success_creating_resource":"","success_updating_resource":"","success_deleting_resource":"","import_running":"","all_fields_optional":"","convert_internal":"","show_only_internal":"","Log_Recipe_Cooking":"","External_Recipe_Image":"","Add_to_Shopping":"","Add_to_Plan":"","Step_start_time":"","Sort_by_new":"","Recipes_per_page":"","Manage_Books":"","Meal_Plan":"","Select_Book":"","Recipe_Image":"","Import_finished":"","View_Recipes":"","Log_Cooking":"","New_Recipe":"","Url_Import":"","Reset_Search":"","Recently_Viewed":"","Load_More":"","Keywords":"","Books":"","Proteins":"","Fats":"","Carbohydrates":"","Calories":"","Nutrition":"","Date":"","Share":"","Export":"","Copy":"","Rating":"","Close":"","Link":"","Add":"","New":"","Success":"","Failure":"","Ingredients":"","Supermarket":"","Categories":"","Category":"","Selected":"","min":"","Servings":"","Waiting":"","Preparation":"","External":"","Size":"","Files":"","File":"","Edit":"","Cancel":"","Delete":"","Open":"","Ok":"","Save":"","Step":"","Search":"","Import":"","Print":"","Settings":"","or":"","and":"","Information":"","Download":"","Create":""}')},"2b2d":function(e,t,r){"use strict";r.d(t,"a",(function(){return w}));r("d3b7"),r("3ca3"),r("ddb0"),r("2b3d"),r("ac1f"),r("5319");var n,i,o,a,s,c,u,d,p=r("9ab4"),l=r("bc3a"),h=r.n(l),f=(r("841c"),r("25f0"),r("b0c0"),"undefined"!==typeof window?localStorage.getItem("BASE_PATH")||"":location.protocol+"//"+location.host),b=function(){function e(e,t,r){void 0===t&&(t=f),void 0===r&&(r=h.a),this.basePath=t,this.axios=r,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}return e}(),m=function(e){function t(t,r){var n=e.call(this,r)||this;return n.field=t,n.name="RequiredError",n}return Object(p["c"])(t,e),t}(Error),v="https://example.com",g=function(e,t,r){if(null===r||void 0===r)throw new m(t,"Required parameter "+t+" was null or undefined when calling "+e+".")},O=function(e){for(var t=[],r=1;re.text_length?r("span",[e._v(" "+e._s(e.recipe.description.substr(0,e.text_length)+"…")+" ")]):e._e(),e.recipe.description.length<=e.text_length?r("span",[e._v(" "+e._s(e.recipe.description)+" ")]):e._e()]:e._e(),r("p",{staticClass:"mt-1"},[r("last-cooked",{attrs:{recipe:e.recipe}}),r("keywords",{staticStyle:{"margin-top":"4px"},attrs:{recipe:e.recipe}})],1),e.detailed?r("div",{staticClass:"row mt-3"},[r("div",{staticClass:"col-md-12"},[r("h6",{staticClass:"card-title"},[r("i",{staticClass:"fas fa-pepper-hot"}),e._v(" "+e._s(e.$t("Ingredients")))]),r("table",{staticClass:"table table-sm text-wrap"},[e._l(e.recipe.steps,(function(t){return[e._l(t.ingredients,(function(e){return[r("Ingredient",{key:e.id,attrs:{detailed:!1,ingredient:e,ingredient_factor:1}})]}))]}))],2)])]):e._e(),e.recipe.internal?e._e():r("b-badge",{attrs:{pill:"",variant:"info"}},[e._v(e._s(e.$t("External")))])]:[e._v(e._s(e.meal_plan.note))]],2)],1),void 0!==e.footer_text?r("b-card-footer",[r("i",{class:e.footer_icon}),e._v(" "+e._s(e.footer_text)+" ")]):e._e()],1)},i=[],o=r("fc0d"),a=r("81d5"),s=r("fa7d"),c=r("ca5b"),u=r("c1df"),d=r.n(u),p=r("a026"),l=r("830a"),h=r("118a");p["default"].prototype.moment=d.a;var f={name:"RecipeCard",mixins:[s["d"]],components:{LastCooked:l["a"],RecipeRating:c["a"],Keywords:a["a"],RecipeContextMenu:o["a"],Ingredient:h["a"]},props:{recipe:Object,meal_plan:Object,footer_text:String,footer_icon:String},computed:{detailed:function(){return void 0!==this.recipe.steps},text_length:function(){return this.detailed?200:120},recipe_image:function(){return null==this.recipe||null===this.recipe.image?window.IMAGE_PLACEHOLDER:this.recipe.image}},methods:{clickUrl:function(){return null!==this.recipe?Object(s["k"])("view_recipe",this.recipe.id):Object(s["k"])("view_plan_entry",this.meal_plan.id)}},directives:{hover:{inserted:function(e){e.addEventListener("mouseenter",(function(){e.classList.add("shadow")})),e.addEventListener("mouseleave",(function(){e.classList.remove("shadow")}))}}}},b=f,m=r("2877"),v=Object(m["a"])(b,n,i,!1,null,"2338d8bc",null);t["default"]=v.exports},"6ce2":function(e){e.exports=JSON.parse('{"Import":"Importieren","import_running":"Import läuft, bitte warten!","Import_finished":"Import fertig","View_Recipes":"Rezepte Ansehen","Information":"Information","all_fields_optional":"Alle Felder sind optional und können leer gelassen werden.","convert_internal":"Zu internem Rezept wandeln","Log_Recipe_Cooking":"Kochen protokollieren","External_Recipe_Image":"Externes Rezept Bild","Add_to_Book":"Zu Buch hinzufügen","Add_to_Shopping":"Zu Einkaufsliste hinzufügen","Add_to_Plan":"Zu Plan hinzufügen","Step_start_time":"Schritt Startzeit","Select_Book":"Buch wählen","Recipe_Image":"Rezept Bild","Log_Cooking":"Kochen protokollieren","Proteins":"Proteine","Fats":"Fette","Carbohydrates":"Kohlenhydrate","Calories":"Kalorien","Nutrition":"Nährwerte","Keywords":"Stichwörter","Books":"Bücher","show_only_internal":"Nur interne Rezepte anzeigen","Ingredients":"Zutaten","min":"Min","Servings":"Portionen","Waiting":"Wartezeit","Preparation":"Vorbereitung","Edit":"Bearbeiten","Open":"Öffnen","Save":"Speichern","Step":"Schritt","Search":"Suchen","Print":"Drucken","New_Recipe":"Neues Rezept","Url_Import":"URL Import","Reset_Search":"Suche zurücksetzen","or":"oder","and":"und","Recently_Viewed":"Kürzlich angesehen","External":"Extern","Settings":"Einstellungen","Meal_Plan":"Speiseplan","Date":"Datum","Share":"Teilen","Export":"Exportieren","Rating":"Bewertung","Close":"Schließen","Add":"Hinzufügen","Copy":"Kopieren","New":"Neu","Categories":"Kategorien","Category":"Kategorie","Selected":"Ausgewählt","Supermarket":"Supermarkt","Files":"Dateien","Size":"Größe","success_fetching_resource":"Ressource erfolgreich abgerufen!","Download":"Herunterladen","Success":"Erfolgreich","err_fetching_resource":"Ein Fehler trat während dem Abrufen einer Ressource auf!","err_creating_resource":"Ein Fehler trat während dem Erstellen einer Ressource auf!","err_updating_resource":"Ein Fehler trat während dem Aktualisieren einer Ressource auf!","success_creating_resource":"Ressource erfolgreich erstellt!","success_updating_resource":"Ressource erfolgreich aktualisiert!","File":"Datei","Delete":"Löschen","err_deleting_resource":"Ein Fehler trat während dem Löschen einer Ressource auf!","Cancel":"Abbrechen","success_deleting_resource":"Ressource erfolgreich gelöscht!","Load_More":"Mehr laden","Ok":"Öffnen"}')},7432:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("multiselect",{attrs:{options:e.objects,"close-on-select":!0,"clear-on-select":!0,"hide-selected":e.multiple,"preserve-search":!0,placeholder:e.lookupPlaceholder,label:e.label,"track-by":"id",multiple:e.multiple,taggable:e.allow_create,"tag-placeholder":e.create_placeholder,loading:e.loading},on:{"search-change":e.search,input:e.selectionChanged,tag:e.addNew},model:{value:e.selected_objects,callback:function(t){e.selected_objects=t},expression:"selected_objects"}})},i=[],o=(r("a9e3"),r("ac1f"),r("841c"),r("b0c0"),r("99af"),r("8e5f")),a=r.n(o),s=r("fa7d"),c={name:"GenericMultiselect",components:{Multiselect:a.a},mixins:[s["a"]],data:function(){return{loading:!1,objects:[],selected_objects:[]}},props:{placeholder:{type:String,default:void 0},model:{type:Object,default:function(){return{}}},label:{type:String,default:"name"},parent_variable:{type:String,default:void 0},limit:{type:Number,default:10},sticky_options:{type:Array,default:function(){return[]}},initial_selection:{type:Array,default:function(){return[]}},multiple:{type:Boolean,default:!0},allow_create:{type:Boolean,default:!1},create_placeholder:{type:String,default:"You Forgot to Add a Tag Placeholder"}},watch:{initial_selection:function(e,t){this.selected_objects=e}},mounted:function(){this.search(""),this.selected_objects=this.initial_selection},computed:{lookupPlaceholder:function(){return this.placeholder||this.model.name||this.$t("Search")}},methods:{search:function(e){var t=this,r={page:1,pageSize:10,query:e};this.genericAPI(this.model,this.Actions.LIST,r).then((function(e){var r,n;t.objects=t.sticky_options.concat(null!==(r=null===(n=e.data)||void 0===n?void 0:n.results)&&void 0!==r?r:e.data)}))},selectionChanged:function(){this.$emit("change",{var:this.parent_variable,val:this.selected_objects})},addNew:function(e){var t=this;this.$emit("new",e),setTimeout((function(){t.search("")}),750)}}},u=c,d=r("2877"),p=Object(d["a"])(u,n,i,!1,null,"157f040e",null);t["a"]=p.exports},"7c15":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r("bc3a"),i=r.n(n),o=r("fa7d");function a(e){var t=Object(o["k"])("api:recipe-detail",e);return void 0!==window.SHARE_UID&&(t+="?share="+window.SHARE_UID),i.a.get(t).then((function(e){return e.data})).catch((function(e){c(e,"There was an error loading a resource!","danger")}))}function s(e){return i.a.post(Object(o["k"])("api:cooklog-list"),e).then((function(e){Object(o["j"])("Saved","Cook Log entry saved!","success")})).catch((function(e){c(e,"There was an error creating a resource!","danger")}))}function c(e,t){if("response"in e){console.log(e.response);var r="statusText"in e.response?e.response.statusText:Object(o["h"])("Error");t+="\n\n"+JSON.stringify(e.response.data),Object(o["j"])(r,t,"danger")}else Object(o["j"])("Error",t,"danger"),console.log(e)}i.a.defaults.xsrfCookieName="csrftoken",i.a.defaults.xsrfHeaderName="X-CSRFTOKEN"},"81d5":function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.recipe.keywords.length>0?r("div",e._l(e.recipe.keywords,(function(t){return r("span",{key:t.id,staticClass:"pl-1"},[r("b-badge",{staticClass:"font-weight-normal",attrs:{pill:"",variant:"light"}},[e._v(e._s(t.label))])],1)})),0):e._e()},i=[],o={name:"Keywords",props:{recipe:Object}},a=o,s=r("2877"),c=Object(s["a"])(a,n,i,!1,null,null,null);t["a"]=c.exports},"830a":function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("span",{staticClass:"pl-1"},[null!==e.recipe.last_cooked?r("b-badge",{staticClass:"font-weight-normal",attrs:{pill:"",variant:"primary"}},[r("i",{staticClass:"fas fa-utensils"}),e._v(" "+e._s(e.formatDate(e.recipe.last_cooked)))]):e._e()],1)},i=[],o=r("c1df"),a=r.n(o),s={name:"LastCooked",props:{recipe:Object},methods:{formatDate:function(e){return a.a.locale(window.navigator.language),a()(e).format("L")}}},c=s,u=r("2877"),d=Object(u["a"])(c,n,i,!1,null,"293dcaf2",null);t["a"]=d.exports},"84cf":function(e,t,r){"use strict";r("a0c0")},9:function(e,t,r){e.exports=r("d315")},9225:function(e,t,r){"use strict";r("159b"),r("d3b7"),r("ddb0"),r("ac1f"),r("466d");var n=r("a026"),i=r("a925");function o(){var e=r("49f8"),t={};return e.keys().forEach((function(r){var n=r.match(/([A-Za-z0-9-_]+)\./i);if(n&&n.length>1){var i=n[1];t[i]=e(r)}})),t}n["default"].use(i["a"]),t["a"]=new i["a"]({locale:Object({NODE_ENV:"production",BASE_URL:""}).VUE_APP_I18N_LOCALE||"en",fallbackLocale:Object({NODE_ENV:"production",BASE_URL:""}).VUE_APP_I18N_FALLBACK_LOCALE||"en",messages:o()})},a0c0:function(e,t,r){},a11c:function(e,t,r){"use strict";r("1263")},a625:function(e){e.exports=JSON.parse('{"import_running":"Er wordt geïmporteerd, even geduld!","all_fields_optional":"Alle velden zijn optioneel en kunnen leeg gelaten worden.","convert_internal":"Zet om naar intern recept","Log_Recipe_Cooking":"Log Bereiding","External_Recipe_Image":"Externe Afbeelding Recept","Add_to_Book":"Voeg toe aan Boek","Add_to_Shopping":"Voeg toe aan Boodschappenlijst","Add_to_Plan":"Voeg toe aan Plan","Step_start_time":"Starttijd stap","Select_Book":"Selecteer Boek","Recipe_Image":"Afbeelding Recept","Import_finished":"Importeren gereed","View_Recipes":"Bekijk Recepten","Log_Cooking":"Log Bereiding","Proteins":"Eiwitten","Fats":"Vetten","Carbohydrates":"Koolhydraten","Calories":"Calorieën","Nutrition":"Voedingswaarde","Date":"Datum","Share":"Deel","Export":"Exporteren","Rating":"Beoordeling","Close":"Sluiten","Add":"Voeg toe","Ingredients":"Ingrediënten","min":"min","Servings":"Porties","Waiting":"Wachten","Preparation":"Bereiding","Edit":"Bewerken","Open":"Open","Save":"Opslaan","Step":"Stap","Search":"Zoeken","Import":"Importeer","Print":"Afdrukken","Information":"Informatie","Keywords":"Etiketten","Books":"Boeken","show_only_internal":"Toon alleen interne recepten","New_Recipe":"Nieuw Recept","Url_Import":"Importeer URL","Reset_Search":"Zoeken resetten","or":"of","and":"en","Recently_Viewed":"Recent bekeken","External":"Externe","Settings":"Instellingen","Meal_Plan":"Maaltijdplan","New":"Nieuw","Supermarket":"Supermarkt","Categories":"Categorieën","Category":"Categorie","Selected":"Geselecteerd","Copy":"Kopie","Link":"Link","Sort_by_new":"Sorteer op nieuw","Recipes_per_page":"Recepten per pagina","Files":"Bestanden","Size":"Grootte","File":"Bestand","err_fetching_resource":"Bij het ophalen van een hulpbron is een foutmelding opgetreden!","err_creating_resource":"Bij het maken van een hulpbron is een foutmelding opgetreden!","err_updating_resource":"Bij het updaten van een hulpbron is een foutmelding opgetreden!","success_fetching_resource":"Hulpbron is succesvol opgehaald!","success_creating_resource":"Hulpbron succesvol aangemaakt!","success_updating_resource":"Hulpbron succesvol geüpdatet!","Success":"Succes","Download":"Download","err_deleting_resource":"Bij het verwijderen van een hulpbron is een foutmelding opgetreden!","success_deleting_resource":"Hulpbron succesvol verwijderd!","Cancel":"Annuleer","Delete":"Verwijder","Ok":"Open","Load_More":"Laad meer","Manage_Books":"Beheer Boeken","Create":"Maak","Failure":"Storing","View":"Bekijk","Recipes":"Recepten","Move":"Verplaats","Parent":"Ouder","move_confirmation":"Verplaats {child} naar ouder {parent}","merge_confirmation":"Vervang {source} with {target}","move_selection":"Selecteer een ouder {type} om {source} naar te verplaatsen.","merge_selection":"Vervang alle voorvallen van {source} door het type {type}.","Root":"Bron","show_split_screen":"Toon gesplitste weergave","New_Keyword":"Nieuw Etiket","Delete_Keyword":"Verwijder Etiket","Edit_Keyword":"Bewerk Etiket","Move_Keyword":"Verplaats Etiket","Hide_Keywords":"Verberg Etiketten","Hide_Recipes":"Verberg Recepten","Advanced Search Settings":"Geavanceerde zoekinstellingen","Merge":"Voeg samen","delete_confimation":"Weet je zeker dat je {kw} en zijn kinderen wil verwijderen?","Merge_Keyword":"Voeg Etiket samen","step_time_minutes":"Stap duur in minuten","confirm_delete":"Weet je zeker dat je dit {object} wil verwijderen?","Show_as_header":"Toon als koptekst","Hide_as_header":"Verberg als koptekst","Copy_template_reference":"Kopieer sjabloon verwijzing","Save_and_View":"Sla op & Bekijk","Edit_Recipe":"Bewerk Recept","Move_Up":"Verplaats omhoog","Move_Down":"Verplaats omlaag","Step_Name":"Stap Naam","Step_Type":"Stap Type","Make_Header":"Maak_Koptekst","Make_Ingredient":"Maak_Ingrediënt","Enable_Amount":"Schakel Hoeveelheid in","Disable_Amount":"Schakel Hoeveelheid uit","Add_Step":"Voeg Stap toe","Note":"Notitie","delete_confirmation":"Weet je zeker dat je {source} wil verwijderen?","Ignore_Shopping":"Negeer Boodschappen","Shopping_Category":"Boodschappen Categorie","Edit_Food":"Bewerk Eten","Move_Food":"Verplaats Eten","New_Food":"Nieuw Eten","Hide_Food":"Verberg Eten","Delete_Food":"Verwijder Eten","No_ID":"ID niet gevonden, verwijderen niet mogelijk.","Meal_Plan_Days":"Toekomstige maaltijdplannen","merge_title":"Voeg {type} samen","move_title":"Verplaats {type}","Food":"Eten"}')},b07c:function(e,t,r){},ca5b:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.recipe.rating>0?r("span",{staticClass:"d-inline"},[e._l(Math.floor(e.recipe.rating),(function(e){return r("i",{key:e,staticClass:"fas fa-star fa-xs text-primary"})})),e.recipe.rating%1>0?r("i",{staticClass:"fas fa-star-half-alt fa-xs text-primary"}):e._e(),e._l(5-Math.ceil(e.recipe.rating),(function(e){return r("i",{key:e+10,staticClass:"far fa-star fa-xs text-secondary"})}))],2):e._e()])},i=[],o={name:"RecipeRating",props:{recipe:Object}},a=o,s=r("2877"),c=Object(s["a"])(a,n,i,!1,null,"7151a4e2",null);t["a"]=c.exports},d315:function(e,t,r){"use strict";r.r(t);r("e260"),r("e6cf"),r("cca6"),r("a79d");var n=r("a026"),i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"row"},[r("div",{staticClass:"col-12 calender-parent"},[r("calendar-view",{staticClass:"theme-default",attrs:{"show-date":e.showDate,"enable-date-selection":!0,items:e.plan_items,"display-period-uom":e.settings.displayPeriodUom,"period-changed-callback":e.refreshData,"enable-drag-drop":!0,"item-content-height":e.item_height,"display-period-count":e.settings.displayPeriodCount,"starting-day-of-week":e.settings.startingDayOfWeek,"display-week-numbers":e.settings.displayWeekNumbers},on:{"date-selection-finish":e.createEntryRange,"click-date":e.createEntryClick,"drop-on-date":e.moveEntry},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.value,i=t.weekStartDate,o=t.top;return[r("meal-plan-card",{attrs:{value:n,"week-start-date":i,top:o,detailed:e.detailed_items,item_height:e.item_height},on:{dragstart:function(t){e.dragged_item=n},"click-item":e.entryClick}})]}},{key:"header",fn:function(t){var n=t.headerProps;return[r("calendar-view-header",{attrs:{"header-props":n},on:{input:e.setShowDate}})]}}])})],1)]),r("div",{staticClass:"row mt-3"},[r("div",{staticClass:"col-3 calender-options"},[r("h5",[e._v(e._s(e.$t("CalenderSettings")))]),r("b-form",[r("b-form-group",{attrs:{id:"UomInput",label:e.$t("Period"),description:e.$t("PeriodToShow"),"label-for":"UomInput"}},[r("b-form-select",{attrs:{id:"UomInput",options:e.options.displayPeriodUom},model:{value:e.settings.displayPeriodUom,callback:function(t){e.$set(e.settings,"displayPeriodUom",t)},expression:"settings.displayPeriodUom"}})],1),r("b-form-group",{attrs:{id:"PeriodInput",label:e.$t("PeriodCount"),description:e.$t("ShowHowManyPeriods"),"label-for":"PeriodInput"}},[r("b-form-select",{attrs:{id:"PeriodInput",options:e.options.displayPeriodCount},model:{value:e.settings.displayPeriodCount,callback:function(t){e.$set(e.settings,"displayPeriodCount",t)},expression:"settings.displayPeriodCount"}})],1),r("b-form-group",{attrs:{id:"DaysInput",label:e.$t("StartingDay"),description:e.$t("StartingDay"),"label-for":"DaysInput"}},[r("b-form-select",{attrs:{id:"DaysInput",options:e.dayNames},model:{value:e.settings.startingDayOfWeek,callback:function(t){e.$set(e.settings,"startingDayOfWeek",t)},expression:"settings.startingDayOfWeek"}})],1)],1)],1),r("div",{staticClass:"col-6"},[r("h5",[e._v(e._s(e.$t("MealTypes")))]),r("b-form"),e._e()],1)]),r("ContextMenu",{ref:"menu",scopedSlots:e._u([{key:"menu",fn:function(t){var n=t.contextData;return[r("ContextMenuItem",{on:{click:function(t){e.$refs.menu.close(),e.openEntryEdit(n.originalItem.entry)}}},[r("a",{staticClass:"dropdown-item p-2",attrs:{href:"#"}},[r("i",{staticClass:"fas fa-pen"}),e._v(" "+e._s(e.$t("Edit")))])]),r("ContextMenuItem",{on:{click:function(t){e.$refs.menu.close(),e.moveEntryLeft(n)}}},[r("a",{staticClass:"dropdown-item p-2",attrs:{href:"#"}},[r("i",{staticClass:"fas fa-arrow-left"}),e._v(" "+e._s(e.$t("DayBack")))])]),r("ContextMenuItem",{on:{click:function(t){e.$refs.menu.close(),e.moveEntryRight(n)}}},[r("a",{staticClass:"dropdown-item p-2",attrs:{href:"#"}},[r("i",{staticClass:"fas fa-arrow-right"}),e._v(" "+e._s(e.$t("DayForward")))])]),r("ContextMenuItem",{on:{click:function(t){e.$refs.menu.close(),e.createEntry(n.originalItem.entry)}}},[r("a",{staticClass:"dropdown-item p-2",attrs:{href:"#"}},[r("i",{staticClass:"fas fa-copy"}),e._v(" "+e._s(e.$t("Clone")))])]),r("ContextMenuItem",{on:{click:function(t){e.$refs.menu.close(),e.deleteEntry(n)}}},[r("a",{staticClass:"dropdown-item p-2 text-danger",attrs:{href:"#"}},[r("i",{staticClass:"fas fa-trash"}),e._v(" "+e._s(e.$t("Delete")))])])]}}])}),r("meal-plan-edit-modal",{attrs:{entry:e.entryEditing,entryEditing_initial_recipe:e.entryEditing_initial_recipe,"entry-editing_initial_meal_type":e.entryEditing_initial_meal_type,modal_title:e.modal_title,edit_modal_show:e.edit_modal_show},on:{"save-entry":e.editEntry,"delete-entry":e.deleteEntry}})],1)},o=[],a=(r("159b"),r("4de4"),r("a434"),r("b0c0"),function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"show",rawName:"v-show",value:e.isVisible,expression:"isVisible"},{name:"click-outside",rawName:"v-click-outside",value:e.close,expression:"close"}],ref:"popper",staticClass:"context-menu",attrs:{tabindex:"-1"},on:{"!contextmenu":function(e){e.preventDefault()}}},[r("ul",{staticClass:"dropdown-menu",attrs:{role:"menu"}},[e._t("menu",null,{contextData:e.contextData})],2)])}),s=[],c=r("f0bd"),u=r("e67d"),d=r.n(u);c["a"].Defaults.modifiers.computeStyle.gpuAcceleration=!1;var p={name:"ContextMenu.vue",props:{boundariesElement:{type:String,default:"body"}},components:{},data:function(){return{opened:!1,contextData:{}}},directives:{ClickOutside:d.a},computed:{isVisible:function(){return this.opened}},methods:{open:function(e,t){var r=this;this.opened=!0,this.contextData=t,this.popper&&this.popper.destroy(),this.popper=new c["a"](this.referenceObject(e),this.$refs.popper,{placement:"right-start",modifiers:{preventOverflow:{boundariesElement:document.querySelector(this.boundariesElement)}}}),this.$nextTick((function(){r.popper.scheduleUpdate()}))},close:function(){this.opened=!1,this.contextData=null},referenceObject:function(e){var t=e.clientX,r=e.clientY,n=t+1,i=r+1,o=1,a=1;function s(){return{left:t,top:r,right:n,bottom:i}}var c={getBoundingClientRect:s,clientWidth:o,clientHeight:a};return c}},beforeUnmount:function(){void 0!==this.popper&&this.popper.destroy()}},l=p,h=(r("84cf"),r("2877")),f=Object(h["a"])(l,a,s,!1,null,"b808df3a",null),b=f.exports,m=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("li",{attrs:{role:"presentation"},on:{click:function(t){return e.$emit("click",t)}}},[e._t("default")],2)},v=[],g={name:"ContextMenuItem.vue"},O=g,j=Object(h["a"])(O,m,v,!1,null,"17d36814",null),y=j.exports,_=(r("8bb7"),r("be6a")),S=r("5f5b"),k=r("2b2d"),w=r("6b0a"),P=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"hover",rawName:"v-hover"}],key:e.value.id,staticClass:"card cv-item meal-plan-card p-0",class:e.value.classes,style:"top:"+e.top+";height:"+e.item_height,attrs:{draggable:!0,"aria-grabbed":e.value==e.currentDragItem,title:e.title},on:{dragstart:function(t){return e.onDragItemStart(e.value,t)},click:function(t){return e.onClickItem(e.value,t)},contextmenu:function(t){return t.preventDefault(),e.$parent.$parent.$refs.menu.open(t,e.value)}}},[e.detailed?r("div",{staticClass:"card-header p-1 text-center text-primary border-bottom-0",style:"background-color: "+e.background_color},[null!=e.entry.entry.meal_type.icon?r("span",{staticClass:"font-light text-center"},[e._v(e._s(e.entry.entry.meal_type.icon))]):e._e(),r("span",{staticClass:"font-light"},[e._v(e._s(e.entry.entry.meal_type.name))])]):e._e(),e.detailed?r("div",{staticClass:"card-img-overlay h-100 d-flex flex-column justify-content-right float-right text-right p-0"},[r("a",[r("div",{staticStyle:{position:"static"}},[r("div",{staticClass:"dropdown b-dropdown position-static btn-group"},[r("button",{staticClass:"btn dropdown-toggle btn-link text-decoration-none text-body pr-1 dropdown-toggle-no-caret",attrs:{"aria-haspopup":"true","aria-expanded":"false",type:"button"},on:{click:function(t){return t.stopPropagation(),e.$parent.$parent.$refs.menu.open(t,e.value)}}},[r("i",{staticClass:"fas fa-ellipsis-v fa-lg"})])])])])]):e._e(),e.detailed?r("div",{staticClass:"card-header p-1 text-center",style:"background-color: "+e.background_color},[r("span",{staticClass:"font-light"},[e._v(e._s(e.title))])]):e._e(),e.hasRecipe&&e.detailed?r("b-img",{staticClass:"card-img-bottom",attrs:{fluid:"",src:e.entry.entry.recipe.image}}):e._e(),e.detailed&&null==e.entry.entry.recipe?r("div",{staticClass:"card-body p-1",style:"background-color: "+e.background_color},[r("p",[e._v(e._s(e.entry.entry.note))])]):e._e(),e.detailed?e._e():r("div",{staticClass:"row p-1 flex-nowrap",style:"background-color: "+e.background_color},[r("div",{staticClass:"col-2"},[null!=e.entry.entry.meal_type.icon?r("span",{staticClass:"font-light text-center"},[e._v(e._s(e.entry.entry.meal_type.icon))]):e._e(),null==e.entry.entry.meal_type.icon?r("span",{staticClass:"font-light text-center"},[e._v("❓")]):e._e()]),r("div",{staticClass:"col-10 d-inline-block text-truncate",style:"max-height:"+e.item_height},[r("span",{staticClass:"font-light"},[e._v(e._s(e.title))])])])],1)},C=[],R=(r("d3b7"),r("25f0"),{name:"MealPlanCard.vue",components:{},props:{value:Object,weekStartDate:Date,top:String,detailed:Boolean,item_height:String},data:function(){return{dateSelectionOrigin:null,currentDragItem:null}},computed:{entry:function(){return this.value.originalItem},title:function(){return null!=this.entry.entry.title&&""!==this.entry.entry.title?this.entry.entry.title:this.entry.entry.recipe_name},hasRecipe:function(){return null!=this.entry.entry.recipe},background_color:function(){return null!=this.entry.entry.meal_type.color&&""!==this.entry.entry.meal_type.color?this.entry.entry.meal_type.color:"#fff"}},methods:{onDragItemStart:function(e,t){return t.dataTransfer.setData("text",e.id.toString()),this.$emit("dragstart",e,t),!0},onContextMenuOpen:function(e,t){return t.dataTransfer.setData("text",e.id.toString()),this.$emit("dragstart",e,t),!0},onClickItem:function(e,t){return this.$emit("click-item",e),!0}},directives:{hover:{inserted:function(e){e.addEventListener("mouseenter",(function(){e.classList.add("shadow")})),e.addEventListener("mouseleave",(function(){e.classList.remove("shadow")}))}}}}),U=R,E=(r("a11c"),Object(h["a"])(U,P,C,!1,null,"78d97e94",null)),L=E.exports,I=r("c1df"),T=r.n(I),x=r("fa7d"),A=r("f347"),M=r("2b27"),F=r.n(M);n["default"].prototype.moment=T.a,n["default"].use(S["a"]),n["default"].use(F.a);var B="mealplan_settings",D={name:"MealPlanView",components:{MealPlanEditModal:A["a"],MealPlanCard:L,RecipeCard:w["default"],CalendarView:_["b"],CalendarViewHeader:_["c"],ContextMenu:b,ContextMenuItem:y},mixins:[_["a"],x["a"]],data:function(){return{showDate:new Date,plan_entries:[],recipe_viewed:{},settings:{displayPeriodUom:"week",displayPeriodCount:2,startingDayOfWeek:1,displayWeekNumbers:!0},dragged_item:null,meal_types:[],current_context_menu_item:null,options:{displayPeriodUom:[{text:this.$t("Week"),value:"week"},{text:this.$t("Month"),value:"month"},{text:this.$t("Year"),value:"year"}],displayPeriodCount:[1,2,3],entryEditing:{date:null,id:-1,meal_type:null,note:"",note_markdown:"",recipe:null,servings:1,shared:[],title:"",title_placeholder:this.$t("Title")}},entryEditing:{},edit_modal_show:!1}},computed:{modal_title:function(){return-1===this.entryEditing.id?this.$t("CreateMealPlanEntry"):this.$t("EditMealPlanEntry")},entryEditing_initial_recipe:function(){return null!=this.entryEditing.recipe?[this.entryEditing.recipe]:[]},entryEditing_initial_meal_type:function(){return null!=this.entryEditing.meal_type?[this.entryEditing.meal_type]:[]},plan_items:function(){var e=this,t=[];return this.plan_entries.forEach((function(r){t.push(e.buildItem(r))})),t},detailed_items:function(){return"week"===this.settings.displayPeriodUom},dayNames:function(){var e=[];return this.getFormattedWeekdayNames(this.userLocale,"long",0).forEach((function(t,r){e.push({text:t,value:r})})),e},userLocale:function(){return this.getDefaultBrowserLocale},item_height:function(){return"week"===this.settings.displayPeriodUom?"10rem":"1.6rem"}},mounted:function(){this.$nextTick((function(){this.$cookies.isKey(B)&&(this.settings=Object.assign({},this.settings,this.$cookies.get(B)))}))},watch:{settings:{handler:function(){this.$cookies.set(B,this.settings,"360d")},deep:!0}},methods:{editEntry:function(e){var t=this;-1!==e.id?this.plan_entries.forEach((function(r,n){r.id===e.id&&(t.$set(t.plan_entries,n,e),t.saveEntry(t.plan_entries[n]))})):this.createEntry(e)},setShowDate:function(e){this.showDate=e},createEntryRange:function(e){console.log(e)},createEntryClick:function(e){this.entryEditing=this.options.entryEditing,this.entryEditing.date=T()(e).format("YYYY-MM-DD"),console.log(this.entryEditing),this.$bvModal.show("edit-modal")},findEntry:function(e){return this.plan_entries.filter((function(t){return t.id===e}))[0]},moveEntry:function(e,t){var r=this;this.plan_entries.forEach((function(e){e.id===r.dragged_item.id&&(e.date=t,r.saveEntry(e))}))},moveEntryLeft:function(e){var t=this;this.plan_entries.forEach((function(r){r.id===e.id&&(r.date=T()(r.date).subtract(1,"d"),t.saveEntry(r))}))},moveEntryRight:function(e){var t=this;console.log(e),this.plan_entries.forEach((function(r){r.id===e.id&&(r.date=T()(r.date).add(1,"d"),t.saveEntry(r))}))},deleteEntry:function(e){this.plan_entries.forEach((function(t,r,n){if(t.id===e.id){var i=new k["a"];i.destroyMealPlan(t.id).then((function(e){n.splice(r,1)})).catch((function(e){x["e"].makeStandardToast(x["e"].FAIL_UPDATE)}))}}))},entryClick:function(e){var t=this.findEntry(e.id);this.openEntryEdit(t)},openEntryEdit:function(e){this.$bvModal.show("edit-modal"),this.entryEditing=e,this.entryEditing.date=T()(e.date).format("YYYY-MM-DD"),null!=this.entryEditing.recipe&&(this.entryEditing.title_placeholder=this.entryEditing.recipe.name)},refreshData:function(){var e=this,t=new k["a"];t.listMealPlans().then((function(t){e.plan_entries=t.data})),t.listMealTypes().then((function(t){e.meal_types=t.data}))},saveEntry:function(e){e.date=T()(e.date).format("YYYY-MM-DD");var t=new k["a"];t.updateMealPlan(e.id,e).catch((function(e){x["e"].makeStandardToast(x["e"].FAIL_UPDATE)}))},createEntry:function(e){var t=this;e.date=T()(e.date).format("YYYY-MM-DD");var r=new k["a"];r.createMealPlan(e).catch((function(e){x["e"].makeStandardToast(x["e"].FAIL_UPDATE)})).then((function(e){t.plan_entries.push(e.data)}))},buildItem:function(e){var t=T()(e.date).add(e.meal_type.order,"m");return{id:e.id,startDate:t,endDate:t,entry:e}}}},N=D,q=(r("ea4c"),Object(h["a"])(N,i,o,!1,null,null,null)),K=q.exports,$=r("9225");n["default"].config.productionTip=!1,new n["default"]({i18n:$["a"],render:function(e){return e(K)}}).$mount("#app")},d46a:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("b-modal",{staticClass:"modal",attrs:{id:"id_modal_add_book_"+e.modal_id,title:e.$t("Manage_Books"),"ok-title":e.$t("Add"),"cancel-title":e.$t("Close")},on:{ok:function(t){return e.addToBook()},shown:e.loadBookEntries}},[r("ul",{staticClass:"list-group"},e._l(this.recipe_book_list,(function(t){return r("li",{key:t.id,staticClass:"list-group-item d-flex justify-content-between align-items-center"},[e._v(" "+e._s(t.book_content.name)+" "),r("span",{staticClass:"btn btn-sm btn-danger",on:{click:function(r){return e.removeFromBook(t)}}},[r("i",{staticClass:"fa fa-trash-alt"})])])})),0),r("multiselect",{staticStyle:{"margin-top":"1vh"},attrs:{options:e.books_filtered,taggable:!0,"tag-placeholder":e.$t("Create"),placeholder:e.$t("Select_Book"),label:"name","track-by":"id",id:"id_books",multiple:!1,loading:e.books_loading},on:{tag:e.createBook,"search-change":e.loadBooks},model:{value:e.selected_book,callback:function(t){e.selected_book=t},expression:"selected_book"}})],1)],1)},i=[],o=(r("a9e3"),r("159b"),r("4de4"),r("8e5f")),a=r.n(o),s=r("c1df"),c=r.n(s),u=r("a026"),d=r("5f5b"),p=r("2b2d"),l=r("fa7d");u["default"].prototype.moment=c.a,u["default"].use(d["a"]);var h={name:"AddRecipeToBook",components:{Multiselect:a.a},props:{recipe:Object,modal_id:Number},data:function(){return{books:[],books_loading:!1,recipe_book_list:[],selected_book:null}},computed:{books_filtered:function(){var e=this,t=[];return this.books.forEach((function(r){0===e.recipe_book_list.filter((function(e){return e.book===r.id})).length&&t.push(r)})),t}},mounted:function(){},methods:{loadBooks:function(e){var t=this;this.books_loading=!0;var r=new p["a"];r.listRecipeBooks({query:{query:e}}).then((function(e){t.books=e.data.filter((function(e){return-1===t.recipe_book_list.indexOf(e)})),t.books_loading=!1}))},createBook:function(e){var t=this,r=new p["a"];r.createRecipeBook({name:e}).then((function(e){t.books.push(e.data),t.selected_book=e.data,l["e"].makeStandardToast(l["e"].SUCCESS_CREATE)}))},addToBook:function(){var e=this,t=new p["a"];t.createRecipeBookEntry({book:this.selected_book.id,recipe:this.recipe.id}).then((function(t){e.recipe_book_list.push(t.data),l["e"].makeStandardToast(l["e"].SUCCESS_CREATE)}))},removeFromBook:function(e){var t=this,r=new p["a"];r.destroyRecipeBookEntry(e.id).then((function(r){t.recipe_book_list=t.recipe_book_list.filter((function(t){return t.id!==e.id})),l["e"].makeStandardToast(l["e"].SUCCESS_DELETE)}))},loadBookEntries:function(){var e=this,t=new p["a"];t.listRecipeBookEntrys({query:{recipe:this.recipe.id}}).then((function(t){e.recipe_book_list=t.data,e.loadBooks("")}))}}},f=h,b=(r("60bc"),r("2877")),m=Object(b["a"])(f,n,i,!1,null,null,null);t["a"]=m.exports},dc43:function(e){e.exports=JSON.parse('{"err_fetching_resource":"","err_creating_resource":"","err_updating_resource":"","err_deleting_resource":"","success_fetching_resource":"","success_creating_resource":"","success_updating_resource":"","success_deleting_resource":"","import_running":"","all_fields_optional":"","convert_internal":"","show_only_internal":"","Log_Recipe_Cooking":"","External_Recipe_Image":"外部菜谱图像","Add_to_Shopping":"添加到购物","Add_to_Plan":"添加到计划","Step_start_time":"","Sort_by_new":"","Recipes_per_page":"","Manage_Books":"管理书籍","Meal_Plan":"","Select_Book":"","Recipe_Image":"菜谱图像","Import_finished":"导入完成","View_Recipes":"","Log_Cooking":"","New_Recipe":"新菜谱","Url_Import":"导入网址","Reset_Search":"重置搜索","Recently_Viewed":"最近浏览","Load_More":"加载更多","Keywords":"关键字","Books":"书籍","Proteins":"蛋白质","Fats":"脂肪","Carbohydrates":"碳水化合物","Calories":"卡路里","Nutrition":"营养","Date":"日期","Share":"分享","Export":"导出","Copy":"拷贝","Rating":"评分","Close":"关闭","Link":"链接","Add":"添加","New":"新","Success":"成功","Failure":"失败","Ingredients":"材料","Supermarket":"超级市场","Categories":"分类","Category":"分类","Selected":"选定","min":"","Servings":"份量","Waiting":"等待","Preparation":"准备","External":"外部","Size":"大小","Files":"文件","File":"文件","Edit":"编辑","Cancel":"取消","Delete":"删除","Open":"打开","Ok":"打开","Save":"储存","Step":"步骤","Search":"搜索","Import":"导入","Print":"打印","Settings":"设置","or":"或","and":"与","Information":"更多资讯","Download":"下载","Create":"创立"}')},dfc6:function(e){e.exports=JSON.parse('{"err_fetching_resource":"","err_creating_resource":"","err_updating_resource":"","err_deleting_resource":"","success_fetching_resource":"","success_creating_resource":"","success_updating_resource":"","success_deleting_resource":"","import_running":"","all_fields_optional":"","convert_internal":"","show_only_internal":"","Log_Recipe_Cooking":"","External_Recipe_Image":"","Add_to_Book":"","Add_to_Shopping":"","Add_to_Plan":"","Step_start_time":"","Meal_Plan":"","Select_Book":"","Recipe_Image":"","Import_finished":"","View_Recipes":"","Log_Cooking":"","New_Recipe":"","Url_Import":"","Reset_Search":"","Recently_Viewed":"","Load_More":"","Keywords":"","Books":"","Proteins":"","Fats":"","Carbohydrates":"","Calories":"","Nutrition":"","Date":"","Share":"","Export":"","Copy":"","Rating":"","Close":"","Link":"","Add":"","New":"","Success":"","Ingredients":"","Supermarket":"","Categories":"","Category":"","Selected":"","min":"","Servings":"","Waiting":"","Preparation":"","External":"","Size":"","Files":"","File":"","Edit":"","Cancel":"","Delete":"","Open":"","Ok":"","Save":"","Step":"","Search":"","Import":"","Print":"","Settings":"","or":"","and":"","Information":"","Download":""}')},ea4c:function(e,t,r){"use strict";r("b07c")},edd4:function(e){e.exports=JSON.parse('{"warning_feature_beta":"This feature is currently in a BETA (testing) state. Please expect bugs and possibly breaking changes in the future (possibly loosing feature related data) when using this feature.","err_fetching_resource":"There was an error fetching a resource!","err_creating_resource":"There was an error creating a resource!","err_updating_resource":"There was an error updating a resource!","err_deleting_resource":"There was an error deleting a resource!","success_fetching_resource":"Successfully fetched a resource!","success_creating_resource":"Successfully created a resource!","success_updating_resource":"Successfully updated a resource!","success_deleting_resource":"Successfully deleted a resource!","step_time_minutes":"Step time in minutes","confirm_delete":"Are you sure you want to delete this {object}?","import_running":"Import running, please wait!","all_fields_optional":"All fields are optional and can be left empty.","convert_internal":"Convert to internal recipe","show_only_internal":"Show only internal recipes","show_split_screen":"Split View","Log_Recipe_Cooking":"Log Recipe Cooking","External_Recipe_Image":"External Recipe Image","Add_to_Shopping":"Add to Shopping","Add_to_Plan":"Add to Plan","Step_start_time":"Step start time","Sort_by_new":"Sort by new","Recipes_per_page":"Recipes per Page","Show_as_header":"Show as header","Hide_as_header":"Hide as header","Copy_template_reference":"Copy template reference","Save_and_View":"Save & View","Manage_Books":"Manage Books","Meal_Plan":"Meal Plan","Select_Book":"Select Book","Recipe_Image":"Recipe Image","Import_finished":"Import finished","View_Recipes":"View Recipes","Log_Cooking":"Log Cooking","New_Recipe":"New Recipe","Url_Import":"Url Import","Reset_Search":"Reset Search","Recently_Viewed":"Recently Viewed","Load_More":"Load More","New_Keyword":"New Keyword","Delete_Keyword":"Delete Keyword","Edit_Keyword":"Edit Keyword","Edit_Recipe":"Edit Recipe","Move_Keyword":"Move Keyword","Merge_Keyword":"Merge Keyword","Hide_Keywords":"Hide Keyword","Hide_Recipes":"Hide Recipes","Move_Up":"Move up","Move_Down":"Move down","Step_Name":"Step Name","Step_Type":"Step Type","Make_Header":"Make_Header","Make_Ingredient":"Make_Ingredient","Enable_Amount":"Enable Amount","Disable_Amount":"Disable Amount","Add_Step":"Add Step","Keywords":"Keywords","Books":"Books","Proteins":"Proteins","Fats":"Fats","Carbohydrates":"Carbohydrates","Calories":"Calories","Nutrition":"Nutrition","Date":"Date","Share":"Share","Automation":"Automation","Parameter":"Parameter","Export":"Export","Copy":"Copy","Rating":"Rating","Close":"Close","Cancel":"Cancel","Link":"Link","Add":"Add","New":"New","Note":"Note","Success":"Success","Failure":"Failure","Ingredients":"Ingredients","Supermarket":"Supermarket","Categories":"Categories","Category":"Category","Selected":"Selected","min":"min","Servings":"Servings","Waiting":"Waiting","Preparation":"Preparation","External":"External","Size":"Size","Files":"Files","File":"File","Edit":"Edit","Delete":"Delete","Open":"Open","Ok":"Open","Save":"Save","Step":"Step","Search":"Search","Import":"Import","Print":"Print","Settings":"Settings","or":"or","and":"and","Information":"Information","Download":"Download","Create":"Create","Advanced Search Settings":"Advanced Search Settings","View":"View","Recipes":"Recipes","Move":"Move","Merge":"Merge","Parent":"Parent","delete_confirmation":"Are you sure that you want to delete {source}?","move_confirmation":"Move {child} to parent {parent}","merge_confirmation":"Replace {source} with {target}","create_rule":"and create automation","move_selection":"Select a parent {type} to move {source} to.","merge_selection":"Replace all occurrences of {source} with the selected {type}.","Root":"Root","Ignore_Shopping":"Ignore Shopping","Shopping_Category":"Shopping Category","Edit_Food":"Edit Food","Move_Food":"Move Food","New_Food":"New Food","Hide_Food":"Hide Food","Food_Alias":"Food Alias","Unit_Alias":"Unit Alias","Keyword_Alias":"Keyword Alias","Delete_Food":"Delete Food","No_ID":"ID not found, cannot delete.","Meal_Plan_Days":"Future meal plans","merge_title":"Merge {type}","move_title":"Move {type}","Food":"Food","Recipe_Book":"Recipe Book","del_confirmation_tree":"Are you sure that you want to delete {source} and all of it\'s children?","delete_title":"Delete {type}","create_title":"New {type}","edit_title":"Edit {type}","Name":"Name","Type":"Type","Description":"Description","Recipe":"Recipe","tree_root":"Root of Tree","Icon":"Icon","Unit":"Unit","No_Results":"No Results","New_Unit":"New Unit","Create_New_Shopping Category":"Create New Shopping Category","Create_New_Food":"Add New Food","Create_New_Keyword":"Add New Keyword","Create_New_Unit":"Add New Unit","and_up":"& Up","Instructions":"Instructions","Unrated":"Unrated","Automate":"Automate","Key_Ctrl":"Ctrl","Key_Shift":"Shift","Time":"Time","Text":"Text"}')},f347:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("b-modal",{attrs:{id:e.modal_id,size:"lg",title:e.modal_title,"hide-footer":"","aria-label":""}},[r("div",{staticClass:"row"},[r("div",{staticClass:"col col-md-12"},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-6 col-lg-9"},[r("b-input-group",[r("b-form-input",{attrs:{id:"TitleInput",placeholder:e.entryEditing.title_placeholder},model:{value:e.entryEditing.title,callback:function(t){e.$set(e.entryEditing,"title",t)},expression:"entryEditing.title"}}),r("b-input-group-append",{staticClass:"d-none d-lg-block"},[r("b-button",{attrs:{variant:"primary"},on:{click:function(t){e.entryEditing.title=""}}},[r("i",{staticClass:"fa fa-eraser"})])],1)],1),r("small",{staticClass:"form-text text-muted",attrs:{tabindex:"-1"}},[e._v(e._s(e.$t("Title")))])],1),r("div",{staticClass:"col-6 col-lg-3"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.entryEditing.date,expression:"entryEditing.date"}],staticClass:"form-control",attrs:{type:"date",id:"DateInput"},domProps:{value:e.entryEditing.date},on:{input:function(t){t.target.composing||e.$set(e.entryEditing,"date",t.target.value)}}}),r("small",{staticClass:"form-text text-muted",attrs:{tabindex:"-1"}},[e._v(e._s(e.$t("Date")))])])]),r("div",{staticClass:"row mt-3"},[r("div",{staticClass:"col-12 col-lg-6 col-xl-6"},[r("b-form-group",[r("generic-multiselect",{staticStyle:{"flex-grow":"1","flex-shrink":"1","flex-basis":"0"},attrs:{initial_selection:e.entryEditing_initial_recipe,label:"name",model:e.Models.RECIPE,placeholder:e.$t("Recipe"),limit:10,multiple:!1},on:{change:e.selectRecipe}}),r("small",{staticClass:"form-text text-muted",attrs:{tabindex:"-1"}},[e._v(e._s(e.$t("Recipe")))])],1),r("b-form-group",{staticClass:"mt-3"},[r("generic-multiselect",{staticStyle:{"flex-grow":"1","flex-shrink":"1","flex-basis":"0"},attrs:{required:"",label:"name",model:e.Models.MEAL_TYPE,placeholder:e.$t("MealType"),limit:10,multiple:!1,initial_selection:e.entryEditing_initial_meal_type},on:{change:e.selectMealType}}),r("small",{staticClass:"form-text text-muted",attrs:{tabindex:"-1"}},[e._v(e._s(e.$t("MealType")))])],1),r("b-form-group",{staticClass:"mt-3",attrs:{"label-for":"NoteInput",description:e.$t("Note")}},[r("textarea",{directives:[{name:"model",rawName:"v-model",value:e.entryEditing.note,expression:"entryEditing.note"}],staticClass:"form-control",attrs:{id:"NoteInput",placeholder:e.$t("Note")},domProps:{value:e.entryEditing.note},on:{input:function(t){t.target.composing||e.$set(e.entryEditing,"note",t.target.value)}}})]),r("b-input-group",[r("b-form-input",{attrs:{id:"ServingsInput",placeholder:e.$t("Servings")},model:{value:e.entryEditing.servings,callback:function(t){e.$set(e.entryEditing,"servings",t)},expression:"entryEditing.servings"}})],1),r("small",{staticClass:"form-text text-muted",attrs:{tabindex:"-1"}},[e._v(e._s(e.$t("Servings")))])],1),r("div",{staticClass:"col-lg-6 d-none d-lg-block d-xl-block"},[null!=e.entryEditing.recipe?r("recipe-card",{attrs:{recipe:e.entryEditing.recipe}}):e._e()],1)]),r("div",{staticClass:"row mt-3 mb-3"},[r("div",{staticClass:"col-12"},[e.allow_delete?r("b-button",{attrs:{variant:"danger"},on:{click:e.deleteEntry}},[e._v(e._s(e.$t("Delete"))+" ")]):e._e(),r("b-button",{staticClass:"float-right",attrs:{variant:"primary"},on:{click:e.editEntry}},[e._v(e._s(e.$t("Save")))])],1)])])])])},i=[],o=(r("d3b7"),r("3ca3"),r("ddb0"),r("b0c0"),r("a026")),a=r("5f5b"),s=r("7432"),c=r("fa7d");o["default"].use(a["a"]);var u={name:"MealPlanEditModal",props:{entry:Object,entryEditing_initial_recipe:Array,entryEditing_initial_meal_type:Array,modal_title:String,modal_id:{type:String,default:"edit-modal"},allow_delete:{type:Boolean,default:!0}},mixins:[c["a"]],components:{GenericMultiselect:s["a"],RecipeCard:function(){return r.e("chunk-2d0da313").then(r.bind(null,"6b0a"))}},data:function(){return{entryEditing:{}}},watch:{entry:{handler:function(){this.entryEditing=Object.assign({},this.entry)},deep:!0}},methods:{editEntry:function(){null!=this.entryEditing.meal_type?null!=this.entryEditing.recipe||""!==this.entryEditing.title?(this.$bvModal.hide("edit-modal"),this.$emit("save-entry",this.entryEditing)):alert("Need title or recipe"):alert("Need Meal type")},deleteEntry:function(){this.$bvModal.hide("edit-modal"),this.$emit("delete-entry",this.entryEditing)},selectMealType:function(e){null!=e.val?this.entryEditing.meal_type=e.val:this.entryEditing.meal_type=null},selectRecipe:function(e){null!=e.val?(this.entryEditing.recipe=e.val,this.entryEditing.title_placeholder=this.entryEditing.recipe.name,this.entryEditing.servings=this.entryEditing.recipe.servings):(this.entryEditing.recipe=null,this.entryEditing.title_placeholder="",this.entryEditing.servings=1)}}},d=u,p=r("2877"),l=Object(p["a"])(d,n,i,!1,null,"7564c819",null);t["a"]=l.exports},f693:function(e){e.exports=JSON.parse('{"err_fetching_resource":"Il y a eu une erreur pour récupérer une ressource !","err_creating_resource":"Il y a eu une erreur pour créer une ressource !","err_updating_resource":"Il y a eu une erreur pour mettre à jour une ressource !","err_deleting_resource":"Il y a eu une erreur pour supprimer une ressource !","success_fetching_resource":"Ressource correctement récupérée !","success_creating_resource":"Ressource correctement créée !","success_updating_resource":"Ressource correctement mise à jour !","success_deleting_resource":"Ressource correctement supprimée !","import_running":"Importation en cours, veuillez patienter !","all_fields_optional":"Tous les champs sont optionnels et peuvent être laissés vides.","convert_internal":"Convertir en recette interne","show_only_internal":"Montrer uniquement les recettes internes","Log_Recipe_Cooking":"Marquer la recette comme cuisinée","External_Recipe_Image":"Image externe de recette","Add_to_Shopping":"Ajouter à la liste de courses","Add_to_Plan":"Ajouter au menu","Step_start_time":"Heure de départ de l\'étape","Sort_by_new":"Trier par nouveautés","Recipes_per_page":"Nombre de recettes par page","Manage_Books":"Gérer les favoris","Meal_Plan":"Menu de la semaine","Select_Book":"Sélectionnez livre","Recipe_Image":"Image de la recette","Import_finished":"Importation finie","View_Recipes":"Voir les recettes","Log_Cooking":"Marquer comme cuisiné","New_Recipe":"Nouvelle recette","Url_Import":"Importation de l\'url","Reset_Search":"Réinitialiser la recherche","Recently_Viewed":"Vu récemment","Load_More":"Charger plus","Keywords":"Mots-clés","Books":"Livres","Proteins":"Protéines","Fats":"Matières grasses","Carbohydrates":"Glucides","Calories":"Calories","Nutrition":"Informations nutritionnelles","Date":"Date","Share":"Partager","Export":"Exporter","Copy":"Copier","Rating":"Note","Close":"Fermer","Link":"Lien","Add":"Ajouter","New":"Nouveau","Success":"Réussite","Failure":"Échec","Ingredients":"Ingrédients","Supermarket":"Supermarché","Categories":"Catégories","Category":"Catégorie","Selected":"Sélectionné","min":"min","Servings":"Portions","Waiting":"Attente","Preparation":"Préparation","External":"Externe","Size":"Taille","Files":"Fichiers","File":"Fichier","Edit":"Modifier","Cancel":"Annuler","Delete":"Supprimer","Open":"Ouvrir","Ok":"Ouvrir","Save":"Sauvegarder","Step":"Étape","Search":"Rechercher","Import":"Importer","Print":"Imprimer","Settings":"Paramètres","or":"ou","and":"et","Information":"Information","Download":"Télécharger","Create":"Créer","show_split_screen":"Voir la vue séparée","New_Keyword":"Nouveau mot-clé","Delete_Keyword":"Supprimer mot-clé","Move_Keyword":"Déplacer mot-clé","Merge_Keyword":"Fusionner mots-clés","Hide_Recipes":"Cacher recettes","Advanced Search Settings":"Paramètres de recherche avancée","View":"Voir","Recipes":"Recettes","Move":"Déplacer","Merge":"Fusionner","Parent":"Parent","move_confirmation":"Déplacer {child} vers le parent {parent}","merge_confirmation":"Remplacer {source} par {target}","Root":"Racine","delete_confirmation":"Êtes-vous sûr de vouloir supprimer {source} ?","Shopping_Category":"Catégorie de courses","Ignore_Shopping":"Ignorer les courses","Edit_Food":"Modifier aliment","Move_Food":"Déplacer aliment","New_Food":"Nouvel aliment","Hide_Food":"Cacher l\'aliment","Delete_Food":"Supprimer l\'aliment","No_ID":"ID introuvable, il n\'a pas pu être supprimé.","Meal_Plan_Days":"Futurs menus","merge_title":"Fusionner {type}","Food":"Aliment","Recipe_Book":"Livre de recettes","delete_title":"Supprimer {type}","create_title":"Nouveau {type}","edit_title":"Modifier {type}","Name":"Nom","Description":"Description","Recipe":"Recette","tree_root":"Racine de l\'arbre","Edit_Keyword":"Modifier mot-clé","Hide_Keywords":"Cacher mots-clés","move_selection":"Sélectionner un parent {type} pour y déplacer {source}.","merge_selection":"Remplace toutes les occurrences de {source} par {type}.","move_title":"Déplacer {type}","del_confirmation_tree":"Êtes-vous sûr de vouloir supprimer {source} et tous ses enfants ?"}')},fa7d:function(e,t,r){"use strict";r.d(t,"f",(function(){return O})),r.d(t,"j",(function(){return j})),r.d(t,"e",(function(){return y})),r.d(t,"c",(function(){return _})),r.d(t,"h",(function(){return S})),r.d(t,"d",(function(){return k})),r.d(t,"k",(function(){return w})),r.d(t,"g",(function(){return C})),r.d(t,"a",(function(){return U})),r.d(t,"i",(function(){return T})),r.d(t,"b",(function(){return A}));var n=r("b85c"),i=r("5530"),o=r("2909"),a=r("3835"),s=r("53ca"),c=r("d4ec"),u=r("bee2"),d=r("ade3"),p=(r("99af"),r("159b"),r("4fad"),r("caad"),r("2532"),r("b0c0"),r("b64b"),r("4de4"),r("7db0"),r("d81d"),r("59e4")),l=r("9225");function h(e,t,r){var n=Math.floor(e),i=1,o=n+1,a=1;if(e!==n)while(i<=t&&a<=t){var s=(n+o)/(i+a);if(e===s){i+a<=t?(i+=a,n+=o,a=t+1):i>a?a=t+1:i=t+1;break}et&&(i=a,n=o),!r)return[0,n,i];var c=Math.floor(n/i);return[c,n-c*i,i]}var f=r("2b2d"),b=r("bc3a"),m=r.n(b),v=r("6369"),g=r("a026"),O={methods:{makeToast:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return j(e,t,r)}}};function j(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=new p["a"];n.$bvToast.toast(t,{title:e,variant:r,toaster:"b-toaster-bottom-right",solid:!0})}var y=function(){function e(){Object(c["a"])(this,e)}return Object(u["a"])(e,null,[{key:"makeStandardToast",value:function(t){switch(t){case e.SUCCESS_CREATE:j(l["a"].tc("Success"),l["a"].tc("success_creating_resource"),"success");break;case e.SUCCESS_FETCH:j(l["a"].tc("Success"),l["a"].tc("success_fetching_resource"),"success");break;case e.SUCCESS_UPDATE:j(l["a"].tc("Success"),l["a"].tc("success_updating_resource"),"success");break;case e.SUCCESS_DELETE:j(l["a"].tc("Success"),l["a"].tc("success_deleting_resource"),"success");break;case e.FAIL_CREATE:j(l["a"].tc("Failure"),l["a"].tc("err_creating_resource"),"danger");break;case e.FAIL_FETCH:j(l["a"].tc("Failure"),l["a"].tc("err_fetching_resource"),"danger");break;case e.FAIL_UPDATE:j(l["a"].tc("Failure"),l["a"].tc("err_updating_resource"),"danger");break;case e.FAIL_DELETE:j(l["a"].tc("Failure"),l["a"].tc("err_deleting_resource"),"danger");break}}}]),e}();Object(d["a"])(y,"SUCCESS_CREATE","SUCCESS_CREATE"),Object(d["a"])(y,"SUCCESS_FETCH","SUCCESS_FETCH"),Object(d["a"])(y,"SUCCESS_UPDATE","SUCCESS_UPDATE"),Object(d["a"])(y,"SUCCESS_DELETE","SUCCESS_DELETE"),Object(d["a"])(y,"FAIL_CREATE","FAIL_CREATE"),Object(d["a"])(y,"FAIL_FETCH","FAIL_FETCH"),Object(d["a"])(y,"FAIL_UPDATE","FAIL_UPDATE"),Object(d["a"])(y,"FAIL_DELETE","FAIL_DELETE");var _={methods:{_:function(e){return S(e)}}};function S(e){return window.gettext(e)}var k={methods:{resolveDjangoUrl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return w(e,t)}}};function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==t)return window.Urls[e]();if("object"!=Object(s["a"])(t))return window.Urls[e](t);if("object"==Object(s["a"])(t)){if(1===t.length)return window.Urls[e](t);if(2===t.length)return window.Urls[e](t[0],t[1]);if(3===t.length)return window.Urls[e](t[0],t[1],t[2])}}function P(e){if(void 0!==window.USER_PREF)return window.USER_PREF[e]}function C(e,t){if(P("use_fractions")){var r="",n=h(e*t,10,!0);return n[0]>0&&(r+=n[0]),n[1]>0&&(r+=" ".concat(n[1],"").concat(n[2],"")),r}return R(e*t)}function R(e){var t=P("user_fractions")?P("user_fractions"):2;return+(Math.round(e+"e+".concat(t))+"e-".concat(t))}m.a.defaults.xsrfCookieName="csrftoken",m.a.defaults.xsrfHeaderName="X-CSRFTOKEN";var U={data:function(){return{Models:v["b"],Actions:v["a"]}},methods:{genericAPI:function(e,t,r){var n,i,o=I(e,t),s=o.function,c=null!==(n=null===o||void 0===o?void 0:o.config)&&void 0!==n?n:{},u=null!==(i=null===o||void 0===o?void 0:o.params)&&void 0!==i?i:[],d=[],p=void 0;u.forEach((function(e,t){if(Array.isArray(e)){p={};for(var n=0,i=Object.entries(r);n