PageSourceSearch

https://app.heymarket.com/_next/static/chunks/pages/dev/emails/gallery-f41e02335658f7fe.js

js heymarket.com collected 2026-09-24 09:11:56 UTC 4,102 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8948],{3340:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/dev/emails/gallery",function(){return a(31100)}])},31100:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>I});var l=a(37876),n=a(14232),s=a(14579),r=a(55098),c=a(91106),i=a(60968),o=a(58170),d=a(40123),m=a.n(d),p=a(39829),h=a(56293),u=a(87432),g=a(29581),x=a(14019),j=a(15340),v=a(2300),f=a(26078),N=a.n(f),y=a(14262),S=a(69233),k=a(43775),w=a(15039),b=a.n(w),C=a(35728),E=a.n(C);let _=e=>{let{template:t,onClick:a,onPreview:n}=e;return(0,l.jsxs)(k.A,{className:b()(E().templateCard,E().stripo,E().email,E().selectMode),children:[(0,l.jsx)("div",{className:E().name,children:t.name||"Untitled Template"}),(0,l.jsxs)("div",{className:E().imgWrapper,children:[(0,l.jsx)("img",{src:t.logo||"https://via.placeholder.com/300x200?text=No+Preview",alt:t.name}),(0,l.jsxs)("div",{className:E().overlay,children:[(0,l.jsx)("button",{className:"white-button",onClick:()=>a(t),children:"Select"}),(0,l.jsx)("button",{className:"white-button",onClick:()=>n(t),children:"Preview"})]})]})]})},A=e=>{(0,g.yA)("Error fetching Stripo template preview:",{error:e}),(0,j.f8)("Error","Unable to fetch template details. Please try again later.")};function P(e){let{token:t,onTemplateSelected:a,onPreview:d}=e,g=localStorage.getItem(u.Y7U),[j,f]=(0,n.useState)([]),[k,w]=(0,n.useState)(!1),[b,C]=(0,n.useState)({page:0,limit:30}),[E,P]=(0,n.useState)(0),[T,I]=(0,n.useState)(null),[O,F]=(0,n.useState)(g?JSON.parse(g):u.JvF),J=(0,n.useCallback)(async()=>{w(!0);try{let e=await p.get({path:"".concat(h.ybF,"?").concat(Object.entries(b).map(e=>{let[t,a]=e;return Array.isArray(a)?a.map(e=>"".concat(t,"=").concat(e)).join("&"):"".concat(t,"=").concat(a)}).join("&"),"&token=")+t+"&"+O.map(e=>"templateTypes=".concat(e)).join("&")});200!==e.status&&(0,x.nB)("Error fetching Stripo token:",{error:e.data}),f(0==b.page?e.data.templates:[...j,...e.data.templates]),0==b.page&&e.data.total&&P(e.data.total)}catch(e){(0,x.nB)("Error fetching Stripo token:",{error:e})}w(!1)},[b,t,O,j]);(0,n.useEffect)(()=>{t&&J()},[t,O,b]);let R=async()=>{j.length>=E||C(e=>({...e,page:e.page+1}))},U=Object.entries(u.bkd).map(e=>{let[t,a]=e;return{label:a,value:parseInt(t)}}),Y=async e=>{(0,v.kv)(e.templateId,t).then(e=>{if(!e)return void A();I(e),d&&d(e)}).catch(e=>{A(e)})},B=async e=>{(0,v.kv)(e.templateId,t).then(e=>{if(!e)return void A();a(e)}).catch(e=>{A(e)})},D=(0,l.jsx)("div",{className:N().categoriesDropdown,children:(0,l.jsx)(r.A,{suffixIcon:(0,l.jsx)(S.F,{}),mode:"multiple",size:"small",className:N().categoriesSelect,placeholder:"Select categories",value:O,onChange:e=>{F(e),localStorage.setItem(u.Y7U,e?JSON.stringify(e):JSON.stringify(u.JvF)),C(e=>({...e,page:0}))},options:U,maxTagCount:3,showSearch:!1,maxTagPlaceholder:e=>"+".concat(e.length," more"),tagRender:e=>{let{label:t,closable:a,onClose:n}=e;return(0,l.jsxs)("span",{className:"large-tag",children:[t,a&&(0,l.jsx)("button",{onClick:n,className:N().tagRemove,children:"\xd7"})]})},optionRender:e=>{let t=O.includes(e.value);return(0,l.jsxs)("div",{children:[(0,l.jsx)(s.A,{checked:t,style:{marginRight:"8px"}}),(0,l.jsx)("span",{style:{fontWeight:t?"500":"normal"},children:e.label})]})}})});return(0,l.jsxs)(l.Fragment,{children:[(null==j?void 0:j.length)>0&&D,(0,l.jsx)("div",{className:N().templateList,children:(0,l.jsx)(c.A,{spinning:k,className:"mt-48",children:(0,l.jsx)(y.x,{nextDataFn:R,queryPrefix:".card-wrapper",children:m()(j)?null:(0,l.jsx)(i.A,{className:N().templateCardsContainer,gutter:[24,24],children:j.map(e=>(0,l.jsx)(o.A,{className:"card-wrapper",xs:24,md:12,xl:8,children:(0,l.jsx)(_,{template:e,onClick:B,onPreview:Y})},e.templateId))})})})})]})}var T=a(31398);function I(){let[e,t]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(0,T.tY)().then(e=>{t(e)})},[]),(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{style:{margin:"16px"},children:"Email Templates Gallery"}),(0,l.jsx)(P,{token:e,onTemplateSelected:e=>console.log("@@@ template selected: ",e)})]})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=3340)),_N_E=e.O()}]);

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.