1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72997],{36455:(e,t,r)=>{"use strict";r.d(t,{ED:()=>C,Lf:()=>f,NI:()=>v,RA:()=>b,St:()=>h,a9:()=>g,dl:()=>k,f3:()=>m,o4:()=>j,pv:()=>A,sT:()=>x,tz:()=>y,um:()=>S,vk:()=>z});var o=r(28888),n=r(31869),i=r(35268),a=r(92003),l=r(21671),p=r(21280),d=r(68375),s=r(86541),c=r(94085);function u(){let e=(0,o._)(["\n padding: 22px;\n border-radius: 22px;\n border: ",";\n background-color: #fcfbfb;\n margin-top: 22px;\n font-size: 18px;\n color: black;\n cursor: pointer;\n"]);return u=function(){return e},e}(0,i.Ay)(a.A)(()=>({margin:"10px",display:"flex",justifyContent:"space-between",alignItems:"center"}));let g=(0,i.Ay)("div")(e=>{let{theme:t}=e;return{textDecoration:"none",cursor:"pointer",color:t.palette.primary.main,display:"flex",fontWeight:"bold",fontSize:"18px",marginBottom:"1.5rem",alignItems:"center"}});(0,i.Ay)(s.A)(e=>{let{theme:t}=e;return{float:"left",margin:5,color:t.palette.primary.main,fontSize:"24px",cursor:"pointer"}}),(0,i.Ay)(l.Ay)(e=>{let{theme:t}=e;return{color:t.palette.grey[600],fontSize:"20px",fontWeight:"bold",padding:"10px 0"}});let x=(0,i.Ay)(p.A)(()=>({margin:"16px 12px",justifyContent:"space-between",alignItems:"center"}));(0,i.Ay)(p.A)(()=>({fontSize:"12px",color:"black",width:"100px",padding:"6px",borderRadius:"30px",textAlign:"center",marginTop:"10px"})),(0,i.Ay)(l.Ay)(u(),e=>{let{theme:t}=e;return"2px solid ".concat(t.palette.grey[200])}),(0,i.Ay)(p.A)(e=>{let{theme:t}=e;return{fontSize:"12px",color:"white",padding:"10px",backgroundColor:t.palette.grey[100],height:"100%"}}),(0,i.Ay)(p.A)(e=>({margin:"10px 0",padding:"12px",backgroundColor:e.selected?"white":"none",borderRadius:"12px",display:"flex",justifyContent:"space-between"})),(0,i.Ay)(d.A)(()=>({position:"absolute",marginTop:1,padding:2,borderRadius:1,boxShadow:3,zIndex:200}));let y=(0,i.Ay)(l.Ay)(e=>{let{theme:t}=e;return{right:0,minHeight:"40rem",maxHeight:"40rem",overflowY:"hidden",paddingLeft:"0 !important",paddingTop:"0 !important",border:"2px solid ".concat(t.palette.grey[300]),borderRadius:"14px",transition:"width 25ms cubic-bezier(0, 0, 0.2, 1)",width:"100%"}}),A=(0,i.Ay)(p.A)(e=>({margin:"15px 0",padding:"12px",backgroundColor:e.selected?e.theme.palette.grey[200]:"white",borderBottom:"1px solid grey",fontSize:"12px"})),f=(0,i.Ay)("div",{shouldForwardProp:e=>"isopen"!==e&&"disabled"!==e&&"isactive"!==e})(e=>{let{theme:t,isopen:r=!1,disabled:o=!1,isactive:i=!1}=e;return{display:"flex",flexDirection:"column",color:r||i?"white":o?"lightgray":"black",backgroundColor:r||i?n.A.primaryColor:t.palette.grey[200],borderRadius:"10px",padding:"10px",marginRight:"10px",fontSize:"12px",minWidth:"65px",...!o&&{cursor:"pointer"},alignItems:"center","&:hover":{backgroundColor:r||i?n.A.primaryColor:t.palette.grey[200]},"&.Mui-disabled":{backgroundColor:t.palette.grey[200],opacity:1,pointerEvents:"none"},[t.breakpoints.down("sm")]:{marginRight:0,padding:"5px",border:"1px solid ".concat(o?t.palette.grey[200]:n.A.primaryColor),borderRadius:"5px",minWidth:"45px"}}}),m=(0,i.Ay)(s.A,{shouldForwardProp:e=>"isopen"!==e&&"isactive"!==e})(e=>{let{theme:t,isopen:r=!1,isactive:o=!1}=e;return{fontSize:"22px",fontWeight:"bold",color:r||o?"white":n.A.primaryColor,[t.breakpoints.down("sm")]:{display:"none"}}}),h=(0,i.Ay)(p.A)(()=>({position:"absolute",top:0,right:0,padding:"8px",margin:"10px",backgroundColor:"white",borderRadius:"50%",opacity:1})),b=(0,i.Ay)(p.A)(e=>{let{theme:t}=e;return{position:"relative",padding:"24px",border:"2px dashed ".concat(t.palette.grey[300]),borderRadius:"20px","&:hover .delete-overlay":{opacity:1},[t.breakpoints.down("sm")]:{".delete-overlay":{opacity:1}}}});(0,i.Ay)(p.A)(()=>({marginBottom:"10px",textAlign:"center",color:"black",fontWeight:"bold",fontSize:"24px"})),(0,i.Ay)(p.A)(()=>({border:"2px dashed lightgray",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:"10px"}));let w=(0,i.Ay)(p.A)(()=>({position:"absolute",color:"white",textAlign:"center",fontSize:"12px"}));(0,i.Ay)(w)(()=>({top:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"0 6px"}));let C=(0,i.Ay)(w)(()=>({bottom:0,left:0,width:"100%",backgroundColor:n.A.primaryColor,opacity:.8,padding:"5px",fontSize:"14px",fontWeight:"bold",textShadow:"0 0 5px #000"}));(0,i.Ay)(p.A)(()=>({backgroundColor:n.A.primaryColor,padding:"10px",color:"white"}));let k=(0,i.Ay)(p.A)(()=>({margin:c.Fr?0:"10px",borderRadius:"10px"}));(0,i.Ay)("span")(()=>({backgroundColor:n.A.primaryColor,color:"white",padding:"4px 10px",fontSize:"12px",margin:"0 12px",borderRadius:"8px"}));let v=(0,i.Ay)(l.Ay)(()=>({fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"space-between"}));(0,i.Ay)(d.A)(()=>({elevation:12,display:"flex",alignItems:"center",padding:"5px",justifyContent:"center"})),(0,i.Ay)(a.A)(()=>({color:"white",fontWeight:"bold",fontSize:"18px"})),(0,i.Ay)(s.A)(()=>({fontSize:25,color:n.A.primaryColor,cursor:"pointer"}));let S=(0,i.Ay)(p.A)(()=>({padding:"8px",margin:"10px",backgroundColor:n.A.primaryColor,borderRadius:"50%"})),j=(0,i.Ay)(p.A,{shouldForwardProp:e=>"isDone"!==e})(e=>{let{isDone:t=!1}=e;return{backgroundColor:t?"#E6FFE6":"#fff6e9",padding:"12px",marginBottom:10,color:"black",fontSize:"14px",display:"flex",alignItems:"center",justifyContent:"space-between"}}),z=(0,i.Ay)(p.A)(e=>{let{theme:t}=e;return{display:"flex",justifyContent:"space-between",alignItems:"flex-start",[t.breakpoints.down("sm")]:{position:"fixed",top:"62px",left:0,right:0,zIndex:10,padding:"0.5rem",margin:4,backgroundColor:"white"}}})},60595:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var o=r(44501),n=r(40670),i=r(14232),a=r(69241),l=r(4697),p=r(35268),d=r(77573),s=r(68375),c=r(47951),u=r(45879);function g(e){return(0,u.Ay)("MuiCard",e)}(0,c.A)("MuiCard",["root"]);var x=r(37876);let y=["className","raised"],A=(0,p.Ay)(s.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),f=i.forwardRef(function(e,t){let r=(0,d.b)({props:e,name:"MuiCard"}),{className:i,raised:p=!1}=r,s=(0,n.A)(r,y),c=(0,o.A)({},r,{raised:p}),u=(e=>{let{classes:t}=e;return(0,l.A)({root:["root"]},g,t)})(c);return(0,x.jsx)(A,(0,o.A)({className:(0,a.A)(u.root,i),elevation:p?8:void 0,ref:t,ownerState:c},s))})},90763:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});var o=r(37876),n=r(14232),i=r(89099),a=r(31777),l=r(19811),p=r(76165);r(75915),r(90981);var d=r(21280),s=r(92003),c=r(21671),u=r(60595),g=r(31003),x=r(83211),y=r(88522),A=r(40322),f=r(78394),m=r(17991),h=r(76942),b=r(36455),w=r(86541),C=r(34846),k=r(85536),v=r(98892),S=r(88494);let j=()=>{(0,S.A)();let e=(0,i.useRouter)(),t=(0,a.wA)(),{t:r}=(0,C.Bd)(),j=e.query.templateId,z=e.query.accountId,R=(0,n.useMemo)(()=>Array.isArray(j)?j[0]:j,[j]),P=(0,n.useMemo)(()=>
1Array.isArray(z)?z[0]:z,[z]),[I,_]=(0,n.useState)(!0),[E,W]=(0,n.useState)(""),[N,F]=(0,n.useState)(""),[M,T]=(0,n.useState)(null),[B,D]=(0,n.useState)(1),{currentPdfWidth:q,handlePageLoadSuccess:H}=(0,k.lH)(B),L=(0,n.useCallback)(()=>{e.replace({pathname:"/pages/admin/profile-layouts/pdfVersion",...P?{query:{accountId:P}}:{}})},[e,P]);(0,n.useEffect)(()=>{if(!e.isReady)return;let r=!1;return(async()=>{if(!R){_(!1),L();return}_(!0);try{var e,o;let n=await t((0,g.pw)({populate:[{path:"file",select:"webPath original_url filename"}],where:{_id:R}})).unwrap();if(r)return;let i=(Array.isArray(n)?n:[])[0],a=(e=>e&&"string"==typeof e?e.startsWith("http://")||e.startsWith("https://")?e:"".concat(y.rm).concat(e):"")(null==i||null==(e=i.file)?void 0:e.webPath);if(!i||!a)return void L();W(a),F(null!=(o=null==i?void 0:i.name)?o:"")}catch(e){r||L()}finally{r||_(!1)}})(),()=>{r=!0}},[e.isReady,R,t,L]);let O=e=>{D(e)};return(0,o.jsxs)(d.A,{sx:{p:{xs:2,md:4}},children:[(0,o.jsxs)(b.a9,{onClick:L,children:[(0,o.jsx)(w.A,{icon:"ion:chevron-back",style:{float:"left",margin:5}}),(0,o.jsx)("span",{children:r("Back")})]}),(0,o.jsx)(s.A,{variant:"h3",fontWeight:"bold",color:"black",sx:{mb:3},children:N||r("PDF template")}),I?(0,o.jsx)(x.A,{}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(h.A,{navigationOnly:!0,pageCount:M,handlePageClick:O,currentPage:B,formatAndUpdate:()=>{}}),(0,o.jsxs)(c.Ay,{container:!0,style:{display:"flex"},children:[(0,o.jsx)(f.A,{numPages:M,currentPage:B,handlePageClick:O,file:E}),(0,o.jsx)(A.GD,{item:!0,sm:10,xs:12,id:"pdf-container",sx:{pointerEvents:"auto"},children:(0,o.jsx)(u.A,{sx:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"calc(100vh - 220px)",pointerEvents:"auto"},children:(0,o.jsx)(l.A,{file:E,options:v.qn,onLoadSuccess:e=>{let{numPages:t}=e;return T(t)},children:(0,o.jsx)(p.A,{pageNumber:B,width:q,devicePixelRatio:(0,v.K7)(),onLoadSuccess:H})})})}),(0,o.jsx)(m.A,{numPages:M,currentPage:B,handlePageClick:O,file:E})]})]})]})},z=()=>(0,o.jsx)(j,{})},92625:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/pages/admin/profile-layouts/pdfTemplate",function(){return r(90763)}])}},e=>{e.O(0,[33231,37055,35519,7349,27085,89609,25253,11893,90636,46593,38792],()=>e(e.s=92625)),_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.