var WPRecipeMaker;(()=>{var e,t={4853:(e,t,n)=>{"use strict";var i;n(3524);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.rating={init(){const e=document.querySelector(".comment-form-wprm-rating");if(e){const t=document.querySelectorAll(".wprm-recipe-container"),n=document.querySelector("body.wp-admin");t.length>0||n?e.style.display="":e.style.display="none"}},settings:{enabled:void 0!==window.wprm_public?wprm_public.settings.features_comment_ratings:wprm_admin.settings.features_comment_ratings},onClick(e){const t=e.closest(".wprm-comment-ratings-container, .wprm-user-ratings-modal-stars"),n=t?parseInt(t.dataset.currentRating):0,i=parseInt(e.value);if(i===n)e.checked=!1,document.querySelector('input[name="'+e.name+'"][value="0"]').checked=!0,t.dataset.currentRating=0;else if(t.dataset.currentRating=i,window.WPRecipeMaker.hasOwnProperty("analytics")){let e=0;const t=document.querySelector(".wprm-recipe-container");t&&t.dataset.hasOwnProperty("recipeId")&&(e=parseInt(t.dataset.recipeId)),window.WPRecipeMaker.analytics.registerAction(e,wprm_public.post_id,"comment-rating",{rating:i})}window.WPRecipeMaker.hasOwnProperty("comments")&&window.WPRecipeMaker.comments.hasOwnProperty("change")&&window.WPRecipeMaker.comments.change(t),document.dispatchEvent(new CustomEvent("wprm-comment-rating-change",{detail:{el:e,container:t,rating:i}}))}},i=()=>{window.WPRecipeMaker.rating.init()},"loading"!=document.readyState?i():document.addEventListener("DOMContentLoaded",i);n(3621),n(2811),n(2942),n(385),n(4253),n(1157),n(68),n(8455);function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var s,c,p,d,l,u=(s=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],c=function(){function e(t){var n=t.targetModal,i=t.triggers,r=void 0===i?[]:i,a=t.onShow,s=void 0===a?function(){}:a,c=t.onClose,p=void 0===c?function(){}:c,d=t.openTrigger,l=void 0===d?"data-micromodal-trigger":d,u=t.closeTrigger,m=void 0===u?"data-micromodal-close":u,f=t.openClass,w=void 0===f?"is-open":f,h=t.disableScroll,g=void 0!==h&&h,v=t.disableFocus,y=void 0!==v&&v,b=t.awaitCloseAnimation,k=void 0!==b&&b,P=t.awaitOpenAnimation,A=void 0!==P&&P,M=t.debugMode,R=void 0!==M&&M;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modal=document.getElementById(n),this.config={debugMode:R,disableScroll:g,openTrigger:l,closeTrigger:m,openClass:w,onShow:s,onClose:p,awaitCloseAnimation:k,awaitOpenAnimation:A,disableFocus:y},r.length>0&&this.registerTriggers.apply(this,o(r)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t,n;return t=e,(n=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.filter(Boolean).forEach((function(t){t.addEventListener("click",(function(t){return e.showModal(t)}))}))}},{key:"showModal",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){this.modal.addEventListener("animationend",(function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()}),!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var n=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(n),t.removeEventListener("animationend",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){(e.target.hasAttribute(this.config.closeTrigger)||e.target.parentNode.hasAttribute(this.config.closeTrigger))&&(e.preventDefault(),e.stopPropagation(),this.closeModal(e))}},{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(s);return Array.apply(void 0,o(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var n=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var n=t.indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&n===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&r(t.prototype,n),e}(),p=null,d=function(e){if(!document.getElementById(e))return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(e,'"></div>')),!1},l=function(e,t){if(function(e){e.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))}(e),!t)return!0;for(var n in t)d(n);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=o(document.querySelectorAll("[".concat(t.openTrigger,"]"))),i=function(e,t){var n=[];return e.forEach((function(e){var i=e.attributes[t].value;void 0===n[i]&&(n[i]=[]),n[i].push(e)})),n}(n,t.openTrigger);if(!0!==t.debugMode||!1!==l(n,i))for(var r in i){var a=i[r];t.targetModal=r,t.triggers=o(a),p=new c(t)}},show:function(e,t){var n=t||{};n.targetModal=e,!0===n.debugMode&&!1===d(e)||(p&&p.removeEventListeners(),(p=new c(n)).showModal())},close:function(e){e?p.closeModalById(e):p.closeModal()}});"undefined"!=typeof window&&(window.MicroModal=u);const m=u;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.modal={savedScrollPosition:0,currentOpenUid:null,open(e,t={}){this.currentOpenUid&&this.currentOpenUid!==e&&this.close(this.currentOpenUid);const n=`wprm-popup-modal-${e}`;if(!document.getElementById(n))return void console.warn(`WPRM modal "${n}" could not be found in the DOM.`);this.savedScrollPosition=window.pageYOffset||document.documentElement.scrollTop;const i=window.getComputedStyle(document.documentElement).marginTop;let r=0;i&&"0px"!==i&&(r=parseFloat(i)),document.body.classList.add("wprm-popup-modal-open"),document.body.style.top=`-${this.savedScrollPosition-r}px`,m.show(n,{onShow:n=>{this.currentOpenUid=e;const i=n.dataset.type;document.dispatchEvent(new CustomEvent("wprm-modal-open",{detail:{type:i,uid:e,modal:n,data:t}}))},onClose:n=>{this.currentOpenUid===e&&(this.currentOpenUid=null);const i=n.dataset.type;document.dispatchEvent(new CustomEvent("wprm-modal-close",{detail:{type:i,uid:e,modal:n,data:t}}));const r=this.savedScrollPosition;document.body.classList.remove("wprm-popup-modal-open"),document.body.style.top="",this.savedScrollPosition=0,window.scrollTo({top:r,behavior:"instant"})},awaitCloseAnimation:!0})},close(e){`${this.currentOpenUid}`==`${e}`&&(m.close("wprm-popup-modal-"+e),this.currentOpenUid===e&&(this.currentOpenUid=null))}};n(7561),n(9854),n(3579),n(1104),n(6944);var f=n(5266);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.jump={init:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-recipe-jump, .wprm-recipe-jump-to-comments, .wprm-recipe-jump-video, .wprm-jump-smooth-scroll, .wprm-recipe-jump-to-section")){WPRecipeMaker.jump.onClick(t,e);break}}),!1)},onClick:(e,t)=>{const n=e.getAttribute("href");if(e.matches(".wprm-jump-smooth-scroll")){t.preventDefault();let i=parseInt(e.dataset.smoothScroll);i<0&&(i=500),(0,f.A)(document.querySelector(n),{verticalOffset:-100,speed:i})}else if(!wprm_public.settings.jump_output_hash){const e=document.querySelector(n);e&&(t.preventDefault(),e.scrollIntoView())}}},function(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}((()=>{window.WPRecipeMaker.jump.init()}));n(9002);var w=n(4558);n(2998);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.tooltip={init(){WPRecipeMaker.tooltip.addTooltips()},addTooltips(e=document){let t=[];e&&e.classList&&e.classList.contains("wprm-tooltip")&&t.push(e),e&&"function"==typeof e.querySelectorAll&&(t=t.concat([...e.querySelectorAll(".wprm-tooltip")]));for(let n of t){const e=n._tippy;e&&e.destroy();const t=!!n.dataset.hasOwnProperty("tooltip")&&n.dataset.tooltip;if(t){n.role="button";const e=n.dataset.hasOwnProperty("tooltipHtml")&&"1"===n.dataset.tooltipHtml;let i=t;e&&(i=i.replace(/<[^>]*>/g,"")),(0,w.Ay)(n,{theme:"wprm",content:i,allowHTML:!1,interactive:!0,onCreate(e){e.popper.style.display="inline-block",e._isFetching=!1,e._fetchedContent=!1},onShow(n){n._isFetching||n._fetchedContent||e&&(n._isFetching=!0,fetch(`${wprm_public.endpoints.utilities}/sanitize`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({text:t})}).then((e=>!!e.ok&&e.json())).then((e=>{n._isFetching=!1,n._fetchedContent=!0,e&&(n.setContent(e),n.setProps({allowHTML:!0}))})))}})}}}},function(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}((()=>{window.WPRecipeMaker.tooltip.init()}));n(9047)},3524:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.analytics={init:()=>{(wprm_public.settings.analytics_enabled||wprm_public.settings.google_analytics_enabled)&&document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this&&!window.WPRecipeMaker.analytics.checkClick(t,e);t=t.parentNode);}),!1)},checkClick:(e,t)=>{if(e.matches(".wprm-recipe-jump")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"jump-to-recipe"),!0}if(e.matches(".wprm-recipe-jump-video")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"jump-to-video"),!0}if(e.matches(".wprm-recipe-pin")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"pin-button"),!0}if(e.matches(".wprm-recipe-facebook-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"facebook-share-button"),!0}if(e.matches(".wprm-recipe-messenger-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"messenger-share-button"),!0}if(e.matches(".wprm-recipe-twitter-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"twitter-share-button"),!0}if(e.matches(".wprm-recipe-bluesky-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"bluesky-share-button"),!0}if(e.matches(".wprm-recipe-mastodon-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"mastodon-share-button"),!0}if(e.matches(".wprm-recipe-tumblr-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"tumblr-share-button"),!0}if(e.matches(".wprm-recipe-text-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"text-share-button"),!0}if(e.matches(".wprm-recipe-whatsapp-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"whatsapp-share-button"),!0}if(e.matches(".wprm-recipe-email-share")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipe;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"email-share-button"),!0}if(e.matches(".wprm-recipe-add-to-collection-recipe")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipeId;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"add-to-collections-button"),!0}if(e.matches(".wprm-recipe-add-to-shopping-list")){const t=!!e.dataset.hasOwnProperty("recipe")&&e.dataset.recipeId;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"add-to-shopping-list-button"),!0}if(e.matches(".wprm-recipe-cook-mode")){const t=!!e.dataset.hasOwnProperty("recipeId")&&e.dataset.recipeId;return t&&window.WPRecipeMaker.analytics.registerAction(t,wprm_public.post_id,"cook-mode-button"),!0}if(e.matches(".wprm-recipe-equipment a")){const t=e.closest(".wprm-recipe-equipment-container");if(t){const n=e.closest(".wprm-recipe-equipment-item"),i=n&&n.classList.contains("wprm-recipe-equipment-item-has-image")?"image":"text",r=n?n.querySelector(".wprm-recipe-equipment-name"):e,o=t.dataset.recipe;o&&window.WPRecipeMaker.analytics.registerAction(o,wprm_public.post_id,"equipment-link",{url:e.href,type:i,name:r?r.innerText:"unknown"})}return!0}if(e.matches(".wprm-recipe-ingredient a")){const t=e.closest(".wprm-recipe-ingredients-container");let n=!1;const i=e.closest(".wprm-recipe-ingredient");if(i&&(n=i.querySelector(".wprm-recipe-ingredient-name")),t){const i=t.dataset.recipe;i&&window.WPRecipeMaker.analytics.registerAction(i,wprm_public.post_id,"ingredient-link",{url:e.href,name:n?n.innerText:"unknown"})}return!0}if(e.matches(".wprm-recipe-instruction a")){const t=e.closest(".wprm-recipe-instructions-container");if(t){const n=t.dataset.recipe;n&&window.WPRecipeMaker.analytics.registerAction(n,wprm_public.post_id,"instruction-link",{url:e.href})}return!0}return!1},registerAction:(e,t,n,i={})=>{window.WPRecipeMaker.analytics.registerActionLocal(e,t,n,i),window.WPRecipeMaker.analytics.registerActionGoogleAnalytics(e,t,n,i)},registerActionOnce:(e,t,n,i={})=>{window.WPRecipeMaker.analytics.registeredActions.hasOwnProperty(`recipe-${e}`)&&window.WPRecipeMaker.analytics.registeredActions[`recipe-${e}`].hasOwnProperty(n)||(window.WPRecipeMaker.analytics.registeredActions.hasOwnProperty(`recipe-${e}`)||(window.WPRecipeMaker.analytics.registeredActions[`recipe-${e}`]={}),window.WPRecipeMaker.analytics.registeredActions[`recipe-${e}`][n]=!0,window.WPRecipeMaker.analytics.registerAction(e,t,n,i))},registerActionLocal:(e,t,n,i={})=>{if(wprm_public.settings.analytics_enabled){if("comment-rating"===n||"user-rating"===n)return;let a={Accept:"application/json","Content-Type":"application/json"};0<parseInt(wprm_public.user)&&(a["X-WP-Nonce"]=wprm_public.api_nonce),fetch(wprm_public.endpoints.analytics,{method:"POST",headers:a,credentials:"same-origin",body:JSON.stringify({recipeId:e,postId:t,type:n,meta:i,uid:(r="wprm_analytics_visitor",o=document.cookie.match("(^|;)\\s*"+r+"\\s*=\\s*([^;]+)"),o?o.pop():""),nonce:wprm_public.nonce})})}var r,o},registerActionGoogleAnalytics:(e,t,n,i={})=>{if(wprm_public.settings.google_analytics_enabled&&window.hasOwnProperty("gtag")){const r="wprm_"+n.replace(/-/g,"_"),o=n.replace(/-/g," ");let a={event_category:"wprecipemaker",event_label:"WPRM "+o.charAt(0).toUpperCase()+o.slice(1),wprm_recipe_id:""+e,wprm_post_id:""+t};const s=window.WPRecipeMaker.manager.getRecipeImmediately(e);s&&(s.data.hasOwnProperty("name")&&(a.wprm_recipe_name=s.data.name),s.data.hasOwnProperty("slug")&&(a.wprm_recipe_slug=s.data.slug)),"comment-rating"!==n&&"user-rating"!==n||!i.hasOwnProperty("rating")||(a.value=i.rating,delete i.rating),i&&"object"==typeof i&&Object.keys(i).forEach((e=>{""!==i[e]&&null!==i[e]&&void 0!==i[e]&&(a[`wprm_event_${e}`]=""+i[e])})),window.gtag("event",r,a)}},registeredActions:{}},e=()=>{window.WPRecipeMaker.analytics.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},3621:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.cookPal={init:()=>{if(!WPRecipeMaker.cookPal.hasShortcode())return;WPRecipeMaker.cookPal.checkAndShow();let e=setInterval((()=>{WPRecipeMaker.cookPal.hasButton()&&(WPRecipeMaker.cookPal.checkAndShow(),clearInterval(e))}),100);setTimeout((()=>{clearInterval(e)}),1e4),document.addEventListener("click",(function(e){for(let t=e.target;t&&t!==this;t=t.parentNode)if(t.matches(".wprm-recipe-cookpal")){WPRecipeMaker.cookPal.onClick(e);break}}),!1)},hasButton:()=>!!document.getElementById("cookpal-chat-button"),hasShortcode:()=>!!document.querySelector(".wprm-recipe-cookpal"),checkAndShow:()=>{if(WPRecipeMaker.cookPal.hasButton()){document.querySelectorAll(".wprm-recipe-cookpal").forEach((e=>{"hidden"===e.style.visibility&&(e.style.visibility="visible")}))}},onClick:e=>{e.preventDefault();const t=document.getElementById("cookpal-chat-button");t?t.click():console.warn("WPRM CookPal: widget is not available yet.")}},e=()=>{window.WPRecipeMaker.cookPal.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},2811:()=>{window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.debug={version:()=>wprm_public.version,recipe:()=>{const e=WPRecipeMaker.manager.findRecipesOnPage();return!!e&&WPRecipeMaker.manager.getRecipeImmediately(e[0])},getAdminBarMetadataText:e=>{const t=document.querySelector(`#wp-admin-bar-wprm-debug-entry-${e}-panel pre`);return t&&t.textContent||""},getAdminBarMetadataValidationCode:e=>{const t=window.WPRecipeMaker.debug.getAdminBarMetadataText(e);return t?`<script type="application/ld+json">\n${t}\n<\/script>`:""},setAdminBarActionState:(e,t)=>{if(!e)return;const n=e.dataset.wprmOriginalText||e.textContent;e.dataset.wprmOriginalText=n,e.textContent=t,window.setTimeout((()=>{e.textContent=n}),1500)},copyText:async e=>{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(e),!0;throw new Error("Clipboard API unavailable.")},copyAdminBarMetadata:(e,t=null)=>{const n=window.WPRecipeMaker.debug.getAdminBarMetadataText(e);return!!n&&(window.WPRecipeMaker.debug.copyText(n).then((()=>{window.WPRecipeMaker.debug.setAdminBarActionState(t,"Copied")})).catch((()=>{window.prompt("Copy the metadata below:",n)})),!1)},prepareAdminBarValidator:(e,t,n=null)=>{const i=window.WPRecipeMaker.debug.getAdminBarMetadataValidationCode(e);i&&window.WPRecipeMaker.debug.copyText(i).then((()=>{window.WPRecipeMaker.debug.setAdminBarActionState(n,"Opened")})).catch((()=>{window.setTimeout((()=>{window.prompt("Paste this code into the validator:",i)}),50)}))}}},2942:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.expandable={init:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-expandable-button")){WPRecipeMaker.expandable.onClick(t,e);break}}),!1)},onClick:(e,t)=>{t.preventDefault();const n=e.classList.contains("wprm-expandable-button-show");let i=e.closest(".wprm-expandable-container");if(!i){const t=e.closest(".wprm-expandable-container-separated");if(t){i=t;let e=i.nextElementSibling;for(;e;)n?e.classList.remove("wprm-expandable-separated-content-collapsed"):e.classList.add("wprm-expandable-separated-content-collapsed"),e=e.nextElementSibling}}i&&(n?(i.classList.remove("wprm-expandable-collapsed"),i.classList.add("wprm-expandable-expanded")):(i.classList.add("wprm-expandable-collapsed"),i.classList.remove("wprm-expandable-expanded")))}},e=()=>{window.WPRecipeMaker.expandable.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},385:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.grow={init:()=>{window.growMe||(window.growMe=function(e){window.growMe._.push(e)},window.growMe._=[]),document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode){if(t.matches(".wprm-recipe-grow-not-saved")){WPRecipeMaker.grow.onClickSave(t,e);break}if(t.matches(".wprm-recipe-grow-saved")){WPRecipeMaker.grow.onClickSaved(t,e);break}}}),!1);let e=null;window.growMe((()=>{e=window.growMe.getIsBookmarked();let t=!1;window.growMe.on("isBookmarkedChanged",(n=>{t||(t=!0,e=n.isBookmarked,e&&WPRecipeMaker.grow.markAsSaved(!1,!0))}))}))},onClickSave:(e,t)=>{t.preventDefault();let n={source:"wprm_save_btn"};const i=parseInt(e.dataset.recipeId),r=e.closest(".wprm-recipe-grow-container");r&&(n.tooltipReferenceElement=r),window.growMe.addBookmark(n).then((function(e){WPRecipeMaker.grow.markAsSaved(i)})).catch((function(e){WPRecipeMaker.grow.markAsSaved(i)}))},onClickSaved:(e,t)=>{t.preventDefault()},markAsSaved:(e,t=!1)=>{const n=document.querySelectorAll(".wprm-recipe-grow");for(let i of n)(t||e===parseInt(i.dataset.recipeId))&&(i.classList.contains("wprm-recipe-grow-not-saved")?i.style.display="none":i.classList.contains("wprm-recipe-grow-saved")&&(i.style.display=""))}},e=()=>{window.WPRecipeMaker.grow.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},1157:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.instacart={init:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-recipe-shop-instacart")){WPRecipeMaker.instacart.onClickButton(t,e);break}}),!1),WPRecipeMaker.instacart.show()},show:()=>{const e=document.querySelectorAll(".wprm-recipe-shop-instacart");for(let t of e)t.style.visibility=""},onClickButton:(e,t)=>{if(t.preventDefault(),e.classList.contains("wprm-recipe-shop-instacart-loading"))return;const n=parseInt(e.dataset.recipe);if(n){e.classList.add("wprm-recipe-shop-instacart-loading");const t=window.open("about:blank","_blank");t.document.write('\n                <html>\n                    <head>\n                        <title>Loading Instacart...</title>\n                        <style>\n                            body {\n                                display: flex;\n                                align-items: center;\n                                justify-content: center;\n                                height: 100vh;\n                                margin: 0;\n                                font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n                            }\n                            .loading {\n                                font-size: 24px;\n                                color: #333;\n                            }\n                        </style>\n                    </head>\n                    <body>\n                        <div class="loading">Loading Instacart...</div>\n                    </body>\n                </html>\n            '),window.WPRecipeMaker.manager.getRecipe(n).then((i=>{if(i){const r=i.data.currentServings+"-"+i.data.currentSystem;let o=[];if(window.WPRecipeMaker.hasOwnProperty("managerPremiumIngredients")){const e=window.WPRecipeMaker.managerPremiumIngredients.getCurrentIngredients(i).map((e=>e[`unit-system-${i.data.currentSystem}`]));for(let t of e)o.push({name:t.name,quantity:t.amountParsed,unit:t.unit})}else for(let e of i.data.ingredients)o.push({name:e.name,quantity:e.amount,unit:e.unit});let a={recipeId:n,title:i.data.name,image_url:i.data.image_url,ingredients:o,servingsSystemCombination:r};fetch(`${wprm_public.endpoints.integrations}/instacart`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({data:a})}).then((e=>!!e.ok&&e.json())).then((n=>{e.classList.remove("wprm-recipe-shop-instacart-loading"),n?t.location.href=n:alert("Something went wrong. Please try again later.")}))}}))}}},e=()=>{window.WPRecipeMaker.instacart.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},68:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.jumpToSection={initOnce:()=>{window.addEventListener("resize",(()=>{const e=document.querySelectorAll(".wprm-recipe-jump-to-section-container-scroll");for(let t of e)window.WPRecipeMaker.jumpToSection.updateFade(t)})),window.WPRecipeMaker.jumpToSection.init()},init:()=>{const e=document.querySelectorAll(".wprm-recipe-jump-to-section-container-scroll");function t(e){window.WPRecipeMaker.jumpToSection.updateFade(e.currentTarget)}for(let n of e)n.removeEventListener("scroll",t),n.addEventListener("scroll",t),window.WPRecipeMaker.jumpToSection.updateFade(n)},updateFade:e=>{const t=e.scrollLeft,n=e.scrollWidth-e.clientWidth;e.classList.toggle("scrolled-left",t<=0),e.classList.toggle("scrolled-right",t>=n-1)}},e=()=>{window.WPRecipeMaker.jumpToSection.initOnce()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},8455:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.manager={init:()=>{},recipes:{},findRecipesOnPage:()=>{let e=[];const t=document.querySelectorAll("*[data-recipe-id]");for(let n of t){const t=parseInt(n.dataset.recipeId);t&&e.push(t)}return[...new Set(e)]},resetRecipe:e=>{window.WPRecipeMaker.manager.recipes.hasOwnProperty(`recipe-${e}`)&&delete window.WPRecipeMaker.manager.recipes[`recipe-${e}`]},getRecipe:(e,t=!1)=>(e="preview"===e?e:parseInt(e),window.WPRecipeMaker.manager.recipes.hasOwnProperty(`recipe-${e}`)?Promise.resolve(window.WPRecipeMaker.manager.recipes[`recipe-${e}`]):window.WPRecipeMaker.manager.loadRecipe(e,t)),getRecipeImmediately:e=>{e="preview"===e?e:parseInt(e);let t=!!window.WPRecipeMaker.manager.recipes.hasOwnProperty(`recipe-${e}`)&&window.WPRecipeMaker.manager.recipes[`recipe-${e}`];if(!t&&window.hasOwnProperty("wprm_recipes")&&window.wprm_recipes.hasOwnProperty(`recipe-${e}`)){const n=window.wprm_recipes[`recipe-${e}`];t=window.WPRecipeMaker.manager.loadRecipeObject(e,n),window.WPRecipeMaker.manager.recipes[`recipe-${e}`]=t}return t},loadRecipe:(e,t=!1)=>new Promise(((n,i)=>{new Promise(((n,i)=>{const r=t||e;window.hasOwnProperty("wprm_recipes")&&window.wprm_recipes.hasOwnProperty(`recipe-${r}`)?n(window.wprm_recipes[`recipe-${r}`]):window.WPRecipeMaker.manager.loadRecipeDataFromAPI(r).then((e=>{n(e)}))})).then((t=>{let i=!1;t&&(i=window.WPRecipeMaker.manager.loadRecipeObject(e,t)),window.WPRecipeMaker.manager.recipes[`recipe-${e}`]=i,n(i)}))})),loadRecipeDataFromAPI:e=>{let t={Accept:"application/json","Content-Type":"application/json"};return 0<parseInt(wprm_public.user)&&(t["X-WP-Nonce"]=wprm_public.api_nonce),new Promise(((n,i)=>{fetch(`${wprm_public.endpoints.manage}/recipe/${e}`,{method:"POST",headers:t,credentials:"same-origin",body:JSON.stringify({format:"frontend"})}).then((e=>!!e.ok&&e.json())).then((e=>{n(e)}))}))},loadRecipeObject:(e,t)=>{let n={id:e,data:t,setServings:(...e)=>{},setAdvancedServings:(...e)=>{},setUnitSystem:(...e)=>{},addRating:(...e)=>{}};return window.WPRecipeMaker.hasOwnProperty("managerPremium")&&(n=window.WPRecipeMaker.managerPremium.loadRecipeObject(e,n)),n},triggerChangeEvent:(e,t)=>{document.dispatchEvent(new CustomEvent("wprm-recipe-change",{detail:{id:e,type:t}}))},changeRecipeData:(e,t)=>{window.WPRecipeMaker.manager.recipes.hasOwnProperty(`recipe-${e}`)&&(window.WPRecipeMaker.manager.recipes[`recipe-${e}`].data={...window.WPRecipeMaker.manager.recipes[`recipe-${e}`].data,...t},document.dispatchEvent(new CustomEvent("wprm-recipe-change-data",{detail:{id:e}})))}},e=()=>{window.WPRecipeMaker.manager.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},7561:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.media={init:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode){if(t.matches(".wprm-recipe-media-toggle")){WPRecipeMaker.media.onClick(t,e);break}if(t.matches(".wprm-media-toggle-checkbox")){WPRecipeMaker.media.onSwitch(t,e);break}}}),!1),WPRecipeMaker.media.setState(wprm_public.settings.instruction_media_toggle_default)},onClick:(e,t)=>{t.preventDefault();const n=e.dataset.state;WPRecipeMaker.media.setState(n,e)},onSwitch:(e,t)=>{const n=e.checked?"on":"off";WPRecipeMaker.media.setState(n,e)},setState:(e,t=!1)=>{const n=WPRecipeMaker.media.state;if(("on"===e||"off"===e)&&e!==n){let n=0;t&&(n=window.pageYOffset+t.getBoundingClientRect().top);const i=document.querySelectorAll(".wprm-recipe-instruction-media");for(let t of i)t.style.display="off"===e?"none":"";let r=0;t&&(r=window.pageYOffset+t.getBoundingClientRect().top);const o=r-n;o&&scrollBy(0,o);const a=document.querySelectorAll(".wprm-recipe-media-toggle");for(let t of a)e===t.dataset.state?t.classList.add("wprm-toggle-active"):t.classList.remove("wprm-toggle-active");const s=document.querySelectorAll(".wprm-media-toggle-checkbox");for(let t of s)t.checked="on"===e;WPRecipeMaker.media.state=e}},state:"on"},e=()=>{window.WPRecipeMaker.media.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},4253:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.myShoppingHelp={init:()=>{WPRecipeMaker.myShoppingHelp.checkAndShow();let e=setInterval((()=>{window.msh&&(WPRecipeMaker.myShoppingHelp.checkAndShow(),clearInterval(e))}),100);setTimeout((()=>{clearInterval(e)}),1e4),document.addEventListener("click",(function(e){for(let t=e.target;t&&t!==this;t=t.parentNode)if(t.matches(".wprm-recipe-my-shopping-help")){WPRecipeMaker.myShoppingHelp.onClick(t,e);break}}),!1)},checkAndShow:()=>{if(window.msh&&("function"==typeof window.msh.addRecipe||"function"==typeof window.msh.AddRecipe)){document.querySelectorAll(".wprm-recipe-my-shopping-help").forEach((e=>{"hidden"===e.style.visibility&&(e.style.visibility="visible")}))}},onClick:(e,t)=>{t.preventDefault();const n=WPRecipeMaker.myShoppingHelp.getRecipeFromElement(e);if(!n)return void console.warn("WPRM My Shopping Help: recipe data is missing.");const i=WPRecipeMaker.myShoppingHelp.getHandler();i?i(n):console.warn("WPRM My Shopping Help: widget is not available yet.")},getRecipeFromElement:e=>{if(e.dataset.recipe)try{return JSON.parse(e.dataset.recipe)}catch(n){console.error("WPRM My Shopping Help: unable to parse recipe data.",n)}const t={};return e.dataset.recipeId&&(t.id=e.dataset.recipeId),e.dataset.recipeType&&(t.type=e.dataset.recipeType),e.dataset.recipeUrl&&(t.url=e.dataset.recipeUrl),e.dataset.recipeName&&(t.name=e.dataset.recipeName),e.dataset.recipeImage&&(t.image=e.dataset.recipeImage),Object.keys(t).length?t:null},getHandler:()=>window.msh&&"function"==typeof window.msh.addRecipe?window.msh.addRecipe.bind(window.msh):window.msh&&"function"==typeof window.msh.AddRecipe?window.msh.AddRecipe.bind(window.msh):null},e=()=>{window.WPRecipeMaker.myShoppingHelp.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},9854:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.pinterest={init(){document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-recipe-pin")){WPRecipeMaker.pinterest.onClick(t,e);break}}),!1)},onClick(e,t){t.preventDefault();const n=this.getPinUtils();if(n)if(e.dataset.hasOwnProperty("pinAction")&&"any"===e.dataset.pinAction)PinUtils.pinAny();else{const t=e.dataset.url,i=e.dataset.media,r=e.dataset.description,o=e.dataset.repin;o?PinUtils.repin(o):i&&n.pinOne({url:t,media:i,description:r})}else window.open(e.href,"targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=500")},getPinUtils:()=>!!window.hasOwnProperty("PinUtils")&&window.PinUtils},e=()=>{window.WPRecipeMaker.pinterest.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},3579:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.print={hasAccess:()=>{if(wprm_public.settings.hasOwnProperty("print_access_allowed"))return!!wprm_public.settings.print_access_allowed;const e=wprm_public.settings.hasOwnProperty("print_access")?wprm_public.settings.print_access:"everyone";return"disabled"!==e&&!("logged_in"===e&&0>=parseInt(wprm_public.user))},init:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-recipe-print, .wprm-print-recipe-shortcode")){WPRecipeMaker.print.onClick(t,e);break}}),!1)},onClick:(e,t)=>{if(!WPRecipeMaker.print.hasAccess())return void t.preventDefault();let n=e.dataset.recipeId;if(!n){const t=e.closest(".wprm-recipe-container");t&&(n=t.dataset.recipeId)}if(n){t.preventDefault(),n=parseInt(n);const i=e.dataset.hasOwnProperty("template")?e.dataset.template:"";let r="other";const o=e.closest(".wprm-recipe");o&&(r=o.classList.contains("wprm-recipe-snippet")?"snippet":o.classList.contains("wprm-recipe-roundup-item")?"roundup":"recipe"),window.WPRecipeMaker.analytics.registerAction(n,wprm_public.post_id,"print",{location:r}),WPRecipeMaker.print.recipeAsIs(n,i)}},recipeAsIs:(e,t="")=>{let n=!1,i=1,r=!1;window.WPRecipeMaker.manager.getRecipe(e).then((o=>{o&&(o.data.hasOwnProperty("currentSystem")&&(i=o.data.currentSystem),o.data.currentServingsParsed!==o.data.originalServingsParsed&&(n=o.data.currentServingsParsed),r=o.data.currentAdvancedServings),WPRecipeMaker.print.recipe(e,n,i,r,t)}))},recipe:(e,t=!1,n=1,i=!1,r="")=>{let o=!1;if("slug"===wprm_public.settings.print_recipe_identifier){const t=window.WPRecipeMaker.manager.getRecipeImmediately(e);t&&t.data.slug&&(o=t.data.slug,o.startsWith("wprm-")&&(o=o.substring(5)))}let a=o||e;r&&(a+=`/${r}`);const s=WPRecipeMaker.print.getUrl(a);if(!s)return;const c=wprm_public.settings.print_new_tab?"_blank":"_self",p={id:e,system:n,servings:t,advancedServings:i};localStorage.setItem("wprmPrintArgs",JSON.stringify(p));const d=window.open(s,c);"_blank"===c&&(d.onload=()=>{d.focus(),d.hasOwnProperty("WPRMPrint")&&d.WPRMPrint.setArgs(p)})},getUrl:e=>{if(!WPRecipeMaker.print.hasAccess())return!1;const t=wprm_public.home_url.split(/\?(.+)/);let n=t[0];return n.endsWith("/")||(n+="/"),wprm_public.permalinks?(n+=wprm_public.print_slug+"/"+e,t[1]&&(n+="?"+t[1])):(n+="?"+wprm_public.print_slug+"="+e,t[1]&&(n+="&"+t[1])),n}},e=()=>{window.WPRecipeMaker.print.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},1104:()=>{window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.recipe={init:()=>{window.addEventListener("wpupgInitReady",(function(e){const t=e.detail;window.WPRecipeMaker.recipe.wpupgGridCompatibility(t)}))},wpupgGridCompatibility:e=>{e&&e.on("itemsLoaded",(()=>{window.WPRecipeMaker.recipe.initFeatures()}))},initFeatures:(e={})=>{if(e.hasOwnProperty("id")&&window.WPRecipeMaker.manager.resetRecipe(e.id),window.WPRecipeMaker){if(window.WPRecipeMaker.hasOwnProperty("advancedServings")&&window.WPRecipeMaker.advancedServings.init(),window.WPRecipeMaker.hasOwnProperty("quantities")&&(window.WPRecipeMaker.quantities.init(),e.hasOwnProperty("id")&&e.hasOwnProperty("servings"))){const t=parseInt(e.servings);t&&setTimeout((()=>{window.WPRecipeMaker.quantities.setServings(e.id,t)}),100)}window.WPRecipeMaker.hasOwnProperty("instacart")&&window.WPRecipeMaker.instacart.init(),window.WPRecipeMaker.hasOwnProperty("jumpToSection")&&window.WPRecipeMaker.jumpToSection.init(),window.WPRecipeMaker.hasOwnProperty("timer")&&window.WPRecipeMaker.timer.init(),window.WPRecipeMaker.hasOwnProperty("preventSleep")&&window.WPRecipeMaker.preventSleep.init(),window.WPRecipeMaker.hasOwnProperty("privateNotes")&&window.WPRecipeMaker.privateNotes.init(),window.WPRecipeMaker.hasOwnProperty("tooltip")&&window.WPRecipeMaker.tooltip.init(),window.WPRecipeMaker.hasOwnProperty("video")&&wprm_public.settings.video_force_ratio&&window.WPRecipeMaker.video.init()}document.dispatchEvent(new CustomEvent("wprmRecipeInit",{detail:e}))}},window.WPRecipeMaker.recipe.init()},6944:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.slickstream={init:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode){if(t.matches(".wprm-recipe-slickstream-not-saved")){WPRecipeMaker.slickstream.onClickSave(t,e);break}if(t.matches(".wprm-recipe-slickstream-saved")){WPRecipeMaker.slickstream.onClickSaved(t,e);break}}}),!1),document.addEventListener("slickstream-favorite-change",(()=>{WPRecipeMaker.slickstream.favoriteChanged()})),WPRecipeMaker.slickstream.favoriteChanged(),WPRecipeMaker.slickstream.show()},show:async()=>{if(await WPRecipeMaker.slickstream.getSlickstream()){const e=document.querySelectorAll(".wprm-recipe-slickstream");for(let t of e)t.style.visibility=""}},getSlickstream:async()=>window.slickstream?window.slickstream.v1:new Promise(((e,t)=>{document.addEventListener("slickstream-ready",(()=>{e(window.slickstream.v1)}))})),onClickSave:async(e,t)=>{t.preventDefault(),WPRecipeMaker.slickstream.setFavoriteStatus(!0)},onClickSaved:async(e,t)=>{t.preventDefault(),WPRecipeMaker.slickstream.setFavoriteStatus(!1)},favoriteChanged:async()=>{const e=(await WPRecipeMaker.slickstream.getSlickstream()).favorites.getState(),t=document.querySelectorAll(".wprm-recipe-slickstream");for(let n of t)n.classList.contains("wprm-recipe-slickstream-not-saved")?n.style.display=!0===e?"none":"":n.classList.contains("wprm-recipe-slickstream-saved")&&(n.style.display=!0===e?"":"none")},setFavoriteStatus:async e=>{(await WPRecipeMaker.slickstream.getSlickstream()).favorites.setState(e)}},e=()=>{window.WPRecipeMaker.slickstream.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},9002:()=>{window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.temperature={getTemperatures(){let e=[];const t=document.querySelectorAll(".wprm-temperature-container");for(let n of t)e.push(WPRecipeMaker.temperature.getData(n));return e},getData:e=>({container:e,value:e.dataset.value,unit:e.dataset.unit,help:e.dataset.tooltip})}},9047:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.video={load(){window.addEventListener("resize",function(){this.forceRatio()}.bind(this)),window.WPRecipeMaker.video.init()},init(){this.forceRatio()},forceRatio(){document.querySelectorAll(".wprm-recipe iframe, .wprm-recipe object, .wprm-recipe video, .wprm-recipe-video-container iframe, .wprm-recipe-video-container object, .wprm-recipe-video-container video").forEach((function(e){var t,n,i=e.parentNode;if(e.classList.contains("intrinsic-ignore")||e.parentNode.classList.contains("intrinsic-ignore"))return!0;e.dataset.origwidth||(e.setAttribute("data-origwidth",e.width),e.setAttribute("data-origheight",e.height)),t=(n=i.offsetWidth)/e.dataset.origwidth,e.style.width=n+"px",e.style.height=e.dataset.origheight*t+"px"}))}},e=()=>{wprm_public.settings.video_force_ratio&&window.WPRecipeMaker.video.load()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},2998:()=>{},4962:(e,t,n)=>{"use strict";n.d(t,{UD:()=>m});var i=n(8528),r=n(9741),o=n(6423),a=n(7790),s=n(4780),c=n(5901),p=n(5850),d=n(2155),l={placement:"bottom",modifiers:[],strategy:"absolute"};function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function m(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,m=void 0===n?[]:n,f=t.defaultOptions,w=void 0===f?l:f;return function(e,t,n){void 0===n&&(n=w);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},l,w),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},h=[],g=!1,v={state:f,setOptions:function(n){var i="function"==typeof n?n(f.options):n;y(),f.options=Object.assign({},w,f.options,i),f.scrollParents={reference:(0,d.vq)(e)?(0,o.A)(e):e.contextElement?(0,o.A)(e.contextElement):[],popper:(0,o.A)(t)};var r=(0,s.A)((0,p.A)([].concat(m,f.options.modifiers)));return f.orderedModifiers=r.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var o=r({state:f,name:t,instance:v,options:i}),a=function(){};h.push(o||a)}})),v.update()},forceUpdate:function(){if(!g){var e=f.elements,t=e.reference,n=e.popper;if(u(t,n)){f.rects={reference:(0,i.A)(t,(0,a.A)(n),"fixed"===f.options.strategy),popper:(0,r.A)(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<f.orderedModifiers.length;o++)if(!0!==f.reset){var s=f.orderedModifiers[o],c=s.fn,p=s.options,d=void 0===p?{}:p,l=s.name;"function"==typeof c&&(f=c({state:f,options:d,name:l,instance:v})||f)}else f.reset=!1,o=-1}}},update:(0,c.A)((function(){return new Promise((function(e){v.forceUpdate(),e(f)}))})),destroy:function(){y(),g=!0}};if(!u(e,t))return v;function y(){h.forEach((function(e){return e()})),h=[]}return v.setOptions(n).then((function(e){!g&&n.onFirstUpdate&&n.onFirstUpdate(e)})),v}}},7272:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(2155);function r(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&(0,i.Ng)(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}},9228:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(2155),r=n(100);function o(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),o=1,a=1;if((0,i.sb)(e)&&t){var s=e.offsetHeight,c=e.offsetWidth;c>0&&(o=(0,r.LI)(n.width)/c||1),s>0&&(a=(0,r.LI)(n.height)/s||1)}return{width:n.width/o,height:n.height/a,top:n.top/a,right:n.right/o,bottom:n.bottom/a,left:n.left/o,x:n.left/o,y:n.top/a}}},8741:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var i=n(7116),r=n(8269),o=n(5090),a=n(6423),s=n(7790),c=n(8994),p=n(253),d=n(2155),l=n(9228),u=n(5961),m=n(7272),f=n(9398),w=n(5344),h=n(100);function g(e,t){return t===i.R9?(0,w.A)((0,r.A)(e)):(0,d.vq)(t)?function(e){var t=(0,l.A)(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):(0,w.A)((0,o.A)((0,c.A)(e)))}function v(e,t,n){var i="clippingParents"===t?function(e){var t=(0,a.A)((0,u.A)(e)),n=["absolute","fixed"].indexOf((0,p.A)(e).position)>=0&&(0,d.sb)(e)?(0,s.A)(e):e;return(0,d.vq)(n)?t.filter((function(e){return(0,d.vq)(e)&&(0,m.A)(e,n)&&"body"!==(0,f.A)(e)})):[]}(e):[].concat(t),r=[].concat(i,[n]),o=r[0],c=r.reduce((function(t,n){var i=g(e,n);return t.top=(0,h.T9)(i.top,t.top),t.right=(0,h.jk)(i.right,t.right),t.bottom=(0,h.jk)(i.bottom,t.bottom),t.left=(0,h.T9)(i.left,t.left),t}),g(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}},8528:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(9228),r=n(4004),o=n(9398),a=n(2155),s=n(2951),c=n(8994),p=n(288),d=n(100);function l(e,t,n){void 0===n&&(n=!1);var l=(0,a.sb)(t),u=(0,a.sb)(t)&&function(e){var t=e.getBoundingClientRect(),n=(0,d.LI)(t.width)/e.offsetWidth||1,i=(0,d.LI)(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),m=(0,c.A)(t),f=(0,i.A)(e,u),w={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(l||!l&&!n)&&(("body"!==(0,o.A)(t)||(0,p.A)(m))&&(w=(0,r.A)(t)),(0,a.sb)(t)?((h=(0,i.A)(t,!0)).x+=t.clientLeft,h.y+=t.clientTop):m&&(h.x=(0,s.A)(m))),{x:f.left+w.scrollLeft-h.x,y:f.top+w.scrollTop-h.y,width:f.width,height:f.height}}},253:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(7505);function r(e){return(0,i.A)(e).getComputedStyle(e)}},8994:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(2155);function r(e){return(((0,i.vq)(e)?e.ownerDocument:e.document)||window.document).documentElement}},5090:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var i=n(8994),r=n(253),o=n(2951),a=n(8796),s=n(100);function c(e){var t,n=(0,i.A)(e),c=(0,a.A)(e),p=null==(t=e.ownerDocument)?void 0:t.body,d=(0,s.T9)(n.scrollWidth,n.clientWidth,p?p.scrollWidth:0,p?p.clientWidth:0),l=(0,s.T9)(n.scrollHeight,n.clientHeight,p?p.scrollHeight:0,p?p.clientHeight:0),u=-c.scrollLeft+(0,o.A)(e),m=-c.scrollTop;return"rtl"===(0,r.A)(p||n).direction&&(u+=(0,s.T9)(n.clientWidth,p?p.clientWidth:0)-d),{width:d,height:l,x:u,y:m}}},6671:(e,t,n)=>{"use strict";function i(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}n.d(t,{A:()=>i})},9741:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(9228);function r(e){var t=(0,i.A)(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}},9398:(e,t,n)=>{"use strict";function i(e){return e?(e.nodeName||"").toLowerCase():null}n.d(t,{A:()=>i})},4004:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(8796),r=n(7505),o=n(2155),a=n(6671);function s(e){return e!==(0,r.A)(e)&&(0,o.sb)(e)?(0,a.A)(e):(0,i.A)(e)}},7790:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(7505),r=n(9398),o=n(253),a=n(2155),s=n(961),c=n(5961);function p(e){return(0,a.sb)(e)&&"fixed"!==(0,o.A)(e).position?e.offsetParent:null}function d(e){for(var t=(0,i.A)(e),n=p(e);n&&(0,s.A)(n)&&"static"===(0,o.A)(n).position;)n=p(n);return n&&("html"===(0,r.A)(n)||"body"===(0,r.A)(n)&&"static"===(0,o.A)(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&(0,a.sb)(e)&&"fixed"===(0,o.A)(e).position)return null;var n=(0,c.A)(e);for((0,a.Ng)(n)&&(n=n.host);(0,a.sb)(n)&&["html","body"].indexOf((0,r.A)(n))<0;){var i=(0,o.A)(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}},5961:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(9398),r=n(8994),o=n(2155);function a(e){return"html"===(0,i.A)(e)?e:e.assignedSlot||e.parentNode||((0,o.Ng)(e)?e.host:null)||(0,r.A)(e)}},3448:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(5961),r=n(288),o=n(9398),a=n(2155);function s(e){return["html","body","#document"].indexOf((0,o.A)(e))>=0?e.ownerDocument.body:(0,a.sb)(e)&&(0,r.A)(e)?e:s((0,i.A)(e))}},8269:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(7505),r=n(8994),o=n(2951);function a(e){var t=(0,i.A)(e),n=(0,r.A)(e),a=t.visualViewport,s=n.clientWidth,c=n.clientHeight,p=0,d=0;return a&&(s=a.width,c=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(p=a.offsetLeft,d=a.offsetTop)),{width:s,height:c,x:p+(0,o.A)(e),y:d}}},7505:(e,t,n)=>{"use strict";function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}n.d(t,{A:()=>i})},8796:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(7505);function r(e){var t=(0,i.A)(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}},2951:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(9228),r=n(8994),o=n(8796);function a(e){return(0,i.A)((0,r.A)(e)).left+(0,o.A)(e).scrollLeft}},2155:(e,t,n)=>{"use strict";n.d(t,{Ng:()=>a,sb:()=>o,vq:()=>r});var i=n(7505);function r(e){return e instanceof(0,i.A)(e).Element||e instanceof Element}function o(e){return e instanceof(0,i.A)(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof(0,i.A)(e).ShadowRoot||e instanceof ShadowRoot)}},288:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(253);function r(e){var t=(0,i.A)(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}},961:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(9398);function r(e){return["table","td","th"].indexOf((0,i.A)(e))>=0}},6423:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(3448),r=n(5961),o=n(7505),a=n(288);function s(e,t){var n;void 0===t&&(t=[]);var c=(0,i.A)(e),p=c===(null==(n=e.ownerDocument)?void 0:n.body),d=(0,o.A)(c),l=p?[d].concat(d.visualViewport||[],(0,a.A)(c)?c:[]):c,u=t.concat(l);return p?u:u.concat(s((0,r.A)(l)))}},7116:(e,t,n)=>{"use strict";n.d(t,{DD:()=>h,GM:()=>g,Mn:()=>i,OM:()=>c,Ol:()=>w,R9:()=>u,WY:()=>l,_N:()=>d,ir:()=>f,kb:()=>a,ni:()=>p,pG:()=>o,qZ:()=>s,sQ:()=>r,xf:()=>m});var i="top",r="bottom",o="right",a="left",s="auto",c=[i,r,o,a],p="start",d="end",l="clippingParents",u="viewport",m="popper",f="reference",w=c.reduce((function(e,t){return e.concat([t+"-"+p,t+"-"+d])}),[]),h=[].concat(c,[s]).reduce((function(e,t){return e.concat([t,t+"-"+p,t+"-"+d])}),[]),g=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"]},3129:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(9398),r=n(2155);const o={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},a=t.elements[e];(0,r.sb)(a)&&(0,i.A)(a)&&(Object.assign(a.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],a=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});(0,r.sb)(o)&&(0,i.A)(o)&&(Object.assign(o.style,s),Object.keys(a).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]}},8034:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(6966),r=n(9741),o=n(7272),a=n(7790),s=n(7529),c=n(3709),p=n(3432),d=n(7985),l=n(7116);const u={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,u=e.options,m=n.elements.arrow,f=n.modifiersData.popperOffsets,w=(0,i.A)(n.placement),h=(0,s.A)(w),g=[l.kb,l.pG].indexOf(w)>=0?"height":"width";if(m&&f){var v=function(e,t){return e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e,(0,p.A)("number"!=typeof e?e:(0,d.A)(e,l.OM))}(u.padding,n),y=(0,r.A)(m),b="y"===h?l.Mn:l.kb,k="y"===h?l.sQ:l.pG,P=n.rects.reference[g]+n.rects.reference[h]-f[h]-n.rects.popper[g],A=f[h]-n.rects.reference[h],M=(0,a.A)(m),R=M?"y"===h?M.clientHeight||0:M.clientWidth||0:0,W=P/2-A/2,O=v[b],S=R-y[g]-v[k],x=R/2-y[g]/2+W,E=(0,c.u)(O,x,S),L=h;n.modifiersData[o]=((t={})[L]=E,t.centerOffset=E-x,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&(0,o.A)(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},160:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var i=n(7116),r=n(7790),o=n(7505),a=n(8994),s=n(253),c=n(6966),p=n(6411),d=n(100),l={top:"auto",right:"auto",bottom:"auto",left:"auto"};function u(e){var t,n=e.popper,c=e.popperRect,p=e.placement,u=e.variation,m=e.offsets,f=e.position,w=e.gpuAcceleration,h=e.adaptive,g=e.roundOffsets,v=e.isFixed,y=m.x,b=void 0===y?0:y,k=m.y,P=void 0===k?0:k,A="function"==typeof g?g({x:b,y:P}):{x:b,y:P};b=A.x,P=A.y;var M=m.hasOwnProperty("x"),R=m.hasOwnProperty("y"),W=i.kb,O=i.Mn,S=window;if(h){var x=(0,r.A)(n),E="clientHeight",L="clientWidth";if(x===(0,o.A)(n)&&(x=(0,a.A)(n),"static"!==(0,s.A)(x).position&&"absolute"===f&&(E="scrollHeight",L="scrollWidth")),p===i.Mn||(p===i.kb||p===i.pG)&&u===i._N)O=i.sQ,P-=(v&&x===S&&S.visualViewport?S.visualViewport.height:x[E])-c.height,P*=w?1:-1;if(p===i.kb||(p===i.Mn||p===i.sQ)&&u===i._N)W=i.pG,b-=(v&&x===S&&S.visualViewport?S.visualViewport.width:x[L])-c.width,b*=w?1:-1}var _,T=Object.assign({position:f},h&&l),C=!0===g?function(e){var t=e.x,n=e.y,i=window.devicePixelRatio||1;return{x:(0,d.LI)(t*i)/i||0,y:(0,d.LI)(n*i)/i||0}}({x:b,y:P}):{x:b,y:P};return b=C.x,P=C.y,w?Object.assign({},T,((_={})[O]=R?"0":"",_[W]=M?"0":"",_.transform=(S.devicePixelRatio||1)<=1?"translate("+b+"px, "+P+"px)":"translate3d("+b+"px, "+P+"px, 0)",_)):Object.assign({},T,((t={})[O]=R?P+"px":"",t[W]=M?b+"px":"",t.transform="",t))}const m={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,d=void 0===s||s,l={placement:(0,c.A)(t.placement),variation:(0,p.A)(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,u(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:d})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,u(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}}},7658:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(7505),r={passive:!0};const o={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,a=o.scroll,s=void 0===a||a,c=o.resize,p=void 0===c||c,d=(0,i.A)(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&l.forEach((function(e){e.addEventListener("scroll",n.update,r)})),p&&d.addEventListener("resize",n.update,r),function(){s&&l.forEach((function(e){e.removeEventListener("scroll",n.update,r)})),p&&d.removeEventListener("resize",n.update,r)}},data:{}}},5432:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(8066),r=n(6966),o=n(601),a=n(9775),s=n(7143),c=n(7116),p=n(6411);const d={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,d=e.name;if(!t.modifiersData[d]._skip){for(var l=n.mainAxis,u=void 0===l||l,m=n.altAxis,f=void 0===m||m,w=n.fallbackPlacements,h=n.padding,g=n.boundary,v=n.rootBoundary,y=n.altBoundary,b=n.flipVariations,k=void 0===b||b,P=n.allowedAutoPlacements,A=t.options.placement,M=(0,r.A)(A),R=w||(M===A||!k?[(0,i.A)(A)]:function(e){if((0,r.A)(e)===c.qZ)return[];var t=(0,i.A)(e);return[(0,o.A)(e),t,(0,o.A)(t)]}(A)),W=[A].concat(R).reduce((function(e,n){return e.concat((0,r.A)(n)===c.qZ?(0,s.A)(t,{placement:n,boundary:g,rootBoundary:v,padding:h,flipVariations:k,allowedAutoPlacements:P}):n)}),[]),O=t.rects.reference,S=t.rects.popper,x=new Map,E=!0,L=W[0],_=0;_<W.length;_++){var T=W[_],C=(0,r.A)(T),j=(0,p.A)(T)===c.ni,D=[c.Mn,c.sQ].indexOf(C)>=0,I=D?"width":"height",q=(0,a.A)(t,{placement:T,boundary:g,rootBoundary:v,altBoundary:y,padding:h}),N=D?j?c.pG:c.kb:j?c.sQ:c.Mn;O[I]>S[I]&&(N=(0,i.A)(N));var B=(0,i.A)(N),H=[];if(u&&H.push(q[C]<=0),f&&H.push(q[N]<=0,q[B]<=0),H.every((function(e){return e}))){L=T,E=!1;break}x.set(T,H)}if(E)for(var F=function(e){var t=W.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},U=k?3:1;U>0;U--){if("break"===F(U))break}t.placement!==L&&(t.modifiersData[d]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}}},5911:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(7116),r=n(9775);function o(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function a(e){return[i.Mn,i.pG,i.sQ,i.kb].some((function(t){return e[t]>=0}))}const s={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,c=t.modifiersData.preventOverflow,p=(0,r.A)(t,{elementContext:"reference"}),d=(0,r.A)(t,{altBoundary:!0}),l=o(p,i),u=o(d,s,c),m=a(l),f=a(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:m,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":m,"data-popper-escaped":f})}}},3208:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(6966),r=n(7116);const o={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,a=n.offset,s=void 0===a?[0,0]:a,c=r.DD.reduce((function(e,n){return e[n]=function(e,t,n){var o=(0,i.A)(e),a=[r.kb,r.Mn].indexOf(o)>=0?-1:1,s="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=s[0],p=s[1];return c=c||0,p=(p||0)*a,[r.kb,r.pG].indexOf(o)>=0?{x:p,y:c}:{x:c,y:p}}(n,t.rects,s),e}),{}),p=c[t.placement],d=p.x,l=p.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=c}}},7993:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(5669);const r={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=(0,i.A)({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}}},1527:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var i=n(7116),r=n(6966),o=n(7529),a=n(1228),s=n(3709),c=n(9741),p=n(7790),d=n(9775),l=n(6411),u=n(2450),m=n(100);const f={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,f=e.name,w=n.mainAxis,h=void 0===w||w,g=n.altAxis,v=void 0!==g&&g,y=n.boundary,b=n.rootBoundary,k=n.altBoundary,P=n.padding,A=n.tether,M=void 0===A||A,R=n.tetherOffset,W=void 0===R?0:R,O=(0,d.A)(t,{boundary:y,rootBoundary:b,padding:P,altBoundary:k}),S=(0,r.A)(t.placement),x=(0,l.A)(t.placement),E=!x,L=(0,o.A)(S),_=(0,a.A)(L),T=t.modifiersData.popperOffsets,C=t.rects.reference,j=t.rects.popper,D="function"==typeof W?W(Object.assign({},t.rects,{placement:t.placement})):W,I="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(T){if(h){var B,H="y"===L?i.Mn:i.kb,F="y"===L?i.sQ:i.pG,U="y"===L?"height":"width",V=T[L],$=V+O[H],z=V-O[F],G=M?-j[U]/2:0,Q=x===i.ni?C[U]:j[U],Y=x===i.ni?-j[U]:-C[U],J=t.elements.arrow,K=M&&J?(0,c.A)(J):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,u.A)(),Z=X[H],ee=X[F],te=(0,s.u)(0,C[U],K[U]),ne=E?C[U]/2-G-te-Z-I.mainAxis:Q-te-Z-I.mainAxis,ie=E?-C[U]/2+G+te+ee+I.mainAxis:Y+te+ee+I.mainAxis,re=t.elements.arrow&&(0,p.A)(t.elements.arrow),oe=re?"y"===L?re.clientTop||0:re.clientLeft||0:0,ae=null!=(B=null==q?void 0:q[L])?B:0,se=V+ne-ae-oe,ce=V+ie-ae,pe=(0,s.u)(M?(0,m.jk)($,se):$,V,M?(0,m.T9)(z,ce):z);T[L]=pe,N[L]=pe-V}if(v){var de,le="x"===L?i.Mn:i.kb,ue="x"===L?i.sQ:i.pG,me=T[_],fe="y"===_?"height":"width",we=me+O[le],he=me-O[ue],ge=-1!==[i.Mn,i.kb].indexOf(S),ve=null!=(de=null==q?void 0:q[_])?de:0,ye=ge?we:me-C[fe]-j[fe]-ve+I.altAxis,be=ge?me+C[fe]+j[fe]-ve-I.altAxis:he,ke=M&&ge?(0,s.P)(ye,me,be):(0,s.u)(M?ye:we,me,M?be:he);T[_]=ke,N[_]=ke-me}t.modifiersData[f]=N}},requiresIfExists:["offset"]}},2962:(e,t,n)=>{"use strict";n.d(t,{n4:()=>f});var i=n(4962),r=n(7658),o=n(7993),a=n(160),s=n(3129),c=n(3208),p=n(5432),d=n(1527),l=n(8034),u=n(5911),m=[r.A,o.A,a.A,s.A,c.A,p.A,d.A,l.A,u.A],f=(0,i.UD)({defaultModifiers:m})},7143:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(6411),r=n(7116),o=n(9775),a=n(6966);function s(e,t){void 0===t&&(t={});var n=t,s=n.placement,c=n.boundary,p=n.rootBoundary,d=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,m=void 0===u?r.DD:u,f=(0,i.A)(s),w=f?l?r.Ol:r.Ol.filter((function(e){return(0,i.A)(e)===f})):r.OM,h=w.filter((function(e){return m.indexOf(e)>=0}));0===h.length&&(h=w);var g=h.reduce((function(t,n){return t[n]=(0,o.A)(e,{placement:n,boundary:c,rootBoundary:p,padding:d})[(0,a.A)(n)],t}),{});return Object.keys(g).sort((function(e,t){return g[e]-g[t]}))}},5669:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(6966),r=n(6411),o=n(7529),a=n(7116);function s(e){var t,n=e.reference,s=e.element,c=e.placement,p=c?(0,i.A)(c):null,d=c?(0,r.A)(c):null,l=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2;switch(p){case a.Mn:t={x:l,y:n.y-s.height};break;case a.sQ:t={x:l,y:n.y+n.height};break;case a.pG:t={x:n.x+n.width,y:u};break;case a.kb:t={x:n.x-s.width,y:u};break;default:t={x:n.x,y:n.y}}var m=p?(0,o.A)(p):null;if(null!=m){var f="y"===m?"height":"width";switch(d){case a.ni:t[m]=t[m]-(n[f]/2-s[f]/2);break;case a._N:t[m]=t[m]+(n[f]/2-s[f]/2)}}return t}},5901:(e,t,n)=>{"use strict";function i(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}n.d(t,{A:()=>i})},9775:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(8741),r=n(8994),o=n(9228),a=n(5669),s=n(5344),c=n(7116),p=n(2155),d=n(3432),l=n(7985);function u(e,t){void 0===t&&(t={});var n=t,u=n.placement,m=void 0===u?e.placement:u,f=n.boundary,w=void 0===f?c.WY:f,h=n.rootBoundary,g=void 0===h?c.R9:h,v=n.elementContext,y=void 0===v?c.xf:v,b=n.altBoundary,k=void 0!==b&&b,P=n.padding,A=void 0===P?0:P,M=(0,d.A)("number"!=typeof A?A:(0,l.A)(A,c.OM)),R=y===c.xf?c.ir:c.xf,W=e.rects.popper,O=e.elements[k?R:y],S=(0,i.A)((0,p.vq)(O)?O:O.contextElement||(0,r.A)(e.elements.popper),w,g),x=(0,o.A)(e.elements.reference),E=(0,a.A)({reference:x,element:W,strategy:"absolute",placement:m}),L=(0,s.A)(Object.assign({},W,E)),_=y===c.xf?L:x,T={top:S.top-_.top+M.top,bottom:_.bottom-S.bottom+M.bottom,left:S.left-_.left+M.left,right:_.right-S.right+M.right},C=e.modifiersData.offset;if(y===c.xf&&C){var j=C[m];Object.keys(T).forEach((function(e){var t=[c.pG,c.sQ].indexOf(e)>=0?1:-1,n=[c.Mn,c.sQ].indexOf(e)>=0?"y":"x";T[e]+=j[n]*t}))}return T}},7985:(e,t,n)=>{"use strict";function i(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}n.d(t,{A:()=>i})},1228:(e,t,n)=>{"use strict";function i(e){return"x"===e?"y":"x"}n.d(t,{A:()=>i})},6966:(e,t,n)=>{"use strict";function i(e){return e.split("-")[0]}n.d(t,{A:()=>i})},2450:(e,t,n)=>{"use strict";function i(){return{top:0,right:0,bottom:0,left:0}}n.d(t,{A:()=>i})},7529:(e,t,n)=>{"use strict";function i(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}n.d(t,{A:()=>i})},8066:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i={left:"right",right:"left",bottom:"top",top:"bottom"};function r(e){return e.replace(/left|right|bottom|top/g,(function(e){return i[e]}))}},601:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i={start:"end",end:"start"};function r(e){return e.replace(/start|end/g,(function(e){return i[e]}))}},6411:(e,t,n)=>{"use strict";function i(e){return e.split("-")[1]}n.d(t,{A:()=>i})},100:(e,t,n)=>{"use strict";n.d(t,{LI:()=>o,T9:()=>i,jk:()=>r});var i=Math.max,r=Math.min,o=Math.round},5850:(e,t,n)=>{"use strict";function i(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}n.d(t,{A:()=>i})},3432:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(2450);function r(e){return Object.assign({},(0,i.A)(),e)}},4780:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(7116);function r(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),i}function o(e){var t=r(e);return i.GM.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}},5344:(e,t,n)=>{"use strict";function i(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}n.d(t,{A:()=>i})},3709:(e,t,n)=>{"use strict";n.d(t,{P:()=>o,u:()=>r});var i=n(100);function r(e,t,n){return(0,i.T9)(e,(0,i.jk)(t,n))}function o(e,t,n){var i=r(e,t,n);return i>n?n:i}},4558:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>K});var i=n(2962),r=n(3129),o="tippy-content",a="tippy-backdrop",s="tippy-arrow",c="tippy-svg-arrow",p={passive:!0,capture:!0},d=function(){return document.body};function l(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function u(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function m(e,t){return"function"==typeof e?e.apply(void 0,t):e}function f(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function w(e){return[].concat(e)}function h(e,t){-1===e.indexOf(t)&&e.push(t)}function g(e){return e.split("-")[0]}function v(e){return[].slice.call(e)}function y(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function b(){return document.createElement("div")}function k(e){return["Element","Fragment"].some((function(t){return u(e,t)}))}function P(e){return u(e,"MouseEvent")}function A(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function M(e){return k(e)?[e]:function(e){return u(e,"NodeList")}(e)?v(e):Array.isArray(e)?e:v(document.querySelectorAll(e))}function R(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function W(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function O(e){var t,n=w(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function S(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[i](t,n)}))}function x(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var E={isTouch:!1},L=0;function _(){E.isTouch||(E.isTouch=!0,window.performance&&document.addEventListener("mousemove",T))}function T(){var e=performance.now();e-L<20&&(E.isTouch=!1,document.removeEventListener("mousemove",T)),L=e}function C(){var e=document.activeElement;if(A(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var j=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var D={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},I=Object.assign({appendTo:d,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},D,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),q=Object.keys(I);function N(e){var t=(e.plugins||[]).reduce((function(t,n){var i,r=n.name,o=n.defaultValue;r&&(t[r]=void 0!==e[r]?e[r]:null!=(i=I[r])?i:o);return t}),{});return Object.assign({},e,t)}function B(e,t){var n=Object.assign({},t,{content:m(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(N(Object.assign({},I,{plugins:t}))):q).reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(r){t[n]=i}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},I.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function H(e,t){e.innerHTML=t}function F(e){var t=b();return!0===e?t.className=s:(t.className=c,k(e)?t.appendChild(e):H(t,e)),t}function U(e,t){k(t.content)?(H(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?H(e,t.content):e.textContent=t.content)}function V(e){var t=e.firstElementChild,n=v(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(o)})),arrow:n.find((function(e){return e.classList.contains(s)||e.classList.contains(c)})),backdrop:n.find((function(e){return e.classList.contains(a)}))}}function $(e){var t=b(),n=b();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=b();function r(n,i){var r=V(t),o=r.box,a=r.content,s=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||U(a,e.props),i.arrow?s?n.arrow!==i.arrow&&(o.removeChild(s),o.appendChild(F(i.arrow))):o.appendChild(F(i.arrow)):s&&o.removeChild(s)}return i.className=o,i.setAttribute("data-state","hidden"),U(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props),{popper:t,onUpdate:r}}$.$$tippy=!0;var z=1,G=[],Q=[];function Y(e,t){var n,r,o,a,s,c,u,k,A=B(e,Object.assign({},I,N(y(t)))),M=!1,L=!1,_=!1,T=!1,C=[],D=f(be,A.interactiveDebounce),q=z++,H=(k=A.plugins).filter((function(e,t){return k.indexOf(e)===t})),F={id:q,reference:e,popper:b(),popperInstance:null,props:A,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:H,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){0;if(F.state.isDestroyed)return;ae("onBeforeUpdate",[F,t]),ve();var n=F.props,i=B(e,Object.assign({},n,y(t),{ignoreAttributes:!0}));F.props=i,ge(),n.interactiveDebounce!==i.interactiveDebounce&&(pe(),D=f(be,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?w(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):i.triggerTarget&&e.removeAttribute("aria-expanded");ce(),oe(),Y&&Y(n,i);F.popperInstance&&(Me(),We().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));ae("onAfterUpdate",[F,t])},setContent:function(e){F.setProps({content:e})},show:function(){0;var e=F.state.isVisible,t=F.state.isDestroyed,n=!F.state.isEnabled,i=E.isTouch&&!F.props.touch,r=l(F.props.duration,0,I.duration);if(e||t||n||i)return;if(te().hasAttribute("disabled"))return;if(ae("onShow",[F],!1),!1===F.props.onShow(F))return;F.state.isVisible=!0,ee()&&($.style.visibility="visible");oe(),me(),F.state.isMounted||($.style.transition="none");if(ee()){var o=ie();R([o.box,o.content],0)}c=function(){var e;if(F.state.isVisible&&!T){if(T=!0,$.offsetHeight,$.style.transition=F.props.moveTransition,ee()&&F.props.animation){var t=ie(),n=t.box,i=t.content;R([n,i],r),W([n,i],"visible")}se(),ce(),h(Q,F),null==(e=F.popperInstance)||e.forceUpdate(),ae("onMount",[F]),F.props.animation&&ee()&&function(e,t){we(e,t)}(r,(function(){F.state.isShown=!0,ae("onShown",[F])}))}},function(){var e,t=F.props.appendTo,n=te();e=F.props.interactive&&t===d||"parent"===t?n.parentNode:m(t,[n]);e.contains($)||e.appendChild($);F.state.isMounted=!0,Me(),!1}()},hide:function(){0;var e=!F.state.isVisible,t=F.state.isDestroyed,n=!F.state.isEnabled,i=l(F.props.duration,1,I.duration);if(e||t||n)return;if(ae("onHide",[F],!1),!1===F.props.onHide(F))return;F.state.isVisible=!1,F.state.isShown=!1,T=!1,M=!1,ee()&&($.style.visibility="hidden");if(pe(),fe(),oe(!0),ee()){var r=ie(),o=r.box,a=r.content;F.props.animation&&(R([o,a],i),W([o,a],"hidden"))}se(),ce(),F.props.animation?ee()&&function(e,t){we(e,(function(){!F.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&t()}))}(i,F.unmount):F.unmount()},hideWithInteractivity:function(e){0;ne().addEventListener("mousemove",D),h(G,D),D(e)},enable:function(){F.state.isEnabled=!0},disable:function(){F.hide(),F.state.isEnabled=!1},unmount:function(){0;F.state.isVisible&&F.hide();if(!F.state.isMounted)return;Re(),We().forEach((function(e){e._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($);Q=Q.filter((function(e){return e!==F})),F.state.isMounted=!1,ae("onHidden",[F])},destroy:function(){0;if(F.state.isDestroyed)return;F.clearDelayTimeouts(),F.unmount(),ve(),delete e._tippy,F.state.isDestroyed=!0,ae("onDestroy",[F])}};if(!A.render)return F;var U=A.render(F),$=U.popper,Y=U.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+F.id,F.popper=$,e._tippy=F,$._tippy=F;var J=H.map((function(e){return e.fn(F)})),K=e.hasAttribute("aria-expanded");return ge(),ce(),oe(),ae("onCreate",[F]),A.showOnCreate&&Oe(),$.addEventListener("mouseenter",(function(){F.props.interactive&&F.state.isVisible&&F.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(){F.props.interactive&&F.props.trigger.indexOf("mouseenter")>=0&&ne().addEventListener("mousemove",D)})),F;function X(){var e=F.props.touch;return Array.isArray(e)?e:[e,0]}function Z(){return"hold"===X()[0]}function ee(){var e;return!(null==(e=F.props.render)||!e.$$tippy)}function te(){return u||e}function ne(){var e=te().parentNode;return e?O(e):document}function ie(){return V($)}function re(e){return F.state.isMounted&&!F.state.isVisible||E.isTouch||a&&"focus"===a.type?0:l(F.props.delay,e?0:1,I.delay)}function oe(e){void 0===e&&(e=!1),$.style.pointerEvents=F.props.interactive&&!e?"":"none",$.style.zIndex=""+F.props.zIndex}function ae(e,t,n){var i;(void 0===n&&(n=!0),J.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(i=F.props)[e].apply(i,t)}function se(){var t=F.props.aria;if(t.content){var n="aria-"+t.content,i=$.id;w(F.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(F.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var r=t&&t.replace(i,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}}))}}function ce(){!K&&F.props.aria.expanded&&w(F.props.triggerTarget||e).forEach((function(e){F.props.interactive?e.setAttribute("aria-expanded",F.state.isVisible&&e===te()?"true":"false"):e.removeAttribute("aria-expanded")}))}function pe(){ne().removeEventListener("mousemove",D),G=G.filter((function(e){return e!==D}))}function de(t){if(!E.isTouch||!_&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!F.props.interactive||!x($,n)){if(w(F.props.triggerTarget||e).some((function(e){return x(e,n)}))){if(E.isTouch)return;if(F.state.isVisible&&F.props.trigger.indexOf("click")>=0)return}else ae("onClickOutside",[F,t]);!0===F.props.hideOnClick&&(F.clearDelayTimeouts(),F.hide(),L=!0,setTimeout((function(){L=!1})),F.state.isMounted||fe())}}}function le(){_=!0}function ue(){_=!1}function me(){var e=ne();e.addEventListener("mousedown",de,!0),e.addEventListener("touchend",de,p),e.addEventListener("touchstart",ue,p),e.addEventListener("touchmove",le,p)}function fe(){var e=ne();e.removeEventListener("mousedown",de,!0),e.removeEventListener("touchend",de,p),e.removeEventListener("touchstart",ue,p),e.removeEventListener("touchmove",le,p)}function we(e,t){var n=ie().box;function i(e){e.target===n&&(S(n,"remove",i),t())}if(0===e)return t();S(n,"remove",s),S(n,"add",i),s=i}function he(t,n,i){void 0===i&&(i=!1),w(F.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,i),C.push({node:e,eventType:t,handler:n,options:i})}))}function ge(){var e;Z()&&(he("touchstart",ye,{passive:!0}),he("touchend",ke,{passive:!0})),(e=F.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(he(e,ye),e){case"mouseenter":he("mouseleave",ke);break;case"focus":he(j?"focusout":"blur",Pe);break;case"focusin":he("focusout",Pe)}}))}function ve(){C.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)})),C=[]}function ye(e){var t,n=!1;if(F.state.isEnabled&&!Ae(e)&&!L){var i="focus"===(null==(t=a)?void 0:t.type);a=e,u=e.currentTarget,ce(),!F.state.isVisible&&P(e)&&G.forEach((function(t){return t(e)})),"click"===e.type&&(F.props.trigger.indexOf("mouseenter")<0||M)&&!1!==F.props.hideOnClick&&F.state.isVisible?n=!0:Oe(e),"click"===e.type&&(M=!n),n&&!i&&Se(e)}}function be(e){var t=e.target,n=te().contains(t)||$.contains(t);if("mousemove"!==e.type||!n){var i=We().concat($).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:A}:null})).filter(Boolean);(function(e,t){var n=t.clientX,i=t.clientY;return e.every((function(e){var t=e.popperRect,r=e.popperState,o=e.props.interactiveBorder,a=g(r.placement),s=r.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,p="top"===a?s.bottom.y:0,d="right"===a?s.left.x:0,l="left"===a?s.right.x:0,u=t.top-i+c>o,m=i-t.bottom-p>o,f=t.left-n+d>o,w=n-t.right-l>o;return u||m||f||w}))})(i,e)&&(pe(),Se(e))}}function ke(e){Ae(e)||F.props.trigger.indexOf("click")>=0&&M||(F.props.interactive?F.hideWithInteractivity(e):Se(e))}function Pe(e){F.props.trigger.indexOf("focusin")<0&&e.target!==te()||F.props.interactive&&e.relatedTarget&&$.contains(e.relatedTarget)||Se(e)}function Ae(e){return!!E.isTouch&&Z()!==e.type.indexOf("touch")>=0}function Me(){Re();var t=F.props,n=t.popperOptions,r=t.placement,o=t.offset,a=t.getReferenceClientRect,s=t.moveTransition,p=ee()?V($).arrow:null,d=a?{getBoundingClientRect:a,contextElement:a.contextElement||te()}:e,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(ee()){var n=ie().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},u=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},l];ee()&&p&&u.push({name:"arrow",options:{element:p,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),F.popperInstance=(0,i.n4)(d,$,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:u}))}function Re(){F.popperInstance&&(F.popperInstance.destroy(),F.popperInstance=null)}function We(){return v($.querySelectorAll("[data-tippy-root]"))}function Oe(e){F.clearDelayTimeouts(),e&&ae("onTrigger",[F,e]),me();var t=re(!0),i=X(),r=i[0],o=i[1];E.isTouch&&"hold"===r&&o&&(t=o),t?n=setTimeout((function(){F.show()}),t):F.show()}function Se(e){if(F.clearDelayTimeouts(),ae("onUntrigger",[F,e]),F.state.isVisible){if(!(F.props.trigger.indexOf("mouseenter")>=0&&F.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&M)){var t=re(!1);t?r=setTimeout((function(){F.state.isVisible&&F.hide()}),t):o=requestAnimationFrame((function(){F.hide()}))}}else fe()}}function J(e,t){void 0===t&&(t={});var n=I.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",_,p),window.addEventListener("blur",C);var i=Object.assign({},t,{plugins:n}),r=M(e).reduce((function(e,t){var n=t&&Y(t,i);return n&&e.push(n),e}),[]);return k(e)?r[0]:r}J.defaultProps=I,J.setDefaultProps=function(e){Object.keys(e).forEach((function(t){I[t]=e[t]}))},J.currentInput=E;Object.assign({},r.A,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});J.setDefaultProps({render:$});const K=J},5266:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{c(i.next(e))}catch(t){o(t)}}function s(e){try{c(i.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function r(e){let t=0,n=0,i=e;do{t+=i.offsetTop||0,n+=i.offsetLeft||0,i=i.offsetParent}while(i);return{top:t,left:n}}class o{constructor(e){this.element=e}getHorizontalScroll(){return this.element.scrollLeft}getVerticalScroll(){return this.element.scrollTop}getMaxHorizontalScroll(){return this.element.scrollWidth-this.element.clientWidth}getMaxVerticalScroll(){return this.element.scrollHeight-this.element.clientHeight}getHorizontalElementScrollOffset(e,t){return r(e).left-r(t).left}getVerticalElementScrollOffset(e,t){return r(e).top-r(t).top}scrollTo(e,t){this.element.scrollLeft=e,this.element.scrollTop=t}}class a{constructor(){this.element=window}getHorizontalScroll(){return window.scrollX||document.documentElement.scrollLeft}getVerticalScroll(){return window.scrollY||document.documentElement.scrollTop}getMaxHorizontalScroll(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)-window.innerWidth}getMaxVerticalScroll(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight}getHorizontalElementScrollOffset(e){return(window.scrollX||document.documentElement.scrollLeft)+e.getBoundingClientRect().left}getVerticalElementScrollOffset(e){return(window.scrollY||document.documentElement.scrollTop)+e.getBoundingClientRect().top}scrollTo(e,t){window.scrollTo(e,t)}}const s={elements:[],cancelMethods:[],add:(e,t)=>{s.elements.push(e),s.cancelMethods.push(t)},remove:(e,t)=>{const n=s.elements.indexOf(e);n>-1&&(t&&s.cancelMethods[n](),s.elements.splice(n,1),s.cancelMethods.splice(n,1))}},c="undefined"!=typeof window,p={cancelOnUserAction:!0,easing:e=>--e*e*e+1,elementToScroll:c?window:null,horizontalOffset:0,maxDuration:3e3,minDuration:250,speed:500,verticalOffset:0};const d=function(e,t={}){return i(this,void 0,void 0,(function*(){if(!c)return new Promise((e=>{e(!1)}));if(!window.Promise)throw"Browser doesn't support Promises, and animated-scroll-to depends on it, please provide a polyfill.";let n,i,r,d=Object.assign(Object.assign({},p),t);const l=d.elementToScroll===window,u=!!d.elementToScroll.nodeName;if(!l&&!u)throw"Element to scroll needs to be either window or DOM element.";const m=l?document.documentElement:d.elementToScroll;"smooth"===getComputedStyle(m).getPropertyValue("scroll-behavior")&&console.warn(`${m.tagName} has "scroll-behavior: smooth" which can mess up with animated-scroll-to's animations`);const f=l?new a:new o(d.elementToScroll);if(e instanceof Element){if(r=e,u&&(!d.elementToScroll.contains(r)||d.elementToScroll.isSameNode(r)))throw"options.elementToScroll has to be a parent of scrollToElement";n=f.getHorizontalElementScrollOffset(r,d.elementToScroll),i=f.getVerticalElementScrollOffset(r,d.elementToScroll)}else if("number"==typeof e)n=f.getHorizontalScroll(),i=e;else{if(!Array.isArray(e)||2!==e.length)throw"Wrong function signature. Check documentation.\nAvailable method signatures are:\n  animateScrollTo(y:number, options)\n  animateScrollTo([x:number | null, y:number | null], options)\n  animateScrollTo(scrollToElement:Element, options)";n=null===e[0]?f.getHorizontalScroll():e[0],i=null===e[1]?f.getVerticalScroll():e[1]}n+=d.horizontalOffset,i+=d.verticalOffset;const w=f.getMaxHorizontalScroll(),h=f.getHorizontalScroll();n>w&&(n=w);const g=n-h,v=f.getMaxVerticalScroll(),y=f.getVerticalScroll();i>v&&(i=v);const b=i-y,k=Math.abs(Math.round(g/1e3*d.speed)),P=Math.abs(Math.round(b/1e3*d.speed));let A=k>P?k:P;return A<d.minDuration?A=d.minDuration:A>d.maxDuration&&(A=d.maxDuration),new Promise(((e,t)=>{let r;0===g&&0===b&&e(!0),s.remove(f.element,!0);const o=()=>{l(),cancelAnimationFrame(r),e(!1)};s.add(f.element,o);const a=d.cancelOnUserAction?o:e=>e.preventDefault(),c=d.cancelOnUserAction?{passive:!0}:{passive:!1},p=["wheel","touchstart","keydown","mousedown"],l=()=>{p.forEach((e=>{f.element.removeEventListener(e,a,c)}))};p.forEach((e=>{f.element.addEventListener(e,a,c)}));const u=Date.now(),m=()=>{var t=Date.now()-u,o=t/A;const a=Math.round(h+g*d.easing(o)),c=Math.round(y+b*d.easing(o));t<A&&(a!==n||c!==i)?(f.scrollTo(a,c),r=requestAnimationFrame(m)):(f.scrollTo(n,i),cancelAnimationFrame(r),l(),s.remove(f.element,!1),e(!0))};r=requestAnimationFrame(m)}))}))}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.m=t,e=[],i.O=(t,n,r,o)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){for(var[n,r,o]=e[d],s=!0,c=0;c<n.length;c++)(!1&o||a>=o)&&Object.keys(i.O).every((e=>i.O[e](n[c])))?n.splice(c--,1):(s=!1,o<a&&(a=o));if(s){e.splice(d--,1);var p=r();void 0!==p&&(t=p)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={137:0,313:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[a,s,c]=n,p=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(c)var d=c(i)}for(t&&t(n);p<a.length;p++)o=a[p],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(d)},n=self.webpackChunkWPRecipeMaker=self.webpackChunkWPRecipeMaker||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r={};(()=>{"use strict";i.r(r);i(4853);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker})(),r=i.O(r),(WPRecipeMaker=void 0===WPRecipeMaker?{}:WPRecipeMaker)["wp-recipe-maker/dist/public-modern"]=r})();
var WPRecipeMaker;(self.webpackChunkWPRecipeMaker=self.webpackChunkWPRecipeMaker||[]).push([[89,947],{150:(e,t,r)=>{"use strict";r(6982);var i,n=r(9707);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.conversion={init(){document.addEventListener("click",(function(e){e.target.matches(".wprm-unit-conversion")&&(e.preventDefault(),WPRecipeMaker.conversion.clickSystem(e.target)),e.target.matches(".wprm-unit-conversion-checkbox")&&WPRecipeMaker.conversion.toggleSwitch(e.target)}),!1),document.addEventListener("change",(function(e){e.target.matches(".wprm-unit-conversion-dropdown")&&WPRecipeMaker.conversion.changeDropdown(e.target)}),!1),document.addEventListener("wprm-recipe-change",(e=>{"unitSystem"===e.detail.type&&window.WPRecipeMaker.manager.getRecipe(e.detail.id).then((e=>{e&&(WPRecipeMaker.conversion.updateSelectors(e),WPRecipeMaker.conversion.updateTemperatures(e),wprmp_public.settings.unit_conversion_enabled&&wprmp_public.settings.unit_conversion_remember&&localStorage.setItem("wprm-unit-system",e.data.currentSystem))}))})),setTimeout((()=>{WPRecipeMaker.conversion.setPreferedUnitSystem()}),100)},setPreferedUnitSystem(){if(wprmp_public.settings.unit_conversion_enabled&&wprmp_public.settings.unit_conversion_remember){let e=localStorage.getItem("wprm-unit-system");if(e&&(e=parseInt(e),!isNaN(e)&&0<e)){const t=window.WPRecipeMaker.manager.findRecipesOnPage();for(let r of t)window.WPRecipeMaker.manager.getRecipe(r).then((t=>{t&&t.data.currentSystem!==e&&t.setUnitSystem(e)}))}}},clickSystem(e){const t=e.dataset.recipe,r=parseInt(e.dataset.system);e.classList.contains("wprmpuc-active")||(window.WPRecipeMaker.hasOwnProperty("analytics")&&window.WPRecipeMaker.analytics.registerActionOnce(t,wprm_public.post_id,"unit-conversion",{type:"link"}),this.setSystem(t,r))},toggleSwitch(e){const t=e.dataset.recipe;let r=e.checked?e.dataset.onSystem:e.dataset.offSystem;r=parseInt(r),window.WPRecipeMaker.hasOwnProperty("analytics")&&window.WPRecipeMaker.analytics.registerActionOnce(t,wprm_public.post_id,"unit-conversion",{type:"switch"}),this.setSystem(t,r)},changeDropdown(e){const t=e.dataset.recipe,r=parseInt(e.value);window.WPRecipeMaker.hasOwnProperty("analytics")&&window.WPRecipeMaker.analytics.registerActionOnce(t,wprm_public.post_id,"unit-conversion",{type:"dropdown"}),this.setSystem(t,r)},setSystem(e,t){window.WPRecipeMaker.manager.getRecipe(e).then((e=>{e&&e.setUnitSystem(t)}))},updateSelectors(e){const t=document.querySelectorAll(".wprm-unit-conversion-container-"+e.id);for(let r of t){const t=r.querySelector(".wprm-unit-conversion-dropdown"),i=r.querySelector(".wprm-unit-conversion-checkbox");if(t)t.value=e.data.currentSystem;else if(i)i.checked=e.data.currentSystem===parseInt(i.dataset.onSystem);else{const t=r.querySelectorAll(".wprm-unit-conversion");for(let r of t){const t=parseInt(r.dataset.system);e.data.currentSystem===t?r.classList.add("wprmpuc-active"):r.classList.remove("wprmpuc-active")}}}},updateTemperatures(e){if("change"===wprmp_public.settings.unit_conversion_temperature){const t=wprmp_public.settings[`unit_conversion_system_${e.data.currentSystem}_temperature`],r=document.querySelectorAll(`#wprm-recipe-container-${e.id}, .wprm-recipe-roundup-item-${e.id}, .wprm-print-recipe-${e.id}, .wprm-recipe-${e.id}-instructions-container`);for(let e of r){const r=e.querySelectorAll(".wprm-temperature-container");for(let e of r){const r=WPRecipeMaker.temperature.getData(e);if((e.dataset.hasOwnProperty("currentUnit")?e.dataset.currentUnit:r.unit)!==t){let i;if(t===r.unit)i=r.value;else{const e=(0,n.L)(r.value);i="C"===t?5*(e-32)/9:9*e/5+32,"round_5"===wprmp_public.settings.unit_conversion_temperature_precision?i=5*Math.round(i/5):"round_10"===wprmp_public.settings.unit_conversion_temperature_precision&&(i=10*Math.round(i/10)),i=(0,n.V)(i,0)}e.querySelector(".wprm-temperature-value").innerHTML=i,e.querySelector(".wprm-temperature-unit").innerHTML=` °${t}`,e.dataset.currentUnit=t}}}}}},i=()=>{window.WPRecipeMaker.conversion.init()},"loading"!=document.readyState?i():document.addEventListener("DOMContentLoaded",i)},6982:(e,t,r)=>{"use strict";var i,n=r(4558),a=(r(2998),r(9707));window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.advancedServings={load(){document.addEventListener("wprm-recipe-change",(e=>{"servings"===e.detail.type&&window.WPRecipeMaker.manager.getRecipe(e.detail.id).then((e=>{e&&WPRecipeMaker.advancedServings.adjustedServingsDirectly(e)})),"advancedServings"===e.detail.type&&window.WPRecipeMaker.manager.getRecipe(e.detail.id).then((e=>{e&&WPRecipeMaker.advancedServings.updateAdvancedServingsDisplay(e)})),"unitSystem"===e.detail.type&&window.WPRecipeMaker.manager.getRecipe(e.detail.id).then((e=>{e&&WPRecipeMaker.advancedServings.updateUnitOnUnitSystemChange(e)}))})),window.WPRecipeMaker.advancedServings.init()},init(){if(!document.querySelector("body").classList.contains("wprm-print")){const e=document.querySelectorAll("span.wprm-recipe-advanced-servings-input");for(let t of e){let e=document.createElement("a");e.innerHTML=t.innerHTML,e.setAttribute("href","#"),e.setAttribute("role","button");const r=[...t.attributes].reduce(((e,t)=>(e[t.name]=t.value,e)),{});for(let t of Object.keys(r))e.setAttribute(t,r[t]);t.parentNode.replaceChild(e,t),e.onclick=e=>{e.preventDefault(),WPRecipeMaker.advancedServings.onClickInput(e.target)},r.hasOwnProperty("aria-label")&&(0,n.Ay)(e,{theme:"wprm",content:r["aria-label"]})}}},onClickInput(e){e.classList.contains("wprm-recipe-advanced-servings-input-shape")?WPRecipeMaker.advancedServings.toggleShape(e):e.classList.contains("wprm-recipe-advanced-servings-input-unit")?WPRecipeMaker.advancedServings.toggleUnit(e):WPRecipeMaker.advancedServings.changeNumber(e)},changeNumber(e){WPRecipeMaker.advancedServings.getRecipeFromElem(e).then((t=>{if(t){const r=e.getAttribute("aria-label"),i=e.innerText,n=prompt(`${r}:`,i);if(n){const r=WPRecipeMaker.advancedServings.parse(n);if(r&&0<r){let i={};i[e.dataset.type]=r,t.setAdvancedServings(i)}}}}))},toggleShape(e){WPRecipeMaker.advancedServings.getRecipeFromElem(e).then((e=>{if(e){const t="round"===e.data.currentAdvancedServings.shape?"rectangle":"round";e.setAdvancedServings({shape:t})}}))},toggleUnit(e){WPRecipeMaker.advancedServings.getRecipeFromElem(e).then((e=>{if(e){const t="cm"===e.data.currentAdvancedServings.unit?"inch":"cm";e.setAdvancedServings({unit:t})}}))},adjustedServingsDirectly(e){const t=WPRecipeMaker.advancedServings.getServingsFromAdvancedServings(e),r=e.data.currentServingsParsed;r!==t&&(r===e.data.originalServingsParsed?e.setAdvancedServings(e.data.originalAdvancedServings):e.setAdvancedServings({diameter:"?",width:"?",length:"?"}))},getRecipeFromElem(e){let t=!1;for(var r=e.parentNode;r&&r!=document;r=r.parentNode)if(r.matches(".wprm-recipe-advanced-servings-container")){t=r;break}return t?window.WPRecipeMaker.manager.getRecipe(t.dataset.recipe):Promise.resolve(!1)},updateUnitOnUnitSystemChange(e){if(wprmp_public.settings.unit_conversion_advanced_servings_conversion){const t=wprmp_public.settings[`unit_conversion_system_${e.data.currentSystem}_length_unit`];t!==e.data.currentAdvancedServings.unit&&e.setAdvancedServings({unit:t})}},updateAdvancedServingsDisplay(e){const t=document.querySelectorAll(`.wprm-recipe-advanced-servings-${e.id}-container`),r=e.data.currentAdvancedServings;for(let n of t){const e=n.querySelector(".wprm-recipe-advanced-servings-input-shape");e.innerHTML=e.dataset[`shape${r.shape[0].toUpperCase()+r.shape.slice(1)}`],"round"===r.shape?(n.querySelector(".wprm-recipe-advanced-servings-round").style.display="",n.querySelector(".wprm-recipe-advanced-servings-rectangle").style.display="none"):(n.querySelector(".wprm-recipe-advanced-servings-rectangle").style.display="",n.querySelector(".wprm-recipe-advanced-servings-round").style.display="none");const t=n.querySelectorAll(".wprm-recipe-advanced-servings-input-unit");for(let i of t)i.innerHTML=i.dataset[`unit${r.unit[0].toUpperCase()+r.unit.slice(1)}`];n.querySelector(".wprm-recipe-advanced-servings-input-diameter").innerHTML=WPRecipeMaker.advancedServings.format(r.diameter),n.querySelector(".wprm-recipe-advanced-servings-input-width").innerHTML=WPRecipeMaker.advancedServings.format(r.width),n.querySelector(".wprm-recipe-advanced-servings-input-length").innerHTML=WPRecipeMaker.advancedServings.format(r.length),r.height&&(n.querySelector(".wprm-recipe-advanced-servings-input-height").innerHTML=WPRecipeMaker.advancedServings.format(r.height))}const i=WPRecipeMaker.advancedServings.getServingsFromAdvancedServings(e);i&&e.setServings(i)},getServingsFromAdvancedServings(e){if(e){const t=e.data.currentAdvancedServings,r=e.data.originalAdvancedServings;if("?"===t.height)return!1;if("round"===t.shape){if("?"===t.diameter)return!1}else if("?"===t.width||"?"===t.length)return!1;const i=0<r.height;let n=WPRecipeMaker.advancedServings.getArea(r),a=WPRecipeMaker.advancedServings.getArea(t);if(i){n*="inch"===r.unit?2.54*r.height:r.height,a*="inch"===t.unit?2.54*t.height:t.height}const s=a/n;return e.data.originalServingsParsed*s}return!1},getArea(e){let t=e.diameter/2,r=e.width,i=e.length;return"inch"===e.unit&&(t*=2.54,r*=2.54,i*=2.54),"round"===e.shape?Math.PI*t*t:r*i},parse:e=>(0,a.L)(e),format(e){const t=(0,a.V)(e,wprmp_public.settings.adjustable_servings_round_to_decimals);return isNaN(t)?e:t}},i=()=>{window.WPRecipeMaker.advancedServings.load()},"loading"!=document.readyState?i():document.addEventListener("DOMContentLoaded",i);r(4123);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.cookMode={currentModalElement:null,currentModalUid:null,currentScreen:"overview",currentStepIndex:0,totalSteps:0,completedSteps:new Set,currentRecipeId:null,savedProgress:{},touchStartX:0,touchStartY:0,touchEndX:0,touchEndY:0,eventHandlers:[],init(){document.addEventListener("wprm-modal-open",(e=>{"cook-mode"===e.detail.type&&window.WPRecipeMaker.cookMode.opened(e.detail.uid,e.detail.modal,e.detail.data)})),document.addEventListener("wprm-modal-close",(e=>{"cook-mode"===e.detail.type&&window.WPRecipeMaker.cookMode.closed(e.detail.uid,e.detail.modal,e.detail.data)})),document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-recipe-cook-mode")){e.preventDefault();const r=t.dataset.modalUid;let i=t.dataset.recipeId;i=parseInt(i),r&&i&&window.WPRecipeMaker.modal.open(r,{recipe:i});break}}),!1)},async opened(e,t,r){const i=r.recipe;if(!i)return;const n=document.getElementById("wprm-popup-modal-"+e);if(!n)return;if(!n.querySelector(".wprm-cook-mode"))return;this.currentModalElement=n,this.currentModalUid=e,this.currentRecipeId=i,window.WPRecipeMaker.timer&&(window.WPRecipeMaker.timer.clearCookModeTimers(n),window.WPRecipeMaker.timer.bindTimers(n));const a=n.querySelectorAll(".wprm-cook-mode-instruction-step");this.totalSteps=a.length;const s=this.savedProgress[i];if(s){this.currentScreen=s.screen||"overview";const e=s.stepIndex||0;this.currentStepIndex=Math.min(e,this.totalSteps>0?this.totalSteps-1:0),this.completedSteps=new Set(s.completedSteps||[])}else this.currentScreen="overview",this.currentStepIndex=0,this.completedSteps.clear();try{const e=await window.WPRecipeMaker.manager.getRecipe(i);if(e&&e.data){const t=e.data.currentServingsParsed,r=e.data.currentSystem;if(null!=t){const e=n.querySelector(".wprm-cook-mode-servings-input");e&&(e.value=t);const r=n.querySelector(".wprm-cook-mode-servings-decrease"),i=n.querySelector(".wprm-cook-mode-servings-increase");r&&i&&this.updateServingsButtons(r,i,t)}if(null!=r){n.querySelectorAll(".wprm-cook-mode-unit-button").forEach((e=>{parseInt(e.dataset.system)===r?e.classList.add("active"):e.classList.remove("active")}))}window.WPRecipeMaker.managerPremiumIngredients&&window.WPRecipeMaker.managerPremiumIngredients.updateIngredientsDisplay&&window.WPRecipeMaker.managerPremiumIngredients.updateIngredientsDisplay(e)}}catch(o){console.error("Error getting recipe data:",o)}if(s)if("cooking"===s.screen){const e=n.querySelector(".wprm-cook-mode-screen-overview"),t=n.querySelector(".wprm-cook-mode-screen-cooking");e&&(e.style.display="none"),t&&(t.style.display="flex");const r=n.querySelector(".wprm-cook-mode-start-button"),i=n.querySelector(".wprm-cook-mode-cooking-footer");r&&(r.style.display="none"),i&&(i.style.display="block")}else"thank-you"===s.screen&&this.showThankYouScreen();this.setupEventListeners(),this.setupBeforeUnloadWarning(),this.updateStepDisplay(),this.updateProgress()},closed(e,t,r){this.currentRecipeId&&(this.savedProgress[this.currentRecipeId]={screen:this.currentScreen,stepIndex:this.currentStepIndex,completedSteps:Array.from(this.completedSteps)}),this.cleanupEventListeners(),this.removeBeforeUnloadWarning(),window.WPRecipeMaker.timer&&window.WPRecipeMaker.timer.clearCookModeTimers(this.currentModalElement),window.WPRecipeMaker.preventSleep&&window.WPRecipeMaker.preventSleep.unlock(),this.currentModalElement=null,this.currentModalUid=null,this.currentRecipeId=null,this.currentScreen="overview",this.currentStepIndex=0,this.totalSteps=0,this.completedSteps.clear()},setupEventListeners(){if(!this.currentModalElement)return;this.cleanupEventListeners();const e=this.currentModalElement.querySelector(".wprm-cook-mode-servings-decrease"),t=this.currentModalElement.querySelector(".wprm-cook-mode-servings-increase"),r=this.currentModalElement.querySelector(".wprm-cook-mode-servings-input");if(e){const i=()=>{const i=parseFloat(r.value)||1,n=Math.max(1,i-1);r.value=n,this.updateServings(n),this.updateServingsButtons(e,t,n)};e.addEventListener("click",i),this.eventHandlers.push({element:e,event:"click",handler:i})}if(t){const i=()=>{const i=(parseFloat(r.value)||1)+1;r.value=i,this.updateServings(i),this.updateServingsButtons(e,t,i)};t.addEventListener("click",i),this.eventHandlers.push({element:t,event:"click",handler:i})}if(r){const i=()=>{const i=parseFloat(r.value)||1;this.updateServings(i),this.updateServingsButtons(e,t,i)};if(r.addEventListener("change",i),this.eventHandlers.push({element:r,event:"change",handler:i}),e&&t){const i=parseFloat(r.value)||1;this.updateServingsButtons(e,t,i)}}this.currentModalElement.querySelectorAll(".wprm-cook-mode-unit-button").forEach((e=>{const t=()=>{const t=parseInt(e.dataset.system);this.updateUnitSystem(t)};e.addEventListener("click",t),this.eventHandlers.push({element:e,event:"click",handler:t})}));const i=this.currentModalElement.querySelector(".wprm-cook-mode-start-button");if(i){const e=()=>{this.startCooking()};i.addEventListener("click",e),this.eventHandlers.push({element:i,event:"click",handler:e})}const n=this.currentModalElement.querySelector(".wprm-cook-mode-nav-prev"),a=this.currentModalElement.querySelector(".wprm-cook-mode-nav-next");if(n){const e=()=>{this.goToPreviousStep()};n.addEventListener("click",e),this.eventHandlers.push({element:n,event:"click",handler:e})}if(a){const e=()=>{this.goToNextStep()};a.addEventListener("click",e),this.eventHandlers.push({element:a,event:"click",handler:e})}const s=this.currentModalElement.querySelector(".wprm-cook-mode-nav-close");if(s){const e=()=>{this.closeModal()};s.addEventListener("click",e),this.eventHandlers.push({element:s,event:"click",handler:e})}const o=this.currentModalElement.querySelector(".wprm-popup-modal__close, [data-micromodal-close]");if(o){const e=e=>{e.preventDefault(),e.stopPropagation(),this.closeModal()};o.addEventListener("click",e,!0),this.eventHandlers.push({element:o,event:"click",handler:e,options:!0})}this.setupSwipeSupport(),this.setupKeyboardSupport()},setupSwipeSupport(){const e=this.currentModalElement.querySelector(".wprm-cook-mode-screen-overview");if(e){const t=e=>{this.touchStartX=e.changedTouches[0].screenX,this.touchStartY=e.changedTouches[0].screenY},r=e=>{this.touchEndX=e.changedTouches[0].screenX,this.touchEndY=e.changedTouches[0].screenY,this.handleSwipe()},i={passive:!0};e.addEventListener("touchstart",t,i),e.addEventListener("touchend",r,i),this.eventHandlers.push({element:e,event:"touchstart",handler:t,options:i}),this.eventHandlers.push({element:e,event:"touchend",handler:r,options:i})}const t=this.currentModalElement.querySelector(".wprm-cook-mode-instructions-container");if(t){const e=e=>{this.touchStartX=e.changedTouches[0].screenX,this.touchStartY=e.changedTouches[0].screenY},r=e=>{this.touchEndX=e.changedTouches[0].screenX,this.touchEndY=e.changedTouches[0].screenY,this.handleSwipe()},i={passive:!0};t.addEventListener("touchstart",e,i),t.addEventListener("touchend",r,i),this.eventHandlers.push({element:t,event:"touchstart",handler:e,options:i}),this.eventHandlers.push({element:t,event:"touchend",handler:r,options:i})}},setupKeyboardSupport(){const e=e=>{if(!this.currentModalElement)return;if("Escape"===e.key){if(this.hasRunningTimers()){e.preventDefault(),e.stopPropagation();return void(window.confirm("You have running timers. Closing cook mode will stop all timers. Do you want to continue?")&&this.closeModal(!0))}return}const t=document.activeElement;if(!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)if("overview"===this.currentScreen){const r=t===this.currentModalElement.querySelector(".wprm-cook-mode-start-button")||t===document.body||t===this.currentModalElement||!t;"ArrowRight"===e.key&&r&&(e.preventDefault(),this.startCooking())}else if("cooking"===this.currentScreen){if(t&&t!==document.body&&t!==this.currentModalElement){if("BUTTON"===t.tagName||"A"===t.tagName||t.hasAttribute("tabindex")||"button"===t.getAttribute("role"))return}"ArrowLeft"===e.key?(e.preventDefault(),this.goToPreviousStep()):"ArrowRight"===e.key&&(e.preventDefault(),this.goToNextStep())}else"thank-you"===this.currentScreen&&"ArrowLeft"===e.key&&(e.preventDefault(),this.goToPreviousStep())};document.addEventListener("keydown",e,!0),this.eventHandlers.push({element:document,event:"keydown",handler:e,options:!0})},cleanupEventListeners(){this.eventHandlers.forEach((({element:e,event:t,handler:r,options:i})=>{e&&e.removeEventListener&&e.removeEventListener(t,r,i)})),this.eventHandlers=[]},setupBeforeUnloadWarning(){const e=e=>{if(this.currentModalElement)return e.preventDefault(),e.returnValue="",""};window.addEventListener("beforeunload",e),this.eventHandlers.push({element:window,event:"beforeunload",handler:e})},removeBeforeUnloadWarning(){},handleSwipe(){const e=this.touchEndX-this.touchStartX,t=this.touchEndY-this.touchStartY;Math.abs(e)>Math.abs(t)&&Math.abs(e)>50&&("overview"===this.currentScreen?e<0&&this.startCooking():e>0?this.goToPreviousStep():this.goToNextStep())},updateServingsButtons(e,t,r){e&&(e.disabled=r<=1)},async updateServings(e){if(!this.currentModalElement)return;const t=this.currentModalElement.querySelector(".wprm-cook-mode");if(!t)return;const r=parseInt(t.getAttribute("data-recipe-id"));if(r){window.WPRecipeMaker.hasOwnProperty("analytics")&&window.WPRecipeMaker.analytics.registerActionOnce(r,wprm_public.post_id,"adjust-servings",{type:"cook-mode"});try{const t=await window.WPRecipeMaker.manager.getRecipe(r);t&&t.setServings&&t.setServings(e)}catch(i){console.error("Error updating servings:",i)}this.saveProgress()}},updateUnitSystem(e){if(!this.currentModalElement)return;const t=this.currentModalElement.querySelector(".wprm-cook-mode");if(!t)return;const r=parseInt(t.getAttribute("data-recipe-id"));if(!r)return;window.WPRecipeMaker.hasOwnProperty("analytics")&&window.WPRecipeMaker.analytics.registerActionOnce(r,wprm_public.post_id,"unit-conversion",{type:"cook-mode"});this.currentModalElement.querySelectorAll(".wprm-cook-mode-unit-button").forEach((t=>{parseInt(t.dataset.system)===e?t.classList.add("active"):t.classList.remove("active")})),window.WPRecipeMaker.manager.getRecipe(r).then((t=>{t&&t.setUnitSystem&&t.setUnitSystem(e)})).catch((e=>{console.error("Error updating unit system:",e)})),this.saveProgress()},startCooking(){if(0===this.totalSteps)return;window.WPRecipeMaker.preventSleep&&window.WPRecipeMaker.preventSleep.wakeLockApi&&window.WPRecipeMaker.preventSleep.lock();const e=this.currentModalElement.querySelector(".wprm-cook-mode-screen-overview"),t=this.currentModalElement.querySelector(".wprm-cook-mode-screen-cooking");e&&(e.style.display="none"),t&&(t.style.display="flex");const r=this.currentModalElement.querySelector(".wprm-cook-mode-start-button"),i=this.currentModalElement.querySelector(".wprm-cook-mode-cooking-footer");r&&(r.style.display="none"),i&&(i.style.display="block"),this.currentScreen="cooking",this.currentStepIndex=0,this.completedSteps.clear(),this.updateStepDisplay(),this.updateProgress(),this.saveProgress()},goBackToOverview(){const e=this.currentModalElement.querySelector(".wprm-cook-mode-screen-overview"),t=this.currentModalElement.querySelector(".wprm-cook-mode-screen-cooking");e&&(e.style.display="flex"),t&&(t.style.display="none");const r=this.currentModalElement.querySelector(".wprm-cook-mode-start-button"),i=this.currentModalElement.querySelector(".wprm-cook-mode-cooking-footer");r&&(r.style.display="block"),i&&(i.style.display="none"),this.currentScreen="overview",this.currentStepIndex=0,this.completedSteps.clear(),this.updateProgress(),this.saveProgress()},goToPreviousStep(){if("thank-you"===this.currentScreen)this.currentScreen="cooking",this.currentStepIndex=this.totalSteps-1,this.hideThankYouScreen(),this.updateStepDisplay(),this.saveProgress();else if(this.currentStepIndex>0){for(let e=this.currentStepIndex;e<this.totalSteps;e++)this.completedSteps.delete(e);this.currentStepIndex--,this.updateStepDisplay(),this.saveProgress()}else 0===this.currentStepIndex&&this.goBackToOverview()},goToNextStep(){this.currentStepIndex<this.totalSteps-1?(this.completedSteps.add(this.currentStepIndex),this.currentStepIndex++,this.updateStepDisplay(),this.saveProgress()):this.currentStepIndex===this.totalSteps-1&&(this.completedSteps.add(this.currentStepIndex),this.showThankYouScreen(),this.saveProgress())},updateStepDisplay(){if(!this.currentModalElement)return;this.currentModalElement.querySelectorAll(".wprm-cook-mode-instruction-step").forEach(((e,t)=>{t===this.currentStepIndex?e.style.display="block":e.style.display="none"}));this.currentModalElement.querySelector(".wprm-cook-mode-nav-prev"),this.currentModalElement.querySelector(".wprm-cook-mode-nav-next");const e=this.currentModalElement.querySelector(".wprm-cook-mode-step-current");e&&(e.textContent=this.currentStepIndex+1),this.updateProgress()},updateProgress(){if(!this.currentModalElement)return;const e=this.currentModalElement.querySelectorAll(".wprm-cook-mode-progress-step-current"),t=this.currentModalElement.querySelectorAll(".wprm-cook-mode-progress-bar-fill");if(e.forEach((e=>{e.textContent=this.currentStepIndex+1})),t.length>0&&this.totalSteps>0){const e=(this.currentStepIndex+1)/this.totalSteps*100;t.forEach((t=>{t.style.width=e+"%"}))}},showThankYouScreen(){if(!this.currentModalElement)return;const e=this.currentModalElement.querySelector(".wprm-cook-mode-screen-cooking");e&&(e.style.display="none");const t=this.currentModalElement.querySelector(".wprm-cook-mode-screen-thank-you");t&&(t.style.display="flex");const r=this.currentModalElement.querySelector(".wprm-cook-mode-progress"),i=this.currentModalElement.querySelector(".wprm-cook-mode-nav-next"),n=this.currentModalElement.querySelector(".wprm-cook-mode-nav-close");this.currentModalElement.querySelector(".wprm-cook-mode-nav-prev");r&&(r.style.display="none"),i&&(i.style.display="none"),n&&(n.style.display="block"),this.currentScreen="thank-you"},hideThankYouScreen(){if(!this.currentModalElement)return;const e=this.currentModalElement.querySelector(".wprm-cook-mode-screen-thank-you");e&&(e.style.display="none");const t=this.currentModalElement.querySelector(".wprm-cook-mode-screen-cooking");t&&(t.style.display="flex");const r=this.currentModalElement.querySelector(".wprm-cook-mode-progress"),i=this.currentModalElement.querySelector(".wprm-cook-mode-nav-next"),n=this.currentModalElement.querySelector(".wprm-cook-mode-nav-close");r&&(r.style.display="block"),i&&(i.style.display="block"),n&&(n.style.display="none")},hasRunningTimers(){if(!window.WPRecipeMaker.timer||!this.currentModalElement)return!1;let e=!1;return window.WPRecipeMaker.timer.cookModeTimers.forEach((t=>{t.cookModeModal===this.currentModalElement&&t.interval&&!t.finished&&(e=!0)})),e},closeModal(e=!1){if(this.currentModalUid&&window.WPRecipeMaker&&window.WPRecipeMaker.modal){if(!e&&this.hasRunningTimers()){if(!window.confirm("You have running timers. Closing cook mode will stop all timers. Do you want to continue?"))return}window.WPRecipeMaker.modal.close(this.currentModalUid)}},saveProgress(){this.currentRecipeId&&(this.savedProgress[this.currentRecipeId]={screen:this.currentScreen,stepIndex:this.currentStepIndex,completedSteps:Array.from(this.completedSteps)})}},function(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}((()=>{window.WPRecipeMaker.cookMode.init()}));r(4141);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.managerPremiumIngredients={load(){document.addEventListener("wprm-recipe-change",(e=>{"servings"!==e.detail.type&&"unitSystem"!==e.detail.type||window.WPRecipeMaker.manager.getRecipe(e.detail.id).then((e=>{e&&WPRecipeMaker.managerPremiumIngredients.updateIngredientsDisplay(e)}))}))},parseAdjustableShortcodes:(e="")=>String(e).replace(/\[adjustable\]([\s\S]*?)\[\/adjustable\]/gi,'<span class="wprm-dynamic-quantity">$1</span>').replace(/\[\/?adjustable\]/gi,""),applyAdjustableNamePrefix(e="",t=""){if(!t||/\[adjustable\]/i.test(t)||!/\[adjustable\]/i.test(e))return t;const r=String(e).match(/^\s*((?:\[adjustable\][\s\S]*?\[\/adjustable\]\s*)+)/i);return r?r[1]+t:t},appendHtml(e,t){const r=document.createElement("span");r.innerHTML=t,e.append(...Array.from(r.childNodes))},setIngredientNameHtml(e,t){const r=e.matches("a")?e:e.querySelector("a");r?r.innerHTML=t:e.innerHTML=t},getCurrentIngredients(e){e.data.hasOwnProperty("ingredientsElements")||window.WPRecipeMaker.managerPremiumIngredients.findIngredientsElements(e);let t=[];const r=e.data.currentServingsParsed===e.data.originalServingsParsed&&e.data.currentSystem===e.data.originalSystem;for(let i=0;i<e.data.ingredients.length;i++){const n=e.data.ingredients[i];let a={};for(let t=1;t<=2;t++){let i,s;n.unit_systems.hasOwnProperty("unit-system-"+t)?(i=n.unit_systems["unit-system-"+t],s=!1):(i=n.unit_systems["unit-system-"+(t%2+1)],s=!0);let o=wprmp_public.settings.fractions_enabled;wprmp_public.settings.unit_conversion_enabled&&window.WPRecipeMaker.hasOwnProperty("conversion")&&(o=!wprmp_public.settings.hasOwnProperty(`unit_conversion_system_${t}_fractions`)||wprmp_public.settings[`unit_conversion_system_${t}_fractions`]);let c=i.amount,d=i.amountString,p=!1,l=!1;for(let t=0;t<i.amountParts.length;t++){const r=i.amountParts[t].numberUnitQuantity*e.data.currentServingsParsed;!isNaN(r)&&0<r&&(0===t&&(l=r<=1,p=r),d=d.replace(`%wprm${t}%`,this.format(r,o)))}!1===/%wprm\d+%/g.test(d)&&(c=d),r?c=i.amount:e.data.currentServingsParsed!==e.data.originalServingsParsed||s||(c=i.amount);let m=i.unitParsed;if(!r)if(e.data.currentServingsParsed!==e.data.originalServingsParsed||s){const e=!!i.hasOwnProperty("unit_singular")&&i.unit_singular,t=!!i.hasOwnProperty("unit_plural")&&i.unit_plural;m=i.unitParsed,e&&t&&(m=l?e:t)}else m=i.unitParsed;let u=n.name,w=!1;if(!r){const e=i.hasOwnProperty("name_singular")?i.name_singular:!!n.hasOwnProperty("name_singular")&&n.name_singular,t=i.hasOwnProperty("name_plural")?i.name_plural:!!n.hasOwnProperty("name_plural")&&n.name_plural;e&&t&&(w=!0,u=l?e:t,u=this.applyAdjustableNamePrefix(n.name,u))}a["unit-system-"+t]={amount:c,amountParsed:p,amountIsSingular:l,unit:m,name:u,needsNameChange:w,name_singular:i.hasOwnProperty("name_singular")?i.name_singular:!!n.hasOwnProperty("name_singular")&&n.name_singular,name_plural:i.hasOwnProperty("name_plural")?i.name_plural:!!n.hasOwnProperty("name_plural")&&n.name_plural}}t.push(a)}return t},updateIngredientsDisplay(e){e.data.hasOwnProperty("ingredientsElements")||window.WPRecipeMaker.managerPremiumIngredients.findIngredientsElements(e);const t=e.data.hasOwnProperty("overrideContainerId")&&!1!==e.data.overrideContainerId?e.data.overrideContainerId:e.id,r=e.data.currentServingsParsed===e.data.originalServingsParsed&&e.data.currentSystem===e.data.originalSystem,i=window.WPRecipeMaker.managerPremiumIngredients.getCurrentIngredients(e),n={};for(let a=0;a<e.data.ingredients.length;a++){const t=e.data.ingredients[a];t.splits&&Array.isArray(t.splits)&&t.splits.length>=2&&(n[t.uid]=t.splits)}for(let s=0;s<e.data.ingredients.length;s++){const o=e.data.ingredients[s],c=e.data.ingredientsElements[s],d=i[s],p=(t,r=o.name||"",i=e.data.currentSystem)=>{let n=r;const a=d["unit-system-"+i],s=a&&a.hasOwnProperty("name_singular")?a.name_singular:!!o.hasOwnProperty("name_singular")&&o.name_singular,c=a&&a.hasOwnProperty("name_plural")?a.name_plural:!!o.hasOwnProperty("name_plural")&&o.name_plural;return s&&c&&t&&!isNaN(t)&&t>0&&(n=t<=1?s:c,n=this.applyAdjustableNamePrefix(r,n)),this.parseAdjustableShortcodes(n)},l=Object.keys(o.unit_systems||{}).map((e=>{const t=e.match(/^unit-system-(\d+)$/);return!!t&&parseInt(t[1],10)})).filter((e=>!1!==e&&!isNaN(e))).sort(((e,t)=>e-t)),m=(e,t,r="")=>{let i=r;const n="unit-system-"+e;let a=!(!o.unit_systems||!o.unit_systems.hasOwnProperty(n))&&o.unit_systems[n];if(!a&&l.length>0){const e="unit-system-"+l[0];a=!(!o.unit_systems||!o.unit_systems.hasOwnProperty(e))&&o.unit_systems[e]}if(a){const e=!!a.hasOwnProperty("unit_singular")&&a.unit_singular,r=!!a.hasOwnProperty("unit_plural")&&a.unit_plural;e&&r&&t&&!isNaN(t)&&t>0&&(i=t<=1?e:r)}return i},u=(e,t=!0)=>{if(null==e||""===e)return t;const r=`${e}`.toLowerCase();return!!["1","true","yes","on"].includes(r)||!["0","false","no","off"].includes(r)&&t},w=e=>{const t=e.dataset.hasOwnProperty("bothUnitsStyle")?e.dataset.bothUnitsStyle:"";return"parentheses"===t||"slash"===t?t:""},g=e=>!e.dataset.hasOwnProperty("bothUnitsShowIdentical")||u(e.dataset.bothUnitsShowIdentical,!0),v=(e,t)=>e.dataset.hasOwnProperty("bothUnits")?u(e.dataset.bothUnits,!1):!(!e.dataset.hasOwnProperty("bothUnitsStyle")&&!e.dataset.hasOwnProperty("bothUnitsShowIdentical"))||t&&t.length>1,h=e=>{if(null===e||isNaN(e))return null;if(o.splits&&Array.isArray(o.splits))for(let t of o.splits)if(parseInt(t.id,10)===e&&void 0!==t.percentage&&null!==t.percentage&&""!=`${t.percentage}`){const e=parseFloat(t.percentage);if(!isNaN(e))return e}return null};for(let t of c){for(let i=0;i<t.amounts.length;i++){const n=t.amounts[i];let a=e.data.currentSystem;t.showingBothUnitSystems&&1===i&&(a=a%2+1);const s=d["unit-system-"+a];n.elem.innerHTML=r?n.original:s.amount,t.units.hasOwnProperty(i)&&(t.units[i].elem.innerHTML=r?t.units[i].original:s.unit)}t.name&&(d["unit-system-"+e.data.currentSystem].needsNameChange?this.setIngredientNameHtml(t.name.elem,this.parseAdjustableShortcodes(d["unit-system-"+e.data.currentSystem].name)):t.name.elem.innerHTML=t.name.original)}if(!1!==o.uid&&1<=c.length){let r=".wprm-inline-ingredient-"+t+"-"+o.uid+", .wprm-recipe-instruction-ingredient-"+t+"-"+o.uid;if(n[o.uid])for(let e of n[o.uid])if(void 0!==e.percentage&&null!==e.percentage){const i=o.uid+"-"+e.id;r+=", .wprm-inline-ingredient-"+t+"-"+i,r+=", .wprm-recipe-instruction-ingredient-"+t+"-"+i}const i=document.querySelectorAll(r);if(0<i.length){let t="",r="";for(let i of c){const n=document.createElement("div");if(n.innerHTML=i.elem.innerHTML,e.data.currentServingsParsed!==e.data.originalServingsParsed){const t=n.querySelectorAll(".wprm-dynamic-quantity");for(let r of t){const t=(0,a.L)(r.innerText);if(t&&!isNaN(t)){const i=t/e.data.originalServingsParsed;if(i&&!isNaN(i)){const t=e.data.currentServingsParsed*i;if(t&&!isNaN(t)){let i=!0;if(wprmp_public.settings.unit_conversion_enabled&&window.WPRecipeMaker.hasOwnProperty("conversion")){const t=e.data.hasOwnProperty("currentSystem")?e.data.currentSystem:1;i=!wprmp_public.settings.hasOwnProperty(`unit_conversion_system_${t}_fractions`)||wprmp_public.settings[`unit_conversion_system_${t}_fractions`]}r.textContent=(0,a.V)(t,wprmp_public.settings.adjustable_servings_round_to_decimals,i)}}}}}Array.from(n.childNodes).forEach((e=>{e.nodeType===Node.TEXT_NODE&&(e.textContent=e.textContent.replace(/[,-]/g,""))}));const s=n.querySelector(".wprm-recipe-ingredient-notes, .wprm-cook-mode-ingredient-notes");s&&(r=s.innerText,s.remove());const o=n.querySelector(".wprm-checkbox-container");o&&o.remove();const c=n.querySelector(".wprm-recipe-ingredient-image");if(c&&c.remove(),t=n.innerText,t=t.replace(/\s\s+/g," "),t=t.trim(),t)break}if(t)for(let n of i){let i=t,s=!1,c=null,u=null;if(n.dataset.hasOwnProperty("splitId")&&""!==n.dataset.splitId){const e=parseInt(n.dataset.splitId,10);isNaN(e)||(u=e)}if(n.dataset.hasOwnProperty("splitPercentage")&&""!==n.dataset.splitPercentage){const e=parseFloat(n.dataset.splitPercentage);isNaN(e)||(c=e)}if(null===u){const e=parseInt(o.uid,10);if(!isNaN(e)&&e>=0){const t=n.className.split(" ");for(let r of t){if(r.includes("-"+e+":")){const t=r.match(new RegExp("-"+e+":(\\d+)"));t&&t[1]&&(u=parseInt(t[1],10))}else if(r.includes("-"+e+"-")){const t=r.match(new RegExp("-"+e+"-(\\d+)$"));t&&t[1]&&(u=parseInt(t[1],10))}if(null!==u&&!isNaN(u))break}}}null!==c&&!isNaN(c)||null===u||(c=h(u)),null!==c&&!isNaN(c)&&c>=0&&c<=100&&(s=!0);const y=n.querySelectorAll(".wprm-recipe-ingredient-unit-system"),f=v(n,y);if(y.length>=1){let t=!1;for(let e=0;e<y.length;e++){const r=y[e];if(!r.textContent||""===r.textContent.trim())continue;let i=e+1;const n=r.className||"",o=n.match(/wprm-recipe-ingredient-unit-system-2\b/),p=n.match(/wprm-recipe-ingredient-unit-system-1\b/);o?i=2:p&&(i=1);const l=d["unit-system-"+i];if(l){let e=null;if(l.amountParsed&&!isNaN(l.amountParsed)&&l.amountParsed>0)e=l.amountParsed;else if(l.amount){const t=(0,a.L)(l.amount);t&&!isNaN(t)&&t>0&&(e=t)}if(e&&!isNaN(e)&&e>0&&(s&&null!==c&&!isNaN(c)&&c>=0&&c<=100&&(e=e*c/100),e&&!isNaN(e)&&e>0)){let n=wprmp_public.settings.fractions_enabled;wprmp_public.settings.unit_conversion_enabled&&window.WPRecipeMaker.hasOwnProperty("conversion")&&(n=!wprmp_public.settings.hasOwnProperty(`unit_conversion_system_${i}_fractions`)||wprmp_public.settings[`unit_conversion_system_${i}_fractions`]);const a=this.format(e,n),o=s?m(i,e,l.unit):l.unit,c=r.querySelector(".wprm-recipe-ingredient-amount");if(c){c.textContent=a,t=!0;const e=r.querySelector(".wprm-recipe-ingredient-unit");e&&o&&(e.textContent=o)}else{let e=a;o&&(e=a+" "+o),r.textContent=e,t=!0}}}}if(t){let t=this.parseAdjustableShortcodes(o.name||"");const i=d["unit-system-"+e.data.currentSystem];if(s&&null!==c&&!isNaN(c)&&c>=0&&c<=100){let r=null;if(i)if(i.amountParsed&&!isNaN(i.amountParsed)&&i.amountParsed>0)r=i.amountParsed;else if(i.amount){const e=(0,a.L)(i.amount);e&&!isNaN(e)&&e>0&&(r=e)}if(r&&!isNaN(r)&&r>0){t=p(r*c/100,o.name||"",e.data.currentSystem)}}else t=this.parseAdjustableShortcodes(i&&i.needsNameChange?i.name:o.name);if(r){const e=!!n.dataset.hasOwnProperty("notesSeparator")&&n.dataset.notesSeparator;if(!1!==e){let i=r;switch(i.startsWith("(")&&i.endsWith(")")&&(i=i.substring(1,i.length-1)),e){case"comma":t+=", "+i;break;case"dash":t+=" - "+i;break;case"parentheses":t+=" ("+i+")";break;default:t+=" "+i}}}n.dataset.hasOwnProperty("separator")&&(t+=n.dataset.separator);const l=n.querySelector(".wprm-recipe-ingredient-name");if(l)this.setIngredientNameHtml(l,t);else{const e=Array.from(n.childNodes).filter((e=>Node.TEXT_NODE===e.nodeType));if(0<e.length){e[e.length-1].textContent="",this.appendHtml(n," "+t)}else t&&this.appendHtml(n," "+t)}continue}}else if(!s&&f){const t=[];for(let e of l){const r=d["unit-system-"+e];if(r&&r.amount){let e=r.amount;r.unit&&(e+=" "+r.unit),t.push(e)}}let r=this.parseAdjustableShortcodes(o.name||"");const a=d["unit-system-"+e.data.currentSystem];if(a&&a.needsNameChange&&(r=this.parseAdjustableShortcodes(a.name)),t.length>0){const e=g(n),a=w(n);let s=t.filter((e=>!!e));!e&&1<s.length&&s.every((e=>s[0]===e))&&(s=[s[0]]);let o=s.join(" ");1<s.length&&("parentheses"===a?o=s[0]+" ("+s.slice(1).join(" ")+")":"slash"===a&&(o=s[0]+" / "+s.slice(1).join(" "))),i=o+(r?" "+r:"")}}else if(s||f){if(s&&null!==c&&!isNaN(c)&&c>=0&&c<=100&&f){const t=[];for(let e of l){const r=d["unit-system-"+e];if(r&&r.amountParsed&&!isNaN(r.amountParsed)&&r.amountParsed>0){const i=r.amountParsed*c/100;if(i&&!isNaN(i)){let n=wprmp_public.settings.fractions_enabled;wprmp_public.settings.unit_conversion_enabled&&window.WPRecipeMaker.hasOwnProperty("conversion")&&(n=!wprmp_public.settings.hasOwnProperty(`unit_conversion_system_${e}_fractions`)||wprmp_public.settings[`unit_conversion_system_${e}_fractions`]);const a=this.format(i,n),s=m(e,i,r.unit),o=s?a+" "+s:a;t.push(o)}}}let r=this.parseAdjustableShortcodes(o.name||"");const s=d["unit-system-"+e.data.currentSystem];if(s){let t=null;if(s.amountParsed&&!isNaN(s.amountParsed)&&s.amountParsed>0)t=s.amountParsed;else if(s.amount){const e=(0,a.L)(s.amount);e&&!isNaN(e)&&e>0&&(t=e)}if(t&&!isNaN(t)&&t>0){r=p(t*c/100,r,e.data.currentSystem)}}if(t.length>0){const e=g(n),a=w(n);let s=t.filter((e=>!!e));!e&&1<s.length&&s.every((e=>s[0]===e))&&(s=[s[0]]);let o=s.join(" ");1<s.length&&("parentheses"===a?o=s[0]+" ("+s.slice(1).join(" ")+")":"slash"===a&&(o=s[0]+" / "+s.slice(1).join(" "))),i=o+(r?" "+r:"")}}else if(s&&null!==c&&!isNaN(c)&&c>=0&&c<=100){const t=e.data.hasOwnProperty("currentSystem")?e.data.currentSystem:1,r=d["unit-system-"+t];if(r&&r.amountParsed&&!isNaN(r.amountParsed)&&r.amountParsed>0){const e=r.amountParsed*c/100;if(e&&!isNaN(e)){let n=wprmp_public.settings.fractions_enabled;wprmp_public.settings.unit_conversion_enabled&&window.WPRecipeMaker.hasOwnProperty("conversion")&&(n=!wprmp_public.settings.hasOwnProperty(`unit_conversion_system_${t}_fractions`)||wprmp_public.settings[`unit_conversion_system_${t}_fractions`]);const a=this.format(e,n),s=p(e,o.name||"",t),c=m(t,e,r.unit),d=[a];c&&d.push(c),s&&d.push(s),i=d.join(" ")}}}}else{const t=e.data.hasOwnProperty("currentSystem")?e.data.currentSystem:1,r=d["unit-system-"+t],n=[];if(r){r.amount&&n.push(r.amount),r.unit&&n.push(r.unit);const e=this.parseAdjustableShortcodes(r.needsNameChange?r.name:o.name);e&&n.push(e)}n.length>0&&(i=n.join(" "))}if(r){const e=!!n.dataset.hasOwnProperty("notesSeparator")&&n.dataset.notesSeparator;if(!1!==e)switch(r.startsWith("(")&&r.endsWith(")")&&(r=r.substring(1,r.length-1)),e){case"comma":i+=", "+r;break;case"dash":i+=" - "+r;break;case"parentheses":i+=" ("+r+")";break;default:i+=" "+r}}n.dataset.hasOwnProperty("separator")&&(i+=n.dataset.separator),0===y.length&&(n.innerHTML=i)}}}}window.WPRecipeMaker.quantities.findAdjustables(e)},findIngredientsElements(e){let t=[];for(let n=0;n<e.data.ingredients.length;n++){const r=e.data.ingredients[n];for(let t of Object.keys(r.unit_systems)){const i=r.unit_systems[t],a=window.WPRecipeMaker.managerPremiumIngredients.parseAmountString(i.amount,e.data.originalServingsParsed);e.data.ingredients[n].unit_systems[t]={...e.data.ingredients[n].unit_systems[t],...a}}t[n]=[]}const r=e.data.hasOwnProperty("overrideContainerId")&&!1!==e.data.overrideContainerId?e.data.overrideContainerId:e.id,i=document.querySelectorAll(`#wprm-recipe-container-${r}, .wprm-recipe-roundup-item-${r}, .wprm-print-recipe-${r}, .wprm-recipe-${r}-ingredients-container, .wprm-recipe-${r}-instructions-container, .wprm-cook-mode-${r}`);for(let n of i){const r=[".wprm-recipe-ingredient",".wprm-cook-mode-ingredient"],i=n.querySelectorAll(r.join(","));for(let n=0;n<i.length;n++){const s=i[n];if(!s.dataset.hasOwnProperty("wprmParsed")){let i={elem:s,showingBothUnitSystems:!1,amounts:[],units:[],name:!1,notes:!1};s.querySelector(".wprm-recipe-ingredient-unit-system")&&(i.showingBothUnitSystems=!0);const o=s.querySelectorAll(r.map((e=>e+"-amount")).join(","));for(let t of o)i.amounts.push({elem:t,original:t.innerHTML,unitQuantity:(0,a.L)(t.innerText)/e.data.originalServingsParsed});const c=s.querySelectorAll(r.map((e=>e+"-unit")).join(","));for(let e of c)i.units.push({elem:e,original:e.innerHTML});const d=s.querySelector(r.map((e=>e+"-name")).join(","));d&&(i.name={elem:d,original:d.innerHTML});const p=s.querySelector(r.map((e=>e+"-notes")).join(","));p&&(i.notes={elem:p,original:p.innerHTML}),s.dataset.wprmParsed=!0,t.hasOwnProperty(n)&&t[n].push(i)}}}window.WPRecipeMaker.manager.changeRecipeData(e.id,{ingredientsElements:t})},parseAmountString(e,t){e=(e=(e=e.replace(/&quot;/g,'"')).replace(/&#39;/g,"'")).replace(/&amp;/g,"&");let r=!1;if(/^\.\d+\s*$/.test(e))r=[e];else{const t="¼½¾⅐⅑⅒⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞",i="[\\d"+t+"]([\\d"+t+".,\\/\\s]*[\\d"+t+"])?",n=e.match(new RegExp(i,"g"));n&&(r=n)}let i=[];if(r){for(let n=0;n<r.length;n++){const s=r[n];e=e.replace(s,"%wprmtemporaryplaceholder%");const o=(0,a.L)(s);i.push({number:s,numberParsed:o,numberUnitQuantity:o/t})}for(let t=0;t<r.length;t++)e=e.replace("%wprmtemporaryplaceholder%",`%wprm${t}%`)}return{amountString:e,amountParts:i}},format:(e,t=!0)=>(0,a.V)(e,wprmp_public.settings.adjustable_servings_round_to_decimals,t)},function(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}((()=>{window.WPRecipeMaker.managerPremiumIngredients.load()})),window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.managerPremium={loadRecipeObject:(e,t)=>({...t,data:{...t.data},addRating:t=>(window.WPRecipeMaker.hasOwnProperty("analytics")&&window.WPRecipeMaker.analytics.registerAction(e,wprm_public.post_id,"user-rating",{rating:t.rating}),window.WPRecipeMaker.userRating.addRatingForRecipe(t,e).then((t=>!1!==t&&(window.WPRecipeMaker.manager.changeRecipeData(e,{rating:t}),window.WPRecipeMaker.manager.triggerChangeEvent(e,"rating"),!0)))),setServings:(r,i=!1)=>{const n=(0,a.L)(r),s=wprmp_public.settings.servings_display_fractions||!1,o=(0,a.V)(n,wprmp_public.settings.adjustable_servings_round_to_decimals,s),c=n/t.data.originalServingsParsed;window.WPRecipeMaker.manager.changeRecipeData(e,{currentServings:r,currentServingsParsed:n,currentServingsFormatted:o,currentServingsMultiplier:c,overrideContainerId:i}),window.WPRecipeMaker.manager.triggerChangeEvent(e,"servings")},setAdvancedServings:t=>{window.WPRecipeMaker.manager.getRecipe(e).then((r=>{if(t.hasOwnProperty("unit")&&t.unit!==r.data.currentAdvancedServings.unit){const e=2.54,i="cm"===t.unit?e:1/e;"?"!==r.data.currentAdvancedServings.diameter&&(t.diameter=Math.round(r.data.currentAdvancedServings.diameter*i)),"?"!==r.data.currentAdvancedServings.width&&(t.width=Math.round(r.data.currentAdvancedServings.width*i)),"?"!==r.data.currentAdvancedServings.length&&(t.length=Math.round(r.data.currentAdvancedServings.length*i)),"?"!==r.data.currentAdvancedServings.height&&(t.height=Math.round(r.data.currentAdvancedServings.height*i))}window.WPRecipeMaker.manager.changeRecipeData(e,{currentAdvancedServings:{...r.data.currentAdvancedServings,...t}}),window.WPRecipeMaker.manager.triggerChangeEvent(e,"advancedServings")}))},setUnitSystem:r=>{r=parseInt(r),t.data.unitSystems.includes(r)&&(window.WPRecipeMaker.manager.changeRecipeData(e,{currentSystem:r}),window.WPRecipeMaker.manager.triggerChangeEvent(e,"unitSystem"))}})};r(4096),r(5095),r(9055);var s=r(942);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.quantities={load(){if(document.addEventListener("input",(function(e){e.target.matches("input.wprm-recipe-servings")&&WPRecipeMaker.quantities.inputChange(e.target)}),!1),document.addEventListener("change",(function(e){e.target.matches("input.wprm-recipe-servings")&&WPRecipeMaker.quantities.inputChange(e.target)}),!1),document.addEventListener("click",(function(e){e.target.matches(".wprm-recipe-servings-change")&&WPRecipeMaker.quantities.changeClick(e.target),e.target.matches(".wprm-recipe-adjustable-servings")&&WPRecipeMaker.quantities.multiplierClick(e.target)}),!1),document.addEventListener("keypress",(function(e){if(e.target.matches(".wprm-recipe-servings-change")){const t=e.which||e.keyCode||0;13!==t&&32!==t||(WPRecipeMaker.quantities.changeClick(e.target),e.preventDefault())}}),!1),document.addEventListener("wprm-recipe-change",(e=>{"servings"===e.detail.type&&window.WPRecipeMaker.manager.getRecipe(e.detail.id).then((e=>{e&&(WPRecipeMaker.quantities.updateServingsDisplay(e),WPRecipeMaker.quantities.updateAdjustables(e),document.dispatchEvent(new CustomEvent("wprmAdjustedServings",{detail:e.id})))})),"unitSystem"===e.detail.type&&window.WPRecipeMaker.manager.getRecipe(e.detail.id).then((e=>{e&&WPRecipeMaker.quantities.updateAdjustables(e)}))})),window.WPRecipeMaker.quantities.init(),wprmp_public.settings.adjustable_servings_url){const e=wprmp_public.settings.adjustable_servings_url_param;if(e){const t=new URLSearchParams(window.location.search),r=parseFloat(t.get(e));if(!isNaN(r)&&0<r){const e=window.WPRecipeMaker.manager.findRecipesOnPage();for(let t of e)window.WPRecipeMaker.manager.getRecipe(t).then((e=>{e.setServings(r)}))}}}},init(){const e=document.querySelectorAll(".wprm-recipe-servings");for(let t of e)if(!t.dataset.hasOwnProperty("servings")){const e=this.parse(t.innerText);0<e&&(t.dataset.servings=e,t.dataset.originalServings=e,document.querySelector("body").classList.contains("wprm-print")||("modern"===wprmp_public.settings.recipe_template_mode?t.classList.contains("wprm-recipe-servings-adjustable-tooltip")?this.initTooltipSlider(t):t.classList.contains("wprm-recipe-servings-adjustable-text")?this.initTextInput(t):t.classList.contains("wprm-recipe-servings-adjustable-text-buttons")&&this.initTextButtonsInput(t):wprmp_public.settings.features_adjustable_servings&&("text_field"===wprmp_public.settings.servings_changer_display?this.initTextInput(t):this.initTooltipSlider(t))))}},getRecipeIdFromElem(e){let t=e.dataset.recipe;if(!t)for(var r=e.parentNode;r&&r!=document;r=r.parentNode)if(r.matches(".wprm-recipe-container")){t=r.dataset.recipeId;break}return t},initTextInput(e){let t=e.dataset.servings,r=this.getRecipeIdFromElem(e),i=e.getAttribute("aria-label");if(r){const n='<input type="number" class="wprm-recipe-servings wprm-recipe-servings-'+r+'" min="0" step="any" value="'+t+'" data-recipe="'+r+'" aria-label="'+i+'" />';e.outerHTML=n}},initTextButtonsInput(e){let t=e.dataset.servings,r=this.getRecipeIdFromElem(e),i=e.getAttribute("aria-label");if(r){let n="";n+="background-color: "+e.dataset.buttonBackground+";",n+="border-color: "+e.dataset.buttonBackground+";",n+="color: "+e.dataset.buttonAccent+";",n+="border-radius: "+e.dataset.buttonRadius+";";let a="";a+="border-color: "+e.dataset.buttonBackground+";";const o='<span class="wprm-recipe-servings-decrement wprm-recipe-servings-change" style="'+n+'" role="button" tabindex="0" aria-label="'+(0,s.f)("Decrease serving size by 1")+'">–</span>',c='<input type="text" class="wprm-recipe-servings wprm-recipe-servings-'+r+'" min="0" step="any" value="'+t+'" data-recipe="'+r+'" aria-label="'+i+'" style="'+a+'"/>',d='<span class="wprm-recipe-servings-increment wprm-recipe-servings-change" style="'+n+'" role="button" tabindex="0" aria-label="'+(0,s.f)("Increase serving size by 1")+'">+</span>';e.outerHTML='<span class="wprm-recipe-servings-text-buttons-container">'+o+c+d+"</span>"}},initTooltipSlider(e){let t=this.getRecipeIdFromElem(e),r=e.getAttribute("aria-label");if(t){let i=document.createElement("a");i.href="#",i.classList.add("wprm-recipe-servings-link"),i.setAttribute("aria-label",r),e.parentNode.insertBefore(i,e),i.appendChild(e);const a=(0,n.Ay)(i,{theme:"wprm",content:"",onShow(e){window.WPRecipeMaker.manager.getRecipe(t).then((i=>{if(!i)return!1;{const n=i.data.currentServingsParsed,a=20<2*n?2*n:20,s=function(e){const t=e.toString().split(".");return t.length>1?t[1].length:0}(n),o=1/Math.pow(10,s);e.setContent(`<input id="wprm-recipe-servings-slider-input" type="range" min="1" max="${a}" step="${o}" value="${n}" data-recipe="${t}" class="wprm-recipe-servings-slider wprm-recipe-servings-${t}" aria-label="${r}" oninput="WPRecipeMaker.quantities.inputChange(this)" onchange="WPRecipeMaker.quantities.inputChange(this)"></input>`)}}))},allowHTML:!0,interactive:!0,delay:[0,250]});i.onclick=e=>{e.preventDefault(),a.show(),setTimeout((()=>{const e=document.getElementById("wprm-recipe-servings-slider-input");e&&e.focus()}),250)}}},inputChange(e){let t=e.value,r=e.dataset.recipe;if(t){const i=e.classList.contains("wprm-recipe-servings-slider")?"slider":"input";window.WPRecipeMaker.analytics.registerActionOnce(r,wprm_public.post_id,"adjust-servings",{type:i}),this.setServings(r,t)}},changeClick(e){const t=e.closest(".wprm-recipe-servings-text-buttons-container");if(t){const r=t.querySelector("input"),i=this.parse(r.value);let n=i;e.classList.contains("wprm-recipe-servings-decrement")&&i>1?n--:e.classList.contains("wprm-recipe-servings-increment")&&n++,n!==i&&(r.value=n,this.inputChange(r))}},multiplierClick(e){if(!e.classList.contains("wprm-toggle-active")||"?"===e.dataset.multiplier){const t=e.dataset.multiplier,r=e.dataset.recipe,i=e.dataset.servings;let n=!1;"?"===t?(n=prompt(e.getAttribute("aria-label")),n&&(n=this.parse(n))):n=this.parse(i)*this.parse(t),n&&(window.WPRecipeMaker.analytics.registerActionOnce(r,wprm_public.post_id,"adjust-servings",{type:"button"}),this.setServings(r,n))}},setServings(e,t){window.WPRecipeMaker.manager.getRecipe(e).then((e=>{e&&e.setServings(t)}))},updateServingsDisplay(e){const t=e.data.hasOwnProperty("overrideContainerId")&&!1!==e.data.overrideContainerId?e.data.overrideContainerId:e.id,r=document.querySelectorAll(".wprm-recipe-servings-"+t);for(let n of r)n.textContent=e.data.currentServingsFormatted,n.dataset.servings=e.data.currentServingsParsed,"input"===n.tagName.toLowerCase()&&("string"==typeof e.data.currentServings||e.data.currentServings instanceof String)?n.value=e.data.currentServings:n.value=e.data.currentServingsParsed;const i=document.querySelectorAll(".wprm-recipe-adjustable-servings-"+t+"-container");for(let n of i){const t=n.querySelectorAll(".wprm-recipe-adjustable-servings");let r=!1;for(let i of t)i.classList.remove("wprm-toggle-active"),(0,a.L)(i.dataset.multiplier)===e.data.currentServingsMultiplier?(r=!0,i.classList.add("wprm-toggle-active")):"?"!==i.dataset.multiplier||r||i.classList.add("wprm-toggle-active")}},updateAdjustables(e){e.data.hasOwnProperty("adjustables")||window.WPRecipeMaker.quantities.findAdjustables(e);for(let t of e.data.adjustables)if(e.data.currentServingsParsed===e.data.originalServingsParsed)t.elem.textContent=t.original;else{const r=e.data.currentServingsParsed*t.unitQuantity;if(!isNaN(r)){let i=!0;if(wprmp_public.settings.unit_conversion_enabled&&window.WPRecipeMaker.hasOwnProperty("conversion")){const t=e.data.hasOwnProperty("currentSystem")?e.data.currentSystem:1;i=!wprmp_public.settings.hasOwnProperty(`unit_conversion_system_${t}_fractions`)||wprmp_public.settings[`unit_conversion_system_${t}_fractions`]}t.elem.textContent=this.format(r,i)}}},findAdjustables(e){let t=e.data.hasOwnProperty("adjustables")?e.data.adjustables:[];for(let i=t.length-1;i>=0;i--)document.body.contains(t[i].elem)||t.splice(i,1);const r=document.querySelectorAll(`#wprm-recipe-container-${e.id}, .wprm-recipe-roundup-item-${e.id}, .wprm-print-recipe-${e.id}, .wprm-recipe-${e.id}-ingredients-container, .wprm-recipe-${e.id}-instructions-container, .wprm-cook-mode-${e.id}`);for(let i of r){const r=i.querySelectorAll(".wprm-dynamic-quantity");for(let e of r)if(0===e.querySelectorAll(".wprm-adjustable").length){let t=e.innerText;if(/^\.\d+\s*$/.test(t))e.innerHTML='<span class="wprm-adjustable">'+t+"</span>";else{const r="¼½¾⅐⅑⅒⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞",i="[\\d"+r+"]([\\d"+r+".,\\/\\s]*[\\d"+r+"])?",n='<span class="wprm-adjustable">$&</span>';t=t.replace(new RegExp(i,"g"),n),e.innerHTML=t}}const n=i.querySelectorAll(".wpurp-adjustable-quantity");for(let e of n)e.classList.add("wprm-adjustable");const s=i.querySelectorAll(".wprm-adjustable");for(let i of s)-1===t.findIndex((e=>e.elem===i))&&t.push({elem:i,original:i.innerText,unitQuantity:(0,a.L)(i.innerText)/e.data.originalServingsParsed})}window.WPRecipeMaker.manager.changeRecipeData(e.id,{adjustables:t})},parse:e=>(0,a.L)(e),format:(e,t=!0)=>(0,a.V)(e,wprmp_public.settings.adjustable_servings_round_to_decimals,t)},function(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}((()=>{window.WPRecipeMaker.quantities.load()})),window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.shareOptionsPopup={init:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-recipe-share-options-popup")){window.WPRecipeMaker.shareOptionsPopup.click(t,e);break}}),!1)},click:(e,t)=>{t.preventDefault();const r=e._tippy;r&&r.destroy();const i=e.previousElementSibling;if(i&&i.classList&&i.classList.contains("wprm-recipe-share-options-popup-container")){e.role="button";let t="#333333";i.dataset.hasOwnProperty("color")&&(t=i.dataset.color),(0,n.Ay)(e,{theme:"wprm-variable",content:i.innerHTML,allowHTML:!0,interactive:!0,trigger:"click",onMount(e){e.popper.querySelector(".tippy-box").style.setProperty("--wprm-tippy-background",t)},onCreate(e){e.show()}})}}},function(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}((()=>{window.WPRecipeMaker.shareOptionsPopup.init()})),window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.timer={cookModeTimers:new Map,cookModeTimerId:0,runningTimer:!1,runningTotal:0,runningRemaining:0,lastUpdated:0,init:()=>{const e=document.querySelector("body");e&&e.classList.contains("wprm-print")||window.WPRecipeMaker.timer.bindTimers()},bindTimers:(e=document)=>{if(!e||!e.querySelectorAll)return;const t=e.querySelectorAll(".wprm-timer");for(const r of t){const e=parseFloat(r.dataset.seconds);if(!e||e<=0)continue;let t=r.parentNode;t&&t.classList&&t.classList.contains("wprm-timer-link")||(t=document.createElement("a"),t.href="#",t.classList.add("wprm-timer-link"),r.parentNode&&r.parentNode.insertBefore(t,r),t.appendChild(r),(0,n.Ay)(t,{theme:"wprm",content:wprmp_public.timer.text.start_timer})),t.dataset.timerBound||(t.dataset.timerBound="1",t.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation();const i=r.closest(".wprm-cook-mode"),n=i?i.closest(".wprm-popup-modal"):null,a=r.dataset.label?r.dataset.label.trim():r.textContent.trim();window.WPRecipeMaker.timer.start(e,{context:i?"cook-mode":"global",cookModeModal:n,label:a})})))}},update:()=>{const e=Date.now()-window.WPRecipeMaker.timer.lastUpdated;window.WPRecipeMaker.timer.runningRemaining-=e,window.WPRecipeMaker.timer.lastUpdated=Date.now();const t=window.WPRecipeMaker.timer.runningTotal;let r=window.WPRecipeMaker.timer.runningRemaining;r<=0&&(r=0,window.WPRecipeMaker.timer.finished()),window.WPRecipeMaker.timer.showTime(Math.round(r/1e3));const i=t>0?100*(t-r)/t:0,n=document.querySelector("#wprm-timer-bar-elapsed");n&&(n.style.width=Math.max(0,Math.min(100,i))+"%")},start:(e,t={})=>{"cook-mode"===(t.context||"global")&&t.cookModeModal?window.WPRecipeMaker.timer.startCookModeTimer(e,t):window.WPRecipeMaker.timer.startGlobalTimer(e)},startGlobalTimer:e=>{window.WPRecipeMaker.timer.stop((()=>{window.WPRecipeMaker.timer.createContainer(),window.WPRecipeMaker.timer.runningTotal=1e3*e,window.WPRecipeMaker.timer.runningRemaining=1e3*e,window.WPRecipeMaker.timer.showTime(e),window.WPRecipeMaker.timer.play()}))},play:()=>{const e=document.querySelector("#wprm-timer-play"),t=document.querySelector("#wprm-timer-pause");e&&(e.style.display="none"),t&&(t.style.display=""),window.WPRecipeMaker.timer.interval&&clearInterval(window.WPRecipeMaker.timer.interval),window.WPRecipeMaker.timer.interval=setInterval(window.WPRecipeMaker.timer.update,1e3),window.WPRecipeMaker.timer.lastUpdated=Date.now()},pauze:()=>{const e=document.querySelector("#wprm-timer-play"),t=document.querySelector("#wprm-timer-pause");e&&(e.style.display=""),t&&(t.style.display="none"),window.WPRecipeMaker.timer.interval&&clearInterval(window.WPRecipeMaker.timer.interval)},stop:(e=!1)=>{window.WPRecipeMaker.timer.interval&&clearInterval(window.WPRecipeMaker.timer.interval);const t=document.querySelector("#wprm-timer-container");t&&t.parentNode&&t.parentNode.removeChild(t),e&&e()},finished:()=>{window.WPRecipeMaker.timer.pauze();try{new Audio(wprmp_public.timer.sound_file).play()}catch(t){}const e=document.querySelector("#wprm-timer-container");e&&e.classList.add("wprm-timer-finished")},createContainer:()=>{const e=document.createElement("div");e.id="wprm-timer-container",e.innerHTML='<span id="wprm-timer-play" class="wprm-timer-icon" onclick="window.WPRecipeMaker.timer.play()">'+wprmp_public.timer.icons.play+"</span>",e.innerHTML+='<span id="wprm-timer-pause" class="wprm-timer-icon" onclick="window.WPRecipeMaker.timer.pauze()">'+wprmp_public.timer.icons.pause+"</span>",e.innerHTML+='<span id="wprm-timer-remaining"></span>',e.innerHTML+='<span id="wprm-timer-bar-container"><span id="wprm-timer-bar"><span id="wprm-timer-bar-elapsed"></span></span></span>',e.innerHTML+='<span id="wprm-timer-close" class="wprm-timer-icon" onclick="window.WPRecipeMaker.timer.stop()">'+wprmp_public.timer.icons.close+"</span>",document.querySelector("body").appendChild(e)},showTime:e=>{const t=document.querySelector("#wprm-timer-remaining");t&&(t.textContent=window.WPRecipeMaker.timer.formatTime(e))},formatTime:e=>{let t=Math.max(0,parseInt(e,10)||0);const r=Math.floor(t/3600);t-=3600*r;const i=Math.floor(t/60);t-=60*i;const n=e=>e<10?"0"+e:""+e;return r>0?n(r)+":"+n(i)+":"+n(t):n(i)+":"+n(t)},startCookModeTimer:(e,t={})=>{const r=t.cookModeModal;if(!r||!r.querySelector)return void window.WPRecipeMaker.timer.startGlobalTimer(e);const i=r.querySelector(".wprm-cook-mode-timers");if(!i)return void window.WPRecipeMaker.timer.startGlobalTimer(e);const n=t.label&&t.label.length?t.label:wprmp_public.timer.text.start_timer,a="cook-mode-timer-"+ ++window.WPRecipeMaker.timer.cookModeTimerId,s=1e3*e,o={id:a,total:s,remaining:s,lastUpdated:Date.now(),interval:null,label:n,cookModeModal:r,finished:!1,alarmPlayed:!1};o.elements=window.WPRecipeMaker.timer.createCookModeTimerElement(o),i.appendChild(o.elements.container),window.WPRecipeMaker.timer.cookModeTimers.set(a,o),window.WPRecipeMaker.timer.updateCookModeTimerDisplay(o),window.WPRecipeMaker.timer.playCookModeTimer(a)},createCookModeTimerElement:e=>{const t=document.createElement("div");t.className="wprm-cook-mode-timer",t.dataset.timerId=e.id;const r=document.createElement("div");r.className="wprm-cook-mode-timer-top";const i=document.createElement("span");i.className="wprm-cook-mode-timer-label",i.textContent=e.label,r.appendChild(i);const n=document.createElement("span");n.className="wprm-cook-mode-timer-remaining",r.appendChild(n);const a=document.createElement("div");a.className="wprm-cook-mode-timer-controls";const s=wprmp_public.timer.text.start_timer||"Start timer",o=document.createElement("button");o.type="button",o.className="wprm-cook-mode-timer-button wprm-cook-mode-timer-play",o.innerHTML=wprmp_public.timer.icons.play,o.setAttribute("aria-label",s),o.setAttribute("title",s),o.addEventListener("click",(t=>{t.preventDefault(),window.WPRecipeMaker.timer.playCookModeTimer(e.id)})),a.appendChild(o);const c=document.createElement("button");c.type="button",c.className="wprm-cook-mode-timer-button wprm-cook-mode-timer-pause",c.innerHTML=wprmp_public.timer.icons.pause,c.setAttribute("aria-label","Pause timer"),c.setAttribute("title","Pause timer"),c.addEventListener("click",(t=>{t.preventDefault(),window.WPRecipeMaker.timer.pauseCookModeTimer(e.id)})),a.appendChild(c);const d=document.createElement("button");d.type="button",d.className="wprm-cook-mode-timer-button wprm-cook-mode-timer-close",d.innerHTML=wprmp_public.timer.icons.close,d.setAttribute("aria-label","Remove timer"),d.setAttribute("title","Remove timer"),d.addEventListener("click",(t=>{t.preventDefault(),window.WPRecipeMaker.timer.stopCookModeTimer(e.id)})),a.appendChild(d),r.appendChild(a),t.appendChild(r);const p=document.createElement("div");p.className="wprm-cook-mode-timer-bar";const l=document.createElement("div");return l.className="wprm-cook-mode-timer-bar-fill",p.appendChild(l),t.appendChild(p),c.style.display="none",{container:t,remaining:n,bar:l,playButton:o,pauseButton:c,closeButton:d}},updateCookModeTimerDisplay:e=>{if(!e||!e.elements)return;const t=window.WPRecipeMaker.timer.formatTime(Math.round(e.remaining/1e3));if(e.elements.remaining&&(e.elements.remaining.textContent=t),e.elements.bar){const t=e.total>0?(e.total-e.remaining)/e.total*100:0;e.elements.bar.style.width=Math.max(0,Math.min(100,t))+"%"}},playCookModeTimer:e=>{const t=window.WPRecipeMaker.timer.cookModeTimers.get(e);t&&t.elements&&(t.interval&&clearInterval(t.interval),(t.remaining<=0||t.finished)&&(t.remaining=t.total,t.finished=!1,t.alarmPlayed=!1,t.elements.container&&t.elements.container.classList.remove("wprm-cook-mode-timer-finished")),t.elements.playButton&&(t.elements.playButton.style.display="none"),t.elements.pauseButton&&(t.elements.pauseButton.style.display=""),t.lastUpdated=Date.now(),t.interval=setInterval((()=>{window.WPRecipeMaker.timer.updateCookModeTimer(e)}),1e3),window.WPRecipeMaker.timer.updateCookModeTimerDisplay(t))},pauseCookModeTimer:e=>{const t=window.WPRecipeMaker.timer.cookModeTimers.get(e);t&&t.elements&&(t.interval&&(clearInterval(t.interval),t.interval=null),t.elements.playButton&&(t.elements.playButton.style.display=""),t.elements.pauseButton&&(t.elements.pauseButton.style.display="none"))},stopCookModeTimer:e=>{const t=window.WPRecipeMaker.timer.cookModeTimers.get(e);t&&(window.WPRecipeMaker.timer.pauseCookModeTimer(e),t.elements&&t.elements.container&&t.elements.container.parentNode&&t.elements.container.parentNode.removeChild(t.elements.container),window.WPRecipeMaker.timer.cookModeTimers.delete(e))},updateCookModeTimer:e=>{const t=window.WPRecipeMaker.timer.cookModeTimers.get(e);if(!t)return;const r=Date.now()-t.lastUpdated;t.remaining-=r,t.lastUpdated=Date.now(),t.remaining<=0&&(t.remaining=0,window.WPRecipeMaker.timer.finishCookModeTimer(e)),window.WPRecipeMaker.timer.updateCookModeTimerDisplay(t)},finishCookModeTimer:e=>{const t=window.WPRecipeMaker.timer.cookModeTimers.get(e);if(t&&(window.WPRecipeMaker.timer.pauseCookModeTimer(e),t.finished=!0,t.elements&&t.elements.container&&t.elements.container.classList.add("wprm-cook-mode-timer-finished"),!t.alarmPlayed)){try{new Audio(wprmp_public.timer.sound_file).play()}catch(r){}t.alarmPlayed=!0}},clearCookModeTimers:(e=null)=>{const t=[];window.WPRecipeMaker.timer.cookModeTimers.forEach(((r,i)=>{e&&r.cookModeModal!==e||t.push(i)})),t.forEach((e=>window.WPRecipeMaker.timer.stopCookModeTimer(e)))}},function(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}((()=>{window.WPRecipeMaker.timer.init()}));r(2359);var o=r(5266);window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.userRating={init(){document.addEventListener("wprm-recipe-change",(e=>{if("rating"===e.detail.type){const t=e.detail.id;window.WPRecipeMaker.manager.getRecipe(t).then((e=>{e&&window.WPRecipeMaker.userRating.updateRatingDisplay(t,e.data.rating)}))}}))},settings:{color:wprmp_public.settings.template_color_icon},enter(e){e.parentNode.classList.add("wprm-user-rating-voting");let t=window.WPRecipeMaker.userRating.settings.color;"modern"===wprmp_public.settings.recipe_template_mode&&e.dataset.color&&(t=e.dataset.color);let r=e;for(;r;){r.classList.add("wprm-rating-star-selecting-filled");const e=r.querySelectorAll("polygon, path");for(let r of e)r.style.fill=t;r=r.previousSibling}let i=e.nextSibling;for(;i;){i.classList.add("wprm-rating-star-selecting-empty");const e=i.querySelectorAll("polygon, path");for(let t of e)t.style.fill="none";i=i.nextSibling}},leave(e){e.parentNode.classList.remove("wprm-user-rating-voting");let t=e.parentNode.firstChild;for(;t;){t.classList.remove("wprm-rating-star-selecting-filled"),t.classList.remove("wprm-rating-star-selecting-empty");const e=t.querySelectorAll("polygon, path");for(let t of e)t.style.fill="";t=t.nextSibling}},click(e,t){const r=t.which||t.keyCode||0;if("click"===t.type||13===r||32===r){t.preventDefault();const r=e.parentNode;let n=parseInt(e.dataset.rating),a=parseInt(r.dataset.recipe);if(!a)for(var i=e.parentNode;i&&i!=document;i=i.parentNode)if(i.matches(".wprm-recipe-container")){a=parseInt(i.dataset.recipeId);break}if("scroll"===wprmp_public.settings.user_ratings_type&&window.WPRecipeMaker.userRating.canJumpToComments()){const e=r.closest(".wprm-popup-modal"),t=window.WPRecipeMaker.modal&&window.WPRecipeMaker.modal.currentOpenUid;if(e&&t){const e=()=>{window.WPRecipeMaker.userRating.jumpToCommentRating(n)};document.addEventListener("wprm-modal-close",(function t(){document.removeEventListener("wprm-modal-close",t),e()})),window.WPRecipeMaker.modal.close(t)}else window.WPRecipeMaker.userRating.jumpToCommentRating(n)}else{const e=r.dataset.modalUid;window.WPRecipeMaker.modal.open(e,{recipe:a,rating:n})}}},updateRatingDisplay(e,t){const r=document.querySelectorAll(".wprm-recipe-rating-recipe-"+e);for(let i of r){let e=i.dataset.hasOwnProperty("decimals")?parseInt(i.dataset.decimals):2;e=0<=e?e:2,t.roundedAverage=Number(t.average.toFixed(e)),t.formattedAverage=(0,a.V)(t.average,e);const r=i.querySelector(".wprm-recipe-rating-details");if(r)r.innerHTML=window.WPRecipeMaker.userRating.getRatingDetailsText(t);else{const e=i.querySelector(".wprm-recipe-rating-average"),r=i.querySelector(".wprm-recipe-rating-count");e&&(e.innerText=t.formattedAverage),r&&(r.innerText=t.count)}const n=t.roundedAverage;for(let t=1;t<=5;t++){let e=i.querySelector(".wprm-rating-star-"+t);if(e)if(e.classList.remove("wprm-rating-star-full"),e.classList.remove("wprm-rating-star-empty"),e.classList.remove("wprm-rating-star-33"),e.classList.remove("wprm-rating-star-50"),e.classList.remove("wprm-rating-star-66"),t<=n)e.classList.add("wprm-rating-star-full");else{const r=0+n-t+1;0<r&&r<=.33?e.classList.add("wprm-rating-star-33"):0<r&&r<=.5?e.classList.add("wprm-rating-star-50"):0<r&&r<=.66?e.classList.add("wprm-rating-star-66"):0<r&&r<=1?e.classList.add("wprm-rating-star-full"):e.classList.add("wprm-rating-star-empty")}}i.classList.contains("wprm-user-rating")&&(0<t.user?(i.classList.remove("wprm-user-rating-not-voted"),i.classList.add("wprm-user-rating-has-voted")):(i.classList.add("wprm-user-rating-not-voted"),i.classList.remove("wprm-user-rating-has-voted")))}},getRatingDetailsText(e){let t="",r="";if(r=0===e.count?wprmp_public.settings.rating_details_zero:1===e.count?wprmp_public.settings.rating_details_one:wprmp_public.settings.rating_details_multiple,0<e.user){const e=wprmp_public.settings.rating_details_user_voted;r=r.replace("%not_voted%",""),r=r.replace("%voted%",e)}else{const e=wprmp_public.settings.rating_details_user_not_voted;r=r.replace("%voted%",""),r=r.replace("%not_voted%",e)}return r=r.replace("%average%",'<span class="wprm-recipe-rating-average">'+e.formattedAverage+"</span>"),r=r.replace("%votes%",'<span class="wprm-recipe-rating-count">'+e.count+"</span>"),r=r.replace("%user%",'<span class="wprm-recipe-rating-user">'+e.user+"</span>"),t=r.trim(),t},addRatingForRecipe(e,t){let r={Accept:"application/json","Content-Type":"application/json"};return 0<parseInt(wprmp_public.user)&&(r["X-WP-Nonce"]=wprm_public.api_nonce),fetch(`${wprmp_public.endpoints.user_rating}/${t}`,{method:"POST",headers:r,credentials:"same-origin",body:JSON.stringify({data:e})}).then((r=>r.ok?r.json():window.WPRecipeMaker.userRating.addRatingForRecipeThroughAjax(e,t))).then((e=>e))},addRatingForRecipeThroughAjax:(e,t)=>fetch(wprm_public.ajax_url,{method:"POST",credentials:"same-origin",body:"action=wprm_user_rate_recipe&security="+encodeURIComponent(wprm_public.nonce)+"&recipe_id="+encodeURIComponent(t)+"&data="+encodeURIComponent(JSON.stringify(e)),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded; charset=utf-8"}}).then((e=>!!e.ok&&e.json())).then((e=>!!e.success&&e.data)),getCommentContainerElement(){let e=[".comment-form-wprm-rating","#llc_comments"];wprmp_public.settings.user_ratings_force_comment_scroll_to&&e.unshift(wprmp_public.settings.user_ratings_force_comment_scroll_to);for(let t of e){const e=document.querySelector(t);if(e)return e}return!1},canJumpToComments:()=>!!wprmp_public.settings.features_comment_ratings&&!!window.WPRecipeMaker.userRating.getCommentContainerElement(),jumpToCommentRating(e){let t=window.WPRecipeMaker.userRating.getCommentContainerElement();if(t){const r=()=>{const t=document.querySelector(".comment-form-wprm-rating");if(t){const r=t.querySelectorAll("input");for(let t of r)if(e===parseInt(t.value)){t.click();break}}const r=document.getElementById("comment");r&&r.focus()};!!wprmp_public.settings.user_ratings_force_comment_scroll_to_smooth?(0,o.A)(t,{verticalOffset:-100,speed:250}).then(r):(t.scrollIntoView({behavior:"instant"}),r())}}},function(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}((()=>{window.WPRecipeMaker.userRating.init()}))},4123:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.checkboxes={initModern:()=>{document.addEventListener("change",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-checkbox")){window.WPRecipeMaker.checkboxes.toggle(t,e);break}}),!1)},toggle:(e,t)=>{t.preventDefault();for(var r=e.parentNode;r&&r!=document;r=r.parentNode)if(r.matches("li")){r.classList.toggle("wprm-checkbox-is-checked");break}},initLegacy:()=>{let e="";e="checkbox"==wprmp_public.settings.template_ingredient_list_style&&"checkbox"==wprmp_public.settings.template_instruction_list_style?"li.wprm-recipe-ingredient, li.wprm-recipe-instruction:not(.wprm-recipe-instruction-tip)":"checkbox"==wprmp_public.settings.template_ingredient_list_style?"li.wprm-recipe-ingredient":"li.wprm-recipe-instruction:not(.wprm-recipe-instruction-tip)";const t=document.querySelectorAll(e);for(let r of t){r.classList.add("wprm-list-checkbox-container");let e=document.createElement("span");e.classList.add("wprm-list-checkbox"),r.insertBefore(e,r.firstChild)}document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-list-checkbox")){window.WPRecipeMaker.checkboxes.click(t,e);break}}),!1)},click:(e,t)=>{t.preventDefault();for(var r=e.parentNode;r&&r!=document;r=r.parentNode)if(r.matches(".wprm-list-checkbox-container")){e.classList.toggle("wprm-list-checkbox-checked"),r.classList.toggle("wprm-list-checkbox-checked");break}}},e=()=>{"legacy"!==wprmp_public.settings.recipe_template_mode||"checkbox"!=wprmp_public.settings.template_ingredient_list_style&&"checkbox"!=wprmp_public.settings.template_instruction_list_style||window.WPRecipeMaker.checkboxes.initLegacy(),"modern"===wprmp_public.settings.recipe_template_mode&&window.WPRecipeMaker.checkboxes.initModern()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},4141:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.favorites={favorites:!1,data:!1,readyPromise:!1,renderTimeout:!1,getStorageKey:()=>wprmp_public.favorites.storage_key||"wprm-recipe-favorites",getMergeSessionKey:()=>wprmp_public.favorites.merge_session_key||`${window.WPRecipeMaker.favorites.getStorageKey()}-merged`,isLoggedIn:()=>0<parseInt(wprmp_public.user),init(){document.addEventListener("click",(function(e){for(var t=e.target;t&&t!==this;t=t.parentNode)if(t.matches(".wprm-recipe-favorite[data-recipe-id]")){window.WPRecipeMaker.favorites.onClickFavorite(t,e);break}}),!1),document.addEventListener("wprm-favorites-changed",(()=>{window.WPRecipeMaker.favorites.refreshButtons(),window.WPRecipeMaker.favorites.scheduleRenderFavoriteLists()})),window.WPRecipeMaker.favorites.ensureReady().then((()=>{window.WPRecipeMaker.favorites.refreshButtons(),window.WPRecipeMaker.favorites.renderFavoriteLists()}))},getFavoriteEntryId:e=>e&&"object"==typeof e&&e.hasOwnProperty("id")?parseInt(e.id):parseInt(e),getFavoriteEntryData(e){if(!e||"object"!=typeof e||Array.isArray(e))return{};const t=e.data&&"object"==typeof e.data&&!Array.isArray(e.data)?{...e.data}:{...e};return delete t.id,delete t.data,t},normalizeFavorites(e){if(e&&"object"==typeof e&&Array.isArray(e.favorites)&&(e=e.favorites),!Array.isArray(e))return[];const t=[];for(let r of e)r=window.WPRecipeMaker.favorites.getFavoriteEntryId(r),r&&!t.includes(r)&&t.push(r);return t},normalizeFavoritesData(e,t){if(!e||"object"!=typeof e||Array.isArray(e))return{};t=window.WPRecipeMaker.favorites.normalizeFavorites(t);const r={};return Object.keys(e).forEach((i=>{if(!(i=parseInt(i))||!t.includes(i)||!e[i]||"object"!=typeof e[i])return;const n={};e[i].hasOwnProperty("servings")&&0<=parseFloat(e[i].servings)&&(n.servings=parseFloat(e[i].servings)),Object.keys(n).length&&(r[i]=n)})),r},normalizeFavoritesStorage(e){const t=e&&"object"==typeof e&&Array.isArray(e.favorites)?e.favorites:e,r=window.WPRecipeMaker.favorites.normalizeFavorites(t),i=e&&"object"==typeof e&&e.hasOwnProperty("data")?window.WPRecipeMaker.favorites.normalizeFavoritesData(e.data,r):{};return Array.isArray(t)&&t.forEach((e=>{const t=window.WPRecipeMaker.favorites.getFavoriteEntryId(e),n=window.WPRecipeMaker.favorites.normalizeFavoritesData({[t]:window.WPRecipeMaker.favorites.getFavoriteEntryData(e)},r);t&&!i.hasOwnProperty(t)&&n.hasOwnProperty(t)&&(i[t]=n[t])})),{favorites:r,data:i}},getLocalFavoritesStorage(){try{const e=localStorage.getItem(window.WPRecipeMaker.favorites.getStorageKey());if(e)return window.WPRecipeMaker.favorites.normalizeFavoritesStorage(JSON.parse(e))}catch(e){}return{favorites:[],data:{}}},getLocalFavorites:()=>window.WPRecipeMaker.favorites.getLocalFavoritesStorage().favorites,storeFavorites(e){const t=window.WPRecipeMaker.favorites.getFavoritesStorage();t.favorites=e,window.WPRecipeMaker.favorites.storeFavoritesStorage(t)},storeFavoritesStorage(e){const t=(e=window.WPRecipeMaker.favorites.normalizeFavoritesStorage(e)).favorites.map((t=>e.data.hasOwnProperty(t)?{id:t,...e.data[t]}:t));try{localStorage.setItem(window.WPRecipeMaker.favorites.getStorageKey(),JSON.stringify(t))}catch(r){}},hasMergedThisSession(){try{return"1"===sessionStorage.getItem(window.WPRecipeMaker.favorites.getMergeSessionKey())}catch(e){return!1}},markMergedThisSession(){try{sessionStorage.setItem(window.WPRecipeMaker.favorites.getMergeSessionKey(),"1")}catch(e){}},getFavorites:()=>Array.isArray(window.WPRecipeMaker.favorites.favorites)?window.WPRecipeMaker.favorites.favorites:window.WPRecipeMaker.favorites.getLocalFavorites(),getFavoritesStorage:()=>({favorites:window.WPRecipeMaker.favorites.getFavorites(),data:window.WPRecipeMaker.favorites.data&&"object"==typeof window.WPRecipeMaker.favorites.data?window.WPRecipeMaker.favorites.data:window.WPRecipeMaker.favorites.getLocalFavoritesStorage().data}),getFavoriteData(e){if(!(e=parseInt(e)))return{};const t=window.WPRecipeMaker.favorites.getFavoritesStorage();return t.data.hasOwnProperty(e)?t.data[e]:{}},isFavorited:e=>!!(e=parseInt(e))&&window.WPRecipeMaker.favorites.getFavorites().includes(e),buildHeaders(e=!1){const t={Accept:"application/json"};return e&&(t["Content-Type"]="application/json"),window.WPRecipeMaker.favorites.isLoggedIn()&&(t["X-WP-Nonce"]=wprm_public.api_nonce),t},request(e,t="GET",r=!1){const i={method:t,headers:window.WPRecipeMaker.favorites.buildHeaders(!1!==r),credentials:"same-origin"};return!1!==r&&(i.body=JSON.stringify(r)),fetch(e,i).then((e=>!!e.ok&&e.json())).catch((()=>!1))},ensureReady:()=>(window.WPRecipeMaker.favorites.readyPromise||(window.WPRecipeMaker.favorites.readyPromise=window.WPRecipeMaker.favorites.bootstrapFavorites()),window.WPRecipeMaker.favorites.readyPromise),bootstrapFavorites:()=>new Promise((async e=>{let t=window.WPRecipeMaker.favorites.getLocalFavoritesStorage(),r=!1;if(window.WPRecipeMaker.favorites.isLoggedIn()&&t.favorites.length&&!window.WPRecipeMaker.favorites.hasMergedThisSession()){const e=await window.WPRecipeMaker.favorites.request(`${wprmp_public.endpoints.favorites}/merge`,"POST",{favorites:t});e&&Object.prototype.hasOwnProperty.call(e,"favorites")?(t=window.WPRecipeMaker.favorites.normalizeFavoritesStorage(e),window.WPRecipeMaker.favorites.markMergedThisSession()):r=!0}if(window.WPRecipeMaker.favorites.isLoggedIn()&&!r){const e=await window.WPRecipeMaker.favorites.request(wprmp_public.endpoints.favorites);e&&Object.prototype.hasOwnProperty.call(e,"favorites")&&(t=window.WPRecipeMaker.favorites.normalizeFavoritesStorage(e))}window.WPRecipeMaker.favorites.setFavoritesStorage(t,!0),e(t.favorites)})),setFavorites(e,t=!1,r=!1){const i=window.WPRecipeMaker.favorites.getFavoritesStorage();i.favorites=e,!1!==r&&(i.data=r),window.WPRecipeMaker.favorites.setFavoritesStorage(i,t)},setFavoritesStorage(e,t=!1){e=window.WPRecipeMaker.favorites.normalizeFavoritesStorage(e),window.WPRecipeMaker.favorites.favorites=e.favorites,window.WPRecipeMaker.favorites.data=e.data,window.WPRecipeMaker.favorites.storeFavoritesStorage(e),window.WPRecipeMaker.favorites.syncLoadedRecipeData(),t||document.dispatchEvent(new CustomEvent("wprm-favorites-changed",{detail:e}))},syncLoadedRecipeData(){window.WPRecipeMaker.hasOwnProperty("manager")&&window.WPRecipeMaker.manager.hasOwnProperty("recipes")&&Object.keys(window.WPRecipeMaker.manager.recipes).forEach((e=>{const t=window.WPRecipeMaker.manager.recipes[e];t&&t.id&&window.WPRecipeMaker.manager.changeRecipeData(t.id,{favorite:window.WPRecipeMaker.favorites.isFavorited(t.id)})}))},onClickFavorite(e,t){t.preventDefault();const r=parseInt(e.dataset.recipeId);r&&window.WPRecipeMaker.favorites.ensureReady().then((()=>{window.WPRecipeMaker.favorites.setFavorite(r,!window.WPRecipeMaker.favorites.isFavorited(r))}))},setFavorite(e,t){const r=window.WPRecipeMaker.favorites.getFavoritesStorage(),i={favorites:r.favorites.slice(),data:{...r.data}};if(t)i.favorites.includes(e)||i.favorites.push(e);else{const t=i.favorites.indexOf(e);0<=t&&i.favorites.splice(t,1),delete i.data[e]}window.WPRecipeMaker.favorites.setFavoritesStorage(i),window.WPRecipeMaker.favorites.isLoggedIn()&&window.WPRecipeMaker.favorites.request(`${wprmp_public.endpoints.favorites}/${e}`,"POST",{favorite:t,favorites:i}).then((e=>{e&&Object.prototype.hasOwnProperty.call(e,"favorites")?window.WPRecipeMaker.favorites.setFavoritesStorage(e):window.WPRecipeMaker.favorites.setFavoritesStorage(r)}))},setFavoriteData(e,t){if(!(e=parseInt(e))||!window.WPRecipeMaker.favorites.isFavorited(e))return;const r=window.WPRecipeMaker.favorites.getFavoritesStorage(),i={favorites:r.favorites.slice(),data:{...r.data,[e]:{...r.data.hasOwnProperty(e)?r.data[e]:{},...t}}};window.WPRecipeMaker.favorites.setFavoritesStorage(i),window.WPRecipeMaker.favorites.isLoggedIn()&&window.WPRecipeMaker.favorites.request(`${wprmp_public.endpoints.favorites}/${e}/data`,"POST",{data:i.data[e],favorites:i}).then((e=>{e&&Object.prototype.hasOwnProperty.call(e,"favorites")?window.WPRecipeMaker.favorites.setFavoritesStorage(e):window.WPRecipeMaker.favorites.setFavoritesStorage(r)}))},refreshButtons(e=document){const t=window.WPRecipeMaker.favorites.getFavorites(),r=e.querySelectorAll(".wprm-recipe-favorite-inactive[data-recipe-id], .wprm-recipe-favorite-active[data-recipe-id]");for(let i of r){const e=parseInt(i.dataset.recipeId),r=t.includes(e),n=i.closest(".wprm-recipe-favorite-wrapper");i.classList.contains("wprm-recipe-favorite-inactive")?i.style.display=r?"none":"":i.classList.contains("wprm-recipe-favorite-active")&&(i.style.display=r?"":"none"),n&&n.classList.toggle("wprm-recipe-favorite-wrapper-active",r)}},scheduleRenderFavoriteLists(){clearTimeout(window.WPRecipeMaker.favorites.renderTimeout),window.WPRecipeMaker.favorites.renderTimeout=setTimeout((()=>{window.WPRecipeMaker.favorites.renderFavoriteLists()}),100)},renderFavoriteLists(){const e=document.querySelectorAll(".wprm-favorite-recipes-container");e.length&&window.WPRecipeMaker.favorites.ensureReady().then((()=>{window.WPRecipeMaker.favorites.request(`${wprmp_public.endpoints.favorites}/render`,"POST",{favorites:window.WPRecipeMaker.favorites.getFavorites()}).then((t=>{if(t&&Object.prototype.hasOwnProperty.call(t,"html"))for(let r of e)r.innerHTML=t.html,window.WPRecipeMaker.favorites.refreshButtons(r),window.WPRecipeMaker.hasOwnProperty("tooltip")&&window.WPRecipeMaker.tooltip.addTooltips(r)}))}))}},e=()=>{window.WPRecipeMaker.favorites.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},4096:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.preventSleep={wakeLockApi:!1,wakeLock:!1,init(){if("wakeLock"in navigator&&"request"in navigator.wakeLock&&(this.wakeLockApi=navigator.wakeLock),this.wakeLockApi){const e=document.querySelectorAll(".wprm-prevent-sleep");if(0<e.length)for(let t of e){t.style.display="";t.querySelector(".wprm-prevent-sleep-checkbox").addEventListener("change",(function(e){WPRecipeMaker.preventSleep.checkboxChange(e.target)}),!1)}}},checkboxChange(e){e.checked?this.lock():this.unlock()},setCheckboxesState(e){const t=document.querySelectorAll(".wprm-prevent-sleep-checkbox");for(let r of t)r.checked=e},async lock(){try{this.wakeLock=await this.wakeLockApi.request("screen"),this.wakeLock.addEventListener("release",(e=>{this.wakeLock=!1,this.setCheckboxesState(!1)})),this.setCheckboxesState(!0)}catch(e){this.setCheckboxesState(!1)}},unlock(){this.wakeLock&&(this.wakeLock.release(),this.wakeLock=!1),this.setCheckboxesState(!1)}},e=()=>{window.WPRecipeMaker.preventSleep.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},9055:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.print=void 0===window.WPRecipeMaker.print?{}:window.WPRecipeMaker.print,"function"!=typeof window.WPRecipeMaker.print.hasAccess&&(window.WPRecipeMaker.print.hasAccess=()=>{if(wprm_public.settings.hasOwnProperty("print_access_allowed"))return!!wprm_public.settings.print_access_allowed;const e=wprm_public.settings.hasOwnProperty("print_access")?wprm_public.settings.print_access:"everyone";return"disabled"!==e&&!("logged_in"===e&&0>=parseInt(wprm_public.user))}),window.WPRecipeMaker.premiumPrint={init:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!==this;t=t.parentNode)if(t.matches(".wprm-recipe-download-pdf")){window.WPRecipeMaker.premiumPrint.onClick(t,e);break}}),!1)},onClick:(e,t)=>{if(!window.WPRecipeMaker.print.hasAccess())return void t.preventDefault();let r=e.dataset.recipeId;if(!r){const t=e.closest(".wprm-recipe-container");t&&(r=t.dataset.recipeId)}if(r){t.preventDefault(),r=parseInt(r);const i=e.dataset.hasOwnProperty("template")?e.dataset.template:"";let n="other";const a=e.closest(".wprm-recipe");a&&(n=a.classList.contains("wprm-recipe-snippet")?"snippet":a.classList.contains("wprm-recipe-roundup-item")?"roundup":"recipe"),window.WPRecipeMaker.analytics.registerAction(r,wprm_public.post_id,"print",{location:n}),window.WPRecipeMaker.premiumPrint.recipeAsIs(r,i)}},recipeAsIs:(e,t="")=>{let r=!1,i=1,n=!1;window.WPRecipeMaker.manager.getRecipe(e).then((a=>{a&&(a.data.hasOwnProperty("currentSystem")&&(i=a.data.currentSystem),a.data.currentServingsParsed!==a.data.originalServingsParsed&&(r=a.data.currentServingsParsed),n=a.data.currentAdvancedServings);const s=window.WPRecipeMaker.premiumPrint.normalizePrintArgs({servings:r,system:i,advancedServings:n});window.WPRecipeMaker.premiumPrint.recipePdf(e,s.servings,s.system,s.advancedServings,t)}))},normalizePrintArgs:(e={})=>{let t=!1;if(!1!==e.servings&&null!==e.servings&&""!==e.servings){const r=parseFloat(e.servings);t=!(isNaN(r)||r<=0)&&r}let r=parseInt(e.system);return r=isNaN(r)||r<0?1:r,{servings:t,system:r,advancedServings:!!e.hasOwnProperty("advancedServings")&&e.advancedServings}},recipePdf:async(e,t=!1,r=1,i=!1,n="")=>{if(!wprm_public.settings.pdf_download_enabled||!window.WPRecipeMaker.print.hasAccess())return;const a=window.WPRecipeMaker.premiumPrint.normalizePrintArgs({servings:t,system:r,advancedServings:i}),s=wprm_public.settings.print_new_tab?"_blank":"_self",o={id:e,system:a.system,servings:a.servings,advancedServings:a.advancedServings,output:"pdf"};localStorage.setItem("wprmPrintArgs",JSON.stringify(o));const c=window.WPRecipeMaker.premiumPrint.openPdfDownloadPlaceholder(s),d=await window.WPRecipeMaker.premiumPrint.getPdfDownloadUrl(e,n);if(d)if("_blank"===s&&c&&!c.closed)c.location=d,c.focus();else if("_blank"===s){window.open(d,"_blank")||(window.location=d)}else window.open(d,"_self");else window.WPRecipeMaker.premiumPrint.showPdfDownloadError(c)},openPdfDownloadPlaceholder:(e="_blank")=>{if("_blank"!==e)return!1;const t=window.open("","_blank");if(!t||t.closed)return!1;try{t.document.title="Preparing PDF",t.document.body.innerHTML='<div style="min-height:100vh;display:flex;align-items:center;justify-content:center;font-family:sans-serif;padding:20px;text-align:center;">Preparing PDF Download...</div>'}catch(r){}return t},showPdfDownloadError:(e=!1)=>{if(e&&!e.closed)try{e.document.title="PDF Download",e.document.body.innerHTML='<div style="min-height:100vh;display:flex;align-items:center;justify-content:center;font-family:sans-serif;padding:20px;text-align:center;">Could not generate the PDF download URL. Please try again.</div>'}catch(t){}},getPdfDownloadUrl:async(e,t="")=>{let r={Accept:"application/json","Content-Type":"application/json"};0<parseInt(wprm_public.user)&&(r["X-WP-Nonce"]=wprm_public.api_nonce);const i={recipeId:e,nonce:wprm_public.nonce};t&&(i.template=t);try{const e=await fetch(`${wprm_public.endpoints.utilities}/pdf-download-url`,{method:"POST",headers:r,credentials:"same-origin",body:JSON.stringify(i)});if(!e.ok)return!1;const t=await e.json();return!(!t||!t.url)&&t.url}catch(n){return!1}}},e=()=>{window.WPRecipeMaker&&window.WPRecipeMaker.print&&window.WPRecipeMaker.premiumPrint.init()},"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},5095:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.privateNotes={load:()=>{document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode)if(t.matches(".wprm-private-notes-container:not(.wprm-private-notes-container-disabled)")){window.WPRecipeMaker.privateNotes.click(t,e);break}}),!1),window.WPRecipeMaker.privateNotes.init()},init:()=>{const e=document.querySelectorAll(".wprm-private-notes-container");for(let t of e)window.WPRecipeMaker.privateNotes.showNotes(t)},currentlyEditing:!1,click:(e,t)=>{t.preventDefault(),window.WPRecipeMaker.privateNotes.startEditing(e)},startEditing:e=>{if(parseInt(e.dataset.recipe)&&!window.WPRecipeMaker.privateNotes.currentlyEditing){window.WPRecipeMaker.privateNotes.currentlyEditing=!0,e.classList.add("wprm-private-notes-editing");const t=e.querySelector("textarea"),r=t.scrollHeight<100?100:t.scrollHeight;t.style.height=r+"px",window.onbeforeunload=()=>{window.WPRecipeMaker.privateNotes.stopEditing(e)},t.addEventListener("blur",(()=>{window.WPRecipeMaker.privateNotes.stopEditing(e)}),!1),t.addEventListener("input",(()=>{const e=t.scrollHeight<100?100:t.scrollHeight;t.style.height=e+"px"}),!1),t.focus(),t.setSelectionRange(t.value.length,t.value.length)}},stopEditing:e=>{window.WPRecipeMaker.privateNotes.currentlyEditing=!1;const t=e.querySelector("textarea"),r=t.value.trim(),i=t.cloneNode(!0);t.parentNode.replaceChild(i,t),e.classList.remove("wprm-private-notes-editing");const n=parseInt(e.dataset.recipe);window.WPRecipeMaker.privateNotes.saveNotes(n,r),window.WPRecipeMaker.privateNotes.showNotes(e)},showNotes:e=>{const t=parseInt(e.dataset.recipe);if(t){const r=window.WPRecipeMaker.privateNotes.getNotes(t,e),i=e.querySelector("textarea");i&&(i.value=r),r?e.classList.add("wprm-private-notes-has-notes"):e.classList.remove("wprm-private-notes-has-notes");const n=e.querySelector(".wprm-private-notes-user");n&&(n.innerHTML=r)}},recipeNotes:{},getNotes:(e,t=!1)=>{let r="";if(window.WPRecipeMaker.privateNotes.recipeNotes.hasOwnProperty(`recipe-${e}`))return r=window.WPRecipeMaker.privateNotes.recipeNotes[`recipe-${e}`],r;if(t){const e=t.querySelector("textarea");e&&(r=e.value)}if(!r){const t=localStorage.getItem(`wprm-recipe-private-notes-${e}`);t&&(r=t)}return r},saveNotes:(e,t)=>{e&&(window.WPRecipeMaker.privateNotes.recipeNotes[`recipe-${e}`]=t,0<parseInt(wprmp_public.user)?fetch(`${wprmp_public.endpoints.private_notes}/${e}`,{method:"POST",headers:{"X-WP-Nonce":wprm_public.api_nonce,Accept:"application/json","Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({notes:t})}).then((e=>!!e.ok&&e.json())).then((r=>{!1===r?window.WPRecipeMaker.privateNotes.saveNotesInLocalStorage(e,t):window.WPRecipeMaker.privateNotes.saveNotesInLocalStorage(e,!1)})):window.WPRecipeMaker.privateNotes.saveNotesInLocalStorage(e,t))},saveNotesInLocalStorage:(e,t)=>{t?localStorage.setItem(`wprm-recipe-private-notes-${e}`,t):localStorage.removeItem(`wprm-recipe-private-notes-${e}`)},hideEmpty:()=>{const e=document.querySelectorAll(".wprm-private-notes-container");for(let t of e){const e=parseInt(t.dataset.recipe);if(e){if(!window.WPRecipeMaker.privateNotes.getNotes(e,t)){const e=t.previousElementSibling;e&&e.classList.contains("wprm-recipe-private-notes-header")&&e.remove(),t.remove()}}}}},e=()=>{window.WPRecipeMaker.privateNotes.load()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},2359:()=>{var e;window.WPRecipeMaker=void 0===window.WPRecipeMaker?{}:window.WPRecipeMaker,window.WPRecipeMaker.userRatingModal={init(){if(wprmp_public.settings.user_ratings_open_url_parameter){if(new URLSearchParams(window.location.search).has(wprmp_public.settings.user_ratings_open_url_parameter)){const e=document.querySelectorAll(".wprm-user-rating, .wprm-recipe-user-ratings-modal");for(let t of e)if(t.dataset.hasOwnProperty("modalUid")&&t.dataset.hasOwnProperty("recipe")){const e=t.dataset.modalUid;let r=t.dataset.recipe;r=parseInt(r),r&&setTimeout((()=>{window.WPRecipeMaker.modal.open(e,{recipe:r,rating:0})}));break}}}document.addEventListener("wprm-modal-open",(e=>{"user-rating"===e.detail.type&&window.WPRecipeMaker.userRatingModal.opened(e.detail.uid,e.detail.modal,e.detail.data)})),document.addEventListener("wprm-modal-close",(e=>{"user-rating"===e.detail.type&&window.WPRecipeMaker.userRatingModal.closed(e.detail.uid,e.detail.modal,e.detail.data)})),document.addEventListener("wprm-comment-rating-change",(e=>{e.detail.hasOwnProperty("container")&&e.detail.container.classList.contains("wprm-user-ratings-modal-stars")&&window.WPRecipeMaker.userRatingModal.ratingChange(e.detail.rating)})),document.addEventListener("click",(function(e){for(var t=e.target;t&&t!=this;t=t.parentNode){if(t.matches(".wprm-cta-rating-modal")||t.matches(".wprm-recipe-user-ratings-modal")){e.preventDefault();const r=t.dataset.modalUid;let i=t.dataset.recipe;i=parseInt(i),i&&window.WPRecipeMaker.modal.open(r,{recipe:i,rating:0});break}if(t.matches(".wprm-user-rating-modal-comment-suggestion")){e.preventDefault();const r=t.innerText,i=document.querySelector(".wprm-user-rating-modal-comment");r&&i&&(i.value=r,window.WPRecipeMaker.userRatingModal.checkFields());break}if(t.matches(".wprm-user-rating-summary-details-no-comments")){e.preventDefault(),window.WPRecipeMaker.userRatingModal.ratingsWithoutCommentsPopup(t);break}}}),!1)},modalUid:!1,currentRecipe:!1,currentCommentForRecipe:{},opened(e,t,r){window.WPRecipeMaker.userRatingModal.modalUid=e,window.WPRecipeMaker.userRatingModal.setTitle(wprmp_public.settings.user_ratings_modal_title),window.WPRecipeMaker.userRatingModal.displayMessage('<div class="wprm-loader"></div>');const i=t.querySelector(".wprm-user-ratings-modal-stars-container").querySelectorAll("input");if(i[0].click(),r.hasOwnProperty("rating")){const e=parseInt(r.rating);for(let t of i)if(e===parseInt(t.value)){t.click();break}}const n=t.querySelector('input[name="wprm-user-rating-recipe-id"]');n.value=r.hasOwnProperty("recipe")?r.recipe:0,window.WPRecipeMaker.manager.getRecipe(n.value).then((e=>{window.WPRecipeMaker.userRatingModal.currentRecipe=e,window.WPRecipeMaker.userRatingModal.displayMessage(!1);const r=t.querySelector(".wprm-user-rating-modal-comment");r.value="",e&&window.WPRecipeMaker.userRatingModal.currentCommentForRecipe.hasOwnProperty(e.id)&&(r.value=window.WPRecipeMaker.userRatingModal.currentCommentForRecipe[e.id]),window.WPRecipeMaker.userRatingModal.checkFields(),window.WPRecipeMaker.userRatingModal.displayError(!1),window.WPRecipeMaker.userRatingModal.displayWaiting(!1);t.querySelector(".wprm-user-ratings-modal-recipe-name").innerHTML=e?e.data.name:""}))},ratingChange(e){window.WPRecipeMaker.userRatingModal.checkFields()},checkFields(){const e=document.querySelector(".wprm-popup-modal-user-rating"),t=0<parseInt(wprmp_public.user);t&&e.classList.add("wprm-user-rating-modal-logged-in");const r=e.querySelector(".wprm-user-rating-modal-comment"),i=e.querySelector('input[name="wprm-user-rating-name"]'),n=e.querySelector('input[name="wprm-user-rating-email"]');r.required=wprmp_public.settings.user_ratings_require_comment,i.required=!t&&wprmp_public.settings.user_ratings_require_name,n.required=!t&&wprmp_public.settings.user_ratings_require_email;const a=new FormData(r.form),s=Object.fromEntries(a),o=parseInt(s["wprm-user-rating-stars"]),c=e.querySelector(".wprm-user-rating-modal-comment-suggestions-container");if(c&&(c.style.display=window.WPRecipeMaker.userRatingModal.shouldSuggestionsShow(o)?"block":"none"),!wprmp_public.settings.user_ratings_require_comment){const t=e.querySelector(".wprm-user-rating-modal-submit-comment"),i=e.querySelector(".wprm-user-rating-modal-submit-no-comment");r.value?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")}},shouldSuggestionsShow(e){if("never"!==wprmp_public.settings.user_ratings_comment_suggestions_enabled){const t={always:1,"2_star":2,"3_star":3,"4_star":4,"5_star":5};if(t.hasOwnProperty(wprmp_public.settings.user_ratings_comment_suggestions_enabled)&&e>=t[wprmp_public.settings.user_ratings_comment_suggestions_enabled])return!0}return!1},submit(e){const t=new FormData(e),r=Object.fromEntries(t),i=parseInt(r["wprm-user-rating-recipe-id"]),n=parseInt(r["wprm-user-rating-stars"]),a=r["wprm-user-rating-comment"].trim(),s=r["wprm-user-rating-name"].trim(),o=r["wprm-user-rating-email"].trim();if(n<=0||n>5)return window.WPRecipeMaker.userRatingModal.displayError("rating"),!1;if(0===parseInt(wprmp_public.user)){if(!s&&wprmp_public.settings.user_ratings_require_name)return window.WPRecipeMaker.userRatingModal.displayError("name"),!1;if(!o&&wprmp_public.settings.user_ratings_require_email)return window.WPRecipeMaker.userRatingModal.displayError("email"),!1}window.WPRecipeMaker.userRatingModal.displayError(!1),window.WPRecipeMaker.userRatingModal.displayWaiting(!0);const c={post_id:wprm_public.post_id,rating:n,comment:a,name:s,email:o};window.WPRecipeMaker.manager.getRecipe(i).then((e=>{const t=e=>{let t="";t=!1===e?wprmp_public.settings.user_ratings_problem_message:wprmp_public.settings.user_ratings_thank_you_message_with_comment,t?(window.WPRecipeMaker.userRatingModal.setTitle(wprmp_public.settings.user_ratings_thank_you_title),window.WPRecipeMaker.userRatingModal.displayMessage(t)):window.WPRecipeMaker.modal.close(window.WPRecipeMaker.userRatingModal.modalUid)};e?e.addRating(c).then((e=>{window.WPRecipeMaker.userRatingModal.displayWaiting(!1),t(e)})):t(!1)}))},displayError(e){const t=document.querySelector("#wprm-user-rating-modal-errors");t&&t.querySelectorAll("div").forEach((t=>{e&&t.id==="wprm-user-rating-modal-error-"+e?t.style.display="block":t.style.display=""}))},displayWaiting(e){const t=document.querySelector("#wprm-user-rating-modal-waiting");t&&(t.style.display=e?"inline-block":"");const r=document.querySelectorAll(".wprm-user-rating-modal-submit-rating, .wprm-user-rating-modal-submit-comment");for(let i of r)i.disabled=e},displayMessage(e){const t=document.querySelector("#wprm-user-ratings-modal-stars-form"),r=document.querySelector("#wprm-user-ratings-modal-message");!1===e?(t.style.display="block",r.style.display="none"):(t.style.display="none",r.innerHTML=e,r.style.display="block")},setTitle(e){const t=document.querySelector("#wprm-popup-modal-user-rating-title");t&&e&&(t.innerHTML=e)},closed(e,t,r){const i=window.WPRecipeMaker.userRatingModal.currentRecipe;if(i){let e="";if("none"!==document.querySelector("#wprm-user-ratings-modal-stars-form").style.display){e=t.querySelector(".wprm-user-rating-modal-comment").value}window.WPRecipeMaker.userRatingModal.currentCommentForRecipe[i.id]=e}window.WPRecipeMaker.userRatingModal.currentRecipe=!1,window.WPRecipeMaker.userRatingModal.modalUid=!1},ratingsWithoutCommentsPopup(e){const t=e.dataset.modalUid;if(t){const r=document.getElementById("wprm-popup-modal-"+t);window.WPRecipeMaker.modal.open(t);const i=r.querySelector(".wprm-loader"),n=r.querySelector(".wprm-popup-modal-user-rating-summary-error"),a=r.querySelector(".wprm-popup-modal-user-rating-summary-ratings");i.style.display="block",n.style.display="none",a.innerHTML="";const s=e.dataset.recipeId,o=e.dataset.postId;let c={Accept:"application/json","Content-Type":"application/json"};return 0<parseInt(wprmp_public.user)&&(c["X-WP-Nonce"]=wprm_public.api_nonce),fetch(`${wprmp_public.endpoints.user_rating}/summary-popup`,{method:"POST",headers:c,credentials:"same-origin",body:JSON.stringify({recipeId:s,postId:o})}).then((e=>!!e.ok&&e.json())).then((e=>{i.style.display="none",e&&e.html?a.innerHTML=e.html:n.style.display="block"}))}}},e=()=>{window.WPRecipeMaker.userRatingModal.init()},"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)},942:(e,t,r)=>{"use strict";r.d(t,{f:()=>n});let i={};function n(e,t="wp-recipe-maker"){return i.hasOwnProperty(e)?i[e]:e}window.hasOwnProperty("wprm_public")&&wprm_public.hasOwnProperty("translations")&&(i={...i,...wprm_public.translations}),window.hasOwnProperty("wprm_admin")&&wprm_admin.hasOwnProperty("translations")&&(i={...i,...wprm_admin.translations})},9707:(e,t,r)=>{"use strict";r.d(t,{L:()=>c,V:()=>o});var i=r(2667),n=r.n(i);const a={"¼":"1/4","½":"1/2","¾":"3/4","⅐":"1/7","⅑":"1/9","⅒":"1/10","⅓":"1/3","⅔":"2/3","⅕":"1/5","⅖":"2/5","⅗":"3/5","⅘":"4/5","⅙":"1/6","⅚":"5/6","⅛":"1/8","⅜":"3/8","⅝":"5/8","⅞":"7/8"};function s(){if("undefined"==typeof window)return{};const e=[window.wprmp_public,window.wprmprc_public,window.wprm_public,window.wprmp_admin,window.wprm_admin];for(const t of e)if(t&&t.settings)return t.settings;return{}}function o(e,t=2,r=!1){const i=s(),o=i.decimal_separator,c="comma"===o?",":".",d="comma"===o?".":",";let p=e,l=!1;if(r){if(i.fractions_enabled){const t=i.fractions_use_mixed,r=i.fractions_use_symbols;let s=parseInt(i.fractions_max_denominator);s=s>1?s:8;const o=n()(e,s,t);if(o&&3===o.length&&!isNaN(o[0])&&!isNaN(o[1])&&!isNaN(o[2])){let e="";if(0<o[0]&&(e+=`${o[0]} `,e=e.replace(/\B(?=(\d{3})+(?!\d))/g,d)),0<o[1]?0<o[2]&&(e+=1===o[2]?o[1]:`${o[1]}/${o[2]}`):0===o[0]&&(e+=`1/${s}`),e){if(r){e=" "+e+" ";for(let t of Object.keys(a)){const r=a[t];e=e.replace(` ${r} `,` ${t} `)}}p=e.trim(),l=!0}}}}if(!l){t=parseInt(t),(isNaN(t)||t<0)&&(t=0);do{if(p=parseFloat(parseFloat(e).toFixed(t)),3<++t)break}while(0==p);p=""+p,"comma"===o&&(p=p.replace(".",","));const r=p.split(c);r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,d),p=r.join(c)}return p}function c(e){const t="number"==typeof e;if(e=""+e,!t){if("comma"===s().decimal_separator){const t=e.indexOf(".");if(-1!==t&&e.length-t>3){const r=e.substr(0,t);0!==parseInt(r)&&(e=e.replace(".",""))}}else{const t=e.indexOf(",");if(-1!==t&&e.length-t>3){const r=e.substr(0,t);0!==parseInt(r)&&(e=e.replace(",",""))}}}var r=(e=(e=(e=(e=(e=((e=(e=(e=(e=(e=e.replace(",",".")).replace(" to ","-")).replace("–","-")).replace("—","-")).replace(" - ","-"))+"").replace(/(\u00BC|\u00BD|\u00BE|\u2150|\u2151|\u2152|\u2153|\u2154|\u2155|\u2156|\u2157|\u2158|\u2159|\u215A|\u215B|\u215C|\u215D|\u215E)/,(function(e,t){return" "+a[t]+" "}))).replace(/(<([^>]+)>)/gi,"")).replace(/(\[([^\]]+)\])/gi,"")).replace(/[^\d\s\.\/-]/gi,"")).trim()).split(" "),i=!1;if(""!==e){i=0;for(var n=0;n<r.length;n++)if(""!==r[n].trim()){var o=r[n].split("/",2),c=parseFloat(o[0]);if(void 0!==o[1]){var d=parseFloat(o[1]);0!==d&&(c/=d)}isNaN(c)||(i+=c)}}return i}},2667:e=>{var t=function(e,t,r){var i=Math.floor(e),n=1,a=i+1,s=1;if(e!==i)for(;n<=t&&s<=t;){var o=(i+a)/(n+s);if(e===o){n+s<=t?(n+=s,i+=a,s=t+1):n>s?s=t+1:n=t+1;break}e<o?(a=i+a,s=n+s):(i+=a,n+=s)}if(n>t&&(n=s,i=a),!r)return[0,i,n];var c=Math.floor(i/n);return[c,i-c*n,n]};t.cont=function(e,t,r){for(var i=e<0?-1:1,n=e*i,a=0,s=1,o=0,c=1,d=0,p=0,l=Math.floor(n);d<t&&(o=(l=Math.floor(n))*s+a,p=l*d+c,!(n-l<5e-8));)n=1/(n-l),a=s,s=o,c=d,d=p;if(p>t&&(d>t?(p=c,o=a):(p=d,o=s)),!r)return[0,i*o,p];var m=Math.floor(i*o/p);return[m,i*o-m*p,p]},"undefined"==typeof DO_NOT_EXPORT_FRAC&&(e.exports=t)}},e=>{var t,r=(t=150,e(e.s=t));(WPRecipeMaker=void 0===WPRecipeMaker?{}:WPRecipeMaker)["wp-recipe-maker-premium/dist/public-pro"]=r}]);