(function(e){function t(t){for(var n,a,s=t[0],c=t[1],u=t[2],p=0,l=[];p0?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),O=(r("fefe"),r("02c6")),g=r.n(O),j=(r("8966"),r("c197")),y=r.n(j),_=r("3b16"),S=r.n(_);v.a.use(g.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["k"])("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)}}},P=w,k=(r("60bc"),r("7885"),r("2877")),R=Object(k["a"])(P,i,o,!1,null,null,null),U=R.exports,C=r("9225");n["default"].config.productionTip=!1,new n["default"]({i18n:C["a"],render:function(e){return e(U)}}).$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 w}));r("d3b7"),r("3ca3"),r("ddb0"),r("2b3d"),r("ac1f"),r("5319");var n,i,o,a,s,c,u,d=r("9ab4"),p=r("bc3a"),l=r.n(p),h=(r("841c"),r("25f0"),r("b0c0"),"undefined"!==typeof window?localStorage.getItem("BASE_PATH")||"":location.protocol+"//"+location.host),f=function(){function e(e,t,r){void 0===t&&(t=h),void 0===r&&(r=l.a),this.basePath=t,this.axios=r,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}return e}(),b=function(e){function t(t,r){var n=e.call(this,r)||this;return n.field=t,n.name="RequiredError",n}return Object(d["c"])(t,e),t}(Error),m="https://example.com",v=function(e,t,r){if(null===r||void 0===r)throw new b(t,"Required parameter "+t+" was null or undefined when calling "+e+".")},O=function(e){for(var t=[],r=1;r1){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":"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"}')},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('{"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","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}","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","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","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","Key_Ctrl":"Ctrl","Key_Shift":"Shift","Time":"Time","Text":"Text"}')},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 g})),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 w})),r.d(t,"k",(function(){return P})),r.d(t,"g",(function(){return R})),r.d(t,"a",(function(){return C})),r.d(t,"i",(function(){return T})),r.d(t,"b",(function(){return F}));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("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"),O=r("a026"),g={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-top-center",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 P(e,t)}}};function P(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 k(e){if(void 0!==window.USER_PREF)return window.USER_PREF[e]}function R(e,t){if(k("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 U(e*t)}function U(e){var t=k("user_fractions")?k("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,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