From 717b66ecbd5a538c623d74a827715fc960ce5c18 Mon Sep 17 00:00:00 2001 From: yafimski Date: Tue, 9 Jul 2024 16:42:21 +0300 Subject: [PATCH] Updates --- ...leryItem-Bb9sRztt.js => IngredientGalleryItem-C3Dk2jml.js} | 2 +- assets/{index-cS1Unegp.js => index-D468XkDN.js} | 4 ++-- index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename assets/{IngredientGalleryItem-Bb9sRztt.js => IngredientGalleryItem-C3Dk2jml.js} (94%) rename assets/{index-cS1Unegp.js => index-D468XkDN.js} (98%) diff --git a/assets/IngredientGalleryItem-Bb9sRztt.js b/assets/IngredientGalleryItem-C3Dk2jml.js similarity index 94% rename from assets/IngredientGalleryItem-Bb9sRztt.js rename to assets/IngredientGalleryItem-C3Dk2jml.js index 5575bc8..7d81225 100644 --- a/assets/IngredientGalleryItem-Bb9sRztt.js +++ b/assets/IngredientGalleryItem-C3Dk2jml.js @@ -1 +1 @@ -import{u as a,a as u,j as s,s as m,h as x,F as g,f,b as o,c as h}from"./index-cS1Unegp.js";function w({item:c}){const{itemName:e}=c,l=a(t=>t.groups.ingredientsGroups),r=a(t=>t.recipe.currentGroupName),n=u(),d=()=>{var t;if(!r)n(o("Ingredient group cannot be empty"));else{const p=(t=l.filter(i=>i.groupName===r)[0])==null?void 0:t.items.filter(i=>i.itemName===e)[0];n(p?o("Ingredient is already in the group!"):h({groupName:r,itemName:e}))}};return s.jsx("div",{className:"flex flex-row","data-testid":`${e}_gallery`,children:s.jsxs("div",{className:"relative flex flex-col print-rounded card-shadow w-cw aspect-videoReverse",children:[s.jsx("img",{src:`${m}/assets/ingredients/${e.toLowerCase()}.webp`,alt:e,className:"print-rounded-img"}),s.jsx("div",{className:"absolute inset-0 flex center bg-white print-rounded bg-opacity-70 opacity-0 hover:opacity-100 hover:cursor-pointer transition-opacity",onClick:()=>d(),onKeyDown:x,children:s.jsx(g,{icon:f,className:"cursor-pointer text-4xl text-green-600"})}),s.jsx("p",{className:"flex flex-grow rounded-b-2xl center px-4 text-center text-fluidPrintTitle",children:e})]})})}export{w as default}; +import{u as a,a as u,j as s,s as m,h as x,F as g,f,b as o,c as h}from"./index-D468XkDN.js";function w({item:c}){const{itemName:e}=c,l=a(t=>t.groups.ingredientsGroups),r=a(t=>t.recipe.currentGroupName),n=u(),d=()=>{var t;if(!r)n(o("Ingredient group cannot be empty"));else{const p=(t=l.filter(i=>i.groupName===r)[0])==null?void 0:t.items.filter(i=>i.itemName===e)[0];n(p?o("Ingredient is already in the group!"):h({groupName:r,itemName:e}))}};return s.jsx("div",{className:"flex flex-row","data-testid":`${e}_gallery`,children:s.jsxs("div",{className:"relative flex flex-col print-rounded card-shadow w-cw aspect-videoReverse",children:[s.jsx("img",{src:`${m}/assets/ingredients/${e.toLowerCase()}.webp`,alt:e,className:"print-rounded-img"}),s.jsx("div",{className:"absolute inset-0 flex center bg-white print-rounded bg-opacity-70 opacity-0 hover:opacity-100 hover:cursor-pointer transition-opacity",onClick:()=>d(),onKeyDown:x,children:s.jsx(g,{icon:f,className:"cursor-pointer text-4xl text-green-600"})}),s.jsx("p",{className:"flex flex-grow rounded-b-2xl center px-4 text-center text-fluidPrintTitle",children:e})]})})}export{w as default}; diff --git a/assets/index-cS1Unegp.js b/assets/index-D468XkDN.js similarity index 98% rename from assets/index-cS1Unegp.js rename to assets/index-D468XkDN.js index da6f558..a34e832 100644 --- a/assets/index-cS1Unegp.js +++ b/assets/index-D468XkDN.js @@ -73,7 +73,7 @@ Error generating stack: `+l.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function DD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LD(e,t){return e.button===0&&(!t||t==="_self")&&!DD(e)}const MD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],jD="6";try{window.__reactRouterVersion=jD}catch{}function FD(e,t){return Z3({basename:void 0,future:Ys({},void 0,{v7_prependBasename:!0}),history:_3({window:void 0}),hydrationData:zD(),routes:e,mapRouteProperties:AD,unstable_dataStrategy:void 0,window:void 0}).initialize()}function zD(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ys({},t,{errors:UD(t.errors)})),t}function UD(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new rg(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let l=window[o.__subType];if(typeof l=="function")try{let s=new l(o.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let l=new Error(o.message);l.stack="",n[r]=l}}else n[r]=o;return n}const $D=R.createContext({isTransitioning:!1}),BD=R.createContext(new Map),WD="startTransition",zw=Th[WD],HD="flushSync",Uw=b3[HD];function GD(e){zw?zw(e):e()}function is(e){Uw?Uw(e):e()}class KD{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function YD(e){let{fallbackElement:t,router:n,future:r}=e,[o,l]=R.useState(n.state),[s,c]=R.useState(),[f,p]=R.useState({isTransitioning:!1}),[d,m]=R.useState(),[v,S]=R.useState(),[E,k]=R.useState(),A=R.useRef(new Map),{v7_startTransition:_}=r||{},b=R.useCallback(N=>{_?GD(N):N()},[_]),y=R.useCallback((N,$)=>{let{deletedFetchers:F,unstable_flushSync:q,unstable_viewTransitionOpts:te}=$;F.forEach(fe=>A.current.delete(fe)),N.fetchers.forEach((fe,ie)=>{fe.data!==void 0&&A.current.set(ie,fe.data)});let we=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!te||we){q?is(()=>l(N)):b(()=>l(N));return}if(q){is(()=>{v&&(d&&d.resolve(),v.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:te.currentLocation,nextLocation:te.nextLocation})});let fe=n.window.document.startViewTransition(()=>{is(()=>l(N))});fe.finished.finally(()=>{is(()=>{m(void 0),S(void 0),c(void 0),p({isTransitioning:!1})})}),is(()=>S(fe));return}v?(d&&d.resolve(),v.skipTransition(),k({state:N,currentLocation:te.currentLocation,nextLocation:te.nextLocation})):(c(N),p({isTransitioning:!0,flushSync:!1,currentLocation:te.currentLocation,nextLocation:te.nextLocation}))},[n.window,v,d,A,b]);R.useLayoutEffect(()=>n.subscribe(y),[n,y]),R.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new KD)},[f]),R.useEffect(()=>{if(d&&s&&n.window){let N=s,$=d.promise,F=n.window.document.startViewTransition(async()=>{b(()=>l(N)),await $});F.finished.finally(()=>{m(void 0),S(void 0),c(void 0),p({isTransitioning:!1})}),S(F)}},[b,s,d,n.window]),R.useEffect(()=>{d&&s&&o.location.key===s.location.key&&d.resolve()},[d,v,o.location,s]),R.useEffect(()=>{!f.isTransitioning&&E&&(c(E.state),p({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),k(void 0))},[f.isTransitioning,E]),R.useEffect(()=>{},[]);let O=R.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,$,F)=>n.navigate(N,{state:$,preventScrollReset:F==null?void 0:F.preventScrollReset}),replace:(N,$,F)=>n.navigate(N,{replace:!0,state:$,preventScrollReset:F==null?void 0:F.preventScrollReset})}),[n]),I=n.basename||"/",G=R.useMemo(()=>({router:n,navigator:O,static:!1,basename:I}),[n,O,I]);return R.createElement(R.Fragment,null,R.createElement(dd.Provider,{value:G},R.createElement(ES.Provider,{value:o},R.createElement(BD.Provider,{value:A.current},R.createElement($D.Provider,{value:f},R.createElement(TD,{basename:I,location:o.location,navigationType:o.historyAction,navigator:O,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?R.createElement(qD,{routes:n.routes,future:n.future,state:o}):t))))),null)}function qD(e){let{routes:t,future:n,state:r}=e;return wD(t,void 0,r,n)}const VD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,QD=R.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:l,replace:s,state:c,target:f,to:p,preventScrollReset:d,unstable_viewTransition:m}=t,v=ID(t,MD),{basename:S}=R.useContext(ma),E,k=!1;if(typeof p=="string"&&XD.test(p)&&(E=p,VD))try{let y=new URL(window.location.href),O=p.startsWith("//")?new URL(y.protocol+p):new URL(p),I=kl(O.pathname,S);O.origin===y.origin&&I!=null?p=I+O.search+O.hash:k=!0}catch{}let A=gD(p,{relative:o}),_=JD(p,{replace:s,state:c,target:f,preventScrollReset:d,relative:o,unstable_viewTransition:m});function b(y){r&&r(y),y.defaultPrevented||_(y)}return R.createElement("a",Ys({},v,{href:E||A,onClick:k||l?r:b,ref:n,target:f}))});var $w;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($w||($w={}));var Bw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bw||(Bw={}));function JD(e,t){let{target:n,replace:r,state:o,preventScrollReset:l,relative:s,unstable_viewTransition:c}=t===void 0?{}:t,f=sg(),p=pd(),d=NS(e,{relative:s});return R.useCallback(m=>{if(LD(m,n)){m.preventDefault();let v=r!==void 0?r:sa(p)===sa(d);f(e,{replace:v,state:o,preventScrollReset:l,relative:s,unstable_viewTransition:c})}},[p,f,d,r,o,n,e,l,s,c])}function ZD(){return C.jsxs("div",{className:"flex flex-col center h-screen",children:[C.jsx("h1",{className:"text-fluidTitle mb-4",children:"404 Page Not Found"}),C.jsx(QD,{to:"/",style:{fontSize:20,textDecoration:"none",color:"blue"},children:"Back to a4recipe Home"})]})}function mn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eL=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ww=eL,yh=()=>Math.random().toString(36).substring(7).split("").join("."),tL={INIT:`@@redux/INIT${yh()}`,REPLACE:`@@redux/REPLACE${yh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yh()}`},Pf=tL;function ug(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function OS(e,t,n){if(typeof e!="function")throw new Error(mn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(mn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(mn(1));return n(OS)(e,t)}let r=e,o=t,l=new Map,s=l,c=0,f=!1;function p(){s===l&&(s=new Map,l.forEach((A,_)=>{s.set(_,A)}))}function d(){if(f)throw new Error(mn(3));return o}function m(A){if(typeof A!="function")throw new Error(mn(4));if(f)throw new Error(mn(5));let _=!0;p();const b=c++;return s.set(b,A),function(){if(_){if(f)throw new Error(mn(6));_=!1,p(),s.delete(b),l=null}}}function v(A){if(!ug(A))throw new Error(mn(7));if(typeof A.type>"u")throw new Error(mn(8));if(typeof A.type!="string")throw new Error(mn(17));if(f)throw new Error(mn(9));try{f=!0,o=r(o,A)}finally{f=!1}return(l=s).forEach(b=>{b()}),A}function S(A){if(typeof A!="function")throw new Error(mn(10));r=A,v({type:Pf.REPLACE})}function E(){const A=m;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(mn(11));function b(){const O=_;O.next&&O.next(d())}return b(),{unsubscribe:A(b)}},[Ww](){return this}}}return v({type:Pf.INIT}),{dispatch:v,subscribe:m,getState:d,replaceReducer:S,[Ww]:E}}function nL(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Pf.INIT})>"u")throw new Error(mn(12));if(typeof n(void 0,{type:Pf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(mn(13))})}function rL(e){const t=Object.keys(e),n={};for(let l=0;l"u")throw c&&c.type,new Error(mn(14));p[m]=E,f=f||E!==S}return f=f||r.length!==Object.keys(s).length,f?p:s}}function Of(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function iL(...e){return t=>(n,r)=>{const o=t(n,r);let l=()=>{throw new Error(mn(15))};const s={getState:o.getState,dispatch:(f,...p)=>l(f,...p)},c=e.map(f=>f(s));return l=Of(...c)(o.dispatch),{...o,dispatch:l}}}function oL(e){return ug(e)&&"type"in e&&typeof e.type=="string"}var TS=Symbol.for("immer-nothing"),Hw=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state");function Wr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var gl=Object.getPrototypeOf;function So(e){return!!e&&!!e[lr]}function Li(e){var t;return e?AS(e)||Array.isArray(e)||!!e[Hw]||!!((t=e.constructor)!=null&&t[Hw])||md(e)||vd(e):!1}var aL=Object.prototype.constructor.toString();function AS(e){if(!e||typeof e!="object")return!1;const t=gl(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===aL}function Tf(e,t){hd(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function hd(e){const t=e[lr];return t?t.type_:Array.isArray(e)?1:md(e)?2:vd(e)?3:0}function Pm(e,t){return hd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function IS(e,t,n){const r=hd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function lL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function md(e){return e instanceof Map}function vd(e){return e instanceof Set}function Ho(e){return e.copy_||e.base_}function Om(e,t){if(md(e))return new Map(e);if(vd(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=AS(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[lr];let o=Reflect.ownKeys(r);for(let l=0;l1&&(e.set=e.add=e.clear=e.delete=sL),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>cg(r,!0))),e}function sL(){Wr(2)}function gd(e){return Object.isFrozen(e)}var uL={};function ua(e){const t=uL[e];return t||Wr(0,e),t}var qs;function DS(){return qs}function cL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Gw(e,t){t&&(ua("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tm(e){Am(e),e.drafts_.forEach(fL),e.drafts_=null}function Am(e){e===qs&&(qs=e.parent_)}function Kw(e){return qs=cL(qs,e)}function fL(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[lr].modified_&&(Tm(t),Wr(4)),Li(e)&&(e=Af(t,e),t.parent_||If(t,e)),t.patches_&&ua("Patches").generateReplacementPatches_(n[lr].base_,e,t.patches_,t.inversePatches_)):e=Af(t,n,[]),Tm(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==TS?e:void 0}function Af(e,t,n){if(gd(t))return t;const r=t[lr];if(!r)return Tf(t,(o,l)=>qw(e,r,t,o,l,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return If(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let l=o,s=!1;r.type_===3&&(l=new Set(o),o.clear(),s=!0),Tf(l,(c,f)=>qw(e,r,o,c,f,n,s)),If(e,o,!1),n&&e.patches_&&ua("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function qw(e,t,n,r,o,l,s){if(So(o)){const c=l&&t&&t.type_!==3&&!Pm(t.assigned_,r)?l.concat(r):void 0,f=Af(e,o,c);if(IS(n,r,f),So(f))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Li(o)&&!gd(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Af(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&If(e,o)}}function If(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cg(t,n)}function dL(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:DS(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,l=fg;n&&(o=[r],l=Vs);const{revoke:s,proxy:c}=Proxy.revocable(o,l);return r.draft_=c,r.revoke_=s,c}var fg={get(e,t){if(t===lr)return e;const n=Ho(e);if(!Pm(n,t))return pL(e,n,t);const r=n[t];return e.finalized_||!Li(r)?r:r===wh(e.base_,t)?(xh(e),e.copy_[t]=Dm(r,e)):r},has(e,t){return t in Ho(e)},ownKeys(e){return Reflect.ownKeys(Ho(e))},set(e,t,n){const r=LS(Ho(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=wh(Ho(e),t),l=o==null?void 0:o[lr];if(l&&l.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(lL(n,o)&&(n!==void 0||Pm(e.base_,t)))return!0;xh(e),Im(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return wh(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xh(e),Im(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ho(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Wr(11)},getPrototypeOf(e){return gl(e.base_)},setPrototypeOf(){Wr(12)}},Vs={};Tf(fg,(e,t)=>{Vs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Vs.deleteProperty=function(e,t){return Vs.set.call(this,e,t,void 0)};Vs.set=function(e,t,n){return fg.set.call(this,e[0],t,n,e[0])};function wh(e,t){const n=e[lr];return(n?Ho(n):e)[t]}function pL(e,t,n){var o;const r=LS(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function LS(e,t){if(!(t in e))return;let n=gl(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=gl(n)}}function Im(e){e.modified_||(e.modified_=!0,e.parent_&&Im(e.parent_))}function xh(e){e.copy_||(e.copy_=Om(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const l=n;n=t;const s=this;return function(f=l,...p){return s.produce(f,d=>n.call(this,d,...p))}}typeof n!="function"&&Wr(6),r!==void 0&&typeof r!="function"&&Wr(7);let o;if(Li(t)){const l=Kw(this),s=Dm(t,void 0);let c=!0;try{o=n(s),c=!1}finally{c?Tm(l):Am(l)}return Gw(l,r),Yw(o,l)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===TS&&(o=void 0),this.autoFreeze_&&cg(o,!0),r){const l=[],s=[];ua("Patches").generateReplacementPatches_(t,o,l,s),r(l,s)}return o}else Wr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,f=>t(f,...c));let r,o;return[this.produce(t,n,(s,c)=>{r=s,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Li(e)||Wr(8),So(e)&&(e=MS(e));const t=Kw(this),n=Dm(e,void 0);return n[lr].isManual_=!0,Am(t),n}finishDraft(e,t){const n=e&&e[lr];(!n||!n.isManual_)&&Wr(9);const{scope_:r}=n;return Gw(r,t),Yw(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=ua("Patches").applyPatches_;return So(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Dm(e,t){const n=md(e)?ua("MapSet").proxyMap_(e,t):vd(e)?ua("MapSet").proxySet_(e,t):dL(e,t);return(t?t.scope_:DS()).drafts_.push(n),n}function MS(e){return So(e)||Wr(10,e),jS(e)}function jS(e){if(!Li(e)||gd(e))return e;const t=e[lr];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Om(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Om(e,!0);return Tf(n,(r,o)=>{IS(n,r,jS(o))}),t&&(t.finalized_=!1),n}var sr=new hL,FS=sr.produce;sr.produceWithPatches.bind(sr);sr.setAutoFreeze.bind(sr);sr.setUseStrictShallowCopy.bind(sr);sr.applyPatches.bind(sr);sr.createDraft.bind(sr);sr.finishDraft.bind(sr);function mL(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function vL(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function gL(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Vw=e=>Array.isArray(e)?e:[e];function yL(e){const t=Array.isArray(e[0])?e[0]:e;return gL(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function wL(e,t){const n=[],{length:r}=e;for(let o=0;o{n=Cc(),s.resetResultsCount()},s.resultsCount=()=>l,s.resetResultsCount=()=>{l=0},s}function zS(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let l=0,s=0,c,f={},p=o.pop();typeof p=="object"&&(f=p,p=o.pop()),mL(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);const d={...n,...f},{memoize:m,memoizeOptions:v=[],argsMemoize:S=dg,argsMemoizeOptions:E=[],devModeChecks:k={}}=d,A=Vw(v),_=Vw(E),b=yL(o),y=m(function(){return l++,p.apply(null,arguments)},...A),O=S(function(){s++;const G=wL(b,arguments);return c=y.apply(null,G),c},..._);return Object.assign(O,{resultFunc:p,memoizedResultFunc:y,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:m,argsMemoize:S})};return Object.assign(r,{withTypes:()=>r}),r}var SL=zS(dg),EL=Object.assign((e,t=SL)=>{vL(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(l=>e[l]);return t(r,(...l)=>l.reduce((s,c,f)=>(s[n[f]]=c,s),{}))},{withTypes:()=>EL});function US(e){return({dispatch:n,getState:r})=>o=>l=>typeof l=="function"?l(n,r,e):o(l)}var CL=US(),kL=US,NL=(...e)=>{const t=zS(...e),n=Object.assign((...r)=>{const o=t(...r),l=(s,...c)=>o(So(s)?MS(s):s,...c);return Object.assign(l,o),l},{withTypes:()=>n});return n};NL(dg);var RL=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Of:Of.apply(null,arguments)};function yl(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Kn(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>oL(r)&&r.type===e,n}var $S=class cs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cs.prototype)}static get[Symbol.species](){return cs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cs(...t[0].concat(this)):new cs(...t.concat(this))}};function Qw(e){return Li(e)?FS(e,()=>{}):e}function Jw(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(Kn(10));const r=n.insert(t,e);return e.set(t,r),r}function PL(e){return typeof e=="boolean"}var OL=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:l=!0}=t??{};let s=new $S;return n&&(PL(n)?s.push(CL):s.push(kL(n.extraArgument))),s},TL="RTK_autoBatch",BS=e=>t=>{setTimeout(t,e)},AL=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:BS(10),IL=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,l=!1,s=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?AL:e.type==="callback"?e.queueNotification:BS(e.timeout),p=()=>{s=!1,l&&(l=!1,c.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const m=()=>o&&d(),v=r.subscribe(m);return c.add(d),()=>{v(),c.delete(d)}},dispatch(d){var m;try{return o=!((m=d==null?void 0:d.meta)!=null&&m[TL]),l=!o,l&&(s||(s=!0,f(p))),r.dispatch(d)}finally{o=!0}}})},DL=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new $S(e);return r&&o.push(IL(typeof r=="object"?r:void 0)),o},LL=!0;function ML(e){const t=OL(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:l=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(ug(n))c=rL(n);else throw new Error(Kn(1));let f;typeof r=="function"?f=r(t):f=t();let p=Of;o&&(p=RL({trace:!LL,...typeof o=="object"&&o}));const d=iL(...f),m=DL(d);let v=typeof s=="function"?s(m):m();const S=p(...v);return OS(c,l,S)}function WS(e){const t={},n=[];let r;const o={addCase(l,s){const c=typeof l=="string"?l:l.type;if(!c)throw new Error(Kn(28));if(c in t)throw new Error(Kn(29));return t[c]=s,o},addMatcher(l,s){return n.push({matcher:l,reducer:s}),o},addDefaultCase(l){return r=l,o}};return e(o),[t,n,r]}function jL(e){return typeof e=="function"}function FL(e,t){let[n,r,o]=WS(t),l;if(jL(e))l=()=>Qw(e());else{const c=Qw(e);l=()=>c}function s(c=l(),f){let p=[n[f.type],...r.filter(({matcher:d})=>d(f)).map(({reducer:d})=>d)];return p.filter(d=>!!d).length===0&&(p=[o]),p.reduce((d,m)=>{if(m)if(So(d)){const S=m(d,f);return S===void 0?d:S}else{if(Li(d))return FS(d,v=>m(v,f));{const v=m(d,f);if(v===void 0){if(d===null)return d;throw new Error(Kn(9))}return v}}return d},c)}return s.getInitialState=l,s}var zL="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",UL=(e=21)=>{let t="",n=e;for(;n--;)t+=zL[Math.random()*64|0];return t},$L=Symbol.for("rtk-slice-createasyncthunk");function BL(e,t){return`${e}/${t}`}function WL({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[$L];return function(o){const{name:l,reducerPath:s=l}=o;if(!l)throw new Error(Kn(11));typeof process<"u";const c=(typeof o.reducers=="function"?o.reducers(GL()):o.reducers)||{},f=Object.keys(c),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(y,O){const I=typeof y=="string"?y:y.type;if(!I)throw new Error(Kn(12));if(I in p.sliceCaseReducersByType)throw new Error(Kn(13));return p.sliceCaseReducersByType[I]=O,d},addMatcher(y,O){return p.sliceMatchers.push({matcher:y,reducer:O}),d},exposeAction(y,O){return p.actionCreators[y]=O,d},exposeCaseReducer(y,O){return p.sliceCaseReducersByName[y]=O,d}};f.forEach(y=>{const O=c[y],I={reducerName:y,type:BL(l,y),createNotation:typeof o.reducers=="function"};YL(O)?VL(I,O,d,t):KL(I,O,d)});function m(){const[y={},O=[],I=void 0]=typeof o.extraReducers=="function"?WS(o.extraReducers):[o.extraReducers],G={...y,...p.sliceCaseReducersByType};return FL(o.initialState,N=>{for(let $ in G)N.addCase($,G[$]);for(let $ of p.sliceMatchers)N.addMatcher($.matcher,$.reducer);for(let $ of O)N.addMatcher($.matcher,$.reducer);I&&N.addDefaultCase(I)})}const v=y=>y,S=new Map;let E;function k(y,O){return E||(E=m()),E(y,O)}function A(){return E||(E=m()),E.getInitialState()}function _(y,O=!1){function I(N){let $=N[y];return typeof $>"u"&&O&&($=A()),$}function G(N=v){const $=Jw(S,O,{insert:()=>new WeakMap});return Jw($,N,{insert:()=>{const F={};for(const[q,te]of Object.entries(o.selectors??{}))F[q]=HL(te,N,A,O);return F}})}return{reducerPath:y,getSelectors:G,get selectors(){return G(I)},selectSlice:I}}const b={name:l,reducer:k,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:A,..._(s),injectInto(y,{reducerPath:O,...I}={}){const G=O??s;return y.inject({reducerPath:G,reducer:k},I),{...b,..._(G,!0)}}};return b}}function HL(e,t,n,r){function o(l,...s){let c=t(l);return typeof c>"u"&&r&&(c=n()),e(c,...s)}return o.unwrapped=e,o}var yd=WL();function GL(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function KL({type:e,reducerName:t,createNotation:n},r,o){let l,s;if("reducer"in r){if(n&&!qL(r))throw new Error(Kn(17));l=r.reducer,s=r.prepare}else l=r;o.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,s?yl(e,s):yl(e))}function YL(e){return e._reducerDefinitionType==="asyncThunk"}function qL(e){return e._reducerDefinitionType==="reducerWithPrepare"}function VL({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Kn(18));const{payloadCreator:l,fulfilled:s,pending:c,rejected:f,settled:p,options:d}=n,m=o(e,l,d);r.exposeAction(t,m),s&&r.addCase(m.fulfilled,s),c&&r.addCase(m.pending,c),f&&r.addCase(m.rejected,f),p&&r.addMatcher(m.settled,p),r.exposeCaseReducer(t,{fulfilled:s||kc,pending:c||kc,rejected:f||kc,settled:p||kc})}function kc(){}var XL=(e,t)=>{if(typeof e!="function")throw new Error(Kn(32))},pg="listenerMiddleware",QL=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:l}=e;if(t)o=yl(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Kn(21));return XL(l),{predicate:o,type:t,effect:l}},JL=Object.assign(e=>{const{type:t,predicate:n,effect:r}=QL(e);return{id:UL(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Kn(22))}}},{withTypes:()=>JL}),ZL=Object.assign(yl(`${pg}/add`),{withTypes:()=>ZL});yl(`${pg}/removeAll`);var e4=Object.assign(yl(`${pg}/remove`),{withTypes:()=>e4});function Kn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const $i=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation())},Jc=e=>{e.target.select()},wl="None",Xr="/a4recipe/",t4={ingredientsGroups:[{groupName:"testing 1",items:[{itemName:"Olive oil",amount:1,unit:"piece"},{itemName:"Banana",amount:1,unit:"piece"},{itemName:"Green olives",amount:1,unit:"piece"},{itemName:"Almonds",amount:1,unit:"piece"},{itemName:"Yellow Bell Pepper",amount:1,unit:"piece"},{itemName:"Water",amount:1,unit:"piece"},{itemName:"Chickpeas",amount:250,unit:"g"}]},{groupName:"test 2",items:[{itemName:"Black beans",amount:1,unit:"piece"},{itemName:"Leek",amount:1,unit:"piece"},{itemName:"Coconut oil",amount:1,unit:"piece"},{itemName:"Yeast",amount:1,unit:"piece"},{itemName:"Baking powder",amount:1,unit:"piece"}]}]},HS=yd({name:"groups",initialState:t4,reducers:{setIngredientsGroups:(e,t)=>t.payload,resetIngredientsGroups:e=>{e.ingredientsGroups=[]},addItemToIngredientGroup:(e,t)=>{const{groupName:n,itemName:r,item:o}=t.payload,l=e.ingredientsGroups.find(s=>s.groupName===n);if(l)if(o)l.items.push(o);else{const s={itemName:r,amount:0,unit:wl};l.items.push(s)}else e.ingredientsGroups.push({groupName:n,items:[{itemName:r,amount:0,unit:wl}]})},removeItemFromIngredientGroup:(e,t)=>{const{groupName:n,itemName:r}=t.payload,o=e.ingredientsGroups.find(l=>l.groupName===n);if(o){const l=o.items.findIndex(s=>s.itemName===r);l!==-1&&o.items.splice(l,1),o.items.length===0&&(e.ingredientsGroups=e.ingredientsGroups.filter(s=>s.groupName!==n))}},updateAmount:(e,t)=>{const{groupName:n,itemName:r,amount:o}=t.payload,l=e.ingredientsGroups.find(c=>c.groupName===n),s=l==null?void 0:l.items.filter(c=>c.itemName===r);s&&(s[0].amount=o)},updateAllmounts:(e,t)=>{for(const n of e.ingredientsGroups)for(const r of n.items)r.amount/=t.payload.divider,r.amount*=t.payload.batch},updateUnit:(e,t)=>{const{groupName:n,itemName:r,unit:o}=t.payload,l=e.ingredientsGroups.find(c=>c.groupName===n),s=l==null?void 0:l.items.filter(c=>c.itemName===r);s&&(s[0].unit=o)}}}),{setIngredientsGroups:n4,resetIngredientsGroups:GS,addItemToIngredientGroup:Lm,removeItemFromIngredientGroup:KS,updateAmount:os,updateAllmounts:Zw,updateUnit:YS}=HS.actions,r4=HS.reducer,ki=["All-purpose flour","Almond flour","Almond milk","Apples","Artichoke","Asparagus","Avocado","Bacon","Baguette","Baking powder","Baking soda","Banana","Barley","Basil","Bay leaves","Beans","Bean sprouts","Beets","Black beans","Black-eyed peas","Black olives","Black pepper","Blueberries","Bread","Bread buns","Bread crumbs","Bread flour","Broccoli","Brown butter","Brown lentils","Brown rice","Brown sugar","Brussels sprouts","Butter","Buttermilk","Cabbage","Cake flour","Candied ginger","Carrots","Cashew nuts","Cauliflower","Celery","Cheddar cheese","Cherries","Chia seeds","Chicken breasts","Chicken broth","Chickpeas","Chili powder","Cilantro","Cinnamon","Cloves","Cocoa nibs","Cocoa powder","Coconut milk","Coconut oil","Condensed milk","Cornmeal","Cornstarch","Corn syrup","Couscous","Cranberries","Cream cheese","Cumin","Dark chocolate","Dill","Eggs","Eggwhite","Fennel","Feta cheese","Fish sauce","Garlic","Gelatin","Ginger","Goat cheese","Grapes","Graham crackers","Greek yogurt","Green beans","Green lentils","Green olives","Ground beef","Ham","Hazelnuts","Heavy cream","Honey","Hot sauce","Kale","Ketchup","Leek","Lemon","Lemon juice","Lemon zest","Lentils","Lima beans","Lime","Macadamia nuts","Maple syrup","Marzipan","Mayonnaise","Milk","Molasses","Mozzarella cheese","Mung beans","Mushrooms","Mustard","Nutmeg","Oats","Olive oil","Onion","Orange","Oregano","Paprika","Parmesan cheese","Parsley","Pasta","Peas","Pecan flour","Pecans","Pecorino cheese","Pineapple","Pine nuts","Poppy seeds","Pork chop","Potatoes","Powdered sugar","Quinoa","Raisins","Raspberries","Red Bell Pepper","Red pepper flakes","Rice","Ricotta cheese","Rosemary","Salmon","Salt","Sausage","Seasoning","Shortening","Sliced bread","Sour cream","Soy sauce","Spinach","Sugar","Swiss cheese","Thyme","Tomato paste","Tomato sauce","Turkey","Vanilla bean","Vanilla extract","Vanilla sugar","Vegetable oil","Vinegar","Water","Walnuts","White chocolate","Whole wheat flour","Yeast","Yellow Bell Pepper","Yogurt","Yolk","Zucchini"],Nc=["mg","g","kg","ml","liter","whole","quart","pint","lbs","oz","tsp","tbsp","cup","can"],ex=[wl,"gallon","piece","slice","strip","drop","dash","smidgen","bunch","jar","stick","clove","head","fillet","block","sheet","pack","packet","bag","bar","cube","handful","bottle","sprig","stalk","ear","bowl","scoop","dozen","pinch"],i4=[{actionName:"Add",time:-1,unit:"min",equipment:"hand"},{actionName:"Bake",time:20,unit:"min",equipment:"oven"},{actionName:"Blanch",time:1,unit:"min",equipment:"stove"},{actionName:"Blend",time:-1,unit:"min",equipment:"blender"},{actionName:"Boil",time:5,unit:"min",equipment:"stove"},{actionName:"Braise",time:10,unit:"min",equipment:"oven"},{actionName:"Broil",time:20,unit:"min",equipment:"broiler"},{actionName:"Chill",time:5,unit:"min",equipment:"hand"},{actionName:"Chop",time:-1,unit:"min",equipment:"knife"},{actionName:"Core",time:-1,unit:"min",equipment:"corer"},{actionName:"Cure",time:5,unit:"hours",equipment:"refrigerator"},{actionName:"Dice",time:-1,unit:"min",equipment:"knife"},{actionName:"Dress",time:-1,unit:"min",equipment:"none"},{actionName:"Emulsify",time:-1,unit:"min",equipment:"blender"},{actionName:"Fold",time:-1,unit:"min",equipment:"spatula"},{actionName:"Ferment",time:24,unit:"hours",equipment:"refrigerator"},{actionName:"Fry",time:5,unit:"min",equipment:"stove"},{actionName:"Garnish",time:-1,unit:"min",equipment:"none"},{actionName:"Glaze",time:-1,unit:"min",equipment:"brush"},{actionName:"Grate",time:-1,unit:"min",equipment:"grater"},{actionName:"Grill",time:20,unit:"min",equipment:"grill"},{actionName:"Infuse",time:-1,unit:"min",equipment:"stove"},{actionName:"Knead",time:10,unit:"min",equipment:"stand mixer"},{actionName:"Marinate",time:8,unit:"hours",equipment:"refrigerator"},{actionName:"Mince",time:-1,unit:"min",equipment:"knife"},{actionName:"Mix",time:-1,unit:"min",equipment:"bowl"},{actionName:"Peel",time:-1,unit:"min",equipment:"peeler"},{actionName:"Poach",time:8,unit:"min",equipment:"stove"},{actionName:"Purée",time:-1,unit:"min",equipment:"food processor"},{actionName:"Roast",time:20,unit:"min",equipment:"oven"},{actionName:"Sauté",time:5,unit:"min",equipment:"stove"},{actionName:"Score",time:-1,unit:"min",equipment:"knife"},{actionName:"Sear",time:2,unit:"min",equipment:"stove"},{actionName:"Season",time:-1,unit:"min",equipment:"none"},{actionName:"Shred",time:-1,unit:"min",equipment:"grater"},{actionName:"Sieve",time:-1,unit:"min",equipment:"sieve"},{actionName:"Simmer",time:30,unit:"min",equipment:"stove"},{actionName:"Slice",time:-1,unit:"min",equipment:"knife"},{actionName:"Smoke",time:2,unit:"hours",equipment:"smoker"},{actionName:"Steam",time:10,unit:"min",equipment:"steamer"},{actionName:"Stew",time:45,unit:"min",equipment:"slow cooker"},{actionName:"Strain",time:-1,unit:"min",equipment:"strainer"},{actionName:"Toast",time:2,unit:"min",equipment:"toaster"},{actionName:"Trim",time:-1,unit:"min",equipment:"knife"},{actionName:"Warm",time:5,unit:"min",equipment:"hand"},{actionName:"Whisk",time:5,unit:"min",equipment:"hand mixer"}],o4={title:"Amazing Vegan Blueberry Pie",currentItem:"",currentGroupName:"",possibleItems:ki,batches:1,invalidState:!1},qS=yd({name:"recipe",initialState:o4,reducers:{setRecipe:(e,t)=>({...t.payload,possibleItems:ki}),resetRecipe:e=>{e.title="",e.currentItem="",e.currentGroupName="",e.possibleItems=ki,e.batches=1,e.invalidState=!1},toggleInvalidState:e=>{e.invalidState=!e.invalidState},nameRecipe:(e,t)=>{e.title=t.payload},nameGroup:(e,t)=>{e.currentGroupName=t.payload},setItem:(e,t)=>{e.currentItem=t.payload},updatePossibleItems:(e,t)=>{e.possibleItems=ki.filter(n=>n.toLowerCase().includes(t.payload.toLowerCase()))},setBatches:(e,t)=>{e.batches=t.payload}}}),{setRecipe:a4,resetRecipe:VS,toggleInvalidState:rz,nameRecipe:l4,nameGroup:XS,setItem:s4,updatePossibleItems:u4,setBatches:c4}=qS.actions,f4=qS.reducer,d4={warning:""},QS=yd({name:"warning",initialState:d4,reducers:{setWarning:(e,t)=>{e.warning=t.payload}}}),{setWarning:Hr}=QS.actions,p4=QS.reducer;function hg(){const e=lt(r=>r.warning.warning),t=wn();R.useEffect(()=>{const r=setTimeout(()=>{t(Hr(""))},4e3);return()=>clearTimeout(r)},[t]);const n=()=>{t(Hr(""))};return C.jsx("div",{className:"toast font-indie",onClick:n,onKeyDown:$i,"data-testid":"snack",children:e})}var Df={exports:{}};/** + */function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function DD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LD(e,t){return e.button===0&&(!t||t==="_self")&&!DD(e)}const MD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],jD="6";try{window.__reactRouterVersion=jD}catch{}function FD(e,t){return Z3({basename:void 0,future:Ys({},void 0,{v7_prependBasename:!0}),history:_3({window:void 0}),hydrationData:zD(),routes:e,mapRouteProperties:AD,unstable_dataStrategy:void 0,window:void 0}).initialize()}function zD(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ys({},t,{errors:UD(t.errors)})),t}function UD(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new rg(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let l=window[o.__subType];if(typeof l=="function")try{let s=new l(o.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let l=new Error(o.message);l.stack="",n[r]=l}}else n[r]=o;return n}const $D=R.createContext({isTransitioning:!1}),BD=R.createContext(new Map),WD="startTransition",zw=Th[WD],HD="flushSync",Uw=b3[HD];function GD(e){zw?zw(e):e()}function is(e){Uw?Uw(e):e()}class KD{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function YD(e){let{fallbackElement:t,router:n,future:r}=e,[o,l]=R.useState(n.state),[s,c]=R.useState(),[f,p]=R.useState({isTransitioning:!1}),[d,m]=R.useState(),[v,S]=R.useState(),[E,k]=R.useState(),A=R.useRef(new Map),{v7_startTransition:_}=r||{},b=R.useCallback(N=>{_?GD(N):N()},[_]),y=R.useCallback((N,$)=>{let{deletedFetchers:F,unstable_flushSync:q,unstable_viewTransitionOpts:te}=$;F.forEach(fe=>A.current.delete(fe)),N.fetchers.forEach((fe,ie)=>{fe.data!==void 0&&A.current.set(ie,fe.data)});let we=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!te||we){q?is(()=>l(N)):b(()=>l(N));return}if(q){is(()=>{v&&(d&&d.resolve(),v.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:te.currentLocation,nextLocation:te.nextLocation})});let fe=n.window.document.startViewTransition(()=>{is(()=>l(N))});fe.finished.finally(()=>{is(()=>{m(void 0),S(void 0),c(void 0),p({isTransitioning:!1})})}),is(()=>S(fe));return}v?(d&&d.resolve(),v.skipTransition(),k({state:N,currentLocation:te.currentLocation,nextLocation:te.nextLocation})):(c(N),p({isTransitioning:!0,flushSync:!1,currentLocation:te.currentLocation,nextLocation:te.nextLocation}))},[n.window,v,d,A,b]);R.useLayoutEffect(()=>n.subscribe(y),[n,y]),R.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new KD)},[f]),R.useEffect(()=>{if(d&&s&&n.window){let N=s,$=d.promise,F=n.window.document.startViewTransition(async()=>{b(()=>l(N)),await $});F.finished.finally(()=>{m(void 0),S(void 0),c(void 0),p({isTransitioning:!1})}),S(F)}},[b,s,d,n.window]),R.useEffect(()=>{d&&s&&o.location.key===s.location.key&&d.resolve()},[d,v,o.location,s]),R.useEffect(()=>{!f.isTransitioning&&E&&(c(E.state),p({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),k(void 0))},[f.isTransitioning,E]),R.useEffect(()=>{},[]);let O=R.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,$,F)=>n.navigate(N,{state:$,preventScrollReset:F==null?void 0:F.preventScrollReset}),replace:(N,$,F)=>n.navigate(N,{replace:!0,state:$,preventScrollReset:F==null?void 0:F.preventScrollReset})}),[n]),I=n.basename||"/",G=R.useMemo(()=>({router:n,navigator:O,static:!1,basename:I}),[n,O,I]);return R.createElement(R.Fragment,null,R.createElement(dd.Provider,{value:G},R.createElement(ES.Provider,{value:o},R.createElement(BD.Provider,{value:A.current},R.createElement($D.Provider,{value:f},R.createElement(TD,{basename:I,location:o.location,navigationType:o.historyAction,navigator:O,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?R.createElement(qD,{routes:n.routes,future:n.future,state:o}):t))))),null)}function qD(e){let{routes:t,future:n,state:r}=e;return wD(t,void 0,r,n)}const VD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,QD=R.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:l,replace:s,state:c,target:f,to:p,preventScrollReset:d,unstable_viewTransition:m}=t,v=ID(t,MD),{basename:S}=R.useContext(ma),E,k=!1;if(typeof p=="string"&&XD.test(p)&&(E=p,VD))try{let y=new URL(window.location.href),O=p.startsWith("//")?new URL(y.protocol+p):new URL(p),I=kl(O.pathname,S);O.origin===y.origin&&I!=null?p=I+O.search+O.hash:k=!0}catch{}let A=gD(p,{relative:o}),_=JD(p,{replace:s,state:c,target:f,preventScrollReset:d,relative:o,unstable_viewTransition:m});function b(y){r&&r(y),y.defaultPrevented||_(y)}return R.createElement("a",Ys({},v,{href:E||A,onClick:k||l?r:b,ref:n,target:f}))});var $w;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($w||($w={}));var Bw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bw||(Bw={}));function JD(e,t){let{target:n,replace:r,state:o,preventScrollReset:l,relative:s,unstable_viewTransition:c}=t===void 0?{}:t,f=sg(),p=pd(),d=NS(e,{relative:s});return R.useCallback(m=>{if(LD(m,n)){m.preventDefault();let v=r!==void 0?r:sa(p)===sa(d);f(e,{replace:v,state:o,preventScrollReset:l,relative:s,unstable_viewTransition:c})}},[p,f,d,r,o,n,e,l,s,c])}function ZD(){return C.jsxs("div",{className:"flex flex-col center h-screen",children:[C.jsx("h1",{className:"text-fluidTitle mb-4",children:"404 Page Not Found"}),C.jsx(QD,{to:"/",style:{fontSize:20,textDecoration:"none",color:"blue"},children:"Back to a4recipe Home"})]})}function mn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eL=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ww=eL,yh=()=>Math.random().toString(36).substring(7).split("").join("."),tL={INIT:`@@redux/INIT${yh()}`,REPLACE:`@@redux/REPLACE${yh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yh()}`},Pf=tL;function ug(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function OS(e,t,n){if(typeof e!="function")throw new Error(mn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(mn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(mn(1));return n(OS)(e,t)}let r=e,o=t,l=new Map,s=l,c=0,f=!1;function p(){s===l&&(s=new Map,l.forEach((A,_)=>{s.set(_,A)}))}function d(){if(f)throw new Error(mn(3));return o}function m(A){if(typeof A!="function")throw new Error(mn(4));if(f)throw new Error(mn(5));let _=!0;p();const b=c++;return s.set(b,A),function(){if(_){if(f)throw new Error(mn(6));_=!1,p(),s.delete(b),l=null}}}function v(A){if(!ug(A))throw new Error(mn(7));if(typeof A.type>"u")throw new Error(mn(8));if(typeof A.type!="string")throw new Error(mn(17));if(f)throw new Error(mn(9));try{f=!0,o=r(o,A)}finally{f=!1}return(l=s).forEach(b=>{b()}),A}function S(A){if(typeof A!="function")throw new Error(mn(10));r=A,v({type:Pf.REPLACE})}function E(){const A=m;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(mn(11));function b(){const O=_;O.next&&O.next(d())}return b(),{unsubscribe:A(b)}},[Ww](){return this}}}return v({type:Pf.INIT}),{dispatch:v,subscribe:m,getState:d,replaceReducer:S,[Ww]:E}}function nL(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Pf.INIT})>"u")throw new Error(mn(12));if(typeof n(void 0,{type:Pf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(mn(13))})}function rL(e){const t=Object.keys(e),n={};for(let l=0;l"u")throw c&&c.type,new Error(mn(14));p[m]=E,f=f||E!==S}return f=f||r.length!==Object.keys(s).length,f?p:s}}function Of(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function iL(...e){return t=>(n,r)=>{const o=t(n,r);let l=()=>{throw new Error(mn(15))};const s={getState:o.getState,dispatch:(f,...p)=>l(f,...p)},c=e.map(f=>f(s));return l=Of(...c)(o.dispatch),{...o,dispatch:l}}}function oL(e){return ug(e)&&"type"in e&&typeof e.type=="string"}var TS=Symbol.for("immer-nothing"),Hw=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state");function Wr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var gl=Object.getPrototypeOf;function So(e){return!!e&&!!e[lr]}function Li(e){var t;return e?AS(e)||Array.isArray(e)||!!e[Hw]||!!((t=e.constructor)!=null&&t[Hw])||md(e)||vd(e):!1}var aL=Object.prototype.constructor.toString();function AS(e){if(!e||typeof e!="object")return!1;const t=gl(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===aL}function Tf(e,t){hd(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function hd(e){const t=e[lr];return t?t.type_:Array.isArray(e)?1:md(e)?2:vd(e)?3:0}function Pm(e,t){return hd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function IS(e,t,n){const r=hd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function lL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function md(e){return e instanceof Map}function vd(e){return e instanceof Set}function Ho(e){return e.copy_||e.base_}function Om(e,t){if(md(e))return new Map(e);if(vd(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=AS(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[lr];let o=Reflect.ownKeys(r);for(let l=0;l1&&(e.set=e.add=e.clear=e.delete=sL),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>cg(r,!0))),e}function sL(){Wr(2)}function gd(e){return Object.isFrozen(e)}var uL={};function ua(e){const t=uL[e];return t||Wr(0,e),t}var qs;function DS(){return qs}function cL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Gw(e,t){t&&(ua("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tm(e){Am(e),e.drafts_.forEach(fL),e.drafts_=null}function Am(e){e===qs&&(qs=e.parent_)}function Kw(e){return qs=cL(qs,e)}function fL(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[lr].modified_&&(Tm(t),Wr(4)),Li(e)&&(e=Af(t,e),t.parent_||If(t,e)),t.patches_&&ua("Patches").generateReplacementPatches_(n[lr].base_,e,t.patches_,t.inversePatches_)):e=Af(t,n,[]),Tm(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==TS?e:void 0}function Af(e,t,n){if(gd(t))return t;const r=t[lr];if(!r)return Tf(t,(o,l)=>qw(e,r,t,o,l,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return If(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let l=o,s=!1;r.type_===3&&(l=new Set(o),o.clear(),s=!0),Tf(l,(c,f)=>qw(e,r,o,c,f,n,s)),If(e,o,!1),n&&e.patches_&&ua("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function qw(e,t,n,r,o,l,s){if(So(o)){const c=l&&t&&t.type_!==3&&!Pm(t.assigned_,r)?l.concat(r):void 0,f=Af(e,o,c);if(IS(n,r,f),So(f))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Li(o)&&!gd(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Af(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&If(e,o)}}function If(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cg(t,n)}function dL(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:DS(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,l=fg;n&&(o=[r],l=Vs);const{revoke:s,proxy:c}=Proxy.revocable(o,l);return r.draft_=c,r.revoke_=s,c}var fg={get(e,t){if(t===lr)return e;const n=Ho(e);if(!Pm(n,t))return pL(e,n,t);const r=n[t];return e.finalized_||!Li(r)?r:r===wh(e.base_,t)?(xh(e),e.copy_[t]=Dm(r,e)):r},has(e,t){return t in Ho(e)},ownKeys(e){return Reflect.ownKeys(Ho(e))},set(e,t,n){const r=LS(Ho(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=wh(Ho(e),t),l=o==null?void 0:o[lr];if(l&&l.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(lL(n,o)&&(n!==void 0||Pm(e.base_,t)))return!0;xh(e),Im(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return wh(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xh(e),Im(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ho(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Wr(11)},getPrototypeOf(e){return gl(e.base_)},setPrototypeOf(){Wr(12)}},Vs={};Tf(fg,(e,t)=>{Vs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Vs.deleteProperty=function(e,t){return Vs.set.call(this,e,t,void 0)};Vs.set=function(e,t,n){return fg.set.call(this,e[0],t,n,e[0])};function wh(e,t){const n=e[lr];return(n?Ho(n):e)[t]}function pL(e,t,n){var o;const r=LS(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function LS(e,t){if(!(t in e))return;let n=gl(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=gl(n)}}function Im(e){e.modified_||(e.modified_=!0,e.parent_&&Im(e.parent_))}function xh(e){e.copy_||(e.copy_=Om(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const l=n;n=t;const s=this;return function(f=l,...p){return s.produce(f,d=>n.call(this,d,...p))}}typeof n!="function"&&Wr(6),r!==void 0&&typeof r!="function"&&Wr(7);let o;if(Li(t)){const l=Kw(this),s=Dm(t,void 0);let c=!0;try{o=n(s),c=!1}finally{c?Tm(l):Am(l)}return Gw(l,r),Yw(o,l)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===TS&&(o=void 0),this.autoFreeze_&&cg(o,!0),r){const l=[],s=[];ua("Patches").generateReplacementPatches_(t,o,l,s),r(l,s)}return o}else Wr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,f=>t(f,...c));let r,o;return[this.produce(t,n,(s,c)=>{r=s,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Li(e)||Wr(8),So(e)&&(e=MS(e));const t=Kw(this),n=Dm(e,void 0);return n[lr].isManual_=!0,Am(t),n}finishDraft(e,t){const n=e&&e[lr];(!n||!n.isManual_)&&Wr(9);const{scope_:r}=n;return Gw(r,t),Yw(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=ua("Patches").applyPatches_;return So(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Dm(e,t){const n=md(e)?ua("MapSet").proxyMap_(e,t):vd(e)?ua("MapSet").proxySet_(e,t):dL(e,t);return(t?t.scope_:DS()).drafts_.push(n),n}function MS(e){return So(e)||Wr(10,e),jS(e)}function jS(e){if(!Li(e)||gd(e))return e;const t=e[lr];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Om(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Om(e,!0);return Tf(n,(r,o)=>{IS(n,r,jS(o))}),t&&(t.finalized_=!1),n}var sr=new hL,FS=sr.produce;sr.produceWithPatches.bind(sr);sr.setAutoFreeze.bind(sr);sr.setUseStrictShallowCopy.bind(sr);sr.applyPatches.bind(sr);sr.createDraft.bind(sr);sr.finishDraft.bind(sr);function mL(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function vL(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function gL(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Vw=e=>Array.isArray(e)?e:[e];function yL(e){const t=Array.isArray(e[0])?e[0]:e;return gL(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function wL(e,t){const n=[],{length:r}=e;for(let o=0;o{n=Cc(),s.resetResultsCount()},s.resultsCount=()=>l,s.resetResultsCount=()=>{l=0},s}function zS(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let l=0,s=0,c,f={},p=o.pop();typeof p=="object"&&(f=p,p=o.pop()),mL(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);const d={...n,...f},{memoize:m,memoizeOptions:v=[],argsMemoize:S=dg,argsMemoizeOptions:E=[],devModeChecks:k={}}=d,A=Vw(v),_=Vw(E),b=yL(o),y=m(function(){return l++,p.apply(null,arguments)},...A),O=S(function(){s++;const G=wL(b,arguments);return c=y.apply(null,G),c},..._);return Object.assign(O,{resultFunc:p,memoizedResultFunc:y,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:m,argsMemoize:S})};return Object.assign(r,{withTypes:()=>r}),r}var SL=zS(dg),EL=Object.assign((e,t=SL)=>{vL(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(l=>e[l]);return t(r,(...l)=>l.reduce((s,c,f)=>(s[n[f]]=c,s),{}))},{withTypes:()=>EL});function US(e){return({dispatch:n,getState:r})=>o=>l=>typeof l=="function"?l(n,r,e):o(l)}var CL=US(),kL=US,NL=(...e)=>{const t=zS(...e),n=Object.assign((...r)=>{const o=t(...r),l=(s,...c)=>o(So(s)?MS(s):s,...c);return Object.assign(l,o),l},{withTypes:()=>n});return n};NL(dg);var RL=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Of:Of.apply(null,arguments)};function yl(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Kn(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>oL(r)&&r.type===e,n}var $S=class cs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cs.prototype)}static get[Symbol.species](){return cs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cs(...t[0].concat(this)):new cs(...t.concat(this))}};function Qw(e){return Li(e)?FS(e,()=>{}):e}function Jw(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(Kn(10));const r=n.insert(t,e);return e.set(t,r),r}function PL(e){return typeof e=="boolean"}var OL=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:l=!0}=t??{};let s=new $S;return n&&(PL(n)?s.push(CL):s.push(kL(n.extraArgument))),s},TL="RTK_autoBatch",BS=e=>t=>{setTimeout(t,e)},AL=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:BS(10),IL=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,l=!1,s=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?AL:e.type==="callback"?e.queueNotification:BS(e.timeout),p=()=>{s=!1,l&&(l=!1,c.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const m=()=>o&&d(),v=r.subscribe(m);return c.add(d),()=>{v(),c.delete(d)}},dispatch(d){var m;try{return o=!((m=d==null?void 0:d.meta)!=null&&m[TL]),l=!o,l&&(s||(s=!0,f(p))),r.dispatch(d)}finally{o=!0}}})},DL=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new $S(e);return r&&o.push(IL(typeof r=="object"?r:void 0)),o},LL=!0;function ML(e){const t=OL(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:l=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(ug(n))c=rL(n);else throw new Error(Kn(1));let f;typeof r=="function"?f=r(t):f=t();let p=Of;o&&(p=RL({trace:!LL,...typeof o=="object"&&o}));const d=iL(...f),m=DL(d);let v=typeof s=="function"?s(m):m();const S=p(...v);return OS(c,l,S)}function WS(e){const t={},n=[];let r;const o={addCase(l,s){const c=typeof l=="string"?l:l.type;if(!c)throw new Error(Kn(28));if(c in t)throw new Error(Kn(29));return t[c]=s,o},addMatcher(l,s){return n.push({matcher:l,reducer:s}),o},addDefaultCase(l){return r=l,o}};return e(o),[t,n,r]}function jL(e){return typeof e=="function"}function FL(e,t){let[n,r,o]=WS(t),l;if(jL(e))l=()=>Qw(e());else{const c=Qw(e);l=()=>c}function s(c=l(),f){let p=[n[f.type],...r.filter(({matcher:d})=>d(f)).map(({reducer:d})=>d)];return p.filter(d=>!!d).length===0&&(p=[o]),p.reduce((d,m)=>{if(m)if(So(d)){const S=m(d,f);return S===void 0?d:S}else{if(Li(d))return FS(d,v=>m(v,f));{const v=m(d,f);if(v===void 0){if(d===null)return d;throw new Error(Kn(9))}return v}}return d},c)}return s.getInitialState=l,s}var zL="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",UL=(e=21)=>{let t="",n=e;for(;n--;)t+=zL[Math.random()*64|0];return t},$L=Symbol.for("rtk-slice-createasyncthunk");function BL(e,t){return`${e}/${t}`}function WL({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[$L];return function(o){const{name:l,reducerPath:s=l}=o;if(!l)throw new Error(Kn(11));typeof process<"u";const c=(typeof o.reducers=="function"?o.reducers(GL()):o.reducers)||{},f=Object.keys(c),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(y,O){const I=typeof y=="string"?y:y.type;if(!I)throw new Error(Kn(12));if(I in p.sliceCaseReducersByType)throw new Error(Kn(13));return p.sliceCaseReducersByType[I]=O,d},addMatcher(y,O){return p.sliceMatchers.push({matcher:y,reducer:O}),d},exposeAction(y,O){return p.actionCreators[y]=O,d},exposeCaseReducer(y,O){return p.sliceCaseReducersByName[y]=O,d}};f.forEach(y=>{const O=c[y],I={reducerName:y,type:BL(l,y),createNotation:typeof o.reducers=="function"};YL(O)?VL(I,O,d,t):KL(I,O,d)});function m(){const[y={},O=[],I=void 0]=typeof o.extraReducers=="function"?WS(o.extraReducers):[o.extraReducers],G={...y,...p.sliceCaseReducersByType};return FL(o.initialState,N=>{for(let $ in G)N.addCase($,G[$]);for(let $ of p.sliceMatchers)N.addMatcher($.matcher,$.reducer);for(let $ of O)N.addMatcher($.matcher,$.reducer);I&&N.addDefaultCase(I)})}const v=y=>y,S=new Map;let E;function k(y,O){return E||(E=m()),E(y,O)}function A(){return E||(E=m()),E.getInitialState()}function _(y,O=!1){function I(N){let $=N[y];return typeof $>"u"&&O&&($=A()),$}function G(N=v){const $=Jw(S,O,{insert:()=>new WeakMap});return Jw($,N,{insert:()=>{const F={};for(const[q,te]of Object.entries(o.selectors??{}))F[q]=HL(te,N,A,O);return F}})}return{reducerPath:y,getSelectors:G,get selectors(){return G(I)},selectSlice:I}}const b={name:l,reducer:k,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:A,..._(s),injectInto(y,{reducerPath:O,...I}={}){const G=O??s;return y.inject({reducerPath:G,reducer:k},I),{...b,..._(G,!0)}}};return b}}function HL(e,t,n,r){function o(l,...s){let c=t(l);return typeof c>"u"&&r&&(c=n()),e(c,...s)}return o.unwrapped=e,o}var yd=WL();function GL(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function KL({type:e,reducerName:t,createNotation:n},r,o){let l,s;if("reducer"in r){if(n&&!qL(r))throw new Error(Kn(17));l=r.reducer,s=r.prepare}else l=r;o.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,s?yl(e,s):yl(e))}function YL(e){return e._reducerDefinitionType==="asyncThunk"}function qL(e){return e._reducerDefinitionType==="reducerWithPrepare"}function VL({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Kn(18));const{payloadCreator:l,fulfilled:s,pending:c,rejected:f,settled:p,options:d}=n,m=o(e,l,d);r.exposeAction(t,m),s&&r.addCase(m.fulfilled,s),c&&r.addCase(m.pending,c),f&&r.addCase(m.rejected,f),p&&r.addMatcher(m.settled,p),r.exposeCaseReducer(t,{fulfilled:s||kc,pending:c||kc,rejected:f||kc,settled:p||kc})}function kc(){}var XL=(e,t)=>{if(typeof e!="function")throw new Error(Kn(32))},pg="listenerMiddleware",QL=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:l}=e;if(t)o=yl(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Kn(21));return XL(l),{predicate:o,type:t,effect:l}},JL=Object.assign(e=>{const{type:t,predicate:n,effect:r}=QL(e);return{id:UL(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Kn(22))}}},{withTypes:()=>JL}),ZL=Object.assign(yl(`${pg}/add`),{withTypes:()=>ZL});yl(`${pg}/removeAll`);var e4=Object.assign(yl(`${pg}/remove`),{withTypes:()=>e4});function Kn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const $i=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation())},Jc=e=>{e.target.select()},wl="None",Xr="/a4recipe/",t4={ingredientsGroups:[]},HS=yd({name:"groups",initialState:t4,reducers:{setIngredientsGroups:(e,t)=>t.payload,resetIngredientsGroups:e=>{e.ingredientsGroups=[]},addItemToIngredientGroup:(e,t)=>{const{groupName:n,itemName:r,item:o}=t.payload,l=e.ingredientsGroups.find(s=>s.groupName===n);if(l)if(o)l.items.push(o);else{const s={itemName:r,amount:0,unit:wl};l.items.push(s)}else e.ingredientsGroups.push({groupName:n,items:[{itemName:r,amount:0,unit:wl}]})},removeItemFromIngredientGroup:(e,t)=>{const{groupName:n,itemName:r}=t.payload,o=e.ingredientsGroups.find(l=>l.groupName===n);if(o){const l=o.items.findIndex(s=>s.itemName===r);l!==-1&&o.items.splice(l,1),o.items.length===0&&(e.ingredientsGroups=e.ingredientsGroups.filter(s=>s.groupName!==n))}},updateAmount:(e,t)=>{const{groupName:n,itemName:r,amount:o}=t.payload,l=e.ingredientsGroups.find(c=>c.groupName===n),s=l==null?void 0:l.items.filter(c=>c.itemName===r);s&&(s[0].amount=o)},updateAllmounts:(e,t)=>{for(const n of e.ingredientsGroups)for(const r of n.items)r.amount/=t.payload.divider,r.amount*=t.payload.batch},updateUnit:(e,t)=>{const{groupName:n,itemName:r,unit:o}=t.payload,l=e.ingredientsGroups.find(c=>c.groupName===n),s=l==null?void 0:l.items.filter(c=>c.itemName===r);s&&(s[0].unit=o)}}}),{setIngredientsGroups:n4,resetIngredientsGroups:GS,addItemToIngredientGroup:Lm,removeItemFromIngredientGroup:KS,updateAmount:os,updateAllmounts:Zw,updateUnit:YS}=HS.actions,r4=HS.reducer,ki=["All-purpose flour","Almond flour","Almond milk","Apples","Artichoke","Asparagus","Avocado","Bacon","Baguette","Baking powder","Baking soda","Banana","Barley","Basil","Bay leaves","Beans","Bean sprouts","Beets","Black beans","Black-eyed peas","Black olives","Black pepper","Blueberries","Bread","Bread buns","Bread crumbs","Bread flour","Broccoli","Brown butter","Brown lentils","Brown rice","Brown sugar","Brussels sprouts","Butter","Buttermilk","Cabbage","Cake flour","Candied ginger","Carrots","Cashew nuts","Cauliflower","Celery","Cheddar cheese","Cherries","Chia seeds","Chicken breasts","Chicken broth","Chickpeas","Chili powder","Cilantro","Cinnamon","Cloves","Cocoa nibs","Cocoa powder","Coconut milk","Coconut oil","Condensed milk","Cornmeal","Cornstarch","Corn syrup","Couscous","Cranberries","Cream cheese","Cumin","Dark chocolate","Dill","Eggs","Eggwhite","Fennel","Feta cheese","Fish sauce","Garlic","Gelatin","Ginger","Goat cheese","Grapes","Graham crackers","Greek yogurt","Green beans","Green lentils","Green olives","Ground beef","Ham","Hazelnuts","Heavy cream","Honey","Hot sauce","Kale","Ketchup","Leek","Lemon","Lemon juice","Lemon zest","Lentils","Lima beans","Lime","Macadamia nuts","Maple syrup","Marzipan","Mayonnaise","Milk","Molasses","Mozzarella cheese","Mung beans","Mushrooms","Mustard","Nutmeg","Oats","Olive oil","Onion","Orange","Oregano","Paprika","Parmesan cheese","Parsley","Pasta","Peas","Pecan flour","Pecans","Pecorino cheese","Pineapple","Pine nuts","Poppy seeds","Pork chop","Potatoes","Powdered sugar","Quinoa","Raisins","Raspberries","Red Bell Pepper","Red pepper flakes","Rice","Ricotta cheese","Rosemary","Salmon","Salt","Sausage","Seasoning","Shortening","Sliced bread","Sour cream","Soy sauce","Spinach","Sugar","Swiss cheese","Thyme","Tomato paste","Tomato sauce","Turkey","Vanilla bean","Vanilla extract","Vanilla sugar","Vegetable oil","Vinegar","Water","Walnuts","White chocolate","Whole wheat flour","Yeast","Yellow Bell Pepper","Yogurt","Yolk","Zucchini"],Nc=["mg","g","kg","ml","liter","whole","quart","pint","lbs","oz","tsp","tbsp","cup","can"],ex=[wl,"gallon","piece","slice","strip","drop","dash","smidgen","bunch","jar","stick","clove","head","fillet","block","sheet","pack","packet","bag","bar","cube","handful","bottle","sprig","stalk","ear","bowl","scoop","dozen","pinch"],i4=[{actionName:"Add",time:-1,unit:"min",equipment:"hand"},{actionName:"Bake",time:20,unit:"min",equipment:"oven"},{actionName:"Blanch",time:1,unit:"min",equipment:"stove"},{actionName:"Blend",time:-1,unit:"min",equipment:"blender"},{actionName:"Boil",time:5,unit:"min",equipment:"stove"},{actionName:"Braise",time:10,unit:"min",equipment:"oven"},{actionName:"Broil",time:20,unit:"min",equipment:"broiler"},{actionName:"Chill",time:5,unit:"min",equipment:"hand"},{actionName:"Chop",time:-1,unit:"min",equipment:"knife"},{actionName:"Core",time:-1,unit:"min",equipment:"corer"},{actionName:"Cure",time:5,unit:"hours",equipment:"refrigerator"},{actionName:"Dice",time:-1,unit:"min",equipment:"knife"},{actionName:"Dress",time:-1,unit:"min",equipment:"none"},{actionName:"Emulsify",time:-1,unit:"min",equipment:"blender"},{actionName:"Fold",time:-1,unit:"min",equipment:"spatula"},{actionName:"Ferment",time:24,unit:"hours",equipment:"refrigerator"},{actionName:"Fry",time:5,unit:"min",equipment:"stove"},{actionName:"Garnish",time:-1,unit:"min",equipment:"none"},{actionName:"Glaze",time:-1,unit:"min",equipment:"brush"},{actionName:"Grate",time:-1,unit:"min",equipment:"grater"},{actionName:"Grill",time:20,unit:"min",equipment:"grill"},{actionName:"Infuse",time:-1,unit:"min",equipment:"stove"},{actionName:"Knead",time:10,unit:"min",equipment:"stand mixer"},{actionName:"Marinate",time:8,unit:"hours",equipment:"refrigerator"},{actionName:"Mince",time:-1,unit:"min",equipment:"knife"},{actionName:"Mix",time:-1,unit:"min",equipment:"bowl"},{actionName:"Peel",time:-1,unit:"min",equipment:"peeler"},{actionName:"Poach",time:8,unit:"min",equipment:"stove"},{actionName:"Purée",time:-1,unit:"min",equipment:"food processor"},{actionName:"Roast",time:20,unit:"min",equipment:"oven"},{actionName:"Sauté",time:5,unit:"min",equipment:"stove"},{actionName:"Score",time:-1,unit:"min",equipment:"knife"},{actionName:"Sear",time:2,unit:"min",equipment:"stove"},{actionName:"Season",time:-1,unit:"min",equipment:"none"},{actionName:"Shred",time:-1,unit:"min",equipment:"grater"},{actionName:"Sieve",time:-1,unit:"min",equipment:"sieve"},{actionName:"Simmer",time:30,unit:"min",equipment:"stove"},{actionName:"Slice",time:-1,unit:"min",equipment:"knife"},{actionName:"Smoke",time:2,unit:"hours",equipment:"smoker"},{actionName:"Steam",time:10,unit:"min",equipment:"steamer"},{actionName:"Stew",time:45,unit:"min",equipment:"slow cooker"},{actionName:"Strain",time:-1,unit:"min",equipment:"strainer"},{actionName:"Toast",time:2,unit:"min",equipment:"toaster"},{actionName:"Trim",time:-1,unit:"min",equipment:"knife"},{actionName:"Warm",time:5,unit:"min",equipment:"hand"},{actionName:"Whisk",time:5,unit:"min",equipment:"hand mixer"}],o4={title:"",currentItem:"",currentGroupName:"",possibleItems:ki,batches:1,invalidState:!1},qS=yd({name:"recipe",initialState:o4,reducers:{setRecipe:(e,t)=>({...t.payload,possibleItems:ki}),resetRecipe:e=>{e.title="",e.currentItem="",e.currentGroupName="",e.possibleItems=ki,e.batches=1,e.invalidState=!1},toggleInvalidState:e=>{e.invalidState=!e.invalidState},nameRecipe:(e,t)=>{e.title=t.payload},nameGroup:(e,t)=>{e.currentGroupName=t.payload},setItem:(e,t)=>{e.currentItem=t.payload},updatePossibleItems:(e,t)=>{e.possibleItems=ki.filter(n=>n.toLowerCase().includes(t.payload.toLowerCase()))},setBatches:(e,t)=>{e.batches=t.payload}}}),{setRecipe:a4,resetRecipe:VS,toggleInvalidState:rz,nameRecipe:l4,nameGroup:XS,setItem:s4,updatePossibleItems:u4,setBatches:c4}=qS.actions,f4=qS.reducer,d4={warning:""},QS=yd({name:"warning",initialState:d4,reducers:{setWarning:(e,t)=>{e.warning=t.payload}}}),{setWarning:Hr}=QS.actions,p4=QS.reducer;function hg(){const e=lt(r=>r.warning.warning),t=wn();R.useEffect(()=>{const r=setTimeout(()=>{t(Hr(""))},4e3);return()=>clearTimeout(r)},[t]);const n=()=>{t(Hr(""))};return C.jsx("div",{className:"toast font-indie",onClick:n,onKeyDown:$i,"data-testid":"snack",children:e})}var Df={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -883,7 +883,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `+o:"")+` The above lifecycles should be removed. Learn more about this warning here: -https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=z2,t.componentWillReceiveProps=U2),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=$2;var c=t.componentDidUpdate;t.componentDidUpdate=function(p,d,m){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:m;c.call(this,p,d,v)}}return e}const Sj=Object.freeze(Object.defineProperty({__proto__:null,polyfill:_j},Symbol.toStringTag,{value:"Module"})),Ej=CT(Sj);Object.defineProperty(da,"__esModule",{value:!0});da.bodyOpenClassName=da.portalClassName=void 0;var Tx=Object.assign||function(e){for(var t=1;t{r(c=>(c+1)%ki.length)},[]),l=R.useCallback(()=>{r(c=>c===0?ki.length-1:c-1)},[]),s=R.useCallback(c=>{c.key==="ArrowRight"?o():c.key==="ArrowLeft"&&l()},[o,l]);return R.useEffect(()=>(e?document.addEventListener("keydown",s):document.removeEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}),[e,s]),jx.setAppElement(document.getElementById("root")),C.jsx(jx,{isOpen:e,onRequestClose:()=>t(),className:"modal-container",overlayClassName:"modal-overlay",shouldCloseOnOverlayClick:!0,children:C.jsxs("div",{className:"modal-content",children:[C.jsx("button",{type:"button",className:"close-modal-button",onClick:()=>t(),children:C.jsx(Yn,{icon:wd,className:"nav-icon"})}),C.jsx("span",{className:"modal-image-title",children:ki[n]}),C.jsx("img",{src:`${Xr}/assets/ingredients/${ki[n].toLowerCase()}.webp`,alt:`${ki[n]}`,className:"modal-image"}),C.jsxs("div",{className:"modal-nav-buttons",children:[C.jsx("button",{type:"button",className:"nav-button prev",onClick:l,children:C.jsx(Yn,{icon:I4,className:"nav-icon"})}),C.jsx("button",{type:"button",className:"nav-button next",onClick:o,children:C.jsx(Yn,{icon:D4,className:"nav-icon"})})]})]})})}const zj=R.lazy(()=>P4(()=>import("./IngredientGalleryItem-Bb9sRztt.js"),[]));function Uj(){const[e,t]=R.useState(!1),n=lt(o=>o.recipe.possibleItems),r=n.length<5?"flex flex-row gap-x-8":"grid-autofill";return C.jsxs(C.Fragment,{children:[!e&&C.jsxs("div",{className:"modal-open-button",onClick:()=>t(!0),onKeyDown:$i,children:["CLICK ME",C.jsx("br",{}),'to say "Wow"',C.jsx("br",{}),'and "Ooooh"']}),C.jsx(Fj,{isOpen:e,onClose:()=>t(!1)}),C.jsx("div",{className:"flex flex-row overflow-auto no-scrollbar justify-evenly",children:C.jsx("div",{className:`flex flex-row flex-wrap center gap-y-8 gap-x-4 ${r}`,children:n.map(o=>C.jsx(R.Suspense,{fallback:C.jsx("div",{className:"suspense-gallery-item","data-testid":`${o}_suspense`,children:""}),children:C.jsx(zj,{item:{itemName:o,amount:0,unit:wl}})},`${o}_suspense`))})})]})}function $j(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r))},t)}const Cd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ol(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ag(e){return"nodeType"in e}function Ln(e){var t,n;return e?Ol(e)?e:Ag(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ig(e){const{Document:t}=Ln(e);return e instanceof t}function gu(e){return Ol(e)?!1:e instanceof Ln(e).HTMLElement}function W2(e){return e instanceof Ln(e).SVGElement}function Tl(e){return e?Ol(e)?e.document:Ag(e)?Ig(e)?e:gu(e)||W2(e)?e.ownerDocument:document:document:document}const Qr=Cd?R.useLayoutEffect:R.useEffect;function kd(e){const t=R.useRef(e);return Qr(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=R.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ru(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return Qr(()=>{n.current!==e&&(n.current=e)},t),n}function yu(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Bf(e){const t=kd(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Wf(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let kh={};function Nd(e,t){return R.useMemo(()=>{if(t)return t;const n=kh[e]==null?0:kh[e]+1;return kh[e]=n,e+"-"+n},[e,t])}function H2(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const c=Object.entries(s);for(const[f,p]of c){const d=l[f];d!=null&&(l[f]=d+e*p)}return l},{...t})}}const sl=H2(1),Hf=H2(-1);function Wj(e){return"clientX"in e&&"clientY"in e}function Rd(e){if(!e)return!1;const{KeyboardEvent:t}=Ln(e.target);return t&&e instanceof t}function Hj(e){if(!e)return!1;const{TouchEvent:t}=Ln(e.target);return t&&e instanceof t}function Gf(e){if(Hj(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Wj(e)?{x:e.clientX,y:e.clientY}:null}const zi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[zi.Translate.toString(e),zi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Fx="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Gj(e){return e.matches(Fx)?e:e.querySelector(Fx)}const Kj={display:"none"};function Yj(e){let{id:t,value:n}=e;return pt.createElement("div",{id:t,style:Kj},n)}function qj(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return pt.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Vj(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const G2=R.createContext(null);function Xj(e){const t=R.useContext(G2);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function Qj(){const[e]=R.useState(()=>new Set),t=R.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[R.useCallback(r=>{let{type:o,event:l}=r;e.forEach(s=>{var c;return(c=s[o])==null?void 0:c.call(s,l)})},[e]),t]}const Jj={draggable:` +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=z2,t.componentWillReceiveProps=U2),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=$2;var c=t.componentDidUpdate;t.componentDidUpdate=function(p,d,m){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:m;c.call(this,p,d,v)}}return e}const Sj=Object.freeze(Object.defineProperty({__proto__:null,polyfill:_j},Symbol.toStringTag,{value:"Module"})),Ej=CT(Sj);Object.defineProperty(da,"__esModule",{value:!0});da.bodyOpenClassName=da.portalClassName=void 0;var Tx=Object.assign||function(e){for(var t=1;t{r(c=>(c+1)%ki.length)},[]),l=R.useCallback(()=>{r(c=>c===0?ki.length-1:c-1)},[]),s=R.useCallback(c=>{c.key==="ArrowRight"?o():c.key==="ArrowLeft"&&l()},[o,l]);return R.useEffect(()=>(e?document.addEventListener("keydown",s):document.removeEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}),[e,s]),jx.setAppElement(document.getElementById("root")),C.jsx(jx,{isOpen:e,onRequestClose:()=>t(),className:"modal-container",overlayClassName:"modal-overlay",shouldCloseOnOverlayClick:!0,children:C.jsxs("div",{className:"modal-content",children:[C.jsx("button",{type:"button",className:"close-modal-button",onClick:()=>t(),children:C.jsx(Yn,{icon:wd,className:"nav-icon"})}),C.jsx("span",{className:"modal-image-title",children:ki[n]}),C.jsx("img",{src:`${Xr}/assets/ingredients/${ki[n].toLowerCase()}.webp`,alt:`${ki[n]}`,className:"modal-image"}),C.jsxs("div",{className:"modal-nav-buttons",children:[C.jsx("button",{type:"button",className:"nav-button prev",onClick:l,children:C.jsx(Yn,{icon:I4,className:"nav-icon"})}),C.jsx("button",{type:"button",className:"nav-button next",onClick:o,children:C.jsx(Yn,{icon:D4,className:"nav-icon"})})]})]})})}const zj=R.lazy(()=>P4(()=>import("./IngredientGalleryItem-C3Dk2jml.js"),[]));function Uj(){const[e,t]=R.useState(!1),n=lt(o=>o.recipe.possibleItems),r=n.length<5?"flex flex-row gap-x-8":"grid-autofill";return C.jsxs(C.Fragment,{children:[!e&&C.jsxs("div",{className:"modal-open-button",onClick:()=>t(!0),onKeyDown:$i,children:["CLICK ME",C.jsx("br",{}),'to say "Wow"',C.jsx("br",{}),'and "Ooooh"']}),C.jsx(Fj,{isOpen:e,onClose:()=>t(!1)}),C.jsx("div",{className:"flex flex-row overflow-auto no-scrollbar justify-evenly",children:C.jsx("div",{className:`flex flex-row flex-wrap center gap-y-8 gap-x-4 ${r}`,children:n.map(o=>C.jsx(R.Suspense,{fallback:C.jsx("div",{className:"suspense-gallery-item","data-testid":`${o}_suspense`,children:""}),children:C.jsx(zj,{item:{itemName:o,amount:0,unit:wl}})},`${o}_suspense`))})})]})}function $j(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r))},t)}const Cd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ol(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ag(e){return"nodeType"in e}function Ln(e){var t,n;return e?Ol(e)?e:Ag(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ig(e){const{Document:t}=Ln(e);return e instanceof t}function gu(e){return Ol(e)?!1:e instanceof Ln(e).HTMLElement}function W2(e){return e instanceof Ln(e).SVGElement}function Tl(e){return e?Ol(e)?e.document:Ag(e)?Ig(e)?e:gu(e)||W2(e)?e.ownerDocument:document:document:document}const Qr=Cd?R.useLayoutEffect:R.useEffect;function kd(e){const t=R.useRef(e);return Qr(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=R.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ru(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return Qr(()=>{n.current!==e&&(n.current=e)},t),n}function yu(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Bf(e){const t=kd(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Wf(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let kh={};function Nd(e,t){return R.useMemo(()=>{if(t)return t;const n=kh[e]==null?0:kh[e]+1;return kh[e]=n,e+"-"+n},[e,t])}function H2(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const c=Object.entries(s);for(const[f,p]of c){const d=l[f];d!=null&&(l[f]=d+e*p)}return l},{...t})}}const sl=H2(1),Hf=H2(-1);function Wj(e){return"clientX"in e&&"clientY"in e}function Rd(e){if(!e)return!1;const{KeyboardEvent:t}=Ln(e.target);return t&&e instanceof t}function Hj(e){if(!e)return!1;const{TouchEvent:t}=Ln(e.target);return t&&e instanceof t}function Gf(e){if(Hj(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Wj(e)?{x:e.clientX,y:e.clientY}:null}const zi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[zi.Translate.toString(e),zi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Fx="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Gj(e){return e.matches(Fx)?e:e.querySelector(Fx)}const Kj={display:"none"};function Yj(e){let{id:t,value:n}=e;return pt.createElement("div",{id:t,style:Kj},n)}function qj(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return pt.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Vj(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const G2=R.createContext(null);function Xj(e){const t=R.useContext(G2);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function Qj(){const[e]=R.useState(()=>new Set),t=R.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[R.useCallback(r=>{let{type:o,event:l}=r;e.forEach(s=>{var c;return(c=s[o])==null?void 0:c.call(s,l)})},[e]),t]}const Jj={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. diff --git a/index.html b/index.html index 24bc98d..74b8c31 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ a4recipe - +