PageSourceSearch

https://app.berrystudio.ai/assets/Forms-C_q-y8ru.js

js berrystudio.ai collected 2026-10-05 14:41:11 UTC 19,130 bytes, 1 lines download raw bytes

1import{j as s,a as m}from"./react-MtLv74w2.js";import{u as oe}from"./react-router-dom-DzqKkwCM.js";import{b as we,s as C,T as R,c as _,I as $,d as X,a9 as O,C as ee,L as be}from"./index-CrmEqUMG.js";import{R as ge,I as ve,H as Se,T as Fe,C as Ce}from"./radix-ui-react-accordion-B-wEZqh2.js";import{A as se,D as te}from"./ActionMenu-Ch7CoTAl.js";import{N as Re,Z as q}from"./berrystudio-berry-design-system-C_ozwg1P.js";import{a6 as _e,a7 as Q,aZ as Ee,ab as re,G as Te,a4 as Ae}from"./berrystudio-berry-icon-library-BAQQPfTM.js";import{S as b}from"./StatusBadge-DLFDTWdo.js";import{a as Pe,b as ae,u as Ie}from"./tanstack-react-query-CKbOZpsV.js";import{s as Be,v as ze,q as Le,t as He}from"./patient.action-1__ltAUo.js";import{A as ne}from"./Avatar-Be_YvWCY.js";import{B as Me}from"./BerryFormsSent--B0EHUqT.js";import"./react-dom-CoGdK00C.js";import{EmptyState as Ve}from"./EmptyState-vEJtMRhh.js";import{h as ie}from"./react-router-sGpLz_kJ.js";import{a as De}from"./FormsLoader-BeYy2n5f.js";import{S as $e}from"./SearchBar-_hFxh82G.js";import"./remix-run-router-DRU5C5N0.js";import"./i18next-http-backend-BC69A8Nf.js";import"./react-redux-B4PJdJD-.js";import"./use-sync-external-store-DozMEMHl.js";import"./tanstack-query-core-B-TBaBAr.js";import"./sonner-2ZoyxnPS.js";import"./reduxjs-toolkit-DkaFZfHz.js";import"./redux-yuWFInlq.js";import"./immer-AN2b4PZO.js";import"./redux-thunk-ClJT1hhx.js";import"./js-cookie-CQ7tqgma.js";import"./axios-BrqHA8J_.js";import"./cookie-es-DUQa6fgO.js";import"./klona-C5EeRGv0.js";import"./zod-CXBUvSXD.js";import"./clsx-B-dksMZM.js";import"./tailwind-merge-Ct8u8BPc.js";import"./dayjs-CK55pwcf.js";import"./react-hook-form-B7bZvGd-.js";import"./hookform-resolvers-CaN7-eKp.js";import"./react-i18next--0DpnTCi.js";import"./i18next-CU2HU9O8.js";import"./i18next-browser-languagedetector-OJKzRF51.js";import"./scheduler-DVr0KorU.js";import"./radix-ui-react-popover-CGg1UD9S.js";import"./radix-ui-primitive-B2KxKFY1.js";import"./radix-ui-react-compose-refs-B9G7dqNO.js";import"./radix-ui-react-context-sLzgUWoL.js";import"./radix-ui-react-dismissable-layer-C_zi2IH7.js";import"./radix-ui-react-primitive-Asj-KTu4.js";import"./radix-ui-react-slot-BMXE3cbR.js";import"./radix-ui-react-use-callback-ref-IWPf0JrJ.js";import"./radix-ui-react-focus-guards-B21j0B3A.js";import"./radix-ui-react-focus-scope-DZqQjXZi.js";import"./radix-ui-react-id-BK85Bq90.js";import"./radix-ui-react-use-layout-effect-Cr7vm3Nk.js";import"./radix-ui-react-popper-D7SkvR_i.js";import"./floating-ui-react-dom-7bgqI5v2.js";import"./floating-ui-dom-bpjKyGYi.js";import"./floating-ui-core-DTxPNnqt.js";import"./floating-ui-utils-CzQCSPCI.js";import"./radix-ui-react-arrow-CP_F9ON2.js";import"./radix-ui-react-use-size-CP4q3r0L.js";import"./radix-ui-react-portal-CYLmebRI.js";import"./radix-ui-react-presence-ByfDG5eQ.js";import"./radix-ui-react-use-controllable-state-Cq7EDwHE.js";import"./radix-ui-react-use-effect-event-_Ho6CIoJ.js";import"./aria-hidden-CLILUslY.js";import"./react-remove-scroll-CcyU_QAK.js";import"./tslib-Cqk_x5lA.js";import"./react-remove-scroll-bar-BVyPT4Pp.js";import"./react-style-singleton-DRlZvYm6.js";import"./get-nonce-C-Z93AgS.js";import"./use-sidecar-Z5dczD6W.js";import"./use-callback-ref-8roN_0XH.js";import"./frimousse-D198udBg.js";import"./gif-picker-react-CzjbhN8e.js";import"./radix-ui-react-collection-6CMadXZi.js";import"./radix-ui-react-collapsible-i4ceNKzQ.js";import"./radix-ui-react-direction-JSfKm_QX.js";import"./radix-ui-react-dropdown-menu-DhpZu7bP.js";import"./radix-ui-react-menu-Ce0xJK9U.js";import"./radix-ui-react-roving-focus-DXe63zpi.js";import"./radix-ui-react-use-is-hydrated-DUC0f7B-.js";import"./ImageLoader-B7uoZrxI.js";import"./helperV1-B8-45N7s.js";import"./TagName-C8VWc-rY.js";const Oe=({width:n=32,height:i=32,className:p=""})=>s.jsxs("svg",{width:n,height:i,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:p,children:[s.jsx("path",{d:"M25.4155 9.64277V25.226C25.4155 26.7565 24.1769 27.9998 22.6417 27.9998H9.35193C7.82139 27.9998 6.57812 26.7565 6.57812 25.226V6.77478C6.57812 5.24424 7.82139 4.00098 9.35193 4.00098H18.7188L21.0735 7.52827L25.4202 9.64277H25.4155Z",fill:"#AB38E8"}),s.jsx("path",{d:"M19.2988 9.28027L25.4163 14.2533V9.64289L19.2988 9.28027Z",fill:"#831CC6"}),s.jsx("path",{d:"M25.4154 9.64277H20.3011C19.4252 9.64277 18.7188 8.93636 18.7188 8.06043V4.00098L25.4154 9.64277Z",fill:"#C771FF"}),s.jsx("path",{d:"M22.068 12.4971H12.1172V13.6273H22.068V12.4971Z",fill:"white"}),s.jsx("path",{d:"M22.068 16.0625H12.1172V17.1927H22.068V16.0625Z",fill:"white"}),s.jsx("path",{d:"M22.068 19.6318H12.1172V20.7621H22.068V19.6318Z",fill:"white"}),s.jsx("path",{d:"M10.8509 12.4971H9.7207V13.6273H10.8509V12.4971Z",fill:"white"}),s.jsx("path",{d:"M10.8509 16.0625H9.7207V17.1927H10.8509V16.0625Z",fill:"white"}),s.jsx("path",{d:"M10.8509 19.6318H9.7207V20.7621H10.8509V19.6318Z",fill:"white"})]});function Ze({data:n,selectedForms:i,selectedPackets:p,onFormToggle:j,onPacketToggle:g,onResetSelection:B,payload:z}){const v=Pe(),{patientId:S}=ie(),[F,E]=m.useState(!1),[y,L]=m.useState(void 0),H=we(),[T]=oe(),Z=T.get("search")||"",c=e=>"forms"in e&&Array.isArray(e.forms),[A]=m.useState(!0),[k,r]=m.useState(null),[a,l]=m.useState(null),{mutate:x,isPending:N,data:M,reset:P}=ae({mutationFn:e=>Be(S,{forms:e.forms},e.channel),onSuccess:async(e,t)=>{E(!0),t.channel!=="link"&&e.success&&C({type:R.SUCCESS,message:t.channel==="email"?"Form sent to email successfully.":t.channel==="sms"?"Form sent to SMS successfully.":"Form sent to both email and SMS successfully."}
1),await v.invalidateQueries({queryKey:["forms",S]}),B()},onError:e=>{C({type:R.ERROR,message:e?.message||"Something went wrong while sending forms"})}}),f=async(e,t="both")=>{const o=e||z;if(o.length===0){C({type:R.ERROR,message:"Select at least one form to send."});return}await x({forms:o,channel:t})},{mutate:U,isPending:V,variables:D}=ae({mutationFn:({formId:e,packetId:t})=>ze({form_id:e,patient_id:Number(S),packet_id:t}),onSuccess:e=>{window.open(e?.data,"_blank")},onError:()=>{C({type:R.ERROR,message:"The form could not be loaded at this time. Please try again later."})}}),le=()=>{const e=[];return n.forEach(t=>{!c(t)&&typeof t.form_id=="number"&&e.push(t.form_id)}),e},me=()=>{const e=[];return n.forEach(t=>{c(t)&&typeof t.id=="number"&&e.push(t.id)}),e},ce=async(e,t)=>{await U({formId:e,packetId:t})},K=le(),J=me(),I=K.length>0&&K.some(e=>i.has(e))||J.length>0&&J.some(e=>p.has(e)),W=m.useMemo(()=>{const e=[];return n.forEach(t=>{c(t)?p.has(t.id)&&e.push({id:t.id,name:t.name,isPacket:!0}):i.has(t.form_id)&&e.push({id:t.form_id,name:t.name,url:t.source_url,isPacket:!1})}),e},[n,i,p]),de=e=>{const t=W.find(o=>o.id===e);if(t)if(t.isPacket){const o=n.find(d=>d.id===e);o&&g(o)}else{const o=n.find(d=>!c(d)&&d.form_id===e);o&&j(o)}},ue=()=>{n.forEach(e=>{!c(e)&&!i.has(e.form_id)&&j(e)}),n.forEach(e=>{c(e)&&!p.has(e.id)&&g(e)})},pe=()=>{n.forEach(e=>{!c(e)&&i.has(e.form_id)&&j(e)}),n.forEach(e=>{c(e)&&p.has(e.id)&&g(e)})},G=async(e,t,o,d)=>{switch(e){case"view":typeof t=="number"&&ce(t,o==="packet"?d?.id:void 0);break;case"send":let u=[],w=[];if(o==="packet"&&c(d)){const h=d;h.forms.forEach(Ne=>{u.push({formId:Ne.form_id,packetId:h.id})}),w.push({id:h.id,name:h.name,isPacket:!0})}else if(t&&d&&!c(d)){const h=d;u.push({formId:t,packetId:null}),w.push({id:h.form_id,name:h.name})}else u=z,w=[];A?(w.length>0?(r(w),l(u)):(r(null),l(null)),E(!0)):f(u.length>0?u:void 0);break;case"archive":let ye={type:o,id:t};await H({title:`Delete ${o}`,message:`Are you sure you want to delete this ${o} from list?`,confirmText:"Delete",cancelText:"Cancel",confirmVariant:"danger",onConfirm:async()=>{try{const h=await Le(Number(S),ye);C({type:R.SUCCESS,message:h?.message||"Form/Packet removed successfully"}),await v.refetchQueries({queryKey:["forms",S]}),B()}catch(h){C({type:R.ERROR,message:h?.message||"Failed to unassign form. Please try again."})}}});break}},xe="sticky z-[9] shadow-[0_2px_3px_0_rgba(3,12,33,0.02)]",fe=()=>s.jsxs("div",{className:_("flex items-center gap-[16px] min-h-[58px] px-4 w-full bg-white rounded-lg border-b border-b-Neutral-colors-Grey-and-Surface-300",xe),children:[s.jsxs("button",{onClick:pe,className:_("text-Neutral-colors-Tuned-600 font-medium active:bg-Neutral-colors-Grey-and-Surface-300 hover:bg-Neutral-colors-Grey-and-Surface-200 flex items-center h-[36px] px-3 text-[14px] leading-[18px] !no-underline !rounded-lg"),children:[s.jsx(_e,{}),s.jsx("span",{className:"ml-[10px]",children:"Unselect All"})]}),s.jsx("div",{className:"px-3 py-[6px] h-[32px] flex items-center justify-center",children:s.jsxs("span",{className:"text-[#030C21] font-dm-sans leading-[18px] font-semibold text-[14px] w-[136px]",children:[i.size+p.size," item(s) selected"]})}),s.jsx(Re,{label:"Review and Send",variant:"primary",isLoading:N&&!A,onClick:()=>G("send"),disabled:!I,leftIcon:s.jsx(Q,{size:24,color:"#FFFFFF"}),leftIconVisible:!0})]}),he=()=>s.jsxs("div",{className:" flex items-center w-full h-[40px] gap-[15px] px-4 py-[12px] bg-Neutral-colors-Grey-and-Surface-100 sticky top-0 z-[5]  rounded-lg ",children:[s.jsxs("div",{className:"flex items-center flex-[3] min-w-0",children:[s.jsx("span",{className:"mr-4 px-[8px]",children:s.jsx(q,{checked:I,onChange:ue,size:"medium",disabled:n.length===0})}),s.jsx("span",{className:"accordion-table-header font-medium text-[14px] ml-[40px]",children:"Name"})]}),s.jsx("div",{className:"flex-[2] min-w-0 accordion-table-header",children:"Last sent by"}),s.jsx("div",{className:"flex-1 min-w-0 accordion-table-header",children:"Last sent on"}),s.jsx("div",{className:"flex-1 min-w-0 accordion-table-header",children:"Submitted on"}),s.jsx("div",{className:"flex-1 min-w-0 accordion-table-header",children:"Status"}),s.jsx("div",{className:"flex items-center justify-end w-[40px]"})]}),Y=(e,t=!1,o)=>s.jsxs("div",{className:_("flex h-[70px]  gap-[15px] flex-row items-center px-6 py-4 border-b border-b-Neutral-colors-Grey-and-Surface-300 group transition-colors",i.has(e.form_id)?"bg-Neutral-colors-Grey-and-Surface-200":"",(o===n.length-1,"")),children:[s.jsxs("div",{className:"flex items-center flex-[3] min-w-0",children:[!t&&s.jsx(q,{checked:i.has(e.form_id),onChange:()=>j(e),size:"medium",className:"mr-4"}),t&&s.jsx($,{icon:s.jsx(Ee,{size:20}),disabled:!0,className:"opacity-100 ml-[40px] mr-[2px]",iconType:"custom"}),s.jsx("span",{className:"min-w-[32px]",children:s.jsx(Oe,{})}),s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900 truncate ml-2",children:e.name||"Unnamed Form"})]}),s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex-[2] min-w-0 flex items-center py-0",children:e?.
1sentBy?s.jsxs("span",{className:"flex items-center font-medium text-[14px] text-Neutral-colors-Tuned-900",children:[s.jsx(ne,{size:"small",className:"mr-[8px]",src:e?.sentBy?.profilePicture?`${X.API_URL}/file?url=${e?.sentBy?.profilePicture}`:null,name:`${e?.sentBy?.firstName} ${e?.sentBy?.lastName??""}`}),e?.sentBy?.firstName," ",e?.sentBy?.lastName??""]}):s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:"-"})}),s.jsx("div",{className:"flex-1 min-w-0 py-0",children:e?.updated_at?s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:e?.status==="DRAFT"?"-":O(e.updated_at)}):s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:"-"})}),s.jsx("div",{className:"flex-1 min-w-0 py-0",children:e?.completed_at?s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:O(e.completed_at)}):s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:"-"})}),s.jsx("div",{className:"flex-1 min-w-0 py-0",children:e?.status==="DRAFT"?s.jsx(b,{label:"Not sent",state:"inactive"}):e?.status=="SENT"?s.jsx(b,{label:"Sent",state:"pending"}):e?.status=="REJECTED"?s.jsx(b,{label:"Rejected",state:"failed"}):s.jsx(b,{label:"Completed",state:"success"})})]}),s.jsx("div",{className:"flex items-center justify-end w-[40px] self-center",children:!I&&(t?V&&D?.formId===e?.form_id?s.jsx($,{size:"lg",icon:s.jsx(ee,{color:"#777E8F"}),disabled:!0}):null:V&&D?.formId===e?.form_id?s.jsx($,{size:"lg",icon:s.jsx(ee,{color:"#777E8F"}),disabled:!0}):s.jsx(se,{children:s.jsxs(te,{className:e?.status!="DRAFT"?"rounded-all-sides":"top-rounded",onClick:()=>G("send",e.form_id,"form",e),children:[e?.status=="SENT"?s.jsx(re,{}):s.jsx(Q,{size:24,color:"#777E8F"}),s.jsx("span",{className:"ml-2",children:e?.status=="SENT"?"Resend":"Send"})]})}))})]},e.id),je=(e,t)=>{const o=p.has(e.id),d=t===n.length-1;return s.jsxs(ve,{value:`packet-${e.id||t}`,className:_("w-full",y===`packet-${e.id||t}`?"accordion-opened-state":""),children:[s.jsx(Se,{asChild:!0,children:s.jsx(Fe,{asChild:!0,children:s.jsxs("div",{className:_("flex h-[70px]  gap-[15px] flex-row items-center px-6 py-4 border-b border-b-Extras-Transparent-black-8 bg-white group cursor-pointer transition-colors",o?"bg-Neutral-colors-Grey-and-Surface-200":"",d&&y!==`packet-${e.id||t}`?"border-transparent":""),children:[s.jsxs("div",{className:"flex  items-center flex-[3] min-w-0",children:[s.jsx(q,{checked:o,onChange:u=>{u.stopPropagation(),g(e)},size:"medium",className:"mr-4"}),s.jsx($,{disabled:!0,icon:y===`packet-${e.id||t}`?s.jsx(Te,{size:20}):s.jsx(Ae,{size:20}),iconType:"custom","aria-label":"Toggle",className:"opacity-100 mr-2"}),s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900 truncate",children:e?.name||""})]}),s.jsx("div",{className:"flex-[2] min-w-0 flex items-center py-0",children:e.forms?.[0]?.sent_by?s.jsxs("span",{className:"flex items-center font-medium text-[14px] text-Neutral-colors-Tuned-900",children:[s.jsx(ne,{size:"small",className:"mr-[8px]",name:e?.forms?.[0]?.sent_by?.name,src:e?.sentBy?.profilePicture?`${X.API_URL}/file?url=${e?.sentBy?.profilePicture}`:null}),e?.forms?.[0]?.sent_by?.name]}):s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:"-"})}),s.jsx("div",{className:"flex-1 min-w-0 py-0",children:e?.forms?.[0]?.updated_at?s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:e?.forms?.[0]?.status==="DRAFT"?"-":O(e.forms?.[0]?.updated_at)}):s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:"-"})}),s.jsx("div",{className:"flex-1 min-w-0 py-0",children:e?.forms?.[0]?.completed_at?s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:O(e.forms?.[0]?.completed_at)}):s.jsx("span",{className:"font-medium text-[14px] text-Neutral-colors-Tuned-900",children:"-"})}),s.jsx("div",{className:"flex-1 min-w-0 py-0",children:e?.forms?.[0]?.status==="DRAFT"?s.jsx(b,{label:"Not sent",state:"inactive"}):e?.forms?.[0]?.status=="SENT"?s.jsx(b,{label:"Sent",state:"pending"}):e?.forms?.[0]?.status=="REJECTED"?s.jsx(b,{label:"Rejected",state:"failed"}):s.jsx(b,{label:"Completed",state:"success"})}),s.jsx("div",{className:"flex items-center justify-end w-[40px] self-center",children:!I&&e?.forms?.[0]?.status!="COMPLETED"&&s.jsx(se,{children:s.jsxs(te,{className:e?.forms?.[0]?.status!="DRAFT"?"rounded-[12px]":"top-rounded",onClick:u=>{u.stopPropagation(),G("send",null,"packet",e)},children:[e?.forms?.[0]?.status=="SENT"?s.jsx(re,{}):s.jsx(Q,{size:24,color:"#777E8F"}),s.jsx("span",{className:"ml-2",children:e?.forms?.[0]?.status=="SENT"?"Resend":"Send"})]})})})]})})}),s.jsx(Ce,{className:"AccordionContent overflow-hidden",children:s.jsx("div",{className:"bg-white",children:e.forms?.map((u,w)=>s.jsx("div",{children:Y(u,!0,w)},u.id||`f-${w}`))})})]},e.id||t)};return s.jsxs("div",{className:"accordion-table-main-wrapper collapsable w-full flex flex-col pb-[4px] px-[4px]",children:[s.jsx("div",{className:"w-full overflow-x-auto scrollbar-thin",children:s.jsxs("div",{className:"min-w-[960px]",children:[I?fe():s.jsx(s.Fragment,{children:he()}),n.length>0?s.jsx(ge,{className:"flex flex-col w-full",collapsible:!0,type:"single",value:y,onValueChange:L,children:n?.map((e,t)=>c(e)?je(e,t):s.jsx("div",{children:Y(e,!1,t)},e.id))}):s.jsx(Ve,{description:Z?"No forms found":"No forms assigned yet"})]})}),F&&s.jsx(Me,{show:F,message:"Whoop Whoop! BerryForms sent",links:M?.data??[],onHide:()=>{E(!1),r(null),l(null),P()},isReviewEnabled:A,reviewForms:k||W,onRemoveForm:de,onSend:e=>{let t="both";e.email&&!e.sms?t="email":!e.email&&e.sms?t="sms":!e.email&&!e.sms&&(t="link"),f(a||void 0,t)},isSending:N})]})}function wt(){const{patientId:n}=ie(),[i,p]=m.useState(new Set),[j,g]=m.useState(new Set),[B,z]=oe(),v=B.get("search")||"",S=r=>{z(a=>(r?a.set("search",r):a.delete("search"),a),{replace:!0})},{data:F,isLoading:E}=Ie({queryKey:["forms",n],queryFn:()=>He(n),enabled:!!n}),y=m.useCallback(r=>{const a={...r,form_id:r.formId??r.form_id,sent_by:r.sentBy?{id:r.sentBy.id,name:`${r.sentBy.firstName} ${r.sentBy.lastName||""}`.trim()}:r.sent_by??null,updated_at:r.sentAt||r.updated_at,completed_at:r.completedAt||r.completed_at};return a.forms&&Array.isArray(a.forms)&&(a.forms=a.forms.map(y)),a},[]),L=m.useCallback(r=>"forms"in r&&Array.isArray(r.forms),[]),H=m.useCallback(r=>"forms"in r&&Array.isArray(r.forms)?r.forms.length===0?!0:r.forms.every(a=>(a?.status||"").toUpperCase()==="DRAFT"):(r?.status||"").toUpperCase()==="DRAFT",[]),T=m.useMemo(()=>
1{if(!F?.data)return[];const r=(F.data.sentFormResponse||[]).map(y),a=(F.data.draftFormResponse||[]).map(y),l=[...r,...a],x=[],N=[];l.forEach(f=>{if(H(f)){N.push(f);return}x.push(f)});const M=[...x,...N];if(!v.trim())return M;const P=v.toLowerCase().trim();return M.filter(f=>{if("forms"in f&&Array.isArray(f.forms)){const U=(f.name||"").toLowerCase().includes(P),V=f.forms.some(D=>(D.name||"").toLowerCase().includes(P));return U||V}else return(f.name||"").toLowerCase().includes(P)})},[F?.data,H,y,v]),Z=m.useMemo(()=>{const r=[];return T.forEach(a=>{if(L(a)){if(!j.has(a.id))return;a.forms.forEach(x=>{const N=x.formId??x.form_id;typeof N=="number"&&r.push({formId:N,packetId:a.id})});return}const l=a.formId??a.form_id;typeof l=="number"&&i.has(l)&&r.push({formId:l,packetId:null})}),r},[T,L,i,j]),c=m.useCallback(r=>{const a=r.formId??r.form_id;typeof a=="number"&&p(l=>{const x=new Set(l);return x.has(a)?x.delete(a):x.add(a),x})},[]),A=m.useCallback(r=>{!r||typeof r.id!="number"||g(a=>{const l=new Set(a);return l.has(r.id)?l.delete(r.id):l.add(r.id),l})},[]),k=m.useCallback(()=>{p(new Set),g(new Set)},[]);return n?s.jsx(be,{children:E?s.jsx("div",{className:"px-[20px] pb-6 pt-4",children:s.jsx(De,{})}):s.jsxs("div",{className:"px-[20px] pb-6 pt-4",children:[s.jsx("div",{className:_("px-[4px]",i.size>0||j.size>0?"mb-0":"mb-4"),children:s.jsx("div",{className:"h-[40px] flex items-center justify-between",children:s.jsx("h2",{className:"layout-headings-medium",children:"Forms List"})})}),i.size===0&&j.size===0&&s.jsx("div",{className:"mb-4",children:s.jsx($e,{className:"w-[280px]",value:v,onSearch:S})}),s.jsx(Ze,{data:T,selectedForms:i,selectedPackets:j,onFormToggle:c,onPacketToggle:A,onResetSelection:k,payload:Z})]})}):null}export{wt 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.