{"version":3,"sources":["webpack:///./src/modules/guide/GuideView.vue?ca71","webpack:///./src/modules/guide/services/guide-service.ts","webpack:///./src/modules/guide/GuideView.vue","webpack:///./src/modules/guide/GuideView.vue?b350","webpack:///./src/modules/guide/GuideView.vue?6222"],"names":["_hoisted_1","class","_hoisted_2","key","_hoisted_3","_hoisted_4","_hoisted_5","render","_ctx","_cache","$props","$setup","$data","$options","_component_pagetree","_component_loading_circle","_component_sidebar_wrapper","showSidebar","pagetreeHasMultipleNodes","sidebar","pagetree","rootContentTitle","selectedItem","isLoading","isPagetreeLoading","onPagetreeItemSelected","default","iFrameSrc","hideIFrame","src","height","title","onLoad","onIFrameLoad","_","sectionName","get","guideService","this","$route","params","section","query","currentContentId","rootContentId","$nextTick","childItems","length","reloadPagetree","currentSection","getContentTree","item","$router","push","ContentId","to","from","contentId","event","iframe","target","contentDocument","contentDocumentHeight","documentElement","getBoundingClientRect","toString","hash","getElementById","decodeURI","scrollIntoView","behavior","performMark","keyword","iframeMainContent","markInstance","unmark","done","mark","components","SidebarWrapper","Pagetree","LoadingCircle","__exports__"],"mappings":"qJAGMA,EAAa,CAAEC,MAAO,gBACtBC,EAAa,CACjBC,IAAK,EACLF,MAAO,mBAEHG,EAAa,CAAEH,MAAO,sBACtBI,EAAa,CAAEJ,MAAO,qBACtBK,EAAa,CAAC,OAEd,SAAUC,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMC,EAAsB,eAAkB,YACxCC,EAA4B,eAAkB,kBAC9CC,EAA6B,eAAkB,mBAErD,OAAQ,iBAAc,eAAaA,EAA4B,CAC7DC,YAAaT,EAAKU,yBAClBjB,MAAO,mBACN,CACDkB,QAAS,gBAAS,iBAAM,CACtB,eAAoB,MAAOnB,EAAY,CACpCQ,EAAKY,SAASC,kBACV,iBAAc,eAAoB,KAAMnB,EAAY,eAAiBM,EAAKY,SAASC,kBAAmB,IACvG,eAAoB,IAAI,GAC5B,eAAoB,MAAOjB,EAAY,CACp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EAAL,CAIA,IAAMC,EAAe,IAAI,IAAKD,GAC9BC,EAAaC,OAAO,CACnBC,KAAM,WACLF,EAAaG,KAAKL,YAnHtB,GAAuC,QA0BtC,gBADC,eAAM,c,gCAON,MA+BD,gBADC,eAAM,W,4BAcN,MA5EmB,EAAS,gBAP7B,eAAmB,CACnBM,WAAY,CACXC,iBAAA,KACAC,WAAA,KACAC,gBAAA,SAGmB,W,iCCZrB,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS3E,GAAQ,CAAC,YAAY,qBAE1E,gB,kCCTf","file":"js/guide.a9c536cb.js","sourcesContent":["import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, createElementVNode as _createElementVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-011b04af\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"sidebar-slot\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"pagetree-header\"\n}\nconst _hoisted_3 = { class: \"pagetree-container\" }\nconst _hoisted_4 = { class: \"content-container\" }\nconst _hoisted_5 = [\"src\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_pagetree = _resolveComponent(\"pagetree\")!\n const _component_loading_circle = _resolveComponent(\"loading-circle\")!\n const _component_sidebar_wrapper = _resolveComponent(\"sidebar-wrapper\")!\n\n return (_openBlock(), _createBlock(_component_sidebar_wrapper, {\n showSidebar: _ctx.pagetreeHasMultipleNodes,\n class: \"sidebar-wrapper\"\n }, {\n sidebar: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_ctx.pagetree.rootContentTitle)\n ? (_openBlock(), _createElementBlock(\"h4\", _hoisted_2, _toDisplayString(_ctx.pagetree.rootContentTitle), 1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n (_ctx.pagetree)\n ? (_openBlock(), _createBlock(_component_pagetree, {\n key: 0,\n selectedItem: _ctx.selectedItem,\n isLoading: _ctx.isPagetreeLoading,\n pagetree: _ctx.pagetree,\n \"onUpdate:selectedItem\": _ctx.onPagetreeItemSelected\n }, null, 8, [\"selectedItem\", \"isLoading\", \"pagetree\", \"onUpdate:selectedItem\"]))\n : (_openBlock(), _createBlock(_component_loading_circle, { key: 1 }))\n ])\n ])\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_4, [\n (_ctx.iFrameSrc && !_ctx.hideIFrame)\n ? (_openBlock(), _createElementBlock(\"iframe\", {\n key: 0,\n src: _ctx.iFrameSrc,\n height: \"2000\",\n title: \"selectedItem.primaryText\",\n onLoad: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onIFrameLoad && _ctx.onIFrameLoad(...args)))\n }, null, 40, _hoisted_5))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _: 1\n }, 8, [\"showSidebar\"]))\n}","import { fetchService } from \"@/core/services/fetch-service\";\nimport { IContentTreeModel } from \"../models/content-tree\";\n\nexport default class GuideService {\n\tpublic getContentTree(sectionName: string): Promise {\n\t\treturn fetchService.get(`/Guide/${sectionName}/ContentTree`);\n\t}\n}\n\nexport const guideService = new GuideService();","\nimport { Vue, Options } from \"vue-class-component\";\nimport SidebarWrapper from \"@/common/components/sidebar-wrapper/SidebarWrapper.vue\";\nimport Pagetree from \"@/common/components/pagetree/Pagetree.vue\";\nimport { guideService } from \"./services/guide-service\";\nimport { RouteLocation } from \"vue-router\";\nimport { getPagetreeItemByKey } from \"@/common/models/pagetree\";\nimport LoadingCircle from \"@/common/components/loading-circle/LoadingCircle.vue\";\nimport { IContentTreeModel, IContentTreeItem } from \"./models/content-tree\";\nimport { Watch } from \"vue-property-decorator\";\nimport Mark from \"mark.js\";\n\n@Options({\n\tcomponents: {\n\t\tSidebarWrapper,\n\t\tPagetree,\n\t\tLoadingCircle\n\t}\n})\nexport default class GuideView extends Vue {\n\tpublic pagetree: IContentTreeModel | null = null;\n\tpublic selectedItem: IContentTreeItem | null = null;\n\tpublic isPagetreeLoading: boolean = false;\n\tpublic hideIFrame: boolean = false;\n\n\tget currentSection(): string {\n\t\treturn (this.$route.params.section as string) ?? \"\";\n\t}\n\n\tget currentContentId(): string | null {\n\t\treturn (this.$route.query[\"ContentId\"] as string) ?? null;\n\t}\n\n\tget iFrameSrc(): string | null {\n\t\tif (this.currentContentId || this.pagetree?.rootContentId) {\n\t\t\treturn (\n\t\t\t\t\"/_/Guide/Content/ConfluenceContent?ContentId=\" +\n\t\t\t\t(this.currentContentId || this.pagetree?.rootContentId)\n\t\t\t);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t@Watch(\"iFrameSrc\")\n\tpublic onIFrameSrcChange(): void {\n\t\t//Remove iframe from dom, while changing src, to avoid pushing state to history.\n\t\tthis.hideIFrame = true;\n\t\tthis.$nextTick(function () {\n\t\t\tthis.hideIFrame = false;\n\t\t});\n\t}\n\n\tget pagetreeHasMultipleNodes(): boolean {\n\t\treturn !!(this.pagetree?.childItems && this.pagetree.childItems.length > 0);\n\t}\n\n\tasync mounted(): Promise {\n\t\tawait this.reloadPagetree();\n\t}\n\n\tprivate async reloadPagetree(): Promise {\n\t\tif (!this.currentSection) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isPagetreeLoading = true;\n\t\tconst pagetree = await guideService.getContentTree(this.currentSection);\n\t\tif (this.currentContentId) {\n\t\t\tthis.selectedItem = getPagetreeItemByKey(this.currentContentId, pagetree);\n\t\t}\n\t\tthis.pagetree = pagetree;\n\t\tthis.isPagetreeLoading = false;\n\t}\n\n\tpublic onPagetreeItemSelected(item: IContentTreeItem): void {\n\t\tthis.$router.push({\n\t\t\tquery: { ContentId: item.key }\n\t\t});\n\t}\n\n\t@Watch(\"$route\")\n\tpublic onRouteChange(to: RouteLocation, from: RouteLocation): void {\n\t\tif (to.params.section !== from.params.section) {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.reloadPagetree();\n\t\t\t});\n\t\t} else if (to.query[\"ContentId\"] !== from.query[\"ContentId\"]) {\n\t\t\tconst contentId = to.query[\"ContentId\"] as string;\n\t\t\tif (contentId) {\n\t\t\t\tthis.selectedItem = getPagetreeItemByKey(contentId, this.pagetree);\n\t\t\t} else {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic onIFrameLoad(event: Event): void {\n\t\tthis.$nextTick(() => {\n\t\t\tconst iframe = event.target as HTMLIFrameElement;\n\t\t\tif (!iframe.contentDocument) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst contentDocumentHeight =\n\t\t\t\tiframe.contentDocument.documentElement.getBoundingClientRect().height ||\n\t\t\t\t0;\n\t\t\tiframe.height = (contentDocumentHeight + 20).toString();\n\n\t\t\tconst hash = this.$route.query[\"IFrameHash\"] as string;\n\t\t\tif (hash) {\n\t\t\t\tiframe.contentDocument\n\t\t\t\t\t.getElementById(decodeURI(hash))\n\t\t\t\t\t?.scrollIntoView({ behavior: \"smooth\" });\n\t\t\t}\n\n\t\t\tthis.performMark(iframe);\n\t\t});\n\t}\n\n\tprivate performMark(iframe: HTMLIFrameElement): void {\n\t\tconst keyword = this.$route.query[\"SearchPhrase\"] as string;\n\t\tif (!keyword) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst iframeMainContent =\n\t\t\tiframe.contentDocument?.getElementById(\"main-content\");\n\t\tif (!iframeMainContent) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst markInstance = new Mark(iframeMainContent);\n\t\tmarkInstance.unmark({\n\t\t\tdone: () => {\n\t\t\t\tmarkInstance.mark(keyword);\n\t\t\t}\n\t\t});\n\t}\n}\n","import { render } from \"./GuideView.vue?vue&type=template&id=011b04af&scoped=true&ts=true\"\nimport script from \"./GuideView.vue?vue&type=script&lang=ts\"\nexport * from \"./GuideView.vue?vue&type=script&lang=ts\"\n\nimport \"./GuideView.vue?vue&type=style&index=0&id=011b04af&scoped=true&lang=css\"\n\nimport exportComponent from \"/app/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-011b04af\"]])\n\nexport default __exports__","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./GuideView.vue?vue&type=style&index=0&id=011b04af&scoped=true&lang=css\""],"sourceRoot":""}