iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://www.hull.ac.uk/_jWMR6Q_b6fc1dc3-ed0b-44c4-8ae5-ddf86161373e/static/root-DxMpm4wn.js
var ee=t=>{throw TypeError(t)};var X=(t,e,a)=>e.has(t)||ee("Cannot "+a);var i=(t,e,a)=>(X(t,e,"read from private field"),a?a.call(t):e.get(t)),S=(t,e,a)=>e.has(t)?ee("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),p=(t,e,a,s)=>(X(t,e,"write to private field"),s?s.call(t,a):e.set(t,a),a),x=(t,e,a)=>(X(t,e,"access private method"),a);var Y=(t,e,a,s)=>({set _(r){p(t,e,r,a)},get _(){return i(t,e,s)}});import{a as l,g as Ae,c as te,j as h}from"./index-Cf5smBgf.js";import{S as ye,h as ve,Q as ke,n as R,m as ae,R as je,c as Te,a as se,b as k,e as xe,d as Fe,f as qe,g as He,o as re,r as ie,i as Le,j as ne,p as oe,s as Ie,u as Ne,k as Ue,l as $e}from"./cjs-v3n-_9h9.js";import{j as ze,d as Be,r as Ke,a as Ge,b as Je,u as We,c as we,e as Ye,f as Ve,_ as Xe,i as Ze,D as et,g as tt,F as at,V as st,h as rt,k as it,l as Pe,m as nt,n as ot,A as be,I as ut,o as lt,p as ct,q as Z,s as ht,t as dt,v as Se,w as ft,S as mt,x as pt,y as gt,L as yt,z as Ee,B as vt,M as Re,N as wt,C as Pt,O as Oe,P as bt,R as St,E as Et,G as Rt,H as De,J as ue,K as Ot,Q as Dt,T as Mt,U as Ct,W as _t,X as Qt,Y as At,Z as kt,$ as jt,a0 as Tt,a1 as xt,a2 as Ft,a3 as qt,a4 as Ht,a5 as Lt,a6 as It,a7 as Nt,a8 as Ut,a9 as $t,aa as zt,ab as Bt,ac as Kt,ad as Gt,ae as Jt,af as Wt,ag as Yt,ah as Vt,ai as Xt,aj as Zt,ak as ea,al as ta,am as aa,an as sa,ao as ra,ap as ia,aq as na,ar as oa}from"./browser-BwP1cLXF.js";/** * @remix-run/server-runtime v2.13.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const ua=(t,e={})=>ze(t,e),la=(t,e={})=>Be(t,e),ca=(t,e=302)=>Ke(t,e),ha=(t,e=302)=>Ge(t,e),da=(t,e=302)=>Je(t,e);/** * @remix-run/react v2.13.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */let le="positions";function Me({getKey:t,...e}){let{isSpaMode:a}=We(),s=we(),r=Ye();Ve({getKey:t,storageKey:le});let n=l.useMemo(()=>{if(!t)return null;let u=t(s,r);return u!==s.key?u:null},[]);if(a)return null;let o=((u,d)=>{if(!window.history.state||!window.history.state.key){let g=Math.random().toString(32).slice(2);window.history.replaceState({key:g},"")}try{let y=JSON.parse(sessionStorage.getItem(u)||"{}")[d||window.history.state.key];typeof y=="number"&&window.scrollTo(0,y)}catch(g){console.error(g),sessionStorage.removeItem(u)}}).toString();return l.createElement("script",Xe({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${o})(${JSON.stringify(le)}, ${JSON.stringify(n)})`}}))}function fa({context:t,router:e,hydrate:a=!0,nonce:s}){e&&t||Ze(!1);let r={router:e,navigator:ga(),static:!0,staticContext:t,basename:t.basename||"/"},n=new Map,o="";if(a!==!1){let d={loaderData:t.loaderData,actionData:t.actionData,errors:pa(t.errors)};o=`window.__staticRouterHydrationData = JSON.parse(${ba(JSON.stringify(JSON.stringify(d)))});`}let{state:u}=r.router;return l.createElement(l.Fragment,null,l.createElement(et.Provider,{value:r},l.createElement(tt.Provider,{value:u},l.createElement(at.Provider,{value:n},l.createElement(st.Provider,{value:{isTransitioning:!1}},l.createElement(rt,{basename:r.basename,location:u.location,navigationType:u.historyAction,navigator:r.navigator,static:r.static,future:{v7_relativeSplatPath:e.future.v7_relativeSplatPath}},l.createElement(ma,{routes:e.routes,future:e.future,state:u})))))),o?l.createElement("script",{suppressHydrationWarning:!0,nonce:s,dangerouslySetInnerHTML:{__html:o}}):null)}function ma({routes:t,future:e,state:a}){return it(t,void 0,a,e)}function pa(t){if(!t)return null;let e=Object.entries(t),a={};for(let[s,r]of e)Pe(r)?a[s]={...r,__type:"RouteErrorResponse"}:r instanceof Error?a[s]={message:r.message,__type:"Error",...r.name!=="Error"?{__subType:r.name}:{}}:a[s]=r;return a}function ga(){return{createHref:Ce,encodeLocation:_e,push(t){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)})\` somewhere in your app.`)},replace(t){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)}, { replace: true })\` somewhere in your app.`)},go(t){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${t})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}}}function ya(t,e,a={}){let s={},r=nt(t,ot,void 0,s),n=e.matches.map(u=>{let d=s[u.route.id]||u.route;return{...u,route:d}}),o=u=>`You cannot use router.${u}() on the server because it is a stateless environment`;return{get basename(){return e.basename},get future(){var u,d;return{v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:((u=a.future)==null?void 0:u.v7_partialHydration)===!0,v7_prependBasename:!1,v7_relativeSplatPath:((d=a.future)==null?void 0:d.v7_relativeSplatPath)===!0,v7_skipActionErrorRevalidation:!1}},get state(){return{historyAction:be.Pop,location:e.location,matches:n,loaderData:e.loaderData,actionData:e.actionData,errors:e.errors,initialized:!0,navigation:ut,restoreScrollPosition:null,preventScrollReset:!1,revalidation:"idle",fetchers:new Map,blockers:new Map}},get routes(){return r},get window(){},initialize(){throw o("initialize")},subscribe(){throw o("subscribe")},enableScrollRestoration(){throw o("enableScrollRestoration")},navigate(){throw o("navigate")},fetch(){throw o("fetch")},revalidate(){throw o("revalidate")},createHref:Ce,encodeLocation:_e,getFetcher(){return lt},deleteFetcher(){throw o("deleteFetcher")},dispose(){throw o("dispose")},getBlocker(){return ct},deleteBlocker(){throw o("deleteBlocker")},patchRoutes(){throw o("patchRoutes")},_internalFetchControllers:new Map,_internalActiveDeferreds:new Map,_internalSetRoutes(){throw o("_internalSetRoutes")}}}function Ce(t){return typeof t=="string"?t:Z(t)}function _e(t){let e=typeof t=="string"?t:Z(t);e=e.replace(/ $/,"%20");let a=va.test(e)?new URL(e):new URL(e,"http://localhost");return{pathname:a.pathname,search:a.search,hash:a.hash}}const va=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wa={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Pa=/[&><\u2028\u2029]/g;function ba(t){return t.replace(Pa,e=>wa[e])}/** * @remix-run/react v2.13.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Sa({context:t,url:e,abortDelay:a,nonce:s}){typeof e=="string"&&(e=new URL(e));let{manifest:r,routeModules:n,criticalCss:o,serverHandoffString:u}=t,d=ht(r.routes,n,t.future,t.isSpaMode);t.staticHandlerContext.loaderData={...t.staticHandlerContext.loaderData};for(let y of t.staticHandlerContext.matches){let f=y.route.id,c=n[f],b=t.manifest.routes[f];c&&dt(b,c,t.isSpaMode)&&(c.HydrateFallback||!b.hasLoader)&&(t.staticHandlerContext.loaderData[f]=void 0)}let g=ya(d,t.staticHandlerContext,{future:{v7_partialHydration:!0,v7_relativeSplatPath:t.future.v3_relativeSplatPath}});return l.createElement(l.Fragment,null,l.createElement(Se.Provider,{value:{manifest:r,routeModules:n,criticalCss:o,serverHandoffString:u,future:t.future,isSpaMode:t.isSpaMode,serializeError:t.serializeError,abortDelay:a,renderMeta:t.renderMeta}},l.createElement(ft,{location:g.state.location},l.createElement(fa,{router:g,context:t.staticHandlerContext,hydrate:!1}))),t.future.v3_singleFetch&&t.serverHandoffStream?l.createElement(l.Suspense,null,l.createElement(mt,{context:t,identifier:0,reader:t.serverHandoffStream.getReader(),textDecoder:new TextDecoder,nonce:s})):null)}/** * @remix-run/react v2.13.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const Ea=Object.freeze(Object.defineProperty({__proto__:null,Await:pt,Form:gt,Link:yt,Links:Ee,LiveReload:vt,Meta:Re,NavLink:wt,Navigate:Pt,get NavigationType(){return be},Outlet:Oe,PrefetchPageLinks:bt,RemixBrowser:St,RemixServer:Sa,Route:Et,Routes:Rt,Scripts:De,ScrollRestoration:Me,UNSAFE_RemixContext:Se,createPath:Z,createRoutesFromChildren:ue,createRoutesFromElements:ue,createSearchParams:Ot,data:Dt,defer:la,generatePath:Mt,isRouteErrorResponse:Pe,json:ua,matchPath:Ct,matchRoutes:_t,parsePath:Qt,redirect:ca,redirectDocument:da,renderMatches:At,replace:ha,resolvePath:kt,unstable_usePrompt:jt,useActionData:Tt,useAsyncError:xt,useAsyncValue:Ft,useBeforeUnload:qt,useBlocker:Ht,useFetcher:Lt,useFetchers:It,useFormAction:Nt,useHref:Ut,useInRouterContext:$t,useLinkClickHandler:zt,useLoaderData:Bt,useLocation:we,useMatch:Kt,useMatches:Gt,useNavigate:Jt,useNavigation:Wt,useNavigationType:Yt,useOutlet:Vt,useOutletContext:Xt,useParams:Zt,useResolvedPath:ea,useRevalidator:ta,useRouteError:aa,useRouteLoaderData:sa,useRoutes:ra,useSearchParams:ia,useSubmit:na,useViewTransitionState:oa},Symbol.toStringTag,{value:"Module"}));var _,fe,Ra=(fe=class extends ye{constructor(e={}){super();S(this,_);this.config=e,p(this,_,new Map)}build(e,a,s){const r=a.queryKey,n=a.queryHash??ve(r,a);let o=this.get(n);return o||(o=new ke({cache:this,queryKey:r,queryHash:n,options:e.defaultQueryOptions(a),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){i(this,_).has(e.queryHash)||(i(this,_).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const a=i(this,_).get(e.queryHash);a&&(e.destroy(),a===e&&i(this,_).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){R.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return i(this,_).get(e)}getAll(){return[...i(this,_).values()]}find(e){const a={exact:!0,...e};return this.getAll().find(s=>ae(a,s))}findAll(e={}){const a=this.getAll();return Object.keys(e).length>0?a.filter(s=>ae(e,s)):a}notify(e){R.batch(()=>{this.listeners.forEach(a=>{a(e)})})}onFocus(){R.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){R.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_=new WeakMap,fe),Q,E,$,A,F,me,Oa=(me=class extends je{constructor(e){super();S(this,A);S(this,Q);S(this,E);S(this,$);this.mutationId=e.mutationId,p(this,E,e.mutationCache),p(this,Q,[]),this.state=e.state||Da(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){i(this,Q).includes(e)||(i(this,Q).push(e),this.clearGcTimeout(),i(this,E).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){p(this,Q,i(this,Q).filter(a=>a!==e)),this.scheduleGc(),i(this,E).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){i(this,Q).length||(this.state.status==="pending"?this.scheduleGc():i(this,E).remove(this))}continue(){var e;return((e=i(this,$))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var r,n,o,u,d,g,y,f,c,b,C,v,M,I,j,P,O,T,N,W;p(this,$,Te({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(w,U)=>{x(this,A,F).call(this,{type:"failed",failureCount:w,error:U})},onPause:()=>{x(this,A,F).call(this,{type:"pause"})},onContinue:()=>{x(this,A,F).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>i(this,E).canRun(this)}));const a=this.state.status==="pending",s=!i(this,$).canStart();try{if(!a){x(this,A,F).call(this,{type:"pending",variables:e,isPaused:s}),await((n=(r=i(this,E).config).onMutate)==null?void 0:n.call(r,e,this));const U=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,e));U!==this.state.context&&x(this,A,F).call(this,{type:"pending",context:U,variables:e,isPaused:s})}const w=await i(this,$).start();return await((g=(d=i(this,E).config).onSuccess)==null?void 0:g.call(d,w,e,this.state.context,this)),await((f=(y=this.options).onSuccess)==null?void 0:f.call(y,w,e,this.state.context)),await((b=(c=i(this,E).config).onSettled)==null?void 0:b.call(c,w,null,this.state.variables,this.state.context,this)),await((v=(C=this.options).onSettled)==null?void 0:v.call(C,w,null,e,this.state.context)),x(this,A,F).call(this,{type:"success",data:w}),w}catch(w){try{throw await((I=(M=i(this,E).config).onError)==null?void 0:I.call(M,w,e,this.state.context,this)),await((P=(j=this.options).onError)==null?void 0:P.call(j,w,e,this.state.context)),await((T=(O=i(this,E).config).onSettled)==null?void 0:T.call(O,void 0,w,this.state.variables,this.state.context,this)),await((W=(N=this.options).onSettled)==null?void 0:W.call(N,void 0,w,e,this.state.context)),w}finally{x(this,A,F).call(this,{type:"error",error:w})}}finally{i(this,E).runNext(this)}}},Q=new WeakMap,E=new WeakMap,$=new WeakMap,A=new WeakSet,F=function(e){const a=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=a(this.state),R.batch(()=>{i(this,Q).forEach(s=>{s.onMutationUpdate(e)}),i(this,E).notify({mutation:this,type:"updated",action:e})})},me);function Da(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var D,J,pe,Ma=(pe=class extends ye{constructor(e={}){super();S(this,D);S(this,J);this.config=e,p(this,D,new Map),p(this,J,Date.now())}build(e,a,s){const r=new Oa({mutationCache:this,mutationId:++Y(this,J)._,options:e.defaultMutationOptions(a),state:s});return this.add(r),r}add(e){const a=V(e),s=i(this,D).get(a)??[];s.push(e),i(this,D).set(a,s),this.notify({type:"added",mutation:e})}remove(e){var s;const a=V(e);if(i(this,D).has(a)){const r=(s=i(this,D).get(a))==null?void 0:s.filter(n=>n!==e);r&&(r.length===0?i(this,D).delete(a):i(this,D).set(a,r))}this.notify({type:"removed",mutation:e})}canRun(e){var s;const a=(s=i(this,D).get(V(e)))==null?void 0:s.find(r=>r.state.status==="pending");return!a||a===e}runNext(e){var s;const a=(s=i(this,D).get(V(e)))==null?void 0:s.find(r=>r!==e&&r.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}clear(){R.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...i(this,D).values()].flat()}find(e){const a={exact:!0,...e};return this.getAll().find(s=>se(a,s))}findAll(e={}){return this.getAll().filter(a=>se(e,a))}notify(e){R.batch(()=>{this.listeners.forEach(a=>{a(e)})})}resumePausedMutations(){const e=this.getAll().filter(a=>a.state.isPaused);return R.batch(()=>Promise.all(e.map(a=>a.continue().catch(k))))}},D=new WeakMap,J=new WeakMap,pe);function V(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function ce(t){return{onFetch:(e,a)=>{var y,f,c,b,C;const s=e.options,r=(c=(f=(y=e.fetchOptions)==null?void 0:y.meta)==null?void 0:f.fetchMore)==null?void 0:c.direction,n=((b=e.state.data)==null?void 0:b.pages)||[],o=((C=e.state.data)==null?void 0:C.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const g=async()=>{let v=!1;const M=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},I=xe(e.options,e.fetchOptions),j=async(P,O,T)=>{if(v)return Promise.reject();if(O==null&&P.pages.length)return Promise.resolve(P);const N={queryKey:e.queryKey,pageParam:O,direction:T?"backward":"forward",meta:e.options.meta};M(N);const W=await I(N),{maxPages:w}=e.options,U=T?Fe:qe;return{pages:U(P.pages,W,w),pageParams:U(P.pageParams,O,w)}};if(r&&n.length){const P=r==="backward",O=P?Ca:he,T={pages:n,pageParams:o},N=O(s,T);u=await j(T,N,P)}else{const P=t??n.length;do{const O=d===0?o[0]??s.initialPageParam:he(s,u);if(d>0&&O==null)break;u=await j(u,O),d++}while(d{var v,M;return(M=(v=e.options).persister)==null?void 0:M.call(v,g,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},a)}:e.fetchFn=g}}}function he(t,{pages:e,pageParams:a}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,a[s],a):void 0}function Ca(t,{pages:e,pageParams:a}){var s;return e.length>0?(s=t.getPreviousPageParam)==null?void 0:s.call(t,e[0],e,a[0],a):void 0}var m,q,H,z,B,L,K,G,ge,_a=(ge=class{constructor(t={}){S(this,m);S(this,q);S(this,H);S(this,z);S(this,B);S(this,L);S(this,K);S(this,G);p(this,m,t.queryCache||new Ra),p(this,q,t.mutationCache||new Ma),p(this,H,t.defaultOptions||{}),p(this,z,new Map),p(this,B,new Map),p(this,L,0)}mount(){Y(this,L)._++,i(this,L)===1&&(p(this,K,He.subscribe(async t=>{t&&(await this.resumePausedMutations(),i(this,m).onFocus())})),p(this,G,re.subscribe(async t=>{t&&(await this.resumePausedMutations(),i(this,m).onOnline())})))}unmount(){var t,e;Y(this,L)._--,i(this,L)===0&&((t=i(this,K))==null||t.call(this),p(this,K,void 0),(e=i(this,G))==null||e.call(this),p(this,G,void 0))}isFetching(t){return i(this,m).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return i(this,q).findAll({...t,status:"pending"}).length}getQueryData(t){var a;const e=this.defaultQueryOptions({queryKey:t});return(a=i(this,m).get(e.queryHash))==null?void 0:a.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const a=this.defaultQueryOptions(t),s=i(this,m).build(this,a);return t.revalidateIfStale&&s.isStaleByTime(ie(a.staleTime,s))&&this.prefetchQuery(a),Promise.resolve(e)}}getQueriesData(t){return i(this,m).findAll(t).map(({queryKey:e,state:a})=>{const s=a.data;return[e,s]})}setQueryData(t,e,a){const s=this.defaultQueryOptions({queryKey:t}),r=i(this,m).get(s.queryHash),n=r==null?void 0:r.state.data,o=Le(e,n);if(o!==void 0)return i(this,m).build(this,s).setData(o,{...a,manual:!0})}setQueriesData(t,e,a){return R.batch(()=>i(this,m).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,a)]))}getQueryState(t){var a;const e=this.defaultQueryOptions({queryKey:t});return(a=i(this,m).get(e.queryHash))==null?void 0:a.state}removeQueries(t){const e=i(this,m);R.batch(()=>{e.findAll(t).forEach(a=>{e.remove(a)})})}resetQueries(t,e){const a=i(this,m),s={type:"active",...t};return R.batch(()=>(a.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries(s,e)))}cancelQueries(t={},e={}){const a={revert:!0,...e},s=R.batch(()=>i(this,m).findAll(t).map(r=>r.cancel(a)));return Promise.all(s).then(k).catch(k)}invalidateQueries(t={},e={}){return R.batch(()=>{if(i(this,m).findAll(t).forEach(s=>{s.invalidate()}),t.refetchType==="none")return Promise.resolve();const a={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(a,e)})}refetchQueries(t={},e){const a={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},s=R.batch(()=>i(this,m).findAll(t).filter(r=>!r.isDisabled()).map(r=>{let n=r.fetch(void 0,a);return a.throwOnError||(n=n.catch(k)),r.state.fetchStatus==="paused"?Promise.resolve():n}));return Promise.all(s).then(k)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const a=i(this,m).build(this,e);return a.isStaleByTime(ie(e.staleTime,a))?a.fetch(e):Promise.resolve(a.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(k).catch(k)}fetchInfiniteQuery(t){return t.behavior=ce(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(k).catch(k)}ensureInfiniteQueryData(t){return t.behavior=ce(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return re.isOnline()?i(this,q).resumePausedMutations():Promise.resolve()}getQueryCache(){return i(this,m)}getMutationCache(){return i(this,q)}getDefaultOptions(){return i(this,H)}setDefaultOptions(t){p(this,H,t)}setQueryDefaults(t,e){i(this,z).set(ne(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...i(this,z).values()];let a={};return e.forEach(s=>{oe(t,s.queryKey)&&(a={...a,...s.defaultOptions})}),a}setMutationDefaults(t,e){i(this,B).set(ne(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...i(this,B).values()];let a={};return e.forEach(s=>{oe(t,s.mutationKey)&&(a={...a,...s.defaultOptions})}),a}defaultQueryOptions(t){if(t._defaulted)return t;const e={...i(this,H).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=ve(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===Ie&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...i(this,H).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){i(this,m).clear(),i(this,q).clear()}},m=new WeakMap,q=new WeakMap,H=new WeakMap,z=new WeakMap,B=new WeakMap,L=new WeakMap,K=new WeakMap,G=new WeakMap,ge);function Qa(t){return t}function de(t,e,a){var d,g;if(typeof e!="object"||e===null)return;const s=t.getMutationCache(),r=t.getQueryCache(),n=((d=a==null?void 0:a.defaultOptions)==null?void 0:d.deserializeData)??((g=t.getDefaultOptions().hydrate)==null?void 0:g.deserializeData)??Qa,o=e.mutations||[],u=e.queries||[];o.forEach(({state:y,...f})=>{var c,b;s.build(t,{...(c=t.getDefaultOptions().hydrate)==null?void 0:c.mutations,...(b=a==null?void 0:a.defaultOptions)==null?void 0:b.mutations,...f},y)}),u.forEach(({queryKey:y,state:f,queryHash:c,meta:b,promise:C})=>{var I,j;let v=r.get(c);const M=f.data===void 0?f.data:n(f.data);if(v){if(v.state.dataUpdatedAt{const r=Ne(s),[n,o]=l.useState(),u=l.useRef(e);return u.current=e,l.useMemo(()=>{if(a){if(typeof a!="object")return;const d=r.getQueryCache(),g=a.queries||[],y=[],f=[];for(const c of g){const b=d.get(c.queryHash);if(!b)y.push(c);else{const C=c.state.dataUpdatedAt>b.state.dataUpdatedAt,v=n==null?void 0:n.find(M=>M.queryHash===c.queryHash);C&&(!v||c.state.dataUpdatedAt>v.state.dataUpdatedAt)&&f.push(c)}}y.length>0&&de(r,{queries:y},u.current),f.length>0&&o(c=>c?[...c,...f]:f)}},[r,n,a]),l.useEffect(()=>{n&&(de(r,{queries:n},u.current),o(void 0))},[r,n]),t},ka=function(){return null};const ja=Ae(Ea);var Ta=te&&te.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Qe=void 0,xa=ja,Fa=Ta(Ue),qa=function(){var t=(0,xa.useMatches)(),e=t.map(function(a){var s;return(s=a.data)===null||s===void 0?void 0:s.dehydratedState}).filter(Boolean);return e.length?e.reduce(function(a,s){return(0,Fa.default)(a,s)},{}):void 0};Qe=qa;const Ha=()=>{l.useEffect(()=>{const t=()=>{if(typeof window.gtmDidInit>"u"&&(window.gtmDidInit=!1),window.gtmDidInit)return;window.gtmDidInit=!0;const r=document.createElement("script");r.type="text/javascript",r.async=!0,r.onload=()=>{window.dataLayer.push({event:"gtm.js","gtm.start":new Date().getTime()})},r.src="https://www.googletagmanager.com/gtm.js?id=GTM-P978LR",document.head.appendChild(r)},e=r=>{t(),r.currentTarget.removeEventListener(r.type,e)},a=setTimeout(t,3500),s=["scroll","mousemove","touchstart"];return s.forEach(r=>window.addEventListener(r,e,{once:!0})),()=>{clearTimeout(a),s.forEach(r=>window.removeEventListener(r,e))}},[])};function $a({children:t}){const[e,a]=l.useState("");l.useEffect(()=>a(window.location.hostname),[]);const[s]=l.useState(()=>new _a({defaultOptions:{queries:{staleTime:e.indexOf("localhost")>-1||e.indexOf("preview-")>-1?60*1e3:0}}})),r=Qe();return(!e.startsWith("staging-")||!e.startsWith("preview-"))&&Ha(),h.jsxs("html",{lang:"en",children:[h.jsxs("head",{children:[h.jsx("meta",{charSet:"utf-8"}),h.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),h.jsx("link",{rel:"icon",type:"image/svg+xml",href:"https://www.hull.ac.uk/site-elements/img/favicon/favicon.svg"}),h.jsx("link",{rel:"icon",type:"image/png",href:"https://www.hull.ac.uk/site-elements/img/favicon/favicon.png"}),h.jsx("link",{rel:"apple-touch-icon",sizes:"180x180",href:"https://www.hull.ac.uk/site-elements/img/favicon/apple-touch-icon.png"}),h.jsx("link",{rel:"manifest",href:"https://www.hull.ac.uk/site-elements/img/favicon/site.json"}),h.jsx("link",{rel:"mask-icon",href:"https://www.hull.ac.uk/site-elements/img/favicon/safari-pinned-tab.svg",color:"#0e1647"}),h.jsx("link",{rel:"shortcut icon",href:"https://www.hull.ac.uk/site-elements/img/favicon/favicon.ico"}),h.jsx("meta",{name:"msapplication-TileColor",content:"#ffffff"}),h.jsx("meta",{name:"msapplication-config",content:"https://www.hull.ac.uk/site-elements/img/favicon/browserconfig.xml"}),h.jsx(Re,{}),h.jsx(Ee,{})]}),h.jsxs("body",{suppressHydrationWarning:!0,children:[(!e.startsWith("staging-")||!e.startsWith("preview-"))&&h.jsx(h.Fragment,{children:h.jsx("noscript",{children:h.jsx("iframe",{src:"https://www.googletagmanager.com/ns.html?id=GTM-P978LR",title:"Google Tag Manager",height:"0",width:"0",style:{display:"none",visibility:"hidden"}})})}),h.jsxs($e,{client:s,children:[h.jsx(Aa,{state:r,children:t}),h.jsx(ka,{initialIsOpen:!1})]}),h.jsx(Me,{}),h.jsx(De,{})]})]})}function za(){return h.jsx(Oe,{})}export{$a as Layout,za as default}; //# sourceMappingURL=root-DxMpm4wn.js.map