PageSourceSearch

https://parsea.io/_next/static/chunks/7728.0a75588d1de22cb2.js

js parsea.io collected 2026-10-02 01:03:58 UTC 42,028 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7728],{26277:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(95155),s=r(53238),l=r(97676);function n(e){let{token:t}=e,r=()=>{(0,l.s)("extraction_complete_signup_click",{})};return(0,a.jsx)("div",{className:"bg-primary/5 border border-primary/20 rounded-lg p-4 sm:p-5 mb-6 sm:mb-8",children:(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-gray-900 mb-1",children:"Create a free account for more"}),(0,a.jsxs)("ul",{className:"text-sm text-gray-500 flex flex-wrap gap-x-4 gap-y-0.5",children:[(0,a.jsx)("li",{children:"• Bulk upload"}),(0,a.jsx)("li",{children:"• Multi-page PDF support"}),(0,a.jsx)("li",{children:"• Collections"}),(0,a.jsx)("li",{children:"• Custom extraction"}),(0,a.jsx)("li",{children:"• Collaboration tools"})]})]}),(0,a.jsx)("div",{className:"flex-shrink-0",children:t?(0,a.jsx)(s.A,{variant:"primary",size:"sm",href:"/dashboard",onClick:r,children:"Go to dashboard"}):(0,a.jsx)(s.A,{variant:"primary",size:"sm",href:"/signup",onClick:r,children:"Create free account"})})]})})}},32383:()=>{},35247:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var a=r(95155),s=r(12115),l=r(53238),n=r(46964),o=r(77303),i=r(97676),c=r(4246),d=r(95884);let m=s.forwardRef(function(e,t){let{title:r,titleId:a,...l}=e;return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),r?s.createElement("title",{id:a},r):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM13.5 10.5h-6"}))}),x=s.forwardRef(function(e,t){let{title:r,titleId:a,...l}=e;return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),r?s.createElement("title",{id:a},r):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"}))}),h=s.forwardRef(function(e,t){let{title:r,titleId:a,...l}=e;return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),r?s.createElement("title",{id:a},r):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))});var p=r(57218),u=r(43569),g=r(26277),y=r(98045),b=r(36938),f=r(26913);y.EA.workerSrc="https://unpkg.com/pdfjs-dist@".concat(y.rE,"/build/pdf.worker.min.mjs");let j=[{filename:"invoice-11.pdf",label:"Invoice",documentType:"invoice",description:"Sales invoice",image:"/sample-documents/invoice-11.png"},{filename:"store-receipt.pdf",label:"Store Receipt",documentType:"receipt",description:"Store receipt",image:"/sample-documents/store-receipt.png"},{filename:"paystub_v2.pdf",label:"Paystub",documentType:"paystub",description:"Employee earnings & deductions",image:"/sample-documents/paystub_v2.png"},{filename:"resume_v2.pdf",label:"Resume",documentType:"resume",description:"Professional CV",image:"/sample-documents/resume_v2.png"}],w=[{name:"custom",label:"Custom",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"receipt",label:"Receipt",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"invoice",label:"Invoice",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"tax_invoice",label:"Tax Invoice",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"purchase_order",label:"Purchase Order",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"credit_note",label:"Credit Note",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"bill_of_lading",label:"Bill of Lading",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"quote",label:"Quote",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"paystub",label:"Paystub",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"resume",label:"Resume",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"explanation_of_benefits",label:"Explanation of Benefits",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"shipping_label",label:"Shipping Label",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})},{name:"certificate_of_origin",label:"Certificate of Origin",icon:(0,a.jsx)(d.py,{className:"w-4 h-4 text-primary"})}],v=e=>{let{documentName:t="document",initialDocumentType:r,uploadLimit:y=3,dropZoneVariant:v="default",containerClassName:N,showSampleDocuments:k=!1}
1=e,[C,_]=(0,s.useState)(r||"custom"),[A,E]=(0,s.useState)(()=>r?"structured":"tables"),[S,F]=(0,s.useState)(null),[L,D]=(0,s.useState)(null),[R,z]=(0,s.useState)(!1),[M,W]=(0,s.useState)(!1),[T,P]=(0,s.useState)(null),[B,O]=(0,s.useState)(!1),[V,U]=(0,s.useState)(y),[I,H]=(0,s.useState)(null),[G,Z]=(0,s.useState)(!1),[J,X]=(0,s.useState)(null),[Y,q]=(0,s.useState)(""),[K,Q]=(0,s.useState)(!1),[$,ee]=(0,s.useState)([]),[et,er]=(0,s.useState)(""),[ea,es]=(0,s.useState)(!1),[el,en]=(0,s.useState)(!1),[eo,ei]=(0,s.useState)(null),[ec,ed]=(0,s.useState)(1),[em,ex]=(0,s.useState)(0),[eh,ep]=(0,s.useState)(500),eu=(0,s.useRef)(null),eg=(0,s.useRef)(null),ey=(0,s.useRef)(null),eb=(0,s.useRef)(!1);(0,s.useEffect)(()=>{H(localStorage.getItem("token"))},[]),(0,s.useEffect)(()=>{let e=()=>{W(window.innerWidth<768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,s.useEffect)(()=>{let e=eu.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e)ep(Math.max(200,Math.floor(t.contentRect.width)-32))});return t.observe(e),()=>t.disconnect()},[B]);let ef=async e=>{let t=["image/jpeg","image/jpg","image/png"].includes(e.type),r="application/pdf"===e.type||e.name.toLowerCase().endsWith(".pdf");return t||r?!(e.size>0xa00000)||(o.oR.error("File size must be less than 10MB"),!1):(o.oR.error("Please select a valid file (JPG, PNG, or PDF)"),!1)},ej=async e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];if(r){if(!await ef(r)){eg.current&&(eg.current.value=""),ey.current&&(ey.current.value="");return}if(F(r),"application/pdf"===r.type||r.name.toLowerCase().endsWith(".pdf"))D(null);else{let e=new FileReader;e.onloadend=()=>{D(e.result)},e.readAsDataURL(r)}}},ew=async e=>{e.preventDefault(),e.stopPropagation();let t=e.dataTransfer.files[0];if(t){if(!await ef(t))return;if(F(t),"application/pdf"===t.type||t.name.toLowerCase().endsWith(".pdf"))D(null);else{let e=new FileReader;e.onloadend=()=>{D(e.result)},e.readAsDataURL(t)}}},ev=()=>{F(null),D(null),ee([]),er(""),en(!1),eg.current&&(eg.current.value=""),ey.current&&(ey.current.value="")},eN=async e=>{ei(e.filename);try{let t=await fetch("/sample-documents/".concat(e.filename)),r=await t.blob(),a=new File([r],e.filename,{type:"application/pdf"});F(a),D(null),_(e.documentType),en(!0),(0,i.s)("sample_document_selected",{document_type:e.documentType}),await eW(a,e.documentType,[],"structured")}catch(e){o.oR.error("Failed to load sample document. Please try again.")}finally{ei(null)}},ek=()=>{O(!1),P(null),Z(!1),X(null),q(""),es(!1),E(r?"structured":"tables"),ev()},eC=e=>e&&"string"==typeof e?e.split(/[_\s]+/).map(e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"").filter(Boolean).join(" "):e,e_=e=>"tables"===(null==T?void 0:T.metadata.extractionMode)?"Table ".concat(e+1):0===e?"Summary":"Table ".concat(e),eA=e=>{if(null==e)return"";let t=String(e);return t.includes(",")||t.includes('"')||t.includes("\n")?'"'.concat(t.replace(/"/g,'""'),'"'):t},eE=e=>{if(T&&T.data.tables&&T.data.tables[e])try{let t=T.data.tables[e],r=c.Wp.book_new(),a=t.headers.length>0?[t.headers.map(eC),...t.rows]:[...t.rows],s=c.Wp.aoa_to_sheet(a),l=e_(e);c.Wp.book_append_sheet(r,s,l);let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5),i="".concat(l.toLowerCase().replace(/\s+/g,"-"),"-").concat(n,".xlsx");c._h(r,i),o.oR.success("Excel file downloaded successfully!")}catch(e){console.error("Error exporting to Excel:",e),o.oR.error("Failed to export Excel file")}},eS=e=>{if(T&&T.data.tables&&T.data.tables[e])try{let t=T.data.tables[e],r=[];t.headers.length>0&&r.push(t.headers.map(e=>eA(eC(e))).join(",")),t.rows.forEach(e=>{r.push(e.map(eA).join(","))});let a=r.join("\n"),s=new Blob([a],{type:"text/csv;charset=utf-8;"}),l=document.createElement("a"),n=URL.createObjectURL(s),i=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5),c=e_(e),d="".concat(c.toLowerCase().replace(/\s+/g,"-"),"-").concat(i,".csv");l.setAttribute("href",n),l.setAttribute("download",d),l.style.visibility="hidden",document.body.appendChild(l),l.click(),document.body.removeChild(l),o.oR.success("CSV file downloaded successfully!")}catch(e){console.error("Error exporting to CSV:",e),o.oR.error("Failed to export CSV file")}},eF=async e=>{if(T&&T.data.tables&&T.data.tables[e])try{let t=T.data.tables[e],r=[];t.headers.length>0&&r.push(t.headers.map(e=>
1eC(e).replace(/\r?\n|\r/g," ")).join("	")),t.rows.forEach(e=>{r.push(e.map(e=>String(null!=e?e:"").replace(/\r?\n|\r/g," ")).join("	"))});let a=r.join("\n");await navigator.clipboard.writeText(a),o.oR.success("Table copied to clipboard!")}catch(e){console.error("Error copying to clipboard:",e),o.oR.error("Failed to copy to clipboard")}},eL=async(e,t)=>{if(!T||!T.data.tables||!T.data.tables[t])return!1;if(!e||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim()))return o.oR.error("Please enter a valid email address"),!1;try{var r;let a={"Content-Type":"application/json"};I&&(a.Authorization="Bearer ".concat(I));let s=T.data.tables[t],l=e_(t),i={email:e.trim(),tableData:{headers:s.headers.length>0?s.headers.map(eC):[],rows:s.rows},tableName:"".concat(T.metadata.originalFileName||"Document"," - ").concat(l)};if(null==(r=(await n.A.post("/documents/send-spreadsheet",i,{headers:a})).data)?void 0:r.success)return o.oR.success("Spreadsheet sent successfully!"),!0;return o.oR.error("Failed to send spreadsheet"),!1}catch(e){return console.error("Error sending email:",e),e.isAuthError||o.oR.error("Failed to send spreadsheet. Please try again."),!1}},eD=async()=>{null!==J&&(Q(!0),await eL(Y,J)&&(Z(!1),q(""),X(null)),Q(!1))},eR=e=>{X(e),Z(!0)},ez=()=>{let e=et.split(",").map(e=>e.trim()).filter(Boolean);if(0===e.length)return;let t=new Set($.map(e=>e.toLowerCase())),r=e.filter(e=>!t.has(e.toLowerCase()));0!==r.length&&(ee(e=>[...e,...r]),er(""))},eM=async e=>(e.preventDefault(),S)?"structured"===A&&"custom"===C&&0===$.filter(e=>e.trim()).length?void o.oR.error("Please add at least one custom field to extract."):void await eW(S,C,"structured"===A&&"custom"===C?$:void 0,A):void o.oR.error("Please select a file to upload"),eW=async function(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"structured";(0,i.s)("file_upload_submit",{action:"upload_document",document_type:"tables"===s?"tables_only":t,extraction_mode:s,file_type:e.type,file_size:Math.round(e.size/1024),is_authenticated:!!I}),z(!0);try{let a=new FormData;if(a.append("file",e),a.append("extractionMode",s),a.append("platform","web"),"structured"===s&&(a.append("documentType",t),"custom"===t&&r)){let e=r.filter(e=>e.trim());a.append("customFields",JSON.stringify(e))}let l=await n.A.withCustomErrorHandling().post("/documents/upload-document-parser",a,{headers:I?{Authorization:"Bearer ".concat(I)}:{}});l.data&&l.data.success&&l.data.data?(P(l.data),O(!0),(0,i.s)("document_processed_successfully",{}),o.oR.success("Document processed successfully!")):o.oR.error("Something went wrong. Please try again.")}catch(r){var l,c,d,m,x;console.error("Error uploading document:",r);let e=null==r||null==(c=r.response)||null==(l=c.data)?void 0:l.code;"MULTI_PAGE_PDF"===e?((0,i.s)("multi_page_pdf_rejected",{tool:"document-extractor"}),es(!0)):(null==r||null==(d=r.response)?void 0:d.status)===429||"GUEST_RATE_LIMIT_EXCEEDED"===e?((0,i.s)("usage_limit_reached",{action:"upload_blocked",document_type:"tables"===s?"tables_only":t,uploads_used:y,uploads_remaining:0,is_authenticated:!!I}),U(0),eb.current||(eb.current=!0),o.oR.error((null==r||null==(x=r.response)||null==(m=x.data)?void 0:m.message)||"Daily upload limit reached. Please create an account to continue.")):r.isAuthError||o.oR.error(e=>{var t,s;return(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsx)("span",{className:"flex-1",children:(null==r||null==(s=r.response)||null==(t=s.data)?void 0:t.message)||"An unexpected error occurred"}),(0,a.jsx)("button",{type:"button",onClick:()=>o.oR.dismiss(e.id),className:"ml-2 text-sm text-gray-400 hover:text-gray-600",children:"✕"})]})},{duration:8e3})}finally{z(!1)}};if(B&&T&&T.data.tables){var eT,eP,eB,eO;let e=S&&("application/pdf"===S.type||S.name.toLowerCase().endsWith(".pdf")),t="tables"===T.metadata.extractionMode,r=T.data.tables[0],s=!!r&&!t&&r.headers.length>0;return(0,a.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-bold text-gray-900",children:"Extraction Complete"}),(0,a.jsxs)("p",{className:"text-sm text-gray-500 flex items-center gap-1.5 mt-0.5",children:[(0,a.jsx)(d.py,{className:"w-4 h-4 text-gray-400 flex-shrink-0"}),(0,a.jsx)("span",{className:"truncate max-w-xs",children:T.metadata.originalFileName})]})]}),(0,a.jsx)(l.A,{variant:"secondary",onClick:ek,className:"text-sm cursor-pointer flex-shrink-0",children:"Start Over"})]}),!I&&(0,a.jsx)(g.A,{token:null!=I?I:""}),(0,a.jsxs)("div",{className:"flex flex-col lg:flex-row gap-4 items-stretch h-[84vh] min-h-[540px] lg:h-[75vh] lg:min-h-[480px]",children:[(0,a.jsxs)("div",{className:"w-full lg:w-[45%] min-w-0 flex-[1.15] max-lg:min-h-[min(52vh,420px)] min-h-0 lg:flex-none lg:sticky lg:top-6 flex flex-col border border-gray-200 rounded-xl bg-white shadow-sm overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex-shrink-0 flex items-center gap-2 px-3 py-2 border-b border-gray-100 bg-gray-50",children:[(0,a.jsx)("button",{type:"button",onClick:()=>ed(e=>Math.max(.3,parseFloat((e-.1).toFixed(1)))),className:"p-1 rounded hover:bg-gray-200 text-gray-600 transition-colors",title:"Zoom out",children:(0,a.jsx)(m,{className:"w-4 h-4"})}),(0,a.jsx)("input",{type:"range",min:"0.3",max:"2",step:"0.05",value:ec,onChange:e=>ed(parseFloat(e.target.value)),className:"flex-1 accent-primary"}),(0,a.jsx)("button",{type:"button",onClick:()=>ed(e=>Math.min(2,parseFloat((e+.1).toFixed(1)))),className:"p-1 rounded hover:bg-gray-200 text-gray-600 transition-colors",title:"Zoom in",children:(0,a.jsx)(x,{className:"w-4 h-4"})}),(0,a.jsxs)("button",{type:"button",onClick:()=>ed(1),className:"text-xs text-gray-500 w-10 text-right hover:text-gray-900 transition-colors tabular-nums",title:"Reset zoom",children:[Math.round(100*ec),"%"]})]}),(0,a.jsx)("div",{ref:eu,className:"flex-1 min-h-0 max-lg:min-h-[min(48vh,380px)] overflow-y-auto bg-gray-100",children:S&&e?(0,a.jsx)("div",{className:"flex flex-col items-center py-4 gap-4",children:(0,a.jsx)(b.A,{file:S,onLoadSuccess:e=>{let{numPages:t}=e;return ex(t)},loading:(0,a.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,a.jsx)(d.Nl,{className:"w-8 h-8 text-primary animate-spin"})}),error:(0,a.jsx)("p",{className:"text-sm text-red-400 text-center py-8 px-4",children:"Failed to load PDF"}),children:Array.from({length:em},(e,t)=>(0,a.jsx)(f.A,{pageNumber:t+1,width:Math.round(eh*ec),renderTextLayer:!0,renderAnnotationLayer:!1,className:"shadow-md mb-4"},t+1))})}):L?(0,a.jsx)("div",{className:"p-4 flex justify-center",children:(0,a.jsx)("img",{src:L,alt:"Document preview",className:"rounded shadow self-start",style:{width:"".concat(Math.round(100*ec),"%"),maxWidth:"100%"}})}):(0,a.jsx)("div",{className:"flex items-center justify-center h-full text-gray-400",children:(0,a.jsx)(d.sT,{className:"w-12 h-12"})})})]}),r&&(0,a.jsx)("div",{className:"w-full lg:flex-1 min-w-0 min-h-0 flex-1 lg:sticky lg:top-6 flex flex-col",children:(0,a.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden flex flex-col flex-1 min-h-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-gray-200 bg-gray-50/60 flex-shrink-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-gray-900",children:s?"Extracted Data":e_(0)}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:s?"".concat(r.rows.length," row").concat(1!==r.rows.length?"s":""," \xb7 ").concat(r.headers.length," field").concat(1!==r.headers.length?"s":""):"".concat(r.rows.length," row").concat(1!==r.rows.length?"s":""," \xb7 ").concat(null!=(eB=null==(eT=r.rows[0])?void 0:eT.length)?eB:0," column").concat((null!=(eO=null==(eP=r.rows[0])?void 0:eP.length)?eO:0)!==1?"s":"")})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 flex-1 justify-end",children:[(0,a.jsxs)(l.A,{variant:"primary",size:"sm",onClick:()=>eE(0),children:[(0,a.jsx)(d.s3,{className:"w-4 h-4 mr-1.5"}),"Excel"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eF(0),children:[(0,a.jsx)(d.Td,{className:"w-4 h-4 mr-1.5"}),"Copy"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eS(0),children:[(0,a.jsx)(d.s3,{className:"w-4 h-4 mr-1.5"}),"CSV"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eR(0),children:[(0,a.jsx)(d.aZ,{className:"w-4 h-4 mr-1.5"}),"Email"]})]})]}),s?(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 min-h-0 p-4",children:[(0,a.jsx)("dl",{className:"space-y-3",children:r.headers.map((e,t)=>{let s=r.rows[0],l=s&&void 0!==s[t]?s[t]:"—";return(0,a.jsxs)("div",{className:"border-b border-gray-100 pb-3 last:border-0 last:pb-0",children:[(0,a.jsx)("dt",{className:"text-xs font-medium text-gray-500 mb-0.5",children:eC(e||"Column ".concat(t+1))}),(0,a.jsx)("dd",{className:"text-sm font-semibold text-gray-900 break-words",children:String(null!=l?l:"—")})]},t)})}),r.rows.length>1&&(0,a.jsxs)("p",{className:"text-xs text-gray-400 mt-4",children:["+ ",r.rows.length-1," more row",2!==r.rows.length?"s":""," — see full table below"]})]}):(0,a.jsx)("div",{className:"overflow-y-auto flex-1 min-h-0 p-2",children:(0,a.jsxs)("table",{className:"text-sm border-collapse min-w-full",children:[r.headers&&r.headers.length>0&&(0,a.jsx)("thead",{className:"sticky top-0 z-10 bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"border-r border-gray-200 border-b border-gray-200 w-12 min-w-[48px]"}),(0,a.jsx)("th",{className:"bg-[#1A432F] text-white text-xs font-semibold px-3 py-2.5 text-left border-r border-[#2D6A4F] border-b border-[#2D6A4F] min-w-[160px] whitespace-nowrap",children:" Row "}),r.headers.map((e,t)=>(0,a.jsx)("th",{className:"text-xs font-medium text-gray-600 px-3 py-2 text-left border-r border-gray-200 border-b border-gray-200",children:eC(e||"Column ".concat(t+1))},t))]})}),(0,a.jsx)("tbody",{children:r.rows.map((e,t)=>(0,a.jsxs)("tr",{className:"group hover:bg-[#F8FAF9] transition-colors",children:[(0,a.jsx)("td",{className:"bg-gray-50 border-r border-gray-200 border-b border-gray-100 text-center text-xs text-gray-400 font-mono select-none px-2 py-2.5 w-12",children:t+1}),e.map((e,t)=>(0,a.jsx)("td",{className:"px-3 py-2.5 border-r border-gray-100 border-b border-gray-100 text-gray-700 text-sm align-top max-w-xs truncate",children:String(null!=e?e:"")},t))]},t))})]})})]})})]}),(0,a.jsxs)("div",{className:"mt-8 space-y-6",children:[s&&r&&(0,a.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-gray-200 bg-gray-50/60",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-gray-900",children:"Summary"}),(0,a.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.rows.length," row",1!==r.rows.length?"s":""," \xb7 ",r.headers.length," column",1!==r.headers.length?"s":""]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 flex-1 justify-end",children:[(0,a.jsxs)(l.A,{variant:"primary",size:"sm",onClick:()=>eE(0),children:[(0,a.jsx)(d.s3,{className:"w-4 h-4 mr-1.5"}),"Excel"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eF(0),children:[(0,a.jsx)(d.Td,{className:"w-4 h-4 mr-1.5"}),"Copy"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eS(0),children:[(0,a.jsx)(d.s3,{className:"w-4 h-4 mr-1.5"}),"CSV"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eR(0),children:[(0,a.jsx)(d.aZ,{className:"w-4 h-4 mr-1.5"}),"Email"]})]})]}),(0,a.jsx)("div",{className:"overflow-auto",style:{maxHeight:"480px"},children:(0,a.jsxs)("table",{className:"text-sm border-collapse min-w-full",children:[(0,a.jsxs)("thead",{className:"sticky top-0 z-10",children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"bg-[#E8F0E9] border-r border-[#C8DAD0] w-12 min-w-[48px]"}),r.headers.map((e,t)=>(0,a.jsx)("th",{className:"bg-[#E8F0E9] text-[#2D6A4F] text-xs font-mono font-medium px-3 py-1 text-center border-r border-[#C8DAD0] min-w-[160px] select-none",children:(e=>{let t="",r=e;for(;r>=0;)t=String.fromCharCode(65+r%26)+t,r=Math.floor(r/26)-1;return t})(t)},t))]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"bg-[#1A432F] border-r border-[#2D6A4F] border-b border-[#2D6A4F] w-12 min-w-[48px]"}),r.headers.map((e,t)=>(0,a.jsx)("th",{className:"bg-[#1A432F] text-white text-xs font-semibold px-3 py-2.5 text-left border-r border-[#2D6A4F] border-b border-[#2D6A4F] min-w-[160px] whitespace-nowrap",children:eC(e||"Column ".concat(t+1))},t))]})]}),(0,a.jsx)("tbody",{children:r.rows.map((e,t)=>(0,a.jsxs)("tr",{className:"group hover:bg-[#F8FAF9] transition-colors",children:[(0,a.jsx)("td",{className:"bg-gray-50 border-r border-gray-200 border-b border-gray-100 text-center text-xs text-gray-400 font-mono select-none px-2 py-2.5 w-12",children:t+1}),e.map((e,t)=>(0,a.jsx)("td",{className:"px-3 py-2.5 border-r border-gray-100 border-b border-gray-100 text-gray-700 text-sm align-top max-w-xs truncate",children:String(null!=e?e:"")},t))]},t))})]})})]}),T.data.tables.length>1&&(0,a.jsx)("div",{className:"space-y-6",children:T.data.tables.slice(1).map((e,t)=>{let r=t+1,s=T.data.tables[r];return(0,a.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-gray-200 bg-gray-50/60",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:e_(r)}),(0,a.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[s.rows.length," row",1!==s.rows.length?"s":""]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 flex-1 justify-end",children:[(0,a.jsxs)(l.A,{variant:"primary",size:"sm",onClick:()=>eE(r),children:[(0,a.jsx)(d.s3,{className:"w-4 h-4 mr-1.5"}),"Excel"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eF(r),children:[(0,a.jsx)(d.Td,{className:"w-4 h-4 mr-1.5"}),"Copy"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eS(r),children:[(0,a.jsx)(d.s3,{className:"w-4 h-4 mr-1.5"}),"CSV"]}),(0,a.jsxs)(l.A,{variant:"secondary",size:"sm",onClick:()=>eR(r),children:[(0,a.jsx)(d.aZ,{className:"w-4 h-4 mr-1.5"}),"Email"]})]})]}),(0,a.jsx)("div",{className:"overflow-auto",style:{maxHeight:"480px"},children:(0,a.jsxs)("table",{className:"text-sm border-collapse min-w-full",children:[s.headers&&s.headers.length>0&&(0,a.jsx)("thead",{className:"sticky top-0 z-10 bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"border-r border-gray-200 border-b border-gray-200 w-12 min-w-[48px]"}),(0,a.jsx)("th",{className:"bg-[#1A432F] text-white text-xs font-semibold px-3 py-2.5 text-left border-r border-[#2D6A4F] border-b border-[#2D6A4F] min-w-[160px] whitespace-nowrap",children:" Row "}),s.headers.map((e,t)=>(0,a.jsx)("th",{className:"text-xs font-medium text-gray-600 px-3 py-2 text-left border-r border-gray-200 border-b border-gray-200",children:eC(e||"Column ".concat(t+1))},t))]})}),(0,a.jsx)("tbody",{children:s.rows.map((e,t)=>(0,a.jsxs)("tr",{className:"group hover:bg-[#F8FAF9] transition-colors",children:[(0,a.jsx)("td",{className:"bg-gray-50 border-r border-gray-200 border-b border-gray-100 text-center text-xs text-gray-400 font-mono select-none px-2 py-2.5 w-12",children:t+1}),e.map((e,t)=>(0,a.jsx)("td",{className:"px-3 py-2.5 border-r border-gray-100 border-b border-gray-100 text-gray-700 text-sm align-top max-w-xs truncate",children:String(null!=e?e:"")},t))]},t))})]})})]},r)})})]}),G&&null!==J&&(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,a.jsxs)("div",{className:"bg-white rounded-lg max-w-md w-full p-6",children:[(0,a.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Send Spreadsheet via Email"}),(0,a.jsxs)("p",{className:"text-sm text-gray-600 mb-4",children:["Sending ",e_(J)]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email Address"}),(0,a.jsx)("input",{type:"email",id:"email",valu
1e:Y,onChange:e=>q(e.target.value),placeholder:"[email protected]",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-secondary focus:border-transparent outline-none",disabled:K,onKeyDown:e=>{"Enter"===e.key&&!K&&Y.trim()&&eD()}})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,a.jsx)("button",{onClick:()=>{Z(!1),q(""),X(null)},disabled:K,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),(0,a.jsx)("button",{onClick:eD,disabled:K||!Y,className:"px-4 py-2 text-sm font-medium text-white bg-secondary hover:bg-secondary/90 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:K?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.Nl,{className:"h-4 w-4"}),"Sending..."]}):"Send"})]})]})]})})]})}let eV="bold"===v;return(0,a.jsx)("div",{className:null!=N?N:"container mx-auto px-4 py-8 lg:py-16 max-w-4xl",children:ea?(0,a.jsx)("div",{className:"bg-gradient-to-br from-primary/10 to-primary/5 border-2 border-primary/20 rounded-lg p-8 lg:p-12 text-center",children:(0,a.jsxs)("div",{className:"max-w-md mx-auto",children:[(0,a.jsx)(d.sT,{className:"w-16 h-16 mx-auto mb-4 text-primary"}),(0,a.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Multi-page PDFs require an account"}),(0,a.jsx)("p",{className:"text-gray-600 mb-6",children:"Create a free account and get free credits to extract data from multi-page PDFs and unlock additional features."}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[(0,a.jsx)(l.A,{href:"/signup",variant:"primary",size:"lg",children:"Create Free Account"}),(0,a.jsx)(l.A,{onClick:ek,variant:"secondary",size:"lg",children:"Start Over"})]}),(0,a.jsxs)("p",{className:"text-sm text-gray-500 mt-4",children:["Already have an account?"," ",(0,a.jsx)("a",{href:"/login",className:"underline hover:text-gray-700",children:"Sign in"})]})]})}):0===V?(0,a.jsx)("div",{className:"bg-gradient-to-br from-primary/10 to-primary/5 border-2 border-primary/20 rounded-lg p-8 lg:p-12 text-center",children:(0,a.jsxs)("div",{className:"max-w-md mx-auto",children:[I?(0,a.jsx)(h,{className:"w-16 h-16 mx-auto mb-4 text-primary"}):(0,a.jsx)(d.XA,{className:"w-16 h-16 mx-auto mb-4 text-primary"}),(0,a.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:I?"Continue in Dashboard":"Upload Limit Reached"}),(0,a.jsx)("p",{className:"text-gray-600 mb-6",children:I?"You have reached this tool's free limit. You can continue with Table or Advanced Extraction from your dashboard.":"You&apos;ve used all ".concat(y," free uploads. Create an account to unlock more uploads and access additional features.")}),(0,a.jsx)("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:I?(0,a.jsx)(l.A,{href:"/dashboard",variant:"primary",size:"lg",children:"Go to Dashboard"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.A,{href:"/signup",variant:"primary",size:"lg",children:"Create Free Account"}),(0,a.jsx)(l.A,{href:"/login",variant:"secondary",size:"lg",children:"Sign In"})]})})]})}):(0,a.jsxs)("form",{onSubmit:eM,className:"space-y-6",children:[(0,a.jsx)("div",{className:"text-center transition-all duration-300 ".concat(eV?"rounded-2xl border-2 border-dashed p-10 lg:p-16 ".concat(S?"border-primary/60 bg-primary/10":"border-primary/40 bg-white/80 hover:border-primary/70 hover:bg-white hover:shadow-[0_0_40px_-10px_rgba(26,67,47,0.3)]"):"border-2 border-dashed rounded-lg p-8 lg:p-12 ".concat(S?"border-primary/50 bg-primary/5":"border-gray-300 hover:border-gray-400 bg-gray-50")),onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:ew,style:eV&&!S?{background:"linear-gradient(145deg, #ffffff 0%, #F8FAF9 30%, #D8E2DC20 70%, #F8FAF9 100%)"}:void 0,children:S?(0,a.jsx)("div",{className:"flex flex-col items-center gap-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-white rounded-lg border ".concat(eV?"border-primary/20 shadow-lg":"border-gray-200"),children:["application/pdf"===S.type||S.name.toLowerCase().endsWith(".pdf")?(0,a.jsx)(d.sT,{className:"w-8 h-8 text-red-500"}):(0,a.jsx)(d.py,{className:"w-8 h-8 text-gray-400"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:S.name}),(0,a.jsxs)("div",{className:"text-xs text-gray-500",children:[(S.size/1024/1024).toFixed(2)," MB"]})]}),(0,a.jsx)("button",{type:"button",onClick:ev,className:"ml-auto text-gray-400 hover:text-red-600 transition-colors",children:(0,a.jsx)(d.US,{className:"w-5 h-5"})})]})}):(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4 ".concat(eV?"gap-6":""),children:[(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)(d.UO,{className:"mx-auto ".concat(eV?"w-24 h-24 lg:w-28 lg:h-28 text-primary":"w-20 h-20")})}),(0,a.jsxs)("div",{className:eV?"text-xl lg:text-2xl font-bold text-primary":"text-lg font-medium text-gray-900",children:[(0,a.jsx)("span",{className:"md:hidden",children:"Capture with camera or select from gallery"}),(0,a.jsx)("span",{className:"hidden md:inline",children:eV?"Drop your document here — or click to upload":"Drop your ".concat(t.toLowerCase()," here, or click to browse")})]}),(0,a.jsx)("div",{className:eV?"text-base text-gray-600":"text-sm text-gray-500",children:"JPG, PNG, or PDF \xb7 Up to 10MB \xb7 Invoice, receipt, bank statement, and more"}),(0,a.jsx)("input",{ref:eg,type:"file",accept:"image/*",capture:"environment",onChange:ej,className:"hidden"}),(0,a.jsx)("input",{ref:ey,type:"file",accept:"image/*,.pdf",onChange:ej,className:"hidden"}),(0,a.jsxs)("div",{className:"md:hidden flex flex-col sm:flex-row gap-3 w-full max-w-md",children:[(0,a.jsx)(l.A,{type:"button",variant:"primary",onClick:()=>{var e;(0,i.s)("file_upload_action",{action:"capture_photo",device:"mobile",document_type:C}),null==(e=eg.current)||e.click()},className:"flex-1",children:"Capture Photo"}),(0,a.jsx)(l.A,{type:"button",variant:"secondary",onClick:()=>{var e;
1(0,i.s)("file_upload_action",{action:"choose_from_gallery",device:"mobile",document_type:C}),null==(e=ey.current)||e.click()},className:"flex-1",children:"Choose from Gallery"})]}),(0,a.jsx)(l.A,{type:"button",variant:"primary",size:eV?"lg":"md",className:"hidden md:inline-block ".concat(eV?"px-8 py-3.5 text-base font-semibold shadow-lg hover:shadow-xl transition-shadow":""),onClick:()=>{var e;(0,i.s)("file_upload_action",{action:"choose_file",device:"desktop",document_type:C}),null==(e=ey.current)||e.click()},children:"Choose File"})]})}),k&&!S&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex-1 h-px bg-gray-200"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 whitespace-nowrap",children:"or try a sample document"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-gray-200"})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:j.map(e=>{let t=eo===e.filename;return(0,a.jsxs)("button",{type:"button",disabled:!!eo,onClick:()=>eN(e),className:"group text-left rounded-xl border border-gray-200 bg-white overflow-hidden hover:border-primary/40 hover:shadow-md transition-all disabled:opacity-60 disabled:cursor-not-allowed",children:[(0,a.jsxs)("div",{className:"relative overflow-hidden bg-gray-50 flex items-start justify-center min-h-[185px] h-[185px]",children:[(0,a.jsx)("img",{src:e.image,alt:"",className:"h-full w-full object-contain object-top",draggable:!1}),t&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80",children:(0,a.jsx)(d.Nl,{className:"w-6 h-6 text-primary animate-spin"})})]}),(0,a.jsxs)("div",{className:"p-3 border-t border-gray-100",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-900 leading-tight",children:e.label}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 leading-tight",children:e.description}),(0,a.jsx)("p",{className:"text-xs text-primary mt-2 font-medium group-hover:underline",children:"Try this sample →"})]})]},e.filename)})})]}),S&&!el&&(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsxs)("label",{className:"inline-flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,a.jsx)("input",{type:"checkbox",className:"rounded border-gray-300 text-primary focus:ring-primary",checked:"structured"===A,onChange:e=>{let t=e.target.checked?"structured":"tables";E(t),(0,i.s)("extraction_mode_changed",{extraction_mode:t,is_authenticated:!!I})}}),(0,a.jsx)("span",{children:"Extract key fields with AI (optional)"})]})}),S&&!el&&"structured"===A&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"text-center",children:(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700 mb-3",children:"Select document type:"})}),(0,a.jsx)("div",{className:"flex flex-wrap justify-center gap-3",children:w.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>{_(e.name),(0,i.s)("document_type_selected",{action:"select_document_type",document_type:e.name,is_authenticated:!!I})},className:"px-4 py-2 rounded-lg border-2 transition-all ".concat(C===e.name?"border-primary bg-primary/10 text-primary font-medium":"border-gray-200 hover:border-gray-300 bg-white text-gray-700"),children:(0,a.jsx)("span",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"text-sm",children:e.label})})},e.name))}),"custom"===C&&(0,a.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700 text-center",children:"Add the data points you want to extract:"}),(0,a.jsxs)("div",{className:"flex gap-2 max-w-md mx-auto",children:[(0,a.jsx)("input",{type:"text",value:et,onChange:e=>er(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),ez())},placeholder:"e.g., document ID, issue date, total amount",className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-primary outline-none text-sm"}),(0,a.jsx)(l.A,{type:"button",variant:"secondary",onClick:ez,children:(0,a.jsx)(p.A,{className:"w-4 h-4"})})]}),$.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:$.map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-3 py-1 rounded-full bg-gray-100 text-gray-800 text-sm",children:[e,(0,a.jsx)("button",{type:"button",onClick:()=>{ee(e=>e.filter((e,r)=>r!==t))},className:"text-gray-500 hover:text-gray-700 p-0.5","aria-label":"Remove",children:(0,a.jsx)(u.A,{className:"w-4 h-4"})})]},t))})]})]}),S&&(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)(l.A,{type:"submit",variant:"primary",size:"lg",disabled:!S||R||"structured"===A&&"custom"===C&&0===$.length,isLoading:R,children:R?"Uploading...":"Upload Document"})})]})})}},43569:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(12115);let s=a.forwardRef(function(e,t){let{title:r,titleId:s,...l}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},l),r?a.createElement("title",{id:s},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 
118 6M6 6l12 12"}))})},57218:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(12115);let s=a.forwardRef(function(e,t){let{title:r,titleId:s,...l}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},l),r?a.createElement("title",{id:s},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))})},83686:()=>{},95884:(e,t,r)=>{"use strict";r.d(t,{US:()=>m,Td:()=>c,py:()=>l,UO:()=>s,s3:()=>i,aZ:()=>d,XA:()=>o,sT:()=>n,Nl:()=>x});var a=r(95155);function s(e){let{className:t="w-20 h-20 text-primary"}=e;return(0,a.jsxs)("svg",{className:t,viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M40 14v20M40 34l-5-5M40 34l5-5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.9"}),(0,a.jsx)("path",{d:"M20 36h40l8 8v32H20V36z",fill:"white",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M60 36v8h8",fill:"currentColor",fillOpacity:"0.06"}),(0,a.jsx)("line",{x1:"26",y1:"46",x2:"58",y2:"46",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.5"}),(0,a.jsx)("line",{x1:"26",y1:"54",x2:"58",y2:"54",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.3"}),(0,a.jsx)("line",{x1:"26",y1:"62",x2:"58",y2:"62",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.3"}),(0,a.jsx)("line",{x1:"34",y1:"42",x2:"34",y2:"70",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.5"}),(0,a.jsx)("line",{x1:"42",y1:"42",x2:"42",y2:"70",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.3"}),(0,a.jsx)("line",{x1:"50",y1:"42",x2:"50",y2:"70",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.3"}),(0,a.jsx)("rect",{x:"26",y:"42",width:"32",height:"6",fill:"currentColor",fillOpacity:"0.15",rx:"1"})]})}function l(e){let{className:t="w-4 h-4"}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}function n(e){let{className:t="w-8 h-8"}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}function o(e){let{className:t="w-16 h-16"}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}function i(e){let{className:t="w-4 h-4"}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}function c(e){let{className:t="w-4 h-4"}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function d(e){let{className:t="w-4 h-4"}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}function m(e){let{className:t="w-5 h-5"}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function x(e){let{className:t="h-4 w-4"}=e;return(0,a.jsxs)("svg",{className:"animate-spin ".concat(t),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}}}]);

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.