(function(e){function t(t){for(var n,a,s=t[0],c=t[1],u=t[2],p=0,l=[];p{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"}')},"08e2":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("h3",[e._v(e._s(e.$t("Edit_Recipe")))]),e.recipe?e._e():r("loading-spinner",{attrs:{size:25}}),void 0!==e.recipe?r("div",[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-12"},[r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Name")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.name,expression:"recipe.name"}],staticClass:"form-control",attrs:{id:"id_name"},domProps:{value:e.recipe.name},on:{input:function(t){t.target.composing||e.$set(e.recipe,"name",t.target.value)}}})])]),r("div",{staticClass:"row pt-2"},[r("div",{staticClass:"col-12"},[r("label",{attrs:{for:"id_description"}},[e._v(" "+e._s(e.$t("Description"))+" ")]),r("textarea",{directives:[{name:"model",rawName:"v-model",value:e.recipe.description,expression:"recipe.description"}],staticClass:"form-control",attrs:{id:"id_description",maxlength:"512"},domProps:{value:e.recipe.description},on:{input:function(t){t.target.composing||e.$set(e.recipe,"description",t.target.value)}}})])]),r("div",{staticClass:"row pt-2"},[r("div",{staticClass:"col-md-6",staticStyle:{"max-height":"50vh"}},[r("input",{ref:"file_upload",attrs:{id:"id_file_upload",type:"file",hidden:""},on:{change:function(t){return e.uploadImage(t.target.files[0])}}}),r("div",{staticClass:"h-100 w-100 border border-primary rounded",staticStyle:{"border-width":"2px!important","border-style":"dashed!important"},on:{drop:function(t){return t.preventDefault(),e.uploadImage(t.dataTransfer.files[0])},dragover:function(e){e.preventDefault()},click:function(t){e.$refs.file_upload.click()}}},[e.recipe.image?e._e():r("i",{staticClass:"far fa-image fa-10x text-primary",staticStyle:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),e.recipe.image?r("img",{staticClass:"img img-fluid img-responsive",staticStyle:{"object-fit":"cover",height:"100%"},attrs:{src:e.recipe.image,id:"id_image"}}):e._e()]),e.recipe.image?r("button",{staticClass:"btn btn-danger",staticStyle:{bottom:"10px",left:"30px",position:"absolute"},on:{click:e.deleteImage}},[e._v(e._s(e.$t("Delete"))+" ")]):e._e()]),r("div",{staticClass:"col-md-6"},[r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Preparation"))+" "+e._s(e.$t("Time")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.working_time,expression:"recipe.working_time"}],staticClass:"form-control",attrs:{id:"id_prep_time"},domProps:{value:e.recipe.working_time},on:{input:function(t){t.target.composing||e.$set(e.recipe,"working_time",t.target.value)}}}),r("br"),r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Waiting"))+" "+e._s(e.$t("Time")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.waiting_time,expression:"recipe.waiting_time"}],staticClass:"form-control",attrs:{id:"id_wait_time"},domProps:{value:e.recipe.waiting_time},on:{input:function(t){t.target.composing||e.$set(e.recipe,"waiting_time",t.target.value)}}}),r("br"),r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Servings")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.servings,expression:"recipe.servings"}],staticClass:"form-control",attrs:{id:"id_servings"},domProps:{value:e.recipe.servings},on:{input:function(t){t.target.composing||e.$set(e.recipe,"servings",t.target.value)}}}),r("br"),r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Servings"))+" "+e._s(e.$t("Text")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.servings_text,expression:"recipe.servings_text"}],staticClass:"form-control",attrs:{id:"id_servings_text",maxlength:"32"},domProps:{value:e.recipe.servings_text},on:{input:function(t){t.target.composing||e.$set(e.recipe,"servings_text",t.target.value)}}}),r("br"),r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Keywords")))]),r("multiselect",{attrs:{options:e.keywords,"close-on-select":!1,"clear-on-select":!0,"hide-selected":!0,"preserve-search":!0,placeholder:"Select Keyword","tag-placeholder":"Add Keyword",taggable:!0,label:"label","track-by":"id",id:"id_keywords",multiple:!0,loading:e.keywords_loading},on:{tag:e.addKeyword,"search-change":e.searchKeywords},model:{value:e.recipe.keywords,callback:function(t){e.$set(e.recipe,"keywords",t)},expression:"recipe.keywords"}})],1)]),void 0!==e.recipe?[r("div",{staticClass:"row pt-2"},[r("div",{staticClass:"col-md-12"},[r("div",{staticClass:"card border-grey"},[r("div",{staticClass:"card-header",staticStyle:{display:"table"}},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-9 d-table"},[r("h5",{staticClass:"d-table-cell align-middle"},[e._v(e._s(e.$t("Nutrition")))])]),r("div",{staticClass:"col-md-3"},[null===e.recipe.nutrition?r("button",{directives:[{name:"b-toggle",rawName:"v-b-toggle.id_nutrition_collapse",modifiers:{id_nutrition_collapse:!0}}],staticClass:"btn btn-sm btn-light shadow-none float-right",attrs:{type:"button"},on:{click:function(t){return e.addNutrition()}}},[r("i",{staticClass:"fas fa-plus-circle"})]):e._e(),null!==e.recipe.nutrition?r("button",{directives:[{name:"b-toggle",rawName:"v-b-toggle.id_nutrition_collapse",modifiers:{id_nutrition_collapse:!0}}],staticClass:"btn btn-sm btn-light shadow-none float-right",attrs:{type:"button"},on:{click:function(t){return e.removeNutrition()}}},[r("i",{staticClass:"fas fa-minus-circle"})]):e._e()])])]),r("b-collapse",{staticClass:"mt-2",attrs:{id:"id_nutrition_collapse"}},[e.recipe.nutrition?r("div",{staticClass:"card-body "},[r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Calories")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.nutrition.calories,expression:"recipe.nutrition.calories"}],staticClass:"form-control",attrs:{id:"id_calories"},domProps:{value:e.recipe.nutrition.calories},on:{input:function(t){t.target.composing||e.$set(e.recipe.nutrition,"calories",t.target.value)}}}),r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Carbohydrates")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.nutrition.carbohydrates,expression:"recipe.nutrition.carbohydrates"}],staticClass:"form-control",attrs:{id:"id_carbohydrates"},domProps:{value:e.recipe.nutrition.carbohydrates},on:{input:function(t){t.target.composing||e.$set(e.recipe.nutrition,"carbohydrates",t.target.value)}}}),r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Fats")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.nutrition.fats,expression:"recipe.nutrition.fats"}],staticClass:"form-control",attrs:{id:"id_fats"},domProps:{value:e.recipe.nutrition.fats},on:{input:function(t){t.target.composing||e.$set(e.recipe.nutrition,"fats",t.target.value)}}}),r("label",{attrs:{for:"id_name"}},[e._v(" "+e._s(e.$t("Proteins")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.recipe.nutrition.proteins,expression:"recipe.nutrition.proteins"}],staticClass:"form-control",attrs:{id:"id_proteins"},domProps:{value:e.recipe.nutrition.proteins},on:{input:function(t){t.target.composing||e.$set(e.recipe.nutrition,"proteins",t.target.value)}}})]):e._e()])],1)])])]:e._e(),r("draggable",{attrs:{list:e.recipe.steps,group:"steps","empty-insert-threshold":10,handle:".handle"},on:{sort:function(t){return e.sortSteps()}}},e._l(e.recipe.steps,(function(t,n){return r("div",{key:n,staticClass:"card",staticStyle:{"margin-top":"1vh"}},[r("div",{staticClass:"card-body",attrs:{id:"id_card_step_"+n}},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-11"},[r("h4",{staticClass:"handle",attrs:{id:"id_step_"+n}},["TEXT"===t.type?r("i",{staticClass:"fas fa-paragraph"}):e._e(),"TIME"===t.type?r("i",{staticClass:"fas fa-clock"}):e._e(),""!==t.name?[e._v(e._s(t.name))]:[e._v(e._s(e.$t("Step"))+" "+e._s(n+1))]],2)]),r("div",{staticClass:"col-1",staticStyle:{"text-align":"right"}},[r("a",{staticClass:"btn shadow-none btn-lg",attrs:{href:"#",role:"button",id:"dropdownMenuLink","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[r("i",{staticClass:"fas fa-ellipsis-v text-muted"})]),r("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuLink"}},[r("button",{staticClass:"dropdown-item",on:{click:function(r){return e.removeStep(t)}}},[r("i",{staticClass:"fa fa-trash fa-fw"}),e._v(" "+e._s(e.$t("Delete"))+" ")]),t.show_as_header?e._e():r("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){t.show_as_header=!0}}},[r("i",{staticClass:"fas fa-eye fa-fw"}),e._v(" "+e._s(e.$t("Show_as_header"))+" ")]),t.show_as_header?r("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){t.show_as_header=!1}}},[r("i",{staticClass:"fas fa-eye-slash fa-fw"}),e._v(" "+e._s(e.$t("Hide_as_header"))+" ")]):e._e(),n>0?r("button",{staticClass:"dropdown-item",on:{click:function(r){e.moveStep(t,n-1)}}},[r("i",{staticClass:"fa fa-arrow-up fa-fw"}),e._v(" "+e._s(e.$t("Move_Up"))+" ")]):e._e(),n!==e.recipe.steps.length-1?r("button",{staticClass:"dropdown-item",on:{click:function(r){e.moveStep(t,n+1)}}},[r("i",{staticClass:"fa fa-arrow-down fa-fw"}),e._v(" "+e._s(e.$t("Move_Down"))+" ")]):e._e()])])]),r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-8"},[r("label",{attrs:{for:"id_step_"+t.id+"name"}},[e._v(e._s(e.$t("Step_Name")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"step.name"}],staticClass:"form-control",attrs:{id:"id_step_"+t.id+"name"},domProps:{value:t.name},on:{input:function(r){r.target.composing||e.$set(t,"name",r.target.value)}}})]),r("div",{staticClass:"col-md-4"},[r("label",{attrs:{for:"id_type"}},[e._v(" "+e._s(e.$t("Step_Type")))]),r("select",{directives:[{name:"model",rawName:"v-model",value:t.type,expression:"step.type"}],staticClass:"form-control",attrs:{id:"id_type"},on:{change:function(r){var n=Array.prototype.filter.call(r.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.$set(t,"type",r.target.multiple?n:n[0])}}},[r("option",{attrs:{value:"TEXT"}},[e._v(e._s(e.$t("Text")))]),r("option",{attrs:{value:"TIME"}},[e._v(e._s(e.$t("Time")))]),r("option",{attrs:{value:"FILE"}},[e._v(e._s(e.$t("File")))]),r("option",{attrs:{value:"RECIPE"}},[e._v(e._s(e.$t("Recipe")))])])])]),r("div",{staticClass:"row",staticStyle:{"margin-top":"12px"}},[r("div",{staticClass:"col-md-3"},[r("label",{attrs:{for:"id_step_"+t.id+"_time"}},[e._v(e._s(e.$t("step_time_minutes")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:t.time,expression:"step.time"}],staticClass:"form-control",attrs:{id:"id_step_"+t.id+"_time"},domProps:{value:t.time},on:{input:function(r){r.target.composing||e.$set(t,"time",r.target.value)}}})]),"FILE"===t.type?r("div",{staticClass:"col-md-9"},[r("label",{attrs:{for:"id_step_"+t.id+"_file"}},[e._v(e._s(e.$t("File")))]),r("multiselect",{ref:"file",refInFor:!0,attrs:{options:e.files,"close-on-select":!0,"clear-on-select":!0,"allow-empty":!0,"preserve-search":!0,placeholder:"Select File","select-label":"Select",id:"id_step_"+t.id+"_file",label:"name","track-by":"name",multiple:!1,loading:e.files_loading},on:{"search-change":e.searchFiles},model:{value:t.file,callback:function(r){e.$set(t,"file",r)},expression:"step.file"}})],1):e._e(),"RECIPE"===t.type?r("div",{staticClass:"col-md-9"},[r("label",{attrs:{for:"id_step_"+t.id+"_recipe"}},[e._v(e._s(e.$t("Recipe")))]),r("multiselect",{ref:"step_recipe",refInFor:!0,attrs:{options:e.recipes.map((function(e){return e.id})),"close-on-select":!0,"clear-on-select":!0,"allow-empty":!0,"preserve-search":!0,placeholder:"Select Recipe","select-label":"Select",id:"id_step_"+t.id+"_recipe","custom-label":function(t){return e.recipes.find((function(e){return e.id===t})).name},multiple:!1,loading:e.recipes_loading},on:{"search-change":e.searchRecipes},model:{value:t.step_recipe,callback:function(r){e.$set(t,"step_recipe",r)},expression:"step.step_recipe"}})],1):e._e()]),"TEXT"===t.type?[r("div",{staticClass:"row",staticStyle:{"margin-top":"12px"}},[r("div",{staticClass:"col-md-12"},[r("div",{staticClass:"jumbotron",staticStyle:{padding:"16px"}},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-12"},[r("h4",[e._v(e._s(e.$t("Ingredients")))])])]),r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-12",staticStyle:{"margin-top":"8px"}},[r("draggable",{attrs:{list:t.ingredients,group:"ingredients","empty-insert-threshold":10,handle:".handle"},on:{sort:function(r){return e.sortIngredients(t)}}},e._l(t.ingredients,(function(i,o){return r("div",{key:i.id},[r("hr",{staticClass:"d-md-none"}),r("div",{staticClass:"d-flex"},[r("div",{staticClass:"flex-grow-0 handle align-self-start"},[r("button",{staticClass:"btn btn-lg shadow-none",attrs:{type:"button"}},[r("i",{staticClass:"fas fa-arrows-alt-v "})])]),r("div",{staticClass:"flex-fill row",staticStyle:{"margin-left":"4px","margin-right":"4px"}},[i.is_header?e._e():r("div",{staticClass:"col-lg-2 col-md-6 small-padding"},[i.no_amount?e._e():r("input",{directives:[{name:"model",rawName:"v-model",value:i.amount,expression:"ingredient.amount"}],staticClass:"form-control",attrs:{type:"number",step:"any",id:"amount_"+n+"_"+o},domProps:{value:i.amount},on:{input:function(t){t.target.composing||e.$set(i,"amount",t.target.value)}}})]),i.is_header?e._e():r("div",{staticClass:"col-lg-2 col-md-6 small-padding"},[i.no_amount?e._e():r("multiselect",{ref:"unit",refInFor:!0,attrs:{options:e.units,"close-on-select":!0,"clear-on-select":!0,"allow-empty":!0,"preserve-search":!0,placeholder:"Select Unit","tag-placeholder":"Create","select-label":"Select",taggable:!0,id:"unit_"+n+"_"+o,label:"name","track-by":"name",multiple:!1,loading:e.units_loading},on:{tag:e.addUnitType,"search-change":e.searchUnits},model:{value:i.unit,callback:function(t){e.$set(i,"unit",t)},expression:"ingredient.unit"}})],1),i.is_header?e._e():r("div",{staticClass:"col-lg-4 col-md-6 small-padding"},[r("multiselect",{ref:"food",refInFor:!0,attrs:{options:e.foods,"close-on-select":!0,"clear-on-select":!0,"allow-empty":!0,"preserve-search":!0,placeholder:"Select Food","tag-placeholder":"Create","select-label":"Select",taggable:!0,id:"ingredient_"+n+"_"+o,label:"name","track-by":"name",multiple:!1,loading:e.foods_loading},on:{tag:e.addFoodType,"search-change":e.searchFoods},model:{value:i.food,callback:function(t){e.$set(i,"food",t)},expression:"ingredient.food"}})],1),r("div",{staticClass:"small-padding",class:{"col-lg-4 col-md-6":!i.is_header,"col-lg-12 col-md-12":i.is_header}},[r("input",{directives:[{name:"model",rawName:"v-model",value:i.note,expression:"ingredient.note"}],staticClass:"form-control",attrs:{placeholder:e.$t("Note")},domProps:{value:i.note},on:{keydown:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"tab",9,r.key,"Tab")?null:function(r){t.ingredients.indexOf(i)===t.ingredients.length-1&&(r.preventDefault(),e.addIngredient(t))}.apply(null,arguments)},input:function(t){t.target.composing||e.$set(i,"note",t.target.value)}}})])]),r("div",{staticClass:"flex-grow-0 small-padding"},[r("a",{staticClass:"btn shadow-none btn-lg",attrs:{href:"#",role:"button",id:"dropdownMenuLink2","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[r("i",{staticClass:"fas fa-ellipsis-v text-muted"})]),r("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuLink2"}},[r("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(r){return e.removeIngredient(t,i)}}},[r("i",{staticClass:"fa fa-trash fa-fw"}),e._v(" "+e._s(e.$t("Delete"))+" ")]),i.is_header?e._e():r("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){i.is_header=!0}}},[r("i",{staticClass:"fas fa-heading fa-fw"}),e._v(" "+e._s(e.$t("Make_header"))+" ")]),i.is_header?r("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){i.is_header=!1}}},[r("i",{staticClass:"fas fa-leaf fa-fw"}),e._v(" "+e._s(e.$t("Make_Ingredient"))+" ")]):e._e(),i.no_amount?e._e():r("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){i.no_amount=!0}}},[r("i",{staticClass:"fas fa-balance-scale-right fa-fw"}),e._v(" "+e._s(e.$t("Disable_Amount"))+" ")]),i.no_amount?r("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){i.no_amount=!1}}},[r("i",{staticClass:"fas fa-balance-scale-right fa-fw"}),e._v(" "+e._s(e.$t("Enable_Amount"))+" ")]):e._e(),r("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(t){return e.copyTemplateReference(o,i)}}},[r("i",{staticClass:"fas fa-code"}),e._v(" "+e._s(e.$t("Copy_template_reference"))+" ")])])])])])})),0)],1)]),r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-2 offset-md-5",staticStyle:{"text-align":"center","margin-top":"8px"}},[r("button",{staticClass:"btn btn-success btn-block",on:{click:function(r){return e.addIngredient(t)}}},[r("i",{staticClass:"fa fa-plus"})])])])])])])]:e._e(),r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-12"},[r("label",{attrs:{for:"id_instruction_"+t.id}},[e._v(e._s(e.$t("Instructions")))]),r("v-md-editor",{attrs:{height:"30vh","left-toolbar":"undo redo | h bold italic strikethrough quote | ul ol table hr | link image code","right-toolbar":"preview sync-scroll fullscreen",id:"id_instruction_"+t.id,mode:"edit"},model:{value:t.instruction,callback:function(r){e.$set(t,"instruction",r)},expression:"step.instruction"}})],1)])],2)])})),0),r("div",{staticClass:"row pt-2"},[r("div",{staticClass:"col-md-12 text-center"},[r("button",{staticClass:"btn btn-success shadow-none ",attrs:{type:"button"},on:{click:function(t){return e.addStep()}}},[e._v(e._s(e.$t("Add_Step"))+" ")])])]),r("br"),r("br"),r("br"),void 0!==e.recipe?r("div",{staticClass:"row fixed-bottom p-2 b-2 border-top text-center",staticStyle:{background:"white"}},[r("div",{staticClass:"col-md-3 col-6"},[r("a",{staticClass:"btn btn-block btn-danger shadow-none",attrs:{href:e.resolveDjangoUrl("delete_recipe",e.recipe.id)}},[e._v(e._s(e.$t("Delete")))])]),r("div",{staticClass:"col-md-3 col-6"},[r("a",{attrs:{href:e.resolveDjangoUrl("view_recipe",e.recipe.id)}},[r("button",{staticClass:"btn btn-block btn-primary shadow-none"},[e._v(e._s(e.$t("View")))])])]),r("div",{staticClass:"col-md-3 col-6"},[r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn btn-sm btn-block btn-info shadow-none",attrs:{type:"button",title:e.$t("Key_Ctrl")+" + S"},on:{click:function(t){return e.updateRecipe(!1)}}},[e._v(e._s(e.$t("Save"))+" ")])]),r("div",{staticClass:"col-md-3 col-6"},[r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn btn-sm btn-block btn-success shadow-none",attrs:{type:"button",title:e.$t("Key_Ctrl")+" + "+e.$t("Key_Shift")+" + S"},on:{click:function(t){return e.updateRecipe(!0)}}},[e._v(e._s(e.$t("Save_and_View"))+" ")])])]):e._e()],2):e._e()],1)},o=[],a=r("3835"),s=r("b85c"),c=(r("caad"),r("2532"),r("ac1f"),r("5319"),r("159b"),r("99af"),r("4de4"),r("a434"),r("1276"),r("b0c0"),r("5f5b")),u=(r("2dd8"),r("b76a")),d=r.n(u),p=r("fa7d"),l=r("8e5f"),h=r.n(l),f=r("2b2d"),b=r("d76c"),m=r("ee2d"),v=r.n(m),g=(r("fefe"),r("02c6")),O=r.n(g),j=(r("8966"),r("c197")),y=r.n(j),_=r("3b16"),S=r.n(_);v.a.use(O.a,{Prism:y.a}),v.a.lang.use("en-US",S.a),n["default"].use(v.a),n["default"].use(c["a"]);var w={name:"RecipeSearchView",mixins:[p["d"],p["a"]],components:{Multiselect:h.a,LoadingSpinner:b["a"],draggable:d.a},data:function(){return{recipe_id:window.RECIPE_ID,recipe:void 0,recipe_changed:void 0,keywords:[],keywords_loading:!1,foods:[],foods_loading:!1,units:[],units_loading:!1,files:[],files_loading:!1,recipes:[],recipes_loading:!1,message:""}},computed:{},mounted:function(){this.loadRecipe(),this.searchUnits(""),this.searchFoods(""),this.searchKeywords(""),this.searchFiles(""),this.searchRecipes(""),this.$i18n.locale=window.CUSTOM_LOCALE},created:function(){window.addEventListener("keydown",this.keyboardListener),window.addEventListener("beforeunload",this.warnPageLeave)},beforeUnmount:function(){window.removeEventListener("keydown",this.keyboardListener)},watch:{recipe:{deep:!0,handler:function(){this.recipe_changed=void 0!==this.recipe_changed}}},methods:{keyboardListener:function(e){if("Space"===e.code&&e.ctrlKey){e.preventDefault();var t,r=Object(s["a"])(e.path);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(void 0!==n.id&&n.id.includes("id_card_step_")){var i=this.recipe.steps[n.id.replace("id_card_step_","")];this.addIngredient(i)}}}catch(o){r.e(o)}finally{r.f()}}"KeyS"===e.code&&e.ctrlKey&&!e.shiftKey&&(e.preventDefault(),this.updateRecipe(!1)),"KeyS"===e.code&&e.ctrlKey&&e.shiftKey&&(e.preventDefault(),this.updateRecipe(!0))},warnPageLeave:function(e){if(this.recipe_changed)return e.returnValue="",""},loadRecipe:function(){var e=this,t=new f["a"];t.retrieveRecipe(this.recipe_id).then((function(t){e.recipe=t.data,e.loading=!1,e.recipe.steps.forEach((function(t){null!=t.step_recipe&&e.recipes.push(t.step_recipe_data)}))})).catch((function(t){e.loading=!1,console.log(t),p["e"].makeStandardToast(p["e"].FAIL_FETCH)}))},updateRecipe:function(e){var t=this,r=new f["a"];this.sortSteps();var n,i=Object(s["a"])(this.recipe.steps);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.sortIngredients(o)}}catch(a){i.e(a)}finally{i.f()}r.updateRecipe(this.recipe_id,this.recipe,{}).then((function(r){console.log(r),p["e"].makeStandardToast(p["e"].SUCCESS_UPDATE),t.recipe_changed=!1,e&&(location.href=Object(p["l"])("view_recipe",t.recipe_id))})).catch((function(e){console.log(e),p["e"].makeStandardToast(p["e"].FAIL_UPDATE)}))},uploadImage:function(e){var t=this,r=new f["a"];void 0!==e&&r.imageRecipe(this.recipe.id,e).then((function(e){t.recipe.image=e.data.image,t.recipe_changed=!1,p["e"].makeStandardToast(p["e"].SUCCESS_UPDATE)})).catch((function(e){p["e"].makeStandardToast(p["e"].FAIL_UPDATE),console.log(e.request,e.response)}))},deleteImage:function(){var e=this;if(confirm(this.$t("delete_confirmation",{}))){var t=new f["a"];t.imageRecipe(this.recipe.id,void 0).then((function(t){e.recipe.image=null,e.recipe_changed=!1,p["e"].makeStandardToast(p["e"].SUCCESS_DELETE)})).catch((function(e){p["e"].makeStandardToast(p["e"].FAIL_DELETE),console.log(e.request,e.response)}))}},addStep:function(){this.recipe.steps.push({instruction:"",ingredients:[],type:"TEXT",show_as_header:!0})},sortSteps:function(){this.recipe.steps.forEach((function(e,t){e.order=t}))},sortIngredients:function(e){e.ingredients.forEach((function(e,t){e.order=t}))},addIngredient:function(e){var t=this;e.ingredients.push({food:null,unit:{name:window.DEFAULT_UNIT},amount:0,note:"",order:0,is_header:!1,no_amount:!1}),this.sortIngredients(e),this.$nextTick((function(){return document.getElementById("amount_".concat(t.recipe.steps.indexOf(e),"_").concat(e.ingredients.length-1)).focus()}))},removeIngredient:function(e,t){confirm(this.$t("confirm_delete",{object:this.$t("Ingredient")}))&&(e.ingredients=e.ingredients.filter((function(e){return e!==t})))},removeStep:function(e){confirm(this.$t("confirm_delete",{object:this.$t("Step")}))&&(this.recipe.steps=this.recipe.steps.filter((function(t){return t!==e})))},moveStep:function(e,t){this.recipe.steps.splice(this.recipe.steps.indexOf(e),1),this.recipe.steps.splice(t<0?0:t,0,e),this.sortSteps()},addFoodType:function(e,t){var r=t.split("_"),n=Object(a["a"])(r,3),i=(n[0],n[1]),o=n[2],s=this.recipe.steps[i].ingredients[o];s.food={name:e},this.foods.push(s.food),this.recipe.steps[i].ingredients[o]=s},addUnitType:function(e,t){var r=t.split("_"),n=Object(a["a"])(r,3),i=(n[0],n[1]),o=n[2],s=this.recipe.steps[i].ingredients[o];s.unit={name:e},this.units.push(s.unit),this.recipe.steps[i].ingredients[o]=s},addKeyword:function(e){var t={label:e,name:e};this.recipe.keywords.push(t)},searchKeywords:function(e){var t=this,r=new f["a"];this.keywords_loading=!0,r.listKeywords(e).then((function(e){t.keywords=e.data.results,t.keywords_loading=!1})).catch((function(e){console.log(e),p["e"].makeStandardToast(p["e"].FAIL_FETCH)}))},searchFiles:function(e){var t=this,r=new f["a"];this.files_loading=!0,r.listUserFiles({query:{query:e}}).then((function(e){t.files=e.data,t.files_loading=!1})).catch((function(e){console.log(e),p["e"].makeStandardToast(p["e"].FAIL_FETCH)}))},searchRecipes:function(e){var t=this;this.recipes_loading=!0,this.genericAPI(this.Models.RECIPE,this.Actions.LIST,{query:e}).then((function(e){t.recipes=e.data.results,t.recipes_loading=!1})).catch((function(e){console.log(e),p["e"].makeStandardToast(p["e"].FAIL_FETCH)}))},searchUnits:function(e){var t=this,r=new f["a"];this.units_loading=!0,r.listUnits(e).then((function(e){if(t.units=e.data.results,void 0!==t.recipe){var r,n=Object(s["a"])(t.recipe.steps);try{for(n.s();!(r=n.n()).done;){var i,o=r.value,a=Object(s["a"])(o.ingredients);try{for(a.s();!(i=a.n()).done;){var c=i.value;null!==c.unit&&void 0===c.unit.id&&t.units.push(c.unit)}}catch(u){a.e(u)}finally{a.f()}}}catch(u){n.e(u)}finally{n.f()}}t.units_loading=!1})).catch((function(e){p["e"].makeStandardToast(p["e"].FAIL_FETCH)}))},searchFoods:function(e){var t=this,r=new f["a"];this.foods_loading=!0,r.listFoods(e).then((function(e){if(t.foods=e.data.results,void 0!==t.recipe){var r,n=Object(s["a"])(t.recipe.steps);try{for(n.s();!(r=n.n()).done;){var i,o=r.value,a=Object(s["a"])(o.ingredients);try{for(a.s();!(i=a.n()).done;){var c=i.value;null!==c.food&&void 0===c.food.id&&t.foods.push(c.food)}}catch(u){a.e(u)}finally{a.f()}}}catch(u){n.e(u)}finally{n.f()}}t.foods_loading=!1})).catch((function(e){p["e"].makeStandardToast(p["e"].FAIL_FETCH)}))},scrollToStep:function(e){document.getElementById("id_step_"+e).scrollIntoView({behavior:"smooth"})},addNutrition:function(){this.recipe.nutrition={}},removeNutrition:function(){this.recipe.nutrition=null},copyTemplateReference:function(e,t){var r=document.createElement("textarea"),n="{{ ingredients[".concat(e,"] }}");null!==t.food&&(n+="{# ".concat(t.food.name," #}")),r.value=n,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r)}}},k=w,P=(r("60bc"),r("7885"),r("2877")),U=Object(P["a"])(k,i,o,!1,null,null,null),R=U.exports,C=r("9225");n["default"].config.productionTip=!1,new n["default"]({i18n:C["a"],render:function(e){return e(R)}}).$mount("#app")},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 k}));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;r{child} do nadrzędnego {parent}","merge_confirmation":"Zamień {source} z {target}","create_rule":"i stwórz automatyzację","move_selection":"Wskaż nadrzędny {type} aby przenieść do niego {source}.","merge_selection":"Zastąp wszystkie wystąpienia {source} wybranym {type}.","Root":"Główny","Ignore_Shopping":"Ignoruj zakupy","Shopping_Category":"Kategoria zakupów","Edit_Food":"Edytuj żywność","Move_Food":"Przenieś żywność","New_Food":"Nowa żywność","Hide_Food":"Ukryj żywność","Food_Alias":"Alias żywności","Unit_Alias":"Alias jednostek","Keyword_Alias":"Alias słowa kluczowego","Delete_Food":"Usuń żywność","No_ID":"ID nie znaleziono, nie można usunąć.","Meal_Plan_Days":"Przyszłe plany posiłków","merge_title":"Scal {type}","move_title":"Przenieś {type}","Food":"Żywność","Recipe_Book":"Książka z przepisami","del_confirmation_tree":"Czy na pewno chcesz usunąć {source} i wszystkie jego elementy podrzędne?","delete_title":"Usuń {type}","create_title":"Nowy {type}","edit_title":"Edytuj {type}","Name":"Nazwa","Type":"Typ","Description":"Opis","Recipe":"Przepis","tree_root":"Poziom główny drzewa","Icon":"Ikona","Unit":"Jednostka","No_Results":"Brak wyników","New_Unit":"Nowa jednostka","Create_New_Shopping Category":"Stwórz nową kategorię zakupów","Create_New_Food":"Dodaj nową żywność","Create_New_Keyword":"Dodaj nowe słowo kluczowe","Create_New_Unit":"Dodaj nowa jednostkę","and_up":"& Góra","Instructions":"Instrukcje","Unrated":"Nieoceniony","Automate":"Automatyzacja","Key_Ctrl":"Ctrl","Key_Shift":"Shift","Time":"Czas","Text":"Tekst","Shopping_list":"Lista zakupów"}')},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()})},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":"Gesplitste weergave","New_Keyword":"Nieuw Etiket","Delete_Keyword":"Verwijder Etiket","Edit_Keyword":"Bewerk Etiket","Move_Keyword":"Verplaats Etiket","Hide_Keywords":"Verberg Etiket","Hide_Recipes":"Verberg Recepten","Advanced Search Settings":"Geavanceerde zoekinstellingen","Merge":"Samenvoegen","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","Key_Ctrl":"Ctrl","Parameter":"Parameter","Automation":"Automatisering","create_rule":"en creëer automatisering","Food_Alias":"Eten Alias","Unit_Alias":"Eenheid Alias","Keyword_Alias":"Etiket Alias","Recipe_Book":"Kookboek","New_Unit":"Nieuwe Eenheid","Create_New_Shopping Category":"Maak nieuwe Boodschappen Categorie","delete_title":"Verwijder {type}","create_title":"Nieuw {type}","edit_title":"Bewerk {type}","Name":"Naam","Type":"Type","Description":"Beschrijving","Recipe":"Recept","tree_root":"Hoogste niveau","Icon":"Icoon","Unit":"Eenheid","No_Results":"Geen resultaten","Create_New_Keyword":"Voeg nieuw Etiket toe","Create_New_Unit":"Voeg nieuwe Eenheid toe","Instructions":"Instructies","Automate":"Automatiseer","Key_Shift":"Shift","Text":"Tekst","and_up":"& Omhoog","Unrated":"Niet beoordeeld","Shopping_list":"Boodschappenlijst","del_confirmation_tree":"Weet je zeker dat je {source} en al zijn kinderen wil verwijderen?","Create_New_Food":"Voeg nieuw Eten toe","Time":"Tijd","warning_feature_beta":"Deze functie zit op dit moment in de BETA (test) fase. Verwacht hier bugs en toekomstige wijzigingen die tot het verlies van data gaan leiden bij het gebruik."}')},d76c:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"row"},[r("div",{staticClass:"col",staticStyle:{"text-align":"center"}},[r("img",{staticClass:"spinner-tandoor",style:{height:e.size+"vh"},attrs:{alt:"loading spinner",src:""}})])])},i=[],o=(r("a9e3"),{name:"LoadingSpinner",props:{recipe:Object,size:{type:Number,default:30}}}),a=o,s=r("2877"),c=Object(s["a"])(a,n,i,!1,null,null,null);t["a"]=c.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":""}')},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","Shopping_list":"Shopping List"}')},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,"k",(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 w})),r.d(t,"l",(function(){return k})),r.d(t,"g",(function(){return U})),r.d(t,"a",(function(){return C})),r.d(t,"i",(function(){return T})),r.d(t,"j",(function(){return A})),r.d(t,"b",(function(){return F}));var n=r("b85c"),i=r("5530"),o=r("3835"),a=r("2909"),s=r("53ca"),c=r("d4ec"),u=r("bee2"),d=r("ade3"),p=(r("99af"),r("4fad"),r("159b"),r("caad"),r("2532"),r("b0c0"),r("b64b"),r("4de4"),r("7db0"),r("d81d"),r("d3b7"),r("3ca3"),r("ddb0"),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 w={methods:{resolveDjangoUrl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return k(e,t)}}};function k(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 U(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 C={data:function(){return{Models:v["b"],Actions:v["a"]}},methods:{genericAPI:function(e,t,r){var n,i=T(e,t);if(null!==i&&void 0!==i&&null!==(n=i.config)&&void 0!==n&&n.function)return N[i.config.function](t,r,i);var o=i.function,s=E(r,i),c=new f["a"];return c[o].apply(c,Object(a["a"])(s))},genericGetAPI:function(e,t){return m.a.get(this.resolveDjangoUrl(e),{params:t,emulateJSON:!0})}}};function L(e,t,r){if(e)for(var n=0,i=Object.entries(e);n