{"id":1400,"date":"2026-06-20T11:15:12","date_gmt":"2026-06-20T11:15:12","guid":{"rendered":"https:\/\/360bizbrokers.com\/?page_id=1400"},"modified":"2026-06-20T12:06:42","modified_gmt":"2026-06-20T12:06:42","slug":"commercial-lease-analytics","status":"publish","type":"page","link":"https:\/\/360bizbrokers.com\/es\/commercial-lease-analytics\/","title":{"rendered":"Commercial Lease Analytics"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1400\" class=\"elementor elementor-1400\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2504bb0 e-flex e-con-boxed e-con e-parent\" data-id=\"2504bb0\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-93d5362 elementor-widget elementor-widget-html\" data-id=\"93d5362\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\" \/>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n<title>Commercial Lease Analytics V4<\/title>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/pdf.js\/3.11.174\/pdf.min.js\"><\/script>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/mammoth\/1.7.2\/mammoth.browser.min.js\"><\/script>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/tesseract.js\/5.0.5\/tesseract.min.js\"><\/script>\n<style>\n:root{--black:#050505;--charcoal:#111111;--ink:#181818;--muted:#6f6f6f;--gold:#c9a227;--gold2:#f2d675;--pale:#fff9e8;--white:#fff;--line:#ded7c6;--danger:#b42318;--warn:#b54708;--ok:#027a48;--critical:#7a271a;--shadow:0 20px 45px rgba(0,0,0,.15);--radius:18px}*{box-sizing:border-box}body{margin:0;background:#f7f4ec;color:var(--ink);font-family:Arial,Helvetica,sans-serif;line-height:1.45}.app{max-width:1240px;margin:0 auto;padding:22px}header{background:linear-gradient(135deg,#000,#171717 58%,#3c310b);color:#fff;padding:34px 22px;border-bottom:5px solid var(--gold);box-shadow:var(--shadow)}header .inner{max-width:1240px;margin:0 auto}h1{font-size:clamp(30px,4vw,50px);margin:0 0 8px;letter-spacing:.3px;color:#fff!important;text-shadow:0 2px 8px rgba(0,0,0,.45)}h2{margin:0 0 14px;color:#111;font-size:24px}header h1, header .subtitle{color:#fff!important}h3{margin:18px 0 8px;color:#111}.subtitle{font-size:17px;opacity:.94;max-width:930px}.disclaimer{background:#fff8df;border:1px solid var(--gold);color:#3b2d00;padding:14px;border-radius:14px;margin-top:18px}.grid{display:grid;gap:16px}.grid2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}.card{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;margin:18px 0}.mini{border:1px solid var(--line);background:#fffdf8;border-radius:14px;padding:14px}label{display:block;font-weight:800;margin:0 0 6px;color:#161616}input,select,textarea{width:100%;border:1px solid #cfc6ae;border-radius:11px;background:#fff;padding:11px;font-size:14px;color:#111}textarea{min-height:120px;resize:vertical}.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.btn,button{border:0;border-radius:12px;background:#050505;color:#fff;font-weight:800;padding:12px 16px;cursor:pointer;text-decoration:none;display:inline-block}.btn:hover,button:hover{background:#2a2a2a}button.gold,.btn.gold{background:var(--gold);color:#111}button.secondary,.btn.secondary{background:#fff9e8;color:#1f1a0a;border:1px solid var(--gold)}button.danger{background:#b42318;color:#fff}.small{font-size:13px;color:var(--muted)}.drop{border:2px dashed var(--gold);background:#fffdf8;border-radius:18px;padding:22px;text-align:center}.drop.drag{background:#fff4c2}.filelist{margin-top:12px;text-align:left}.status{padding:12px;border-radius:12px;background:#fff8df;border:1px solid var(--gold);margin-top:12px}.hidden{display:none!important}.risk{display:inline-block;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:900}.Low{background:#ecfdf3;color:var(--ok)}.Medium{background:#fffaeb;color:var(--warn)}.High{background:#fff1f3;color:#c01048}.Critical{background:#fee4e2;color:var(--critical)}table{width:100%;border-collapse:collapse;margin:10px 0 18px}th,td{border:1px solid var(--line);padding:9px;vertical-align:top;text-align:left}th{background:#111;color:#f7d96d}.report{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px}.report h2{border-bottom:2px solid var(--gold);padding-bottom:8px;margin-top:24px}.report h2:first-child{margin-top:0}.quote{background:#fffaf0;border-left:4px solid var(--gold);padding:8px 10px;margin:6px 0;color:#27210e}.pill{display:inline-block;background:#111;border:1px solid #111;color:#f7d96d;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:800;margin:2px}.score{font-size:34px;font-weight:900;color:#111}.notice{background:#fff8df;border:1px solid var(--gold);color:#3b2d00;border-radius:14px;padding:14px}.toolbar{justify-content:space-between}.brandline{height:4px;background:linear-gradient(90deg,#000,var(--gold),#fff,var(--gold),#000);border-radius:999px;margin:16px 0}footer{text-align:center;color:var(--muted);padding:24px}@media(max-width:850px){.grid2,.grid3{grid-template-columns:1fr}.app{padding:14px}.toolbar{justify-content:flex-start}}@media print{header,.no-print,.card:not(#reportCard),footer{display:none!important}body{background:#fff}.app{max-width:none;padding:0}.card,#reportCard{box-shadow:none;border:0;margin:0}.report{border:0}.report h2{page-break-after:avoid}}\n<\/style>\n<\/head>\n<body>\n<header><div class=\"inner\"><h1>Commercial Lease Analytics<\/h1><div class=\"subtitle\">Upload commercial lease documents, assignments, guarantees, and landlord consents. The app extracts key terms, flags risks, and creates plain-English reports for business brokers, buyers, and sellers.<\/div><div class=\"disclaimer\"><strong>Important legal disclaimer:<\/strong> This app does not provide legal advice and does not replace an attorney. A qualified attorney should review all lease documents before any business, financing, closing, assignment, or lease decision is made.<\/div><\/div><\/header>\n<main class=\"app\">\n<section class=\"card no-print\"><h2>1. Upload Documents<\/h2><div id=\"drop\" class=\"drop\"><p><strong>Drop lease files here<\/strong> or choose files below.<\/p><p class=\"small\">Accepted: PDF, DOCX, TXT, JPG, PNG. Text-based PDFs are extracted first. Image\/scanned PDFs use OCR fallback when available, which may take longer.<\/p><input id=\"files\" type=\"file\" multiple accept=\".pdf,.doc,.docx,.txt,.jpg,.jpeg,.png,.webp,application\/pdf,application\/vnd.openxmlformats-officedocument.wordprocessingml.document,text\/plain,image\/*\" \/><\/div><div id=\"fileList\" class=\"filelist small\"><\/div><div id=\"extractStatus\" class=\"status hidden\"><\/div><\/section>\n<section class=\"card no-print\"><h2>2. Deal Details<\/h2><div class=\"grid grid3\"><div><label>Transaction type<\/label><select id=\"transactionType\"><option>Business sale with lease assignment<\/option><option>Business sale with new lease<\/option><option>Asset sale<\/option><option>Stock \/ membership interest sale<\/option><option>Sublease transaction<\/option><option>Lease review only<\/option><\/select><\/div><div><label>Business name<\/label><input id=\"businessName\" placeholder=\"Example: Woof Gang Maitland\" \/><\/div><div><label>Type of business<\/label><input id=\"businessType\" placeholder=\"Restaurant, salon, franchise, retail...\" \/><\/div><div><label>Purchase price<\/label><input id=\"purchasePrice\" placeholder=\"$\" \/><\/div><div><label>Monthly gross revenue<\/label><input id=\"grossRevenue\" placeholder=\"$\" \/><\/div><div><label>Monthly net income \/ SDE<\/label><input id=\"netIncome\" placeholder=\"$\" \/><\/div><div><label>Desired closing date<\/label><input id=\"closingDate\" type=\"date\" \/><\/div><div><label>Buyer financing<\/label><select id=\"financing\"><option>Not specified<\/option><option>Cash<\/option><option>SBA<\/option><option>Seller financing<\/option><option>Conventional loan<\/option><option>Mixed financing<\/option><\/select><\/div><div><label>Seller personal guarantee?<\/label><select id=\"sellerGuarantee\"><option>Unknown<\/option><option>Yes<\/option><option>No<\/option><\/select><\/div><div><label>Buyer needs<\/label><select id=\"buyerNeeds\"><option>Unknown<\/option><option>Lease assignment<\/option><option>New lease<\/option><option>Sublease<\/option><option>Landlord consent only<\/option><\/select><\/div><div><label>Broker name \/ company<\/label><input id=\"broker\" placeholder=\"Broker \/ company\" \/><\/div><div><label>State and county<\/label><input id=\"location\" placeholder=\"Florida, Orange County\" \/><\/div><\/div><h3>Optional notes or manually pasted lease text<\/h3><textarea id=\"manualText\" placeholder=\"Paste lease text here if extraction is incomplete, or add deal notes for the report.\"><\/textarea><div class=\"row\" style=\"margin-top:14px\"><button id=\"analyzeBtn\" class=\"gold\">Analyze Lease<\/button><button class=\"secondary\" id=\"sampleBtn\">Load Sample Demo Text<\/button><button class=\"secondary\" id=\"clearBtn\">Clear<\/button><\/div><\/section>\n<section class=\"card no-print\"><h2>3. Extracted Text Review<\/h2><p class=\"small\">Review extracted text before analysis. Correct obvious OCR or extraction errors here. For scanned PDFs, make sure OCR text appears before clicking Analyze.<\/p><textarea id=\"extractedText\" style=\"min-height:240px\" placeholder=\"Extracted document text will appear here.\"><\/textarea><\/section>\n<section class=\"card hidden\" id=\"reportCard\"><div class=\"row no-print toolbar\" style=\"margin-bottom:14px\"><h2 style=\"margin:0\">Lease Analysis Report<\/h2><div class=\"row\"><button id=\"printBtn\">Download \/ Print PDF<\/button><button class=\"secondary\" id=\"wordBtn\">Download Editable Word-Style Document<\/button><button class=\"secondary\" id=\"copyBtn\">Copy Report<\/button><\/div><\/div><div id=\"report\" class=\"report\"><\/div><\/section>\n<section class=\"card no-print\"><h2>Privacy and Production Notes<\/h2><div class=\"notice\"><strong>Standalone version:<\/strong> This file processes document text in the browser and does not create secure cloud storage by itself. For production AI-grade use, connect it to a secure backend with login, encrypted storage, document deletion, audit logs, robust OCR, and a private AI workflow.<\/div><\/section>\n<\/main><footer>Commercial Lease Analytics V4 \u2022 Black, Gold & White Edition \u2022 Business brokerage support only \u2022 Not legal advice<\/footer>\n<script>\nif(window.pdfjsLib){pdfjsLib.GlobalWorkerOptions.workerSrc='https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/pdf.js\/3.11.174\/pdf.worker.min.js'}\nconst $=id=>document.getElementById(id); let extractedParts=[];\nfunction esc(s){return String(s??'').replace(\/[&<>]\/g,m=>({'&':'&amp;','<':'&lt;','>':'&gt;'}[m]))}\nfunction money(n){return n?String(n).trim():'Not found'}\nfunction norm(t){return (t||'').replace(\/\\r\/g,'\\n').replace(\/[ \\t]+\/g,' ').replace(\/\\n{3,}\/g,'\\n\\n')}\nfunction clean(v){return (v||'').replace(\/DocuSign Envelope ID:.*\/gi,'').replace(\/\\.{3,}\/g,' ').replace(\/\\s+\/g,' ').trim().replace(\/[;,.]$\/,'')||'Not found'}\nfunction section(text,start,endWords){let lower=text.toLowerCase(),i=lower.indexOf(start.toLowerCase()); if(i<0)return ''; let j=text.length; for(const w of endWords){let k=lower.indexOf(w.toLowerCase(),i+start.length); if(k>0)j=Math.min(j,k)} return text.slice(i,j)}\nfunction match(text,rx){let m=text.match(rx);return m?clean(m[1]||m[0]):'Not found'}\nfunction findSnippet(text,terms,limit=3){let out=[],flat=norm(text); for(const term of terms){let i=flat.toLowerCase().indexOf(term.toLowerCase()); if(i>=0){let s=Math.max(0,i-110),e=Math.min(flat.length,i+520); let q=flat.slice(s,e).trim(); if(!out.some(x=>x.includes(q.slice(0,80))))out.push(q)}} return out.slice(0,limit)}\nfunction has(text,words){return words.some(w=>new RegExp(w,'i').test(text))}\nfunction firstDollar(line){let m=line.match(\/\\$\\s?[\\d,]+(?:\\.\\d{2})?\/); return m?m[0]:'Not found'}\nfunction pageTextFromContent(content){\n  const rows=[];\n  for(const it of content.items){\n    const str=(it.str||'').trim(); if(!str) continue;\n    const x=it.transform?it.transform[4]:0, y=it.transform?it.transform[5]:0;\n    let row=rows.find(r=>Math.abs(r.y-y)<3);\n    if(!row){row={y,items:[]}; rows.push(row)}\n    row.items.push({x,str});\n  }\n  rows.sort((a,b)=>b.y-a.y);\n  return rows.map(r=>r.items.sort((a,b)=>a.x-b.x).map(i=>i.str).join(' ').replace(\/\\s+\/g,' ').trim()).join('\\n');\n}\nasync function extractPDF(file){\n  const buf=await file.arrayBuffer();\n  const pdf=await pdfjsLib.getDocument({data:buf}).promise;\n  let pages=[]; let needsOCR=[];\n  for(let p=1;p<=pdf.numPages;p++){\n    const page=await pdf.getPage(p);\n    const content=await page.getTextContent({normalizeWhitespace:true,disableCombineTextItems:false});\n    let text=pageTextFromContent(content);\n    pages.push(`\\n\\n--- ${file.name} | Page ${p} ---\\n${text}`);\n    const alpha=(text.match(\/[A-Za-z]\/g)||[]).length;\n    if(alpha<80) needsOCR.push(p);\n  }\n  if(needsOCR.length&&window.Tesseract){\n    setStatus(`OCR fallback running for ${file.name} pages ${needsOCR.join(', ')}. This may take a few minutes...`);\n    for(const p of needsOCR){\n      try{\n        const page=await pdf.getPage(p);\n        const viewport=page.getViewport({scale:2.25});\n        const canvas=document.createElement('canvas');\n        canvas.width=viewport.width; canvas.height=viewport.height;\n        await page.render({canvasContext:canvas.getContext('2d'),viewport}).promise;\n        const r=await Tesseract.recognize(canvas,'eng');\n        pages[p-1]+='\\n[OCR TEXT]\\n'+r.data.text;\n      }catch(e){pages[p-1]+='\\n[OCR failed for this page: '+e.message+']'}\n    }\n  } else if(needsOCR.length && !window.Tesseract){\n    pages.push('\\n[OCR warning: Some pages appear scanned\/image-based, but OCR library did not load.]');\n  }\n  return pages.join('\\n')\n}\nasync function extractFile(file){let type=file.type||'',name=file.name.toLowerCase();if(type.includes('pdf')||name.endsWith('.pdf'))return await extractPDF(file);if(type.includes('word')||name.endsWith('.docx')){let r=await mammoth.extractRawText({arrayBuffer:await file.arrayBuffer()});return r.value}if(type.startsWith('image\/')&&window.Tesseract){let r=await Tesseract.recognize(file,'eng');return r.data.text}return await file.text()}\nfunction setStatus(msg){$('extractStatus').classList.remove('hidden');$('extractStatus').textContent=msg}\nasync function handleFiles(files){extractedParts=[];$('fileList').innerHTML=[...files].map(f=>`<div>\u2022 ${esc(f.name)} (${Math.round(f.size\/1024)} KB)<\/div>`).join('');let all=[];for(const f of files){try{setStatus('Extracting '+f.name+'...');let t=await extractFile(f);all.push(`\\n\\n===== DOCUMENT: ${f.name} =====\\n${t}`)}catch(e){all.push(`\\n\\n===== DOCUMENT: ${f.name} =====\\n[Extraction error: ${e.message}]`)}}$('extractedText').value=norm(all.join('\\n'));setStatus('Extraction complete. Review text, then click Analyze Lease.')}\n$('files').addEventListener('change',e=>handleFiles(e.target.files));['dragenter','dragover'].forEach(ev=>$('drop').addEventListener(ev,e=>{e.preventDefault();$('drop').classList.add('drag')}));['dragleave','drop'].forEach(ev=>$('drop').addEventListener(ev,e=>{e.preventDefault();$('drop').classList.remove('drag')}));$('drop').addEventListener('drop',e=>handleFiles(e.dataTransfer.files));\n\nfunction prepLegalText(t){return norm(t)\n .replace(\/LEA\\s+SE\/gi,'LEASE')\n .replace(\/L\\s+ORD\/gi,'LORD')\n .replace(\/TEN\\s+ANT\/gi,'TENANT')\n .replace(\/PREM\\s+ISES\/gi,'PREMISES')\n .replace(\/ASSIGN\\s+MENT\/gi,'ASSIGNMENT')\n .replace(\/COMMENCE\\s+MENT\/gi,'COMMENCEMENT')\n .replace(\/Indapandanca Lana\/gi,'Independence Lane')\n .replace(\/Mirakami\/gi,'Murakami')\n .replace(\/M\\s*&\\s*M\\s+GLOBAL\\s+SOLUTIONS(?!\\s+LLC)\/gi,'M & M Global Solutions LLC')\n .replace(\/[\u201c\u201d]\/g,'\"').replace(\/[\u2019\u2018]\/g,\"'\");}\nfunction grab(text,rx){let m=text.match(rx);return m?clean(m[1]||m[0]):'Not found'}\nfunction compactDollars(s){return (s||'').replace(\/\\$\\s+\/g,'$').replace(\/(\\d)\\s*,\\s*(\\d)\/g,'$1,$2')}\nfunction extractDollars(s){return [...String(s||'').matchAll(\/\\$\\s?[\\d,]+(?:\\.\\d{2})?\/g)].map(m=>m[0].replace(\/\\s+\/g,''));}\nfunction parseMoney(v){if(!v||v==='Not found')return null;let m=String(v).match(\/[\\d,]+(?:\\.\\d{2})?\/);return m?parseFloat(m[0].replace(\/,\/g,'')):null}\nfunction pct(n){return Math.round(n)+'%'}\nfunction extractRentSchedule(text){\n let body=prepLegalText(text); let out=[];\n let block=(body.match(\/Lease\\s+Year\\s+Base\\s+Rent\\s+PSF\\s+Monthly\\s+Base\\s+Rent\\s+Annual\\s+Base\\s+Rent[\\s\\S]{0,1300}?(?=\\*?\\s*See\\s+section|Rent\\s+shall\\s+be\\s+paid|The\\s+Base\\s+Rent|Possession\\s+Date|Rent\\s+Commencement)\/i)||[])[0]||'';\n block=compactDollars(block).replace(\/\\n\/g,' ');\n let rx=\/\\b(10|[1-9])\\s+\\$([\\d,]+\\.\\d{2})\\s+\\$([\\d,]+\\.\\d{2})\\s+\\$([\\d,]+\\.\\d{2})\/g; let m;\n while((m=rx.exec(block))){out.push({year:m[1], psf:'$'+m[2], monthly:'$'+m[3], annual:'$'+m[4]});}\n if(!out.length){\n   let rx2=\/\\b(10|[1-9])\\s+\\$([\\d,]+\\.\\d{2})\\s*\\$([\\d,]+\\.\\d{2})\\s*\\$([\\d,]+\\.\\d{2})\/g;\n   while((m=rx2.exec(body))){out.push({year:m[1], psf:'$'+m[2], monthly:'$'+m[3], annual:'$'+m[4]});}\n }\n return out;\n}\nfunction rentScheduleHtml(schedule){if(!schedule||!schedule.length)return 'Not found';return '<table><tr><th>Year<\/th><th>PSF<\/th><th>Monthly Base Rent<\/th><th>Annual Base Rent<\/th><\/tr>'+schedule.map(r=>`<tr><td>${esc(r.year)}<\/td><td>${esc(r.psf)}<\/td><td>${esc(r.monthly)}<\/td><td>${esc(r.annual)}<\/td><\/tr>`).join('')+'<\/table>'}\nfunction rentScheduleText(schedule){return schedule&&schedule.length?schedule.map(r=>`Year ${r.year}: ${r.psf} PSF \/ ${r.monthly} monthly \/ ${r.annual} annual`).join('; '):'Not found'}\nfunction extractFinancials(text){\n let body=prepLegalText(text), rider=(body.match(\/RETAIL\\s+LEASE\\s+INFORMATION\\s+RIDER[\\s\\S]{0,12000}?(?=\\s+LEASE\\s+THIS\\s+LEASE|$)\/i)||[])[0]||body;\n let schedule=extractRentSchedule(body);\n let initial=grab(rider,\/First\\s+Month'?s\\s+Rent\\s*:\\s*([\\s\\S]{1,360}?execution\\s+and\\s+delivery\\s+of\\s+this\\s+Lease)\/i);\n let opCost=grab(rider,\/Operating\\s+Costs\\s*\\$\\s?([\\d,]+\\.\\d{2})\/i); if(opCost!=='Not found')opCost='$'+opCost;\n let salesTax=grab(rider,\/Sales\\s+Tax\\s*\\$\\s?([\\d,]+\\.\\d{2})\/i); if(salesTax!=='Not found')salesTax='$'+salesTax;\n let totalFirst=grab(initial,\/amount\\s+of\\s*(\\$\\s?[\\d,]+\\.\\d{2})\/i);\n let firstBase=grab(initial,\/\\((\\$\\s?[\\d,]+\\.\\d{2})\\s+Base\\s+Rent\/i);\n if(firstBase==='Not found' && schedule.length) firstBase=schedule[0].monthly;\n let sec=grab(rider,\/Security\\s+Deposit\\s*:\\s*([\\s\\S]{1,220}?\\$\\s?[\\d,]+(?:\\.\\d{2})?)\/i);\n let secAmount=firstDollar(sec);\n let occ = (parseMoney(firstBase)||0)+(parseMoney(opCost)||0);\n return {schedule,initial,totalFirst,firstBase,opCost,salesTax,sec,secAmount,monthlyOccupancy:occ?('$'+occ.toLocaleString(undefined,{minimumFractionDigits:2,maximumFractionDigits:2})):'Not found'};\n}\nfunction extractDates(text){\n let body=prepLegalText(text);\n let leaseDate=grab(body,\/(?:Date\\s*:\\s*|dated\\s+as\\s+of\\s+|Lease\\s+Dated\\s+)((?:January|February|March|April|May|June|July|August|September|October|November|December)\\s+\\d{1,2}\\s*,\\s*\\d{4})\/i);\n let poss=grab(body,\/Possession\\s+Date\\s*:\\s*[^.]*?(?:no\\s+later\\s+than\\s+)?((?:January|February|March|April|May|June|July|August|September|October|November|December)\\s+\\d{1,2}\\s*,\\s*\\d{4})\/i);\n let rentComm=grab(body,\/Rent\\s+Commencement\\s+Date\\s*:\\s*([\\s\\S]{1,260}?)(?=\\s*14\\.|\\s*Lease\\s+Term|\\.)\/i);\n let term=grab(body,\/Lease\\s+Term\\s*:\\s*(?:Shall\\s+be\\s+)?([^.;\\n]{1,180}?months[^.;\\n]*)\/i);\n let exactExp=grab(body,\/expiration\\s+date\\s+of\\s+(?:this\\s+)?Lease\\s+(?:Term\\s+)?is\\s*([^.;\\n]{2,120})\/i);\n let calc='Not found; lease states 120 months from Rent Commencement Date and requires Possession\/Rent Commencement Date letter to calculate exact expiration.';\n return {leaseDate,poss,rentComm,term,exactExp: exactExp==='Not found'?calc:exactExp};\n}\nfunction extractBasics(text){\n let body=prepLegalText(text);\n let riderMatch=body.match(\/RETAIL\\s+LEASE\\s+INFORMATION\\s+RIDER\\s+This\\s+Lease\\s+Information\\s+Rider[\\s\\S]{0,12000}?(?=\\s+LEASE\\s+THIS\\s+LEASE|$)\/i) || body.match(\/This\\s+Lease\\s+Information\\s+Rider[\\s\\S]{0,12000}?(?=\\s+LEASE\\s+THIS\\s+LEASE|$)\/i);\n let rider=riderMatch?riderMatch[0]:body;\n let consentMatch=body.match(\/CONSENT\\s+TO\\s+ASSIGNMENT[\\s\\S]{0,5200}?(?=\\s+IN\\s+WITNESS\\s+WHEREOF|\\s+JOINDER|\\s+Exhibit\\s+1|$)\/i);\n let consent=consentMatch?consentMatch[0]:'';\n let fin=extractFinancials(body), dates=extractDates(body), basics={};\n basics['Landlord name']=grab(rider,\/(?:^|\\s)2\\.\\s*Landlord\\s*:\\s*([\\s\\S]{1,650}?)(?=\\s*3\\.\\s*Tenant\\s*:)\/i);\n if(basics['Landlord name']==='Not found') basics['Landlord name']=grab(body,\/By\\s+and\\s+between\\s+([\\s\\S]{1,650}?)\\s+as\\s+Landlord\\s+and\/i);\n basics['Tenant name']=grab(rider,\/(?:^|\\s)3\\.\\s*Tenant\\s*:\\s*([\\s\\S]{1,380}?)(?=\\s*4\\.\\s*Project\\s*:)\/i);\n if(basics['Tenant name']==='Not found') basics['Tenant name']=grab(body,\/as\\s+Landlord\\s+and\\s+([\\s\\S]{1,260}?)\\s+as\\s+Tenant\/i);\n basics['Business name, if shown']=grab(rider,\/Tenant'?s\\s+Trade\\s+Name\\s*\\(.*?\\)\\s*:\\s*([\\s\\S]{1,120}?)(?=\\s*4\\.\\s*Project\\s*:|\\s*Project\\s*:|\\.)\/i);\n if(basics['Business name, if shown']==='Not found') basics['Business name, if shown']=grab(body,\/operation\\s+of\\s+a\\s+([\\s\\S]{1,100}?)(?:\\s+offering|\\s+establishment|\\.)\/i);\n basics['Premises address']=grab(rider,\/Premises\\s+address\\s+will\\s+be\\s*([\\s\\S]{1,160}?\\d{5}\\s*,?\\s*Suite\\s*\"?A\"?)\/i);\n if(basics['Premises address']==='Not found') basics['Premises address']=grab(consent,\/located\\s+at\\s*([\\s\\S]{1,160}?\\d{5})\/i);\n basics['Lease start date']=dates.leaseDate;\n basics['Possession date']=dates.poss;\n basics['Rent commencement date']=dates.rentComm;\n basics['Lease expiration date']=dates.exactExp;\n basics['Current term remaining']='Requires current date plus confirmed Rent Commencement Date \/ expiration date.';\n basics['Renewal options']=grab(rider,\/Tenant\\s+shall\\s+have\\s+([\\s\\S]{1,300}?extension\\s+options[\\s\\S]{0,180}?notice\\s+to\\s+Landlord)\/i);\n if(basics['Renewal options']==='Not found') basics['Renewal options']=grab(body,\/option\\s+to\\s+extend\\s+this\\s+Lease[\\s\\S]{0,420}?Renewal\\s+Notice\/i);\n basics['Monthly base rent']=fin.firstBase;\n basics['Annual base rent']=fin.schedule.length?fin.schedule[0].annual:'Not found';\n basics['Base rent schedule']=rentScheduleText(fin.schedule);\n basics['Additional rent \/ operating costs']=fin.opCost==='Not found'?grab(body,\/Tenant'?s\\s+Allocated\\s+Share\\s+of\\s+the\\s+first\\s+year'?s\\s+Operating\\s+Costs[\\s\\S]{0,160}\/i):fin.opCost;\n basics['Initial monthly occupancy cost']=fin.monthlyOccupancy;\n basics['First month total due']=fin.totalFirst;\n basics['Sales tax on rent']=fin.salesTax;\n basics['Security deposit']=fin.secAmount!=='Not found'?fin.secAmount:fin.sec;\n basics['Permitted use']=grab(rider,\/Permitted\\s+Use\\s+of\\s+the\\s+Premises\\s*:\\s*([\\s\\S]{1,560}?)(?=\\s*11\\s*\\.\\s*Rent\\s*:|\\s*Rent\\s*:)\/i);\n if(basics['Permitted use']==='Not found') basics['Permitted use']=grab(body,\/Tenant\\s+shall\\s+use\\s+the\\s+Premises\\s+solely\\s+for\\s*([\\s\\S]{1,300}?)(?=\\.\\s+Tenant|\\.)\/i);\n basics['Square footage']=grab(rider,\/Rentable\\s+Area\\s+of\\s+the\\s+Premises\\s*:\\s*(Approximately\\s*[\\d,]+\\s*(?:square\\s+feet|SF))\/i);\n if(basics['Square footage']==='Not found') basics['Square footage']=grab(rider,\/Premises\\s*:\\s*(Approximately\\s*[\\d,]+\\s*(?:square\\s+feet|SF))\/i);\n basics['Allocated share']=grab(rider,\/Allocated\\s+Share\\s*:\\s*([\\s\\S]{1,140}?%)\/i);\n basics['Lease type']=\/triple\\s+net|Operating\\s+Costs|Real\\s+Estate\\s+Taxes|insurance\\s+costs\/i.test(body)?'Likely NNN lease with pass-throughs for operating costs, real estate taxes, insurance, utilities and maintenance; attorney should confirm.':'Not found';\n basics['Guarantors']=grab(rider,\/Guarantor\\s*:\\s*([^.;\\n]{2,180})\/i);\n if(basics['Guarantors']==='Not found') basics['Guarantors']=grab(consent,\/existing\\s+guarantors\\s+of\\s+the\\s+Lease\\s*,\\s*([^.;\\n]{2,180}?)(?=,?\\s+remaining|\\s+remaining)\/i);\n let newGuar=grab(consent,\/(Juan\\s+P\\.\\s+Murga\\s+Hernandez\\s+and\\s+Gilda\\s+Castillo\\s+Morales\\s+becoming\\s+guarantors[^.;]*)\/i);\n if(newGuar!=='Not found') basics['Assignment \/ new guarantors']=newGuar;\n basics['Assignment consent rule']=grab(body,\/Neither\\s+Tenant[\\s\\S]{0,820}?Landlord'?s\\s+consent[\\s\\S]{0,380}?sole\\s+discretion\/i);\n if(basics['Assignment consent rule']==='Not found') basics['Assignment consent rule']=grab(consent,\/Lessor\\s+hereby\\s+consents[\\s\\S]{0,520}?Assignment\\s+Agreement\/i);\n basics._financials=fin; basics._dates=dates;\n return basics\n}\nfunction identifyDocs(text){let docs=[];[['Commercial Lease','COMMERCIAL RETAIL LEASE|RETAIL LEASE INFORMATION RIDER'],['Assignment \/ Transfer Language','ASSIGNMENT OR SUBLETTING|CONSENT TO ASSIGNMENT'],['Landlord Consent','CONSENT TO ASSIGNMENT|Lessor hereby consents'],['Personal Guarantee','GUARANTY|Guarantor'],['Renewal Option','Extension Option|renewal option'],['Estoppel Certificate','ESTOPPEL CERTIFICATES'],['Addenda \/ Exhibits \/ Riders','EXHIBIT A|EXHIBIT B|RIDER'],['Rules and Regulations','RULES AND REGULATIONS'],['Prohibited Uses \/ Exclusives','PROHIBITED USES|exclusive']].forEach(([n,r])=>{if(new RegExp(r,'i').test(text))docs.push(n)});return docs.length?docs:['No document type confidently identified']}\nfunction evidenceStatus(qs){return qs&&qs.length?'FOUND':'NOT FOUND'}\nfunction riskRows(text,basics){\n const defs=[\n ['Short remaining lease term','Medium',['Lease Term','expiration date','Rent Commencement Date'],'Confirm exact commencement and expiration dates.'],\n ['No renewal option','High',['Extension Option','renewal option','extension options'],'Buyer should verify renewal rights and conditions.'],\n ['Landlord consent uncertainty','High',[\"Landlord's consent\",'Landlord\u2019s consent','Lessor hereby consents','sole discretion','reasonable discretion'],'Landlord approval can affect closing timing and certainty.'],\n ['Seller continuing liability','Critical',['remain liable','Continuing Liability','release or discharge','not being released'],'Seller\/guarantor may remain liable after transfer unless released in writing.'],\n ['Personal guarantee','High',['Guaranty','Guarantor','guarantee'],'Guarantee exposure requires attorney review.'],\n ['High rent escalations','Medium',['Base Rent PSF','Escalation of Base Rent','Fair Market Rental'],'Confirm rent schedule and renewal-market rent process.'],\n ['Unclear CAM \/ operating costs','Medium',['Operating Costs','CAM','Real Estate Taxes','insurance costs'],'Confirm reconciliations, exclusions, caps, taxes and insurance.'],\n ['Restrictions on assignment','High',['may transfer this Lease without Landlord','Assignment or Subletting','Administrative Fee','Improper Transfer'],'Check consent standard, fees, buyer qualifications, and release.'],\n ['Use restrictions','Medium',['Permitted Use','Prohibited Uses','solely for the operation'],'Confirm buyer\u2019s exact business activities are permitted.'],\n ['Relocation clause','High',['relocate Tenant','New Premises'],'Relocation rights can disrupt operations and goodwill.'],\n ['Demolition \/ redevelopment termination','Medium',['demolition','redevelopment','terminate this Lease'],'Only flag as material if lease specifically grants a redevelopment\/demolition termination right.'],\n ['Default provisions','Medium',['Events of Default','Default Rate','Late Charges'],'Review cure periods, remedies, acceleration, and late charges.'],\n ['Unusual termination rights','High',['right to terminate this Lease','terminate this Lease by notice'],'Review landlord and tenant termination triggers.'],\n ['Exclusivity restrictions','Medium',['exclusive','shall not permit any other','Prohibited Uses'],'May help or restrict operations depending on the business.'],\n ['Non-compete \/ radius restriction','Medium',['radius','non-compete','radius restriction'],'Do not treat legal description bearings or distances as a radius restriction. Confirm actual operating restriction.'],\n ['Required remodeling \/ repairs','Medium',['Tenant Improvements','Alterations','repair and maintain','Tenant Work Letter'],'Confirm improvement, repair, and restoration obligations.'],\n ['Environmental responsibilities','Medium',['Environmental Laws','hazardous','chemical','ADA'],'Usually standard unless unusual hazardous-material obligations are found.'],\n ['Franchise restrictions','Medium',['franchise','Trade Name','franchised'],'Coordinate lease transfer with franchise approval.'],\n ['Missing amendments or exhibits','Medium',['EXHIBIT','amended','first amendment'],'Verify all referenced amendments\/exhibits\/consents are uploaded.']];\n return defs.map(([item,rating,terms,note])=>{let qs=findSnippet(text,terms,2);let status=evidenceStatus(qs); if(item==='No renewal option' && basics['Renewal options'] && !\/^Not found\/.test(basics['Renewal options'])){status='FOUND RENEWAL OPTION'; rating='Low'; note='Renewal option language was found; verify conditions and notice deadline.'} if(item==='Non-compete \/ radius restriction' && !\/\\bradius\\b|non-compete|radius restriction\/i.test(text)){status='NOT FOUND'; rating='Low';} return {item,rating,status,note,quotes:qs}})\n}\nfunction confidenceSections(text,basics){\n const present=v=>v&&!\/^Not found|^Requires\/.test(String(v));\n let parties=[basics['Landlord name'],basics['Tenant name'],basics['Business name, if shown']].filter(present).length\/3*100;\n let premises=[basics['Premises address'],basics['Square footage'],basics['Permitted use']].filter(present).length\/3*100;\n let fin=[basics['Monthly base rent'],basics['Annual base rent'],basics['Base rent schedule'],basics['Additional rent \/ operating costs'],basics['Security deposit']].filter(present).length\/5*100;\n let assign=[basics['Assignment consent rule'],basics['Assignment \/ new guarantors'],basics['Guarantors']].filter(present).length\/3*100;\n let guarantee=[basics['Guarantors'],basics['Assignment \/ new guarantors']].filter(present).length\/2*100;\n let risk=\/ASSIGNMENT|GUARANTY|Operating Costs|Default|Permitted Use\/i.test(text)?88:55;\n return {Parties:pct(parties),Premises:pct(premises),'Financial Terms':pct(fin),'Assignment Terms':pct(assign),Guarantees:pct(guarantee),'Risk Analysis':pct(risk)};\n}\nfunction confidence(text,basics){let copy={...basics}; delete copy._financials; delete copy._dates; let found=Object.values(copy).filter(v=>v && !\/^Not found\/.test(v) && !\/^Requires\/.test(v)).length;let total=Object.keys(copy).length;let q=Math.min(97,Math.round(found\/total*78)+(\/OCR TEXT|CONSENT TO ASSIGNMENT\/i.test(text)?7:0)+(\/GUARANTY\/i.test(text)?5:0)+(\/Base\\s+Rent\\s+PSF\/i.test(text)?7:0));return Math.max(45,q)}\nfunction assignmentReadiness(text,basics){let score=50; if(!\/^Not found\/.test(basics['Assignment consent rule']||''))score+=12; if(\/Lessor\\s+hereby\\s+consents\/i.test(text))score+=15; if(!\/^Not found\/.test(basics['Renewal options']||''))score+=8; if(\/not\\s+being\\s+released|remain(?:ing)?\\s+liable\/i.test(text))score-=12; if(!\/^Not found\/.test(basics['Assignment \/ new guarantors']||''))score+=8; if(\/Administrative\\s+Fee\/i.test(text))score-=3; return Math.max(0,Math.min(100,score));}\nfunction sbaReview(text,basics,deal){let flags=[]; if(!\/^Not found\/.test(basics['Renewal options']||''))flags.push('Lease includes renewal options that may help meet SBA lease-control expectations.'); else flags.push('Renewal options were not found; SBA review may be difficult.'); if(\/sole\\s+discretion|arbitrarily\\s+granted\\s+or\\s+withheld\/i.test(text))flags.push('Landlord consent discretion may affect SBA closing timeline.'); if(\/remain(?:ing)?\\s+liable|not\\s+being\\s+released\/i.test(text))flags.push('Continuing guarantor liability should be coordinated with buyer, seller, lender, and closing attorney.'); if(\/relocate\\s+Tenant\/i.test(text))flags.push('Relocation clause may affect collateral\/location stability review.'); let level=flags.length>=3?'Potential SBA Concern':'Likely SBA Acceptable with legal\/lender review'; return {level,flags};}\nfunction missingDocs(text,basics){let list=[]; if(\/Rent\\s+Commencement\\s+Date\\s+Letter|Possession\\s+Date\\s*\\\/\\s*Rent\\s+Commencement\/i.test(text))list.push('Commencement Date Letter \/ Possession Date Letter appears referenced; upload completed version if available.'); if(\/first\\s+amendment\/i.test(text))list.push('First Amendment to Lease is referenced; confirm it was uploaded and reviewed.'); if(!\/estoppel\/i.test(text))list.push('Tenant\/Landlord estoppel certificate not found.'); list.push('Current rent ledger and CAM\/operating-cost reconciliation.'); list.push('Default status confirmation from landlord\/property manager.'); return list;}\nfunction snapshotRows(basics){let entries=Object.entries(basics).filter(([k])=>!k.startsWith('_')); return entries.map(([k,v])=>`<tr><td>${esc(k)}<\/td><td>${esc(v)}<\/td><td>${\/^Not found|^Requires\/.test(String(v))?'Not found \/ requires review':'Clearly stated or potentially stated in extracted text'}<\/td><\/tr>`).join('')}\nfunction analyze(){\n let text=norm(($('extractedText').value||'')+'\\n'+($('manualText').value||''));if(text.trim().length<50){alert('Please upload documents or paste lease text first.');return}\n const deal={transaction:$('transactionType').value,business:$('businessName').value,businessType:$('businessType').value,price:$('purchasePrice').value,gross:$('grossRevenue').value,net:$('netIncome').value,closing:$('closingDate').value,financing:$('financing').value,sellerGuarantee:$('sellerGuarantee').value,buyerNeeds:$('buyerNeeds').value,broker:$('broker').value,location:$('location').value};\n let basics=extractBasics(text);if(deal.business)basics['Business name, if shown']=deal.business;let fin=basics._financials;let docs=identifyDocs(text),risks=riskRows(text,basics),score=confidence(text,basics),sectionScores=confidenceSections(text,basics),readiness=assignmentReadiness(text,basics),sba=sbaReview(text,basics,deal);let missing=Object.entries(basics).filter(([k,v])=>!k.startsWith('_')&&(!v||\/^Not found\/.test(v)||\/^Requires\/.test(v))).map(([k])=>k);let docMissing=missingDocs(text,basics);let consentSnippet=findSnippet(text,['This consent is not assignable','remaining as guarantors','not being released','new guarantors','shall remain liable'],5);\n let report='';\n report+=`<h2>Executive Summary<\/h2><div class=\"brandline\"><\/div><p><strong>Transaction:<\/strong> ${esc(deal.transaction)}. <strong>Business:<\/strong> ${esc(basics['Business name, if shown'])}. <strong>Financing:<\/strong> ${esc(deal.financing)}.<\/p><p>This report summarizes apparent lease terms and business-brokerage implications from uploaded or pasted text. It is not legal advice. Items marked Not found, unclear, inferred, or requires attorney review should be verified against the signed lease package.<\/p><p><span class=\"score\">${score}%<\/span> overall confidence score. V.4 adds structured financial parsing, section confidence, assignment readiness, SBA review, and stronger false-positive controls.<\/p>`;\n report+=`<h2>One-Page Broker Deal Snapshot<\/h2><table><tr><th>Item<\/th><th>Finding<\/th><\/tr><tr><td>Business \/ Tenant<\/td><td>${esc(basics['Business name, if shown'])} \/ ${esc(basics['Tenant name'])}<\/td><\/tr><tr><td>Premises<\/td><td>${esc(basics['Premises address'])}; ${esc(basics['Square footage'])}<\/td><\/tr><tr><td>Lease Control<\/td><td>${esc(basics['Lease expiration date'])}; Renewal: ${esc(basics['Renewal options'])}<\/td><\/tr><tr><td>Initial Base Rent<\/td><td>${esc(basics['Monthly base rent'])} monthly; ${esc(basics['Annual base rent'])} annual<\/td><\/tr><tr><td>Estimated Monthly Occupancy<\/td><td>${esc(basics['Initial monthly occupancy cost'])} before sales tax if operating costs were extracted<\/td><\/tr><tr><td>Assignment<\/td><td>${esc(basics['Assignment consent rule'])}<\/td><\/tr><tr><td>Guarantors<\/td><td>${esc(basics['Guarantors'])}${basics['Assignment \/ new guarantors']?'; New\/assignment guarantors: '+esc(basics['Assignment \/ new guarantors']):''}<\/td><\/tr><\/table>`;\n report+=`<h2>Section Confidence<\/h2><table><tr><th>Category<\/th><th>Confidence<\/th><\/tr>${Object.entries(sectionScores).map(([k,v])=>`<tr><td>${esc(k)}<\/td><td><strong>${esc(v)}<\/strong><\/td><\/tr>`).join('')}<\/table>`;\n report+=`<h2>Assignment Readiness & SBA Review<\/h2><p><span class=\"score\">${readiness}\/100<\/span> assignment readiness score.<\/p><p><strong>SBA lease review:<\/strong> ${esc(sba.level)}<\/p><ul>${sba.flags.map(x=>`<li>${esc(x)}<\/li>`).join('')}<\/ul>`;\n report+=`<h2>Lease Snapshot<\/h2><table><tr><th>Field<\/th><th>Result<\/th><th>Status<\/th><\/tr>${snapshotRows(basics)}<\/table>`;\n report+=`<h2>Documents Identified<\/h2><p>${docs.map(d=>`<span class=\"pill\">${esc(d)}<\/span>`).join(' ')}<\/p>`;\n report+=`<h2>Key Business Terms<\/h2><p><strong>Permitted use:<\/strong> ${esc(basics['Permitted use'])}<\/p><p><strong>Term and renewal:<\/strong> ${esc(basics['Lease expiration date'])}; renewal: ${esc(basics['Renewal options'])}<\/p><p><strong>Rent structure:<\/strong> ${esc(basics['Monthly base rent'])}; additional rent\/operating costs: ${esc(basics['Additional rent \/ operating costs'])}<\/p>`;\n report+=`<h2>Structured Financial Extraction<\/h2><table><tr><th>Financial Item<\/th><th>Extracted Result<\/th><\/tr><tr><td>Initial Monthly Base Rent<\/td><td>${esc(fin.firstBase)}<\/td><\/tr><tr><td>Operating Costs \/ CAM Estimate<\/td><td>${esc(fin.opCost)}<\/td><\/tr><tr><td>Sales Tax<\/td><td>${esc(fin.salesTax)}<\/td><\/tr><tr><td>Total First Month Due<\/td><td>${esc(fin.totalFirst)}<\/td><\/tr><tr><td>Security Deposit<\/td><td>${esc(fin.secAmount)}<\/td><\/tr><tr><td>Estimated Monthly Occupancy Cost Excluding Sales Tax<\/td><td>${esc(fin.monthlyOccupancy)}<\/td><\/tr><\/table><h3>Base Rent Schedule<\/h3>${rentScheduleHtml(fin.schedule)}`;\n report+=`<h2>Assignment \/ Transfer Analysis<\/h2><p>${esc(basics['Assignment consent rule'])}<\/p>${findSnippet(text,['Assignment or Subletting',\"Landlord's consent\",'Lessor hereby consents','Administrative Fee','Continuing Liability'],5).map(q=>`<div class=\"quote\">${esc(q)}<\/div>`).join('')}${consentSnippet.length?'<h3>Landlord Consent \/ Guarantee Notes<\/h3>'+consentSnippet.map(q=>`<div class=\"quote\">${esc(q)}<\/div>`).join(''):''}`;\n report+=`<h2>Buyer Analysis<\/h2><ul><li>Confirm the lease term and renewal rights support the purchase price, loan term, and desired closing date.<\/li><li>Confirm landlord approval requirements, buyer financial package, credit, entity documents, deposits, and replacement guarantees.<\/li><li>Compare revenue\/SDE to monthly base rent, operating costs, taxes, insurance, utilities, and repair obligations.<\/li><li>Confirm use restrictions, franchise requirements, signage, exclusives, relocation rights, default provisions, and prohibited uses do not impair operations.<\/li><\/ul>`;\n report+=`<h2>Seller Analysis<\/h2><ul><li>Confirm whether landlord approval is required before closing and whether consent is conditioned on new or continuing guarantors.<\/li><li>Confirm whether seller, tenant entity, or original guarantors remain liable after assignment.<\/li><li>Prepare the full lease package before marketing: lease, amendments, assignment\/consent forms, guarantees, rent ledger, CAM history, default status, insurance requirements, and landlord contact information.<\/li><\/ul>`;\n report+=`<h2>Business Broker Analysis<\/h2><ul><li>Lease transferability, term remaining, renewal rights, rent burden, personal guarantees, and landlord approval timeline can affect valuation, marketability, SBA underwriting, and closing certainty.<\/li><li>Disclose material lease uncertainty early and make lease review a pre-contract or early due-diligence item.<\/li><li>For SBA deals, coordinate the lease term, assignment\/new lease path, landlord consent, and guarantee requirements before closing.<\/li><\/ul>`;\n report+=`<h2>Financial Obligations<\/h2><table><tr><th>Item<\/th><th>Finding<\/th><th>Action<\/th><\/tr><tr><td>Base rent<\/td><td>${esc(basics['Monthly base rent'])}<\/td><td>Verify full rent schedule, abatements, and increases.<\/td><\/tr><tr><td>Operating costs \/ CAM \/ taxes \/ insurance<\/td><td>${esc(basics['Additional rent \/ operating costs'])}<\/td><td>Request CAM reconciliations, caps, exclusions, tax and insurance pass-through history.<\/td><\/tr><tr><td>Utilities \/ maintenance \/ HVAC \/ repairs<\/td><td>${has(text,['Utilities','maintenance','HVAC','Repair and Maintenance'])?'Related language detected.':'Not found or unclear.'}<\/td><td>Confirm buyer\u2019s operating and capital expense exposure, including HVAC caps and service contracts.<\/td><\/tr><tr><td>Assignment \/ legal \/ transfer fees<\/td><td>${has(text,['Administrative Fee','attorneys\u2019 fees','legal fees','transfer'])?'Fee language detected.':'Not found or unclear.'}<\/td><td>Confirm amounts payable and who pays before closing.<\/td><\/tr><tr><td>Personal guarantee<\/td><td>${esc(basics['Guarantors'])}<\/td><td>Attorney should confirm release, survival, replacement guarantee, and exposure cap.<\/td><\/tr><\/table>`;\n report+=`<h2>Red Flags and Risk Ratings<\/h2><table><tr><th>Risk<\/th><th>Rating<\/th><th>Evidence Status<\/th><th>Notes \/ lease quote<\/th><\/tr>${risks.map(r=>`<tr><td>${esc(r.item)}<\/td><td><span class=\"risk ${r.rating}\">${r.rating}<\/span><\/td><td>${esc(r.status)}<\/td><td>${esc(r.note)}${r.quotes.map(q=>`<div class=\"quote\">${esc(q)}<\/div>`).join('')}<\/td><\/tr>`).join('')}<\/table>`;\n report+=`<h2>Missing Documents \/ Information<\/h2>${missing.length?'<h3>Missing Snapshot Fields<\/h3><ul>'+missing.map(x=>`<li>${esc(x)}<\/li>`).join('')+'<\/ul>':'<p>No major snapshot fields were missing from the extracted text, but the full signed lease package still requires attorney review.<\/p>'}<h3>Recommended Document Follow-Up<\/h3><ul>${docMissing.map(x=>`<li>${esc(x)}<\/li>`).join('')}<\/ul>`;\n report+=`<h2>Pros and Cons by Party<\/h2><div class=\"grid grid3\"><div class=\"mini\"><h3>Buyer<\/h3><p><strong>Pros:<\/strong> Existing lease may preserve location goodwill if assignment is approved.<\/p><p><strong>Cons:<\/strong> Buyer may inherit rent burden, use restrictions, guarantee exposure, and landlord approval risk.<\/p><\/div><div class=\"mini\"><h3>Seller<\/h3><p><strong>Pros:<\/strong> A transferable lease can support valuation and closing certainty.<\/p><p><strong>Cons:<\/strong> Seller or original guarantors may remain liable unless expressly released.<\/p><\/div><div class=\"mini\"><h3>Broker<\/h3><p><strong>Pros:<\/strong> Early lease clarity improves buyer confidence and deal planning.<\/p><p><strong>Cons:<\/strong> Lease issues can become deal killers, financing barriers, or disclosure problems.<\/p><\/div><\/div>`;\n report+=`<h2>Recommended Questions<\/h2><table><tr><th>Ask<\/th><th>Questions<\/th><\/tr><tr><td>Landlord<\/td><td>Will you consent to assignment or require a new lease? What documents, fees, deposits, guarantees, or financials are required? Will the seller and existing guarantors be released?<\/td><\/tr><tr><td>Seller<\/td><td>Are there defaults, amendments, side agreements, CAM disputes, notices, repair issues, insurance issues, or personal guarantees?<\/td><\/tr><tr><td>Buyer<\/td><td>Does the lease term support the purchase price and financing? Can you satisfy landlord financial and guarantee requirements?<\/td><\/tr><tr><td>Closing attorney<\/td><td>What consent, assignment, estoppel, release, guarantee, and closing deliverables are required?<\/td><\/tr><tr><td>SBA lender<\/td><td>Is the lease term, renewal structure, assignment\/new lease path, and landlord consent acceptable for underwriting?<\/td><\/tr><\/table>`;\n report+=`<h2>Recommended Next Steps<\/h2><ol><li>Obtain the complete signed lease package and all amendments\/exhibits.<\/li><li>Have qualified legal counsel review assignment, default, guarantee, use, renewal, financial, relocation, and termination provisions.<\/li><li>Request landlord consent requirements and timeline before going under contract or early in due diligence.<\/li><li>Prepare buyer financials, credit information, entity documents, and proposed assignment\/new lease package.<\/li><li>For SBA deals, coordinate lease term and assignment\/new lease structure with lender before closing.<\/li><\/ol>`;\n report+=`<h2>Legal Review Reminder<\/h2><p><strong>This app does not provide legal advice.<\/strong> It is a lease review support tool for business brokerage analysis. Users should not rely on this report as a legal opinion. A qualified attorney should review all documents before the buyer, seller, broker, lender, or any party makes decisions.<\/p>`;\n $('report').innerHTML=report;$('reportCard').classList.remove('hidden');$('reportCard').scrollIntoView({behavior:'smooth'});\n}\n$('analyzeBtn').addEventListener('click',analyze);$('printBtn').addEventListener('click',()=>window.print());$('copyBtn').addEventListener('click',async()=>{await navigator.clipboard.writeText($('report').innerText);alert('Report copied.')});$('wordBtn').addEventListener('click',()=>{let html='<!DOCTYPE html><html><head><meta charset=\"UTF-8\"><title>Commercial Lease Analytics Report<\/title><\/head><body>'+$('report').innerHTML+'<\/body><\/html>';let blob=new Blob(['\\ufeff',html],{type:'application\/msword'});let a=document.createElement('a');a.href=URL.createObjectURL(blob);a.download='Commercial-Lease-Analytics-Report.doc';a.click();URL.revokeObjectURL(a.href)});\n$('clearBtn').addEventListener('click',()=>{['files','businessName','businessType','purchasePrice','grossRevenue','netIncome','closingDate','broker','location','manualText','extractedText'].forEach(id=>$(id).value='');$('fileList').innerHTML='';$('extractStatus').classList.add('hidden');$('reportCard').classList.add('hidden')});\n$('sampleBtn').addEventListener('click',()=>{$('extractedText').value=`COMMERCIAL RETAIL LEASE\\nRETAIL LEASE INFORMATION RIDER\\nLandlord: BARTON MAITLAND, LLC.\\nTenant: M & M Global Solutions LLC, a Florida limited liability company, and Tenant's Trade Name: Woof Gang Bakery & Grooming.\\nPremises: Approximately 1,478 square feet labeled as Suite A. Premises address will be 120 Independence Lane, Maitland, Florida 32751, Suite A.\\nPermitted Use of the Premises: Tenant shall use the Premises solely for operation of a Woof Gang offering pet grooming and pet retail business.\\nRent: Lease Year Base Rent PSF Monthly Base Rent Annual Base Rent 1 $34.00 $4,187.67 $50,252.00.\\nLease Term: 120 months from Rent Commencement Date. Tenant shall have two Five Lease Year extension options.\\nSecurity Deposit: $6,500.\\nGuarantor: Fabio Murakami and Claudia Murakami.\\nASSIGNMENT OR SUBLETTING: Tenant may not transfer this Lease without Landlord's consent, which may be arbitrarily granted or withheld in Landlord's sole discretion. Tenant and Guarantor shall remain liable after transfer. Administrative fee greater of attorneys fees or $750.\\nCONSENT TO ASSIGNMENT: Lessor consents to assignment to JP Central LLC. Fabio Murakami and Claudia Murakami remain as guarantors and are not released. Juan P. Murga Hernandez and Gilda Castillo Morales become guarantors.`});\n<\/script>\n<\/body>\n<\/html>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Commercial Lease Analytics V4 Commercial Lease Analytics Upload commercial lease documents, assignments, guarantees, and landlord consents. The app extracts key terms, flags risks, and creates&#8230;<\/p>","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1400","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.5 (Yoast SEO v26.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Commercial Lease Analytics - 360 Biz Brokers<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/360bizbrokers.com\/es\/commercial-lease-analytics\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Commercial Lease Analytics\" \/>\n<meta property=\"og:description\" content=\"Commercial Lease Analytics V4 Commercial Lease Analytics Upload commercial lease documents, assignments, guarantees, and landlord consents. The app extracts key terms, flags risks, and creates...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/360bizbrokers.com\/es\/commercial-lease-analytics\/\" \/>\n<meta property=\"og:site_name\" content=\"360 Biz Brokers\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-20T12:06:42+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"12 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/\",\"url\":\"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/\",\"name\":\"Commercial Lease Analytics - 360 Biz Brokers\",\"isPartOf\":{\"@id\":\"https:\/\/360bizbrokers.com\/#website\"},\"datePublished\":\"2026-06-20T11:15:12+00:00\",\"dateModified\":\"2026-06-20T12:06:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/360bizbrokers.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Commercial Lease Analytics\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/360bizbrokers.com\/#website\",\"url\":\"https:\/\/360bizbrokers.com\/\",\"name\":\"Florida 360 Business Brokers\",\"description\":\"Buy &amp; Sell Businesses Advisory\",\"publisher\":{\"@id\":\"https:\/\/360bizbrokers.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/360bizbrokers.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/360bizbrokers.com\/#organization\",\"name\":\"Florida 360 Business Brokers\",\"url\":\"https:\/\/360bizbrokers.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/360bizbrokers.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/360bizbrokers.com\/wp-content\/uploads\/2025\/12\/LOGO-FLORIDA-360-BUSINESS-BROKERS.jpg\",\"contentUrl\":\"https:\/\/360bizbrokers.com\/wp-content\/uploads\/2025\/12\/LOGO-FLORIDA-360-BUSINESS-BROKERS.jpg\",\"width\":1080,\"height\":1080,\"caption\":\"Florida 360 Business Brokers\"},\"image\":{\"@id\":\"https:\/\/360bizbrokers.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Commercial Lease Analytics - 360 Biz Brokers","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/360bizbrokers.com\/es\/commercial-lease-analytics\/","og_locale":"es_ES","og_type":"article","og_title":"Commercial Lease Analytics","og_description":"Commercial Lease Analytics V4 Commercial Lease Analytics Upload commercial lease documents, assignments, guarantees, and landlord consents. The app extracts key terms, flags risks, and creates...","og_url":"https:\/\/360bizbrokers.com\/es\/commercial-lease-analytics\/","og_site_name":"360 Biz Brokers","article_modified_time":"2026-06-20T12:06:42+00:00","twitter_card":"summary_large_image","twitter_misc":{"Tiempo de lectura":"12 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/","url":"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/","name":"Commercial Lease Analytics - 360 Biz Brokers","isPartOf":{"@id":"https:\/\/360bizbrokers.com\/#website"},"datePublished":"2026-06-20T11:15:12+00:00","dateModified":"2026-06-20T12:06:42+00:00","breadcrumb":{"@id":"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/360bizbrokers.com\/commercial-lease-analytics\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/360bizbrokers.com\/commercial-lease-analytics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/360bizbrokers.com\/"},{"@type":"ListItem","position":2,"name":"Commercial Lease Analytics"}]},{"@type":"WebSite","@id":"https:\/\/360bizbrokers.com\/#website","url":"https:\/\/360bizbrokers.com\/","name":"Florida 360 Business Brokers","description":"Buy &amp; Sell Businesses Advisory","publisher":{"@id":"https:\/\/360bizbrokers.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/360bizbrokers.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/360bizbrokers.com\/#organization","name":"Florida 360 Business Brokers","url":"https:\/\/360bizbrokers.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/360bizbrokers.com\/#\/schema\/logo\/image\/","url":"https:\/\/360bizbrokers.com\/wp-content\/uploads\/2025\/12\/LOGO-FLORIDA-360-BUSINESS-BROKERS.jpg","contentUrl":"https:\/\/360bizbrokers.com\/wp-content\/uploads\/2025\/12\/LOGO-FLORIDA-360-BUSINESS-BROKERS.jpg","width":1080,"height":1080,"caption":"Florida 360 Business Brokers"},"image":{"@id":"https:\/\/360bizbrokers.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/pages\/1400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/comments?post=1400"}],"version-history":[{"count":0,"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/pages\/1400\/revisions"}],"wp:attachment":[{"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/media?parent=1400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}