@egen-civitas/esm-app-shell 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_egen_civitas_esm_app_shell=self.webpackChunk_egen_civitas_esm_app_shell||[]).push([["6680"],{3642(e,t,r){var n=r(8783),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,u=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var s="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,s=n[1];return a(function(){o.value=r,o.getSnapshot=t,c(o)&&s({inst:o})},[e,r,t]),u(function(){return c(o)&&s({inst:o}),e(function(){c(o)&&s({inst:o})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:s},8597(e,t,r){e.exports=r(3642)},9167(e,t,r){r.d(t,{y:()=>o});let n=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>u,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=t=e(n,o,i);return i},o=e=>e?n(e):n},715(e,t,r){r.r(t),r.d(t,{useExtensionSlotMeta:()=>e_,useEgenPagination:()=>e1,useConnectivity:()=>eU,createUseStore:()=>h,useBackendConfiguration:()=>eh,useEgenSWR:()=>e7,useOnVisible:()=>eY,useRenderableExtensions:()=>tr,useForceUpdate:()=>eF,useExtensionStore:()=>eD,useSessionContext:()=>td,useBodyScrollLock:()=>eS,useAppContext:()=>el,UserHasAccess:()=>tp,getAsyncExtensionLifecycle:()=>H,getAsyncLifecycle:()=>$,useWorkSessionTypes:()=>tb,ComponentContext:()=>u,ExtensionSlot:()=>C,useConfig:()=>eI,useDebounce:()=>eT,useEgenInfinite:()=>e3,useAssignedExtensions:()=>O,Extension:()=>f,useAbortController:()=>eu,useConnectedExtensions:()=>eA,useExtensionSlotStore:()=>S,usePagination:()=>e9,useSession:()=>to,ConfigurableLink:()=>l,egenComponentDecorator:()=>K,useAssignedExtensionIds:()=>ed,useFeatureFlag:()=>eM,useSessionContextStore:()=>tf,useExtensionInternalStore:()=>ek,useDefineAppContext:()=>en,EgenAppContext:()=>eo,useAttachments:()=>eb,usePaginationInfo:()=>tt,useLocations:()=>eW,useExtensionSlot:()=>E,useStore:()=>v,useOnClickOutside:()=>eH,getLifecycle:()=>G,useStoreWithActions:()=>m,isDesktop:()=>eG,RenderIfValueIsTruthy:()=>ei,getSyncLifecycle:()=>W,useEgenFetchAll:()=>e4,useLayoutType:()=>eK});var n,o=r(8783),i=r.n(o),u=(0,o.createContext)({moduleName:"",featureName:""}),a=r(7774);function l(e){var t=e.to,r=e.templateParams,n=e.onBeforeNavigate,u=e.children,l=function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,["to","templateParams","onBeforeNavigate","children"]);return(0,o.useEffect)(function(){l.href&&console.warn("ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '".concat(l.href,"'")),l.onClick&&console.warn("ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ".concat(t))},[]),i().createElement("a",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({onClick:function(e){0===e.button&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey&&(e.preventDefault(),null==n||n(e),(0,a.oo)({to:t,templateParams:r})),0===e.button&&(e.ctrlKey||e.metaKey)&&(null==n||n(e)),0===e.button&&e.shiftKey&&(null==n||n(e)),1===e.button&&(null==n||n(e))},href:(0,a.JG)(t,r)},l),u)}var c=r(3693);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}var f=function(e){var t=e.state,r=(e.children,function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,["state","children"])),n=(0,o.useContext)(u).extension,a=(0,o.useRef)(null),l=(0,o.useRef)(Promise.resolve()),f=(0,o.useCallback)(function(e){(null==n?void 0:n.extensionSlotName)&&n.extensionSlotModuleName&&n.extensionSlotModuleName&&!a.current&&(0,c.wG)(e,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,t).then(function(e){a.current=e})},[]);return(0,o.useEffect)(function(){return function(){if(a&&a.current)switch(a.current.getStatus()){case"MOUNTING":a.current.mountPromise.then(function(){var e;(null==(e=a.current)?void 0:e.getStatus())==="MOUNTED"&&a.current.unmount()});break;case"MOUNTED":a.current.unmount();break;case"UPDATING":l.current&&l.current.then(function(){var e;(null==(e=a.current)?void 0:e.getStatus())==="MOUNTED"&&a.current.unmount()})}}},[]),(0,o.useEffect)(function(){a.current&&a.current.update&&"UNMOUNTING"!==a.current.getStatus()&&Promise.all([a.current.mountPromise,l.current]).then(function(){var e;(null==a||null==(e=a.current)?void 0:e.getStatus())==="MOUNTED"&&a.current.update&&(l.current=a.current.update(s({},t)).catch(function(e){var t,r;if((null!=(r=Error)&&"u">typeof Symbol&&r[Symbol.hasInstance]?!r[Symbol.hasInstance](e):!(e instanceof r))||!e.message.includes("minified message #32")||(null==(t=a.current)?void 0:t.getStatus())==="MOUNTED")throw e}))})},[t]),n?i().createElement("div",s({ref:f,"data-extension-id":null==n?void 0:n.extensionId,style:{position:"relative"}},r)):null};function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function b(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}}function g(e,t){"function"==typeof t&&(t=t(e));var r={},n=!0,o=!1,i=void 0;try{for(var u,a=Object.entries(t)[Symbol.iterator]();!(n=(u=a.next()).done);n=!0)!function(){var t,n=(t=u.value,function(e){if(Array.isArray(e))return e}(t)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||b(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];r[o]=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];e.setState(function(e){return i.apply(void 0,[e].concat(function(e){if(Array.isArray(e))return d(e)}(r)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||b(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))})}}()}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}var p=function(){return function(e){return e}};function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p(),r=arguments.length>2?arguments[2]:void 0,n=(0,o.useCallback)(function(t){return e.subscribe(t)},[e]),i=(0,o.useCallback)(function(){return t(e.getState())},[e,t]);return y({},(0,o.useSyncExternalStore)(n,i,i),(0,o.useMemo)(function(){return r?g(e,r):{}},[e,r]))}function m(e,t){return v(e,p(),t)}function h(e){return function(t){var r=(0,o.useCallback)(function(t){return e.subscribe(t)},[]),n=(0,o.useCallback)(function(){return e.getState()},[]);return y({},(0,o.useSyncExternalStore)(r,n,n),(0,o.useMemo)(function(){return t?g(e,t):{}},[t]))}}var S=function(e){return v((0,c.zF)(),function(t){var r;return null==(r=t.slots)?void 0:r[e]})};function O(e){var t,r=S(e);return null!=(t=null==r?void 0:r.assignedExtensions)?t:[]}function E(e,t){var r=(0,o.useContext)(u).moduleName,n=(0,o.useRef)(!0);if(!r)throw Error("ComponentContext has not been provided. This should come from @egen-civitas/esm-react-utils.");return(0,o.useEffect)(function(){(0,c.FY)(r,e,t),n.current=!1},[]),(0,o.useEffect)(function(){n.current||(0,c.ap)(e,t)},[e,t]),{extensions:O(e),extensionSlotName:e,extensionSlotModuleName:r}}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function j(e){return e}function C(e){var t,r,n=e.name,a=e.extensionSlotName,l=e.select,c=void 0===l?j:l,s=e.children,d=e.state,y=e.style,b=function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,["name","extensionSlotName","select","children","state","style"]);if(s&&d)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");var g=null!=n?n:a,p=(0,o.useRef)(null),v=E(g,d),m=v.extensions,h=v.extensionSlotModuleName,S=(0,o.useMemo)(function(){return c(m)},[c,m]),O=(0,o.useMemo)(function(){if("function"==typeof s&&!i().isValidElement(s))return S.map(function(e){return s(e,d)})},[s,S]);return i().createElement("div",w({ref:p,"data-extension-slot-name":g,"data-extension-slot-module-name":h,style:(t=w({},y),r=r={position:"relative"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t)},b),g&&(null==S?void 0:S.map(function(e,t){var r,n;return i().createElement(u.Provider,{key:e.id,value:{moduleName:h,featureName:"",extension:{extensionId:e.id,extensionSlotName:g,extensionSlotModuleName:h}}},null!=(r=null!=(n=null==O?void 0:O[t])?n:"function"!=typeof s?s:null)?r:i().createElement(f,{state:d}))})))}var I=r(8279),A=r(2879),x=r(3511),P=r(8597),R=r(4555);let U=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),N={dedupe:!0},T=R.OBJECT.defineProperty(R.SWRConfig,"defaultValue",{value:R.defaultConfig}),k=(0,R.withArgs)((e,t,r)=>{let{cache:n,compare:i,suspense:u,fallbackData:a,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:s,refreshWhenHidden:f,refreshWhenOffline:d,keepPreviousData:y}=r,[b,g,p,v]=R.SWRGlobalState.get(n),[m,h]=(0,R.serialize)(e),S=(0,o.useRef)(!1),O=(0,o.useRef)(!1),E=(0,o.useRef)(m),w=(0,o.useRef)(t),j=(0,o.useRef)(r),C=()=>j.current.isVisible()&&j.current.isOnline(),[I,A,x,T]=(0,R.createCacheHelper)(n,m),k=(0,o.useRef)({}).current,_=(0,R.isUndefined)(a)?r.fallback[m]:a,D=(e,t)=>{for(let r in k)if("data"===r){if(!i(e[r],t[r])&&(!(0,R.isUndefined)(e[r])||!i($,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},L=(0,o.useMemo)(()=>{let e=!!m&&!!t&&((0,R.isUndefined)(l)?!j.current.isPaused()&&!u&&(!!(0,R.isUndefined)(c)||c):l),r=t=>{let r=(0,R.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=I(),o=T(),i=r(n),a=n===o?i:r(o),s=i;return[()=>{let e=r(I());return D(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[n,m]),M=(0,P.useSyncExternalStore)((0,o.useCallback)(e=>x(m,(t,r)=>{D(r,t)||e()}),[n,m]),L[0],L[1]),V=!S.current,F=b[m]&&b[m].length>0,z=M.data,B=(0,R.isUndefined)(z)?_:z,K=M.error,G=(0,o.useRef)(B),$=y?(0,R.isUndefined)(z)?G.current:z:B,W=(!F||!!(0,R.isUndefined)(K))&&(V&&!(0,R.isUndefined)(l)?l:!j.current.isPaused()&&(u?!(0,R.isUndefined)(B)&&c:(0,R.isUndefined)(B)||c)),H=!!(m&&t&&V&&W),Y=(0,R.isUndefined)(M.isValidating)?H:M.isValidating,J=(0,R.isUndefined)(M.isLoading)?H:M.isLoading,q=(0,o.useCallback)(async e=>{let t,n,o=w.current;if(!m||!o||O.current||j.current.isPaused())return!1;let u=!0,a=e||{},l=!p[m]||!a.dedupe,c=()=>R.IS_REACT_LEGACY?!O.current&&m===E.current&&S.current:m===E.current,s={isValidating:!1,isLoading:!1},f=()=>{A(s)},d=()=>{let e=p[m];e&&e[1]===n&&delete p[m]},y={isValidating:!0};(0,R.isUndefined)(I().data)&&(y.isLoading=!0);try{if(l&&(A(y),r.loadingTimeout&&(0,R.isUndefined)(I().data)&&setTimeout(()=>{u&&c()&&j.current.onLoadingSlow(m,r)},r.loadingTimeout),p[m]=[o(h),(0,R.getTimestamp)()]),[t,n]=p[m],t=await t,l&&setTimeout(d,r.dedupingInterval),!p[m]||p[m][1]!==n)return l&&c()&&j.current.onDiscarded(m),!1;s.error=R.UNDEFINED;let e=g[m];if(!(0,R.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&j.current.onDiscarded(m),!1;let a=I().data;s.data=i(a,t)?a:t,l&&c()&&j.current.onSuccess(t,m,r)}catch(r){d();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(s.error=r,l&&c()&&(e.onError(r,m,e),(!0===t||(0,R.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||C())&&e.onErrorRetry(r,m,e,e=>{let t=b[m];t&&t[0]&&t[0](R.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return u=!1,f(),!0},[m,n]),X=(0,o.useCallback)((...e)=>(0,R.internalMutate)(n,E.current,...e),[]);if((0,R.useIsomorphicLayoutEffect)(()=>{w.current=t,j.current=r,(0,R.isUndefined)(z)||(G.current=z)}),(0,R.useIsomorphicLayoutEffect)(()=>{if(!m)return;let e=q.bind(R.UNDEFINED,N),t=0,r=(0,R.subscribeCallback)(m,b,(r,n={})=>{if(r==R.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&C()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==R.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&C()&&e();else if(r==R.revalidateEvents.MUTATE_EVENT)return q();else if(r==R.revalidateEvents.ERROR_REVALIDATE_EVENT)return q(n)});return O.current=!1,E.current=m,S.current=!0,A({_k:h}),W&&((0,R.isUndefined)(B)||R.IS_SERVER?e():(0,R.rAF)(e)),()=>{O.current=!0,r()}},[m]),(0,R.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,R.isFunction)(s)?s(I().data):s;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!I().error&&(f||j.current.isVisible())&&(d||j.current.isOnline())?q(N).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[s,f,d,m]),(0,o.useDebugValue)($),u&&(0,R.isUndefined)(B)&&m){if(!R.IS_REACT_LEGACY&&R.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");w.current=t,j.current=r,O.current=!1;let e=v[m];if((0,R.isUndefined)(e)||U(X(e)),(0,R.isUndefined)(K)){let e=q(N);(0,R.isUndefined)($)||(e.status="fulfilled",e.value=!0),U(e)}else throw K}return{mutate:X,get data(){return k.data=!0,$},get error(){return k.error=!0,K},get isValidating(){return k.isValidating=!0,Y},get isLoading(){return k.isLoading=!0,J}}});var _=r(70);function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(V=function(){return!!e})()}var F={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},z=new Map,B={errorRetryCount:3,fetcher:_.egenFetch,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:function(e){var t;if(null!=(t=_.EgenFetchError)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t){var r=e.response.status;return!!(r>=500)||401===r||403===r||429===r}return!0},provider:function(){return z}};function K(e){if((void 0===e?"undefined":M(e))!=="object"||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");var t=Object.assign({},F,e),r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},B,t.swrConfig);return function(e){var n,a,l,c;return a=n=function(n){var a;if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");function l(e){var r,n,o;if(!(this instanceof l))throw TypeError("Cannot call a class as a function");return n=l,o=[e],n=D(n),(r=function(e,t){if(t&&("object"===M(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,V()?Reflect.construct(n,o||[],D(this).constructor):n.apply(this,o))).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}},r}return l.prototype=Object.create(n&&n.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),n&&L(l,n),a=[{key:"componentDidCatch",value:function(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(function(){throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}},{key:"render",value:function(){if(this.state.caughtError)return i().createElement("div",null,"An error has occurred. Please try reloading the page.");var n=i().createElement(o.Suspense,{fallback:null},i().createElement(T,{value:r},i().createElement(u.Provider,{value:this.state.config},t.disableTranslations?i().createElement(e,this.props):i().createElement(x.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?"".concat(this.state.config.moduleName,"___").concat(this.state.config.extension.extensionSlotName,"___").concat(this.state.config.extension.extensionId):this.state.config.moduleName},i().createElement(e,this.props)))));return t.strictMode&&i().StrictMode?i().createElement(i().StrictMode,null,n):n}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(l.prototype,a),l}(i().Component),l="displayName",c="EgenReactComponent(".concat(t.featureName,")"),l in a?Object.defineProperty(a,l,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[l]=c,n}}function G(e,t){return(0,A.A)({React:i(),ReactDOMClient:I,rootComponent:K(t)(e)})}function $(e,t){return function(){return e().then(function(e){return G(e.default,t)})}}function W(e,t){return function(){return Promise.resolve(G(e,t))}}var H=$,Y=r(9167),J=r(1442),q=(0,Y.y)()(function(){return{}});(0,J.registerGlobalStore)("egen-app-context",q);var X={};function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=q.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function Q(e,t){q.setState(function(r){return e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)})}function ee(e){return null===e?null:Object.freeze(Object.assign({},e))}var et=r(8254),er=new Map;function en(e,t){var r=(0,o.useRef)(null!=t?t:{}),n=(0,o.useRef)(function(t){return Q(e,t)}),i=(0,o.useRef)(Symbol());return(0,o.useEffect)(function(){var r=null!=t?t:{},n=i.current;return null===Z(e)?!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X;q.setState(function(r){var n,o;if(e in r)throw Error("Attempted to re-register namespace ".concat(e," in the app context. Each namespace must be unregistered before the name can be registered again."));return Object.assign({},r,(n={},o=t===X?{}:t,e in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n))})}(e,r):(console.warn("Namespace ".concat(e," is already registered in the app context. ")+"This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context."),Q(e,function(){return r})),er.set(e,n),function(){er.get(e)===n&&(q.setState(function(t){return e in t&&delete t[e],t}),er.delete(e))}},[e]),(0,o.useEffect)(function(){var n=null!=t?t:{};(0,et.b)(r.current,n)||(Q(e,function(){return n}),r.current=n)},[t]),n.current}function eo(e){return en(e.namespace,e.value),null}var ei=function(e){var t=e.children,r=e.value,n=e.fallback;return r?i().createElement(i().Fragment,null,t):n?i().createElement(i().Fragment,null,n):null};function eu(){var e=(0,o.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,o.useEffect)(function(){var t=e.current;return function(){return null==t?void 0:t.abort()}},[]),e.current}function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function el(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return null!=e?e:{}},n=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(function(){if(!ec(e)){var t=Z(e);if(null!==t)return r?r(t):t}}))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ea(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ea(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],u=n[1];return(0,o.useEffect)(function(){if(ec(e))throw Error('The namespace supplied to useAppContext must be a non-empty string, but was "'.concat(e,'".'))},[e]),(0,o.useEffect)(function(){var t,n;return(t=function(e){if(null==e)return void u(void 0);var t=r?r(e):e;u(function(e){return(0,et.b)(e,t)?e:t})})(ee(n=Z(e))),q.subscribe(function(r){var o=e in r?r[e]:null;o!==n&&(n=o,t(ee(o)))})},[e,r]),i}function ec(e){return"string"!=typeof e||0===e.trim().length}var es=r(4809);function ef(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ed(e){var t,r=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)([]))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ef(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ef(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r[0],i=r[1];return(0,o.useEffect)(function(){return(0,c.zF)().subscribe(function(t){var r,o,u=null!=(r=null==(o=t.slots[e])?void 0:o.assignedExtensions.map(function(e){return e.id}))?r:[];(0,es.A)(u,n)||i(u)})},[]),n}var ey=r(3400);function eb(e,t){var r=k("".concat(ey.Zu,"?entity=").concat(e,"&includeOrphan=").concat(t),_.egenFetch),n=r.data,i=r.error,u=r.mutate,a=r.isLoading,l=r.isValidating;return(0,o.useMemo)(function(){var e;return{isLoading:a,data:null!=(e=null==n?void 0:n.data.results)?e:[],error:i,mutate:u,isValidating:l}},[n,i,a,l,u])}let eg=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),ep={dedupe:!0};R.OBJECT.defineProperty(R.SWRConfig,"defaultValue",{value:R.defaultConfig});let ev=(0,R.withArgs)((e,t,r)=>{let{cache:n,compare:i,suspense:u,fallbackData:a,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:s,refreshWhenHidden:f,refreshWhenOffline:d,keepPreviousData:y}=r,[b,g,p,v]=R.SWRGlobalState.get(n),[m,h]=(0,R.serialize)(e),S=(0,o.useRef)(!1),O=(0,o.useRef)(!1),E=(0,o.useRef)(m),w=(0,o.useRef)(t),j=(0,o.useRef)(r),C=()=>j.current.isVisible()&&j.current.isOnline(),[I,A,x,U]=(0,R.createCacheHelper)(n,m),N=(0,o.useRef)({}).current,T=(0,R.isUndefined)(a)?r.fallback[m]:a,k=(e,t)=>{for(let r in N)if("data"===r){if(!i(e[r],t[r])&&(!(0,R.isUndefined)(e[r])||!i(K,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},_=(0,o.useMemo)(()=>{let e=!!m&&!!t&&((0,R.isUndefined)(l)?!j.current.isPaused()&&!u&&(!!(0,R.isUndefined)(c)||c):l),r=t=>{let r=(0,R.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=I(),o=U(),i=r(n),a=n===o?i:r(o),s=i;return[()=>{let e=r(I());return k(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[n,m]),D=(0,P.useSyncExternalStore)((0,o.useCallback)(e=>x(m,(t,r)=>{k(r,t)||e()}),[n,m]),_[0],_[1]),L=!S.current,M=b[m]&&b[m].length>0,V=D.data,F=(0,R.isUndefined)(V)?T:V,z=D.error,B=(0,o.useRef)(F),K=y?(0,R.isUndefined)(V)?B.current:V:F,G=(!M||!!(0,R.isUndefined)(z))&&(L&&!(0,R.isUndefined)(l)?l:!j.current.isPaused()&&(u?!(0,R.isUndefined)(F)&&c:(0,R.isUndefined)(F)||c)),$=!!(m&&t&&L&&G),W=(0,R.isUndefined)(D.isValidating)?$:D.isValidating,H=(0,R.isUndefined)(D.isLoading)?$:D.isLoading,Y=(0,o.useCallback)(async e=>{let t,n,o=w.current;if(!m||!o||O.current||j.current.isPaused())return!1;let u=!0,a=e||{},l=!p[m]||!a.dedupe,c=()=>R.IS_REACT_LEGACY?!O.current&&m===E.current&&S.current:m===E.current,s={isValidating:!1,isLoading:!1},f=()=>{A(s)},d=()=>{let e=p[m];e&&e[1]===n&&delete p[m]},y={isValidating:!0};(0,R.isUndefined)(I().data)&&(y.isLoading=!0);try{if(l&&(A(y),r.loadingTimeout&&(0,R.isUndefined)(I().data)&&setTimeout(()=>{u&&c()&&j.current.onLoadingSlow(m,r)},r.loadingTimeout),p[m]=[o(h),(0,R.getTimestamp)()]),[t,n]=p[m],t=await t,l&&setTimeout(d,r.dedupingInterval),!p[m]||p[m][1]!==n)return l&&c()&&j.current.onDiscarded(m),!1;s.error=R.UNDEFINED;let e=g[m];if(!(0,R.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&j.current.onDiscarded(m),!1;let a=I().data;s.data=i(a,t)?a:t,l&&c()&&j.current.onSuccess(t,m,r)}catch(r){d();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(s.error=r,l&&c()&&(e.onError(r,m,e),(!0===t||(0,R.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||C())&&e.onErrorRetry(r,m,e,e=>{let t=b[m];t&&t[0]&&t[0](R.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return u=!1,f(),!0},[m,n]),J=(0,o.useCallback)((...e)=>(0,R.internalMutate)(n,E.current,...e),[]);if((0,R.useIsomorphicLayoutEffect)(()=>{w.current=t,j.current=r,(0,R.isUndefined)(V)||(B.current=V)}),(0,R.useIsomorphicLayoutEffect)(()=>{if(!m)return;let e=Y.bind(R.UNDEFINED,ep),t=0,r=(0,R.subscribeCallback)(m,b,(r,n={})=>{if(r==R.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&C()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==R.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&C()&&e();else if(r==R.revalidateEvents.MUTATE_EVENT)return Y();else if(r==R.revalidateEvents.ERROR_REVALIDATE_EVENT)return Y(n)});return O.current=!1,E.current=m,S.current=!0,A({_k:h}),G&&((0,R.isUndefined)(F)||R.IS_SERVER?e():(0,R.rAF)(e)),()=>{O.current=!0,r()}},[m]),(0,R.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,R.isFunction)(s)?s(I().data):s;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!I().error&&(f||j.current.isVisible())&&(d||j.current.isOnline())?Y(ep).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[s,f,d,m]),(0,o.useDebugValue)(K),u&&(0,R.isUndefined)(F)&&m){if(!R.IS_REACT_LEGACY&&R.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");w.current=t,j.current=r,O.current=!1;let e=v[m];if((0,R.isUndefined)(e)||eg(J(e)),(0,R.isUndefined)(z)){let e=Y(ep);(0,R.isUndefined)(K)||(e.status="fulfilled",e.value=!0),eg(e)}else throw z}return{mutate:J,get data(){return N.data=!0,K},get error(){return N.error=!0,z},get isValidating(){return N.isValidating=!0,W},get isLoading(){return N.isLoading=!0,H}}}),em=(0,R.withMiddleware)(ev,e=>(t,r,n)=>(n.revalidateOnFocus=!1,n.revalidateIfStale=!1,n.revalidateOnReconnect=!1,e(t,r,n)));function eh(e){var t=em(null!=e?e:"".concat(_.restBaseUrl,"/config"),_.egenFetch);return(0,o.useMemo)(function(){var e;return{backendConfiguration:null==(e=t.data)?void 0:e.data,isLoadingBackendConfiguration:t.isLoading,mutateBackendConfiguration:t.mutate,errorFetchingBackendConfiguration:t.error}},[t])}function eS(e){(0,o.useEffect)(function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}},[e])}var eO=r(3645);function eE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ew(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function ej(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],u=!0,a=!1;try{for(o=o.call(e);!(u=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);u=!0);}catch(e){a=!0,n=e}finally{try{u||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eE(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eC={};function eI(e){var t,r=(0,o.useContext)(u),n=r.moduleName,i=r.extension,a=null!=(t=null==e?void 0:e.externalModuleName)?t:n;if(!a&&!i)throw Error('No ComponentContext has been provided. This should come from "egenComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var l=function(e){var t,r,n,i=(0,o.useMemo)(function(){return(0,eO.getConfigStore)(e)},[e]),u=(r=(t=ej((0,o.useState)(function(){var e=i.getState();return e.loaded&&e.config?e.config:null}),2))[0],n=t[1],(0,o.useEffect)(function(){return null==i?void 0:i.subscribe(function(e){e.loaded&&e.config&&n(e.config)})},[i]),r);if(!u)throw eC[e]||(eC[e]=new Promise(function(e){var t=i.subscribe(function(r){r.loaded&&r.config&&(e(r.config),t())})})),eC[e];return u}(a),c=function(e){var t=(0,o.useMemo)(eO.getExtensionsConfigStore,[]),r=(i=(n=ej((0,o.useState)(e?function(){var r=t.getState(),n=(0,eO.getExtensionConfigFromStore)(r,e.extensionSlotName,e.extensionId);if(n.loaded&&n.config)return n.config}:null),2))[0],u=n[1],(0,o.useEffect)(function(){if(e)return t.subscribe(function(t){var r=(0,eO.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);r.loaded&&r.config&&!(0,es.A)(r.config,i)&&u(r.config)})},[t,e,i]),i);if(!r&&e){var n,i,u,a="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!eC[a]&&t&&(eC[a]=new Promise(function(r){var n=t.subscribe(function(t){var o=(0,eO.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),eC[a]}return r||{}}(i);return(0,o.useMemo)(function(){return(null==e?void 0:e.externalModuleName)&&a===e.externalModuleName?ew({},l):ew({},l,c)},[a,null==e?void 0:e.externalModuleName,l,c])}var eA=O,ex=r(9726),eP=r(2316);function eR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eU(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)((0,eP.s)()))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eR(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eR(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1];return(0,o.useEffect)(function(){return(0,ex.gj)(function(e){return n(e.online)})},[]),r}function eN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eT(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(e))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eN(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eN(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],u=n[1];return(0,o.useEffect)(function(){var t=setTimeout(function(){u(e)},r);return function(){clearTimeout(t)}},[e,r]),i}var ek=h((0,c.a9)());function e_(e){var t=O(e);return(0,o.useMemo)(function(){return Object.fromEntries(t.map(function(e){return[e.name,e.meta]}))},[t])}var eD=h((0,c.zF)()),eL=r(5794);function eM(e){var t,r;return null!=(t=null==(r=v(eL.jX).flags[e])?void 0:r.enabled)&&t}function eV(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eF(){var e,t=(function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(0))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eV(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eV(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return(0,o.useCallback)(function(){t(function(e){return e+1})},[])}function ez(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eB(){var e="tablet";return document.body.classList.forEach(function(t){switch(t){case"egen-breakpoint-lt-tablet":e="phone";break;case"egen-breakpoint-gt-small-desktop":e="large-desktop";break;case"egen-breakpoint-gt-tablet":e="small-desktop"}}),e}function eK(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(eB))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ez(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ez(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1];return(0,o.useEffect)(function(){var e=function(){n(eB())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]),r}var eG=function(e){return"small-desktop"===e||"large-desktop"===e};function e$(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eW(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)([]))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return e$(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e$(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],u=n[1];return(0,o.useEffect)(function(){var e=(0,ey.Vs)(t,r).subscribe(function(e){u(e)},function(e){console.error(e)});return function(){return e.unsubscribe()}},[t,r]),i}function eH(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=(0,o.useRef)(null);return(0,o.useEffect)(function(){var n=function(n){var o,i;t&&r.current&&n.target&&(o=n.target,null!=(i=Node)&&"u">typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i)&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),function(){window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function eY(e){var t=(0,o.useRef)();return(0,o.useEffect)(function(){var r=new IntersectionObserver(function(t){var r=!0,n=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(r=(i=u.next()).done);r=!0)if(i.value.isIntersecting)return void e()}catch(e){n=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(n)throw o}}},{threshold:1});return t.current&&r.observe(t.current),function(){t.current&&r.unobserve(t.current)}},[t.current,e]),t}let eJ=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),eq={dedupe:!0};R.OBJECT.defineProperty(R.SWRConfig,"defaultValue",{value:R.defaultConfig});let eX=(0,R.withArgs)((e,t,r)=>{let{cache:n,compare:i,suspense:u,fallbackData:a,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:s,refreshWhenHidden:f,refreshWhenOffline:d,keepPreviousData:y}=r,[b,g,p,v]=R.SWRGlobalState.get(n),[m,h]=(0,R.serialize)(e),S=(0,o.useRef)(!1),O=(0,o.useRef)(!1),E=(0,o.useRef)(m),w=(0,o.useRef)(t),j=(0,o.useRef)(r),C=()=>j.current.isVisible()&&j.current.isOnline(),[I,A,x,U]=(0,R.createCacheHelper)(n,m),N=(0,o.useRef)({}).current,T=(0,R.isUndefined)(a)?r.fallback[m]:a,k=(e,t)=>{for(let r in N)if("data"===r){if(!i(e[r],t[r])&&(!(0,R.isUndefined)(e[r])||!i(K,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},_=(0,o.useMemo)(()=>{let e=!!m&&!!t&&((0,R.isUndefined)(l)?!j.current.isPaused()&&!u&&(!!(0,R.isUndefined)(c)||c):l),r=t=>{let r=(0,R.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=I(),o=U(),i=r(n),a=n===o?i:r(o),s=i;return[()=>{let e=r(I());return k(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[n,m]),D=(0,P.useSyncExternalStore)((0,o.useCallback)(e=>x(m,(t,r)=>{k(r,t)||e()}),[n,m]),_[0],_[1]),L=!S.current,M=b[m]&&b[m].length>0,V=D.data,F=(0,R.isUndefined)(V)?T:V,z=D.error,B=(0,o.useRef)(F),K=y?(0,R.isUndefined)(V)?B.current:V:F,G=(!M||!!(0,R.isUndefined)(z))&&(L&&!(0,R.isUndefined)(l)?l:!j.current.isPaused()&&(u?!(0,R.isUndefined)(F)&&c:(0,R.isUndefined)(F)||c)),$=!!(m&&t&&L&&G),W=(0,R.isUndefined)(D.isValidating)?$:D.isValidating,H=(0,R.isUndefined)(D.isLoading)?$:D.isLoading,Y=(0,o.useCallback)(async e=>{let t,n,o=w.current;if(!m||!o||O.current||j.current.isPaused())return!1;let u=!0,a=e||{},l=!p[m]||!a.dedupe,c=()=>R.IS_REACT_LEGACY?!O.current&&m===E.current&&S.current:m===E.current,s={isValidating:!1,isLoading:!1},f=()=>{A(s)},d=()=>{let e=p[m];e&&e[1]===n&&delete p[m]},y={isValidating:!0};(0,R.isUndefined)(I().data)&&(y.isLoading=!0);try{if(l&&(A(y),r.loadingTimeout&&(0,R.isUndefined)(I().data)&&setTimeout(()=>{u&&c()&&j.current.onLoadingSlow(m,r)},r.loadingTimeout),p[m]=[o(h),(0,R.getTimestamp)()]),[t,n]=p[m],t=await t,l&&setTimeout(d,r.dedupingInterval),!p[m]||p[m][1]!==n)return l&&c()&&j.current.onDiscarded(m),!1;s.error=R.UNDEFINED;let e=g[m];if(!(0,R.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&j.current.onDiscarded(m),!1;let a=I().data;s.data=i(a,t)?a:t,l&&c()&&j.current.onSuccess(t,m,r)}catch(r){d();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(s.error=r,l&&c()&&(e.onError(r,m,e),(!0===t||(0,R.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||C())&&e.onErrorRetry(r,m,e,e=>{let t=b[m];t&&t[0]&&t[0](R.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return u=!1,f(),!0},[m,n]),J=(0,o.useCallback)((...e)=>(0,R.internalMutate)(n,E.current,...e),[]);if((0,R.useIsomorphicLayoutEffect)(()=>{w.current=t,j.current=r,(0,R.isUndefined)(V)||(B.current=V)}),(0,R.useIsomorphicLayoutEffect)(()=>{if(!m)return;let e=Y.bind(R.UNDEFINED,eq),t=0,r=(0,R.subscribeCallback)(m,b,(r,n={})=>{if(r==R.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&C()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==R.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&C()&&e();else if(r==R.revalidateEvents.MUTATE_EVENT)return Y();else if(r==R.revalidateEvents.ERROR_REVALIDATE_EVENT)return Y(n)});return O.current=!1,E.current=m,S.current=!0,A({_k:h}),G&&((0,R.isUndefined)(F)||R.IS_SERVER?e():(0,R.rAF)(e)),()=>{O.current=!0,r()}},[m]),(0,R.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,R.isFunction)(s)?s(I().data):s;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!I().error&&(f||j.current.isVisible())&&(d||j.current.isOnline())?Y(eq).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[s,f,d,m]),(0,o.useDebugValue)(K),u&&(0,R.isUndefined)(F)&&m){if(!R.IS_REACT_LEGACY&&R.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");w.current=t,j.current=r,O.current=!1;let e=v[m];if((0,R.isUndefined)(e)||eJ(J(e)),(0,R.isUndefined)(z)){let e=Y(eq);(0,R.isUndefined)(K)||(e.status="fulfilled",e.value=!0),eJ(e)}else throw z}return{mutate:J,get data(){return N.data=!0,K},get error(){return N.error=!0,z},get isValidating(){return N.isValidating=!0,W},get isLoading(){return N.isLoading=!0,H}}}),eZ=Promise.resolve(),eQ=(0,R.withMiddleware)(eX,e=>(t,r,n)=>{let i,u=(0,o.useRef)(!1),{cache:a,initialSize:l=1,revalidateAll:c=!1,persistSize:s=!1,revalidateFirstPage:f=!0,revalidateOnMount:d=!1,parallel:y=!1}=n,[,,,b]=R.SWRGlobalState.get(R.cache);try{(i=(0,R.serialize)(t?t(0,null):null)[0])&&(i=R.INFINITE_PREFIX+i)}catch(e){}let[g,p,v]=(0,R.createCacheHelper)(a,i),m=(0,o.useCallback)(()=>(0,R.isUndefined)(g()._l)?l:g()._l,[a,i,l]);(0,P.useSyncExternalStore)((0,o.useCallback)(e=>i?v(i,()=>{e()}):()=>{},[a,i]),m,m);let h=(0,o.useCallback)(()=>{let e=g()._l;return(0,R.isUndefined)(e)?l:e},[i,l]),S=(0,o.useRef)(h());(0,R.useIsomorphicLayoutEffect)(()=>{if(!u.current){u.current=!0;return}i&&p({_l:s?S.current:h()})},[i,a]);let O=d&&!u.current,E=e(i,async e=>{let o=g()._i,i=g()._r;p({_r:R.UNDEFINED});let u=[],l=h(),[s]=(0,R.createCacheHelper)(a,e),d=s().data,v=[],m=null;for(let e=0;e<l;++e){let[l,s]=(0,R.serialize)(t(e,y?null:m));if(!l)break;let[g,p]=(0,R.createCacheHelper)(a,l),h=g().data,S=c||o||(0,R.isUndefined)(h)||f&&!e&&!(0,R.isUndefined)(d)||O||d&&!(0,R.isUndefined)(d[e])&&!n.compare(d[e],h);if(r&&("function"==typeof i?i(h,s):S)){let t=async()=>{if(l in b){let e=b[l];delete b[l],h=await e}else h=await r(s);p({data:h,_k:s}),u[e]=h};y?v.push(t):await t()}else u[e]=h;y||(m=h)}return y&&await Promise.all(v.map(e=>e())),p({_i:R.UNDEFINED}),u},n),w=(0,o.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},n=!1!==r.revalidate;return i?(n&&((0,R.isUndefined)(e)?p({_i:!0,_r:r.revalidate}):p({_i:!1,_r:r.revalidate})),arguments.length?E.mutate(e,{...r,revalidate:n}):E.mutate()):eZ},[i,a]),j=(0,o.useCallback)(e=>{let r;if(!i)return eZ;let[,n]=(0,R.createCacheHelper)(a,i);if((0,R.isFunction)(e)?r=e(h()):"number"==typeof e&&(r=e),"number"!=typeof r)return eZ;n({_l:r}),S.current=r;let o=[],[u]=(0,R.createCacheHelper)(a,i),l=null;for(let e=0;e<r;++e){let[r]=(0,R.serialize)(t(e,l)),[n]=(0,R.createCacheHelper)(a,r),i=r?n().data:R.UNDEFINED;if((0,R.isUndefined)(i))return w(u().data);o.push(i),l=i}return w(o)},[i,a,w,h]);return{size:h(),setSize:j,mutate:w,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}});function e0(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function e1(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(e,t,r){var n,i,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=r.getPaginatedUrl,l=r.getTotalCount,c=r.getCurrentPageSize,s=r.getData,f=u.immutable,d=u.swrConfig,y=null!=(i=u.fetcher)?i:_.egenFetch,b=function(e){if(Array.isArray(e))return e}(n=(0,o.useState)(1))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(n)||function(e){if(e){if("string"==typeof e)return e0(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e0(e,2)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=b[0],p=b[1],v=(0,o.useRef)(NaN),m=(0,o.useRef)(NaN),h=(g-1)*t,S=(f?em:k)((0,o.useMemo)(function(){return a(e,t,h)},[e,t,h]),y,d),O=S.data,E=function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(S,["data"]);(null==O?void 0:O.data)&&(v.current=l(null==O?void 0:O.data),m.current=c(null==O?void 0:O.data));var w=Math.ceil(v.current/t),j=(0,o.useCallback)(function(e){0<e&&e<=w?p(e):console.warn("Invalid attempt to go to out of bounds page: "+e)},[e,g,w]),C=(0,o.useCallback)(function(){j(g+1)},[e,g,w]),I=(0,o.useCallback)(function(){j(g-1)},[e,g,w]);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({data:s(null==O?void 0:O.data),totalPages:w,totalCount:v.current,currentPage:g,currentPageSize:m,paginated:w>1,showNextButton:g<w,showPreviousButton:g>1,goTo:j,goToNext:C,goToPrevious:I},E)}(e,t,e2,r)}var e2={getPaginatedUrl:function(e,t,r){if(!e)return null;var n=new URL((0,_.makeUrl)(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()},getNextUrl:function(e){var t,r,n=null==e||null==(r=e.links)||null==(t=r.find(function(e){return"next"==e.rel}))?void 0:t.uri;if(!n)return null;var o=new URL(n);return o.host=window.location.host,o.protocol=window.location.protocol,o.toString()},getTotalCount:function(e){var t;return null!=(t=null==e?void 0:e.totalCount)?t:NaN},getCurrentPageSize:function(e){var t,r;return null!=(t=null==e||null==(r=e.results)?void 0:r.length)?t:NaN},getData:function(e){return null==e?void 0:e.results}};function e8(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function e3(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e6(e,e2,t)}function e6(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=i.swrInfiniteConfig,a=i.immutable,l=t.getNextUrl,c=t.getTotalCount,s=t.getData,f=null!=(r=i.fetcher)?r:_.egenFetch,d=eQ((0,o.useCallback)(function(r,n){var o;return 0!=r?t.getNextUrl(n.data):null!=(o=null==e?void 0:e.toString())?o:null},[e]),f,e8({},u,a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{})),y=d.data,b=(d.size,d.setSize),g=function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(d,["data","size","setSize"]),p=l(null==y?void 0:y[y.length-1].data),v=c(null==y||null==(n=y[0])?void 0:n.data);return e8({data:null==y?void 0:y.flatMap(function(e){return s(e.data)}),totalCount:v,hasMore:null!=p,loadMore:function(){var e;b((null!=(e=null==y?void 0:y.length)?e:0)+1)},nextUri:p},g)}function e4(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=e6(e,t,i),a=u.hasMore,l=u.error,c=u.data,s=u.loadMore,f=u.isLoading,d=u.nextUri;return((0,o.useEffect)(function(){a&&!l&&s()},[a,d]),i.partialData)?u:(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},u),n=n={data:a||l?void 0:c,isLoading:f||a},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r)}(e,e2,t)}function e7(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.abortController,n=t.fetchInit,i=t.url,u=t.swrConfig,a=eu(),l=(0,o.useMemo)(function(){var e,t;return null!=(e=null!=(t=null==n?void 0:n.signal)?t:null==r?void 0:r.signal)?e:a.signal},[null==r?void 0:r.signal,null==n?void 0:n.signal,a.signal]);return k(e,(0,o.useCallback)(function(e){var t,r,o=function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error("When using useEgenSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ".concat(e,"."))}(e,i);return(0,_.egenFetch)(o,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},n),r=r={signal:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))},[l,n,i]),u)}function e5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function e9(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(1))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return e5(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e5(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],u=n[1],a=(0,o.useMemo)(function(){return"number"==typeof r&&r>0?Math.max(1,Math.ceil(t.length/r)):1},[t.length,r]),l=(0,o.useMemo)(function(){var e=(i-1)*r,n=(i+0)*r;return t.slice(e,n)},[t,i,r]),c=(0,o.useCallback)(function(e){u(Math.max(1,Math.min(a,e)))},[u,a]),s=(0,o.useCallback)(function(){i<a&&u(i+1)},[i,a,u]),f=(0,o.useCallback)(function(){i>1&&u(i-1)},[i,u]);return(0,o.useMemo)(function(){return{results:l,totalPages:a,currentPage:i,paginated:t.length>r,showNextButton:i<a,showPreviousButton:i>1,goTo:c,goToNext:s,goToPrevious:f}},[l,a,t.length,r,i,c,s,f])}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tt(e,t,r,n){return{pageSizes:(0,o.useMemo)(function(){var r,n=Math.ceil(t/e);return isNaN(n)&&(n=0),((function(e){if(Array.isArray(e))return te(e)})(r=Array(n).keys())||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e){if(e){if("string"==typeof e)return te(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return te(e,void 0)}}(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(t){return(t+1)*e})},[e,t]),pageItemsCount:(0,o.useMemo)(function(){return e>t?t:e*r>t?e*(r-1)+n:e*r},[e,t,r,n])}}function tr(e){var t=E(e),r=t.extensions,n=t.extensionSlotModuleName;return e?r.map(function(t){return function(r){var o=r.state;return i().createElement(u.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n}}},i().createElement(f,{state:o}))}}):[]}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function to(){var e,t=(0,o.useRef)(),r=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(null))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return tn(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tn(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],u=r[1],a=null;if(!i){if(n){var l=(0,_.getSessionStore)().getState();l.loaded&&(a=l.session)}else n=new Promise(function(e){var r=function(r){var n=r.loaded,o=r.session;n&&(e(o),a=o,t.current&&(t.current(),t.current=void 0))};r((0,_.getSessionStore)().getState()),a||(t.current=(0,_.getSessionStore)().subscribe(r))});if(a)u(a);else throw n}(0,o.useEffect)(function(){return t.current||(t.current=(0,_.getSessionStore)().subscribe(function(e){var t=e.loaded,r=e.session;t&&(a=r,u(r))})),function(){t.current&&(t.current(),t.current=void 0)}},[]);var c=i||a;if(!c)if(n)throw console.warn("useSession is in an unexpected state. Attempting to recover."),n;else throw Error("useSession is in an invalid state.");return c}var ti=r(5350),tu=r.n(ti),ta=r(648);function tl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){tl(e,t,r[t])})}return e}var ts={setSessionContext:function(e,t){var r;return null==t?{manuallySetSessionUuid:null}:{manuallySetSessionUuid:t.uuid,entityUuid:null==(r=t.entity)?void 0:r.uuid}},mutateSession:function(e){var t=!0,r=!1,n=void 0;try{for(var o,i,u=Object.values(null!=(o=e.mutateSessionCallbacks)?o:{})[Symbol.iterator]();!(t=(i=u.next()).done);t=!0)(0,i.value)()}catch(e){r=!0,n=e}finally{try{t||null==u.return||u.return()}finally{if(r)throw n}}return{}}};function tf(e){var t=(0,o.useId)();return(0,o.useEffect)(function(){var r,n,o=(0,ey.r_)();return e&&o.setState({mutateSessionCallbacks:(r=tc({},o.getState().mutateSessionCallbacks),n=null!=(n=tl({},t,e))?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r)}),function(){if(e){var r=tc({},o.getState().mutateSessionCallbacks);delete r[t],o.setState({mutateSessionCallbacks:r})}}},[t,e]),m((0,ey.r_)(),ts)}function td(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ey.pJ,r=tf(),n=r.entityUuid,i=r.manuallySetSessionUuid,u=r.setSessionContext,a=e&&n==e?i:null,l="?entity=".concat(e,"&v=").concat(t,"&includeInactive=false"),c="/".concat(a,"?v=").concat(t),s=k(e?"".concat(_.restBaseUrl,"/session").concat(l):null,_.egenFetch),f=s.data,d=s.error,y=s.mutate,b=s.isValidating,g=k(e&&a?"".concat(_.restBaseUrl,"/session").concat(c):null,_.egenFetch),p=g.data,v=g.error,m=g.mutate,h=g.isValidating,S=(0,o.useMemo)(function(){var e;return null!=(e=null==f?void 0:f.data.results.find(function(e){return null===e.stopDatetime}))?e:null},[f]),O=(0,o.useMemo)(function(){return a&&p?p.data:null},[p,a]),E=(0,o.useRef)(null);(0,o.useEffect)(function(){!b&&S&&n===e&&null===i&&u(S),h||(E.current&&O&&E.current.uuid===O.uuid&&!E.current.stopDatetime&&O.stopDatetime&&u(null),E.current=O)},[O,i,S,b,h,n]);var w=(0,o.useCallback)(function(){y(),m()},[y,m]);tf(w);var j=!!(!f||a&&!p),C=!!(a?v:d);return{error:d||v,mutate:w,isValidating:b||h,activeSession:S,currentSession:O,currentSessionIsRetrospective:!!a,isLoading:j&&!C}}function ty(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tb(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)([]))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ty(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ty(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1];return(0,o.useEffect)(function(){var e=(0,ey.Ty)().subscribe(function(e){return n(e)},function(e){return console.error(e)});return function(){return e.unsubscribe()}},[]),r}function tg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}tu().extend(ta);var tp=function(e){var t,r=e.privilege,n=e.fallback,u=e.children,a=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(null))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tg(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tg(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=a[0],c=a[1];return((0,o.useEffect)(function(){var e=(0,_.getCurrentUser)({includeAuthStatus:!1}).subscribe(c);return function(){return e.unsubscribe()}},[]),l&&(0,_.userHasAccess)(r,l))?i().createElement(i().Fragment,null,u):n?i().createElement(i().Fragment,null,n):null}}}]);
1
+ "use strict";(self.webpackChunk_egen_civitas_esm_app_shell=self.webpackChunk_egen_civitas_esm_app_shell||[]).push([["6680"],{3642(e,t,r){var n=r(8783),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,u=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var s="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,s=n[1];return a(function(){o.value=r,o.getSnapshot=t,c(o)&&s({inst:o})},[e,r,t]),u(function(){return c(o)&&s({inst:o}),e(function(){c(o)&&s({inst:o})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:s},8597(e,t,r){e.exports=r(3642)},9167(e,t,r){r.d(t,{y:()=>o});let n=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>u,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=t=e(n,o,i);return i},o=e=>e?n(e):n},715(e,t,r){r.r(t),r.d(t,{useExtensionSlotMeta:()=>e_,useEgenPagination:()=>e1,useConnectivity:()=>eU,createUseStore:()=>h,useBackendConfiguration:()=>eh,useEgenSWR:()=>e4,useOnVisible:()=>eY,useRenderableExtensions:()=>tr,useForceUpdate:()=>eF,useExtensionStore:()=>eD,useSessionContext:()=>td,useBodyScrollLock:()=>eS,useAppContext:()=>el,UserHasAccess:()=>tp,getAsyncExtensionLifecycle:()=>H,getAsyncLifecycle:()=>$,useWorkSessionTypes:()=>tb,ComponentContext:()=>u,ExtensionSlot:()=>C,useConfig:()=>eI,useDebounce:()=>eT,useEgenInfinite:()=>e3,useAssignedExtensions:()=>O,Extension:()=>f,useAbortController:()=>eu,useConnectedExtensions:()=>eA,useExtensionSlotStore:()=>S,usePagination:()=>e9,useSession:()=>to,ConfigurableLink:()=>l,egenComponentDecorator:()=>K,useAssignedExtensionIds:()=>ed,useFeatureFlag:()=>eM,useSessionContextStore:()=>tf,useExtensionInternalStore:()=>ek,useDefineAppContext:()=>en,EgenAppContext:()=>eo,useAttachments:()=>eb,usePaginationInfo:()=>tt,useLocations:()=>eW,useExtensionSlot:()=>E,useStore:()=>v,useOnClickOutside:()=>eH,getLifecycle:()=>G,useStoreWithActions:()=>m,isDesktop:()=>eG,RenderIfValueIsTruthy:()=>ei,getSyncLifecycle:()=>W,useEgenFetchAll:()=>e7,useLayoutType:()=>eK});var n,o=r(8783),i=r.n(o),u=(0,o.createContext)({moduleName:"",featureName:""}),a=r(7774);function l(e){var t=e.to,r=e.templateParams,n=e.onBeforeNavigate,u=e.children,l=function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,["to","templateParams","onBeforeNavigate","children"]);return(0,o.useEffect)(function(){l.href&&console.warn("ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '".concat(l.href,"'")),l.onClick&&console.warn("ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ".concat(t))},[]),i().createElement("a",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({onClick:function(e){0===e.button&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey&&(e.preventDefault(),null==n||n(e),(0,a.oo)({to:t,templateParams:r})),0===e.button&&(e.ctrlKey||e.metaKey)&&(null==n||n(e)),0===e.button&&e.shiftKey&&(null==n||n(e)),1===e.button&&(null==n||n(e))},href:(0,a.JG)(t,r)},l),u)}var c=r(7267);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}var f=function(e){var t=e.state,r=(e.children,function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,["state","children"])),n=(0,o.useContext)(u).extension,a=(0,o.useRef)(null),l=(0,o.useRef)(Promise.resolve()),f=(0,o.useCallback)(function(e){(null==n?void 0:n.extensionSlotName)&&n.extensionSlotModuleName&&n.extensionSlotModuleName&&!a.current&&(0,c.wG)(e,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,t).then(function(e){a.current=e})},[]);return(0,o.useEffect)(function(){return function(){if(a&&a.current)switch(a.current.getStatus()){case"MOUNTING":a.current.mountPromise.then(function(){var e;(null==(e=a.current)?void 0:e.getStatus())==="MOUNTED"&&a.current.unmount()});break;case"MOUNTED":a.current.unmount();break;case"UPDATING":l.current&&l.current.then(function(){var e;(null==(e=a.current)?void 0:e.getStatus())==="MOUNTED"&&a.current.unmount()})}}},[]),(0,o.useEffect)(function(){a.current&&a.current.update&&"UNMOUNTING"!==a.current.getStatus()&&Promise.all([a.current.mountPromise,l.current]).then(function(){var e;(null==a||null==(e=a.current)?void 0:e.getStatus())==="MOUNTED"&&a.current.update&&(l.current=a.current.update(s({},t)).catch(function(e){var t,r;if((null!=(r=Error)&&"u">typeof Symbol&&r[Symbol.hasInstance]?!r[Symbol.hasInstance](e):!(e instanceof r))||!e.message.includes("minified message #32")||(null==(t=a.current)?void 0:t.getStatus())==="MOUNTED")throw e}))})},[t]),n?i().createElement("div",s({ref:f,"data-extension-id":null==n?void 0:n.extensionId,style:{position:"relative"}},r)):null};function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function b(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}}function g(e,t){"function"==typeof t&&(t=t(e));var r={},n=!0,o=!1,i=void 0;try{for(var u,a=Object.entries(t)[Symbol.iterator]();!(n=(u=a.next()).done);n=!0)!function(){var t,n=(t=u.value,function(e){if(Array.isArray(e))return e}(t)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||b(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];r[o]=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];e.setState(function(e){return i.apply(void 0,[e].concat(function(e){if(Array.isArray(e))return d(e)}(r)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||b(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))})}}()}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}var p=function(){return function(e){return e}};function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p(),r=arguments.length>2?arguments[2]:void 0,n=(0,o.useCallback)(function(t){return e.subscribe(t)},[e]),i=(0,o.useCallback)(function(){return t(e.getState())},[e,t]);return y({},(0,o.useSyncExternalStore)(n,i,i),(0,o.useMemo)(function(){return r?g(e,r):{}},[e,r]))}function m(e,t){return v(e,p(),t)}function h(e){return function(t){var r=(0,o.useCallback)(function(t){return e.subscribe(t)},[]),n=(0,o.useCallback)(function(){return e.getState()},[]);return y({},(0,o.useSyncExternalStore)(r,n,n),(0,o.useMemo)(function(){return t?g(e,t):{}},[t]))}}var S=function(e){return v((0,c.zF)(),function(t){var r;return null==(r=t.slots)?void 0:r[e]})};function O(e){var t,r=S(e);return null!=(t=null==r?void 0:r.assignedExtensions)?t:[]}function E(e,t){var r=(0,o.useContext)(u).moduleName,n=(0,o.useRef)(!0);if(!r)throw Error("ComponentContext has not been provided. This should come from @egen-civitas/esm-react-utils.");return(0,o.useEffect)(function(){(0,c.FY)(r,e,t),n.current=!1},[]),(0,o.useEffect)(function(){n.current||(0,c.ap)(e,t)},[e,t]),{extensions:O(e),extensionSlotName:e,extensionSlotModuleName:r}}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function j(e){return e}function C(e){var t,r,n=e.name,a=e.extensionSlotName,l=e.select,c=void 0===l?j:l,s=e.children,d=e.state,y=e.style,b=function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,["name","extensionSlotName","select","children","state","style"]);if(s&&d)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");var g=null!=n?n:a,p=(0,o.useRef)(null),v=E(g,d),m=v.extensions,h=v.extensionSlotModuleName,S=(0,o.useMemo)(function(){return c(m)},[c,m]),O=(0,o.useMemo)(function(){if("function"==typeof s&&!i().isValidElement(s))return S.map(function(e){return s(e,d)})},[s,S]);return i().createElement("div",w({ref:p,"data-extension-slot-name":g,"data-extension-slot-module-name":h,style:(t=w({},y),r=r={position:"relative"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t)},b),g&&(null==S?void 0:S.map(function(e,t){var r,n;return i().createElement(u.Provider,{key:e.id,value:{moduleName:h,featureName:"",extension:{extensionId:e.id,extensionSlotName:g,extensionSlotModuleName:h}}},null!=(r=null!=(n=null==O?void 0:O[t])?n:"function"!=typeof s?s:null)?r:i().createElement(f,{state:d}))})))}var I=r(8279),A=r(2879),x=r(3511),P=r(8597),R=r(4555);let U=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),N={dedupe:!0},T=R.OBJECT.defineProperty(R.SWRConfig,"defaultValue",{value:R.defaultConfig}),k=(0,R.withArgs)((e,t,r)=>{let{cache:n,compare:i,suspense:u,fallbackData:a,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:s,refreshWhenHidden:f,refreshWhenOffline:d,keepPreviousData:y}=r,[b,g,p,v]=R.SWRGlobalState.get(n),[m,h]=(0,R.serialize)(e),S=(0,o.useRef)(!1),O=(0,o.useRef)(!1),E=(0,o.useRef)(m),w=(0,o.useRef)(t),j=(0,o.useRef)(r),C=()=>j.current.isVisible()&&j.current.isOnline(),[I,A,x,T]=(0,R.createCacheHelper)(n,m),k=(0,o.useRef)({}).current,_=(0,R.isUndefined)(a)?r.fallback[m]:a,D=(e,t)=>{for(let r in k)if("data"===r){if(!i(e[r],t[r])&&(!(0,R.isUndefined)(e[r])||!i($,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},L=(0,o.useMemo)(()=>{let e=!!m&&!!t&&((0,R.isUndefined)(l)?!j.current.isPaused()&&!u&&(!!(0,R.isUndefined)(c)||c):l),r=t=>{let r=(0,R.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=I(),o=T(),i=r(n),a=n===o?i:r(o),s=i;return[()=>{let e=r(I());return D(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[n,m]),M=(0,P.useSyncExternalStore)((0,o.useCallback)(e=>x(m,(t,r)=>{D(r,t)||e()}),[n,m]),L[0],L[1]),V=!S.current,F=b[m]&&b[m].length>0,z=M.data,B=(0,R.isUndefined)(z)?_:z,K=M.error,G=(0,o.useRef)(B),$=y?(0,R.isUndefined)(z)?G.current:z:B,W=(!F||!!(0,R.isUndefined)(K))&&(V&&!(0,R.isUndefined)(l)?l:!j.current.isPaused()&&(u?!(0,R.isUndefined)(B)&&c:(0,R.isUndefined)(B)||c)),H=!!(m&&t&&V&&W),Y=(0,R.isUndefined)(M.isValidating)?H:M.isValidating,J=(0,R.isUndefined)(M.isLoading)?H:M.isLoading,q=(0,o.useCallback)(async e=>{let t,n,o=w.current;if(!m||!o||O.current||j.current.isPaused())return!1;let u=!0,a=e||{},l=!p[m]||!a.dedupe,c=()=>R.IS_REACT_LEGACY?!O.current&&m===E.current&&S.current:m===E.current,s={isValidating:!1,isLoading:!1},f=()=>{A(s)},d=()=>{let e=p[m];e&&e[1]===n&&delete p[m]},y={isValidating:!0};(0,R.isUndefined)(I().data)&&(y.isLoading=!0);try{if(l&&(A(y),r.loadingTimeout&&(0,R.isUndefined)(I().data)&&setTimeout(()=>{u&&c()&&j.current.onLoadingSlow(m,r)},r.loadingTimeout),p[m]=[o(h),(0,R.getTimestamp)()]),[t,n]=p[m],t=await t,l&&setTimeout(d,r.dedupingInterval),!p[m]||p[m][1]!==n)return l&&c()&&j.current.onDiscarded(m),!1;s.error=R.UNDEFINED;let e=g[m];if(!(0,R.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&j.current.onDiscarded(m),!1;let a=I().data;s.data=i(a,t)?a:t,l&&c()&&j.current.onSuccess(t,m,r)}catch(r){d();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(s.error=r,l&&c()&&(e.onError(r,m,e),(!0===t||(0,R.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||C())&&e.onErrorRetry(r,m,e,e=>{let t=b[m];t&&t[0]&&t[0](R.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return u=!1,f(),!0},[m,n]),X=(0,o.useCallback)((...e)=>(0,R.internalMutate)(n,E.current,...e),[]);if((0,R.useIsomorphicLayoutEffect)(()=>{w.current=t,j.current=r,(0,R.isUndefined)(z)||(G.current=z)}),(0,R.useIsomorphicLayoutEffect)(()=>{if(!m)return;let e=q.bind(R.UNDEFINED,N),t=0,r=(0,R.subscribeCallback)(m,b,(r,n={})=>{if(r==R.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&C()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==R.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&C()&&e();else if(r==R.revalidateEvents.MUTATE_EVENT)return q();else if(r==R.revalidateEvents.ERROR_REVALIDATE_EVENT)return q(n)});return O.current=!1,E.current=m,S.current=!0,A({_k:h}),W&&((0,R.isUndefined)(B)||R.IS_SERVER?e():(0,R.rAF)(e)),()=>{O.current=!0,r()}},[m]),(0,R.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,R.isFunction)(s)?s(I().data):s;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!I().error&&(f||j.current.isVisible())&&(d||j.current.isOnline())?q(N).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[s,f,d,m]),(0,o.useDebugValue)($),u&&(0,R.isUndefined)(B)&&m){if(!R.IS_REACT_LEGACY&&R.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");w.current=t,j.current=r,O.current=!1;let e=v[m];if((0,R.isUndefined)(e)||U(X(e)),(0,R.isUndefined)(K)){let e=q(N);(0,R.isUndefined)($)||(e.status="fulfilled",e.value=!0),U(e)}else throw K}return{mutate:X,get data(){return k.data=!0,$},get error(){return k.error=!0,K},get isValidating(){return k.isValidating=!0,Y},get isLoading(){return k.isLoading=!0,J}}});var _=r(70);function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(V=function(){return!!e})()}var F={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},z=new Map,B={errorRetryCount:3,fetcher:_.egenFetch,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:function(e){var t;if(null!=(t=_.EgenFetchError)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t){var r=e.response.status;return!!(r>=500)||401===r||403===r||429===r}return!0},provider:function(){return z}};function K(e){if((void 0===e?"undefined":M(e))!=="object"||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");var t=Object.assign({},F,e),r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},B,t.swrConfig);return function(e){var n,a,l,c;return a=n=function(n){var a;if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");function l(e){var r,n,o;if(!(this instanceof l))throw TypeError("Cannot call a class as a function");return n=l,o=[e],n=D(n),(r=function(e,t){if(t&&("object"===M(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,V()?Reflect.construct(n,o||[],D(this).constructor):n.apply(this,o))).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}},r}return l.prototype=Object.create(n&&n.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),n&&L(l,n),a=[{key:"componentDidCatch",value:function(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(function(){throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}},{key:"render",value:function(){if(this.state.caughtError)return i().createElement("div",null,"An error has occurred. Please try reloading the page.");var n=i().createElement(o.Suspense,{fallback:null},i().createElement(T,{value:r},i().createElement(u.Provider,{value:this.state.config},t.disableTranslations?i().createElement(e,this.props):i().createElement(x.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?"".concat(this.state.config.moduleName,"___").concat(this.state.config.extension.extensionSlotName,"___").concat(this.state.config.extension.extensionId):this.state.config.moduleName},i().createElement(e,this.props)))));return t.strictMode&&i().StrictMode?i().createElement(i().StrictMode,null,n):n}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(l.prototype,a),l}(i().Component),l="displayName",c="EgenReactComponent(".concat(t.featureName,")"),l in a?Object.defineProperty(a,l,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[l]=c,n}}function G(e,t){return(0,A.A)({React:i(),ReactDOMClient:I,rootComponent:K(t)(e)})}function $(e,t){return function(){return e().then(function(e){return G(e.default,t)})}}function W(e,t){return function(){return Promise.resolve(G(e,t))}}var H=$,Y=r(9167),J=r(1442),q=(0,Y.y)()(function(){return{}});(0,J.registerGlobalStore)("egen-app-context",q);var X={};function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=q.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function Q(e,t){q.setState(function(r){return e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)})}function ee(e){return null===e?null:Object.freeze(Object.assign({},e))}var et=r(8254),er=new Map;function en(e,t){var r=(0,o.useRef)(null!=t?t:{}),n=(0,o.useRef)(function(t){return Q(e,t)}),i=(0,o.useRef)(Symbol());return(0,o.useEffect)(function(){var r=null!=t?t:{},n=i.current;return null===Z(e)?!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X;q.setState(function(r){var n,o;if(e in r)throw Error("Attempted to re-register namespace ".concat(e," in the app context. Each namespace must be unregistered before the name can be registered again."));return Object.assign({},r,(n={},o=t===X?{}:t,e in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n))})}(e,r):(console.warn("Namespace ".concat(e," is already registered in the app context. ")+"This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context."),Q(e,function(){return r})),er.set(e,n),function(){er.get(e)===n&&(q.setState(function(t){return e in t&&delete t[e],t}),er.delete(e))}},[e]),(0,o.useEffect)(function(){var n=null!=t?t:{};(0,et.b)(r.current,n)||(Q(e,function(){return n}),r.current=n)},[t]),n.current}function eo(e){return en(e.namespace,e.value),null}var ei=function(e){var t=e.children,r=e.value,n=e.fallback;return r?i().createElement(i().Fragment,null,t):n?i().createElement(i().Fragment,null,n):null};function eu(){var e=(0,o.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,o.useEffect)(function(){var t=e.current;return function(){return null==t?void 0:t.abort()}},[]),e.current}function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function el(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return null!=e?e:{}},n=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(function(){if(!ec(e)){var t=Z(e);if(null!==t)return r?r(t):t}}))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ea(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ea(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],u=n[1];return(0,o.useEffect)(function(){if(ec(e))throw Error('The namespace supplied to useAppContext must be a non-empty string, but was "'.concat(e,'".'))},[e]),(0,o.useEffect)(function(){var t,n;return(t=function(e){if(null==e)return void u(void 0);var t=r?r(e):e;u(function(e){return(0,et.b)(e,t)?e:t})})(ee(n=Z(e))),q.subscribe(function(r){var o=e in r?r[e]:null;o!==n&&(n=o,t(ee(o)))})},[e,r]),i}function ec(e){return"string"!=typeof e||0===e.trim().length}var es=r(4809);function ef(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ed(e){var t,r=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)([]))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ef(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ef(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r[0],i=r[1];return(0,o.useEffect)(function(){return(0,c.zF)().subscribe(function(t){var r,o,u=null!=(r=null==(o=t.slots[e])?void 0:o.assignedExtensions.map(function(e){return e.id}))?r:[];(0,es.A)(u,n)||i(u)})},[]),n}var ey=r(3400);function eb(e,t){var r=k("".concat(ey.Zu,"?entity=").concat(e,"&includeOrphan=").concat(t),_.egenFetch),n=r.data,i=r.error,u=r.mutate,a=r.isLoading,l=r.isValidating;return(0,o.useMemo)(function(){var e;return{isLoading:a,data:null!=(e=null==n?void 0:n.data.results)?e:[],error:i,mutate:u,isValidating:l}},[n,i,a,l,u])}let eg=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),ep={dedupe:!0};R.OBJECT.defineProperty(R.SWRConfig,"defaultValue",{value:R.defaultConfig});let ev=(0,R.withArgs)((e,t,r)=>{let{cache:n,compare:i,suspense:u,fallbackData:a,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:s,refreshWhenHidden:f,refreshWhenOffline:d,keepPreviousData:y}=r,[b,g,p,v]=R.SWRGlobalState.get(n),[m,h]=(0,R.serialize)(e),S=(0,o.useRef)(!1),O=(0,o.useRef)(!1),E=(0,o.useRef)(m),w=(0,o.useRef)(t),j=(0,o.useRef)(r),C=()=>j.current.isVisible()&&j.current.isOnline(),[I,A,x,U]=(0,R.createCacheHelper)(n,m),N=(0,o.useRef)({}).current,T=(0,R.isUndefined)(a)?r.fallback[m]:a,k=(e,t)=>{for(let r in N)if("data"===r){if(!i(e[r],t[r])&&(!(0,R.isUndefined)(e[r])||!i(K,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},_=(0,o.useMemo)(()=>{let e=!!m&&!!t&&((0,R.isUndefined)(l)?!j.current.isPaused()&&!u&&(!!(0,R.isUndefined)(c)||c):l),r=t=>{let r=(0,R.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=I(),o=U(),i=r(n),a=n===o?i:r(o),s=i;return[()=>{let e=r(I());return k(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[n,m]),D=(0,P.useSyncExternalStore)((0,o.useCallback)(e=>x(m,(t,r)=>{k(r,t)||e()}),[n,m]),_[0],_[1]),L=!S.current,M=b[m]&&b[m].length>0,V=D.data,F=(0,R.isUndefined)(V)?T:V,z=D.error,B=(0,o.useRef)(F),K=y?(0,R.isUndefined)(V)?B.current:V:F,G=(!M||!!(0,R.isUndefined)(z))&&(L&&!(0,R.isUndefined)(l)?l:!j.current.isPaused()&&(u?!(0,R.isUndefined)(F)&&c:(0,R.isUndefined)(F)||c)),$=!!(m&&t&&L&&G),W=(0,R.isUndefined)(D.isValidating)?$:D.isValidating,H=(0,R.isUndefined)(D.isLoading)?$:D.isLoading,Y=(0,o.useCallback)(async e=>{let t,n,o=w.current;if(!m||!o||O.current||j.current.isPaused())return!1;let u=!0,a=e||{},l=!p[m]||!a.dedupe,c=()=>R.IS_REACT_LEGACY?!O.current&&m===E.current&&S.current:m===E.current,s={isValidating:!1,isLoading:!1},f=()=>{A(s)},d=()=>{let e=p[m];e&&e[1]===n&&delete p[m]},y={isValidating:!0};(0,R.isUndefined)(I().data)&&(y.isLoading=!0);try{if(l&&(A(y),r.loadingTimeout&&(0,R.isUndefined)(I().data)&&setTimeout(()=>{u&&c()&&j.current.onLoadingSlow(m,r)},r.loadingTimeout),p[m]=[o(h),(0,R.getTimestamp)()]),[t,n]=p[m],t=await t,l&&setTimeout(d,r.dedupingInterval),!p[m]||p[m][1]!==n)return l&&c()&&j.current.onDiscarded(m),!1;s.error=R.UNDEFINED;let e=g[m];if(!(0,R.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&j.current.onDiscarded(m),!1;let a=I().data;s.data=i(a,t)?a:t,l&&c()&&j.current.onSuccess(t,m,r)}catch(r){d();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(s.error=r,l&&c()&&(e.onError(r,m,e),(!0===t||(0,R.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||C())&&e.onErrorRetry(r,m,e,e=>{let t=b[m];t&&t[0]&&t[0](R.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return u=!1,f(),!0},[m,n]),J=(0,o.useCallback)((...e)=>(0,R.internalMutate)(n,E.current,...e),[]);if((0,R.useIsomorphicLayoutEffect)(()=>{w.current=t,j.current=r,(0,R.isUndefined)(V)||(B.current=V)}),(0,R.useIsomorphicLayoutEffect)(()=>{if(!m)return;let e=Y.bind(R.UNDEFINED,ep),t=0,r=(0,R.subscribeCallback)(m,b,(r,n={})=>{if(r==R.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&C()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==R.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&C()&&e();else if(r==R.revalidateEvents.MUTATE_EVENT)return Y();else if(r==R.revalidateEvents.ERROR_REVALIDATE_EVENT)return Y(n)});return O.current=!1,E.current=m,S.current=!0,A({_k:h}),G&&((0,R.isUndefined)(F)||R.IS_SERVER?e():(0,R.rAF)(e)),()=>{O.current=!0,r()}},[m]),(0,R.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,R.isFunction)(s)?s(I().data):s;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!I().error&&(f||j.current.isVisible())&&(d||j.current.isOnline())?Y(ep).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[s,f,d,m]),(0,o.useDebugValue)(K),u&&(0,R.isUndefined)(F)&&m){if(!R.IS_REACT_LEGACY&&R.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");w.current=t,j.current=r,O.current=!1;let e=v[m];if((0,R.isUndefined)(e)||eg(J(e)),(0,R.isUndefined)(z)){let e=Y(ep);(0,R.isUndefined)(K)||(e.status="fulfilled",e.value=!0),eg(e)}else throw z}return{mutate:J,get data(){return N.data=!0,K},get error(){return N.error=!0,z},get isValidating(){return N.isValidating=!0,W},get isLoading(){return N.isLoading=!0,H}}}),em=(0,R.withMiddleware)(ev,e=>(t,r,n)=>(n.revalidateOnFocus=!1,n.revalidateIfStale=!1,n.revalidateOnReconnect=!1,e(t,r,n)));function eh(e){var t=em(null!=e?e:"".concat(_.restBaseUrl,"/config"),_.egenFetch);return(0,o.useMemo)(function(){var e;return{backendConfiguration:null==(e=t.data)?void 0:e.data,isLoadingBackendConfiguration:t.isLoading,mutateBackendConfiguration:t.mutate,errorFetchingBackendConfiguration:t.error}},[t])}function eS(e){(0,o.useEffect)(function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}},[e])}var eO=r(3645);function eE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ew(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function ej(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],u=!0,a=!1;try{for(o=o.call(e);!(u=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);u=!0);}catch(e){a=!0,n=e}finally{try{u||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eE(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eC={};function eI(e){var t,r=(0,o.useContext)(u),n=r.moduleName,i=r.extension,a=null!=(t=null==e?void 0:e.externalModuleName)?t:n;if(!a&&!i)throw Error('No ComponentContext has been provided. This should come from "egenComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var l=function(e){var t,r,n,i=(0,o.useMemo)(function(){return(0,eO.getConfigStore)(e)},[e]),u=(r=(t=ej((0,o.useState)(function(){var e=i.getState();return e.loaded&&e.config?e.config:null}),2))[0],n=t[1],(0,o.useEffect)(function(){return null==i?void 0:i.subscribe(function(e){e.loaded&&e.config&&n(e.config)})},[i]),r);if(!u)throw eC[e]||(eC[e]=new Promise(function(e){var t=i.subscribe(function(r){r.loaded&&r.config&&(e(r.config),t())})})),eC[e];return u}(a),c=function(e){var t=(0,o.useMemo)(eO.getExtensionsConfigStore,[]),r=(i=(n=ej((0,o.useState)(e?function(){var r=t.getState(),n=(0,eO.getExtensionConfigFromStore)(r,e.extensionSlotName,e.extensionId);if(n.loaded&&n.config)return n.config}:null),2))[0],u=n[1],(0,o.useEffect)(function(){if(e)return t.subscribe(function(t){var r=(0,eO.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);r.loaded&&r.config&&!(0,es.A)(r.config,i)&&u(r.config)})},[t,e,i]),i);if(!r&&e){var n,i,u,a="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!eC[a]&&t&&(eC[a]=new Promise(function(r){var n=t.subscribe(function(t){var o=(0,eO.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),eC[a]}return r||{}}(i);return(0,o.useMemo)(function(){return(null==e?void 0:e.externalModuleName)&&a===e.externalModuleName?ew({},l):ew({},l,c)},[a,null==e?void 0:e.externalModuleName,l,c])}var eA=O,ex=r(9726),eP=r(2316);function eR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eU(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)((0,eP.s)()))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eR(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eR(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1];return(0,o.useEffect)(function(){return(0,ex.gj)(function(e){return n(e.online)})},[]),r}function eN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eT(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(e))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eN(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eN(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],u=n[1];return(0,o.useEffect)(function(){var t=setTimeout(function(){u(e)},r);return function(){clearTimeout(t)}},[e,r]),i}var ek=h((0,c.a9)());function e_(e){var t=O(e);return(0,o.useMemo)(function(){return Object.fromEntries(t.map(function(e){return[e.name,e.meta]}))},[t])}var eD=h((0,c.zF)()),eL=r(5794);function eM(e){var t,r;return null!=(t=null==(r=v(eL.jX).flags[e])?void 0:r.enabled)&&t}function eV(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eF(){var e,t=(function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(0))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eV(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eV(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return(0,o.useCallback)(function(){t(function(e){return e+1})},[])}function ez(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eB(){var e="tablet";return document.body.classList.forEach(function(t){switch(t){case"egen-breakpoint-lt-tablet":e="phone";break;case"egen-breakpoint-gt-small-desktop":e="large-desktop";break;case"egen-breakpoint-gt-tablet":e="small-desktop"}}),e}function eK(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(eB))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ez(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ez(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1];return(0,o.useEffect)(function(){var e=function(){n(eB())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]),r}var eG=function(e){return"small-desktop"===e||"large-desktop"===e};function e$(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eW(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)([]))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return e$(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e$(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],u=n[1];return(0,o.useEffect)(function(){var e=(0,ey.Vs)(t,r).subscribe(function(e){u(e)},function(e){console.error(e)});return function(){return e.unsubscribe()}},[t,r]),i}function eH(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=(0,o.useRef)(null);return(0,o.useEffect)(function(){var n=function(n){var o,i;t&&r.current&&n.target&&(o=n.target,null!=(i=Node)&&"u">typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i)&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),function(){window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function eY(e){var t=(0,o.useRef)();return(0,o.useEffect)(function(){var r=new IntersectionObserver(function(t){var r=!0,n=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(r=(i=u.next()).done);r=!0)if(i.value.isIntersecting)return void e()}catch(e){n=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(n)throw o}}},{threshold:1});return t.current&&r.observe(t.current),function(){t.current&&r.unobserve(t.current)}},[t.current,e]),t}let eJ=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),eq={dedupe:!0};R.OBJECT.defineProperty(R.SWRConfig,"defaultValue",{value:R.defaultConfig});let eX=(0,R.withArgs)((e,t,r)=>{let{cache:n,compare:i,suspense:u,fallbackData:a,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:s,refreshWhenHidden:f,refreshWhenOffline:d,keepPreviousData:y}=r,[b,g,p,v]=R.SWRGlobalState.get(n),[m,h]=(0,R.serialize)(e),S=(0,o.useRef)(!1),O=(0,o.useRef)(!1),E=(0,o.useRef)(m),w=(0,o.useRef)(t),j=(0,o.useRef)(r),C=()=>j.current.isVisible()&&j.current.isOnline(),[I,A,x,U]=(0,R.createCacheHelper)(n,m),N=(0,o.useRef)({}).current,T=(0,R.isUndefined)(a)?r.fallback[m]:a,k=(e,t)=>{for(let r in N)if("data"===r){if(!i(e[r],t[r])&&(!(0,R.isUndefined)(e[r])||!i(K,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},_=(0,o.useMemo)(()=>{let e=!!m&&!!t&&((0,R.isUndefined)(l)?!j.current.isPaused()&&!u&&(!!(0,R.isUndefined)(c)||c):l),r=t=>{let r=(0,R.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=I(),o=U(),i=r(n),a=n===o?i:r(o),s=i;return[()=>{let e=r(I());return k(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[n,m]),D=(0,P.useSyncExternalStore)((0,o.useCallback)(e=>x(m,(t,r)=>{k(r,t)||e()}),[n,m]),_[0],_[1]),L=!S.current,M=b[m]&&b[m].length>0,V=D.data,F=(0,R.isUndefined)(V)?T:V,z=D.error,B=(0,o.useRef)(F),K=y?(0,R.isUndefined)(V)?B.current:V:F,G=(!M||!!(0,R.isUndefined)(z))&&(L&&!(0,R.isUndefined)(l)?l:!j.current.isPaused()&&(u?!(0,R.isUndefined)(F)&&c:(0,R.isUndefined)(F)||c)),$=!!(m&&t&&L&&G),W=(0,R.isUndefined)(D.isValidating)?$:D.isValidating,H=(0,R.isUndefined)(D.isLoading)?$:D.isLoading,Y=(0,o.useCallback)(async e=>{let t,n,o=w.current;if(!m||!o||O.current||j.current.isPaused())return!1;let u=!0,a=e||{},l=!p[m]||!a.dedupe,c=()=>R.IS_REACT_LEGACY?!O.current&&m===E.current&&S.current:m===E.current,s={isValidating:!1,isLoading:!1},f=()=>{A(s)},d=()=>{let e=p[m];e&&e[1]===n&&delete p[m]},y={isValidating:!0};(0,R.isUndefined)(I().data)&&(y.isLoading=!0);try{if(l&&(A(y),r.loadingTimeout&&(0,R.isUndefined)(I().data)&&setTimeout(()=>{u&&c()&&j.current.onLoadingSlow(m,r)},r.loadingTimeout),p[m]=[o(h),(0,R.getTimestamp)()]),[t,n]=p[m],t=await t,l&&setTimeout(d,r.dedupingInterval),!p[m]||p[m][1]!==n)return l&&c()&&j.current.onDiscarded(m),!1;s.error=R.UNDEFINED;let e=g[m];if(!(0,R.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&j.current.onDiscarded(m),!1;let a=I().data;s.data=i(a,t)?a:t,l&&c()&&j.current.onSuccess(t,m,r)}catch(r){d();let e=j.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(s.error=r,l&&c()&&(e.onError(r,m,e),(!0===t||(0,R.isFunction)(t)&&t(r))&&(!j.current.revalidateOnFocus||!j.current.revalidateOnReconnect||C())&&e.onErrorRetry(r,m,e,e=>{let t=b[m];t&&t[0]&&t[0](R.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return u=!1,f(),!0},[m,n]),J=(0,o.useCallback)((...e)=>(0,R.internalMutate)(n,E.current,...e),[]);if((0,R.useIsomorphicLayoutEffect)(()=>{w.current=t,j.current=r,(0,R.isUndefined)(V)||(B.current=V)}),(0,R.useIsomorphicLayoutEffect)(()=>{if(!m)return;let e=Y.bind(R.UNDEFINED,eq),t=0,r=(0,R.subscribeCallback)(m,b,(r,n={})=>{if(r==R.revalidateEvents.FOCUS_EVENT){let r=Date.now();j.current.revalidateOnFocus&&r>t&&C()&&(t=r+j.current.focusThrottleInterval,e())}else if(r==R.revalidateEvents.RECONNECT_EVENT)j.current.revalidateOnReconnect&&C()&&e();else if(r==R.revalidateEvents.MUTATE_EVENT)return Y();else if(r==R.revalidateEvents.ERROR_REVALIDATE_EVENT)return Y(n)});return O.current=!1,E.current=m,S.current=!0,A({_k:h}),G&&((0,R.isUndefined)(F)||R.IS_SERVER?e():(0,R.rAF)(e)),()=>{O.current=!0,r()}},[m]),(0,R.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,R.isFunction)(s)?s(I().data):s;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!I().error&&(f||j.current.isVisible())&&(d||j.current.isOnline())?Y(eq).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[s,f,d,m]),(0,o.useDebugValue)(K),u&&(0,R.isUndefined)(F)&&m){if(!R.IS_REACT_LEGACY&&R.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");w.current=t,j.current=r,O.current=!1;let e=v[m];if((0,R.isUndefined)(e)||eJ(J(e)),(0,R.isUndefined)(z)){let e=Y(eq);(0,R.isUndefined)(K)||(e.status="fulfilled",e.value=!0),eJ(e)}else throw z}return{mutate:J,get data(){return N.data=!0,K},get error(){return N.error=!0,z},get isValidating(){return N.isValidating=!0,W},get isLoading(){return N.isLoading=!0,H}}}),eZ=Promise.resolve(),eQ=(0,R.withMiddleware)(eX,e=>(t,r,n)=>{let i,u=(0,o.useRef)(!1),{cache:a,initialSize:l=1,revalidateAll:c=!1,persistSize:s=!1,revalidateFirstPage:f=!0,revalidateOnMount:d=!1,parallel:y=!1}=n,[,,,b]=R.SWRGlobalState.get(R.cache);try{(i=(0,R.serialize)(t?t(0,null):null)[0])&&(i=R.INFINITE_PREFIX+i)}catch(e){}let[g,p,v]=(0,R.createCacheHelper)(a,i),m=(0,o.useCallback)(()=>(0,R.isUndefined)(g()._l)?l:g()._l,[a,i,l]);(0,P.useSyncExternalStore)((0,o.useCallback)(e=>i?v(i,()=>{e()}):()=>{},[a,i]),m,m);let h=(0,o.useCallback)(()=>{let e=g()._l;return(0,R.isUndefined)(e)?l:e},[i,l]),S=(0,o.useRef)(h());(0,R.useIsomorphicLayoutEffect)(()=>{if(!u.current){u.current=!0;return}i&&p({_l:s?S.current:h()})},[i,a]);let O=d&&!u.current,E=e(i,async e=>{let o=g()._i,i=g()._r;p({_r:R.UNDEFINED});let u=[],l=h(),[s]=(0,R.createCacheHelper)(a,e),d=s().data,v=[],m=null;for(let e=0;e<l;++e){let[l,s]=(0,R.serialize)(t(e,y?null:m));if(!l)break;let[g,p]=(0,R.createCacheHelper)(a,l),h=g().data,S=c||o||(0,R.isUndefined)(h)||f&&!e&&!(0,R.isUndefined)(d)||O||d&&!(0,R.isUndefined)(d[e])&&!n.compare(d[e],h);if(r&&("function"==typeof i?i(h,s):S)){let t=async()=>{if(l in b){let e=b[l];delete b[l],h=await e}else h=await r(s);p({data:h,_k:s}),u[e]=h};y?v.push(t):await t()}else u[e]=h;y||(m=h)}return y&&await Promise.all(v.map(e=>e())),p({_i:R.UNDEFINED}),u},n),w=(0,o.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},n=!1!==r.revalidate;return i?(n&&((0,R.isUndefined)(e)?p({_i:!0,_r:r.revalidate}):p({_i:!1,_r:r.revalidate})),arguments.length?E.mutate(e,{...r,revalidate:n}):E.mutate()):eZ},[i,a]),j=(0,o.useCallback)(e=>{let r;if(!i)return eZ;let[,n]=(0,R.createCacheHelper)(a,i);if((0,R.isFunction)(e)?r=e(h()):"number"==typeof e&&(r=e),"number"!=typeof r)return eZ;n({_l:r}),S.current=r;let o=[],[u]=(0,R.createCacheHelper)(a,i),l=null;for(let e=0;e<r;++e){let[r]=(0,R.serialize)(t(e,l)),[n]=(0,R.createCacheHelper)(a,r),i=r?n().data:R.UNDEFINED;if((0,R.isUndefined)(i))return w(u().data);o.push(i),l=i}return w(o)},[i,a,w,h]);return{size:h(),setSize:j,mutate:w,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}});function e0(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function e1(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(e,t,r){var n,i,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=r.getPaginatedUrl,l=r.getTotalCount,c=r.getCurrentPageSize,s=r.getData,f=u.immutable,d=u.swrConfig,y=null!=(i=u.fetcher)?i:_.egenFetch,b=function(e){if(Array.isArray(e))return e}(n=(0,o.useState)(1))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(n)||function(e){if(e){if("string"==typeof e)return e0(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e0(e,2)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=b[0],p=b[1],v=(0,o.useRef)(NaN),m=(0,o.useRef)(NaN),h=(g-1)*t,S=(f?em:k)((0,o.useMemo)(function(){return a(e,t,h)},[e,t,h]),y,d),O=S.data,E=function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(S,["data"]);(null==O?void 0:O.data)&&(v.current=l(null==O?void 0:O.data),m.current=c(null==O?void 0:O.data));var w=Math.ceil(v.current/t),j=(0,o.useCallback)(function(e){0<e&&e<=w?p(e):console.warn("Invalid attempt to go to out of bounds page: "+e)},[e,g,w]),C=(0,o.useCallback)(function(){j(g+1)},[e,g,w]),I=(0,o.useCallback)(function(){j(g-1)},[e,g,w]);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({data:s(null==O?void 0:O.data),totalPages:w,totalCount:v.current,currentPage:g,currentPageSize:m,paginated:w>1,showNextButton:g<w,showPreviousButton:g>1,goTo:j,goToNext:C,goToPrevious:I},E)}(e,t,e2,r)}var e2={getPaginatedUrl:function(e,t,r){if(!e)return null;var n=new URL((0,_.makeUrl)(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()},getNextUrl:function(e){var t,r,n=null==e||null==(r=e.links)||null==(t=r.find(function(e){return"next"==e.rel}))?void 0:t.uri;if(!n)return null;var o=new URL(n);return o.host=window.location.host,o.protocol=window.location.protocol,o.toString()},getTotalCount:function(e){var t;return null!=(t=null==e?void 0:e.totalCount)?t:NaN},getCurrentPageSize:function(e){var t,r;return null!=(t=null==e||null==(r=e.results)?void 0:r.length)?t:NaN},getData:function(e){return null==e?void 0:e.results}};function e8(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function e3(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e6(e,e2,t)}function e6(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=i.swrInfiniteConfig,a=i.immutable,l=t.getNextUrl,c=t.getTotalCount,s=t.getData,f=null!=(r=i.fetcher)?r:_.egenFetch,d=eQ((0,o.useCallback)(function(r,n){var o;return 0!=r?t.getNextUrl(n.data):null!=(o=null==e?void 0:e.toString())?o:null},[e]),f,e8({},u,a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{})),y=d.data,b=(d.size,d.setSize),g=function(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=function(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(d,["data","size","setSize"]),p=l(null==y?void 0:y[y.length-1].data),v=c(null==y||null==(n=y[0])?void 0:n.data);return e8({data:null==y?void 0:y.flatMap(function(e){return s(e.data)}),totalCount:v,hasMore:null!=p,loadMore:function(){var e;b((null!=(e=null==y?void 0:y.length)?e:0)+1)},nextUri:p},g)}function e7(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=e6(e,t,i),a=u.hasMore,l=u.error,c=u.data,s=u.loadMore,f=u.isLoading,d=u.nextUri;return((0,o.useEffect)(function(){a&&!l&&s()},[a,d]),i.partialData)?u:(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},u),n=n={data:a||l?void 0:c,isLoading:f||a},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r)}(e,e2,t)}function e4(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.abortController,n=t.fetchInit,i=t.url,u=t.swrConfig,a=eu(),l=(0,o.useMemo)(function(){var e,t;return null!=(e=null!=(t=null==n?void 0:n.signal)?t:null==r?void 0:r.signal)?e:a.signal},[null==r?void 0:r.signal,null==n?void 0:n.signal,a.signal]);return k(e,(0,o.useCallback)(function(e){var t,r,o=function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error("When using useEgenSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ".concat(e,"."))}(e,i);return(0,_.egenFetch)(o,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},n),r=r={signal:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))},[l,n,i]),u)}function e5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function e9(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(1))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return e5(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e5(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],u=n[1],a=(0,o.useMemo)(function(){return"number"==typeof r&&r>0?Math.max(1,Math.ceil(t.length/r)):1},[t.length,r]),l=(0,o.useMemo)(function(){var e=(i-1)*r,n=(i+0)*r;return t.slice(e,n)},[t,i,r]),c=(0,o.useCallback)(function(e){u(Math.max(1,Math.min(a,e)))},[u,a]),s=(0,o.useCallback)(function(){i<a&&u(i+1)},[i,a,u]),f=(0,o.useCallback)(function(){i>1&&u(i-1)},[i,u]);return(0,o.useMemo)(function(){return{results:l,totalPages:a,currentPage:i,paginated:t.length>r,showNextButton:i<a,showPreviousButton:i>1,goTo:c,goToNext:s,goToPrevious:f}},[l,a,t.length,r,i,c,s,f])}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tt(e,t,r,n){return{pageSizes:(0,o.useMemo)(function(){var r,n=Math.ceil(t/e);return isNaN(n)&&(n=0),((function(e){if(Array.isArray(e))return te(e)})(r=Array(n).keys())||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e){if(e){if("string"==typeof e)return te(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return te(e,void 0)}}(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(t){return(t+1)*e})},[e,t]),pageItemsCount:(0,o.useMemo)(function(){return e>t?t:e*r>t?e*(r-1)+n:e*r},[e,t,r,n])}}function tr(e){var t=E(e),r=t.extensions,n=t.extensionSlotModuleName;return e?r.map(function(t){return function(r){var o=r.state;return i().createElement(u.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n}}},i().createElement(f,{state:o}))}}):[]}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function to(){var e,t=(0,o.useRef)(),r=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(null))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return tn(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tn(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],u=r[1],a=null;if(!i){if(n){var l=(0,_.getSessionStore)().getState();l.loaded&&(a=l.session)}else n=new Promise(function(e){var r=function(r){var n=r.loaded,o=r.session;n&&(e(o),a=o,t.current&&(t.current(),t.current=void 0))};r((0,_.getSessionStore)().getState()),a||(t.current=(0,_.getSessionStore)().subscribe(r))});if(a)u(a);else throw n}(0,o.useEffect)(function(){return t.current||(t.current=(0,_.getSessionStore)().subscribe(function(e){var t=e.loaded,r=e.session;t&&(a=r,u(r))})),function(){t.current&&(t.current(),t.current=void 0)}},[]);var c=i||a;if(!c)if(n)throw console.warn("useSession is in an unexpected state. Attempting to recover."),n;else throw Error("useSession is in an invalid state.");return c}var ti=r(5350),tu=r.n(ti),ta=r(648);function tl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){tl(e,t,r[t])})}return e}var ts={setSessionContext:function(e,t){var r;return null==t?{manuallySetSessionUuid:null}:{manuallySetSessionUuid:t.uuid,entityUuid:null==(r=t.entity)?void 0:r.uuid}},mutateSession:function(e){var t=!0,r=!1,n=void 0;try{for(var o,i,u=Object.values(null!=(o=e.mutateSessionCallbacks)?o:{})[Symbol.iterator]();!(t=(i=u.next()).done);t=!0)(0,i.value)()}catch(e){r=!0,n=e}finally{try{t||null==u.return||u.return()}finally{if(r)throw n}}return{}}};function tf(e){var t=(0,o.useId)();return(0,o.useEffect)(function(){var r,n,o=(0,ey.r_)();return e&&o.setState({mutateSessionCallbacks:(r=tc({},o.getState().mutateSessionCallbacks),n=null!=(n=tl({},t,e))?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r)}),function(){if(e){var r=tc({},o.getState().mutateSessionCallbacks);delete r[t],o.setState({mutateSessionCallbacks:r})}}},[t,e]),m((0,ey.r_)(),ts)}function td(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ey.pJ,r=tf(),n=r.entityUuid,i=r.manuallySetSessionUuid,u=r.setSessionContext,a=e&&n==e?i:null,l="?entity=".concat(e,"&v=").concat(t,"&includeInactive=false"),c="/".concat(a,"?v=").concat(t),s=k(e?"".concat(_.restBaseUrl,"/session").concat(l):null,_.egenFetch),f=s.data,d=s.error,y=s.mutate,b=s.isValidating,g=k(e&&a?"".concat(_.restBaseUrl,"/session").concat(c):null,_.egenFetch),p=g.data,v=g.error,m=g.mutate,h=g.isValidating,S=(0,o.useMemo)(function(){var e;return null!=(e=null==f?void 0:f.data.results.find(function(e){return null===e.stopDatetime}))?e:null},[f]),O=(0,o.useMemo)(function(){return a&&p?p.data:null},[p,a]),E=(0,o.useRef)(null);(0,o.useEffect)(function(){!b&&S&&n===e&&null===i&&u(S),h||(E.current&&O&&E.current.uuid===O.uuid&&!E.current.stopDatetime&&O.stopDatetime&&u(null),E.current=O)},[O,i,S,b,h,n]);var w=(0,o.useCallback)(function(){y(),m()},[y,m]);tf(w);var j=!!(!f||a&&!p),C=!!(a?v:d);return{error:d||v,mutate:w,isValidating:b||h,activeSession:S,currentSession:O,currentSessionIsRetrospective:!!a,isLoading:j&&!C}}function ty(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tb(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)([]))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ty(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ty(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1];return(0,o.useEffect)(function(){var e=(0,ey.Ty)().subscribe(function(e){return n(e)},function(e){return console.error(e)});return function(){return e.unsubscribe()}},[]),r}function tg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}tu().extend(ta);var tp=function(e){var t,r=e.privilege,n=e.fallback,u=e.children,a=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(null))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tg(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tg(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=a[0],c=a[1];return((0,o.useEffect)(function(){var e=(0,_.getCurrentUser)({includeAuthStatus:!1}).subscribe(c);return function(){return e.unsubscribe()}},[]),l&&(0,_.userHasAccess)(r,l))?i().createElement(i().Fragment,null,u):n?i().createElement(i().Fragment,null,n):null}}}]);