PageSourceSearch

https://app.litmas.ai/_next/static/chunks/7125-2f8aff0500e76590.js?dpl=dpl_98V32eRJkMdxQfr8YnrGxaqL585u

js litmas.ai collected 2026-10-05 12:14:44 UTC 32,103 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b5f4923a-ef26-4dc0-85e6-9f9ae3e5a68c",e._sentryDebugIdIdentifier="sentry-dbid-b5f4923a-ef26-4dc0-85e6-9f9ae3e5a68c")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7125],{6488:(e,t,a)=>{a.d(t,{R3:()=>l,X0:()=>m,dg:()=>p});var i=a(82435);let n="litmas:drafting-import-request",o=new Map,s=new Map;function r(e){try{let t="litmas:drafting-import-pending:".concat(e),a="1"===window.sessionStorage.getItem(t);return a&&window.sessionStorage.removeItem(t),a}catch(e){return!1}}function l(e,t){let a=a=>{let i=a.detail;(null==i?void 0:i.caseId)===e&&(r(e),t())};return window.addEventListener(n,a),r(e)&&t(),()=>window.removeEventListener(n,a)}function c(e){return"litmas:drafting-create-result:".concat(e)}function d(e){try{var t;let a=JSON.parse(window.localStorage.getItem(c(e))||"null");if(!(null==a||null==(t=a.project)?void 0:t.id)||Date.now()-Number(a.createdAt)>1500)return null;return a.project}catch(e){return null}}function u(e,t){try{window.localStorage.setItem(c(e),JSON.stringify({project:t,createdAt:Date.now()}))}catch(e){}}async function h(e,t){var a;let n=await (0,i.t)("/api/cases/".concat(e,"/").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"Untitled Project ".concat(new Date().toISOString().replace(/\.\d{3}Z$/,"Z"))})});if(!n.ok)throw Error("Failed to create project");let o=(null==(a=await n.json())?void 0:a.id)?a:null==a?void 0:a.data;if(!(null==o?void 0:o.id))throw Error("Project creation response missing id");return o}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"projects",a="".concat(e,":").concat(t),i=o.get(a);if(i)return i;let n=async()=>{let i=d(a);if(i)return i;let n=await h(e,t);return u(a,n),n},s="undefined"!=typeof navigator?navigator.locks:void 0,r=(s?s.request("litmas:drafting-create:".concat(a),n):n()).finally(()=>o.delete(a));return o.set(a,r),r}function m(e,t,a){let i="import:".concat(e,":").concat(t),n=s.get(i);if(n)return n;let o=async()=>{let e=d(i);if(null==e?void 0:e.projectId)return e;let t=await a();return u(i,{...t,id:t.projectId}),t},r="undefined"!=typeof navigator?navigator.locks:void 0,l=(r?r.request("litmas:drafting-create:".concat(i),o):o()).finally(()=>s.delete(i));return s.set(i,l),l}},19231:(e,t,a)=>{a.d(t,{wo:()=>o,S$:()=>s,PS:()=>c,CK:()=>n,ZT:()=>r,cy:()=>l,jh:()=>d,IZ:()=>i,B1:()=>x,ZG:()=>h,Hz:()=>p,z_:()=>m,Sj:()=>j,pB:()=>f,Ug:()=>u,BQ:()=>k,Sm:()=>b});let i="litmas:journey:v1:",n="journey-offer:v1:dismissed",o=/^journey:(?:litigation_first_case|presuit_first_case):v1:completed$/,s=/^journey:(?:litigation_first_case|presuit_first_case):v1:dismissed$/,r="journey-offer:v1:impression-",l=3,c="journey-tour-nudge:v1:shown",d="journey-offer:v1:shown";function u(e){return"".concat(i).concat(e)}function h(e){return"journey:".concat(e,":v1:completed")}function p(e){return"journey:".concat(e,":v1:dismissed")}function m(e){return"".concat(r).concat(e)}function f(e){let t=Date.now(),a=new Date(t).toISOString();return{schemaVersion:1,definitionVersion:e.definitionVersion,runId:"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?"run-".concat(crypto.randomUUID()):"run-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10)),userId:e.userId,organizationId:e.organizationId,journeyId:e.journeyId,segmentId:e.segmentId,checkpoint:e.segmentId,...e.caseId?{caseId:e.caseId}:{},status:"active",startedAt:a,updatedAt:a,expiresAt:new Date(t+6048e5).toISOString()}}let g=new Set(["active","paused","completed","dismissed"]),y=new Set(["litigation_first_case","presuit_first_case","sample_case_tour"]);function w(e){return"string"==typeof e&&e.length>0}function v(e){return"string"==typeof e&&Number.isFinite(Date.parse(e))}function b(e,t){return!e||"object"!=typeof e||Array.isArray(e)?null:1!==e.schemaVersion||"number"!=typeof e.definitionVersion||!w(e.runId)||!w(e.userId)||!w(e.organizationId)||!w(e.segmentId)||!w(e.checkpoint)||!w(e.journeyId)||!y.has(e.journeyId)||"string"!=typeof e.status||!g.has(e.status)||!v(e.startedAt)||!v(e.updatedAt)||!v(e.expiresAt)||e.userId!==t||Date.parse(e.expiresAt)<=Date.now()?null:e}function j(e){let t,a=u(e),i=window.localStorage.getItem(a);if(null===i)return null;try{t=JSON.parse(i)}catch(e){return window.localStorage.removeItem(a),null}let n=b(t,e);return n||(window.localStorage.removeItem(a),null)}function k(e){try{let t={...e,updatedAt:new Date(Date.now()).toISOString()};window.localStorage.setItem(u(e.userId),JSON.stringify(t))}catch(e){console.warn("journey: run record could not be persisted")}}function x(e){window.localStorage.removeItem(u(e))}},25459:(e,t,a)=>{a.d(t,{cT:()=>m,_U:()=>p,je:()=>f});var i=a(60197),n=a(75487),o=a(75817);let s={documents:"Every case file and upload, searchable while you draft.","evidence-mapper":"Extracted facts paired with the evidence that supports them.","case-law":"Authorities and precedent gathered for this matter.",litiverse:"The knowledge graph of parties, entities, and relationships.",discovery:"Requests, responses, and the rest of your discovery work.",deadlines:"Court deadlines from your case inbox, ready to confirm and draft against.",teams:"The people staffed on this case.",parties:"Plaintiffs, defendants, and every other party of record.",templates:"Upload and manage your firm’s document templates."};function r(){return(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)("p",{children:"Tailor your workspace by choosing which insight panels sit beside your draft. Turn on what this matter needs and hide the rest:"}),(0,i.jsx)("ul",{className:"space-y-2",children:o.fm.map(e=>{let{id:t,label:a,icon:n}=e;return(0,i.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,i.jsx)(n,{className:"mt-0.5 size-4 shrink-0 text-litmas-liberal-lilac",strokeWidth:1.75}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{className:"font-medium text-gray-800",children:a})," - ",s[t]]})]},t)})}),(0,i.jsxs)("div",{className:"flex items-start gap-2.5 border-t border-gray-100 pt-2.5",children:[(0,i.jsx)(n.A,{className:"mt-0.5 size-4 shrink-0 text-litmas-shiner",strokeWidth:1.75}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{className:"font-medium text-gray-800",children:"Restore defaults"})," - ","reset to the standard set anytime. Your choice saves to your account and follows you across devices."]})]})]})}var l=a(9434),c=a(9017),d=a(48166),u=a(38146);function h(e){let{description:t}=e;return(0,i.jsx)("div",{className:"space-y-3 text-sm leading-relaxed text-gray-600",children:t})}let p="litmas:view-tour-launch",m={DASHBOARD:"view_dashboard",RESEARCH:"view_research",DRAFTING:"view_drafting",EVIDENCE_MAPPER:"view_evidence_mapper",TEMPLATES:"view_templates",CREATE_CASE:"view_create_case"},f=[{tour:m.DASHBOARD,steps:[{icon:"",title:"Welcome to Litmas, Home",content:(0,i.jsx)(h,{description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:"This is your Home base. It is the first thing you see when you sign in and the place you return to between matters, a calm, no-case-in-focus overview of your work."}),(0,i.jsx)("p",{children:"Home is a customizable dashboard: add and arrange widgets so the information you check most is always front and center. Your open cases also stay pinned in the tab strip at the top, so switching back into any of them is a single click."}),(0,i.jsx)("p",{children:"From here you can jump into a case, start a new one, or use the case picker to reopen anything you have worked on. Click Next to see how to make Home yours."})]})}),introCard:!0,hideArrow:!0},{icon:"",selector:'[aria-label="Add widget"]',title:"Make Home Yours",content:"Use this to add widgets to your dashboard, pick from the available set and drop them in. Once they are on the grid you can drag and resize each one, and the layout is saved automatically. The reset control next to it restores the default arrangement anytime.",side:"bottom-right",pointerPadding:8,pointerRadius:12},{icon:"",selector:".new-case",title:"Start a New Case",content:"Ready to begin? This opens case creation, upload a complaint and let Litmas extract the details for you, or build the case manually through a short guided wizard. It is always here in the sidebar, from any view.",side:"right",pointerPadding:6,pointerRadius:8},{icon:"",selector:".litmas-sidebar-notifications",title:"Your Notifications",content:"Litmas agents work in the background, analyzing documents, researching, drafting. Their alerts and updates land here, so you know the moment a task finishes or something needs your attention.",side:"bottom-left",pointerPadding:6,pointerRadius:8}]},{tour:m.RESEARCH,steps:[{icon:"",title:"AI Associate, Legal Research",content:(0,i.jsx)(h,{description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:"You are in the AI Associate, your on-demand research partner for this case. Ask it a legal question in plain language and it works across case law, statutes, and your own case record to give you a grounded, cited answer."}),(0,i.jsx)("p",{children:"It is built for real research, follow-up questions keep their context, every answer shows the authorities behind it, and the whole conversation is saved with the case so nothing gets lost."}),(0,i.jsx)("p",{children:"This quick tour points out where you are, the composer and its controls, your suggested questions, and the research stream. Click Next to begin."})]})}),introCard:!0,hideArrow:!0},{icon:"",selector:".litmas-open-case-tab",title:"The Case You Are Working On",content:"This tab is the case you have open right now. Litmas keeps your cases in a browser-style strip up here, so you can jump between everything you have open with a single click, and reopen or start another with the buttons alongside.",side:"bottom-left",pointerPadding:4,pointerRadius:8},{icon:"",selector:".litmas-research-input-area",title:"Your Research Composer",content:(0,i.jsx)(function(){return(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)("p",{children:"Type a legal question in plain language and the AI Associate answers it from case law, statutes, and your case record. Each follow-up keeps the context of the questions before it. A few controls sit along the bottom:"}),(0,i.jsxs)("ul",{className:"space-y-2.5",children:[(0,i.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,i.jsx)(l.A,{className:"mt-0.5 size-4 shrink-0 text-litmas-liberal-lilac",strokeWidth:1.75}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{className:"font-medium text-gray-800",children:"Generate files & more"})," - ","turn the conversation into a memo or other draft; Litmas carries the analysis and citations over."]})]}),(0,i.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,i.jsxs)("span",{className:"mt-0.5 flex shrink-0 items-center gap-0.5 text-litmas-liberal-lilac",children:[(0,i.jsx)(c.A,{className:"size-4",strokeWidth:1.75}),(0,i.jsx)(d.A,{className:"size-4",strokeWidth:1.75})]}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{className:"font-medium text-gray-800",children:"Qu
1ick Answer / Deep Research"})," - ","choose how hard it works: a fast answer using your case tools, or a full research plan with citation validation. Switch it per message."]})]}),(0,i.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,i.jsx)(u.A,{className:"mt-0.5 size-4 shrink-0 text-litmas-liberal-lilac",strokeWidth:1.75}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{className:"font-medium text-gray-800",children:"References"})," - ","every source cited or surfaced, documents, facts, citations, and statutes. Open it to jump to any, or pin the full set to this chat’s context."]})]})]})]})},{}),side:"top",pointerPadding:12,pointerRadius:16,wideCard:!0},{icon:"",selector:".litmas-suggestions-header",title:"Suggested Questions",content:"Not sure where to begin? These suggestions are tailored to your case and give you a running start. Click any of them to drop the prompt straight into the composer, then refine it however you like before sending.",side:"top",pointerPadding:8,pointerRadius:8},{icon:"",title:"Your Research Stream",content:"This panel is your research thread. Answers appear here as a running conversation, each citing the authorities it relied on, and fact and citation bubbles are interactive, click them to open the underlying source. The full stream is saved with the case so you can return to it anytime.",hideArrow:!0},{icon:"",selector:'[role="tabpanel"][data-state="active"] [aria-label="Customize tabs"]',title:"Customize Your Panel Tabs",content:(0,i.jsx)(r,{}),side:"bottom-right",pointerPadding:6,pointerRadius:8,wideCard:!0}]},{tour:m.DRAFTING,steps:[{icon:"",title:"Document Studio, Drafting",content:(0,i.jsx)(h,{description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:"Welcome to Document Studio, where the Drafting Agent turns your case into filed work product. Describe the document you need and it drafts from your facts, evidence, and formatting preferences, not from a blank page."}),(0,i.jsx)("p",{children:"You stay in control throughout: watch the agent reason, review each pass, ask for changes, and assemble everything into a structured filing package ready to export."}),(0,i.jsx)("p",{children:"This tour walks you through the composer, suggested directions, the live drafting stream, your filing package, strategic analysis, and the case library. Click Next to begin."})]})}),introCard:!0,hideArrow:!0},{icon:"",selector:".litmas-open-case-tab",title:"The Case You Are Working On",content:"This tab is the case you have open right now. Litmas keeps your cases in a browser-style strip up here, so you can jump between everything you have open with a single click, and reopen or start another with the buttons alongside.",side:"bottom-left",pointerPadding:4,pointerRadius:8},{icon:"",selector:".litmas-drafting-agent-input",title:"Your Drafting Composer",content:"This is the command center for drafting. Describe what you want to file, a motion, a brief, a section, and the Drafting Agent works from your case facts, evidence, and formatting preferences to produce it. Be as specific as you like; more direction means a closer first draft.",side:"top",pointerPadding:12,pointerRadius:16},{icon:"",selector:".litmas-drafting-agent-suggestions",title:"Suggested Directions",content:"These are context-aware next moves for your document, useful when you want to keep momentum without deciding every step yourself. Pick one to steer the agent, or ignore them and type your own instruction.",side:"top",pointerPadding:8,pointerRadius:8},{icon:"",title:"The Drafting Agent at Work",content:"This canvas is your conversation with the Drafting Agent. As it drafts, its reasoning and edits stream here so you can follow exactly what it is doing and why, review each pass, ask for changes, and iterate until the language is right.",hideArrow:!0},{icon:"",selector:".litmas-drafting-agent-project-panel",title:"Your Filing Package",content:"Every document the agent produces is collected here as a structured filing package. Reorder sections, open any piece to edit it, and export when you are ready. This panel is the single source of truth for what will actually be filed.",side:"left",pointerPadding:0,pointerRadius:12},{icon:"",selector:"#document-analysis-button",title:"AI-Powered Strategic Analysis",content:"Beyond drafting, Litmas can pressure-test your document. Run an analysis to surface weaknesses, suggested case law, and the counter-arguments opposing counsel is most likely to raise, so you can shore them up before filing.",side:"bottom-right",pointerPadding:2,pointerRadius:8},{icon:"",selector:"#case-library-button",title:"Your Case Library",content:"Need supporting material while you draft? Open the case library to reach your favorited facts, exhibits, and authorities without leaving the workspace, and pull them into the document as you go.",side:"bottom-right",pointerPadding:2,pointerRadius:8},{icon:"",selector:'[role="tabpanel"][data-state="active"] [aria-label="Customize tabs"]',title:"Customize Your Panel Tabs",content:(0,i.jsx)(r,{}),side:"bottom-right",pointerPadding:6,pointerRadius:8,wideCard:!0}]},{tour:m.EVIDENCE_MAPPER,steps:[{icon:"",title:"Evidence Mapper",content:(0,i.jsx)(h,{description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:"This is the Evidence Mapper, where your case becomes a structure you can reason about. Counts, elements, facts, and evidence are organized into a hierarchy that mirrors how you will actually argue the case."}),(0,i.jsx)("p",{children:"It is also where Litmas surfaces what it extracted from your documents: every fact tied to its source, a knowledge graph of the people and relationships involved, and a chronological timeline of events."}),(0,i.jsx)("p",{children:"This tour points out the mapper, Facts & Evidence, Litiverse, the Timeline, and your briefcase. Click Next to begin."})]})}),introCard:!0,hideArrow:!0},{icon:"",selector:".litmas-evidence-mapper",title:"Evidence Mapper",content:"This is where your case takes shape as a structure. Organize counts, elements, facts, and evidence into a hierarchy that mirrors how you will actually argue the case, everything you build here feeds directly into drafting.",side:"bottom",pointerPadding:12,pointerRadius:8},{icon:"",selector:".litmas-facts-evidence",title:"Facts & Evidence",content:"Review every extracted fact alongside its supporting evidence in one place. Use it to audit citations, trace each fact back to its source document, and confirm the record 
1is solid before you rely on it.",side:"bottom",pointerPadding:12,pointerRadius:8},{icon:"",selector:".litmas-litiverse",title:"Litiverse",content:"Litiverse is the knowledge graph of your case, the people, organizations, and relationships Litmas extracted from your documents. Explore it to see connections that are easy to miss when reading files one at a time.",side:"bottom",pointerPadding:12,pointerRadius:8},{icon:"",selector:".litmas-timeline",title:"Timeline",content:"See the case facts arranged in chronological order. A clear sequence makes causation, deadlines, and pivotal moments obvious, and it is often the fastest way to spot gaps or inconsistencies in the story.",side:"bottom",pointerPadding:12,pointerRadius:8},{icon:"",selector:"#case-library",title:"Your Briefcase",content:"Your briefcase holds the counts, elements, and supporting facts you have saved so they can be reused across motions and pleadings. Build it up once and draw from it throughout the life of the case.",side:"bottom-right",pointerPadding:13,pointerRadius:40}]},{tour:m.TEMPLATES,steps:[{icon:"",title:"Templates & Preferences",content:(0,i.jsx)(h,{description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:"This is where you set up how your firm works across every case, your organization’s templates, playbooks, signature blocks, and the Org Agent that keeps generated 
1work aligned with your standards."}),(0,i.jsx)("p",{children:"Configure these once and they apply everywhere, so AI output arrives already matching your formats and conventions instead of needing rework each time."}),(0,i.jsx)("p",{children:"This tour introduces each tab: Org Agent, Firm Templates, Playbooks, and Signature Blocks. Click Next to begin."})]})}),introCard:!0,hideArrow:!0},{icon:"",selector:".org-agent-tab",title:"Org Agent",content:"Your organization’s drafting agent. It applies your firm’s default formatting and drafting behavior across cases, and surfaces the org-level work that needs your review here.",side:"bottom-left",pointerPadding:6,pointerRadius:8},{icon:"",selector:".firm-templates-tab",title:"Firm Templates",content:"Upload and manage the document templates your firm reuses. Litmas draws on them when generating filings, so output follows the formats you have already established.",side:"bottom",pointerPadding:6,pointerRadius:8},{icon:"",selector:".playbooks-tab",title:"Playbooks",content:"Build reusable playbooks, the standardized strategies and step sequences your firm follows, so the same proven approach can be applied consistently across matters.",side:"bottom",pointerPadding:6,pointerRadius:8},{icon:"",selector:".signature-blocks-tab",title:"Signature Blocks",content:"Define the signing parties for your documents, names, roles, and contact details, so they can be inserted automatically into your filings instead of being retyped each time.",side:"bottom",pointerPadding:6,pointerRadius:8}]},{tour:m.CREATE_CASE,steps:[{icon:"",title:"Create a New Case",content:(0,i.jsx)(h,{description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:"This is where every matter begins. Litmas gives you two ways in: upload the complaint and let it extract the details automatically, or build the case by hand through a short guided wizard."}),(0,i.jsx)("p",{children:"Whichever you choose, your case type shapes the rest of the workflow, the fields you fill in, the documents Litmas expects, and the tools it opens up downstream."}),(0,i.jsx)("p",{children:"This tour walks you through choosing a case type, uploading a complaint, and creating a case manually. Click Next to begin."})]})}),introCard:!0,hideArrow:!0},{icon:"",selector:".litmas-create-case-from-options",title:"Choose Your Case Type",content:"Start by telling Litmas what kind of matter this is. Your choice tailors the rest of the workflow, the fields you fill in, the documents Litmas expects, and the tools it makes available downstream.",side:"right",pointerPadding:12,pointerRadius:8},{icon:"",selector:".litmas-create-case-upload-complaint",title:"Upload Your Complaint",content:"The fastest way to get started: drop in the complaint and Litmas reads it, extracts the parties, court, case number, and claims, and sets up the case for you. You review the extracted details before anything is finalized.",side:"right",pointerPadding:12,pointerRadius:8},{icon:"",selector:".litmas-create-case-create-by-form",title:"Or Create Manually",content:"No complaint to upload yet? Build the case by hand through a short guided wizard, enter the court, parties, and context step by step. You can always add documents later once they are available.",side:"left",pointerPadding:12,pointerRadius:8}]}]},29263:(e,t,a)=>{a.d(t,{AK:()=>h,Dv:()=>g,HI:()=>c,Hx:()=>m,LU:()=>w,Pe:()=>u,Q6:()=>d,cH:()=>s,ff:()=>o,gd:()=>f,ny:()=>p,on:()=>i,pX:()=>r,q:()=>n,sr:()=>y,uV:()=>l});let i="litmas:journey-offer-open",n="litmas:journey-resume",o="litmas:journey-pause",s="litmas:journey-back",r="litmas:journey-dismiss",l="litmas:journey-complete-segment",c="litmas:journey-start",d="litmas:chat-composer-prefill",u="litmas:presuit-setup-guide-skip",h="litmas:tour-open-documents",p="litmas:tour-open-facts",m="litmas:tour-open-case-law",f="litmas:tour-open-sample-draft",g="litmas:tour-open-sample-associate",y="litmas:tour-open-new-project-menu",w="litmas:sample-tour-complete"},31079:(e,t,a)=>{a.d(t,{z:()=>r});var i=a(5185),n=a(48084),o=a(32179),s=a(44469);function r(e){var t,a,r,l;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=(0,s.jL)(),u=(0,s.GV)(t=>e?(0,n.sR)(t,e):null),h=(null==(t=c.searchQuery)?void 0:t.trim())||void 0,[p,m]=(0,i.useState)(20);(0,i.useEffect)(()=>{m(20)},[e,h]);let{data:f,isLoading:g,isFetching:y}=(0,o.Eo)({caseId:e,page:1,limit:p,query:h},{skip:!e}),w=null!=(r=null==f?void 0:f.chats)?r:[],v=null!=(l=null==f||null==(a=f.pagination)?void 0:a.total)?l:w.length,b=w.length<v&&p<Math.min(v,100),[j,{isLoading:k}]=(0,o.rD)(),[x]=(0,o.wU)(),[A,I]=(0,i.useState)(null),S=(0,i.useCallback)(t=>{if(e&&(d((0,n.Uc)({caseId:e,chatId:t})),/\/cases\/viewCase\/[^/]+/.test(window.location.pathname))){let e=new URL(window.location.href);e.searchParams.set("chatId",t),window.history.replaceState(window.history.state,"",e.toString())}}
1,[e,d]),C=(0,i.useCallback)(async()=>{if(!e)return null;try{let t=await j({caseId:e,type:"reasoning",title:"Reasoning Chat ".concat(new Date().toLocaleString())}).unwrap();if(null==t?void 0:t.chatId)return d((0,n.Uc)({caseId:e,chatId:t.chatId})),t.chatId}catch(e){}return null},[e,j,d]),T=(0,i.useCallback)(async t=>{if(e){I(t);try{await x({caseId:e,chatId:t}).unwrap(),u===t&&d((0,n.Uc)({caseId:e,chatId:null}))}catch(e){}finally{I(null)}}},[e,x,u,d]);return{chats:w,isLoading:g,isFetching:y,isCreating:k,deletingChatId:A,activeChatId:u,selectChat:S,createChat:C,deleteChat:T,hasMoreChats:b,loadMoreChats:(0,i.useCallback)(()=>{m(e=>Math.min(e+20,100))},[])}}},44555:(e,t,a)=>{a.d(t,{BZ:()=>o,UV:()=>n,gd:()=>s,kb:()=>i});let i="litmas:training-offer-updated",n="litmas:training-offer-open";function o(e){return"litmas:onboarding-training:v1:".concat(e)}function s(e){try{let t=localStorage.getItem(e);if(!t)return null;let a=JSON.parse(t);return["dismiss","booked"].includes(a.action)&&["initial","reminder"].includes(a.offer)&&Number.isFinite(Date.parse(a.occurredAt))?a:null}catch(e){return null}}},56202:(e,t,a)=>{a.d(t,{KL:()=>n,hm:()=>o,y7:()=>i});let i="litmas:presuit-projects-changed";function n(e){window.dispatchEvent(new CustomEvent(i,{detail:e}))}function o(e){return e.type===i}},66574:(e,t,a)=>{a.d(t,{M0:()=>r,Qp:()=>o,dd:()=>i,kX:()=>s,m6:()=>n,pN:()=>l});let i="onboarding:mobile_first_case:v1:skipped",n="litmas.mobileFirstCaseStart.viewed",o="litmas.mobileFirstCaseStart.inviteSent",s="mobile_first_case_email",r="/cases/create-case?flowType=litigation&express=1&source=".concat(s);function l(e){let{eligible:t,dismissed:a,realCaseCount:i,trainingOfferPending:n=!1}=e;return t&&!a&&0===i&&!n}},75817:(e,t,a)=>{a.d(t,{Hv:()=>y,KA:()=>v,ME:()=>p,S6:()=>m,fm:()=>g,uA:()=>b,uV:()=>f});var i=a(65632),n=a(23176),o=a(86666),s=a(18172),r=a(14267),l=a(9967),c=a(6482),d=a(10185),u=a(83621),h=a(93847);let p=["documents","evidence-mapper","case-law","litiverse","discovery","deadlines","teams","parties"],m="View documents drafted in this session";function f(e){return[...e.filter(e=>"documents"!==e.id),...e.filter(e=>"documents"===e.id)]}let g=[{id:"documents",label:"Case File",icon:i.A,defaultOn:!0,tooltip:"View and upload your case documents & media"},{id:"evidence-mapper",label:"Facts",icon:n.A,defaultOn:!0,tooltip:"View your case element hierarchy & evidence"},{id:"case-law",label:"Case Law",icon:o.A,defaultOn:!1,tooltip:"View manually added case law"},{id:"litiverse",label:"Litiverse",icon:s.A,defaultOn:!1,tooltip:"View the knowledge graph of parties, entities, and relationships"},{id:"discovery",label:"Discovery",icon:r.A,defaultOn:!0,tooltip:"View and work discovery requests and responses"},{id:"deadlines",label:"Deadlines",icon:l.A,defaultOn:!0,tooltip:"View court deadlines from your case inbox"},{id:"teams",label:"Teams",icon:c.A,defaultOn:!1,tooltip:"View the people staffed on this case"},{id:"parties",label:"Parties",icon:d.A,defaultOn:!1,tooltip:"View plaintiffs, defendants, and other parties of record"}].filter(e=>!(h.m_&&"discovery"===e.id)&&!(h.xZ&&"deadlines"===e.id)&&!(h.Bd&&"video-evidence"===e.id));function y(e,t){let a=e.filter(e=>"structured-data"!==e.id);if("family"!==t)return a;let i=Math.max(0,a.findIndex(e=>"evidence-mapper"===e.id)+1);return[...a.slice(0,i),{id:"structured-data",label:"Structured Data",icon:u.A,defaultOn:!0},...a.slice(i)]}let w="/templates/org-agent?intent=formatting-samples";function v(e,t){return"templates"===e?t?"".concat(w,"&fromCase=").concat(encodeURIComponent(t)):w:null}function b(e){return{hostedTabs:e.filter(e=>"project"!==e.id&&null===v(e.id)),linkTabs:e.filter(e=>null!==v(e.id))}}},77602:(e,t,a)=>{a.d(t,{w:()=>m});var i=a(94822),n=a(5185),o=a(82435),s=a(98391),r=a(97786),l=a(6488),c=a(56202),d=a(82935),u=a(95751),h=a(93299),p=a(44469);function m(e){var t,a,m,f,g,y,w,v;let b=(0,p.jL)(),j=(0,i.useSearchParams)(),k=(0,p.GV)(u.ik)||s.tokenManager.getToken(),x=(0,p.GV)(t=>e?(0,d.s3)(t,e):null),A=null!=(m=null==x?void 0:x.projectId)?m:null,I=null!=(f=null==j?void 0:j.get("draftView"))?f:null,S=null!=(g=null==j?void 0:j.get("tab"))?g:null,C="pre-suit-builder"===I||"pre-suit-agent"===S?"pre_suit":"project",T=e&&!x?(0,r.TH)(e,C):null,{data:R}=(0,h.oV)(e,{skip:!e}),P=(null==R||null==(a=R.data)||null==(t=a.case)?void 0:t.stage)==="pre_suit"?"pre_suit":null,E=null!=(v=null!=(w=null!=(y=null==x?void 0:x.agentType)?y:null==T?void 0:T.agentType)?w:P)?v:C,_="pre_suit"===P||"pre_suit"===C?"pre_suit":E,N="pre_suit"===_?"pre-suit-projects":"projects",[D,L]=(0,n.use
1State)([]),[O,z]=(0,n.useState)(!1),[V,U]=(0,n.useState)(!1),[Y,F]=(0,n.useState)(null),[M,H]=(0,n.useState)(null),B=(0,n.useRef)(0),q=(0,n.useCallback)(async()=>{if(!k||!e)return void L([]);let t=++B.current;z(!0);try{let a=await (0,o.t)("/api/cases/".concat(e,"/").concat(N));if(a.ok){let e=await a.json();t===B.current&&L(Array.isArray(e)?e:e.projects||[])}}catch(e){}finally{t===B.current&&z(!1)}},[k,e,N]);(0,n.useEffect)(()=>{q()},[q,A]),(0,n.useEffect)(()=>{if("pre_suit"!==_)return;let t=t=>{(0,c.hm)(t)&&t.detail.caseId===e&&q()};return window.addEventListener(c.y7,t),()=>window.removeEventListener(c.y7,t)},[_,e,q]);let W=(0,n.useCallback)(t=>{if(e&&((0,r.sl)(_,e,t),b((0,d.eL)({caseId:e,projectId:t,agentType:_})),/\/cases\/viewCase\/[^/]+/.test(window.location.pathname))){let e=new URL(window.location.href);e.searchParams.set("thread",t),window.history.replaceState(window.history.state,"",e.toString())}},[e,b,_]),J=(0,n.useCallback)(async()=>{if(!k||!e)return null;U(!0);try{let t=await (0,l.dg)(e,N);return"pre_suit"===_&&(B.current++,L(e=>e.some(e=>e.id===t.id)?e:[{id:t.id,name:t.name||"Untitled Project",description:"",status:"string"==typeof t.status?t.status:"active",createdAt:t.createdAt,updatedAt:t.updatedAt||t.createdAt},...e])),W(t.id),await q(),"pre_suit"===_&&(0,c.KL)({caseId:e,activeProjectId:t.id}),t.id}catch(e){return null}finally{U(!1)}},[k,e,N,_,W,q]),G=(0,n.useCallback)(async t=>{if(k&&e){F(t);try{if(!(await (0,o.t)("/api/cases/".concat(e,"/").concat(N,"/").concat(t),{method:"DELETE"})).ok)return;if(t===A){var a,i;let n=null!=(i=null==(a=D.find(e=>e.id!==t))?void 0:a.id)?i:null;if(n)W(n);else if((0,r.sl)(_,e,null),b((0,d.eL)({caseId:e,projectId:null,agentType:_})),/\/cases\/viewCase\/[^/]+/.test(window.location.pathname)){let e=new URL(window.location.href);e.searchParams.delete("thread"),window.history.replaceState(window.history.state,"",e.toString())}}await q()}catch(e){}finally{F(null)}}},[k,e,N,q,A,D,_,W,b]);return{projects:D,isLoading:O,isCreating:V,deletingProjectId:Y,renamingProjectId:M,activeProjectId:A,agentType:_,selectProject:W,createProject:J,deleteProject:G,renameProject:(0,n.useCallback)(async(t,a)=>{let i=a.trim();if(k&&e&&i){H(t);try{if(!(await (0,o.t)("/api/cases/".concat(e,"/").concat(N,"/").concat(t),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})})).ok)return;B.current++,L(e=>e.map(e=>e.id===t?{...e,name:i}:e))}catch(e){}finally{H(null)}}},[k,e,N]),refetch:q}}},94035:(e,t,a)=>{a.d(t,{BC:()=>r,Ph:()=>d,bs:()=>c,cC:()=>l,l0:()=>s});let i="litmas:journey-signal",n=new Map,o=null;function s(e){o=e}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.runId||!o?t:{...t,runId:o};n.set(e,a),window.dispatchEvent(new CustomEvent(i,{detail:{name:e,payload:a}}))}function l(e){let t=t=>{let a=t.detail;a&&"string"==typeof a.name&&e(a)};return window.addEventListener(i,t),()=>window.removeEventListener(i,t)}function c(e){return n.get(e)}function d(){n.clear(),o=null}},97786:(e,t,a)=>{a.d(t,{Jc:()=>n,TH:()=>s,sl:()=>o});let i={project:e=>"projectAgent:projectId:".concat(e),pre_suit:e=>"preSuitAgent:projectId:".concat(e)};function n(e,t){let a=sessionStorage.getItem(i[e](t));if(!a)return null;let n=a.trim();return n&&"null"!==n&&"undefined"!==n?n:null}function o(e,t,a){let n=i[e](t);a?sessionStorage.setItem(n,a):sessionStorage.removeItem(n)}function s(e,t){for(let a of t?[t,"project"===t?"pre_suit":"project"]:["project","pre_suit"]){let t=n(a,e);if(t)return{projectId:t,agentType:a}}return null}}}]);

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.