1System.register(['vue', '@Obsidian/Utility/rockDateTime'], (function (exports) { 2 'use strict'; 3 var reactive, shallowReadonly, RockDateTime; 4 return { 5 setters: [function (module) { 6 reactive = module.reactive; 7 shallowReadonly = module.shallowReadonly; 8 }, function (module) { 9 RockDateTime = module.RockDateTime; 10 }], 11 execute: (function () { 12 13 exports('useStore', useStore); 14 15 var state = reactive({ 16 currentPerson: null, 17 isAnonymousVisitor: false, 18 pageParameters: {}, 19 contextEntities: {}, 20 pageId: 0, 21 pageGuid: "", 22 sessionGuid: "", 23 interactionGuid: "", 24 executionStartTime: RockDateTime.now().toMilliseconds(), 25 debugTimings: [], 26 loginUrlWithReturnUrl: "" 27 }); 28 class Store { 29 constructor() { 30 this.state = shallowReadonly(state); 31 } 32 setAreSecondaryBlocksShown(areSecondaryBlocksShown) {} 33 initialize(pageConfig) { 34 state.currentPerson = pageConfig.currentPerson || null; 35 state.isAnonymousVisitor = pageConfig.isAnonymousVisitor; 36 state.pageParameters = pageConfig.pageParameters || {}; 37 state.pageId = pageConfig.pageId; 38 state.pageGuid = pageConfig.pageGuid; 39 state.sessionGuid = pageConfig.sessionGuid; 40 state.interactionGuid = pageConfig.interactionGuid; 41 state.executionStartTime = pageConfig.executionStartTime; 42 state.loginUrlWithReturnUrl = pageConfig.loginUrlWithReturnUrl; 43 } 44 addPageDebugTiming(timing) { 45 var pageStartTime = state.executionStartTime; 46 var timestampMs = timing.startTimeMs - pageStartTime; 47 var durationMs = timing.finishTimeMs - timing.startTimeMs; 48 state.debugTimings.push({ 49 timestampMs: timestampMs, 50 durationMs: durationMs, 51 indentLevel: 1, 52 isTitleBold: false, 53 subTitle: timing.subtitle, 54 title: timing.title 55 }); 56 } 57 redirectToLogin() { 58 if (state.loginUrlWithReturnUrl) { 59 window.location.href = state.loginUrlWithReturnUrl; 60 } 61 } 62 get isAuthenticated() { 63 return !!state.currentPerson; 64 } 65 getPageParameter(key) { 66 return state.pageParameters[key]; 67 } 68 } exports('Store', Store); 69 var store = new Store(); 70 function useStore() { 71 return store; 72 } 73 74 }) 75 }; 76})); 77//# sourceMappingURL=PageState.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.