1import{r as n,j as e}from"./index-Cp6oVmJn.js";import{T as f}from"./ToolSeoSection-RrG1c4TM.js";import{g as E,r as P}from"./generatedTextTransforms-DWxAXewb.js";/* empty css */const p="text_csv_remove_empty_rows",B={name:"text"},j=[],v={},N={zh:{title:"CSV ç§»é¤ç©ºç½å",subtitle:"ç§»é¤ CSV æè²¼ä¸è¡¨æ ¼ä¸ç空ç½åï¼é©åæ¸
çå¯å
¥è³æè試ç®è¡¨è¤è£½å
§å®¹ã",inputPlaceholder:"卿¤è¼¸å
¥æè²¼ä¸å
§å®¹...",processBtn:"éå§èç",processing:"èçä¸...",copyBtn:"è¤è£½çµæ",downloadBtn:"ä¸è¼çµæ",reset:"éç½®",empty:"è«å
輸å
¥è¦èççå
§å®¹ã",copied:"å·²è¤è£½"},en:{title:"CSV Empty Row Remover",subtitle:"Remove empty rows from CSV or pasted table data before import or review.",inputPlaceholder:"Enter or paste content here...",processBtn:"Process",processing:"Processing...",copyBtn:"Copy Result",downloadBtn:"Download Result",reset:"Reset",empty:"Enter content before processing.",copied:"Copied"}},_=i=>String(i).toLowerCase().startsWith("en")?N.en:N.zh;function k({language:i="zh"}){const[c,d]=n.useState(""),[u,m]=n.useState(v),[o,x]=n.useState(""),[g,l]=n.useState(""),[h,b]=n.useState(!1),s=_(i),y=n.useMemo(()=>c.trim().length>0,[c]),T=(t,a)=>{m(r=>({...r,[t]:a}))},w=()=>{if(!y){l(s.empty);return}b(!0);try{const t=P(p,{text:c,...u});x(t),l("")}catch(t){l(t.message||"Failed to process input.")}finally{b(!1)}},C=async()=>{o&&(await navigator.clipboard.writeText(o),l(s.copied))},R=()=>{if(!o)return;const t=new Blob([o],{type:"text/plain;charset=utf-8"}),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=`${p}-result.txt`,r.click(),URL.revokeObjectURL(a)},S=()=>{d(""),m(v),x(""),l("")};return e.jsxs("div",{className:"tool-page",children:[e.jsxs("div",{className:"tool-page-content",children:[e.jsx("h1",{className:"tool-page-title",children:s.title}),e.jsx("p",{className:"tool-page-subtitle",children:s.subtitle}),e.jsxs("div",{className:"tool-page-body",children:[j.length>0&&e.jsx("div",{className:"tool-page-actions","aria-label":"Tool options",children:j.map(t=>e.jsxs("label",{style:{display:"grid",gap:"6px",minWidth:"180px"},children:[e.jsx("span",{className:"tool-page-stat-label",children:t.name}),e.jsx("input",{className:"tool-page-textarea",style:{minHeight:"auto",resize:"none"},type:"text",value:u[t.name]??"",onChange:a=>T(t.name,a.target.value)})]},t.name))}),e.jsx("textarea",{className:"tool-page-textarea",value:c,onChange:t=>d(t.target.value),placeholder:s.inputPlaceholder,"aria-label":B.name,rows:10}),e.jsxs("div",{className:"tool-page-actions",children:[e.jsx("button",{className:"tool-page-btn primary",onClick:w,disabled:!y||h,children:h?s.processing:s.processBtn}),o&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"tool-page-btn secondary",onClick:C,children:s.copyBtn}),e.jsx("button",{className:"tool-page-btn secondary",onClick:R,children:s.downloadBtn}),e.jsx("button",{className:"tool-page-btn secondary",onClick:S,children:s.reset})]})]}),g&&e.jsx("p",{className:"tool-page-subtitle","aria-live":"polite",children:g}),o&&e.jsx("div",{className:"tool-page-result",children:e.jsx("textarea",{className:"tool-page-textarea output",value:o,readOnly:!0,rows:10,"aria-label":"result"})})]})]}),e.jsx(f,{seoData:E[p]})]})}export{k as default};
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.