{"version":3,"file":"rockPage.js","sources":["../../../Framework/Templates/rockBlock.partial.ts","../../../Framework/Templates/rockPage.ts"],"sourcesContent":["// <copyright>\r\n// Copyright by the Spark Development Network\r\n//\r\n// Licensed under the Rock Community License (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n// http://www.rockrms.com/license\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n// </copyright>\r\n//\r\n\r\nimport { Guid } from \"@Obsidian/Types\";\r\nimport { PersonPreferenceCollection } from \"@Obsidian/Core/Core/personPreferences\";\r\nimport { doApiCall, provideHttp } from \"@Obsidian/Utility/http\";\r\nimport { Component, computed, defineComponent, nextTick, onErrorCaptured, onMounted, PropType, provide, ref, watch } from \"vue\";\r\nimport { useStore } from \"@Obsidian/PageState\";\r\nimport { RockDateTime } from \"@Obsidian/Utility/rockDateTime\";\r\nimport { HttpBodyData, HttpMethod, HttpResult, HttpUrlParams } from \"@Obsidian/Types/Utility/http\";\r\nimport { InvokeBlockActionFunc } from \"@Obsidian/Types/Utility/block\";\r\nimport { provideBlockGuid, provideConfigurationValuesChanged, providePersonPreferences, provideReloadBlock } from \"@Obsidian/Utility/block\";\r\nimport { areEqual, emptyGuid } from \"@Obsidian/Utility/guid\";\r\nimport { PanelAction } from \"@Obsidian/Types/Controls/panelAction\";\r\nimport { ObsidianBlockConfigBag } from \"@Obsidian/ViewModels/Cms/obsidianBlockConfigBag\";\r\nimport { IBlockPersonPreferencesProvider, IPersonPreferenceCollection } from \"@Obsidian/Types/Core/personPreferences\";\r\nimport { PersonPreferenceValueBag } from \"@Obsidian/ViewModels/Core/personPreferenceValueBag\";\r\n\r\nconst store = useStore();\r\n\r\n// Can be removed once WebForms is no longer in use.\r\n// eslint-disable-next-line @typescript-eslint/naming-convention,@typescript-eslint/no-explicit-any\r\ndeclare const Sys: any;\r\n\r\n/**\r\n * Handles the logic to detect when the standard block settings modal has closed\r\n * via a Save click for the specified block.\r\n *\r\n * @param blockId The unique identifier of the block to be watched.\r\n * @param callback The callback to be invoked when the block settings have been saved.\r\n */\r\nfunction addBlockChangedEventListener(blockId: Guid, callback: (() => void)): void {\r\n    function onTriggerClick(): void {\r\n        const dataElement = document.querySelector(\"#rock-config-trigger-data\") as HTMLInputElement;\r\n        if (dataElement.value.toLowerCase().startsWith(\"block_updated:\")) {\r\n            const dataSegments = dataElement.value.toLowerCase().split(\":\");\r\n\r\n            if (dataSegments.length >= 3 && areEqual(dataSegments[2], blockId)) {\r\n                callback();\r\n            }\r\n        }\r\n    }\r\n\r\n    document.querySelector(\"#rock-config-trigger\")?.addEventListener(\"click\", onTriggerClick, true);\r\n\r\n    // This code can be removed once WebForms is no longer in use.\r\n    if (Sys) {\r\n        Sys.Application.add_load(() => {\r\n            document.querySelector(\"#rock-config-trigger\")?.addEventListener(\"click\", onTriggerClick, true);\r\n        });\r\n    }\r\n}\r\n\r\n/**\r\n * Update the custom actions in the configuration bar to match those provided.\r\n *\r\n * @param blockContainerElement The element that contains the block component.\r\n * @param actions The array of actions to put in the configuration bar.\r\n */\r\nfunction updateConfigurationBarActions(blockContainerElement: HTMLElement, actions: PanelAction[]): void {\r\n    // Find the configuration bar. We don't want to use querySelector at the\r\n    // blockContent level because that would include the block content which\r\n    // might have matching class names and cause issues.\r\n    const blockContent = blockContainerElement.closest(\".block-content\");\r\n    const blockConfiguration = Array.from(blockContent?.children ?? [])\r\n        .find(el => el.classList.contains(\"block-configuration\"));\r\n    const configurationBar = blockConfiguration?.querySelector(\".block-configuration-bar\") as HTMLElement | undefined;\r\n\r\n    if (!configurationBar) {\r\n        return;\r\n    }\r\n\r\n    // Find the name element, which is what we will use as our insertion point.\r\n    const nameElement = Array.from(configurationBar.children).find(el => el.tagName == \"SPAN\");\r\n    if (!nameElement) {\r\n        return;\r\n    }\r\n\r\n    // Find and remove any existing custom actions.\r\n    Array.from(configurationBar.querySelectorAll(\"a\"))\r\n        .filter(el => el.dataset[\"customAction\"] === \"true\")\r\n        .forEach(el => el.remove());\r\n\r\n    // Add new custom actions.\r\n    actions.forEach(action => {\r\n        const hyperlinkElement = document.createElement(\"a\");\r\n        hyperlinkElement.href = \"#\";\r\n        hyperlinkElement.title = action.title ?? \"\";\r\n        hyperlinkElement.dataset[\"customAction\"] = \"true\";\r\n        hyperlinkElement.addEventListener(\"click\", e => {\r\n            e.preventDefault();\r\n            if (action.handler) {\r\n                action.handler(e);\r\n            }\r\n        });\r\n\r\n        const iconElement = document.createElement(\"i\");\r\n        iconElement.className = action.iconCssClass ?? \"fa fa-question\";\r\n\r\n        hyperlinkElement.appendChild(iconElement);\r\n\r\n        nameElement.after(hyperlinkElement);\r\n    });\r\n}\r\n\r\nexport default defineComponent({\r\n    name: \"RockBlock\",\r\n\r\n    props: {\r\n        config: {\r\n            type: Object as PropType<ObsidianBlockConfigBag>,\r\n            required: true\r\n        },\r\n        blockComponent: {\r\n            type: Object as PropType<Component>,\r\n            default: null\r\n        },\r\n        startTimeMs: {\r\n            type: Number as PropType<number>,\r\n            required: true\r\n        }\r\n    },\r\n\r\n    setup(props) {\r\n        const error = ref(\"\");\r\n        const finishTimeMs = ref<number | null>(null);\r\n        const blockContainerElement = ref<HTMLElement | null>(null);\r\n        const configurationValues = ref(props.config.configurationValues);\r\n        const configCustomActions = ref(props.config.customConfigurationActions);\r\n        const customActionComponent = ref<Component | null>(null);\r\n        const currentBlockComponent = ref<Component | null>(props.blockComponent);\r\n\r\n        // #region Computed Values\r\n\r\n        // The current config bar actions that should be included in the block's\r\n        // administrative configuration bar.\r\n        const configBarActions = computed((): PanelAction[] => {\r\n            const customActions: PanelAction[] = [];\r\n\r\n            if (configCustomActions.value) {\r\n                for (const cca of configCustomActions.value) {\r\n                    if (cca.iconCssClass && cca.tooltip && cca.componentFileUrl) {\r\n                        customActions.push({\r\n                            type: \"default\",\r\n                            title: cca.tooltip,\r\n                            iconCssClass: cca.iconCssClass,\r\n                            handler: async () => {\r\n                                try {\r\n                                    const module = await import(cca.componentFileUrl ?? \"\");\r\n                                    customActionComponent.value = module?.default ?? module ?? null;\r\n                                }\r\n                                catch (e) {\r\n                                    // Log the error, but continue setting up the app so the UI will show the user an error\r\n                                    console.error(e);\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n                }\r\n            }\r\n\r\n            return customActions;\r\n        });\r\n\r\n        // #endregion\r\n\r\n        // #region Functions\r\n\r\n        const httpCall = async <T>(method: HttpMethod, url: string, params: HttpUrlParams = undefined, data: HttpBodyData = undefined): Promise<HttpResult<T>> => {\r\n            return await doApiCall<T>(method, url, params, data);\r\n        };\r\n\r\n        const get = async <T>(url: string, params: HttpUrlParams = undefined): Promise<HttpResult<T>> => {\r\n            return await httpCall<T>(\"GET\", url, params);\r\n        };\r\n\r\n        const post = async <T>(url: string, params: HttpUrlParams = undefined, data: HttpBodyData = undefined): Promise<HttpResult<T>> => {\r\n            return await httpCall<T>(\"POST\", url, params, data);\r\n        };\r\n\r\n        const invokeBlockAction: InvokeBlockActionFunc = async <T>(actionName: string, data: HttpBodyData = undefined) => {\r\n            return await post<T>(`/api/v2/BlockActions/${store.state.pageGuid}/${props.config.blockGuid}/${actionName}`, undefined, {\r\n                __context: {\r\n                    pageParameters: store.state.pageParameters\r\n                },\r\n                ...data\r\n            });\r\n        };\r\n\r\n        /**\r\n         * Reload the block by requesting the new initialization data and then\r\n         * remove the block component and re-add it.\r\n         */\r\n        const reloadBlock = async (): Promise<void> => {\r\n            const result = await invokeBlockAction<ObsidianBlockConfigBag>(\"RefreshObsidianBlockInitialization\");\r\n\r\n            if (result.isSuccess && result.data) {\r\n                currentBlockComponent.value = null;\r\n\r\n                // Waiting for the next tick forces Vue to remove the component\r\n                // so that we can re-add it causing a full initialization again.\r\n                nextTick(() => {\r\n                    configurationValuesChanged.reset();\r\n                    configurationValues.value = result.data?.configurationValues;\r\n                    configCustomActions.value = result.data?.customConfigurationActions;\r\n                    currentBlockComponent.value = props.blockComponent;\r\n                });\r\n            }\r\n            else {\r\n                console.error(\"Failed to reload block:\", result.errorMessage || \"Unknown error\");\r\n            }\r\n        };\r\n\r\n        /**\r\n         * Gets the person preference provider for this block.\r\n         *\r\n         * @returns A block person preference provider.\r\n         */\r\n        function getPreferenceProvider(): IBlockPersonPreferencesProvider {\r\n            const entityTypeKey = props.config.preferences?.entityTypeKey ?? undefined;\r\n            const entityKey = props.config.preferences?.entityKey ?? undefined;\r\n            const values = props.config.preferences?.values ?? [];\r\n            const anonymous = !store.state.isAnonymousVisitor && !store.state.currentPerson;\r\n\r\n            const preferenceProvider: IBlockPersonPreferencesProvider = {\r\n                blockPreferences: new PersonPreferenceCollection(entityTypeKey, entityKey, \"\", anonymous, values),\r\n                async getGlobalPreferences(): Promise<IPersonPreferenceCollection> {\r\n                    try {\r\n                        const response = await get<PersonPreferenceValueBag[]>(\"/api/v2/Utilities/PersonPreferences\");\r\n\r\n                        if (!response.isSuccess || !response.data) {\r\n                            console.error(response.errorMessage || \"Unable to retrieve person preferences.\");\r\n                            return new PersonPreferenceCollection();\r\n                        }\r\n\r\n                        return new PersonPreferenceCollection(undefined, undefined, \"\", anonymous, response.data);\r\n                    }\r\n                    catch (error) {\r\n                        console.error(error);\r\n                        return new PersonPreferenceCollection();\r\n                    }\r\n                },\r\n\r\n                async getEntityPreferences(entityTypeKey, entityKey): Promise<IPersonPreferenceCollection> {\r\n                    try {\r\n                        const response = await get<PersonPreferenceValueBag[]>(`/api/v2/Utilities/PersonPreferences/${entityTypeKey}/${entityKey}`);\r\n\r\n                        if (!response.isSuccess || !response.data) {\r\n                            console.error(response.errorMessage || \"Unable to retrieve person preferences.\");\r\n                            return new PersonPreferenceCollection();\r\n                        }\r\n\r\n                        return new PersonPreferenceCollection(entityTypeKey, entityKey, \"\", anonymous, response.data);\r\n                    }\r\n                    catch (error) {\r\n                        console.error(error);\r\n                        return new PersonPreferenceCollection();\r\n                    }\r\n                },\r\n            };\r\n\r\n            return preferenceProvider;\r\n        }\r\n\r\n        // #endregion\r\n\r\n        // #region Event Handlers\r\n\r\n        /**\r\n         * Event handler for when a close event is emitted by a custom action\r\n         * component.\r\n         */\r\n        const onCustomActionClose = (): void => {\r\n            customActionComponent.value = null;\r\n        };\r\n\r\n        // #endregion\r\n\r\n        // Watch for changes in our config bar actions and make sure the UI\r\n        // is also updated to match.\r\n        watch(configBarActions, () => {\r\n            if (blockContainerElement.value) {\r\n                updateConfigurationBarActions(blockContainerElement.value, configBarActions.value);\r\n            }\r\n        });\r\n\r\n        // Called when an error in a child component has been captured.\r\n        onErrorCaptured(err => {\r\n            const defaultMessage = \"An unknown error was caught from the block.\";\r\n\r\n            if (err instanceof Error) {\r\n                error.value = err.message || defaultMessage;\r\n            }\r\n            else if (err) {\r\n                error.value = JSON.stringify(err) || defaultMessage;\r\n            }\r\n            else {\r\n                error.value = defaultMessage;\r\n            }\r\n        });\r\n\r\n        // Called when the component has mounted and is presented on the UI.\r\n        onMounted(() => {\r\n            finishTimeMs.value = RockDateTime.now().toMilliseconds();\r\n            const componentName = props.blockComponent?.name || \"\";\r\n            const nameParts = componentName.split(\".\");\r\n            let subtitle = nameParts[0] || \"\";\r\n\r\n            if (subtitle && subtitle.indexOf(\"(\") !== 0) {\r\n                subtitle = `(${subtitle})`;\r\n            }\r\n\r\n            if (nameParts.length) {\r\n                store.addPageDebugTiming({\r\n                    title: nameParts[1] || \"<Unnamed>\",\r\n                    subtitle: subtitle,\r\n                    startTimeMs: props.startTimeMs,\r\n                    finishTimeMs: finishTimeMs.value\r\n                });\r\n            }\r\n\r\n\r\n            // If we have any custom configuration actions then populate the\r\n            // custom buttons in the configuration bar.\r\n            if (blockContainerElement.value) {\r\n                updateConfigurationBarActions(blockContainerElement.value, configBarActions.value);\r\n            }\r\n        });\r\n\r\n        provideHttp({\r\n            doApiCall,\r\n            get,\r\n            post\r\n        });\r\n\r\n        provide(\"invokeBlockAction\", invokeBlockAction);\r\n        provide(\"configurationValues\", configurationValues);\r\n        provideReloadBlock(reloadBlock);\r\n        providePersonPreferences(getPreferenceProvider());\r\n        const configurationValuesChanged = provideConfigurationValuesChanged();\r\n\r\n        if (props.config.blockGuid) {\r\n            provideBlockGuid(props.config.blockGuid);\r\n        }\r\n\r\n        // If we have a block guid, then add an event listener for configuration\r\n        // changes to the block.\r\n        if (props.config.blockGuid) {\r\n            addBlockChangedEventListener(props.config.blockGuid, () => {\r\n                configurationValuesChanged.invoke();\r\n            });\r\n        }\r\n\r\n        return {\r\n            blockContainerElement,\r\n            blockFileUrl: props.config.blockFileUrl,\r\n            blockGuid: props.config.blockGuid ?? emptyGuid,\r\n            currentBlockComponent,\r\n            customActionComponent,\r\n            onCustomActionClose,\r\n            error\r\n        };\r\n    },\r\n\r\n    // Note: We are using a custom alert so there is no dependency on the\r\n    // Controls package.\r\n    template: `\r\n<div ref=\"blockContainerElement\" class=\"obsidian-block\">\r\n    <div v-if=\"!blockComponent\" class=\"alert alert-danger\">\r\n        <strong>Not Found</strong>\r\n        Could not find block component: \"{{blockFileUrl}}\"\r\n    </div>\r\n\r\n    <div v-if=\"error\" class=\"alert alert-danger\">\r\n        <strong>Uncaught Error</strong>\r\n        {{error}}\r\n    </div>\r\n\r\n    <component :is=\"currentBlockComponent\" :blockGuid=\"blockGuid\" />\r\n\r\n    <div style=\"display: none;\">\r\n        <component :is=\"customActionComponent\" @close=\"onCustomActionClose\" />\r\n    </div>\r\n</div>`\r\n});\r\n","// <copyright>\r\n// Copyright by the Spark Development Network\r\n//\r\n// Licensed under the Rock Community License (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n// http://www.rockrms.com/license\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n// </copyright>\r\n//\r\nimport { App, Component, createApp, defineComponent, h, markRaw, onMounted, VNode } from \"vue\";\r\nimport RockBlock from \"./rockBlock.partial\";\r\nimport { useStore } from \"@Obsidian/PageState\";\r\nimport \"@Obsidian/ValidationRules\";\r\nimport \"@Obsidian/FieldTypes/index\";\r\nimport { DebugTiming } from \"@Obsidian/ViewModels/Utility/debugTiming\";\r\nimport { ObsidianBlockConfigBag } from \"@Obsidian/ViewModels/Cms/obsidianBlockConfigBag\";\r\nimport { PageConfig } from \"@Obsidian/Utility/page\";\r\nimport { RockDateTime } from \"@Obsidian/Utility/rockDateTime\";\r\nimport { BasicSuspenseProvider, provideSuspense } from \"@Obsidian/Utility/suspense\";\r\n\r\ntype DebugTimingConfig = {\r\n    elementId: string;\r\n    debugTimingViewModels: DebugTiming[];\r\n};\r\n\r\nconst store = useStore();\r\n\r\n/**\r\n * This is a special use component that allows developers to include style\r\n * tags inside a string-literal component (i.e. not an SFC). It should only\r\n * be used temporarily until the styling team can move the styles into the\r\n * LESS and CSS files.\r\n */\r\nconst developerStyle = defineComponent({\r\n    render(): VNode {\r\n        return h(\"style\", {}, this.$slots.default ? this.$slots.default() : undefined);\r\n    }\r\n});\r\n\r\n\r\n/**\r\n* This should be called once per block on the page. The config contains configuration provided by the block's server side logic\r\n* counterpart.  This adds the block to the page and allows it to begin initializing.\r\n* @param config\r\n* @param blockComponent\r\n*/\r\nexport async function initializeBlock(config: ObsidianBlockConfigBag): Promise<App> {\r\n    const blockPath = `${config.blockFileUrl}.js`;\r\n    let blockComponent: Component | null = null;\r\n    let errorMessage = \"\";\r\n\r\n    if (!config || !config.blockFileUrl || !config.blockGuid || !config.rootElementId) {\r\n        console.error(\"Invalid block configuration:\", config);\r\n        throw \"Could not initialize Obsidian block because the configuration is invalid.\";\r\n    }\r\n\r\n    const rootElement = document.getElementById(config.rootElementId);\r\n\r\n    if (!rootElement) {\r\n        throw \"Could not initialize Obsidian block because the root element was not found.\";\r\n    }\r\n\r\n    try {\r\n        const blockComponentModule = await import(blockPath);\r\n        blockComponent = blockComponentModule ?\r\n            (blockComponentModule.default || blockComponentModule) :\r\n            null;\r\n    }\r\n    catch (e) {\r\n        // Log the error, but continue setting up the app so the UI will show the user an error\r\n        console.error(e);\r\n        errorMessage = `${e}`;\r\n    }\r\n\r\n    const name = `Root${config.blockFileUrl.replace(/\\//g, \".\")}`;\r\n    const startTimeMs = RockDateTime.now().toMilliseconds();\r\n\r\n    const app = createApp({\r\n        name,\r\n        components: {\r\n            RockBlock\r\n        },\r\n        setup() {\r\n            let isLoaded = false;\r\n\r\n            // Create a suspense provider so we can monitor any asynchronous load\r\n            // operations that should delay the display of the page.\r\n            const suspense = new BasicSuspenseProvider(undefined);\r\n            provideSuspense(suspense);\r\n\r\n            /** Called to note on the body element that this block is loading. */\r\n            const startLoading = (): void => {\r\n                let pendingCount = parseInt(document.body.getAttribute(\"data-obsidian-pending-blocks\") ?? \"0\");\r\n                pendingCount++;\r\n                document.body.setAttribute(\"data-obsidian-pending-blocks\", pendingCount.toString());\r\n            };\r\n\r\n            /** Called to note when this block has finished loading. */\r\n            const finishedLoading = (): void => {\r\n                if (isLoaded) {\r\n                    return;\r\n                }\r\n\r\n                isLoaded = true;\r\n\r\n                rootElement.classList.remove(\"obsidian-block-loading\");\r\n\r\n                // Get the number of pending blocks. If this is the last one\r\n                // then signal the page that all blocks are loaded and ready.\r\n                let pendingCount = parseInt(document.body.getAttribute(\"data-obsidian-pending-blocks\") ?? \"0\");\r\n                if (pendingCount > 0) {\r\n                    pendingCount--;\r\n                    document.body.setAttribute(\"data-obsidian-pending-blocks\", pendingCount.toString());\r\n                    if (pendingCount === 0) {\r\n                        document.body.classList.remove(\"obsidian-loading\");\r\n                    }\r\n                }\r\n            };\r\n\r\n            // Start loading and wait for up to 5 seconds for the block to finish.\r\n            startLoading();\r\n            setTimeout(finishedLoading, 5000);\r\n\r\n            // Called when all our child components have initialized.\r\n            onMounted(() => {\r\n                if (!suspense.hasPendingOperations()) {\r\n                    finishedLoading();\r\n                }\r\n                else {\r\n                    suspense.addFinishedHandler(() => {\r\n                        finishedLoading();\r\n                    });\r\n                }\r\n            });\r\n\r\n            return {\r\n                config: config,\r\n                blockComponent: blockComponent ? markRaw(blockComponent) : null,\r\n                startTimeMs,\r\n                errorMessage\r\n            };\r\n        },\r\n\r\n        // Note: We are using a custom alert so there is not a dependency on\r\n        // the Controls package.\r\n        template: `\r\n<div v-if=\"errorMessage\" class=\"alert alert-danger\">\r\n    <strong>Error Initializing Block</strong>\r\n    <br />\r\n    {{errorMessage}}\r\n</div>\r\n<RockBlock v-else :config=\"config\" :blockComponent=\"blockComponent\" :startTimeMs=\"startTimeMs\" />`\r\n    });\r\n\r\n    app.component(\"v-style\", developerStyle);\r\n    app.mount(rootElement);\r\n\r\n    return app;\r\n}\r\n\r\n/**\r\n* This should be called once per page with data from the server that pertains to the entire page. This includes things like\r\n* page parameters and context entities.\r\n* @param {object} pageData\r\n*/\r\nexport async function initializePage(pageConfig: PageConfig): Promise<void> {\r\n    await store.initialize(pageConfig);\r\n}\r\n\r\n/**\r\n * Shows the Obsidian debug timings\r\n * @param debugTimingConfig\r\n */\r\nexport async function initializePageTimings(config: DebugTimingConfig): Promise<void> {\r\n    const rootElement = document.getElementById(config.elementId);\r\n\r\n    if (!rootElement) {\r\n        console.error(\"Could not show Obsidian debug timings because the HTML element did not resolve.\");\r\n        return;\r\n    }\r\n\r\n    const pageDebugTimings = (await import(\"@Obsidian/Controls/Internal/pageDebugTimings.obs\")).default;\r\n\r\n    const app = createApp({\r\n        name: \"PageDebugTimingsRoot\",\r\n        components: {\r\n            PageDebugTimings: pageDebugTimings\r\n        },\r\n        data() {\r\n            return {\r\n                viewModels: config.debugTimingViewModels\r\n            };\r\n        },\r\n        template: `<PageDebugTimings :serverViewModels=\"viewModels\" />`\r\n    });\r\n    app.mount(rootElement);\r\n}\r\n"],"names":["store","useStore","addBlockChangedEventListener","blockId","callback","_document$querySelect","onTriggerClick","dataElement","document","querySelector","value","toLowerCase","startsWith","dataSegments","split","length","areEqual","addEventListener","Sys","Application","add_load","_document$querySelect2","updateConfigurationBarActions","blockContainerElement","actions","_blockContent$childre","blockContent","closest","blockConfiguration","Array","from","children","find","el","classList","contains","configurationBar","nameElement","tagName","querySelectorAll","filter","dataset","forEach","remove","action","_action$title","_action$iconCssClass","hyperlinkElement","createElement","href","title","e","preventDefault","handler","iconElement","className","iconCssClass","appendChild","after","defineComponent","name","props","config","type","Object","required","blockComponent","default","startTimeMs","Number","setup","_props$config$blockGu","error","ref","finishTimeMs","configurationValues","configCustomActions","customConfigurationActions","customActionComponent","currentBlockComponent","configBarActions","computed","customActions","_iterator","_createForOfIteratorHelper","_step","_loop","cca","tooltip","componentFileUrl","push","_handler","_asyncToGenerator","_cca$componentFileUrl","_ref","_module$default","module","console","apply","arguments","s","n","done","err","f","httpCall","_ref2","method","url","params","undefined","data","doApiCall","_x","_x2","get","_ref3","_x3","post","_ref4","_x4","invokeBlockAction","_ref5","actionName","concat","state","pageGuid","blockGuid","_objectSpread","__context","pageParameters","_x5","reloadBlock","_ref6","result","isSuccess","nextTick","_result$data","_result$data2","configurationValuesChanged","reset","errorMessage","getPreferenceProvider","_props$config$prefere","_props$config$prefere2","_props$config$prefere3","_props$config$prefere4","_props$config$prefere5","_props$config$prefere6","entityTypeKey","preferences","entityKey","values","anonymous","isAnonymousVisitor","currentPerson","preferenceProvider","blockPreferences","PersonPreferenceCollection","getGlobalPreferences","response","getEntityPreferences","onCustomActionClose","watch","onErrorCaptured","defaultMessage","Error","message","JSON","stringify","onMounted","_props$blockComponent","RockDateTime","now","toMilliseconds","componentName","nameParts","subtitle","indexOf","addPageDebugTiming","provideHttp","provide","provideReloadBlock","providePersonPreferences","provideConfigurationValuesChanged","provideBlockGuid","invoke","blockFileUrl","emptyGuid","template","developerStyle","render","h","$slots","initializeBlock","_initializeBlock","blockPath","rootElementId","rootElement","getElementById","blockComponentModule","replace","app","createApp","components","RockBlock","isLoaded","suspense","BasicSuspenseProvider","provideSuspense","startLoading","_document$body$getAtt","pendingCount","parseInt","body","getAttribute","setAttribute","toString","finishedLoading","_document$body$getAtt2","setTimeout","hasPendingOperations","addFinishedHandler","markRaw","component","mount","initializePage","_initializePage","pageConfig","initialize","initializePageTimings","_initializePageTimings","elementId","pageDebugTimings","PageDebugTimings","viewModels","debugTimingViewModels"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgCA,IAAMA,OAAK,GAAGC,QAAQ,EAAE,CAAA;MAaxB,SAASC,4BAA4BA,CAACC,OAAa,EAAEC,QAAsB,EAAQ;MAAA,EAAA,IAAAC,qBAAA,CAAA;QAC/E,SAASC,cAAcA,GAAS;MAC5B,IAAA,IAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAa,CAAC,2BAA2B,CAAqB,CAAA;UAC3F,IAAIF,WAAW,CAACG,KAAK,CAACC,WAAW,EAAE,CAACC,UAAU,CAAC,gBAAgB,CAAC,EAAE;MAC9D,MAAA,IAAMC,YAAY,GAAGN,WAAW,CAACG,KAAK,CAACC,WAAW,EAAE,CAACG,KAAK,CAAC,GAAG,CAAC,CAAA;MAE/D,MAAA,IAAID,YAAY,CAACE,MAAM,IAAI,CAAC,IAAIC,QAAQ,CAACH,YAAY,CAAC,CAAC,CAAC,EAAEV,OAAO,CAAC,EAAE;MAChEC,QAAAA,QAAQ,EAAE,CAAA;MACd,OAAA;MACJ,KAAA;MACJ,GAAA;QAEA,CAAAC,qBAAA,GAAAG,QAAQ,CAACC,aAAa,CAAC,sBAAsB,CAAC,MAAAJ,IAAAA,IAAAA,qBAAA,uBAA9CA,qBAAA,CAAgDY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