@openmrs/esm-patient-immunizations-app 4.0.1-pre.278 → 4.0.1-pre.294

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,32 @@
1
- @openmrs/esm-patient-immunizations-app:build: cache hit, replaying output fcdf318436264e1d
2
- @openmrs/esm-patient-immunizations-app:build: assets by chunk 921 KiB (id hint: vendors)
3
- @openmrs/esm-patient-immunizations-app:build:  assets by status 853 KiB [big]
4
- @openmrs/esm-patient-immunizations-app:build:  asset 965.js 446 KiB [emitted] [minimized] [big] (id hint: vendors) 1 related asset
5
- @openmrs/esm-patient-immunizations-app:build:  asset 858.js 407 KiB [emitted] [minimized] [big] (id hint: vendors) 1 related asset
6
- @openmrs/esm-patient-immunizations-app:build:  asset 206.js 45.4 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
7
- @openmrs/esm-patient-immunizations-app:build:  asset 709.js 19 KiB [emitted] [minimized] (id hint: vendors)
8
- @openmrs/esm-patient-immunizations-app:build:  asset 245.js 4.15 KiB [emitted] [minimized] (id hint: vendors)
9
- @openmrs/esm-patient-immunizations-app:build: + 11 assets
10
- @openmrs/esm-patient-immunizations-app:build: orphan modules 4.01 MiB [orphan] 648 modules
11
- @openmrs/esm-patient-immunizations-app:build: runtime modules 39.6 KiB 28 modules
12
- @openmrs/esm-patient-immunizations-app:build: built modules 2.82 MiB (javascript) 252 bytes (consume-shared) 210 bytes (share-init) [built]
13
- @openmrs/esm-patient-immunizations-app:build:  modules by path ../../node_modules/ 2.67 MiB 93 modules
14
- @openmrs/esm-patient-immunizations-app:build:  modules by path ./ 63.8 KiB 13 modules
15
- @openmrs/esm-patient-immunizations-app:build:  modules by path ../esm-patient-common-lib/src/ 86.1 KiB
16
- @openmrs/esm-patient-immunizations-app:build:  ../esm-patient-common-lib/src/index.ts + 44 modules 74.9 KiB [built] [code generated]
17
- @openmrs/esm-patient-immunizations-app:build:  + 5 modules
18
- @openmrs/esm-patient-immunizations-app:build:  consume-shared-module modules 252 bytes
19
- @openmrs/esm-patient-immunizations-app:build:  modules by path consume shared module (default) @openmrs/ 126 bytes 3 modules
20
- @openmrs/esm-patient-immunizations-app:build:  + 3 modules
21
- @openmrs/esm-patient-immunizations-app:build:  provide-module modules 210 bytes
22
- @openmrs/esm-patient-immunizations-app:build:  modules by path provide shared module (default) @openmrs/ 84 bytes 2 modules
23
- @openmrs/esm-patient-immunizations-app:build:  + 3 modules
24
- @openmrs/esm-patient-immunizations-app:build:  container entry 42 bytes [built] [code generated]
25
- @openmrs/esm-patient-immunizations-app:build: 
26
- @openmrs/esm-patient-immunizations-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
27
- @openmrs/esm-patient-immunizations-app:build: This can impact web performance.
28
- @openmrs/esm-patient-immunizations-app:build: Assets:
29
- @openmrs/esm-patient-immunizations-app:build:  858.js (407 KiB)
30
- @openmrs/esm-patient-immunizations-app:build:  965.js (446 KiB)
31
- @openmrs/esm-patient-immunizations-app:build: 
32
- @openmrs/esm-patient-immunizations-app:build: webpack 5.74.0 compiled with 1 warning in 58217 ms
1
+ @openmrs/esm-patient-immunizations-app:build: cache hit, replaying output 221f78ecea356590
2
+ @openmrs/esm-patient-immunizations-app:build: assets by chunk 921 KiB (id hint: vendors)
3
+ @openmrs/esm-patient-immunizations-app:build:  assets by status 853 KiB [big]
4
+ @openmrs/esm-patient-immunizations-app:build:  asset 965.js 446 KiB [emitted] [minimized] [big] (id hint: vendors) 1 related asset
5
+ @openmrs/esm-patient-immunizations-app:build:  asset 858.js 407 KiB [emitted] [minimized] [big] (id hint: vendors) 1 related asset
6
+ @openmrs/esm-patient-immunizations-app:build:  asset 206.js 45.4 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
7
+ @openmrs/esm-patient-immunizations-app:build:  asset 709.js 19 KiB [emitted] [minimized] (id hint: vendors)
8
+ @openmrs/esm-patient-immunizations-app:build:  asset 245.js 4.15 KiB [emitted] [minimized] (id hint: vendors)
9
+ @openmrs/esm-patient-immunizations-app:build: + 11 assets
10
+ @openmrs/esm-patient-immunizations-app:build: orphan modules 4.01 MiB [orphan] 648 modules
11
+ @openmrs/esm-patient-immunizations-app:build: runtime modules 39.6 KiB 28 modules
12
+ @openmrs/esm-patient-immunizations-app:build: built modules 2.82 MiB (javascript) 252 bytes (consume-shared) 210 bytes (share-init) [built]
13
+ @openmrs/esm-patient-immunizations-app:build:  modules by path ../../node_modules/ 2.67 MiB 93 modules
14
+ @openmrs/esm-patient-immunizations-app:build:  modules by path ./ 63.8 KiB 13 modules
15
+ @openmrs/esm-patient-immunizations-app:build:  modules by path ../esm-patient-common-lib/src/ 86 KiB
16
+ @openmrs/esm-patient-immunizations-app:build:  ../esm-patient-common-lib/src/index.ts + 44 modules 74.9 KiB [built] [code generated]
17
+ @openmrs/esm-patient-immunizations-app:build:  + 5 modules
18
+ @openmrs/esm-patient-immunizations-app:build:  consume-shared-module modules 252 bytes
19
+ @openmrs/esm-patient-immunizations-app:build:  modules by path consume shared module (default) @openmrs/ 126 bytes 3 modules
20
+ @openmrs/esm-patient-immunizations-app:build:  + 3 modules
21
+ @openmrs/esm-patient-immunizations-app:build:  provide-module modules 210 bytes
22
+ @openmrs/esm-patient-immunizations-app:build:  modules by path provide shared module (default) @openmrs/ 84 bytes 2 modules
23
+ @openmrs/esm-patient-immunizations-app:build:  + 3 modules
24
+ @openmrs/esm-patient-immunizations-app:build:  container entry 42 bytes [built] [code generated]
25
+ @openmrs/esm-patient-immunizations-app:build: 
26
+ @openmrs/esm-patient-immunizations-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
27
+ @openmrs/esm-patient-immunizations-app:build: This can impact web performance.
28
+ @openmrs/esm-patient-immunizations-app:build: Assets:
29
+ @openmrs/esm-patient-immunizations-app:build:  858.js (407 KiB)
30
+ @openmrs/esm-patient-immunizations-app:build:  965.js (446 KiB)
31
+ @openmrs/esm-patient-immunizations-app:build: 
32
+ @openmrs/esm-patient-immunizations-app:build: webpack 5.74.0 compiled with 1 warning in 110407 ms
package/dist/927.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[927],{7904:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I,.-esm-patient-immunizations__card-header__tabletHeader___efA_M{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I h4:after,.-esm-patient-immunizations__card-header__tabletHeader___efA_M h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I{height:3rem}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__card-header__tabletHeader___efA_M{height:4.5rem}.-esm-patient-immunizations__card-header__tabletHeader___efA_M h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}',""]),o.locals={desktopHeader:"-esm-patient-immunizations__card-header__desktopHeader___BUQ5I",tabletHeader:"-esm-patient-immunizations__card-header__tabletHeader___efA_M"};const s=o},7942:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.active-left-nav-link .-esm-patient-immunizations__dashboardextension__link___lom8t:nth-child(1){color:#161616;padding:1.2rem 0 1.2rem 1.2rem}",""]),o.locals={link:"-esm-patient-immunizations__dashboardextension__link___lom8t"};const s=o},7431:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__empty-state__action___xInzb{margin-bottom:.5rem}.-esm-patient-immunizations__empty-state__content___lACIK{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.5rem}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID,.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID h4:after,.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__empty-state__heading___gW4Bc:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__empty-state__tile___DvfL3{text-align:center;border:1px solid #e0e0e0}',""]),o.locals={action:"-esm-patient-immunizations__empty-state__action___xInzb",content:"-esm-patient-immunizations__empty-state__content___lACIK",desktopHeading:"-esm-patient-immunizations__empty-state__desktopHeading___UIGID",tabletHeading:"-esm-patient-immunizations__empty-state__tabletHeading___lVXqD",heading:"-esm-patient-immunizations__empty-state__heading___gW4Bc",tile:"-esm-patient-immunizations__empty-state__tile___DvfL3"};const s=o},418:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__error-state__errorMessage___kDICS{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-top:2.25rem;margin-bottom:.5rem}.-esm-patient-immunizations__error-state__errorCopy___UX21v{margin-bottom:.5rem;font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__error-state__tabletHeading___EAqy2 h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx,.-esm-patient-immunizations__error-state__tabletHeading___EAqy2{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx h4:after,.-esm-patient-immunizations__error-state__tabletHeading___EAqy2 h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__error-state__tile___LTdVO{text-align:center;border:1px solid #e0e0e0}',""]),o.locals={errorMessage:"-esm-patient-immunizations__error-state__errorMessage___kDICS",errorCopy:"-esm-patient-immunizations__error-state__errorCopy___UX21v",desktopHeading:"-esm-patient-immunizations__error-state__desktopHeading___Bhvtx",tabletHeading:"-esm-patient-immunizations__error-state__tabletHeading___EAqy2",tile:"-esm-patient-immunizations__error-state__tile___LTdVO"};const s=o},8952:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__pagination__bodyShort01____zD39,.-esm-patient-immunizations__pagination__configurableLink___JhehZ{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-patient-immunizations__pagination__desktop___TGt17,.-esm-patient-immunizations__pagination__tablet___BEzP7{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);display:flex;border-top:1px solid #e0e0e0;justify-content:space-between;color:#525252;background-color:#fff;padding-left:1rem;align-items:center}.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination{min-height:0rem;height:2rem;width:auto;border:none}.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--select-input,.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--btn,.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--pagination__right{min-height:0rem;height:2rem}.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination{min-height:0rem;height:3rem;width:auto;border:none}.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--select-input,.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--btn,.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--pagination__right{min-height:0rem;height:3rem}.-esm-patient-immunizations__pagination__configurableLink___JhehZ{text-decoration:none;padding:0 .5rem}.-esm-patient-immunizations__pagination__pagination___B09B8{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;display:flex}div.-esm-patient-immunizations__pagination__pagination___B09B8>.cds--pagination__left{display:none}",""]),o.locals={bodyShort01:"-esm-patient-immunizations__pagination__bodyShort01____zD39",configurableLink:"-esm-patient-immunizations__pagination__configurableLink___JhehZ",desktop:"-esm-patient-immunizations__pagination__desktop___TGt17",tablet:"-esm-patient-immunizations__pagination__tablet___BEzP7",pagination:"-esm-patient-immunizations__pagination__pagination___B09B8"};const s=o},1927:(t,e,n)=>{n.r(e),n.d(e,{CardHeader:()=>w,DashboardExtension:()=>V,DashboardGroupExtension:()=>T,EmptyDataIllustration:()=>k,EmptyState:()=>P,ErrorState:()=>j,PatientChartPagination:()=>X,WorkspaceWindowSizeProvider:()=>Lt,cancelPrompt:()=>St,changeWorkspaceContext:()=>Et,closeAllWorkspaces:()=>kt,closeWorkspace:()=>zt,convertTime12to24:()=>tt,createDashboardGroup:()=>H,createDashboardLink:()=>F,createOfflineVisitForPatient:()=>Se,formEntrySub:()=>st,getOfflineVisitForPatient:()=>be,getPromptBeforeClosingFcn:()=>wt,getWorkspaceStore:()=>Ot,launchPatientChartWithWorkspaceOpen:()=>vt,launchPatientWorkspace:()=>gt,launchStartVisitPrompt:()=>B,patientRegistrationSyncType:()=>le,promptBeforeClosing:()=>bt,registerNavGroup:()=>L,registerWorkspace:()=>_t,resetWorkspaceStore:()=>Pt,useActivePatientEnrollment:()=>Qt,useAutoCreatedOfflineVisit:()=>ye,useNavGroups:()=>M,useOfflineVisit:()=>ve,usePaginationInfo:()=>R,usePatientOrOfflineRegisteredPatient:()=>ue,useVisitOrOfflineVisit:()=>ge,useVitalsConceptMetadata:()=>it,useWorkspaceWindowSize:()=>Dt,useWorkspaces:()=>jt,visitSyncType:()=>he,withUnit:()=>ot});var r=n(5529),a=n.n(r),i=n(906),o=n(6062),s=n.n(o),c=n(4036),l=n.n(c),u=n(6793),p=n.n(u),d=n(7892),m=n.n(d),f=n(1173),_=n.n(f),h=n(2464),g=n.n(h),v=n(7904),y={};y.styleTagTransform=g(),y.setAttributes=m(),y.insert=p().bind(null,"head"),y.domAPI=l(),y.insertStyleElement=_(),s()(v.Z,y);const b=v.Z&&v.Z.locals?v.Z.locals:void 0;function w(t){var e=t.title,n=t.children,r="tablet"===(0,i.useLayoutType)();return a().createElement("div",{className:r?b.tabletHeader:b.desktopHeader},a().createElement("h4",null,e),n)}var S=n(9694),z=n(4924),k=function(t){var e=t.width,n=void 0===e?"64":e,r=t.height,i=void 0===r?"64":r;return a().createElement("svg",{width:n,height:i,viewBox:"0 0 64 64"},a().createElement("title",null,"Empty data illustration"),a().createElement("g",{fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),a().createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),a().createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),a().createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))},E=n(7431),A={};A.styleTagTransform=g(),A.setAttributes=m(),A.insert=p().bind(null,"head"),A.domAPI=l(),A.insertStyleElement=_(),s()(E.Z,A);const O=E.Z&&E.Z.locals?E.Z.locals:void 0;var P=function(t){var e=(0,z.useTranslation)().t,n="tablet"===(0,i.useLayoutType)();return a().createElement(S.mh4,null,a().createElement(S.n9L,{className:O.tile},a().createElement("div",{className:n?O.tabletHeading:O.desktopHeading},a().createElement("h4",null,t.headerTitle)),a().createElement(k,null),a().createElement("p",{className:O.content},a().createElement(z.Trans,{i18nKey:"emptyStateText",values:{displayText:t.displayText.toLowerCase()}},"There are no ",t.displayText.toLowerCase()," to display for this patient")),a().createElement("p",{className:O.action},t.launchForm&&a().createElement("span",null,a().createElement(S.rUS,{onClick:function(){return t.launchForm()}},a().createElement(a().Fragment,null,e("record","Record")," ",t.displayText.toLowerCase()))))))},x=n(418),C={};C.styleTagTransform=g(),C.setAttributes=m(),C.insert=p().bind(null,"head"),C.domAPI=l(),C.insertStyleElement=_(),s()(x.Z,C);const I=x.Z&&x.Z.locals?x.Z.locals:void 0;var j=function(t){var e,n,r=t.error,o=t.headerTitle,s=(0,z.useTranslation)().t,c="tablet"===(0,i.useLayoutType)();return a().createElement(S.mh4,null,a().createElement(S.n9L,{className:I.tile},a().createElement("div",{className:c?I.tabletHeading:I.desktopHeading},a().createElement("h4",null,o)),a().createElement("p",{className:I.errorMessage},s("error","Error")," ","".concat(null==r||null===(e=r.response)||void 0===e?void 0:e.status,": "),null==r||null===(n=r.response)||void 0===n?void 0:n.statusText),a().createElement("p",{className:I.errorCopy},s("errorCopy","Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above."))))},T=function(t){var e=t.title,n=t.slotName,o=t.basePath,s=t.isExpanded;return(0,r.useEffect)((function(){L(n)}),[n]),a().createElement(S.UQy,null,a().createElement(S.Qdk,{open:null==s||s,title:e,style:{border:"none"}},a().createElement(i.ExtensionSlot,{extensionSlotName:null!=n?n:e,state:{basePath:o}})))},H=function(t){var e=t.title,n=t.slotName,r=t.isExpanded;return function(t){var i=t.basePath;return a().createElement(T,{title:e,slotName:n,basePath:i,isExpanded:r})}};function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var D=(0,i.createGlobalStore)("nav-groups",{navGroups:[]});function L(t){var e,n=D.getState();D.setState({navGroups:[t].concat((e=n.navGroups,function(t){if(Array.isArray(t))return W(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return W(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))})}var M=(0,i.createUseStore)(D);var Z=n(7942),U={};U.styleTagTransform=g(),U.setAttributes=m(),U.insert=p().bind(null,"head"),U.domAPI=l(),U.insertStyleElement=_(),s()(Z.Z,U);const N=Z.Z&&Z.Z.locals?Z.Z.locals:void 0;var V=function(t){var e,n=t.title,o=t.basePath,s=null!==(e=window.location)&&void 0!==e?e:{pathname:""},c=n===(0,r.useMemo)((function(){return decodeURIComponent((t=s.pathname.split("/"),(e=null==t?0:t.length)?t[e-1]:void 0));var t,e}),[s.pathname])?"active-left-nav-link":"non-active";return a().createElement("div",{key:n,className:c},a().createElement(i.ConfigurableLink,{to:"".concat(o,"/").concat(encodeURIComponent(n)),className:"cds--side-nav__link "+N.link},n))},F=function(t){return function(e){var n=e.basePath;return a().createElement(V,{title:t.title,basePath:n})}};function B(){var t=(0,i.showModal)("start-visit-dialog",{closeModal:function(){return t()}})}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t,e,n,a){var i=(0,z.useTranslation)().t,o=(0,r.useMemo)((function(){var n,r=Math.ceil(e/t);return(n=Array(r).keys(),function(t){if(Array.isArray(t))return G(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){return(e+1)*t}))}),[t,e]),s=(0,r.useMemo)((function(){return t>e?"".concat(e," / ").concat(e):t*n>e?"".concat(t*(n-1)+a," / ").concat(e):"".concat(t*n," / ").concat(e)}),[t,e,n,a]);return{pageSizes:o,itemsDisplayed:"".concat(s," ").concat(i("items"," items"))}}var q=n(8952),$={};$.styleTagTransform=g(),$.setAttributes=m(),$.insert=p().bind(null,"head"),$.domAPI=l(),$.insertStyleElement=_(),s()(q.Z,$);const Q=q.Z&&q.Z.locals?q.Z.locals:void 0;var X=function(t){var e=t.totalItems,n=t.pageSize,r=t.onPageNumberChange,o=t.pageNumber,s=t.dashboardLinkUrl,c=t.currentItems,l=t.dashboardLinkLabel,u=(0,z.useTranslation)().t,p=R(n,e,o,c),d=p.itemsDisplayed,m=p.pageSizes,f="tablet"===(0,i.useLayoutType)();return a().createElement(a().Fragment,null,e>0&&a().createElement("div",{className:f?Q.tablet:Q.desktop},a().createElement("div",null,d,s&&a().createElement(i.ConfigurableLink,{to:s,className:Q.configurableLink},null!=l?l:u("seeAll","See all"))),a().createElement(S.tlE,{className:Q.pagination,page:o,pageSize:n,pageSizes:m,totalItems:e,onChange:r,size:f?"lg":"sm"})))};function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var K,Y,tt=function(t,e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return J(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.split(":"),2),r=n[0],a=n[1];return"12"===r&&"AM"===e&&(r="00"),"PM"===e&&(r="12"===r?r:parseInt(r,10)+12),[r,a]},et=n(9857),nt=function(){return nt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},nt.apply(this,arguments)},rt=function(t){return"function"==typeof t[1]?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},at=(K=et.ZP,Y=function(t){return function(e,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,t(e,n,r)}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rt(t),r=n[0],a=n[1],i=n[2],o=(i.use||[]).concat(Y);return K(r,a,nt(nt({},i),{use:o}))});function it(){var t,e,n="/ws/rest/v1/concept/?q=VITALS SIGNS&v=".concat("custom:(setMembers:(uuid,display,hiNormal,hiAbsolute,hiCritical,lowNormal,lowAbsolute,lowCritical,units))"),r=at(n,i.openmrsFetch),a=r.data,o=r.error,s=null===(e=null==a||null===(t=a.data)||void 0===t?void 0:t.results[0])||void 0===e?void 0:e.setMembers;return{data:(null==s?void 0:s.length)?new Map(s.map((function(t){return[t.uuid,t.units]}))):new Map([]),isError:o,isLoading:!a&&!o,conceptMetadata:s}}var ot=function(t,e){return"".concat(t," ").concat(e?"(".concat(e,")"):"")},st=new(n(2444).BehaviorSubject)(null),ct=n(6081);function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){ut(t,e,n[e])}))}return t}function dt(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}function mt(t){return function(t){if(Array.isArray(t))return lt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return lt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lt(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ft={};function _t(t){var e,n;ft[t.name]=dt(pt({},t),{preferredWindowSize:null!==(e=t.preferredWindowSize)&&void 0!==e?e:"normal",type:null!==(n=t.type)&&void 0!==n?n:"form"})}function ht(t){var e,n=null==t||null===(e=t.meta)||void 0===e?void 0:e.title;return"string"==typeof n?n:n&&"object"==typeof n?(0,i.translateFrom)(t.moduleName,n.key,n.default):t.name}function gt(t,e){var n=Ot(),r=n.getState(),a=function(t){if(ft[t])return ft[t];var e,n,r,a,i=(0,ct.getExtensionRegistration)(t);if(i)return{name:i.name,title:ht(i),preferredWindowSize:null!==(r=null===(e=i.meta)||void 0===e?void 0:e.screenSize)&&void 0!==r?r:"normal",load:i.load,type:null!==(a=null===(n=i.meta)||void 0===n?void 0:n.type)&&void 0!==a?a:"form"};throw new Error("No workspace named '".concat(t,"' has been registered."))}(t),o=dt(pt({},a),{closeWorkspace:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return zt(t,e)},promptBeforeClosing:function(e){return bt(t,e)},additionalProps:e}),s=r.openWorkspaces.filter((function(t){return t.type==o.type}));if(0==s.length)n.setState(dt(pt({},r),{openWorkspaces:[o].concat(mt(r.openWorkspaces))}));else{var c=r.openWorkspaces.findIndex((function(e){return e.name==t})),l=wt(s[0].name);if(c>=0){var u=mt(r.openWorkspaces);u.splice(c,1),r.openWorkspaces[c].additionalProps=o.additionalProps;var p=[r.openWorkspaces[c]].concat(mt(u));n.setState(dt(pt({},r),{openWorkspaces:p}))}else if(!l||l()){var d,m=null!==(d=s[0].title)&&void 0!==d?d:s[0].name,f={title:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","activeFormWarning","There is an active form open in the workspace"),body:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","workspaceModalText","Launching a new form in the workspace could cause you to lose unsaved work on the ".concat(m," form."),{formName:m}),onConfirm:function(){var t=n.getState();n.setState({openWorkspaces:[o].concat(mt(t.openWorkspaces.filter((function(t){return t.type!=o.type})))),prompt:null})},confirmText:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","openAnyway","Open anyway")};n.setState(dt(pt({},r),{prompt:f}))}else{var _=n.getState();n.setState(dt(pt({},_),{openWorkspaces:[o].concat(mt(_.openWorkspaces.filter((function(t){return t.type!=o.type}))))}))}}}function vt(t){var e=t.patientUuid,n=t.workspaceName,r=t.dashboardName,a=t.additionalProps;Et(e),gt(n,a),(0,i.navigate)({to:"${openmrsSpaBase}/patient/"+"".concat(e,"/chart")+(r?"/".concat(r):"")})}var yt={};function bt(t,e){yt[t]=e}function wt(t){return yt[t]}function St(){var t=Ot(),e=t.getState();t.setState(dt(pt({},e),{prompt:null}))}function zt(t,e){var n=Ot(),r=wt(t);if(!e&&r&&r()){var a={title:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","unsavedChangesTitleText","Unsaved Changes"),body:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","unsavedChangeText","You have unsaved changes in the side panel. Do you want to discard these changes?"),onConfirm:function(){var e=n.getState();n.setState(dt(pt({},e),{prompt:null,openWorkspaces:e.openWorkspaces.filter((function(e){return e.name!=t}))}))},confirmText:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","discard","Discard")};n.setState(dt(pt({},n.getState()),{prompt:a}))}else{var o=n.getState();n.setState(dt(pt({},o),{openWorkspaces:o.openWorkspaces.filter((function(e){return e.name!=t}))}))}}function kt(){var t=Ot(),e=t.getState();t.setState(dt(pt({},e),{openWorkspaces:[]}))}function Et(t){var e=Ot();e.getState().patientUuid!=t&&e.setState({patientUuid:t,openWorkspaces:[],prompt:null})}var At={patientUuid:null,openWorkspaces:[],prompt:null};function Ot(){return(0,i.getGlobalStore)("workspace",At)}function Pt(){Ot().setState(At)}var xt=n(6217);function Ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function It(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ct(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(){var t=It((0,r.useState)([]),2),e=t[0],n=t[1],a=It((0,r.useState)(null),2),i=a[0],o=a[1];(0,r.useEffect)((function(){var t=function(t){n(t.openWorkspaces),o(t.prompt)};t((0,xt.getWorkspaceStore)().getState()),(0,xt.getWorkspaceStore)().subscribe(t)}),[]);var s=(0,r.useMemo)((function(){return 0===e.length?"hidden":e[0].preferredWindowSize}),[e]);return{active:e.length>0,windowState:s,workspaces:e,prompt:i}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ht(t,e){switch(e){case"minimized":case"reopened":return{size:"normal"};default:return{size:e}}}var Wt=(0,r.createContext)({windowSize:{size:"normal"},active:!1}),Dt=function(){return(0,r.useContext)(Wt)},Lt=function(t){var e=t.children,n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a().useReducer(Ht,{size:"normal"}),2),i=n[0],o=n[1],s=jt(),c=s.workspaces,l=s.windowState,u=s.active;(0,r.useEffect)((function(){c.length>0&&"maximized"===l?o("maximized"):o("reopened")}),[c.length,l]);var p=(0,r.useCallback)((function(t){o(t)}),[]),d=(0,r.useMemo)((function(){return{windowSize:i,updateWindowSize:p,active:u}}),[i,p,u]);return a().createElement(Wt.Provider,{value:d},e)},Mt=n(617),Zt=n(6806),Ut=n(1610);const Nt=function(t,e){return!(null==t||!t.length)&&(0,Ut.Z)(t,e,0)>-1},Vt=function(t,e,n){for(var r=-1,a=null==t?0:t.length;++r<a;)if(n(e,t[r]))return!0;return!1};var Ft=n(1749),Bt=n(7459);var Gt=n(3249);const Rt=Bt.Z&&1/(0,Gt.Z)(new Bt.Z([,-0]))[1]==1/0?function(t){return new Bt.Z(t)}:function(){},qt=function(t,e){return t&&t.length?function(t,e,n){var r=-1,a=Nt,i=t.length,o=!0,s=[],c=s;if(n)o=!1,a=Vt;else if(i>=200){var l=e?null:Rt(t);if(l)return(0,Gt.Z)(l);o=!1,a=Ft.Z,c=new Zt.Z}else c=e?[]:s;t:for(;++r<i;){var u=t[r],p=e?e(u):u;if(u=n||0!==u?u:0,o&&p==p){for(var d=c.length;d--;)if(c[d]===p)continue t;e&&c.push(p),s.push(u)}else a(c,p,n)||(c!==s&&c.push(p),s.push(u))}return s}(t,(0,Mt.Z)(e,2)):[]};var $t,Qt=function(t){var e,n=(0,et.ZP)("/ws/rest/v1/programenrollment?patient=".concat(t,"&v=").concat("custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display))"),i.openmrsFetch),a=n.data,o=n.error,s=(0,r.useMemo)((function(){return null!==(e=null==a?void 0:a.data.results.sort((function(t,e){return e.dateEnrolled>t.dateEnrolled?1:-1})).filter((function(t){return null===t.dateCompleted})))&&void 0!==e?e:[]}),[null==a?void 0:a.data.results]);return{activePatientEnrollment:qt(s,(function(t){var e;return null==t||null===(e=t.program)||void 0===e?void 0:e.uuid})),error:o,isLoading:!a&&!o}},Xt=n(5047),Jt=n.n(Xt),Kt=new Uint8Array(16);function Yt(){if(!$t&&!($t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $t(Kt)}const te=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ee=function(t){return"string"==typeof t&&te.test(t)};for(var ne=[],re=0;re<256;++re)ne.push((re+256).toString(16).substr(1));const ae=function(t,e,n){var r=(t=t||{}).random||(t.rng||Yt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=r[a];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ne[t[e+0]]+ne[t[e+1]]+ne[t[e+2]]+ne[t[e+3]]+"-"+ne[t[e+4]]+ne[t[e+5]]+"-"+ne[t[e+6]]+ne[t[e+7]]+"-"+ne[t[e+8]]+ne[t[e+9]]+"-"+ne[t[e+10]]+ne[t[e+11]]+ne[t[e+12]]+ne[t[e+13]]+ne[t[e+14]]+ne[t[e+15]]).toLowerCase();if(!ee(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oe(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}function se(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){oe(i,r,a,o,s,"next",t)}function s(t){oe(i,r,a,o,s,"throw",t)}o(void 0)}))}}function ce(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var le="patient-registration";function ue(t){var e=(0,i.useConnectivity)(),n=(0,i.usePatient)(t),a=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)({patient:void 0,error:void 0}),2),o=a[0],s=a[1];return(0,r.useEffect)((function(){e?s({error:void 0,patient:void 0}):function(t){return pe.apply(this,arguments)}(t).then((function(t){s({error:void 0,patient:t})})).catch((function(t){var e,n;e=t,(null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n)?s({error:t,patient:void 0}):s({error:new Error(JSON.stringify(t)),patient:void 0})}))}),[t,e]),(0,r.useMemo)((function(){if(e){if(n.patient&&n.patient.hasOwnProperty("issue")){var t=n.patient;return r=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){ce(t,e,n[e])}))}return t}({},n),a=null!=(a={patient:void 0,error:new Error(JSON.stringify(t.issue))})?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}(Object(a)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(a,t))})),r}return n}var r,a,i;return{isLoading:!(o.patient||o.error),patient:o.patient,patientUuid:null===(i=o.patient)||void 0===i?void 0:i.id,error:o.error}}),[e,n,o.patient,o.error])}function pe(){return(pe=se(Jt().mark((function t(e){var n,r;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(le);case 2:return n=t.sent,r=n.find((function(t){var n;return(null===(n=t.fhirPatient)||void 0===n?void 0:n.id)===e})),t.abrupt("return",r.fhirPatient);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function me(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}function fe(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){me(i,r,a,o,s,"next",t)}function s(t){me(i,r,a,o,s,"throw",t)}o(void 0)}))}}function _e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return de(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var he="visit";function ge(t){var e=(0,i.useConnectivity)(),n=_e((0,r.useState)(),2),a=n[0],o=n[1];return(0,r.useEffect)((function(){o((e?i.useVisit:ve)(t))}),[e,t]),a}function ve(t){var e=_e((0,r.useState)({data:null,error:null,isLoading:!0}),2),n=e[0],a=e[1];return(0,r.useEffect)((function(){be(t).then((function(t){a({error:null,data:t?ke(t):null,isLoading:!1})})).catch((function(t){a({error:t,data:null,isLoading:!1})}))}),[t]),{currentVisit:n.data,isLoading:n.isLoading,isValidating:!1,error:n.error,mutate:function(){}}}function ye(t,e){var n,a,o=(0,i.useConnectivity)(),s=null===(n=(0,i.useSession)())||void 0===n||null===(a=n.sessionLocation)||void 0===a?void 0:a.uuid,c=ve(t),l=c.currentVisit,u=c.isValidating,p=c.error,d=c.mutate;(0,r.useEffect)((function(){o||u||l||p||Se(t,s,e).finally((function(){return d()}))}),[o,l,u,p,d,s,e,t])}function be(t){return we.apply(this,arguments)}function we(){return(we=fe(Jt().mark((function t(e){var n;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(he);case 2:return n=t.sent,t.abrupt("return",n.find((function(t){return t.patient===e})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Se(t,e,n){return ze.apply(this,arguments)}function ze(){return(ze=fe(Jt().mark((function t(e,n,r){var a,o,s,c;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(le);case 2:return a=t.sent,o=a.some((function(t){return t.fhirPatient.id===e})),s={uuid:ae(),patient:e,startDatetime:new Date,location:n,visitType:r},c={id:s.uuid,displayName:"Offline visit",patientUuid:e,dependencies:o?[{type:le,id:e}]:[]},t.next=8,(0,i.queueSynchronizationItem)(he,s,c);case 8:return t.abrupt("return",s);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ke(t){var e,n;return{uuid:t.uuid,startDatetime:null===(e=t.startDatetime)||void 0===e?void 0:e.toString(),stopDatetime:null===(n=t.stopDatetime)||void 0===n?void 0:n.toString(),encounters:[],visitType:{uuid:t.visitType,display:"Offline"},patient:{uuid:t.patient}}}}}]);
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[927],{7904:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I,.-esm-patient-immunizations__card-header__tabletHeader___efA_M{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I h4:after,.-esm-patient-immunizations__card-header__tabletHeader___efA_M h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I{height:3rem}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__card-header__tabletHeader___efA_M{height:4.5rem}.-esm-patient-immunizations__card-header__tabletHeader___efA_M h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}',""]),o.locals={desktopHeader:"-esm-patient-immunizations__card-header__desktopHeader___BUQ5I",tabletHeader:"-esm-patient-immunizations__card-header__tabletHeader___efA_M"};const s=o},7942:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.active-left-nav-link .-esm-patient-immunizations__dashboardextension__link___lom8t:nth-child(1){color:#161616;padding:1.2rem 0 1.2rem 1.2rem}",""]),o.locals={link:"-esm-patient-immunizations__dashboardextension__link___lom8t"};const s=o},7431:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__empty-state__action___xInzb{margin-bottom:.5rem}.-esm-patient-immunizations__empty-state__content___lACIK{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.5rem}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID,.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID h4:after,.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__empty-state__heading___gW4Bc:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__empty-state__tile___DvfL3{text-align:center;border:1px solid #e0e0e0}',""]),o.locals={action:"-esm-patient-immunizations__empty-state__action___xInzb",content:"-esm-patient-immunizations__empty-state__content___lACIK",desktopHeading:"-esm-patient-immunizations__empty-state__desktopHeading___UIGID",tabletHeading:"-esm-patient-immunizations__empty-state__tabletHeading___lVXqD",heading:"-esm-patient-immunizations__empty-state__heading___gW4Bc",tile:"-esm-patient-immunizations__empty-state__tile___DvfL3"};const s=o},418:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__error-state__errorMessage___kDICS{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-top:2.25rem;margin-bottom:.5rem}.-esm-patient-immunizations__error-state__errorCopy___UX21v{margin-bottom:.5rem;font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__error-state__tabletHeading___EAqy2 h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx,.-esm-patient-immunizations__error-state__tabletHeading___EAqy2{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx h4:after,.-esm-patient-immunizations__error-state__tabletHeading___EAqy2 h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__error-state__tile___LTdVO{text-align:center;border:1px solid #e0e0e0}',""]),o.locals={errorMessage:"-esm-patient-immunizations__error-state__errorMessage___kDICS",errorCopy:"-esm-patient-immunizations__error-state__errorCopy___UX21v",desktopHeading:"-esm-patient-immunizations__error-state__desktopHeading___Bhvtx",tabletHeading:"-esm-patient-immunizations__error-state__tabletHeading___EAqy2",tile:"-esm-patient-immunizations__error-state__tile___LTdVO"};const s=o},8952:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__pagination__bodyShort01____zD39,.-esm-patient-immunizations__pagination__configurableLink___JhehZ{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-patient-immunizations__pagination__desktop___TGt17,.-esm-patient-immunizations__pagination__tablet___BEzP7{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);display:flex;border-top:1px solid #e0e0e0;justify-content:space-between;color:#525252;background-color:#fff;padding-left:1rem;align-items:center}.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination{min-height:0rem;height:2rem;width:auto;border:none}.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--select-input,.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--btn,.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--pagination__right{min-height:0rem;height:2rem}.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination{min-height:0rem;height:3rem;width:auto;border:none}.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--select-input,.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--btn,.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--pagination__right{min-height:0rem;height:3rem}.-esm-patient-immunizations__pagination__configurableLink___JhehZ{text-decoration:none;padding:0 .5rem}.-esm-patient-immunizations__pagination__pagination___B09B8{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;display:flex}div.-esm-patient-immunizations__pagination__pagination___B09B8>.cds--pagination__left{display:none}",""]),o.locals={bodyShort01:"-esm-patient-immunizations__pagination__bodyShort01____zD39",configurableLink:"-esm-patient-immunizations__pagination__configurableLink___JhehZ",desktop:"-esm-patient-immunizations__pagination__desktop___TGt17",tablet:"-esm-patient-immunizations__pagination__tablet___BEzP7",pagination:"-esm-patient-immunizations__pagination__pagination___B09B8"};const s=o},1927:(t,e,n)=>{n.r(e),n.d(e,{CardHeader:()=>w,DashboardExtension:()=>V,DashboardGroupExtension:()=>T,EmptyDataIllustration:()=>k,EmptyState:()=>P,ErrorState:()=>j,PatientChartPagination:()=>X,WorkspaceWindowSizeProvider:()=>Lt,cancelPrompt:()=>St,changeWorkspaceContext:()=>Et,closeAllWorkspaces:()=>kt,closeWorkspace:()=>zt,convertTime12to24:()=>tt,createDashboardGroup:()=>H,createDashboardLink:()=>F,createOfflineVisitForPatient:()=>Se,formEntrySub:()=>st,getOfflineVisitForPatient:()=>be,getPromptBeforeClosingFcn:()=>wt,getWorkspaceStore:()=>Ot,launchPatientChartWithWorkspaceOpen:()=>vt,launchPatientWorkspace:()=>gt,launchStartVisitPrompt:()=>B,patientRegistrationSyncType:()=>ce,promptBeforeClosing:()=>bt,registerNavGroup:()=>L,registerWorkspace:()=>_t,resetWorkspaceStore:()=>Pt,useActivePatientEnrollment:()=>Qt,useAutoCreatedOfflineVisit:()=>ye,useNavGroups:()=>M,useOfflineVisit:()=>ve,usePaginationInfo:()=>R,usePatientOrOfflineRegisteredPatient:()=>ue,useVisitOrOfflineVisit:()=>ge,useVitalsConceptMetadata:()=>it,useWorkspaceWindowSize:()=>Dt,useWorkspaces:()=>jt,visitSyncType:()=>he,withUnit:()=>ot});var r=n(5529),a=n.n(r),i=n(906),o=n(6062),s=n.n(o),l=n(4036),c=n.n(l),u=n(6793),p=n.n(u),d=n(7892),m=n.n(d),f=n(1173),_=n.n(f),h=n(2464),g=n.n(h),v=n(7904),y={};y.styleTagTransform=g(),y.setAttributes=m(),y.insert=p().bind(null,"head"),y.domAPI=c(),y.insertStyleElement=_(),s()(v.Z,y);const b=v.Z&&v.Z.locals?v.Z.locals:void 0;function w(t){var e=t.title,n=t.children,r="tablet"===(0,i.useLayoutType)();return a().createElement("div",{className:r?b.tabletHeader:b.desktopHeader},a().createElement("h4",null,e),n)}var S=n(9694),z=n(4924),k=function(t){var e=t.width,n=void 0===e?"64":e,r=t.height,i=void 0===r?"64":r;return a().createElement("svg",{width:n,height:i,viewBox:"0 0 64 64"},a().createElement("title",null,"Empty data illustration"),a().createElement("g",{fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),a().createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),a().createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),a().createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))},E=n(7431),A={};A.styleTagTransform=g(),A.setAttributes=m(),A.insert=p().bind(null,"head"),A.domAPI=c(),A.insertStyleElement=_(),s()(E.Z,A);const O=E.Z&&E.Z.locals?E.Z.locals:void 0;var P=function(t){var e=(0,z.useTranslation)().t,n="tablet"===(0,i.useLayoutType)();return a().createElement(S.mh4,null,a().createElement(S.n9L,{className:O.tile},a().createElement("div",{className:n?O.tabletHeading:O.desktopHeading},a().createElement("h4",null,t.headerTitle)),a().createElement(k,null),a().createElement("p",{className:O.content},a().createElement(z.Trans,{i18nKey:"emptyStateText",values:{displayText:t.displayText.toLowerCase()}},"There are no ",t.displayText.toLowerCase()," to display for this patient")),a().createElement("p",{className:O.action},t.launchForm&&a().createElement("span",null,a().createElement(S.rUS,{onClick:function(){return t.launchForm()}},a().createElement(a().Fragment,null,e("record","Record")," ",t.displayText.toLowerCase()))))))},x=n(418),C={};C.styleTagTransform=g(),C.setAttributes=m(),C.insert=p().bind(null,"head"),C.domAPI=c(),C.insertStyleElement=_(),s()(x.Z,C);const I=x.Z&&x.Z.locals?x.Z.locals:void 0;var j=function(t){var e,n,r=t.error,o=t.headerTitle,s=(0,z.useTranslation)().t,l="tablet"===(0,i.useLayoutType)();return a().createElement(S.mh4,null,a().createElement(S.n9L,{className:I.tile},a().createElement("div",{className:l?I.tabletHeading:I.desktopHeading},a().createElement("h4",null,o)),a().createElement("p",{className:I.errorMessage},s("error","Error")," ","".concat(null==r||null===(e=r.response)||void 0===e?void 0:e.status,": "),null==r||null===(n=r.response)||void 0===n?void 0:n.statusText),a().createElement("p",{className:I.errorCopy},s("errorCopy","Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above."))))},T=function(t){var e=t.title,n=t.slotName,o=t.basePath,s=t.isExpanded;return(0,r.useEffect)((function(){L(n)}),[n]),a().createElement(S.UQy,null,a().createElement(S.Qdk,{open:null==s||s,title:e,style:{border:"none"}},a().createElement(i.ExtensionSlot,{extensionSlotName:null!=n?n:e,state:{basePath:o}})))},H=function(t){var e=t.title,n=t.slotName,r=t.isExpanded;return function(t){var i=t.basePath;return a().createElement(T,{title:e,slotName:n,basePath:i,isExpanded:r})}};function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var D=(0,i.createGlobalStore)("nav-groups",{navGroups:[]});function L(t){var e,n=D.getState();D.setState({navGroups:[t].concat((e=n.navGroups,function(t){if(Array.isArray(t))return W(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return W(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))})}var M=(0,i.createUseStore)(D);var Z=n(7942),U={};U.styleTagTransform=g(),U.setAttributes=m(),U.insert=p().bind(null,"head"),U.domAPI=c(),U.insertStyleElement=_(),s()(Z.Z,U);const N=Z.Z&&Z.Z.locals?Z.Z.locals:void 0;var V=function(t){var e,n=t.title,o=t.basePath,s=null!==(e=window.location)&&void 0!==e?e:{pathname:""},l=n===(0,r.useMemo)((function(){return decodeURIComponent((t=s.pathname.split("/"),(e=null==t?0:t.length)?t[e-1]:void 0));var t,e}),[s.pathname])?"active-left-nav-link":"non-active";return a().createElement("div",{key:n,className:l},a().createElement(i.ConfigurableLink,{to:"".concat(o,"/").concat(encodeURIComponent(n)),className:"cds--side-nav__link "+N.link},n))},F=function(t){return function(e){var n=e.basePath;return a().createElement(V,{title:t.title,basePath:n})}};function B(){var t=(0,i.showModal)("start-visit-dialog",{closeModal:function(){return t()}})}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t,e,n,a){var i=(0,z.useTranslation)().t,o=(0,r.useMemo)((function(){var n,r=Math.ceil(e/t);return(n=Array(r).keys(),function(t){if(Array.isArray(t))return G(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){return(e+1)*t}))}),[t,e]),s=(0,r.useMemo)((function(){return t>e?"".concat(e," / ").concat(e):t*n>e?"".concat(t*(n-1)+a," / ").concat(e):"".concat(t*n," / ").concat(e)}),[t,e,n,a]);return{pageSizes:o,itemsDisplayed:"".concat(s," ").concat(i("items"," items"))}}var q=n(8952),$={};$.styleTagTransform=g(),$.setAttributes=m(),$.insert=p().bind(null,"head"),$.domAPI=c(),$.insertStyleElement=_(),s()(q.Z,$);const Q=q.Z&&q.Z.locals?q.Z.locals:void 0;var X=function(t){var e=t.totalItems,n=t.pageSize,r=t.onPageNumberChange,o=t.pageNumber,s=t.dashboardLinkUrl,l=t.currentItems,c=t.dashboardLinkLabel,u=(0,z.useTranslation)().t,p=R(n,e,o,l),d=p.itemsDisplayed,m=p.pageSizes,f="tablet"===(0,i.useLayoutType)();return a().createElement(a().Fragment,null,e>0&&a().createElement("div",{className:f?Q.tablet:Q.desktop},a().createElement("div",null,d,s&&a().createElement(i.ConfigurableLink,{to:s,className:Q.configurableLink},null!=c?c:u("seeAll","See all"))),a().createElement(S.tlE,{className:Q.pagination,page:o,pageSize:n,pageSizes:m,totalItems:e,onChange:r,size:f?"lg":"sm"})))};function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var K,Y,tt=function(t,e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return J(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.split(":"),2),r=n[0],a=n[1];return"12"===r&&"AM"===e&&(r="00"),"PM"===e&&(r="12"===r?r:parseInt(r,10)+12),[r,a]},et=n(9857),nt=function(){return nt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},nt.apply(this,arguments)},rt=function(t){return"function"==typeof t[1]?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},at=(K=et.ZP,Y=function(t){return function(e,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,t(e,n,r)}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rt(t),r=n[0],a=n[1],i=n[2],o=(i.use||[]).concat(Y);return K(r,a,nt(nt({},i),{use:o}))});function it(){var t,e,n="/ws/rest/v1/concept/?q=VITALS SIGNS&v=".concat("custom:(setMembers:(uuid,display,hiNormal,hiAbsolute,hiCritical,lowNormal,lowAbsolute,lowCritical,units))"),r=at(n,i.openmrsFetch),a=r.data,o=r.error,s=null===(e=null==a||null===(t=a.data)||void 0===t?void 0:t.results[0])||void 0===e?void 0:e.setMembers;return{data:(null==s?void 0:s.length)?new Map(s.map((function(t){return[t.uuid,t.units]}))):new Map([]),isError:o,isLoading:!a&&!o,conceptMetadata:s}}var ot=function(t,e){return"".concat(t," ").concat(e?"(".concat(e,")"):"")},st=new(n(2444).BehaviorSubject)(null),lt=n(6081);function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){ut(t,e,n[e])}))}return t}function dt(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}function mt(t){return function(t){if(Array.isArray(t))return ct(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ct(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ft={};function _t(t){var e,n;ft[t.name]=dt(pt({},t),{preferredWindowSize:null!==(e=t.preferredWindowSize)&&void 0!==e?e:"normal",type:null!==(n=t.type)&&void 0!==n?n:"form"})}function ht(t){var e,n=null==t||null===(e=t.meta)||void 0===e?void 0:e.title;return"string"==typeof n?n:n&&"object"==typeof n?(0,i.translateFrom)(t.moduleName,n.key,n.default):t.name}function gt(t,e){var n=Ot(),r=n.getState(),a=function(t){if(ft[t])return ft[t];var e,n,r,a,i=(0,lt.getExtensionRegistration)(t);if(i)return{name:i.name,title:ht(i),preferredWindowSize:null!==(r=null===(e=i.meta)||void 0===e?void 0:e.screenSize)&&void 0!==r?r:"normal",load:i.load,type:null!==(a=null===(n=i.meta)||void 0===n?void 0:n.type)&&void 0!==a?a:"form"};throw new Error("No workspace named '".concat(t,"' has been registered."))}(t),o=dt(pt({},a),{closeWorkspace:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return zt(t,e)},promptBeforeClosing:function(e){return bt(t,e)},additionalProps:e}),s=r.openWorkspaces.filter((function(t){return t.type==o.type}));if(0==s.length)n.setState(dt(pt({},r),{openWorkspaces:[o].concat(mt(r.openWorkspaces))}));else{var l=r.openWorkspaces.findIndex((function(e){return e.name==t})),c=wt(s[0].name);if(l>=0){var u=mt(r.openWorkspaces);u.splice(l,1),r.openWorkspaces[l].additionalProps=o.additionalProps;var p=[r.openWorkspaces[l]].concat(mt(u));n.setState(dt(pt({},r),{openWorkspaces:p}))}else if(!c||c()){var d,m=null!==(d=s[0].title)&&void 0!==d?d:s[0].name,f={title:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","activeFormWarning","There is an active form open in the workspace"),body:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","workspaceModalText","Launching a new form in the workspace could cause you to lose unsaved work on the ".concat(m," form."),{formName:m}),onConfirm:function(){var t=n.getState();n.setState({openWorkspaces:[o].concat(mt(t.openWorkspaces.filter((function(t){return t.type!=o.type})))),prompt:null})},confirmText:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","openAnyway","Open anyway")};n.setState(dt(pt({},r),{prompt:f}))}else{var _=n.getState();n.setState(dt(pt({},_),{openWorkspaces:[o].concat(mt(_.openWorkspaces.filter((function(t){return t.type!=o.type}))))}))}}}function vt(t){var e=t.patientUuid,n=t.workspaceName,r=t.dashboardName,a=t.additionalProps;Et(e),gt(n,a),(0,i.navigate)({to:"${openmrsSpaBase}/patient/"+"".concat(e,"/chart")+(r?"/".concat(r):"")})}var yt={};function bt(t,e){yt[t]=e}function wt(t){return yt[t]}function St(){var t=Ot(),e=t.getState();t.setState(dt(pt({},e),{prompt:null}))}function zt(t,e){var n=Ot(),r=wt(t);if(!e&&r&&r()){var a={title:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","unsavedChangesTitleText","Unsaved Changes"),body:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","unsavedChangeText","You have unsaved changes in the side panel. Do you want to discard these changes?"),onConfirm:function(){var e=n.getState();n.setState(dt(pt({},e),{prompt:null,openWorkspaces:e.openWorkspaces.filter((function(e){return e.name!=t}))}))},confirmText:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","discard","Discard")};n.setState(dt(pt({},n.getState()),{prompt:a}))}else{var o=n.getState();n.setState(dt(pt({},o),{openWorkspaces:o.openWorkspaces.filter((function(e){return e.name!=t}))}))}}function kt(){var t=Ot(),e=t.getState();t.setState(dt(pt({},e),{openWorkspaces:[]}))}function Et(t){var e=Ot();e.getState().patientUuid!=t&&e.setState({patientUuid:t,openWorkspaces:[],prompt:null})}var At={patientUuid:null,openWorkspaces:[],prompt:null};function Ot(){return(0,i.getGlobalStore)("workspace",At)}function Pt(){Ot().setState(At)}var xt=n(6217);function Ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function It(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ct(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(){var t=It((0,r.useState)([]),2),e=t[0],n=t[1],a=It((0,r.useState)(null),2),i=a[0],o=a[1];(0,r.useEffect)((function(){var t=function(t){n(t.openWorkspaces),o(t.prompt)};t((0,xt.getWorkspaceStore)().getState()),(0,xt.getWorkspaceStore)().subscribe(t)}),[]);var s=(0,r.useMemo)((function(){return 0===e.length?"hidden":e[0].preferredWindowSize}),[e]);return{active:e.length>0,windowState:s,workspaces:e,prompt:i}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ht(t,e){switch(e){case"minimized":case"reopened":return{size:"normal"};default:return{size:e}}}var Wt=(0,r.createContext)({windowSize:{size:"normal"},active:!1}),Dt=function(){return(0,r.useContext)(Wt)},Lt=function(t){var e=t.children,n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a().useReducer(Ht,{size:"normal"}),2),i=n[0],o=n[1],s=jt(),l=s.workspaces,c=s.windowState,u=s.active;(0,r.useEffect)((function(){l.length>0&&"maximized"===c?o("maximized"):o("reopened")}),[l.length,c]);var p=(0,r.useCallback)((function(t){o(t)}),[]),d=(0,r.useMemo)((function(){return{windowSize:i,updateWindowSize:p,active:u}}),[i,p,u]);return a().createElement(Wt.Provider,{value:d},e)},Mt=n(617),Zt=n(6806),Ut=n(1610);const Nt=function(t,e){return!(null==t||!t.length)&&(0,Ut.Z)(t,e,0)>-1},Vt=function(t,e,n){for(var r=-1,a=null==t?0:t.length;++r<a;)if(n(e,t[r]))return!0;return!1};var Ft=n(1749),Bt=n(7459);var Gt=n(3249);const Rt=Bt.Z&&1/(0,Gt.Z)(new Bt.Z([,-0]))[1]==1/0?function(t){return new Bt.Z(t)}:function(){},qt=function(t,e){return t&&t.length?function(t,e,n){var r=-1,a=Nt,i=t.length,o=!0,s=[],l=s;if(n)o=!1,a=Vt;else if(i>=200){var c=e?null:Rt(t);if(c)return(0,Gt.Z)(c);o=!1,a=Ft.Z,l=new Zt.Z}else l=e?[]:s;t:for(;++r<i;){var u=t[r],p=e?e(u):u;if(u=n||0!==u?u:0,o&&p==p){for(var d=l.length;d--;)if(l[d]===p)continue t;e&&l.push(p),s.push(u)}else a(l,p,n)||(l!==s&&l.push(p),s.push(u))}return s}(t,(0,Mt.Z)(e,2)):[]};var $t,Qt=function(t){var e,n=(0,et.ZP)("/ws/rest/v1/programenrollment?patient=".concat(t,"&v=").concat("custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display))"),i.openmrsFetch),a=n.data,o=n.error,s=(0,r.useMemo)((function(){return null!==(e=null==a?void 0:a.data.results.sort((function(t,e){return e.dateEnrolled>t.dateEnrolled?1:-1})).filter((function(t){return null===t.dateCompleted})))&&void 0!==e?e:[]}),[null==a?void 0:a.data.results]);return{activePatientEnrollment:qt(s,(function(t){var e;return null==t||null===(e=t.program)||void 0===e?void 0:e.uuid})),error:o,isLoading:!a&&!o}},Xt=n(5047),Jt=n.n(Xt),Kt=new Uint8Array(16);function Yt(){if(!$t&&!($t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $t(Kt)}const te=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ee=function(t){return"string"==typeof t&&te.test(t)};for(var ne=[],re=0;re<256;++re)ne.push((re+256).toString(16).substr(1));const ae=function(t,e,n){var r=(t=t||{}).random||(t.rng||Yt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=r[a];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ne[t[e+0]]+ne[t[e+1]]+ne[t[e+2]]+ne[t[e+3]]+"-"+ne[t[e+4]]+ne[t[e+5]]+"-"+ne[t[e+6]]+ne[t[e+7]]+"-"+ne[t[e+8]]+ne[t[e+9]]+"-"+ne[t[e+10]]+ne[t[e+11]]+ne[t[e+12]]+ne[t[e+13]]+ne[t[e+14]]+ne[t[e+15]]).toLowerCase();if(!ee(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oe(t,e,n,r,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function se(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){oe(i,r,a,o,s,"next",t)}function s(t){oe(i,r,a,o,s,"throw",t)}o(void 0)}))}}function le(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ce="patient-registration";function ue(t){var e=(0,i.useConnectivity)(),n=(0,i.usePatient)(t),a=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)({patient:void 0,error:void 0}),2),o=a[0],s=a[1];return(0,r.useEffect)((function(){e?s({error:void 0,patient:void 0}):function(t){return pe.apply(this,arguments)}(t).then((function(t){s({error:void 0,patient:t})})).catch((function(t){var e,n;e=t,(null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n)?s({error:t,patient:void 0}):s({error:new Error(JSON.stringify(t)),patient:void 0})}))}),[t,e]),(0,r.useMemo)((function(){if(e){if(n.patient&&n.patient.hasOwnProperty("issue")){var t=n.patient;return r=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){le(t,e,n[e])}))}return t}({},n),a=null!=(a={patient:void 0,error:new Error(JSON.stringify(t.issue))})?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}(Object(a)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(a,t))})),r}return n}var r,a,i;return{isLoading:!(o.patient||o.error),patient:o.patient,patientUuid:null===(i=o.patient)||void 0===i?void 0:i.id,error:o.error}}),[e,n,o.patient,o.error])}function pe(){return(pe=se(Jt().mark((function t(e){var n,r;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(ce);case 2:return n=t.sent,r=n.find((function(t){var n;return(null===(n=t.fhirPatient)||void 0===n?void 0:n.id)===e})),t.abrupt("return",r.fhirPatient);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function me(t,e,n,r,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function fe(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){me(i,r,a,o,s,"next",t)}function s(t){me(i,r,a,o,s,"throw",t)}o(void 0)}))}}function _e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return de(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var he="visit";function ge(t){var e=(0,i.useConnectivity)(),n=_e((0,r.useState)(),2),a=(n[0],n[1],(0,i.useVisit)(t)),o=ve(t);return e?a:o}function ve(t){var e=_e((0,r.useState)({data:null,error:null,isLoading:!0}),2),n=e[0],a=e[1];return(0,r.useEffect)((function(){be(t).then((function(t){a({error:null,data:t?ke(t):null,isLoading:!1})})).catch((function(t){a({error:t,data:null,isLoading:!1})}))}),[t]),{currentVisit:n.data,isLoading:n.isLoading,isValidating:!1,error:n.error,mutate:function(){}}}function ye(t,e){var n,a,o=(0,i.useConnectivity)(),s=null===(n=(0,i.useSession)())||void 0===n||null===(a=n.sessionLocation)||void 0===a?void 0:a.uuid,l=ve(t),c=l.currentVisit,u=l.isValidating,p=l.error,d=l.mutate;(0,r.useEffect)((function(){o||u||c||p||Se(t,s,e).finally((function(){return d()}))}),[o,c,u,p,d,s,e,t])}function be(t){return we.apply(this,arguments)}function we(){return(we=fe(Jt().mark((function t(e){var n;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(he);case 2:return n=t.sent,t.abrupt("return",n.find((function(t){return t.patient===e})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Se(t,e,n){return ze.apply(this,arguments)}function ze(){return(ze=fe(Jt().mark((function t(e,n,r){var a,o,s,l;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(ce);case 2:return a=t.sent,o=a.some((function(t){return t.fhirPatient.id===e})),s={uuid:ae(),patient:e,startDatetime:new Date,location:n,visitType:r},l={id:s.uuid,displayName:"Offline visit",patientUuid:e,dependencies:o?[{type:ce,id:e}]:[]},t.next=8,(0,i.queueSynchronizationItem)(he,s,l);case 8:return t.abrupt("return",s);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ke(t){var e,n;return{uuid:t.uuid,startDatetime:null===(e=t.startDatetime)||void 0===e?void 0:e.toString(),stopDatetime:null===(n=t.stopDatetime)||void 0===n?void 0:n.toString(),encounters:[],visitType:{uuid:t.visitType,display:"Offline"},patient:{uuid:t.patient}}}}}]);
@@ -394,9 +394,9 @@
394
394
  "entry": false,
395
395
  "recorded": false,
396
396
  "reason": "reused as split chunk (cache group: default)",
397
- "size": 88179,
397
+ "size": 88155,
398
398
  "sizes": {
399
- "javascript": 88137,
399
+ "javascript": 88113,
400
400
  "consume-shared": 42
401
401
  },
402
402
  "names": [],
@@ -409,7 +409,7 @@
409
409
  "927.js"
410
410
  ],
411
411
  "auxiliaryFiles": [],
412
- "hash": "2a708125972ee7cbb487",
412
+ "hash": "8784ace78d285a918a23",
413
413
  "childrenByOrder": {}
414
414
  },
415
415
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-immunizations-app",
3
- "version": "4.0.1-pre.278",
3
+ "version": "4.0.1-pre.294",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Patient immunizations microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-patient-immunizations-app.js",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@carbon/react": "^1.9.0",
37
- "@openmrs/esm-patient-common-lib": "^4.0.1-pre.278",
37
+ "@openmrs/esm-patient-common-lib": "^4.0.1-pre.294",
38
38
  "d3": "^7.0.3",
39
39
  "lodash-es": "^4.17.15"
40
40
  },
@@ -50,5 +50,5 @@
50
50
  "devDependencies": {
51
51
  "webpack": "^5.74.0"
52
52
  },
53
- "gitHead": "ed6af0e4590d1d10108829e3eb02dc0c6a7bc27f"
53
+ "gitHead": "d95df3a4728ae4afafa6957d3ad4b4be75445b7a"
54
54
  }