@ohif/app 3.12.0-beta.99 → 3.12.1

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.
Files changed (70) hide show
  1. package/dist/{1403.bundle.94a178e2572f1f0b2a2c.js → 1403.bundle.761239eb886a88301851.js} +37 -37
  2. package/dist/{1459.bundle.3785cdd0abf449adebf1.js → 1459.bundle.fcdd0dec6286845179bf.js} +5 -6
  3. package/dist/{147.bundle.205350dc3d21478277b1.js → 147.bundle.47af018b91121924a12c.js} +10 -18
  4. package/dist/{1608.bundle.f855c4bdb7f00eb66fca.js → 1608.bundle.b9abbf4ed6cc2e491dc3.js} +10 -10
  5. package/dist/{1730.bundle.37c569ae3ed057b69840.js → 1730.bundle.51e69967a025226592cd.js} +41 -40
  6. package/dist/{1927.bundle.019331c266d306772371.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
  7. package/dist/{1933.bundle.ab5e8036f6e1c854c965.js → 1933.bundle.e3ba7d4dcbbd75701d8e.js} +19 -17
  8. package/dist/{2018.bundle.469f9ad42597b6b29ff1.js → 2018.bundle.45c44470b4b098aa343f.js} +65 -66
  9. package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.aea8d3b39486dd5ab39e.js} +569 -558
  10. package/dist/{213.bundle.398730bb3ceb1af54413.js → 213.bundle.863ab5d320fc06043a4e.js} +5 -7
  11. package/dist/{3584.bundle.839a16d349815b3f7c97.js → 2199.bundle.974037f21bfd12c4e8af.js} +256 -2236
  12. package/dist/{2424.bundle.be90e7bcf0fd8db68b2f.js → 2424.bundle.b070e83baf101dad2121.js} +5 -7
  13. package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
  14. package/dist/{2701.bundle.aca0d4f24a6f2094c3c3.js → 2701.bundle.58a6a580073edbb4cc04.js} +9 -9
  15. package/dist/{2842.bundle.7852a204d3510fca8b27.js → 2816.bundle.838fa4d72921c026083c.js} +1136 -2342
  16. package/dist/{9195.bundle.e2fd5c6b5830c0ee25a8.js → 2851.bundle.70227d013c1937e846be.js} +318 -150
  17. package/dist/{1903.bundle.dc5248f7cb6ba1dc1072.js → 3081.bundle.930757b1a5aa8549e112.js} +752 -466
  18. package/dist/{3343.bundle.f8fe9316b0ff68d087f7.js → 3343.bundle.a4424b8418b8c0c1a9e4.js} +27 -25
  19. package/dist/{3461.bundle.50c752c623f39cf6c457.js → 3461.bundle.ab31c31a5ddc4baa72f7.js} +40 -40
  20. package/dist/{4202.bundle.790706560c6edb303476.js → 4202.bundle.4f76d3a50d6cf819fba0.js} +6 -6
  21. package/dist/{4019.bundle.01f63d5dd5b96ded0c00.js → 4287.bundle.87e14e648f2bce5e4176.js} +372 -567
  22. package/dist/{4775.bundle.d7f0645419f1df8e00b8.js → 4775.bundle.768f00df706f506f3789.js} +57 -51
  23. package/dist/{4819.bundle.ef1151f023b3784bc1be.js → 4819.bundle.6377aba4cf194120e7d4.js} +35 -34
  24. package/dist/{5028.bundle.b3611b7c7422a5c2e723.js → 5028.bundle.3a086ff61ec8dc1da4b1.js} +13 -15
  25. package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
  26. package/dist/{5457.bundle.9f2eb65ad85fcbb75e27.js → 5457.bundle.0063531ed24c06fba48b.js} +16 -23
  27. package/dist/{5462.bundle.a81a691eeef782ab95b9.js → 5462.bundle.d5bb9b3ddc510fea141f.js} +1108 -1030
  28. package/dist/{5485.bundle.71041ca4bc9e6ab57d92.js → 5485.bundle.b523d7015979fc641f7e.js} +17 -32
  29. package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
  30. package/dist/5724.bundle.62ea5c07c7809ab4cd74.js +297 -0
  31. package/dist/5724.css +2 -0
  32. package/dist/{5802.bundle.28ab859d9b48a5b2c31c.js → 5802.bundle.ae4d88742c353de462c2.js} +13 -18
  33. package/dist/{5830.bundle.b073c265c4fcea1afff3.js → 5830.bundle.791019deddd536980a11.js} +3 -3
  34. package/dist/{5858.bundle.d5f4bf849aaeebf5025c.js → 5858.bundle.466e58128de344ab53f3.js} +90 -86
  35. package/dist/{6027.bundle.160bd47ea03784276275.js → 6027.bundle.3cf6c827b4ce9066b426.js} +3 -5
  36. package/dist/{6163.bundle.1f096bdbe3a341c1710d.js → 6163.bundle.ac77880c970e788c9a07.js} +33 -33
  37. package/dist/{5549.bundle.d5def6a3124a3a481b7c.js → 6280.bundle.f22f9955eb906e1d7da8.js} +2475 -1200
  38. package/dist/{3353.bundle.a0f1654c642395bbbbbc.js → 6347.bundle.f8393c20d5159ed41b64.js} +358 -214
  39. package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.d8a592b03e9a5b7a66c2.js} +102 -96
  40. package/dist/{6376.bundle.272e755bdcbb5615a44e.js → 6376.bundle.527820a5cb1eece2a8d2.js} +6 -6
  41. package/dist/{5400.bundle.de97508611da1c00d58a.js → 6409.bundle.24edbaa283b7c521b8f7.js} +517 -146
  42. package/dist/6939.bundle.41fbdef87597b5172ec6.js +3 -3
  43. package/dist/7159.bundle.a5991a5d4f0dd8f1c95f.js +3 -3
  44. package/dist/{7190.bundle.d731ae6cf6e933a2c408.js → 7190.bundle.479332d662ffe08d1f92.js} +1462 -955
  45. package/dist/{732.bundle.6978ac30a1e36abf06db.js → 732.bundle.ea6f9d8504e37e01a208.js} +5 -13
  46. package/dist/{7431.bundle.999b2b65d4973bc56218.js → 7431.bundle.b31ebb4a2625e89d864e.js} +38 -32
  47. package/dist/{7639.bundle.e004d734044049fe8fe9.js → 7639.bundle.0147cdd1c23858221b62.js} +27 -25
  48. package/dist/7758.bundle.c8d106364298e7d288f0.js +3 -3
  49. package/dist/{8094.bundle.5c44190a325ac23e3e5c.js → 8094.bundle.148a66619607e37cbf19.js} +3 -4
  50. package/dist/{8305.bundle.ba43ed23edea2bf394b3.js → 8305.bundle.565339762503b9ae4f59.js} +57 -41
  51. package/dist/{85.bundle.a16e254910c60223df19.js → 85.bundle.b2365b2e4c3c6935f453.js} +3 -5
  52. package/dist/{8558.bundle.463ddb34a619cf47493e.js → 8558.bundle.9af6d13a22ddb44ea766.js} +60 -32
  53. package/dist/{8583.bundle.59c239cf891c2e10bf10.js → 8583.bundle.f51188077125da303398.js} +42 -39
  54. package/dist/{5448.bundle.9a36e001169ea3bfeb6c.js → 8665.bundle.dc56c125411422f9f686.js} +3753 -1424
  55. package/dist/{7412.bundle.aec4834a71fc27c4ce06.js → 9205.bundle.2a2f38a4ee23647f5fa4.js} +3413 -1271
  56. package/dist/{9845.bundle.31aec3fe7a5cdc247f4e.js → 9845.bundle.31f3e7e2d28fa6033ee5.js} +22 -14
  57. package/dist/{9862.bundle.3ca0ad5f54db87ccf91e.js → 9862.bundle.73ea2a7703bf1bb96275.js} +8 -6
  58. package/dist/{9927.bundle.f421cd167be94a7109f6.js → 9927.bundle.af31e6ce5cac195607fd.js} +19 -21
  59. package/dist/app-config.js +12 -0
  60. package/dist/{app.bundle.7df5bc1cd812bd602686.js → app.bundle.b2817894afde20b59bdb.js} +67903 -63389
  61. package/dist/app.bundle.css +1 -1
  62. package/dist/{compute.bundle.fdee4a0f193ee2e1b6da.js → compute.bundle.73440405025831e0e072.js} +10 -22
  63. package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js +3254 -1792
  64. package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js.map +1 -1
  65. package/dist/{histogram-worker.bundle.d4e40a8018d2698b072e.js → histogram-worker.bundle.5b679ce4142c803c80a4.js} +11 -23
  66. package/dist/index.html +1 -1
  67. package/dist/{interpolation.bundle.1938b79f9d6db363528a.js → interpolation.bundle.7554483d97f6119414f9.js} +14 -26
  68. package/dist/{polySeg.bundle.11f9746cd60c9811a412.js → polySeg.bundle.6373e24bd578ae0d41eb.js} +8 -20
  69. package/dist/sw.js +1 -1
  70. package/package.json +24 -24
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[9195],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[2851],{
3
3
 
4
- /***/ 52675:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4
+ /***/ 52675
5
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
6
 
7
7
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8
8
  /* harmony export */ A: () => (/* binding */ MoreDropdownMenu)
9
9
  /* harmony export */ });
