1const g="finsight-corporate-cards",S=()=>{if(typeof window>"u")return[];try{const e=localStorage.getItem(g);if(!e)return[];const t=JSON.parse(e);if(!Array.isArray(t))return[];const i=new Set(["card-hdfc-4521","card-hdfc-8830","card-kotak-9421","card-icici-1209","card-axis-7766"]),s=t.filter(a=>a?.id&&!i.has(a.id));return s.length!==t.length&&localStorage.setItem(g,JSON.stringify(s)),s}catch{return[]}},E=e=>{if(typeof window>"u")return;const t=S(),i=t.findIndex(a=>a.id===e.id),s=i>=0?t.map((a,c)=>c===i?e:a):[...t,e];localStorage.setItem(g,JSON.stringify(s))},y=e=>{if(typeof window>"u")return;const i=S().filter(s=>s.id!==e);localStorage.setItem(g,JSON.stringify(i))},N=e=>{if(!e)return[];let t="",i="",s="",a="";if(typeof e=="string"){if(a=e.trim(),!a)return[];t=a;const r=a.replace(/\D/g,"");r.length>=4&&(i=r)}else typeof e=="object"&&(t=(e.id||"").trim(),i=(e.accountNo||e.accountNumber||"").trim(),s=(e.bank||e.bankName||"").trim());if(!t&&!i&&!a)return[];const c=r=>r.toLowerCase().replace(/[^a-z0-9]/g,""),m=c(t),u=i.replace(/\D/g,""),f=u.length>=4?u.slice(-4):"",C=r=>{const l=r.bankAccountName||"",o=l.match(/[â¢Â·\-\*]+\s*(\d{4})/);if(o&&o[1])return o[1];if(r.bankAccountId){const n=r.bankAccountId.replace(/\D/g,"");if(n.length>=4&&n!==r.last4)return n.slice(-4)}const d=l.match(/\b\d{4,}\b/g)||[];for(const n of d){const A=n.trim();if(A!==r.last4)return A.slice(-4)}return""};return S().filter(r=>{const l=c(r.bankAccountId||""),o=c(r.bankAccountName||""),d=C(r);if(f){if(d){if(d!==f)return!1}else if(r.bankAccountName&&!o.includes(f))return!1}if(m&&l&&l===m)return!0;if(u&&r.bankAccountId){const n=r.bankAccountId.replace(/\D/g,"");if(n&&(n===u||u.endsWith(n)||n.endsWith(u)))return!0}if(f&&(d===f||o.includes(f))){if(s){const n=c(s);if(n&&!o.includes(n)&&!n.includes(o))return!1}return!0}if(a){const n=c(a);if(o&&(n.includes(o)||o.includes(n))||l&&n.includes(l))return!0}return!1})},p="finsight-expense-draft",h=()=>{if(typeof window>"u")return null;try{const e=localStorage.getItem(p);if(!e)return null;const t=JSON.parse(e);if(t&&typeof t=="object"){const i=["4521","8830","1209","7766"];t.bankAccount&&i.some(s=>t.bankAccount.includes(s))&&(t.bankAccount="")}return t}catch{return null}},k=e=>{if(!(typeof window>"u"))try{localStorage.setItem(p,JSON.stringify({...e,savedAt:new Date().toISOString()}))}catch{}},T=()=>{if(!(typeof window>"u"))try{localStorage.removeItem(p)}catch{}},R=()=>{const e=Number(localStorage.getItem("finsight-expense-seq")??"1");return localStorage.setItem("finsight-expense-seq",String(e+1)),`EXP-${new Date().getFullYear()}-${String(e).padStart(4,"0")}`},D=["Salaries & Wages","Rent & Utilities","Travel & Conveyance","Marketing & Advertising","IT & Software","Office Supplies","Professional Services","Maintenance & Repairs","Taxes & Compliance","Bank Charges","Miscellaneous"],b={"Salaries & Wages":["Basic Salary","Bonus","Incentive","PF/ESI","Gratuity"],"Travel & Conveyance":["Air Travel","Hotel","Local Conveyance","Visa & Documentation"],"IT & Software":["SaaS Subscriptions","Hardware","Domain & Hosting","Licenses"],"Marketing & Advertising":["Digital Ads","Events","Branding","PR"],"Rent & Utilities":["Office Rent","Electricity","Internet","Water"],"Office Supplies":["Stationery","Pantry","Furniture"],"Professional Services":["Legal","Audit","Consulting","Recruitment"],"Maintenance & Repairs":["Office Maintenance","Equipment Repair"],"Taxes & Compliance":["GST","Income Tax","TDS","ROC Filing"],"Bank Charges":["Transaction Fees","FX Charges","Loan Processing"],Miscellaneous:["Other"]},w=["Supplier","Contractor","Employee","Bank","Other"],O=["Bank Transfer","Cheque","Cash","UPI","Credit Card","NEFT/RTGS","Auto-debit","Other"],x=["Paid","Partial","Advance","Pending"],v=["Weekly","Monthly","Quarterly","Annually"],P=["INR","USD","EUR","GBP","AED","SGD"],B=[],L=["Term Loan â HDFC (â¹50L)","Equipment Lease â Siemens","Vendor Credit â AWS Annual","Working Capital â ICICI"];export{L as A,B,P as C,D as E,O as P,v as R,b as S,w as V,x as a,E as b,T as c,y as d,S as e,N as g,h as l,R as n,k as s};
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.