@beinformed/react 1.0.0-beta.0
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.
- package/CHANGELOG.md +12 -0
- package/LICENSE.md +1 -0
- package/dist/ErrorBoundaryFallback-D6YQem9P.d.cts +13 -0
- package/dist/ErrorBoundaryFallback-D6YQem9P.d.ts +13 -0
- package/dist/beforeRenderHooks-CNvsMmi8.d.cts +18 -0
- package/dist/beforeRenderHooks-Gb0tcmCY.d.ts +18 -0
- package/dist/chunk-347XDLN7.js +1 -0
- package/dist/chunk-347XDLN7.js.map +1 -0
- package/dist/chunk-3OP2KQ56.js +2 -0
- package/dist/chunk-3OP2KQ56.js.map +1 -0
- package/dist/chunk-4AC7YQ5Q.js +2 -0
- package/dist/chunk-4AC7YQ5Q.js.map +1 -0
- package/dist/chunk-6E5DAS6G.js +1 -0
- package/dist/chunk-6E5DAS6G.js.map +1 -0
- package/dist/chunk-6KRECIRI.js +2 -0
- package/dist/chunk-6KRECIRI.js.map +1 -0
- package/dist/chunk-A4USB53Q.js +2 -0
- package/dist/chunk-A4USB53Q.js.map +1 -0
- package/dist/chunk-AMFWIR2R.js +2 -0
- package/dist/chunk-AMFWIR2R.js.map +1 -0
- package/dist/chunk-B7PQLTVC.js +2 -0
- package/dist/chunk-B7PQLTVC.js.map +1 -0
- package/dist/chunk-DI7VM62A.js +2 -0
- package/dist/chunk-DI7VM62A.js.map +1 -0
- package/dist/chunk-FW4363Y4.js +2 -0
- package/dist/chunk-FW4363Y4.js.map +1 -0
- package/dist/chunk-HDOILTJ2.js +2 -0
- package/dist/chunk-HDOILTJ2.js.map +1 -0
- package/dist/chunk-JYAETKRB.js +2 -0
- package/dist/chunk-JYAETKRB.js.map +1 -0
- package/dist/chunk-K3DTH6XN.js +2 -0
- package/dist/chunk-K3DTH6XN.js.map +1 -0
- package/dist/chunk-KNEDBCHP.js +2 -0
- package/dist/chunk-KNEDBCHP.js.map +1 -0
- package/dist/chunk-MT7D3AJU.js +12 -0
- package/dist/chunk-MT7D3AJU.js.map +1 -0
- package/dist/chunk-RKGGCIUD.js +2 -0
- package/dist/chunk-RKGGCIUD.js.map +1 -0
- package/dist/chunk-UZIZDEU6.js +2 -0
- package/dist/chunk-UZIZDEU6.js.map +1 -0
- package/dist/chunk-VFLYA5WJ.js +2 -0
- package/dist/chunk-VFLYA5WJ.js.map +1 -0
- package/dist/chunk-VG3QU524.js +22 -0
- package/dist/chunk-VG3QU524.js.map +1 -0
- package/dist/chunk-WBPDMDW4.js +2 -0
- package/dist/chunk-WBPDMDW4.js.map +1 -0
- package/dist/chunk-X2C7CKOK.js +2 -0
- package/dist/chunk-X2C7CKOK.js.map +1 -0
- package/dist/chunk-X3N2NQVZ.js +2 -0
- package/dist/chunk-X3N2NQVZ.js.map +1 -0
- package/dist/chunk-Y7ESITVO.js +2 -0
- package/dist/chunk-Y7ESITVO.js.map +1 -0
- package/dist/chunk-YG7XDCNV.js +2 -0
- package/dist/chunk-YG7XDCNV.js.map +1 -0
- package/dist/chunk-YJNJVQFW.js +2 -0
- package/dist/chunk-YJNJVQFW.js.map +1 -0
- package/dist/chunk-Z2Y3OPVI.js +2 -0
- package/dist/chunk-Z2Y3OPVI.js.map +1 -0
- package/dist/client/index.cjs +12 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +84 -0
- package/dist/client/index.d.ts +84 -0
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -0
- package/dist/components/index.cjs +12 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.cts +28 -0
- package/dist/components/index.d.ts +28 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +353 -0
- package/dist/hooks/index.d.ts +353 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/i18n/index.cjs +2 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +26 -0
- package/dist/i18n/index.d.ts +26 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/redux/index.cjs +2 -0
- package/dist/redux/index.cjs.map +1 -0
- package/dist/redux/index.d.cts +458 -0
- package/dist/redux/index.d.ts +458 -0
- package/dist/redux/index.js +2 -0
- package/dist/redux/index.js.map +1 -0
- package/dist/server/index.cjs +22 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +78 -0
- package/dist/server/index.d.ts +78 -0
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -0
- package/dist/styled-components.d-CrkOxzv5.d.cts +346 -0
- package/dist/styled-components.d-CrkOxzv5.d.ts +346 -0
- package/dist/theme/index.cjs +2 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.d.cts +112 -0
- package/dist/theme/index.d.ts +112 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/types-CGXygEPz.d.cts +8 -0
- package/dist/types-CGXygEPz.d.ts +8 -0
- package/dist/useForm-CG_DMYfZ.d.cts +178 -0
- package/dist/useForm-DW-a5mcV.d.ts +178 -0
- package/dist/utils/index.cjs +2 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +6 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +125 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @beinformed/react
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- aada65a: Conversion of the UI library from flow to typescript. Separated modules into ui, react and builder packages.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [aada65a]
|
|
12
|
+
- @beinformed/ui@2.0.0-beta.0
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Copyright 2021 Be Informed B.V. - All rights reserved.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ErrorBoundaryFallbackProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
componentStack: string;
|
|
6
|
+
error: Error;
|
|
7
|
+
}
|
|
8
|
+
declare const ErrorBoundaryFallback: {
|
|
9
|
+
({ className, componentStack, error, }: ErrorBoundaryFallbackProps): ReactNode;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { type ErrorBoundaryFallbackProps as E, ErrorBoundaryFallback as a };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ErrorBoundaryFallbackProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
componentStack: string;
|
|
6
|
+
error: Error;
|
|
7
|
+
}
|
|
8
|
+
declare const ErrorBoundaryFallback: {
|
|
9
|
+
({ className, componentStack, error, }: ErrorBoundaryFallbackProps): ReactNode;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { type ErrorBoundaryFallbackProps as E, ErrorBoundaryFallback as a };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { H as HttpServletRequestJava } from './types-CGXygEPz.cjs';
|
|
2
|
+
import { _ as BEIStore } from './styled-components.d-CrkOxzv5.cjs';
|
|
3
|
+
|
|
4
|
+
interface BeforeRenderHookProps {
|
|
5
|
+
store: BEIStore;
|
|
6
|
+
request?: HttpServletRequestJava;
|
|
7
|
+
}
|
|
8
|
+
type BeforeRenderHook = (props: BeforeRenderHookProps) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Process handlers that need to be run before the react application starts,
|
|
11
|
+
* for example to start a third party service<br>
|
|
12
|
+
* An object with the store is available to make it possible to read state available in the redux store,
|
|
13
|
+
* for example server preferences, and the request is available to retrieve request information
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
declare const handleBeforeRenderHooks: (beforeRenderHooks: BeforeRenderHook[] | undefined, props: BeforeRenderHookProps) => void;
|
|
17
|
+
|
|
18
|
+
export { type BeforeRenderHookProps as B, type BeforeRenderHook as a, handleBeforeRenderHooks as h };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { H as HttpServletRequestJava } from './types-CGXygEPz.js';
|
|
2
|
+
import { _ as BEIStore } from './styled-components.d-CrkOxzv5.js';
|
|
3
|
+
|
|
4
|
+
interface BeforeRenderHookProps {
|
|
5
|
+
store: BEIStore;
|
|
6
|
+
request?: HttpServletRequestJava;
|
|
7
|
+
}
|
|
8
|
+
type BeforeRenderHook = (props: BeforeRenderHookProps) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Process handlers that need to be run before the react application starts,
|
|
11
|
+
* for example to start a third party service<br>
|
|
12
|
+
* An object with the store is available to make it possible to read state available in the redux store,
|
|
13
|
+
* for example server preferences, and the request is available to retrieve request information
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
declare const handleBeforeRenderHooks: (beforeRenderHooks: BeforeRenderHook[] | undefined, props: BeforeRenderHookProps) => void;
|
|
17
|
+
|
|
18
|
+
export { type BeforeRenderHookProps as B, type BeforeRenderHook as a, handleBeforeRenderHooks as h };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-347XDLN7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A as w,D as H,F as D,G as x,H as E,I as P,J as k,K as B,L as b,V as n,f as l,h as J,j as p,k as c,l as m,m as u,n as f,r as y,u as S,v as I,w as h,x as M,y as g}from"./chunk-Y7ESITVO.js";import{i as C}from"./chunk-YG7XDCNV.js";import{d as R}from"./chunk-K3DTH6XN.js";import{a as s}from"./chunk-FW4363Y4.js";var G=s((rt,W)=>{"use strict";var ye=Object.prototype,Re=ye.hasOwnProperty;function Se(e,t){return e!=null&&Re.call(e,t)}W.exports=Se});var ge=s((at,_)=>{"use strict";var Ie=G(),he=J();function Me(e,t){return e!=null&&he(e,t,Ie)}_.exports=Me});var we=(e=[],t)=>{if(e.length>0)for(let o of e)o(t)};import{getContextPathServer as z}from"@beinformed/ui/settings";import{createBrowserHistory as $}from"history";var i=null,v=null;function U(){if(typeof window>"u")throw new Error("getBrowserHistory can only be used in a browser environment.");let e=z();return(!i||e!==v)&&(i=$({basename:e}),v=e),i}import{createAction as Q,createReducer as V}from"@reduxjs/toolkit";var X={location:void 0,action:void 0},Y=Q("ROUTER/LOCATION_CHANGE",(e,t)=>({payload:{location:e,action:t}})),F=V(X,e=>{e.addCase(Y,(t,o)=>{t.location=o.payload.location,t.action=o.payload.action})});import{ApplicationModel as Z}from"@beinformed/ui/models";import{createReducer as ee}from"@reduxjs/toolkit";var te={},oe=(e,t)=>{let{key:o,error:r}=t.payload;e[o]?(e[o].status="ERROR",e[o].lastModification=Date.now()):e[o]={model:void 0,status:"ERROR",lastModification:Date.now()},e[o].error=r},re=(e,t)=>{let{key:o,model:r}=t.payload;e[o]={model:r||void 0,lastModification:Date.now(),status:r?"FINISHED":"IDLE"}},ae=(e,t)=>{let{payload:o}=t;for(let{key:r,model:a}of o)e[r]={status:"FINISHED",lastModification:Date.now(),model:a}},O=(e,t)=>{let o=t.payload,r=Object.keys(e).find(a=>e[a]?.model?.connectKey===o.connectKey);r&&e[r]?(e[r].model=o,e[r].lastModification=Date.now(),e[r].status="FINISHED",e[r].error=void 0):console.debug(`ModularUIReducer: Cannot update model with key ${o.connectKey} - model not found in state.`)},ne=(e,t)=>{delete e[t.payload]},de=e=>{for(let t in e)e[t]?.model instanceof Z||delete e[t]},ie=(e,t)=>{let{key:o}=t.meta.arg;e[o]?(e[o].status="LOADING",e[o].lastModification=Date.now(),e[o].error=void 0):e[o]={model:void 0,status:"LOADING",lastModification:Date.now(),error:void 0}},se=(e,t)=>{let{key:o,model:r,updateHandler:a}=t.payload,d=r;a&&(d=a(r)),e[o]={model:d,lastModification:Date.now(),status:"FINISHED",error:void 0}},le=(e,t)=>{let{key:o}=t.meta.arg,r=t.payload;e[o]?(e[o].status="ERROR",e[o].lastModification=Date.now(),e[o].error=r):e[o]={model:void 0,status:"ERROR",lastModification:Date.now(),error:r}},T=ee(te,e=>{e.addCase(D,oe).addCase(x,re).addCase(E,ae).addCase(P,O).addCase(k,O).addCase(B,ne).addCase(b,de).addCase(n.pending,ie).addCase(n.fulfilled,se).addCase(n.rejected,le)});import{createReducer as pe}from"@reduxjs/toolkit";var ce={count:0,timestamp:0,percentComplete:0},A=e=>({...e,count:e.count+1}),L=e=>{let t=e.count-1===0;return{...e,count:e.count<=0?0:e.count-1,timestamp:t?Date.now():e.timestamp,percentComplete:t?0:e.percentComplete}},me=e=>({...e,count:0,timestamp:Date.now(),percentComplete:0}),j=pe(ce,e=>{e.addCase(c,A).addCase(m,L).addCase(u,t=>({...t,count:0})).addCase(f,(t,o)=>({...t,percentComplete:o.payload?.percentComplete})).addCase(n.pending,A).addCase(n.fulfilled,L).addCase(n.rejected,me)});var N=e=>t=>o=>r=>{if(S.match(r)){let{location:a,state:d}=r.payload;e.push(a,d)}else if(I.match(r)){let{location:a,state:d}=r.payload;e.replace(a,d)}else if(h.match(r)){let{delta:a}=r.payload;e.go(a)}else M.match(r)?e.goBack():g.match(r)&&e.goForward();return o(r)};import{combineReducers as K,configureStore as ue}from"@reduxjs/toolkit";var q={router:F,preferences:R,modularui:T,i18n:C,auth:l,error:w,modals:H,modelcatalog:p,notification:y,progressindicator:j},fe=K(q),tt=(e,t,o=U())=>{let r=t?K({...q,...t}):fe;return ue({reducer:r,middleware:a=>a({serializableCheck:!1}).concat(N(o)),preloadedState:e})};export{we as a,ge as b,U as c,Y as d,F as e,T as f,j as g,N as h,tt as i};
|
|
2
|
+
//# sourceMappingURL=chunk-3OP2KQ56.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/has.js","../src/redux/beforeRenderHooks.ts","../src/redux/router/browserHistory.ts","../src/redux/router/routerReducer.ts","../src/redux/modularui/modularuiReducer.ts","../src/redux/progressindicator/progressIndicatorReducer.ts","../src/redux/router/routerMiddleware.ts","../src/redux/store.ts"],"sourcesContent":["/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","import type { HttpServletRequestJava } from \"../server/types\";\nimport type { BEIStore } from \"./store\";\n\nexport interface BeforeRenderHookProps {\n store: BEIStore;\n request?: HttpServletRequestJava;\n}\nexport type BeforeRenderHook = (props: BeforeRenderHookProps) => void;\n\n/**\n * Process handlers that need to be run before the react application starts,\n * for example to start a third party service<br>\n * An object with the store is available to make it possible to read state available in the redux store,\n * for example server preferences, and the request is available to retrieve request information\n *\n */\nexport const handleBeforeRenderHooks = (\n beforeRenderHooks: BeforeRenderHook[] = [],\n props: BeforeRenderHookProps,\n) => {\n if (beforeRenderHooks.length > 0) {\n for (const beforeRenderHook of beforeRenderHooks) {\n beforeRenderHook(props);\n }\n }\n};\n","// Assuming this utility is available\nimport { getContextPathServer } from \"@beinformed/ui/settings\";\nimport { createBrowserHistory } from \"history\";\n\nimport type { History as RouterHistory } from \"history\";\n\nlet browserHistoryInstance: RouterHistory | null = null; // Private variable to hold the instance\nlet historyContextPath: string | null = null;\n/**\n * Returns a singleton instance of the browser history.\n * Creates the instance on the first call.\n * This pattern is suitable for client-side applications.\n */\nexport function getBrowserHistory(): RouterHistory {\n if (typeof window === \"undefined\") {\n throw new Error(\n \"getBrowserHistory can only be used in a browser environment.\",\n );\n }\n\n const contextPathServer = getContextPathServer();\n if (!browserHistoryInstance || contextPathServer !== historyContextPath) {\n browserHistoryInstance = createBrowserHistory({\n basename: contextPathServer,\n });\n historyContextPath = contextPathServer;\n }\n return browserHistoryInstance;\n}\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { Action, Location } from \"history\";\n\nexport type RouterLocation = Location<{ from?: string; modal?: boolean }>;\n\nexport interface RouterState {\n location: RouterLocation | undefined;\n action: Action | undefined;\n}\n\nconst initialState = { location: undefined, action: undefined };\n\nexport const locationChange = createAction(\n \"ROUTER/LOCATION_CHANGE\",\n (location: RouterLocation, action: Action) => {\n return {\n payload: {\n location,\n action,\n },\n };\n },\n);\n\nexport const routerReducer = createReducer<RouterState>(\n initialState,\n (builder) => {\n builder.addCase(locationChange, (state, action) => {\n state.location = action.payload.location;\n state.action = action.payload.action;\n });\n },\n);\n","import { ApplicationModel } from \"@beinformed/ui/models\";\nimport { createReducer } from \"@reduxjs/toolkit\";\n\nimport { MODULARUI_STATUS } from \"./constants\";\nimport { fetchModel } from \"./fetchModel\";\nimport {\n initModels,\n removeModelByKey,\n resetModularUI,\n setModel,\n updateErrorStatus,\n updateForm,\n updateModel,\n} from \"./modelActions\";\n\nimport type { WritableDraft } from \"immer\";\nimport type { ModelEntry } from \"./types\";\n\nexport type ModularUIState = Record<string, ModelEntry>;\n\ntype IntermediateState = WritableDraft<ModularUIState>;\n\nconst initialState: ModularUIState = {};\n\nconst handleUpdateErrorStatus = (\n state: IntermediateState,\n action: ReturnType<typeof updateErrorStatus>,\n) => {\n const { key, error } = action.payload;\n\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.ERROR,\n lastModification: Date.now(),\n };\n } else {\n state[key].status = MODULARUI_STATUS.ERROR;\n state[key].lastModification = Date.now();\n }\n // @ts-expect-error deep problem\n state[key].error = error;\n};\n\nconst handleSetModel = (\n state: IntermediateState,\n action: ReturnType<typeof setModel>,\n) => {\n const { key, model } = action.payload;\n // If model is null/undefined, this sets up an empty entry,\n // otherwise, it sets the model and marks as finished.\n state[key] = {\n model: model || undefined,\n lastModification: Date.now(),\n status: model ? MODULARUI_STATUS.FINISHED : MODULARUI_STATUS.IDLE,\n };\n};\n\nconst handleInitModel = (\n state: IntermediateState,\n action: ReturnType<typeof initModels>,\n) => {\n const { payload } = action;\n for (const { key, model } of payload) {\n state[key] = {\n status: MODULARUI_STATUS.FINISHED,\n lastModification: Date.now(),\n model,\n };\n }\n};\n\nconst handleUpdateModel = (\n state: IntermediateState,\n action: ReturnType<typeof updateModel | typeof updateForm>,\n) => {\n const model = action.payload;\n const modelKey = Object.keys(state).find(\n (key) => state[key]?.model?.connectKey === model.connectKey,\n );\n\n if (modelKey && state[modelKey]) {\n state[modelKey].model = model;\n state[modelKey].lastModification = Date.now();\n state[modelKey].status = MODULARUI_STATUS.FINISHED;\n state[modelKey].error = undefined; // Clear error on successful update\n } else {\n console.debug(\n `ModularUIReducer: Cannot update model with key ${model.connectKey} - model not found in state.`,\n );\n }\n};\n\nconst handleRemoveModelByKey = (\n state: IntermediateState,\n action: ReturnType<typeof removeModelByKey>,\n) => {\n delete state[action.payload];\n};\n\nconst handleResetModularUI = (state: IntermediateState) => {\n for (const key in state) {\n if (!(state[key]?.model instanceof ApplicationModel)) {\n delete state[key];\n }\n }\n};\n\nconst handleFetchModelPending = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.pending>,\n) => {\n const { key } = action.meta.arg; // Access original thunk arguments\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.LOADING,\n lastModification: Date.now(),\n error: undefined, // Clear error when starting new load\n };\n } else {\n state[key].status = MODULARUI_STATUS.LOADING;\n state[key].lastModification = Date.now();\n state[key].error = undefined; // Clear error when starting new load\n }\n};\n\nconst handleFetchModelFulfilled = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.fulfilled>,\n) => {\n const { key, model, updateHandler } = action.payload;\n let finalModel = model;\n\n if (updateHandler) {\n // Apply update handler if provided\n finalModel = updateHandler(model);\n }\n\n state[key] = {\n model: finalModel,\n lastModification: Date.now(),\n status: MODULARUI_STATUS.FINISHED,\n error: undefined, // Clear error on success\n };\n};\n\nconst handleFetchModelRejected = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.rejected>,\n) => {\n const { key } = action.meta.arg;\n const error = action.payload;\n\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.ERROR,\n lastModification: Date.now(),\n error: error,\n };\n } else {\n state[key].status = MODULARUI_STATUS.ERROR;\n state[key].lastModification = Date.now();\n state[key].error = error;\n }\n};\n\nexport const modularUIReducer = createReducer<ModularUIState>(\n initialState,\n (builder) => {\n builder\n .addCase(updateErrorStatus, handleUpdateErrorStatus)\n .addCase(setModel, handleSetModel)\n .addCase(initModels, handleInitModel)\n .addCase(updateModel, handleUpdateModel)\n .addCase(updateForm, handleUpdateModel)\n .addCase(removeModelByKey, handleRemoveModelByKey)\n .addCase(resetModularUI, handleResetModularUI)\n .addCase(fetchModel.pending, handleFetchModelPending)\n .addCase(fetchModel.fulfilled, handleFetchModelFulfilled)\n .addCase(fetchModel.rejected, handleFetchModelRejected);\n },\n);\n","import { createReducer } from \"@reduxjs/toolkit\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"./progressIndicatorActions\";\n\nimport type { WritableDraft } from \"immer\";\n\nexport interface ProgressIndicatorState {\n count: number;\n timestamp: number;\n percentComplete: number;\n}\n\ntype IntermediateState = WritableDraft<ProgressIndicatorState>;\n\nconst initialState = {\n count: 0,\n timestamp: 0,\n percentComplete: 0,\n};\n\nconst handleStartProgress = (state: IntermediateState) => {\n return {\n ...state,\n count: state.count + 1,\n };\n};\n\nconst handleEndProgress = (state: IntermediateState) => {\n const isFinalFinish = state.count - 1 === 0;\n return {\n ...state,\n count: state.count <= 0 ? 0 : state.count - 1,\n timestamp: isFinalFinish ? Date.now() : state.timestamp,\n percentComplete: isFinalFinish ? 0 : state.percentComplete,\n };\n};\n\nconst handleRejectedProgress = (state: IntermediateState) => {\n return {\n ...state,\n count: 0,\n timestamp: Date.now(),\n percentComplete: 0,\n };\n};\n\nexport const progressIndicatorReducer = createReducer<ProgressIndicatorState>(\n initialState,\n (builder) => {\n builder\n .addCase(startProgress, handleStartProgress)\n .addCase(finishProgress, handleEndProgress)\n .addCase(resetProgress, (state) => {\n return {\n ...state,\n count: 0,\n };\n })\n .addCase(updateProgress, (state, action) => {\n return {\n ...state,\n percentComplete: action.payload?.percentComplete,\n };\n })\n .addCase(fetchModel.pending, handleStartProgress)\n .addCase(fetchModel.fulfilled, handleEndProgress)\n .addCase(fetchModel.rejected, handleRejectedProgress);\n },\n);\n","// routerMiddleware.ts (updated based on your routerActions.ts)\n\nimport { go, goBack, goForward, push, replace } from \"./routerActions\"; // Correct path to routerActions.ts\n\nimport type { Middleware } from \"@reduxjs/toolkit\";\nimport type { History } from \"history\";\nimport type { RootState } from \"../store\";\n\nexport const routerMiddleware = (\n history: History,\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n): Middleware<{}, RootState> => {\n return (_storeApi) => (next) => (action: unknown) => {\n if (push.match(action)) {\n const { location, state } = action.payload; // TypeScript now knows 'action' is PushAction\n history.push(location, state);\n } else if (replace.match(action)) {\n const { location, state } = action.payload;\n history.replace(location, state);\n } else if (go.match(action)) {\n const { delta } = action.payload;\n history.go(delta);\n } else if (goBack.match(action)) {\n history.goBack();\n } else if (goForward.match(action)) {\n history.goForward();\n }\n\n return next(action);\n };\n};\n","import { combineReducers, configureStore } from \"@reduxjs/toolkit\";\n\nimport { authReducer } from \"./auth/authReducer\";\nimport { errorReducer } from \"./error/errorReducer\";\nimport { i18nReducer } from \"./i18n/i18nReducer\";\nimport { modalsReducer } from \"./modals/modalsReducer\";\nimport { modelCatalogReducer } from \"./modelcatalog/modelCatalogReducer\";\nimport { modularUIReducer } from \"./modularui/modularuiReducer\";\nimport { notificationReducer } from \"./notifications/notificationReducer\";\nimport { preferencesReducer } from \"./preferences/preferencesReducer\";\nimport { progressIndicatorReducer } from \"./progressindicator/progressIndicatorReducer\";\nimport { getBrowserHistory } from \"./router/browserHistory\";\nimport { routerMiddleware } from \"./router/routerMiddleware\";\nimport { routerReducer } from \"./router/routerReducer\";\n\nimport type { Reducer } from \"@reduxjs/toolkit\";\n\nconst reducers = {\n router: routerReducer,\n preferences: preferencesReducer,\n modularui: modularUIReducer,\n i18n: i18nReducer,\n auth: authReducer,\n error: errorReducer,\n modals: modalsReducer,\n modelcatalog: modelCatalogReducer,\n notification: notificationReducer,\n progressindicator: progressIndicatorReducer,\n};\nconst rootReducers = combineReducers(reducers);\n\nexport const setupStore = (\n preloadedState?: Partial<RootState>,\n customReducers?: Record<string, Reducer> | null,\n history = getBrowserHistory(),\n) => {\n const reducer = customReducers\n ? combineReducers({ ...reducers, ...customReducers })\n : rootReducers;\n\n return configureStore({\n reducer,\n middleware: (getDefaultMiddleware) =>\n getDefaultMiddleware({\n serializableCheck: false,\n }).concat(routerMiddleware(history)),\n preloadedState,\n });\n};\n\nexport type BEIStore = ReturnType<typeof setupStore>;\nexport type RootState = ReturnType<typeof rootReducers>;\nexport type BEIDispatch = BEIStore[\"dispatch\"];\n"],"mappings":"0TAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAc,OAAO,UAGrBC,GAAiBD,GAAY,eAUjC,SAASE,GAAQC,EAAQC,EAAK,CAC5B,OAAOD,GAAU,MAAQF,GAAe,KAAKE,EAAQC,CAAG,CAC1D,CAEAL,EAAO,QAAUG,KClBjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAU,IACVC,GAAU,IA6Bd,SAASC,GAAIC,EAAQC,EAAM,CACzB,OAAOD,GAAU,MAAQF,GAAQE,EAAQC,EAAMJ,EAAO,CACxD,CAEAD,EAAO,QAAUG,KClBV,IAAMG,GAA0B,CACrCC,EAAwC,CAAC,EACzCC,IACG,CACH,GAAID,EAAkB,OAAS,EAC7B,QAAWE,KAAoBF,EAC7BE,EAAiBD,CAAK,CAG5B,ECxBA,OAAS,wBAAAE,MAA4B,0BACrC,OAAS,wBAAAC,MAA4B,UAIrC,IAAIC,EAA+C,KAC/CC,EAAoC,KAMjC,SAASC,GAAmC,CACjD,GAAI,OAAO,OAAW,IACpB,MAAM,IAAI,MACR,8DACF,EAGF,IAAMC,EAAoBL,EAAqB,EAC/C,OAAI,CAACE,GAA0BG,IAAsBF,KACnDD,EAAyBD,EAAqB,CAC5C,SAAUI,CACZ,CAAC,EACDF,EAAqBE,GAEhBH,CACT,CC5BA,OAAS,gBAAAI,EAAc,iBAAAC,MAAqB,mBAW5C,IAAMC,EAAe,CAAE,SAAU,OAAW,OAA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AW,SAAUT,EAAsB,CACxD,CACF,EClEO,IAAMU,EACXC,GAGQC,GAAeC,GAAUC,GAAoB,CACnD,GAAIC,EAAK,MAAMD,CAAM,EAAG,CACtB,GAAM,CAAE,SAAAE,EAAU,MAAAC,CAAM,EAAIH,EAAO,QACnCH,EAAQ,KAAKK,EAAUC,CAAK,CAC9B,SAAWC,EAAQ,MAAMJ,CAAM,EAAG,CAChC,GAAM,CAAE,SAAAE,EAAU,MAAAC,CAAM,EAAIH,EAAO,QACnCH,EAAQ,QAAQK,EAAUC,CAAK,CACjC,SAAWE,EAAG,MAAML,CAAM,EAAG,CAC3B,GAAM,CAAE,MAAAM,CAAM,EAAIN,EAAO,QACzBH,EAAQ,GAAGS,CAAK,CAClB,MAAWC,EAAO,MAAMP,CAAM,EAC5BH,EAAQ,OAAO,EACNW,EAAU,MAAMR,CAAM,GAC/BH,EAAQ,UAAU,EAGpB,OAAOE,EAAKC,CAAM,CACpB,EC7BF,OAAS,mBAAAS,EAAiB,kBAAAC,OAAsB,mBAiBhD,IAAMC,EAAW,CACf,OAAQC,EACR,YAAaC,EACb,UAAWC,EACX,KAAMC,EACN,KAAMC,EACN,MAAOC,EACP,OAAQC,EACR,aAAcC,EACd,aAAcC,EACd,kBAAmBC,CACrB,EACMC,GAAeC,EAAgBZ,CAAQ,EAEhCa,GAAa,CACxBC,EACAC,EACAC,EAAUC,EAAkB,IACzB,CACH,IAAMC,EAAUH,EACZH,EAAgB,CAAE,GAAGZ,EAAU,GAAGe,CAAe,CAAC,EAClDJ,GAEJ,OAAOQ,GAAe,CACpB,QAAAD,EACA,WAAaE,GACXA,EAAqB,CACnB,kBAAmB,EACrB,CAAC,EAAE,OAAOC,EAAiBL,CAAO,CAAC,EACrC,eAAAF,CACF,CAAC,CACH","names":["require_baseHas","__commonJSMin","exports","module","objectProto","hasOwnProperty","baseHas","object","key","require_has","__commonJSMin","exports","module","baseHas","hasPath","has","object","path","handleBeforeRenderHooks","beforeRenderHooks","props","beforeRenderHook","getContextPathServer","createBrowserHistory","browserHistoryInstance","historyContextPath","getBrowserHistory","contextPathServer","createAction","createReducer","initialState","locationChange","location","action","routerReducer","builder","state","ApplicationModel","createReducer","initialState","handleUpdateErrorStatus","state","action","key","error","handleSetModel","model","handleInitModel","payload","handleUpdateModel","modelKey","handleRemoveModelByKey","handleResetModularUI","ApplicationModel","handleFetchModelPending","handleFetchModelFulfilled","updateHandler","finalModel","handleFetchModelRejected","modularUIReducer","createReducer","builder","updateErrorStatus","setModel","initModels","updateModel","updateForm","removeModelByKey","resetModularUI","fetchModel","createReducer","initialState","handleStartProgress","state","handleEndProgress","isFinalFinish","handleRejectedProgress","progressIndicatorReducer","createReducer","builder","startProgress","finishProgress","resetProgress","updateProgress","action","fetchModel","routerMiddleware","history","_storeApi","next","action","push","location","state","replace","go","delta","goBack","goForward","combineReducers","configureStore","reducers","routerReducer","preferencesReducer","modularUIReducer","i18nReducer","authReducer","errorReducer","modalsReducer","modelCatalogReducer","notificationReducer","progressIndicatorReducer","rootReducers","combineReducers","setupStore","preloadedState","customReducers","history","getBrowserHistory","reducer","configureStore","getDefaultMiddleware","routerMiddleware"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as r}from"./chunk-K3DTH6XN.js";var c=i=>{let o=null,e=preferencesProvider.getLayoutConfigFileLocation();if(typeof e=="string"){let t=e.startsWith("/")?`/resource${e}`:`/resource/${e}`;if(o=dataFetcher.fetch(t),o)i.dispatch(r(o));else throw new Error(`Could not read theme configuration file from: ${t}`)}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4AC7YQ5Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/theme/serverTheme.ts"],"sourcesContent":["import { setThemePreference } from \"../redux/preferences/preferencesActions\";\n\nimport type { BEIStore } from \"../redux/store\";\n\nexport const setConfigurationTheme = (store: BEIStore) => {\n let configTheme = null;\n\n const configFileLocation = preferencesProvider.getLayoutConfigFileLocation();\n if (typeof configFileLocation === \"string\") {\n const configFilePath = configFileLocation.startsWith(\"/\")\n ? `/resource${configFileLocation}`\n : `/resource/${configFileLocation}`;\n\n configTheme = dataFetcher.fetch(configFilePath);\n\n if (configTheme) {\n store.dispatch(setThemePreference(configTheme));\n } else {\n throw new Error(\n `Could not read theme configuration file from: ${configFilePath}`,\n );\n }\n }\n};\n"],"mappings":"wCAIO,IAAMA,EAAyBC,GAAoB,CACxD,IAAIC,EAAc,KAEZC,EAAqB,oBAAoB,4BAA4B,EAC3E,GAAI,OAAOA,GAAuB,SAAU,CAC1C,IAAMC,EAAiBD,EAAmB,WAAW,GAAG,EACpD,YAAYA,CAAkB,GAC9B,aAAaA,CAAkB,GAInC,GAFAD,EAAc,YAAY,MAAME,CAAc,EAE1CF,EACFD,EAAM,SAASI,EAAmBH,CAAW,CAAC,MAE9C,OAAM,IAAI,MACR,iDAAiDE,CAAc,EACjE,CAEJ,CACF","names":["setConfigurationTheme","store","configTheme","configFileLocation","configFilePath","setThemePreference"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-6E5DAS6G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-FW4363Y4.js";var C=a((ra,b)=>{"use strict";var Xe=typeof global=="object"&&global&&global.Object===Object&&global;b.exports=Xe});var v=a((aa,S)=>{"use strict";var Qe=C(),We=typeof self=="object"&&self&&self.Object===Object&&self,Ye=Qe||We||Function("return this")();S.exports=Ye});var d=a((oa,O)=>{"use strict";var Ze=v(),ke=Ze.Symbol;O.exports=ke});var w=a((ia,T)=>{"use strict";var j=d(),m=Object.prototype,et=m.hasOwnProperty,tt=m.toString,p=j?j.toStringTag:void 0;function rt(e){var t=et.call(e,p),r=e[p];try{e[p]=void 0;var o=!0}catch{}var u=tt.call(e);return o&&(t?e[p]=r:delete e[p]),u}T.exports=rt});var I=a((na,D)=>{"use strict";var at=Object.prototype,ot=at.toString;function it(e){return ot.call(e)}D.exports=it});var H=a((sa,z)=>{"use strict";var P=d(),nt=w(),st=I(),ut="[object Null]",ct="[object Undefined]",E=P?P.toStringTag:void 0;function pt(e){return e==null?e===void 0?ct:ut:E&&E in Object(e)?nt(e):st(e)}z.exports=pt});var _=a((ua,M)=>{"use strict";function ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}M.exports=ht});var F=a((ca,N)=>{"use strict";var lt=H(),ft=_(),vt="[object AsyncFunction]",dt="[object Function]",_t="[object GeneratorFunction]",gt="[object Proxy]";function xt(e){if(!ft(e))return!1;var t=lt(e);return t==dt||t==_t||t==vt||t==gt}N.exports=xt});var R=a((pa,G)=>{"use strict";var yt=v(),qt=yt["__core-js_shared__"];G.exports=qt});var A=a((ha,$)=>{"use strict";var g=R(),B=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bt(e){return!!B&&B in e}$.exports=bt});var K=a((la,U)=>{"use strict";var Ct=Function.prototype,St=Ct.toString;function Ot(e){if(e!=null){try{return St.call(e)}catch{}try{return e+""}catch{}}return""}U.exports=Ot});var L=a((fa,J)=>{"use strict";var jt=F(),mt=A(),Tt=_(),wt=K(),Dt=/[\\^$.*+?()[\]{}|]/g,It=/^\[object .+?Constructor\]$/,Pt=Function.prototype,Et=Object.prototype,zt=Pt.toString,Ht=Et.hasOwnProperty,Mt=RegExp("^"+zt.call(Ht).replace(Dt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nt(e){if(!Tt(e)||mt(e))return!1;var t=jt(e)?Mt:It;return t.test(wt(e))}J.exports=Nt});var X=a((va,V)=>{"use strict";function Ft(e,t){return e?.[t]}V.exports=Ft});var x=a((da,Q)=>{"use strict";var Gt=L(),Rt=X();function Bt(e,t){var r=Rt(e,t);return Gt(r)?r:void 0}Q.exports=Bt});var h=a((_a,W)=>{"use strict";var $t=x(),At=$t(Object,"create");W.exports=At});var k=a((ga,Z)=>{"use strict";var Y=h();function Ut(){this.__data__=Y?Y(null):{},this.size=0}Z.exports=Ut});var te=a((xa,ee)=>{"use strict";function Kt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}ee.exports=Kt});var ae=a((ya,re)=>{"use strict";var Jt=h(),Lt="__lodash_hash_undefined__",Vt=Object.prototype,Xt=Vt.hasOwnProperty;function Qt(e){var t=this.__data__;if(Jt){var r=t[e];return r===Lt?void 0:r}return Xt.call(t,e)?t[e]:void 0}re.exports=Qt});var ie=a((qa,oe)=>{"use strict";var Wt=h(),Yt=Object.prototype,Zt=Yt.hasOwnProperty;function kt(e){var t=this.__data__;return Wt?t[e]!==void 0:Zt.call(t,e)}oe.exports=kt});var se=a((ba,ne)=>{"use strict";var er=h(),tr="__lodash_hash_undefined__";function rr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=er&&t===void 0?tr:t,this}ne.exports=rr});var ce=a((Ca,ue)=>{"use strict";var ar=k(),or=te(),ir=ae(),nr=ie(),sr=se();function i(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}i.prototype.clear=ar;i.prototype.delete=or;i.prototype.get=ir;i.prototype.has=nr;i.prototype.set=sr;ue.exports=i});var he=a((Sa,pe)=>{"use strict";function ur(){this.__data__=[],this.size=0}pe.exports=ur});var fe=a((Oa,le)=>{"use strict";function cr(e,t){return e===t||e!==e&&t!==t}le.exports=cr});var l=a((ja,ve)=>{"use strict";var pr=fe();function hr(e,t){for(var r=e.length;r--;)if(pr(e[r][0],t))return r;return-1}ve.exports=hr});var _e=a((ma,de)=>{"use strict";var lr=l(),fr=Array.prototype,vr=fr.splice;function dr(e){var t=this.__data__,r=lr(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():vr.call(t,r,1),--this.size,!0}de.exports=dr});var xe=a((Ta,ge)=>{"use strict";var _r=l();function gr(e){var t=this.__data__,r=_r(t,e);return r<0?void 0:t[r][1]}ge.exports=gr});var qe=a((wa,ye)=>{"use strict";var xr=l();function yr(e){return xr(this.__data__,e)>-1}ye.exports=yr});var Ce=a((Da,be)=>{"use strict";var qr=l();function br(e,t){var r=this.__data__,o=qr(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}be.exports=br});var Oe=a((Ia,Se)=>{"use strict";var Cr=he(),Sr=_e(),Or=xe(),jr=qe(),mr=Ce();function n(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}n.prototype.clear=Cr;n.prototype.delete=Sr;n.prototype.get=Or;n.prototype.has=jr;n.prototype.set=mr;Se.exports=n});var me=a((Pa,je)=>{"use strict";var Tr=x(),wr=v(),Dr=Tr(wr,"Map");je.exports=Dr});var De=a((Ea,we)=>{"use strict";var Te=ce(),Ir=Oe(),Pr=me();function Er(){this.size=0,this.__data__={hash:new Te,map:new(Pr||Ir),string:new Te}}we.exports=Er});var Pe=a((za,Ie)=>{"use strict";function zr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}Ie.exports=zr});var f=a((Ha,Ee)=>{"use strict";var Hr=Pe();function Mr(e,t){var r=e.__data__;return Hr(t)?r[typeof t=="string"?"string":"hash"]:r.map}Ee.exports=Mr});var He=a((Ma,ze)=>{"use strict";var Nr=f();function Fr(e){var t=Nr(this,e).delete(e);return this.size-=t?1:0,t}ze.exports=Fr});var Ne=a((Na,Me)=>{"use strict";var Gr=f();function Rr(e){return Gr(this,e).get(e)}Me.exports=Rr});var Ge=a((Fa,Fe)=>{"use strict";var Br=f();function $r(e){return Br(this,e).has(e)}Fe.exports=$r});var Be=a((Ga,Re)=>{"use strict";var Ar=f();function Ur(e,t){var r=Ar(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}Re.exports=Ur});var Ae=a((Ra,$e)=>{"use strict";var Kr=De(),Jr=He(),Lr=Ne(),Vr=Ge(),Xr=Be();function s(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=Kr;s.prototype.delete=Jr;s.prototype.get=Lr;s.prototype.has=Vr;s.prototype.set=Xr;$e.exports=s});var Wr=a((Ba,Ke)=>{"use strict";var Ue=Ae(),Qr="Expected a function";function y(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Qr);var r=function(){var o=arguments,u=t?t.apply(this,o):o[0],c=r.cache;if(c.has(u))return c.get(u);var q=e.apply(this,o);return r.cache=c.set(u,q)||c,q};return r.cache=new(y.Cache||Ue),r}y.Cache=Ue;Ke.exports=y});import{useDispatch as Je,useSelector as Le,useStore as Ve}from"react-redux";var Zr=Je.withTypes(),kr=Le.withTypes(),ea=Ve.withTypes();export{v as a,d as b,H as c,_ as d,x as e,fe as f,Wr as g,Zr as h,kr as i,ea as j};
|
|
2
|
+
//# sourceMappingURL=chunk-6KRECIRI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js","../src/redux/hooks.ts"],"sourcesContent":["/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","// eslint-disable-next-line no-restricted-imports\nimport { useDispatch, useSelector, useStore } from \"react-redux\";\n\nimport type { BEIDispatch, BEIStore, RootState } from \"./store\";\n\n// Use throughout the library instead of plain `useDispatch` and `useSelector`\nexport const useBEIDispatch = useDispatch.withTypes<BEIDispatch>();\nexport const useBEISelector = useSelector.withTypes<RootState>();\nexport const useBEIStore = useStore.withTypes<BEIStore>();\n"],"mappings":"mCAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,EAAO,QAAUC,KCHjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAa,IAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,GAAOF,IAAcC,IAAY,SAAS,aAAa,EAAE,EAE7DF,EAAO,QAAUG,KCRjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAO,IAGPC,GAASD,GAAK,OAElBD,EAAO,QAAUE,KCLjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,EAAS,IAGTC,EAAc,OAAO,UAGrBC,GAAiBD,EAAY,eAO7BE,GAAuBF,EAAY,SAGnCG,EAAiBJ,EAASA,EAAO,YAAc,OASnD,SAASK,GAAUC,EAAO,CACxB,IAAIC,EAAQL,GAAe,KAAKI,EAAOF,CAAc,EACjDI,EAAMF,EAAMF,CAAc,EAE9B,GAAI,CACFE,EAAMF,CAAc,EAAI,O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ACRC,EAASF,GAAW,KAAO,EAAIA,EAAQ,OAG3C,IADA,KAAK,MAAM,EACJ,EAAEC,EAAQC,GAAQ,CACvB,IAAIC,EAAQH,EAAQC,CAAK,EACzB,KAAK,IAAIE,EAAM,CAAC,EAAGA,EAAM,CAAC,CAAC,CAC7B,CACF,CAGAJ,EAAS,UAAU,MAAQL,GAC3BK,EAAS,UAAU,OAAYJ,GAC/BI,EAAS,UAAU,IAAMH,GACzBG,EAAS,UAAU,IAAMF,GACzBE,EAAS,UAAU,IAAMD,GAEzBL,GAAO,QAAUM,IC/BjB,IAAAK,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAW,KAGXC,GAAkB,sBA8CtB,SAASC,EAAQC,EAAMC,EAAU,CAC/B,GAAI,OAAOD,GAAQ,YAAeC,GAAY,MAAQ,OAAOA,GAAY,WACvE,MAAM,IAAI,UAAUH,EAAe,EAErC,IAAII,EAAW,UAAW,CACxB,IAAIC,EAAO,UACPC,EAAMH,EAAWA,EAAS,MAAM,KAAME,CAAI,EAAIA,EAAK,CAAC,EACpDE,EAAQH,EAAS,MAErB,GAAIG,EAAM,IAAID,CAAG,EACf,OAAOC,EAAM,IAAID,CAAG,EAEtB,IAAIE,EAASN,EAAK,MAAM,KAAMG,CAAI,EAClC,OAAAD,EAAS,MAAQG,EAAM,IAAID,EAAKE,CAAM,GAAKD,EACpCC,CACT,EACA,OAAAJ,EAAS,MAAQ,IAAKH,EAAQ,OAASF,IAChCK,CACT,CAGAH,EAAQ,MAAQF,GAEhBD,GAAO,QAAUG,ICvEjB,OAAS,eAAAQ,GAAa,eAAAC,GAAa,YAAAC,OAAgB,cAK5C,IAAMC,GAAiBH,GAAY,UAAuB,EACpDI,GAAiBH,GAAY,UAAqB,EAClDI,GAAcH,GAAS,UAAoB","names":["require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","require_isObject","__commonJSMin","exports","module","isObject","value","type","require_isFunction","__commonJSMin","exports","module","baseGetTag","isObject","asyncTag","funcTag","genTag","proxyTag","isFunction","value","tag","require_coreJsData","__commonJSMin","exports","module","root","coreJsData","require_isMasked","__commonJSMin","exports","module","coreJsData","maskSrcKey","uid","isMasked","func","require_toSource","__commonJSMin","exports","module","funcProto","funcToString","toSource","func","require_baseIsNative","__commonJSMin","exports","module","isFunction","isMasked","isObject","toSource","reRegExpChar","reIsHostCtor","funcProto","objectProto","funcToString","hasOwnProperty","reIsNative","baseIsNative","value","pattern","require_getValue","__commonJSMin","exports","module","getValue","object","key","require_getNative","__commonJSMin","exports","module","baseIsNative","getValue","getNative","object","key","value","require_nativeCreate","__commonJSMin","exports","module","getNative","nativeCreate","require_hashClear","__commonJSMin","exports","module","nativeCreate","hashClear","require_hashDelete","__commonJSMin","exports","module","hashDelete","key","result","require_hashGet","__commonJSMin","exports","module","nativeCreate","HASH_UNDEFINED","objectProto","hasOwnProperty","hashGet","key","data","result","require_hashHas","__commonJSMin","exports","module","nativeCreate","objectProto","hasOwnProperty","hashHas","key","data","require_hashSet","__commonJSMin","exports","module","nativeCreate","HASH_UNDEFINED","hashSet","key","value","data","require_Hash","__commonJSMin","exports","module","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entries","index","length","entry","require_listCacheClear","__commonJSMin","exports","module","listCacheClear","require_eq","__commonJSMin","exports","module","eq","value","other","require_assocIndexOf","__commonJSMin","exports","module","eq","assocIndexOf","array","key","length","require_listCacheDelete","__commonJSMin","exports","module","assocIndexOf","arrayProto","splice","listCacheDelete","key","data","index","lastIndex","require_listCacheGet","__commonJSMin","exports","module","assocIndexOf","listCacheGet","key","data","index","require_listCacheHas","__commonJSMin","exports","module","assocIndexOf","listCacheHas","key","require_listCacheSet","__commonJSMin","exports","module","assocIndexOf","listCacheSet","key","value","data","index","require_ListCache","__commonJSMin","exports","module","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","entries","index","length","entry","require_Map","__commonJSMin","exports","module","getNative","root","Map","require_mapCacheClear","__commonJSMin","exports","module","Hash","ListCache","Map","mapCacheClear","require_isKeyable","__commonJSMin","exports","module","isKeyable","value","type","require_getMapData","__commonJSMin","exports","module","isKeyable","getMapData","map","key","data","require_mapCacheDelete","__commonJSMin","exports","module","getMapData","mapCacheDelete","key","result","require_mapCacheGet","__commonJSMin","exports","module","getMapData","mapCacheGet","key","require_mapCacheHas","__commonJSMin","exports","module","getMapData","mapCacheHas","key","require_mapCacheSet","__commonJSMin","exports","module","getMapData","mapCacheSet","key","value","data","size","require_MapCache","__commonJSMin","exports","module","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","entries","index","length","entry","require_memoize","__commonJSMin","exports","module","MapCache","FUNC_ERROR_TEXT","memoize","func","resolver","memoized","args","key","cache","result","useDispatch","useSelector","useStore","useBEIDispatch","useBEISelector","useBEIStore"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as u,e as y}from"./chunk-WBPDMDW4.js";import{b as w}from"./chunk-6KRECIRI.js";import{a as f}from"./chunk-FW4363Y4.js";var b=f((k,s)=>{"use strict";function A(n,i){for(var r=-1,t=i.length,e=n.length;++r<t;)n[e+r]=i[r];return n}s.exports=A});var q=f((p,l)=>{"use strict";var g=w(),P=y(),S=u(),a=g?g.isConcatSpreadable:void 0;function d(n){return S(n)||P(n)||!!(a&&n&&n[a])}l.exports=d});var j=f((z,m)=>{"use strict";var C=b(),c=q();function x(n,i,r,t,e){var h=-1,F=n.length;for(r||(r=c),e||(e=[]);++h<F;){var o=n[h];i>0&&r(o)?i>1?x(o,i-1,r,t,e):C(e,o):t||(e[e.length]=o)}return e}m.exports=x});export{j as a};
|
|
2
|
+
//# sourceMappingURL=chunk-A4USB53Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"],"sourcesContent":["/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n"],"mappings":"+HAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,cAQA,SAASC,EAAUC,EAAOC,EAAQ,CAKhC,QAJIC,EAAQ,GACRC,EAASF,EAAO,OAChBG,EAASJ,EAAM,OAEZ,EAAEE,EAAQC,GACfH,EAAMI,EAASF,CAAK,EAAID,EAAOC,CAAK,EAEtC,OAAOF,CACT,CAEAF,EAAO,QAAUC,ICnBjB,IAAAM,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAS,IACTC,EAAc,IACdC,EAAU,IAGVC,EAAmBH,EAASA,EAAO,mBAAqB,OAS5D,SAASI,EAAcC,EAAO,CAC5B,OAAOH,EAAQG,CAAK,GAAKJ,EAAYI,CAAK,GACxC,CAAC,EAAEF,GAAoBE,GAASA,EAAMF,CAAgB,EAC1D,CAEAJ,EAAO,QAAUK,ICnBjB,IAAAE,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAY,IACZC,EAAgB,IAapB,SAASC,EAAYC,EAAOC,EAAOC,EAAWC,EAAUC,EAAQ,CAC9D,IAAIC,EAAQ,GACRC,EAASN,EAAM,OAKnB,IAHAE,IAAcA,EAAYJ,GAC1BM,IAAWA,EAAS,CAAC,GAEd,EAAEC,EAAQC,GAAQ,CACvB,IAAIC,EAAQP,EAAMK,CAAK,EACnBJ,EAAQ,GAAKC,EAAUK,CAAK,EAC1BN,EAAQ,EAEVF,EAAYQ,EAAON,EAAQ,EAAGC,EAAWC,EAAUC,CAAM,EAEzDP,EAAUO,EAAQG,CAAK,EAEfJ,IACVC,EAAOA,EAAO,MAAM,EAAIG,EAE5B,CACA,OAAOH,CACT,CAEAR,EAAO,QAAUG","names":["require_arrayPush","__commonJSMin","exports","module","arrayPush","array","values","index","length","offset","require_isFlattenable","__commonJSMin","exports","module","Symbol","isArguments","isArray","spreadableSymbol","isFlattenable","value","require_baseFlatten","__commonJSMin","exports","module","arrayPush","isFlattenable","baseFlatten","array","depth","predicate","isStrict","result","index","length","value"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/utils.ts"],"sourcesContent":["import type { ComponentType, Ref } from \"react\";\n\nexport const getDisplayName = (\n WrappedComponent: ComponentType<never>,\n defaultName = \"Component\",\n contextId?: string,\n) => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\nexport const mergeRefs =\n <T>(refs: Ref<T>[]): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n (ref as { current: T | null }).current = value;\n }\n });\n };\n"],"mappings":"AAEO,IAAMA,EAAiB,CAC5BC,EACAC,EAAc,YACdC,IACG,CACH,IAAMC,EACJH,EAAiB,aAAeA,EAAiB,MAAQC,EAE3D,OAAIC,EACK,GAAGC,CAAa,IAAID,CAAS,IAG/BC,CACT,EAEaC,EACPC,GACHC,GAAU,CACTD,EAAK,QAASE,GAAQ,CAChB,OAAOA,GAAQ,WACjBA,EAAID,CAAK,EACAC,GAAO,MAAQ,OAAOA,GAAQ,WACtCA,EAA8B,QAAUD,EAE7C,CAAC,CACH","names":["getDisplayName","WrappedComponent","defaultName","contextId","componentName","mergeRefs","refs","value","ref"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as P}from"./chunk-MT7D3AJU.js";import{b as u}from"./chunk-VFLYA5WJ.js";import{a as h,c as l,d as S,i as _}from"./chunk-3OP2KQ56.js";import{a as s,i as d,t as y,v as w}from"./chunk-Y7ESITVO.js";import{a as T,b}from"./chunk-DI7VM62A.js";import{g as E,h as g,i as R}from"./chunk-K3DTH6XN.js";import{getContextPathModularUI as k,getStringSetting as B,setSetting as F,setSettings as H}from"@beinformed/ui/settings";import{Cache as a,xhr as D}from"@beinformed/ui/utils";import{createRoot as A,hydrateRoot as L}from"react-dom/client";import{HelmetProvider as x}from"@dr.pogodin/react-helmet";import{Provider as C}from"react-redux";import{Router as I}from"react-router";import{jsx as p}from"react/jsx-runtime";var f=({store:o,routerHistory:e,theme:t,children:r,ErrorFallbackComponent:i})=>p(C,{store:o,children:p(b,{theme:t,children:p(x,{children:p(P,{FallbackComponent:i,children:p(I,{history:e,children:r})})})})});f.displayName="BEI.Init";import{jsx as q}from"react/jsx-runtime";var M=o=>{window.onunhandledrejection=e=>e.reason?setImmediate(()=>{let t=e.reason.message.toString()||String(e.reason);throw o.dispatch(y(t)),e.reason}):e},N=(o,e)=>{let t=o.preferences.theme;T(t,e)},v=o=>{let t=new URLSearchParams(window.location.search).get("redirectURI");t&&D({url:`${k()}${t}`}).catch(r=>{if(r.id==="UnauthorizedException"||r.id==="Error.NotAuthorized"||r.id==="Error.Authentication.Required"||r.id==="Error.Authentication.InvalidCredentials"){let i=B("LOGIN_PATH","/signin");o.dispatch(w(i,{from:{pathname:t},modal:!1}))}})},U=o=>{if(typeof window<"u"){let e=new URLSearchParams(window.location?.search).get("entryDate");if(e)o.dispatch(d(e));else if(a.hasItem("ModelCatalogEntryDate")){let t=a.getItem("ModelCatalogEntryDate");o.dispatch(d(t))}}},W=(o,e,t,r)=>{let i=window.contextPath;if(typeof i<"u")F("CONTEXT_PATH",i);else throw new Error("Missing contextPath on window object");r&&H(r),a.clear("^res:");let n=_(u(),o);return N(n.getState(),t),v(n),U(n),E(n.getState()),R(n.getState()),g(n.getState()),a.loadOtherBrowserTabs(()=>{a.getItem("auth")&&n.dispatch(s())}),a.getItem("auth")&&n.dispatch(s()),l().listen((m,c)=>{n.dispatch(S(m,c))}),M(n),document.body&&(document.body.className="js"),e&&h(e,{store:n}),{store:n}},j=(o,e,t,r,i)=>{window.addEventListener("DOMContentLoaded",()=>{let n=document.querySelector("#application");if(!n)throw new Error("No DOM element with id application found to attach client to");t(n,q(f,{store:o,routerHistory:l(),theme:r,ErrorFallbackComponent:i,children:e()}))})},O=(o,e)=>{o.querySelector(".application")?L(o,e):A(o).render(e)},le=({customReducers:o,theme:e,settings:t,render:r,beforeRenderHooks:i,ErrorFallbackComponent:n,mount:m})=>{let{store:c}=W(o,i,t);j(c,r,m??O,e,n)};(function(){let e=document.querySelector('script[type="application/json"][data-app-state="app-json"]');if(!e)throw new Error("Error finding script with attribute app-json to retrieve context path in html");let t=e.getAttribute("data-app-contextpath");if(t&&(window.contextPath=t),typeof __webpack_public_path__<"u"){let i=e.getAttribute("data-app-filepath");i&&i!=="{FILEPATH}"?__webpack_public_path__=`${i}/`:t&&(__webpack_public_path__=`${t}/`)}let r=e.getAttribute("data-app-nonce");r&&(__webpack_nonce__=r)})();export{f as a,M as b,U as c,W as d,j as e,le as f};
|
|
2
|
+
//# sourceMappingURL=chunk-B7PQLTVC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/client/client.tsx","../src/client/Init.tsx","../src/client/contextPath.ts"],"sourcesContent":["import {\n getContextPathModularUI,\n getStringSetting,\n setSetting,\n setSettings,\n} from \"@beinformed/ui/settings\";\nimport { Cache, xhr } from \"@beinformed/ui/utils\";\nimport { createRoot, hydrateRoot } from \"react-dom/client\";\n\nimport { loginSuccess } from \"../redux/auth/authReducer\";\nimport { handleBeforeRenderHooks } from \"../redux/beforeRenderHooks\";\nimport { getDataFromServer } from \"../redux/dataFromServer\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { showXHRErrorNotification } from \"../redux/notifications/notificationActions\";\nimport {\n setAllContentInDataSetting,\n setDateTimeSettings,\n setLoginPreferences,\n} from \"../redux/preferences/preferencesActions\";\nimport { getBrowserHistory } from \"../redux/router/browserHistory\";\nimport { replace } from \"../redux/router/routerActions\";\nimport { locationChange } from \"../redux/router/routerReducer\";\nimport { setupStore } from \"../redux/store\";\nimport { createTheme } from \"../theme/createTheme\";\nimport { Init } from \"./Init\";\n\nimport type { Setting } from \"@beinformed/ui/settings\";\nimport type { Reducer } from \"@reduxjs/toolkit\";\nimport type { ComponentType, ElementType, ReactElement } from \"react\";\nimport type { ErrorBoundaryFallbackProps } from \"../components/ErrorBoundaryFallback\";\nimport type { BeforeRenderHook } from \"../redux/beforeRenderHooks\";\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { BEIStore, RootState } from \"../redux/store\";\nimport type { Theme } from \"../theme/types\";\nimport type { WindowWithContext } from \"./types\";\n\ntype RenderFunction = () => ReactElement<ElementType>;\ntype MountFunction = (\n applicationNode: Element,\n element: ReactElement<ElementType>,\n) => void;\n\ninterface Props {\n customReducers?: Record<string, Reducer>;\n theme?: Theme | Theme[];\n settings?: Record<string, Setting>;\n render: RenderFunction;\n mount: MountFunction;\n beforeRenderHooks?: BeforeRenderHook[];\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>;\n}\n\nexport const setUnhandledRejectionEvent = (store: BEIStore) => {\n window.onunhandledrejection = (event: PromiseRejectionEvent) => {\n if (event.reason) {\n return setImmediate(() => {\n const errorMessage =\n event.reason.message.toString() || String(event.reason);\n\n store.dispatch(showXHRErrorNotification(errorMessage));\n throw event.reason;\n });\n }\n\n return event;\n };\n};\n\nconst initThemeSettings = (state: RootState, theme?: Theme | Theme[]) => {\n const storedTheme = state.preferences.theme;\n createTheme(storedTheme, theme); // on theme creation, the settings are set\n};\n\n/**\n * The redirectURI querystring parameter is available when the server is redirecting an unauthorized deep link\n * @param store\n */\nconst handleRedirectURI = (store: BEIStore) => {\n const urlParams = new URLSearchParams(window.location.search);\n const redirectURI = urlParams.get(\"redirectURI\");\n if (redirectURI) {\n xhr({ url: `${getContextPathModularUI()}${redirectURI}` }).catch((e) => {\n if (\n e.id === \"UnauthorizedException\" ||\n e.id === \"Error.NotAuthorized\" ||\n e.id === \"Error.Authentication.Required\" ||\n e.id === \"Error.Authentication.InvalidCredentials\"\n ) {\n const LOGIN_PATH = getStringSetting(\"LOGIN_PATH\", \"/signin\");\n store.dispatch(\n replace(LOGIN_PATH, {\n from: { pathname: redirectURI },\n modal: false,\n }),\n );\n }\n });\n }\n};\n\nexport const setModelCatalogEntryDate = (store: BEIStore) => {\n if (typeof window !== \"undefined\") {\n const entryDateFromUrl = new URLSearchParams(window.location?.search).get(\n \"entryDate\",\n );\n if (entryDateFromUrl) {\n store.dispatch(updateEntryDate(entryDateFromUrl));\n } else if (Cache.hasItem(\"ModelCatalogEntryDate\")) {\n const entryDate = Cache.getItem(\"ModelCatalogEntryDate\") as string;\n store.dispatch(updateEntryDate(entryDate));\n }\n }\n};\n\nexport const setupClient = (\n customReducers?: Record<string, Reducer>,\n beforeRenderHooks?: BeforeRenderHook[],\n theme?: Theme | Theme[],\n settings?: Record<string, Setting>,\n) => {\n const contextPath = (window as WindowWithContext).contextPath;\n\n if (typeof contextPath !== \"undefined\") {\n setSetting(\"CONTEXT_PATH\", contextPath);\n } else {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n if (settings) {\n setSettings(settings);\n }\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n const reduxStore = setupStore(getDataFromServer(), customReducers);\n\n initThemeSettings(reduxStore.getState(), theme);\n\n handleRedirectURI(reduxStore);\n setModelCatalogEntryDate(reduxStore);\n\n setAllContentInDataSetting(reduxStore.getState());\n setLoginPreferences(reduxStore.getState());\n setDateTimeSettings(reduxStore.getState());\n\n // load existing cache from other browser tabs\n Cache.loadOtherBrowserTabs(() => {\n if (Cache.getItem(\"auth\")) {\n reduxStore.dispatch(loginSuccess());\n }\n });\n\n if (Cache.getItem(\"auth\")) {\n reduxStore.dispatch(loginSuccess());\n }\n\n // listen to history change and update the redux router store\n getBrowserHistory().listen((location, action) => {\n reduxStore.dispatch(locationChange(location as RouterLocation, action));\n });\n\n setUnhandledRejectionEvent(reduxStore);\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n if (beforeRenderHooks) {\n handleBeforeRenderHooks(beforeRenderHooks, { store: reduxStore });\n }\n\n return { store: reduxStore };\n};\n\nexport const addContentLoadedEvent = (\n store: BEIStore,\n render: RenderFunction,\n mount: MountFunction,\n theme?: Theme | Theme[],\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>,\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (!applicationNode) {\n throw new Error(\n \"No DOM element with id application found to attach client to\",\n );\n }\n\n mount(\n applicationNode,\n <Init\n store={store}\n routerHistory={getBrowserHistory()}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>,\n );\n });\n};\n\nconst mountClient = (\n applicationNode: Element,\n element: ReactElement<ElementType>,\n) => {\n const isSSR = applicationNode.querySelector(\".application\");\n if (isSSR) {\n hydrateRoot(applicationNode, element);\n } else {\n const root = createRoot(applicationNode);\n root.render(element);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, setup redux store and caches, add unhandledRejectionEvent, used client side when JavaScript is enabled.\n */\nexport const client = ({\n customReducers,\n theme,\n settings,\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n mount,\n}: Props) => {\n const { store } = setupClient(customReducers, beforeRenderHooks, settings);\n\n addContentLoadedEvent(\n store,\n render,\n mount ?? mountClient,\n theme,\n ErrorFallbackComponent,\n );\n};\n","import { HelmetProvider } from \"@dr.pogodin/react-helmet\";\nimport { Provider } from \"react-redux\";\nimport { Router } from \"react-router\";\n\nimport { ErrorBoundary } from \"../components/ErrorBoundary\";\nimport { ThemeProvider } from \"../theme/ThemeProvider\";\n\nimport type { History as RouterHistory } from \"history\";\nimport type { ComponentType, ReactNode } from \"react\";\nimport type { ErrorBoundaryFallbackProps } from \"../components/ErrorBoundaryFallback\";\nimport type { BEIStore } from \"../redux/store\";\nimport type { Theme } from \"../theme/types\";\n\ninterface Props {\n store: BEIStore;\n routerHistory: RouterHistory;\n theme?: Theme | Theme[];\n children: ReactNode;\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>;\n}\n\nexport const Init = ({\n store,\n routerHistory,\n theme,\n children,\n ErrorFallbackComponent,\n}: Props): ReactNode => (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <HelmetProvider>\n <ErrorBoundary FallbackComponent={ErrorFallbackComponent}>\n <Router history={routerHistory}>{children}</Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </Provider>\n);\n\nInit.displayName = \"BEI.Init\";\n","import type { WindowWithContext } from \"./types\";\n\ndeclare let __webpack_public_path__: string;\ndeclare let __webpack_nonce__: string;\n\n(function x() {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]',\n );\n if (!dataElement) {\n throw new Error(\n \"Error finding script with attribute app-json to retrieve context path in html\",\n );\n }\n\n const contextPath = dataElement.getAttribute(\"data-app-contextpath\");\n if (contextPath) {\n (window as WindowWithContext).contextPath = contextPath;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n const filePath = dataElement.getAttribute(\"data-app-filepath\");\n if (filePath && filePath !== \"{FILEPATH}\") {\n __webpack_public_path__ = `${filePath}/`; // NOSONAR\n } else if (contextPath) {\n __webpack_public_path__ = `${contextPath}/`; // NOSONAR\n }\n }\n\n const nonce = dataElement.getAttribute(\"data-app-nonce\");\n if (nonce) {\n __webpack_nonce__ = nonce; // NOSONAR\n }\n})();\n\nexport {};\n"],"mappings":"0SAAA,OACE,2BAAAA,EACA,oBAAAC,EACA,cAAAC,EACA,eAAAC,MACK,0BACP,OAAS,SAAAC,EAAO,OAAAC,MAAW,uBAC3B,OAAS,cAAAC,EAAY,eAAAC,MAAmB,mBCPxC,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,YAAAC,MAAgB,cACzB,OAAS,UAAAC,MAA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,cAAc,cAAc,EAC7D,GAAI,CAACA,EACH,MAAM,IAAI,MACR,8DACF,EAGFF,EACEE,EACA/C,EAACgD,EAAA,CACC,MAAO9C,EACP,cAAeoC,EAAkB,EACjC,MAAO9B,EACP,uBAAwBsC,EAEvB,SAAAF,EAAO,EACV,CACF,CACF,CAAC,CACH,EAEMK,EAAc,CAClBF,EACAG,IACG,CACWH,EAAgB,cAAc,cAAc,EAExDI,EAAYJ,EAAiBG,CAAO,EAEvBE,EAAWL,CAAe,EAClC,OAAOG,CAAO,CAEvB,EAKaG,GAAS,CAAC,CACrB,eAAA5B,EACA,MAAAjB,EACA,SAAAmB,EACA,OAAAiB,EACA,kBAAAlB,EACA,uBAAAoB,EACA,MAAAD,CACF,IAAa,CACX,GAAM,CAAE,MAAA3C,CAAM,EAAIsB,EAAYC,EAAgBC,EAAmBC,CAAQ,EAEzEgB,EACEzC,EACA0C,EACAC,GAASI,EACTzC,EACAsC,CACF,CACF,GEzOC,UAAa,CACZ,IAAMQ,EAAc,SAAS,cAC3B,4DACF,EACA,GAAI,CAACA,EACH,MAAM,IAAI,MACR,+EACF,EAGF,IAAMC,EAAcD,EAAY,aAAa,sBAAsB,EAKnE,GAJIC,IACD,OAA6B,YAAcA,GAG1C,OAAO,wBAA4B,IAAa,CAClD,IAAMC,EAAWF,EAAY,aAAa,mBAAmB,EACzDE,GAAYA,IAAa,aAC3B,wBAA0B,GAAGA,CAAQ,IAC5BD,IACT,wBAA0B,GAAGA,CAAW,IAE5C,CAEA,IAAME,EAAQH,EAAY,aAAa,gBAAgB,EACnDG,IACF,kBAAoBA,EAExB,GAAG","names":["getContextPathModularUI","getStringSetting","setSetting","setSettings","Cache","xhr","createRoot","hydrateRoot","HelmetProvider","Provider","Router","jsx","Init","store","routerHistory","theme","children","ErrorFallbackComponent","Provider","ThemeProvider","HelmetProvider","ErrorBoundary","Router","jsx","setUnhandledRejectionEvent","store","event","errorMessage","showXHRErrorNotification","initThemeSettings","state","theme","storedTheme","createTheme","handleRedirectURI","redirectURI","xhr","getContextPathModularUI","e","LOGIN_PATH","getStringSetting","replace","setModelCatalogEntryDate","entryDateFromUrl","updateEntryDate","Cache","entryDate","setupClient","customReducers","beforeRenderHooks","settings","contextPath","setSetting","setSettings","reduxStore","setupStore","getDataFromServer","setAllContentInDataSetting","setLoginPreferences","setDateTimeSettings","loginSuccess","getBrowserHistory","location","action","locationChange","handleBeforeRenderHooks","addContentLoadedEvent","render","mount","ErrorFallbackComponent","applicationNode","Init","mountClient","element","hydrateRoot","createRoot","client","dataElement","contextPath","filePath","nonce"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as D}from"./chunk-A4USB53Q.js";import{a as g}from"./chunk-K3DTH6XN.js";import{i}from"./chunk-6KRECIRI.js";import{a as d,b as f}from"./chunk-FW4363Y4.js";var a=d((I,l)=>{"use strict";var y=D(),P=1/0;function b(t){var n=t==null?0:t.length;return n?y(t,P):[]}l.exports=b});var u=f(a(),1),c=f(g(),1);import{setSettings as S}from"@beinformed/ui/settings";var h=t=>{let n=Object.keys(t).map(e=>`\\b${e}\\b`).join("|"),o=new RegExp(`\\$(${n})`,"g");return Object.entries(t).forEach(([e,r])=>{e!=="settings"&&typeof r=="string"&&(t[e]=r.replace(o,(m,p)=>{let s=t[p];return typeof s=="string"?s:m}))}),t},v=(t,...n)=>{let o=t?.settings??{},e={settings:{}};for(let r of n)if(typeof r=="function")e=r(h(e));else if((0,c.default)(r)){let m=e.settings??{};e={...e,...r,...t},"settings"in r&&typeof r.settings=="object"&&(e.settings={...m,...r.settings,...o})}return h(e)},T=(t,...n)=>{let o=(0,u.default)(n).filter(r=>r!=null),e=v(t,...o);return e?.settings&&S(e.settings),e};import{ThemeProvider as R}from"styled-components";import{jsx as x}from"react/jsx-runtime";var N=({theme:t,children:n})=>{let o=i(r=>r.preferences.theme),e=T(o,t);return x(R,{theme:e,children:n})};N.displayName="BI.ThemeProvider";export{T as a,N as b};
|
|
2
|
+
//# sourceMappingURL=chunk-DI7VM62A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flattenDeep.js","../src/theme/createTheme.ts","../src/theme/ThemeProvider.tsx"],"sourcesContent":["var baseFlatten = require('./_baseFlatten');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nmodule.exports = flattenDeep;\n","import { setSettings } from \"@beinformed/ui/settings\";\nimport flattenDeep from \"lodash/flattenDeep\";\nimport isPlainObject from \"lodash/isPlainObject\";\n\nimport type { DefaultTheme } from \"styled-components\";\n\nconst replacePlaceholders = (inputTheme: DefaultTheme): DefaultTheme => {\n const possibleKeys = Object.keys(inputTheme)\n .map((key) => `\\\\b${key}\\\\b`)\n .join(\"|\");\n\n const re = new RegExp(`\\\\$(${possibleKeys})`, \"g\");\n Object.entries(inputTheme).forEach(([key, value]) => {\n if (key !== \"settings\" && typeof value === \"string\") {\n inputTheme[key] = value.replace(re, (match, capture) => {\n const replacement = inputTheme[capture];\n return typeof replacement === \"string\" ? replacement : match;\n });\n }\n });\n\n return inputTheme;\n};\n\nconst generateTheme = (\n storedTheme: DefaultTheme | null | undefined,\n ...themeElements: (DefaultTheme | ((theme: DefaultTheme) => DefaultTheme))[]\n): DefaultTheme => {\n const storedSettings = storedTheme?.settings ?? {};\n\n let generatedTheme: DefaultTheme = { settings: {} };\n\n for (const element of themeElements) {\n if (typeof element === \"function\") {\n generatedTheme = element(replacePlaceholders(generatedTheme));\n } else if (isPlainObject(element)) {\n const generatedSettings = generatedTheme.settings ?? {};\n\n // Type assertion is less critical here if DefaultTheme is well-defined\n generatedTheme = {\n ...generatedTheme,\n ...(element as DefaultTheme),\n ...(storedTheme as DefaultTheme),\n };\n\n if (\"settings\" in element && typeof element.settings === \"object\") {\n generatedTheme.settings = {\n ...generatedSettings,\n ...(element.settings as Record<string, string>), // Adjusted to Record<string, string> based on your DefaultTheme\n ...storedSettings,\n };\n }\n }\n }\n\n return replacePlaceholders(generatedTheme);\n};\n\n/**\n * Create a theme from multiple theme configuration objects.\n * Properties are overwritten by iterating the configuration objects from left to right.\n *\n * The first argument represents a stored theme part, this is optional. The stored theme part will overwrite every part in the collection of theme parts.\n * Thus a stored configuration is leading as it can be configured by a modeller through the repository.\n *\n * Placeholders can be used, they are replaced before calling a function theme part or at the end of the theme creation.\n *\n * Both objects and function can be used, where a function receives the previous objects as input arguments.\n * For example using the method createTheme(ThemeObject, ThemeObject2, ThemeFunction, ThemeFunction2), will be handled as:\n *\n * ThemeFunction2(ThemeFunction1({ ...ThemeObject, ...ThemeObject2 }))\n *\n * @example\n * Example where the primary color of the default theme is overwritten with a primary color of the custom theme,\n * but the button bg still uses the yiq function of the default theme:\n *\n * const DefaultTheme = {\n * PRIMARY_COLOR: \"#0000ff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * BUTTON_COLOR: \"$PRIMARY_COLOR\"\n * }\n *\n * const createDefaultTheme = (input) => ({\n * ...input,\n * BUTTON_BG: getContrastYIQ(input.BUTTON_COLOR)\n * })\n *\n * const CustomTheme = {\n * PRIMARY_COLOR: \"#ff0000\"\n * }\n *\n * createTheme(null, DefaultTheme, CustomTheme, createDefaultTheme);\n *\n * // Result:\n * {\n * PRIMARY_COLOR: \"#ff0000\",\n * BUTTON_COLOR: \"#ff0000\",\n * BUTTON_BG: \"#fff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * }\n */\nexport const createTheme = (\n storedTheme: DefaultTheme | null | undefined,\n ...themeConfigs: (\n | DefaultTheme\n | (DefaultTheme | ((theme: DefaultTheme) => DefaultTheme))[]\n | ((theme: DefaultTheme) => DefaultTheme)\n | undefined\n )[]\n): DefaultTheme => {\n const flattenConfig = flattenDeep<\n | DefaultTheme\n | DefaultTheme[]\n | ((theme: DefaultTheme) => DefaultTheme)\n | undefined\n >(themeConfigs).filter((el) => el != null);\n\n const customTheme = generateTheme(storedTheme, ...flattenConfig);\n\n if (customTheme?.settings) {\n setSettings(customTheme.settings);\n }\n\n return customTheme;\n};\n","import { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { createTheme } from \"./createTheme\";\n\nimport type { ReactNode } from \"react\";\nimport type { RootState } from \"../redux/store\";\nimport type { Theme } from \"./types\";\n\nexport interface Props {\n theme?: Theme | Theme[];\n children: ReactNode;\n}\n\nexport const ThemeProvider = ({ theme, children }: Props): ReactNode => {\n const storedTheme = useBEISelector<RootState, Theme | undefined>(\n (state) => state.preferences.theme,\n );\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n"],"mappings":"kKAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAc,IAGdC,EAAW,IAgBf,SAASC,EAAYC,EAAO,CAC1B,IAAIC,EAASD,GAAS,KAAO,EAAIA,EAAM,OACvC,OAAOC,EAASJ,EAAYG,EAAOF,CAAQ,EAAI,CAAC,CAClD,CAEAF,EAAO,QAAUG,ICvBjB,IAAAG,EAAwB,SACxBC,EAA0B,SAF1B,OAAS,eAAAC,MAAmB,0BAM5B,IAAMC,EAAuBC,GAA2C,CACtE,IAAMC,EAAe,OAAO,KAAKD,CAAU,EACxC,IAAKE,GAAQ,MAAMA,CAAG,KAAK,EAC3B,KAAK,GAAG,EAELC,EAAK,IAAI,OAAO,OAAOF,CAAY,IAAK,GAAG,EACjD,cAAO,QAAQD,CAAU,EAAE,QAAQ,CAAC,CAACE,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enDeep","__commonJSMin","exports","module","baseFlatten","INFINITY","flattenDeep","array","length","import_flattenDeep","import_isPlainObject","setSettings","replacePlaceholders","inputTheme","possibleKeys","key","re","value","match","capture","replacement","generateTheme","storedTheme","themeElements","storedSettings","generatedTheme","element","isPlainObject","generatedSettings","createTheme","themeConfigs","flattenConfig","flattenDeep","el","customTheme","SCThemeProvider","jsx","ThemeProvider","theme","children","storedTheme","useBEISelector","state","finalTheme","createTheme","SCThemeProvider"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports);var l=(b,a,c,e)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&f(b,d,{get:()=>a[d],enumerable:!(e=h(a,d))||e.enumerable});return b};var n=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b};
|
|
2
|
+
//# sourceMappingURL=chunk-FW4363Y4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as p,e as l,h as u}from"./chunk-YG7XDCNV.js";var L=t=>{if(!t)return"";let e=[];return t.split("&").forEach(r=>{let[o,a]=r.split("=");o&&a?e.push(`${encodeURIComponent(o)}=${encodeURIComponent(a)}`):o&&e.push(encodeURIComponent(o))}),e.join("&")},h=t=>{let e=t.getPathInfo()||"/",r=t.getQueryString();return e=e.split("/").map(o=>encodeURIComponent(o)).join("/"),r?`${e}?${L(r)}`:e},C=t=>({pathname:t.getPathInfo()||"/",search:t.getQueryString()||"",state:{},hash:""}),v=(t,e)=>t.getCookieByName(e),m=(t,e)=>{let o=v(t,"locale")||t.getHeader("Accept-Language");return o===null?e.availableLocaleCodes[0]:e.getPreferredLocale(o)};import{IllegalArgumentException as g}from"@beinformed/ui/exceptions";import{getEnabledLocales as y}from"@beinformed/ui/settings";import R from"deepmerge";var E=(t,e=[],r)=>{if(!Array.isArray(e))throw new g("locales must be an array of objects");if(!r)throw new g("missing request argument");let o=p.map(n=>{let s=n.code,c=e.find(d=>d.code===s);return c?R(n,c):n});e.forEach(n=>{o.some(s=>s.code===n.code)||o.push(n)});let a=o.filter(n=>y().includes(n.code)),i=new l(a),f=m(r,i);t.dispatch(u(i,f??"en"))};export{h as a,C as b,v as c,m as d,E as e};
|
|
2
|
+
//# sourceMappingURL=chunk-HDOILTJ2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server/requestInformation.ts","../src/i18n/serverI18n.ts"],"sourcesContent":["import type { Locales } from \"../i18n/Locales\";\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { HttpServletRequestJava } from \"./types\";\n\nconst encodeQueryString = (queryString: string) => {\n if (!queryString) return \"\";\n\n const params: string[] = [];\n queryString.split(\"&\").forEach((part) => {\n const [key, value] = part.split(\"=\");\n if (key && value) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n } else if (key) {\n params.push(encodeURIComponent(key));\n }\n });\n return params.join(\"&\");\n};\n\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n let pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n pathInfo = pathInfo\n .split(\"/\")\n .map((segment) => encodeURIComponent(segment))\n .join(\"/\");\n\n if (queryString) {\n return `${pathInfo}?${encodeQueryString(queryString)}`;\n }\n\n return pathInfo;\n};\n\nexport const getFullRequestLocation = (\n request: HttpServletRequestJava,\n): RouterLocation => {\n return {\n pathname: request.getPathInfo() || \"/\",\n search: request.getQueryString() || \"\",\n state: {},\n hash: \"\",\n };\n};\n\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string,\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales,\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n","import { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\nimport { getEnabledLocales } from \"@beinformed/ui/settings\";\nimport deepmerge from \"deepmerge\";\n\nimport { setLocales } from \"../redux/i18n/i18nReducer\";\nimport { getPreferredLocale } from \"../server/requestInformation\";\nimport { availableLocales, Locales } from \"./Locales\";\n\nimport type { BEIStore } from \"../redux/store\";\nimport type { HttpServletRequestJava } from \"../server/types\";\nimport type { LocaleConfiguration } from \"./types\";\n\nexport const setI18n = (\n store: BEIStore,\n locales: LocaleConfiguration[] = [],\n request: HttpServletRequestJava,\n) => {\n if (!Array.isArray(locales)) {\n throw new IllegalArgumentException(\"locales must be an array of objects\");\n }\n if (!request) {\n throw new IllegalArgumentException(\"missing request argument\");\n }\n\n const mergedLocales = availableLocales.map((locale) => {\n const code = locale.code;\n const customLocale = locales.find((custLocale) => custLocale.code === code);\n\n if (customLocale) {\n return deepmerge(locale, customLocale);\n }\n\n return locale;\n });\n\n locales.forEach((customLocale) => {\n if (!mergedLocales.some((locale) => locale.code === customLocale.code)) {\n mergedLocales.push(customLocale);\n }\n });\n\n const enabledLocales = mergedLocales.filter((locale: LocaleConfiguration) =>\n getEnabledLocales().includes(locale.code),\n );\n\n const localesInstance = new Locales(enabledLocales);\n const preferredLocale = getPreferredLocale(request, localesInstance);\n store.dispatch(setLocales(localesInstance, preferredLocale ?? \"en\"));\n};\n"],"mappings":"sDAIA,IAAMA,EAAqBC,GAAwB,CACjD,GAAI,CAACA,EAAa,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EAAgBC,EAAiB,IAAKC,GAAW,CACrD,IAAMC,EAAOD,EAAO,KACdE,EAAeP,EAAQ,KAAMQ,GAAeA,EAAW,OAASF,CAAI,EAE1E,OAAIC,EACKE,EAAUJ,EAAQE,CAAY,EAGhCF,CACT,CAAC,EAEDL,EAAQ,QAASO,GAAiB,CAC3BJ,EAAc,KAAME,GAAWA,EAAO,OAASE,EAAa,IAAI,GACnEJ,EAAc,KAAKI,CAAY,CAEnC,CAAC,EAED,IAAMG,EAAiBP,EAAc,OAAQE,GAC3CM,EAAkB,EAAE,SAASN,EAAO,IAAI,CAC1C,EAEMO,EAAkB,IAAIC,EAAQH,CAAc,EAC5CI,EAAkBC,EAAmBd,EAASW,CAAe,EACnEb,EAAM,SAASiB,EAAWJ,EAAiBE,GAAmB,IAAI,CAAC,CACrE","names":["encodeQueryString","queryString","params","part","key","value","getFullRequestUrl","request","pathInfo","segment","getFullRequestLocation","getCookieFromRequest","cookieName","getPreferredLocale","locales","acceptLanguageHeader","IllegalArgumentException","getEnabledLocales","deepmerge","setI18n","store","locales","request","IllegalArgumentException","mergedLocales","availableLocales","locale","code","customLocale","custLocale","deepmerge","enabledLocales","getEnabledLocales","localesInstance","Locales","preferredLocale","getPreferredLocale","setLocales"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/redux/i18n/i18nSelectors.ts"],"sourcesContent":["import type { Locales } from \"../../i18n/Locales\";\nimport type { RootState } from \"../store\";\n\n/**\n * Retrieve the locale from state\n */\nexport const getLocale = (state: RootState) => {\n return state.i18n?.locale ?? \"en\";\n};\n\n/**\n * Retrieve all available locales in the store\n */\nexport const getLocales = (state: RootState): Locales => state.i18n.locales;\n"],"mappings":"AAMO,IAAMA,EAAaC,GACjBA,EAAM,MAAM,QAAU,KAMlBC,EAAcD,GAA8BA,EAAM,KAAK","names":["getLocale","state","getLocales"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as x}from"./chunk-WBPDMDW4.js";import{c as R}from"./chunk-6KRECIRI.js";import{a as c,b as j}from"./chunk-FW4363Y4.js";var T=c(($,y)=>{"use strict";function h(r,e){return function(t){return r(e(t))}}y.exports=h});var O=c((z,S)=>{"use strict";var A=T(),G=A(Object.getPrototypeOf,Object);S.exports=G});var E=c((K,I)=>{"use strict";var L=R(),V=O(),k=x(),F="[object Object]",w=Function.prototype,U=Object.prototype,v=w.toString,q=U.hasOwnProperty,M=v.call(Object);function J(r){if(!k(r)||L(r)!=F)return!1;var e=V(r);if(e===null)return!0;var t=q.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&v.call(t)==M}I.exports=J});import{createAction as g,createReducer as C}from"@reduxjs/toolkit";var o=g("SET_PREFERENCE",(r,e)=>({payload:{key:r,value:e}})),a=g("SET_PREFERENCES",r=>({payload:{...r}})),D={},W=C(D,r=>{r.addCase(o,(e,t)=>{let{key:n,value:i}=t.payload;e[n]=i}).addCase(a,(e,t)=>{for(let n of Object.keys(t.payload))e[n]=t.payload[n]})});var b=j(E(),1);import{LOGIN_PASSWORD_SETTING as f,LOGIN_PATH_SETTING as p,LOGIN_TYPE as l,LOGIN_USERNAME_SETTING as u,LOGOUT_PATH_SETTING as d}from"@beinformed/ui/constants";import{JsonParseException as H}from"@beinformed/ui/exceptions";import{ALL_CONTENT_IN_DATA_SETTING as P,INCLUDE_TIME_OFFSET as m,setSetting as _,setSettings as N}from"@beinformed/ui/settings";var s=(r,e,t)=>{let n;return typeof preferencesProvider<"u"&&(n=preferencesProvider.getPreferenceByName(r)),n||(n=e),typeof n=="string"&&t!=="string"&&n.includes(",")&&(n=n.split(",").map(i=>i.trim())),n},re=(r,e,t)=>{let n=s(r,e,t);return o(r,n)},te=r=>{let e;try{e=r?JSON.parse(r):null}catch(t){throw new H(`Theme file contains invalid JSON: ${t}`)}return e&&(0,b.default)(e)&&N(e.settings),o("theme",e)},ne=r=>{let e=!1;return typeof preferencesProvider<"u"&&typeof preferencesProvider.getModularUIContentInData<"u"?e=preferencesProvider.getModularUIContentInData():typeof r<"u"&&(e=r.preferences[P]),_(P,!!e),o(P,e)},oe=r=>{let e=!1;return typeof preferencesProvider<"u"&&typeof preferencesProvider.isIncludeTimeOffsetInDateTimes<"u"?e=preferencesProvider.isIncludeTimeOffsetInDateTimes():typeof r<"u"&&(e=r.preferences[m]),_(m,!!e),o(m,e)},se=r=>{let e={[l]:s(l,r?.preferences[l]||""),[p]:s(p,r?.preferences[p]||"/callback?client_name=FormClient"),[u]:s(u,r?.preferences[u]||"j_username"),[f]:s(f,r?.preferences[f]||"j_password"),[d]:s(d,r?.preferences[d]||"/logout")};return N(e),a(e)};export{E as a,o as b,a as c,W as d,re as e,te as f,ne as g,oe as h,se as i};
|
|
2
|
+
//# sourceMappingURL=chunk-K3DTH6XN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js","../src/redux/preferences/preferencesReducer.ts","../src/redux/preferences/preferencesActions.ts"],"sourcesContent":["/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { Theme } from \"../../theme/types\";\nimport type { PreferenceValue } from \"./types\";\n\nexport type PreferencesState = Record<string, PreferenceValue> & {\n theme?: Theme;\n};\n\nexport const setPreference = createAction(\n \"SET_PREFERENCE\",\n (propertyName: string, propertyValue: PreferenceValue) => {\n return {\n payload: {\n key: propertyName,\n value: propertyValue,\n },\n };\n },\n);\n\nexport const setPreferences = createAction(\n \"SET_PREFERENCES\",\n (preferences: Record<string, PreferenceValue>) => {\n return {\n payload: {\n ...preferences,\n },\n };\n },\n);\n\nconst initialState = {};\n\nexport const preferencesReducer = createReducer<PreferencesState>(\n initialState,\n (builder) => {\n builder\n .addCase(setPreference, (state, action) => {\n const { key, value } = action.payload;\n state[key] = value;\n })\n .addCase(setPreferences, (state, action) => {\n for (const key of Object.keys(action.payload)) {\n state[key] = action.payload[key];\n }\n });\n },\n);\n","import {\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_TYPE,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"@beinformed/ui/constants\";\nimport { JsonParseException } from \"@beinformed/ui/exceptions\";\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n INCLUDE_TIME_OFFSET,\n setSetting,\n setSettings,\n} from \"@beinformed/ui/settings\";\nimport isPlainObject from \"lodash/isPlainObject\";\n\nimport { setPreference, setPreferences } from \"./preferencesReducer\";\n\nimport type { RootState } from \"../store\";\nimport type { PreferenceValue } from \"./types\";\n\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue,\n type?: string,\n) => {\n let value;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (!value) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value as PreferenceValue;\n};\n\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue,\n type?: string,\n) => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\nexport const setThemePreference = (configTheme: string) => {\n let themeData;\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (state?: RootState) => {\n let allContentInDataSetting = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[\n ALL_CONTENT_IN_DATA_SETTING\n ] as boolean;\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieve settings for date time conversion\n */\nexport const setDateTimeSettings = (state?: RootState) => {\n let isIncludeTimeOffsetInDateTimes = false;\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.isIncludeTimeOffsetInDateTimes !== \"undefined\"\n ) {\n isIncludeTimeOffsetInDateTimes =\n preferencesProvider.isIncludeTimeOffsetInDateTimes();\n } else if (typeof state !== \"undefined\") {\n isIncludeTimeOffsetInDateTimes = state.preferences[\n INCLUDE_TIME_OFFSET\n ] as boolean;\n }\n\n setSetting(INCLUDE_TIME_OFFSET, !!isIncludeTimeOffsetInDateTimes);\n return setPreference(INCLUDE_TIME_OFFSET, isIncludeTimeOffsetInDateTimes);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (state?: RootState) => {\n const loginSettings = {\n [LOGIN_TYPE]: getServerPreferenceValue(\n LOGIN_TYPE,\n state?.preferences[LOGIN_TYPE] || \"\",\n ) as string,\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ||\n `/callback?client_name=FormClient`,\n ) as string,\n [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(\n LOGIN_USERNAME_SETTING,\n state?.preferences[LOGIN_USERNAME_SETTING] || \"j_username\",\n ) as string,\n [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(\n LOGIN_PASSWORD_SETTING,\n state?.preferences[LOGIN_PASSWORD_SETTING] || \"j_password\",\n ) as string,\n [LOGOUT_PATH_SETTING]: getServerPreferenceValue(\n LOGOUT_PATH_SETTING,\n state?.preferences[LOGOUT_PATH_SETTING] || `/logout`,\n ) as string,\n };\n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BAAoB,0BAA0B,EAC/D,OAAOD,EAAU,MAC1BC,EAA0BD,EAAM,YAC9BE,CACF,GAGFC,EAAWD,EAA6B,CAAC,CAACD,CAAuB,EAC1DV,EAAcW,EAA6BD,CAAuB,CAC3E,EAKaG,GAAuBJ,GAAsB,CACxD,IAAIK,EAAiC,GACrC,OACE,OAAO,oBAAwB,KAC/B,OAAO,oBAAoB,+BAAmC,IAE9DA,EACE,oBAAoB,+BAA+B,EAC5C,OAAOL,EAAU,MAC1BK,EAAiCL,EAAM,YACrCM,CACF,GAGFH,EAAWG,EAAqB,CAAC,CAACD,CAA8B,EACzDd,EAAce,EAAqBD,CAA8B,CAC1E,EAKaE,GAAuBP,GAAsB,CACxD,IAAMQ,EAAgB,CACpB,CAACC,CAAU,EAAG1B,EACZ0B,EACAT,GAAO,YAAYS,CAAU,GAAK,EACpC,EACA,CAACC,CAAkB,EAAG3B,EACpB2B,EACAV,GAAO,YAAYU,CAAkB,GACnC,kCACJ,EACA,CAACC,CAAsB,EAAG5B,EACxB4B,EACAX,GAAO,YAAYW,CAAsB,GAAK,YAChD,EACA,CAACC,CAAsB,EAAG7B,EACxB6B,EACAZ,GAAO,YAAYY,CAAsB,GAAK,YAChD,EACA,CAACC,CAAmB,EAAG9B,EACrB8B,EACAb,GAAO,YAAYa,CAAmB,GAAK,SAC7C,CACF,EAEA,OAAAf,EAAYU,CAAa,EAClBM,EAAeN,CAAa,CACrC","names":["require_overArg","__commonJSMin","exports","module","overArg","func","transform","arg","require_getPrototype","__commonJSMin","exports","module","overArg","getPrototype","require_isPlainObject","__commonJSMin","exports","module","baseGetTag","getPrototype","isObjectLike","objectTag","funcProto","objectProto","funcToString","hasOwnProperty","objectCtorString","isPlainObject","value","proto","Ctor","createAction","createReducer","setPreference","propertyName","propertyValue","setPreferences","preferences","initialState","preferencesReducer","builder","state","action","key","value","import_isPlainObject","LOGIN_PASSWORD_SETTING","LOGIN_PATH_SETTING","LOGIN_TYPE","LOGIN_USERNAME_SETTING","LOGOUT_PATH_SETTING","JsonParseException","ALL_CONTENT_IN_DATA_SETTING","INCLUDE_TIME_OFFSET","setSetting","setSettings","getServerPreferenceValue","preferenceName","defaultValue","type","value","val","setServerPreference","propertyName","setPreference","setThemePreference","configTheme","themeData","error","JsonParseException","isPlainObject","setSettings","setAllContentInDataSetting","state","allContentInDataSetting","ALL_CONTENT_IN_DATA_SETTING","setSetting","setDateTimeSettings","isIncludeTimeOffsetInDateTimes","INCLUDE_TIME_OFFSET","setLoginPreferences","loginSettings","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING","setPreferences"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import s from"big.js";var m=(r,e=1,t="SPACER",n="rem")=>{if(typeof e=="string")return e;if(typeof e=="number"){if(typeof r[t]=="number")return`${s(e).times(r[t])}${n}`;throw new Error(`Size ${t} must be a number`)}throw new Error(`Ratio ${JSON.stringify(e)} must be a string or number`)},u=(r=1)=>({theme:e})=>m(e,r),p=(...r)=>({theme:e})=>r.map(t=>m(e,t)).join(" "),b=(r=1)=>({theme:e})=>m(e,r,"GRID_GUTTER","px");export{u as a,p as b,b as c};
|
|
2
|
+
//# sourceMappingURL=chunk-KNEDBCHP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/theme/utils/spacers.ts"],"sourcesContent":["import Big from \"big.js\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\n\nconst getSize = (\n theme: Theme,\n ratio: number | string = 1,\n path = \"SPACER\",\n unit = \"rem\",\n) => {\n if (typeof ratio === \"string\") {\n return ratio;\n }\n\n if (typeof ratio === \"number\") {\n if (typeof theme[path] === \"number\") {\n const size = Big(ratio).times(theme[path] as number);\n return `${size}${unit}`;\n }\n throw new Error(`Size ${path} must be a number`);\n }\n\n throw new Error(`Ratio ${JSON.stringify(ratio)} must be a string or number`);\n};\n\n/*\n * Render spacers based on the given ratio * theme SPACER\n */\nconst spacer =\n (ratio: number | string = 1) =>\n ({ theme }: { theme: Theme }) =>\n getSize(theme, ratio);\n\n/*\n * Render spacers based on the given ratio * theme SPACER\n * Ratio's can be given clockwise with shorthand,\n * spacers(0.5, 1) with a spacer of 0.8 will give \"0.4rem 1rem\";\n */\nconst spacers =\n (...ratios: (number | \"auto\")[]) =>\n ({ theme }: { theme: Theme }) =>\n ratios.map((ratio) => getSize(theme, ratio)).join(\" \");\n\n/*\n * Render a gutter based on GUTTER property\n */\nconst gutter =\n (ratio: number | string = 1): ((arg0: UtilThemeProps) => string) =>\n ({ theme }: { theme: Theme }) =>\n getSize(theme, ratio, \"GRID_GUTTER\", \"px\");\n\nexport { spacer, spacers, gutter };\n"],"mappings":"AAAA,OAAOA,MAAS,SAIhB,IAAMC,EAAU,CACdC,EACAC,EAAyB,EACzBC,EAAO,SACPC,EAAO,QACJ,CACH,GAAI,OAAOF,GAAU,SACnB,OAAOA,EAGT,GAAI,OAAOA,GAAU,SAAU,CAC7B,GAAI,OAAOD,EAAME,CAAI,GAAM,SAEzB,MAAO,GADMJ,EAAIG,CAAK,EAAE,MAAMD,EAAME,CAAI,CAAW,CACrC,GAAGC,CAAI,GAEvB,MAAM,IAAI,MAAM,QAAQD,CAAI,mBAAmB,CACjD,CAEA,MAAM,IAAI,MAAM,SAAS,KAAK,UAAUD,CAAK,CAAC,6BAA6B,CAC7E,EAKMG,EACJ,CAACH,EAAyB,IAC1B,CAAC,CAAE,MAAAD,CAAM,IACPD,EAAQC,EAAOC,CAAK,EAOlBI,EACJ,IAAIC,IACJ,CAAC,CAAE,MAAAN,CAAM,IACPM,EAAO,IAAKL,GAAUF,EAAQC,EAAOC,CAAK,CAAC,EAAE,KAAK,GAAG,EAKnDM,EACJ,CAACN,EAAyB,IAC1B,CAAC,CAAE,MAAAD,CAAM,IACPD,EAAQC,EAAOC,EAAO,cAAe,IAAI","names":["Big","getSize","theme","ratio","path","unit","spacer","spacers","ratios","gutter"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{a as c,b as p}from"./chunk-KNEDBCHP.js";import s from"styled-components";import{jsx as d,jsxs as y}from"react/jsx-runtime";var i=s.div`
|
|
2
|
+
padding: ${p(2,1)};
|
|
3
|
+
margin-bottom: ${c(2)};
|
|
4
|
+
background-color: #e9ecef;
|
|
5
|
+
border-radius: 0.3em;
|
|
6
|
+
`,m=s.pre`
|
|
7
|
+
display: block;
|
|
8
|
+
font-size: 87.5%;
|
|
9
|
+
color: #212529;
|
|
10
|
+
font-style: italic;
|
|
11
|
+
`,e=({className:a,componentStack:r,error:o})=>y(i,{className:a,children:[d("h2",{children:o.toString()}),d(m,{className:"debug",children:r})]});e.displayName="BI.ErrorBoundaryFallback";import{Component as u}from"react";import{jsx as f}from"react/jsx-runtime";var t=class extends u{static displayName="";static defaultProps={FallbackComponent:e};state={error:null,errorInfo:null};componentDidCatch(r,o){this.setState({error:r,errorInfo:o})}render(){let{children:r,FallbackComponent:o}=this.props,{error:n,errorInfo:l}=this.state;return n!=null?f(o,{componentStack:l?l.componentStack:"",error:n}):r??null}};t.displayName="BI.ErrorBoundary";export{e as a,t as b};
|
|
12
|
+
//# sourceMappingURL=chunk-MT7D3AJU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ErrorBoundaryFallback.tsx","../src/components/ErrorBoundary.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { spacer, spacers } from \"../theme/utils/spacers\";\n\nimport type { ReactNode } from \"react\";\n\nexport interface ErrorBoundaryFallbackProps {\n className?: string;\n componentStack: string;\n error: Error;\n}\n\nconst StyledBoundary = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\nexport const ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: ErrorBoundaryFallbackProps): ReactNode => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n","import { Component } from \"react\";\n\nimport { ErrorBoundaryFallback } from \"./ErrorBoundaryFallback\";\n\nimport type { ComponentType, ReactNode } from \"react\";\nimport type { ErrorBoundaryFallbackProps } from \"./ErrorBoundaryFallback\";\n\nexport interface ErrorBoundaryProps {\n children: ReactNode;\n FallbackComponent: ComponentType<ErrorBoundaryFallbackProps>;\n}\n\ninterface ErrorInfo {\n componentStack: string;\n}\n\ninterface State {\n error: Error | null;\n errorInfo: ErrorInfo | null;\n}\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n static displayName = \"\";\n static defaultProps: {\n FallbackComponent: ComponentType<ErrorBoundaryFallbackProps>;\n } = {\n FallbackComponent: ErrorBoundaryFallback,\n };\n\n override state: State = {\n error: null,\n errorInfo: null,\n };\n\n override componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n this.setState({ error, errorInfo });\n }\n\n override render() {\n const { children, FallbackComponent } = this.props; // NOSONAR\n const { error, errorInfo } = this.state;\n\n if (error != null) {\n return (\n <FallbackComponent\n componentStack={errorInfo ? errorInfo.componentStack : \"\"}\n error={error}\n />\n );\n }\n\n return children ?? null;\n }\n}\nErrorBoundary.displayName = \"BI.ErrorBoundary\";\n"],"mappings":"+CAAA,OAAOA,MAAY,oBA+BjB,OACE,OAAAC,EADF,QAAAC,MAAA,oBAnBF,IAAMC,EAAiBC,EAAO;AAAA,aACjBC,EAAQ,EAAG,CAAC,CAAC;AAAA,mBACPC,EAAO,CAAC,CAAC;AAAA;AAAA;AAAA,EAKtBC,EAAcH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAOdI,EAAwB,CAAC,CACpC,UAAAC,EACA,eAAAC,EACA,MAAAC,CACF,IACET,EAACC,EAAA,CAAe,UAAWM,EACzB,UAAAR,EAAC,MAAI,SAAAU,EAAM,SAAS,EAAE,EACtBV,EAACM,EAAA,CAAY,UAAU,QAAS,SAAAG,EAAe,GACjD,EAGFF,EAAsB,YAAc,2BCrCpC,OAAS,aAAAI,MAAiB,QA4ClB,cAAAC,MAAA,oBAvBD,IAAMC,EAAN,cAA4BC,CAAqC,CACtE,OAAO,YAAc,GACrB,OAAO,aAEH,CACF,kBAAmBC,CACrB,EAES,MAAe,CACtB,MAAO,KACP,UAAW,IACb,EAES,kBAAkBC,EAAcC,EAA4B,CACnE,KAAK,SAAS,CAAE,MAAAD,EAAO,UAAAC,CAAU,CAAC,CACpC,CAES,QAAS,CAChB,GAAM,CAAE,SAAAC,EAAU,kBAAAC,CAAkB,EAAI,KAAK,MACvC,CAAE,MAAAH,EAAO,UAAAC,CAAU,EAAI,KAAK,MAElC,OAAID,GAAS,KAETJ,EAACO,EAAA,CACC,eAAgBF,EAAYA,EAAU,eAAiB,GACvD,MAAOD,EACT,EAIGE,GAAY,IACrB,CACF,EACAL,EAAc,YAAc","names":["styled","jsx","jsxs","StyledBoundary","styled","spacers","spacer","StyledStack","ErrorBoundaryFallback","className","componentStack","error","Component","jsx","ErrorBoundary","Component","ErrorBoundaryFallback","error","errorInfo","children","FallbackComponent"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r,b as a}from"./chunk-JYAETKRB.js";import{g as l,i as s}from"./chunk-6KRECIRI.js";import{b as p}from"./chunk-FW4363Y4.js";var i=p(l(),1);import{createSelector as n}from"reselect";var g=n([a,r],(e,t)=>(0,i.default)((o,m,c)=>e.getLocale(t).getMessage(o,m,c),(...o)=>JSON.stringify(o))),M=(e,t,o)=>s(g)(e,t,o),x=()=>s(g),S=()=>s(r),d=n(e=>e.i18n.locales,e=>e.map(t=>t.code)),y=()=>s(d);export{M as a,x as b,S as c,y as d};
|
|
2
|
+
//# sourceMappingURL=chunk-RKGGCIUD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useI18n.ts"],"sourcesContent":["import memoize from \"lodash/memoize\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale, getLocales } from \"../redux/i18n/i18nSelectors\";\n\nimport type { MessageParameters } from \"@beinformed/ui/types\";\nimport type { RootState } from \"../redux/store\";\n\nconst getMessage = createSelector(\n [getLocales, getLocale],\n (locales, localeCode) =>\n memoize(\n (\n id: string,\n defaultMessage?: string,\n placeholders?: MessageParameters | undefined,\n ) =>\n locales\n .getLocale(localeCode)\n .getMessage(id, defaultMessage, placeholders),\n (...args) => JSON.stringify(args),\n ),\n);\n\nexport const useMessage = (\n id: string,\n defaultMessage?: string,\n placeholders?: MessageParameters | undefined,\n) => useBEISelector(getMessage)(id, defaultMessage, placeholders);\n\nexport const useTranslate = () => useBEISelector(getMessage);\n\nexport const useLocale = (): string => useBEISelector(getLocale);\n\nconst getLocaleCodes = createSelector(\n (state: RootState) => state.i18n.locales,\n (locales) => locales.map((locale: { code: string }) => locale.code),\n);\n\n/**\n * Retrieve all available locale codes\n */\nexport const useLocaleCodes = (): string[] => useBEISelector(getLocaleCodes);\n"],"mappings":"sIAAA,IAAAA,EAAoB,SACpB,OAAS,kBAAAC,MAAsB,WAQ/B,IAAMC,EAAaC,EACjB,CAACC,EAAYC,CAAS,EACtB,CAACC,EAASC,OACR,EAAAC,SACE,CACEC,EACAC,EACAC,IAEAL,EACG,UAAUC,CAAU,EACpB,WAAWE,EAAIC,EAAgBC,CAAY,EAChD,IAAIC,IAAS,KAAK,UAAUA,CAAI,CAClC,CACJ,EAEaC,EAAa,CACxBJ,EACAC,EACAC,IACGG,EAAeZ,CAAU,EAAEO,EAAIC,EAAgBC,CAAY,EAEnDI,EAAe,IAAMD,EAAeZ,CAAU,EAE9Cc,EAAY,IAAcF,EAAeT,CAAS,EAEzDY,EAAiBd,EACpBe,GAAqBA,EAAM,KAAK,QAChCZ,GAAYA,EAAQ,IAAKa,GAA6BA,EAAO,IAAI,CACpE,EAKaC,EAAiB,IAAgBN,EAAeG,CAAc","names":["import_memoize","createSelector","getMessage","createSelector","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","args","useMessage","useBEISelector","useTranslate","useLocale","getLocaleCodes","state","locale","useLocaleCodes"]}
|