10
10
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86326);
11
- /* harmony import */ var _ohif_ui_next__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1246);
11
+ /* harmony import */ var _ohif_ui_next__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12517);
12
12
  /* harmony import */ var _ohif_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42356);
13
13
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
14
14
 
@@ -110,10 +110,10 @@ function MoreDropdownMenu(bindProps) {
110
110
  return BoundMoreDropdownMenu;
111
111
  }
112
112
 
113
- /***/ }),
113
+ /***/ },
114
114
 
115
- /***/ 40565:
116
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
115
+ /***/ 40565
116
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
117
117
 
118
118
 
119
119
  // EXPORTS
@@ -123,8 +123,8 @@ __webpack_require__.d(__webpack_exports__, {
123
123
 
124
124
  // EXTERNAL MODULE: ../../../node_modules/react/index.js
125
125
  var react = __webpack_require__(86326);
126
- // EXTERNAL MODULE: ../../ui-next/src/index.ts + 3073 modules
127
- var src = __webpack_require__(1246);
126
+ // EXTERNAL MODULE: ../../ui-next/src/index.ts + 3075 modules
127
+ var src = __webpack_require__(12517);
128
128
  // EXTERNAL MODULE: ../../core/src/index.ts + 69 modules
129
129
  var core_src = __webpack_require__(42356);
130
130
  // EXTERNAL MODULE: ../../../node_modules/react-router-dom/dist/index.js
@@ -613,16 +613,16 @@ function _findTabAndStudyOfDisplaySet(displaySetInstanceUID, tabs, currentTabNam
613
613
  }
614
614
  }
615
615
 
616
- /***/ }),
616
+ /***/ },
617
617
 
618
- /***/ 3329:
619
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
618
+ /***/ 3329
619
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
620
620
 
621
621
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
622
622
  /* harmony export */ T: () => (/* binding */ PanelStudyBrowserHeader)
623
623
  /* harmony export */ });
624
624
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86326);
625
- /* harmony import */ var _ohif_ui_next__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1246);
625
+ /* harmony import */ var _ohif_ui_next__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12517);
626
626
 
627
627
 
628
628
 
@@ -665,10 +665,10 @@ function PanelStudyBrowserHeader({
665
665
  }
666
666
 
667
667
 
668
- /***/ }),
668
+ /***/ },
669
669
 
670
- /***/ 20528:
671
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
670
+ /***/ 20528
671
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
672
672
 
673
673
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
674
674
  /* harmony export */ M: () => (/* binding */ Toolbar)
@@ -747,66 +747,41 @@ function Toolbar({
747
747
  }));
748
748
  }
749
749
 
750
- /***/ }),
750
+ /***/ },
751
751
 
752
- /***/ 39195:
753
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
752
+ /***/ 62851
753
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
754
754
 
755
- // ESM COMPAT FLAG
756
- __webpack_require__.r(__webpack_exports__);
757
755
 
758
756
  // EXPORTS
759
757
  __webpack_require__.d(__webpack_exports__, {
760
- ContextMenuController: () => (/* reexport */ ContextMenuController),
761
- CustomizableContextMenuTypes: () => (/* reexport */ types_namespaceObject),
762
- MoreDropdownMenu: () => (/* reexport */ MoreDropdownMenu/* default */.A),
763
- PanelStudyBrowserHeader: () => (/* reexport */ PanelStudyBrowserHeader/* PanelStudyBrowserHeader */.T),
764
- StaticWadoClient: () => (/* reexport */ StaticWadoClient),
765
- Toolbar: () => (/* reexport */ Toolbar/* Toolbar */.M),
766
- Toolbox: () => (/* reexport */ Toolbox),
767
- callInputDialog: () => (/* reexport */ callInputDialog),
768
- callInputDialogAutoComplete: () => (/* reexport */ callInputDialogAutoComplete),
769
- cleanDenaturalizedDataset: () => (/* reexport */ cleanDenaturalizedDataset),
770
- colorPickerDialog: () => (/* reexport */ colorPickerDialog),
771
- createReportAsync: () => (/* reexport */ Actions_createReportAsync),
772
- createReportDialogPrompt: () => (/* reexport */ CreateReportDialogPrompt),
758
+ tm: () => (/* reexport */ StaticWadoClient),
759
+ M7: () => (/* reexport */ Toolbar/* Toolbar */.M),
760
+ OO: () => (/* reexport */ Toolbox),
761
+ l5: () => (/* reexport */ callInputDialog),
762
+ fq: () => (/* reexport */ callInputDialogAutoComplete),
763
+ wZ: () => (/* reexport */ cleanDenaturalizedDataset),
764
+ wS: () => (/* reexport */ colorPickerDialog),
765
+ Vy: () => (/* reexport */ Actions_createReportAsync),
766
+ tc: () => (/* reexport */ CreateReportDialogPrompt),
773
767
  "default": () => (/* binding */ default_src),
774
- dicomWebUtils: () => (/* reexport */ utils_namespaceObject),
775
- getStudiesForPatientByMRN: () => (/* reexport */ Panels_getStudiesForPatientByMRN),
776
- promptLabelAnnotation: () => (/* reexport */ utils_promptLabelAnnotation),
777
- promptSaveReport: () => (/* reexport */ utils_promptSaveReport),
778
- requestDisplaySetCreationForStudy: () => (/* reexport */ Panels_requestDisplaySetCreationForStudy),
779
- useDisplaySetSelectorStore: () => (/* reexport */ useDisplaySetSelectorStore),
780
- useHangingProtocolStageIndexStore: () => (/* reexport */ useHangingProtocolStageIndexStore),
781
- usePatientInfo: () => (/* reexport */ hooks_usePatientInfo),
782
- useToggleHangingProtocolStore: () => (/* reexport */ useToggleHangingProtocolStore),
783
- useToggleOneUpViewportGridStore: () => (/* reexport */ useToggleOneUpViewportGridStore),
784
- useUIStateStore: () => (/* reexport */ useUIStateStore),
785
- useViewportGridStore: () => (/* reexport */ useViewportGridStore),
786
- useViewportsByPositionStore: () => (/* reexport */ useViewportsByPositionStore),
787
- utils: () => (/* reexport */ src_utils_namespaceObject)
768
+ CA: () => (/* reexport */ utils_namespaceObject),
769
+ uR: () => (/* reexport */ utils_promptLabelAnnotation),
770
+ MP: () => (/* reexport */ utils_promptSaveReport),
771
+ Z: () => (/* reexport */ Panels_requestDisplaySetCreationForStudy),
772
+ Yd: () => (/* reexport */ useToggleOneUpViewportGridStore),
773
+ FS: () => (/* reexport */ useUIStateStore)
788
774
  });
