1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1141],{5449:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSG:()=>U,default:()=>G});var l=r(37876),s=r(43541),a=r(71511),n=r(64589),i=r(86201),o=r(14232);let c={word:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",pdf:"application/pdf",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",html:"text/html",excel:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",png:"image/png",jpg:"image/jpeg",webp:"image/webp",heic:"image/heic",image:"image/*"},d={pdf:"pdf",html:"html",png:"png",jpg:"jpg",webp:"webp",heic:"heic"},x={word:"Word",pdf:"PDF",html:"HTML",excel:"Excel",png:"PNG",jpg:"JPG",webp:"WebP",pptx:"PPTX",heic:"HEIC",image:"Image",text:"Text"};var m=r(86924),p=r(76454),g=r(14847);let h=({textContent:e,isDragging:t,pathFrom:r,handleFileDrop:s,setIsDragging:a,handleOpenFileExplorer:n})=>(0,l.jsx)(m.A,{onItemsDropped:s,isDragging:t,setIsDragging:a,children:(0,l.jsx)("div",{className:"flex flex-col items-center space-y-8 text-center",children:t?(0,l.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,l.jsx)(p.A,{}),(0,l.jsx)("p",{className:"text-2xl font-semibold",children:e.draggingFile})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"flex flex-col rounded-lg bg-primary/7 px-4 py-2",children:(0,l.jsx)("p",{className:"font-medium text-gray-80",children:e.maxFileSize})}),(0,l.jsx)("p",{className:"text-3xl font-semibold text-gray-100",children:(0,g.v)(e.dragYourFile,{pathFrom:r})}),(0,l.jsx)("button",{className:"flex rounded-lg bg-primary px-5 py-2.5 text-white",onClick:n,children:(0,l.jsx)("p",{className:"font-medium",children:(0,g.v)(e.cta,{pathFrom:r})})})]})})}),f=({textContent:e,files:t,onCancel:r,onFileConvert:s})=>{let a=t.length>1,n=t&&a?"Files":t[0].name;return(0,l.jsxs)("div",{className:"flex flex-col items-center space-y-8 text-center",children:[(0,l.jsx)("h3",{className:"text-3xl font-semibold",children:e.title}),(0,l.jsx)("p",{className:"text-lg font-semibold text-gray-60",children:n}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row",children:[(0,l.jsx)("button",{onClick:r,className:"rounded-lg border border-gray-5 bg-white px-5 py-2.5 font-medium text-gray-80 shadow-sm hover:bg-gray-10",children:e.cancel}),(0,l.jsx)("button",{onClick:e=>{e.preventDefault(),s(t)},className:"rounded-lg bg-primary px-5 py-2.5 font-medium text-white hover:bg-primary-dark",children:e.convert})]})]})};var u=r(98408),w=r(27832),j=r(14e3);let y=({textContent:e,onConvertMoreFilesButtonPressed:t,onDownloadFile:r})=>{let s=(0,j.useRouter)();return(0,l.jsxs)("div",{className:"flex flex-col items-center space-y-8 text-center",children:[(0,l.jsxs)("div",{className:"flex flex-row space-x-2 rounded-lg bg-green/8 p-4 text-center md:text-start",children:[(0,l.jsx)(u.r,{className:"hidden text-green md:flex",size:19.5}),(0,l.jsx)("p",{className:"text-gray-100",children:e.label})]}),(0,l.jsx)("h3",{className:"text-3xl font-semibold",children:e.title}),(0,l.jsx)("p",{className:"text-lg font-semibold text-gray-60",children:e.description}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row",children:[(0,l.jsxs)("button",{onClick:()=>s.push("/file-converter"),className:"flex flex-row items-center justify-center space-x-2 rounded-lg border-gray-10 bg-white px-5 py-2 font-medium shadow-sm hover:bg-gray-5",children:[(0,l.jsx)(w.t,{size:24}),(0,l.jsx)("p",{children:e.goHome})]}),(0,l.jsx)("button",{onClick:t,className:"rounded-lg border border-gray-5 bg-white px-5 py-2.5 font-medium text-gray-80 shadow-sm hover:bg-gray-5",children:e.convertAnother}),(0,l.jsx)("button",{onClick:r,className:"rounded-lg bg-primary px-5 py-2.5 font-medium text-white hover:bg-primary-dark",children:e.downloadFile})]})]})};var b=r(3866),N=r(10173),v=r.n(N),F=r(9446);let C="https://converter.internxt.com";async function S(e,t){if(new FormData().append("file",e),!(t in d)||!e)throw Error("Extensions not allowed");let r=await fetch(`${C}/api/convert/stream?format=${t}`,{method:"POST",body:e});if(!r.ok||!r.body){if(413===r.status)throw Error("File too large");else if(500===r.status)throw Error("Something went wrong")}return await r.blob()}async function E(e,t,r){if(new FormData().append("file",e),!(r in d)||t===r)throw Error("Extensions not allowed");try{let l=await fetch(`${C}/api/convert/stream/image?from=${t}&to=${r}`,{method:"POST",body:e});if(!l.ok||!l.body){if(413===l.status)throw Error("File too large");else if(500===l.status)throw Error("Something went wrong")}return await l.blob()}catch(e){throw Error(Error(e).message)}}function k(e,t){let r=document.createElement("a");r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}let T=async(e,t)=>{if(!e)throw Error("Something went wrong");let r=e[0];try{let e=await S(r,d[t]),l=window.URL.createObjectURL(e),s=`${r.name.split(".")[0]}.${t}`;
1k(l,s)}catch(e){throw Error(e.message)}},A=async(e,t,r)=>{if(e)try{let l=await E(e,t,r),s=window.URL.createObjectURL(l),a=`${e.name.split(".")[0]}.${r}`;k(s,a)}catch(e){throw Error(e.message)}},D=async e=>{let t=e.name.split(".")[0];if(e)try{let r=await b.PDFDocument.create(),l=new FileReader;l.readAsDataURL(e),l.onload=async()=>{let{data:{text:l}}=await v().recognize(e,"eng",{logger:e=>{}}),s=r.addPage(),{height:a}=s.getSize();s.drawText(l,{x:50,y:a-48,size:12});let n=await r.save(),i=new Blob([new Uint8Array(n)],{type:"application/pdf"}),o=window.URL.createObjectURL(i);k(o,t)}}catch(e){console.error(`ERROR WHILE EXTRACTING THE TEXT FROM AN IMAGE: ${e.stack??e.message}`)}};var $=r(41677);let _=({textContent:e,errorContent:t,error:r,resetViewToInitialState:s})=>{let[a,n]=(0,o.useState)();return(0,o.useEffect)(()=>{r&&n(r)},[r]),(0,l.jsx)("div",{className:"flex flex-col items-center space-y-8 text-center",children:a&&(0,l.jsx)(r=>({bigFile:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-row space-x-2 rounded-lg bg-red/8 p-4",children:[(0,l.jsx)($.t,{className:"mt-0.5 hidden text-red sm:mt-0 md:flex",size:19.5}),(0,l.jsxs)("p",{className:"text-gray-100",children:[(0,l.jsxs)("span",{className:"font-semibold",children:[t.bigFile.label," "]}),e.maxFileSize,"."]})]}),(0,l.jsx)("p",{className:"text-3xl font-semibold text-gray-100",children:t.bigFile.selectFile}),(0,l.jsx)("button",{className:"flex rounded-lg bg-primary px-5 py-2.5 text-white",onClick:s,children:(0,l.jsx)("p",{className:"font-medium",children:e.cta})})]}),internalError:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-row space-x-2 rounded-lg bg-red/8 p-4",children:[(0,l.jsx)($.t,{className:"mt-0.5 hidden text-red sm:mt-0 md:flex",size:19.5}),(0,l.jsxs)("p",{className:"text-gray-100",children:[(0,l.jsx)("span",{className:"font-semibold",children:t.internalError.label.bold}),t.internalError.label.normal]})]}),(0,l.jsx)("p",{className:"text-3xl font-semibold text-gray-100",children:e.dragYourFile}),(0,l.jsx)("button",{className:"flex rounded-lg bg-primary px-5 py-2.5 text-white",onClick:s,children:(0,l.jsx)("p",{className:"font-medium",children:e.cta})})]}),unsupportedFormat:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-row space-x-2 rounded-lg bg-red/8 p-4",children:[(0,l.jsx)($.t,{className:"mt-0.5 hidden text-red sm:mt-0 md:flex",size:19.5}),(0,l.jsxs)("p",{className:"text-gray-100",children:[(0,l.jsx)("span",{className:"font-semibold",children:t.unsupportedFormat.label.bold}),t.unsupportedFormat.label.normal]})]}),(0,l.jsx)("p",{className:"text-3xl font-semibold text-gray-100",children:e.dragYourFile}),(0,l.jsx)("button",{className:"flex rounded-lg bg-primary px-5 py-2.5 text-white",onClick:s,children:(0,l.jsx)("p",{className:"font-medium",children:e.cta})})]})})[r.state],{state:a})})};var R=r(50191);let z=[{type:"fileConverter",paths:["pptx-to-pdf","word-to-pdf","xlsx-to-pdf","html-to-pdf","pdf-to-html","excel-to-pdf","word-to-html","png-to-pdf"]},{type:"imageConverter",paths:["png-to-jpg","png-to-heic","jpg-to-png","jpg-to-heic","webp-to-jpg","jpg-to-webp","webp-to-png","png-to-webp","heic-to-jpg","heic-to-png"]},{type:"imageToText",paths:["image-to-text"]}],P=({textContent:e,converterText:t,errorContent:r,pathname:s})=>{let[a,n]=(0,o.useState)(null),[i,d]=(0,o.useState)("initialState"),[m,u]=(0,o.useState)(null),[w,j]=(0,o.useState)(!1),b=(0,o.createRef)(),N=w?"border border-dashed border-primary":"border-4 border-primary/8 bg-primary/2",v=s.split("-"),F=v[v.length-1],C=c[v[0]],S=(0,g.v)(t,{pathFrom:x[v[0]],pathTo:x[F]}),E=(0,g.v)(r,{pathFrom:x[v[0]],pathTo:x[F]}),k=(0,o.useCallback)(()=>{u(null),n(null),d("initialState")},[m,a,b,i]),$=e=>{let t=e.length>0?e.item(e.length-1):null;if(!t)return;let r=t.type;if(!v.length||!r.includes(v[0])){u("unsupportedFormat"),d("errorState");return}n(e),d("selectedFileState")},P=()=>{document.querySelector("input[type=file]").click()},I=async()=>{if(!s||!a)return;let e=s.split("/").pop();if(!e)return;let t=z.find(({paths:t})=>t.includes(e));if(!t){u("unsupportedFormat"),d("errorState");return}d("convertingState");try{switch(t.type){case"fileConverter":await T(a,F),d("downloadFileState");break;case"imageConverter":await A(a[0],v[0],F),d("downloadFileState");break;case"imageToText":await D(a[0]),d("downloadFileState");break;default:throw Error("Invalid converter type")}}catch(e){u(e.message.includes("File too large")?"bigFile":"internalError"),d("errorState")}};return(0,l.jsxs)("section",{className:"overflow-hidden bg-gray-1 pb-20 pt-32",children:[(0,l.jsx)("input",{className:"pointer-events-none absolute h-0
1w-0 overflow-hidden",type:"file",accept:`${C}`,multiple:!1,id:"uploadFile",ref:b,tabIndex:-1,onChange:()=>{let e=b.current;e?.files&&e.files.length>0&&(Array.from(e.files).reduce((e,t)=>e+t.size,0)>0x40000000?(u("bigFile"),d("errorState")):(n(e.files),d("selectedFileState")))}}),(0,l.jsxs)("div",{className:"flex flex-col items-center space-y-12 px-5",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center space-y-5 text-center",children:[(0,l.jsx)("h1",{className:"text-3xl font-semibold text-gray-100 lg:text-5xl",children:S.title}),(0,l.jsx)("h2",{className:"text-xl text-gray-80",children:e.description}),(0,l.jsxs)("div",{className:"flex flex-row items-center space-x-1",children:[(0,l.jsx)(R.o,{size:16,className:"text-green"}),(0,l.jsx)("p",{className:"text-sm font-medium text-gray-80",children:e.secureUpload})]})]}),(0,l.jsx)("div",{className:`flex w-full max-w-screen-lg flex-col items-center space-y-8 rounded-2xl px-5 ${N} py-12`,children:(0,l.jsx)(e=>({initialState:(0,l.jsx)(h,{textContent:S.dragNDropArea,pathFrom:x[v[0]],handleFileDrop:$,isDragging:w,setIsDragging:j,handleOpenFileExplorer:P}),selectedFileState:a&&(0,l.jsx)(f,{textContent:S.fileSelected,files:a,onFileConvert:I,onCancel:k}),convertingState:(0,l.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center space-y-4 bg-opacity-3",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("div",{className:"absolute inset-1",children:(0,l.jsx)("div",{className:"upDownMotion absolute left-0 z-10 h-1 w-full -translate-y-1/2 rounded-xl bg-primary shadow-2xl"})}),(0,l.jsx)(p.A,{})]}),(0,l.jsx)("p",{className:"text-2xl font-semibold",children:S.converting})]}),downloadFileState:(0,l.jsx)(y,{textContent:S.fileConverted,onConvertMoreFilesButtonPressed:k,onDownloadFile:I}),errorState:(0,l.jsx)(_,{error:m,resetViewToInitialState:k,errorContent:E,textContent:S.dragNDropArea})})[e.state],{state:i})})]})]})};var I=r(13874);let O=({textContent:e,lang:t})=>(0,l.jsx)("section",{className:"overflow-hidden px-5 py-20",children:(0,l.jsxs)("div",{className:"flex w-full flex-col items-center space-y-16",children:[(0,l.jsx)("div",{className:"flex w-full flex-col items-center justify-center"}),(0,l.jsxs)("div",{className:"flex max-w-[672px] flex-col space-y-3",children:[(0,l.jsx)("p",{className:"text-2xl font-medium text-gray-100",children:e.howToConvert.title}),(0,l.jsx)("p",{className:"text-lg text-gray-80",children:e.howToConvert.description}),(0,l.jsx)("ul",{className:"list-[square] space-y-1.5 pl-6 lg:max-w-2xl",children:e.howToConvert.steps.map(e=>(0,l.jsxs)("li",{className:"text-lg text-primary",children:[e.step,(0,l.jsxs)("span",{className:"text-gray-80",children:[" ",e.description]})]},e.step))})]}),(0,l.jsxs)("div",{className:"flex max-w-[672px] flex-col space-y-3",children:[(0,l.jsx)("p",{className:"text-2xl font-medium text-gray-100",children:e.whyConvert.title}),(0,l.jsx)(I.A,{description:e.whyConvert.paragraphs})]})]})});var L=r(11379),U=!0;let G=({metatagsDescriptions:e,navbarLang:t,textContent:r,converterText:o,errorContent:c,footerLang:d,lang:x,toolsContent:m,pathname:p})=>{let g=e.filter(e=>e.id===p),h=`/file-converter/${p}`;return(0,l.jsxs)(s.A,{segmentName:"File Converter",title:g[0].title,description:g[0].description,lang:x,pathnameForSEO:h,children:[(0,l.jsx)(a.A,{textContent:t,lang:x,cta:["default"],fixed:!0}),(0,l.jsx)(P,{textContent:r.ConverterSection,converterText:o,errorContent:c,pathname:p}),(0,l.jsx)(O,{textContent:r.FeaturesSection,lang:x}),(0,l.jsx)(L.A,{textContent:r.CtaSection,url:"https://drive.internxt.com/new"}),(0,l.jsx)(i.D,{textContent:m,lang:x}),(0,l.jsx)(n.A,{textContent:d,lang:x,hideNewsletter:!1})]})}},11379:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var l=r(37876),s=r(32962),a=r(48230),n=r.n(a);let i=({textContent:e,url:t,maxWidth:r,target:a,bgImage:i,customDescription:o})=>{let c=(0,s.Q)("/images/cyber-awareness/Background.svg");return(0,l.jsx)("section",{style:{backgroundImage:`url(${i?(0,s.Q)(i):c})`},className:"overflow-hidden bg-primary bg-cover px-5 py-14",children:(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-8 text-center",children:[(0,l.jsxs)("div",{className:`flex ${r} flex-col items-center space-y-4 text-center text-white`,children:[(0,l.jsx)("h2",{className:"text-30 font-semibold lg:text-3xl",children:e.title}),o]}),t&&(0,l.jsx)(n(),{href:t,target:a,className:`flex rounded-lg px-5 py-3 text-lg font-medium ${i&&i!==c?"bg-primary text-xl text-white hover:bg-primary-dark":"bg-white text-primary hover:bg-blue-10"}`,children:e.cta})]})})}},11608:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/file-converter/[filename]",function(){return r(5449)}])},13874:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var l=r(37876),s=r(14232),a=r(43676),n=r.n(a);let i=({description:e,fontSize:t})=>((0,s.useEffect)(()=>{let e=document.querySelector("#render-description-section");document.querySelectorAll("a").forEach(t=>{e?.contains(t)&&(t.target="_blank",t.rel="nofollow")})},[]),(0,l.jsx)("div",{id:"render-description-section",className:"markdown flex flex-col space-y-4",children:e.map(e=>(0,l.jsx)(n(),{className:`${t||"text-base font-normal leading-tight lg:text-lg"} text-gray-55`,children:e},e))}))}},e=>{e.O(0,[3385,8230,2535,3359,541,841,4e3,3866,2447,8216,1511,4589,4267,636,6593,8792],()=>e(e.s=11608)),_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.