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AkBiI,GAC9BlI,QAAQC,IAAI,6BAA8B6G,GAC1C1D,EAAE,sBAAsBrB,SAAS,cAAe+E,EACpD,IACAjH,KAAKmH,UAAUjH,KAAK,iBAAiB,SAASmI,EAAcpB,GACxD,IAAIqB,EAAmBrI,EAAKkH,UAAUjF,SAAS,cAC/CjC,EAAKkH,UAAUjF,SAAS,aAAcoG,EAAQ,GAAGhJ,IACjDa,QAAQC,IAAI,wBAAyB6G,GACrChH,EAAKgH,QAAUA,CACnB,GACJ,CAEA,gCAAMG,CAA2B3B,GAC7B,IAAKA,EAAkBK,WAAc,OAE3C,IAAIyC,QAA4CvI,KAAKqE,IAAI4B,QAAQjG,KAAKsE,WAAWe,WAChFgB,IAAI,0CAA0CrG,KAAKsE,WAAWe,wBAAwBI,EAAkBK,cACxGK,aAGInG,KAAKwI,mBAAmBD,GAKzBA,IACHvI,KAAK8G,IAAuByB,EAAeE,eAAgB3B,IAC3D9G,KAAKmH,UAAUjF,SAAS,UAAWlC,KAAK8G,MANxC3G,QAAQa,KAAK,oEAQZ,CAIH,kBAAAwH,CAAmBE,GAElB,GADAvI,QAAQC,IAAI,2BACDmG,MAAPmC,EAAoB,OAAO,EAC/B,IAAKA,EAAID,eAAkB,OAAO,EAElC,MAAME,EAAeD,EAAID,eAAeE,MAExC,SAD0BA,GAASA,GAAS,EAAeC,YAE5D,CAEG,gBAAMpI,GACRL,QAAQC,IAAI,mBACNJ,KAAKN,OAAO+G,QAAQ,kCACxB,GAfK,EAAAmC,YAAqB,sBA/I7B,GAAC,EAAA9F,S,iEARW4D,EAAc,KAD1B,EAAA3D,W,uBAW6B,IAA6B,IACxB,IAAmD,IAC9C,IAAgD,EAAAC,gBACpD,OAbvB0D,E","sources":["webpack://client-app/./src/app/components/base-viewer-combined/base-viewer-combined.scss","webpack://client-app/./src/app/components/base-viewer-three-d/base-viewer-three-d.scss","webpack://client-app/./src/app/components/base-viewer-two-d/base-viewer-two-d.scss","webpack://client-app/./src/app/components/base-viewer-combined/base-viewer-combined.html","webpack://client-app/./src/app/components/base-viewer-three-d/base-viewer-three-d.html","webpack://client-app/./src/app/components/base-viewer-two-d/base-viewer-two-d.html","webpack://client-app/./src/app/components/base-viewer-combined/base-viewer-combined.ts","webpack://client-app/./src/app/components/base-viewer-three-d/Three_Sel.ts","webpack://client-app/./src/app/components/base-viewer-three-d/base-viewer-three-d.ts","webpack://client-app/./src/app/components/base-viewer-two-d/base-viewer-two-d.ts"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.base-viewer-container{height:100%;width:100%;overflow:hidden}.base-viewer-container .viewer3d-top{height:100%;position:relative;overflow:hidden;z-index:0}.base-viewer-container .viewer3d-top .base-small-2d-view{position:absolute;visibility:hidden;width:30%;height:300px;right:0;bottom:0;margin-right:5px;margin-bottom:5px;z-index:0}.base-viewer-container .viewer3d-top .base-small-2d-view .viewerContainer2d{border-radius:10px}.base-viewer-container .gutter.gutter-vertical{cursor:row-resize}.base-viewer-container .gutter.gutter-vertical::before{position:relative;display:flex;flex-direction:column;align-items:center;top:50%;transform:translateY(-50%);font-size:30px !important;content:\"\";font:var(--fa-font-solid)}.base-viewer-container .viewer2d-bottom{height:0%;position:relative;overflow:hidden}.base-viewer-container .takeoff-viewer-settings{background-color:#fff;z-index:11;position:absolute;height:calc(100% - 50px);border-top-left-radius:10px;border-bottom-left-radius:10px;padding:10px 20px;overflow:auto;width:350px;right:0%;z-index:10}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/base-viewer-combined/base-viewer-combined.scss\"],\"names\":[],\"mappings\":\"AAAA,uBAAA,WACI,CAAA,UACA,CAAA,eACA,CAAA,qCACA,WACI,CAAA,iBACA,CAAA,eACA,CAAA,SACA,CAAA,yDACA,iBACI,CAAA,iBACA,CAAA,SACA,CAAA,YACA,CAAA,OACA,CAAA,QACA,CAAA,gBACA,CAAA,iBACA,CAAA,SACA,CAAA,4EACA,kBACI,CAAA,+CAIZ,iBACI,CAAA,uDAEJ,iBACI,CAAA,YACA,CAAA,qBACA,CAAA,kBACA,CAAA,OACA,CAAA,0BACA,CAAA,yBACA,CAAA,WACA,CAAA,yBACA,CAAA,wCAEJ,SACI,CAAA,iBACA,CAAA,eACA,CAAA,gDAEJ,qBACI,CAAA,UACA,CAAA,iBACA,CAAA,wBACA,CAAA,2BACA,CAAA,8BACA,CAAA,iBACA,CAAA,aACA,CAAA,WACA,CAAA,QACA,CAAA,UACA\",\"sourcesContent\":[\".base-viewer-container {\\r\\n height: 100%;\\r\\n width: 100%;\\r\\n overflow: hidden;\\r\\n .viewer3d-top {\\r\\n height: 100%;\\r\\n position: relative;\\r\\n overflow: hidden;\\r\\n z-index:0;\\r\\n .base-small-2d-view {\\r\\n position:absolute;\\r\\n visibility: hidden;\\r\\n width: 30%;\\r\\n height: 300px;\\r\\n right: 0;\\r\\n bottom: 0;\\r\\n margin-right: 5px;\\r\\n margin-bottom: 5px;\\r\\n z-index: 0;\\r\\n .viewerContainer2d {\\r\\n border-radius: 10px;\\r\\n }\\r\\n }\\r\\n }\\r\\n .gutter.gutter-vertical {\\r\\n cursor: row-resize;\\r\\n }\\r\\n .gutter.gutter-vertical::before {\\r\\n position: relative;\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n align-items: center;\\r\\n top:50%;\\r\\n transform: translateY(-50%);\\r\\n font-size: 30px!important; //Needs to stay.\\r\\n content: \\\"\\\\f86c\\\";\\r\\n font: var(--fa-font-solid);\\r\\n }\\r\\n .viewer2d-bottom {\\r\\n height: 0%;\\r\\n position: relative;\\r\\n overflow: hidden;\\r\\n }\\r\\n .takeoff-viewer-settings {\\r\\n background-color: white;\\r\\n z-index: 11;\\r\\n position: absolute;\\r\\n height: calc(100% - 50px);\\r\\n border-top-left-radius: 10px;\\r\\n border-bottom-left-radius: 10px;\\r\\n padding: 10px 20px;\\r\\n overflow: auto;\\r\\n width: 350px;\\r\\n right:0%;\\r\\n z-index: 10;\\r\\n }\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.anim-div .takeoff-warning-msg,.anim-div .takeoff-information-msg{padding:5px;margin-top:2px;padding-left:20px;padding-right:20px;border-radius:5px;max-width:100%;text-align:center;white-space:nowrap}.anim-div .takeoff-warning-msg{background-color:#ffe100}.anim-div .takeoff-information-msg{background-color:#d3d3d3}.anim-div .takeoff-information-msg i{animation:spin-animation 1s infinite}.element-name-display{position:absolute;top:10px;left:50%;transform:translateX(-50%);padding:0 10px 0 10px;height:2.5em;line-height:2.5em;font-size:1.1em;text-align:center;vertical-align:middle;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:rgba(255,255,255,.8);border-radius:10px}#container{height:100%}.viewerContainer3d{position:relative;height:100%;width:100%;background:linear-gradient(rgba(125, 188, 255, 0.2), rgba(255, 255, 255, 0))}.visible{visibility:visible;opacity:.9;transition:opacity .2s}.hidden{visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s}@keyframes spin-animation{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.visible,.hidden{overflow:hidden}.visible{visibility:visible;opacity:.9;transition:opacity .2s}.hidden{visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s}.hidden>div{margin-top:-10000px !important;transition:margin-top 0s .2s}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/base-viewer-three-d/base-viewer-three-d.scss\"],\"names\":[],\"mappings\":\"AAGI,kEACI,WAAA,CACA,cAAA,CACA,iBAAA,CACA,kBAAA,CACA,iBAAA,CACA,cAAA,CACA,iBAAA,CACA,kBAAA,CAGJ,+BACI,wBAAA,CAGJ,mCACI,wBAAA,CACA,qCACI,oCAAA,CAIZ,sBACE,iBAAA,CACA,QAAA,CACA,QAAA,CACA,0BAAA,CACA,qBAAA,CACA,YAAA,CACA,iBAAA,CACA,eAAA,CACA,iBAAA,CACA,qBAAA,CACA,eAAA,CACA,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,+BAAA,CACA,kBAAA,CAIF,WAAA,WAAA,CAEA,mBACE,iBAAA,CACE,WAAA,CACA,UAAA,CACA,4EAAA,CAGJ,SACI,kBAAA,CACA,UAAA,CACA,sBAAA,CAGF,QACE,iBAAA,CACA,SAAA,CACA,wCAAA,CAGF,0BACD,GACC,sBAAA,CAED,KACC,wBAAA,CAAA,CAIF,iBAEE,eAAA,CAGF,SACE,kBAAA,CACA,UAAA,CACA,sBAAA,CAGF,QACE,iBAAA,CACA,SAAA,CACA,wCAAA,CAGF,YACE,8BAAA,CACA,4BAAA\",\"sourcesContent\":[\"@import \\\"src/resources/customized-styles/variables\\\";\\r\\n\\r\\n.anim-div {\\r\\n .takeoff-warning-msg, .takeoff-information-msg {\\r\\n padding: 5px;\\r\\n margin-top: 2px;\\r\\n padding-left: 20px;\\r\\n padding-right: 20px;\\r\\n border-radius: 5px;\\r\\n max-width: 100%;\\r\\n text-align: center;\\r\\n white-space:nowrap;\\r\\n }\\r\\n \\r\\n .takeoff-warning-msg {\\r\\n background-color: rgb(255, 225, 0);\\r\\n }\\r\\n \\r\\n .takeoff-information-msg {\\r\\n background-color: lightgray;\\r\\n i {\\r\\n animation: spin-animation 1.0s infinite;\\r\\n }\\r\\n }\\r\\n}\\r\\n.element-name-display {\\r\\n position:absolute;\\r\\n top: 10px;\\r\\n left: 50%;\\r\\n transform: translateX(-50%);\\r\\n padding: 0 10px 0 10px;\\r\\n height: 2.5em;\\r\\n line-height: 2.5em;\\r\\n font-size: 1.1em;\\r\\n text-align: center;\\r\\n vertical-align: middle;\\r\\n font-weight: 700;\\r\\n overflow: hidden;\\r\\n white-space: nowrap;\\r\\n text-overflow: ellipsis;\\r\\n background: rgb(255, 255, 255, 0.8);\\r\\n border-radius: 10px;\\r\\n \\r\\n}\\r\\n\\r\\n#container { height: 100%; } // should probably be governed HERE, which is the parent-level, instead.\\r\\n\\r\\n.viewerContainer3d {\\r\\n position: relative;\\r\\n height: 100%;\\r\\n width: 100%;\\r\\n background: linear-gradient(rgba(125, 188, 255, 0.2), rgba(255, 255, 255, 0));\\r\\n}\\r\\n\\r\\n.visible {\\r\\n visibility: visible;\\r\\n opacity: 0.9;\\r\\n transition: opacity .2s;\\r\\n }\\r\\n \\r\\n .hidden {\\r\\n visibility: hidden;\\r\\n opacity: 0;\\r\\n transition: visibility 0s .2s, opacity .2s;\\r\\n }\\r\\n\\r\\n @keyframes spin-animation {\\r\\n\\t0% {\\r\\n\\t\\ttransform: rotate(0deg);\\r\\n\\t}\\r\\n\\t100% {\\r\\n\\t\\ttransform: rotate(359deg);\\r\\n\\t}\\r\\n}\\r\\n\\r\\n.visible,\\r\\n.hidden {\\r\\n overflow: hidden;\\r\\n}\\r\\n\\r\\n.visible {\\r\\n visibility: visible;\\r\\n opacity: 0.9;\\r\\n transition: opacity .2s;\\r\\n}\\r\\n\\r\\n.hidden {\\r\\n visibility: hidden;\\r\\n opacity: 0;\\r\\n transition: visibility 0s .2s, opacity .2s;\\r\\n}\\r\\n\\r\\n.hidden > div { //This moves the content out of the screen(Kind of a hack.)\\r\\n margin-top: -10000px !important;\\r\\n transition: margin-top 0s .2s;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `#viewerContainer2d{width:100%;height:100%;position:relative;overflow:hidden}#viewerContainer2d svg{background-color:rgba(255,255,255,.8)}.switch-button{position:absolute;right:0;top:0;margin-top:8px;margin-right:5px}.bs-storey-select-container{width:fit-content !important}.bs-storey-select{width:fit-content !important}.bs-storey-select button{z-index:1;height:30.85px !important}.bs-dropup{width:fit-content}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/base-viewer-two-d/base-viewer-two-d.scss\"],\"names\":[],\"mappings\":\"AAAA,mBACC,UAAA,CACA,WAAA,CACG,iBAAA,CACA,eAAA,CACA,uBACI,qCAAA,CAKR,eACI,iBAAA,CACA,OAAA,CACA,KAAA,CACA,cAAA,CACA,gBAAA,CAKJ,4BACI,4BAAA,CAGJ,kBACI,4BAAA,CACA,yBACI,SAAA,CACA,yBAAA,CAKR,WACI,iBAAA\",\"sourcesContent\":[\"#viewerContainer2d {\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n position: relative;\\r\\n overflow: hidden;\\r\\n svg {\\r\\n background-color: rgba(255, 255, 255, 0.8); \\r\\n }\\r\\n \\r\\n}\\r\\n\\r\\n.switch-button {\\r\\n position: absolute;\\r\\n right:0;\\r\\n top:0;\\r\\n margin-top: 8px;\\r\\n margin-right: 5px;\\r\\n}\\r\\n\\r\\n//This styling is used to remove the invisible line making the dragging of the viewpoint not work in the bottom of the screen\\r\\n//This is catenda's own setup and if things get skewed it might be due to a change in Canteda's API.\\r\\n.bs-storey-select-container {\\r\\n width:fit-content !important;\\r\\n}\\r\\n\\r\\n.bs-storey-select {\\r\\n width:fit-content !important;\\r\\n button {\\r\\n z-index:1;\\r\\n height: 30.85px!important;\\r\\n }\\r\\n\\r\\n}\\r\\n\\r\\n.bs-dropup {\\r\\n width:fit-content;\\r\\n}\\r\\n\\r\\n// .bs-button {\\r\\n// \\tbackground-color: rgba(36, 42, 48,1) !important;\\r\\n// \\tcolor: white !important;\\r\\n// \\tborder-color: black !important;\\r\\n// \\ti {\\r\\n// \\t\\tcolor: white!important;\\r\\n// \\t}\\r\\n// span {\\r\\n// white-space: nowrap!important;\\r\\n// }\\r\\n// }\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","module.exports = \"\\r\\n\";","module.exports = \"\\r\\n\";","module.exports = \"\";","import Split from \"split.js\";\r\nimport { autoinject,bindable } from 'aurelia-framework';\r\n\r\nimport {EventAggregator, Subscription} from \"aurelia-event-aggregator\";\r\nimport { Three_Sel } from \"../base-viewer-three-d/Three_Sel\";\r\n//import { Three_Sel } from \"app/project/quantity-takeoff/takeoff-viewer/takeoff-viewer\";\r\n\r\n@autoinject\r\nexport class BaseViewerCombined {\r\n\t@bindable threeSel:Three_Sel|undefined;\r\n\r\n\ttwoD_enabled:boolean = true;\r\n\r\n\t// (Note that we are NOT setting the @bindable decorator on this one.)\r\n\tBVC_openBimMode:boolean = true; // This is ONLY used in viewer-menu.html (we might even move it there.)\r\n\r\n\tpublic static useMPKFragments_Master:boolean = true; //false;\r\n\r\n private isViewerLoaded:boolean = false;\r\n private isSettingsVisible:boolean = false;\r\n\r\n private split: Split.Instance | undefined;\r\n private subscriptions: Subscription[] = [];\r\n\r\n\tprivate self:BaseViewerCombined;\r\n\r\n constructor(public events: EventAggregator) { this.self = this; }\r\n\r\n bind() {\r\n\t\tconsole.log('BaseViewerCombined.bind');\r\n this.subscriptions = [\r\n this.events.subscribe('WorkAreaContainer:ViewerSettingsPressed', () => { this.switchSettingsVisibility()}),\r\n this.events.subscribe('WorkAreaContainer:Move2d', () => { this.move2dViewDown()}),\r\n this.events.subscribe('base-viewer-combined:move2dView', () => { this.move2dView('event:_base-viewer-combined:move2dView',this.twoD_enabled)}),\r\n this.events.subscribe('base-viewer-combined:hide2d', () => { this.hide2dView()}),\r\n ]\r\n }\r\n\r\n hide2dView() { // a misguided? experiment.\r\n\t\tconsole.log('BaseViewerCombined.hide2dView, will now try to hide the 2d view. - twoD_enabled');\r\n\t\tthis.twoD_enabled = false;\r\n\r\n\t\t// Ser ikke ud til at virke.. is tied to concrete splitter IDs.\r\n\t\t//this.splitViewerResizeService.hide2dView();\t\t\r\n\r\n let smalldiv_2d: HTMLElement | null = document.getElementById('small-2d-view');\r\n let viewer_2d: HTMLElement | null = document.getElementById('viewer2d');\r\n if (!smalldiv_2d || !viewer_2d) { \r\n\t\t\tconsole.log('(nothing to hide)'); //'missing either', smalldiv_2d, viewer_2d)\r\n\t\t\treturn; \r\n\t\t} // can this work?\r\n\r\n\t\tconst is_viewerInSmallDiv:boolean = (smalldiv_2d.contains(viewer_2d));\r\n\t\tconsole.warn('was 2dviewer in smallDiv?', is_viewerInSmallDiv);\r\n\r\n if (!is_viewerInSmallDiv) { // ONLY do this, IFF viewer is NOT ALREADY a child of smallDiv!\r\n smalldiv_2d.style.visibility = \"none\"; // why not collapse?\r\n this.split?.setSizes([100,0]); \r\n console.log(`does split exist? [${this.split}]`,this.split );\r\n this.split?.destroy(); // her doer den for thomas. den bliver sur over, at den gutter den vil removeChild for ikke er i den forventede parent, eller omvendt.\r\n smalldiv_2d.appendChild(viewer_2d); // jeg har byttet om her, for at se om det hjaelper.\r\n // function destroy(preserveStyles, preserveGutter) \r\n }\r\n\r\n\t\t// both of these cause damage now - it refuses to resize..\r\n\t\t//this.move2dView('at end of hide2dView', true); //this.twoD_enabled);\r\n\t\t//this.move2dViewDown();//'at end of hide2dView'); // gav problemer\r\n\t\twindow.dispatchEvent(new Event('resize')); // THIS hack seems to work\r\n\t\tconsole.log('end of hide2dView');\r\n\t}\r\n\r\n move2dView(who:string, twoD_enabled:boolean) {\r\n let viewer_2d: HTMLElement | null = document.getElementById('viewer2d');\r\n let topView_3d: HTMLElement | null = document.getElementById('three-d-top');\r\n let bigDiv_2d: HTMLElement | null = document.getElementById('two-d-bottom');\r\n let smalldiv_2d: HTMLElement | null = document.getElementById('small-2d-view');\r\n\r\n\t\tconsole.log('BaseViewerCombined.move2dView, who:', who, 'twoD_enabled?', this.twoD_enabled, !!viewer_2d, !!topView_3d, !!bigDiv_2d, !!smalldiv_2d);\r\n\t\t//if (!this.twoD_enabled) { return; }\r\n\t\tif (!twoD_enabled) { return; }\r\n\r\n if (!smalldiv_2d || !viewer_2d || !bigDiv_2d) { return; } // (bah, forget about the resize-event below then.)\r\n\r\n\t\tif (smalldiv_2d.contains(viewer_2d)) {\r\n\t\t\tconsole.log('move2dView triggers handleDockTooBigDiv');\r\n\t\t\tthis.handleDockTooBigDiv(bigDiv_2d,viewer_2d,smalldiv_2d);\r\n\t\t} else { // (viewer_2d NOT currently in the smalldiv_2d)\r\n\t\t\tconsole.log('move2dView triggers destroySplit');\r\n\t\t\t// Make viewer_2d an inset overlayed on viewer3d, and let viewer3d take over all:\r\n\t\t\tsmalldiv_2d.style.visibility = \"visible\";\r\n\t\t\tsmalldiv_2d.appendChild(viewer_2d);\r\n\t\t\tthis.split?.setSizes([100,0]); \r\n\t\t\tthis.split?.destroy();\r\n\t\t} \r\n\r\n window.dispatchEvent(new Event('resize')); // hmm, why does that make sense, what does it do?\r\n }\r\n\r\n handleDockTooBigDiv(bigDiv: HTMLElement,viewer: HTMLElement,smalldiv: HTMLElement) {\r\n\t\tconsole.log('BaseViewerCombined.handleDockTooBigDiv');\r\n this.setupSplitter();\r\n bigDiv.appendChild(viewer);\r\n smalldiv.style.visibility = \"hidden\";\r\n this.split?.setSizes([50,50]); \r\n }\r\n\r\n move2dViewDown() {\r\n let viewer2d: HTMLElement | null = document.getElementById('viewer2d');\r\n let bigDiv: HTMLElement | null = document.getElementById('two-d-bottom');\r\n let smalldiv: HTMLElement | null = document.getElementById('small-2d-view');\r\n\r\n\t\tconst contains:boolean = !!(smalldiv && smalldiv.contains(viewer2d));\r\n if (smalldiv) {\r\n if (contains && bigDiv && viewer2d) {\r\n this.handleDockTooBigDiv(bigDiv,viewer2d,smalldiv);\r\n window.dispatchEvent(new Event('resize'));\r\n }\r\n }\r\n\t\t\r\n\t\t// console.log('BaseViewerCombined.move2dViewDown, (smalldiv,contain,big,2d):', !!smalldiv, contains, !!bigDiv, !!viewer2d);\r\n }\r\n\r\n unbind() {\r\n\t\tconsole.log('BaseViewerCombined.unbind');\r\n this.subscriptions.forEach(subscription => subscription.dispose());\r\n }\r\n\r\n async attached() {\r\n console.log('base-viewer-combined:attached');\r\n await this.setupSplitter();\r\n this.move2dView('attached',this.twoD_enabled); //In quantity-takeoff it was wanted to start with the 2d-view docked to the 3d-view.\r\n }\r\n\r\n async switchSettingsVisibility() {\r\n\t\tconsole.log('BaseViewerCombined.switchSettingsVisibility');\r\n this.isViewerLoaded = true;\r\n this.isSettingsVisible = !this.isSettingsVisible;\r\n }\r\n\r\n async setupSplitter(): Promise {\r\n\t\tconsole.log('BaseViewerCombined.setupSplitter');\r\n\r\n if (document.getElementById('three-d-top') == null || document.getElementById('two-d-bottom') == null) { return; }\r\n\r\n\t\tthis.split = Split(['#three-d-top','#two-d-bottom'], {\r\n\t\t\tminSize: 0,\r\n\t\t\tgutterSize: 13,\r\n\t\t\tdirection: 'vertical',\r\n\t\t\tonDrag: function (sizes: any) {\r\n\t\t\t\twindow.dispatchEvent(new Event('resize'));\r\n\t\t\t},\r\n\t\t\tsizes:[50,50]\r\n\t\t});\r\n \r\n }\r\n \r\n}\r\n","import { OpenBimHandles } from \"app/project/ifc-fun/OpenBimHandles\";\r\nimport {collectIDsFromMap, selectionHighlightName} from \"app/project/ifc-fun/openbim-highlighter\";\r\nimport * as OBC from \"openbim-components\"; \r\n\r\nexport declare let $: any;\r\n\r\nexport class Three_Sel {\r\n\t// isolates the aspect regarding selection, for baseviewer3d and friends.\r\n\t// contains variants for the current OpenBim impl, and for the earlier Catenda impl.\r\n\t\r\n\tOB: OpenBimHandles | undefined;\r\n\r\n\t//hello() { console.log('Three_Sel says hello'); }\r\n\r\n\t/////////////////////////////////////////////////////////////////////\r\n\tgetSelectedObjectIDs(objectIDs: number[]) {\r\n\t\tif (this.OB) {\r\n\t\t\tthis.openBim_getObjectIDs(objectIDs);\r\n\t\t} else {\r\n\t\t\tthis.catenda_getObjectIDs(objectIDs);\r\n\t\t}\r\n\t}\r\n\tcatenda_getObjectIDs(objectIDs: number[]) {\r\n\t\t$('#viewerContainer3d').viewer('eachSelected', function (id: number) { objectIDs.push(id); });\r\n\t} // presumably this is not async?\r\n\r\n\topenBim_getObjectIDs(objectIDs: number[]) {\r\n\t\tconst realSel:OBC.FragmentIdMap = this.OB!.highlighter!.selection[selectionHighlightName];\r\n\t\tconst asArray = collectIDsFromMap(realSel);\r\n\t\t//return this.catenda_getObjectIDs(objectIDs);\r\n\t\tfor (let bob of asArray) {\r\n\t\t\tobjectIDs.push(bob); // what is the best way to do this in typescript.\r\n\t\t}\r\n\t\tconsole.log('treeSel.objectIDs, now:', objectIDs.length);\r\n\t}\r\n\t/////////////////////////////////////////////////////////\r\n\r\n\tdeselectAll() { this.OB ? this.openBim_deselectAll() : this.catenda_deselectAll(); }\r\n\tcatenda_deselectAll() {\t$('#viewerContainer3d').viewer('deselectAll'); }\r\n\topenBim_deselectAll() { this.OB!.highlighter!.clear(); }\r\n}\r\n","import { ApiClient } from \"app/services/api-client\";\r\nimport { AppContextService } from \"app/services/app-context-service\";\r\nimport { ContextMenuService } from \"app/services/context-menu-service\";\r\nimport {autoinject,bindable} from \"aurelia-framework\";\r\nimport {EventAggregator, Subscription} from \"aurelia-event-aggregator\";\r\nimport { FileAndRevisionDto } from \"app/project/work-area/split-viewer-interfaces\";\r\nimport { ColorLegendService } from \"app/services/color-legend/color-legend-service\";\r\nimport { OpenBimHandles } from \"app/project/ifc-fun/OpenBimHandles\";\r\nimport { Three_Sel } from \"./Three_Sel\";\r\n//import { Three_Sel } from \"app/project/quantity-takeoff/takeoff-viewer/takeoff-viewer\";\r\n\r\n@autoinject\r\nexport class BaseViewerThreeD {\r\n\t@bindable threeSel:Three_Sel|undefined;\r\n\t@bindable initialOpenbimFlag:boolean = true; // used to INIT useOpenbimViewer.\r\n\r\n\t// (bool useOpenbimViewer styrer, om HTML for bv3d viser openbim-container, eller catenda-div.)\r\n\tpublic useOpenbimViewer:boolean = true; // only becomes correct at/after BV3d.BIND!, when we have an init value to transfer!\r\n\r\n\tpublic openBimHandles:OpenBimHandles = new OpenBimHandles();\r\n\r\n private subscriptions: Subscription[] = [];\r\n private viewerNotLoaded: boolean = false;\r\n private spacesLoaded: boolean = false;\r\n\tprivate spacesLoaded_inf:string = '?';\r\n private isModelLoaded: boolean = false;\r\n private lastClickedElementName: string | undefined;\r\n\r\n\tprivate loaded_fileAndRevisionId:FileAndRevisionDto|undefined; // (We remember the model we load)\r\n\t\r\n\tinit_useOpenbimViewer(who:string) { \r\n\t\tconsole.log(`(${who}) will init useOpenbimViewer to:`, this.initialOpenbimFlag, ' from this.initialOpenbimFlag');\r\n\t}\r\n\r\n constructor(private api : ApiClient, public appContext:AppContextService, \r\n public contextMenuService: ContextMenuService,\r\n\t\tpublic events: EventAggregator,\r\n private colorLegendService: ColorLegendService\r\n\t) {\r\n\t}\r\n \r\n async bind(): Promise {\r\n\t\tconsole.log('bv3d.bind');\r\n\t\t\r\n\t\tthis.init_useOpenbimViewer('bv3d.bind');\r\n\r\n this.subscriptions = [\r\n this.events.subscribe(\"project-selector:project-changed\", async () => this.reload()),\r\n this.events.subscribe('takeoff-reconvert-fragment', () => { this.reconvertFragment()}),\r\n ]\r\n }\r\n\t\r\n\torgId_bv3:string = '?';\r\n\tfileId_forBind:string = ''; // JG: These MUST init to empty, to avoid dependent components attempting to init/load based on them!\r\n\trevisionId_forBind:string = ''; // JG: These MUST init to empty, to avoid dependent components attempting to init/load based on them!\r\n\r\n async attached(): Promise {\r\n\t\tconsole.log('bv3d.attached, appCtx.prjId:', this.appContext.projectId);\r\n\t\tconst prj = this.appContext.getSelectedProject();\r\n\t\tif (prj) { this.orgId_bv3 = prj.ownerCompanyId; }\r\n\r\n\t\tconst fileAndRevisionId = await this.INIT_ConnectedModelKeys(); // maybe this is a better place to call it..\r\n\t\tconsole.log('in bv3d.attached, INIT_ConnectedModelKeys got:', fileAndRevisionId);\r\n\t\t\r\n\t\tthis.loadBlobModelWithSpaces_AlmostNOOP();\r\n }\r\n\t\r\n\tasync reconvertFragment() {\r\n\t\tconsole.log('baseViewerThreeD.reconvertFragment');\r\n\t\tconst prj = this.appContext.projectId;\r\n\t\tconst rev = this.loaded_fileAndRevisionId?.revisionId;\r\n\t\tconst user = this.appContext.currentUser!.id;\r\n\t\t\r\n\t\tlet path:string \r\n\t\t = `IfcFragment/EnqueueRevisionToFragmentJobAnonymous?revisionId=${rev}&projectId=${prj}&userId=${user}`;\r\n\r\n\t\tconst result = await this.api.project(prj).postJson(path,{}).jsonResult();\r\n\t\tconsole.log('result:', result);\r\n\t}\r\n\t\r\n async reload(): Promise {\r\n await this.loadConnectedModel_Somehow(this.loaded_fileAndRevisionId!);//in-reload\r\n }\r\n\r\n async unbind(): Promise {\r\n this.subscriptions.forEach(subscription => subscription.dispose());\r\n }\r\n\t\r\n\tasync INIT_ConnectedModelKeys():Promise {\r\n\t\tconsole.log('bv3d.INIT_ConnectedModelKeys, gotten orgToken..');\r\n\r\n let fileAndRevisionId:FileAndRevisionDto|undefined = await this.api.project(this.appContext.projectId)\r\n .get(`BimViewer/GetConnectedRevisionAndModel?aocProjectId=${this.appContext.projectId}`) //GetConnectedRevisionId\r\n .handleError('No model found', 'There is no connected model synchronized on this project.')\r\n .jsonResult();\r\n\t\t\t\r\n\t\tconsole.log('bv3d.INIT_ConnectedModelKeys, got:', fileAndRevisionId);\r\n\r\n\t\tthis.loaded_fileAndRevisionId = fileAndRevisionId;\r\n\t\t\r\n\t\tif (fileAndRevisionId==undefined) { // The abnormal case.\r\n\t\t\tconsole.warn('INIT_ConnectedModelKeys, setting revisionId_forBind to EMPTY string, as no fileAndRevisionId found.');\r\n\t\t\tthis.fileId_forBind = '';\r\n\t\t\tthis.revisionId_forBind = '';\r\n\t\t} else {\r\n\t\t\tthis.fileId_forBind = fileAndRevisionId.fileId; // set in INIT_ConnectedModelKeys\r\n\t\t\tconsole.log('bv3d, op-c, revId changed to:', fileAndRevisionId.revisionId);\r\n\t\t\tthis.revisionId_forBind = fileAndRevisionId.revisionId;\t\r\n\t\t}\r\n\r\n\t\treturn fileAndRevisionId;\r\n\t}\r\n\r\n\t// also called from setupViewerBindings_AND_LoadModel, which is triggered by by viewer:enable-bindings-and-options.\r\n async loadConnectedModel_Somehow(fileAndRevisionId:FileAndRevisionDto) {\r\n\t\tconsole.log('XYQ second_LoadSomehow called with fileId', fileAndRevisionId.fileId, 'this.useOpenbimViewer?', this.useOpenbimViewer);\r\n\t\tif (!fileAndRevisionId?.revisionId) { \r\n\t\t\tconsole.log('second_Load_MODEL_Somehow aborts as empty rev-IDs:', fileAndRevisionId);\r\n\t\t\treturn; \r\n\t\t}\r\n\t\tconsole.log('SETTING_SPACES_LOADED-LRMS', this.spacesLoaded_inf);\r\n\t\t\r\n\t\tthis.loadBlobModelWithSpaces_AlmostNOOP();\r\n }\r\n\r\n\tloadBlobModelWithSpaces_AlmostNOOP() { // beware, this is almost a NOOP at this point - it is the assign to the bound revisionId, that triggers the OB-load.\r\n\t\tconsole.warn('openbim_load_BlobModel_WithSpaces');\r\n\r\n\t\tconsole.log('(nb, openbim_load_ConnectedModel doesnt yet do anything for spaces.)');\r\n\t\t//this.spacesLoaded = false;this.spacesLoaded_inf='2';//openbim_load_ConnectedModel\r\n\t\t//console.log('SETTING_SPACES_LOADED-OBLCM', this.spacesLoaded_inf);\t\t\r\n\r\n\t\tconsole.log('SETTING_SPACES_LOADED-STOBVFR', this.spacesLoaded_inf);\r\n\r\n\t\tconsole.log('openbim_load_BlobModel_WithSpaces publishes hide2dView for twoD_enabled')\r\n this.events.publish('base-viewer-combined:hide2d'); // for now, we don't want the 2d-view, when using openBim - because we haven't made the code for it yet.\r\n\r\n\t\tthis.spacesLoaded = true; // Just to hide the loading bar\r\n\t\t\r\n\t\t// hmm, we probably have to publish an event anyway, to tell openbim-container to act?\r\n\t\t//if (false) { // right now it auto-magic-random-loads-by-accident, so we don't do this yet..\r\n\t\t// let self = this; // hmm, hvorfor var den n'dv?\r\n\t\t//\tself.events.publish('base-viewer-combined:loadRevision',{fileAndRevisionId: fileAndRevisionId});\t\r\n\t\t//}\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\n","import { ViewerTokenDto } from \"app/models/viewer-dtos/Dtos/Bimsync/BimsyncDtos\";\r\nimport { ApiClient } from \"app/services/api-client\";\r\nimport { AppContextService } from \"app/services/app-context-service\";\r\nimport { BimViewerThreeDService } from \"app/services/bim-viewer-three-d-service\";\r\nimport { ContextMenuService } from \"app/services/context-menu-service\";\r\nimport {autoinject,bindable} from \"aurelia-framework\";\r\nimport {EventAggregator, Subscription} from \"aurelia-event-aggregator\";\r\nimport { FileAndRevisionDto, GetViewerResponse2d, Story } from \"app/project/work-area/split-viewer-interfaces\";\r\nimport { BimsyncSetupHandler } from \"app/services/bimsync-setup-handler\"; \r\nimport {Catenda_ViewerObjectInfoService} from \"../../services/viewer-object-info-service/catenda-viewer-object-info-service\";\r\n\r\ndeclare let $: any;\r\ndeclare let ResizeObserver: any; //Is type ResizeObserver\r\n\r\n@autoinject\r\nexport class BaseViewerTwoD {\r\n private $viewer2d: any;\r\n public url: string = \"\";\r\n private subscriptions: Subscription[] = [];\r\n public max2dDockWidth: number = 600;\r\n public middlePanelWidth: number = -1;\r\n private modelId: string = \"\";\r\n\r\n\t@bindable useOpenbimViewer: boolean = false; //true;\r\n\r\n constructor(private api : ApiClient, public appContext:AppContextService, \r\n public contextMenuService: ContextMenuService, public bimViewerThreeDService: BimViewerThreeDService, \r\n public viewerObjectInfoService: Catenda_ViewerObjectInfoService, public events: EventAggregator,\r\n public bimsyncSetupHandler: BimsyncSetupHandler\r\n\t) { \r\n\t\tconsole.log('TWOD_ctor');\r\n\t}\r\n \r\n async bind(): Promise {\r\n\t\tconsole.log('TWOD_bind');\r\n this.subscriptions = [\r\n this.events.subscribe(\"project-selector:project-changed\", async () => this.reload()),\r\n this.events.subscribe('viewer:enable-bindings-and-options', () => {\r\n //Ensuring viewers are setup before bindings are handled.\r\n\t\t\t\tconsole.log('calling CATENDA_setupViewerBindings_2d with rev:', this.loaded_fileAndRevisionId?.revisionId);\r\n this.CATENDA_setupViewerBindings_2d(this.loaded_fileAndRevisionId!);\r\n }),\r\n ]\r\n }\r\n\r\n async reload(): Promise {\r\n\t\tconsole.log('TWOD_reload');\r\n if (this.modelId != undefined) { this.$viewer2d.viewer2d('unloadModel', this.modelId); }\r\n await this.CATENDA_loadConnectedModel(this.loaded_fileAndRevisionId!);\r\n }\r\n\r\n async attached(): Promise {\r\n\t\tconsole.log('TWOD_attached');\r\n this.$viewer2d = this.catenda_getViewer2d();\r\n this.setupResizeObserver();\r\n\r\n\t\tconst fileAndRevisionId:FileAndRevisionDto = await this.INIT_ConnectedModelKeys(); // in attached.\r\n\t\tconsole.log('attached, this.useOpenbimViewer_2d?', this.useOpenbimViewer);\r\n\t\tif (this.useOpenbimViewer) {//-attached\r\n\t\t\tconsole.warn('sketch, init openbim-2d in attached');\r\n\t\t\tthis.openbim_load_BlobModel_WithSpaces_AlmostNOOP_2d(); \r\n\t\t} else {\r\n\t\t\tawait this.Init_CATENDA_ViewerFirst_or_subsequent_2d(fileAndRevisionId);\r\n\t\t}\r\n }\r\n\r\n\tprivate loaded_fileAndRevisionId:FileAndRevisionDto|undefined; // (We remember the model we load)\r\n\tasync INIT_ConnectedModelKeys():Promise {\r\n\t\tthis.loaded_fileAndRevisionId = await this.api.project(this.appContext.projectId)\r\n .get(`BimViewer/GetConnectedRevisionAndModel?aocProjectId=${this.appContext.projectId}`) //GetConnectedRevisionId\r\n .handleError('No model found', 'There is no connected model synchronized on this project.')\r\n .jsonResult();\r\n\t\treturn this.loaded_fileAndRevisionId!;\r\n\t}\r\n\r\n\tasync Init_CATENDA_ViewerFirst_or_subsequent_2d(fileAndRevisionId: FileAndRevisionDto) {\r\n if (!this.bimsyncSetupHandler.isBimsync_ENGINES_Setup) {\r\n await this.CATENDA_loadTwoDViewer();\r\n } else {\r\n await this.CATENDA_setupViewerBindings_2d(fileAndRevisionId);\r\n }\r\n\t}\r\n\t\r\n\topenbim_load_BlobModel_WithSpaces_AlmostNOOP_2d() {\r\n\t\t// doesn't do anything yet (mostly loadSpaces and emit events; the actual loading happens when prop is set on bound key on openbim-container)\r\n\t}\r\n\r\n async CATENDA_loadTwoDViewer(): Promise {\r\n\t\tconsole.log('TWOD_loadTwoDViewer');\r\n try {\r\n this.bimsyncSetupHandler.loadViewer2d();\r\n } catch(e) {\r\n //Can fail on bimsync, if Catenda API is down.\r\n console.warn(\"the 3D viewer could not be loaded.\");\r\n }\r\n }\r\n\r\n\r\n setupResizeObserver(): void {\r\n\t\tconsole.log('TWOD_setupResizeObserver');\r\n let observer = new ResizeObserver((entries: any) => {\r\n //The only resize we care about is the panel-middle as that is dependent on how the 2d view should be displayed.\r\n for (let entry of entries) {\r\n const cr = entry.contentRect;\r\n this.middlePanelWidth = cr.width;\r\n if (cr.width < this.max2dDockWidth && cr.width > 0) {\r\n this.events.publish('WorkAreaContainer:Move2d', true);\r\n }\r\n }\r\n });\r\n observer.observe(document.getElementById(\"base-viewer-container\"));\r\n }\r\n\r\n async unbind(): Promise {\r\n\t\tconsole.log('TWOD_unbind');\r\n this.subscriptions.forEach(subscription => subscription.dispose());\r\n }\r\n\r\n catenda_getViewer2d(): void { return $(\"#viewerContainer2d\"); }\r\n\r\n async CATENDA_setupViewerBindings_2d(fileAndRevisionId: FileAndRevisionDto): Promise {\r\n\t\tconsole.log('TWOD_setupViewerBindings');\r\n //As the bimsync variable is global, this will not have to be reloaded \r\n //When switching between menu pages, but the bindings/options/viewer-ui\r\n //will have to be setup again.\r\n //And if nothing is setup, bimsync has to be intialized first, which\r\n //is why it is handled using an event.\r\n this.catenda_handle2dviewerLoaded();\r\n await this.CATENDA_loadConnectedModel(fileAndRevisionId);\r\n }\r\n\r\n catenda_handle2dviewerLoaded(): void {\r\n\t\tconsole.log('TWOD_handle2dviewerLoaded');\r\n let self = this;\r\n this.$viewer2d.bind('viewer2d.loadfail', async function(event: Event, modelId: string) {\r\n console.log(\"Failed event \" , event);\r\n console.log(\"Viewer2D model load failed\", modelId);\r\n $('#viewerContainer2d').viewer2d('unloadModel', modelId);\r\n });\r\n this.$viewer2d.bind('viewer2d.load', function(event: Event, modelId: string) {\r\n let storeys: Story[] = self.$viewer2d.viewer2d('getStoreys');\r\n self.$viewer2d.viewer2d('showStorey', storeys[0].id);\r\n console.log(\"Viewer2D model loaded\", modelId);\r\n self.modelId = modelId;\r\n });\r\n }\r\n\r\n async CATENDA_loadConnectedModel(fileAndRevisionId: FileAndRevisionDto) {\r\n if (!fileAndRevisionId.revisionId) { return; }\r\n\r\n\t\tlet viewerTokenDTO: GetViewerResponse2d = await this.api.project(this.appContext.projectId)\r\n\t\t.get(`BimsyncViewer/GetViewer2d?aocProjectId=${this.appContext.projectId}&revisionId=${fileAndRevisionId.revisionId}`)\r\n\t\t.jsonResult();\r\n\r\n\t\t//console.log(\"2d VIEWERTOKEN \" , viewerTokenDTO);\r\n\t\tif (!this.hasCatenda_2dToken(viewerTokenDTO)) { \r\n\t\t\tconsole.warn('(no catenda 2d token, so not proceeding with catenda-viewer-init)')\r\n\t\t\treturn; \r\n\t\t}\r\n\r\n\t\tif (viewerTokenDTO) {\r\n\t\t\tthis.url = (viewerTokenDTO.viewerTokenDto).url;\r\n\t\t\tthis.$viewer2d.viewer2d('loadUrl', this.url);\r\n\t\t}\r\n }\r\n\r\n\tstatic EMPTY_TOKEN:string = \"EMPTY_TOKEN_OPENBIM\";\r\n\r\n\thasCatenda_2dToken(dto: GetViewerResponse2d):boolean {\r\n\t\tconsole.log('TWOD_hasCatenda_2dToken');\r\n\t\tif (dto == undefined) { return false; } // (for IsCatendaEnabled==false case.)\r\n\t\tif (!dto.viewerTokenDto) { return false; }\r\n\t\t\r\n\t\tconst token:string = dto.viewerTokenDto.token;\r\n\t\tconst noToken:boolean = (!token || token == BaseViewerTwoD.EMPTY_TOKEN);\r\n\t\treturn !noToken; \r\n\t}\r\n\r\n async move2dView() {\r\n\t\tconsole.log('TWOD_move2dView');\r\n this.events.publish('base-viewer-combined:move2dView');\r\n }\r\n}\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","exports","BaseViewerCombined","constructor","events","twoD_enabled","BVC_openBimMode","isViewerLoaded","isSettingsVisible","subscriptions","this","self","bind","console","log","subscribe","switchSettingsVisibility","move2dViewDown","move2dView","hide2dView","smalldiv_2d","document","getElementById","viewer_2d","is_viewerInSmallDiv","contains","warn","style","visibility","split","setSizes","destroy","appendChild","window","dispatchEvent","Event","who","topView_3d","bigDiv_2d","handleDockTooBigDiv","bigDiv","viewer","smalldiv","setupSplitter","viewer2d","unbind","forEach","subscription","dispose","attached","minSize","gutterSize","direction","onDrag","sizes","useMPKFragments_Master","bindable","autoinject","EventAggregator","Three_Sel","getSelectedObjectIDs","objectIDs","OB","openBim_getObjectIDs","catenda_getObjectIDs","$","realSel","highlighter","selection","asArray","bob","length","deselectAll","openBim_deselectAll","catenda_deselectAll","clear","BaseViewerThreeD","init_useOpenbimViewer","initialOpenbimFlag","api","appContext","contextMenuService","colorLegendService","useOpenbimViewer","openBimHandles","viewerNotLoaded","spacesLoaded","spacesLoaded_inf","isModelLoaded","orgId_bv3","fileId_forBind","revisionId_forBind","async","reload","reconvertFragment","projectId","prj","getSelectedProject","ownerCompanyId","fileAndRevisionId","INIT_ConnectedModelKeys","loadBlobModelWithSpaces_AlmostNOOP","path","loaded_fileAndRevisionId","revisionId","currentUser","result","project","postJson","jsonResult","loadConnectedModel_Somehow","get","handleError","undefined","fileId","publish","BaseViewerTwoD","bimViewerThreeDService","viewerObjectInfoService","bimsyncSetupHandler","url","max2dDockWidth","middlePanelWidth","modelId","CATENDA_setupViewerBindings_2d","$viewer2d","CATENDA_loadConnectedModel","catenda_getViewer2d","setupResizeObserver","openbim_load_BlobModel_WithSpaces_AlmostNOOP_2d","Init_CATENDA_ViewerFirst_or_subsequent_2d","isBimsync_ENGINES_Setup","CATENDA_loadTwoDViewer","loadViewer2d","e","ResizeObserver","entries","entry","cr","contentRect","width","observe","catenda_handle2dviewerLoaded","event","storeys","viewerTokenDTO","hasCatenda_2dToken","viewerTokenDto","dto","token","EMPTY_TOKEN"],"sourceRoot":""}