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AqBiF,eAAeuD,EAAcrB,GAClElH,QAAQC,IAAI,gBAAkBsI,GAC9BvI,QAAQC,IAAI,6BAA8BiH,GAC1C9D,EAAE,sBAAsBrB,SAAS,cAAemF,EACpD,IACArH,KAAKuH,UAAUrH,KAAK,iBAAiB,SAASwI,EAAcrB,GACxD,IAAIsB,EAAmB1I,EAAKsH,UAAUrF,SAAS,cAC/CjC,EAAKsH,UAAUrF,SAAS,aAAcyG,EAAQ,GAAGpJ,IACjDY,QAAQC,IAAI,wBAAyBiH,GACrCpH,EAAKoH,QAAUA,CACnB,GACJ,CAEA,gCAAMG,CAA2B9B,GAC7B,IAAKA,EAAkBK,WAAc,OAE3C,IAAI6C,QAA4C5I,KAAKqE,IAAI6B,QAAQlG,KAAKsE,WAAWgB,WAChFiB,IAAI,0CAA0CvG,KAAKsE,WAAWgB,wBAAwBI,EAAkBK,cACxGK,aAGIpG,KAAK6I,mBAAmBD,GAKzBA,IACH5I,KAAKkH,IAAuB0B,EAAeE,eAAgB5B,IAC3DlH,KAAKuH,UAAUrF,SAAS,UAAWlC,KAAKkH,MANxC/G,QAAQa,KAAK,oEAQZ,CAIH,kBAAA6H,CAAmBE,GAElB,GADA5I,QAAQC,IAAI,2BACDuG,MAAPoC,EAAoB,OAAO,EAC/B,IAAKA,EAAID,eAAkB,OAAO,EAElC,MAAME,EAAeD,EAAID,eAAeE,MAExC,SAD0BA,GAASA,GAAS,EAAeC,YAE5D,CAEG,gBAAMzI,GACRL,QAAQC,IAAI,mBACNJ,KAAKN,OAAOmH,QAAQ,kCACxB,GAfK,EAAAoC,YAAqB,sBA/I7B,GAAC,EAAAnG,S,iEARWgE,EAAc,KAD1B,EAAA/D,W,uBAW6B,IAA6B,IACxB,IAAmD,IAC9C,IAAgD,EAAAC,gBACpD,OAbvB8D,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\",\"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:hsla(0,0%,100%,.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,6BAAA,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\",\"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:hsla(0,0%,100%,.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,mCAAA,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\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = ` `;\n// Exports\nexport default code;","// Module\nvar code = ` `;\n// Exports\nexport default code;","// Module\nvar code = ``;\n// Exports\nexport default code;","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 {FragmentIdMap} from \"@thatopen/fragments\"; \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: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\nimport { ModalService } from \"app/services/modal-service\";\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(\r\n\t\tprivate api : ApiClient, \r\n\t\tpublic appContext:AppContextService, \r\n public contextMenuService: ContextMenuService,\r\n\t\tpublic events: EventAggregator,\r\n private colorLegendService: ColorLegendService,\r\n\t\tpublic modal: ModalService\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\t\tlet fileAndRevisionId:FileAndRevisionDto|undefined;\r\n\t\ttry {\r\n\t\t\tconst errMsg = 'No model found. ' + 'There is no connected model synchronized on this project.';\r\n\t\t\tfileAndRevisionId = await this.api.project(this.appContext.projectId)\r\n\t\t\t\t.get(`BimViewer/GetConnectedRevisionAndModel?aocProjectId=${this.appContext.projectId}`) //GetConnectedRevisionId\r\n\t\t\t\t//.handleError('No model found', 'There is no connected model synchronized on this project.')\r\n\t\t\t\t.jsonResult();\r\n\t\t\tif (!fileAndRevisionId) {\r\n\t\t\t\tawait this.modal.OpenMessage('No model found',errMsg);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} catch (ex) {\r\n\t\t\t// todo, show any err-msg e.g. 401.\r\n\t\t\tconsole.error(ex);\r\n\t\t\treturn undefined;\r\n\t\t}\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","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","modal","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","errMsg","get","OpenMessage","ex","error","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","handleError","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":""}