1import{f as z,g as $,r as c,o as B,m as R,j as e,e as h,i as I}from"./index-Dpy3xW5J.js";import{m as N,u as W,a as H}from"./autoLinkContacts-ZGYtnIzi.js";import{B as L}from"./BuiltOnAkilBadge-BQHNO1bf.js";import{M,r as q}from"./index-2zZQYxaQ.js";const i={panel:"#101827",panelSoft:"#0c1422",border:"rgba(231, 140, 63, 0.24)",line:"rgba(255,255,255,0.09)",text:"#f3f6fb",muted:"#9eb0ca",dim:"#61728c",amber:"#d4742a",amberStrong:"#e78c3f",amberSoft:"rgba(212, 116, 42, 0.14)"},D=["Address / BBL","District / area","Organization","Agency / program","License / permit","Person / role"],F=[{label:"Records",title:"What is on record?",query:"Show what is on record for this subject. Include source records, identifiers, time windows, and caveats."},{label:"Connections",title:"Who is connected?",query:"Trace the people, organizations, agencies, owners, officers, vendors, districts, and related entities connected to this subject."},{label:"Money",title:"What money is involved?",query:"Show the contracts, payments, awards, budgets, NYC funding sources, public spending, and financial records connected to this subject."},{label:"Changes",title:"What changed recently?",query:"Show recent changes for this subject, including new filings, permits, violations, awards, hearings, transactions, and status changes where available."},{label:"Rules",title:"What rules or issues apply?",query:"Check rules, compliance issues, zoning, land use, violations, licensing, enforcement records, and caveats connected to this subject."},{label:"Next checks",title:"What should I check next?",query:"Help me decide what to check next. Suggest the best public-record sources, identifiers, geographies, date ranges, and follow-up questions for this subject."}];function E(){return typeof window>"u"?"":new URLSearchParams(window.location.search).get("q")??""}function P(t){return`${t}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function ee(){const t=z($.mobileAnchorChat.ask),n=c.useRef(P("mobile-map-session")),[a,u]=c.useState(null),[d,b]=c.useState(E),[l,k]=c.useState(null),[p,S]=c.useState(!1),[x,v]=c.useState(null),j="https://askakil.ai/map";c.useEffect(()=>{const{data:{subscription:r}}=B(u);return R().then(({data:{session:g}})=>{u(g?.user??null)}),()=>r.unsubscribe()},[]);const m=d.trim().length>0,C=c.useMemo(()=>m?"Akil resolves the civic scope first, then answers from a compact companion-style case file. Use desktop for the full map workspace.":"Not sure where to start? Ask in plain English. Akil will help set the scope first.",[m]),w=async r=>{const g=(r??d).trim();if(!g)return;const T=V(l?.subject??null);r&&b(g),S(!0),v(null),k(null);try{const f=await t({question:g,userId:a?.id??void 0,anonId:I()??void 0,sessionId:n.current,priorSubject:T});k(f)}catch(f){v(_(f))}finally{S(!1)}},A=async()=>{try{await navigator.clipboard?.writeText(j)}catch{window.prompt("Open this on desktop:",j)}};return e.jsxs("main",{style:{minHeight:"100dvh",background:"radial-gradient(circle at 50% -10%, rgba(212,116,42,0.18), transparent 34%), #070d17",color:i.text,fontFamily:"Public Sans, system-ui, sans-serif",padding:"18px 16px calc(28px + env(safe-area-inset-bottom))",boxSizing:"border-box"},children:[e.jsx(L,{corner:"bottom-right"}),e.jsxs("header",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,marginBottom:28},children:[e.jsxs(h,{to:"/",style:{textDecoration:"none",color:i.text},children:[e.jsx("span",{style:{fontFamily:"Archivo, system-ui, sans-serif",fontWeight:700,fontSize:22},children:"Akil"}),e.jsx("span",{style:{color:i.amber,fontFamily:"Archivo, system-ui, sans-serif",fontWeight:700,fontSize:22},children:"."})]}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs(h,{to:"/lens","aria-label":"Open the Lens â point your camera at a building",style:{color:i.text,textDecoration:"none",border:`1px solid ${i.border}`,background:"rgba(212, 116, 42, 0.12)",borderRadius:10,padding:"10px 12px",fontSize:13,fontWeight:700,whiteSpace:"nowrap"},children:[e.jsx("span",{"aria-hidden":"true",style:{marginRight:4},children:"ð·"}),"Lens"]}),e.jsx(h,{to:"/mcp",style:{color:i.amberStrong,textDecoration:"none",border:`1px solid ${i.border}`,borderRadius:10,padding:"10px 12px",fontSize:13,fontWeight:700},children:"Connect MCP"})]})]}),e.jsxs("section",{style:{border:`1px solid ${i.line}`,background:"rgba(12, 20, 34, 0.84)",borderRadius:18,padding:18,boxShadow:"0 18px 60px rgba(0,0,0,0.28)"},children:[e.jsx("p",{style:{margin:"0 0 10px",color:i.amberStrong,fontFamily:"JetBrains Mono, monospace",fontSize:12,fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase"},children:"START HERE"}),e.jsx("h1",{style:{margin:0,fontFamily:"Archivo, system-ui, sans-serif",fontSize:"clamp(31px, 10vw, 43px)",lineHeight:1.02,letterSpacing:0},children:"What are we looking at?"}),e.jsx("p",{style:{margin:"14px 0 0",color:i.muted,fontSize:15,lineHeight:1.6},children:"Begin with an address, BBL, organization, agency, district, ZIP, license, person, program, or public-money question. Akil resolves the subject first, then returns bounded public-record answer context. Use desktop for the full map and boundary workspace."}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:7,marginTop:14},children:D.map(r=>e.jsx("span",{style:{border:`1px solid ${i.line}`,borderRadius:999,background:"rgba(255,255,255,0.04)",color:i.muted,fontSize:11,fontWeight:700,padding:"6px 8px"},children:r},r))})]}),e.jsxs("section",{style:{marginTop:16,display:"grid",gap:10},children:[e.jsx("label",{htmlFor:"mobile-map-query",style:{color:i.amberStrong,fontFamily:"JetBrains Mono, monospace",fontSize:12,fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase"},children:"Type a subject or location"}),e.jsx("textarea",{id:"mobile-map-query",value:d,onChange:r=>b(r.target.value),placeholder:"Ask about an address, BBL, district, organization, agency, license, person, program, or public-money question...",rows:3,style:{width:"100%",boxSizing:"border-box",background:i.panel,border:`1px solid ${i.line}`,borderRadius:14,color:i.text,fontFamily:"Public Sans, system-ui, sans-serif",fontSize:16,lineHeight:1.45,resize:"vertical",minHeight:112,padding:14,outline:"none"}}),e.jsx("p",{style:{margin:0,color:i.dim,fontSize:12,lineHeight:1.5},children:C}),e.jsx("button",{type:"button",onClick:()=>void w(),disabled:!m||p,style:{border:"none",borderRadius:12,minHeight:48,background:m&&!p?i.amberStrong:"rgba(255,255,255,0.1)",color:m&&!p?"#170f08":i.dim,fontWeight:800,fontSize:14,cursor:m&&!p?"pointer":"default"},children:p?"Checking records...":"Check records"})]}),(p||x||l)&&e.jsxs("section",{style:{marginTop:18,display:"grid",gap:12},children:[p&&e.jsx(J,{}),x&&e.jsxs("div",{style:o.noticeCard,children:[e.jsx("strong",{style:{color:i.text},children:"That check did not finish."}),e.jsx("p",{style:{margin:"8px 0 0",color:i.muted,fontSize:13,lineHeight:1.5},children:x})]}),l?.subject&&e.jsx(O,{result:l}),l&&e.jsxs("div",{style:o.answerCard,children:[e.jsx("div",{style:o.kicker,children:l.status==="answered"?"Sources checked":"Scope needed"}),e.jsx("div",{className:"akil-prose",style:{fontSize:14,lineHeight:1.62,overflowX:"auto"},children:e.jsx(M,{remarkPlugins:[q],urlTransform:W,components:N,children:H(l.narrative)})}),e.jsx(G,{result:l}),l.followUps.length>0&&e.jsx("div",{style:{marginTop:12,display:"grid",gap:8},children:l.followUps.slice(0,4).map(r=>e.jsx("button",{type:"button",onClick:()=>void w(U(r,l.subject)),style:o.followUpButton,children:r},r))})]})]}),e.jsxs("section",{style:{marginTop:22},children:[e.jsx("p",{style:{margin:"0 0 10px",color:i.amberStrong,fontFamily:"JetBrains Mono, monospace",fontSize:12,fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase"},children:"Choose a lens"}),e.jsx("p",{style:{margin:"0 0 10px",color:i.dim,fontSize:12,lineHeight:1.45},children:'What are you trying to understand? Pick a lens, then replace "this
1subject" with the address, organization, agency, license, or question you care about.'}),e.jsx("div",{style:{display:"grid",gap:9},children:F.map(r=>e.jsxs("button",{type:"button",onClick:()=>b(r.query),style:{textAlign:"left",border:`1px solid ${i.line}`,borderRadius:14,background:i.panelSoft,color:i.text,padding:"13px 14px"},children:[e.jsx("span",{style:{display:"block",color:i.amberStrong,fontFamily:"JetBrains Mono, monospace",fontSize:10,letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:5},children:r.label}),e.jsx("strong",{style:{display:"block",fontSize:15},children:r.title})]},r.label))})]}),e.jsxs("section",{style:{marginTop:18,border:`1px solid ${i.line}`,background:i.panelSoft,borderRadius:16,padding:14},children:[e.jsx("p",{style:{margin:"0 0 9px",color:i.amberStrong,fontFamily:"JetBrains Mono, monospace",fontSize:12,fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase"},children:"What Akil does next"}),e.jsx("div",{style:{display:"grid",gap:8},children:["Resolve the civic scope","Check source records","Prepare answer context"].map((r,g)=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:9,color:i.muted,fontSize:13,fontWeight:700},children:[e.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:21,height:21,borderRadius:999,background:i.amberStrong,color:"#170f08",fontSize:11,fontWeight:900},children:g+1}),r]},r))})]}),e.jsxs("section",{style:{marginTop:22,display:"grid",gap:10,gridTemplateColumns:"1fr"},children:[e.jsxs("button",{type:"button",onClick:A,style:{border:`1px solid ${i.border}`,borderRadius:14,background:i.amberSoft,color:i.text,padding:"14px 15px",textAlign:"left",minHeight:58},children:[e.jsx("strong",{style:{display:"block",marginBottom:4},children:"Use the full map on desktop"}),e.jsx("span",{style:{color:i.muted,fontSize:13},children:"Copy askakil.ai/map for your desktop browser."})]}),e.jsxs(h,{to:"/mcp#connect",style:{border:`1px solid ${i.line}`,borderRadius:14,background:i.panelSoft,color:i.text,padding:"14px 15px",textDecoration:"none",minHeight:58},children:[e.jsx("strong",{style:{display:"block",marginBottom:4},children:"Continue in your own AI client"}),e.jsx("span",{style:{color:i.muted,fontSize:13},children:"Connect Akil MCP where your client supports custom connectors."})]})]})]})}function J(){return e.jsxs("div",{style:o.noticeCard,children:[e.jsx("div",{style:o.kicker,children:"Checking public records"}),e.jsx("div",{style:{display:"grid",gap:8,marginTop:10},children:["Resolving subject anchor","Checking source records","Preparing answer context"].map(t=>e.jsxs("div",{style:{display:"flex",gap:9,alignItems:"center",color:i.muted,fontSize:13},children:[e.jsx("span",{style:o.pulseDot}),t]},t))})]})}function O({result:t}){const n=t.subject;return n?e.jsxs("div",{style:o.subjectCard,children:[e.jsx("div",{style:o.kicker,children:"Selected subject"}),e.jsx("h2",{style:{margin:"7px 0 6px",fontFamily:"Archivo, system-ui, sans-serif",fontSize:24,lineHeight:1.08},children:n.label}),e.jsxs("div",{style:o.factGrid,children:[n.bbl&&e.jsx(s,{label:"BBL",value:n.bbl}),n.ownerName&&e.jsx(s,{label:"Owner",value:n.ownerName}),n.entityName&&e.jsx(s,{label:"Entity",value:n.entityName}),n.ein&&e.jsx(s,{label:"EIN",value:n.ein}),n.entityType&&e.jsx(s,{label:"Type",value:n.entityType}),n.agencyAcronym&&e.jsx(s,{label:"Agency",value:n.agencyAcronym}),n.agencyName&&e.jsx(s,{label:"Agency name",value:n.agencyName}),n.licenseNumber&&e.jsx(s,{label:"License #",value:n.licenseNumber}),n.applicationId&&e.jsx(s,{label:"Application ID",value:n.applicationId}),n.licenseAgency&&e.jsx(s,{label:"License source",value:n.licenseAgency}),n.boundaryType&&e.jsx(s,{label:"Boundary",value:K(n.boundaryType)}),n.boundaryId&&e.jsx(s,{label:"Boundary ID",value:n.boundaryId}),n.kind!=="entity"&&n.kind!=="boundary"&&n.kind!=="agency"&&n.kind!=="license"&&e.jsx(s,{label:"Property use",value:n.propertyUse?.label??"Not classified"}),n.containingScopes?.map(a=>e.jsx(s,{label:a.label,value:a.value},`${a.label}-${a.value}`))]})]}):null}function G({result:t}){const n=t.recordsChecked.slice(0,5),a=t.sources.slice(0,5),u=t.workflowSummary?.timeWindow;return n.length===0&&a.length===0&&t.caveats.length===0&&!u?null:e.jsxs("div",{style:o.packetDetails,children:[u&&e.jsx(y,{title:"Time window",items:[u]}),n.length>0&&e.jsx(y,{title:"Records checked",items:n}),a.length>0&&e.jsx(y,{title:"Sources",items:a.map(d=>d.refreshedAt?`${d.label} (${d.refreshedAt})`:d.label)}),t.caveats.length>0&&e.jsx(y,{title:"Reading notes",items:t.caveats.slice(0,3)})]})}function y({title:t,items:n}){return e.jsxs("div",{children:[e.jsx("div",{style:o.kicker,children:t}),e.jsx("ul",{style:{margin:"7px 0 0",paddingLeft:18,color:i.muted,fontSize:12,lineHeight:1.55},children:n.map(a=>e.jsx("li",{children:a},a))})]})}function s({label:t,value:n}){return e.jsxs("div",{style:o.fact,children:[e.jsx("span",{style:o.factLabel,children:t}),e.jsx("span",{style:o.factValue,children:n})]})}function K(t){return t.replace(/_/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function U(t,n){return n?n.kind==="property"?n.bbl?`${t} for BBL ${n.bbl}`:`${t} for ${n.label}`:n.kind==="entity"?n.ein?`${t} for EIN ${n.ein}`:`${t} for "${n.entityName||n.label}"`:n.kind==="agency"?`${t} for ${n.agencyAcronym||n.agencyName||n.label}`:n.kind==="license"?n.applicationId?`${t} for application ID ${n.applicationId}`:`${t} for license ${n.licenseNumber||n.label}`:n.kind==="boundary"?`${t} for ${n.label}`:t:t}function V(t){if(t?.kind)return{kind:t.kind,label:t.label,bbl:t.bbl,lat:t.lat,lon:t.lon,entityName:t.entityName??void 0,ein:t.ein??void 0,boundaryType:t.boun
1daryType??void 0,boundaryId:t.boundaryId??void 0,agencyName:t.agencyName??void 0,agencyAcronym:t.agencyAcronym??void 0,licenseNumber:t.licenseNumber??void 0,applicationId:t.applicationId??void 0,licenseAgency:t.licenseAgency??void 0,licenseKind:t.licenseKind??void 0}}function _(t){const n=t?.data?.message||t?.message||String(t);try{return JSON.parse(n)?.message||n}catch{return n}}const o={kicker:{color:i.amberStrong,fontFamily:"JetBrains Mono, monospace",fontSize:10,letterSpacing:"0.08em",textTransform:"uppercase"},noticeCard:{border:`1px solid ${i.line}`,background:"rgba(12, 20, 34, 0.86)",borderRadius:16,padding:15},subjectCard:{border:`1px solid ${i.border}`,background:"linear-gradient(145deg, rgba(212,116,42,0.18), rgba(16,24,39,0.92))",borderRadius:16,padding:15},answerCard:{border:`1px solid ${i.line}`,background:"rgba(16, 24, 39, 0.92)",borderRadius:16,padding:15},factGrid:{display:"grid",gap:8,marginTop:12},fact:{border:"1px solid rgba(255,255,255,0.08)",background:"rgba(7,13,23,0.42)",borderRadius:12,padding:"10px 11px"},factLabel:{display:"block",color:i.dim,fontFamily:"JetBrains Mono, monospace",fontSize:10,letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:4},factValue:{display:"block",color:i.text,fontSize:13,lineHeight:1.35},packetDetails:{display:"grid",gap:12,borderTop:"1px solid rgba(255,255,255,0.08)",marginTop:14,paddingTop:14},followUpButton:{border:`1px solid ${i.border}`,borderRadius:12,background:i.amberSoft,color:i.amberStrong,textAlign:"left",padding:"11px 12px",fontWeight:700},pulseDot:{width:7,height:7,borderRadius:"50%",background:i.amberStrong,boxShadow:`0 0 0 5px ${i.amberSoft}`,flex:"0 0 auto"}};export{ee 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.