{"version":3,"file":"casesApp.js","sources":["../../../src/modules/models/UIModels/Case.ui.tsx","../../../src/modules/Api/CaseApi.tsx","../../../node_modules/history/index.js","../../../src/modules/Contexts/CaseProvider.tsx","../../../src/modules/cases/cases.tsx","../../../src/casesApp.tsx"],"sourcesContent":["import React from \"react\";\r\n\r\ninterface CaseProps {\r\n title: string;\r\n description: string;\r\n imageUrl: string;\r\n linkText: string;\r\n caseUrl: string;\r\n}\r\n\r\nconst CaseUI: React.FC = ({\r\n title,\r\n description,\r\n imageUrl,\r\n linkText,\r\n caseUrl,\r\n}) => {\r\n return (\r\n
\r\n \r\n {title}\r\n \r\n
\r\n \r\n
{title}
\r\n
\r\n

{description}

\r\n
\r\n
\r\n

\r\n \r\n \r\n {`Læs om ${linkText}`}\r\n \r\n \r\n \r\n

\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default CaseUI;\r\n","import CaseUmbraco from \"../models/Umbraco/Case.umb\";\r\nimport UmbracoApiResult from \"../models/UmbracoApiResult\";\r\nimport Case from \"../models/Case.tsx\";\r\nimport ImageUmbraco from \"../models/Umbraco/Image.umb.tsx\";\r\nimport { getImageCrop } from \"../helpers/ImageCrop.ts\";\r\n\r\nexport const CaseApi = {\r\n async getCases(\r\n take?: number,\r\n skip?: number\r\n ): Promise<{\r\n total: number;\r\n items: Record[];\r\n }> {\r\n const takeAmount = take ?? 1000;\r\n const skipAmount = skip ?? 0;\r\n const response = await fetch(\r\n `/umbraco/delivery/api/v2/content?fetch=children:cases&skip=${skipAmount}&take=${takeAmount}&sort=createDate:desc`\r\n );\r\n return response.json().then((data: UmbracoApiResult) => {\r\n return {\r\n items: data.items.map((item: CaseUmbraco) => {\r\n const imageCrop = getImageCrop(item);\r\n\r\n //strongly typed object of case.tsx\r\n const returnObject: Record = {\r\n Id: item.id,\r\n Title: item.name,\r\n Type: item.contentType,\r\n PublishedDate: item.createDate,\r\n ImageUrl: imageCrop,\r\n LinkText: item.properties.linktext\r\n ? item.properties.linktext\r\n : \"dette her\",\r\n LinkUrl: item.route.path,\r\n };\r\n // create return opbject with the correct types\r\n if (item.contentType === \"casePageV2024\") {\r\n returnObject.SectorTypes = item.properties.caseSectorTypes\r\n ? item.properties.caseSectorTypes.map((c) => c.name)\r\n : [];\r\n returnObject.ThemeTypes = item.properties.caseThemeTypes\r\n ? item.properties.caseThemeTypes.map((c) => c.name)\r\n : [];\r\n returnObject.InnovationTypes = item.properties.caseInnovationTypes\r\n ? item.properties.caseInnovationTypes.map((c) => c.name)\r\n : [];\r\n returnObject.CooperationFormTypes = item.properties\r\n .contentDetailsTagsCollaborationForm\r\n ? item.properties.contentDetailsTagsCollaborationForm\r\n : [];\r\n } else {\r\n returnObject.SectorTypes = item.properties.contentDetailsTagsSector\r\n ? item.properties.contentDetailsTagsSector\r\n : [];\r\n returnObject.ThemeTypes = item.properties.contentDetailsTagsTheme\r\n ? item.properties.contentDetailsTagsTheme\r\n : [];\r\n returnObject.InnovationTypes = item.properties\r\n .contentDetailsTagsInnovationType\r\n ? item.properties.contentDetailsTagsInnovationType\r\n : [];\r\n returnObject.CooperationFormTypes = item.properties\r\n .contentDetailsTagsCollaborationForm\r\n ? item.properties.contentDetailsTagsCollaborationForm\r\n : [];\r\n }\r\n return returnObject;\r\n }),\r\n total: data.total,\r\n };\r\n });\r\n },\r\n};\r\n","import _extends from '@babel/runtime/helpers/esm/extends';\n\n/**\r\n * Actions represent the type of change to a location value.\r\n *\r\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#action\r\n */\nvar Action;\n\n(function (Action) {\n /**\r\n * A POP indicates a change to an arbitrary index in the history stack, such\r\n * as a back or forward navigation. It does not describe the direction of the\r\n * navigation, only that the current index changed.\r\n *\r\n * Note: This is the default action for newly created history objects.\r\n */\n Action[\"Pop\"] = \"POP\";\n /**\r\n * A PUSH indicates a new entry being added to the history stack, such as when\r\n * a link is clicked and a new page loads. When this happens, all subsequent\r\n * entries in the stack are lost.\r\n */\n\n Action[\"Push\"] = \"PUSH\";\n /**\r\n * A REPLACE indicates the entry at the current index in the history stack\r\n * being replaced by a new one.\r\n */\n\n Action[\"Replace\"] = \"REPLACE\";\n})(Action || (Action = {}));\n\nvar readOnly = process.env.NODE_ENV !== \"production\" ? function (obj) {\n return Object.freeze(obj);\n} : function (obj) {\n return obj;\n};\n\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== 'undefined') console.warn(message);\n\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message); // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n\nvar BeforeUnloadEventType = 'beforeunload';\nvar HashChangeEventType = 'hashchange';\nvar PopStateEventType = 'popstate';\n/**\r\n * Browser history stores the location in regular URLs. This is the standard for\r\n * most web apps, but it requires some configuration on the server to ensure you\r\n * serve the same app at multiple URLs.\r\n *\r\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\r\n */\n\nfunction createBrowserHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$window = _options.window,\n window = _options$window === void 0 ? document.defaultView : _options$window;\n var globalHistory = window.history;\n\n function getIndexAndLocation() {\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var state = globalHistory.state || {};\n return [state.idx, readOnly({\n pathname: pathname,\n search: search,\n hash: hash,\n state: state.usr || null,\n key: state.key || 'default'\n })];\n }\n\n var blockedPopTx = null;\n\n function handlePop() {\n if (blockedPopTx) {\n blockers.call(blockedPopTx);\n blockedPopTx = null;\n } else {\n var nextAction = Action.Pop;\n\n var _getIndexAndLocation = getIndexAndLocation(),\n nextIndex = _getIndexAndLocation[0],\n nextLocation = _getIndexAndLocation[1];\n\n if (blockers.length) {\n if (nextIndex != null) {\n var delta = index - nextIndex;\n\n if (delta) {\n // Revert the POP\n blockedPopTx = {\n action: nextAction,\n location: nextLocation,\n retry: function retry() {\n go(delta * -1);\n }\n };\n go(delta);\n }\n } else {\n // Trying to POP to a location with no index. We did not create\n // this location, so we can't effectively block the navigation.\n process.env.NODE_ENV !== \"production\" ? warning(false, // TODO: Write up a doc that explains our blocking strategy in\n // detail and link to it here so people can understand better what\n // is going on and how to avoid it.\n \"You are trying to block a POP navigation to a location that was not \" + \"created by the history library. The block will fail silently in \" + \"production, but in general you should do all navigation with the \" + \"history library (instead of using window.history.pushState directly) \" + \"to avoid this situation.\") : void 0;\n }\n } else {\n applyTx(nextAction);\n }\n }\n }\n\n window.addEventListener(PopStateEventType, handlePop);\n var action = Action.Pop;\n\n var _getIndexAndLocation2 = getIndexAndLocation(),\n index = _getIndexAndLocation2[0],\n location = _getIndexAndLocation2[1];\n\n var listeners = createEvents();\n var blockers = createEvents();\n\n if (index == null) {\n index = 0;\n globalHistory.replaceState(_extends({}, globalHistory.state, {\n idx: index\n }), '');\n }\n\n function createHref(to) {\n return typeof to === 'string' ? to : createPath(to);\n } // state defaults to `null` because `window.history.state` does\n\n\n function getNextLocation(to, state) {\n if (state === void 0) {\n state = null;\n }\n\n return readOnly(_extends({\n pathname: location.pathname,\n hash: '',\n search: ''\n }, typeof to === 'string' ? parsePath(to) : to, {\n state: state,\n key: createKey()\n }));\n }\n\n function getHistoryStateAndUrl(nextLocation, index) {\n return [{\n usr: nextLocation.state,\n key: nextLocation.key,\n idx: index\n }, createHref(nextLocation)];\n }\n\n function allowTx(action, location, retry) {\n return !blockers.length || (blockers.call({\n action: action,\n location: location,\n retry: retry\n }), false);\n }\n\n function applyTx(nextAction) {\n action = nextAction;\n\n var _getIndexAndLocation3 = getIndexAndLocation();\n\n index = _getIndexAndLocation3[0];\n location = _getIndexAndLocation3[1];\n listeners.call({\n action: action,\n location: location\n });\n }\n\n function push(to, state) {\n var nextAction = Action.Push;\n var nextLocation = getNextLocation(to, state);\n\n function retry() {\n push(to, state);\n }\n\n if (allowTx(nextAction, nextLocation, retry)) {\n var _getHistoryStateAndUr = getHistoryStateAndUrl(nextLocation, index + 1),\n historyState = _getHistoryStateAndUr[0],\n url = _getHistoryStateAndUr[1]; // TODO: Support forced reloading\n // try...catch because iOS limits us to 100 pushState calls :/\n\n\n try {\n globalHistory.pushState(historyState, '', url);\n } catch (error) {\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n\n applyTx(nextAction);\n }\n }\n\n function replace(to, state) {\n var nextAction = Action.Replace;\n var nextLocation = getNextLocation(to, state);\n\n function retry() {\n replace(to, state);\n }\n\n if (allowTx(nextAction, nextLocation, retry)) {\n var _getHistoryStateAndUr2 = getHistoryStateAndUrl(nextLocation, index),\n historyState = _getHistoryStateAndUr2[0],\n url = _getHistoryStateAndUr2[1]; // TODO: Support forced reloading\n\n\n globalHistory.replaceState(historyState, '', url);\n applyTx(nextAction);\n }\n }\n\n function go(delta) {\n globalHistory.go(delta);\n }\n\n var history = {\n get action() {\n return action;\n },\n\n get location() {\n return location;\n },\n\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n back: function back() {\n go(-1);\n },\n forward: function forward() {\n go(1);\n },\n listen: function listen(listener) {\n return listeners.push(listener);\n },\n block: function block(blocker) {\n var unblock = blockers.push(blocker);\n\n if (blockers.length === 1) {\n window.addEventListener(BeforeUnloadEventType, promptBeforeUnload);\n }\n\n return function () {\n unblock(); // Remove the beforeunload listener so the document may\n // still be salvageable in the pagehide event.\n // See https://html.spec.whatwg.org/#unloading-documents\n\n if (!blockers.length) {\n window.removeEventListener(BeforeUnloadEventType, promptBeforeUnload);\n }\n };\n }\n };\n return history;\n}\n/**\r\n * Hash history stores the location in window.location.hash. This makes it ideal\r\n * for situations where you don't want to send the location to the server for\r\n * some reason, either because you do cannot configure it or the URL space is\r\n * reserved for something else.\r\n *\r\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\r\n */\n\nfunction createHashHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options2 = options,\n _options2$window = _options2.window,\n window = _options2$window === void 0 ? document.defaultView : _options2$window;\n var globalHistory = window.history;\n\n function getIndexAndLocation() {\n var _parsePath = parsePath(window.location.hash.substr(1)),\n _parsePath$pathname = _parsePath.pathname,\n pathname = _parsePath$pathname === void 0 ? '/' : _parsePath$pathname,\n _parsePath$search = _parsePath.search,\n search = _parsePath$search === void 0 ? '' : _parsePath$search,\n _parsePath$hash = _parsePath.hash,\n hash = _parsePath$hash === void 0 ? '' : _parsePath$hash;\n\n var state = globalHistory.state || {};\n return [state.idx, readOnly({\n pathname: pathname,\n search: search,\n hash: hash,\n state: state.usr || null,\n key: state.key || 'default'\n })];\n }\n\n var blockedPopTx = null;\n\n function handlePop() {\n if (blockedPopTx) {\n blockers.call(blockedPopTx);\n blockedPopTx = null;\n } else {\n var nextAction = Action.Pop;\n\n var _getIndexAndLocation4 = getIndexAndLocation(),\n nextIndex = _getIndexAndLocation4[0],\n nextLocation = _getIndexAndLocation4[1];\n\n if (blockers.length) {\n if (nextIndex != null) {\n var delta = index - nextIndex;\n\n if (delta) {\n // Revert the POP\n blockedPopTx = {\n action: nextAction,\n location: nextLocation,\n retry: function retry() {\n go(delta * -1);\n }\n };\n go(delta);\n }\n } else {\n // Trying to POP to a location with no index. We did not create\n // this location, so we can't effectively block the navigation.\n process.env.NODE_ENV !== \"production\" ? warning(false, // TODO: Write up a doc that explains our blocking strategy in\n // detail and link to it here so people can understand better\n // what is going on and how to avoid it.\n \"You are trying to block a POP navigation to a location that was not \" + \"created by the history library. The block will fail silently in \" + \"production, but in general you should do all navigation with the \" + \"history library (instead of using window.history.pushState directly) \" + \"to avoid this situation.\") : void 0;\n }\n } else {\n applyTx(nextAction);\n }\n }\n }\n\n window.addEventListener(PopStateEventType, handlePop); // popstate does not fire on hashchange in IE 11 and old (trident) Edge\n // https://developer.mozilla.org/de/docs/Web/API/Window/popstate_event\n\n window.addEventListener(HashChangeEventType, function () {\n var _getIndexAndLocation5 = getIndexAndLocation(),\n nextLocation = _getIndexAndLocation5[1]; // Ignore extraneous hashchange events.\n\n\n if (createPath(nextLocation) !== createPath(location)) {\n handlePop();\n }\n });\n var action = Action.Pop;\n\n var _getIndexAndLocation6 = getIndexAndLocation(),\n index = _getIndexAndLocation6[0],\n location = _getIndexAndLocation6[1];\n\n var listeners = createEvents();\n var blockers = createEvents();\n\n if (index == null) {\n index = 0;\n globalHistory.replaceState(_extends({}, globalHistory.state, {\n idx: index\n }), '');\n }\n\n function getBaseHref() {\n var base = document.querySelector('base');\n var href = '';\n\n if (base && base.getAttribute('href')) {\n var url = window.location.href;\n var hashIndex = url.indexOf('#');\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n\n return href;\n }\n\n function createHref(to) {\n return getBaseHref() + '#' + (typeof to === 'string' ? to : createPath(to));\n }\n\n function getNextLocation(to, state) {\n if (state === void 0) {\n state = null;\n }\n\n return readOnly(_extends({\n pathname: location.pathname,\n hash: '',\n search: ''\n }, typeof to === 'string' ? parsePath(to) : to, {\n state: state,\n key: createKey()\n }));\n }\n\n function getHistoryStateAndUrl(nextLocation, index) {\n return [{\n usr: nextLocation.state,\n key: nextLocation.key,\n idx: index\n }, createHref(nextLocation)];\n }\n\n function allowTx(action, location, retry) {\n return !blockers.length || (blockers.call({\n action: action,\n location: location,\n retry: retry\n }), false);\n }\n\n function applyTx(nextAction) {\n action = nextAction;\n\n var _getIndexAndLocation7 = getIndexAndLocation();\n\n index = _getIndexAndLocation7[0];\n location = _getIndexAndLocation7[1];\n listeners.call({\n action: action,\n location: location\n });\n }\n\n function push(to, state) {\n var nextAction = Action.Push;\n var nextLocation = getNextLocation(to, state);\n\n function retry() {\n push(to, state);\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(nextLocation.pathname.charAt(0) === '/', \"Relative pathnames are not supported in hash history.push(\" + JSON.stringify(to) + \")\") : void 0;\n\n if (allowTx(nextAction, nextLocation, retry)) {\n var _getHistoryStateAndUr3 = getHistoryStateAndUrl(nextLocation, index + 1),\n historyState = _getHistoryStateAndUr3[0],\n url = _getHistoryStateAndUr3[1]; // TODO: Support forced reloading\n // try...catch because iOS limits us to 100 pushState calls :/\n\n\n try {\n globalHistory.pushState(historyState, '', url);\n } catch (error) {\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n\n applyTx(nextAction);\n }\n }\n\n function replace(to, state) {\n var nextAction = Action.Replace;\n var nextLocation = getNextLocation(to, state);\n\n function retry() {\n replace(to, state);\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(nextLocation.pathname.charAt(0) === '/', \"Relative pathnames are not supported in hash history.replace(\" + JSON.stringify(to) + \")\") : void 0;\n\n if (allowTx(nextAction, nextLocation, retry)) {\n var _getHistoryStateAndUr4 = getHistoryStateAndUrl(nextLocation, index),\n historyState = _getHistoryStateAndUr4[0],\n url = _getHistoryStateAndUr4[1]; // TODO: Support forced reloading\n\n\n globalHistory.replaceState(historyState, '', url);\n applyTx(nextAction);\n }\n }\n\n function go(delta) {\n globalHistory.go(delta);\n }\n\n var history = {\n get action() {\n return action;\n },\n\n get location() {\n return location;\n },\n\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n back: function back() {\n go(-1);\n },\n forward: function forward() {\n go(1);\n },\n listen: function listen(listener) {\n return listeners.push(listener);\n },\n block: function block(blocker) {\n var unblock = blockers.push(blocker);\n\n if (blockers.length === 1) {\n window.addEventListener(BeforeUnloadEventType, promptBeforeUnload);\n }\n\n return function () {\n unblock(); // Remove the beforeunload listener so the document may\n // still be salvageable in the pagehide event.\n // See https://html.spec.whatwg.org/#unloading-documents\n\n if (!blockers.length) {\n window.removeEventListener(BeforeUnloadEventType, promptBeforeUnload);\n }\n };\n }\n };\n return history;\n}\n/**\r\n * Memory history stores the current location in memory. It is designed for use\r\n * in stateful non-browser environments like tests and React Native.\r\n *\r\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#creatememoryhistory\r\n */\n\nfunction createMemoryHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options3 = options,\n _options3$initialEntr = _options3.initialEntries,\n initialEntries = _options3$initialEntr === void 0 ? ['/'] : _options3$initialEntr,\n initialIndex = _options3.initialIndex;\n var entries = initialEntries.map(function (entry) {\n var location = readOnly(_extends({\n pathname: '/',\n search: '',\n hash: '',\n state: null,\n key: createKey()\n }, typeof entry === 'string' ? parsePath(entry) : entry));\n process.env.NODE_ENV !== \"production\" ? warning(location.pathname.charAt(0) === '/', \"Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: \" + JSON.stringify(entry) + \")\") : void 0;\n return location;\n });\n var index = clamp(initialIndex == null ? entries.length - 1 : initialIndex, 0, entries.length - 1);\n var action = Action.Pop;\n var location = entries[index];\n var listeners = createEvents();\n var blockers = createEvents();\n\n function createHref(to) {\n return typeof to === 'string' ? to : createPath(to);\n }\n\n function getNextLocation(to, state) {\n if (state === void 0) {\n state = null;\n }\n\n return readOnly(_extends({\n pathname: location.pathname,\n search: '',\n hash: ''\n }, typeof to === 'string' ? parsePath(to) : to, {\n state: state,\n key: createKey()\n }));\n }\n\n function allowTx(action, location, retry) {\n return !blockers.length || (blockers.call({\n action: action,\n location: location,\n retry: retry\n }), false);\n }\n\n function applyTx(nextAction, nextLocation) {\n action = nextAction;\n location = nextLocation;\n listeners.call({\n action: action,\n location: location\n });\n }\n\n function push(to, state) {\n var nextAction = Action.Push;\n var nextLocation = getNextLocation(to, state);\n\n function retry() {\n push(to, state);\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(location.pathname.charAt(0) === '/', \"Relative pathnames are not supported in memory history.push(\" + JSON.stringify(to) + \")\") : void 0;\n\n if (allowTx(nextAction, nextLocation, retry)) {\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n applyTx(nextAction, nextLocation);\n }\n }\n\n function replace(to, state) {\n var nextAction = Action.Replace;\n var nextLocation = getNextLocation(to, state);\n\n function retry() {\n replace(to, state);\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(location.pathname.charAt(0) === '/', \"Relative pathnames are not supported in memory history.replace(\" + JSON.stringify(to) + \")\") : void 0;\n\n if (allowTx(nextAction, nextLocation, retry)) {\n entries[index] = nextLocation;\n applyTx(nextAction, nextLocation);\n }\n }\n\n function go(delta) {\n var nextIndex = clamp(index + delta, 0, entries.length - 1);\n var nextAction = Action.Pop;\n var nextLocation = entries[nextIndex];\n\n function retry() {\n go(delta);\n }\n\n if (allowTx(nextAction, nextLocation, retry)) {\n index = nextIndex;\n applyTx(nextAction, nextLocation);\n }\n }\n\n var history = {\n get index() {\n return index;\n },\n\n get action() {\n return action;\n },\n\n get location() {\n return location;\n },\n\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n back: function back() {\n go(-1);\n },\n forward: function forward() {\n go(1);\n },\n listen: function listen(listener) {\n return listeners.push(listener);\n },\n block: function block(blocker) {\n return blockers.push(blocker);\n }\n };\n return history;\n} ////////////////////////////////////////////////////////////////////////////////\n// UTILS\n////////////////////////////////////////////////////////////////////////////////\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n\nfunction promptBeforeUnload(event) {\n // Cancel the event.\n event.preventDefault(); // Chrome (and legacy IE) requires returnValue to be set.\n\n event.returnValue = '';\n}\n\nfunction createEvents() {\n var handlers = [];\n return {\n get length() {\n return handlers.length;\n },\n\n push: function push(fn) {\n handlers.push(fn);\n return function () {\n handlers = handlers.filter(function (handler) {\n return handler !== fn;\n });\n };\n },\n call: function call(arg) {\n handlers.forEach(function (fn) {\n return fn && fn(arg);\n });\n }\n };\n}\n\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n/**\r\n * Creates a string URL path from the given pathname, search, and hash components.\r\n *\r\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createpath\r\n */\n\n\nfunction createPath(_ref) {\n var _ref$pathname = _ref.pathname,\n pathname = _ref$pathname === void 0 ? '/' : _ref$pathname,\n _ref$search = _ref.search,\n search = _ref$search === void 0 ? '' : _ref$search,\n _ref$hash = _ref.hash,\n hash = _ref$hash === void 0 ? '' : _ref$hash;\n if (search && search !== '?') pathname += search.charAt(0) === '?' ? search : '?' + search;\n if (hash && hash !== '#') pathname += hash.charAt(0) === '#' ? hash : '#' + hash;\n return pathname;\n}\n/**\r\n * Parses a string URL path into its separate pathname, search, and hash components.\r\n *\r\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#parsepath\r\n */\n\nfunction parsePath(path) {\n var parsedPath = {};\n\n if (path) {\n var hashIndex = path.indexOf('#');\n\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n\n var searchIndex = path.indexOf('?');\n\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n\n if (path) {\n parsedPath.pathname = path;\n }\n }\n\n return parsedPath;\n}\n\nexport { Action, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, parsePath };\n//# sourceMappingURL=index.js.map\n","import React, { createContext, useEffect} from 'react';\r\nimport Case from '../models/Case';\r\nimport { CaseApi } from '../Api/CaseApi';\r\nimport {createBrowserHistory} from 'history';\r\n\r\ninterface CaseProviderProps {\r\n children: React.ReactNode;\r\n}\r\nexport interface OptionType {\r\n label: string;\r\n value: string;\r\n disabled: boolean;\r\n}\r\n\r\ninterface CaseContextProps {\r\n cases: Case[];\r\n sectorTypes: OptionType[];\r\n themeTypes: OptionType[];\r\n innovationTypes: OptionType[];\r\n cooperationFormTypes: OptionType[];\r\n selectedSectorTypes: string[];\r\n setSelectedSectorTypes: (selectedSectorTypes: string[]) => void;\r\n selectedThemeTypes: string[];\r\n selectedInnovationTypes: string[];\r\n selectedCooperationFormTypes: string[];\r\n setSelectedThemeTypes: (selectedThemeTypes: string[]) => void;\r\n setSelectedInnovationTypes: (selectedInnovationTypes: string[]) => void;\r\n setSelectedCooperationFormTypes: (selectedCooperationFormTypes: string[]) => void;\r\n skipAmount: number;\r\n setSkipAmount: (skipAmount: number) => void;\r\n takeAmount: number;\r\n setTakeAmount: (takeAmount: number) => void;\r\n totalAmount: number;\r\n filteredCases: Case[];\r\n}\r\n\r\nexport const CaseContext = createContext({\r\n cases: [],\r\n sectorTypes: [],\r\n themeTypes: [],\r\n innovationTypes: [],\r\n cooperationFormTypes: [],\r\n selectedSectorTypes: [],\r\n setSelectedSectorTypes: () => {\r\n },\r\n selectedThemeTypes: [],\r\n selectedInnovationTypes: [],\r\n selectedCooperationFormTypes: [],\r\n setSelectedThemeTypes: () => {\r\n },\r\n setSelectedInnovationTypes: () => {\r\n },\r\n setSelectedCooperationFormTypes: () => {\r\n },\r\n setSkipAmount: () => {\r\n },\r\n takeAmount: 12,\r\n setTakeAmount: () => {\r\n },\r\n skipAmount: 0,\r\n totalAmount: 0,\r\n filteredCases: []\r\n});\r\n\r\nexport const CaseProvider: React.FC = ({children}) => {\r\n const [cases, setCases] = React.useState([]);\r\n const [casesToDisplay, setCasesToDisplay] = React.useState([]);\r\n // get Types from cases and create set of unique values and create state for each type\r\n const [sectorTypes, setSectorTypes] = React.useState([]);\r\n const [themeTypes, setThemeTypes] = React.useState([]);\r\n const [innovationTypes, setInnovationTypes] = React.useState([]);\r\n const [cooperationFormTypes, setCooperationFormTypes] = React.useState([]);\r\n const [filteredCases, setFilteredCases] = React.useState([]);\r\n // user selected types\r\n const [selectedSectorTypes, setSelectedSectorTypes] = React.useState([]);\r\n const [selectedThemeTypes, setSelectedThemeTypes] = React.useState([]);\r\n const [selectedInnovationTypes, setSelectedInnovationTypes] = React.useState([]);\r\n const [selectedCooperationFormTypes, setSelectedCooperationFormTypes] = React.useState([]);\r\n const [takeAmount, setTakeAmount] = React.useState(12);\r\n const [skipAmount, setSkipAmount] = React.useState(0);\r\n const [totalAmount, setTotalAmount] = React.useState(0);\r\n const history = createBrowserHistory();\r\n const filterCasesByStringArray = (cases: Case[], selectedTypes: string[], caseType: string) => {\r\n return cases.filter((c: Case) => {\r\n if (selectedTypes.length !== 0) {\r\n return c[caseType] && c[caseType].some((t: string) => selectedTypes.includes(t));\r\n } else {\r\n return true;\r\n }\r\n\r\n });\r\n };\r\n const updateAvailableTypes = (cases: Case[]) => {\r\n // update sector types and set them to disabled if they are not in the newCases array\r\n setSectorTypes(() => setSortingConditions(sectorTypes.map((t) => {\r\n return {\r\n label: t.label,\r\n value: t.value,\r\n disabled: !cases.some((c) => c.SectorTypes.includes(t.value))\r\n };\r\n }), selectedSectorTypes));\r\n // update theme types and set them to disabled if they are not in the newCases array\r\n //setAvaliableThemeTypes(() => {\r\n // return themeTypes.map((t) => {\r\n // return {\r\n // label: t.label,\r\n // value: t.value,\r\n // disabled: !newCases.some((c) => c.ThemeTypes.includes(t.value))\r\n // };\r\n // });\r\n //});\r\n // update innovation types and set them to disabled if they are not in the newCases array\r\n setInnovationTypes(() => setSortingConditions(innovationTypes.map((t) => {\r\n return {\r\n label: t.label,\r\n value: t.value,\r\n disabled: !cases.some((c) => c.InnovationTypes.includes(t.value))\r\n };\r\n }) , selectedInnovationTypes));\r\n // update cooperation form types and set them to disabled if they are not in the newCases array\r\n setCooperationFormTypes(() => setSortingConditions(cooperationFormTypes.map((t) => {\r\n return {\r\n label: t.label,\r\n value: t.value,\r\n disabled: !cases.some((c) => c.CooperationFormTypes.includes(t.value))\r\n };\r\n }), selectedCooperationFormTypes));\r\n };\r\n const setSortingConditions = (arrayOfTypes:OptionType[], selectedTypes:string[]) => {\r\n return arrayOfTypes.sort((a, b) => {\r\n // sort the sector types alphabetically with the ones that are disabled last\r\n if (a.disabled && !b.disabled) {\r\n return 1;\r\n }\r\n if (!a.disabled && b.disabled) {\r\n return -1;\r\n }\r\n return a.label.localeCompare(b.label);\r\n }).sort((a, b) => {\r\n //sort the selected sector types to the top\r\n if (selectedTypes.includes(a.value) && !selectedTypes.includes(b.value)) {\r\n return -1;\r\n }\r\n if (!selectedTypes.includes(a.value) && selectedTypes.includes(b.value)) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n\r\n }\r\n const getFiltersFromUrl = () => {\r\n\r\n const urlParams = new URLSearchParams(window.location.search);\r\n const sectorTypes = urlParams.getAll('sector');\r\n const themeTypes = urlParams.getAll('theme');\r\n const innovationTypes = urlParams.getAll('innovation');\r\n const cooperationFormTypes = urlParams.getAll('cooperation');\r\n const take = urlParams.get('take');\r\n const skip = urlParams.get('skip');\r\n if (sectorTypes.length === 0 && themeTypes.length === 0 && innovationTypes.length === 0 && cooperationFormTypes.length === 0 && take === null && skip === null) {\r\n return;\r\n }\r\n if (sectorTypes.length > 0 || !sectorTypes.every(type => sectorTypes.includes(type))) {\r\n setSelectedSectorTypes(sectorTypes);\r\n }\r\n if (themeTypes.length > 0 || !themeTypes.every(type => themeTypes.includes(type))) {\r\n setSelectedThemeTypes(themeTypes);\r\n }\r\n if (innovationTypes.length > 0 || !innovationTypes.every(type => innovationTypes.includes(type))) {\r\n setSelectedInnovationTypes(innovationTypes);\r\n }\r\n if (cooperationFormTypes.length > 0 || !cooperationFormTypes.every(type => cooperationFormTypes.includes(type))) {\r\n setSelectedCooperationFormTypes(cooperationFormTypes);\r\n }\r\n\r\n if (take !== null && takeAmount !== parseInt(take)) {\r\n setTakeAmount(parseInt(take));\r\n }\r\n if (skip !== null && skipAmount !== parseInt(skip)) {\r\n setSkipAmount(parseInt(skip)); \r\n }\r\n }\r\n const setFiltersInUrl = () => {\r\n const urlParams = new URLSearchParams();\r\n if (selectedSectorTypes.length !== 0) {\r\n selectedSectorTypes.forEach((t) => {\r\n urlParams.append('sector', t);\r\n });\r\n }\r\n if (selectedThemeTypes.length !== 0) {\r\n\r\n selectedThemeTypes.forEach((t) => {\r\n urlParams.append('theme', t);\r\n });\r\n }\r\n if (selectedInnovationTypes.length !== 0) {\r\n selectedInnovationTypes.forEach((t) => {\r\n urlParams.append('innovation', t);\r\n });\r\n }\r\n if (selectedCooperationFormTypes.length !== 0) {\r\n selectedCooperationFormTypes.forEach((t) => {\r\n urlParams.append('cooperation', t);\r\n });\r\n }\r\n urlParams.append('take', takeAmount.toString());\r\n urlParams.append('skip', skipAmount.toString());\r\n window.history.replaceState({}, '', `${window.location.pathname}?${urlParams.toString()}`);\r\n }\r\n\r\n useEffect(() => {\r\n CaseApi.getCases(1000, skipAmount).then((data) => {\r\n const sectorTypesList: OptionType[] = [];\r\n const themeTypesList: OptionType[] = [];\r\n const innovationTypesList: OptionType[] = [];\r\n const cooperationFormTypesList: OptionType[] = [];\r\n data.items.forEach((c) => {\r\n c.SectorTypes.forEach((t:string) => {\r\n if (!sectorTypesList.some((s) => s.value === t)) {\r\n sectorTypesList.push({label: t, value: t, disabled: false});\r\n }\r\n });\r\n c.ThemeTypes.forEach((t:string) => {\r\n if (!themeTypesList.some((s) => s.value === t)) {\r\n themeTypesList.push({label: t, value: t, disabled: false});\r\n }\r\n });\r\n c.InnovationTypes.forEach((t:string) => {\r\n if (!innovationTypesList.some((s) => s.value === t)) {\r\n innovationTypesList.push({label: t, value: t, disabled: false});\r\n }\r\n });\r\n c.CooperationFormTypes.forEach((t:string) => {\r\n if (!cooperationFormTypesList.some((s) => s.value === t)) {\r\n cooperationFormTypesList.push({label: t, value: t, disabled: false});\r\n }\r\n });\r\n });\r\n \r\n setSectorTypes(sectorTypesList.sort((a, b) => a.label.localeCompare(b.label)));\r\n setThemeTypes(themeTypesList.sort((a, b) => a.label.localeCompare(b.label)));\r\n setInnovationTypes(innovationTypesList.sort((a, b) => a.label.localeCompare(b.label)));\r\n setCooperationFormTypes(cooperationFormTypesList.sort((a, b) => a.label.localeCompare(b.label)));\r\n\r\n setTotalAmount(data.total);\r\n setCases(data.items as Case[]);\r\n setFilteredCases(data.items as Case[]);\r\n }).finally(() => {\r\n //getFiltersFromUrl();\r\n });\r\n }, []);\r\n useEffect(() => {\r\n const unlisten = history.listen(() => {\r\n \r\n window.location.reload();\r\n return unlisten();\r\n });\r\n \r\n }, []);\r\n\r\n useEffect(() => {\r\n getFiltersFromUrl();\r\n }, [cases]);\r\n useEffect(() => {\r\n setFilteredCases(() => {\r\n let newCasesWithTheme: Case[] = [];\r\n //let newCasesWithInnovation: Case[] = [];\r\n //let newCasesWithCooperation: Case[] = [];\r\n //let newCasesWithSector: Case[] = [];\r\n let newCases: Case[] = [];\r\n //if no filters are selected return all cases\r\n if (selectedSectorTypes.length === 0 && selectedThemeTypes.length === 0 && selectedInnovationTypes.length === 0 && selectedCooperationFormTypes.length === 0) {\r\n updateAvailableTypes(cases);\r\n \r\n return cases;\r\n }\r\n // copy cases to newCases array\r\n newCases = [...cases];\r\n // add the filtered cases to the newCases array if they are not already in the array and are not duplicates and are not empty\r\n newCases = filterCasesByStringArray(newCases, selectedThemeTypes, 'ThemeTypes');\r\n newCases = filterCasesByStringArray(newCases, selectedInnovationTypes, 'InnovationTypes');\r\n newCases = filterCasesByStringArray(newCases, selectedCooperationFormTypes, 'CooperationFormTypes');\r\n newCases = filterCasesByStringArray(newCases, selectedSectorTypes, 'SectorTypes');\r\n newCases = newCases.filter((c, i, a) => a.findIndex(t => (t.Id === c.Id)) === i);\r\n updateAvailableTypes(newCases);\r\n //setSkipAmount(0);\r\n //setTakeAmount(12);\r\n return newCases;\r\n });\r\n //add all cases that match the selected types and dont remove existing filtered cases only if they are duplicates\r\n }, [selectedSectorTypes, selectedThemeTypes, selectedInnovationTypes, selectedCooperationFormTypes]);\r\n\r\n useEffect(() => {\r\n setCasesToDisplay(() => {\r\n return filteredCases.slice(skipAmount, skipAmount + takeAmount);\r\n });\r\n }, [skipAmount, takeAmount]);\r\n\r\n useEffect(() => {\r\n setCasesToDisplay(() => {\r\n return filteredCases.slice(skipAmount, skipAmount + takeAmount);\r\n });\r\n\r\n }, [filteredCases]);\r\n useEffect(() => {\r\n setFiltersInUrl();\r\n },[casesToDisplay]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport CaseUI from \"../models/UIModels/Case.ui\";\r\nimport { CaseContext } from \"../Contexts/CaseProvider\";\r\nimport Case from \"../models/Case\";\r\nimport DropDownFilter from \"../FilterComponents/DropDownFilter\";\r\nimport { Skeleton } from \"primereact/skeleton\";\r\nimport { ScrollTop } from \"primereact/scrolltop\";\r\nimport { Button } from \"primereact/button\";\r\n\r\nexport default function App() {\r\n const {\r\n cases,\r\n sectorTypes,\r\n themeTypes,\r\n innovationTypes,\r\n cooperationFormTypes,\r\n selectedSectorTypes,\r\n setSelectedSectorTypes,\r\n selectedThemeTypes,\r\n setSelectedInnovationTypes,\r\n selectedInnovationTypes,\r\n setSelectedThemeTypes,\r\n selectedCooperationFormTypes,\r\n setSelectedCooperationFormTypes,\r\n takeAmount,\r\n setTakeAmount,\r\n skipAmount,\r\n setSkipAmount,\r\n totalAmount,\r\n filteredCases,\r\n } = React.useContext(CaseContext);\r\n const [caseList, setCaseList] = useState(cases);\r\n const [loading, setLoading] = useState(true);\r\n const [loadingMore, setLoadingMore] = useState(false);\r\n const [filtersInUse, setFiltersInUse] = useState(false);\r\n useEffect(() => {\r\n setCaseList(cases);\r\n if (\r\n takeAmount >= 12 &&\r\n skipAmount > 0 &&\r\n cooperationFormTypes.length != 0 &&\r\n selectedCooperationFormTypes.length == 0 &&\r\n selectedThemeTypes.length != 0 &&\r\n selectedSectorTypes.length != 0 &&\r\n selectedInnovationTypes.length != 0\r\n ) {\r\n setFiltersInUse(true);\r\n }\r\n }, [cases]);\r\n useEffect(() => {\r\n if (caseList.length > 0) {\r\n setTimeout(() => {\r\n setLoading(false);\r\n setLoadingMore(false);\r\n }, 500);\r\n } else {\r\n setTimeout(() => {\r\n setLoading(false);\r\n setLoadingMore(false);\r\n }, 500);\r\n }\r\n }, [caseList]);\r\n useEffect(() => {\r\n setLoading(true);\r\n // selected types are empty then set setFiltersInUse to false\r\n if (\r\n selectedSectorTypes.length == 0 &&\r\n selectedThemeTypes.length == 0 &&\r\n selectedInnovationTypes.length == 0 &&\r\n selectedCooperationFormTypes.length == 0\r\n ) {\r\n setFiltersInUse(false);\r\n } else {\r\n setFiltersInUse(true);\r\n }\r\n }, [\r\n selectedSectorTypes,\r\n selectedThemeTypes,\r\n selectedInnovationTypes,\r\n selectedCooperationFormTypes,\r\n ]);\r\n useEffect(() => {\r\n setLoadingMore(true);\r\n }, [skipAmount, takeAmount]);\r\n const onFilterChange = (\r\n setFilterFunc: (option: any) => void,\r\n selectedOption: string\r\n ) => {\r\n setFilterFunc(selectedOption);\r\n setFiltersInUse(true);\r\n };\r\n const resetFilters = () => {\r\n setSelectedSectorTypes([]);\r\n setSelectedThemeTypes([]);\r\n setSelectedInnovationTypes([]);\r\n setSelectedCooperationFormTypes([]);\r\n setSkipAmount(0);\r\n setTakeAmount(12);\r\n setFiltersInUse(false);\r\n };\r\n const skelleton = (amount: number) => {\r\n // return 12 skeleton items\r\n return Array.from({ length: amount }).map((_, index) => (\r\n
\r\n \r\n
\r\n ));\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n onFilterChange(setSelectedSectorTypes, selectedOption)\r\n }\r\n filterOptions={sectorTypes}\r\n selectedOptions={selectedSectorTypes}\r\n id=\"section\"\r\n dropdownTitle=\"Sektor\"\r\n />\r\n
\r\n
\r\n \r\n onFilterChange(setSelectedThemeTypes, selectedOption)\r\n }\r\n selectedOptions={selectedThemeTypes}\r\n id={\"themes\"}\r\n dropdownTitle={\"Tema\"}\r\n />\r\n
\r\n
\r\n \r\n onFilterChange(setSelectedInnovationTypes, selectedOption)\r\n }\r\n selectedOptions={selectedInnovationTypes}\r\n id={\"innovation\"}\r\n dropdownTitle={\"Innovation\"}\r\n />\r\n
\r\n
\r\n \r\n onFilterChange(\r\n setSelectedCooperationFormTypes,\r\n selectedOption\r\n )\r\n }\r\n selectedOptions={selectedCooperationFormTypes}\r\n id={\"cooperation\"}\r\n dropdownTitle={\"Samarbejdsform\"}\r\n />\r\n
\r\n
\r\n \r\n Nulstil filtre\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {loading\r\n ? skelleton(caseList.length > 0 ? caseList.length : 12)\r\n : caseList?.map((c: Case) => (\r\n
\r\n \r\n
\r\n ))}\r\n
\r\n\r\n \r\n
\r\n {filteredCases?.length > takeAmount && (\r\n setTakeAmount(takeAmount + 12)}\r\n >\r\n Indlæs flere\r\n \r\n )}\r\n
\r\n \r\n );\r\n}\r\n","\r\nimport React from 'react'\r\nimport ReactDOM from 'react-dom/client'\r\nimport App from './modules/Cases/cases'\r\nimport { CaseProvider } from './modules/Contexts/CaseProvider'\r\nimport { PrimeReactProvider } from 'primereact/api';\r\nimport \"primereact/resources/themes/lara-light-cyan/theme.css\";\r\nReactDOM.createRoot(document.getElementById('react-cases')!).render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n)"],"names":["CaseUI","title","description","imageUrl","linkText","caseUrl","jsxs","jsx","CaseApi","take","skip","data","item","imageCrop","getImageCrop","returnObject","c","Action","readOnly","obj","BeforeUnloadEventType","PopStateEventType","createBrowserHistory","options","_options","_options$window","window","globalHistory","getIndexAndLocation","_window$location","pathname","search","hash","state","blockedPopTx","handlePop","blockers","nextAction","_getIndexAndLocation","nextIndex","nextLocation","delta","index","go","applyTx","action","_getIndexAndLocation2","location","listeners","createEvents","_extends","createHref","to","createPath","getNextLocation","parsePath","createKey","getHistoryStateAndUrl","allowTx","retry","_getIndexAndLocation3","push","_getHistoryStateAndUr","historyState","url","replace","_getHistoryStateAndUr2","history","listener","blocker","unblock","promptBeforeUnload","event","handlers","fn","handler","arg","_ref","_ref$pathname","_ref$search","_ref$hash","path","parsedPath","hashIndex","searchIndex","CaseContext","createContext","CaseProvider","children","cases","setCases","React","casesToDisplay","setCasesToDisplay","sectorTypes","setSectorTypes","themeTypes","setThemeTypes","innovationTypes","setInnovationTypes","cooperationFormTypes","setCooperationFormTypes","filteredCases","setFilteredCases","selectedSectorTypes","setSelectedSectorTypes","selectedThemeTypes","setSelectedThemeTypes","selectedInnovationTypes","setSelectedInnovationTypes","selectedCooperationFormTypes","setSelectedCooperationFormTypes","takeAmount","setTakeAmount","skipAmount","setSkipAmount","totalAmount","setTotalAmount","filterCasesByStringArray","selectedTypes","caseType","t","updateAvailableTypes","setSortingConditions","arrayOfTypes","a","b","getFiltersFromUrl","urlParams","type","setFiltersInUrl","useEffect","sectorTypesList","themeTypesList","innovationTypesList","cooperationFormTypesList","s","unlisten","newCases","i","App","caseList","setCaseList","useState","loading","setLoading","loadingMore","setLoadingMore","filtersInUse","setFiltersInUse","onFilterChange","setFilterFunc","selectedOption","resetFilters","skelleton","amount","_","Skeleton","DropDownFilter","Button","ScrollTop","ReactDOM","PrimeReactProvider"],"mappings":"yPAUA,MAAMA,GAA8B,CAAC,CACnC,MAAAC,EACA,YAAAC,EACA,SAAAC,EACA,SAAAC,EACA,QAAAC,CACF,IAEIC,EAAA,KAAC,MAAI,CAAA,UAAU,uBACb,SAAA,CAACC,EAAA,IAAA,IAAA,CAAE,KAAMF,EACP,SAACE,EAAAA,IAAA,MAAA,CAAI,IAAKJ,EAAU,IAAKF,EAAO,UAAU,uBAAwB,CAAA,EACpE,EACAK,EAAAA,KAAC,MAAI,CAAA,UAAU,sBACb,SAAA,CAACC,EAAA,IAAA,IAAA,CAAE,KAAMF,EAAS,UAAU,iBAC1B,eAAC,KAAG,CAAA,UAAU,uBAAwB,SAAAJ,CAAM,CAAA,EAC9C,EACCM,EAAA,IAAA,IAAA,CAAE,UAAU,sBAAuB,SAAYL,CAAA,CAAA,CAAA,EAClD,QACC,MAAI,CAAA,UAAU,qCACb,SAAAK,EAAA,IAAC,KAAE,UAAU,2BACX,SAACA,EAAAA,IAAA,QAAA,CAAM,UAAU,2CACf,SAAAD,EAAAA,KAAC,KAAE,KAAMD,EAAS,UAAU,kCACzB,SAAA,CAAA,UAAUD,CAAQ,GACnBG,EAAAA,IAAC,IAAE,CAAA,UAAU,mCAAoC,CAAA,CAAA,EACnD,CAAA,CACF,EACF,CACF,CAAA,CAAA,EACF,EChCSC,GAAU,CACrB,MAAM,SACJC,EACAC,EAIC,CAMD,OAHiB,MAAM,MACrB,8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