PageSourceSearch

https://www.thecookscook.com/_next/static/chunks/43931-36b04dbb828e8a8d.js

js thecookscook.com collected 2026-09-24 20:03:24 UTC 15,095 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43931],{20756:(e,t,n)=>{n.d(t,{Sb:()=>l,TO:()=>d,Tw:()=>r,US:()=>i,bM:()=>x,cQ:()=>u,d7:()=>p,l_:()=>a,qU:()=>h,yc:()=>m,ym:()=>c});var o=n(95155);n(12115);let s=(e,t)=>({width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:t});function a(e){let{size:t=20,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M12 4 20 12.5h-4.5V20h-7v-7.5H4z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function c(e){let{size:t=20,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M12 20 4 11.5h4.5V4h7v7.5H20z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function r(e){let{size:t=20,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M3.5 4.5h17v11h-9l-4.5 4v-4h-3.5z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function i(e){let{size:t=24,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M6 6l12 12M18 6 6 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function l(e){let{size:t=18,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M9 5.5 3.5 11 9 16.5M3.5 11H14a6 6 0 0 1 6 6v2",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function m(e){let{size:t=18,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M4 7h14M4 12h9M4 17h5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function d(e){let{size:t=20,className:n}=e;return(0,o.jsxs)("svg",{...s(t,n),children:[(0,o.jsx)("circle",{cx:12,cy:5,r:1.6,fill:"currentColor"}),(0,o.jsx)("circle",{cx:12,cy:12,r:1.6,fill:"currentColor"}),(0,o.jsx)("circle",{cx:12,cy:19,r:1.6,fill:"currentColor"})]})}function u(e){let{size:t=18,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M6 3.5V21M6 4.5h12l-2.5 5 2.5 5H6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function h(e){let{size:t=18,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M4 20v-4L16 4l4 4L8 20zM14.5 5.5 18.5 9.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function p(e){let{size:t=18,className:n}=e;return(0,o.jsx)("svg",{...s(t,n),children:(0,o.jsx)("path",{d:"M4.5 7h15M9.5 7V4.5h5V7M6.5 7v13h11V7M10 11v5.5M14 11v5.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})})}function x(e){let{size:t=18,className:n}=e;return(0,o.jsxs)("svg",{...s(t,n),children:[(0,o.jsx)("path",{d:"M2.8 12C5.2 7.8 8.5 5.7 12 5.7s6.8 2.1 9.2 6.3c-2.4 4.2-5.7 6.3-9.2 6.3S5.2 16.2 2.8 12z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"}),(0,o.jsx)("circle",{cx:12,cy:12,r:3.1,stroke:"currentColor",strokeWidth:2})]})}},38320:(e,t,n)=>{n.d(t,{Gi:()=>o,OQ:()=>s,e4:()=>a});let o=2e3;function s(){return!0}function a(e){return e<=-3}RegExp("https?:\\/\\/|www\\.[a-z0-9-]+|\\b[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.(?:com|net|org|io|co|edu|gov|mil|info|biz|dev|app|xyz|ai|me|tv|us|uk|ca|au|de|fr|nl|eu|gg|ly|link|site|online|shop|store|tech|news|blog)\\b","i")},43931:(e,t,n)=>{n.d(t,{A:()=>x});var o=n(95155),s=n(12115),a=n(66004),c=n(28887),r=n(91662),i=n(38320);function l(e){let{onSubmit:t,placeholder:n="Add a comment…",submitLabel:a="Post comment",initialValue:c="",autoFocus:r=!1,onCancel:l,compact:m=!1}
1=e,[d,u]=(0,s.useState)(c),[h,p]=(0,s.useState)(!1),[x,j]=(0,s.useState)(null),y=d.trim(),v=y.length>i.Gi,b=y.length>0&&!v&&!h;async function g(e){if(e.preventDefault(),b){p(!0),j(null);try{await t(y)?u(""):j("Something went wrong. Please try again.")}catch(e){j(e instanceof Error&&e.message?e.message:"Something went wrong. Please try again.")}finally{p(!1)}}}return(0,o.jsxs)("form",{className:"comment-composer".concat(m?" comment-composer--compact":""),onSubmit:g,children:[(0,o.jsx)("textarea",{className:"comment-composer__field",value:d,placeholder:n,autoFocus:r,rows:m?2:3,maxLength:i.Gi,onChange:e=>u(e.target.value),"aria-label":n}),(0,o.jsxs)("div",{className:"comment-composer__footer",children:[(0,o.jsx)("span",{className:"comment-composer__help","aria-live":"polite",children:x||(v?"Too long by ".concat(y.length-i.Gi):"Comments are reviewed before they appear.")}),(0,o.jsxs)("div",{className:"comment-composer__actions",children:[l&&(0,o.jsx)("button",{type:"button",className:"comment-btn comment-btn--text",onClick:l,disabled:h,children:"Cancel"}),(0,o.jsx)("button",{type:"submit",className:"comment-btn comment-btn--primary",disabled:!b,children:h?"Posting…":a})]})]})]})}var m=n(20756);function d(e){let{name:t,url:n,size:s}=e,a=(t||"?").trim().charAt(0).toUpperCase()||"?";return n?(0,o.jsx)("img",{className:"comment-avatar",src:n,alt:"",width:s,height:s,style:{width:s,height:s}}):(0,o.jsx)("span",{className:"comment-avatar comment-avatar--fallback",style:{width:s,height:s},"aria-hidden":"true",children:a})}function u(e){var t,n;let{comment:a,replies:c=[],callbacks:r,isReply:h=!1}=e,[p,x]=(0,s.useState)(a),[j,y]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),[g,f]=(0,s.useState)(!1),[w,N]=(0,s.useState)(!1),[k,C]=(0,s.useState)(!1),_=(0,s.useRef)(null);if((0,s.useEffect)(()=>x(a),[a]),(0,s.useEffect)(()=>{if(!g)return;let e=e=>{_.current&&!_.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]),k)return null;let S=!p.readOnly&&(0,i.e4)(p.score)&&!w;async function M(e){if(!r.signedIn)return void r.onRequireAuth();let t=p.myVote===e?0:e,n=(1===t)-(1===p.myVote),o=(-1===t)-(-1===p.myVote);x({...p,myVote:t,upCount:p.upCount+n,downCount:p.downCount+o,score:p.score+(n-o)});let s=await r.onVote(p.id,t);s?x(e=>({...e,upCount:s.upCount,downCount:s.downCount,score:s.score,myVote:s.myVote})):x(p)}async function L(e){let t=await r.onReply(p.id,e);return t&&y(!1),t}async function V(e){let t=await r.onEdit(p.id,e);return t&&(b(!1),x(t=>({...t,body:e,editedAt:new Date().toISOString()}))),t}async function E(){f(!1),await r.onDelete(p.id),C(!0)}async function O(){if(f(!1),!r.signedIn)return void r.onRequireAuth();await r.onReport(p.id)}return(0,o.jsxs)("article",{className:"comment-item".concat(h?" comment-item--reply":"").concat(p.pending?" comment-item--pending":""),id:"comment-".concat(p.id),children:[p.votable&&!S&&(0,o.jsxs)("div",{className:"comment-votes",role:"group","aria-label":"Vote on this comment",children:[(0,o.jsx)("button",{type:"button",className:"comment-vote comment-vote--up".concat(1===p.myVote?" is-active":""),onClick:()=>M(1),"aria-pressed":1===p.myVote,"aria-label":"Upvote",children:(0,o.jsx)(m.l_,{})}),(0,o.jsx)("span",{className:"comment-score","aria-label":"Net score ".concat(p.score),children:p.score}),(0,o.jsx)("button",{type:"button",className:"comment-vote comment-vote--down".concat(-1===p.myVote?" is-active":""),onClick:()=>M(-1),"aria-pressed":-1===p.myVote,"aria-label":"Downvote",children:(0,o.jsx)(m.ym,{})})]}),(0,o.jsxs)("div",{className:"comment-body-col",children:[S?(0,o.jsxs)("div",{className:"comment-collapsed",children:[(0,o.jsxs)("span",{className:"comment-collapsed__note",children:["This comment is below the community threshold (score ",p.score,")."]}),(0,o.jsxs)("button",{type:"button",className:"comment-btn comment-btn--text comment-collapsed__show",onClick:()=>N(!0),children:[(0,o.jsx)(m.bM,{})," Show anyway"]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("header",{className:"comment-head",children:[(0,o.jsx)(d,{name:p.authorName,url:p.authorAvatarUrl,size:h?32:48}),(0,o.jsxs)("div",{className:"comment-head__meta",children:[(0,o.jsx)("span",{className:"comment-author",children:p.authorName}),(0,o.jsxs)("span",{className:"comment-time",children:[function(e){let t=new Date(e).getTime();if(!t)return"";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let o=Math.floor(n/60);if(o<60)return"".concat(o,"m ago");let s=Math.floor(o/60);if(s<24)return"".concat(s,"h ago");let a=Math.floor(s/24);return a<30?"".concat(a,"d ago"):new Date(e).toLocaleDateString()}(p.createdAt),p.editedAt?" \xb7 edited":"",p.readOnly?" \xb7 archived":""]})]}),p.pending&&(0,o.jsx)("span",{className:"comment-badge comment-badge--pending",children:"Pending review"}),!p.readOnly&&(r.signedIn||p.isOwn)&&(0,o.jsxs)("div",{className:"comment-menu",ref:_,children:[(0,o.jsx)("button",{type:"button",className:"comment-icon-btn","aria-haspopup":"menu","aria-expanded":g,"aria-label":"More actions",onClick:()=>f(e=>!e),children:(0,o.jsx)(m.TO,{})}),g&&(0,o.jsxs)("div",{className:"comment-menu__surface",role:"menu",children:[p.canEdit&&(0,o.jsxs)("button",{type:"button",role:"menuitem",className:"comment-menu__item",onClick:()=>{f(!1),b(!0)},children:[(0,o.jsx)(m.qU,{})," Edit"]}),p.canDelete&&(0,o.jsxs)("button",{type:"button",role:"menuitem",className:"comment-menu__item comment-menu__item--danger",onClick:E,children:[(0,o.jsx)(m.d7,{})," Delete"]}),!p.isOwn&&(0,o.jsxs)("button",{type:"button",role:"menuitem",className:"comment-menu__item",onClick:O,children:[(0,o.jsx)(m.cQ,{})," Report"]})]})]})]}),v?(0,o.jsx)(l,{initialValue:null!=(t=p.body)?t:"",submitLabel:"Save changes",autoF
1ocus:!0,compact:!0,onSubmit:V,onCancel:()=>b(!1)}):p.readOnly?(0,o.jsx)("div",{className:"comment-text comment-text--archive",dangerouslySetInnerHTML:{__html:null!=(n=p.html)?n:""}}):(0,o.jsx)("p",{className:"comment-text",children:p.body}),!v&&(0,o.jsx)("footer",{className:"comment-actions",children:p.replyable&&(0,o.jsxs)("button",{type:"button",className:"comment-btn comment-btn--text",onClick:()=>{if(!r.signedIn)return void r.onRequireAuth();y(e=>!e)},children:[(0,o.jsx)(m.Sb,{})," Reply"]})}),j&&(0,o.jsx)(l,{placeholder:"Write a reply…",submitLabel:"Post reply",autoFocus:!0,compact:!0,onSubmit:L,onCancel:()=>y(!1)})]}),c.length>0&&(0,o.jsx)("div",{className:"comment-replies",children:c.map(e=>(0,o.jsx)(u,{comment:e,callbacks:r,isReply:!0},e.id))})]})]})}let h="/api/comments";async function p(e){let t="Something went wrong. Please try again.";try{let n=await e.json();(null==n?void 0:n.error)&&(t=n.error)}catch(e){}throw Error(t)}function x(e){var t,n,d,x;let{contentId:j,contentType:y,variant:v="inline",onCountChange:b}=e,[g,f]=(0,s.useState)(null),[w,N]=(0,s.useState)("loading"),[k,C]=(0,s.useState)("best"),_="drawer"===v,S=(0,s.useCallback)(async e=>{try{let t=await fetch("".concat(h,"?contentId=").concat(encodeURIComponent(j),"&sort=").concat(e),{cache:"no-store"});if(!t.ok)return void N("error");let n=await t.json();f(n),N("ready")}catch(e){N("error")}},[j]),[M,L]=(0,s.useState)(0);(0,s.useEffect)(()=>(0,a.G)(()=>L(e=>e+1)),[]),(0,s.useEffect)(()=>{j&&S(k)},[j,k,S,M]);let V=(0,s.useRef)(b);V.current=b,(0,s.useEffect)(()=>{var e,t;g&&V.current&&V.current((null!=(e=g.liveCount)?e:0)+(null!=(t=g.legacyCount)?t:0))},[g]);let E=(0,c.R)(),O=(0,s.useCallback)(()=>{if((0,r.wQ)("comment_prompt"),(0,r.sB)("join.cta_click",{entryPoint:"comment_prompt"}),E)return void E.openAuthGate({entryPoint:"comment_prompt",action:"comment"});window.location.href="/join"},[E]),T=(0,s.useCallback)(async e=>{let t=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contentId:j,body:e})});if(404===t.status||401===t.status)return O(),!1;t.ok||await p(t);let{comment:n}=await t.json();return f(e=>e?{...e,thread:[{comment:n,replies:[]},...e.thread]}:e),!0},[j,O]),q={signedIn:!!(null==g?void 0:g.viewer.signedIn),onRequireAuth:O,onVote:async(e,t)=>{let n=await fetch("".concat(h,"/vote"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({commentId:e,value:t})});return 404===n.status||401===n.status?(O(),null):n.ok?await n.json():null},onReply:async(e,t)=>{let n=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contentId:j,body:t,parentId:e})});if(404===n.status||401===n.status)return O(),!1;n.ok||await p(n);let{comment:o}=await n.json();return f(t=>t?{...t,thread:t.thread.map(t=>t.comment.id===e?{...t,replies:[...t.replies,o]}:t)}:t),!0},onEdit:async(e,t)=>{let n=await fetch("".concat(h,"/").concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:t})});return 404===n.status||401===n.status?(O(),!1):(n.ok||await p(n),!0)},onDelete:async e=>{await fetch("".concat(h,"/").concat(e),{method:"DELETE"})},onReport:async e=>{await fetch("".concat(h,"/").concat(e,"/report"),{method:"POST"})}};if(!(0,i.OQ)()||!j)return null;let R=null!=(t=null==g?void 0:g.thread)?t:[],P=null!=(n=null==g?void 0:g.legacy)?n:[],z=null!=(d=null==g?void 0:g.liveCount)?d:0,A=!!(null==g?void 0:g.viewer.signedIn),D=z+(null!=(x=null==g?void 0:g.legacyCount)?x:0),I=R.length>1?(0,o.jsxs)("div",{className:"comments-sort",role:"group","aria-label":"Sort comments",children:[(0,o.jsx)(m.yc,{size:18}),(0,o.jsx)("button",{type:"button",className:"comment-btn comment-btn--text".concat("best"===k?" is-active":""),onClick:()=>C("best"),"aria-pressed":"best"===k,children:"Best"}),(0,o.jsx)("button",{type:"button",className:"comment-btn comment-btn--text".concat("newest"===k?" is-active":""),onClick:()=>C("newest"),"aria-pressed":"newest"===k,children:"Newest"})]}):null;return(0,o.jsx)("section",{className:"comments-section".concat(_?" comments-section--drawer":""),"aria-label":"Comments",id:_?void 0:"comments",children:(0,o.jsxs)("div",{className:"comments-inner".concat(_?" comments-inner--drawer":""),children:[_?I&&(0,o.jsx)("header",{className:"comments-header comments-header--drawer",children:I}):(0,o.jsxs)("header",{className:"comments-header",children:[(0,o.jsxs)("h2",{className:"comments-title",children:[(0,o.jsx)(m.Tw,{size:22}),D>0?"".concat(D," Comment").concat(1===D?"":"s"):"Comments"]}),I]}),"loading"===w?(0,o.jsx)("div",{className:"comments-join comments-join--pending","aria-hidden":"true"}):A?(0,o.jsx)(l,{onSubmit:T}):(0,o.jsxs)("div",{className:"comments-join",children:[(0,o.jsx)("p",{className:"comments-join__text",children:"Join the conversation — sign in to comment and vote."}),(0,o.jsx)("button",{type:"button",className:"comment-btn comment-btn--primary",onClick:O,children:"Sign in to comment"})]}),"loading"===w&&(0,o.jsx)("p",{className:"comments-empty",children:"Loading comments…"}),"error"===w&&(0,o.jsx)("p",{className:"comments-empty",children:"Comments couldn’t load right now. Please refresh."}),"ready"===w&&0===R.length&&0===P.length&&(0,o.jsx)("p",{className:"comments-empty",children:"No comments yet. Be the first to share your thoughts."}),R.length>0&&(0,o.jsx)("div",{className:"comments-list",children:R.map(e=>(0,o.jsx)(u,{comment:e.comment,replies:e.replies,callbacks:q},e.comment.id))}),P.length>0&&(0,o.jsxs)("div",{className:"comments-archive",children:[(0,o.jsxs)("h3",{className:"comments-archive__title",children:["Archived comments",(0,o.jsx)("span",{className:"comments-archive__note",children:"Imported from the original site \xb7 read-only"})]}),(0,o.jsx)("div",{className:"comments-list comments-list--archive",children:P.map(e=>(0,o.jsx)(u,{comment:e,callbacks:q},e.id))})]})]})})}}}]);

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.