@gen-epix/ui-client-common 4.3.0 → 4.3.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 (49) hide show
  1. package/dist/_chunks/Breadcrumbs.js +22 -22
  2. package/dist/_chunks/Table.js +559 -3173
  3. package/dist/_chunks/Table.js.map +1 -1
  4. package/dist/_chunks/{oidc-client-ts.js → UserManagerUtil.js} +222 -198
  5. package/dist/_chunks/UserManagerUtil.js.map +1 -0
  6. package/dist/_chunks/middleware.js +1 -1
  7. package/dist/_chunks/middleware.js.map +1 -1
  8. package/dist/_chunks/omit.js +1 -1
  9. package/dist/_chunks/omit.js.map +1 -1
  10. package/dist/_chunks/react.js +1 -1
  11. package/dist/_chunks/react.js.map +1 -1
  12. package/dist/_chunks/useColumnsMenu.js +2 -2
  13. package/dist/_chunks/useColumnsMenu.js.map +1 -1
  14. package/dist/_chunks/useQueryMemo.js +1 -1
  15. package/dist/_chunks/useQueryMemo.js.map +1 -1
  16. package/dist/_chunks/vanilla.js +1 -1
  17. package/dist/_chunks/vanilla.js.map +1 -1
  18. package/dist/_chunks/yup.js +2 -2
  19. package/dist/_chunks/yup.js.map +1 -1
  20. package/dist/classes/services/LogService/index.js +1 -1
  21. package/dist/classes/services/LogService/index.js.map +1 -1
  22. package/dist/classes/services/RouterService/index.js +4 -4
  23. package/dist/components/app/App/index.js +35 -100
  24. package/dist/components/app/App/index.js.map +1 -1
  25. package/dist/components/app/AuthenticationWrapper/index.js +38 -38
  26. package/dist/components/app/AuthorizationWrapper/index.js +20 -20
  27. package/dist/components/app/RouterRoot/index.js +58 -59
  28. package/dist/components/app/RouterRoot/index.js.map +1 -1
  29. package/dist/components/ui/ApplicationBar/index.js +146 -146
  30. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  31. package/dist/components/ui/GenericErrorMessage/index.js +34 -34
  32. package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
  33. package/dist/components/ui/NavLink/index.js +8 -8
  34. package/dist/components/ui/PageContainer/index.js +1 -1
  35. package/dist/components/ui/PageContainer/index.js.map +1 -1
  36. package/dist/pages/AcceptInvitationPage/index.js +28 -28
  37. package/dist/pages/AdminPage/index.js +23 -23
  38. package/dist/pages/OrganizationContactsAdminPage/index.js +29 -29
  39. package/dist/pages/OrganizationSitesAdminPage/index.js +25 -25
  40. package/dist/pages/PostLoginPage/index.js +11 -11
  41. package/dist/pages/RouterErrorPage/index.js +10 -10
  42. package/dist/utils/UserManagerUtil/index.js +2 -31
  43. package/package.json +13 -8
  44. package/dist/_chunks/chunk-OB3PAWPO.js +0 -3742
  45. package/dist/_chunks/chunk-OB3PAWPO.js.map +0 -1
  46. package/dist/_chunks/oidc-client-ts.js.map +0 -1
  47. package/dist/_chunks/react-oidc-context.js +0 -201
  48. package/dist/_chunks/react-oidc-context.js.map +0 -1
  49. package/dist/utils/UserManagerUtil/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"yup.js","names":["e","o","r","s","e","t","r"],"sources":["../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_@sinclair+typebox@0.34.49_@standard-schema+spec@1.1.0_ajv@8.2_26d561451bcf52899bfb24d45cfb94ee/node_modules/@hookform/resolvers/dist/resolvers.mjs","../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_@sinclair+typebox@0.34.49_@standard-schema+spec@1.1.0_ajv@8.2_26d561451bcf52899bfb24d45cfb94ee/node_modules/@hookform/resolvers/yup/dist/yup.mjs"],"sourcesContent":["import{get as e,set as r}from\"react-hook-form\";const t=(r,t,s)=>{if(r&&\"reportValidity\"in r){const o=e(s,t);r.setCustomValidity(o&&o.message||\"\"),r.reportValidity()}},s=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&\"reportValidity\"in o.ref?t(o.ref,s,e):o&&o.refs&&o.refs.forEach(r=>t(r,s,e))}},o=(t,o)=>{o.shouldUseNativeValidation&&s(t,o);const n={};for(const s in t){const f=e(o.fields,s),c=Object.assign(t[s]||{},{ref:f&&f.refs?f.refs[0]:f&&f.ref});if(i(o.names||Object.keys(t),s)){const t=Object.assign({},e(n,s));r(t,\"root\",c),r(n,s,t)}else r(n,s,c)}return n},i=(e,r)=>{const t=n(r).replace(/[.*+?^${}()|\\\\]/g,\"\\\\$&\");return e.some(e=>n(e).match(`^${t}\\\\.\\\\d+`))};function n(e){return e.replace(/\\[(\\d+)]/g,\".$1\").replace(/[[\\]]/g,\"\")}export{o as toNestErrors,s as validateFieldsNatively};\n//# sourceMappingURL=resolvers.mjs.map\n","import{validateFieldsNatively as e,toNestErrors as t}from\"@hookform/resolvers\";import{appendErrors as r}from\"react-hook-form\";function o(o,n,a){return void 0===a&&(a={}),function(s,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&\"development\"===process.env.NODE_ENV&&console.warn(\"You should not used the yup options context. Please, use the 'useForm' context object instead\"),Promise.resolve(o[\"sync\"===a.mode?\"validateSync\":\"validate\"](s,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&e({},c),{values:a.raw?Object.assign({},s):t,errors:{}}}))}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return{values:{},errors:t((o=e,n=!c.shouldUseNativeValidation&&\"all\"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,a=o&&o[t.type];e[t.path]=r(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},Object.create(null))),c)};var o,n}))}catch(e){return Promise.reject(e)}}}export{o as yupResolver};\n//# sourceMappingURL=yup.module.js.map\n"],"x_google_ignoreList":[0,1],"mappings":";;AAA+C,IAAM,KAAG,GAAE,GAAE,MAAI;CAAC,IAAG,KAAG,oBAAmB,GAAE;EAAC,IAAM,IAAEA,EAAE,GAAE,CAAC;EAAE,EAAE,kBAAkB,KAAG,EAAE,WAAS,EAAE,GAAE,EAAE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C,SAAO,GAAE;GAAC,OAAO,QAAQ,OAAO,CAAC;EAAC;CAAC;AAAC"}
1
+ {"version":3,"file":"yup.js","names":["e","o","r","s","e","t","r"],"sources":["../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/dist/resolvers.mjs","../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/yup/dist/yup.mjs"],"sourcesContent":["import{get as e,set as r}from\"react-hook-form\";const t=(r,t,s)=>{if(r&&\"reportValidity\"in r){const o=e(s,t);r.setCustomValidity(o&&o.message||\"\"),r.reportValidity()}},s=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&\"reportValidity\"in o.ref?t(o.ref,s,e):o&&o.refs&&o.refs.forEach(r=>t(r,s,e))}},o=(t,o)=>{o.shouldUseNativeValidation&&s(t,o);const n={};for(const s in t){const f=e(o.fields,s),c=Object.assign(t[s]||{},{ref:f&&f.refs?f.refs[0]:f&&f.ref});if(i(o.names||Object.keys(t),s)){const t=Object.assign({},e(n,s));r(t,\"root\",c),r(n,s,t)}else r(n,s,c)}return n},i=(e,r)=>{const t=n(r).replace(/[.*+?^${}()|\\\\]/g,\"\\\\$&\");return e.some(e=>n(e).match(`^${t}\\\\.\\\\d+`))};function n(e){return e.replace(/\\[(\\d+)]/g,\".$1\").replace(/[[\\]]/g,\"\")}export{o as toNestErrors,s as validateFieldsNatively};\n//# sourceMappingURL=resolvers.mjs.map\n","import{validateFieldsNatively as e,toNestErrors as t}from\"@hookform/resolvers\";import{appendErrors as r}from\"react-hook-form\";function o(o,n,a){return void 0===a&&(a={}),function(s,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&\"development\"===process.env.NODE_ENV&&console.warn(\"You should not used the yup options context. Please, use the 'useForm' context object instead\"),Promise.resolve(o[\"sync\"===a.mode?\"validateSync\":\"validate\"](s,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&e({},c),{values:a.raw?Object.assign({},s):t,errors:{}}}))}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return{values:{},errors:t((o=e,n=!c.shouldUseNativeValidation&&\"all\"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,a=o&&o[t.type];e[t.path]=r(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},Object.create(null))),c)};var o,n}))}catch(e){return Promise.reject(e)}}}export{o as yupResolver};\n//# sourceMappingURL=yup.module.js.map\n"],"x_google_ignoreList":[0,1],"mappings":";;AAA+C,IAAM,KAAG,GAAE,GAAE,MAAI;CAAC,IAAG,KAAG,oBAAmB,GAAE;EAAC,IAAM,IAAEA,EAAE,GAAE,CAAC;EAAE,EAAE,kBAAkB,KAAG,EAAE,WAAS,EAAE,GAAE,EAAE,eAAe;CAAC;AAAC,GAAE,KAAG,GAAE,MAAI;CAAC,KAAI,IAAM,KAAK,EAAE,QAAO;EAAC,IAAM,IAAE,EAAE,OAAO;EAAG,KAAG,EAAE,OAAK,oBAAmB,EAAE,MAAI,EAAE,EAAE,KAAI,GAAE,CAAC,IAAE,KAAG,EAAE,QAAM,EAAE,KAAK,SAAQ,MAAG,EAAE,GAAE,GAAE,CAAC,CAAC;CAAC;AAAC,GAAEC,KAAG,GAAE,MAAI;CAAC,EAAE,6BAA2B,EAAE,GAAE,CAAC;CAAE,IAAM,IAAE,CAAC;CAAE,KAAI,IAAM,KAAK,GAAE;EAAC,IAAM,IAAED,EAAE,EAAE,QAAO,CAAC,GAAE,IAAE,OAAO,OAAO,EAAE,MAAI,CAAC,GAAE,EAAC,KAAI,KAAG,EAAE,OAAK,EAAE,KAAK,KAAG,KAAG,EAAE,IAAG,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EAAE,KAAK,KAAK,GAAE,CAAC,IAAE;GAAC,EAAE,GAAE,SAAS,GAAE;IAAC,IAAG,CAAC,EAAE,OAAM,MAAM;IAAE,OAAM;KAAC,QAAO,CAAC;KAAE,QAAOE,GAAG,IAAE,GAAE,IAAE,CAAC,EAAE,6BAAmC,EAAE,iBAAV,QAAwB,EAAE,SAAO,CAAC,EAAA,CAAG,OAAO,SAAS,GAAE,GAAE;MAAC,IAAG,EAAE,EAAE,UAAQ,EAAE,EAAE,QAAM;OAAC,SAAQ,EAAE;OAAQ,MAAK,EAAE;MAAI,IAAG,GAAE;OAAC,IAAI,IAAE,EAAE,EAAE,KAAK,CAAC,OAAM,IAAE,KAAG,EAAE,EAAE;OAAM,EAAE,EAAE,QAAMC,EAAE,EAAE,MAAK,GAAE,GAAE,EAAE,MAAK,IAAE,CAAC,CAAC,CAAC,OAAO,GAAE,EAAE,OAAO,IAAE,EAAE,OAAO;MAAC;MAAC,OAAO;KAAC,GAAE,OAAO,OAAO,IAAI,CAAC,IAAG,CAAC;IAAC;QAAM,GAAE;GAAC,CAAC,CAAC;EAAC,SAAO,GAAE;GAAC,OAAO,QAAQ,OAAO,CAAC;EAAC;CAAC;AAAC"}
@@ -83,7 +83,7 @@ var c = class c {
83
83
  }]);
84
84
  }
