@beinformed/react 1.0.0-beta.1 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/chunk-4IDEBSD5.js +2 -0
  3. package/dist/chunk-4IDEBSD5.js.map +1 -0
  4. package/dist/chunk-6AKWSGWH.js +2 -0
  5. package/dist/chunk-6AKWSGWH.js.map +1 -0
  6. package/dist/{chunk-LYHN5GC6.js → chunk-6EK3TAMN.js} +2 -2
  7. package/dist/{chunk-3UHZ6GBP.js → chunk-BV77KA4Y.js} +2 -2
  8. package/dist/{chunk-GHKA2XFO.js → chunk-ITSZQHGD.js} +2 -2
  9. package/dist/chunk-ITSZQHGD.js.map +1 -0
  10. package/dist/chunk-JWOBKHOJ.js +2 -0
  11. package/dist/chunk-JWOBKHOJ.js.map +1 -0
  12. package/dist/{chunk-X6L6BWD4.js → chunk-KZB56W7Q.js} +2 -2
  13. package/dist/chunk-KZB56W7Q.js.map +1 -0
  14. package/dist/{chunk-LJM2ADG6.js → chunk-KZLW2NHD.js} +2 -2
  15. package/dist/{chunk-7LGDJBGK.js → chunk-OQK6SSUD.js} +2 -2
  16. package/dist/{chunk-ALGSLJJI.js → chunk-SPV6MD7J.js} +2 -2
  17. package/dist/{chunk-ZNJONDQ6.js → chunk-TAWZ2VIM.js} +2 -2
  18. package/dist/chunk-VXOYOMNN.js +2 -0
  19. package/dist/chunk-VXOYOMNN.js.map +1 -0
  20. package/dist/chunk-WEJGEXAP.js +2 -0
  21. package/dist/chunk-WEJGEXAP.js.map +1 -0
  22. package/dist/client/index.cjs +1 -1
  23. package/dist/client/index.cjs.map +1 -1
  24. package/dist/client/index.js +1 -1
  25. package/dist/hooks/index.cjs +1 -1
  26. package/dist/hooks/index.cjs.map +1 -1
  27. package/dist/hooks/index.d.cts +79 -8
  28. package/dist/hooks/index.d.ts +79 -8
  29. package/dist/hooks/index.js +1 -1
  30. package/dist/i18n/index.cjs +1 -1
  31. package/dist/i18n/index.cjs.map +1 -1
  32. package/dist/i18n/index.d.cts +20 -2
  33. package/dist/i18n/index.d.ts +20 -2
  34. package/dist/i18n/index.js +1 -1
  35. package/dist/index.cjs +6 -6
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +4 -4
  38. package/dist/index.d.ts +4 -4
  39. package/dist/index.js +1 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/redux/index.cjs +1 -1
  42. package/dist/redux/index.cjs.map +1 -1
  43. package/dist/redux/index.d.cts +3 -3
  44. package/dist/redux/index.d.ts +3 -3
  45. package/dist/redux/index.js +1 -1
  46. package/dist/server/index.cjs +1 -1
  47. package/dist/server/index.cjs.map +1 -1
  48. package/dist/server/index.js +1 -1
  49. package/dist/theme/index.cjs +1 -1
  50. package/dist/theme/index.cjs.map +1 -1
  51. package/dist/theme/index.js +1 -1
  52. package/dist/utils/index.cjs +1 -1
  53. package/dist/utils/index.cjs.map +1 -1
  54. package/dist/utils/index.d.cts +6 -1
  55. package/dist/utils/index.d.ts +6 -1
  56. package/dist/utils/index.js +1 -1
  57. package/package.json +7 -7
  58. package/dist/chunk-5MOCT43G.js +0 -2
  59. package/dist/chunk-5MOCT43G.js.map +0 -1
  60. package/dist/chunk-AMFWIR2R.js +0 -2
  61. package/dist/chunk-AMFWIR2R.js.map +0 -1
  62. package/dist/chunk-GHKA2XFO.js.map +0 -1
  63. package/dist/chunk-JYAETKRB.js +0 -2
  64. package/dist/chunk-JYAETKRB.js.map +0 -1
  65. package/dist/chunk-LUXTQYD2.js +0 -2
  66. package/dist/chunk-LUXTQYD2.js.map +0 -1
  67. package/dist/chunk-TRPPQFNA.js +0 -2
  68. package/dist/chunk-TRPPQFNA.js.map +0 -1
  69. package/dist/chunk-TYEAR2B7.js +0 -2
  70. package/dist/chunk-TYEAR2B7.js.map +0 -1
  71. package/dist/chunk-X6L6BWD4.js.map +0 -1
  72. /package/dist/{chunk-LYHN5GC6.js.map → chunk-6EK3TAMN.js.map} +0 -0
  73. /package/dist/{chunk-3UHZ6GBP.js.map → chunk-BV77KA4Y.js.map} +0 -0
  74. /package/dist/{chunk-LJM2ADG6.js.map → chunk-KZLW2NHD.js.map} +0 -0
  75. /package/dist/{chunk-7LGDJBGK.js.map → chunk-OQK6SSUD.js.map} +0 -0
  76. /package/dist/{chunk-ALGSLJJI.js.map → chunk-SPV6MD7J.js.map} +0 -0
  77. /package/dist/{chunk-ZNJONDQ6.js.map → chunk-TAWZ2VIM.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_freeGlobal.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_root.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Symbol.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getRawTag.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_objectToString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGetTag.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObject.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isFunction.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_coreJsData.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isMasked.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_toSource.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsNative.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getValue.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getNative.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nativeCreate.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashClear.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashDelete.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashGet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashHas.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashSet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Hash.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheClear.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/eq.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assocIndexOf.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheDelete.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheGet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheHas.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheSet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_ListCache.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Map.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheClear.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isKeyable.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getMapData.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheDelete.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheGet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheHas.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheSet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_MapCache.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/memoize.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/now.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_trimmedEndIndex.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseTrim.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObjectLike.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isSymbol.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toNumber.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/debounce.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArray.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isKey.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_memoizeCapped.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stringToPath.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayMap.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseToString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_castPath.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_toKey.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_defineProperty.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignValue.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignValue.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isIndex.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePickBy.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseHasIn.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsArguments.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArguments.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isLength.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hasPath.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/hasIn.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePick.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayPush.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isFlattenable.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseFlatten.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/flatten.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_apply.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overRest.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/constant.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/identity.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSetToString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_shortOut.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_flatRest.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/pick.js","../../src/hooks/index.ts","../../src/hooks/useAllFormsOnModel.ts","../../src/hooks/useModularUIRequest.ts","../../src/redux/hooks.ts","../../src/redux/i18n/i18nSelectors.ts","../../src/hooks/useAuthentication.ts","../../src/redux/auth/authReducer.ts","../../src/redux/auth/signinActions.ts","../../src/redux/application/applicationActions.ts","../../src/redux/modularui/fetchModel.ts","../../src/redux/error/errorActions.ts","../../src/redux/auth/unauthorizedActions.ts","../../src/redux/application/applicationSelectors.ts","../../src/redux/modularui/modelActions.ts","../../src/redux/router/routerActions.ts","../../src/redux/notifications/notificationActions.ts","../../src/redux/progressindicator/progressIndicatorActions.ts","../../src/redux/notifications/notificationReducer.ts","../../src/redux/shared/actions.ts","../../src/redux/error/errorReducer.ts","../../src/redux/modularui/utils.ts","../../src/redux/shared/selectors.ts","../../src/redux/auth/signoutActions.ts","../../src/hooks/useModularUIModel.ts","../../src/hooks/useModularUIBasic.ts","../../src/hooks/useRouter.ts","../../src/hooks/useModularUI.ts","../../src/hooks/useDeepCompareEffect.ts","../../src/hooks/useModularUIKey.ts","../../src/hooks/useI18n.ts","../../src/hooks/useContent.ts","../../src/hooks/useProgressIndicator.ts","../../src/hooks/useForm.ts","../../src/redux/form/attributeActions.ts","../../src/redux/form/autosaveActions.ts","../../src/redux/form/autosubmitActions.ts","../../src/redux/form/autoupdateActions.ts","../../src/redux/form/validateActions.ts","../../src/redux/form/formActions.ts","../../src/redux/form/formAttributesetRepeatable.ts","../../src/hooks/useList.ts","../../src/hooks/useModal.ts","../../src/redux/modals/modalsReducer.ts","../../src/hooks/useModelCatalog.ts","../../src/redux/modelcatalog/modelCatalogReducer.ts","../../src/redux/modelcatalog/modelCatalogSelectors.ts","../../src/hooks/useModels.ts","../../src/redux/modularui/reloadModel.ts","../../src/hooks/useNotification.ts","../../src/hooks/usePanel.ts","../../src/hooks/usePreference.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","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is classified as an `Array` 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 an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\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 * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","/**\n * The base implementation of `_.hasIn` 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 baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\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/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` 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 an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\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 = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","/**\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","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","// Generated by createIndex.js - Do not edit manually!\n// This file is automatically updated when the script runs.\n\nexport * from \"./useAllFormsOnModel\";\nexport * from \"./useAuthentication\";\nexport * from \"./useContent\";\nexport * from \"./useDeepCompareEffect\";\nexport * from \"./useForm\";\nexport * from \"./useI18n\";\nexport * from \"./useList\";\nexport * from \"./useModal\";\nexport * from \"./useModelCatalog\";\nexport * from \"./useModels\";\nexport * from \"./useModularUI\";\nexport * from \"./useModularUIBasic\";\nexport * from \"./useModularUIKey\";\nexport * from \"./useModularUIModel\";\nexport * from \"./useModularUIRequest\";\nexport * from \"./useNotification\";\nexport * from \"./usePanel\";\nexport * from \"./usePreference\";\nexport * from \"./useProgressIndicator\";\nexport * from \"./useRouter\";\n","import { useEffect, useMemo, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, ListModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport type { ActionModel, DetailModel, TabModel } from \"@beinformed/ui/models\";\n\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel,\n) => {\n const modularui = useModularUIRequest();\n\n const [forms, setForms] = useState(null);\n const [responseCount, setResponseCount] = useState(0);\n\n const actions = useMemo(() => getActions(model), [model]);\n const requestCount = actions.length;\n\n useEffect(() => {\n const requests = actions.map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [actions, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (model: ListModel | DetailModel | TabModel) => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions: ActionModel[] = [];\n const unique: string[] = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n","import { createSelector } from \"reselect\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale } from \"../redux/i18n/i18nSelectors\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nconst getModularUIRequest = createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: ModularUIRequestOptions) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n});\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: ModularUIRequestOptions,\n) => ModularUIRequest) => useBEISelector(getModularUIRequest);\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","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","import { INTERNAL_LOGIN_TYPE } from \"@beinformed/ui/constants\";\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { Authenticate } from \"@beinformed/ui/modularui\";\nimport { getContextPath, getContextPathServer } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { resetAuthErrors } from \"../redux/auth/authReducer\";\nimport { login } from \"../redux/auth/signinActions\";\nimport { logout } from \"../redux/auth/signoutActions\";\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\n\nimport { useApplication } from \"./useModularUIModel\";\n\nimport type { AuthenticationType } from \"@beinformed/ui/modularui\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Provides access to authentication state and actions.\n * Includes functionality for standard username/password login and redirect-based login.\n * @returns An object containing authentication status, available authentication types, error messages, and login/logout functions.\n */\nexport const useLogin = () => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useBEIDispatch();\n\n const application = useApplication();\n const auth = useBEISelector((state: RootState) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * The current authentication error message, if any.\n */\n errorMessage: auth.error,\n\n /**\n * Resets the authentication error message in the Redux store.\n */\n resetErrors: () => dispatch(resetAuthErrors()),\n\n /**\n * Attempts to log in the user with the provided username and password.\n * Dispatches the `login` action to the Redux store.\n * @param username The username for authentication.\n * @param password The password for authentication.\n */\n login: (username: string, password: string) =>\n dispatch(login({ username, password })),\n\n /**\n * Initiates a redirect-based login flow for a specific authentication type.\n * If a redirect login is already in progress, it throws an `IllegalStateException` to prevent infinite loops.\n * If the user is not currently authenticated, it sets a flag in the cache and redirects the browser to the authentication provider's redirect URI.\n * @param authenticationType The authentication type to initiate the redirect for.\n * @throws {IllegalStateException} If a redirect login is already in progress for a different authentication type.\n */\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${\n authenticationType.authentication\n }' using url: '${authenticationType.redirectUri ?? \"\"}'`,\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(\n `${getContextPathServer()}${authenticationType.redirectUri ?? \"\"}`,\n );\n }\n },\n };\n};\n\n/**\n * Provides access to logout functionality.\n * Handles both standard logout and redirect-based logout scenarios.\n * @returns An object containing the authentication status, available authentication types, and the logout function.\n */\nexport const useLogout = () => {\n const dispatch = useBEIDispatch();\n const application = useApplication();\n\n const BASE_PATH = getContextPath();\n\n const authenticate = new Authenticate();\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * Initiates the logout process.\n * If a redirect login was in progress, it redirects the user to the server's logout endpoint with a return URL to the current origin.\n * Otherwise, it dispatches the `logout` action to the Redux store.\n */\n logout: () => {\n const type = authenticate.authenticationType;\n if (type === INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT) {\n authenticate.redirectToLogout();\n } else if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n\n logoutUrl: authenticate.getLogoutUrl(),\n };\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface AuthState {\n authenticated: boolean;\n mustChangePassword: boolean;\n error: string | null;\n}\n\nconst initalState: AuthState = {\n authenticated: false,\n mustChangePassword: false,\n error: null,\n};\n\nexport const loginSuccess = createAction(\"AUTHENTICATION_SUCCESS\");\n\nexport const logoutSuccess = createAction(\"AUTHENTICATION_LOGOUT\");\n\nexport const sendAuthenticationError = createAction(\n \"AUTHENTICATION_ERROR\",\n (errorMessage: string) => {\n return {\n payload: errorMessage,\n };\n },\n);\n\nexport const resetAuthErrors = createAction(\"AUTHENTICATION_RESET_ERRORS\");\n\nexport const saveChangePassword = createAction(\"CHANGE_PASSWORD\");\n\nexport const authReducer = createReducer(initalState, (builder) => {\n builder\n .addCase(loginSuccess, (state) => {\n state.authenticated = true;\n state.error = null;\n state.mustChangePassword = false;\n })\n .addCase(sendAuthenticationError, (state, action) => {\n state.authenticated = false;\n state.error = action.payload;\n state.mustChangePassword = false;\n })\n .addCase(resetAuthErrors, (state) => {\n state.error = null;\n })\n .addCase(logoutSuccess, (state) => {\n state.authenticated = false;\n state.error = null;\n state.mustChangePassword = false;\n })\n .addCase(saveChangePassword, (state) => {\n state.authenticated = true;\n state.error = null;\n state.mustChangePassword = true;\n });\n});\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { CHANGEPASSWORD_PATH } from \"@beinformed/ui/constants\";\nimport { Authenticate } from \"@beinformed/ui/modularui\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { getApplication } from \"../application/applicationSelectors\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\nimport { push } from \"../router/routerActions\";\n\nimport { loginSuccess, sendAuthenticationError } from \"./authReducer\";\n\nimport type { PayloadAction } from \"@reduxjs/toolkit\";\nimport type { LocationState } from \"history\";\nimport type { RouterLocation } from \"../router/routerReducer\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const loginFailed = (errorMessage: string) =>\n sendAuthenticationError(errorMessage);\n\nexport const changePassword = createAsyncThunk<\n PayloadAction<{ location: string | RouterLocation; state: LocationState }>,\n void,\n { state: RootState }\n>(\"auth/change_pass\", (_, { getState }) => {\n const isModal = getState().router.location?.state?.modal;\n const locationFrom = getState().router.location?.state?.from;\n return push(CHANGEPASSWORD_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n modal: isModal,\n });\n});\n\nexport const login = createAsyncThunk<\n void,\n { username: string; password: string },\n { state: RootState; dispatch: BEIDispatch }\n>(\"auth/login\", async ({ username, password }, { dispatch, getState }) => {\n dispatch(startProgress());\n\n try {\n await new Authenticate().login(username, password);\n await dispatch(reloadApplication());\n\n Cache.addItem(\"auth\", true);\n const application = getApplication(getState());\n if (application?.userMustChangePassword) {\n dispatch(changePassword());\n } else {\n dispatch(loginSuccess());\n }\n dispatch(finishProgress());\n } catch (error) {\n if (\n typeof error === \"object\" &&\n error != null &&\n \"id\" in error &&\n typeof error.id === \"string\"\n ) {\n if (error.id === \"Error.ChangePasswordRequired\") {\n Cache.addItem(\"auth\", true);\n await dispatch(reloadApplication());\n dispatch(changePassword());\n } else {\n dispatch(loginFailed(error.id));\n }\n } else if (error instanceof Error) {\n dispatch(loginFailed(error.message));\n }\n\n dispatch(finishProgress());\n }\n});\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { ApplicationModel, Href } from \"@beinformed/ui/models\";\n\nimport { getLocale } from \"../i18n/i18nSelectors\";\nimport { fetchModel } from \"../modularui/fetchModel\";\nimport { removeModelByKey } from \"../modularui/modelActions\";\nimport { allKeysByHref } from \"../shared/selectors\";\n\nimport { getApplication } from \"./applicationSelectors\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const reloadApplication = createAsyncThunk<\n void,\n void,\n { dispatch: BEIDispatch; state: RootState; extra: unknown }\n>(\"application/reload\", async (_, { dispatch, getState }) => {\n const state = getState();\n\n const applicationHref = new Href(\"/\", \"Application\");\n\n const application = getApplication(state);\n if (application) {\n if (application.contextPath) {\n applicationHref.contextPath = application.contextPath;\n }\n if (application.origin) {\n applicationHref.origin = application.origin;\n }\n }\n\n const allKeys = allKeysByHref(state, applicationHref);\n for (const key of allKeys) {\n dispatch(removeModelByKey(key));\n }\n\n const locale = getLocale(state);\n const modelKey = `application(/)(${locale}`;\n\n await dispatch(\n fetchModel({\n key: modelKey,\n href: applicationHref,\n options: {\n targetModel: ApplicationModel,\n },\n }),\n );\n});\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { ErrorResponse, Href } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { handleError } from \"../error/errorActions\";\n\nimport { MODULARUI_STATUS } from \"./constants\";\nimport { removeModelByKey, updateErrorStatus } from \"./modelActions\";\nimport { getRequestLocale } from \"./utils\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\nimport type { FetchModelPayload, FetchModelResult } from \"./types\";\n\nconst executeRequest = async (\n { key, href, options }: FetchModelPayload,\n {\n dispatch,\n getState,\n rejectWithValue,\n }: {\n dispatch: BEIDispatch;\n getState: () => RootState;\n rejectWithValue: (value: ErrorResponse) => unknown;\n },\n): Promise<FetchModelResult> => {\n try {\n const locale = getRequestLocale(options?.locale, getState().i18n.locale);\n\n const requestHref =\n href instanceof Href\n ? href\n : new Href(href, \"\", {\n origin: options?.origin,\n contextPath: options?.contextPath,\n });\n\n const modularuiRequest = new ModularUIRequest(requestHref, {\n method: options?.method || HTTP_METHODS.GET,\n params: options?.params || \"\",\n data: options?.data || null,\n locale: locale,\n childmodels: options?.childmodels ?? true,\n isReload: options?.isReload,\n cache: options?.cache,\n headers: options?.headers,\n events: options?.events,\n onProgress: options?.onProgress,\n origin: options?.origin,\n contextPath: options?.contextPath,\n targetModel: options?.targetModel,\n forceTargetModel: options?.forceTargetModel ?? false,\n timeout: options?.timeout,\n });\n\n const model = await modularuiRequest.fetch();\n\n if (model) {\n model.connectKey = key;\n }\n\n // Return data for the fulfilled action\n return {\n key,\n model,\n updateHandler: options?.updateHandler,\n };\n } catch (error: unknown) {\n const errorResponse = new ErrorResponse(error as Error, key, {\n origin: options?.origin,\n contextPath: options?.contextPath,\n });\n\n // Specific error handling for removing model on certain errors\n if (\n errorResponse.isChangePassword ||\n errorResponse.isResourceNotFoundAfterReload\n ) {\n dispatch(removeModelByKey(key));\n } else {\n dispatch(updateErrorStatus(key, errorResponse));\n }\n\n // Dispatch the global error handler\n dispatch(handleError(error));\n\n throw rejectWithValue(errorResponse);\n }\n};\n\nexport const fetchModel = createAsyncThunk<\n FetchModelResult, // Return type of the fulfilled action payload\n FetchModelPayload, // First argument to the thunk\n {\n dispatch: BEIDispatch;\n state: RootState;\n rejectValue: ErrorResponse; // Type of the error payload in case of rejection\n }\n>(\"modularui/fetchModel\", executeRequest, {\n condition: ({ key }, { getState }) => {\n if (getState().modularui[key]?.status === MODULARUI_STATUS.LOADING) {\n return false;\n }\n },\n});\n","import { IS_SERVER } from \"@beinformed/ui/constants\";\nimport { ErrorResponse } from \"@beinformed/ui/models\";\nimport { logoutPath } from \"@beinformed/ui/settings\";\n\nimport { saveChangePassword } from \"../auth/authReducer\";\nimport { handleUnauthorized } from \"../auth/unauthorizedActions\";\nimport { showXHRErrorNotification } from \"../notifications/notificationActions\";\nimport { push } from \"../router/routerActions\";\nimport { noAction } from \"../shared/actions\";\n\nimport { saveError } from \"./errorReducer\";\n\nimport type { BEIDispatch } from \"../store\";\n\ntype DefaultHandler = typeof defaultErrorResponseHandler;\n\n// Default handler\nconst defaultErrorResponseHandler =\n (error: ErrorResponse) => (dispatch: BEIDispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch(noAction());\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser || error.isInvalidUsername) {\n dispatch(push(logoutPath()));\n return;\n }\n\n if (error.isChangePassword) {\n return dispatch(saveChangePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n // This setTimeout might hide errors from Sentry/monitoring tools\n setTimeout(() => {\n throw error.error || error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\ntype CustomErrorResponseHandler = (\n error: ErrorResponse,\n defaultHandler: DefaultHandler,\n) => (dispatch: BEIDispatch) => void;\n\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (error, defaultHandler) => (dispatch) =>\n dispatch(defaultHandler(error));\n\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler,\n) => {\n customErrorResponseHandler = handler;\n};\n\nexport const handleError = (error: unknown) => {\n // Ensure the error is an ErrorResponse if possible, otherwise create one.\n const errorResponse =\n error instanceof ErrorResponse ? error : new ErrorResponse(error as Error);\n\n // Dispatch the default handler or custom handler\n return customErrorResponseHandler(errorResponse, defaultErrorResponseHandler);\n};\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { getBooleanSetting, getStringSetting } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { getApplication } from \"../application/applicationSelectors\";\nimport { removeModelByKey } from \"../modularui/modelActions\";\nimport { replace } from \"../router/routerActions\";\n\nimport { logoutSuccess, sendAuthenticationError } from \"./authReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const handleUnauthorized = createAsyncThunk<\n void,\n ErrorResponse,\n { state: RootState; dispatch: BEIDispatch }\n>(\"auth/unauthorized\", (errorResponse, { dispatch, getState }) => {\n if (errorResponse.connectKey) {\n dispatch(removeModelByKey(errorResponse.connectKey));\n }\n\n if (\n getBooleanSetting(\"PAGE_RELOAD_ON_UNAUTHORIZED_ERROR\", false) &&\n errorResponse.response\n ) {\n window.location.reload();\n return;\n }\n\n // reload application when flag auth is set or isLogged\n const application = getApplication(getState());\n if (Cache.getItem(\"auth\") || application?.isLoggedIn) {\n dispatch(reloadApplication());\n }\n\n // set logged out\n dispatch(logoutSuccess());\n\n Cache.removeItem(\"auth\");\n\n if (errorResponse.isInvalidUsername) {\n dispatch(sendAuthenticationError(errorResponse.message || \"\"));\n }\n\n // add current location as from location before redirect\n const location = getState().router.location;\n const LOGIN_PATH = getStringSetting(\"LOGIN_PATH\", \"/signin\");\n if (location?.pathname !== LOGIN_PATH) {\n const locationFrom = location?.state?.from;\n dispatch(\n replace(LOGIN_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n // cannot open login in a modal, because of previous locations that might be secure\n modal: false,\n }),\n );\n }\n});\n","import { ApplicationModel } from \"@beinformed/ui/models\";\n\nimport type { RootState } from \"../store\";\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: RootState) => {\n const locale = state.i18n.locale || \"en\";\n const modularui = state.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof ApplicationModel &&\n modelEntry.model.locale === locale\n );\n });\n\n if (key) {\n return modularui[key] as unknown as ApplicationModel;\n }\n }\n\n return undefined;\n};\n","import { createAction } from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse, ModularUIModel } from \"@beinformed/ui/models\";\n\nexport const updateErrorStatus = createAction(\n \"MODULARUI/ERROR_STATUS\",\n (key: string, error: ErrorResponse) => {\n return {\n payload: {\n key,\n error,\n },\n };\n },\n);\n\nexport const setModel = createAction(\n \"MODULARUI/SET\",\n (key: string, model: ModularUIModel) => {\n model.connectKey = key;\n return {\n payload: {\n key,\n model,\n },\n };\n },\n);\n\nexport const initModels = createAction(\n \"MODULARUI/INIT\",\n (models: { key: string; model: ModularUIModel }[]) => {\n return {\n payload: models,\n };\n },\n);\n\nexport const updateModel = createAction(\n \"MODULARUI/UPDATE\",\n (model: ModularUIModel) => {\n return {\n payload: model,\n };\n },\n);\n\nexport const updateForm = createAction(\n \"MODULARUI/UPDATE_FORM\",\n (model: ModularUIModel) => {\n return {\n payload: model,\n };\n },\n);\n\nexport const removeModelByKey = createAction(\n \"MODULARUI/REMOVE_KEY\",\n (key: string) => {\n return {\n payload: key,\n };\n },\n);\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = createAction(\"MODULARUI/RESET\");\n","import { createAction } from \"@reduxjs/toolkit\";\n\nimport type { LocationState } from \"history\";\nimport type { RouterLocation } from \"./routerReducer\";\n\nexport const push = createAction(\n \"ROUTER/PUSH\",\n (location: RouterLocation | string, state?: LocationState) => {\n return {\n payload: { location, state },\n };\n },\n);\n\nexport const replace = createAction(\n \"ROUTER/REPLACE\",\n (location: RouterLocation | string, state?: LocationState) => {\n return {\n payload: { location, state },\n };\n },\n);\n\nexport const go = createAction(\"ROUTER/GO\", (delta: number) => {\n return {\n payload: { delta },\n };\n});\n\nexport const goBack = createAction(\"ROUTER/GOBACK\");\n\nexport const goForward = createAction(\"ROUTER/GOFORWARD\");\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\n\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\n\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"./notificationReducer\";\n\nimport type { ErrorResponse, FormModel } from \"@beinformed/ui/models\";\n\nconst getNotificationMessageId = (form: FormModel) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification = createAsyncThunk(\n \"notification/show_form\",\n async (form: FormModel, { dispatch }) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification({\n type: NOTIFICATION_TYPES.SUCCESS,\n message: {\n id: getNotificationMessageId(form),\n },\n }),\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getNumberSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n },\n);\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification = (error: ErrorResponse) => {\n return showNotification({\n type: NOTIFICATION_TYPES.ERROR,\n message: {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error,\n });\n};\n","import { createAction } from \"@reduxjs/toolkit\";\n\nexport const startProgress = createAction(\"START_PROGRESS\");\nexport const finishProgress = createAction(\"FINISH_PROGRESS\");\nexport const resetProgress = createAction(\"RESET_PROGRESS\");\nexport const updateProgress = createAction(\n \"UPDATE_PROGRESS\",\n (percentComplete: number) => ({\n payload: {\n percentComplete,\n },\n }),\n);\n","import {\n createAction,\n createAsyncThunk,\n createReducer,\n} from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../../i18n/types\";\n\nexport interface NotificationState {\n render: boolean;\n messageType: string | undefined;\n message: MessageObject | undefined;\n error: ErrorResponse | undefined;\n}\n\nexport interface ShowNotificationArguments {\n type: NOTIFICATION_TYPES | undefined;\n message: MessageObject | undefined;\n error?: ErrorResponse | undefined;\n timeout?: number;\n}\n\nexport enum NOTIFICATION_TYPES {\n SUCCESS = \"SUCCESS\",\n INFO = \"INFO\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n}\n\nconst saveNotification = createAction(\n \"SHOW_NOTIFICATION\",\n (\n type: NOTIFICATION_TYPES | undefined,\n message: MessageObject | undefined,\n error?: ErrorResponse | undefined,\n ) => {\n return {\n payload: {\n type,\n message,\n error,\n },\n };\n },\n);\n\nexport const showNotification = createAsyncThunk(\n \"notifications/show\",\n (\n { type, message, error, timeout }: ShowNotificationArguments,\n { dispatch },\n ) => {\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n\n dispatch(saveNotification(type, message, error));\n },\n);\n\nexport const dismissNotification = createAction(\"DISMISS_NOTIFICATION\");\n\nconst initialState: NotificationState = {\n render: false,\n messageType: undefined,\n message: undefined,\n error: undefined,\n};\n\nexport const notificationReducer = createReducer<NotificationState>(\n initialState,\n (builder) => {\n builder\n .addCase(saveNotification, (state, action) => {\n return {\n ...state,\n render: true,\n messageType: action.payload.type,\n message: action.payload.message,\n error: action.payload.error,\n };\n })\n .addCase(dismissNotification, (state) => {\n return {\n ...state,\n render: false,\n messageType: undefined,\n message: undefined,\n error: undefined,\n };\n });\n },\n);\n","import { createAction } from \"@reduxjs/toolkit\";\n\nexport const noAction = createAction(\"NO_ACTION\");\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\n\nexport type ErrorState = null | ErrorResponse;\n\nexport const saveError = createAction(\"SAVE_ERROR\", (error: ErrorResponse) => {\n return {\n payload: error,\n };\n});\n\nconst initialState = null;\n\nexport const errorReducer = createReducer<ErrorState>(\n initialState,\n (builder) => {\n builder.addCase(saveError, (_state, action) => {\n return action.payload;\n });\n },\n);\n","/**\n * Retrieve the preferred language for this request, falls back to the browser language or english\n */\nexport const getRequestLocale = (\n optionLocale: string | undefined,\n currentStateLocale: string,\n) => {\n if (optionLocale) {\n return optionLocale;\n }\n\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator.language.split(\"-\")[0] || currentStateLocale;\n }\n\n return currentStateLocale;\n};\n","import { createSelector } from \"reselect\";\n\nimport { ContentModel, ContentTOCModel, Href } from \"@beinformed/ui/models\";\n\nimport { MODULARUI_STATUS } from \"../modularui/constants\";\n\nimport type {\n ContentLinkModel,\n ModularUIModel,\n ResourceModel,\n} from \"@beinformed/ui/models\";\nimport type { RootState } from \"../store\";\n\n/**\n * Helper to get the current pathname from the router state.\n * @private\n */\nconst getLocation = (state: RootState) => state?.router?.location?.pathname;\n\n/**\n * Retrieves all models from the state that are instances of the specified class\n * and match the current application locale.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to filter by (e.g., TaskModel).\n * @returns {InstanceType<T>[]} An array of model instances.\n */\nexport const getAllModelsByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n): InstanceType<T>[] => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale\n );\n })\n .map((key) => modularui[key].model as InstanceType<T>);\n }\n\n return [];\n};\n\n/**\n * Finds the first occurrence of a model in the state that is an instance of the\n * provided class and matches the current locale.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to look for.\n * @returns {InstanceType<T> | undefined} The first matching model instance or undefined.\n */\nexport const getFirstModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n): InstanceType<T> | undefined => {\n const modularui = state?.modularui;\n if (modularui) {\n const locale = state.i18n.locale || \"en\";\n\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale\n );\n });\n\n if (key) {\n const modelEntry = modularui[key];\n if (modelEntry?.model instanceof instance) {\n return modelEntry.model as InstanceType<T>;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Finds the model that is currently \"active\" based on the current URL path.\n * Matches by instance type, locale, and verifies if the current location starts\n * with the model's selfhref path.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to filter by.\n * @returns {InstanceType<T> | undefined} The active model instance or undefined.\n */\nexport const getActiveModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n) => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale &&\n location?.startsWith(modelEntry.model.selfhref?.path || \"\")\n );\n });\n\n if (key) {\n const modelEntry = modularui[key];\n if (modelEntry?.model instanceof instance) {\n return modelEntry.model as InstanceType<T>;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Retrieves a specific model from the store by comparing its selfhref.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to search for.\n * @returns {ModularUIModel | undefined} The matching model or undefined.\n */\nexport const modelByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return model.model?.selfhref?.equals(findHref);\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return undefined;\n};\n\n/**\n * Return the unique state key of a model found by its selfhref.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to search for.\n * @returns {string | undefined} The internal state key or undefined.\n */\nexport const keyByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model?.selfhref?.equals(findHref);\n });\n }\n\n return undefined;\n};\n\n/**\n * Returns all keys for models that match a specific href.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to filter keys by.\n * @returns {string[]} An array of state keys.\n */\nexport const allKeysByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const modelEntry = state.modularui[key];\n if (modelEntry) {\n return modelEntry.model?.selfhref?.equals(findHref);\n }\n });\n }\n\n return [];\n};\n\n/**\n * Memoized selector that maps the flat modularui state into a simplified array of\n * model metadata, including content links for specific content models.\n * @returns {Array<Object>} List of model metadata objects.\n */\nconst getModels = createSelector(\n [(state: RootState) => state.modularui],\n (modularui) => {\n const models: {\n selfContentLink: ContentLinkModel | null;\n key: string;\n selfhref: Href | undefined;\n label: string;\n type: string;\n }[] = [];\n\n if (!modularui) return models;\n\n Object.keys(modularui).forEach((modelKey: string) => {\n const modelEntry = modularui[modelKey];\n\n if (modelEntry && \"model\" in modelEntry) {\n const { key, selfhref, label, type } =\n modelEntry.model as ModularUIModel;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n },\n);\n\n/**\n * Memoized selector that returns a \"context\" of active models based on the current path segments.\n * Useful for breadcrumbs or determining nested model hierarchy.\n * @returns {Array<Object>} Array of active models found in the current URL path.\n */\nexport const getActiveModels = createSelector(\n [getLocation, getModels],\n (location, models) => {\n if (!location || !models.length) return [];\n\n const modelMap = new Map(\n models.filter((m) => m.selfhref).map((m) => [m.selfhref?.toString(), m]),\n );\n\n const contextModels: {\n key: string;\n href: Href | undefined;\n label: string;\n type: string;\n }[] = [];\n const locationParts = location.split(\"/\");\n let currentPath = \"\";\n\n locationParts.forEach((part) => {\n currentPath = currentPath === \"/\" ? `/${part}` : `${currentPath}/${part}`;\n\n const comparePath = decodeURIComponent(currentPath).replace(\n \"/modelcatalog/\",\n \"/\",\n );\n\n const foundEntry = modelMap.get(comparePath);\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n currentPath.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n });\n\n return contextModels;\n },\n);\n\n/**\n * Retrieves all models from the state that have a status of 'FINISHED'.\n * @returns {ModularUIModel[]} Array of finished model instances.\n */\nexport const getAllFinishedModels = createSelector(\n (state: RootState) => state.modularui,\n (modularui) => {\n if (modularui) {\n return Object.keys(modularui)\n .filter(\n (key) =>\n modularui[key] &&\n modularui[key].status === MODULARUI_STATUS.FINISHED,\n )\n .map((key) => modularui[key].model);\n }\n return [];\n },\n);\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { Authenticate } from \"@beinformed/ui/modularui\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { resetModularUI } from \"../modularui/modelActions\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\n\nimport { logoutSuccess } from \"./authReducer\";\n\nimport type { BEIDispatch } from \"../store\";\n\nexport const logout = createAsyncThunk<void, void, { dispatch: BEIDispatch }>(\n \"auth/logout\",\n async (_, { dispatch }) => {\n dispatch(startProgress());\n\n await new Authenticate().logout();\n\n dispatch(resetModularUI());\n dispatch(reloadApplication());\n\n dispatch(logoutSuccess());\n dispatch(finishProgress());\n },\n);\n","import {\n ApplicationModel,\n CaseViewModel,\n DetailModel,\n GroupingPanelModel,\n TabModel,\n UserProfileModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (options?: HookOptions) =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n ...options,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n ...options,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n ...options,\n });\n\nexport const useGroupingPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n ...options,\n });\n\nexport const useDetailPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n ...options,\n });\n\nexport const useUserProfile = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n ...options,\n });\n","import { useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\n\nimport { useLocation } from \"../hooks/useRouter\";\nimport { useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\n\nimport { useModularUI } from \"./useModularUI\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIResponse } from \"@beinformed/ui/modularui\";\n\n/**\n * Configuration options for low-level modular UI requests.\n */\nexport interface HookOptions {\n key?: string;\n origin?: string;\n contextPath?: string;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null;\n}\n\n/**\n * Configuration options for the useModularUIBasic hook.\n * Allows for type enforcement, caching control, and reload behavior.\n */\nexport interface UseModularUIBasicOptions<T> {\n expectedModels?: string[];\n targetModel?: new (modularuiResponse: ModularUIResponse) => T;\n forceTargetModel?: boolean;\n origin?: string;\n contextPath?: string;\n cache?: boolean;\n key?: string;\n isReload?: boolean;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null; // If present, the hook switches from GET to POST\n}\n\n/**\n * Internal helper to transform high-level hook options into a configuration\n * object compatible with the core useModularUI fetcher.\n * Logic:\n * 1. Defaults to GET method.\n * 2. If 'formdata' is present, it switches to POST and assigns 'data'.\n * 3. Forces 'isReload' if the useReload check returns true.\n */\nconst createUseModularUIOptions = <T>(\n options: UseModularUIBasicOptions<T>,\n mustReload: boolean,\n) => {\n const baseOptions: Record<string, unknown> = {\n expectedModels: [],\n method: HTTP_METHODS.GET,\n data: undefined,\n ...options,\n isReload: mustReload || options.isReload,\n };\n\n if (options.formdata != null) {\n baseOptions.method = HTTP_METHODS.POST;\n baseOptions.data = options.formdata;\n }\n\n return baseOptions;\n};\n\n/**\n * Validates that the returned model type matches one of the expected model strings.\n * Logs a warning to the console if there is a mismatch (useful for debugging UI-backend contracts).\n */\nconst validateModel = (model: unknown, expectedModels: string[]) => {\n if (\n expectedModels.length > 0 &&\n model !== null &&\n typeof model === \"object\" &&\n \"type\" in model &&\n typeof model.type === \"string\"\n ) {\n const isCorrectModel = expectedModels.includes(model.type);\n if (!isCorrectModel) {\n console.warn(model, \"is not of instance\", expectedModels);\n }\n }\n};\n\n/**\n * A simplified abstraction over useModularUI that includes automatic\n * model validation and smart-reload logic based on router state.\n *\n * @param {string} defaultKey - The default identifier for the model.\n * @param {string | Href} href - The endpoint to fetch.\n * @param {UseModularUIBasicOptions} options - Extended configuration options.\n */\nexport const useModularUIBasic = <T>(\n defaultKey: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {},\n): T | undefined => {\n const memoizedHref = useMemo(() => href.toString(), [href]);\n\n // Use the key provided in options if available, otherwise fallback to the default\n const key = options.key ?? defaultKey;\n\n // Determine if we need to bypass cache based on navigation 'reload' signals\n const mustReload = useReload(key, memoizedHref);\n\n // Memoize options to prevent useModularUI from re-fetching on every parent render\n const modularUIOptions = useMemo(\n () => createUseModularUIOptions(options, mustReload),\n [options, mustReload],\n );\n\n const modularUI = useModularUI(key, href, modularUIOptions);\n\n const expectedModels = useMemo(\n () => options.expectedModels ?? [],\n [options.expectedModels],\n );\n\n // Extract and validate the model from the modularUI wrapper object\n return useMemo((): T | undefined => {\n if (modularUI?.model) {\n validateModel(modularUI.model, expectedModels);\n return modularUI.model as T;\n }\n return undefined;\n }, [expectedModels, modularUI]);\n};\n\n/**\n * Determines if a model should be reloaded based on the 'reload' timestamp\n * found in the React Router location state.\n * This is used for \"force refresh\" scenarios where a user navigates to a\n * page and expects fresh data (e.g., after a form submission elsewhere).\n * @param {string} modelKey - The model type key.\n * @param {string} url - The resource URL.\n * @returns {boolean} True if the store data is stale compared to the reload signal.\n */\nexport const useReload = (modelKey: string, url: string): boolean => {\n const location = useLocation();\n const key = useModularUIKey(modelKey, url);\n\n // Access the current entry in the Redux store\n const modelEntry = useBEISelector((state) => state.modularui[key]);\n\n if (modelEntry) {\n const reload = (location?.state?.reload || 0) as number;\n\n // If a reload timestamp exists in the router state\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n // Trigger reload only if the model is already finished loading\n // AND the data we have is older than the requested reload time.\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n }\n return false;\n};\n","import { useMemo } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n go,\n goBack,\n goForward,\n push,\n replace,\n} from \"../redux/router/routerActions\";\n\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Returns the full location object from the router state.\n */\nexport const useLocation = () =>\n useBEISelector((state: RootState) => state.router.location);\n\n/**\n * Returns the unique key of the current location.\n */\nexport const useLocationKey = () => useLocation()?.key ?? \"\";\n\n/**\n * Returns the current search (querystring) portion of the URL.\n */\nexport const useQuerystring = () => useLocation()?.search;\n\n/**\n * Returns the current URL pathname.\n */\nexport const usePathname = () => useLocation()?.pathname;\n\n/**\n * Provides navigation methods.\n */\nexport const useNavigation = () => {\n const dispatch = useBEIDispatch();\n\n return useMemo(\n () => ({\n push: (location: RouterLocation | string, state?: RootState) =>\n dispatch(push(location, state)),\n replace: (location: RouterLocation | string, state?: RootState) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n }),\n [dispatch],\n );\n};\n","import { useEffect, useMemo, useRef } from \"react\";\n\nimport { useLocation } from \"react-router\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href } from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\n\nimport { useDeepCompareEffect } from \"./useDeepCompareEffect\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { ModelEntry } from \"../redux/modularui/types\";\n\n/**\n * A custom hook to fetch and manage Be Informed modular UI resources.\n * It handles automatic data fetching based on URL/query changes, manages Redux state\n * synchronization, and provides cleanup logic when components unmount.\n *\n * @param {string} modelKey - A unique identifier for the type of model being fetched.\n * @param {string | Href} url - The endpoint URL or Href instance to fetch data from.\n * @param {RequestModularUIOptions} options - Configuration for the request (method, headers, etc.).\n * @returns {ModelEntry} The model data retrieved from the Redux store.\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: ModularUIRequestOptions = {},\n): ModelEntry | undefined => {\n const dispatch = useBEIDispatch();\n\n // Normalize the URL input into a Href instance to safely access query params and paths\n const hrefInstance = useMemo(() => new Href(url), [url]);\n const requestUrl = useMemo(() => hrefInstance.toString(), [hrefInstance]);\n const currentQueryString = hrefInstance.querystring;\n\n // Persistence ref to detect if query parameters have changed between renders\n const prevQueryRef = useRef(currentQueryString);\n\n // Generate a unique key for the Redux store based on the model type and the full URL\n const key = useModularUIKey(modelKey, requestUrl);\n\n // Select the specific piece of state corresponding to this modular UI component\n const model = useBEISelector((state) => state.modularui[key]);\n\n /**\n * Memoize request options to prevent unnecessary re-renders.\n * Merges default settings (GET method, auto-cleanup) with user-provided options.\n */\n const requestOptions = useMemo(() => {\n const merged = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: true,\n ...options,\n };\n\n if (url instanceof Href) {\n merged.origin = merged.origin ?? url.origin;\n merged.contextPath = merged.contextPath ?? url.contextPath;\n }\n return merged;\n }, [options, url]);\n\n const location = useLocation<{ redirectLocation?: string | Href }>();\n const redirectLocation = location.state?.redirectLocation;\n\n // eslint-disable-next-line react-hooks/refs\n const isQueryChanged = prevQueryRef.current !== currentQueryString;\n\n /**\n * Determines if a network request should be initiated.\n * Logic includes:\n * - Model doesn't exist yet (Initial load)\n * - Previous request resulted in an error (Retry)\n * - The query parameters changed (Filtering/Paging)\n * - A redirect was triggered specifically for this URL\n * - Manual 'isReload' flag is passed in options\n */\n const shouldLoad =\n model == null ||\n model.status === MODULARUI_STATUS.ERROR ||\n isQueryChanged ||\n (redirectLocation instanceof Href\n ? redirectLocation.equals(requestUrl)\n : false) ||\n requestOptions.isReload === true;\n\n // Synchronize the ref after the render cycle determines if we should load\n useEffect(() => {\n prevQueryRef.current = currentQueryString;\n }, [currentQueryString]);\n\n // Execute the load action. Deep compare is used on options to prevent\n // infinite loops caused by passing inline object literals.\n useDeepCompareEffect(() => {\n if (requestUrl !== \"\" && shouldLoad) {\n dispatch(fetchModel({ key, href: requestUrl, options: requestOptions }));\n }\n }, [key, requestUrl, requestOptions, shouldLoad]);\n\n // Cleanup Effect:\n // If 'removeOnUnmount' is true, this removes the model data from the Redux store\n // when the component using this hook is destroyed.\n useEffect(() => {\n if (requestOptions.removeOnUnmount) {\n return () => {\n dispatch(removeModelByKey(key));\n };\n }\n }, [dispatch, key, requestOptions.removeOnUnmount]);\n\n return model;\n};\n","import { useEffect, useRef } from \"react\";\n\nimport { dequal as deepEqual } from \"dequal/lite\";\n\nimport { IS_DEV } from \"@beinformed/ui/utils\";\n\nimport type { DependencyList, EffectCallback } from \"react\";\n\n/**\n * Validates that dependencies are used correctly.\n * Deep compare should not be used with empty arrays or no dependencies.\n */\nfunction checkDeps(deps: DependencyList) {\n if (IS_DEV) {\n if (!deps || deps.length === 0) {\n console.warn(\n \"useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.\",\n );\n }\n }\n}\n\n/**\n * Custom hook to generate a stable signal (number) that only changes when\n * the 'dependencies' array changes value via a deep comparison.\n *\n * * NOTE: This function intentionally reads `ref.current` during the render phase\n * to perform memoization. This is a well-known pattern for deep-compare hooks\n * but requires an ESLint bypass for the strict 'no-accessing-refs-during-render' rule.\n */\nfunction useDeepCompareMemoize(dependencies: DependencyList) {\n const ref = useRef<DependencyList>(dependencies);\n\n // Only update the ref if the deep equality check fails\n // eslint-disable-next-line react-hooks/refs\n if (!deepEqual(dependencies, ref.current)) {\n // eslint-disable-next-line react-hooks/refs\n ref.current = dependencies;\n }\n\n // eslint-disable-next-line react-hooks/refs\n return ref.current;\n}\n\n/**\n * A replacement for useEffect that compares dependencies deeply.\n */\nexport function useDeepCompareEffect(\n callback: EffectCallback,\n dependencies: DependencyList,\n) {\n checkDeps(dependencies);\n\n // We use the memoized ref as the dependency.\n // React's shallow check will only trigger when the ref object itself changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n","import { useMemo } from \"react\";\n\nimport { useLocale } from \"./useI18n\";\n\n/**\n * Generates the key that is used in the modular ui reducer of redux\n */\nexport const useModularUIKey = (modelKey: string, url: string) => {\n const locale = useLocale();\n return useMemo(\n () => `${modelKey}(${url.split(\"?\")[0]})(${locale})`,\n [modelKey, url, locale],\n );\n};\n","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","import { useEffect, useState } from \"react\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useLocale } from \"../hooks/useI18n\";\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\n\nimport type {\n ContentModel,\n Href,\n SourceReferenceCollection,\n} from \"@beinformed/ui/models\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean,\n): ContentModel[] => {\n const [content, setContent] = useState<ContentModel[]>([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link?.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href?.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href: Href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n }, [allHrefs, localeCode, renderChildSections, start, finish]);\n\n return content;\n};\n","// @flow\nimport { useCallback } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"../redux/progressindicator/progressIndicatorActions\";\n\nexport const useProgressIndicator = () => {\n const dispatch = useBEIDispatch();\n\n const start = useCallback(() => {\n dispatch(startProgress());\n }, [dispatch]);\n const finish = useCallback(() => {\n dispatch(finishProgress());\n }, [dispatch]);\n const reset = useCallback(() => {\n dispatch(resetProgress());\n }, [dispatch]);\n const update = useCallback(\n (percentComplete: number) => {\n dispatch(updateProgress(percentComplete));\n },\n [dispatch],\n );\n\n return { start, finish, reset, update };\n};\n\n/**\n */\nexport const useProgressIndicatorState = () =>\n useBEISelector((state) => state.progressindicator);\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, Href } from \"@beinformed/ui/models\";\nimport { getSetting } from \"@beinformed/ui/settings\";\n\nimport { updateFormAttribute } from \"../redux/form/attributeActions\";\nimport { cancelForm, previousObject } from \"../redux/form/formActions\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../redux/form/formAttributesetRepeatable\";\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\nimport { showFormNotification } from \"../redux/notifications/notificationActions\";\n\nimport { useModularUI } from \"./useModularUI\";\n\nimport type {\n AttributeModel,\n FormObjectModel,\n ModularUIModel,\n} from \"@beinformed/ui/models\";\n\nexport interface UpdateFormOptions {\n autosubmit: boolean;\n autosave: boolean;\n autoupdate: boolean;\n forceUpdate?: boolean;\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean;\n}\n\n/**\n * Load a form by href\n */\nexport const useForm = (\n href: string | Href,\n data?: Record<string, unknown>,\n) => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n data: data ? JSON.stringify(data) : undefined,\n origin: formHref.origin,\n contextPath: formHref.contextPath,\n });\n\n if (form?.model instanceof FormModel) {\n return form.model;\n }\n\n return;\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = () => {\n const dispatch = useBEIDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel: ModularUIModel): ModularUIModel => {\n if (newModel instanceof FormModel) {\n return produce(newModel, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n targetModel: FormModel,\n },\n }),\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey || \"\"));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Hook that returns a function to update attributes of a form object.\n * <br >\n * The returned function accepts the following options:\n *\n * - autosubmit: Automatically submit the form after a change\n * - autosav: Automatically save the form (in the background) after a change\n * - autoupdate: Automatically update the current form object after a change\n * - forceUpdate: Force the update even if conditions are not met.\n * - validate: Activate/deactivate the form object validation by an update.\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const dispatch = useBEIDispatch();\n\n return (\n attribute: AttributeModel,\n inputvalue: string,\n options?: UpdateFormOptions,\n ) =>\n dispatch(\n updateFormAttribute({ form, formObject, attribute, inputvalue, options }),\n );\n};\n\n/**\n * Repeatable attributeset actions\n */\nexport const useRepeatableAttributeSet = (form: FormModel) => {\n const dispatch = useBEIDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\n\nimport { getBooleanSetting } from \"@beinformed/ui/settings\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport { autosaveFormObject } from \"./autosaveActions\";\nimport { autosubmitFormObject } from \"./autosubmitActions\";\nimport { autoupdateFormObject } from \"./autoupdateActions\";\nimport { validateFormObject } from \"./validateActions\";\n\nimport type {\n AttributeModel,\n FormModel,\n FormObjectModel,\n} from \"@beinformed/ui/models\";\nimport type { UpdateFormOptions } from \"../../hooks/useForm\";\nimport type { BEIDispatch } from \"../store\";\n\nexport const updateFormAttribute = createAsyncThunk<\n void,\n {\n form: FormModel;\n formObject: FormObjectModel;\n attribute: AttributeModel;\n inputvalue: string;\n options?: UpdateFormOptions;\n },\n { dispatch: BEIDispatch }\n>(\n \"form/attribute\",\n async (\n {\n form,\n formObject,\n attribute,\n inputvalue,\n options = {\n autosubmit: false,\n autosave: false, // autosave commits the form in the background\n autoupdate: false, // autoupdate does not commit and updates the form with for example a new dynamicschema (work-around for form-tree iq)\n forceUpdate: false,\n validate: true,\n },\n },\n { dispatch },\n ) => {\n if (options.validate === undefined) {\n options.validate = true;\n }\n\n const newForm = produce(form, (draft) => {\n if (draft.currentFormObject?.equals(formObject)) {\n draft.currentFormObject.updateAttribute(attribute, inputvalue);\n } else {\n draft.completedFormObjects.forEach((completeObject) => {\n if (completeObject.equals(formObject)) {\n completeObject.updateAttribute(attribute, inputvalue);\n }\n });\n }\n });\n\n if (options.autosubmit && newForm.isValid) {\n const autosubmitAction = autosubmitFormObject(\n newForm,\n attribute,\n options.forceUpdate,\n );\n if (autosubmitAction) {\n dispatch(autosubmitAction);\n return;\n }\n }\n\n if (options.autoupdate && newForm.isValid) {\n const autoupdateAction = autoupdateFormObject(newForm, attribute);\n if (autoupdateAction) {\n dispatch(autoupdateAction);\n return;\n }\n }\n\n handleAutoSave(dispatch, newForm, options);\n\n handleValidate(dispatch, newForm, options);\n\n dispatch(updateForm(newForm));\n },\n);\n\nconst handleAutoSave = (\n dispatch: BEIDispatch,\n newForm: FormModel,\n options: UpdateFormOptions,\n) => {\n if (options.autosave && newForm.isValid && newForm.isChanged()) {\n dispatch(autosaveFormObject(newForm));\n }\n};\n\nconst handleValidate = (\n dispatch: BEIDispatch,\n newForm: FormModel,\n options: UpdateFormOptions,\n) => {\n if (\n options.validate &&\n newForm.currentFormObject?.hasDynamicValidations &&\n getBooleanSetting(\"USE_INSTANT_SERVER_VALIDATION\", false)\n ) {\n // server form validations happens async, don't wait for the form to return\n dispatch(validateFormObject(newForm));\n }\n};\n","import debounce from \"lodash/debounce\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { BEIDispatch } from \"../store\";\n\n/**\n * POSSIBLE AUTOSAVE STATUSSES\n * @type {{START: string, FINISHED: string}}\n */\nexport enum AUTOSAVE_STATUS {\n START,\n FINISHED,\n}\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateAutosave = (status: AUTOSAVE_STATUS, model: FormModel) => ({\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status,\n model,\n },\n});\n\n/**\n */\nconst autosave = (dispatch: BEIDispatch, form: FormModel) => {\n dispatch(updateAutosave(AUTOSAVE_STATUS.START, form));\n\n const formdata = form.getFormData(true, false);\n\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"true\"), {\n method: HTTP_METHODS.POST,\n data: formdata,\n childmodels: false,\n locale: form.locale,\n })\n .fetch()\n .then((savedForm) => {\n if (savedForm instanceof FormModel) {\n // update last server update to indicate an update has happened\n // send the existing form to prevent updates in the ui based on autosave results\n form.lastServerUpdate = savedForm.lastServerUpdate;\n\n dispatch(updateForm(form));\n dispatch(updateAutosave(AUTOSAVE_STATUS.FINISHED, savedForm));\n }\n });\n};\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedAutosave = debounce(\n (dispatch, form) => {\n autosave(dispatch, form);\n },\n getNumberSetting(\"VALIDATE_DEBOUNCE_TIMEOUT\", 500),\n);\n\nexport const autosaveFormObject =\n (form: FormModel) => (dispatch: BEIDispatch) =>\n debouncedAutosave(dispatch, form);\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\n\nimport type { AttributeModel } from \"@beinformed/ui/models\";\n\nexport const autosubmitFormObject = (\n form: FormModel,\n attribute: AttributeModel,\n forceUpdate = false,\n) => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged() || forceUpdate) {\n return fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel) => {\n if (newModel instanceof FormModel) {\n return produce(form, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n },\n });\n }\n\n return null;\n};\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\n\nimport type { AttributeModel } from \"@beinformed/ui/models\";\n\nexport const autoupdateFormObject = (\n form: FormModel,\n attribute: AttributeModel,\n) => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged()) {\n return fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref.setParameter(\"commit\", \"false\"),\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel) => {\n if (newModel instanceof FormModel) {\n return produce(form, (draft) => {\n draft.updateCurrentFormObject(newModel);\n });\n }\n return newModel;\n },\n },\n });\n }\n\n return null;\n};\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\nimport debounce from \"lodash/debounce\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateValidations = createAsyncThunk<\n void,\n { form: FormModel; formWithValidations: FormModel },\n { dispatch: BEIDispatch; state: RootState }\n>(\"\", ({ form, formWithValidations }, { dispatch, getState }) => {\n if (form.connectKey) {\n const currentFormEntry = getState().modularui[form.connectKey];\n\n if (currentFormEntry) {\n const currentForm = currentFormEntry.model;\n if (currentForm instanceof FormModel) {\n const validatedForm = produce(currentForm, (draft) => {\n draft.updateValidations(formWithValidations.data);\n });\n dispatch(updateForm(validatedForm));\n }\n }\n }\n});\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedValidateFormObject = debounce<\n (dispatch: BEIDispatch, form: FormModel) => void\n>(\n (dispatch, form: FormModel) => {\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"false\"), {\n method: HTTP_METHODS.POST,\n data: form.validationData,\n childmodels: false,\n isValidationRequest: true,\n locale: form.locale,\n })\n .fetch()\n .then((formWithValidations) => {\n if (formWithValidations instanceof FormModel) {\n dispatch(updateValidations({ form, formWithValidations }));\n }\n });\n },\n getNumberSetting(\"VALIDATE_DEBOUNCE_TIMEOUT\", 500),\n {\n leading: true,\n trailing: true,\n },\n);\n\nexport const validateFormObject =\n (form: FormModel) => (dispatch: BEIDispatch) =>\n debouncedValidateFormObject(dispatch, form);\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\n\nimport { Authenticate } from \"@beinformed/ui/modularui\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { logoutSuccess } from \"../auth/authReducer\";\nimport { updateForm } from \"../modularui/modelActions\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\nimport { goBack } from \"../router/routerActions\";\n\nimport type { FormModel } from \"@beinformed/ui/models\";\nimport type { PayloadAction } from \"@reduxjs/toolkit\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const previousObject = (form: FormModel) => {\n const newForm = produce(form, (draft) => {\n draft.setPreviousObject();\n });\n\n return updateForm(newForm);\n};\n\nexport const cancelForm = createAsyncThunk<\n PayloadAction<undefined, string>,\n FormModel,\n { dispatch: BEIDispatch; state: RootState }\n>(\"form/cancel\", async (form, { dispatch, getState }) => {\n if (form.key === \"ChangePassword\" && getState().auth.mustChangePassword) {\n dispatch(startProgress());\n\n await new Authenticate().logout();\n\n dispatch(logoutSuccess());\n dispatch(reloadApplication());\n dispatch(finishProgress());\n }\n\n return goBack();\n});\n","import { produce } from \"immer\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { FormModel, FormObjectModel } from \"@beinformed/ui/models\";\n\nexport const addRepeatableAttributeSet = (form: FormModel) => {\n const newForm = produce(form, (draft) => {\n draft.addEmptyFormObject();\n });\n return updateForm(newForm);\n};\n\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const newForm = produce(form, (draft) => {\n draft.addEmptyFormObject();\n draft.removeFormObject(formObject);\n });\n return updateForm(newForm);\n};\n\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const newForm = produce(form, (draft) => {\n draft.removeFormObject(formObject);\n });\n return updateForm(newForm);\n};\n","import { useCallback, useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport {\n AssignmentFilterModel,\n CaseSearchModel,\n DetailModel,\n FilterModel,\n ListDetailModel,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useNavigation } from \"./useRouter\";\n\nimport type {\n AttributeModel,\n FilterCollection,\n Href,\n IFilter,\n} from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\ninterface ListNavigationOptions {\n syncLocation?: boolean;\n historyAction?: \"push\" | \"replace\";\n}\n\nexport const useList = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n ...options,\n });\n\nexport const useListOrDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic<ListModel | DetailModel>(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, DetailModel],\n ...options,\n });\n\nexport const useListDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n ...options,\n });\n\nexport const useListNavigation = ({\n syncLocation = true,\n historyAction = \"push\",\n}: ListNavigationOptions = {}) => {\n const { push, replace } = useNavigation();\n const dispatch = useBEIDispatch();\n\n const navigate = historyAction === \"push\" ? push : replace;\n\n const update = useCallback(\n (list: ListModel, resetPage = false) => {\n const listHref = list.selfhref;\n if (resetPage) {\n listHref.page = undefined;\n }\n\n if (list.requestMethod === HTTP_METHODS.POST) {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n state: { formdata: list.formdata },\n });\n }\n\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.POST,\n data: list.formdata,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n } else {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n });\n }\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.GET,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n }\n },\n [dispatch, navigate, syncLocation],\n );\n\n const updateFilters = useCallback(\n (list: ListModel, filters: FilterCollection | IFilter[]) => {\n list.filterCollection = filters;\n update(list, true);\n },\n [update],\n );\n\n const updateFilter = useCallback(\n (\n list: ListModel,\n filter: IFilter,\n value: string,\n attribute?: AttributeModel,\n ) => {\n if (filter instanceof AssignmentFilterModel && !attribute) {\n throw new TypeError(\n \"AssignmentFilterModel needs the attribute argument to be able to update the filter\",\n );\n }\n\n let filterToUpdate = null;\n let targetAttr = attribute;\n\n if (attribute) {\n filterToUpdate = list.filterCollection.getFilterByAttributeKey(\n attribute.key,\n );\n } else if (filter instanceof FilterModel) {\n filterToUpdate = list.filterCollection.getFilterByName(filter.name);\n targetAttr = filter.attribute;\n }\n\n if (filterToUpdate && targetAttr) {\n filterToUpdate.update(targetAttr, value);\n } else {\n const searchKey = attribute\n ? `key: ${attribute.key}`\n : `name: ${filter.name}`;\n console.error(\n `Can't find a filter to update by ${searchKey} on list: ${list.selfhref.toString()}`,\n );\n }\n\n update(list, true);\n },\n [update],\n );\n\n const resetFilters = useCallback(\n (list: ListModel) => {\n list.filterCollection.reset();\n update(list, true);\n },\n [update],\n );\n\n const removeFilter = useCallback(\n (list: ListModel, filter: IFilter) => {\n if (filter.name) {\n list.filterCollection.getFilterByName(filter.name)?.reset();\n }\n update(list, true);\n },\n [update],\n );\n\n const updateSort = useCallback(\n (list: ListModel, sortOption: string) => {\n list.sorting.value = sortOption;\n update(list, true);\n },\n [update],\n );\n\n const updatePage = useCallback(\n (list: ListModel, page: number) => {\n list.paging.page = page;\n update(list);\n },\n [update],\n );\n\n const updatePageSize = useCallback(\n (list: ListModel, pagesize: number) => {\n list.paging.pagesize.value = pagesize;\n update(list, true);\n },\n [update],\n );\n\n return useMemo(\n () => ({\n update,\n updateFilters,\n updateFilter,\n updateSort,\n updatePage,\n updatePageSize,\n resetFilters,\n removeFilter,\n }),\n [\n removeFilter,\n resetFilters,\n update,\n updateFilter,\n updateFilters,\n updatePage,\n updatePageSize,\n updateSort,\n ],\n );\n};\n","import { useCallback } from \"react\";\n\nimport { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { closeModal, showModal } from \"../redux/modals/modalsReducer\";\n\nimport type { RootState } from \"../redux/store\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null;\n size?: string | null;\n visible: boolean;\n show: () => void;\n close: () => void;\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\",\n );\n }\n\n const dispatch = useBEIDispatch();\n const modal = useBEISelector((state: RootState) =>\n state.modals.modals.find((m) => m.key === modalId),\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface ModalState {\n key: string;\n visible: boolean;\n size?: string;\n}\n\nexport interface ModalsState {\n modals: ModalState[];\n}\n\nexport const showModal = createAction(\"SHOW_MODAL\", (key: string) => {\n return {\n payload: key,\n };\n});\n\nexport const closeModal = createAction(\"CLOSE_MODAL\", (key: string) => {\n return {\n payload: key,\n };\n});\n\nconst initialState: ModalsState = {\n modals: [],\n};\n\nexport const modalsReducer = createReducer(initialState, (builder) => {\n builder\n .addCase(showModal, (state, action) => {\n const key = action.payload;\n\n // Hide all modals\n state.modals.forEach((modal) => {\n modal.visible = false;\n });\n\n // Find existing modal\n const existing = state.modals.find((modal) => modal.key === key);\n\n if (existing) {\n existing.visible = true;\n } else {\n state.modals.push({ key, visible: true });\n }\n })\n .addCase(closeModal, (state, action) => {\n const key = action.payload;\n\n // Remove the modal\n state.modals = state.modals.filter((modal) => modal.key !== key);\n\n // Show the last modal (if any)\n const last = state.modals[state.modals.length - 1];\n if (last) {\n last.visible = true;\n }\n });\n});\n","import {\n ConceptIndexModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentTypeModel,\n Href,\n ModelCatalogModel,\n} from \"@beinformed/ui/models\";\nimport { createHref, filterParameters } from \"@beinformed/ui/utils\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { getEntryDate } from \"../redux/modelcatalog/modelCatalogSelectors\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useLocation } from \"./useRouter\";\n\nimport type { ConceptDetailModel, ContentModel } from \"@beinformed/ui/models\";\nimport type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { UseModularUIBasicOptions } from \"./useModularUIBasic\";\n\nexport interface SearchFilter {\n index?: string;\n label?: string;\n type?: string | string[];\n modelCategory?: string | string[];\n entryDate?: string;\n}\n\nexport const useModelCatalog = (\n options?: UseModularUIBasicOptions<ModelCatalogModel>,\n) =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n ...options,\n });\n\nexport const useConceptIndex = (\n href: string | Href,\n key = \"conceptindex\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\n \"index\",\n \"label\",\n \"modelcategory\",\n \"type\",\n ]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nexport const useConceptDetail = (\n concept: string | Href,\n key = \"conceptdetail\",\n options?: UseModularUIBasicOptions<ConceptDetailModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, entryDate, location, []);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n ...options,\n });\n};\n\nexport const useContentIndex = (\n href: string | Href,\n key = \"contentindex\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n ...options,\n });\n};\n\nexport const useContentTOC = (\n content: string | Href,\n key = \"contenttoc\",\n options?: UseModularUIBasicOptions<ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n ...options,\n });\n};\n\nexport const useContent = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useCompleteSource = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel | ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const contentHref = new Href(content);\n contentHref.removeParameter(\"complete\");\n contentHref.addParameter(\"complete\", \"true\");\n\n const href = createHref(\"content\", contentHref, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useContentType = (\n contentType: string | Href,\n key = \"contenttypes\",\n options?: UseModularUIBasicOptions<ContentTypeModel>,\n) => {\n const href = createHref(\n \"contenttypes\",\n contentType,\n undefined,\n undefined,\n [],\n );\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n ...options,\n });\n};\n\nexport const useRelatedConcepts = (\n href: string | Href,\n key = \"relatedconcepts\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\"modelcategory\"]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nconst getSearchHref = (uri: string, filters: SearchFilter) => {\n const filterString = [];\n\n for (const key of Object.keys(filters)) {\n const filterValue = filters[key as keyof SearchFilter];\n if (filterValue) {\n let value: string = Array.isArray(filterValue)\n ? filterValue.join(\",\")\n : filterValue;\n if (key === \"type\") {\n value = value.replace(\"#\", \"%23\"); // handles un-encoded #\n }\n filterString.push(`${key}=${value}`);\n }\n }\n\n return filterString.length ? `${uri}?${filterString.join(\"&\")}` : uri;\n};\n\nexport const useConceptSearch = (\n filters: SearchFilter,\n key: string | \"conceptSearch\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const href = getSearchHref(\"/concepts\", filters);\n return useConceptIndex(href, key, options);\n};\n\nexport const useContentSearch = (\n filters: SearchFilter,\n key: string | \"contentSearch\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const href = getSearchHref(\"/content\", filters);\n return useContentIndex(href, key, options);\n};\n\n/**\n * Retrieve and update the entrydate for the modelcatalog\n */\nexport const useEntryDate = () => {\n const dispatch = useBEIDispatch();\n const entryDate = useBEISelector(getEntryDate);\n\n return {\n entryDate,\n setEntryDate: (entryDate: ISO_DATE) => dispatch(updateEntryDate(entryDate)),\n };\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport { Cache } from \"@beinformed/ui/utils\";\n\nexport interface ModelCatalogState {\n entryDate: string | undefined;\n}\n\nexport const updateEntryDate = createAction(\n \"UPDATE_ENTRYDATE\",\n (entryDate: string) => {\n return {\n payload: entryDate,\n };\n },\n);\n\nconst initialState: ModelCatalogState = {\n entryDate: new Date().toISOString().split(\"T\")[0],\n};\n\n/**\n * Keep track of the entry date for the modelcatalog\n */\nexport const modelCatalogReducer = createReducer<ModelCatalogState>(\n initialState,\n (builder) => {\n builder.addCase(updateEntryDate, (state, action) => {\n Cache.addItem(\"ModelCatalogEntryDate\", action.payload);\n\n state.entryDate = action.payload;\n });\n },\n);\n","import type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { RootState } from \"../store\";\n\n/**\n * Retrieve entrydate for the model catalog\n */\nexport const getEntryDate = (state: RootState): ISO_DATE => {\n if (state.modelcatalog?.entryDate) {\n return state.modelcatalog?.entryDate;\n }\n\n const isoDate = new Date().toISOString();\n return isoDate.split(\"T\")[0] || isoDate;\n};\n","import { createSelector } from \"reselect\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { reloadModel } from \"../redux/modularui/reloadModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { RootState } from \"../redux/store\";\n\ntype ReloadCallback = (model: ModularUIModel | undefined) => boolean;\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: Record<string, unknown>) => void;\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => void;\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useBEIDispatch();\n\n const selectModularUI = (state: RootState) => state.modularui;\n const selector = createSelector([selectModularUI], (modularui) => {\n const models = [];\n const keys = Object.keys(modularui);\n for (const key of keys) {\n const model = modularui[key];\n if (model?.status === MODULARUI_STATUS.FINISHED) {\n models.push(model.model);\n }\n }\n return models;\n });\n\n const modularuiModels = useBEISelector(selector);\n\n return {\n reload: (model: ModularUIModel, options?: ModularUIRequestOptions) => {\n dispatch(reloadModel(model, options));\n },\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => {\n const modelsToReload = modularuiModels.filter(callbackFn);\n for (const modelToReload of modelsToReload) {\n if (modelToReload) {\n dispatch(reloadModel(modelToReload, options));\n }\n }\n },\n };\n};\n","import { fetchModel } from \"./fetchModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nexport const reloadModel = (\n model: ModularUIModel,\n options?: ModularUIRequestOptions,\n) =>\n fetchModel({\n key: model.connectKey || \"\",\n href: model.selfhref || \"\",\n options: {\n ...options,\n isReload: true,\n },\n });\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"../redux/notifications/notificationReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../i18n/types\";\nimport type { RootState } from \"../redux/store\";\n\nexport const useNotification = () => {\n const dispatch = useBEIDispatch();\n const { render, messageType, message, error } = useBEISelector(\n (state: RootState) => state.notification,\n );\n\n return {\n render,\n messageType,\n message,\n error,\n dismiss: () => dispatch(dismissNotification()),\n };\n};\n\nexport const useErrorNotification = () => {\n const dispatch = useBEIDispatch();\n return (message: MessageObject, error?: ErrorResponse) => {\n return dispatch(\n showNotification({ type: NOTIFICATION_TYPES.ERROR, message, error }),\n );\n };\n};\n","import { useMemo, useState } from \"react\";\n\nimport { useLocation, useRouteMatch } from \"react-router\";\n\nimport {\n CaseSearchModel,\n DetailModel,\n GroupingPanelModel,\n Href,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { HookOptions } from \"./useModularUIBasic\";\n\nconst useUrl = (href?: string | Href, fromRoute = false): Href => {\n const [previousUrl, setPreviousUrl] = useState<Href | null>(null);\n const [previousExact, setPreviousExact] = useState(false);\n\n const match = useRouteMatch();\n const location = useLocation();\n\n const url = useMemo(() => {\n if (href == null && previousUrl == null) {\n return new Href(\"\");\n }\n\n const currentUrl = href instanceof Href ? href : new Href(href);\n\n if (!fromRoute) {\n return currentUrl;\n }\n\n if (match.isExact) {\n currentUrl.addParametersFromString(location.search);\n }\n\n return currentUrl;\n }, [href, previousUrl, fromRoute, match.isExact, location.search]);\n\n // Check equality to prevent unnecessary state updates\n const isUrlChanged = !url.equalsWithParameters(previousUrl);\n\n const shouldUpdate =\n isUrlChanged &&\n (match.isExact ||\n previousExact === match.isExact ||\n !previousUrl?.startsWith(match.url));\n\n if (shouldUpdate) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n }\n\n return shouldUpdate ? url : previousUrl || url;\n};\n\nexport const usePanel = (\n href?: string | Href,\n options?: HookOptions & {\n fromRoute?: boolean;\n },\n):\n | ListModel\n | GroupingPanelModel\n | DetailModel\n | CaseSearchModel\n | undefined => {\n const { fromRoute, ...hookOptions } = options || { fromRoute: false };\n\n const url = useUrl(href, fromRoute || false);\n\n return useModularUIBasic(\"panel\", url, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\", \"CaseSearch\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, GroupingPanelModel, DetailModel, CaseSearchModel],\n ...hookOptions,\n });\n};\n","import { useMemo } from \"react\";\n\nimport pick from \"lodash/pick\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\n\nimport type { RootState } from \"../redux/store\";\n\nconst getPreferences = (state: RootState) => state.preferences;\n\nconst makeSelectPreference = (preferenceNames: string | string[]) => {\n const names = Array.isArray(preferenceNames)\n ? preferenceNames\n : [preferenceNames];\n\n return createSelector([getPreferences], (preferences) =>\n pick(preferences, names),\n );\n};\n\nexport const usePreference = (preferenceNames: string | string[]) => {\n const selectPreference = useMemo(\n () => makeSelectPreference(preferenceNames),\n [preferenceNames],\n );\n\n return useBEISelector(selectPreference);\n};\n"],"mappings":"yoBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,GAAO,QAAUC,KCHjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAa,KAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,GAAOF,IAAcC,IAAY,SAAS,aAAa,EAAE,EAE7DF,GAAO,QAAUG,KCRjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAO,KAGPC,GAASD,GAAK,OAElBD,GAAO,QAAUE,KCLjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAS,KAGTC,GAAc,OAAO,UAGrBC,GAAiBD,GAAY,eAO7BE,GAAuBF,GAAY,SAGnCG,GAAiBJ,GAASA,GAAO,YAAc,OASnD,SAASK,GAAUC,EAAO,CACxB,IAAIC,EAAQL,GAAe,KAAKI,EAAOF,EAAc,EACjDI,EAAMF,EAAMF,EAAc,EAE9B,GAAI,CACFE,EAAMF,EAAc,EAAI,OACxB,IAAIK,EAAW,EACjB,MAAY,CAAC,CAEb,IAAIC,EAASP,GAAqB,KAAKG,CAAK,EAC5C,OAAIG,IACEF,EACFD,EAAMF,EAAc,EAAII,EAExB,OAAOF,EAAMF,EAAc,GAGxBM,CACT,CAEAX,GAAO,QAAUM,KC7CjB,IAAAM,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAc,OAAO,UAOrBC,GAAuBD,GAAY,SASvC,SAASE,GAAeC,EAAO,CAC7B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AM,SACLF,IAAkBE,EAAM,SACxB,CAACJ,GAAa,WAAWI,EAAM,GAAG,GAEtC,OAAII,IACFP,EAAeK,CAAG,EAClBH,EAAiBC,EAAM,OAAO,GAGzBI,EAAeF,EAAMN,GAAeM,CAC7C,EAEaG,GAAW,CACtBX,EACAY,IAQe,CACf,GAAM,CAAE,UAAAX,EAAW,GAAGY,CAAY,EAAID,GAAW,CAAE,UAAW,EAAM,EAE9DJ,EAAMT,GAAOC,EAAMC,GAAa,EAAK,EAE3C,OAAOa,EAAkB,QAASN,EAAK,CACrC,eAAgB,CAAC,OAAQ,gBAAiB,SAAU,YAAY,EAEhE,YAAa,CAAC,YAAW,qBAAoB,cAAa,iBAAe,EACzE,GAAGK,CACL,CAAC,CACH,EC/EA,IAAAE,GAAwB,iBAExBC,GAAiB,WACjBC,GAA+B,oBAM/B,IAAMC,GAAkBC,GAAqBA,EAAM,YAE7CC,GAAwBC,GAAuC,CACnE,IAAMC,EAAQ,MAAM,QAAQD,CAAe,EACvCA,EACA,CAACA,CAAe,EAEpB,SAAO,mBAAe,CAACH,EAAc,EAAIK,MACvC,GAAAC,SAAKD,EAAaD,CAAK,CACzB,CACF,EAEaG,GAAiBJ,GAAuC,CACnE,IAAMK,KAAmB,YACvB,IAAMN,GAAqBC,CAAe,EAC1C,CAACA,CAAe,CAClB,EAEA,OAAOM,EAAeD,CAAgB,CACxC","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","require_now","__commonJSMin","exports","module","root","now","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","require_isArray","__commonJSMin","exports","module","isArray","require_isKey","__commonJSMin","exports","module","isArray","isSymbol","reIsDeepProp","reIsPlainProp","isKey","value","object","type","require_memoizeCapped","__commonJSMin","exports","module","memoize","MAX_MEMOIZE_SIZE","memoizeCapped","func","result","key","cache","require_stringToPath","__commonJSMin","exports","module","memoizeCapped","rePropName","reEscapeChar","stringToPath","string","result","match","number","quote","subString","require_arrayMap","__commonJSMin","exports","module","arrayMap","array","iteratee","index","length","result","require_baseToString","__commonJSMin","exports","module","Symbol","arrayMap","isArray","isSymbol","INFINITY","symbolProto","symbolToString","baseToString","value","result","require_toString","__commonJSMin","exports","module","baseToString","toString","value","require_castPath","__commonJSMin","exports","module","isArray","isKey","stringToPath","toString","castPath","value","object","require_toKey","__commonJSMin","exports","module","isSymbol","INFINITY","toKey","value","result","require_baseGet","__commonJSMin","exports","module","castPath","toKey","baseGet","object","path","index","length","require_defineProperty","__commonJSMin","exports","module","getNative","defineProperty","func","require_baseAssignValue","__commonJSMin","exports","module","defineProperty","baseAssignValue","object","key","value","require_assignValue","__commonJSMin","exports","module","baseAssignValue","eq","objectProto","hasOwnProperty","assignValue","object","key","value","objValue","require_isIndex","__commonJSMin","exports","module","MAX_SAFE_INTEGER","reIsUint","isIndex","value","length","type","require_baseSet","__commonJSMin","exports","module","assignValue","castPath","isIndex","isObject","toKey","baseSet","object","path","value","customizer","index","length","lastIndex","nested","key","newValue","objValue","require_basePickBy","__commonJSMin","exports","module","baseGet","baseSet","castPath","basePickBy","object","paths","predicate","index","length","result","path","value","require_baseHasIn","__commonJSMin","exports","module","baseHasIn","object","key","require_baseIsArguments","__commonJSMin","exports","module","baseGetTag","isObjectLike","argsTag","baseIsArguments","value","require_isArguments","__commonJSMin","exports","module","baseIsArguments","isObjectLike","objectProto","hasOwnProperty","propertyIsEnumerable","isArguments","value","require_isLength","__commonJSMin","exports","module","MAX_SAFE_INTEGER","isLength","value","require_hasPath","__commonJSMin","exports","module","castPath","isArguments","isArray","isIndex","isLength","toKey","hasPath","object","path","hasFunc","index","length","result","key","require_hasIn","__commonJSMin","exports","module","baseHasIn","hasPath","hasIn","object","path","require_basePick","__commonJSMin","exports","module","basePickBy","hasIn","basePick","object","paths","value","path","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","require_flatten","__commonJSMin","exports","module","baseFlatten","flatten","array","length","require_apply","__commonJSMin","exports","module","apply","func","thisArg","args","require_overRest","__commonJSMin","exports","module","apply","nativeMax","overRest","func","start","transform","args","index","length","array","otherArgs","require_constant","__commonJSMin","exports","module","constant","value","require_identity","__commonJSMin","exports","module","identity","value","require_baseSetToString","__commonJSMin","exports","module","constant","defineProperty","identity","baseSetToString","func","string","require_shortOut","__commonJSMin","exports","module","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","func","count","lastCalled","stamp","remaining","require_setToString","__commonJSMin","exports","module","baseSetToString","shortOut","setToString","require_flatRest","__commonJSMin","exports","module","flatten","overRest","setToString","flatRest","func","require_pick","__commonJSMin","exports","module","basePick","flatRest","pick","object","paths","hooks_exports","__export","useApplication","useAttributeUpdate","useCaseView","useCompleteSource","useConceptDetail","useConceptIndex","useConceptSearch","useContent","useContentFromSourceReferences","useContentIndex","useContentSearch","useContentTOC","useContentType","useDeepCompareEffect","useDetailPanel","useEntryDate","useErrorNotification","useForm","useFormNavigation","useGroupingPanel","useList","useListDetail","useListNavigation","useListOrDetail","useLocale","useLocaleCodes","useLocation","useLocationKey","useLogin","useLogout","useMessage","useModal","useModelCatalog","useModels","useModularUI","useModularUIBasic","useModularUIKey","useModularUIRequest","useNavigation","useNotification","usePanel","usePathname","usePreference","useProgressIndicator","useProgressIndicatorState","useQuerystring","useRelatedConcepts","useReload","useRepeatableAttributeSet","useRetrieveFormsOnModel","useTab","useTranslate","useUserProfile","__toCommonJS","import_react","import_constants","import_models","import_reselect","import_modularui","import_react_redux","useBEIDispatch","useBEISelector","useBEIStore","getLocale","state","getLocales","getModularUIRequest","getLocale","localeCode","href","options","request","useModularUIRequest","useBEISelector","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","responseCount","setResponseCount","actions","getActions","requestCount","requests","action","href","form","responses","actionForms","allActions","listItem","updateActions","unique","import_constants","import_exceptions","import_modularui","import_settings","import_utils","import_toolkit","initalState","loginSuccess","logoutSuccess","sendAuthenticationError","errorMessage","resetAuthErrors","saveChangePassword","authReducer","builder","state","action","import_toolkit","import_constants","import_modularui","import_utils","import_toolkit","import_models","import_toolkit","import_constants","import_models","import_modularui","import_constants","import_models","import_settings","import_toolkit","import_settings","import_utils","import_models","getApplication","state","locale","modularui","key","modelEntry","import_toolkit","updateErrorStatus","key","error","setModel","model","initModels","models","updateModel","updateForm","removeModelByKey","resetModularUI","import_toolkit","push","location","state","replace","go","delta","goBack","goForward","handleUnauthorized","errorResponse","dispatch","getState","removeModelByKey","application","getApplication","reloadApplication","logoutSuccess","sendAuthenticationError","location","LOGIN_PATH","locationFrom","replace","import_toolkit","import_settings","import_toolkit","startProgress","finishProgress","resetProgress","updateProgress","percentComplete","import_toolkit","saveNotification","type","message","error","showNotification","timeout","dispatch","dismissNotification","initialState","notificationReducer","builder","state","action","getNotificationMessageId","form","showFormNotification","dispatch","startProgress","showNotification","dismissNotification","finishProgress","showXHRErrorNotification","error","import_toolkit","noAction","import_toolkit","saveError","error","initialState","errorReducer","builder","_state","action","defaultErrorResponseHandler","error","dispatch","noAction","handleUnauthorized","push","saveChangePassword","saveError","showXHRErrorNotification","customErrorResponseHandler","defaultHandler","handleError","error","errorResponse","customErrorResponseHandler","defaultErrorResponseHandler","getRequestLocale","optionLocale","currentStateLocale","executeRequest","key","href","options","dispatch","getState","rejectWithValue","locale","getRequestLocale","requestHref","model","error","errorResponse","removeModelByKey","updateErrorStatus","handleError","fetchModel","import_reselect","import_models","getLocation","state","allKeysByHref","state","href","findHref","key","modelEntry","getModels","modularui","models","modelKey","selfhref","label","type","modelInfo","getActiveModels","getLocation","location","modelMap","m","contextModels","locationParts","currentPath","part","comparePath","foundEntry","selfContentLink","getAllFinishedModels","reloadApplication","_","dispatch","getState","state","applicationHref","application","getApplication","allKeys","allKeysByHref","key","removeModelByKey","modelKey","getLocale","fetchModel","loginFailed","errorMessage","sendAuthenticationError","changePassword","_","getState","isModal","locationFrom","push","login","username","password","dispatch","startProgress","reloadApplication","getApplication","loginSuccess","finishProgress","error","import_toolkit","import_modularui","logout","_","dispatch","startProgress","resetModularUI","reloadApplication","logoutSuccess","finishProgress","import_models","import_react","import_constants","import_react","useLocation","useBEISelector","state","useLocationKey","useQuerystring","usePathname","useNavigation","dispatch","useBEIDispatch","location","push","replace","delta","go","goBack","goForward","import_react","import_react_router","import_constants","import_models","import_react","import_lite","import_utils","checkDeps","deps","useDeepCompareMemoize","dependencies","ref","deepEqual","useDeepCompareEffect","callback","import_react","import_memoize","import_reselect","getMessage","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","args","useMessage","useBEISelector","useTranslate","useLocale","getLocaleCodes","state","locale","useLocaleCodes","useModularUIKey","modelKey","url","locale","useLocale","useModularUI","modelKey","url","options","dispatch","useBEIDispatch","hrefInstance","requestUrl","currentQueryString","prevQueryRef","key","useModularUIKey","model","useBEISelector","state","requestOptions","merged","redirectLocation","isQueryChanged","shouldLoad","useDeepCompareEffect","fetchModel","removeModelByKey","createUseModularUIOptions","options","mustReload","baseOptions","validateModel","model","expectedModels","useModularUIBasic","defaultKey","href","memoizedHref","key","useReload","modularUIOptions","modularUI","useModularUI","modelKey","url","location","useLocation","useModularUIKey","modelEntry","useBEISelector","state","reload","isFullyLoaded","lastModification","useApplication","options","useModularUIBasic","useTab","href","useCaseView","useGroupingPanel","useDetailPanel","useUserProfile","useLogin","dispatch","useBEIDispatch","application","useApplication","auth","useBEISelector","state","isAuthenticated","primaryAuthenticationType","resetAuthErrors","username","password","login","authenticationType","useLogout","BASE_PATH","authenticate","origin","url","logout","import_react","import_modularui","import_react","useProgressIndicator","dispatch","useBEIDispatch","start","startProgress","finish","finishProgress","reset","resetProgress","update","percentComplete","updateProgress","useProgressIndicatorState","useBEISelector","state","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","href","index","self","allHrefs","requests","modularuiRequest","responseContent","import_immer","import_constants","import_models","import_settings","import_toolkit","import_immer","import_settings","import_debounce","import_constants","import_models","import_modularui","import_settings","updateAutosave","status","model","autosave","dispatch","form","formdata","savedForm","updateForm","debouncedAutosave","debounce","autosaveFormObject","import_immer","import_constants","import_models","autosubmitFormObject","form","attribute","forceUpdate","fetchModel","newModel","draft","import_immer","import_constants","import_models","autoupdateFormObject","form","attribute","fetchModel","newModel","draft","import_toolkit","import_immer","import_debounce","import_constants","import_models","import_modularui","import_settings","updateValidations","form","formWithValidations","dispatch","getState","currentFormEntry","currentForm","validatedForm","draft","updateForm","debouncedValidateFormObject","debounce","validateFormObject","updateFormAttribute","form","formObject","attribute","inputvalue","options","dispatch","newForm","draft","completeObject","autosubmitAction","autosubmitFormObject","autoupdateAction","autoupdateFormObject","handleAutoSave","handleValidate","updateForm","autosaveFormObject","validateFormObject","import_toolkit","import_immer","import_modularui","previousObject","form","newForm","draft","updateForm","cancelForm","dispatch","getState","startProgress","logoutSuccess","reloadApplication","finishProgress","goBack","import_immer","addRepeatableAttributeSet","form","newForm","draft","updateForm","cancelRepeatableAttributeSet","formObject","removeRepeatableAttributeSet","useForm","href","data","formHref","form","useModularUI","useFormNavigation","dispatch","useBEIDispatch","previousObject","cancelForm","fetchModel","newModel","draft","removeModelByKey","showFormNotification","useAttributeUpdate","formObject","attribute","inputvalue","options","updateFormAttribute","useRepeatableAttributeSet","addRepeatableAttributeSet","object","cancelRepeatableAttributeSet","removeRepeatableAttributeSet","import_react","import_constants","import_models","useList","href","options","useModularUIBasic","useListOrDetail","useListDetail","useListNavigation","syncLocation","historyAction","push","replace","useNavigation","dispatch","useBEIDispatch","navigate","update","list","resetPage","listHref","fetchModel","updateFilters","filters","updateFilter","filter","value","attribute","filterToUpdate","targetAttr","searchKey","resetFilters","removeFilter","updateSort","sortOption","updatePage","page","updatePageSize","pagesize","import_react","import_exceptions","import_toolkit","showModal","key","closeModal","initialState","modalsReducer","builder","state","action","modal","existing","last","useModal","modalId","dispatch","useBEIDispatch","modal","useBEISelector","state","m","show","showModal","close","closeModal","import_models","import_utils","import_toolkit","import_utils","updateEntryDate","entryDate","initialState","modelCatalogReducer","builder","state","action","getEntryDate","state","isoDate","useModelCatalog","options","useModularUIBasic","useConceptIndex","href","key","entryDate","useEntryDate","url","useConceptDetail","concept","location","useLocation","useContentIndex","useContentTOC","content","useContent","useCompleteSource","contentHref","useContentType","contentType","useRelatedConcepts","getSearchHref","uri","filters","filterString","filterValue","value","useConceptSearch","useContentSearch","dispatch","useBEIDispatch","useBEISelector","getEntryDate","updateEntryDate","import_reselect","reloadModel","model","options","fetchModel","useModels","dispatch","useBEIDispatch","selector","state","modularui","models","keys","key","model","modularuiModels","useBEISelector","options","reloadModel","callbackFn","modelsToReload","modelToReload","useNotification","dispatch","useBEIDispatch","render","messageType","message","error","useBEISelector","state","dismissNotification","useErrorNotification","showNotification","import_react","import_react_router","import_models","useUrl","href","fromRoute","previousUrl","setPreviousUrl","previousExact","setPreviousExact","match","location","url","currentUrl","shouldUpdate","usePanel","options","hookOptions","useModularUIBasic","import_react","import_pick","import_reselect","getPreferences","state","makeSelectPreference","preferenceNames","names","preferences","pick","usePreference","selectPreference","useBEISelector"]}
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_freeGlobal.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_root.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Symbol.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getRawTag.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_objectToString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGetTag.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObject.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isFunction.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_coreJsData.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isMasked.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_toSource.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsNative.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getValue.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getNative.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nativeCreate.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashClear.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashDelete.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashGet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashHas.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashSet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Hash.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheClear.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/eq.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assocIndexOf.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheDelete.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheGet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheHas.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheSet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_ListCache.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Map.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheClear.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isKeyable.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getMapData.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheDelete.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheGet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheHas.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheSet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_MapCache.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/memoize.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/now.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_trimmedEndIndex.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseTrim.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObjectLike.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isSymbol.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toNumber.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/debounce.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArray.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isKey.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_memoizeCapped.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stringToPath.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayMap.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseToString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_castPath.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_toKey.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_defineProperty.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignValue.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignValue.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isIndex.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSet.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePickBy.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseHasIn.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsArguments.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArguments.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isLength.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hasPath.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/hasIn.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePick.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayPush.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isFlattenable.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseFlatten.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/flatten.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_apply.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overRest.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/constant.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/identity.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSetToString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_shortOut.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToString.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_flatRest.js","../../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/pick.js","../../src/hooks/index.ts","../../src/hooks/useAllFormsOnModel.ts","../../src/hooks/useModularUIRequest.ts","../../src/redux/hooks.ts","../../src/redux/i18n/i18nSelectors.ts","../../src/hooks/useAuthentication.ts","../../src/redux/auth/authReducer.ts","../../src/redux/auth/signinActions.ts","../../src/redux/application/applicationActions.ts","../../src/redux/modularui/fetchModel.ts","../../src/redux/error/errorActions.ts","../../src/redux/auth/unauthorizedActions.ts","../../src/redux/application/applicationSelectors.ts","../../src/redux/modularui/modelActions.ts","../../src/redux/router/routerActions.ts","../../src/redux/notifications/notificationActions.ts","../../src/redux/progressindicator/progressIndicatorActions.ts","../../src/redux/notifications/notificationReducer.ts","../../src/redux/shared/actions.ts","../../src/redux/error/errorReducer.ts","../../src/redux/modularui/utils.ts","../../src/redux/shared/selectors.ts","../../src/redux/auth/signoutActions.ts","../../src/hooks/useModularUIModel.ts","../../src/hooks/useModularUIBasic.ts","../../src/hooks/useRouter.ts","../../src/hooks/useModularUI.ts","../../src/hooks/useDeepCompareEffect.ts","../../src/hooks/useModularUIKey.ts","../../src/hooks/useI18n.ts","../../src/redux/i18n/i18nReducer.ts","../../src/i18n/Locales.ts","../../src/i18n/Locale.ts","../../src/i18n/languages.ts","../../src/i18n/translations/beinformed_error_messages_en.nl.json","../../src/i18n/translations/beinformed_error_messages_nl.nl.json","../../src/hooks/useContent.ts","../../src/hooks/useProgressIndicator.ts","../../src/hooks/useForm.ts","../../src/redux/form/attributeActions.ts","../../src/redux/form/autosaveActions.ts","../../src/redux/form/autosubmitActions.ts","../../src/redux/form/autoupdateActions.ts","../../src/redux/form/validateActions.ts","../../src/redux/form/formActions.ts","../../src/redux/form/formAttributesetRepeatable.ts","../../src/hooks/useList.ts","../../src/hooks/useLookup.ts","../../src/hooks/useModal.ts","../../src/redux/modals/modalsReducer.ts","../../src/hooks/useModelCatalog.ts","../../src/redux/modelcatalog/modelCatalogReducer.ts","../../src/redux/modelcatalog/modelCatalogSelectors.ts","../../src/hooks/useModelSelectors.ts","../../src/hooks/useModels.ts","../../src/redux/modularui/reloadModel.ts","../../src/hooks/useNotification.ts","../../src/hooks/usePanel.ts","../../src/hooks/usePreference.ts","../../src/hooks/useSearch.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","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is classified as an `Array` 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 an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\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 * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","/**\n * The base implementation of `_.hasIn` 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 baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\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/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` 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 an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\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 = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","/**\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","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","// Generated by createIndex.js - Do not edit manually!\n// This file is automatically updated when the script runs.\n\nexport * from \"./useAllFormsOnModel\";\nexport * from \"./useAuthentication\";\nexport * from \"./useContent\";\nexport * from \"./useDeepCompareEffect\";\nexport * from \"./useForm\";\nexport * from \"./useI18n\";\nexport * from \"./useList\";\nexport * from \"./useLookup\";\nexport * from \"./useModal\";\nexport * from \"./useModelCatalog\";\nexport * from \"./useModelSelectors\";\nexport * from \"./useModels\";\nexport * from \"./useModularUI\";\nexport * from \"./useModularUIBasic\";\nexport * from \"./useModularUIKey\";\nexport * from \"./useModularUIModel\";\nexport * from \"./useModularUIRequest\";\nexport * from \"./useNotification\";\nexport * from \"./usePanel\";\nexport * from \"./usePreference\";\nexport * from \"./useProgressIndicator\";\nexport * from \"./useRouter\";\nexport * from \"./useSearch\";\n","import { useEffect, useMemo, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, ListModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport type { ActionModel, DetailModel, TabModel } from \"@beinformed/ui/models\";\n\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel,\n) => {\n const modularui = useModularUIRequest();\n\n const [forms, setForms] = useState(null);\n const [responseCount, setResponseCount] = useState(0);\n\n const actions = useMemo(() => getActions(model), [model]);\n const requestCount = actions.length;\n\n useEffect(() => {\n const requests = actions.map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [actions, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (model: ListModel | DetailModel | TabModel) => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions: ActionModel[] = [];\n const unique: string[] = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n","import { createSelector } from \"reselect\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale } from \"../redux/i18n/i18nSelectors\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nconst getModularUIRequest = createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: ModularUIRequestOptions) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n});\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: ModularUIRequestOptions,\n) => ModularUIRequest) => useBEISelector(getModularUIRequest);\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","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","import { INTERNAL_LOGIN_TYPE } from \"@beinformed/ui/constants\";\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { Authenticate } from \"@beinformed/ui/modularui\";\nimport { getContextPath, getContextPathServer } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { resetAuthErrors } from \"../redux/auth/authReducer\";\nimport { login } from \"../redux/auth/signinActions\";\nimport { logout } from \"../redux/auth/signoutActions\";\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\n\nimport { useApplication } from \"./useModularUIModel\";\n\nimport type { AuthenticationType } from \"@beinformed/ui/modularui\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Provides access to authentication state and actions.\n * Includes functionality for standard username/password login and redirect-based login.\n * @returns An object containing authentication status, available authentication types, error messages, and login/logout functions.\n */\nexport const useLogin = () => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useBEIDispatch();\n\n const application = useApplication();\n const auth = useBEISelector((state: RootState) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * The current authentication error message, if any.\n */\n errorMessage: auth.error,\n\n /**\n * Resets the authentication error message in the Redux store.\n */\n resetErrors: () => dispatch(resetAuthErrors()),\n\n /**\n * Attempts to log in the user with the provided username and password.\n * Dispatches the `login` action to the Redux store.\n * @param username The username for authentication.\n * @param password The password for authentication.\n */\n login: (username: string, password: string) =>\n dispatch(login({ username, password })),\n\n /**\n * Initiates a redirect-based login flow for a specific authentication type.\n * If a redirect login is already in progress, it throws an `IllegalStateException` to prevent infinite loops.\n * If the user is not currently authenticated, it sets a flag in the cache and redirects the browser to the authentication provider's redirect URI.\n * @param authenticationType The authentication type to initiate the redirect for.\n * @throws {IllegalStateException} If a redirect login is already in progress for a different authentication type.\n */\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${\n authenticationType.authentication\n }' using url: '${authenticationType.redirectUri ?? \"\"}'`,\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(\n `${getContextPathServer()}${authenticationType.redirectUri ?? \"\"}`,\n );\n }\n },\n };\n};\n\n/**\n * Provides access to logout functionality.\n * Handles both standard logout and redirect-based logout scenarios.\n * @returns An object containing the authentication status, available authentication types, and the logout function.\n */\nexport const useLogout = () => {\n const dispatch = useBEIDispatch();\n const application = useApplication();\n\n const BASE_PATH = getContextPath();\n\n const authenticate = new Authenticate();\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * Initiates the logout process.\n * If a redirect login was in progress, it redirects the user to the server's logout endpoint with a return URL to the current origin.\n * Otherwise, it dispatches the `logout` action to the Redux store.\n */\n logout: () => {\n const type = authenticate.authenticationType;\n if (type === INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT) {\n authenticate.redirectToLogout();\n } else if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n\n logoutUrl: authenticate.getLogoutUrl(),\n };\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface AuthState {\n authenticated: boolean;\n mustChangePassword: boolean;\n error: string | null;\n}\n\nconst initalState: AuthState = {\n authenticated: false,\n mustChangePassword: false,\n error: null,\n};\n\nexport const loginSuccess = createAction(\"AUTHENTICATION_SUCCESS\");\n\nexport const logoutSuccess = createAction(\"AUTHENTICATION_LOGOUT\");\n\nexport const sendAuthenticationError = createAction(\n \"AUTHENTICATION_ERROR\",\n (errorMessage: string) => {\n return {\n payload: errorMessage,\n };\n },\n);\n\nexport const resetAuthErrors = createAction(\"AUTHENTICATION_RESET_ERRORS\");\n\nexport const saveChangePassword = createAction(\"CHANGE_PASSWORD\");\n\nexport const authReducer = createReducer(initalState, (builder) => {\n builder\n .addCase(loginSuccess, (state) => {\n state.authenticated = true;\n state.error = null;\n state.mustChangePassword = false;\n })\n .addCase(sendAuthenticationError, (state, action) => {\n state.authenticated = false;\n state.error = action.payload;\n state.mustChangePassword = false;\n })\n .addCase(resetAuthErrors, (state) => {\n state.error = null;\n })\n .addCase(logoutSuccess, (state) => {\n state.authenticated = false;\n state.error = null;\n state.mustChangePassword = false;\n })\n .addCase(saveChangePassword, (state) => {\n state.authenticated = true;\n state.error = null;\n state.mustChangePassword = true;\n });\n});\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { CHANGEPASSWORD_PATH } from \"@beinformed/ui/constants\";\nimport { Authenticate } from \"@beinformed/ui/modularui\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { getApplication } from \"../application/applicationSelectors\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\nimport { push } from \"../router/routerActions\";\n\nimport { loginSuccess, sendAuthenticationError } from \"./authReducer\";\n\nimport type { PayloadAction } from \"@reduxjs/toolkit\";\nimport type { LocationState } from \"history\";\nimport type { RouterLocation } from \"../router/routerReducer\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const loginFailed = (errorMessage: string) =>\n sendAuthenticationError(errorMessage);\n\nexport const changePassword = createAsyncThunk<\n PayloadAction<{ location: string | RouterLocation; state: LocationState }>,\n void,\n { state: RootState }\n>(\"auth/change_pass\", (_, { getState }) => {\n const isModal = getState().router.location?.state?.modal;\n const locationFrom = getState().router.location?.state?.from;\n return push(CHANGEPASSWORD_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n modal: isModal,\n });\n});\n\nexport const login = createAsyncThunk<\n void,\n { username: string; password: string },\n { state: RootState; dispatch: BEIDispatch }\n>(\"auth/login\", async ({ username, password }, { dispatch, getState }) => {\n dispatch(startProgress());\n\n try {\n await new Authenticate().login(username, password);\n await dispatch(reloadApplication());\n\n Cache.addItem(\"auth\", true);\n const application = getApplication(getState());\n if (application?.userMustChangePassword) {\n dispatch(changePassword());\n } else {\n dispatch(loginSuccess());\n }\n dispatch(finishProgress());\n } catch (error) {\n if (\n typeof error === \"object\" &&\n error != null &&\n \"id\" in error &&\n typeof error.id === \"string\"\n ) {\n if (error.id === \"Error.ChangePasswordRequired\") {\n Cache.addItem(\"auth\", true);\n await dispatch(reloadApplication());\n dispatch(changePassword());\n } else {\n dispatch(loginFailed(error.id));\n }\n } else if (error instanceof Error) {\n dispatch(loginFailed(error.message));\n }\n\n dispatch(finishProgress());\n }\n});\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { ApplicationModel, Href } from \"@beinformed/ui/models\";\n\nimport { getLocale } from \"../i18n/i18nSelectors\";\nimport { fetchModel } from \"../modularui/fetchModel\";\nimport { removeModelByKey } from \"../modularui/modelActions\";\nimport { allKeysByHref } from \"../shared/selectors\";\n\nimport { getApplication } from \"./applicationSelectors\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const reloadApplication = createAsyncThunk<\n void,\n void,\n { dispatch: BEIDispatch; state: RootState; extra: unknown }\n>(\"application/reload\", async (_, { dispatch, getState }) => {\n const state = getState();\n\n const applicationHref = new Href(\"/\", \"Application\");\n\n const application = getApplication(state);\n if (application) {\n if (application.contextPath) {\n applicationHref.contextPath = application.contextPath;\n }\n if (application.origin) {\n applicationHref.origin = application.origin;\n }\n }\n\n const allKeys = allKeysByHref(state, applicationHref);\n for (const key of allKeys) {\n dispatch(removeModelByKey(key));\n }\n\n const locale = getLocale(state);\n const modelKey = `application(/)(${locale}`;\n\n await dispatch(\n fetchModel({\n key: modelKey,\n href: applicationHref,\n options: {\n targetModel: ApplicationModel,\n },\n }),\n );\n});\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { ErrorResponse, Href } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { handleError } from \"../error/errorActions\";\n\nimport { MODULARUI_STATUS } from \"./constants\";\nimport { removeModelByKey, updateErrorStatus } from \"./modelActions\";\nimport { getRequestLocale } from \"./utils\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\nimport type { FetchModelPayload, FetchModelResult } from \"./types\";\n\nconst executeRequest = async (\n { key, href, options }: FetchModelPayload,\n {\n dispatch,\n getState,\n rejectWithValue,\n }: {\n dispatch: BEIDispatch;\n getState: () => RootState;\n rejectWithValue: (value: ErrorResponse) => unknown;\n },\n): Promise<FetchModelResult> => {\n try {\n const locale = getRequestLocale(options?.locale, getState().i18n.locale);\n\n const requestHref =\n href instanceof Href\n ? href\n : new Href(href, \"\", {\n origin: options?.origin,\n contextPath: options?.contextPath,\n });\n\n const modularuiRequest = new ModularUIRequest(requestHref, {\n method: options?.method || HTTP_METHODS.GET,\n params: options?.params || \"\",\n data: options?.data || null,\n locale: locale,\n childmodels: options?.childmodels ?? true,\n isReload: options?.isReload,\n cache: options?.cache,\n headers: options?.headers,\n events: options?.events,\n onProgress: options?.onProgress,\n origin: options?.origin,\n contextPath: options?.contextPath,\n targetModel: options?.targetModel,\n forceTargetModel: options?.forceTargetModel ?? false,\n timeout: options?.timeout,\n });\n\n const model = await modularuiRequest.fetch();\n\n if (model) {\n model.connectKey = key;\n }\n\n // Return data for the fulfilled action\n return {\n key,\n model,\n updateHandler: options?.updateHandler,\n };\n } catch (error: unknown) {\n const errorResponse = new ErrorResponse(error as Error, key, {\n origin: options?.origin,\n contextPath: options?.contextPath,\n });\n\n // Specific error handling for removing model on certain errors\n if (\n errorResponse.isChangePassword ||\n errorResponse.isResourceNotFoundAfterReload\n ) {\n dispatch(removeModelByKey(key));\n } else {\n dispatch(updateErrorStatus(key, errorResponse));\n }\n\n // Dispatch the global error handler\n dispatch(handleError(error));\n\n throw rejectWithValue(errorResponse);\n }\n};\n\nexport const fetchModel = createAsyncThunk<\n FetchModelResult, // Return type of the fulfilled action payload\n FetchModelPayload, // First argument to the thunk\n {\n dispatch: BEIDispatch;\n state: RootState;\n rejectValue: ErrorResponse; // Type of the error payload in case of rejection\n }\n>(\"modularui/fetchModel\", executeRequest, {\n condition: ({ key }, { getState }) => {\n if (getState().modularui[key]?.status === MODULARUI_STATUS.LOADING) {\n return false;\n }\n },\n});\n","import { IS_SERVER } from \"@beinformed/ui/constants\";\nimport { ErrorResponse } from \"@beinformed/ui/models\";\nimport { logoutPath } from \"@beinformed/ui/settings\";\n\nimport { saveChangePassword } from \"../auth/authReducer\";\nimport { handleUnauthorized } from \"../auth/unauthorizedActions\";\nimport { showXHRErrorNotification } from \"../notifications/notificationActions\";\nimport { push } from \"../router/routerActions\";\nimport { noAction } from \"../shared/actions\";\n\nimport { saveError } from \"./errorReducer\";\n\nimport type { BEIDispatch } from \"../store\";\n\ntype DefaultHandler = typeof defaultErrorResponseHandler;\n\n// Default handler\nconst defaultErrorResponseHandler =\n (error: ErrorResponse) => (dispatch: BEIDispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch(noAction());\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser || error.isInvalidUsername) {\n dispatch(push(logoutPath()));\n return;\n }\n\n if (error.isChangePassword) {\n return dispatch(saveChangePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n // This setTimeout might hide errors from Sentry/monitoring tools\n setTimeout(() => {\n throw error.error || error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\ntype CustomErrorResponseHandler = (\n error: ErrorResponse,\n defaultHandler: DefaultHandler,\n) => (dispatch: BEIDispatch) => void;\n\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (error, defaultHandler) => (dispatch) =>\n dispatch(defaultHandler(error));\n\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler,\n) => {\n customErrorResponseHandler = handler;\n};\n\nexport const handleError = (error: unknown) => {\n // Ensure the error is an ErrorResponse if possible, otherwise create one.\n const errorResponse =\n error instanceof ErrorResponse ? error : new ErrorResponse(error as Error);\n\n // Dispatch the default handler or custom handler\n return customErrorResponseHandler(errorResponse, defaultErrorResponseHandler);\n};\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { getBooleanSetting, getStringSetting } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { getApplication } from \"../application/applicationSelectors\";\nimport { removeModelByKey } from \"../modularui/modelActions\";\nimport { replace } from \"../router/routerActions\";\n\nimport { logoutSuccess, sendAuthenticationError } from \"./authReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const handleUnauthorized = createAsyncThunk<\n void,\n ErrorResponse,\n { state: RootState; dispatch: BEIDispatch }\n>(\"auth/unauthorized\", (errorResponse, { dispatch, getState }) => {\n if (errorResponse.connectKey) {\n dispatch(removeModelByKey(errorResponse.connectKey));\n }\n\n if (\n getBooleanSetting(\"PAGE_RELOAD_ON_UNAUTHORIZED_ERROR\", false) &&\n errorResponse.response\n ) {\n window.location.reload();\n return;\n }\n\n // reload application when flag auth is set or isLogged\n const application = getApplication(getState());\n if (Cache.getItem(\"auth\") || application?.isLoggedIn) {\n dispatch(reloadApplication());\n }\n\n // set logged out\n dispatch(logoutSuccess());\n\n Cache.removeItem(\"auth\");\n\n if (errorResponse.isInvalidUsername) {\n dispatch(sendAuthenticationError(errorResponse.message || \"\"));\n }\n\n // add current location as from location before redirect\n const location = getState().router.location;\n const LOGIN_PATH = getStringSetting(\"LOGIN_PATH\", \"/signin\");\n if (location?.pathname !== LOGIN_PATH) {\n const locationFrom = location?.state?.from;\n dispatch(\n replace(LOGIN_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n // cannot open login in a modal, because of previous locations that might be secure\n modal: false,\n }),\n );\n }\n});\n","import { ApplicationModel } from \"@beinformed/ui/models\";\n\nimport type { RootState } from \"../store\";\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: RootState) => {\n const locale = state.i18n.locale || \"en\";\n const modularui = state.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof ApplicationModel &&\n modelEntry.model.locale === locale\n );\n });\n\n if (key) {\n return modularui[key] as unknown as ApplicationModel;\n }\n }\n\n return undefined;\n};\n","import { createAction } from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse, ModularUIModel } from \"@beinformed/ui/models\";\n\nexport const updateErrorStatus = createAction(\n \"MODULARUI/ERROR_STATUS\",\n (key: string, error: ErrorResponse) => {\n return {\n payload: {\n key,\n error,\n },\n };\n },\n);\n\nexport const setModel = createAction(\n \"MODULARUI/SET\",\n (key: string, model: ModularUIModel) => {\n model.connectKey = key;\n return {\n payload: {\n key,\n model,\n },\n };\n },\n);\n\nexport const initModels = createAction(\n \"MODULARUI/INIT\",\n (models: { key: string; model: ModularUIModel }[]) => {\n return {\n payload: models,\n };\n },\n);\n\nexport const updateModel = createAction(\n \"MODULARUI/UPDATE\",\n (model: ModularUIModel) => {\n return {\n payload: model,\n };\n },\n);\n\nexport const updateForm = createAction(\n \"MODULARUI/UPDATE_FORM\",\n (model: ModularUIModel) => {\n return {\n payload: model,\n };\n },\n);\n\nexport const removeModelByKey = createAction(\n \"MODULARUI/REMOVE_KEY\",\n (key: string) => {\n return {\n payload: key,\n };\n },\n);\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = createAction(\"MODULARUI/RESET\");\n","import { createAction } from \"@reduxjs/toolkit\";\n\nimport type { LocationState } from \"history\";\nimport type { RouterLocation } from \"./routerReducer\";\n\nexport const push = createAction(\n \"ROUTER/PUSH\",\n (location: RouterLocation | string, state?: LocationState) => {\n return {\n payload: { location, state },\n };\n },\n);\n\nexport const replace = createAction(\n \"ROUTER/REPLACE\",\n (location: RouterLocation | string, state?: LocationState) => {\n return {\n payload: { location, state },\n };\n },\n);\n\nexport const go = createAction(\"ROUTER/GO\", (delta: number) => {\n return {\n payload: { delta },\n };\n});\n\nexport const goBack = createAction(\"ROUTER/GOBACK\");\n\nexport const goForward = createAction(\"ROUTER/GOFORWARD\");\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\n\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\n\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"./notificationReducer\";\n\nimport type { ErrorResponse, FormModel } from \"@beinformed/ui/models\";\n\nconst getNotificationMessageId = (form: FormModel) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification = createAsyncThunk(\n \"notification/show_form\",\n async (form: FormModel, { dispatch }) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification({\n type: NOTIFICATION_TYPES.SUCCESS,\n message: {\n id: getNotificationMessageId(form),\n },\n }),\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getNumberSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n },\n);\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification = (error: ErrorResponse) => {\n return showNotification({\n type: NOTIFICATION_TYPES.ERROR,\n message: {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error,\n });\n};\n","import { createAction } from \"@reduxjs/toolkit\";\n\nexport const startProgress = createAction(\"START_PROGRESS\");\nexport const finishProgress = createAction(\"FINISH_PROGRESS\");\nexport const resetProgress = createAction(\"RESET_PROGRESS\");\nexport const updateProgress = createAction(\n \"UPDATE_PROGRESS\",\n (percentComplete: number) => ({\n payload: {\n percentComplete,\n },\n }),\n);\n","import {\n createAction,\n createAsyncThunk,\n createReducer,\n} from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../../i18n/types\";\n\nexport interface NotificationState {\n render: boolean;\n messageType: string | undefined;\n message: MessageObject | undefined;\n error: ErrorResponse | undefined;\n}\n\nexport interface ShowNotificationArguments {\n type: NOTIFICATION_TYPES | undefined;\n message: MessageObject | undefined;\n error?: ErrorResponse | undefined;\n timeout?: number;\n}\n\nexport enum NOTIFICATION_TYPES {\n SUCCESS = \"SUCCESS\",\n INFO = \"INFO\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n}\n\nconst saveNotification = createAction(\n \"SHOW_NOTIFICATION\",\n (\n type: NOTIFICATION_TYPES | undefined,\n message: MessageObject | undefined,\n error?: ErrorResponse | undefined,\n ) => {\n return {\n payload: {\n type,\n message,\n error,\n },\n };\n },\n);\n\nexport const showNotification = createAsyncThunk(\n \"notifications/show\",\n (\n { type, message, error, timeout }: ShowNotificationArguments,\n { dispatch },\n ) => {\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n\n dispatch(saveNotification(type, message, error));\n },\n);\n\nexport const dismissNotification = createAction(\"DISMISS_NOTIFICATION\");\n\nconst initialState: NotificationState = {\n render: false,\n messageType: undefined,\n message: undefined,\n error: undefined,\n};\n\nexport const notificationReducer = createReducer<NotificationState>(\n initialState,\n (builder) => {\n builder\n .addCase(saveNotification, (state, action) => {\n return {\n ...state,\n render: true,\n messageType: action.payload.type,\n message: action.payload.message,\n error: action.payload.error,\n };\n })\n .addCase(dismissNotification, (state) => {\n return {\n ...state,\n render: false,\n messageType: undefined,\n message: undefined,\n error: undefined,\n };\n });\n },\n);\n","import { createAction } from \"@reduxjs/toolkit\";\n\nexport const noAction = createAction(\"NO_ACTION\");\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\n\nexport type ErrorState = null | ErrorResponse;\n\nexport const saveError = createAction(\"SAVE_ERROR\", (error: ErrorResponse) => {\n return {\n payload: error,\n };\n});\n\nconst initialState = null;\n\nexport const errorReducer = createReducer<ErrorState>(\n initialState,\n (builder) => {\n builder.addCase(saveError, (_state, action) => {\n return action.payload;\n });\n },\n);\n","/**\n * Retrieve the preferred language for this request, falls back to the browser language or english\n */\nexport const getRequestLocale = (\n optionLocale: string | undefined,\n currentStateLocale: string,\n) => {\n if (optionLocale) {\n return optionLocale;\n }\n\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator.language.split(\"-\")[0] || currentStateLocale;\n }\n\n return currentStateLocale;\n};\n","import { createSelector } from \"reselect\";\n\nimport { ContentModel, ContentTOCModel, Href } from \"@beinformed/ui/models\";\n\nimport { MODULARUI_STATUS } from \"../modularui/constants\";\n\nimport type {\n ContentLinkModel,\n ModularUIModel,\n ResourceModel,\n} from \"@beinformed/ui/models\";\nimport type { RootState } from \"../store\";\n\n/**\n * Helper to get the current pathname from the router state.\n * @private\n */\nconst getLocation = (state: RootState) => state?.router?.location?.pathname;\n\n/**\n * Retrieves all models from the state that are instances of the specified class\n * and match the current application locale.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to filter by (e.g., TaskModel).\n * @returns {InstanceType<T>[]} An array of model instances.\n */\nexport const getAllModelsByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n): InstanceType<T>[] => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale\n );\n })\n .map((key) => modularui[key].model as InstanceType<T>);\n }\n\n return [];\n};\n\n/**\n * Finds the first occurrence of a model in the state that is an instance of the\n * provided class and matches the current locale.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to look for.\n * @returns {InstanceType<T> | undefined} The first matching model instance or undefined.\n */\nexport const getFirstModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n): InstanceType<T> | undefined => {\n const modularui = state?.modularui;\n if (modularui) {\n const locale = state.i18n.locale || \"en\";\n\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale\n );\n });\n\n if (key) {\n const modelEntry = modularui[key];\n if (modelEntry?.model instanceof instance) {\n return modelEntry.model as InstanceType<T>;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Finds the model that is currently \"active\" based on the current URL path.\n * Matches by instance type, locale, and verifies if the current location starts\n * with the model's selfhref path.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to filter by.\n * @returns {InstanceType<T> | undefined} The active model instance or undefined.\n */\nexport const getActiveModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n) => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale &&\n location?.startsWith(modelEntry.model.selfhref?.path || \"\")\n );\n });\n\n if (key) {\n const modelEntry = modularui[key];\n if (modelEntry?.model instanceof instance) {\n return modelEntry.model as InstanceType<T>;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Retrieves a specific model from the store by comparing its selfhref.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to search for.\n * @returns {ModularUIModel | undefined} The matching model or undefined.\n */\nexport const modelByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return model.model?.selfhref?.equals(findHref);\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return undefined;\n};\n\n/**\n * Return the unique state key of a model found by its selfhref.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to search for.\n * @returns {string | undefined} The internal state key or undefined.\n */\nexport const keyByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model?.selfhref?.equals(findHref);\n });\n }\n\n return undefined;\n};\n\n/**\n * Returns all keys for models that match a specific href.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to filter keys by.\n * @returns {string[]} An array of state keys.\n */\nexport const allKeysByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const modelEntry = state.modularui[key];\n if (modelEntry) {\n return modelEntry.model?.selfhref?.equals(findHref);\n }\n });\n }\n\n return [];\n};\n\n/**\n * Memoized selector that maps the flat modularui state into a simplified array of\n * model metadata, including content links for specific content models.\n * @returns {Array<Object>} List of model metadata objects.\n */\nconst getModels = createSelector(\n [(state: RootState) => state.modularui],\n (modularui) => {\n const models: {\n selfContentLink: ContentLinkModel | null;\n key: string;\n selfhref: Href | undefined;\n label: string;\n type: string;\n }[] = [];\n\n if (!modularui) return models;\n\n Object.keys(modularui).forEach((modelKey: string) => {\n const modelEntry = modularui[modelKey];\n\n if (modelEntry && \"model\" in modelEntry) {\n const { key, selfhref, label, type } =\n modelEntry.model as ModularUIModel;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n },\n);\n\n/**\n * Memoized selector that returns a \"context\" of active models based on the current path segments.\n * Useful for breadcrumbs or determining nested model hierarchy.\n * @returns {Array<Object>} Array of active models found in the current URL path.\n */\nexport const getActiveModels = createSelector(\n [getLocation, getModels],\n (location, models) => {\n if (!location || !models.length) return [];\n\n const modelMap = new Map(\n models.filter((m) => m.selfhref).map((m) => [m.selfhref?.toString(), m]),\n );\n\n const contextModels: {\n key: string;\n href: Href | undefined;\n label: string;\n type: string;\n }[] = [];\n const locationParts = location.split(\"/\");\n let currentPath = \"\";\n\n locationParts.forEach((part) => {\n currentPath = currentPath === \"/\" ? `/${part}` : `${currentPath}/${part}`;\n\n const comparePath = decodeURIComponent(currentPath).replace(\n \"/modelcatalog/\",\n \"/\",\n );\n\n const foundEntry = modelMap.get(comparePath);\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n currentPath.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n });\n\n return contextModels;\n },\n);\n\n/**\n * Retrieves all models from the state that have a status of 'FINISHED'.\n * @returns {ModularUIModel[]} Array of finished model instances.\n */\nexport const getAllFinishedModels = createSelector(\n [\n (state: RootState) => state.modularui,\n (state: RootState) => state.i18n.locale,\n ],\n (modularui, locale) => {\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n if (modularui[key]) {\n const item = modularui[key];\n return (\n item.status === MODULARUI_STATUS.FINISHED &&\n item.model?.locale === locale\n );\n }\n return false;\n })\n .map((key) => modularui[key].model);\n }\n return [];\n },\n);\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { Authenticate } from \"@beinformed/ui/modularui\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { resetModularUI } from \"../modularui/modelActions\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\n\nimport { logoutSuccess } from \"./authReducer\";\n\nimport type { BEIDispatch } from \"../store\";\n\nexport const logout = createAsyncThunk<void, void, { dispatch: BEIDispatch }>(\n \"auth/logout\",\n async (_, { dispatch }) => {\n dispatch(startProgress());\n\n await new Authenticate().logout();\n\n dispatch(resetModularUI());\n dispatch(reloadApplication());\n\n dispatch(logoutSuccess());\n dispatch(finishProgress());\n },\n);\n","import {\n ApplicationModel,\n CaseViewModel,\n DetailModel,\n GroupingPanelModel,\n TabModel,\n UserProfileModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (options?: HookOptions) =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n ...options,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n ...options,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n ...options,\n });\n\nexport const useGroupingPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n ...options,\n });\n\nexport const useDetailPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n ...options,\n });\n\nexport const useUserProfile = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n ...options,\n });\n","import { useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\n\nimport { useLocation } from \"../hooks/useRouter\";\nimport { useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\n\nimport { useModularUI } from \"./useModularUI\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIResponse } from \"@beinformed/ui/modularui\";\n\n/**\n * Configuration options for low-level modular UI requests.\n */\nexport interface HookOptions {\n key?: string;\n origin?: string;\n contextPath?: string;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null;\n}\n\n/**\n * Configuration options for the useModularUIBasic hook.\n * Allows for type enforcement, caching control, and reload behavior.\n */\nexport interface UseModularUIBasicOptions<T> {\n expectedModels?: string[];\n targetModel?: new (modularuiResponse: ModularUIResponse) => T;\n forceTargetModel?: boolean;\n origin?: string;\n contextPath?: string;\n cache?: boolean;\n key?: string;\n isReload?: boolean;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null; // If present, the hook switches from GET to POST\n}\n\n/**\n * Internal helper to transform high-level hook options into a configuration\n * object compatible with the core useModularUI fetcher.\n * Logic:\n * 1. Defaults to GET method.\n * 2. If 'formdata' is present, it switches to POST and assigns 'data'.\n * 3. Forces 'isReload' if the useReload check returns true.\n */\nconst createUseModularUIOptions = <T>(\n options: UseModularUIBasicOptions<T>,\n mustReload: boolean,\n) => {\n const baseOptions: Record<string, unknown> = {\n expectedModels: [],\n method: HTTP_METHODS.GET,\n data: undefined,\n ...options,\n isReload: mustReload || options.isReload,\n };\n\n if (options.formdata != null) {\n baseOptions.method = HTTP_METHODS.POST;\n baseOptions.data = options.formdata;\n }\n\n return baseOptions;\n};\n\n/**\n * Validates that the returned model type matches one of the expected model strings.\n * Logs a warning to the console if there is a mismatch (useful for debugging UI-backend contracts).\n */\nconst validateModel = (model: unknown, expectedModels: string[]) => {\n if (\n expectedModels.length > 0 &&\n model !== null &&\n typeof model === \"object\" &&\n \"type\" in model &&\n typeof model.type === \"string\"\n ) {\n const isCorrectModel = expectedModels.includes(model.type);\n if (!isCorrectModel) {\n console.warn(model, \"is not of instance\", expectedModels);\n }\n }\n};\n\n/**\n * A simplified abstraction over useModularUI that includes automatic\n * model validation and smart-reload logic based on router state.\n *\n * @param {string} defaultKey - The default identifier for the model.\n * @param {string | Href} href - The endpoint to fetch.\n * @param {UseModularUIBasicOptions} options - Extended configuration options.\n */\nexport const useModularUIBasic = <T>(\n defaultKey: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {},\n): T | undefined => {\n const memoizedHref = useMemo(() => href.toString(), [href]);\n\n // Use the key provided in options if available, otherwise fallback to the default\n const key = options.key ?? defaultKey;\n\n // Determine if we need to bypass cache based on navigation 'reload' signals\n const mustReload = useReload(key, memoizedHref);\n\n // Memoize options to prevent useModularUI from re-fetching on every parent render\n const modularUIOptions = useMemo(\n () => createUseModularUIOptions(options, mustReload),\n [options, mustReload],\n );\n\n const modularUI = useModularUI(key, href, modularUIOptions);\n\n const expectedModels = useMemo(\n () => options.expectedModels ?? [],\n [options.expectedModels],\n );\n\n // Extract and validate the model from the modularUI wrapper object\n return useMemo((): T | undefined => {\n if (modularUI?.model) {\n validateModel(modularUI.model, expectedModels);\n return modularUI.model as T;\n }\n return undefined;\n }, [expectedModels, modularUI]);\n};\n\n/**\n * Determines if a model should be reloaded based on the 'reload' timestamp\n * found in the React Router location state.\n * This is used for \"force refresh\" scenarios where a user navigates to a\n * page and expects fresh data (e.g., after a form submission elsewhere).\n * @param {string} modelKey - The model type key.\n * @param {string} url - The resource URL.\n * @returns {boolean} True if the store data is stale compared to the reload signal.\n */\nexport const useReload = (modelKey: string, url: string): boolean => {\n const location = useLocation();\n const key = useModularUIKey(modelKey, url);\n\n // Access the current entry in the Redux store\n const modelEntry = useBEISelector((state) => state.modularui[key]);\n\n if (modelEntry) {\n const reload = (location?.state?.reload || 0) as number;\n\n // If a reload timestamp exists in the router state\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n // Trigger reload only if the model is already finished loading\n // AND the data we have is older than the requested reload time.\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n }\n return false;\n};\n","import { useMemo } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n go,\n goBack,\n goForward,\n push,\n replace,\n} from \"../redux/router/routerActions\";\n\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Returns the full location object from the router state.\n */\nexport const useLocation = () =>\n useBEISelector((state: RootState) => state.router.location);\n\n/**\n * Returns the unique key of the current location.\n */\nexport const useLocationKey = () => useLocation()?.key ?? \"\";\n\n/**\n * Returns the current search (querystring) portion of the URL.\n */\nexport const useQuerystring = () => useLocation()?.search;\n\n/**\n * Returns the current URL pathname.\n */\nexport const usePathname = () => useLocation()?.pathname;\n\n/**\n * Provides navigation methods.\n */\nexport const useNavigation = () => {\n const dispatch = useBEIDispatch();\n\n return useMemo(\n () => ({\n push: (location: RouterLocation | string, state?: RootState) =>\n dispatch(push(location, state)),\n replace: (location: RouterLocation | string, state?: RootState) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n }),\n [dispatch],\n );\n};\n","import { useEffect, useMemo, useRef } from \"react\";\n\nimport { useLocation } from \"react-router\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href } from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\n\nimport { useDeepCompareEffect } from \"./useDeepCompareEffect\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { ModelEntry } from \"../redux/modularui/types\";\n\n/**\n * A custom hook to fetch and manage Be Informed modular UI resources.\n * It handles automatic data fetching based on URL/query changes, manages Redux state\n * synchronization, and provides cleanup logic when components unmount.\n *\n * @param {string} modelKey - A unique identifier for the type of model being fetched.\n * @param {string | Href} url - The endpoint URL or Href instance to fetch data from.\n * @param {RequestModularUIOptions} options - Configuration for the request (method, headers, etc.).\n * @returns {ModelEntry} The model data retrieved from the Redux store.\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: ModularUIRequestOptions = {},\n): ModelEntry | undefined => {\n const dispatch = useBEIDispatch();\n\n // Normalize the URL input into a Href instance to safely access query params and paths\n const hrefInstance = useMemo(() => new Href(url), [url]);\n const requestUrl = useMemo(() => hrefInstance.toString(), [hrefInstance]);\n const currentQueryString = hrefInstance.querystring;\n\n // Persistence ref to detect if query parameters have changed between renders\n const prevQueryRef = useRef(currentQueryString);\n\n // Generate a unique key for the Redux store based on the model type and the full URL\n const key = useModularUIKey(modelKey, requestUrl);\n\n // Select the specific piece of state corresponding to this modular UI component\n const model = useBEISelector((state) => state.modularui[key]);\n\n /**\n * Memoize request options to prevent unnecessary re-renders.\n * Merges default settings (GET method, auto-cleanup) with user-provided options.\n */\n const requestOptions = useMemo(() => {\n const merged = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: true,\n ...options,\n };\n\n if (url instanceof Href) {\n merged.origin = merged.origin ?? url.origin;\n merged.contextPath = merged.contextPath ?? url.contextPath;\n }\n return merged;\n }, [options, url]);\n\n const location = useLocation<{ redirectLocation?: string | Href }>();\n const redirectLocation = location.state?.redirectLocation;\n\n // eslint-disable-next-line react-hooks/refs\n const isQueryChanged = prevQueryRef.current !== currentQueryString;\n\n /**\n * Determines if a network request should be initiated.\n * Logic includes:\n * - Model doesn't exist yet (Initial load)\n * - Previous request resulted in an error (Retry)\n * - The query parameters changed (Filtering/Paging)\n * - A redirect was triggered specifically for this URL\n * - Manual 'isReload' flag is passed in options\n */\n const shouldLoad =\n model == null ||\n model.status === MODULARUI_STATUS.ERROR ||\n isQueryChanged ||\n (redirectLocation instanceof Href\n ? redirectLocation.equals(requestUrl)\n : false) ||\n requestOptions.isReload === true;\n\n // Synchronize the ref after the render cycle determines if we should load\n useEffect(() => {\n prevQueryRef.current = currentQueryString;\n }, [currentQueryString]);\n\n // Execute the load action. Deep compare is used on options to prevent\n // infinite loops caused by passing inline object literals.\n useDeepCompareEffect(() => {\n if (requestUrl !== \"\" && shouldLoad) {\n dispatch(fetchModel({ key, href: requestUrl, options: requestOptions }));\n }\n }, [key, requestUrl, requestOptions, shouldLoad]);\n\n // Cleanup Effect:\n // If 'removeOnUnmount' is true, this removes the model data from the Redux store\n // when the component using this hook is destroyed.\n useEffect(() => {\n if (requestOptions.removeOnUnmount) {\n return () => {\n dispatch(removeModelByKey(key));\n };\n }\n }, [dispatch, key, requestOptions.removeOnUnmount]);\n\n return model;\n};\n","import { useEffect, useRef } from \"react\";\n\nimport { dequal as deepEqual } from \"dequal/lite\";\n\nimport { IS_DEV } from \"@beinformed/ui/utils\";\n\nimport type { DependencyList, EffectCallback } from \"react\";\n\n/**\n * Validates that dependencies are used correctly.\n * Deep compare should not be used with empty arrays or no dependencies.\n */\nfunction checkDeps(deps: DependencyList) {\n if (IS_DEV) {\n if (!deps || deps.length === 0) {\n console.warn(\n \"useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.\",\n );\n }\n }\n}\n\n/**\n * Custom hook to generate a stable signal (number) that only changes when\n * the 'dependencies' array changes value via a deep comparison.\n *\n * * NOTE: This function intentionally reads `ref.current` during the render phase\n * to perform memoization. This is a well-known pattern for deep-compare hooks\n * but requires an ESLint bypass for the strict 'no-accessing-refs-during-render' rule.\n */\nfunction useDeepCompareMemoize(dependencies: DependencyList) {\n const ref = useRef<DependencyList>(dependencies);\n\n // Only update the ref if the deep equality check fails\n // eslint-disable-next-line react-hooks/refs\n if (!deepEqual(dependencies, ref.current)) {\n // eslint-disable-next-line react-hooks/refs\n ref.current = dependencies;\n }\n\n // eslint-disable-next-line react-hooks/refs\n return ref.current;\n}\n\n/**\n * A replacement for useEffect that compares dependencies deeply.\n */\nexport function useDeepCompareEffect(\n callback: EffectCallback,\n dependencies: DependencyList,\n) {\n checkDeps(dependencies);\n\n // We use the memoized ref as the dependency.\n // React's shallow check will only trigger when the ref object itself changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n","import { useMemo } from \"react\";\n\nimport { useLocale } from \"./useI18n\";\n\n/**\n * Generates the key that is used in the modular ui reducer of redux\n */\nexport const useModularUIKey = (modelKey: string, url: string) => {\n const locale = useLocale();\n return useMemo(\n () => `${modelKey}(${url.split(\"?\")[0]})(${locale})`,\n [modelKey, url, locale],\n );\n};\n","import { useCallback } from \"react\";\n\nimport memoize from \"lodash/memoize\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { updateLocale } from \"../redux/i18n/i18nReducer\";\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\nexport const useLocales = () => useBEISelector(getLocales);\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\n/**\n * A hook that returns a memoized function to update the application locale.\n *\n * @returns {(locale: string) => void} A memoized function to update the locale.\n */\nexport const useUpdateLocale = () => {\n const dispatch = useBEIDispatch();\n\n return useCallback(\n (locale: string) => {\n dispatch(updateLocale(locale));\n },\n [dispatch],\n );\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport { Cache, clearCookie, setCookie } from \"@beinformed/ui/utils\";\n\nimport { Locales } from \"../../i18n/Locales\";\n\nexport interface I18nState {\n locales: Locales;\n locale: string;\n}\n\nexport const receiveLocale = (locale: string) => updateLocale(locale);\n\nexport const updateLocale = createAction(\"UPDATE_LOCALE\", (locale: string) => {\n return { payload: locale };\n});\n\nexport const setLocales = createAction(\n \"SET_LOCALES\",\n (locales: Locales, locale: string) => {\n return { payload: { locales, locale } };\n },\n);\n\nconst getDefaultLocale = () => {\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator?.language.split(\"-\")[0] || \"en\";\n }\n return \"en\";\n};\n\nconst initialState = {\n locales: new Locales(),\n locale: getDefaultLocale(),\n};\n\nexport const i18nReducer = createReducer<I18nState>(initialState, (builder) => {\n builder\n .addCase(updateLocale, (state, action) => {\n if (state.locales?.length > 1) {\n setCookie(\"locale\", action.payload);\n } else {\n clearCookie(\"locale\");\n }\n\n // clear cache because of cached contributions\n Cache.clear();\n\n state.locale = action.payload;\n })\n .addCase(setLocales, (state, action) => {\n const { locale, locales } = action.payload;\n\n if (state.locales.length > 1) {\n setCookie(\"locale\", locale);\n } else {\n clearCookie(\"locale\");\n }\n\n state.locales = locales;\n if (locale) {\n state.locale = locale;\n }\n });\n});\n","import { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\nimport { BaseCollection } from \"@beinformed/ui/models\";\n\nimport { Locale } from \"./Locale\";\nimport englishErrors from \"./translations/beinformed_error_messages_en.nl.json\";\nimport dutchErrors from \"./translations/beinformed_error_messages_nl.nl.json\";\n\nimport type { LocaleConfiguration } from \"./types\";\n\ntype ErrorMessageObject = Record<string, Record<string, string>>;\n\ninterface HydratedLocales {\n collection: {\n code: string;\n messages: Record<string, string>;\n errors: Record<string, string>;\n }[];\n}\n\n/**\n * Array of available locales\n * Order of locales is the preferred order of locales.\n * When user has an accept language header that does not correspond to the locales array,\n * the first one is used as the preferred language\n */\nexport const availableLocales: LocaleConfiguration[] = [\n {\n code: \"en\",\n messages: {},\n errors: englishErrors,\n },\n {\n code: \"nl\",\n messages: {},\n errors: dutchErrors,\n },\n];\n\n/**\n * Merge an object with custom error messages (exported and translated from be informed for example) and merge them with the existing translations.\n */\nexport const createLocalesWithConfiguredErrors = (\n configuredErrors: ErrorMessageObject,\n) =>\n availableLocales.map((availableLocale) => {\n if (configuredErrors[availableLocale.code]) {\n return {\n ...availableLocale,\n errors: {\n ...availableLocale.errors,\n ...configuredErrors[availableLocale.code],\n },\n };\n }\n\n return availableLocale;\n });\n\n/**\n * Locales, collection of Locale\n */\nexport class Locales extends BaseCollection<Locale> {\n constructor(locales: LocaleConfiguration[] = availableLocales) {\n super(locales.map((locale) => new Locale(locale)));\n }\n\n /**\n * rehydrate\n */\n static rehydrate(hydatedLocales: HydratedLocales): Locales {\n if (hydatedLocales && hydatedLocales.collection) {\n return new Locales(\n hydatedLocales.collection.map((locale) => ({\n code: locale.code,\n messages: locale.messages,\n errors: locale.errors,\n })),\n );\n }\n\n return new Locales([]);\n }\n\n /**\n * Check if locale with localeCode exists\n */\n hasLocale(localeCode: string) {\n return this.some((item) => localeCode.startsWith(item.code));\n }\n\n /**\n * Retrieve locales by localeCode from Locales collection\n */\n getLocale(localeCode: string) {\n if (this.hasLocale(localeCode)) {\n const locale = this.find((item) => localeCode.startsWith(item.code));\n if (locale) {\n return locale;\n }\n }\n throw new IllegalArgumentException(\n `Locale configuration for locale ${localeCode} not found`,\n );\n }\n\n /**\n * Retrieve all available locale codes\n */\n get availableLocaleCodes() {\n return this.map((locale) => locale.code);\n }\n\n /**\n * Retrieve preferred locale based on the accept header of a browser\n */\n getPreferredLocale(acceptLanguageHeader: string | null) {\n if (acceptLanguageHeader != null) {\n const acceptLanguages =\n acceptLanguageHeader.match(/[-A-Za-z]{2,10}/gu) || [];\n\n const preferredLocales = acceptLanguages\n .filter((locale) =>\n this.availableLocaleCodes.some((availableLocale) =>\n locale.startsWith(availableLocale),\n ),\n )\n .map((locale) =>\n this.availableLocaleCodes.find((availableLocale) =>\n locale.startsWith(availableLocale),\n ),\n );\n\n if (preferredLocales.length > 0) {\n return preferredLocales[0];\n }\n }\n\n return this.availableLocaleCodes[0];\n }\n\n /**\n * Add or change messages and errors for the given locale.<br>\n * It is not possible to remove messages.\n */\n update(\n locale: string,\n messages: Record<string, string> = {},\n errors: Record<string, string> = {},\n ) {\n if (this.hasLocale(locale)) {\n this.getLocale(locale).update(messages, errors);\n } else {\n this.add(\n new Locale({\n code: locale,\n messages,\n errors,\n }),\n );\n }\n }\n}\n","import formatMessage from \"format-message\";\nimport { immerable } from \"immer\";\n\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { getBooleanSetting } from \"@beinformed/ui/settings\";\nimport { IS_DEV } from \"@beinformed/ui/utils\";\n\nimport { languages } from \"./languages\";\n\nimport type { MessageParameters } from \"@beinformed/ui/types\";\nimport type { LocaleConfiguration } from \"./types\";\n\n/**\n * Create a locale\n */\nexport class Locale {\n [immerable] = true;\n\n #code: string;\n #messages: Record<string, string>;\n #errors: Record<string, string>;\n #nativeName: string | undefined;\n\n constructor(locale: LocaleConfiguration) {\n this.#code = locale.code;\n\n this.#messages = this.fixPlaceHoldersInObject(locale.messages);\n this.#errors = this.fixPlaceHoldersInObject(locale.errors);\n\n this.#nativeName = locale.nativeName;\n\n formatMessage.setup({\n missingTranslation: \"ignore\",\n });\n }\n\n /**\n * Retrieve locale code\n */\n get code() {\n return this.#code;\n }\n\n /**\n * Retrieve nativeName\n */\n get nativeName() {\n if (this.#nativeName) {\n return this.#nativeName;\n }\n\n const locale = this.code.split(\"-\");\n\n if (locale.length > 0) {\n const languageCode = locale[0];\n if (languageCode) {\n const language = languages.lang[languageCode];\n\n if (language) {\n return (\n language[1] + (locale[1] ? ` (${locale[1].toUpperCase()})` : \"\")\n );\n }\n }\n }\n\n throw new IllegalStateException(\n `Can not find language name based on locale: ${this.code}`,\n );\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n fixPlaceHolders(message: string | undefined) {\n if (typeof message === \"string\") {\n return message\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\");\n }\n\n return null;\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n private fixPlaceHoldersInObject(messages: Record<string, string> = {}) {\n return JSON.parse(\n JSON.stringify(messages)\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\"),\n );\n }\n\n /**\n * Retrieve message by id\n */\n getBaseMessage(id: string, defaultMessage?: string) {\n if (!id && !defaultMessage) {\n return \"[message: id or defaultMessage missing]\";\n }\n\n const messageFromLocale = this.#messages[id] || this.#errors[id];\n\n if (\n IS_DEV &&\n !messageFromLocale &&\n id &&\n getBooleanSetting(\"DEBUG_I18N_MESSAGE_NOT_FOUND\")\n ) {\n console.debug(\n `Message with id ${id} not found for locale ${this.code} in layout translations`,\n );\n }\n return messageFromLocale || this.fixPlaceHolders(defaultMessage) || id;\n }\n\n /**\n * Format message using formatMessage library\n */\n formatMessage(message: string, parameters?: MessageParameters) {\n if (parameters) {\n return formatMessage(message, parameters);\n }\n\n return message;\n }\n\n /**\n * Retrieve a messages with replaced parameters\n */\n getMessage(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters,\n ): string {\n const message = this.getBaseMessage(id, defaultMessage);\n return this.formatMessage(message, parameters);\n }\n\n /**\n * Add or change messages for this locale. It is not possible to remove messages.\n */\n update(\n messages: Record<string, string> = {},\n errors: Record<string, string> = {},\n ) {\n this.#messages = {\n ...this.#messages,\n ...this.fixPlaceHoldersInObject(messages),\n };\n\n this.#errors = {\n ...this.#errors,\n ...this.fixPlaceHoldersInObject(errors),\n };\n }\n}\n","interface LanguagesObject {\n attribute: { name: number; nativeName: number };\n rtl: Record<string, number>;\n lang: Record<string, string[]>;\n}\n\nexport const languages: LanguagesObject = {\n attribute: {\n name: 0,\n nativeName: 1,\n },\n rtl: {\n ar: 1,\n dv: 1,\n fa: 1,\n ha: 1,\n he: 1,\n ks: 1,\n ku: 1,\n ps: 1,\n ur: 1,\n yi: 1,\n },\n lang: {\n aa: [\"Afar\", \"Afar\"],\n ab: [\"Abkhazian\", \"Аҧсуа\"],\n af: [\"Afrikaans\", \"Afrikaans\"],\n ak: [\"Akan\", \"Akana\"],\n am: [\"Amharic\", \"አማርኛ\"],\n an: [\"Aragonese\", \"Aragonés\"],\n ar: [\"Arabic\", \"العربية\"],\n as: [\"Assamese\", \"অসমীয়া\"],\n av: [\"Avar\", \"Авар\"],\n ay: [\"Aymara\", \"Aymar\"],\n az: [\"Azerbaijani\", \"Azərbaycanca / آذربايجان\"],\n ba: [\"Bashkir\", \"Башҡорт\"],\n be: [\"Belarusian\", \"Беларуская\"],\n bg: [\"Bulgarian\", \"Български\"],\n bh: [\"Bihari\", \"भोजपुरी\"],\n bi: [\"Bislama\", \"Bislama\"],\n bm: [\"Bambara\", \"Bamanankan\"],\n bn: [\"Bengali\", \"বাংলা\"],\n bo: [\"Tibetan\", \"བོད་ཡིག / Bod skad\"],\n br: [\"Breton\", \"Brezhoneg\"],\n bs: [\"Bosnian\", \"Bosanski\"],\n ca: [\"Catalan\", \"Català\"],\n ce: [\"Chechen\", \"Нохчийн\"],\n ch: [\"Chamorro\", \"Chamoru\"],\n co: [\"Corsican\", \"Corsu\"],\n cr: [\"Cree\", \"Nehiyaw\"],\n cs: [\"Czech\", \"Česky\"],\n cu: [\"Old Church Slavonic / Old Bulgarian\", \"словѣньскъ / slověnĭskŭ\"],\n cv: [\"Chuvash\", \"Чăваш\"],\n cy: [\"Welsh\", \"Cymraeg\"],\n da: [\"Danish\", \"Dansk\"],\n de: [\"German\", \"Deutsch\"],\n dv: [\"Divehi\", \"ދިވެހިބަސް\"],\n dz: [\"Dzongkha\", \"ཇོང་ཁ\"],\n ee: [\"Ewe\", \"Ɛʋɛ\"],\n el: [\"Greek\", \"Ελληνικά\"],\n en: [\"English\", \"English\"],\n eo: [\"Esperanto\", \"Esperanto\"],\n es: [\"Spanish\", \"Español\"],\n et: [\"Estonian\", \"Eesti\"],\n eu: [\"Basque\", \"Euskara\"],\n fa: [\"Persian\", \"فارسی\"],\n ff: [\"Peul\", \"Fulfulde\"],\n fi: [\"Finnish\", \"Suomi\"],\n fj: [\"Fijian\", \"Na Vosa Vakaviti\"],\n fo: [\"Faroese\", \"Føroyskt\"],\n fr: [\"French\", \"Français\"],\n fy: [\"West Frisian\", \"Frysk\"],\n ga: [\"Irish\", \"Gaeilge\"],\n gd: [\"Scottish Gaelic\", \"Gàidhlig\"],\n gl: [\"Galician\", \"Galego\"],\n gn: [\"Guarani\", \"Avañe'ẽ\"],\n gu: [\"Gujarati\", \"ગુજરાતી\"],\n gv: [\"Manx\", \"Gaelg\"],\n ha: [\"Hausa\", \"هَوُسَ\"],\n he: [\"Hebrew\", \"עברית\"],\n hi: [\"Hindi\", \"हिन्दी\"],\n ho: [\"Hiri Motu\", \"Hiri Motu\"],\n hr: [\"Croatian\", \"Hrvatski\"],\n ht: [\"Haitian\", \"Krèyol ayisyen\"],\n hu: [\"Hungarian\", \"Magyar\"],\n hy: [\"Armenian\", \"Հայերեն\"],\n hz: [\"Herero\", \"Otsiherero\"],\n ia: [\"Interlingua\", \"Interlingua\"],\n id: [\"Indonesian\", \"Bahasa Indonesia\"],\n ie: [\"Interlingue\", \"Interlingue\"],\n ig: [\"Igbo\", \"Igbo\"],\n ii: [\"Sichuan Yi\", \"ꆇꉙ / 四川彝语\"],\n ik: [\"Inupiak\", \"Iñupiak\"],\n io: [\"Ido\", \"Ido\"],\n is: [\"Icelandic\", \"Íslenska\"],\n it: [\"Italian\", \"Italiano\"],\n iu: [\"Inuktitut\", \"ᐃᓄᒃᑎᑐᑦ\"],\n ja: [\"Japanese\", \"日本語\"],\n jv: [\"Javanese\", \"Basa Jawa\"],\n ka: [\"Georgian\", \"ქართული\"],\n kg: [\"Kongo\", \"KiKongo\"],\n ki: [\"Kikuyu\", \"Gĩkũyũ\"],\n kj: [\"Kuanyama\", \"Kuanyama\"],\n kk: [\"Kazakh\", \"Қазақша\"],\n kl: [\"Greenlandic\", \"Kalaallisut\"],\n km: [\"Cambodian\", \"ភាសាខ្មែរ\"],\n kn: [\"Kannada\", \"ಕನ್ನಡ\"],\n ko: [\"Korean\", \"한국어\"],\n kr: [\"Kanuri\", \"Kanuri\"],\n ks: [\"Kashmiri\", \"कश्मीरी / كشميري\"],\n ku: [\"Kurdish\", \"Kurdî / كوردی\"],\n kv: [\"Komi\", \"Коми\"],\n kw: [\"Cornish\", \"Kernewek\"],\n ky: [\"Kirghiz\", \"Kırgızca / Кыргызча\"],\n la: [\"Latin\", \"Latina\"],\n lb: [\"Luxembourgish\", \"Lëtzebuergesch\"],\n lg: [\"Ganda\", \"Luganda\"],\n li: [\"Limburgian\", \"Limburgs\"],\n ln: [\"Lingala\", \"Lingála\"],\n lo: [\"Laotian\", \"ລາວ / Pha xa lao\"],\n lt: [\"Lithuanian\", \"Lietuvių\"],\n lv: [\"Latvian\", \"Latviešu\"],\n mg: [\"Malagasy\", \"Malagasy\"],\n mh: [\"Marshallese\", \"Kajin Majel / Ebon\"],\n mi: [\"Maori\", \"Māori\"],\n mk: [\"Macedonian\", \"Македонски\"],\n ml: [\"Malayalam\", \"മലയാളം\"],\n mn: [\"Mongolian\", \"Монгол\"],\n mo: [\"Moldovan\", \"Moldovenească\"],\n mr: [\"Marathi\", \"मराठी\"],\n ms: [\"Malay\", \"Bahasa Melayu\"],\n mt: [\"Maltese\", \"bil-Malti\"],\n my: [\"Burmese\", \"Myanmasa\"],\n na: [\"Nauruan\", \"Dorerin Naoero\"],\n nd: [\"North Ndebele\", \"Sindebele\"],\n ne: [\"Nepali\", \"नेपाली\"],\n ng: [\"Ndonga\", \"Oshiwambo\"],\n nl: [\"Dutch\", \"Nederlands\"],\n nn: [\"Norwegian Nynorsk\", \"Norsk (nynorsk)\"],\n no: [\"Norwegian\", \"Norsk (bokmål / riksmål)\"],\n nr: [\"South Ndebele\", \"isiNdebele\"],\n nv: [\"Navajo\", \"Diné bizaad\"],\n ny: [\"Chichewa\", \"Chi-Chewa\"],\n oc: [\"Occitan\", \"Occitan\"],\n oj: [\"Ojibwa\", \"ᐊᓂᔑᓈᐯᒧᐎᓐ / Anishinaabemowin\"],\n om: [\"Oromo\", \"Oromoo\"],\n or: [\"Oriya\", \"ଓଡ଼ିଆ\"],\n os: [\"Ossetian / Ossetic\", \"Иронау\"],\n pa: [\"Panjabi / Punjabi\", \"ਪੰਜਾਬੀ / पंजाबी / پنجابي\"],\n pi: [\"Pali\", \"Pāli / पाऴि\"],\n pl: [\"Polish\", \"Polski\"],\n ps: [\"Pashto\", \"پښتو\"],\n pt: [\"Portuguese\", \"Português\"],\n qu: [\"Quechua\", \"Runa Simi\"],\n rm: [\"Raeto Romance\", \"Rumantsch\"],\n rn: [\"Kirundi\", \"Kirundi\"],\n ro: [\"Romanian\", \"Română\"],\n ru: [\"Russian\", \"Русский\"],\n rw: [\"Rwandi\", \"Kinyarwandi\"],\n sa: [\"Sanskrit\", \"संस्कृतम्\"],\n sc: [\"Sardinian\", \"Sardu\"],\n sd: [\"Sindhi\", \"सिनधि\"],\n se: [\"Northern Sami\", \"Sámegiella\"],\n sg: [\"Sango\", \"Sängö\"],\n sh: [\"Serbo-Croatian\", \"Srpskohrvatski / Српскохрватски\"],\n si: [\"Sinhalese\", \"සිංහල\"],\n sk: [\"Slovak\", \"Slovenčina\"],\n sl: [\"Slovenian\", \"Slovenščina\"],\n sm: [\"Samoan\", \"Gagana Samoa\"],\n sn: [\"Shona\", \"chiShona\"],\n so: [\"Somalia\", \"Soomaaliga\"],\n sq: [\"Albanian\", \"Shqip\"],\n sr: [\"Serbian\", \"Српски\"],\n ss: [\"Swati\", \"SiSwati\"],\n st: [\"Southern Sotho\", \"Sesotho\"],\n su: [\"Sundanese\", \"Basa Sunda\"],\n sv: [\"Swedish\", \"Svenska\"],\n sw: [\"Swahili\", \"Kiswahili\"],\n ta: [\"Tamil\", \"தமிழ்\"],\n te: [\"Telugu\", \"తెలుగు\"],\n tg: [\"Tajik\", \"Тоҷикӣ\"],\n th: [\"Thai\", \"ไทย / Phasa Thai\"],\n ti: [\"Tigrinya\", \"ትግርኛ\"],\n tk: [\"Turkmen\", \"Туркмен / تركمن\"],\n tl: [\"Tagalog / Filipino\", \"Tagalog\"],\n tn: [\"Tswana\", \"Setswana\"],\n to: [\"Tonga\", \"Lea Faka-Tonga\"],\n tr: [\"Turkish\", \"Türkçe\"],\n ts: [\"Tsonga\", \"Xitsonga\"],\n tt: [\"Tatar\", \"Tatarça\"],\n tw: [\"Twi\", \"Twi\"],\n ty: [\"Tahitian\", \"Reo Mā`ohi\"],\n ug: [\"Uyghur\", \"Uyƣurqə / ئۇيغۇرچە\"],\n uk: [\"Ukrainian\", \"Українська\"],\n ur: [\"Urdu\", \"اردو\"],\n uz: [\"Uzbek\", \"Ўзбек\"],\n ve: [\"Venda\", \"Tshivenḓa\"],\n vi: [\"Vietnamese\", \"Tiếng Việt\"],\n vo: [\"Volapük\", \"Volapük\"],\n wa: [\"Walloon\", \"Walon\"],\n wo: [\"Wolof\", \"Wollof\"],\n xh: [\"Xhosa\", \"isiXhosa\"],\n yi: [\"Yiddish\", \"ייִדיש\"],\n yo: [\"Yoruba\", \"Yorùbá\"],\n za: [\"Zhuang\", \"Cuengh / Tôô / 壮语\"],\n zh: [\"Chinese\", \"中文\"],\n zu: [\"Zulu\", \"isiZulu\"],\n pap: [\"Papiamento\", \"Papiamento\"],\n },\n};\n","{\n \"Constraint.Attribute.IncorrectValue\": \"Incorrect value\",\n \"Constraint.Boolean.InvalidValue\": \"Invalid boolean value, only values 'true' or 'false' are valid\",\n \"Constraint.BSN.InvalidFormat\": \"Must be a valid BSN\",\n \"Constraint.Captcha.InvalidToken\": \"The captcha is invalid\",\n \"Constraint.Choice.ConflictingAnswer\": \"Cannot select '${answer-option-key}' because this is not a relevant option, given the other answers\",\n \"Constraint.Choice.ConflictingOptions\": \"Cannot select '${answer-option-key1}' and '${answer-option-key2}' at the same time\",\n \"Constraint.Choice.InvalidOption\": \"Allowed options are: ${options}\",\n \"Constraint.Choice.InvalidOption.General\": \"Value '${value}' is not allowed\",\n \"Constraint.Choice.MultipleNotAllowed\": \"Selecting multiple options is not allowed\",\n \"Constraint.ConfirmCurrentPassword.Invalid\": \"Must match the current password\",\n \"Constraint.Date.AboveMaximum\": \"Must be on or before ${max-date}\",\n \"Constraint.Date.BelowMinimum\": \"Must be on or after ${min-date}\",\n \"Constraint.Date.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.Date.NotOnDate\": \"Must be on ${date}\",\n \"Constraint.Date.OutOfRange\": \"Must be between ${min-date} and ${max-date}\",\n \"Constraint.DateRange.InvalidRange\": \"Start date must be before end date\",\n \"Constraint.DateRange.Mandatory\": \"Field is mandatory: must contain at least a start or end date\",\n \"Constraint.DateTime.AboveMaximum\": \"Must be before ${max-date-time}\",\n \"Constraint.DateTime.BelowMinimum\": \"Must be at ${min-date-time} or after\",\n \"Constraint.DateTime.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.DateTime.OutOfRange\": \"Must be between ${min-date-time} and ${max-date-time}\",\n \"Constraint.DateTimeRange.InvalidRange\": \"Start date-time must be before end date-time\",\n \"Constraint.DateTimeRange.Mandatory\": \"Field is mandatory: must contain at least a start or end date-time\",\n \"Constraint.Document.MimeTypeNotAllowed\": \"The document mime type is not valid for the selected document type\",\n \"Constraint.Email.InvalidFormat\": \"Must be a valid e-mail address\",\n \"Constraint.File.DataEmpty\": \"File does not exist or has no content\",\n \"Constraint.File.InvalidExtension\": \"Allowed extensions are: ${extensions}\",\n \"Constraint.File.InvalidFormat\": \"Must meet the requirements of the file name\",\n \"Constraint.File.InvalidMimeType\": \"Allowed mime types are: ${mime-types}\",\n \"Constraint.File.MaxFileSizeExceeded\": \"Maximum file upload size is ${max-filesize}\",\n \"Constraint.File.OnlyAllowsOneFile\": \"Only one file is allowed\",\n \"Constraint.IBAN.InvalidFormat\": \"Must be a valid IBAN number\",\n \"Constraint.InvalidLengthBetween\": \"Length must be between ${min-length} and ${max-length} characters\",\n \"Constraint.InvalidLengthExact\": \"Length must be precisely ${length} characters\",\n \"Constraint.InvalidLengthTooLong\": \"Length must not be larger than ${max-length} characters\",\n \"Constraint.InvalidLengthTooShort\": \"Length must be at least ${min-length} characters\",\n \"Constraint.InvalidRegularExpression\": \"The value is not according the given regular expression ${regexp}\",\n \"Constraint.Mandatory\": \"Field is mandatory\",\n \"Constraint.Missing\": \"Field is mandatory\",\n \"Constraint.Number.AboveMaximum\": \"Must be at most ${max-number}\",\n \"Constraint.Number.BelowMinimum\": \"Must be at least ${min-number}\",\n \"Constraint.Number.InvalidDecimal\": \"Must be a number with up to ${max-digits} decimal places\",\n \"Constraint.Number.InvalidInteger\": \"Must be a whole number\",\n \"Constraint.Number.InvalidLong\": \"Must be a whole number\",\n \"Constraint.Number.OutOfRange\": \"Must be between ${min-number} and ${max-number}\",\n \"Constraint.NumberRange.BothFieldsMandatory\": \"Must contain start and end value\",\n \"Constraint.NumberRange.InvalidRange\": \"Start value must be less than the end value\",\n \"Constraint.NumberRange.Mandatory\": \"Field is mandatory: must contain at least a start or end value\",\n \"Constraint.Password.AlreadyUsed\": \"Must not have been used before\",\n \"Constraint.Password.LowerAndUpperCaseMandatory\": \"Must contain both upper and lowercase characters\",\n \"Constraint.Password.MinNumericCharactersMandatory\": \"Must contain ${min-numeric} or more numerical characters\",\n \"Constraint.Password.MinSpecialCharactersMandatory\": \"Must contain ${min-special} or more special characters\",\n \"Constraint.Password.ThreeConsecutiveCharactersNotAllowed\": \"Must not contain any character more than twice consecutively\",\n \"Constraint.Password.Unchanged\": \"Must not be the same as the old password\",\n \"Constraint.Password.UserNameSubstringNotAllowed\": \"Must not have 5 consecutive characters from username\",\n \"Constraint.SortParameter.InvalidValue\": \"Invalid sort parameter. Allowed values: field+[asc|desc]\",\n \"Constraint.Time.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.TimeRange.InvalidRange\": \"Start time must be before end time\",\n \"Constraint.TimeRange.Mandatory\": \"Field is mandatory: must contain at least a start or end time\",\n \"Constraint.TimeStamp.AboveMaximum\": \"Must be on or before ${max-date}\",\n \"Constraint.TimeStamp.BelowMinimum\": \"Must be on or after ${min-date}\",\n \"Constraint.Timestamp.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.TimeStampRange.InvalidRange\": \"Start value must be before end value\",\n \"Constraint.TimeStampRange.Mandatory\": \"Field is mandatory: must contain at least a start or end value\",\n \"Constraint.XML.InvalidFormat\": \"Must be well-formed XML\",\n \"Constraint.ZipCode.InvalidFormat\": \"Must be a valid Dutch ZIP code, e.g. 1234AB\",\n \"Error.AcceptHeaderRequired\": \"The 'Accept' request-header field must be provided\",\n \"Error.Authentication.BlockedUser\": \"You have been logged out, because your account has been blocked\",\n \"Error.Authentication.ConcurrentUser\": \"You have been logged out, since your username has been used at a different location.\",\n \"Error.Authentication.InvalidCredentials\": \"Authentication failed\",\n \"Error.Authentication.InvalidUsername\": \"You have been logged out, because your username is not valid anymore\",\n \"Error.Authentication.Required\": \"Authentication is required\",\n \"Error.Case.ConcurrentModification\": \"Another user has updated a case used in this task. As a result, this task can not be completed.\",\n \"Error.ChangePasswordRequired\": \"User password is initial or expired, and must be changed \",\n \"Error.CodemapLookup.InvalidToken\": \"Token for codemap lookup is not valid\",\n \"Error.DataStore.ConcurrentModification\": \"Another user has updated a record used in this task\",\n \"Error.DataStore.RecordAlreadyExists\": \"\",\n \"Error.DataStore.RowCannotBeLocked\": \"Another user has already locked a record used in this task\",\n \"Error.Form.DataNotAvailableForId\": \"Service can not be completed, data not available for mandatory element ${elementid}\",\n \"Error.Form.ObjectNotAllowed\": \"Object '${objectid}' is not allowed\",\n \"Error.Form.ReadOnlyElementId\": \"Element '${elementid}' is read only\",\n \"Error.Form.TooManyObjects\": \"Too many objects '${objectid}' provided\",\n \"Error.Form.UndefinedElementId\": \"Undefined element '${elementid}'\",\n \"Error.Form.UndefinedObject\": \"Undefined object(s) '${objectid}'\",\n \"Error.GeneralError\": \"An unexpected error occurred\",\n \"Error.MethodNotAllowed\": \"The given HTTP method is not allowed for this resource\",\n \"Error.Parameter.InvalidValue\": \"The parameter contains characters that are not allowed\",\n \"Error.Parameter.Mandatory\": \"Parameter ${parameter} is mandatory\",\n \"Error.Parameter.NotAllowed\": \"Parameter '${parameter}' is not allowed\",\n \"Error.ResourceNotFound\": \"The requested resource cannot be found\",\n \"Validation.StandardCreateAndUpdateUserTask.PasswordsDoNotMatch\": \"Password and password confirmation do not match.\",\n \"Validation.StandardCreateAndUpdateUserTask.UserEmailAlreadyExists\": \"A user with email address '${Email}' already exists\",\n \"Validation.StandardCreateAndUpdateUserTask.UserNameAlreadyExists\": \"A user with username '${Username}' already exists\",\n \"Validation.StandardCreateOrganizationTask.OrganizationAlreadyExists\": \"An organization with id '${ID}' already exists\"\n}\n","{\n \"Constraint.Attribute.IncorrectValue\": \"Ongeldige waarde\",\n \"Constraint.Boolean.InvalidValue\": \"Waarde voldoet niet aan het boolean formaat, alleen waarden 'true' en 'false' zijn toegestaan\",\n \"Constraint.BSN.InvalidFormat\": \"Moet een geldig BSN zijn\",\n \"Constraint.Captcha.InvalidToken\": \"Captcha is niet correct\",\n \"Constraint.Choice.ConflictingAnswer\": \"'${answer-option-key}' kan niet worden gekozen omdat dit geen relevante optie is, gegeven de andere antwoorden\",\n \"Constraint.Choice.ConflictingOptions\": \"'${answer-option-key1}' and '${answer-option-key2}' kunnen niet tegelijkertijd worden gekozen\",\n \"Constraint.Choice.InvalidOption\": \"Toegestane waarden zijn: ${options}\",\n \"Constraint.Choice.InvalidOption.General\": \"Waarde '${value}' is niet toegestaan\",\n \"Constraint.Choice.MultipleNotAllowed\": \"Meerdere opties selecteren is niet toegestaan\",\n \"Constraint.ConfirmCurrentPassword.Invalid\": \"Moet overeenkomen met het huidige wachtwoord\",\n \"Constraint.Date.AboveMaximum\": \"Moet op of voor ${max-date} liggen\",\n \"Constraint.Date.BelowMinimum\": \"Moet op of na ${min-date} liggen\",\n \"Constraint.Date.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.Date.NotOnDate\": \"Moet op ${date} liggen\",\n \"Constraint.Date.OutOfRange\": \"Moet tussen ${min-date} en ${max-date} liggen\",\n \"Constraint.DateRange.InvalidRange\": \"De begindatum dient voor de einddatum te liggen\",\n \"Constraint.DateRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of einddatum bevatten\",\n \"Constraint.DateTime.AboveMaximum\": \"Moet voor ${max-date-time} liggen\",\n \"Constraint.DateTime.BelowMinimum\": \"Moet op ${min-date-time} of later liggen\",\n \"Constraint.DateTime.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.DateTime.OutOfRange\": \"Moet tussen ${min-date-time} en ${max-date-time} liggen\",\n \"Constraint.DateTimeRange.InvalidRange\": \"De begindatumtijd dient voor de einddatumtijd te liggen\",\n \"Constraint.DateTimeRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of einddatumtijd bevatten\",\n \"Constraint.Document.MimeTypeNotAllowed\": \"Het document mime type voldoet niet aan het document type\",\n \"Constraint.Email.InvalidFormat\": \"Moet een geldig emailadres zijn\",\n \"Constraint.File.DataEmpty\": \"Bestand bestaat niet of heeft geen inhoud\",\n \"Constraint.File.InvalidExtension\": \"Toegestane extensies zijn: ${extensions}\",\n \"Constraint.File.InvalidFormat\": \"Voldoet niet aan de voorwaarden van een bestandsnaam\",\n \"Constraint.File.InvalidMimeType\": \"Toegestane mime-types zijn: ${mime-types}\",\n \"Constraint.File.MaxFileSizeExceeded\": \"De maximum file grootte voor upload is ${max-filesize}\",\n \"Constraint.File.OnlyAllowsOneFile\": \"Er is slechts één bestand toegestaan\",\n \"Constraint.IBAN.InvalidFormat\": \"Moet een geldig IBAN nummer zijn\",\n \"Constraint.InvalidLengthBetween\": \"Lengte moet tussen ${min-length} en ${max-length} karakters liggen\",\n \"Constraint.InvalidLengthExact\": \"Lengte moet precies ${length} karakters zijn\",\n \"Constraint.InvalidLengthTooLong\": \"Lengte mag niet langer dan ${max-length} karakters zijn\",\n \"Constraint.InvalidLengthTooShort\": \"Lengte moet tenminste ${min-length} karakters zijn\",\n \"Constraint.InvalidRegularExpression\": \"De waarde voldoet niet aan de reguliere expressie ${regexp}\",\n \"Constraint.Mandatory\": \"Veld is verplicht\",\n \"Constraint.Missing\": \"Veld is verplicht\",\n \"Constraint.Number.AboveMaximum\": \"Mag niet groter dan ${max-number} zijn\",\n \"Constraint.Number.BelowMinimum\": \"Moet minstens ${min-number} zijn\",\n \"Constraint.Number.InvalidDecimal\": \"Moet een getal zijn met maximaal ${max-digits} decimalen\",\n \"Constraint.Number.InvalidInteger\": \"Moet een geheel getal zijn\",\n \"Constraint.Number.InvalidLong\": \"Moet een geheel getal zijn\",\n \"Constraint.Number.OutOfRange\": \"Moet tussen ${min-number} en ${max-number} liggen\",\n \"Constraint.NumberRange.BothFieldsMandatory\": \"Moet zowel een begin- als een eindwaarde bevatten\",\n \"Constraint.NumberRange.InvalidRange\": \"De beginwaarde dient kleiner te zijn dan de eindwaarde\",\n \"Constraint.NumberRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindwaarde bevatten\",\n \"Constraint.Password.AlreadyUsed\": \"Mag niet eerder zijn gebruikt\",\n \"Constraint.Password.LowerAndUpperCaseMandatory\": \"Moet zowel hoofdletters als kleine letters bevatten\",\n \"Constraint.Password.MinNumericCharactersMandatory\": \"Moet ${min-numeric} of meer numerieke karakters bevatten\",\n \"Constraint.Password.MinSpecialCharactersMandatory\": \"Moet ${min-special} of meer speciale karakters bevatten\",\n \"Constraint.Password.ThreeConsecutiveCharactersNotAllowed\": \"Mag niet meer dan twee dezelfde karakters achter elkaar bevatten\",\n \"Constraint.Password.Unchanged\": \"Mag niet hetzelfde zijn als het oude wachtwoord\",\n \"Constraint.Password.UserNameSubstringNotAllowed\": \"Mag niet vijf opeenvolgende karakters van de gebruikersnaam bevatten\",\n \"Constraint.SortParameter.InvalidValue\": \"Ongeldige sorteerparameter. Toegestane waardes: veld+[asc|desc]\",\n \"Constraint.Time.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.TimeRange.InvalidRange\": \"De begintijd dient voor de eindtijd te liggen\",\n \"Constraint.TimeRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindtijd bevatten\",\n \"Constraint.TimeStamp.AboveMaximum\": \"Moet op of voor ${max-date} liggen\",\n \"Constraint.TimeStamp.BelowMinimum\": \"Moet op of na ${min-date} liggen\",\n \"Constraint.Timestamp.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.TimeStampRange.InvalidRange\": \"De beginwaarde dient voor de eindwaarde te liggen\",\n \"Constraint.TimeStampRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindwaarde bevatten\",\n \"Constraint.XML.InvalidFormat\": \"Moet geldige XML zijn\",\n \"Constraint.ZipCode.InvalidFormat\": \"Moet een geldige postcode zijn, bijvoorbeeld 1234AB\",\n \"Error.AcceptHeaderRequired\": \"De 'Accept' request-header moet worden meegegeven\",\n \"Error.Authentication.BlockedUser\": \"U bent uitgelogd omdat uw account geblokkeerd is\",\n \"Error.Authentication.ConcurrentUser\": \"U bent uitgelogd omdat uw gebruikersnaam op een andere locatie is gebruikt om in te loggen.\",\n \"Error.Authentication.InvalidCredentials\": \"Inloggen is mislukt\",\n \"Error.Authentication.InvalidUsername\": \"U bent uitgelogd omdat uw gebruikersnaam niet meer geldig is\",\n \"Error.Authentication.Required\": \"Autorisatie is vereist\",\n \"Error.Case.ConcurrentModification\": \"Een andere gebruiker heeft het dossier aangepast waardoor deze taak nu niet meer is toegestaan\",\n \"Error.ChangePasswordRequired\": \"Gebruikerswachtwoord is initieel of verlopen, en moet worden aangepast\",\n \"Error.CodemapLookup.InvalidToken\": \"Token voor keuzelijst lookup is niet valide\",\n \"Error.DataStore.ConcurrentModification\": \"Een andere gebruiker heeft de rij in de datastore reeds aangepast\",\n \"Error.DataStore.RecordAlreadyExists\": \"\",\n \"Error.DataStore.RowCannotBeLocked\": \"Een andere gebruiker heeft de rij in bewerking en daarom kan deze taak niet worden volbracht.\",\n \"Error.Form.DataNotAvailableForId\": \"Service kan niet worden afgrond, data voor verplicht element ${elementid} is niet beschikbaar\",\n \"Error.Form.ObjectNotAllowed\": \"Object '${objectid}' is niet toegestaan\",\n \"Error.Form.ReadOnlyElementId\": \"Element '${elementid}' is alleen lezen\",\n \"Error.Form.TooManyObjects\": \"Te veel objecten '${objectid}' aangeleverd\",\n \"Error.Form.UndefinedElementId\": \"Element '${elementid}' is ongedefinieerd\",\n \"Error.Form.UndefinedObject\": \"Object(en) '${objectid}' ongedefinieerd\",\n \"Error.GeneralError\": \"Er is een onverwachte fout opgetreden\",\n \"Error.MethodNotAllowed\": \"De opgegeven HTTP methode is niet toegestaan op deze resource\",\n \"Error.Parameter.InvalidValue\": \"De parameter bevat karakters die niet zijn toegestaan\",\n \"Error.Parameter.Mandatory\": \"De parameter ${parameter} is verplicht\",\n \"Error.Parameter.NotAllowed\": \"Parameter '${parameter}' is niet toegestaan\",\n \"Error.ResourceNotFound\": \"De opgevraagde resource kan niet worden gevonden\",\n \"Validation.StandardCreateAndUpdateUserTask.PasswordsDoNotMatch\": \"Het wachtwoord en de wachtwoordbevestiging komen niet overeen\",\n \"Validation.StandardCreateAndUpdateUserTask.UserEmailAlreadyExists\": \"Een gebruiker met e-mailadres '${Email}' bestaat al\",\n \"Validation.StandardCreateAndUpdateUserTask.UserNameAlreadyExists\": \"Een gebruiker met gebruikersnaam '${Username}' bestaat al\",\n \"Validation.StandardCreateOrganizationTask.OrganizationAlreadyExists\": \"Een organisatie met id '${ID}' bestaat al\"\n}\n","import { useEffect, useState } from \"react\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useLocale } from \"../hooks/useI18n\";\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\n\nimport type {\n ContentModel,\n Href,\n SourceReferenceCollection,\n} from \"@beinformed/ui/models\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean,\n): ContentModel[] => {\n const [content, setContent] = useState<ContentModel[]>([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link?.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href?.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href: Href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n }, [allHrefs, localeCode, renderChildSections, start, finish]);\n\n return content;\n};\n","// @flow\nimport { useCallback } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"../redux/progressindicator/progressIndicatorActions\";\n\nexport const useProgressIndicator = () => {\n const dispatch = useBEIDispatch();\n\n const start = useCallback(() => {\n dispatch(startProgress());\n }, [dispatch]);\n const finish = useCallback(() => {\n dispatch(finishProgress());\n }, [dispatch]);\n const reset = useCallback(() => {\n dispatch(resetProgress());\n }, [dispatch]);\n const update = useCallback(\n (percentComplete: number) => {\n dispatch(updateProgress(percentComplete));\n },\n [dispatch],\n );\n\n return { start, finish, reset, update };\n};\n\n/**\n */\nexport const useProgressIndicatorState = () =>\n useBEISelector((state) => state.progressindicator);\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, Href } from \"@beinformed/ui/models\";\nimport { getSetting } from \"@beinformed/ui/settings\";\n\nimport { updateFormAttribute } from \"../redux/form/attributeActions\";\nimport { cancelForm, previousObject } from \"../redux/form/formActions\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../redux/form/formAttributesetRepeatable\";\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\nimport { showFormNotification } from \"../redux/notifications/notificationActions\";\n\nimport { useModularUI } from \"./useModularUI\";\n\nimport type {\n AttributeModel,\n FormObjectModel,\n ModularUIModel,\n} from \"@beinformed/ui/models\";\n\nexport interface UpdateFormOptions {\n autosubmit: boolean;\n autosave: boolean;\n autoupdate: boolean;\n forceUpdate?: boolean;\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean;\n}\n\n/**\n * Load a form by href\n */\nexport const useForm = (\n href: string | Href,\n data?: Record<string, unknown>,\n) => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n data: data ? JSON.stringify(data) : undefined,\n origin: formHref.origin,\n contextPath: formHref.contextPath,\n });\n\n if (form?.model instanceof FormModel) {\n return form.model;\n }\n\n return;\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = () => {\n const dispatch = useBEIDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel: ModularUIModel): ModularUIModel => {\n if (newModel instanceof FormModel) {\n return produce(newModel, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n targetModel: FormModel,\n },\n }),\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey || \"\"));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Hook that returns a function to update attributes of a form object.\n * <br >\n * The returned function accepts the following options:\n *\n * - autosubmit: Automatically submit the form after a change\n * - autosav: Automatically save the form (in the background) after a change\n * - autoupdate: Automatically update the current form object after a change\n * - forceUpdate: Force the update even if conditions are not met.\n * - validate: Activate/deactivate the form object validation by an update.\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const dispatch = useBEIDispatch();\n\n return (\n attribute: AttributeModel,\n inputvalue: string,\n options?: UpdateFormOptions,\n ) =>\n dispatch(\n updateFormAttribute({ form, formObject, attribute, inputvalue, options }),\n );\n};\n\n/**\n * Repeatable attributeset actions\n */\nexport const useRepeatableAttributeSet = (form: FormModel) => {\n const dispatch = useBEIDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\n\nimport { getBooleanSetting } from \"@beinformed/ui/settings\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport { autosaveFormObject } from \"./autosaveActions\";\nimport { autosubmitFormObject } from \"./autosubmitActions\";\nimport { autoupdateFormObject } from \"./autoupdateActions\";\nimport { validateFormObject } from \"./validateActions\";\n\nimport type {\n AttributeModel,\n FormModel,\n FormObjectModel,\n} from \"@beinformed/ui/models\";\nimport type { UpdateFormOptions } from \"../../hooks/useForm\";\nimport type { BEIDispatch } from \"../store\";\n\nexport const updateFormAttribute = createAsyncThunk<\n void,\n {\n form: FormModel;\n formObject: FormObjectModel;\n attribute: AttributeModel;\n inputvalue: string;\n options?: UpdateFormOptions;\n },\n { dispatch: BEIDispatch }\n>(\n \"form/attribute\",\n async (\n {\n form,\n formObject,\n attribute,\n inputvalue,\n options = {\n autosubmit: false,\n autosave: false, // autosave commits the form in the background\n autoupdate: false, // autoupdate does not commit and updates the form with for example a new dynamicschema (work-around for form-tree iq)\n forceUpdate: false,\n validate: true,\n },\n },\n { dispatch },\n ) => {\n if (options.validate === undefined) {\n options.validate = true;\n }\n\n const newForm = produce(form, (draft) => {\n if (draft.currentFormObject?.equals(formObject)) {\n draft.currentFormObject.updateAttribute(attribute, inputvalue);\n } else {\n draft.completedFormObjects.forEach((completeObject) => {\n if (completeObject.equals(formObject)) {\n completeObject.updateAttribute(attribute, inputvalue);\n }\n });\n }\n });\n\n if (options.autosubmit && newForm.isValid) {\n const autosubmitAction = autosubmitFormObject(\n newForm,\n attribute,\n options.forceUpdate,\n );\n if (autosubmitAction) {\n dispatch(autosubmitAction);\n return;\n }\n }\n\n if (options.autoupdate && newForm.isValid) {\n const autoupdateAction = autoupdateFormObject(newForm, attribute);\n if (autoupdateAction) {\n dispatch(autoupdateAction);\n return;\n }\n }\n\n handleAutoSave(dispatch, newForm, options);\n\n handleValidate(dispatch, newForm, options);\n\n dispatch(updateForm(newForm));\n },\n);\n\nconst handleAutoSave = (\n dispatch: BEIDispatch,\n newForm: FormModel,\n options: UpdateFormOptions,\n) => {\n if (options.autosave && newForm.isValid && newForm.isChanged()) {\n dispatch(autosaveFormObject(newForm));\n }\n};\n\nconst handleValidate = (\n dispatch: BEIDispatch,\n newForm: FormModel,\n options: UpdateFormOptions,\n) => {\n if (\n options.validate &&\n newForm.currentFormObject?.hasDynamicValidations &&\n getBooleanSetting(\"USE_INSTANT_SERVER_VALIDATION\", false)\n ) {\n // server form validations happens async, don't wait for the form to return\n dispatch(validateFormObject(newForm));\n }\n};\n","import debounce from \"lodash/debounce\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { BEIDispatch } from \"../store\";\n\n/**\n * POSSIBLE AUTOSAVE STATUSSES\n * @type {{START: string, FINISHED: string}}\n */\nexport enum AUTOSAVE_STATUS {\n START,\n FINISHED,\n}\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateAutosave = (status: AUTOSAVE_STATUS, model: FormModel) => ({\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status,\n model,\n },\n});\n\n/**\n */\nconst autosave = (dispatch: BEIDispatch, form: FormModel) => {\n dispatch(updateAutosave(AUTOSAVE_STATUS.START, form));\n\n const formdata = form.getFormData(true, false);\n\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"true\"), {\n method: HTTP_METHODS.POST,\n data: formdata,\n childmodels: false,\n locale: form.locale,\n })\n .fetch()\n .then((savedForm) => {\n if (savedForm instanceof FormModel) {\n // update last server update to indicate an update has happened\n // send the existing form to prevent updates in the ui based on autosave results\n form.lastServerUpdate = savedForm.lastServerUpdate;\n\n dispatch(updateForm(form));\n dispatch(updateAutosave(AUTOSAVE_STATUS.FINISHED, savedForm));\n }\n });\n};\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedAutosave = debounce(\n (dispatch, form) => {\n autosave(dispatch, form);\n },\n getNumberSetting(\"VALIDATE_DEBOUNCE_TIMEOUT\", 500),\n);\n\nexport const autosaveFormObject =\n (form: FormModel) => (dispatch: BEIDispatch) =>\n debouncedAutosave(dispatch, form);\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\n\nimport type { AttributeModel } from \"@beinformed/ui/models\";\n\nexport const autosubmitFormObject = (\n form: FormModel,\n attribute: AttributeModel,\n forceUpdate = false,\n) => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged() || forceUpdate) {\n return fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel) => {\n if (newModel instanceof FormModel) {\n return produce(form, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n },\n });\n }\n\n return null;\n};\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\n\nimport type { AttributeModel } from \"@beinformed/ui/models\";\n\nexport const autoupdateFormObject = (\n form: FormModel,\n attribute: AttributeModel,\n) => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged()) {\n return fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref.setParameter(\"commit\", \"false\"),\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel) => {\n if (newModel instanceof FormModel) {\n return produce(form, (draft) => {\n draft.updateCurrentFormObject(newModel);\n });\n }\n return newModel;\n },\n },\n });\n }\n\n return null;\n};\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\nimport debounce from \"lodash/debounce\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateValidations = createAsyncThunk<\n void,\n { form: FormModel; formWithValidations: FormModel },\n { dispatch: BEIDispatch; state: RootState }\n>(\"\", ({ form, formWithValidations }, { dispatch, getState }) => {\n if (form.connectKey) {\n const currentFormEntry = getState().modularui[form.connectKey];\n\n if (currentFormEntry) {\n const currentForm = currentFormEntry.model;\n if (currentForm instanceof FormModel) {\n const validatedForm = produce(currentForm, (draft) => {\n draft.updateValidations(formWithValidations.data);\n });\n dispatch(updateForm(validatedForm));\n }\n }\n }\n});\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedValidateFormObject = debounce<\n (dispatch: BEIDispatch, form: FormModel) => void\n>(\n (dispatch, form: FormModel) => {\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"false\"), {\n method: HTTP_METHODS.POST,\n data: form.validationData,\n childmodels: false,\n isValidationRequest: true,\n locale: form.locale,\n })\n .fetch()\n .then((formWithValidations) => {\n if (formWithValidations instanceof FormModel) {\n dispatch(updateValidations({ form, formWithValidations }));\n }\n });\n },\n getNumberSetting(\"VALIDATE_DEBOUNCE_TIMEOUT\", 500),\n {\n leading: true,\n trailing: true,\n },\n);\n\nexport const validateFormObject =\n (form: FormModel) => (dispatch: BEIDispatch) =>\n debouncedValidateFormObject(dispatch, form);\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\n\nimport { Authenticate } from \"@beinformed/ui/modularui\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { logoutSuccess } from \"../auth/authReducer\";\nimport { updateForm } from \"../modularui/modelActions\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\nimport { goBack } from \"../router/routerActions\";\n\nimport type { FormModel } from \"@beinformed/ui/models\";\nimport type { PayloadAction } from \"@reduxjs/toolkit\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const previousObject = (form: FormModel) => {\n const newForm = produce(form, (draft) => {\n draft.setPreviousObject();\n });\n\n return updateForm(newForm);\n};\n\nexport const cancelForm = createAsyncThunk<\n PayloadAction<undefined, string>,\n FormModel,\n { dispatch: BEIDispatch; state: RootState }\n>(\"form/cancel\", async (form, { dispatch, getState }) => {\n if (form.key === \"ChangePassword\" && getState().auth.mustChangePassword) {\n dispatch(startProgress());\n\n await new Authenticate().logout();\n\n dispatch(logoutSuccess());\n dispatch(reloadApplication());\n dispatch(finishProgress());\n }\n\n return goBack();\n});\n","import { produce } from \"immer\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { FormModel, FormObjectModel } from \"@beinformed/ui/models\";\n\nexport const addRepeatableAttributeSet = (form: FormModel) => {\n const newForm = produce(form, (draft) => {\n draft.addEmptyFormObject();\n });\n return updateForm(newForm);\n};\n\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const newForm = produce(form, (draft) => {\n draft.addEmptyFormObject();\n draft.removeFormObject(formObject);\n });\n return updateForm(newForm);\n};\n\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const newForm = produce(form, (draft) => {\n draft.removeFormObject(formObject);\n });\n return updateForm(newForm);\n};\n","import { useCallback, useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport {\n AssignmentFilterModel,\n CaseSearchModel,\n DetailModel,\n FilterModel,\n ListDetailModel,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useNavigation } from \"./useRouter\";\n\nimport type {\n AttributeModel,\n FilterCollection,\n Href,\n IFilter,\n} from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\ninterface ListNavigationOptions {\n syncLocation?: boolean;\n historyAction?: \"push\" | \"replace\";\n}\n\nexport const useList = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n ...options,\n });\n\nexport const useListOrDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic<ListModel | DetailModel>(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, DetailModel],\n ...options,\n });\n\nexport const useListDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n ...options,\n });\n\nexport const useListNavigation = ({\n syncLocation = true,\n historyAction = \"push\",\n}: ListNavigationOptions = {}) => {\n const { push, replace } = useNavigation();\n const dispatch = useBEIDispatch();\n\n const navigate = historyAction === \"push\" ? push : replace;\n\n const update = useCallback(\n (list: ListModel, resetPage = false) => {\n const listHref = list.selfhref;\n if (resetPage) {\n listHref.page = undefined;\n }\n\n if (list.requestMethod === HTTP_METHODS.POST) {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n state: { formdata: list.formdata },\n });\n }\n\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.POST,\n data: list.formdata,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n } else {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n });\n }\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.GET,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n }\n },\n [dispatch, navigate, syncLocation],\n );\n\n const updateFilters = useCallback(\n (list: ListModel, filters: FilterCollection | IFilter[]) => {\n list.filterCollection = filters;\n update(list, true);\n },\n [update],\n );\n\n const updateFilter = useCallback(\n (\n list: ListModel,\n filter: IFilter,\n value: string,\n attribute?: AttributeModel,\n ) => {\n if (filter instanceof AssignmentFilterModel && !attribute) {\n throw new TypeError(\n \"AssignmentFilterModel needs the attribute argument to be able to update the filter\",\n );\n }\n\n let filterToUpdate = null;\n let targetAttr = attribute;\n\n if (attribute) {\n filterToUpdate = list.filterCollection.getFilterByAttributeKey(\n attribute.key,\n );\n } else if (filter instanceof FilterModel) {\n filterToUpdate = list.filterCollection.getFilterByName(filter.name);\n targetAttr = filter.attribute;\n }\n\n if (filterToUpdate && targetAttr) {\n filterToUpdate.update(targetAttr, value);\n } else {\n const searchKey = attribute\n ? `key: ${attribute.key}`\n : `name: ${filter.name}`;\n console.error(\n `Can't find a filter to update by ${searchKey} on list: ${list.selfhref.toString()}`,\n );\n }\n\n update(list, true);\n },\n [update],\n );\n\n const resetFilters = useCallback(\n (list: ListModel) => {\n list.filterCollection.reset();\n update(list, true);\n },\n [update],\n );\n\n const removeFilter = useCallback(\n (list: ListModel, filter: IFilter) => {\n if (filter.name) {\n list.filterCollection.getFilterByName(filter.name)?.reset();\n }\n update(list, true);\n },\n [update],\n );\n\n const updateSort = useCallback(\n (list: ListModel, sortOption: string) => {\n list.sorting.value = sortOption;\n update(list, true);\n },\n [update],\n );\n\n const updatePage = useCallback(\n (list: ListModel, page: number) => {\n list.paging.page = page;\n update(list);\n },\n [update],\n );\n\n const updatePageSize = useCallback(\n (list: ListModel, pagesize: number) => {\n list.paging.pagesize.value = pagesize;\n update(list, true);\n },\n [update],\n );\n\n return useMemo(\n () => ({\n update,\n updateFilters,\n updateFilter,\n updateSort,\n updatePage,\n updatePageSize,\n resetFilters,\n removeFilter,\n }),\n [\n removeFilter,\n resetFilters,\n update,\n updateFilter,\n updateFilters,\n updatePage,\n updatePageSize,\n updateSort,\n ],\n );\n};\n","import { useEffect, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href, LookupOptionsModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\nimport { useProgressIndicator } from \"./useProgressIndicator\";\n\nimport type { LinkModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\ninterface UseLookupHook {\n lookupOptions: LookupOptionsModel | null;\n lookupLoading: boolean;\n}\n\n/**\n * Lookup options call\n */\nexport const useLookup = (\n lookupLink: LinkModel,\n filterInput = \"\",\n minLength = 1,\n debounceMs = 300,\n): UseLookupHook => {\n const { start, finish } = useProgressIndicator();\n const modularuiRequest = useModularUIRequest();\n\n const [lookupOptions, setLookupOptions] = useState<LookupOptionsModel | null>(\n null,\n );\n const [lookupLoading, setLookupLoading] = useState(false);\n\n const { href, filterName, method } = lookupLink;\n\n if (filterInput.length < minLength || !filterName) {\n if (lookupOptions !== null) {\n setLookupOptions(null);\n }\n }\n\n useEffect(() => {\n if (filterInput.length < minLength || !filterName) {\n return;\n }\n\n const timeoutId = setTimeout(async () => {\n setLookupLoading(true);\n start();\n\n const lookupHref = new Href(href);\n const requestOptions: ModularUIRequestOptions = {\n method,\n data: undefined,\n };\n if (method === HTTP_METHODS.POST) {\n requestOptions.data = { [filterName]: filterInput };\n } else {\n lookupHref.addParameter(filterName, filterInput);\n }\n\n modularuiRequest(lookupHref, requestOptions)\n .fetch()\n .then((lookupResponse) => {\n if (lookupResponse instanceof LookupOptionsModel) {\n setLookupOptions(lookupResponse);\n }\n })\n .finally(() => {\n finish();\n setLookupLoading(false);\n });\n }, debounceMs);\n\n return () => {\n clearTimeout(timeoutId);\n };\n }, [\n debounceMs,\n filterInput,\n filterName,\n finish,\n href,\n method,\n minLength,\n modularuiRequest,\n start,\n ]);\n\n return { lookupOptions, lookupLoading };\n};\n","import { useCallback } from \"react\";\n\nimport { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { closeModal, showModal } from \"../redux/modals/modalsReducer\";\n\nimport type { RootState } from \"../redux/store\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null;\n size?: string | null;\n visible: boolean;\n show: () => void;\n close: () => void;\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\",\n );\n }\n\n const dispatch = useBEIDispatch();\n const modal = useBEISelector((state: RootState) =>\n state.modals.modals.find((m) => m.key === modalId),\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface ModalState {\n key: string;\n visible: boolean;\n size?: string;\n}\n\nexport interface ModalsState {\n modals: ModalState[];\n}\n\nexport const showModal = createAction(\"SHOW_MODAL\", (key: string) => {\n return {\n payload: key,\n };\n});\n\nexport const closeModal = createAction(\"CLOSE_MODAL\", (key: string) => {\n return {\n payload: key,\n };\n});\n\nconst initialState: ModalsState = {\n modals: [],\n};\n\nexport const modalsReducer = createReducer(initialState, (builder) => {\n builder\n .addCase(showModal, (state, action) => {\n const key = action.payload;\n\n // Hide all modals\n state.modals.forEach((modal) => {\n modal.visible = false;\n });\n\n // Find existing modal\n const existing = state.modals.find((modal) => modal.key === key);\n\n if (existing) {\n existing.visible = true;\n } else {\n state.modals.push({ key, visible: true });\n }\n })\n .addCase(closeModal, (state, action) => {\n const key = action.payload;\n\n // Remove the modal\n state.modals = state.modals.filter((modal) => modal.key !== key);\n\n // Show the last modal (if any)\n const last = state.modals[state.modals.length - 1];\n if (last) {\n last.visible = true;\n }\n });\n});\n","import {\n ConceptIndexModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentTypeModel,\n Href,\n ModelCatalogModel,\n} from \"@beinformed/ui/models\";\nimport { createHref, filterParameters } from \"@beinformed/ui/utils\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { getEntryDate } from \"../redux/modelcatalog/modelCatalogSelectors\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useLocation } from \"./useRouter\";\n\nimport type { ConceptDetailModel, ContentModel } from \"@beinformed/ui/models\";\nimport type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { UseModularUIBasicOptions } from \"./useModularUIBasic\";\n\nexport interface SearchFilter {\n index?: string;\n label?: string;\n type?: string | string[];\n modelCategory?: string | string[];\n entryDate?: string;\n}\n\nexport const useModelCatalog = (\n options?: UseModularUIBasicOptions<ModelCatalogModel>,\n) =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n ...options,\n });\n\nexport const useConceptIndex = (\n href: string | Href,\n key = \"conceptindex\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\n \"index\",\n \"label\",\n \"modelcategory\",\n \"type\",\n ]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nexport const useConceptDetail = (\n concept: string | Href,\n key = \"conceptdetail\",\n options?: UseModularUIBasicOptions<ConceptDetailModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, entryDate, location, []);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n ...options,\n });\n};\n\nexport const useContentIndex = (\n href: string | Href,\n key = \"contentindex\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n ...options,\n });\n};\n\nexport const useContentTOC = (\n content: string | Href,\n key = \"contenttoc\",\n options?: UseModularUIBasicOptions<ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n ...options,\n });\n};\n\nexport const useContent = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useCompleteSource = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel | ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const contentHref = new Href(content);\n contentHref.removeParameter(\"complete\");\n contentHref.addParameter(\"complete\", \"true\");\n\n const href = createHref(\"content\", contentHref, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useContentType = (\n contentType: string | Href,\n key = \"contenttypes\",\n options?: UseModularUIBasicOptions<ContentTypeModel>,\n) => {\n const href = createHref(\n \"contenttypes\",\n contentType,\n undefined,\n undefined,\n [],\n );\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n ...options,\n });\n};\n\nexport const useRelatedConcepts = (\n href: string | Href,\n key = \"relatedconcepts\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\"modelcategory\"]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nconst getSearchHref = (uri: string, filters: SearchFilter) => {\n const filterString = [];\n\n for (const key of Object.keys(filters)) {\n const filterValue = filters[key as keyof SearchFilter];\n if (filterValue) {\n let value: string = Array.isArray(filterValue)\n ? filterValue.join(\",\")\n : filterValue;\n if (key === \"type\") {\n value = value.replace(\"#\", \"%23\"); // handles un-encoded #\n }\n filterString.push(`${key}=${value}`);\n }\n }\n\n return filterString.length ? `${uri}?${filterString.join(\"&\")}` : uri;\n};\n\nexport const useConceptSearch = (\n filters: SearchFilter,\n key: string | \"conceptSearch\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const href = getSearchHref(\"/concepts\", filters);\n return useConceptIndex(href, key, options);\n};\n\nexport const useContentSearch = (\n filters: SearchFilter,\n key: string | \"contentSearch\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const href = getSearchHref(\"/content\", filters);\n return useContentIndex(href, key, options);\n};\n\n/**\n * Retrieve and update the entrydate for the modelcatalog\n */\nexport const useEntryDate = () => {\n const dispatch = useBEIDispatch();\n const entryDate = useBEISelector(getEntryDate);\n\n return {\n entryDate,\n setEntryDate: (entryDate: ISO_DATE) => dispatch(updateEntryDate(entryDate)),\n };\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport { Cache } from \"@beinformed/ui/utils\";\n\nexport interface ModelCatalogState {\n entryDate: string | undefined;\n}\n\nexport const updateEntryDate = createAction(\n \"UPDATE_ENTRYDATE\",\n (entryDate: string) => {\n return {\n payload: entryDate,\n };\n },\n);\n\nconst initialState: ModelCatalogState = {\n entryDate: new Date().toISOString().split(\"T\")[0],\n};\n\n/**\n * Keep track of the entry date for the modelcatalog\n */\nexport const modelCatalogReducer = createReducer<ModelCatalogState>(\n initialState,\n (builder) => {\n builder.addCase(updateEntryDate, (state, action) => {\n Cache.addItem(\"ModelCatalogEntryDate\", action.payload);\n\n state.entryDate = action.payload;\n });\n },\n);\n","import type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { RootState } from \"../store\";\n\n/**\n * Retrieve entrydate for the model catalog\n */\nexport const getEntryDate = (state: RootState): ISO_DATE => {\n if (state.modelcatalog?.entryDate) {\n return state.modelcatalog?.entryDate;\n }\n\n const isoDate = new Date().toISOString();\n return isoDate.split(\"T\")[0] || isoDate;\n};\n","import { ApplicationModel } from \"@beinformed/ui/models\";\n\nimport { getApplication } from \"../redux/application/applicationSelectors\";\nimport { useBEISelector } from \"../redux/hooks\";\nimport {\n allKeysByHref,\n getActiveModelByInstance,\n getActiveModels,\n getAllFinishedModels,\n getAllModelsByInstance,\n getFirstModelByInstance,\n keyByHref,\n modelByHref,\n} from \"../redux/shared/selectors\";\n\nimport type { Href, ResourceModel } from \"@beinformed/ui/models\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Returns all models in the store that are instances of the provided class\n * and match the current application locale.\n */\nexport const useAllModelsByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getAllModelsByInstance(state, instance),\n );\n};\n\n/**\n * Returns the first model found in the store that is an instance of the\n * provided class and matches the current locale.\n */\nexport const useFirstModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getFirstModelByInstance(state, instance),\n );\n};\n\n/**\n * Returns the model instance that is currently \"active\" based on the URL path.\n * It checks if the current router location starts with the model's selfhref path.\n */\nexport const useActiveModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getActiveModelByInstance(state, instance),\n );\n};\n\n/**\n * Retrieves a specific model from the store based on its unique Href.\n * @param {Href | string} href - The Href object or string path of the model.\n * @returns {ModularUIModel | null} The model matching the href or null.\n */\nexport const useModelByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => modelByHref(state, href));\n};\n\n/**\n * Returns the unique store key (identifier) for a model associated with a specific Href.\n * @param {Href | string} href - The Href object or string path.\n * @returns {string | null | void} The internal key of the model.\n */\nexport const useKeyByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => keyByHref(state, href));\n};\n\n/**\n * Returns all internal keys found in the store for a specific Href.\n * Useful if multiple versions/entries exist for the same path.\n * @param {Href | string} href - The Href object or string path.\n * @returns {Array<string>} An array of keys.\n */\nexport const useAllKeysByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => allKeysByHref(state, href));\n};\n\n/**\n * Returns a list of simplified model info (key, href, label, type) for all\n * models currently active in the navigation context (breadcrumbs).\n * @returns {Array<{key: string, href: Href, label: string, type: string}>}\n */\nexport const useActiveModels = () => {\n return useBEISelector(getActiveModels);\n};\n\n/**\n * Returns all models in the store that have a status of MODULARUI_STATUS.FINISHED.\n * @returns {Array<ModularUIModel>} An array of fully loaded models.\n */\nexport const useAllFinishedModels = () => {\n return useBEISelector(getAllFinishedModels);\n};\n\n/**\n * Returns the current active application, without retrying to request it.\n */\nexport const useCurrentApplication = () => {\n const application = useBEISelector(getApplication);\n if (application instanceof ApplicationModel) {\n return application;\n }\n return null;\n};\n","import { createSelector } from \"reselect\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { reloadModel } from \"../redux/modularui/reloadModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { RootState } from \"../redux/store\";\n\ntype ReloadCallback = (model: ModularUIModel | undefined) => boolean;\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: Record<string, unknown>) => void;\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => void;\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useBEIDispatch();\n\n const selectModularUI = (state: RootState) => state.modularui;\n const selector = createSelector([selectModularUI], (modularui) => {\n const models = [];\n const keys = Object.keys(modularui);\n for (const key of keys) {\n const model = modularui[key];\n if (model?.status === MODULARUI_STATUS.FINISHED) {\n models.push(model.model);\n }\n }\n return models;\n });\n\n const modularuiModels = useBEISelector(selector);\n\n return {\n reload: (model: ModularUIModel, options?: ModularUIRequestOptions) => {\n dispatch(reloadModel(model, options));\n },\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => {\n const modelsToReload = modularuiModels.filter(callbackFn);\n for (const modelToReload of modelsToReload) {\n if (modelToReload) {\n dispatch(reloadModel(modelToReload, options));\n }\n }\n },\n };\n};\n","import { fetchModel } from \"./fetchModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nexport const reloadModel = (\n model: ModularUIModel,\n options?: ModularUIRequestOptions,\n) =>\n fetchModel({\n key: model.connectKey || \"\",\n href: model.selfhref || \"\",\n options: {\n ...options,\n isReload: true,\n },\n });\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"../redux/notifications/notificationReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../i18n/types\";\nimport type { RootState } from \"../redux/store\";\n\nexport const useNotification = () => {\n const dispatch = useBEIDispatch();\n const { render, messageType, message, error } = useBEISelector(\n (state: RootState) => state.notification,\n );\n\n return {\n render,\n messageType,\n message,\n error,\n dismiss: () => {\n dispatch(dismissNotification());\n },\n };\n};\n\nexport const useErrorNotification = () => {\n const dispatch = useBEIDispatch();\n return (message: MessageObject, error?: ErrorResponse) => {\n return dispatch(\n showNotification({ type: NOTIFICATION_TYPES.ERROR, message, error }),\n );\n };\n};\n","import { useMemo, useState } from \"react\";\n\nimport { useLocation, useRouteMatch } from \"react-router\";\n\nimport {\n CaseSearchModel,\n DetailModel,\n GroupingPanelModel,\n Href,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { HookOptions } from \"./useModularUIBasic\";\n\nconst useUrl = (href?: string | Href, fromRoute = false): Href => {\n const [previousUrl, setPreviousUrl] = useState<Href | null>(null);\n const [previousExact, setPreviousExact] = useState(false);\n\n const match = useRouteMatch();\n const location = useLocation();\n\n const url = useMemo(() => {\n if (href == null && previousUrl == null) {\n return new Href(\"\");\n }\n\n const currentUrl = href instanceof Href ? href : new Href(href);\n\n if (!fromRoute) {\n return currentUrl;\n }\n\n if (match.isExact) {\n currentUrl.addParametersFromString(location.search);\n }\n\n return currentUrl;\n }, [href, previousUrl, fromRoute, match.isExact, location.search]);\n\n // Check equality to prevent unnecessary state updates\n const isUrlChanged = !url.equalsWithParameters(previousUrl);\n\n const shouldUpdate =\n isUrlChanged &&\n (match.isExact ||\n previousExact === match.isExact ||\n !previousUrl?.startsWith(match.url));\n\n if (shouldUpdate) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n }\n\n return shouldUpdate ? url : previousUrl || url;\n};\n\nexport const usePanel = (\n href?: string | Href,\n options?: HookOptions & {\n fromRoute?: boolean;\n },\n):\n | ListModel\n | GroupingPanelModel\n | DetailModel\n | CaseSearchModel\n | undefined => {\n const { fromRoute, ...hookOptions } = options || { fromRoute: false };\n\n const url = useUrl(href, fromRoute || false);\n\n return useModularUIBasic(\"panel\", url, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\", \"CaseSearch\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, GroupingPanelModel, DetailModel, CaseSearchModel],\n ...hookOptions,\n });\n};\n","import { useMemo } from \"react\";\n\nimport pick from \"lodash/pick\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\n\nimport type { RootState } from \"../redux/store\";\n\nconst getPreferences = (state: RootState) => state.preferences;\n\nconst makeSelectPreference = (preferenceNames: string | string[]) => {\n const names = Array.isArray(preferenceNames)\n ? preferenceNames\n : [preferenceNames];\n\n return createSelector([getPreferences], (preferences) =>\n pick(preferences, names),\n );\n};\n\nexport const usePreference = (preferenceNames: string | string[]) => {\n const selectPreference = useMemo(\n () => makeSelectPreference(preferenceNames),\n [preferenceNames],\n );\n\n return useBEISelector(selectPreference);\n};\n","import { CaseSearchModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\nexport const useQuicksearch = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n ...options,\n });\n\nexport const useSearch = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"search\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n ...options,\n });\n"],"mappings":"yoBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,GAAO,QAAUC,KCHjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAa,KAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,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YAAY,EAEhE,YAAa,CAAC,YAAW,qBAAoB,cAAa,iBAAe,EACzE,GAAGK,CACL,CAAC,CACH,EC/EA,IAAAE,GAAwB,iBAExBC,GAAiB,WACjBC,GAA+B,oBAM/B,IAAMC,GAAkBC,GAAqBA,EAAM,YAE7CC,GAAwBC,GAAuC,CACnE,IAAMC,EAAQ,MAAM,QAAQD,CAAe,EACvCA,EACA,CAACA,CAAe,EAEpB,SAAO,mBAAe,CAACH,EAAc,EAAIK,MACvC,GAAAC,SAAKD,EAAaD,CAAK,CACzB,CACF,EAEaG,GAAiBJ,GAAuC,CACnE,IAAMK,KAAmB,YACvB,IAAMN,GAAqBC,CAAe,EAC1C,CAACA,CAAe,CAClB,EAEA,OAAOM,EAAeD,CAAgB,CACxC,EC5BA,IAAAE,GAAgC,iCAOzB,IAAMC,GAAiB,CAACC,EAAqBC,IAClDC,EAAkB,cAAeF,EAAM,CACrC,eAAgB,CAAC,YAAY,EAC7B,YAAa,mBACb,GAAGC,CACL,CAAC,EAEUE,GAAY,CAACH,EAAqBC,IAC7CC,EAAkB,SAAUF,EAAM,CAChC,eAAgB,CAAC,YAAY,EAC7B,YAAa,mBACb,GAAGC,CACL,CAAC","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","require_now","__commonJSMin","exports","module","root","now","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","require_isArray","__commonJSMin","exports","module","isArray","require_isKey","__commonJSMin","exports","module","isArray","isSymbol","reIsDeepProp","reIsPlainProp","isKey","value","object","type","require_memoizeCapped","__commonJSMin","exports","module","memoize","MAX_MEMOIZE_SIZE","memoizeCapped","func","result","key","cache","require_stringToPath","__commonJSMin","exports","module","memoizeCapped","rePropName","reEscapeChar","stringToPath","string","result","match","number","quote","subString","require_arrayMap","__commonJSMin","exports","module","arrayMap","array","iteratee","index","length","result","require_baseToString","__commonJSMin","exports","module","Symbol","arrayMap","isArray","isSymbol","INFINITY","symbolProto","symbolToString","baseToString","value","result","require_toString","__commonJSMin","exports","module","baseToString","toString","value","require_castPath","__commonJSMin","exports","module","isArray","isKey","stringToPath","toString","castPath","value","object","require_toKey","__commonJSMin","exports","module","isSymbol","INFINITY","toKey","value","result","require_baseGet","__commonJSMin","exports","module","castPath","toKey","baseGet","object","path","index","length","require_defineProperty","__commonJSMin","exports","module","getNative","defineProperty","func","require_baseAssignValue","__commonJSMin","exports","module","defineProperty","baseAssignValue","object","key","value","require_assignValue","__commonJSMin","exports","module","baseAssignValue","eq","objectProto","hasOwnProperty","assignValue","object","key","value","objValue","require_isIndex","__commonJSMin","exports","module","MAX_SAFE_INTEGER","reIsUint","isIndex","value","length","type","require_baseSet","__commonJSMin","exports","module","assignValue","castPath","isIndex","isObject","toKey","baseSet","object","path","value","customizer","index","length","lastIndex","nested","key","newValue","objValue","require_basePickBy","__commonJSMin","exports","module","baseGet","baseSet","castPath","basePickBy","object","paths","predicate","index","length","result","path","value","require_baseHasIn","__commonJSMin","exports","module","baseHasIn","object","key","require_baseIsArguments","__commonJSMin","exports","module","baseGetTag","isObjectLike","argsTag","baseIsArguments","value","require_isArguments","__commonJSMin","exports","module","baseIsArguments","isObjectLike","objectProto","hasOwnProperty","propertyIsEnumerable","isArguments","value","require_isLength","__commonJSMin","exports","module","MAX_SAFE_INTEGER","isLength","value","require_hasPath","__commonJSMin","exports","module","castPath","isArguments","isArray","isIndex","isLength","toKey","hasPath","object","path","hasFunc","index","length","result","key","require_hasIn","__commonJSMin","exports","module","baseHasIn","hasPath","hasIn","object","path","require_basePick","__commonJSMin","exports","module","basePickBy","hasIn","basePick","object","paths","value","path","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","require_flatten","__commonJSMin","exports","module","baseFlatten","flatten","array","length","require_apply","__commonJSMin","exports","module","apply","func","thisArg","args","require_overRest","__commonJSMin","exports","module","apply","nativeMax","overRest","func","start","transform","args","index","length","array","otherArgs","require_constant","__commonJSMin","exports","module","constant","value","require_identity","__commonJSMin","exports","module","identity","value","require_baseSetToString","__commonJSMin","exports","module","constant","defineProperty","identity","baseSetToString","func","string","require_shortOut","__commonJSMin","exports","module","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","func","count","lastCalled","stamp","remaining","require_setToString","__commonJSMin","exports","module","baseSetToString","shortOut","setToString","require_flatRest","__commonJSMin","exports","module","flatten","overRest","setToString","flatRest","func","require_pick","__commonJSMin","exports","module","basePick","flatRest","pick","object","paths","hooks_exports","__export","useActiveModelByInstance","useActiveModels","useAllFinishedModels","useAllKeysByHref","useAllModelsByInstance","useApplication","useAttributeUpdate","useCaseView","useCompleteSource","useConceptDetail","useConceptIndex","useConceptSearch","useContent","useContentFromSourceReferences","useContentIndex","useContentSearch","useContentTOC","useContentType","useCurrentApplication","useDeepCompareEffect","useDetailPanel","useEntryDate","useErrorNotification","useFirstModelByInstance","useForm","useFormNavigation","useGroupingPanel","useKeyByHref","useList","useListDetail","useListNavigation","useListOrDetail","useLocale","useLocaleCodes","useLocales","useLocation","useLocationKey","useLogin","useLogout","useLookup","useMessage","useModal","useModelByHref","useModelCatalog","useModels","useModularUI","useModularUIBasic","useModularUIKey","useModularUIRequest","useNavigation","useNotification","usePanel","usePathname","usePreference","useProgressIndicator","useProgressIndicatorState","useQuerystring","useQuicksearch","useRelatedConcepts","useReload","useRepeatableAttributeSet","useRetrieveFormsOnModel","useSearch","useTab","useTranslate","useUpdateLocale","useUserProfile","__toCommonJS","import_react","import_constants","import_models","import_reselect","import_modularui","import_react_redux","useBEIDispatch","useBEISelector","useBEIStore","getLocale","state","getLocales","getModularUIRequest","getLocale","localeCode","href","options","request","useModularUIRequest","useBEISelector","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","responseCount","setResponseCount","actions","getActions","requestCount","requests","action","href","form","responses","actionForms","allActions","listItem","updateActions","unique","import_constants","import_exceptions","import_modularui","import_settings","import_utils","import_toolkit","initalState","loginSuccess","logoutSuccess","sendAuthenticationError","errorMessage","resetAuthErrors","saveChangePassword","authReducer","builder","state","action","import_toolkit","import_constants","import_modularui","import_utils","import_toolkit","import_models","import_toolkit","import_constants","import_models","import_modularui","import_constants","import_models","import_settings","import_toolkit","import_settings","import_utils","import_models","getApplication","state","locale","modularui","key","modelEntry","import_toolkit","updateErrorStatus","key","error","setModel","model","initModels","models","updateModel","updateForm","removeModelByKey","resetModularUI","import_toolkit","push","location","state","replace","go","delta","goBack","goForward","handleUnauthorized","errorResponse","dispatch","getState","removeModelByKey","application","getApplication","reloadApplication","logoutSuccess","sendAuthenticationError","location","LOGIN_PATH","locationFrom","replace","import_toolkit","import_settings","import_toolkit","startProgress","finishProgress","resetProgress","updateProgress","percentComplete","import_toolkit","saveNotification","type","message","error","showNotification","timeout","dispatch","dismissNotification","initialState","notificationReducer","builder","state","action","getNotificationMessageId","form","showFormNotification","dispatch","startProgress","showNotification","dismissNotification","finishProgress","showXHRErrorNotification","error","import_toolkit","noAction","import_toolkit","saveError","error","initialState","errorReducer","builder","_state","action","defaultErrorResponseHandler","error","dispatch","noAction","handleUnauthorized","push","saveChangePassword","saveError","showXHRErrorNotification","customErrorResponseHandler","defaultHandler","handleError","error","errorResponse","customErrorResponseHandler","defaultErrorResponseHandler","getRequestLocale","optionLocale","currentStateLocale","executeRequest","key","href","options","dispatch","getState","rejectWithValue","locale","getRequestLocale","requestHref","model","error","errorResponse","removeModelByKey","updateErrorStatus","handleError","fetchModel","import_reselect","import_models","getLocation","state","getAllModelsByInstance","instance","locale","modularui","key","modelEntry","getFirstModelByInstance","getActiveModelByInstance","location","modelByHref","href","findHref","modelConfigKey","keyByHref","model","allKeysByHref","getModels","models","modelKey","selfhref","label","type","modelInfo","getActiveModels","modelMap","m","contextModels","locationParts","currentPath","part","comparePath","foundEntry","selfContentLink","getAllFinishedModels","item","reloadApplication","_","dispatch","getState","state","applicationHref","application","getApplication","allKeys","allKeysByHref","key","removeModelByKey","modelKey","getLocale","fetchModel","loginFailed","errorMessage","sendAuthenticationError","changePassword","_","getState","isModal","locationFrom","push","login","username","password","dispatch","startProgress","reloadApplication","getApplication","loginSuccess","finishProgress","error","import_toolkit","import_modularui","logout","_","dispatch","startProgress","resetModularUI","reloadApplication","logoutSuccess","finishProgress","import_models","import_react","import_constants","import_react","useLocation","useBEISelector","state","useLocationKey","useQuerystring","usePathname","useNavigation","dispatch","useBEIDispatch","location","push","replace","delta","go","goBack","goForward","import_react","import_react_router","import_constants","import_models","import_react","import_lite","import_utils","checkDeps","deps","useDeepCompareMemoize","dependencies","ref","deepEqual","useDeepCompareEffect","callback","import_react","import_react","import_memoize","import_reselect","import_toolkit","import_utils","import_exceptions","import_models","import_format_message","import_immer","import_exceptions","import_settings","import_utils","languages","Locale","#code","#messages","#errors","#nativeName","locale","formatMessage","languageCode","language","languages","message","messages","id","defaultMessage","messageFromLocale","parameters","errors","beinformed_error_messages_en_nl_default","beinformed_error_messages_nl_nl_default","availableLocales","beinformed_error_messages_en_nl_default","beinformed_error_messages_nl_nl_default","Locales","_Locales","locales","availableLocales","locale","Locale","hydatedLocales","localeCode","item","acceptLanguageHeader","preferredLocales","availableLocale","messages","errors","updateLocale","locale","setLocales","locales","getDefaultLocale","initialState","Locales","i18nReducer","builder","state","action","getMessage","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","args","useMessage","useBEISelector","useTranslate","useLocale","useLocales","getLocaleCodes","state","locale","useLocaleCodes","useUpdateLocale","dispatch","useBEIDispatch","updateLocale","useModularUIKey","modelKey","url","locale","useLocale","useModularUI","modelKey","url","options","dispatch","useBEIDispatch","hrefInstance","requestUrl","currentQueryString","prevQueryRef","key","useModularUIKey","model","useBEISelector","state","requestOptions","merged","redirectLocation","isQueryChanged","shouldLoad","useDeepCompareEffect","fetchModel","removeModelByKey","createUseModularUIOptions","options","mustReload","baseOptions","validateModel","model","expectedModels","useModularUIBasic","defaultKey","href","memoizedHref","key","useReload","modularUIOptions","modularUI","useModularUI","modelKey","url","location","useLocation","useModularUIKey","modelEntry","useBEISelector","state","reload","isFullyLoaded","lastModification","useApplication","options","useModularUIBasic","useTab","href","useCaseView","useGroupingPanel","useDetailPanel","useUserProfile","useLogin","dispatch","useBEIDispatch","application","useApplication","auth","useBEISelector","state","isAuthenticated","primaryAuthenticationType","resetAuthErrors","username","password","login","authenticationType","useLogout","BASE_PATH","authenticate","origin","url","logout","import_react","import_modularui","import_react","useProgressIndicator","dispatch","useBEIDispatch","start","startProgress","finish","finishProgress","reset","resetProgress","update","percentComplete","updateProgress","useProgressIndicatorState","useBEISelector","state","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","href","index","self","allHrefs","requests","modularuiRequest","responseContent","import_immer","import_constants","import_models","import_settings","import_toolkit","import_immer","import_settings","import_debounce","import_constants","import_models","import_modularui","import_settings","updateAutosave","status","model","autosave","dispatch","form","formdata","savedForm","updateForm","debouncedAutosave","debounce","autosaveFormObject","import_immer","import_constants","import_models","autosubmitFormObject","form","attribute","forceUpdate","fetchModel","newModel","draft","import_immer","import_constants","import_models","autoupdateFormObject","form","attribute","fetchModel","newModel","draft","import_toolkit","import_immer","import_debounce","import_constants","import_models","import_modularui","import_settings","updateValidations","form","formWithValidations","dispatch","getState","currentFormEntry","currentForm","validatedForm","draft","updateForm","debouncedValidateFormObject","debounce","validateFormObject","updateFormAttribute","form","formObject","attribute","inputvalue","options","dispatch","newForm","draft","completeObject","autosubmitAction","autosubmitFormObject","autoupdateAction","autoupdateFormObject","handleAutoSave","handleValidate","updateForm","autosaveFormObject","validateFormObject","import_toolkit","import_immer","import_modularui","previousObject","form","newForm","draft","updateForm","cancelForm","dispatch","getState","startProgress","logoutSuccess","reloadApplication","finishProgress","goBack","import_immer","addRepeatableAttributeSet","form","newForm","draft","updateForm","cancelRepeatableAttributeSet","formObject","removeRepeatableAttributeSet","useForm","href","data","formHref","form","useModularUI","useFormNavigation","dispatch","useBEIDispatch","previousObject","cancelForm","fetchModel","newModel","draft","removeModelByKey","showFormNotification","useAttributeUpdate","formObject","attribute","inputvalue","options","updateFormAttribute","useRepeatableAttributeSet","addRepeatableAttributeSet","object","cancelRepeatableAttributeSet","removeRepeatableAttributeSet","import_react","import_constants","import_models","useList","href","options","useModularUIBasic","useListOrDetail","useListDetail","useListNavigation","syncLocation","historyAction","push","replace","useNavigation","dispatch","useBEIDispatch","navigate","update","list","resetPage","listHref","fetchModel","updateFilters","filters","updateFilter","filter","value","attribute","filterToUpdate","targetAttr","searchKey","resetFilters","removeFilter","updateSort","sortOption","updatePage","page","updatePageSize","pagesize","import_react","import_constants","import_models","useLookup","lookupLink","filterInput","minLength","debounceMs","start","finish","useProgressIndicator","modularuiRequest","useModularUIRequest","lookupOptions","setLookupOptions","lookupLoading","setLookupLoading","href","filterName","method","timeoutId","lookupHref","requestOptions","lookupResponse","import_react","import_exceptions","import_toolkit","showModal","key","closeModal","initialState","modalsReducer","builder","state","action","modal","existing","last","useModal","modalId","dispatch","useBEIDispatch","modal","useBEISelector","state","m","show","showModal","close","closeModal","import_models","import_utils","import_toolkit","import_utils","updateEntryDate","entryDate","initialState","modelCatalogReducer","builder","state","action","getEntryDate","state","isoDate","useModelCatalog","options","useModularUIBasic","useConceptIndex","href","key","entryDate","useEntryDate","url","useConceptDetail","concept","location","useLocation","useContentIndex","useContentTOC","content","useContent","useCompleteSource","contentHref","useContentType","contentType","useRelatedConcepts","getSearchHref","uri","filters","filterString","filterValue","value","useConceptSearch","useContentSearch","dispatch","useBEIDispatch","useBEISelector","getEntryDate","updateEntryDate","import_models","useAllModelsByInstance","instance","useBEISelector","state","getAllModelsByInstance","useFirstModelByInstance","getFirstModelByInstance","useActiveModelByInstance","getActiveModelByInstance","useModelByHref","href","modelByHref","useKeyByHref","keyByHref","useAllKeysByHref","allKeysByHref","useActiveModels","getActiveModels","useAllFinishedModels","getAllFinishedModels","useCurrentApplication","application","getApplication","import_reselect","reloadModel","model","options","fetchModel","useModels","dispatch","useBEIDispatch","selector","state","modularui","models","keys","key","model","modularuiModels","useBEISelector","options","reloadModel","callbackFn","modelsToReload","modelToReload","useNotification","dispatch","useBEIDispatch","render","messageType","message","error","useBEISelector","state","dismissNotification","useErrorNotification","showNotification","import_react","import_react_router","import_models","useUrl","href","fromRoute","previousUrl","setPreviousUrl","previousExact","setPreviousExact","match","location","url","currentUrl","shouldUpdate","usePanel","options","hookOptions","useModularUIBasic","import_react","import_pick","import_reselect","getPreferences","state","makeSelectPreference","preferenceNames","names","preferences","pick","usePreference","selectPreference","useBEISelector","import_models","useQuicksearch","href","options","useModularUIBasic","useSearch"]}