1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7560],{1767:(e,t,a)=>{a.d(t,{V:()=>s});var n=a(5347),r=a(6641),i=a(24917);function l(){let e=(0,n._)(["\n query GetMeCollections {\n me {\n id\n collections {\n ...UserCollection\n }\n }\n }\n ","\n"]);return l=function(){return e},e}let s=(0,r.J1)(l(),i.L)},3884:(e,t,a)=>{a.d(t,{A:()=>j});var n=a(17121),r=a(73901),i=a(97451),l=a(95749),s=a(64567),o=a(14890),d=a(23062);function c(e){let{title:t,description:a,showLoginPrompt:r,setShowLoginPrompt:i,handleLoginClick:l,icon:c}=e;return(0,n.jsx)(d.lG,{open:r,onOpenChange:e=>{i(e)},children:(0,n.jsxs)(d.Cf,{className:"w-full max-w-[90vw] rounded-lg p-0 text-center sm:max-w-[500px]",children:[(0,n.jsxs)("div",{className:"p-2 md:p-4",children:[(0,n.jsxs)(d.c7,{className:"relative text-center",children:[(0,n.jsx)(d.HM,{className:"absolute right-0 top-0 rounded p-1 hover:bg-gray-100",children:(0,n.jsx)(s.A,{className:"size-5 text-gray-500",strokeWidth:1.5})}),(0,n.jsx)("div",{className:"mb-6 mt-2 flex justify-center",children:(0,n.jsx)("div",{className:"bg-accent-light flex size-14 items-center justify-center rounded-full",children:c})}),(0,n.jsx)(d.L3,{className:"mb-4 text-center text-xl font-medium text-gray-900",children:t})]}),(0,n.jsx)(d.rr,{className:"text-center text-base leading-relaxed text-gray-600",children:a})]}),(0,n.jsx)("div",{className:"bg-cream w-full rounded-b-lg py-4",children:(0,n.jsx)(o.A,{onClick:l,children:"Jetzt anmelden"})})]})})}function u(e){var t,a;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",stroke:null!=(t=e.stroke)?t:"#333333",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:null!=(a=e.strokeWidth)?a:1.5,viewBox:"0 -1 24 24",className:"lucide lucide-heart-icon lucide-heart",...e,children:(0,n.jsx)("path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"})})}var m=a(79328);function p(e){let{isSaved:t,bookmarkCount:a,variant:r,onClick:i,className:s}=e,d=(0,l.useMemo)(()=>"teaser"===r?"plain":"recipeAufmacherOverlay"===r||"userCollectionOverlay"===r?"overlay":"recipeHeader"===r?"save-to-collection":void 0,[r]),c=t?(null!=a?a:0)+1:null!=a?a:0;return(0,n.jsxs)(o.A,{onClick:i,variant:d,className:(0,m.A)("group flex items-center justify-center gap-0.5 p-0",{"backdrop-blur-xs absolute left-2 top-2 bg-white/60 px-4 py-2 hover:bg-white/60":"recipeAufmacherOverlay"===r,"backdrop-blur-xs bg-white/60 px-4 py-2 hover:bg-white/60":"userCollectionOverlay"===r},s),children:[(0,n.jsx)("div",{className:(0,m.A)("h-[1.6rem] w-[1.6rem]",{"size-5":"userCollectionOverlay"==r||"recipeHeader"===r}),children:(0,n.jsx)(u,{className:(0,m.A)("transition-transform duration-200",t&&"hover:scale-120 -mt-[0.05rem] size-[1.6rem] fill-red-500 stroke-red-500 hover:animate-none group-hover:fill-transparent",!t&&"size-6 hover:scale-110 group-hover:fill-red-500 group-hover:stroke-red-500",{"fill-white stroke-white hover:fill-transparent":"recipeHeader"===r&&t,"fill-none stroke-white group-hover:fill-white group-hover:stroke-white":"recipeHeader"===r&&!t,"-mt-0.5 size-5":"userCollectionOverlay"==r||"recipeHeader"===r}),strokeWidth:1.5,...t?{stroke:"#333"}:{}})}),void 0!==a&&c>0&&(0,n.jsx)("span",{className:(0,m.A)("text-gray-ebd-400 min-w-3 font-medium",{"-mb-1 text-xs":"teaser"===r,"-mb-0.5 text-sm":"recipeAufmacherOverlay"===r}),children:c}),("recipeHeader"===r||"userCollectionOverlay"===r)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("span",{className:"text-sm lg:text-base",children:t?"Gespeichert":"Speichern"})})]})}var f=a(65605),h=a(1767),g=a(64082),x=a(52238),v=a(10667),y=a(20964),w=a(49152),N=a(3875);let b=(0,i.default)(()=>Promise.all([a.e(2173),a.e(8368),a.e(96),a.e(2410)]).then(a.bind(a,98747)),{loadableGenerated:{webpack:()=>[98747]},ssr:!1});function j(e){var t,a;let{recipeId:i,recipeName:s,onDelete:o,variant:m,bookmarkCount:j,buttonClassName:A}=e,[k,{data:_,loading:C}]=(0,r._)(h.V,{fetchPolicy:"cache-and-network"}),[S,z]=(0,l.useState)(!1),[L,O]=(0,l.useState)(!1),R=(0,N.Lg)(),E=(0,w.n)(e=>e.setAuthDialogOpen),I=function(){let e=(0,v.S)(),t=(0,g.usePathname)(),a=(0,g.useSearchParams)(),{siteName:n}=(0,x.r)();return r=>{var i,l,s,o;let{recipeId:d,recipeName:c,environment:u,placement:m,buttonOption:p}=r;(0,y.d_)({pathname:t,searchParams:a,appName:n,pageId:null!=(l=null==(i=e.entityId)?void 0:i.toString())?l:"no-node",pageCategory:null!=(s=e.primaryTopic)?s:"not-set",savedRecipeId:d.toString(),savedRecipeName:c,environment:u&&null!=(o=({teaser:"Teaser",recipeAufmacherOverlay:"WithinRecipe",recipeHeader:"WithinRecipe",userCollectionOverlay:"Collection"})[u])?o:"undefined",placement:null!=m?m:"undefined",buttonOption:p})}}(),{userData:M}=(0,f.u)(),D=null!=(a=null==M||null==(t=M.allSavedRecipeIds)?void 0:t.some(e=>e===(null==i?void 0:i.toString())))&&a;(0,l.useEffect)(()=>{sessionStorage.getItem("recipeToSaveAfterLogin")!==i.toString()||R.loading||!R.doesSessionExist||S||(sessionStorage.removeItem("recipeToSaveAfterLogin"),(async()=>{await k(),z(!0)})())},[R.loading,R,S,i,k]);let H=async()=>{I({recipeId:i,recipeName:s,environment:m,buttonOption:D?"remove":"save"}),!R.loading&&R.doesSessionExist&&await k()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(d.lG,{open:S,onOpenChange:()=>{R.loading||R.doesSessionExist||S?z(e=>!e):O(!0)},children:[(0,n.jsx)(d.zM,{asChild:!0,children:(0,n.jsx)(p,{isSaved:D,onClick:H,variant:m,bookmarkCount:j,className:A})}),S&&(0,n.jsx)(b,{recipeId:i,recipeName:s,collectionsData:_,collectionsLoading:C,setIsOpen:z,onDelete:o})]}),L&&(0,n.jsx)(c,{title:"Rezept zu Sammlungen hinzuf\xfcgen oder entfernen",description:"Du musst dich anmelden, um Rezepte in deinen Sammlungen speichern zu k\xf6nnen.",showLoginPrompt:L,setShowLoginPrompt:O,handleLoginClick:()=>{O(!1),sessionStorage.setItem("recipeToSaveAfterLogin",i.toString()),E(!0)},icon:(0,n.jsx)(u,{className:"size-8",stroke:"#fff"})})]})}},9101:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(17121),r=a(19057);function i(e){let{alt:t,width:a,height:i,src:l,...s}=e;return(0,n.jsx)(r.default,{width:null!=a?a:0,height:null!=i?i:0,src:null!=l?l:"",alt:null!=t?t:"",...s})}},23062:(e,t,a)=>{a.d(t,{Cf:()=>p,Es:()=>h,HM:()=>u,L3:()=>g,c7:()=>f,lG:()=>o,rr:()=>x,zM:()=>d});var n=a(17121),r=a(10854),i=a(64567),l=a(95749),s=a(79328);let o=r.bL,d=r.l9,c=r.ZL,u=r.bm,m=l.forwardRef((e,t)=>
1{let{className:a,...i}=e;return(0,n.jsx)(r.hJ,{ref:t,className:(0,s.A)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 z-100 fixed inset-0 bg-black/60",a),...i})});m.displayName=r.hJ.displayName;let p=l.forwardRef((e,t)=>{let{className:a,showCloseButton:l,children:o,...d}=e;return(0,n.jsxs)(c,{children:[(0,n.jsx)(m,{}),(0,n.jsxs)(r.UC,{ref:t,className:(0,s.A)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-100 fixed left-[50%] top-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",a),...d,children:[o,l&&(0,n.jsxs)(r.bm,{"data-testid":"dialog-close-button",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground focus:outline-hidden absolute right-4 top-4 rounded-full bg-gray-200 p-1.5 opacity-70 transition-opacity hover:bg-gray-200/90 hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[(0,n.jsx)(i.A,{className:"size-5 text-gray-700",strokeWidth:3}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});function f(e){let{className:t,...a}=e;return(0,n.jsx)("div",{className:(0,s.A)("flex flex-col text-center sm:text-left",t),...a})}function h(e){let{className:t,...a}=e;return(0,n.jsx)("div",{className:(0,s.A)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})}p.displayName=r.UC.displayName,l.forwardRef((e,t)=>{let{className:a,style:r,...i}=e,[o,d]=(0,l.useState)(()=>{if(!window.visualViewport)return{};let e=window.visualViewport;return{top:"".concat(e.offsetTop+e.height/2,"px"),maxHeight:"".concat(e.height-32,"px")}});return(0,l.useEffect)(()=>{let e=window.visualViewport;if(!e)return;let t=()=>{d({top:"".concat(e.offsetTop+e.height/2,"px"),maxHeight:"".concat(e.height-32,"px")})};return e.addEventListener("resize",t),e.addEventListener("scroll",t),()=>{e.removeEventListener("resize",t),e.removeEventListener("scroll",t)}},[]),(0,n.jsx)(p,{ref:t,className:(0,s.A)("overflow-y-auto",a),style:{...o,...r},...i})}).displayName="DialogContentKeyboardAware",f.displayName="DialogHeader",h.displayName="DialogFooter";let g=l.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,n.jsx)(r.hE,{ref:t,className:(0,s.A)("text-lg font-semibold leading-none tracking-tight",a),...i})});g.displayName=r.hE.displayName;let x=l.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,n.jsx)(r.VY,{ref:t,className:(0,s.A)("text-muted-foreground text-sm",a),...i})});x.displayName=r.VY.displayName},24917:(e,t,a)=>{a.d(t,{L:()=>i});var n=a(5347);function r(){let e=(0,n._)(["\n fragment UserCollection on UserCollection {\n id\n __typename\n name\n changed\n entity\n language\n createdAt\n updatedAt\n published\n recipeItems {\n recipeId\n createdAt\n }\n title\n url\n isOwnCollection\n userPin {\n order\n }\n }\n"]);return r=function(){return e},e}let i=(0,a(6641).J1)(r())},25453:(e,t,a)=>{function n(e){var t,a,n;if(!e)return null;if("NodeRecipe"===e.__typename||"NodeUserRecipe"===e.__typename){if("image"in e&&e.image)return e.image;if((null==(t=e.aufmacher)?void 0:t.__typename)==="ParagraphImage")return e.aufmacher.image}else if("NodeTopicPage"===e.__typename){if(e.teaserMedia)return e.teaserMedia;if((null==(a=e.aufmacher)?void 0:a.__typename)==="ParagraphImage")return e.aufmacher.image}else if("NodeArticle"===e.__typename){if(e.teaserMedia)return e.teaserMedia;if((null==(n=e.aufmacher)?void 0:n.__typename)==="ParagraphImage")return e.aufmacher.image}return null}function r(e){var t;return null!=(t=null==e?void 0:e.name)?t:""}function i(e){if((null==e?void 0:e.__typename)==="NodeArticle"||(null==e?void 0:e.__typename)==="NodeRecipe"||(null==e?void 0:e.__typename)==="NodeTopicPage"){var t;return null!=(t=e.teaserText)?t:e.introText}}function l(e){var t;return null!=(t=null==e?void 0:e.url)?t:""}a.d(t,{AR:()=>l,En:()=>i,cb:()=>n,f_:()=>r})},49152:(e,t,a)=>{a.d(t,{n:()=>r});var n=a(85955);let r=(0,a(84607).v)(e=>({authDialogOpen:!1,setAuthDialogOpen:t=>{e((0,n.jM)(e=>{e.authDialogOpen=t}))},setAuthDialogState:t=>{e((0,n.jM)(e=>{e.initialAuthDialogState=t}))}}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.