(this.webpackChunk_msteams_react_web_client=this.webpackChunk_msteams_react_web_client||[]).push([[448928],{270337:e=>{e.exports=[{types:{EspGlobalState:[2,{id:10,lastDisplayedSurface:"EspLastDisplayedSurface"}],EspLastDisplayedSurface:[2,{id:10,timestamp:"DateTime!"}]}},{types:{Query:[2,{espGlobalState:"EspGlobalState!"}],Mutation:[2,{setEspGlobalState:["EspGlobalState!",{surfaceId:6}]}]}}]},487392:(e,t,a)=>{"use strict";a.r(t),a.d(t,{resolvers:()=>n,typeDefs:()=>s});var s=a(270337);const r="espGlobalState";function i(e){const t=function(e){if(!e)return;try{const t=JSON.parse(e);if(t.id!==r)return;if(!t.lastDisplayedSurface)return t;if(!t.lastDisplayedSurface?.id||!t.lastDisplayedSurface?.timestamp)return;const a=new Date(t.lastDisplayedSurface.timestamp);if(isNaN(a.getTime()))return;return t}catch(e){return}}(e.get(r,"Experience")||"");return t||(e.remove(r,"Experience"),{id:r})}const n={Query:{espGlobalState:async(e,t,{localStorage:a})=>i(a)},Mutation:{setEspGlobalState:async(e,{surfaceId:t},{localStorage:a})=>function(e,t){const a={id:r,lastDisplayedSurface:{id:t,timestamp:(new Date).toISOString()}};return e.trySet(r,JSON.stringify(a),"Engagement","Experience"),a}(a,t)}}}}]);
//# sourceMappingURL=https://local.teams.office.com/sourcemaps/hashed-assets/r_data-resolvers-browser-esp-0c46d683a76eea2a.js.map