789
775
 
790
- // NAMESPACE OBJECT: ../../../extensions/default/src/CustomizableContextMenu/types.ts
791
- var types_namespaceObject = {};
792
- __webpack_require__.r(types_namespaceObject);
776
+ // UNUSED EXPORTS: ContextMenuController, CustomizableContextMenuTypes, MoreDropdownMenu, PanelStudyBrowserHeader, getStudiesForPatientByMRN, useDisplaySetSelectorStore, useHangingProtocolStageIndexStore, usePatientInfo, useToggleHangingProtocolStore, useViewportGridStore, useViewportsByPositionStore, utils
793
777
 
794
778
  // NAMESPACE OBJECT: ../../../extensions/default/src/DicomWebDataSource/utils/index.ts
795
779
  var utils_namespaceObject = {};
796
780
  __webpack_require__.r(utils_namespaceObject);
797
781
  __webpack_require__.d(utils_namespaceObject, {
798
- cleanDenaturalizedDataset: () => (cleanDenaturalizedDataset),
799
- fixBulkDataURI: () => (fixBulkDataURI),
800
- fixMultiValueKeys: () => (fixMultiValueKeys),
801
- transferDenaturalizedDataset: () => (transferDenaturalizedDataset)
802
- });
803
-
804
- // NAMESPACE OBJECT: ../../../extensions/default/src/utils/index.ts
805
- var src_utils_namespaceObject = {};
806
- __webpack_require__.r(src_utils_namespaceObject);
807
- __webpack_require__.d(src_utils_namespaceObject, {
808
- Toolbox: () => (Toolbox),
809
- addIcon: () => (addIcon)
782
+ wZ: () => (cleanDenaturalizedDataset),
783
+ Uk: () => (fixMultiValueKeys),
784
+ If: () => (transferDenaturalizedDataset)
810
785
  });
811
786
 
812
787
  // EXTERNAL MODULE: ../../../node_modules/dicomweb-client/build/dicomweb-client.es.js
@@ -2739,12 +2714,97 @@ function retrieveBulkData(value, options = {}) {
2739
2714
 
2740
2715
  // EXTERNAL MODULE: ../../../node_modules/query-string/index.js
2741
2716
  var query_string = __webpack_require__(98985);
2717
+ ;// ../../../extensions/default/src/utils/secureConfigFetch.js
2718
+ // @ts-nocheck
2719
+
2720
+ function normalizeAllowedOrigins(allowedOrigins = []) {
2721
+ if (!Array.isArray(allowedOrigins)) {
2722
+ return [];
2723
+ }
2724
+ const configuredOrigins = allowedOrigins.filter(origin => typeof origin === 'string').map(origin => origin.trim()).filter(Boolean);
2725
+ return configuredOrigins.map(origin => {
2726
+ try {
2727
+ const parsedOrigin = new URL(origin);
2728
+ if (!['http:', 'https:'].includes(parsedOrigin.protocol)) {
2729
+ console.error(`[secureConfigFetch] Ignoring misconfigured allowed origin "${origin}". ` + 'Entries must use http:// or https://.');
2730
+ return null;
2731
+ }
2732
+ if (parsedOrigin.username || parsedOrigin.password || parsedOrigin.pathname !== '/' || parsedOrigin.search || parsedOrigin.hash) {
2733
+ console.error(`[secureConfigFetch] Ignoring misconfigured allowed origin "${origin}". ` + 'Entries must be bare origins only (scheme + host + optional port), with no username/password, path, query, or hash.');
2734
+ return null;
2735
+ }
2736
+ return parsedOrigin.origin;
2737
+ } catch {
2738
+ console.error(`[secureConfigFetch] Ignoring misconfigured allowed origin "${origin}". Entry is not a valid URL.`);
2739
+ return null;
2740
+ }
2741
+ }).filter(Boolean);
2742
+ }
2743
+ function resolveConfigUrl(rawUrl) {
2744
+ if (!rawUrl || typeof rawUrl !== 'string') {
2745
+ throw new Error('Missing required "url" query parameter');
2746
+ }
2747
+ try {
2748
+ return new URL(rawUrl, window.location.href);
2749
+ } catch {
2750
+ throw new Error('Invalid URL in "url" query parameter');
2751
+ }
2752
+ }
2753
+ function resolveConfigFetchPolicy(rawUrl, policy = {}) {
2754
+ const {
2755
+ allowedOrigins = [],
2756
+ userAuthenticationService
2757
+ } = policy;
2758
+ const parsedUrl = resolveConfigUrl(rawUrl);
2759
+ const protocol = parsedUrl.protocol.toLowerCase();
2760
+ const isSameOrigin = parsedUrl.origin === window.location.origin;
2761
+ if (!['http:', 'https:'].includes(protocol)) {
2762
+ throw new Error('Only HTTP(S) URLs are allowed for dynamic datasource configuration');
2763
+ }
2764
+ if (parsedUrl.hash) {
2765
+ throw new Error('URL fragments are not allowed for dynamic datasource configuration');
2766
+ }
2767
+ if (parsedUrl.username || parsedUrl.password) {
2768
+ throw new Error('URL userinfo is not allowed for dynamic datasource configuration');
2769
+ }
2770
+ const isAuthenticated = Boolean(userAuthenticationService?.getAuthorizationHeader?.()?.Authorization);
2771
+ if (isAuthenticated && !isSameOrigin) {
2772
+ const normalizedAllowedOrigins = normalizeAllowedOrigins(allowedOrigins);
2773
+ if (!normalizedAllowedOrigins.length || !normalizedAllowedOrigins.includes(parsedUrl.origin)) {
2774
+ throw new Error(`Blocked remote configuration origin "${parsedUrl.origin}" in authenticated environment`);
2775
+ }
2776
+ }
2777
+ return {
2778
+ parsedUrl,
2779
+ normalizedUrl: parsedUrl.toString(),
2780
+ isAuthenticated,
2781
+ isSameOrigin
2782
+ };
2783
+ }
2784
+ async function fetchConfigJson(normalizedPolicy) {
2785
+ const {
2786
+ normalizedUrl
2787
+ } = normalizedPolicy;
2788
+ const response = await fetch(normalizedUrl, {
2789
+ method: 'GET',
2790
+ mode: 'cors',
2791
+ credentials: 'same-origin',
2792
+ redirect: 'error',
2793
+ referrerPolicy: 'no-referrer'
2794
+ });
2795
+ if (!response.ok) {
2796
+ throw new Error(`Failed to fetch dynamic datasource configuration (${response.status})`);
2797
+ }
2798
+ return response.json();
2799
+ }
2800
+
2742
2801
  ;// ../../../extensions/default/src/DicomJSONDataSource/index.js
2743
2802
 
2744
2803
 
2745
2804
 
2746
2805
 
2747
2806
 
2807
+
2748
2808
  const DicomJSONDataSource_metadataProvider = src/* default.classes */.Ay.classes.MetadataProvider;
2749
2809
  const mappings = {
2750
2810
  studyInstanceUid: 'StudyInstanceUID',
@@ -2791,7 +2851,10 @@ const findStudies = (key, value) => {
2791
2851
  });
2792
2852
  return studies;
2793
2853
  };
