1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"v4.207.0-hotfix.1"};var r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="50fc9c06-df21-46c0-a1ad-7e057734a2e0",e._sentryDebugIdIdentifier="sentry-dbid-50fc9c06-df21-46c0-a1ad-7e057734a2e0")}catch(e){}}();"use strict";(globalThis.rspackChunkvitals||=[]).push([[4831],{81738(e,r,i){i.r(r),i.d(r,{SmartProgramCRUDPage:()=>K,default:()=>G});var a=i(74848),t=i(28297),n=i(94868),o=i(98946),l=i(89460),s=i(10378),d=i(64251),c=i(52166),u=i(6049),p=i(49785),m=i(19732),g=i(39812),f=i(94809),h=i(28076),y=i(88609),x=i(41722),b=i(61161),T=i(61028),v=i(10449),R=i(11228),j=i(7644),P=i(69843),w=i.n(P),E=i(57491),C=i(87044),S=i(57044),N=i(6726),L=i(69158);let I=({id:e,defaultValues:r,onSubmit:i,isCareNetworkEnabled:t,isSuperAdmin:n=!1,organizationLanguage:o,fields:l})=>{let s=(0,L.JK)(),d=(0,C.g)(o),c=(0,N.WL)(o??"en"),u=(0,N.WL)("en"),{control:P,handleSubmit:I,register:A,formState:{errors:O}}=(0,p.mN)({defaultValues:{...r,programType:r.programType||"clinical"},criteriaMode:"all",mode:"onSubmit"}),{practitionerRoles:F,specialty:D,condition:k}=l;return(0,a.jsxs)(m.B,{as:"form",_gap:"l",width:"full",id:e,name:e,onSubmit:I(i),children:[(0,a.jsx)(g.EY,{variant:"xl-strong",children:(0,L.Tl)("tma.vitals.programForm.programSection.title")}),(0,a.jsx)(E.z,{label:(0,L.Tl)("luscii.createProgram.name.label"),errorMessage:O.name?.message,children:(0,a.jsx)(f.s,{type:"text",width:"full",...A("name",{required:(0,L.Tl)("tma.fieldIsRequired")}),isError:!!O.name,placeholder:(0,L.Tl)("tma.createProgramModal.programName.placeholder")})}),(0,a.jsx)(E.z,{label:(0,L.Tl)("luscii.program.label.programDescription"),children:(0,a.jsx)(f.s,{type:"text",width:"full",...A("comments"),placeholder:(0,L.Tl)("luscii.protocol.editProtocol.modal.description.placeholder")})}),(0,a.jsx)(E.z,{label:(0,L.Tl)("luscii.program.label.programURL"),errorMessage:O.informationUrl?.message,children:(0,a.jsx)(f.s,{type:"text",prefix:"https://",width:"full",...A("informationUrl",{pattern:{value:S.ZK,message:(0,L.Tl)("tma.invalidUrl.error")}}),placeholder:(0,L.Tl)("tma.createProgramModal.url.placeholder")})}),(0,a.jsxs)(m.B,{as:"fieldset",_gap:"base",width:"full",children:[(0,a.jsxs)(m.B,{as:"legend",axis:"x",_gap:"base",align:"center",width:"full",children:[(0,a.jsx)(g.EY,{variant:"base",children:(0,L.Tl)("luscii.program.label.programType")}),(0,a.jsxs)(h.j.Root,{children:[(0,a.jsx)(h.j.Trigger,{children:(0,a.jsx)(y.A,{color:"primary"})}),(0,a.jsx)(h.j.Content,{role:"tooltip",side:"top",align:"start",className:"max-w-[288px]",children:(0,a.jsx)(h.j.Card,{children:(0,a.jsxs)(m.B,{axis:"y",_gap:"m",width:"full",children:[(0,a.jsxs)(m.B,{axis:"y",_gap:"none",width:"full",children:[(0,a.jsx)(g.EY,{variant:"strong",color:"on-surface",children:(0,L.Tl)("luscii.program.label.programType.clinicalCondition")}),(0,a.jsx)(g.EY,{color:"on-surface",children:(0,L.Tl)("luscii.program.label.programType.clinicalCondition.description")})]}),(0,a.jsxs)(m.B,{axis:"y",_gap:"none",width:"full",children:[(0,a.jsx)(g.EY,{variant:"strong",color:"on-surface",children:(0,L.Tl)("luscii.program.label.programType.lifestyleAndPrevention")}),(0,a.jsx)(g.EY,{color:"on-surface",children:(0,L.Tl)("luscii.program.label.programType.lifestyleAndPrevention.description")})]})]})})})]})]}),(0,a.jsx)(p.xI,{name:"programType",control:P,rules:{required:(0,L.Tl)("tma.fieldIsRequired")},render:({field:{name:e,value:r,onChange:i}})=>(0,a.jsxs)(x.k,{children:[(0,a.jsx)(b.Z,{id:`${e}-clinical`,name:e,value:"clinical",label:(0,L.Tl)("luscii.program.label.programType.clinicalCondition"),defaultChecked:"clinical"===r,onChange:e=>{i(e.currentTarget.value)}}),(0,a.jsx)(b.Z,{id:`${e}-lifestyle`,name:e,value:"lifestyle",label:(0,L.Tl)("luscii.program.label.programType.lifestyleAndPrevention"),defaultChecked:"lifestyle"===r,onChange:e=>{i(e.currentTarget.value)}})]})}),O.programType?.message&&(0,a.jsx)(g.EY,{variant:"sm",color:"red",children:O.programType.message})]}),(0,a.jsx)(T.c,{}),(0,a.jsx)(g.EY,{variant:"xl-strong",children:(0,L.Tl)("luscii.program.label.programcharacteristics")}),(0,a.jsx)(E.d,{label:(0,L.Tl)("luscii.program.label.programSpecialty"),children:(0,a.jsx)(p.xI,{name:"specialty",control:P,render:({field:{name:e,value:r,onChange:i}})=>(0,a.jsx)(v.l,{"aria-label":e,options:D.options,isClearable:!0,width:"xl",value:r,onChange:e=>{i(w()(e)?"":e)},isLoading:D.isLoading})})}),(0,a.jsx)(E.d,{label:(0,L.Tl)("luscii.program.label.programCondition"),children:(0,a.jsx)(p.xI,{name:"condition",control:P,render:({field:{name:e,value:r,onChange:i}})=>(0,a.jsx)(v.l,{"aria-label":e,options:k.options,isClearable:!0,width:"xl",value:r,onChange:e=>{i(w()(e)?"":e)},isLoading:k.isLoading})})}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(T.c,{}),(0,a.jsx)(g.EY,{variant:"xl-strong",children:(0,L.Tl)("luscii.practitionerRoles")}),(0,a.jsx)(p.xI,{name:"practitionerRoles",control:P,render:({field:{value:e,onCh
1ange:r}})=>(0,a.jsx)(v.l,{isMulti:!0,options:F.options,isClearable:!0,width:"xl",value:e,onChange:r,isLoading:F.isLoading})})]}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(T.c,{}),(0,a.jsx)(g.EY,{variant:"xl-strong",children:(0,L.Tl)("luscii.program.label.messaging")}),(0,a.jsx)(p.xI,{name:"is2WayMessagingEnabled",control:P,render:({field:{value:e,onChange:r}})=>(0,a.jsxs)(x.k,{title:(0,L.Tl)("luscii.program.label.is2WayMessagingEnabled"),children:[(0,a.jsx)(b.Z,{name:"is2WayMessagingEnabled",id:"is2WayMessagingEnabled-no",value:"no",label:(0,L.Tl)("luscii.global.no"),checked:!0!==e,onChange:()=>r(!1)}),(0,a.jsx)(b.Z,{name:"is2WayMessagingEnabled",id:"is2WayMessagingEnabled-yes",value:"yes",label:(0,L.Tl)("luscii.global.yes"),checked:!0===e,onChange:()=>r(!0)})]})})]}),(0,a.jsx)(T.c,{}),(0,a.jsx)(g.EY,{variant:"xl-strong",children:(0,L.Tl)("luscii.program.label.brandingToPatients")}),(0,a.jsx)(E.z,{label:(0,L.Tl)("luscii.program.label.programmeNameForPatients"),description:(0,L.Tl)("luscii.program.label.programmeNameForPatients.description"),errorMessage:O.friendlyName?.message,children:d?(0,a.jsxs)(m.B,{axis:"y",_gap:"base",width:"full",align:"stretch",children:[(0,a.jsx)(p.xI,{name:"friendlyName",control:P,rules:{required:(0,L.Tl)("tma.fieldIsRequired")},render:({field:e})=>(0,a.jsx)(R.p,{...e,type:"text",width:"full",asFormField:!0,withPrefix:c,isError:!!O.friendlyName,placeholder:(0,L.Tl)("luscii.program.label.programmeNameForPatients.placeholder"),value:e.value??""})}),(0,a.jsx)(p.xI,{name:"friendlyNameEn",control:P,render:({field:e})=>(0,a.jsx)(R.p,{...e,type:"text",width:"full",asFormField:!0,withPrefix:u,placeholder:(0,L.Tl)("luscii.program.label.programmeNameForPatients.placeholder"),value:e.value??""})})]}):(0,a.jsx)(f.s,{type:"text",width:"full",...A("friendlyName",{required:(0,L.Tl)("tma.fieldIsRequired")}),isError:!!O.friendlyName,placeholder:(0,L.Tl)("luscii.program.label.programmeNameForPatients.placeholder")})}),(0,a.jsxs)(m.B,{axis:"x",_gap:"base",align:"center",children:[(0,a.jsx)(j.A,{color:"primary"}),(0,a.jsx)(g.EY,{variant:"medium",children:(0,a.jsx)("a",{href:"nl"===s?"https://luscii.notion.site/Schrijfwijzer-namen-voor-programma-s-2dffdf4f23fa80f0ad33f5984d41b3b0":"https://luscii.notion.site/How-to-write-patient-friendly-names-2dffdf4f23fa80aeba6bc922dd8ffacb",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary-dark",children:(0,L.Tl)("luscii.program.label.howToWritePatientFriendlyNames")})})]}),(0,a.jsx)(E.z,{label:(0,L.Tl)("luscii.program.label.descriptionForPatients"),description:(0,L.Tl)("luscii.program.label.descriptionForPatients.description"),errorMessage:O.friendlyDescription?.message,children:d?(0,a.jsxs)(m.B,{axis:"y",_gap:"base",width:"full",align:"stretch",children:[(0,a.jsx)(p.xI,{name:"friendlyDescription",control:P,render:({field:e})=>(0,a.jsx)(R.p,{...e,type:"text",width:"full",asFormField:!0,withPrefix:c,isError:!!O.friendlyDescription,placeholder:(0,L.Tl)("luscii.program.label.descriptionForPatients.placeholder"),value:e.value??""})}),(0,a.jsx)(p.xI,{name:"friendlyDescriptionEn",control:P,render:({field:e})=>(0,a.jsx)(R.p,{...e,type:"text",width:"full",asFormField:!0,withPrefix:u,placeholder:(0,L.Tl)("luscii.program.label.descriptionForPatients.placeholder"),value:e.value??""})})]}):(0,a.jsx)(f.s,{type:"text",width:"full",...A("friendlyDescription"),isError:!!O.friendlyDescription,placeholder:(0,L.Tl)("luscii.program.label.descriptionForPatients.placeholder")})})]})};var A=i(85506),O=i(45214),F=i(91213),D=i(87583),k=i(35527),M=i(91834),_=i(92860),q=i(83173),z=i(26591),B=i(82703),U=i(10034),Z=i(25136),H=i(47751),W=i(16552);let K=({organizationId:e,programUuid:r})=>{let i=(0,c.Z)(),{data:p,isLoading:m}=(0,Z.DJ)(e?{organizationId:String(e)}:s.hT),[g,f]=(0,U.PO)(),[h,y]=(0,U.Yb)(),{data:x,isLoading:b}=(0,B.m$)((0,W.R)(r)&&(0,W.R)(p?.uuid)?{organizationUuid:p.uuid,programUuid:r}:s.hT),T=(0,C.g)(p?.language),v=x?.localisations,R=v?.find(e=>"en"===e.locale),j=T?v?.find(e=>e.locale===p?.language):void 0,P=p?.care_network_enabled??!1,{toast:w}=(0,k._)(),{role:E}=(0,z.o)(),S=E===F.gg.SUPER_ADMIN,{selectOptions:N,data:K,fetchStatus:{isLoading:G}}=(0,D.Q)(),{data:Y=[],isLoading:$}=(0,H.A)(),{data:V=[],isLoading:J}=(0,q.Q)(),Q=(0,A.b8)(Y),X=(0,A.Ui)(V),ee=r?(0,L.Tl)("tma.editProgramModal.title"):(0,L.Tl)("tma.createProgramModal.title"),er=async a=>{let t=(0,A.S5)({values:a,careNetworkEnabled:P,organizationLanguage:p?.language??"en",useLocalisationsForBranding:T,isSuperAdmin:S,datasources:{specialties:Y,conditions:V,practitionerRoles:K}});((0,W.R)(x)?h({organizationId:String(e),programId:`${x.id}`,program:t}):g({organizationId:String(e),program:t})).unwrap().then(a=>{w({title:r?(0,L.Tl)("luscii.toaster.program.saved.title"):(0,L.Tl)("luscii.toaster.program.created.title"),message:r?(0,L.Tl)("luscii.toaster.program.saved.description"):(0,L.Tl)("luscii.toaster.program.created.description"),type:"success"}),i({to:(0,_.XL)({role:E,organizationId:e,programUuid:r??a?.uuid,page:"details",stripOrigin:!0})})}).catch(e=>{(0,d.wd)("Error mutating program",{extra:{error:JSON.stringify(e,null,2),scope:"SmartProgramCRUDPage"}}),w({title:(0,L.Tl)("luscii.toaster.program.saveFail.title"),message:(0,L.Tl)("luscii.toaster.program.saveFail.description"),type:"failure"})})},ei=(0,M.FR)(),ea=r?ei.programActions.replace(":programUuid",r).replace("/actions","/measurements"):void 0,et=r?ei.programActions.replace(":programUuid",r).replace("/actions","/detail
1s"):void 0,en=r?[{name:(0,L.Tl)("luscii.home"),link:ei.home},{name:(0,L.Tl)("tma.programs"),link:ei.programs},{name:x?.name??"",link:ea??""},{name:(0,L.Tl)("luscii.details"),link:et??""},{name:ee}]:[{name:(0,L.Tl)("luscii.home"),link:ei.home},{name:(0,L.Tl)("tma.programs"),link:ei.programs},{name:ee}],eo=f.isLoading||y.isLoading;return(0,a.jsx)(t.M,{menu:(0,a.jsx)(O.o,{}),isInViewer:!1,children:(0,a.jsx)(n.A,{dataTestId:"program-crud-page",header:{title:ee,breadcrumbs:en,renderBreadcrumbItem:u.x,banner:void 0},accessory:[(0,a.jsx)(o.j,{"data-test-id":"submit-button",form:"program-form",type:"submit",disabled:eo,children:(0,L.Tl)("tma.submit")},"submit-button"),(0,a.jsx)(l.J,{"data-test-id":"cancel-button",disabled:eo,onClick:()=>{r?i({to:(0,_.XL)({role:E,organizationId:e,programUuid:r,page:"details",stripOrigin:!0})}):i({to:".."})},children:(0,L.Tl)("tma.cancel")},"cancel-button")],isLoading:b||m,children:(0,a.jsx)(I,{id:"program-form",isSuperAdmin:S,defaultValues:{name:x?.name??"",comments:x?.comments??"",informationUrl:x?.informationUrl?.replace(/^http[s]?:\/\//,"")??"",specialty:x?.specialties?.[0]?.code??"",condition:x?.conditions?.[0]?.code??"",practitionerRoles:x?.practitionerRoles?.map(e=>e.uuid)??[],friendlyName:T?j?.friendlyName??"":x?.friendlyName??"",friendlyDescription:T?j?.friendlyDescription??"":x?.friendlyDescription??"",friendlyNameEn:T?R?.friendlyName??"":"",friendlyDescriptionEn:T?R?.friendlyDescription??"":"",programType:x?.type||"clinical",is2WayMessagingEnabled:x?.is2WayMessagingEnabled??!1},fields:{practitionerRoles:{options:N,isLoading:G},condition:{options:X,isLoading:J},specialty:{options:Q,isLoading:$}},onSubmit:er,isCareNetworkEnabled:P,organizationLanguage:p?.language})})})},G=K},87044(e,r,i){i.d(r,{},{g:e=>!!(e&&"en"!==e&&"en-US"!==e)})},85506(e,r,i){var a=i(62193),t=i.n(a),n=i(69158);function o({values:e,careNetworkEnabled:r=!1,datasources:i,organizationLanguage:a="en",useLocalisationsForBranding:n=!1,isSuperAdmin:l=!1}){var s;let d={name:e.name,comments:e.comments,informationUrl:void 0===(s=e.informationUrl)?s:""===s.trim()?s.trim():s.match(/^http[s]?:\/\//)?s:`https://${s.trim()}`};if(n?d.localisations=[{locale:a,friendlyName:e.friendlyName||null,friendlyDescription:e.friendlyDescription||null},{locale:"en",friendlyName:e.friendlyNameEn||null,friendlyDescription:e.friendlyDescriptionEn||null}]:(d.friendlyName=e.friendlyName||null,d.friendlyDescription=e.friendlyDescription||null),r&&(d.practitionerRoles=i.practitionerRoles.filter(r=>e.practitionerRoles?.includes(r.code)).map(e=>({system:e.system,code:e.code}))),t()(e.specialty))d.specialties=[];else{let r=i.specialties.find(r=>r.code===e.specialty);if(!r)throw Error("Attempted to post an invalid [specialty] value in the program form.");d.specialties=[{code:r.code,system:r.system}]}if(t()(e.condition))d.conditions=[];else{let r=i.conditions.find(r=>r.code===e.condition);if(!r)throw Error("Attempted to post an invalid [condition] value in the program form.");d.conditions=[{code:r.code,system:r.system}]}return d.type=e.programType,l&&(d.is2WayMessagingEnabled=e.is2WayMessagingEnabled??!1),d}i.d(r,{S5:()=>o},{Ui:e=>{let r=[{label:(0,n.Tl)("luscii.instrumentPreview.result.graph.none"),value:""}];for(let i of e)r.push({label:`${i.display} (${i.code})`,value:i.code});return r},b8:e=>{let r=[{label:(0,n.Tl)("luscii.instrumentPreview.result.graph.none"),value:""}];for(let i of e)r.push({label:`${i.display} (${i.code})`,value:i.code});return r}})},87583(e,r,i){i.d(r,{Q:()=>y});var a=i(96540),t=i(62193),n=i.n(t),o=i(69843),l=i.n(o),s=i(91213),d=i(3031),c=i(69158),u=i(42877),p=i.n(u),m=i(25136),g=i(95482),f=i(21617);let{useGetGlobalPractitionerRolesQuery:h}=m.Iu.injectEndpoints({endpoints:e=>({getGlobalPractitionerRoles:e.query({query:()=>"practitionerRoles",transformResponse:e=>p()(e.data,"name"),providesTags:(0,g.Z)("uuid",f.Rw.GLOBAL_PRACTITIONER_ROLES)})})}),y=()=>{let{data:e,isError:r,isFetching:i,isLoading:t,isSuccess:o,isUninitialized:u,error:p}=h();(0,d.C)({error:p,source:"usePractitionerRole - practitionerRole.hook.ts",message:"Something went wrong when fetcthing the practitioner roles."});let m=(0,a.useMemo)(()=>
1{if(n()(e)||l()(e))return{options:[],apiList:[]};let r=[...e].sort((e,r)=>e.name.localeCompare(r.name));return{options:[{value:s.ok,label:(0,c.Tl)("luscii.notspecified")},...r.map(e=>({value:e.uuid,label:e.name}))],apiList:r}},[e]);return{getPractitionerRoleFullValue:e=>{let r=m.apiList.find(r=>r.uuid===e);if(r)return{uuid:r.uuid,system:r.system}},data:m.apiList,selectOptions:m.options,fetchStatus:{isFetching:i,isLoading:t,isError:r,isSuccess:o,isUninitialized:u}}}},57044(e,r,i){var a=i(8879),t=i(53759);let n=a.FsL(a.YjP(),a.sAm(),a.z6Y(e=>{let r=e.lastIndexOf("@"),i=e.slice(0,r),a=e.slice(r+1);return!(i.length<2||!a.includes(".")||a.endsWith("."))})),o=a.FsL(a.YjP(),a.Bqr(),a.Bw9(0)),l=a.KCZ([o,n]);function s(){return function(e){return a.xLC(n,e).success}}function d(){return function(e){return a.xLC(l,e).success}}function c(){return function(e){let r=!0;return(0,t.Im)(e)&&(r=!1),r}}function u(e){return function(r){let i=!0;return r?String(r).trim().length<e&&(i=!1):i=!1,i}}function p(){return function(e){return["[A-Z]","[a-z]","[0-9]","[$@$!%*#?&-]"].reduce((r,i)=>new RegExp(i).test(e)?r+1:r,0)>=4}}function m(e){return function(r,i){return r===i[e]}}let g=/((https:\/\/.)(www\.)?)[-a-zA-Z0-9@:%._~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_.~#?&/=]*)/;function f(e){return null!==e&&null!==e.match(/^\d{6,12}$/)}function h(){return function(e){return e&&null!==e.match(/^\+[1-9]\d{8,14}$/)}}i.d(r,{BH:()=>f,Bf:()=>s,H3:()=>m,Rp:()=>d,af:()=>p,cg:()=>h,eW:()=>u,z2:()=>c},{AY:e=>!!(0,t.Im)(e)||g.test(e),ZK:/((http(s)?:\/\/.)(www\.)?)?[-a-zA-Z0-9@:%._~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_.~#?&/=]*)/})},83173(e,r,i){let{useGetConditionsQuery:a}=i(52926).W.injectEndpoints({endpoints:e=>({getConditions:e.query({query:()=>({url:"conditions"}),transformResponse:e=>e.data})})});i.d(r,{},{Q:a})},10034(e,r,i){var a=i(69843),t=i.n(a),n=i(91862),o=i(25136),l=i(21617);let{endpoints:s,useGetProgramsQuery:d,useGetPaginatedProgramsQuery:c,useGetProgramsForDropdownQuery:u,useCreateProgramMutation:p,useUpdateProgramMutation:m,useCopyProgramsMutation:g}=o.Iu.injectEndpoints({endpoints:e=>({getPrograms:e.query({query:({orgId:e})=>({url:`/organizations/${e}/programs`,headers:n.B.RequestRTKHeader(n.s.ORGANIZATION),params:{page:1,pageSize:1e3,filterAndSortByProgramName:1}}),transformResponse:e=>e.data,providesTags:[l.Rw.PROGRAMS]}),getPaginatedPrograms:e.query({query:({pageNumber:e,pageSize:r,organizationId:i,filterAndSortByProgramName:a,search:o,onlyParentLinkedToGroups:l})=>({url:`/organizations/${i}/programs`,headers:n.B.RequestRTKHeader(n.s.ORGANIZATION,"2.1"),params:{page:e,pageSize:r,filterAndSortByProgramName:Number(a),search:o,onlyParentLinkedToGroups:t()(l)?void 0:+!!l}}),providesTags:[l.Rw.PROGRAMS]}),getProgramsForDropdown:e.query({query:({organizationId:e,search:r,onlyParentLinkedToGroups:i})=>({url:`/organizations/${e}/programs`,headers:n.B.RequestRTKHeader(n.s.ORGANIZATION,"2.1"),params:{page:1,pageSize:1e3,filterAndSortByProgramName:1,search:r,onlyParentLinkedToGroups:t()(i)?void 0:+!!i}}),providesTags:[l.Rw.PROGRAMS]}),createProgram:e.mutation({query:({organizationId:e,program:r})=>({url:`/organizations/${e}/programs`,method:"POST",headers:n.B.RequestRTKHeader(n.s.ORGANIZATION,"2.1"),body:r}),transformResponse:e=>e.data,invalidatesTags:[l.Rw.PROGRAMS,l.Sl.PRACTITIONER_ROLES]}),updateProgram:e.mutation({query:({organizationId:e,programId:r,program:i})=>({url:`/organizations/${e}/programs/${r}`,method:"PUT",headers:n.B.RequestRTKHeader(n.s.ORGANIZATION,"2.1"),body:i}),transformResponse:e=>e.data,invalidatesTags:[l.Rw.PROGRAM,l.Rw.PROGRAMS,l.Sl.PRACTITIONER_ROLES]}),copyPrograms:e.mutation({query:({toGroupId:e,programUuids:r})=>({url:"/programs/copy",method:"POST",headers:n.B.RequestRTKHeader(n.s.ORGANIZATION),body:{toGroupId:e,programUuids:r}}),transformResponse:e=>e.data,invalidatesTags:[l.Rw.PROGRAMS,l.Sl.GROUPS]})}),overrideExisting:!1});i.d(r,{},{HW:g,KZ:c,PO:p,V3:u,XO:d,Yb:m,vZ:s})},47751(e,r,i){let{useGetSpecialtiesQuery:a}=i(52926).W.injectEndpoints({endpoints:e=>({getSpecialties:e.query({query:()=>({url:"specialties"}),transformResponse:e=>e.data})})});i.d(r,{},{A:a})},95482(e,r,i){var a=i(56449),t=i.n(a),n=i(62193),o=i.n(n),l=i(69843),s=i.n(l);i.d(r,{},{Z:(e,r)=>(i,a)=>s()(i)||o()(i)||!o()(a)?[r]:t()(i)?i.map(i=>({type:r,id:String(i[e])})):[{type:r,id:String(i[e])}]})},47197(e,r,i){var a,t=i(96540),n=i(9957),o=i(62133),l=i(55067),s=i(91071),d=i(91755),c=i(13656),u=i(7971),p=i(12579),m=i(58666),g=i(74848),f=Object.defineProperty,h=(e,r)=>f(e,"name",{value:r,configurable:!0}),y="HoverCard",[x,b]=(0,o.A)(y,[d.Bk]),T=(0,d.Bk)(),[v,R]=x(y),j=h(e=>{let{__scopeHoverCard:r,children:i,open:a,defaultOpen:n,onOpenChange:o,openDelay:s=700,closeDelay:c=300}=e,u=T(r),p=t.useRef(0),m=t.useRef(0),f=t.useRef(!1),h=t.useRef(!1),[x,b]=(0,l.i)({prop:a,defaultProp:n??!1,onChange:o,caller:y}),R=t.useCallback(()=>{clearTimeout(m.current),p.current=window.setTimeout(()=>b(!0),s)},[s,b]),j=t.useCallback(()=>{clearTimeout(p.current),f.current||h.current||(m.current=window.setTimeout(()=>b(!1),c))},[c,b]),P=t.useCallback(()=>b(!1),[b]);return t.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(m.current)},[]),(0,g.jsx)(v,{scope:r,open:x,onOpenChange:b,onOpen:R,onClose:j,onDismiss:P,hasSelectionRef:f,isPointerDownOnContentRef:h,children:(0,g.jsx)(d.bL,{...u,children:i})})},"HoverCard"),P=t.forwardRef(h(function(e,r){let{__scopeHoverCard:i,...a}=e,t=R("HoverCardTrigger",i),o=T(i);return(0,g.jsx)(d.Mz,{asChild:!0,...o,children:(0,g.jsx)(p.sG.a,{"data-state":t.open?"open":"closed",...a,ref:r,onPointerEnter:(0,n.mK)(e.onPointerEnter,O(t.onOpen)),onPointerLeave:(0,n.mK)(e.onPointerLeave,O(t.onClose)),onFocus:(0,n.mK)(e.onFocus,t.onOpen),onBlur:(0,n.mK)(e.onBlur,t.onClose),onTouchStart:(0,n.mK)(e.onTouchStart,e=>e.preventDefault())})})},"HoverCardTrigger")),w="HoverCardPortal",[E,C]=x(w,{forceMount:void 0}),S=h(e=>{let{__scopeHoverCard:r,forceMount:i,children:a,container:t}=e,n=R(w,r);return(0,g.jsx)(E,{scope:r,forceMount:i,children:(0,g.jsx)(u.C,{present:i||n.open,children:(0,g.jsx)(c.Z,{asChild:!0,container:t,children:a})})})},"HoverCardPortal"),N="HoverCardContent",L=t.forwardRef(h(function(e,r){let i=C(N,e.__scopeHoverCard),{forceMount:a=i.forceMount,...t}=e,o=R(N,e.__scopeHoverCard);return(0,g.jsx)(u.C,{present:a||o.open,children:(0,g.jsx)(I,{"data-state":o.open?"open":"closed",...t,onPointerEnter:(0,n.mK)(e.onPointerEnter,O(o.onOpen)),onPointerLeave:(0,n.mK)(e.onPointerLeave,O(o.onClose)),ref:r})})},"HoverCardContent")),I=t.forwardRef(h(function(e,r){let{__scopeHoverCard:i,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...p}=e,f=R(N,i),y=T(i),x=t.useRef(null),b=(0,s.s)(r,x),[v,j]=t.useState(!1);return t.useEffect(()=>{if(v){let e=document.body;return a=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=a,e.style.webkitUserSelect=a}}},[v]),t.useEffect(()=>{if(x.current){let e=h(()=>{j(!1),f.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(f.hasSelectionRef.current=!0)})},"handlePointerUp");return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!1}}},[f.isPointerDownOnContentRef,f.hasSelectionRef]),t.useEffect(()=>
1{x.current&&F(x.current).forEach(e=>e.setAttribute("tabindex","-1"))}),(0,g.jsx)(m.qW,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:u,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:(0,n.mK)(c,e=>{e.preventDefault()}),onDismiss:f.onDismiss,children:(0,g.jsx)(d.UC,{...y,...p,onPointerDown:(0,n.mK)(p.onPointerDown,e=>{e.currentTarget.contains(e.target)&&j(!0),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!0}),ref:b,style:{...p.style,userSelect:v?"text":void 0,WebkitUserSelect:v?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})},"HoverCardContentImpl")),A=t.forwardRef(h(function(e,r){let{__scopeHoverCard:i,...a}=e,t=T(i);return(0,g.jsx)(d.i3,{...t,...a,ref:r})},"HoverCardArrow"));function O(e){return r=>"touch"===r.pointerType?void 0:e()}function F(e){let r=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:h(e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,"acceptNode")});for(;i.nextNode();)r.push(i.currentNode);return r}h(O,"excludeTouch"),h(F,"getTabbableNodes"),i.d(r,{UC:()=>L,ZL:()=>S,bL:()=>j,i3:()=>A,l9:()=>P})}}]);
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.