1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7309],{27309:function(e,n,t){t.r(n);var r=t(98788),o=t(42838),a=t(70865),i=t(96670),d=t(22970),c=t(52322),l=t(2784),s=t(6143),h=t(44503),u=t(45803),m=t(89251),p=t(16933),f=t(2610),v=function(e){return"\n<script>\n (function() {\n function reportHeight() {\n const height = document.body.scrollHeight;\n window.parent.postMessage({ type: 'iframeHeight', id: '".concat(e,"', height: height }, '*');\n }\n // Report on load\n if (document.readyState === 'complete') {\n reportHeight();\n } else {\n window.addEventListener('load', reportHeight);\n }\n // Report on resize\n new ResizeObserver(reportHeight).observe(document.body);\n })();\n<\/script>\n")},g=60,w=60;n.default=function(e){var n=e.customSettings,b=e.viewType,y=e.format,x=e.linkColor,j=e.variableValues,M=e.previewFooter,k=(0,m.Z2)(x),E=(0,l.useMemo)((function(){var e=null!==j&&void 0!==j?j:{};return(0,i.Z)((0,a.Z)({},n),{head:(0,h.o6)(n.head,e),header:(0,h.o6)(n.header,e),footer:(0,h.o6)(n.footer,e)})}),[n,j]),C=(0,l.useState)(g),L=C[0],Z=C[1],_=(0,l.useState)(w),H=_[0],J=_[1];(0,l.useEffect)((function(){var e=function(e){var n;"iframeHeight"===(null===(n=e.data)||void 0===n?void 0:n.type)&&("header"===e.data.id?(g=e.data.height,Z(e.data.height)):"footer"===e.data.id&&(w=e.data.height,J(e.data.height)))};return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}}),[]);var N=(0,l.useRef)(null),O=(0,l.useState)(!1),F=O[0],D=O[1];(0,l.useEffect)((function(){var e=function(){var e=(0,r.Z)((function(){var e,n;return(0,d.__generator)(this,(function(r){switch(r.label){case 0:if(N.current)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,t.e(426).then(t.t.bind(t,15628,23))];case 2:return e=r.sent(),N.current=e.default,D(!0),[3,4];case 3:return n=r.sent(),console.error("Failed to load mjml-browser:",n),[3,4];case 4:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}();e()}),[]);var P=(0,l.useCallback)((function(e,n,t,r){if(!N.current)return{html:"",error:"MJML library is loading..."};var a=(null===t||void 0===t?void 0:t.trim())||m.gp,i=parseInt(a.replace(/px/i,""),10)||parseInt(m.gp,10),d=r||m.kS,c="\n<mjml>\n <mj-head>\n ".concat(e,'\n </mj-head>\n <mj-body width="').concat(i,'px" background-color="').concat(d,'">\n ').concat(n,"\n </mj-body>\n</mjml>");try{var l=N.current(c,{validationLevel:"soft",minify:!1});return l.errors&&l.errors.length>0&&console.warn("MJML conversion warnings:",l.errors),{html:l.html,error:null}}catch(s){return console.error("MJML conversion error:",s),{html:"",error:(0,o.Z)(s,Error)?s.message:"Failed to convert MJML"}}}),[E.backgroundColor,F]),S=(0,l.useMemo)((function(){if(y===u.qE.MJML){var e=E.header||'<mj-section><mj-column><mj-text color="#999999" align="center">Header preview will appear here</mj-text></mj-column></mj-section>',n=P(E.head,e,E.width,(0,p.eA)(E.head).backgroundColor||m.Yw),t=n.html,r=n.error;return r?'\n<!DOCTYPE html>\n<html>\n <head><meta charset="utf-8"></head>\n <body style="margin: 0; padding: 20px; font-family: sans-serif;">\n <div style="color: #dc2626; background: #fef2f2; padding: 12px; border-radius: 4px; font-size: 13px;">\n <strong>MJML Error:</strong> '.concat(r,"\n </div>\n ").concat(v("header"),"\n </body>\n</html>"):t.replace("</body>","".concat(v("header"),"</body>"))}return'\n<!DOCTYPE html>\n<html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <style>a { color: '.concat(k,"; pointer-events: none; }</style>\n ").concat(E.head,'\n </head>\n <body style="margin: 0; padding: 0;">\n ').concat(E.header||'<div style="padding: 20px; text-align: center; color: #999;">Header preview will appear here</div>',"\n ").concat(v("header"),"\n </body>\n</html>")}),[E.head,E.header,E.width,y,P,F,k]),T=(0,l.useMemo)((function(){if(y===u.qE.MJML){var e=E.footer||'<mj-section><mj-column><mj-text color="#999999" align="center">Footer preview will appear here</mj-text></mj-column></mj-section>',n=P(E.head,e,E.width,(0,p.Av)(E.head).backgroundColor||m.mT),t=n.html,r=n.error;return r?'\n<!DOCTYPE html>\n<html>\n <head><meta charset="utf-8"></head>\n <body style="margin: 0; padding: 20px; font-family: sans-serif;">\n <div style="color: #dc2626; background: #fef2f2; padding: 12px; border-radius: 4px; font-size: 13px;">\n <strong>MJML Error:</strong> '.concat(r,"\n </div>\n ").concat(v("footer"),"\n </body>\n</html>"):t.replace("</body>","".concat(v("footer"),"</body>"))}return'\n<!DOCTYPE html>\n<html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <style>a { color: '.concat(k,"; pointer-events: none; }</style>\n ").concat(E.head,'\n </head>\n <body style="margin: 0; padding: 0;">\n ').concat(E.footer||'<div style="padding: 20px; text-align: center; color: #999;">Footer preview will appear here</div>',"\n ").concat(v("footer"),"\n </body>\n</html>")}),[E.head,E.footer,E.width,y,P,F,k]),Y=(0,l.useMemo)((function(){return(0,p.tq)(E.head)}),[E.head]),z=(0,l.useMemo)((function(){return(0,p.eA)(E.head)}),[E.head]),A=(0,l.useMemo)((function(){return(0,p.dc)(E.head)}),[E.head]),I=(0,l.useMemo)((function(){return(0,p.Av)(E.head)}),[E.head]),R=(0,l.useMemo)((function(){var e;if(b===u.s.MOBILE)return"".concat(m.Qp,"px");var n=Y.width||(null===(e=E.width)||void 0===e?void 0:e.trim());if(!n)return"".concat(m.gp,"px");if(n.includes("%")||n.includes("px")||n.includes("em"))return n;var t=parseInt(n,10);return"".concat(t&&t>0?t:m.gp,"px")}),[b,Y.width,E.width]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:(0,f.cn)("absolute inset-0",!Y.background&&!Y.backgroundColor&&"bg-[radial-gradient(circle,#d1d5db_1px,transparent_1px)] bg-[length:16px_16px] dark:bg-[radial-gradient(circle,#404040_1px,transparent_1px)]"),style:(0,i.Z)((0,a.Z)({},Y),{width:void 0})}),(0,c.jsxs)("div",{className:"relative z-10 flex flex-1 flex-col items-center overflow-auto p-8",children:[(0,c.jsxs)("div",{className:"overflow-hidden transition-[width] duration-300 ease-in-out",style:{width:R,maxWidth:"100%",backgroundColor:z.backgroundColor||m.Yw},children:[(0,c.jsx)("div",{style:Object.keys(A).length>0?(0,i.Z)((0,a.Z)({},A),{width:void 0}):void 0,children:(0,c.jsx)("iframe",{srcDoc:S,className:"block w-full border-none",style:{height:L},sandbox:"allow-same-origin allow-scripts",title:"Header Preview"})}),(0,c.jsx)(s.i,{}),(0,c.jsx)("div",{style:Object.keys(I).length>0?(0,i.Z)((0,a.Z)({},I),{width:void 0}):void 0,children:(0,c.jsx)("iframe",{srcDoc:T,className:"block w-full border-none",style:{height:H},sandbox:"allow-same-origin allow-scripts",title:"Footer Preview"})})]}),M&&(0,c.jsx)("div",{className:"pointer-events-auto mt-6 shrink-0",children:M})]})]})}}}]);
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.