85
85
  sendLog() {
86
- !this.logItems.length || !n.getInstance()?.authContextProps?.isAuthenticated || document.location.href.includes("accept-invitation") || (r.getInstance().systemApi.log({ log_items: this.logItems }, { headers: { "X-IGNORE-LOG": "1" } }).catch(() => 0), this.logItems = []);
86
+ this.logItems.length && n.getInstance()?.authContextProps?.isAuthenticated && (document.location.href.includes("accept-invitation") || (r.getInstance().systemApi.log({ log_items: this.logItems }, { headers: { "X-IGNORE-LOG": "1" } }).catch(() => 0), this.logItems = []));
87
87
  }
88
88
  };
89
89
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/LogService/LogService.ts"],"sourcesContent":["import { isAxiosError } from 'axios';\nimport type {\n AxiosResponse,\n InternalAxiosRequestConfig,\n} from 'axios';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport type { CommonDbExternalLogItem } from '@gen-epix/api-commondb';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\n\nimport { AuthenticationService } from '../AuthenticationService';\nimport { ConfigService } from '../ConfigService';\nimport { ApiService } from '../ApiService';\nimport { AxiosUtil } from '../../../utils/AxiosUtil';\n\ntype LogServiceItem = {\n detail?: unknown;\n duration?: number;\n level: CommonDbLogLevel;\n topic: string;\n};\n\nexport class LogService {\n private static __instance: LogService;\n\n protected readonly requestMap: Map<string, number>;\n\n private logItems: CommonDbExternalLogItem[] = [];\n\n private constructor() {\n this.requestMap = new Map<string, number>();\n setInterval(() => {\n this.sendLog();\n }, ConfigService.getInstance().config.log.LOG_INTERVAL_MS);\n }\n\n public static getInstance(): LogService {\n LogService.__instance = HmrUtil.getHmrSingleton('logService', LogService.__instance, () => new LogService());\n return LogService.__instance;\n }\n\n public flushLog(): void {\n this.sendLog();\n }\n\n public log(items: LogServiceItem[]): void {\n const timestamp = new Date().toISOString();\n const software_version = ConfigService.getInstance().config.getSoftwareVersion();\n this.logItems.push(...items.map<CommonDbExternalLogItem>(item => {\n return {\n command_id: StringUtil.createUuid(),\n detail: item.detail ? JSON.stringify(item.detail) : null,\n duration: item.duration ?? null,\n level: item.level,\n software_version,\n timestamp,\n topic: item.topic ?? null,\n };\n }));\n }\n\n public onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig {\n if (request.headers.has('X-IGNORE-LOG')) {\n return request;\n }\n const requestId = StringUtil.createUuid();\n request.headers.set('X-REQUEST-ID', requestId);\n this.requestMap.set(requestId, new Date().getTime());\n\n this.log([{\n detail: {\n requestData: request.data as unknown,\n requestParams: request.params as unknown,\n url: request.url,\n },\n level: CommonDbLogLevel.TRACE,\n topic: 'REQUEST',\n }]);\n\n return request;\n }\n\n public onResponseFulfilled(response: AxiosResponse): AxiosResponse {\n if (response.config.headers.has('X-IGNORE-LOG')) {\n return response;\n }\n\n const requestId = response?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n\n this.log([{\n detail: {\n requestData: response.config.data as unknown,\n requestParams: response.config.params as unknown,\n url: response.config.url,\n },\n duration,\n level: response.status >= 200 && response.status < 300 ? CommonDbLogLevel.TRACE : CommonDbLogLevel.ERROR,\n topic: 'RESPONSE',\n }]);\n\n return response;\n }\n\n public onResponseRejected(error: unknown): void {\n if (isAxiosError(error)) {\n if (AxiosUtil.isAxiosCanceledError(error)) {\n return;\n }\n const requestId = error?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n this.log([{\n detail: {\n requestParams: error.config.params as unknown,\n responseData: error.response.data as unknown,\n status: error.response.status,\n url: error.config.url,\n },\n duration,\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n } else {\n this.log([{\n detail: {\n error,\n },\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n }\n }\n\n private sendLog(): void {\n if (!this.logItems.length || !AuthenticationService.getInstance()?.authContextProps?.isAuthenticated) {\n return;\n }\n if (document.location.href.includes('accept-invitation')) {\n return;\n }\n ApiService.getInstance().systemApi.log({\n log_items: this.logItems,\n }, {\n headers: {\n 'X-IGNORE-LOG': '1',\n },\n }).catch(() => 0);\n this.logItems = [];\n }\n}\n"],"mappings":";;;;;;;;;AAsBA,IAAa,IAAb,MAAa,EAAW;CACtB,OAAe;CAEf;CAEA,WAA8C,CAAC;CAE/C,cAAsB;EAEpB,AADA,KAAK,6BAAa,IAAI,IAAoB,GAC1C,kBAAkB;GAChB,KAAK,QAAQ;EACf,GAAG,EAAc,YAAY,CAAC,CAAC,OAAO,IAAI,eAAe;CAC3D;CAEA,OAAc,cAA0B;EAEtC,OADA,EAAW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AAiB;GACnG,OAAO;EACT,CAAC,CAAC,GAEK;CACT;CAEA,mBAA0B,GAAsB;EAC9C,IAAI,EAAa,CAAK,GAAG;GACvB,IAAI,EAAU,qBAAqB,CAAK,GACtC;GAEF,IAAM,IAAY,GAAO,QAAQ,QAAQ,IAAI,cAAc,GACrD,qBAAW,IAAI,KAAK,EAAA,CAAE,QAAQ,IAAI,KAAK,WAAW,IAAI,CAAS;GACrE,KAAK,IAAI,CAAC;IACR,QAAQ;KACN,eAAe,EAAM,OAAO;KAC5B,cAAc,EAAM,SAAS;KAC7B,QAAQ,EAAM,SAAS;KACvB,KAAK,EAAM,OAAO;IACpB;IACA;IACA,OAAO,EAAiB;IACxB,OAAO;GACT,CAAC,CAAC;EACJ,OACE,KAAK,IAAI,CAAC;GACR,QAAQ,EACN,SACF;GACA,OAAO,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC;CAEN;CAEA,UAAwB;EAClB,CAAC,KAAK,SAAS,UAAU,CAAC,EAAsB,YAAY,CAAC,EAAE,kBAAkB,mBAGjF,SAAS,SAAS,KAAK,SAAS,mBAAmB,MAGvD,EAAW,YAAY,CAAC,CAAC,UAAU,IAAI,EACrC,WAAW,KAAK,SAClB,GAAG,EACD,SAAS,EACP,gBAAgB,IAClB,EACF,CAAC,CAAC,CAAC,YAAY,CAAC,GAChB,KAAK,WAAW,CAAC;CACnB;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/LogService/LogService.ts"],"sourcesContent":["import { isAxiosError } from 'axios';\nimport type {\n AxiosResponse,\n InternalAxiosRequestConfig,\n} from 'axios';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport type { CommonDbExternalLogItem } from '@gen-epix/api-commondb';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\n\nimport { AuthenticationService } from '../AuthenticationService';\nimport { ConfigService } from '../ConfigService';\nimport { ApiService } from '../ApiService';\nimport { AxiosUtil } from '../../../utils/AxiosUtil';\n\ntype LogServiceItem = {\n detail?: unknown;\n duration?: number;\n level: CommonDbLogLevel;\n topic: string;\n};\n\nexport class LogService {\n private static __instance: LogService;\n\n protected readonly requestMap: Map<string, number>;\n\n private logItems: CommonDbExternalLogItem[] = [];\n\n private constructor() {\n this.requestMap = new Map<string, number>();\n setInterval(() => {\n this.sendLog();\n }, ConfigService.getInstance().config.log.LOG_INTERVAL_MS);\n }\n\n public static getInstance(): LogService {\n LogService.__instance = HmrUtil.getHmrSingleton('logService', LogService.__instance, () => new LogService());\n return LogService.__instance;\n }\n\n public flushLog(): void {\n this.sendLog();\n }\n\n public log(items: LogServiceItem[]): void {\n const timestamp = new Date().toISOString();\n const software_version = ConfigService.getInstance().config.getSoftwareVersion();\n this.logItems.push(...items.map<CommonDbExternalLogItem>(item => {\n return {\n command_id: StringUtil.createUuid(),\n detail: item.detail ? JSON.stringify(item.detail) : null,\n duration: item.duration ?? null,\n level: item.level,\n software_version,\n timestamp,\n topic: item.topic ?? null,\n };\n }));\n }\n\n public onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig {\n if (request.headers.has('X-IGNORE-LOG')) {\n return request;\n }\n const requestId = StringUtil.createUuid();\n request.headers.set('X-REQUEST-ID', requestId);\n this.requestMap.set(requestId, new Date().getTime());\n\n this.log([{\n detail: {\n requestData: request.data as unknown,\n requestParams: request.params as unknown,\n url: request.url,\n },\n level: CommonDbLogLevel.TRACE,\n topic: 'REQUEST',\n }]);\n\n return request;\n }\n\n public onResponseFulfilled(response: AxiosResponse): AxiosResponse {\n if (response.config.headers.has('X-IGNORE-LOG')) {\n return response;\n }\n\n const requestId = response?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n\n this.log([{\n detail: {\n requestData: response.config.data as unknown,\n requestParams: response.config.params as unknown,\n url: response.config.url,\n },\n duration,\n level: response.status >= 200 && response.status < 300 ? CommonDbLogLevel.TRACE : CommonDbLogLevel.ERROR,\n topic: 'RESPONSE',\n }]);\n\n return response;\n }\n\n public onResponseRejected(error: unknown): void {\n if (isAxiosError(error)) {\n if (AxiosUtil.isAxiosCanceledError(error)) {\n return;\n }\n const requestId = error?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n this.log([{\n detail: {\n requestParams: error.config.params as unknown,\n responseData: error.response.data as unknown,\n status: error.response.status,\n url: error.config.url,\n },\n duration,\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n } else {\n this.log([{\n detail: {\n error,\n },\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n }\n }\n\n private sendLog(): void {\n if (!this.logItems.length || !AuthenticationService.getInstance()?.authContextProps?.isAuthenticated) {\n return;\n }\n if (document.location.href.includes('accept-invitation')) {\n return;\n }\n ApiService.getInstance().systemApi.log({\n log_items: this.logItems,\n }, {\n headers: {\n 'X-IGNORE-LOG': '1',\n },\n }).catch(() => 0);\n this.logItems = [];\n }\n}\n"],"mappings":";;;;;;;;;AAsBA,IAAa,IAAb,MAAa,EAAW;CACtB,OAAe;CAEf;CAEA,WAA8C,CAAC;CAE/C,cAAsB;EAEpB,AADA,KAAK,6BAAa,IAAI,IAAoB,GAC1C,kBAAkB;GAChB,KAAK,QAAQ;EACf,GAAG,EAAc,YAAY,CAAC,CAAC,OAAO,IAAI,eAAe;CAC3D;CAEA,OAAc,cAA0B;EAEtC,OADA,EAAW,aAAa,EAAQ,gBAAgB,cAAc,EAAW,kBAAkB,IAAI,EAAW,CAAC,GACpG,EAAW;CACpB;CAEA,WAAwB;EACtB,KAAK,QAAQ;CACf;CAEA,IAAW,GAA+B;EACxC,IAAM,qBAAY,IAAI,KAAK,EAAA,CAAE,YAAY,GACnC,IAAmB,EAAc,YAAY,CAAC,CAAC,OAAO,mBAAmB;EAC/E,KAAK,SAAS,KAAK,GAAG,EAAM,KAA6B,OAChD;G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R,QAAQ;KACN,eAAe,EAAM,OAAO;KAC5B,cAAc,EAAM,SAAS;KAC7B,QAAQ,EAAM,SAAS;KACvB,KAAK,EAAM,OAAO;IACpB;IACA;IACA,OAAO,EAAiB;IACxB,OAAO;GACT,CAAC,CAAC;EACJ,OACE,KAAK,IAAI,CAAC;GACR,QAAQ,EACN,SACF;GACA,OAAO,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC;CAEN;CAEA,UAAwB;EAClB,AAAC,KAAK,SAAS,UAAW,EAAsB,YAAY,CAAC,EAAE,kBAAkB,oBAGjF,SAAS,SAAS,KAAK,SAAS,mBAAmB,MAGvD,EAAW,YAAY,CAAC,CAAC,UAAU,IAAI,EACrC,WAAW,KAAK,SAClB,GAAG,EACD,SAAS,EACP,gBAAgB,IAClB,EACF,CAAC,CAAC,CAAC,YAAY,CAAC,GAChB,KAAK,WAAW,CAAC;CACnB;AACF"}
@@ -1,5 +1,5 @@
1
- import { i as e } from "../../../_chunks/chunk-OB3PAWPO.js";
2
- import { HmrUtil as t } from "@gen-epix/ui-core/utils/HmrUtil";
1
+ import { HmrUtil as e } from "@gen-epix/ui-core/utils/HmrUtil";
2
+ import { createBrowserRouter as t } from "react-router-dom";
3
3
  //#region src/classes/services/RouterService/RouterService.ts
4
4
  var n = class n {
5
5
  static __instance;
@@ -12,7 +12,7 @@ var n = class n {
12
12
  return this.__homePageComponent;
13
13
  }
14
14
  get router() {
15
- return this.__router ||= e(this.routes), this.__router;
15
+ return this.__router ||= t(this.routes), this.__router;
16
16
  }
17
17
  get routes() {
18
18
  if (!this.__routesFactory) throw Error("RouterService not initialized");
@@ -26,7 +26,7 @@ var n = class n {
26
26
  __routesFactory = null;
27
27
  constructor() {}
28
28
  static getInstance() {
29
- return n.__instance = t.getHmrSingleton("routerService", n.__instance, () => new n()), n.__instance;
29
+ return n.__instance = e.getHmrSingleton("routerService", n.__instance, () => new n()), n.__instance;
30
30
  }
31
31
  initialize(e) {
32
32
  if (this.__routesFactory) throw Error("RouterService already initialized");
@@ -1,110 +1,45 @@
1
1
  import { ConfigService as e } from "../../../classes/services/ConfigService/index.js";
2
- import { a as t, r as n } from "../../../_chunks/chunk-OB3PAWPO.js";
3
- import { RouterService as r } from "../../../classes/services/RouterService/index.js";
4
- import { AuthenticationService as i } from "../../../classes/services/AuthenticationService/index.js";
5
- import { ApiService as a } from "../../../classes/services/ApiService/index.js";
6
- import { LogService as o } from "../../../classes/services/LogService/index.js";
7
- import { t as s } from "../../../_chunks/QueryClientProvider.js";
8
- import { t as c } from "../../../_chunks/QueryClientService.js";
9
- import { ErrorPage as l } from "../../../pages/ErrorPage/index.js";
10
- import { BackendVersionService as u } from "../../../classes/services/BackendVersionService/index.js";
11
- import { ApplicationBootstrapWithoutAuthorization as d } from "../ApplicationBootstrapWithoutAuthorization/index.js";
12
- import { EmotionCacheService as f } from "../../../classes/services/EmotionCacheService/index.js";
13
- import { CssBaseline as p, ThemeProvider as m } from "@mui/material";
14
- import * as h from "react";
15
- import { Component as g, createContext as _, createElement as v, useMemo as y } from "react";
16
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
17
- import * as S from "react-dom";
18
- import { UiCoreComponentsContextProvider as C } from "@gen-epix/ui-core-components/context/uiCoreComponentsConfigContext";
19
- import { CacheProvider as w } from "@emotion/react";
20
- //#region ../../node_modules/.pnpm/react-router@7.18.4_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-router/dist/development/dom-export.mjs
21
- function T(e) {
22
- return /* @__PURE__ */ h.createElement(n, {
23
- flushSync: S.flushSync,
24
- ...e
25
- });
26
- }
27
- t();
28
- //#endregion
29
- //#region ../../node_modules/.pnpm/react-error-boundary@6.1.5_@types+react@19.3.0_react@19.3.0/node_modules/react-error-boundary/dist/react-error-boundary.js
30
- var E = _(null), D = {
31
- didCatch: !1,
32
- error: null
33
- }, O = class extends g {
34
- constructor(e) {
35
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = D;
36
- }
37
- static getDerivedStateFromError(e) {
38
- return {
39
- didCatch: !0,
40
- error: e
41
- };
42
- }
43
- resetErrorBoundary(...e) {
44
- let { didCatch: t } = this.state;
45
- t && (this.props.onReset?.({
46
- args: e,
47
- reason: "imperative-api"
48
- }), this.setState(D));
49
- }
50
- componentDidCatch(e, t) {
51
- this.props.onError?.(e, t);
52
- }
53
- componentDidUpdate(e, t) {
54
- let { didCatch: n } = this.state, { resetKeys: r } = this.props;
55
- n && t.didCatch && k(e.resetKeys, r) && (this.props.onReset?.({
56
- next: r,
57
- prev: e.resetKeys,
58
- reason: "keys"
59
- }), this.setState(D));
60
- }
61
- render() {
62
- let { children: e, fallbackRender: t, FallbackComponent: n, fallback: r } = this.props, { didCatch: i, error: a } = this.state, o = e;
63
- if (i) {
64
- let e = {
65
- error: a,
66
- resetErrorBoundary: this.resetErrorBoundary
67
- };
68
- if (typeof t == "function") o = t(e);
69
- else if (n) o = v(n, e);
70
- else if (r !== void 0) o = r;
71
- else throw a;
72
- }
73
- return v(E.Provider, { value: {
74
- didCatch: i,
75
- error: a,
76
- resetErrorBoundary: this.resetErrorBoundary
77
- } }, o);
78
- }
79
- };
80
- function k(e = [], t = []) {
81
- return e.length !== t.length || e.some((e, n) => !Object.is(e, t[n]));
82
- }
83
- //#endregion
2
+ import { RouterService as t } from "../../../classes/services/RouterService/index.js";
3
+ import { AuthenticationService as n } from "../../../classes/services/AuthenticationService/index.js";
4
+ import { ApiService as r } from "../../../classes/services/ApiService/index.js";
5
+ import { LogService as i } from "../../../classes/services/LogService/index.js";
6
+ import { t as a } from "../../../_chunks/QueryClientProvider.js";
7
+ import { t as o } from "../../../_chunks/QueryClientService.js";
8
+ import { ErrorPage as s } from "../../../pages/ErrorPage/index.js";
9
+ import { BackendVersionService as c } from "../../../classes/services/BackendVersionService/index.js";
10
+ import { ApplicationBootstrapWithoutAuthorization as l } from "../ApplicationBootstrapWithoutAuthorization/index.js";
11
+ import { EmotionCacheService as u } from "../../../classes/services/EmotionCacheService/index.js";
12
+ import { CssBaseline as d, ThemeProvider as f } from "@mui/material";
13
+ import { useMemo as p } from "react";
14
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
15
+ import { RouterProvider as g } from "react-router-dom";
16
+ import { UiCoreComponentsContextProvider as _ } from "@gen-epix/ui-core-components/context/uiCoreComponentsConfigContext";
17
+ import { CacheProvider as v } from "@emotion/react";
18
+ import { ErrorBoundary as y } from "react-error-boundary";
84
19
  //#region src/components/app/AppRouterProvider/AppRouterProvider.tsx
85
- var A = () => /* @__PURE__ */ b(T, { router: r.getInstance().router }), j = () => {
86
- let { config: t } = e.getInstance(), n = y(() => {
20
+ var b = () => /* @__PURE__ */ m(g, { router: t.getInstance().router }), x = () => {
21
+ let { config: t } = e.getInstance(), g = p(() => {
87
22
  let { DEFAULT_CIRCULAR_PROGRESS_SIZE: e, DEFAULT_TAKING_LONGER_TIMEOUT_MS: n } = t.spinner;
88
23
  return { spinner: {
89
24
  defaultCircularProgressSize: e,
90
25
  defaultTakingLongerTimeoutMs: n
91
26
  } };
92
- }, [t.spinner]), r = i.getInstance(), h = o.getInstance(), g = t.getTouchIconUrl();
93
- g && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", g);
94
- let _ = a.getInstance();
95
- _.api.baseUrl = t.getAPIBaseUrl(), _.api.defaultRequestTimeout = t.defaultRequestTimeout, _.api.onRequest = [r.onRequest.bind(r), h.onRequest.bind(h)], _.api.onResponseFulfilled = [h.onResponseFulfilled.bind(h), u.getInstance().onResponseFulfilled.bind(u.getInstance())], _.api.onResponseRejected = [h.onResponseRejected.bind(h), r.onResponseRejected.bind(r)];
96
- let v = c.getInstance(), S = f.getInstance();
97
- return /* @__PURE__ */ b(C, {
98
- config: n,
99
- children: /* @__PURE__ */ b(s, {
100
- client: v.queryClient,
101
- children: /* @__PURE__ */ b(w, {
102
- value: S.emotionCache,
103
- children: /* @__PURE__ */ x(m, {
27
+ }, [t.spinner]), x = n.getInstance(), S = i.getInstance(), C = t.getTouchIconUrl();
28
+ C && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", C);
29
+ let w = r.getInstance();
30
+ w.api.baseUrl = t.getAPIBaseUrl(), w.api.defaultRequestTimeout = t.defaultRequestTimeout, w.api.onRequest = [x.onRequest.bind(x), S.onRequest.bind(S)], w.api.onResponseFulfilled = [S.onResponseFulfilled.bind(S), c.getInstance().onResponseFulfilled.bind(c.getInstance())], w.api.onResponseRejected = [S.onResponseRejected.bind(S), x.onResponseRejected.bind(x)];
31
+ let T = o.getInstance(), E = u.getInstance();
32
+ return /* @__PURE__ */ m(_, {
33
+ config: g,
34
+ children: /* @__PURE__ */ m(a, {
35
+ client: T.queryClient,
36
+ children: /* @__PURE__ */ m(v, {
37
+ value: E.emotionCache,
38
+ children: /* @__PURE__ */ h(f, {
104
39
  theme: e.getInstance().config.theme,
105
- children: [/* @__PURE__ */ b(p, {}), /* @__PURE__ */ b(O, {
106
- FallbackComponent: l,
107
- children: /* @__PURE__ */ b(d, { children: /* @__PURE__ */ b(A, {}) })
40
+ children: [/* @__PURE__ */ m(d, {}), /* @__PURE__ */ m(y, {
41
+ FallbackComponent: s,
42
+ children: /* @__PURE__ */ m(l, { children: /* @__PURE__ */ m(b, {}) })
108
43
  })]
109
44
  })
110
45
  })
@@ -112,6 +47,6 @@ var A = () => /* @__PURE__ */ b(T, { router: r.getInstance().router }), j = () =
112
47
  });
113
48
  };
114
49
  //#endregion
115
- export { j as App };
50
+ export { x as App };
116
51
 
117
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createContext","y","f","d"],"sources":["../../../../../../node_modules/.pnpm/react-router@7.18.4_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-router/dist/development/dom-export.mjs","../../../../../../node_modules/.pnpm/react-error-boundary@6.1.5_@types+react@19.3.0_react@19.3.0/node_modules/react-error-boundary/dist/react-error-boundary.js","../../../../src/components/app/AppRouterProvider/AppRouterProvider.tsx","../../../../src/components/app/App/App.tsx"],"sourcesContent":["/**\n * react-router v7.18.4\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n\"use client\";\nimport {\n RSCRouterGlobalErrorBoundary,\n getHydrationData,\n populateRSCRouteModules\n} from \"./chunk-H4DAEOV7.mjs\";\nimport {\n CRITICAL_CSS_DATA_ATTRIBUTE,\n ErrorResponseImpl,\n FrameworkContext,\n PROTOCOL_RELATIVE_URL_REGEX,\n RSCRouterContext,\n RemixErrorBoundary,\n RouterProvider,\n URL_LIMIT,\n createBrowserHistory,\n createClientRoutes,\n createClientRoutesWithHMRRevalidationOptOut,\n createContext,\n createRequestInit,\n createRouter,\n decodeViaTurboStream,\n getPatchRoutesOnNavigationFunction,\n getPathsWithAncestors,\n getSingleFetchDataStrategyImpl,\n getTurboStreamSingleFetchDataStrategy,\n hasInvalidProtocol,\n hydrationRouteProperties,\n invariant,\n isMutationMethod,\n mapRouteProperties,\n noActionDefinedError,\n resolvePath,\n setIsHydrated,\n shouldHydrateRouteLoader,\n singleFetchUrl,\n stripIndexParam,\n useFogOFWarDiscovery,\n validateNavigationTarget\n} from \"./chunk-OB3PAWPO.mjs\";\n\n// lib/dom-export/dom-router-provider.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nfunction RouterProvider2(props) {\n return /* @__PURE__ */ React.createElement(RouterProvider, { flushSync: ReactDOM.flushSync, ...props });\n}\n\n// lib/dom-export/hydrated-router.tsx\nimport * as React2 from \"react\";\nvar ssrInfo = null;\nvar router = null;\nfunction initSsrInfo() {\n if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {\n if (window.__reactRouterManifest.sri === true) {\n const importMap = document.querySelector(\"script[rr-importmap]\");\n if (importMap?.textContent) {\n try {\n window.__reactRouterManifest.sri = JSON.parse(\n importMap.textContent\n ).integrity;\n } catch (err) {\n console.error(\"Failed to parse import map\", err);\n }\n }\n }\n ssrInfo = {\n context: window.__reactRouterContext,\n manifest: window.__reactRouterManifest,\n routeModules: window.__reactRouterRouteModules,\n stateDecodingPromise: void 0,\n router: void 0,\n routerInitialized: false\n };\n }\n}\nfunction createHydratedRouter({\n getContext,\n instrumentations\n}) {\n initSsrInfo();\n if (!ssrInfo) {\n throw new Error(\n \"You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`\"\n );\n }\n let localSsrInfo = ssrInfo;\n if (!ssrInfo.stateDecodingPromise) {\n let stream = ssrInfo.context.stream;\n invariant(stream, \"No stream found for single fetch decoding\");\n ssrInfo.context.stream = void 0;\n ssrInfo.stateDecodingPromise = decodeViaTurboStream(stream, window).then((value) => {\n ssrInfo.context.state = value.value;\n localSsrInfo.stateDecodingPromise.value = true;\n }).catch((e) => {\n localSsrInfo.stateDecodingPromise.error = e;\n });\n }\n if (ssrInfo.stateDecodingPromise.error) {\n throw ssrInfo.stateDecodingPromise.error;\n }\n if (!ssrInfo.stateDecodingPromise.value) {\n throw ssrInfo.stateDecodingPromise;\n }\n let routes = createClientRoutes(\n ssrInfo.manifest.routes,\n ssrInfo.routeModules,\n ssrInfo.context.state,\n ssrInfo.context.ssr,\n ssrInfo.context.isSpaMode\n );\n let hydrationData = void 0;\n if (ssrInfo.context.isSpaMode) {\n let { loaderData } = ssrInfo.context.state;\n if (ssrInfo.manifest.routes.root?.hasLoader && loaderData && \"root\" in loaderData) {\n hydrationData = {\n loaderData: {\n root: loaderData.root\n }\n };\n }\n } else {\n hydrationData = getHydrationData({\n state: ssrInfo.context.state,\n routes,\n getRouteInfo: (routeId) => ({\n clientLoader: ssrInfo.routeModules[routeId]?.clientLoader,\n hasLoader: ssrInfo.manifest.routes[routeId]?.hasLoader === true,\n hasHydrateFallback: ssrInfo.routeModules[routeId]?.HydrateFallback != null\n }),\n location: window.location,\n basename: window.__reactRouterContext?.basename,\n isSpaMode: ssrInfo.context.isSpaMode\n });\n }\n if (window.history.state && window.history.state.masked) {\n window.history.replaceState(\n { ...window.history.state, masked: void 0 },\n \"\"\n );\n }\n let router2 = createRouter({\n routes,\n history: createBrowserHistory(),\n basename: ssrInfo.context.basename,\n getContext,\n hydrationData,\n hydrationRouteProperties,\n instrumentations,\n mapRouteProperties,\n future: {\n v8_passThroughRequests: ssrInfo.context.future.v8_passThroughRequests\n },\n dataStrategy: getTurboStreamSingleFetchDataStrategy(\n () => router2,\n ssrInfo.manifest,\n ssrInfo.routeModules,\n ssrInfo.context.ssr,\n ssrInfo.context.basename,\n ssrInfo.context.future.v8_trailingSlashAwareDataRequests\n ),\n patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(\n () => router2,\n ssrInfo.manifest,\n ssrInfo.routeModules,\n ssrInfo.context.ssr,\n ssrInfo.context.routeDiscovery,\n ssrInfo.context.isSpaMode,\n ssrInfo.context.basename\n )\n });\n ssrInfo.router = router2;\n if (router2.state.initialized) {\n ssrInfo.routerInitialized = true;\n router2.initialize();\n }\n router2.createRoutesForHMR = /* spacer so ts-ignore does not affect the right hand of the assignment */\n createClientRoutesWithHMRRevalidationOptOut;\n window.__reactRouterDataRouter = router2;\n return router2;\n}\nfunction HydratedRouter(props) {\n if (!router) {\n router = createHydratedRouter({\n getContext: props.getContext,\n instrumentations: props.instrumentations\n });\n }\n let [criticalCss, setCriticalCss] = React2.useState(\n process.env.NODE_ENV === \"development\" ? ssrInfo?.context.criticalCss : void 0\n );\n React2.useEffect(() => {\n if (process.env.NODE_ENV === \"development\") {\n setCriticalCss(void 0);\n }\n }, []);\n React2.useEffect(() => {\n if (process.env.NODE_ENV === \"development\" && criticalCss === void 0) {\n document.querySelectorAll(`[${CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());\n }\n }, [criticalCss]);\n let [location2, setLocation] = React2.useState(router.state.location);\n React2.useLayoutEffect(() => {\n if (ssrInfo && ssrInfo.router && !ssrInfo.routerInitialized) {\n ssrInfo.routerInitialized = true;\n ssrInfo.router.initialize();\n }\n }, []);\n React2.useLayoutEffect(() => {\n if (ssrInfo && ssrInfo.router) {\n return ssrInfo.router.subscribe((newState) => {\n if (newState.location !== location2) {\n setLocation(newState.location);\n }\n });\n }\n }, [location2]);\n invariant(ssrInfo, \"ssrInfo unavailable for HydratedRouter\");\n useFogOFWarDiscovery(\n router,\n ssrInfo.manifest,\n ssrInfo.routeModules,\n ssrInfo.context.ssr,\n ssrInfo.context.routeDiscovery,\n ssrInfo.context.isSpaMode\n );\n return (\n // This fragment is important to ensure we match the <ServerRouter> JSX\n // structure so that useId values hydrate correctly\n /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(\n FrameworkContext.Provider,\n {\n value: {\n manifest: ssrInfo.manifest,\n routeModules: ssrInfo.routeModules,\n future: ssrInfo.context.future,\n criticalCss,\n ssr: ssrInfo.context.ssr,\n isSpaMode: ssrInfo.context.isSpaMode,\n routeDiscovery: ssrInfo.context.routeDiscovery\n }\n },\n /* @__PURE__ */ React2.createElement(RemixErrorBoundary, { location: location2 }, /* @__PURE__ */ React2.createElement(\n RouterProvider2,\n {\n router,\n useTransitions: props.useTransitions,\n onError: props.onError\n }\n ))\n ), /* @__PURE__ */ React2.createElement(React2.Fragment, null))\n );\n}\n\n// lib/rsc/browser.tsx\nimport * as React3 from \"react\";\nimport * as ReactDOM2 from \"react-dom\";\nvar defaultManifestPath = \"/__manifest\";\nfunction createCallServer({\n createFromReadableStream,\n createTemporaryReferenceSet,\n encodeReply,\n fetch: fetchImplementation = fetch\n}) {\n const globalVar = window;\n let landedActionId = 0;\n return async (id, args) => {\n let actionId = globalVar.__routerActionID = (globalVar.__routerActionID ?? (globalVar.__routerActionID = 0)) + 1;\n const temporaryReferences = createTemporaryReferenceSet();\n const payloadPromise = fetchImplementation(\n new Request(location.href, {\n body: await encodeReply(args, { temporaryReferences }),\n method: \"POST\",\n headers: {\n Accept: \"text/x-component\",\n \"rsc-action-id\": id\n }\n })\n ).then((response) => {\n if (!response.body) {\n throw new Error(\"No response body\");\n }\n return createFromReadableStream(response.body, {\n temporaryReferences\n });\n });\n React3.startTransition(\n () => (\n // @ts-expect-error - Needs React 19 types\n Promise.resolve(payloadPromise).then(async (payload) => {\n if (payload.type === \"redirect\") {\n let location2 = normalizeRedirectLocation(payload.location);\n validateNavigationTarget(\n payload.location,\n location2,\n new URL(window.location.href),\n \"allow-explicit\"\n );\n if (payload.reload || isExternalLocation(location2)) {\n if (hasInvalidProtocol(location2)) {\n throw new Error(\"Invalid redirect location\");\n }\n window.location.href = location2;\n return;\n }\n React3.startTransition(() => {\n globalVar.__reactRouterDataRouter.navigate(location2, {\n replace: payload.replace\n });\n });\n return;\n }\n if (payload.type !== \"action\") {\n throw new Error(\"Unexpected payload type\");\n }\n const rerender = await payload.rerender;\n if (rerender && landedActionId < actionId && globalVar.__routerActionID <= actionId) {\n if (rerender.type === \"redirect\") {\n let location2 = normalizeRedirectLocation(rerender.location);\n validateNavigationTarget(\n rerender.location,\n location2,\n new URL(window.location.href),\n \"allow-explicit\"\n );\n if (rerender.reload || isExternalLocation(location2)) {\n if (hasInvalidProtocol(location2)) {\n throw new Error(\"Invalid redirect location\");\n }\n window.location.href = location2;\n return;\n }\n React3.startTransition(() => {\n globalVar.__reactRouterDataRouter.navigate(location2, {\n replace: rerender.replace\n });\n });\n return;\n }\n React3.startTransition(() => {\n let lastMatch;\n for (const match of rerender.matches) {\n globalVar.__reactRouterDataRouter.patchRoutes(\n lastMatch?.id ?? null,\n [createRouteFromServerManifest(match)],\n true\n );\n lastMatch = match;\n }\n window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(\n {\n loaderData: Object.assign(\n {},\n globalVar.__reactRouterDataRouter.state.loaderData,\n rerender.loaderData\n ),\n errors: rerender.errors ? Object.assign(\n {},\n globalVar.__reactRouterDataRouter.state.errors,\n rerender.errors\n ) : null\n }\n );\n });\n }\n }).catch(() => {\n })\n )\n );\n return payloadPromise.then((payload) => {\n if (payload.type !== \"action\" && payload.type !== \"redirect\") {\n throw new Error(\"Unexpected payload type\");\n }\n return payload.actionResult;\n });\n };\n}\nfunction createRouterFromPayload({\n fetchImplementation,\n createFromReadableStream,\n getContext,\n payload\n}) {\n const globalVar = window;\n if (globalVar.__reactRouterDataRouter && globalVar.__reactRouterRouteModules)\n return {\n router: globalVar.__reactRouterDataRouter,\n routeModules: globalVar.__reactRouterRouteModules\n };\n if (payload.type !== \"render\") throw new Error(\"Invalid payload type\");\n globalVar.__reactRouterRouteModules = globalVar.__reactRouterRouteModules ?? {};\n populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);\n let routes = payload.matches.reduceRight((previous, match) => {\n const route = createRouteFromServerManifest(\n match,\n payload\n );\n if (previous.length > 0) {\n route.children = previous;\n } else if (!route.index) {\n route.children = [];\n }\n return [route];\n }, []);\n let applyPatchesPromise;\n globalVar.__reactRouterDataRouter = createRouter({\n routes,\n getContext,\n basename: payload.basename,\n history: createBrowserHistory(),\n hydrationData: getHydrationData({\n state: {\n loaderData: payload.loaderData,\n actionData: payload.actionData,\n errors: payload.errors\n },\n routes,\n getRouteInfo: (routeId) => {\n let match = payload.matches.find((m) => m.id === routeId);\n invariant(match, \"Route not found in payload\");\n return {\n clientLoader: match.clientLoader,\n hasLoader: match.hasLoader,\n hasHydrateFallback: match.hydrateFallbackElement != null\n };\n },\n location: payload.location,\n basename: payload.basename,\n isSpaMode: false\n }),\n async patchRoutesOnNavigation({ path, signal }) {\n if (payload.routeDiscovery.mode === \"initial\") {\n if (!applyPatchesPromise) {\n applyPatchesPromise = (async () => {\n if (!payload.patches) return;\n let patches = await payload.patches;\n React3.startTransition(() => {\n patches.forEach((p) => {\n window.__reactRouterDataRouter.patchRoutes(p.parentId ?? null, [\n createRouteFromServerManifest(p)\n ]);\n });\n });\n })();\n }\n await applyPatchesPromise;\n return;\n }\n if (discoveredPaths.has(path)) {\n return;\n }\n await fetchAndApplyManifestPatches(\n [path],\n createFromReadableStream,\n fetchImplementation,\n signal\n );\n },\n // FIXME: Pass `build.ssr` into this function\n dataStrategy: getRSCSingleFetchDataStrategy(\n () => globalVar.__reactRouterDataRouter,\n true,\n payload.basename,\n createFromReadableStream,\n fetchImplementation\n )\n });\n if (globalVar.__reactRouterDataRouter.state.initialized) {\n globalVar.__routerInitialized = true;\n globalVar.__reactRouterDataRouter.initialize();\n } else {\n globalVar.__routerInitialized = false;\n }\n let lastLoaderData = void 0;\n globalVar.__reactRouterDataRouter.subscribe(({ loaderData, actionData }) => {\n if (lastLoaderData !== loaderData) {\n globalVar.__routerActionID = (globalVar.__routerActionID ?? (globalVar.__routerActionID = 0)) + 1;\n }\n });\n globalVar.__reactRouterDataRouter._updateRoutesForHMR = (routeUpdateByRouteId) => {\n const oldRoutes = window.__reactRouterDataRouter.routes;\n const newRoutes = [];\n function walkRoutes(routes2, parentId) {\n return routes2.map((route) => {\n const routeUpdate = routeUpdateByRouteId.get(route.id);\n if (routeUpdate) {\n const {\n routeModule,\n hasAction,\n hasComponent,\n hasErrorBoundary,\n hasLoader\n } = routeUpdate;\n const newRoute = createRouteFromServerManifest({\n clientAction: routeModule.clientAction,\n clientLoader: routeModule.clientLoader,\n element: route.element,\n errorElement: route.errorElement,\n handle: route.handle,\n hasAction,\n hasComponent,\n hasErrorBoundary,\n hasLoader,\n hydrateFallbackElement: route.hydrateFallbackElement,\n id: route.id,\n index: route.index,\n links: routeModule.links,\n meta: routeModule.meta,\n parentId,\n path: route.path,\n shouldRevalidate: routeModule.shouldRevalidate\n });\n if (route.children) {\n newRoute.children = walkRoutes(route.children, route.id);\n }\n return newRoute;\n }\n const updatedRoute = { ...route };\n if (route.children) {\n updatedRoute.children = walkRoutes(route.children, route.id);\n }\n return updatedRoute;\n });\n }\n newRoutes.push(\n ...walkRoutes(oldRoutes, void 0)\n );\n window.__reactRouterDataRouter._internalSetRoutes(newRoutes);\n };\n return {\n router: globalVar.__reactRouterDataRouter,\n routeModules: globalVar.__reactRouterRouteModules\n };\n}\nvar renderedRoutesContext = createContext();\nfunction getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {\n let dataStrategy = getSingleFetchDataStrategyImpl(\n getRouter,\n (match) => {\n let M = match;\n return {\n hasLoader: M.route.hasLoader,\n hasClientLoader: M.route.hasClientLoader,\n hasComponent: M.route.hasComponent,\n hasAction: M.route.hasAction,\n hasClientAction: M.route.hasClientAction\n };\n },\n // pass map into fetchAndDecode so it can add payloads\n getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation),\n ssr,\n basename,\n // .rsc requests are always trailing slash aware\n true,\n // If the route has a component but we don't have an element, we need to hit\n // the server loader flow regardless of whether the client loader calls\n // `serverLoader` or not, otherwise we'll have nothing to render.\n (match) => {\n let M = match;\n return M.route.hasComponent && !M.route.element;\n }\n );\n return async (args) => args.runClientMiddleware(async () => {\n let context = args.context;\n context.set(renderedRoutesContext, []);\n let results = await dataStrategy(args);\n const renderedRoutesById = /* @__PURE__ */ new Map();\n for (const route of context.get(renderedRoutesContext)) {\n if (!renderedRoutesById.has(route.id)) {\n renderedRoutesById.set(route.id, []);\n }\n renderedRoutesById.get(route.id).push(route);\n }\n React3.startTransition(() => {\n for (const match of args.matches) {\n const renderedRoutes = renderedRoutesById.get(match.route.id);\n if (renderedRoutes) {\n for (const rendered of renderedRoutes) {\n window.__reactRouterDataRouter.patchRoutes(\n rendered.parentId ?? null,\n [createRouteFromServerManifest(rendered)],\n true\n );\n }\n }\n }\n });\n return results;\n });\n}\nfunction getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {\n return async (args, basename, trailingSlashAware, targetRoutes) => {\n let { request, context } = args;\n let url = singleFetchUrl(request.url, basename, trailingSlashAware, \"rsc\");\n if (request.method === \"GET\") {\n url = stripIndexParam(url);\n if (targetRoutes) {\n url.searchParams.set(\"_routes\", targetRoutes.join(\",\"));\n }\n }\n let res = await fetchImplementation(\n new Request(url, await createRequestInit(request))\n );\n if (res.status >= 400 && !res.headers.has(\"X-Remix-Response\")) {\n throw new ErrorResponseImpl(res.status, res.statusText, await res.text());\n }\n invariant(res.body, \"No response body to decode\");\n try {\n const payload = await createFromReadableStream(res.body, {\n temporaryReferences: void 0\n });\n if (payload.type === \"redirect\") {\n return {\n status: res.status,\n data: {\n redirect: {\n redirect: payload.location,\n reload: payload.reload,\n replace: payload.replace,\n revalidate: false,\n status: payload.status\n }\n }\n };\n }\n if (payload.type !== \"render\") {\n throw new Error(\"Unexpected payload type\");\n }\n context.get(renderedRoutesContext).push(...payload.matches);\n let results = { routes: {} };\n const dataKey = isMutationMethod(request.method) ? \"actionData\" : \"loaderData\";\n for (let [routeId, data] of Object.entries(payload[dataKey] || {})) {\n results.routes[routeId] = { data };\n }\n if (payload.errors) {\n for (let [routeId, error] of Object.entries(payload.errors)) {\n results.routes[routeId] = { error };\n }\n }\n return { status: res.status, data: results };\n } catch (cause) {\n throw new Error(\"Unable to decode RSC response\", { cause });\n }\n };\n}\nfunction RSCHydratedRouter({\n createFromReadableStream,\n fetch: fetchImplementation = fetch,\n payload,\n getContext\n}) {\n if (payload.type !== \"render\") throw new Error(\"Invalid payload type\");\n let { routeDiscovery } = payload;\n let { router: router2, routeModules } = React3.useMemo(\n () => createRouterFromPayload({\n payload,\n fetchImplementation,\n getContext,\n createFromReadableStream\n }),\n [createFromReadableStream, payload, fetchImplementation, getContext]\n );\n React3.useEffect(() => {\n setIsHydrated();\n }, []);\n React3.useLayoutEffect(() => {\n const globalVar = window;\n if (!globalVar.__routerInitialized) {\n globalVar.__routerInitialized = true;\n globalVar.__reactRouterDataRouter.initialize();\n }\n }, []);\n let [{ routes, state }, setState] = React3.useState(() => ({\n routes: cloneRoutes(router2.routes),\n state: router2.state\n }));\n React3.useLayoutEffect(\n () => router2.subscribe((newState) => {\n if (diffRoutes(router2.routes, routes))\n React3.startTransition(() => {\n setState({\n routes: cloneRoutes(router2.routes),\n state: newState\n });\n });\n }),\n [router2.subscribe, routes, router2]\n );\n const transitionEnabledRouter = React3.useMemo(\n () => ({\n ...router2,\n state,\n routes\n }),\n [router2, routes, state]\n );\n React3.useEffect(() => {\n if (routeDiscovery.mode === \"initial\" || // @ts-expect-error - TS doesn't know about this yet\n window.navigator?.connection?.saveData === true) {\n return;\n }\n function registerElement(el) {\n let path = el.tagName === \"FORM\" ? el.getAttribute(\"action\") : el.getAttribute(\"href\");\n if (!path) {\n return;\n }\n let pathname = el.tagName === \"A\" ? el.pathname : new URL(path, window.location.origin).pathname;\n if (!discoveredPaths.has(pathname)) {\n nextPaths.add(pathname);\n }\n }\n async function fetchPatches() {\n document.querySelectorAll(\"a[data-discover], form[data-discover]\").forEach(registerElement);\n let paths = Array.from(nextPaths.keys()).filter((path) => {\n if (discoveredPaths.has(path)) {\n nextPaths.delete(path);\n return false;\n }\n return true;\n });\n if (paths.length === 0) {\n return;\n }\n try {\n await fetchAndApplyManifestPatches(\n paths,\n createFromReadableStream,\n fetchImplementation\n );\n } catch (e) {\n console.error(\"Failed to fetch manifest patches\", e);\n }\n }\n let debouncedFetchPatches = debounce(fetchPatches, 100);\n fetchPatches();\n let observer = new MutationObserver(() => debouncedFetchPatches());\n observer.observe(document.documentElement, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: [\"data-discover\", \"href\", \"action\"]\n });\n }, [routeDiscovery, createFromReadableStream, fetchImplementation]);\n const frameworkContext = {\n future: {\n // These flags have no runtime impact so can always be false. If we add\n // flags that drive runtime behavior they'll need to be proxied through.\n v8_middleware: false,\n v8_trailingSlashAwareDataRequests: true,\n // always on for RSC\n v8_passThroughRequests: true\n // always on for RSC\n },\n isSpaMode: false,\n ssr: true,\n criticalCss: \"\",\n manifest: {\n routes: {},\n version: \"1\",\n url: \"\",\n entry: {\n module: \"\",\n imports: []\n }\n },\n routeDiscovery: payload.routeDiscovery.mode === \"initial\" ? { mode: \"initial\", manifestPath: defaultManifestPath } : {\n mode: \"lazy\",\n manifestPath: payload.routeDiscovery.manifestPath || defaultManifestPath\n },\n routeModules\n };\n return /* @__PURE__ */ React3.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(\n RouterProvider,\n {\n router: transitionEnabledRouter,\n flushSync: ReactDOM2.flushSync\n }\n ))));\n}\nfunction createRouteFromServerManifest(match, payload) {\n let hasInitialData = payload && match.id in payload.loaderData;\n let initialData = payload?.loaderData[match.id];\n let hasInitialError = payload?.errors && match.id in payload.errors;\n let initialError = payload?.errors?.[match.id];\n let isHydrationRequest = match.clientLoader?.hydrate === true || !match.hasLoader || // If the route has a component but we don't have an element, we need to hit\n // the server loader flow regardless of whether the client loader calls\n // `serverLoader` or not, otherwise we'll have nothing to render.\n match.hasComponent && !match.element;\n invariant(window.__reactRouterRouteModules);\n populateRSCRouteModules(window.__reactRouterRouteModules, match);\n let dataRoute = {\n id: match.id,\n element: match.element,\n errorElement: match.errorElement,\n handle: match.handle,\n hasErrorBoundary: match.hasErrorBoundary,\n hydrateFallbackElement: match.hydrateFallbackElement,\n index: match.index,\n loader: match.clientLoader ? async (args, singleFetch) => {\n let _isHydrationRequest = isHydrationRequest;\n isHydrationRequest = false;\n let result = await match.clientLoader({\n ...args,\n serverLoader: () => {\n preventInvalidServerHandlerCall(\n \"loader\",\n match.id,\n match.hasLoader\n );\n if (_isHydrationRequest) {\n if (hasInitialData) {\n return initialData;\n }\n if (hasInitialError) {\n throw initialError;\n }\n }\n return callSingleFetch(singleFetch);\n }\n });\n return result;\n } : (\n // We always make the call in this RSC world since even if we don't\n // have a `loader` we may need to get the `element` implementation\n (_, singleFetch) => callSingleFetch(singleFetch)\n ),\n action: match.clientAction ? (args, singleFetch) => match.clientAction({\n ...args,\n serverAction: async () => {\n preventInvalidServerHandlerCall(\n \"action\",\n match.id,\n match.hasLoader\n );\n return await callSingleFetch(singleFetch);\n }\n }) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {\n throw noActionDefinedError(\"action\", match.id);\n },\n path: match.path,\n shouldRevalidate: match.shouldRevalidate,\n // We always have a \"loader\" in this RSC world since even if we don't\n // have a `loader` we may need to get the `element` implementation\n hasLoader: true,\n hasClientLoader: match.clientLoader != null,\n hasAction: match.hasAction,\n hasClientAction: match.clientAction != null\n };\n if (typeof dataRoute.loader === \"function\") {\n dataRoute.loader.hydrate = shouldHydrateRouteLoader(\n match.id,\n match.clientLoader,\n match.hasLoader,\n false\n );\n }\n return dataRoute;\n}\nfunction callSingleFetch(singleFetch) {\n invariant(typeof singleFetch === \"function\", \"Invalid singleFetch parameter\");\n return singleFetch();\n}\nfunction preventInvalidServerHandlerCall(type, routeId, hasHandler) {\n if (!hasHandler) {\n let fn = type === \"action\" ? \"serverAction()\" : \"serverLoader()\";\n let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: \"${routeId}\")`;\n console.error(msg);\n throw new ErrorResponseImpl(400, \"Bad Request\", new Error(msg), true);\n }\n}\nvar nextPaths = /* @__PURE__ */ new Set();\nvar discoveredPathsMaxSize = 1e3;\nvar discoveredPaths = /* @__PURE__ */ new Set();\nfunction getManifestUrl(paths) {\n if (paths.length === 0) {\n return null;\n }\n if (paths.length === 1) {\n return new URL(`${paths[0]}.manifest`, window.location.origin);\n }\n const globalVar = window;\n let basename = (globalVar.__reactRouterDataRouter.basename ?? \"\").replace(\n /^\\/|\\/$/g,\n \"\"\n );\n let url = new URL(`${basename}/.manifest`, window.location.origin);\n url.searchParams.set(\"paths\", paths.sort().join(\",\"));\n return url;\n}\nasync function fetchAndApplyManifestPatches(paths, createFromReadableStream, fetchImplementation, signal) {\n paths = getPathsWithAncestors(paths);\n let url = getManifestUrl(paths);\n if (url == null) {\n return;\n }\n if (url.toString().length > URL_LIMIT) {\n nextPaths.clear();\n return;\n }\n let response = await fetchImplementation(new Request(url, { signal }));\n if (!response.body || response.status < 200 || response.status >= 300) {\n throw new Error(\"Unable to fetch new route matches from the server\");\n }\n let payload = await createFromReadableStream(response.body, {\n temporaryReferences: void 0\n });\n if (payload.type !== \"manifest\") {\n throw new Error(\"Failed to patch routes\");\n }\n paths.forEach((p) => addToFifoQueue(p, discoveredPaths));\n let patches = await payload.patches;\n React3.startTransition(() => {\n patches.forEach((p) => {\n window.__reactRouterDataRouter.patchRoutes(\n p.parentId ?? null,\n [createRouteFromServerManifest(p)]\n );\n });\n });\n}\nfunction addToFifoQueue(path, queue) {\n if (queue.size >= discoveredPathsMaxSize) {\n let first = queue.values().next().value;\n if (typeof first === \"string\") queue.delete(first);\n }\n queue.add(path);\n}\nfunction debounce(callback, wait) {\n let timeoutId;\n return (...args) => {\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(() => callback(...args), wait);\n };\n}\nfunction isExternalLocation(location2) {\n const newLocation = new URL(location2, window.location.href);\n return newLocation.origin !== window.location.origin;\n}\nfunction normalizeRedirectLocation(location2) {\n if (PROTOCOL_RELATIVE_URL_REGEX.test(location2)) {\n let path = resolvePath(location2);\n return path.pathname + path.search + path.hash;\n }\n return location2;\n}\nfunction cloneRoutes(routes) {\n if (!routes) return void 0;\n return routes.map((route) => ({\n ...route,\n children: cloneRoutes(route.children)\n }));\n}\nfunction diffRoutes(a, b) {\n if (a.length !== b.length) return true;\n return a.some((route, index) => {\n if (route.element !== b[index].element) return true;\n if (route.errorElement !== b[index].errorElement)\n return true;\n if (route.hydrateFallbackElement !== b[index].hydrateFallbackElement)\n return true;\n if (route.hasErrorBoundary !== b[index].hasErrorBoundary)\n return true;\n if (route.hasLoader !== b[index].hasLoader) return true;\n if (route.hasClientLoader !== b[index].hasClientLoader)\n return true;\n if (route.hasAction !== b[index].hasAction) return true;\n if (route.hasClientAction !== b[index].hasClientAction)\n return true;\n return diffRoutes(route.children || [], b[index].children || []);\n });\n}\n\n// lib/rsc/html-stream/browser.ts\nfunction getRSCStream() {\n let encoder = new TextEncoder();\n let streamController = null;\n let rscStream = new ReadableStream({\n start(controller) {\n if (typeof window === \"undefined\") {\n return;\n }\n let handleChunk = (chunk) => {\n if (typeof chunk === \"string\") {\n controller.enqueue(encoder.encode(chunk));\n } else {\n controller.enqueue(chunk);\n }\n };\n window.__FLIGHT_DATA || (window.__FLIGHT_DATA = []);\n window.__FLIGHT_DATA.forEach(handleChunk);\n window.__FLIGHT_DATA.push = (chunk) => {\n handleChunk(chunk);\n return 0;\n };\n streamController = controller;\n }\n });\n if (typeof document !== \"undefined\" && document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", () => {\n streamController?.close();\n });\n } else {\n streamController?.close();\n }\n return rscStream;\n}\nexport {\n HydratedRouter,\n RouterProvider2 as RouterProvider,\n RSCHydratedRouter as unstable_RSCHydratedRouter,\n createCallServer as unstable_createCallServer,\n getRSCStream as unstable_getRSCStream\n};\n","\"use client\";\nimport { createContext as y, Component as f, createElement as d, useContext as l, useState as p, useMemo as E, forwardRef as B } from \"react\";\nconst h = y(null), c = {\n didCatch: !1,\n error: null\n};\nclass m extends f {\n constructor(e) {\n super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = c;\n }\n static getDerivedStateFromError(e) {\n return { didCatch: !0, error: e };\n }\n resetErrorBoundary(...e) {\n const { didCatch: t } = this.state;\n t && (this.props.onReset?.({\n args: e,\n reason: \"imperative-api\"\n }), this.setState(c));\n }\n componentDidCatch(e, t) {\n this.props.onError?.(e, t);\n }\n componentDidUpdate(e, t) {\n const { didCatch: o } = this.state, { resetKeys: s } = this.props;\n o && t.didCatch && C(e.resetKeys, s) && (this.props.onReset?.({\n next: s,\n prev: e.resetKeys,\n reason: \"keys\"\n }), this.setState(c));\n }\n render() {\n const { children: e, fallbackRender: t, FallbackComponent: o, fallback: s } = this.props, { didCatch: n, error: a } = this.state;\n let i = e;\n if (n) {\n const u = {\n error: a,\n resetErrorBoundary: this.resetErrorBoundary\n };\n if (typeof t == \"function\")\n i = t(u);\n else if (o)\n i = d(o, u);\n else if (s !== void 0)\n i = s;\n else\n throw a;\n }\n return d(\n h.Provider,\n {\n value: {\n didCatch: n,\n error: a,\n resetErrorBoundary: this.resetErrorBoundary\n }\n },\n i\n );\n }\n}\nfunction C(r = [], e = []) {\n return r.length !== e.length || r.some((t, o) => !Object.is(t, e[o]));\n}\nfunction g(r) {\n return r !== null && typeof r == \"object\" && \"didCatch\" in r && typeof r.didCatch == \"boolean\" && \"error\" in r && \"resetErrorBoundary\" in r && typeof r.resetErrorBoundary == \"function\";\n}\nfunction x(r) {\n if (!g(r))\n throw new Error(\"ErrorBoundaryContext not found\");\n}\nfunction k() {\n const r = l(h);\n x(r);\n const { error: e, resetErrorBoundary: t } = r, [o, s] = p({\n error: null,\n hasError: !1\n }), n = E(\n () => ({\n error: e,\n resetBoundary: () => {\n t(), s({ error: null, hasError: !1 });\n },\n showBoundary: (a) => s({\n error: a,\n hasError: !0\n })\n }),\n [e, t]\n );\n if (o.hasError)\n throw o.error;\n return n;\n}\nfunction S(r) {\n switch (typeof r) {\n case \"object\": {\n if (r !== null && \"message\" in r && typeof r.message == \"string\")\n return r.message;\n break;\n }\n case \"string\":\n return r;\n }\n}\nfunction w(r, e) {\n const t = B(\n (s, n) => d(\n m,\n e,\n d(r, { ...s, ref: n })\n )\n ), o = r.displayName || r.name || \"Unknown\";\n return t.displayName = `withErrorBoundary(${o})`, t;\n}\nexport {\n m as ErrorBoundary,\n h as ErrorBoundaryContext,\n S as getErrorMessage,\n k as useErrorBoundary,\n w as withErrorBoundary\n};\n//# sourceMappingURL=react-error-boundary.js.map\n","import { RouterProvider } from 'react-router-dom';\n\nimport { RouterService } from '../../../classes/services/RouterService';\n\nexport const AppRouterProvider = () => <RouterProvider router={RouterService.getInstance().router} />;\n","import { CacheProvider } from '@emotion/react';\nimport {\n CssBaseline,\n ThemeProvider,\n} from '@mui/material';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { useMemo } from 'react';\nimport { UiCoreComponentsContextProvider } from '@gen-epix/ui-core-components/context/uiCoreComponentsConfigContext';\nimport type { UiCoreComponentsConfig } from '@gen-epix/ui-core-components/context/uiCoreComponentsConfigContext';\n\nimport { BackendVersionService } from '../../../classes/services/BackendVersionService';\nimport { ConfigService } from '../../../classes/services/ConfigService';\nimport { QueryClientService } from '../../../classes/services/QueryClientService';\nimport { ErrorPage } from '../../../pages/ErrorPage';\nimport { EmotionCacheService } from '../../../classes/services/EmotionCacheService';\nimport { AuthenticationService } from '../../../classes/services/AuthenticationService';\nimport { LogService } from '../../../classes/services/LogService';\nimport { ApiService } from '../../../classes/services/ApiService';\nimport { ApplicationBootstrapWithoutAuthorization } from '../ApplicationBootstrapWithoutAuthorization';\nimport { AppRouterProvider } from '../AppRouterProvider/AppRouterProvider';\n\nexport const App = () => {\n const { config } = ConfigService.getInstance();\n\n const uiCoreComponentsConfig = useMemo<UiCoreComponentsConfig>(() => {\n const { DEFAULT_CIRCULAR_PROGRESS_SIZE, DEFAULT_TAKING_LONGER_TIMEOUT_MS } = config.spinner;\n\n return {\n spinner: {\n defaultCircularProgressSize: DEFAULT_CIRCULAR_PROGRESS_SIZE,\n defaultTakingLongerTimeoutMs: DEFAULT_TAKING_LONGER_TIMEOUT_MS,\n },\n };\n }, [config.spinner]);\n\n const authenticationService = AuthenticationService.getInstance();\n const logService = LogService.getInstance();\n\n const touchIconUrl = config.getTouchIconUrl();\n if (touchIconUrl) {\n\n document.querySelector('link[rel=\"icon\"]')?.setAttribute('href', touchIconUrl);\n }\n const apiService = ApiService.getInstance();\n apiService.api.baseUrl = config.getAPIBaseUrl();\n apiService.api.defaultRequestTimeout = config.defaultRequestTimeout;\n apiService.api.onRequest = [\n authenticationService.onRequest.bind(authenticationService),\n logService.onRequest.bind(logService),\n ];\n apiService.api.onResponseFulfilled = [\n logService.onResponseFulfilled.bind(logService),\n BackendVersionService.getInstance().onResponseFulfilled.bind(BackendVersionService.getInstance()),\n ];\n apiService.api.onResponseRejected = [\n logService.onResponseRejected.bind(logService),\n authenticationService.onResponseRejected.bind(authenticationService),\n ];\n\n const queryQueryManager = QueryClientService.getInstance();\n const emotionCacheService = EmotionCacheService.getInstance();\n\n return (\n <UiCoreComponentsContextProvider config={uiCoreComponentsConfig}>\n <QueryClientProvider client={queryQueryManager.queryClient}>\n <CacheProvider value={emotionCacheService.emotionCache}>\n <ThemeProvider theme={ConfigService.getInstance().config.theme}>\n <CssBaseline />\n <ErrorBoundary FallbackComponent={ErrorPage}>\n <ApplicationBootstrapWithoutAuthorization>\n <AppRouterProvider />\n </ApplicationBootstrapWithoutAuthorization>\n </ErrorBoundary>\n </ThemeProvider>\n </CacheProvider>\n </QueryClientProvider>\n </UiCoreComponentsContextProvider>\n );\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;;;;;;;AAsDA,SAAS,EAAgB,GAAO;CAC9B,OAAuB,kBAAM,cAAc,GAAgB;EAAE,WAAW,EAAS;EAAW,GAAG;CAAM,CAAC;AACxG;AAwe4BA,EAAc;;;AC9hB1C,IAAM,IAAIC,EAAE,IAAI,GAAG,IAAI;CACrB,UAAU,CAAC;CACX,OAAO;AACT,GACM,IAAN,cAAgBC,EAAE;CAChB,YAAY,GAAG;EACb,MAAM,CAAC,GAAG,KAAK,qBAAqB,KAAK,mBAAmB,KAAK,IAAI,GAAG,KAAK,QAAQ;CACvF;CACA,OAAO,yBAAyB,GAAG;EACjC,OAAO;GAAE,UAAU,CAAC;GAAG,OAAO;EAAE;CAClC;CACA,mBAAmB,GAAG,GAAG;EACvB,IAAM,EAAE,UAAU,MAAM,KAAK;EAC7B,MAAM,KAAK,MAAM,UAAU;GACzB,MAAM;GACN,QAAQ;EACV,CAAC,GAAG,KAAK,SAAS,CAAC;CACrB;CACA,kBAAkB,GAAG,GAAG;EACtB,KAAK,MAAM,UAAU,GAAG,CAAC;CAC3B;CACA,mBAAmB,GAAG,GAAG;EACvB,IAAM,EAAE,UAAU,MAAM,KAAK,OAAO,EAAE,WAAW,MAAM,KAAK;EAC5D,KAAK,EAAE,YAAY,EAAE,EAAE,WA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A,EAAW,IAAI,UAAU,EAAO,cAAc,GAC9C,EAAW,IAAI,wBAAwB,EAAO,uBAC9C,EAAW,IAAI,YAAY,CACzB,EAAsB,UAAU,KAAK,CAAqB,GAC1D,EAAW,UAAU,KAAK,CAAU,CACtC,GACA,EAAW,IAAI,sBAAsB,CACnC,EAAW,oBAAoB,KAAK,CAAU,GAC9C,EAAsB,YAAY,CAAC,CAAC,oBAAoB,KAAK,EAAsB,YAAY,CAAC,CAClG,GACA,EAAW,IAAI,qBAAqB,CAClC,EAAW,mBAAmB,KAAK,CAAU,GAC7C,EAAsB,mBAAmB,KAAK,CAAqB,CACrE;CAEA,IAAM,IAAoB,EAAmB,YAAY,GACnD,IAAsB,EAAoB,YAAY;CAE5D,OACE,kBAAC,GAAD;EAAiC,QAAQ;EACvC,UAAA,kBAAC,GAAD;GAAqB,QAAQ,EAAkB;GAC7C,UAAA,kBAAC,GAAD;IAAe,OAAO,EAAoB;IACxC,UAAA,kBAAC,GAAD;KAAe,OAAO,EAAc,YAAY,CAAC,CAAC,OAAO;KAAzD,UAAA,CACE,kBAAC,GAAD,CAAc,CAAA,GACd,kBAAC,GAAD;MAAe,mBAAmB;MAChC,UAAA,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,CAAoB,CAAA,EACoB,CAAA;KAC7B,CAAA,CACF;;GACF,CAAA;EACI,CAAA;CACU,CAAA;AAErC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/app/AppRouterProvider/AppRouterProvider.tsx","../../../../src/components/app/App/App.tsx"],"sourcesContent":["import { RouterProvider } from 'react-router-dom';\n\nimport { RouterService } from '../../../classes/services/RouterService';\n\nexport const AppRouterProvider = () => <RouterProvider router={RouterService.getInstance().router} />;\n","import { CacheProvider } from '@emotion/react';\nimport {\n CssBaseline,\n ThemeProvider,\n} from '@mui/material';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { useMemo } from 'react';\nimport { UiCoreComponentsContextProvider } from '@gen-epix/ui-core-components/context/uiCoreComponentsConfigContext';\nimport type { UiCoreComponentsConfig } from '@gen-epix/ui-core-components/context/uiCoreComponentsConfigContext';\n\nimport { BackendVersionService } from '../../../classes/services/BackendVersionService';\nimport { ConfigService } from '../../../classes/services/ConfigService';\nimport { QueryClientService } from '../../../classes/services/QueryClientService';\nimport { ErrorPage } from '../../../pages/ErrorPage';\nimport { EmotionCacheService } from '../../../classes/services/EmotionCacheService';\nimport { AuthenticationService } from '../../../classes/services/AuthenticationService';\nimport { LogService } from '../../../classes/services/LogService';\nimport { ApiService } from '../../../classes/services/ApiService';\nimport { ApplicationBootstrapWithoutAuthorization } from '../ApplicationBootstrapWithoutAuthorization';\nimport { AppRouterProvider } from '../AppRouterProvider/AppRouterProvider';\n\nexport const App = () => {\n const { config } = ConfigService.getInstance();\n\n const uiCoreComponentsConfig = useMemo<UiCoreComponentsConfig>(() => {\n const { DEFAULT_CIRCULAR_PROGRESS_SIZE, DEFAULT_TAKING_LONGER_TIMEOUT_MS } = config.spinner;\n\n return {\n spinner: {\n defaultCircularProgressSize: DEFAULT_CIRCULAR_PROGRESS_SIZE,\n defaultTakingLongerTimeoutMs: DEFAULT_TAKING_LONGER_TIMEOUT_MS,\n },\n };\n }, [config.spinner]);\n\n const authenticationService = AuthenticationService.getInstance();\n const logService = LogService.getInstance();\n\n const touchIconUrl = config.getTouchIconUrl();\n if (touchIconUrl) {\n\n document.querySelector('link[rel=\"icon\"]')?.setAttribute('href', touchIconUrl);\n }\n const apiService = ApiService.getInstance();\n apiService.api.baseUrl = config.getAPIBaseUrl();\n apiService.api.defaultRequestTimeout = config.defaultRequestTimeout;\n apiService.api.onRequest = [\n authenticationService.onRequest.bind(authenticationService),\n logService.onRequest.bind(logService),\n ];\n apiService.api.onResponseFulfilled = [\n logService.onResponseFulfilled.bind(logService),\n BackendVersionService.getInstance().onResponseFulfilled.bind(BackendVersionService.getInstance()),\n ];\n apiService.api.onResponseRejected = [\n logService.onResponseRejected.bind(logService),\n authenticationService.onResponseRejected.bind(authenticationService),\n ];\n\n const queryQueryManager = QueryClientService.getInstance();\n const emotionCacheService = EmotionCacheService.getInstance();\n\n return (\n <UiCoreComponentsContextProvider config={uiCoreComponentsConfig}>\n <QueryClientProvider client={queryQueryManager.queryClient}>\n <CacheProvider value={emotionCacheService.emotionCache}>\n <ThemeProvider theme={ConfigService.getInstance().config.theme}>\n <CssBaseline />\n <ErrorBoundary FallbackComponent={ErrorPage}>\n <ApplicationBootstrapWithoutAuthorization>\n <AppRouterProvider />\n </ApplicationBootstrapWithoutAuthorization>\n </ErrorBoundary>\n </ThemeProvider>\n </CacheProvider>\n </QueryClientProvider>\n </UiCoreComponentsContextProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAIA,IAAa,UAA0B,kBAAC,GAAD,EAAgB,QAAQ,EAAc,YAAY,CAAC,CAAC,OAAS,CAAA,GCkBvF,UAAY;CACvB,IAAM,EAAE,cAAW,EAAc,YAAY,GAEvC,IAAyB,QAAsC;EACnE,IAAM,EAAE,mCAAgC,wCAAqC,EAAO;EAEpF,OAAO,EACL,SAAS;GACP,6BAA6B;GAC7B,8BAA8B;EAChC,EACF;CACF,GAAG,CAAC,EAAO,OAAO,CAAC,GAEb,IAAwB,EAAsB,YAAY,GAC1D,IAAa,EAAW,YAAY,GAEpC,IAAe,EAAO,gBAAgB;CAC5C,AAAI,KAEF,SAAS,cAAc,oBAAkB,CAAC,EAAE,aAAa,QAAQ,CAAY;CAE/E,IAAM,IAAa,EAAW,YAAY;CAW1C,AAVA,EAAW,IAAI,UAAU,EAAO,cAAc,GAC9C,EAAW,IAAI,wBAAwB,EAAO,uBAC9C,EAAW,IAAI,YAAY,CACzB,EAAsB,UAAU,KAAK,CAAqB,GAC1D,EAAW,UAAU,KAAK,CAAU,CACtC,GACA,EAAW,IAAI,sBAAsB,CACnC,EAAW,oBAAoB,KAAK,CAAU,GAC9C,EAAsB,YAAY,CAAC,CAAC,oBAAoB,KAAK,EAAsB,YAAY,CAAC,CAClG,GACA,EAAW,IAAI,qBAAqB,CAClC,EAAW,mBAAmB,KAAK,CAAU,GAC7C,EAAsB,mBAAmB,KAAK,CAAqB,CACrE;CAEA,IAAM,IAAoB,EAAmB,YAAY,GACnD,IAAsB,EAAoB,YAAY;CAE5D,OACE,kBAAC,GAAD;EAAiC,QAAQ;EACvC,UAAA,kBAAC,GAAD;GAAqB,QAAQ,EAAkB;GAC7C,UAAA,kBAAC,GAAD;IAAe,OAAO,EAAoB;IACxC,UAAA,kBAAC,GAAD;KAAe,OAAO,EAAc,YAAY,CAAC,CAAC,OAAO;KAAzD,UAAA,CACE,kBAAC,GAAD,CAAc,CAAA,GACd,kBAAC,GAAD;MAAe,mBAAmB;MAChC,UAAA,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,CAAoB,CAAA,EACoB,CAAA;KAC7B,CAAA,CACF;;GACF,CAAA;EACI,CAAA;CACU,CAAA;AAErC"}
@@ -2,50 +2,50 @@ import { ConfigService as e } from "../../../classes/services/ConfigService/inde
2
2
  import { PageContainer as t } from "../../ui/PageContainer/index.js";
3
3
  import { AuthenticationService as n } from "../../../classes/services/AuthenticationService/index.js";
4
4
  import { LogService as r } from "../../../classes/services/LogService/index.js";
5
- import { n as i } from "../../../_chunks/react-oidc-context.js";
6
- import { ConsentDialog as a } from "../../ui/ConsentDialog/index.js";
7
- import { WindowService as o } from "@gen-epix/ui-core/classes/services/WindowService";
8
- import { CommonDbLogLevel as s } from "@gen-epix/api-commondb";
9
- import { Box as c, Button as l, Typography as u } from "@mui/material";
10
- import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
11
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
12
- import { useTranslation as y } from "react-i18next";
13
- import { TestIdUtil as b } from "@gen-epix/ui-core/utils/TestIdUtil";
14
- import { useSubscribable as x } from "@gen-epix/ui-core/hooks/useSubscribable";
15
- import { Spinner as S } from "@gen-epix/ui-core-components/components/Spinner";
5
+ import { ConsentDialog as i } from "../../ui/ConsentDialog/index.js";
6
+ import { WindowService as a } from "@gen-epix/ui-core/classes/services/WindowService";
7
+ import { CommonDbLogLevel as o } from "@gen-epix/api-commondb";
8
+ import { Box as s, Button as c, Typography as l } from "@mui/material";
9
+ import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
10
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
11
+ import { useTranslation as v } from "react-i18next";
12
+ import { TestIdUtil as y } from "@gen-epix/ui-core/utils/TestIdUtil";
13
+ import { useSubscribable as b } from "@gen-epix/ui-core/hooks/useSubscribable";
14
+ import { Spinner as x } from "@gen-epix/ui-core-components/components/Spinner";
15
+ import { useAuth as S } from "react-oidc-context";
16
16
  //#region src/components/app/AuthenticationWrapper/AuthenticationWrapper.tsx
17
17
  var C = ({ children: C }) => {
18
- let { t: w } = y(), T = i(), E = m(null), [D, O] = h(!e.getInstance().config.consentDialog?.getShouldShow()), k = x(n.getInstance()), A = e.getInstance().config.login?.AfterLoginElement;
19
- f(() => {
18
+ let { t: w } = v(), T = S(), E = p(null), [D, O] = m(!e.getInstance().config.consentDialog?.getShouldShow()), k = b(n.getInstance()), A = e.getInstance().config.login?.AfterLoginElement;
19
+ d(() => {
20
20
  n.getInstance().authContextProps = T;
21
- }, [T]), f(() => {
21
+ }, [T]), d(() => {
22
22
  T.isAuthenticated && !D && E.current.open();
23
23
  }, [T.isAuthenticated, D]);
24
- let j = d(() => {
24
+ let j = u(() => {
25
25
  r.getInstance().log([{
26
- level: s.INFO,
26
+ level: o.INFO,
27
27
  topic: "CONSENT"
28
28
  }]), O(!0), E.current.close();
29
- }, []), M = d(() => {
29
+ }, []), M = u(() => {
30
30
  (async () => {
31
- let { hash: e, pathname: t, search: n } = o.getInstance().window.location, r = { preLoginLocation: {
31
+ let { hash: e, pathname: t, search: n } = a.getInstance().window.location, r = { preLoginLocation: {
32
32
  hash: e,
33
33
  pathname: t,
34
34
  search: n
35
35
  } };
36
36
  await T.signinRedirect({ state: r });
37
37
  })();
38
- }, [T]), N = d(() => {
38
+ }, [T]), N = u(() => {
39
39
  M();
40
- }, [M]), P = d(() => {
40
+ }, [M]), P = u(() => {
41
41
  n.clearStaleState(), n.getInstance().next(void 0);
42
- }, []), F = p(() => (/* @__PURE__ */ new Date()).getTime(), []), I = p(() => /* @__PURE__ */ v(g, { children: [
43
- /* @__PURE__ */ _(c, {
42
+ }, []), F = f(() => (/* @__PURE__ */ new Date()).getTime(), []), I = f(() => /* @__PURE__ */ _(h, { children: [
43
+ /* @__PURE__ */ g(s, {
44
44
  sx: {
45
45
  marginY: 2,
46
46
  textAlign: "center"
47
47
  },
48
- children: /* @__PURE__ */ _(l, {
48
+ children: /* @__PURE__ */ g(c, {
49
49
  color: "primary",
50
50
  "data-name": k.name,
51
51
  onClick: N,
@@ -53,19 +53,19 @@ var C = ({ children: C }) => {
53
53
  children: k.label
54
54
  })
55
55
  }),
56
- /* @__PURE__ */ _(c, {
56
+ /* @__PURE__ */ g(s, {
57
57
  sx: {
58
58
  marginY: 2,
59
59
  textAlign: "center"
60
60
  },
61
- children: /* @__PURE__ */ _(l, {
61
+ children: /* @__PURE__ */ g(c, {
62
62
  color: "primary",
63
63
  onClick: P,
64
64
  variant: "outlined",
65
65
  children: w`Choose a different identity provider`
66
66
  })
67
67
  }),
68
- A && /* @__PURE__ */ _(A, {})
68
+ A && /* @__PURE__ */ g(A, {})
69
69
  ] }), [
70
70
  k,
71
71
  P,
@@ -73,22 +73,22 @@ var C = ({ children: C }) => {
73
73
  w,
74
74
  A
75
75
  ]);
76
- if (T.activeNavigator || T.isLoading) return /* @__PURE__ */ _(t, {
76
+ if (T.activeNavigator || T.isLoading) return /* @__PURE__ */ g(t, {
77
77
  ignorePageEvent: !0,
78
78
  singleAction: !0,
79
- testIdAttributes: b.createAttributes("RedirectingPage"),
79
+ testIdAttributes: y.createAttributes("RedirectingPage"),
80
80
  title: w`Redirecting`,
81
- children: /* @__PURE__ */ _(S, { label: w`Redirecting` })
81
+ children: /* @__PURE__ */ g(x, { label: w`Redirecting` })
82
82
  });
83
83
  if (T.error) return n.clearStaleState(), r.getInstance().log([{
84
84
  detail: { error: T.error },
85
- level: s.ERROR,
85
+ level: o.ERROR,
86
86
  topic: "Authentication Error"
87
- }]), /* @__PURE__ */ v(t, {
87
+ }]), /* @__PURE__ */ _(t, {
88
88
  singleAction: !0,
89
- testIdAttributes: b.createAttributes("LoginPageSessionExpired"),
89
+ testIdAttributes: y.createAttributes("LoginPageSessionExpired"),
90
90
  title: w`Login`,
91
- children: [/* @__PURE__ */ _(u, {
91
+ children: [/* @__PURE__ */ g(l, {
92
92
  component: "p",
93
93
  sx: { textAlign: "center" },
94
94
  children: w`We could not log you in, or your session has expired.`
@@ -99,23 +99,23 @@ var C = ({ children: C }) => {
99
99
  M();
100
100
  return;
101
101
  }
102
- return /* @__PURE__ */ v(t, {
102
+ return /* @__PURE__ */ _(t, {
103
103
  singleAction: !0,
104
- testIdAttributes: b.createAttributes("LoginPage"),
104
+ testIdAttributes: y.createAttributes("LoginPage"),
105
105
  title: w`Login`,
106
- children: [/* @__PURE__ */ _(c, {
106
+ children: [/* @__PURE__ */ g(s, {
107
107
  sx: {
108
108
  marginY: 2,
109
109
  textAlign: "center"
110
110
  },
111
- children: /* @__PURE__ */ _(u, {
111
+ children: /* @__PURE__ */ g(l, {
112
112
  component: "p",
113
113
  children: w`You need to login to access this application.`
114
114
  })
115
115
  }), I]
116
116
  });
117
117
  }
118
- return /* @__PURE__ */ v(g, { children: [C, e.getInstance().config.consentDialog?.getShouldShow() && /* @__PURE__ */ _(a, {
118
+ return /* @__PURE__ */ _(h, { children: [C, e.getInstance().config.consentDialog?.getShouldShow() && /* @__PURE__ */ g(i, {
119
119
  onConsent: j,
120
120
  ref: E
121
121
  })] });
@@ -2,39 +2,39 @@ import { n as e } from "../../../_chunks/rolldown-runtime.js";
2
2
  import { LoadableUtil as t } from "../../../utils/LoadableUtil/index.js";
3
3
  import { t as n } from "../../../_chunks/last.js";
4
4
  import { AuthorizationService as r } from "../../../classes/services/AuthorizationService/index.js";
5
- import { u as i } from "../../../_chunks/chunk-OB3PAWPO.js";
6
- import { PageContainer as a } from "../../ui/PageContainer/index.js";
7
- import { ApiService as o } from "../../../classes/services/ApiService/index.js";
8
- import { ResponseHandler as s } from "../../ui/ResponseHandler/index.js";
9
- import { t as c } from "../../../_chunks/useQueryMemo.js";
10
- import { t as l } from "../../../_chunks/QueryClientService.js";
11
- import { COMMON_QUERY_KEY as u } from "../../../constants/query.js";
12
- import { useMemo as d } from "react";
13
- import { jsx as f } from "react/jsx-runtime";
14
- import { useTranslation as p } from "react-i18next";
15
- import { TestIdUtil as m } from "@gen-epix/ui-core/utils/TestIdUtil";
5
+ import { PageContainer as i } from "../../ui/PageContainer/index.js";
6
+ import { ApiService as a } from "../../../classes/services/ApiService/index.js";
7
+ import { ResponseHandler as o } from "../../ui/ResponseHandler/index.js";
8
+ import { t as s } from "../../../_chunks/useQueryMemo.js";
9
+ import { t as c } from "../../../_chunks/QueryClientService.js";
10
+ import { COMMON_QUERY_KEY as l } from "../../../constants/query.js";
11
+ import { useMemo as u } from "react";
12
+ import { jsx as d } from "react/jsx-runtime";
13
+ import { useTranslation as f } from "react-i18next";
14
+ import { TestIdUtil as p } from "@gen-epix/ui-core/utils/TestIdUtil";
15
+ import { useMatches as m } from "react-router-dom";
16
16
  import { useArray as h } from "@gen-epix/ui-core/hooks/useArray";
17
17
  //#region src/components/app/AuthorizationWrapper/AuthorizationWrapper.tsx
18
18
  var g = /* @__PURE__ */ e(n(), 1), _ = ({ children: e }) => {
19
- let { t: n } = p(), _ = i(), v = d(() => (0, g.default)(_).handle.requiresUserProfile, [_]), y = c({
19
+ let { t: n } = f(), _ = m(), v = u(() => (0, g.default)(_).handle.requiresUserProfile, [_]), y = s({
20
20
  enabled: v,
21
21
  gcTime: Infinity,
22
- queryFn: async ({ signal: e }) => (await o.getInstance().organizationApi.userMeGetOne({ signal: e })).data,
23
- queryKey: l.getInstance().getGenericKey(u.USER_ME),
22
+ queryFn: async ({ signal: e }) => (await a.getInstance().organizationApi.userMeGetOne({ signal: e })).data,
23
+ queryKey: c.getInstance().getGenericKey(l.USER_ME),
24
24
  staleTime: Infinity
25
- }), b = c({
25
+ }), b = s({
26
26
  enabled: v,
27
27
  gcTime: Infinity,
28
- queryFn: async ({ signal: e }) => (await o.getInstance().organizationApi.userMeRetrievePermissions({ signal: e })).data,
29
- queryKey: l.getInstance().getGenericKey(u.USER_PERMISSIONS),
28
+ queryFn: async ({ signal: e }) => (await a.getInstance().organizationApi.userMeRetrievePermissions({ signal: e })).data,
29
+ queryKey: c.getInstance().getGenericKey(l.USER_PERMISSIONS),
30
30
  staleTime: Infinity
31
31
  }), x = h([y, b]);
32
- return y.data && (r.getInstance().user = y.data), b.data && (r.getInstance().apiPermissions = b.data), v && (t.isSomeLoading(x) || t.hasSomeError(x)) ? /* @__PURE__ */ f(a, {
32
+ return y.data && (r.getInstance().user = y.data), b.data && (r.getInstance().apiPermissions = b.data), v && (t.isSomeLoading(x) || t.hasSomeError(x)) ? /* @__PURE__ */ d(i, {
33
33
  ignorePageEvent: !0,
34
34
  singleAction: !0,
35
- testIdAttributes: m.createAttributes("LoadingUserDataPage"),
35
+ testIdAttributes: p.createAttributes("LoadingUserDataPage"),
36
36
  title: n`Loading user data`,
37
- children: /* @__PURE__ */ f(s, {
37
+ children: /* @__PURE__ */ d(o, {
38
38
  loadables: x,
39
39
  loadingMessage: n`Loading user data`
40
40
  })