2794
- function createDicomJSONApi(dicomJsonConfig) {
2854
+ function createDicomJSONApi(dicomJsonConfig, servicesManager) {
2855
+ const {
2856
+ userAuthenticationService
2857
+ } = servicesManager.services;
2795
2858
  const implementation = {
2796
2859
  initialize: async ({
2797
2860
  query,
@@ -2800,7 +2863,11 @@ function createDicomJSONApi(dicomJsonConfig) {
2800
2863
  if (!url) {
2801
2864
  url = query.get('url');
2802
2865
  }
2803
- let metaData = getMetaDataByURL(url);
2866
+ const evaluatedUrl = resolveConfigFetchPolicy(url, {
2867
+ allowedOrigins: dicomJsonConfig.dangerouslyAllowedOriginsForAuthenticatedEnvironments,
2868
+ userAuthenticationService
2869
+ });
2870
+ let metaData = getMetaDataByURL(evaluatedUrl.normalizedUrl);
2804
2871
 
2805
2872
  // if we have already cached the data from this specific url
2806
2873
  // We are only handling one StudyInstanceUID to run; however,
@@ -2810,8 +2877,7 @@ function createDicomJSONApi(dicomJsonConfig) {
2810
2877
  return aStudy.StudyInstanceUID;
2811
2878
  });
2812
2879
  }
2813
- const response = await fetch(url);
2814
- const data = await response.json();
2880
+ const data = await fetchConfigJson(evaluatedUrl);
2815
2881
  let StudyInstanceUID;
2816
2882
  let SeriesInstanceUID;
2817
2883
  data.studies.forEach(study => {
@@ -2841,10 +2907,10 @@ function createDicomJSONApi(dicomJsonConfig) {
2841
2907
  });
2842
2908
  });
2843
2909
  _store.urls.push({
2844
- url,
2910
+ url: evaluatedUrl.normalizedUrl,
2845
2911
  studies: [...data.studies]
2846
2912
  });
2847
- _store.studyInstanceUIDMap.set(url, data.studies.map(study => study.StudyInstanceUID));
2913
+ _store.studyInstanceUIDMap.set(evaluatedUrl.normalizedUrl, data.studies.map(study => study.StudyInstanceUID));
2848
2914
  },
2849
2915
  query: {
2850
2916
  studies: {
@@ -2979,6 +3045,8 @@ function createDicomJSONApi(dicomJsonConfig) {
2979
3045
  console.warn(' DICOMJson store dicom not implemented');
2980
3046
  }
2981
3047
  },
3048
+ reject: {},
3049
+ deleteStudyMetadataPromise: () => {},
2982
3050
  getImageIdsForDisplaySet(displaySet) {
2983
3051
  const images = displaySet.images;
2984
3052
  const imageIds = [];
@@ -3037,8 +3105,20 @@ function createDicomJSONApi(dicomJsonConfig) {
3037
3105
  query
3038
3106
  }) => {
3039
3107
  const url = query.get('url');
3040
- return _store.studyInstanceUIDMap.get(url);
3041
- }
3108
+ if (!url) {
3109
+ return;
3110
+ }
3111
+ try {
3112
+ const evaluatedUrl = resolveConfigFetchPolicy(url, {
3113
+ allowedOrigins: dicomJsonConfig.dangerouslyAllowedOriginsForAuthenticatedEnvironments,
3114
+ userAuthenticationService
3115
+ });
3116
+ return _store.studyInstanceUIDMap.get(evaluatedUrl.normalizedUrl);
3117
+ } catch {
3118
+ return;
3119
+ }
3120
+ },
3121
+ getConfig: () => dicomJsonConfig
3042
3122
  };
3043
3123
  return src/* IWebApiDataSource */.pt.create(implementation);
3044
3124
  }
@@ -3307,6 +3387,7 @@ function createDicomLocalApi(dicomLocalConfig) {
3307
3387
 
3308
3388
 
3309
3389
 
3390
+
3310
3391
  /**
3311
3392
  * This datasource is initialized with a url that returns a JSON object with a
3312
3393
  * dicomWeb datasource configuration array present in a "servers" object.
@@ -3319,6 +3400,9 @@ function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager) {
3319
3400
  const {
3320
3401
  name
3321
3402
  } = dicomWebProxyConfig;
3403
+ const {
3404
+ userAuthenticationService
3405
+ } = servicesManager.services;
3322
3406
  let dicomWebDelegate = undefined;
3323
3407
  const implementation = {
3324
3408
  initialize: async ({
@@ -3329,8 +3413,11 @@ function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager) {
3329
3413
  if (!url) {
3330
3414
  throw new Error(`No url for '${name}'`);
3331
3415
  } else {
3332
- const response = await fetch(url);
3333
- const data = await response.json();
3416
+ const evaluatedUrl = resolveConfigFetchPolicy(url, {
3417
+ allowedOrigins: dicomWebProxyConfig.dangerouslyAllowedOriginsForAuthenticatedEnvironments,
3418
+ userAuthenticationService
3419
+ });
3420
+ const data = await fetchConfigJson(evaluatedUrl);
3334
3421
  if (!data.servers?.dicomWeb?.[0]) {
3335
3422
  throw new Error('Invalid configuration returned by url');
3336
3423
  }
@@ -3361,9 +3448,15 @@ function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager) {
3361
3448
  store: {
3362
3449
  dicom: (...args) => dicomWebDelegate.store.dicom(...args)
3363
3450
  },
3364
- deleteStudyMetadataPromise: (...args) => dicomWebDelegate.deleteStudyMetadataPromise(...args),
3365
- getImageIdsForDisplaySet: (...args) => dicomWebDelegate.getImageIdsForDisplaySet(...args),
3366
- getImageIdsForInstance: (...args) => dicomWebDelegate.getImageIdsForInstance(...args),
3451
+ reject: {
3452
+ series: (...args) => dicomWebDelegate?.reject?.series?.(...args)
3453
+ },
3454
+ deleteStudyMetadataPromise: (...args) => dicomWebDelegate?.deleteStudyMetadataPromise?.(...args),
3455
+ getImageIdsForDisplaySet: (...args) => dicomWebDelegate?.getImageIdsForDisplaySet?.(...args),
3456
+ getImageIdsForInstance: (...args) => dicomWebDelegate?.getImageIdsForInstance?.(...args),
3457
+ getConfig: (...args) => dicomWebDelegate?.getConfig?.(...args) ?? {
3458
+ dicomUploadEnabled: false
3459
+ },
3367
3460
  getStudyInstanceUIDs({
3368
3461
  params,
3369
3462
  query
@@ -3701,8 +3794,8 @@ var react = __webpack_require__(86326);
3701
3794
  // EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
3702
3795
  var prop_types = __webpack_require__(97598);
3703
3796
  var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
3704
- // EXTERNAL MODULE: ../../ui-next/src/index.ts + 3073 modules
3705
- var ui_next_src = __webpack_require__(1246);
3797
+ // EXTERNAL MODULE: ../../ui-next/src/index.ts + 3075 modules
3798
+ var ui_next_src = __webpack_require__(12517);
3706
3799
  // EXTERNAL MODULE: ./state/index.js + 1 modules
3707
3800
  var state = __webpack_require__(45981);
3708
3801
  // EXTERNAL MODULE: ../../../node_modules/react-router-dom/dist/index.js
@@ -4775,8 +4868,8 @@ function getPanelModule({
4775
4868
  }];
4776
4869
  }
4777
4870
  /* harmony default export */ const src_getPanelModule = (getPanelModule);
4778
- // EXTERNAL MODULE: ../../i18n/src/index.js + 210 modules
4779
- var i18n_src = __webpack_require__(68523);
4871
+ // EXTERNAL MODULE: ../../i18n/src/index.js + 286 modules
4872
+ var i18n_src = __webpack_require__(89010);
4780
4873
  ;// ../../../extensions/default/package.json
4781
4874
  const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/extension-default"}');
4782
4875
  ;// ../../../extensions/default/src/id.js
@@ -4939,6 +5032,9 @@ function areAllImageSpacingEqual(instances, messages) {
4939
5032
  return;
4940
5033
  }
4941
5034
  const lastIpp = (0,utils_toNumber/* default */.A)(instances[instances.length - 1].ImagePositionPatient);
5035
+ if (!lastIpp) {
5036
+ return;
5037
+ }
4942
5038
  const averageSpacingBetweenFrames = (0,isDisplaySetReconstructable/* _getPerpendicularDistance */.jj)(firstImagePositionPatient, lastIpp) / (instances.length - 1);
4943
5039
  let previousImagePositionPatient = firstImagePositionPatient;
4944
5040
  const issuesFound = [];
@@ -5168,6 +5264,8 @@ const chartHandler = {
5168
5264
  }
5169
5265
  };
5170
5266
 
5267
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
5268
+ var dist_esm = __webpack_require__(15327);
5171
5269
  ;// ../../../extensions/default/src/getSopClassHandlerModule.js
5172
5270
 
5173
5271
 
@@ -5175,6 +5273,7 @@ const chartHandler = {
5175
5273
 
5176
5274
 
5177
5275
 
5276
+
5178
5277
  const {
5179
5278
  isImage,
5180
5279
  sortStudyInstances,
@@ -5221,10 +5320,15 @@ function getDisplaySetInfo(instances) {
5221
5320
  if (isDynamicVolume) {
5222
5321
  const timePoint = timePoints[0];
5223
5322
  const instancesMap = new Map();
5224
-
5225
- // O(n) to convert it into a map and O(1) to find each instance
5226
- instances.forEach(instance => instancesMap.set(instance.imageId, instance));
5227
- const firstTimePointInstances = timePoint.map(imageId => instancesMap.get(imageId));
5323
+ let firstTimePointInstances;
5324
+ if (instances[0].NumberOfFrames > 1 && timePoints.length > 1) {
5325
+ // handle multiframe dynamic volume
5326
+ firstTimePointInstances = timePoints[0].map(imageId => dist_esm.metaData.get('instance', imageId));
5327
+ } else {
5328
+ // O(n) to convert it into a map and O(1) to find each instance
5329
+ instances.forEach(instance => instancesMap.set(instance.imageId, instance));
5330
+ firstTimePointInstances = timePoint.map(imageId => instancesMap.get(imageId));
5331
+ }
5228
5332
  displaySetInfo = getSopClassHandlerModule_isDisplaySetReconstructable(firstTimePointInstances, appConfig);
5229
5333
  } else {
5230
5334
  displaySetInfo = getSopClassHandlerModule_isDisplaySetReconstructable(instances, appConfig);
@@ -5836,6 +5940,7 @@ function ToolButtonWrapper(props) {
5836
5940
  }
5837
5941
 
5838
5942
  ;// ../../../extensions/default/src/Toolbar/ToolbarDivider.tsx
5943
+ /* unused harmony import specifier */ var React;
5839
5944
 
5840
5945
  function ToolbarDivider() {
5841
5946
  return /*#__PURE__*/React.createElement("span", {
@@ -6077,7 +6182,7 @@ function adaptItem(item, subProps) {
6077
6182
  return newItem;
6078
6183
  }
6079
6184
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js
6080
- var dist_esm = __webpack_require__(4667);
6185
+ var tools_dist_esm = __webpack_require__(4667);
6081
6186
  ;// ../../../extensions/default/src/CustomizableContextMenu/ContextMenuController.tsx
6082
6187
  var _ContextMenuController;
6083
6188
 
@@ -6131,7 +6236,7 @@ class ContextMenuController {
6131
6236
  const {
6132
6237
  locking,
6133
6238
  visibility
6134
- } = dist_esm.annotation;
6239
+ } = tools_dist_esm.annotation;
6135
6240
  const targetAnnotationId = selectorProps?.nearbyToolData?.annotationUID;
6136
6241
  if (targetAnnotationId) {
6137
6242
  const isLocked = locking.isAnnotationLocked(targetAnnotationId);
@@ -6795,6 +6900,9 @@ function getSortedTags(metadata) {
6795
6900
  function getRows(metadata, depth = 0) {
6796
6901
  // Tag, Type, Value, Keyword
6797
6902
 
6903
+ if (!metadata) {
6904
+ return [];
6905
+ }
6798
6906
  const keywords = Object.keys(metadata);
6799
6907
  const rows = [];
6800
6908
  for (let i = 0; i < keywords.length; i++) {
@@ -8777,6 +8885,7 @@ const hpMN8 = {
8777
8885
  };
8778
8886
  /* harmony default export */ const hpMNGrid = ((/* unused pure expression or super */ null && (hpMN)));
8779
8887
  ;// ../../../extensions/default/src/hangingprotocols/hpCompare.ts
8888
+
8780
8889
  const defaultDisplaySetSelector = {
8781
8890
  studyMatchingRules: [{
8782
8891
  // The priorInstance is a study counter that indicates what position this study is in
@@ -8879,8 +8988,8 @@ const priorViewport1 = {
8879
8988
  */
8880
8989
  const hpMNCompare = {
8881
8990
  id: '@ohif/hpCompare',
8882
- description: 'Compare two studies in various layouts',
8883
- name: 'Compare Two Studies',
8991
+ description: i18next/* default */.A.t('Hps:Compare two studies in various layouts'),
8992
+ name: i18next/* default */.A.t('Hps:Compare Two Studies'),
8884
8993
  numberOfPriorsReferenced: 1,
8885
8994
  protocolMatchingRules: [{
8886
8995
  id: 'Two Studies',
@@ -9123,6 +9232,7 @@ const LMLOPrior = {
9123
9232
 
9124
9233
  ;// ../../../extensions/default/src/hangingprotocols/hpMammo.ts
9125
9234
 
9235
+
9126
9236
  const rightDisplayArea = {
9127
9237
  storeAsInitialCamera: true,
9128
9238
  imageArea: [0.8, 0.8],
@@ -9142,7 +9252,7 @@ const leftDisplayArea = {
9142
9252
  const hpMammography = {
9143
9253
  id: '@ohif/hpMammo',
9144
9254
  hasUpdatedPriorsInformation: false,
9145
- name: 'Mammography Breast Screening',
9255
+ name: i18next/* default */.A.t('Hps:Mammography Breast Screening'),
9146
9256
  protocolMatchingRules: [{
9147
9257
  id: 'Mammography',
9148
9258
  weight: 150,
@@ -9880,7 +9990,6 @@ const {
9880
9990
 
9881
9991
 
9882
9992
 
9883
-
9884
9993
  function ItemListComponent({
9885
9994
  itemLabel,
9886
9995
  itemList,
@@ -9902,36 +10011,42 @@ function ItemListComponent({
9902
10011
  }, /*#__PURE__*/react.createElement("div", {
9903
10012
  className: "flex items-center justify-between"
9904
10013
  }, /*#__PURE__*/react.createElement("div", {
9905
- className: "text-primary-light text-[20px]"
9906
- }, t(`Select ${itemLabel}`)), /*#__PURE__*/react.createElement(ui_src/* InputFilterText */.Cv, {
10014
+ className: "text-highlight text-xl"
10015
+ }, t(`Select ${itemLabel}`)), /*#__PURE__*/react.createElement(ui_next_src/* InputFilter */.zbB, {
9907
10016
  className: "max-w-[40%] grow",
9908
- value: filterValue,
9909
- onDebounceChange: setFilterValue,
9910
- placeholder: t(`Search ${itemLabel} list`)
9911
- })), /*#__PURE__*/react.createElement("div", {
10017
+ onChange: setFilterValue
10018
+ }, /*#__PURE__*/react.createElement(ui_next_src/* InputFilter */.zbB.SearchIcon, null), /*#__PURE__*/react.createElement(ui_next_src/* InputFilter */.zbB.Input, {
10019
+ placeholder: t(`Search ${itemLabel} list`),
10020
+ className: "pl-8 pr-9"
10021
+ }), /*#__PURE__*/react.createElement(ui_next_src/* InputFilter */.zbB.ClearButton, {
10022
+ className: "text-primary mr-0.5 p-0.5"
10023
+ }))), /*#__PURE__*/react.createElement("div", {
9912
10024
  className: "relative flex min-h-[1px] grow flex-col bg-black text-[14px]"
9913
10025
  }, itemList == null ? /*#__PURE__*/react.createElement(LoadingIndicatorProgress, {
9914
10026
  className: 'h-full w-full'
9915
10027
  }) : itemList.length === 0 ? /*#__PURE__*/react.createElement("div", {
9916
- className: "text-primary-light flex h-full flex-col items-center justify-center px-6 py-4"
10028
+ className: "text-highlight flex h-full flex-col items-center justify-center px-6 py-4"
9917
10029
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.ToolMagnify, {
9918
10030
  className: "mb-4"
9919
10031
  }), /*#__PURE__*/react.createElement("span", null, t(`No ${itemLabel} available`))) : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
9920
- className: "bg-secondary-dark px-3 py-1.5 text-white"
10032
+ className: "bg-popover text-foreground px-3 py-1.5"
9921
10033
  }, t(itemLabel)), /*#__PURE__*/react.createElement("div", {
9922
10034
  className: "ohif-scrollbar overflow-auto"
9923
10035
  }, itemList.filter(item => !filterValue || item.name.toLowerCase().includes(filterValue.toLowerCase())).map(item => {
9924
- const border = 'rounded border-transparent border-b-secondary-light border-[1px] hover:border-primary-light';
10036
+ const border = 'rounded border-transparent border-b-input border-[1px]';
9925
10037
  return /*#__PURE__*/react.createElement("div", {
9926
- className: classnames_default()('hover:text-primary-light hover:bg-primary-dark group mx-2 flex items-center justify-between px-6 py-2', border),
10038
+ className: classnames_default()('hover:text-highlight hover:bg-muted group mx-2 flex items-center justify-between px-6 py-2', border),
9927
10039
  key: item.id
9928
- }, /*#__PURE__*/react.createElement("div", null, item.name), /*#__PURE__*/react.createElement(ui_src/* Button */.$n, {
10040
+ }, /*#__PURE__*/react.createElement("div", {
10041
+ className: "text-muted-foreground"
10042
+ }, item.name), /*#__PURE__*/react.createElement(ui_next_src/* Button */.$nd, {
9929
10043
  onClick: () => onItemClicked(item),
9930
10044
  className: "invisible group-hover:visible",
9931
- endIcon: /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.ByName, {
9932
- name: "arrow-left"
9933
- })
9934
- }, t('Select')));
10045
+ variant: "default",
10046
+ size: "sm"
10047
+ }, t('Select'), /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.ChevronRight, {
10048
+ className: "ml-2 h-3 w-3"
10049
+ })));
9935
10050
  })))));
9936
10051
  }
9937
10052
  /* harmony default export */ const Components_ItemListComponent = (ItemListComponent);
@@ -10076,11 +10191,7 @@ function DataSourceConfigurationComponent({
10076
10191
  if (!activeDataSourceDef?.configuration?.configurationAPI) {
10077
10192
  return;
10078
10193
  }
10079
- const {
10080
- factory: configurationAPIFactory
10081
- } = customizationService.getCustomization(activeDataSourceDef.configuration.configurationAPI) ?? {
10082
- factory: () => null
10083
- };
10194
+ const configurationAPIFactory = customizationService.getCustomization(activeDataSourceDef.configuration.configurationAPI) ?? (() => null);
10084
10195
  if (!configurationAPIFactory) {
10085
10196
  return;
10086
10197
  }
@@ -10106,6 +10217,7 @@ function DataSourceConfigurationComponent({
10106
10217
  show({
10107
10218
  content: Components_DataSourceConfigurationModalComponent,
10108
10219
  title: t('Configure Data Source'),
10220
+ containerClassName: 'max-w-3xl',
10109
10221
  contentProps: {
10110
10222
  configurationAPI,
10111
10223
  configuredItems,
@@ -10393,23 +10505,27 @@ var browser_detect_es5 = __webpack_require__(88123);
10393
10505
 
10394
10506
 
10395
10507
 
10508
+
10396
10509
  function AboutModalDefault() {
10510
+ const {
10511
+ t
10512
+ } = (0,es/* useTranslation */.Bd)('AboutModal');
10397
10513
  const {
10398
10514
  os,
10399
10515
  version,
10400
10516
  name
10401
10517
  } = (0,browser_detect_es5/* default */.A)();
10402
10518
  const browser = `${name[0].toUpperCase()}${name.substr(1)} ${version}`;
10403
- const versionNumber = "3.12.0-beta.99";
10404
- const commitHash = "77f9f8e1c4af6b5d22ecf9332b5edf503cd5b848";
10519
+ const versionNumber = "3.12.1";
10520
+ const commitHash = "647fd025cf7212acc03b66807974f5d0f8ba0708";
10405
10521
  const [main, beta] = versionNumber.split('-');
10406
10522
  return /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU, {
10407
10523
  className: "w-[400px]"
10408
10524
  }, /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU.ProductName, null, "OHIF Viewer"), /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU.ProductVersion, null, main), beta && /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU.ProductBeta, null, beta), /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU.Body, null, /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU.DetailItem, {
10409
- label: "Commit Hash",
10525
+ label: t('Commit Hash'),
10410
10526
  value: commitHash
10411
10527
  }), /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU.DetailItem, {
10412
- label: "Current Browser & OS",
10528
+ label: t('Current Browser & OS'),
10413
10529
  value: `${browser}, ${os}`
10414
10530
  }), /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU.SocialItem, {
10415
10531
  icon: "SocialGithub",
@@ -10439,15 +10555,27 @@ function UserPreferencesModalDefault({
10439
10555
  hotkeysManager
10440
10556
  } = (0,src/* useSystem */.Jg)();
10441
10557
  const {
10442
- t
10558
+ t,
10559
+ i18n: i18nextInstance
10443
10560
  } = (0,es/* useTranslation */.Bd)('UserPreferencesModal');
10444
10561
  const {
10445
10562
  hotkeyDefinitions = {},
10446
10563
  hotkeyDefaults = {}
10447
10564
  } = hotkeysManager;
10565
+ const fallbackHotkeyDefinitions = (0,react.useMemo)(() => hotkeysManager.getValidHotkeyDefinitions(src/* hotkeys */.ot.defaults.hotkeyBindings), [hotkeysManager]);
10566
+ (0,react.useEffect)(() => {
10567
+ if (!Object.keys(hotkeyDefaults).length) {
10568
+ hotkeysManager.setDefaultHotKeys(src/* hotkeys */.ot.defaults.hotkeyBindings);
10569
+ }
10570
+ if (!Object.keys(hotkeyDefinitions).length) {
10571
+ hotkeysManager.setHotkeys(fallbackHotkeyDefinitions);
10572
+ }
10573
+ }, [hotkeysManager, hotkeyDefaults, hotkeyDefinitions, fallbackHotkeyDefinitions]);
10574
+ const resolvedHotkeyDefaults = Object.keys(hotkeyDefaults).length ? hotkeyDefaults : fallbackHotkeyDefinitions;
10575
+ const initialHotkeyDefinitions = Object.keys(hotkeyDefinitions).length ? hotkeyDefinitions : resolvedHotkeyDefaults;
10448
10576
  const currentLanguage = currentLanguageFn();
10449
10577
  const [state, setState] = (0,react.useState)({
10450
- hotkeyDefinitions: hotkeyDefinitions,
10578
+ hotkeyDefinitions: initialHotkeyDefinitions,
10451
10579
  languageValue: currentLanguage.value
10452
10580
  });
10453
10581
  const onLanguageChangeHandler = value => {
@@ -10472,10 +10600,45 @@ function UserPreferencesModalDefault({
10472
10600
  setState(state => ({
10473
10601
  ...state,
10474
10602
  languageValue: defaultLanguage.value,
10475
- hotkeyDefinitions: hotkeyDefaults
10603
+ hotkeyDefinitions: resolvedHotkeyDefaults
10476
10604
  }));
10477
10605
  hotkeysManager.restoreDefaultBindings();
10478
10606
  };
10607
+ const displayNames = react.useMemo(() => {
10608
+ if (typeof Intl === 'undefined' || typeof Intl.DisplayNames !== 'function') {
10609
+ return null;
10610
+ }
10611
+ const locales = [state.languageValue, currentLanguage.value, i18nextInstance.language, 'en'];
10612
+ const uniqueLocales = Array.from(new Set(locales.filter(Boolean)));
10613
+ try {
10614
+ return new Intl.DisplayNames(uniqueLocales, {
10615
+ type: 'language',
10616
+ fallback: 'none'
10617
+ });
10618
+ } catch (error) {
10619
+ console.warn('Intl.DisplayNames not supported for locales', uniqueLocales, error);
10620
+ }
10621
+ return null;
10622
+ }, [state.languageValue, currentLanguage.value, i18nextInstance.language]);
10623
+ const getLanguageLabel = react.useCallback((languageValue, fallbackLabel) => {
10624
+ const translationKey = `LanguageName.${languageValue}`;
10625
+ if (i18nextInstance.exists(translationKey, {
10626
+ ns: 'UserPreferencesModal'
10627
+ })) {
10628
+ return t(translationKey);
10629
+ }
10630
+ if (displayNames) {
10631
+ try {
10632
+ const localized = displayNames.of(languageValue);
10633
+ if (localized && localized.toLowerCase() !== languageValue.toLowerCase()) {
10634
+ return localized.charAt(0).toUpperCase() + localized.slice(1);
10635
+ }
10636
+ } catch (error) {
10637
+ console.debug(`Unable to resolve display name for ${languageValue}`, error);
10638
+ }
10639
+ }
10640
+ return fallbackLabel;
10641
+ }, [displayNames, i18nextInstance, t]);
10479
10642
  return /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy, null, /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy.Body, null, /*#__PURE__*/react.createElement("div", {
10480
10643
  className: "mb-3 flex items-center space-x-14"
10481
10644
  }, /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy.SubHeading, null, t('Language')), /*#__PURE__*/react.createElement(ui_next_src/* Select */.l6P, {
@@ -10489,7 +10652,7 @@ function UserPreferencesModalDefault({
10489
10652
  })), /*#__PURE__*/react.createElement(ui_next_src/* SelectContent */.gCo, null, availableLanguages.map(lang => /*#__PURE__*/react.createElement(ui_next_src/* SelectItem */.ebT, {
10490
10653
  key: lang.value,
10491
10654
  value: lang.value
10492
- }, lang.label))))), /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy.SubHeading, null, t('Hotkeys')), /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy.HotkeysGrid, null, Object.entries(state.hotkeyDefinitions).map(([id, definition]) => /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy.Hotkey, {
10655
+ }, getLanguageLabel(lang.value, lang.label)))))), /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy.SubHeading, null, t('Hotkeys')), /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy.HotkeysGrid, null, Object.entries(state.hotkeyDefinitions).map(([id, definition]) => /*#__PURE__*/react.createElement(ui_next_src/* UserPreferencesModal */.xMy.Hotkey, {
10493
10656
  key: id,
10494
10657
  label: t(definition.label),
10495
10658
  value: definition.keys,
@@ -10508,6 +10671,9 @@ function UserPreferencesModalDefault({
10508
10671
  onClick: () => {
10509
10672
  if (state.languageValue !== currentLanguage.value) {
10510
10673
  i18n_src/* default */.A.changeLanguage(state.languageValue);
10674
+ // Force page reload after language change to ensure all translations are applied
10675
+ window.location.reload();
10676
+ return; // Exit early since we're reloading
10511
10677
  }
10512
10678
  hotkeysManager.setHotkeys(state.hotkeyDefinitions);
10513
10679
  src/* hotkeys */.ot.stopRecord();
@@ -10649,6 +10815,7 @@ function ReportDialog({
10649
10815
  'ohif.hotkeyBindings': src/* defaults */.NT.hotkeyBindings
10650
10816
  });
10651
10817
  ;// ../../../extensions/default/src/customizations/onboardingCustomization.ts
10818
+
10652
10819
  function waitForElement(selector, maxAttempts = 20, interval = 25) {
10653
10820
  return new Promise(resolve => {
10654
10821
  let attempts = 0;
@@ -10668,8 +10835,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10668
10835
  route: '/viewer',
10669
10836
  steps: [{
10670
10837
  id: 'scroll',
10671
- title: 'Scrolling Through Images',
10672
- text: 'You can scroll through the images using the mouse wheel or scrollbar.',
10838
+ title: i18n_src/* default */.A.t('Onboarding:Scrolling Through Images'),
10839
+ text: i18n_src/* default */.A.t('Onboarding:You can scroll through the images using the mouse wheel or scrollbar.'),
10673
10840
  attachTo: {
10674
10841
  element: '.viewport-element',
10675
10842
  on: 'top'
@@ -10681,8 +10848,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10681
10848
  beforeShowPromise: () => waitForElement('.viewport-element')
10682
10849
  }, {
10683
10850
  id: 'zoom',
10684
- title: 'Zooming In and Out',
10685
- text: 'You can zoom the images using the right click.',
10851
+ title: i18n_src/* default */.A.t('Onboarding:Zooming In and Out'),
10852
+ text: i18n_src/* default */.A.t('Onboarding:You can zoom the images using the right click.'),
10686
10853
  attachTo: {
10687
10854
  element: '.viewport-element',
10688
10855
  on: 'left'
@@ -10694,8 +10861,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10694
10861
  beforeShowPromise: () => waitForElement('.viewport-element')
10695
10862
  }, {
10696
10863
  id: 'pan',
10697
- title: 'Panning the Image',
10698
- text: 'You can pan the images using the middle click.',
10864
+ title: i18n_src/* default */.A.t('Onboarding:Panning the Image'),
10865
+ text: i18n_src/* default */.A.t('Onboarding:You can pan the images using the middle click.'),
10699
10866
  attachTo: {
10700
10867
  element: '.viewport-element',
10701
10868
  on: 'top'
@@ -10707,8 +10874,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10707
10874
  beforeShowPromise: () => waitForElement('.viewport-element')
10708
10875
  }, {
10709
10876
  id: 'windowing',
10710
- title: 'Adjusting Window Level',
10711
- text: 'You can modify the window level using the left click.',
10877
+ title: i18n_src/* default */.A.t('Onboarding:Adjusting Window Level'),
10878
+ text: i18n_src/* default */.A.t('Onboarding:You can modify the window level using the left click.'),
10712
10879
  attachTo: {
10713
10880
  element: '.viewport-element',
10714
10881
  on: 'left'
@@ -10720,8 +10887,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10720
10887
  beforeShowPromise: () => waitForElement('.viewport-element')
10721
10888
  }, {
10722
10889
  id: 'length',
10723
- title: 'Using the Measurement Tools',
10724
- text: 'You can measure the length of a region using the Length tool.',
10890
+ title: i18n_src/* default */.A.t('Onboarding:Using the Measurement Tools'),
10891
+ text: i18n_src/* default */.A.t('Onboarding:You can measure the length of a region using the Length tool.'),
10725
10892
  attachTo: {
10726
10893
  element: '[data-cy="MeasurementTools-split-button-primary"]',
10727
10894
  on: 'bottom'
@@ -10730,11 +10897,11 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10730
10897
  selector: '[data-cy="MeasurementTools-split-button-primary"]',
10731
10898
  event: 'click'
10732
10899
  },
10733
- beforeShowPromise: () => waitForElement('[data-cy="MeasurementTools-split-button-primary]')
10900
+ beforeShowPromise: () => waitForElement('[data-cy="MeasurementTools-split-button-primary"]')
10734
10901
  }, {
10735
10902
  id: 'drawAnnotation',
10736
- title: 'Drawing Length Annotations',
10737
- text: 'Use the length tool on the viewport to measure the length of a region.',
10903
+ title: i18n_src/* default */.A.t('Onboarding:Drawing Length Annotations'),
10904
+ text: i18n_src/* default */.A.t('Onboarding:Use the length tool on the viewport to measure the length of a region.'),
10738
10905
  attachTo: {
10739
10906
  element: '.viewport-element',
10740
10907
  on: 'right'
@@ -10746,8 +10913,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10746
10913
  beforeShowPromise: () => waitForElement('.viewport-element')
10747
10914
  }, {
10748
10915
  id: 'trackMeasurement',
10749
- title: 'Tracking Measurements in the Panel',
10750
- text: 'Click yes to track the measurements in the measurement panel.',
10916
+ title: i18n_src/* default */.A.t('Onboarding:Tracking Measurements in the Panel'),
10917
+ text: i18n_src/* default */.A.t('Onboarding:Click yes to track the measurements in the measurement panel.'),
10751
10918
  attachTo: {
10752
10919
  element: '[data-cy="prompt-begin-tracking-yes-btn"]',
10753
10920
  on: 'bottom'
@@ -10759,8 +10926,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10759
10926
  beforeShowPromise: () => waitForElement('[data-cy="prompt-begin-tracking-yes-btn"]')
10760
10927
  }, {
10761
10928
  id: 'openMeasurementPanel',
10762
- title: 'Opening the Measurements Panel',
10763
- text: 'Click the measurements button to open the measurements panel.',
10929
+ title: i18n_src/* default */.A.t('Onboarding:Opening the Measurements Panel'),
10930
+ text: i18n_src/* default */.A.t('Onboarding:Click the measurements button to open the measurements panel.'),
10764
10931
  attachTo: {
10765
10932
  element: '#trackedMeasurements-btn',
10766
10933
  on: 'left-start'
@@ -10772,8 +10939,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10772
10939
  beforeShowPromise: () => waitForElement('#trackedMeasurements-btn')
10773
10940
  }, {
10774
10941
  id: 'scrollAwayFromMeasurement',
10775
- title: 'Scrolling Away from a Measurement',
10776
- text: 'Scroll the images using the mouse wheel away from the measurement.',
10942
+ title: i18n_src/* default */.A.t('Onboarding:Scrolling Away from a Measurement'),
10943
+ text: i18n_src/* default */.A.t('Onboarding:Scroll the images using the mouse wheel away from the measurement.'),
10777
10944
  attachTo: {
10778
10945
  element: '.viewport-element',
10779
10946
  on: 'left'
@@ -10785,8 +10952,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10785
10952
  beforeShowPromise: () => waitForElement('.viewport-element')
10786
10953
  }, {
10787
10954
  id: 'jumpToMeasurement',
10788
- title: 'Jumping to Measurements in the Panel',
10789
- text: 'Click the measurement in the measurement panel to jump to it.',
10955
+ title: i18n_src/* default */.A.t('Onboarding:Jumping to Measurements in the Panel'),
10956
+ text: i18n_src/* default */.A.t('Onboarding:Click the measurement in the measurement panel to jump to it.'),
10790
10957
  attachTo: {
10791
10958
  element: '[data-cy="data-row"]',
10792
10959
  on: 'left-start'
@@ -10798,8 +10965,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10798
10965
  beforeShowPromise: () => waitForElement('[data-cy="data-row"]')
10799
10966
  }, {
10800
10967
  id: 'changeLayout',
10801
- title: 'Changing Layout',
10802
- text: 'You can change the layout of the viewer using the layout button.',
10968
+ title: i18n_src/* default */.A.t('Onboarding:Changing Layout'),
10969
+ text: i18n_src/* default */.A.t('Onboarding:You can change the layout of the viewer using the layout button.'),
10803
10970
  attachTo: {
10804
10971
  element: '[data-cy="Layout"]',
10805
10972
  on: 'bottom'
@@ -10811,8 +10978,8 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10811
10978
  beforeShowPromise: () => waitForElement('[data-cy="Layout"]')
10812
10979
  }, {
10813
10980
  id: 'selectLayout',
10814
- title: 'Selecting the MPR Layout',
10815
- text: 'Select the MPR layout to view the images in MPR mode.',
10981
+ title: i18n_src/* default */.A.t('Onboarding:Selecting the MPR Layout'),
10982
+ text: i18n_src/* default */.A.t('Onboarding:Select the MPR layout to view the images in MPR mode.'),
10816
10983
  attachTo: {
10817
10984
  element: '[data-cy="MPR"]',
10818
10985
  on: 'left-start'
@@ -10827,7 +10994,7 @@ function waitForElement(selector, maxAttempts = 20, interval = 25) {
10827
10994
  useModalOverlay: true,
10828
10995
  defaultStepOptions: {
10829
10996
  buttons: [{
10830
- text: 'Skip all',
10997
+ text: i18n_src/* default */.A.t('Onboarding:Skip all'),
10831
10998
  action() {
10832
10999
  this.complete();
10833
11000
  },
@@ -11433,7 +11600,7 @@ async function callInputDialogAutoComplete({
11433
11600
  const labellingDoneCallback = newValue => {
11434
11601
  uiDialogService.hide('select-annotation');
11435
11602
  if (measurement && typeof newValue === 'string') {
11436
- const sourceAnnotation = dist_esm.annotation.state.getAnnotation(measurement.uid);
11603
+ const sourceAnnotation = tools_dist_esm.annotation.state.getAnnotation(measurement.uid);
11437
11604
  (0,utilities.setAnnotationLabel)(sourceAnnotation, element, newValue);
11438
11605
  }
11439
11606
  resolve(newValue);
@@ -11542,11 +11709,12 @@ function promptLabelAnnotation({
11542
11709
  // EXTERNAL MODULE: ../../../extensions/default/src/Panels/StudyBrowser/PanelStudyBrowserHeader.tsx
11543
11710
  var PanelStudyBrowserHeader = __webpack_require__(3329);
11544
11711
  ;// ../../../extensions/default/src/utils/addIcon.ts
11712
+ /* unused harmony import specifier */ var Icons;
11545
11713
 
11546
11714
 
11547
11715
  /** Adds the icon to both ui and ui-next */
11548
11716
  function addIcon(name, icon) {
11549
- ui_next_src/* Icons */.FI1.addIcon(name, icon);
11717
+ Icons.addIcon(name, icon);
11550
11718
  }
11551
11719
  ;// ../../../extensions/default/src/utils/Toolbox.tsx
11552
11720
  function Toolbox_extends() { return Toolbox_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, Toolbox_extends.apply(null, arguments); }
@@ -11738,10 +11906,10 @@ const defaultExtension = {
11738
11906
  /* harmony default export */ const default_src = (defaultExtension);
11739
11907
 
11740
11908
 
11741
- /***/ }),
11909
+ /***/ },
11742
11910
 
11743
- /***/ 96357:
11744
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11911
+ /***/ 96357
11912
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11745
11913
 
11746
11914
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11747
11915
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -11756,6 +11924,6 @@ const RESPONSE = {
11756
11924
  };
11757
11925
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RESPONSE);
11758
11926
 
11759
- /***/ })
11927
+ /***/ }
11760
11928
 
11761
11929
  }]);