bimplus-webcomponents 0.0.161 → 0.0.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12843,13 +12843,13 @@ ${U}: ${x}`:`${p}: ${f}
12843
12843
  ${M}: ${T}
12844
12844
  ${U}: ${x}`}_createAttributeGroupsFromResponse(r){let p=[],f=null;if(r.localizedAttributeGroups&&(f=r.localizedAttributeGroups),!r.attributes)return p;let M=r.attributes;for(let[T,U]of Object.entries(M)){let x={name:T,expanded:!1,attributes:[]};if(f?.[T]&&(x.name=f[T]),!!U){for(let H of Object.values(U)){let J={id:H.id,name:H.name,description:H.description,value:H.value,group:H.group,type:H.type,unit:H.unit,decimal:H.decimal,control:H.control,enumdefinition:H.enumdefinition,isChangeable:H.isChangeable,tooltip:this._tooltip(H),minValue:H.minValue,maxValue:H.maxValue};x.attributes.push(J)}p.push(x)}}return p}_deleteForm(){this._objectPropertiesForm=new xR({})}_createForm(){let r=new wIe,p={};this.objectAttributeGroups().forEach(f=>{let M={};f.attributes.forEach(T=>{if(typeof T.type=="string"&&/^boolean$/i.test(T.type)&&!T.control){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[kz.pattern(/^(false|true|0|1)$/i)]:[]);return}if(typeof T.type=="string"&&/^boolean$/i.test(T.type)&&typeof T.control=="string"&&/^checkbox$/i.test(T.control)){M[T.id]=this.formBuilder.control(r.transform(T));return}if(typeof T.type=="string"&&/^string$/i.test(T.type)&&!T.control){M[T.id]=this.formBuilder.control(r.transform(T));return}if(typeof T.type=="string"&&/^double$/i.test(T.type)&&!T.control){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[AIe(T.minValue,T.maxValue)]:[]);return}if(typeof T.type=="string"&&/^int(32)?$/i.test(T.type)&&!T.control){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[OIe(T.minValue,T.maxValue)]:[]);return}if(typeof T.type=="string"&&/^guid$/i.test(T.type)&&!T.control){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[_Ie()]:[]);return}if(typeof T.type=="string"&&/^double$/i.test(T.type)&&typeof T.control=="string"&&/^enumeration$/i.test(T.control)){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[vpe(T.enumdefinition)]:[]);return}if(typeof T.type=="string"&&/^guid$/i.test(T.type)&&typeof T.control=="string"&&/^enumeration$/i.test(T.control)){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[Iwe(T.enumdefinition)]:[]);return}if(typeof T.type=="string"&&/^int(32)?$/i.test(T.type)&&typeof T.control=="string"&&/^enumeration$/i.test(T.control)){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[vpe(T.enumdefinition)]:[]);return}if(typeof T.type=="string"&&/^string$/i.test(T.type)&&typeof T.control=="string"&&/^enumeration$/i.test(T.control)){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[wwe(T.enumdefinition)]:[]);return}if(typeof T.type=="string"&&/^string$/i.test(T.type)&&typeof T.control=="string"&&/^combobox$/i.test(T.control)){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[Awe(T.enumdefinition)]:[]);return}if(typeof T.type=="string"&&/^datetime$/i.test(T.type)&&!T.control){M[T.id]=this.formBuilder.control(r.transform(T),T.isChangeable?[]:[]);return}}),p[f.name]=this.formBuilder.group(M)}),this._objectPropertiesForm=this.formBuilder.group(p),this.initialFormValues=JSON.stringify(this._objectPropertiesForm.value),this._objectPropertiesForm.valueChanges.subscribe({next:f=>{let M=JSON.stringify(f)!==this.initialFormValues;this.isSaveButtonDisabled$.next(!(this._objectPropertiesForm.valid&&M))}})}_getPropertyName(r){let p=this.objectAttributeGroups();for(let f of p)for(let M of f.attributes)if(M.id===r)return M.name;return""}_getPropertyType(r){let p=this.objectAttributeGroups();for(let f of p)for(let M of f.attributes)if(M.id===r)return M.type;return""}_getPropertyControl(r){let p=this.objectAttributeGroups();for(let f of p)for(let M of f.attributes)if(M.id===r)return M.control;return""}_convertValueToBoolean(r){return/^true$/i.test(r)||/^1$/i.test(r)}_convertValueToDouble(r){return parseFloat(r)}_hasBeenValueChanged(r,p){let f=this.objectAttributeGroups();for(let M of f)for(let T of M.attributes)if(T.id===r)return p!==T.value;return!1}_getChangedData(r){let p={};return Object.keys(r.controls).forEach(f=>{let M=r.get(f);if(M instanceof eR){if(M.dirty){let T=this._getPropertyName(f),U=this._getPropertyType(f);if(T===""){let x={id:f,value:M.value};p[f]=x}else if(/^boolean$/i.test(U)){let x=this._convertValueToBoolean(M.value);if(this._hasBeenValueChanged(f,x)){let H={id:f,value:x};p[T]=H}}else if(/^double$/i.test(U)){let x=this._convertValueToDouble(M.value);if(this._hasBeenValueChanged(f,x)){let H={id:f,value:x};p[T]=H}}else{let x=M.value;if(this._hasBeenValueChanged(f,M.value)){let H={id:f,value:x};p[T]=H}}}}else if(M instanceof xR&&M.dirty){let T=this._getChangedData(M);Object.keys(T).length>0&&(p[f]=T)}}),p}_saveObjectProperties(){let r={};r.id=this._currentObjectId$.value,r.unsaved=!0,r.attributes=this._getChangedData(this._objectPropertiesForm),this.saveObjectProperties(r)}_cancelEditingProperties(){this._editMode.set(!1),this._deleteForm(),this.buttonRowItems=this.configEditProperties}buttonClicked(r){r.id==="edit-properties"&&(this._editMode.set(!0),this._createForm(),console.log("Edit properties clicked"),this.buttonRowItems=this.configEditedProperties),r.id==="save-changed-properties"&&(this._saveObjectProperties(),this._cancelEditingProperties(),console.log("Save changed properties clicked")),r.id==="cancel-editing-properties"&&(this._cancelEditingProperties(),console.log("Cancel edit properties clicked"))}hasSetAnyAttribute(r){return r.attributes.some(p=>!S$(p))}saveObjectProperties(r){let p=this._currentPropertiesObjectId$.value;!r||!p||this.api&&bd(this.api.objects.put(p,JSON.stringify(r))).subscribe({next:f=>{this._createObjectProperties(p,this.revision),this._createObjectStructure(p,this.revision),this.updatedObjectProperties.emit({id:p,request:r,response:f})}})}static{this.\u0275fac=function(p){return new(p||d)(vi(ja),vi(HJ),vi(ch),vi(Owe))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-object-properties"]],inputs:{api:"api",revision:"revision",canUpdateObject:"canUpdateObject",rootObjectId:"rootObjectId"},outputs:{updatedObjectProperties:"updatedObjectProperties"},standalone:!0,features:[ll,as],decls:17,vars:15,consts:[[3,"buttonClicked","items"],[1,"object-properties"],[1,"object-properties-preview-panel"],[1,"object-structure-header"],[3,"api","revision","objectId","visibleNode","opaqueNode"],[1,"object-properties-object-structure-panel"],[3,"objectStructure"],[3,"nodeSelected","nodeVisible","nodeOpaque","objectStructure"],[1,"object-properties-header"],[3,"nodeSelected","complexProperties"],[1,"input-form",3,"formGroup"],[3,"expanded"],[1,"object-properties-group-header"],[3,"attributesGroup","editMode","canUpdateObject","objectPropertiesForm"]],template:function(p,f){p&1&&(cn(0,"lib-bimplus-buttons-row",0),xi("buttonClicked",function(T){return f.buttonClicked(T)}),mn(),cn(1,"div",1)(2,"lib-bimplus-scrollable-container")(3,"lib-expansion-panel",2)(4,"lib-expansion-panel-header")(5,"span",3),Wr(6),ca(7,"translate"),mn()(),Zr(8,"lib-object-preview",4),mn(),cn(9,"lib-expansion-panel",5)(10,"lib-expansion-panel-header")(11,"span",3),Wr(12),ca(13,"translate"),mn()(),gr(14,rUe,1,1,"lib-bimplus-object-structure",6),mn(),gr(15,sUe,6,4,"lib-expansion-panel")(16,lUe,8,4,"lib-expansion-panel"),mn()()),p&2&&(Nn("items",f.buttonRowItems),Zt(6),v0(ha(7,11,"_3D preview")),Zt(2),Nn("api",f.api)("revision",f.revision)("objectId",f.rootObjectId)("visibleNode",f.visibleNodeSignal())("opaqueNode",f.opaqueNodeSignal()),Zt(4),v0(ha(13,13,"_Object structure")),Zt(2),fs(f.objectStructure?14:-1),Zt(),fs(f.complexProperties?15:-1),Zt(),fs(f.objectAttributeGroups().length>0?16:-1))},dependencies:[Wz,Uz,Ko,xc,w$,A$,o4,l4,MIe,Mwe,oA,BJ,nk,kB],styles:[`:host{height:100%;display:flex;flex-direction:column;flex:1}lib-bimplus-buttons-row{flex:0;--button-row-margin-right: .8rem}.object-properties{margin-left:.8rem;position:relative;flex:1}.object-properties .object-structure-header,.object-properties .object-properties-header{font-weight:700;text-transform:uppercase;font-size:1.4rem}.object-properties .object-properties-group-header{line-height:2.4rem}.object-properties lib-bimplus-object-structure{--bimplus-object-structure-background-color: var(--object-properties-background-color, var(--flat-tree-container-background-color-enabled))}.object-properties lib-bimplus-object-complex-properties{--bimplus-object-complex-properties-background-color: var(--object-properties-background-color, var(--flat-tree-container-background-color-enabled))}.object-properties lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;flex:1;width:100%}.object-properties .object-properties-object-structure-panel .expansion-panel,.object-properties lib-object-preview{margin-top:.8rem}
12845
12845
  `],encapsulation:3})}}return d})();var Twe=(()=>{class d{constructor(r,p){this.dialogService=r,this.translateService=p,this.title="",this.message="",this.acceptButtonLocalizedString="_Accept",this.cancelButtonLocalizedString="_Cancel",this.buttons=[];let f=this.dialogService.inputData;f&&(this.title=f.title||"",this.message=f.message||"",this.acceptButtonLocalizedString=f.acceptButtonLocalizedString||"_Accept",this.cancelButtonLocalizedString=f.cancelButtonLocalizedString||"_Cancel",this.acceptCallback=f.acceptCallback),this.initializeButtons()}initializeButtons(){this.buttons=[{id:"accept",title:this.translateService.instant(this.acceptButtonLocalizedString),tooltip:this.translateService.instant(this.acceptButtonLocalizedString),disabled:!1,buttonStyle:"primary"},{id:"cancel",title:this.translateService.instant(this.cancelButtonLocalizedString),tooltip:this.translateService.instant(this.cancelButtonLocalizedString),disabled:!1,buttonStyle:"secondary"}]}close(){this.dialogService.close(),document.activeElement?.blur()}keypressClose(r){(r.key==="Escape"||r.key==="Esc")&&this.dialogService.close()}buttonRowButtonClicked(r){this.dialogService.close(),r.id==="accept"&&this.acceptCallback?.()}handleKeydown(r){(r.key==="Escape"||r.key==="Esc")&&this.close()}static{this.\u0275fac=function(p){return new(p||d)(vi(hT),vi(ja))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-overlay-dialog-confirm"]],hostBindings:function(p,f){p&1&&xi("keydown",function(T){return f.handleKeydown(T)},!1,$I)},standalone:!0,features:[as],decls:10,vars:3,consts:[[1,"overlay-dialog-container"],[1,"header"],[1,"icon"],[1,"title-text"],["tabindex","0",1,"close-button",3,"click","keydown"],[1,"content"],[1,"text",3,"innerHTML"],[1,"buttons"],[3,"buttonClicked","items"]],template:function(p,f){p&1&&(cn(0,"div",0)(1,"div",1),Zr(2,"div",2),cn(3,"div",3),Wr(4),mn(),cn(5,"button",4),xi("click",function(){return f.close()})("keydown",function(T){return f.keypressClose(T)}),mn()(),cn(6,"div",5),Zr(7,"div",6),cn(8,"div",7)(9,"lib-bimplus-buttons-row",8),xi("buttonClicked",function(T){return f.buttonRowButtonClicked(T)}),mn()()()()),p&2&&(Zt(4),Sa(" ",f.title," "),Zt(3),Nn("innerHTML",f.message,SC),Zt(2),Nn("items",f.buttons))},dependencies:[Ko,o4],styles:[`.overlay-dialog-container{min-height:13.6rem;min-width:60rem;display:inline-flex;flex-direction:column;box-shadow:0 .4rem .8rem 0 var(--card-box-shadow-color),0 .6rem 2rem 0 var(--card-box-shadow-color)}.overlay-dialog-container .header{background-color:var(--color-help-popup-title-background);height:3.2rem;display:inline-flex;align-items:center}.overlay-dialog-container .header .icon{width:1.8rem;height:1.8rem;background:url("./assets/bimplus_Components_Overlay_Dialog_Warning_Title.svg") no-repeat center center;padding:0 1.6rem}.overlay-dialog-container .header .title-text{color:var(--main-menu-text-default);font:700 1.3832rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;text-transform:capitalize;margin-bottom:.2rem}.overlay-dialog-container .header .close-button{width:3.2rem;height:3.2rem;background:url("./assets/bimplus_Components_Overlay_Dialog_Cross_White.svg") no-repeat center center;background-size:2.2rem;cursor:pointer;margin:0 0 0 auto;padding-right:1.6rem;border:none}.overlay-dialog-container .content{background-color:var(--main-menu-text-default);display:flex;flex-direction:column;flex-grow:1}.overlay-dialog-container .content .text{color:var(--color-help-popup-title-background);font:400 1.28rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;padding-top:.8rem;padding-left:1.6rem;flex:1;display:flex;flex-direction:column}.overlay-dialog-container .content .text .warning-title{line-height:2.4rem}.overlay-dialog-container .content .text .warning-message{line-height:1.6rem}.overlay-dialog-container .content .buttons{padding:1.6rem}
12846
- `],encapsulation:3})}}return d})();var cte=Y_(Ewe());var lte=(()=>{class d{constructor(){}fmt(r,...p){let f=0;return r.replace(/%@(\d+)?/g,(M,T)=>{let U=T?parseInt(T,10)-1:f++,x=p[U];return x===null?"(null)":x===void 0?"":x.toString()})}decorateLink(r,p,f){let M={id:p.id,name:p.name,fileName:p.fileName,size:p.size,link:p.link,fileNameShort:"",extension:"",objectIds:f,version:p.version,sizeMB:""},T=r.getAccessToken(),x=r.getApiTeamUrl()+"attachments/%@/versions/%@/download",H=!1;if(M.size=parseFloat((p.size/1e3).toFixed(2)),M.link=`${this.fmt(x,p.id,p.version)}?api-token=${T}${H?"":"&openInBrowser=true"}`,p.fileName.length>20){let J=p.fileName.split(".");J.length>1?(M.fileNameShort=J.slice(0,-1).join("."),M.extension="."+J.slice(-1)):M.fileNameShort=p.fileName}else M.fileNameShort=p.fileName;return M}static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275prov=za({token:d,factory:d.\u0275fac,providedIn:"root"})}}return d})();function cUe(d,o){if(d&1){let r=qs();cn(0,"lib-bimplus-buttons-row",5),xi("buttonClicked",function(f){Pi(r);let M=on();return Bi(M.buttonClicked(f))}),mn()}if(d&2){let r=on();Nn("items",r.buttonRowItems)}}function uUe(d,o){if(d&1&&(cn(0,"div",2),Zr(1,"iframe",6),mn()),d&2){let r=on();Zt(),Bo("id",r.wormholeSelector)}}function dUe(d,o){d&1&&(cn(0,"div",3),Wr(1),ca(2,"translate"),mn()),d&2&&(Zt(),Sa(" ",ha(2,1,"_No_attachmentlinks_found")," "))}function pUe(d,o){if(d&1){let r=qs();cn(0,"span",12),xi("click",function(f){Pi(r);let M=on().$implicit,T=on(2);return Bi(T.deleteAttachmentLink(M,f))})("keydown",function(f){Pi(r);let M=on().$implicit,T=on(2);return Bi(T.deleteAttachmentLink(M,f))}),cn(1,"div",13),ca(2,"translate"),Wr(3," \u2715\uFE0E "),mn()()}d&2&&(Zt(),Bo("title",ha(2,1,"_Delete_attachmentlink")))}function hUe(d,o){if(d&1&&(cn(0,"div",11),Wr(1),mn()),d&2){let r=on().$implicit;Bo("title",r.name),Zt(),Sa(" (",r.size," kB) ")}}function fUe(d,o){if(d&1&&(cn(0,"div",7),gr(1,pUe,4,3,"span",8),cn(2,"a",9)(3,"div",10),Wr(4),mn(),gr(5,hUe,2,2,"div",11),mn()()),d&2){let r=o.$implicit,p=on(2);Zt(),fs(p.canDeleteAttachmentLink?1:-1),Zt(),Bo("href",r.link,uT),Zt(),Bo("title",r.fileName),Zt(),Sa(" ",r.name?r.name:r.fileName," "),Zt(),fs(p.hideAttachmentSize?-1:5)}}function mUe(d,o){if(d&1&&(cn(0,"div",4)(1,"lib-bimplus-scrollable-container"),Sp(2,fUe,6,5,"div",7,wM),mn()()),d&2){let r=on();Zt(2),zp(r._attachments)}}var zfe=(d,o,r)=>{let p=d.map(f=>bd(r.objects.postAttachmentLink(o,JSON.stringify({attachmentId:f}))));return Ez(p).pipe(Z_(()=>bd(r.objects.getAttachmentLinks(o))))},Dwe=(()=>{class d extends Rc{constructor(r,p,f,M,T){super(r),this.dialogService=p,this.renderer=f,this.el=M,this.decorators=T,this._rootObjectId="",this.isDestroyed=!1,this.localWormHole=!0,this.inProgress=!1,this.canCreateAttachmentLink=!0,this.listOnly=!1,this.showEmptyMessage=!0,this.hideAttachmentSize=!1,this._attachments=[],this.attachmentsChange=new pr,this.attachmentsLinkChange=new pr,this.canDeleteAttachmentLink=!0,this.project=null,this.wormholeSelector="localEmbeddedModalId",this.env="dev",this._currentObjectId$=new Du(""),this._attachmentCount=0,this.buttonRowItems=[{id:"add-documents",title:this.translateService.instant("_Add_document"),tooltip:this.translateService.instant("_Add_document"),disabled:!this.canCreateAttachmentLink,buttonStyle:"primary"}],this.documentSelection=null,this.isOpened=!1,this.embeddedModalContainer="embedded-modal",this.shadowRootElement=this.el.nativeElement.shadowRoot}set attachments(r){this._attachments=r,this.onAttachmentsChange()}get attachments(){return this._attachments}onAttachmentsChange(){this.api&&this.rootObjectId&&(this._attachments=this.decorateAttachmentLinks(this.api,this._attachments))}set rootObjectId(r){r&&(this._currentObjectId$.next(r),this._rootObjectId=r)}get rootObjectId(){return this._rootObjectId}ngOnInit(){this.listOnly||this._currentObjectId$.subscribe({next:r=>{this._createAttachmentLinkStructure(r)}})}ngOnDestroy(){this.isDestroyed=!0}decorateAttachmentId(r){return{id:r.id,name:r.name,nameShort:r.name,url:"",iconClass:"",iconTitle:"",type:"AttachmentLink",deleteButtonTitle:""}}decorateAttachmentLinks(r,p){let f=p.map(M=>this.decorators.decorateLink(r,M,[this._currentObjectId$.value]));return f.sort((M,T)=>M.fileName.toLowerCase()<T.fileName.toLowerCase()?-1:M.fileName.toLowerCase()>T.fileName.toLowerCase()?1:0),f}_createAttachmentLinkStructure(r){this._loadAttachmentLinkStructure(r)?.subscribe({next:p=>{if(p&&(this._attachmentCount=p?.length,this.api)){let f=this.decorateAttachmentLinks(this.api,p);f&&(this._attachments=f)}}})}_loadAttachmentLinkStructure(r){if(this.api&&r)return bd(this.api.objects.getAttachmentLinks(r))}setModalVisibility(r=!0){if(!this.wormholeSelector)return;let p=this.localWormHole?this.shadowRootElement.querySelector("#"+this.wormholeSelector):document.getElementById(this.wormholeSelector);p&&(this.localWormHole?p.parentElement&&this.renderer.setStyle(p.parentElement,"display",r?"block":"none"):this.renderer.setStyle(p.parentElement,"display",r?"block":"none"),this.isOpened=r)}closeEmbeddedModalFileSelection(){this.setModalVisibility(!1)}_addLink(r,p){let f=p.filter(M=>!this.attachments.find(T=>T.id===M));if(f.length){if(this.inProgress){console.log("in progress");return}if(!this.rootObjectId){let M=f.map(T=>bd(r.objects.get(T,0,void 0,void 0,void 0,void 0)));Ez(M).subscribe({next:T=>{T?.forEach(x=>{x?.id&&!this.attachments.find(H=>H?.id===x.id)&&this._attachments.push(x)});let U=this._attachments.map(x=>this.decorateAttachmentId(x));this.attachmentsLinkChange.emit(U)},error:T=>{console.error("Error occurred during requests:",T),this._attachments=[]}});return}this.inProgress=!0,zfe(f,this.rootObjectId,r).subscribe({next:M=>{this._attachments=this.decorateAttachmentLinks(r,M),this.inProgress=!1,this.attachmentsChange.emit(f)},error:M=>{console.error("Failed to add or reload attachments:",M),this.inProgress=!1}})}}createAttachmentLink(r){console.log("createAttachmentLink"),this.localWormHole=this.wormholeSelector==="localEmbeddedModalId";let p=f=>{let M=typeof f=="string"?[f]:f,T=M&&M.length>0;this.isDestroyed||(this.closeEmbeddedModalFileSelection(),T&&this._addLink(r,M))};typeof p!="function"||!this.project||!this.api||setTimeout(()=>{let f=window.location.href.includes("localhost"),M="";if(f&&(M=this.api?.getAccessToken(),!M))return;let T=new cte.ExternalClient("BImplusNGXComponentClient");T?.initialize();let U={};if(!f){let H=window.location.pathname.replace(/\/viewer\/$/,"/");H=H.replace(/\/connexis\/$/,"/"),U.baseUrl=window.location.origin+H}let x=cte.BimFilesSelect;if(this.wormholeSelector){let H=new x(this.wormholeSelector,M,T,this.env,U);if(!H)return;H.onAttachmentSelected=p,this.project&&(this.localWormHole?H.loadShadowRoot(this.shadowRootElement,this.project.teamSlug,this.project.id):H.load(this.project.teamSlug,this.project.id)),this.setModalVisibility(!0)}},200)}_deleteAttachmentLink(r,p,f){f.stopPropagation(),f.preventDefault();let M=r.objects,T=this._currentObjectId$.value;bd(r.objects.deleteAttachmentLink(this.rootObjectId,p)).pipe(IM(()=>bd(M.getAttachmentLinks(T)))).subscribe({next:U=>{if(this.api){this._attachments=this.decorateAttachmentLinks(this.api,U);let x=this._attachments?.map(H=>this.decorateAttachmentId(H));this.attachmentsLinkChange.emit(x)}},error:U=>{console.error("Failed to delete or reload attachments:",U)}})}deleteAttachmentLink(r,p){if(!this.api||!r)return;let f=this.api;this.dialogService.open(Twe,{options:{position:"middle",positionOptions:{},overlayClickEnabled:!1,overlayVisibilityEnabled:!0,draggable:!0},data:{title:this.translateService.instant("_Delete_attachmentlink"),message:this.translateService.instant("_Attachmentlink_delete_confirmation_message"),acceptButtonLocalizedString:"_Delete",acceptCallback:()=>{this._deleteAttachmentLink(f,r.id,p)}}})}buttonClicked(r){if(!this.api)return;let p=this.api;r.id=="add-documents"&&this.createAttachmentLink(p)}static{this.\u0275fac=function(p){return new(p||d)(vi(ja),vi(hT),vi(zC),vi(Zo),vi(lte))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-links-to-documents"]],inputs:{api:"api",canCreateAttachmentLink:"canCreateAttachmentLink",listOnly:[2,"listOnly","listOnly",Vr],showEmptyMessage:[2,"showEmptyMessage","showEmptyMessage",Vr],hideAttachmentSize:[2,"hideAttachmentSize","hideAttachmentSize",Vr],attachments:"attachments",canDeleteAttachmentLink:"canDeleteAttachmentLink",project:"project",wormholeSelector:"wormholeSelector",env:"env",rootObjectId:"rootObjectId"},outputs:{attachmentsChange:"attachmentsChange",attachmentsLinkChange:"attachmentsLinkChange"},standalone:!0,features:[oc,ll,as],decls:5,vars:3,consts:[[1,"links-to-documents"],[3,"items"],[1,"embedded-modal-container"],[1,"bim-attachment-not-found"],[1,"scrollable-content-container"],[3,"buttonClicked","items"],[3,"id","title"],[1,"attachment-row"],[1,"bim-attachment-delete-button"],["target","_blank","rel","noopener noreferrer",1,"bim-attachmentlink-item",3,"href"],[1,"bim-attachment-name",3,"title"],[1,"bim-attachment-size",3,"title"],[1,"bim-attachment-delete-button",3,"click","keydown"],[3,"title"]],template:function(p,f){p&1&&(cn(0,"div",0),gr(1,cUe,1,1,"lib-bimplus-buttons-row",1)(2,uUe,2,1,"div",2)(3,dUe,3,3,"div",3)(4,mUe,4,0,"div",4),mn()),p&2&&(Zt(),fs(f.canCreateAttachmentLink&&!f.listOnly?1:-1),Zt(),fs(f.wormholeSelector==="localEmbeddedModalId"?2:-1),Zt(),fs(!(f._attachments!=null&&f._attachments.length)&&f.showEmptyMessage?3:4))},dependencies:[Ko,xc,l4,o4],styles:[`.text-selected{color:var(--text-highlight-text-color-enabled)}.ui-icon22px{width:2.2rem;height:2.2rem;display:inline-block;float:right;border-radius:.4rem;background-position:center center;background-repeat:no-repeat;cursor:pointer}.ui-icon-sidemenu{width:2.4rem;height:2.4rem;background-size:1.8rem 1.8rem;background-position:center center;background-repeat:no-repeat}.touch-ui-icon-sidemenu{width:2.4rem;height:2.4rem;background-size:1.8rem 1.8rem;background-position:center center;background-repeat:no-repeat;width:3.2rem;height:3.2rem}.ui-icon-sidemenu-important{width:2.4rem!important;height:2.4rem!important;background-size:1.8rem 1.8rem!important;background-position:center center;background-repeat:no-repeat}lib-bimplus-scrollable-container{--scrollable-container-paddin-right: 0}lib-bimplus-buttons-row{flex:0;--button-row-margin-top: 0;--button-row-margin-right: .8rem;--button-row-margin-bottom: 1.4rem;--button-row-margin-left: 0}.attachment-row{margin:var(--attachment-row-margin, 0 .8rem);border-bottom:var(--attachment-row-border-bottom, solid .1rem var(--details-controls-attachment-item-border-color))}.links-to-documents{display:flex;flex:1;flex-direction:column}.links-to-documents .scrollable-content-container{position:relative;flex:1}.links-to-documents .scrollable-content-container lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;width:100%}.bim-attachment-delete-button{color:var(--bim-attachment-delete-button, var(--details-controls-attachment-delete-button-text-color));font-weight:var(--bim-attachment-delete-button-font-weight, normal);float:right;margin-left:auto;cursor:pointer;margin-top:.2rem}.bim-attachment-delete-button:hover{color:var(--ui-text-1-color)}.bim-attachment-delete-button div{width:3.2rem;text-align:center}a.bim-attachmentlink-item,a.bim-attachmentlink-item:hover,a.bim-attachmentlink-item:visited{color:var(--dark-gray-color)}.bim-attachment-item,.bim-attachmentlink-item{display:flex;cursor:pointer;line-height:2.5rem;padding-left:var(--bim-attachmentlink-item-left-padding, 3.6rem);background-size:var(--bim-attachment-item-background-size, auto);background-repeat:no-repeat;background-position:var(--bim-attachment-item-background-position, .8rem center);background-image:var(--bim-attachment-item-background-image, url("./assets/icn_grid_attachments.png"));text-decoration:none!important}.bim-attachment-item .bim-attachment-name,.bim-attachmentlink-item .bim-attachment-name{padding-left:var(--bim-attachment-name-padding, 0 0 0 1rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bim-attachment-item .bim-attachment-extension,.bim-attachmentlink-item .bim-attachment-extension{white-space:nowrap}.bim-attachment-item .bim-attachment-size,.bim-attachmentlink-item .bim-attachment-size{padding-left:.5rem;white-space:nowrap;margin-right:.4rem}.bim-attachment-not-found{padding:2.5rem .5rem;color:var(--details-controls-details-not-found-text-color);text-align:center}.embedded-modal-container{display:none;box-sizing:content-box;position:fixed;inset:0;background-color:var(--portal-modal-background-color-overlay);padding:6% 9%}.embedded-modal-container iframe{width:100%;height:100%;outline:0;border:0;-webkit-box-shadow:0 0 .5rem var(--embedded-modal-shadow-color),0 0 .5rem var(--embedded-modal-shadow-color);-moz-box-shadow:0 0 .5rem var(--embedded-modal-shadow-color),0 0 .5rem var(--embedded-modal-shadow-color);box-shadow:0 0 .5rem var(--embedded-modal-shadow-color),0 0 .5rem var(--embedded-modal-shadow-color)}
12846
+ `],encapsulation:3})}}return d})();var cte=Y_(Ewe());var lte=(()=>{class d{constructor(){}fmt(r,...p){let f=0;return r.replace(/%@(\d+)?/g,(M,T)=>{let U=T?parseInt(T,10)-1:f++,x=p[U];return x===null?"(null)":x===void 0?"":x.toString()})}decorateLink(r,p,f){let M={id:p.id,name:p.name,fileName:p.fileName,size:p.size,link:p.link,fileNameShort:"",extension:"",objectIds:f,version:p.version,sizeMB:""},T=r.getAccessToken(),x=r.getApiTeamUrl()+"attachments/%@/versions/%@/download",H=!1;if(M.size=parseFloat((p.size/1e3).toFixed(2)),M.link=`${this.fmt(x,p.id,p.version)}?api-token=${T}${H?"":"&openInBrowser=true"}`,p.fileName.length>20){let J=p.fileName.split(".");J.length>1?(M.fileNameShort=J.slice(0,-1).join("."),M.extension="."+J.slice(-1)):M.fileNameShort=p.fileName}else M.fileNameShort=p.fileName;return M}static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275prov=za({token:d,factory:d.\u0275fac,providedIn:"root"})}}return d})();function cUe(d,o){if(d&1){let r=qs();cn(0,"lib-bimplus-buttons-row",5),xi("buttonClicked",function(f){Pi(r);let M=on();return Bi(M.buttonClicked(f))}),mn()}if(d&2){let r=on();Nn("items",r.buttonRowItems)}}function uUe(d,o){if(d&1&&(cn(0,"div",2),Zr(1,"iframe",6),mn()),d&2){let r=on();Zt(),Bo("id",r.wormholeSelector)}}function dUe(d,o){d&1&&(cn(0,"div",3),Wr(1),ca(2,"translate"),mn()),d&2&&(Zt(),Sa(" ",ha(2,1,"_No_attachmentlinks_found")," "))}function pUe(d,o){if(d&1){let r=qs();cn(0,"span",12),xi("click",function(f){Pi(r);let M=on().$implicit,T=on(2);return Bi(T.deleteAttachmentLink(M,f))})("keydown",function(f){Pi(r);let M=on().$implicit,T=on(2);return Bi(T.deleteAttachmentLink(M,f))}),cn(1,"div",13),ca(2,"translate"),Wr(3," \u2715\uFE0E "),mn()()}d&2&&(Zt(),Bo("title",ha(2,1,"_Delete_attachmentlink")))}function hUe(d,o){if(d&1&&(cn(0,"div",11),Wr(1),mn()),d&2){let r=on().$implicit;Bo("title",r.name),Zt(),Sa(" (",r.size," kB) ")}}function fUe(d,o){if(d&1&&(cn(0,"div",7),gr(1,pUe,4,3,"span",8),cn(2,"a",9)(3,"div",10),Wr(4),mn(),gr(5,hUe,2,2,"div",11),mn()()),d&2){let r=o.$implicit,p=on(2);Zt(),fs(p.canDeleteAttachmentLink?1:-1),Zt(),Bo("href",r.link,uT),Zt(),Bo("title",r.fileName),Zt(),Sa(" ",r.name?r.name:r.fileName," "),Zt(),fs(p.hideAttachmentSize?-1:5)}}function mUe(d,o){if(d&1&&(cn(0,"div",4)(1,"lib-bimplus-scrollable-container"),Sp(2,fUe,6,5,"div",7,wM),mn()()),d&2){let r=on();Zt(2),zp(r._attachments)}}var zfe=(d,o,r)=>{let p=d.map(f=>bd(r.objects.postAttachmentLink(o,JSON.stringify({attachmentId:f}))));return Ez(p).pipe(Z_(()=>bd(r.objects.getAttachmentLinks(o))))},Dwe=(()=>{class d extends Rc{constructor(r,p,f,M,T){super(r),this.dialogService=p,this.renderer=f,this.el=M,this.decorators=T,this._rootObjectId="",this.isDestroyed=!1,this.localWormHole=!0,this.inProgress=!1,this.canCreateAttachmentLink=!0,this.listOnly=!1,this.showEmptyMessage=!0,this.hideAttachmentSize=!1,this.inputBaseUrl="",this._attachments=[],this.attachmentsChange=new pr,this.attachmentsLinkChange=new pr,this.canDeleteAttachmentLink=!0,this.project=null,this.wormholeSelector="localEmbeddedModalId",this.env="dev",this._currentObjectId$=new Du(""),this._attachmentCount=0,this.buttonRowItems=[{id:"add-documents",title:this.translateService.instant("_Add_document"),tooltip:this.translateService.instant("_Add_document"),disabled:!this.canCreateAttachmentLink,buttonStyle:"primary"}],this.documentSelection=null,this.isOpened=!1,this.embeddedModalContainer="embedded-modal",this.shadowRootElement=this.el.nativeElement.shadowRoot}set attachments(r){this._attachments=r,this.onAttachmentsChange()}get attachments(){return this._attachments}onAttachmentsChange(){this.api&&this.rootObjectId&&(this._attachments=this.decorateAttachmentLinks(this.api,this._attachments))}set rootObjectId(r){r&&(this._currentObjectId$.next(r),this._rootObjectId=r)}get rootObjectId(){return this._rootObjectId}ngOnInit(){this.listOnly||this._currentObjectId$.subscribe({next:r=>{this._createAttachmentLinkStructure(r)}})}ngOnDestroy(){this.isDestroyed=!0}decorateAttachmentId(r){return{id:r.id,name:r.name,nameShort:r.name,url:"",iconClass:"",iconTitle:"",type:"AttachmentLink",deleteButtonTitle:""}}decorateAttachmentLinks(r,p){let f=p.map(M=>this.decorators.decorateLink(r,M,[this._currentObjectId$.value]));return f.sort((M,T)=>M.fileName.toLowerCase()<T.fileName.toLowerCase()?-1:M.fileName.toLowerCase()>T.fileName.toLowerCase()?1:0),f}_createAttachmentLinkStructure(r){this._loadAttachmentLinkStructure(r)?.subscribe({next:p=>{if(p&&(this._attachmentCount=p?.length,this.api)){let f=this.decorateAttachmentLinks(this.api,p);f&&(this._attachments=f)}}})}_loadAttachmentLinkStructure(r){if(this.api&&r)return bd(this.api.objects.getAttachmentLinks(r))}setModalVisibility(r=!0){if(!this.wormholeSelector)return;let p=this.localWormHole?this.shadowRootElement.querySelector("#"+this.wormholeSelector):document.getElementById(this.wormholeSelector);p&&(this.localWormHole?p.parentElement&&this.renderer.setStyle(p.parentElement,"display",r?"block":"none"):this.renderer.setStyle(p.parentElement,"display",r?"block":"none"),this.isOpened=r)}closeEmbeddedModalFileSelection(){this.setModalVisibility(!1)}_addLink(r,p){let f=p.filter(M=>!this.attachments.find(T=>T.id===M));if(f.length){if(this.inProgress){console.log("in progress");return}if(!this.rootObjectId){let M=f.map(T=>bd(r.objects.get(T,0,void 0,void 0,void 0,void 0)));Ez(M).subscribe({next:T=>{T?.forEach(x=>{x?.id&&!this.attachments.find(H=>H?.id===x.id)&&this._attachments.push(x)});let U=this._attachments.map(x=>this.decorateAttachmentId(x));this.attachmentsLinkChange.emit(U)},error:T=>{console.error("Error occurred during requests:",T),this._attachments=[]}});return}this.inProgress=!0,zfe(f,this.rootObjectId,r).subscribe({next:M=>{this._attachments=this.decorateAttachmentLinks(r,M),this.inProgress=!1,this.attachmentsChange.emit(f)},error:M=>{console.error("Failed to add or reload attachments:",M),this.inProgress=!1}})}}createAttachmentLink(r){console.log("createAttachmentLink"),this.localWormHole=this.wormholeSelector==="localEmbeddedModalId";let p=f=>{let M=typeof f=="string"?[f]:f,T=M&&M.length>0;this.isDestroyed||(this.closeEmbeddedModalFileSelection(),T&&this._addLink(r,M))};typeof p!="function"||!this.project||!this.api||setTimeout(()=>{let f=window.location.href.includes("localhost"),M="";if(f&&(M=this.api?.getAccessToken(),!M))return;let T=new cte.ExternalClient("BImplusNGXComponentClient");T?.initialize();let U={};if(!f){let H=window.location.pathname.replace(/\/viewer\/$/,"/");H=H.replace(/\/connexis\/$/,"/"),U.baseUrl=this.inputBaseUrl?this.inputBaseUrl:window.location.origin+H}let x=cte.BimFilesSelect;if(this.wormholeSelector){let H=new x(this.wormholeSelector,M,T,this.env,U);if(!H)return;H.onAttachmentSelected=p,this.project&&(this.localWormHole?H.loadShadowRoot(this.shadowRootElement,this.project.teamSlug,this.project.id):H.load(this.project.teamSlug,this.project.id)),this.setModalVisibility(!0)}},200)}_deleteAttachmentLink(r,p,f){f.stopPropagation(),f.preventDefault();let M=r.objects,T=this._currentObjectId$.value;bd(r.objects.deleteAttachmentLink(this.rootObjectId,p)).pipe(IM(()=>bd(M.getAttachmentLinks(T)))).subscribe({next:U=>{if(this.api){this._attachments=this.decorateAttachmentLinks(this.api,U);let x=this._attachments?.map(H=>this.decorateAttachmentId(H));this.attachmentsLinkChange.emit(x)}},error:U=>{console.error("Failed to delete or reload attachments:",U)}})}deleteAttachmentLink(r,p){if(!this.api||!r)return;let f=this.api;this.dialogService.open(Twe,{options:{position:"middle",positionOptions:{},overlayClickEnabled:!1,overlayVisibilityEnabled:!0,draggable:!0},data:{title:this.translateService.instant("_Delete_attachmentlink"),message:this.translateService.instant("_Attachmentlink_delete_confirmation_message"),acceptButtonLocalizedString:"_Delete",acceptCallback:()=>{this._deleteAttachmentLink(f,r.id,p)}}})}buttonClicked(r){if(!this.api)return;let p=this.api;r.id=="add-documents"&&this.createAttachmentLink(p)}static{this.\u0275fac=function(p){return new(p||d)(vi(ja),vi(hT),vi(zC),vi(Zo),vi(lte))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-links-to-documents"]],inputs:{api:"api",canCreateAttachmentLink:"canCreateAttachmentLink",listOnly:[2,"listOnly","listOnly",Vr],showEmptyMessage:[2,"showEmptyMessage","showEmptyMessage",Vr],hideAttachmentSize:[2,"hideAttachmentSize","hideAttachmentSize",Vr],inputBaseUrl:"inputBaseUrl",attachments:"attachments",canDeleteAttachmentLink:"canDeleteAttachmentLink",project:"project",wormholeSelector:"wormholeSelector",env:"env",rootObjectId:"rootObjectId"},outputs:{attachmentsChange:"attachmentsChange",attachmentsLinkChange:"attachmentsLinkChange"},standalone:!0,features:[oc,ll,as],decls:5,vars:3,consts:[[1,"links-to-documents"],[3,"items"],[1,"embedded-modal-container"],[1,"bim-attachment-not-found"],[1,"scrollable-content-container"],[3,"buttonClicked","items"],[3,"id","title"],[1,"attachment-row"],[1,"bim-attachment-delete-button"],["target","_blank","rel","noopener noreferrer",1,"bim-attachmentlink-item",3,"href"],[1,"bim-attachment-name",3,"title"],[1,"bim-attachment-size",3,"title"],[1,"bim-attachment-delete-button",3,"click","keydown"],[3,"title"]],template:function(p,f){p&1&&(cn(0,"div",0),gr(1,cUe,1,1,"lib-bimplus-buttons-row",1)(2,uUe,2,1,"div",2)(3,dUe,3,3,"div",3)(4,mUe,4,0,"div",4),mn()),p&2&&(Zt(),fs(f.canCreateAttachmentLink&&!f.listOnly?1:-1),Zt(),fs(f.wormholeSelector==="localEmbeddedModalId"?2:-1),Zt(),fs(!(f._attachments!=null&&f._attachments.length)&&f.showEmptyMessage?3:4))},dependencies:[Ko,xc,l4,o4],styles:[`.text-selected{color:var(--text-highlight-text-color-enabled)}.ui-icon22px{width:2.2rem;height:2.2rem;display:inline-block;float:right;border-radius:.4rem;background-position:center center;background-repeat:no-repeat;cursor:pointer}.ui-icon-sidemenu{width:2.4rem;height:2.4rem;background-size:1.8rem 1.8rem;background-position:center center;background-repeat:no-repeat}.touch-ui-icon-sidemenu{width:2.4rem;height:2.4rem;background-size:1.8rem 1.8rem;background-position:center center;background-repeat:no-repeat;width:3.2rem;height:3.2rem}.ui-icon-sidemenu-important{width:2.4rem!important;height:2.4rem!important;background-size:1.8rem 1.8rem!important;background-position:center center;background-repeat:no-repeat}lib-bimplus-scrollable-container{--scrollable-container-paddin-right: 0}lib-bimplus-buttons-row{flex:0;--button-row-margin-top: 0;--button-row-margin-right: .8rem;--button-row-margin-bottom: 1.4rem;--button-row-margin-left: 0}.attachment-row{margin:var(--attachment-row-margin, 0 .8rem);border-bottom:var(--attachment-row-border-bottom, solid .1rem var(--details-controls-attachment-item-border-color))}.links-to-documents{display:flex;flex:1;flex-direction:column}.links-to-documents .scrollable-content-container{position:relative;flex:1}.links-to-documents .scrollable-content-container lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;width:100%}.bim-attachment-delete-button{color:var(--bim-attachment-delete-button, var(--details-controls-attachment-delete-button-text-color));font-weight:var(--bim-attachment-delete-button-font-weight, normal);float:right;margin-left:auto;cursor:pointer;margin-top:.2rem}.bim-attachment-delete-button:hover{color:var(--ui-text-1-color)}.bim-attachment-delete-button div{width:3.2rem;text-align:center}a.bim-attachmentlink-item,a.bim-attachmentlink-item:hover,a.bim-attachmentlink-item:visited{color:var(--dark-gray-color)}.bim-attachment-item,.bim-attachmentlink-item{display:flex;cursor:pointer;line-height:2.5rem;padding-left:var(--bim-attachmentlink-item-left-padding, 3.6rem);background-size:var(--bim-attachment-item-background-size, auto);background-repeat:no-repeat;background-position:var(--bim-attachment-item-background-position, .8rem center);background-image:var(--bim-attachment-item-background-image, url("./assets/icn_grid_attachments.png"));text-decoration:none!important}.bim-attachment-item .bim-attachment-name,.bim-attachmentlink-item .bim-attachment-name{padding-left:var(--bim-attachment-name-padding, 0 0 0 1rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bim-attachment-item .bim-attachment-extension,.bim-attachmentlink-item .bim-attachment-extension{white-space:nowrap}.bim-attachment-item .bim-attachment-size,.bim-attachmentlink-item .bim-attachment-size{padding-left:.5rem;white-space:nowrap;margin-right:.4rem}.bim-attachment-not-found{padding:2.5rem .5rem;color:var(--details-controls-details-not-found-text-color);text-align:center}.embedded-modal-container{display:none;box-sizing:content-box;position:fixed;inset:0;background-color:var(--portal-modal-background-color-overlay);padding:6% 9%}.embedded-modal-container iframe{width:100%;height:100%;outline:0;border:0;-webkit-box-shadow:0 0 .5rem var(--embedded-modal-shadow-color),0 0 .5rem var(--embedded-modal-shadow-color);-moz-box-shadow:0 0 .5rem var(--embedded-modal-shadow-color),0 0 .5rem var(--embedded-modal-shadow-color);box-shadow:0 0 .5rem var(--embedded-modal-shadow-color),0 0 .5rem var(--embedded-modal-shadow-color)}
12847
12847
  `],encapsulation:3})}}return d})();var Swe=(()=>{class d{get title(){return this._title}set title(r){this._title=r}get message(){return this._message}set message(r){this._message=r}constructor(r,p){this.dialogService=r,this.translateService=p,this._title="",this._message="",this.buttons=[{id:"errorDialogAcceptButton",title:this.translateService.instant("_Ok"),tooltip:this.translateService.instant("_Ok"),disabled:!1,buttonStyle:"primary"}],this._data=this.dialogService.inputData,this._title=this._data?.title||"",this._message=this._data?.message||""}close(){this.dialogService.close()}keypressClose(r){(r.key==="Escape"||r.key==="Esc")&&this.close()}buttonRowButtonClicked(){this.close(),this.acceptCallback?.()}handleKeydown(r){(r.key==="Escape"||r.key==="Esc")&&this.close()}static{this.\u0275fac=function(p){return new(p||d)(vi(hT),vi(ja))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-overlay-dialog-error"]],hostBindings:function(p,f){p&1&&xi("keydown",function(T){return f.handleKeydown(T)},!1,$I)},inputs:{title:"title",message:"message"},standalone:!0,features:[as],decls:11,vars:3,consts:[[1,"overlay-dialog-container"],[1,"overlay-dialog-container_title"],[1,"overlay-dialog-container_title_icon"],[1,"overlay-dialog-container_title_msg"],[1,"overlay-dialog-container_title_close",3,"click","keypress"],[1,"overlay-dialog-container_content"],[1,"overlay-dialog-container_content_msg"],[1,"buttons"],[3,"buttonClicked","items"]],template:function(p,f){p&1&&(cn(0,"div",0)(1,"div",1),Zr(2,"div",2),cn(3,"div",3),Wr(4),mn(),cn(5,"div",4),xi("click",function(){return f.close()})("keypress",function(T){return f.keypressClose(T)}),mn()(),cn(6,"div",5)(7,"div",6),Wr(8),mn(),cn(9,"div",7)(10,"lib-bimplus-buttons-row",8),xi("buttonClicked",function(){return f.buttonRowButtonClicked()}),mn()()()()),p&2&&(Zt(4),Sa(" ",f.title," "),Zt(4),Sa(" ",f.message," "),Zt(2),Nn("items",f.buttons))},dependencies:[qo,Ko,o4],styles:[`.overlay-dialog-container{display:inline-flex;flex-direction:column;box-shadow:0 .4rem .8rem 0 var(--card-box-shadow-color),0 .6rem 2rem 0 var(--card-box-shadow-color);min-width:37.6rem;max-width:60rem}.overlay-dialog-container .overlay-dialog-container_title{background-color:var(--color-help-popup-title-background);height:3.2rem;display:inline-flex;align-items:center}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_icon{width:1.8rem;height:1.8rem;background:url("./assets/bimplus_Components_Overlay_Dialog_Error_Title.svg") no-repeat center center;padding:0 1.6rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_msg{color:var(--main-menu-text-default);font:700 1.3832rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;text-transform:capitalize;margin-bottom:.2rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_close{width:1.8rem;height:1.8rem;background:url("./assets/bimplus_Components_Overlay_Dialog_Cross_White.svg") no-repeat center center;cursor:default;margin:0 0 0 auto;padding-right:1.6rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_close:hover{cursor:pointer}.overlay-dialog-container .content .warning-title{line-height:2.4rem}.overlay-dialog-container .content .warning-message{line-height:1.6rem}.overlay-dialog-container .overlay-dialog-container_content{background-color:var(--main-menu-text-default);flex-grow:1}.overlay-dialog-container .overlay-dialog-container_content .overlay-dialog-container_content_msg{color:var(--color-help-popup-title-background);font:400 1.28rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;padding-top:.8rem;padding-left:1.6rem}.overlay-dialog-container .overlay-dialog-container_content .buttons{padding:1.6rem}
12848
12848
  `],encapsulation:3})}}return d})();var ute=[{id:"object-properties",img:{default:"ic_models",active:"ic_models_maincolor"},title:"_Object properties"},{id:"comments",img:{default:"Comments_18_gray",active:"Comments_18_maincolor"},title:"_Comments"},{id:"attachments",img:{default:"Attachment_18_gray",active:"Attachment_18_maincolor"},title:"_Attachments"},{id:"hyperlinks",img:{default:"Links_18_gray",active:"Links_18_maincolor"},title:"hyperlinks"},{id:"links-to-documents",img:{default:"Attachmentlink_18_gray",active:"Attachmentlink_18_maincolor"},title:"_Links_to_documents"}],dte=new Fo("bimplus-tabs-switcher-config");var pF=(()=>{class d{setActiveTab(r){this.activeTab.next(r)}constructor(r){this.bimplusTabsSwitcherConfig=r,this.tabSwitcherElements=new Du(ute),this.tabSwitcherElements$=this.tabSwitcherElements.asObservable(),this.activeTab=new ac,this.activeTab$=this.activeTab.asObservable(),this.bimplusTabsSwitcherConfig?.defaultTabsSwitcherElements&&this.tabSwitcherElements.next(this.bimplusTabsSwitcherConfig.defaultTabsSwitcherElements)}static{this.\u0275fac=function(p){return new(p||d)(Gs(dte,8))}}static{this.\u0275prov=za({token:d,factory:d.\u0275fac})}}return d})();var bUe=(d,o)=>({"underline-switcher":!0,highlight:d,hovering:o}),vUe="../../../../../../",pte=(()=>{class d{set activeTab(r){r&&this.bimplusTabsSwitcherService.setActiveTab(r)}constructor(r,p){this.bimplusTabsSwitcherConfig=r,this.bimplusTabsSwitcherService=p,this.imageBaseSrc=vUe,this.activeTabChange=new pr,this.activeTabSignal=HX(this.bimplusTabsSwitcherService.activeTab$),this.isActive=RM(()=>this.activeTabSignal()===this.bimplusTabComponentModel.id),this.isDisabled=so(!1),this.imgName=RM(()=>this.isActive()?this.bimplusTabComponentModel.img.active:this.bimplusTabComponentModel.img.default),this.onHoverOver=so(!1),this.isAllDisabled=this.bimplusTabsSwitcherConfig?.disabled?.all??!1,this.isAllDisabled&&this.isDisabled.set(!0)}onMouseEnter(){this.onHoverOver.set(!0)}onMouseLeave(){this.onHoverOver.set(!1)}ngOnInit(){!this.isAllDisabled&&this.bimplusTabsSwitcherConfig?.disabled?.id&&this.isDisabled.set(this.bimplusTabsSwitcherConfig.disabled?.id===this.bimplusTabComponentModel.id)}activate(){this.isDisabled()||(this.bimplusTabsSwitcherService.setActiveTab(this.bimplusTabComponentModel.id),this.activeTabChange.emit(this.bimplusTabComponentModel.id))}static{this.\u0275fac=function(p){return new(p||d)(vi(dte,8),vi(pF))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-tab"]],hostBindings:function(p,f){p&1&&xi("mouseenter",function(){return f.onMouseEnter()})("mouseleave",function(){return f.onMouseLeave()})},inputs:{bimplusTabComponentModel:"bimplusTabComponentModel",imageBaseSrc:"imageBaseSrc",activeTab:"activeTab"},outputs:{activeTabChange:"activeTabChange"},standalone:!0,features:[as],decls:4,vars:14,consts:[[1,"tab-element",3,"click","keypress","title"],[3,"src","alt"],[3,"ngClass"]],template:function(p,f){p&1&&(cn(0,"div",0),ca(1,"translate"),xi("click",function(){return!f.isDisabled()&&f.activate()})("keypress",function(){return!f.isDisabled()&&f.activate()}),Zr(2,"img",1)(3,"div",2),mn()),p&2&&(ul("disabled",f.isDisabled()),Nn("title",ha(1,9,f.bimplusTabComponentModel.title)),Zt(2),X1e("src","",f.imageBaseSrc,"assets/images/default/",f.imgName(),".svg",uT),Nn("alt",f.imgName()),Zt(),Nn("ngClass",dy(11,bUe,f.isActive(),f.onHoverOver())),Gl("data-test","underline-switcher-"+f.bimplusTabComponentModel.id))},dependencies:[Oc,Ko,xc],styles:["[_ngcontent-%COMP%]:root{--color-brand-dark: #033A68;--color-brand-white: #FFF;--color-main-background: #FFF;--color-brand-primary: #06C;--color-brand-light: #B4DAFF;--color-main-error: #D1000D;--color-main-warning: #FEA400;--color-main-info: #0297E3;--color-background-body_default: #F7F7F7;--color-background-body_modify: #F0F8FF;--color-background-cover_popup: #2F31333F;--color-background-layer-1: #FFF;--color-background-layer-2: #F7F7F7;--color-background-layer-3: #E1E5E8;--color-background-layer-4: #87C1FF;--color-background-layer-5: #06C;--color-background-layer-6: #DEF0FF;--color-background-quickfilter: #004AA4;--color-checkbox-backgroud-hover: #B4DAFF;--color-background-button-primary-enabled: #06C;--color-background-button-primary-hover: #004AA4;--color-background-button-primary-pressed: #002C70;--color-background-button-primary-disabled: #D3D7DB;--color-button-primary-disabled: #FFF;--color-background-button-secondary-enabled: #FFF;--color-background-button-secondary-hover: #DEF0FF;--color-background-button-secondary-pressed: #DEF0FF;--color-background-button-secondary-disabled: #FFF;--color-background-button-tertiary-enabled: #DEF0FF;--color-background-button-tertiary-hover: #B4DAFF;--color-background-button-tertiary-pressed: #A0CEFF;--color-background-button-tertiary-disabled: #DEF0FF;--color-background-chip-open: #ECEFF1;--color-background-chip-in-progress: #B2E4FC;--color-background-chip-on-hold: #FFF9BF;--color-background-chip-resolved: #CBF6C8;--color-background-chip-cancelled: #FFC7CD;--color-background-menu-enabled: #FFF;--color-background-menu-hover: #F7F7F7;--color-background-menu-pressed: #E1E5E8;--color-background-menu-selected: #B4DAFF;--color-background-sidebar-allplan: #000;--color-background-sidebar-default: #232526;--color-background-sidebar-hover: #2F3133;--color-background-sidebar-pressed: #46494D;--color-background-table-header: #DEF0FF;--color-background-table-row: #F7F7F7;--color-background-table-row_hover: #E1E5E8;--color-background-table-line: #FFF;--color-background-table-sub: #F9F9F9;--color-background-table-sub_hover: #ECEFF1;--color-background-calender-default: #FFF;--color-background-calender-selected: #B4DAFF;--color-background-calender-focused: #148CF6;--color-background-calender-weekend: #D3D7DB;--color-background-toaster-error: #FFC7CD;--color-background-toaster-warning: #FFFDE5;--color-background-toaster-success: #EAFCE9;--color-background-toaster-info: #B2E4FC;--color-border-default: #D3D7DB;--color-border-hover: #84888C;--color-border-focus: #06C;--color-border-error-dark: #AC0000;--color-border-error-default: #FE0019;--color-border-warning-dark: #E36C03;--color-border-warning-default: #FEA400;--color-border-success-dark: #006602;--color-border-success-default: #0ADB3B;--color-border-info-dark: #004AA4;--color-border-info-default: #329AFF;--color-border-highlight: #06C;--color-border-quickfilter: #004AA4;--color-border-button-disabled: #D3D7DB;--color-border-calender-default: #FFF;--color-border-calender-selected: #87C1FF;--color-border-calender-focused: #148CF6;--color-border-input-default: #D3D7DB;--color-border-input-hover: #84888C;--color-border-input-focus: #06C;--color-border-input-focus-shadow: 0px 0px 4px 0px var(--color-brand-primary);--color-border-input-error-dark: #C40000;--color-border-input-error-default: #FE0019;--color-border-input-warning-dark: #FD7700;--color-border-input-warning-default: #FEA400;--color-border-input-success-dark: #007D02;--color-border-input-success-default: #0ADB3B;--color-border-input-info-dark: #004AA4;--color-border-input-info-default: #329AFF;--color-border-input-disabled: #D3D7DB;--color-border-chip-open: #46494D;--color-border-chip-in-progress: #033A68;--color-border-chip-on-hold: #E36C03;--color-border-chip-resolved: #006602;--color-border-chip-cancelled: #AC0000;--color-icon-default: #2F3133;--color-icon-primary: #06C;--color-icon-on-primary: #FFF;--color-icon-muted: #676869;--color-icon-highlight: #50A8FF;--color-text-body: #232526;--color-text-muted: #676869;--color-text-highlight-light: #06C;--color-text-on-primary: #FFF;--color-text-hint: #84888C;--color-text-highlight-dark: #50A8FF;--color-text-link-default: #06C;--color-text-link-pressed: #004AA4;--color-text-feedback-error-default: #FE0019;--color-text-feedback-error-dark: #AC0000;--color-text-feedback-warning-default: #FEA400;--color-text-feedback-warning-dark: #FD7700;--color-text-feedback-success-default: #0ADB3B;--color-text-feedback-success-dark: #007D02;--color-text-feedback-info-default: #329AFF;--color-text-feedback-info-dark: #004AA4;--color-text-button-primary-disabled: #F7F7F7;--color-text-button-secondary-disabled: #A0CEFF;--color-text-button-tritiary-disabled: #A0CEFF;--color-logo-dark: #033A68;--color-logo-brand: #06C;--color-logo-light: #329AFF;--color-logo-black: #2F3133;--color-fill-success: #0ADB3B;--color-fill-error: #FE0019;--color-fill-color: #84888C;--color-line-devider: #B8BBBF;--color-illustrations-color2: #50A8FF;--color-illustrations-color4: #E3BD9A;--color-illustrations-color5: #033A68;--color-illustrations-color6: #000;--color-illustrations-color7: #FEBD00;--color-illustrations-color8: #FD7700;--color-illustrations-color9: #D3D7DB;--color-illustrations-color10: #ECEFF1;--color-illustrations-color11: #84888C;--spacing-base: 4px;--spacing-x2: 8px;--spacing-x3: 12px;--spacing-x4: 16px;--spacing-x5: 20px;--spacing-x6: 24px;--spacing-x7: 28px;--spacing-x8: 32px;--spacing-x9: 36px;--spacing-x10: 40px;--spacing-x15: 60px;--spacing-x20: 80px;--spacing-none: 0px;--border-radius-minimum: 2px;--border-radius-base: 4px;--border-radius-x2: 8px;--border-radius-x3: 12px;--border-radius-x4: 16px;--border-radius-x5: 20px;--border-radius-none: 0px;--size-base: 4px;--size-x2: 8px;--size-x3: 12px;--size-x4: 16px;--size-x5: 20px;--size-x10: 40px;--size-x20: 80px;--drop-shadow-default: 3px 3px 12px 0px var(--drop-shadow-default-background-color);--drop-shadow-input: 0px 0px 4px 0px var(--brand-blue-800);--spacing-card-padding: 20px;--input-padding: var(--spacing-x3);--font-family-default: arial, helvetiva, sans serif;--font-weight-bold: bold;--font-weight-regular: normal;--font-size-heading-1: 56px;--font-size-heading-2: 40px;--font-size-heading-3: 32px;--font-size-heading-4: 24px;--font-size-large: 20px;--font-size-normal: 16px;--font-size-medium: 14px;--font-size-small: 12px;--font-size-smaller: 11px;--font-size-mobile-heading-1: 36px;--font-size-mobile-heading-2: 28px;--font-size-mobile-heading-3: 24px;--font-size-mobile-heading-4: 20px;--font-size-mobile-large: 18px;--font-size-mobile-normal: 16px;--font-size-mobile-medium: 14px;--font-size-mobile-small: 12px;--font-size-mobile-smaller: 11px;--color-project-view-link-hovered: #329AFF;--color-brand-air: #DEF0FF;--color-datepicker-background: #ECEFF1;--color-datepicker-border-hover: #84888C;--color-datepicker-border: #84888C;--color-datepicker-disabled: #84888C;--color-datepicker: #84888C;--color-datepicker-container-error-background: #FFF;--color-datepicker-background-disabled: #FFF;--color-background-general: #ECEFF1;--color-border-general: #ECEFF1;--color-background-general-disabled: #FFF;--color-jstree-search: #AC0000;--color-jstree-search-background-focus: #FFF;--color-jstree-multiselect-tree: #46494D;--color-jstree-colorpicker-border-disabled: #84888C;--color-jstree-checkbox-divider: #84888C;--color-jstree-anchor-clicked: #06C;--color-jstree-custom-buttons-draggable-background-hovered: #E1E5E8;--color-jstree-body-istouch-anchor-background: #E1E5E8;--color-jstree-body-istouch-li-background-hovered: #E1E5E8;--color-colorpicker-trigger-border: #84888C;--color-colorpicker-color-border: #84888C;--color-colorpicker-modable-slider-border: #84888C;--color-colorpicker-colorpreview-border: #84888C;--color-colorpicker-default-opaque-chessboard-container-background: #FFF;--color-widget-header: #46494D;--color-widget-header-background: #F7F7F7;--color-pdmodal-select: #FFF;--color-pdmodal-select-background: #46494D;--color-pdmodal-select-background-highlighted: #676869;--color-pdmodal-select-disabled: #84888C;--color-pdmodal-checkbox-title-disabled: #84888C;--color-pdmodal-secondary-button-border-disabled: #84888C;--color-pdmodal-secondary-button-background-disabled: #84888C;--color-pdmodal-secondary-button-disabled: #84888C;--color-pdmodal-content-background: #FFF;--color-modal-header-border: #E1E5E8;--color-ui-slider-range-background: #46494D;--color-tabs-panel-title: #46494D;--color-structure-details-list-value: #46494D;--color-structure-details-pin-invisible: #84888C;--color-structure-details-name-border: #84888C;--color-structure-details-button-border-bottom: #84888C;--color-structure-details-pin-border: #B8BBBF;--color-structure-details-list-value-background-hover-disabled: #FFF;--color-structure-details-comment: #B8BBBF;--color-structure-details-modified: #B8BBBF;--color-structure-details-img-background: #FFF;--color-structure-details-img-selobj-background: #FFF;--color-structure-details-input-text-short-color-hover-enabled: #000;--color-structure-history-input-border-hover: #84888C;--color-context-menu-item-disabled: #46494D;--color-context-menu-background: #FFF;--color-context-menu-close-icon: #FFF;--color-context-menu-list-background: #FFF;--color-context-menu-list-border: #B8BBBF;--color-context-menu-item-label: #46494D;--color-context-menu-item-background-hover: #F7F7F7;--color-help-popup-title-background: #46494D;--color-help-popup-title: #FFF;--color-help-popup-close-button: #FFF;--color-popup-dialog-modal-subbody-row-disabled: #84888C;--color-popup-dialog-textarea-border: #84888C;--color-popup-dialog-textarea-border-hover: #84888C;--color-popup-dialog-textarea-background-hover: #F7F7F7;--color-popup-dialog-textarea-disabled: #84888C;--color-popup-dialog-textinput-disabled: #84888C;--color-popup-dialog-textinput-border: #84888C;--color-popup-dialog-text-input-wrapper-disabled: #84888C;--color-popup-dialog-bkg: #FFF;--color-popup-dialog-title: #FFF;--color-popup-menu-content-background: #FFF;--color-popupwin-item-color-disabled: #84888C;--color-popupwin-item-color-disabled-hover: #84888C;--color-clashdetection-activate-footer: #46494D;--color-clashdetection-newclashset-header: #46494D;--color-clashdetection-tolerance-border: #84888C;--color-clashdetection-tolerance-input-border-hover: #84888C;--color-clashdetection-description-tolerance-border: #84888C;--color-clashdetection-button: #FFF;--color-revisions-title-background: #46494D;--color-revisions-popupwin-content-background: #FFF;--color-revisions-title: #FFF;--color-revisions-popupwin-close-button: #FFF;--color-top-menu-toolbar-user: #46494D;--color-top-menu-toolbar-company: #46494D;--color-power-select-multiple-remove-btn: #46494D;--color-power-select-multiple-options-btn: #676869;--color-power-select-multiple-options-background: #FFF;--color-power-select-trigger: #84888C;--color-power-select-trigger-disabled: #84888C;--color-power-select-trigger-hover: #84888C;--color-power-select-trigger-border-hover: #84888C;--color-power-select-trigger-status-border: #84888C;--color-power-select-trigger-border: #84888C;--color-power-select-placeholder: #84888C;--color-power-select-status-border: #84888C;--color-power-select-search-border: #06C;--color-combobox-objectproperty-disabled-power-select-triger-background: #ECEFF1;--color-input-webkit-autofill: #46494D;--color-forms-input-webkit-autofill: #FFF;--color-ui-text-1: #46494D;--color-dark-gray: #46494D;--color-midle-gray: #676869;--color-pdmodal-select-dropdown: #676869;--color-center-menu-border: #676869;--color-center-menu-submenu-border: #84888C;--color-center-menu-background: #FFF;--color-center-menu-active-color-hovered: #06C;--color-text-main-menu-app-item-enabled: #000;--color-obj-prop-view-list: #676869;--color-obj-prop-table-value-border: #84888C;--color-table-text-search: #676869;--color-table-row-selected-border-color: #B8BBBF;--color-table-toolbar-text-search-border-color: #B8BBBF;--color-table-toolbar-text-search-background-color: #FFF;--color-table-container-text-search-border-color: #B8BBBF;--color-table-columns-selection-border-color: #B8BBBF;--color-table-portal-border-color: #B8BBBF;--color-table-portal-border: #B8BBBF;--color-table-portal-toolbar-border-color: #B8BBBF;--color-table-portal-border-two: #D3D7DB;--color-table-portal-border-three: #06C;--color-table-portal-background: #84888C;--color-table-portal-background-two: #F7F7F7;--color-table-portal-toolbar-border: #B8BBBF;--color-table-portal: #000;--color-table-portal-two: #FFF;--color-table-portal-three: #B8BBBF;--color-table-portal-four: #46494D;--color-table-stripe-dark: #B8BBBF;--color-sidemenu-background: #676869;--color-sidemenu-navigation-background: #F7F7F7;--color-sidemenu-navigation-row-a: #000;--color-sidemenu-navigation-row-a-active: #B4DAFF;--color-sidemenu-navigation-parent-row-disabled: #B8BBBF;--color-sidemenu-navigation-parent-container-hovered: #B4DAFF;--color-sidemenu-navigation-parent-row-hovered: #B4DAFF;--color-sidemenu-navigation-projectinfo-thumbnail-projectname-container-background: var(--color-neutral-white-transparency90);--color-form-control-placeholder: #676869;--color-form-help-block: #676869;--color-form-control: #46494D;--color-form-control-border: #676869;--color-components-form-control: #E1E5E8;--color-components-form-control-text-field-description: #E1E5E8;--color-components-form-control-text-field-control: #E1E5E8;--color-components-form-control-border: #FFF;--color-components-form-control-white-background: #FFF;--color-components-form-control-text-underline-link-border: #FFF;--color-components-form-control-white-border: #000;--color-components-form-control-white: #000;--color-components-form-control-white-border-disabled: #000;--color-login-button-error-background: #676869;--color-modable-slider-background: #676869;--color-project-list-text: #676869;--color-project-list-border: #E1E5E8;--color-project-list-font: #46494D;--color-embedded-modal-shadow: #676869;--color-embbedded-table-border: #84888C;--color-embedded-table-sorted-arrow: #84888C;--color-embbedded-table-head-background: #E1E5E8;--color-embedded-table-tbody-tr-nth-of-type: #ECEFF1;--color-browser-banner-warning-shadow: #676869;--color-form-control-placeholder-disabled: #84888C;--color-app-footer-wormhole-destination-border: #84888C;--color-comments-list-item-date: #84888C;--color-comments-list-item-container-background: #E1E5E8;--color-background-table-portal-header: #84888C;--color-table-row-border-color: #84888C;--color-overlay-progress-step-background: #84888C;--color-overlay-progress-arrow: #84888C;--color-new-overlay-cover-background: #84888C;--color-overlay-message: #FFF;--color-middle-light-gray: #84888C;--color-issue-details-select-border: #84888C;--color-issue-details-bulk-set: #84888C;--color-issue-details-img-selobj-background: #FFF;--color-issue-details-view-select-background: #FFF;--color-issue-emailcc-dropdown-background: #ECEFF1;--color-drofus-settings-list-value-input-disabled: #84888C;--color-drofus-settings-list-value-input-background-disabled: #FFF;--color-file-view-border: #84888C;--color-navigation-map-floating-panel-border: #84888C;--color-reports-container-date: #84888C;--color-reports-container-task-report-border: #84888C;--color-floating-panel-border: #84888C;--color-render-info: #84888C;--color-qto-table-resize-handler-border: #84888C;--color-qto-table-resize-handler-background: #ECEFF1;--app-footer-wormhole-destination-border-color: #84888C;--color-slideshow-slide-name-edit-border: #84888C;--color-slideshow-slide-name-edit-border-hover: #84888C;--color-slideshow-slide-name-edit-background-focus: #DEF0FF;--color-slideshow-hr-background: #E1E5E8;--color-slide-list-item-image-background: #E1E5E8;--color-control-color-disabled: #84888C;--color-control-normal-background: #FFF;--color-projectinfo-grid-column-background: #84888C;--color-projectinfo-grid-toolbar-background: #E1E5E8;--color-projectinfo-grid-column-resizer-background: #FFF;--color-projectinfo-grid-content-nth-child-background: #FFF;--color-kpi-chart-settings-border: #B8BBBF;--color-left-menu-content-border: #B8BBBF;--color-right-menu-content-border: #B8BBBF;--color-details-object-list-border: #B8BBBF;--color-drofus-settings-list-value-input-border-disabled: #B8BBBF;--color-underline-switcher-item-highlight-hover: #B8BBBF;--color-underline-switcher-highlight-background: #E1E5E8;--color-underline-switcher-item-highlight-hover-disabled: #ECEFF1;--color-sidebar-divider-border: #B8BBBF;--color-sidebar-item-name-disabled: #B8BBBF;--color-object-scenes-tiles-divider-background: #E1E5E8;--color-object-scenes-tiles-divider-border: #E1E5E8;--color-portal-modal-select: #46494D;--color-portal-modal-select-disabled: #E1E5E8;--color-portal-modal-header-border: #E1E5E8;--color-portal-modal-content-header: #FFF;--color-portal-modal-content-header-background: #46494D;--color-portal-modal-content-header-h1: #FFF;--color-portal-modal-content-row-disabled: #ECEFF1;--color-portal-modal-power-select-trigger: #46494D;--color-portal-modal-power-select-trigger-disabled: #B8BBBF;--color-portal-modal-power-select-trigger-border-hovered: #ECEFF1;--color-portal-modal-power-select-trigger-background-hovered: #F9F9F9;--color-portal-modal-power-select-trigger-border-disabled: #F7F7F7;--color-portal-modal-power-select-trigger-background-disabled: #FFF;--color-portal-modal-power-select-status-icon-border: #B8BBBF;--color-portal-modal-power-select-placeholder: #B8BBBF;--color-portal-modal-close-button: #FFF;--color-overlay-set-items-background: #E1E5E8;--color-project-details-bottom-buttons-background: #E1E5E8;--color-four-oh-four-pill-btn--color: #ECEFF1;--color-ui-background-2: #ECEFF1;--color-pd-project-progress-background: #ECEFF1;--color-pd-project-progress-background-two: #FFF;--color-pd-project-anchor-button: #FFF;--color-pd-project-edit-button: #FFF;--color-alternate-row-background: #ECEFF1;--color-control-background-hover: #ECEFF1;--color-table-settings-stripe-background: #ECEFF1;--color-radio-button-group-border: #FFF;--color-radio-button-group-background: #FFF;--color-radio-button-group-input-color-disabled: #84888C;--color-header-global-warning: #FFF;--color-header-global-warning-anchor: #FFF;--color-header-global-warning-background: #FFF;--color-project-menu-background: #F7F7F7;--color-progress-circle-background: #FFF;--color-progress-circle-loader-background: #FFF;--color-project-table-content-background: #FFF;--color-project-table-content-select: #000;--color-project-files-table-content-background: #FFF;--color-project-filter-content-border: #D3D7DB;--color-project-filter-content-background: #FFF;--color-workflow-background-seven: #FEA400;--color-table-portal-background-one: #00B528;--color-propertymanager-jstree-content-search: #C40000;--color-propertymanager-loading-background: rgba(0, 0, 0, .5);--color-propertymanager-loading-message: #FFF;--color-propertymanager-content-background: #FFF;--color-propertymanager-object-tree-content-background: #FFF;--color-propertymanager-object-tree-scrollable-border: #D3D7DB;--color-propertymanager-sets-loading-background: rgba(0, 0, 0, .5);--color-propertymanager-sets-loading-message: #FFF;--color-propertymanager-sets-content-background: #FFF;--color-propertymanager-sets-content-scrollable-border: #D3D7DB;--color-sg-checkbox: #46494D;--color-propertymanager-sets-sg-checkbox: #46494D;--color-propertymanager-structure-select-border: #D3D7DB;--color-workflow-background-eight: #0374BB;--color-fast-scroll-box-shadow: rgba(0, 0, 0, .5);--color-header-global-warning-top-menu-webkit-box-shadow: rgba(0, 0, 0, .25);--color-header-global-warning-top-menu-moz-box-shadow: rgba(0, 0, 0, .25);--color-header-global-warning-top-menu-box-shadow: rgba(0, 0, 0, .25);--color-table-loader-fountain-background: #FFF;--color-object-props-table-value-textfield-background: #FFF;--color-object-props-subheader-background: #FFF;--color-progress-bar: #FFF;--color-status-bar: #FFF;--color-browser-warning-info-background: #FFF;--color-modal-dialog-content-background: #FFF;--color-modal-dialog-content-button-border: #D1000D;--color-card-box-shadow-title: #FFF;--color-card-box-shadow-subheading: #FFF;--color-card-box-shadow-row: #FFF;--color-card-box-shadow-message: #FFF;--color-card-box-shadow-advanced: #FFF;--color-card-box-shadow-anchor: #FFF;--color-sg-checkbox-span: #FFF;--color-new-overlay-finished-background: #00A01D;--color-table-transparent: #46494D;--color-spinner-wheel-border: #EF001C;--color-modelviewer-open-file-footer: #46494D;--color-file-view-canvas-background: #84888C;--color-table-scrollable-background: #ECEFF1;--color-table-header-row-cell-background: #FFF;--color-project-team-selector-thumbnail-fade-background: #46494D;--color-alert-danger-simple: #F00;--color-renderer-viewport-background: #B8BBBF;--color-breadcrumbs-dropdown-hover-background: #ECEFF1;--color-notify-modal-server-warning-background: #46494D;--color-notify-modal-checkbox-span-border: #46494D;--color-notify-modal-checkbox-span: #FFF;--color-notify-modal-input-checked-border: #025499;--color-dashboard-tile-bottom-bar-background-hover: #ECEFF1;--color-dashboard-tile-top-bar-background: #84888C;--color-filter-panel-actions-border: #E1E5E8;--color-folder-access-rights-list-member-groups: #676869;--color-folder-access-rights-member-rights-background: #E1E5E8;--color-generic-view-tiles-content-background: #FFF;--color-generic-view-tiles-search-background: #E1E5E8;--color-generic-view-tiles-search-border: #E1E5E8;--color-dropdown-content-border: #84888C;--color-dropdown-item-border: #D3D7DB;--color-dropdown-item: #FFF;--color-dropdown-item-icon-flag-border: #46494D;--color-dropdown-item-title-disabled: #84888C;--color-objects-container-properties-content-background: #46494D;--color-password-show-icon-active: #000;--color-portal-modal-btn-default-border: #84888C;--color-portal-modal-select-background: #FFF;--color-project-members-table-content-background: #FFF;--color-project-table-toolbar: #84888C;--color-project-table-body-background-hovered: #B4DAFF;--color-project-table-body-selected-background-hovered: #B4DAFF;--color-project-view-map-content-background: #FFF;--color-project-view-map-content-toolbar: #000;--color-objects-container-center-panel-loading-overlay-background: rgba(0, 0, 0, .5);--color-content-sidebar-background: #FFF;--color-custom-filter-attribute-name: #84888C;--color-custom-filter-selected-attributes-empty: #B8BBBF;--custom-filter-attributes-picker-border-color: #E1E5E8;--color-tab-icon-gray-background: #D3D7DB;--color-tab-icon-white-background: #FFF;--color-tabs-panel-content-background: #F7F7F7;--color-tabs-panel-content-span: #46494D;--color-tabs-panel-control-background: #F7F7F7;--color-tabs-panel-collapsed-background: #F7F7F7;--color-tabs-panel-collapsed-navigation-background: #46494D;--color-tabs-panel-navigation-border: #46494D;--color-tabs-panel-navigation-background: #F7F7F7;--color-tabs-panel-grouping-icon-backround: #F7F7F7;--color-tab-content-background: #FFF;--color-tab-content-title-border: #46494D;--color-tab-content-button: #46494D;--color-tab-content-button-background: #FFF;--color-tab-content-cell-infoicon-background: #FFF;--color-tasks-overview-dot-open-background: #D1000D;--color-tasks-overview-dot-open65-background: rgba(209, 0, 13, .65);--color-tasks-overview-dot-open5-background: rgba(209, 0, 13, .5);--color-tasks-overview-dot-open-custom-background: #FFC7CD;--color-tasks-overview-dot-background-disabled: #D3D7DB;--color-tasks-overview-dot-solved-background: #00A01D;--color-tasks-overview-dot-solved65-background: rgba(0, 160, 29, .65);--color-tasks-overview-dot-solved55-background: rgba(0, 160, 29, .55);--color-tasks-overview-dot-solved-custom-background: #A7EFA4;--color-tasks-overview-dot-closed-background: #025499;--color-tasks-overview-dot-background-undefined: #84888C;--color-upload-image: #FFF;--color-upload-image-background: #0385CF;--color-upload-image-text-shadow: #0374BB;--color-upload-image-border: #025499;--color-dashboard-application-buttons-days-left: #06C;--color-dashboard-info-box-background: #ECEFF1;--color-dashboard-detail-box-subtitle: #06C;--color-dashboard-documentation-title-underline: #ECEFF1;--color-dashboard-message-item-background: #FFF;--color-dashboard-message-title: #46494D;--color-dashboard-message-content: #FFF;--color-dashboard-message-messagelink: #FFF;--color-dashboard-message-messagelink-hover-focus: #FFF;--color-link-inline: #06C;--color-darkmode-leaflet-container-background: #ECEFF1;--color-dashboard-application-buttons-link-button: #06C;--color-dashboard-application-buttons-link-buttontext-decoration: #06C;--color-dashboard-application-container-multiarticle-body: #46494D;--color-dashboard-application-container-article-breadcrumbs: #46494D;--color-dashboard-application-container-nobullets: #ECEFF1;--color-dashboard-application-container-promo-msg: #06C;--color-dashboard-cover-bottom-background-linear-gradient-one: rgba(236, 239, 241, 0);--color-dashboard-cover-bottom-background-linear-gradient-two: #ECEFF1;--color-dashboard-textpanel-subtitle: #84888C;--color-files-modal-with-separator-border: #84888C;--color-footer-border: #84888C;--color-footer-body-background: #FFF;--color-footer-list-item: #000;--color-portal-project-tab-toolbar-btn-default: #84888C;--color-portal-project-tab-toolbar-btn-group: #84888C;--color-table-portal-toolbar: #84888C;--color-table-portal-table-footer-btn-group-button: #84888C;--color-table-portal-table-footer-btn-group: #D3D7DB;--color-project-settings-title-main: #46494D;--color-project-settings-property-message: #46494D;--color-project-settings-property-input-border: #D3D7DB;--color-project-settings-property-input-background: #FFF;--color-project-settings-property-datepicker-container-border-hover: #84888C;--color-shareddocuments-modal-file-list-row-odd-color: #46494D;--color-shareddocuments-modal-file-list-row-even-color: #FFF;--color-tabs-pd-project-btn-border: #84888C;--tabs-pd-project-btn-group-color: #84888C;--color-tabs-pd-project-btn-group-border: #84888C;--color-pd-project-tabs-li-background: #84888C;--color-pd-project-tabs-li-a-background: #ECEFF1;--color-upload-dlg-vertical-line-separator-background: #84888C;--color-touch-upload-dlg-has-error-border: #D1000D;--color-progress-circle-span: #004AA4;--color-value-bar-border: #004AA4;--color-progress-circle-over50-first50-bar-background: #004AA4;--color-upload-dlg-loader-background: #004AA4;--color-upload-dlg-loader-second-background: #FFF;--color-portal-properties-table-combo-color-disabled: #B8BBBF;--color-portal-properties-table-combo-border-color-disabled: #B8BBBF;--color-portal-properties-content-background: #FFF;--color-portal-content-buttons-background: #ECEFF1;--color-portal-properties-string-select-color-disabled: #ECEFF1;--color-upload-dlg-upload-model-name-border: #84888C;--color-upload-color-dlg-upload-model-name-background: #FFF;--color-upload-dlg-transparent-background: #000;--color-user-expiration-background: #FFF;--color-user-expiration-header-background: #06C;--color-user-expiration-body: #000;--color-four-oh-four-message: #FFF;--color-four-oh-four-background: #0297E3;--color-card-border: #D3D7DB;--color-login-description-text: #000;--color-card: #46494D;--color-form-group: #84888C;--color-form-group-two: #46494D;--color-ember-power: #46494D;--color-ember-power-two: #D3D7DB;--color-form-control-background: #FFF;--color-form-control-border-two: #D3D7DB;--color-project-view-table-content-background: #FFF;--color-project-view-table-tbody-recycle-bin: #84888C;--color-email-text: #84888C;--color-primary-button-text-two: #FFF;--color-background-button-primary-two-disabled: #B8BBBF;--color-download-attachment-a-border-bottom: #46494D;--color-pm-tabs: #ECEFF1;--color-pm-content-background: #FFF;--color-pm-content-background-two: #84888C;--color-pm-content-border: #D3D7DB;--color-pm-content-border-two: #000;--color-project-image: #46494D;--color-project-image-border: #46494D;--color-select-background: #46494D;--color-select-border: #B8BBBF;--color-select: #FFF;--color-select-two: #84888C;--color-termofuse: #000;--color-termofuse-background: #FFF;--color-termofuse-border: #B8BBBF;--color-user-background: #FFF;--color-workflow-border: #B8BBBF;--color-workflow-border-two: #F7F7F7;--color-workflow-border-three: #46494D;--color-workflow: #46494D;--color-workflow-two: #FFF;--color-workflow-background: #FFF;--color-workflow-background-two: #F7F7F7;--color-workflow-background-three: #F0F8FF;--color-workflow-background-four: #B8BBBF;--color-workflow-disabled: #B8BBBF;--color-workflow-background-five: #00B528;--color-workflow-background-six: #FE0019;--color-table-pagination: #06C;--color-table-tables-container: #84888C;--color-table-tables-container-two: #46494D;--color-table-tables-container-three: #ECEFF1;--color-pagination-wrapper: #46494D;--color-table-embedded: #000;--color-table-embedded-background: #FFF;--color-table-loader-background: #000;--color-search-bar-border: #84888C;--color-search-bar-background-hovered: #F7F7F7;--color-search-bar-color-hovered: #46494D;--color-search-bar-button-background: #FFF;--color-search-bar-button-glyphicon: #84888C;--color-search-bar-button-glyphicon-focused: #46494D;--color-uni-search-bar-border: #84888C;--color-uni-search-bar-background: #FFF;--color-uni-search-bar-background-hovered: #F7F7F7;--color-uni-search-bar-color-hovered: #46494D;--color-uni-search-bar-input-background-hovered: #F7F7F7;--color-uni-search-bar-glyphicon-hovered: #84888C;--color-uni-search-bar-clear-icon-background-hovered: #F7F7F7;--color-uni-search-bar-background-focused: #FFF;--color-uni-search-bar-color-focused: #46494D;--color-uni-search-bar-border-focused: #06C;--color-uni-search-bar-input-background-focused: #FFF;--color-uni-search-bar-glyphicon-focused: #46494D;--color-uni-search-bar-typing: #46494D;--color-select-grouping-button-sort-menu-opened-background: #ECEFF1;--color-select-grouping-list-background: #F7F7F7;--color-select-grouping-box-shadow: rgba(0, 0, 0, .5);--color-sizes-overview-separator-background: #B8BBBF;--color-sizes-overview-dot: #025499;--color-background-status-message: #000;--color-status-message-close-button: #FFF;--color-custom-filter-selected-attributes-sortable-background: rgba(132, 136, 140, .1);--color-clashdetection-empty-line-image-background: rgba(0, 0, 0, .5);--colors-neutral-grey-700-transparency1: rgba(70, 73, 77, .2);--color-project-team-selector-thumbnail-fade-background2: rgba(70, 73, 77, .2);--color-project-team-selector-thumbnail-fade-background8: rgba(70, 73, 77, .8);--color-left-menu-content-sidebar-topmenu-background: rgba(236, 239, 241, .8);--color-spinner-container-background: rgba(0, 0, 0, .3);--color-debug-background: rgba(0, 0, 0, 1);--color-jstree-selection-undetermined: rgba(0, 102, 204, .549);--color-portal-navbar-box-shadow: rgba(0, 0, 0, .26);--color-portal-navbar: #000;--color-tile-item-box-background: #FFF;--color-tile-item-box-share-background: #FFF;--color-tile-item-box-lock-background: #FFF;--color-tile-item-box-lock-name-background: #FFF;--color-tile-item-box-recycle-bin: #84888C;--color-tile-item-box-body-background: #B4DAFF;--color-toaster-box-shadow: rgba(0, 0, 0, .5);--color-background-toaster-message: #FFF;--color-background-toaster-message-info: #0385CF;--color-background-toaster-message-warning: #FFE9EC;--color-border-toaster-message-warning: #FFC7CD;--color-tree-control-background: #ECEFF1;--color-tree-control-border: #000;--color-tree-control-sortable-placeholder-background: #ECEFF1;--color-tree-control-container: #000;--color-tree-control-node-container-border: #ECEFF1;--color-tree-control-node-container-even-background: #F7F7F7;--color-tree-control-node-container-odd-background: #FFF;--color-tree-control-node-container-color-hovered: #004AA4;--color-tree-control-node-drag-over-background: #B2E4FC;--color-tree-control-node-drag-over-background-forbidden: #F89090;--color-tree-control-node-selected: #000;--color-tree-control-objecttype-node-background: #27B3F5;--color-tree-control-drop-after-background: #B2E4FC;--color-tree-control-drop-after-forbidden-background: #F89090;--color-ember-power-select-border: #D3D7DB;--color-ember-power-select-placeholder: #46494D;--color-ember-power-select-highlighted-background: #F7F7F7;--color-ember-power-select-highlighted: #46494D;--color-ember-power-select-selected-background: #FFF;--color-ember-power-select-trigger-icon: #46494D;--color-ember-power-background: #F7F7F7;--color-ember-power-two-background: #FFF;--color-ember-power-three-background: #ECEFF1;--color-ember-power-four-background: #F0F8FF;--color-ember-power-border: #D3D7DB;--color-ember-power-border-two: #84888C;--color-ember-power-border-three: #46494D;--color-forms: #46494D;--color-forms-box-shadow: #FFF;--color-forms-box-shadow-two: #F7F7F7;--color-forms-box-shadow-three: #B4DAFF;--color-form-border: #84888C;--color-app-background: #FFF;--color-app-border: #FFF;--color-app-box-shadow: #84888C;--color-app: #84888C;--color-app-background-two: #F7F7F7;--color-app-two: #46494D;--color-app-background-three: #ECEFF1;--color-app-three: #000;--color-app-four: #06C;--color-m-forms-background: #F7F7F7;--color-m-forms-border: #D3D7DB;--color-center-menu-circle-border-background: rgba(103, 104, 105, .5);--color-issues-data-grid-background: rgba(255, 255, 255, .5);--color-panel-background-opaque: rgba(255, 255, 255, 1);--color-main-background-transparent: rgba(255, 255, 255, 0);--color-main-background-transparent-90: rgba(255, 255, 255, .9);--color-panel-background: rgba(255, 255, 255, .8);--color-background-table-portal-toolbar: rgba(255, 255, 255, .8);--color-project-view-props-background: rgba(255, 255, 255, .7);--color-variantype-popupwin-content-background: rgba(255, 255, 255, .5);--color-popup-dialog-shadow: rgba(255, 255, 255, .5);--color-loader-background: rgba(255, 255, 255, 0);--color-browser-banner-background: rgba(255, 255, 255, .6);--color-center-menu-sub-menu-dead-zone-background: rgba(255, 255, 255, 0);--color-modal-overlay-background: rgba(255, 255, 255, .6);--color-four-oh-four-pill-background-btn: rgba(236, 239, 241, .9);--color-background-overlay: rgba(70, 73, 77, .301);--color-params-block-text-item-border-bottom: rgba(132, 136, 140, .5);--color-background-overlay-clear: rgba(70, 73, 77, .251);--color-center-menu-circle-background: rgba(70, 73, 77, .9);--color-section-cut-settings-background-disabled: rgba(255, 255, 255, .5);--color-section-cut-settings-dialog-background: #FFF;--color-floating-panel-block-item: rgba(0, 0, 0, 1);--color-modable-slider-transparent-background: rgba(132, 136, 140, .5);--color-scene-selector-background: rgba(236, 239, 241, .8);--color-spinner-border: rgba(0, 102, 204, 1);--color-params-block-text-item-active: rgba(0, 102, 204, .5);--color-clashdetection-filter-selection-head-background: rgba(255, 255, 255, .5);--color-issue-details-input-name-background-disabled: rgba(0, 0, 0, 0);--color-window-resize-handler-arrow-background: rgba(255, 255, 255, .58);--color-structure-details-input-name-background-disabled: rgba(0, 0, 0, 0);--color-projectinfo-grid-header-background: rgba(236, 239, 241, .8);--color-projectinfo-grid-content-border: rgba(0, 0, 0, .1);--color-projectinfo-grid-content-resizer-fill-background: rgba(0, 0, 0, .1);--color-projectinfo-grid-content-groupheader-background: rgba(0, 0, 0, .05);--color-projectinfo-grid-content-group-title-background: rgba(0, 0, 0, .06);--color-projectinfo-grid-content-data-background: rgba(0, 0, 0, .06);--color-drop-shadow-default-background: rgba(0, 0, 0, .15);--color-neutral-white-transparency0: rgba(255, 255, 255, 0);--color-neutral-white-transparency50: rgba(255, 255, 255, .5);--color-neutral-white-transparency70: rgba(255, 255, 255, .7);--color-neutral-white-transparency80: rgba(255, 255, 255, .8);--color-neutral-white-transparency90: rgba(255, 255, 255, .9);--color-neutral-black-transparency05: rgba(0, 0, 0, .05);--color-neutral-black-transparency15: rgba(0, 0, 0, .15);--color-neutral-black-transparency20: rgba(0, 0, 0, .2);--color-neutral-black-transparency25: rgba(0, 0, 0, .25);--color-neutral-black-transparency30: rgba(0, 0, 0, .3);--color-neutral-black-transparency40: rgba(0, 0, 0, .4);--color-neutral-black-transparency50: rgba(0, 0, 0, .5);--color-neutral-black-transparency90: rgba(0, 0, 0, .9);--colors-neutral-grey-50-transparency50: rgba(247, 247, 247, .5);--colors-neutral-grey-50-transparency60: rgba(247, 247, 247, .6);--colors-neutral-grey-50-transparency80: rgba(247, 247, 247, .8);--color-objects-container-upload-image-cover-gradient5: rgba(247, 247, 247, .5);--color-sidemenu-navigation-projectinfo-thumbnail-background: rgba(0, 0, 0, .6);--color-objects-container-upload-image-cover-gradient8: rgba(247, 247, 247, .8);--color-neutral-black-transparency80: rgba(0, 0, 0, .8);--color-portal-modal-destination-border: rgba(0, 0, 0, .2);--color-dashboard-message-content-container: rgba(0, 0, 0, .5);--color-dashboard-info-box-hover-box-shadow: rgba(0, 0, 0, .3);--color-user-expiration-box-shadow: rgba(0, 0, 0, .4);--color-form-control-has-error: rgba(0, 0, 0, .075);--color-project-image-background: rgba(0, 0, 0, .05);--color-project-image-background-two: rgba(255, 255, 255, .9);--color-table-portal-box-shadow: rgba(0, 0, 0, .075);--color-typography-background-gradient-one-color: rgba(0, 0, 0, 0);--color-typography-background-gradient-two-color: rgba(0, 0, 0, .9);--color-modal-dialog-background-color-overlay: rgba(0, 0, 0, .3);--color-modal-dialog-upload-button-label: #D1000D;--color-main-box-shadow08: rgba(0, 0, 0, .08);--color-main-box-shadow30: rgba(0, 0, 0, .3);--color-main-box-shadow50: rgba(0, 0, 0, .5);--color-app-background-four: rgba(0, 0, 0, .2);--color-sidenav-drawer-content-header-background-color-enabled: rgba(247, 247, 247, .8);--color-project-info-upload-image-cover-gradient8: rgba(70, 73, 77, .8);--color-project-info-upload-image-cover-gradient5: rgba(70, 73, 77, .5);--color-neutral-grey-500-transparency06: rgba(132, 136, 140, .06)}.tab-element[_ngcontent-%COMP%]{width:4.2rem;cursor:pointer;border-radius:.1rem;display:flex;justify-content:center;align-items:center;flex-direction:column;padding-top:.6rem}.tab-element[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:1.8rem;height:1.8rem}.tab-element.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed}.underline-switcher[_ngcontent-%COMP%]{width:100%;height:.2rem;border-radius:.1rem;transition:all .15s ease-in;border-bottom:.2rem solid #E1E5E8}.underline-switcher.highlight[_ngcontent-%COMP%]{border-bottom-width:.2rem;border-bottom-style:solid;border-bottom-color:#06c!important}.underline-switcher.hovering[_ngcontent-%COMP%]{border-bottom-color:#b8bbbf}"]})}}return d})();var gUe=["*"],yUe=(d,o)=>o.id,MUe=(d,o)=>({active:d,default:o}),IUe=(d,o,r)=>({id:d,title:o,img:r});function wUe(d,o){if(d&1){let r=qs();cn(0,"lib-bimplus-tab",2),xi("activeTabChange",function(f){Pi(r);let M=on();return Bi(M.activeTabChange.emit(f))}),mn()}if(d&2){let r=o.$implicit,p=on();Nn("activeTab",p.activeTab)("imageBaseSrc",p.baseHref)("bimplusTabComponentModel",ry(7,IUe,r.id,r.title,dy(4,MUe,r.img.active,r.img.default))),Gl("data-test",r.id)}}var hte=(()=>{class d{constructor(r){this.bimplusTabsSwitcherService=r,this.activeTabChange=new pr,this.baseHref=Ja(fue,{optional:!0}),this.bimplusTabsSwitcherService?this.tabSwitcherElements=HX(this.bimplusTabsSwitcherService.tabSwitcherElements$):this.tabSwitcherElements=so(ute).asReadonly()}static{this.\u0275fac=function(p){return new(p||d)(vi(pF,12))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-tabs-switcher"]],inputs:{activeTab:"activeTab"},outputs:{activeTabChange:"activeTabChange"},standalone:!0,features:[Ml([pF]),as],ngContentSelectors:gUe,decls:4,vars:0,consts:[[1,"tabswitcher-container"],[3,"activeTab","imageBaseSrc","bimplusTabComponentModel"],[3,"activeTabChange","activeTab","imageBaseSrc","bimplusTabComponentModel"]],template:function(p,f){p&1&&(im(),cn(0,"div",0),Sp(1,wUe,1,11,"lib-bimplus-tab",1,yUe),sp(3),mn()),p&2&&(Zt(),zp(f.tabSwitcherElements()))},dependencies:[pte],styles:[`.tabswitcher-container{display:flex;align-items:center;justify-content:flex-start;width:100%;height:20px}
12849
12849
  `],encapsulation:3,changeDetection:0})}}return d})();var AUe=1e3,OUe={KB:"kB",GB:"gib",MB:"mb"},Lwe=(()=>{class d extends bJ{transform(r,p=OUe.KB,f="1.2-2",M=AUe){if(!this.isNumber(r))throw new Error("[BitConverterPipe]: value is not a number");let T=this.getSizeFromBites(r,p,M),U=super.transform(T,f);return U??=r.toString(),`(${U} ${p})`}getSizeFromBites(r,p,f){switch(p){case"kB":return r/f;case"mb":return r/(f*f);case"gib":return r/(f*f*f);default:return r}}isNumber(r){return typeof r=="number"&&!isNaN(r)}static{this.\u0275fac=(()=>{let r;return function(f){return(r||(r=s4(d)))(f||d)}})()}static{this.\u0275pipe=r4({name:"bitConverter",type:d,pure:!0,standalone:!0})}}return d})();var f7=new Fo("bimplus-attachments-config"),jQ=class{constructor(o){this.id=o.id??"",this.fileName=o.fileName??"",this.size=o.size??0}},GQ=class{static{this.attachment=new jQ({})}static create(o){return this.attachment=new jQ(o),this}static setId(o){return this.attachment.id=o,this}static setFileName(o){return this.attachment.fileName=o,this}static setSize(o){return this.attachment.size=o,this}static setFile(o){return this.attachment.file=o,this}static build(){let o=structuredClone(this.attachment);return this.attachment=new jQ({}),o}};var _Ue=["attachmentSizeRef"],TUe=["attachmentNameRef"];function EUe(d,o){if(d&1&&(cn(0,"span",4),Wr(1),ca(2,"bitConverter"),mn()),d&2){let r=on();Zt(),v0(Z1e(2,1,r.attachment.size,"kB","1.2-2"))}}function CUe(d,o){if(d&1&&(cn(0,"span"),Wr(1),mn(),cn(2,"div",4,1),Wr(4),ca(5,"bitConverter"),mn()),d&2){let r=on();Zt(),Sa("",r.type," "),Zt(3),Sa(" ",Z1e(5,2,r.attachment.size,"kB","1.2-2")," ")}}function DUe(d,o){if(d&1){let r=qs();cn(0,"span",6),ca(1,"translate"),xi("click",function(){Pi(r);let f=on();return Bi(f.deleteAttachment.emit(f.attachment))})("keypress",function(f){return Pi(r),Bi(f.preventDefault())}),cn(2,"span",7),Wr(3,"\u2715\uFE0E"),mn()()}d&2&&Bo("title",ha(1,1,"_Delete attachment"))}var xwe=30,SUe=28,Rwe=(()=>{class d{constructor(){this.deleteAttachment=new pr,this.getAttachment=new pr,this.parentWidthSignal=so(void 0),this.attachmentSizeWidth=so(0),this.nameIsFullyVisible=so(!1),this.config=Ja(f7,{optional:!0}),this.hideSize=!!this.config?.hideAttachmentSize,this.nameInfoLineWidth=RM(()=>{let r=this.parentWidthSignal(),p=this.attachmentSizeWidth(),f=this.nameIsFullyVisible();return r?f?r-xwe:r-p-(xwe+SUe):0})}set parentWidth(r){r&&this.parentWidthSignal.set(r)}get type(){return`.${this.attachment.fileName.split(".").at(-1)}`}ngAfterViewInit(){this.attachmentSizeRef&&(this.attachmentSizeWidth.set(+this.attachmentSizeRef.nativeElement.clientWidth),this.createIntersectionObserver(),this.intersectionObserver.observe(this.attachmentNameRef.nativeElement))}ngOnDestroy(){this.intersectionObserver?.unobserve(this.attachmentNameRef.nativeElement)}createIntersectionObserver(){let r={root:null,rootMargin:"0px",threshold:1},p=f=>f.forEach(({intersectionRect:M,boundingClientRect:T})=>{let U=M.width===T.width;this.nameIsFullyVisible.set(U)});this.intersectionObserver=new IntersectionObserver(p,r)}static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-attachment-item"]],viewQuery:function(p,f){if(p&1&&(y1(_Ue,5),y1(TUe,5)),p&2){let M;N0(M=P0())&&(f.attachmentSizeRef=M.first),N0(M=P0())&&(f.attachmentNameRef=M.first)}},inputs:{closeIconTemplate:"closeIconTemplate",attachment:"attachment",parentWidth:"parentWidth"},outputs:{deleteAttachment:"deleteAttachment",getAttachment:"getAttachment"},standalone:!0,features:[as],decls:8,vars:7,consts:[["attachmentNameRef",""],["attachmentSizeRef",""],[1,"bim-attachment-item"],["data-test","bim-attachment",1,"bim-attachment-name",3,"click","keypress","title"],[1,"bim-attachment-size"],["data-test","delete-attachment-btn",1,"bim-attachment-delete-button",3,"title"],["data-test","delete-attachment-btn",1,"bim-attachment-delete-button",3,"click","keypress","title"],[1,"icon"]],template:function(p,f){if(p&1){let M=qs();cn(0,"div",2)(1,"div",3),xi("click",function(){return Pi(M),Bi(f.getAttachment.emit(f.attachment))})("keypress",function(U){return Pi(M),Bi(U.preventDefault())}),cn(2,"span",null,0),Wr(4),mn(),gr(5,EUe,3,5,"span",4),mn(),gr(6,CUe,6,6)(7,DUe,4,3,"span",5),mn()}p&2&&(Zt(),B2("width",f.nameInfoLineWidth(),"px"),Bo("title",f.attachment.fileName),Zt(3),v0(f.attachment.fileName),Zt(),fs(f.nameIsFullyVisible()&&!f.hideSize?5:-1),Zt(),fs(!f.nameIsFullyVisible()&&!f.hideSize?6:-1),Zt(),fs(f.config!=null&&f.config.hideDeleteAttachmentButton?-1:7))},dependencies:[Lwe,Ko,xc],styles:['.bim-attachment-item[_ngcontent-%COMP%]{border-bottom:var(--bim-attachment-item-border-bottom, .1rem solid var(--bim-attachment-item-border-bottom-color, #B8BBBF));line-height:2.5rem;display:flex;align-items:center;justify-content:space-between;color:#46494d;padding-left:var(--bim-attachment-item-padding-left, 2.6rem);background-image:var(--bim-attachment-item-background-image, url("./assets/icn_grid_attachments.png"));background-size:var(--bim-attachment-item-background-size, auto);background-repeat:no-repeat;background-position:var(--bim-attachment-item-background-position, .8rem center)}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-name[_ngcontent-%COMP%]{padding-left:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-size[_ngcontent-%COMP%]{padding-left:.5rem;white-space:nowrap;margin-right:.4rem}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-delete-button[_ngcontent-%COMP%]{width:2.5rem;cursor:pointer;margin-left:auto}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-delete-button[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-weight:var(--bim-attachment-delete-button-icon-font-weight, normal);color:var(--bim-attachment-delete-button-icon-color, #B8BBBF)}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-delete-button[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:hover{color:#46494d}']})}}return d})();var zUe=["attachmentListRef"],LUe=["fileInput"],Nwe=(d,o)=>o.id;function xUe(d,o){if(d&1){let r=qs();cn(0,"input",7,0),xi("change",function(f){Pi(r);let M=Ef(1),T=on();return Bi(T.onFileChanged(f,M))}),mn()}}function RUe(d,o){if(d&1){let r=qs();cn(0,"lib-bimplus-buttons-row",8),xi("fileChanged",function(f){Pi(r);let M=on();return Bi(M.onFileChanged(f))}),mn()}if(d&2){let r,p=on();Nn("items",(r=p.config==null?null:p.config.buttons)!==null&&r!==void 0?r:p.buttons)("isMultiple",!0)}}function NUe(d,o){d&1&&(cn(0,"div",9),Wr(1),ca(2,"translate"),mn()),d&2&&(Zt(),v0(ha(2,1,"_No attachments found")))}function PUe(d,o){if(d&1&&gr(0,NUe,3,3,"div",9),d&2){let r=on(2);fs(r.config!=null&&r.config.showNoAttachmentsFound?0:-1)}}function BUe(d,o){if(d&1){let r=qs();cn(0,"lib-bimplus-attachment-item",11),xi("deleteAttachment",function(f){Pi(r);let M=on(3);return Bi(M.deleteAttachment.emit(f))})("getAttachment",function(f){Pi(r);let M=on(3);return Bi(M.getAttachment.emit(f))}),mn()}if(d&2){let r=o.$implicit,p=on(3);Nn("closeIconTemplate",p.closeIconTemplate)("parentWidth",p.attachmentListWidth())("attachment",r),Gl("data-test",r.id)}}function HUe(d,o){if(d&1&&Sp(0,BUe,1,4,"lib-bimplus-attachment-item",10,Nwe),d&2){let r=on(2);zp(r.attachments)}}function kUe(d,o){if(d&1&&(cn(0,"section",5,1),gr(2,PUe,1,1)(3,HUe,2,0),mn()),d&2){let r=on();Zt(2),fs(r.attachments.length?3:2)}}function FUe(d,o){d&1&&(cn(0,"div",9),Wr(1),ca(2,"translate"),mn()),d&2&&(Zt(),v0(ha(2,1,"_No attachments found")))}function qUe(d,o){if(d&1&&gr(0,FUe,3,3,"div",9),d&2){let r=on(2);fs(r.config!=null&&r.config.showNoAttachmentsFound?0:-1)}}function WUe(d,o){if(d&1){let r=qs();cn(0,"lib-bimplus-attachment-item",11),xi("deleteAttachment",function(f){Pi(r);let M=on(3);return Bi(M.deleteAttachment.emit(f))})("getAttachment",function(f){Pi(r);let M=on(3);return Bi(M.getAttachment.emit(f))}),mn()}if(d&2){let r=o.$implicit,p=on(3);Nn("closeIconTemplate",p.closeIconTemplate)("parentWidth",p.attachmentListWidth())("attachment",r),Gl("data-test",r.id)}}function UUe(d,o){if(d&1&&Sp(0,WUe,1,4,"lib-bimplus-attachment-item",10,Nwe),d&2){let r=on(2);zp(r.attachments)}}function jUe(d,o){if(d&1&&(cn(0,"div",6)(1,"lib-bimplus-scrollable-container")(2,"section",5,1),gr(4,qUe,1,1)(5,UUe,2,0),mn()()()),d&2){let r=on();Zt(4),fs(r.attachments.length?5:4)}}var fte=(()=>{class d extends Rc{constructor(){super(...arguments),this.api=null,this.attachments=[],this.listOnly=!1,this.deleteAttachment=new pr,this.addAttachment=new pr,this.getAttachment=new pr,this.config=Ja(f7,{optional:!0}),this.buttons=[{id:"add-attachment",title:this.translateService.instant("_Add attachment"),tooltip:this.translateService.instant("_Add attachment"),disabled:!1,buttonStyle:"primary",type:"file"}],this.attachmentListWidth=so(void 0)}open(){this.fileInput.nativeElement.click()}ngAfterViewInit(){this.createResizeObserver(),this.resizeObserver.observe(this.attachmentListRef.nativeElement)}ngOnDestroy(){this.resizeObserver.unobserve(this.attachmentListRef.nativeElement)}onFileChanged(r,p){let f=[];if(r instanceof FileList)f=Array.from(r);else if(r instanceof Event){let M=r.target;M?.files&&(f=Array.from(M.files))}for(let M of f)M instanceof File&&this.addAttachment.emit(M);p&&(p.value="")}createResizeObserver(){this.resizeObserver=new ResizeObserver(r=>{let{width:p}=r[0].contentRect;this.attachmentListWidth.set(p)})}static{this.\u0275fac=(()=>{let r;return function(f){return(r||(r=s4(d)))(f||d)}})()}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-attachments"]],viewQuery:function(p,f){if(p&1&&(y1(zUe,5),y1(LUe,5)),p&2){let M;N0(M=P0())&&(f.attachmentListRef=M.first),N0(M=P0())&&(f.fileInput=M.first)}},inputs:{api:"api",attachments:"attachments",closeIconTemplate:"closeIconTemplate",listOnly:[2,"listOnly","listOnly",Vr]},outputs:{deleteAttachment:"deleteAttachment",addAttachment:"addAttachment",getAttachment:"getAttachment"},standalone:!0,features:[oc,ll,as],decls:5,vars:2,consts:[["fileInput",""],["attachmentListRef",""],[1,"bim-attachments"],["hidden","","type","file","multiple",""],[3,"items","isMultiple"],[1,"bim-attachments-list"],[1,"scrollable-content-container"],["hidden","","type","file","multiple","",3,"change"],[3,"fileChanged","items","isMultiple"],["data-test","no-attachments",1,"bim-attachments-list-empty"],[3,"closeIconTemplate","parentWidth","attachment"],[3,"deleteAttachment","getAttachment","closeIconTemplate","parentWidth","attachment"]],template:function(p,f){p&1&&(cn(0,"div",2),gr(1,xUe,2,0,"input",3)(2,RUe,1,2,"lib-bimplus-buttons-row",4)(3,kUe,4,1,"section",5)(4,jUe,6,1,"div",6),mn()),p&2&&(Zt(),fs(f.listOnly?1:2),Zt(2),fs(f.listOnly?3:4))},dependencies:[Ko,xc,o4,Rwe,l4],styles:[`lib-bimplus-buttons-row{--button-row-margin-top: 0;--button-row-margin-right: 0;--button-row-margin-bottom: 1.4rem;--button-row-margin-left: 0}lib-bimplus-scrollable-container{--scrollable-container-paddin-right: 0}.bim-attachments{display:flex;flex:1;flex-direction:column}.bim-attachments .scrollable-content-container{position:relative;flex:1}.bim-attachments .scrollable-content-container lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;width:100%}.bim-attachments-list{color:#84888c;cursor:pointer}.bim-attachments-list-empty{padding:2.5rem .5rem;color:var(--details-controls-details-not-found-text-color);text-align:center}
12850
12850
  `],encapsulation:3,changeDetection:0})}}return d})();var hF=(()=>{class d{getAttachment(r){let p;return r instanceof File?p=GQ.setFile(r).setFileName(r.name).build():p=GQ.create(r).build(),p}download(r,p){let f=document.createElement("a");f.rel="noopener noreferrer",f.target="_blank",f.href=r,f.download=p,f.click()}static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275prov=za({token:d,factory:d.\u0275fac,providedIn:"root"})}}return d})();var Pwe="delete",VUe="cancel",mte=(()=>{class d{get title(){return this._title}set title(r){this._title=r}get message(){return this._message}set message(r){this._message=r}constructor(r,p){this.dialogService=r,this.translateService=p,this._title="",this._message="",this.buttons=[{id:Pwe,title:this.translateService.instant("_Delete"),tooltip:this.translateService.instant("_Delete"),disabled:!1,buttonStyle:"primary"},{id:VUe,title:this.translateService.instant("_Cancel"),tooltip:this.translateService.instant("_Cancel"),disabled:!1,buttonStyle:"secondary"}],this.data=this.dialogService.inputData,this.data&&(this._title=this.data.title||"",this._message=this.data.message||"",this.acceptCallback=this.data.acceptCallback)}close(){this.dialogService.close()}keypressClose(r){(r.key==="Escape"||r.key==="Esc")&&this.dialogService.close()}buttonRowButtonClicked(r){this.dialogService.close(),r.id===Pwe&&this.acceptCallback?.()}handleKeydown(r){(r.key==="Escape"||r.key==="Esc")&&this.close()}static{this.\u0275fac=function(p){return new(p||d)(vi(hT),vi(ja))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-overlay-dialog-delete"]],hostBindings:function(p,f){p&1&&xi("keydown",function(T){return f.handleKeydown(T)},!1,$I)},inputs:{title:"title",message:"message"},standalone:!0,features:[as],decls:10,vars:3,consts:[[1,"overlay-dialog-container"],[1,"overlay-dialog-container_title"],[1,"overlay-dialog-container_title_icon"],[1,"overlay-dialog-container_title_msg"],[1,"overlay-dialog-container_title_close",3,"click","keypress"],[1,"overlay-dialog-container_content"],[1,"overlay-dialog-container_content_msg",3,"innerHTML"],[1,"buttons"],[3,"buttonClicked","items"]],template:function(p,f){p&1&&(cn(0,"div",0)(1,"div",1),Zr(2,"div",2),cn(3,"div",3),Wr(4),mn(),cn(5,"div",4),xi("click",function(){return f.close()})("keypress",function(T){return f.keypressClose(T)}),mn()(),cn(6,"div",5),Zr(7,"div",6),cn(8,"div",7)(9,"lib-bimplus-buttons-row",8),xi("buttonClicked",function(T){return f.buttonRowButtonClicked(T)}),mn()()()()),p&2&&(Zt(4),Sa(" ",f.title," "),Zt(3),Nn("innerHTML",f.message,SC),Zt(2),Nn("items",f.buttons))},dependencies:[Ko,o4],styles:[`.overlay-dialog-container{display:inline-flex;flex-direction:column;box-shadow:0 .4rem .8rem 0 var(--card-box-shadow-color),0 .6rem 2rem 0 var(--card-box-shadow-color);min-width:45rem;max-width:60rem;width:100vw}.overlay-dialog-container .overlay-dialog-container_title{background-color:var(--color-help-popup-title-background);display:inline-flex;align-items:center;height:3.2rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_icon{width:1.8rem;height:1.8rem;background:url("./assets/bimplus_Components_Overlay_Dialog_Warning_Title.svg") no-repeat center center;padding:0 1.6rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_msg{color:var(--main-menu-text-default);font:700 1.3832rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;text-transform:capitalize;margin-bottom:.2rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_close{width:1.8rem;height:1.8rem;background:url("./assets/bimplus_Components_Overlay_Dialog_Cross_White.svg") no-repeat center center;cursor:default;margin:0 0 0 auto;padding-right:1.6rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_close:hover{cursor:pointer}.overlay-dialog-container .content .warning-title{line-height:2.4rem}.overlay-dialog-container .content .warning-message{line-height:1.6rem}.overlay-dialog-container .overlay-dialog-container_content{background-color:var(--main-menu-text-default);flex-grow:1}.overlay-dialog-container .overlay-dialog-container_content .overlay-dialog-container_content_msg{color:var(--color-help-popup-title-background);font:400 1.28rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;padding-top:.8rem;padding-left:1.6rem}.overlay-dialog-container .buttons{padding:1.6rem}
12851
12851
  `],encapsulation:3})}}return d})();var Bwe=(()=>{class d{set autoResizeMinRows(r){this._autoResizeMinRows=r>0?r:1,this.currentRows=this.currentRows<r?r:this.currentRows,this.input.rows=r}get autoResizeMinRows(){return this._autoResizeMinRows}set autoResizeMaxRows(r){this._autoResizeMaxRows=r<1?1:r}get autoResizeMaxRows(){return this._autoResizeMaxRows}set libAutoResizeTextarea(r){this._libAutoResizeTextarea=r}get libAutoResizeTextarea(){return this._libAutoResizeTextarea}constructor(r){this.el=r,this._libAutoResizeTextarea=!1,this._autoResizeMinRows=1,this._autoResizeMaxRows=1,this.currentRows=1,this.offsetHeight=0,this.avgLineHeight=0,this.input=this.el.nativeElement}onInput(){this.libAutoResizeTextarea&&(this.calculateLineHeight(),this.updateRows())}calculateLineHeight(){let r=window.getComputedStyle(this.input,null),p=r.getPropertyValue("line-height"),f=0;p==="normal"?f=(parseFloat(r.getPropertyValue("font-size"))||16)*1.14:f=parseFloat(p),this.avgLineHeight=Math.trunc(f)}updateRows(){this.offsetHeight<=0&&(this.offsetHeight=this.input.scrollHeight),this.input.rows=this._autoResizeMinRows;let r=Math.floor((this.input.scrollHeight-this.offsetHeight)/this.avgLineHeight),p=this._autoResizeMinRows+r;this.input.rows=p>this._autoResizeMaxRows?this._autoResizeMaxRows:p}static{this.\u0275fac=function(p){return new(p||d)(vi(Zo))}}static{this.\u0275dir=jl({type:d,selectors:[["","libAutoResizeTextarea",""]],hostBindings:function(p,f){p&1&&xi("input",function(){return f.onInput()})},inputs:{autoResizeMinRows:"autoResizeMinRows",autoResizeMaxRows:"autoResizeMaxRows",libAutoResizeTextarea:"libAutoResizeTextarea"},standalone:!0})}}return d})();function YUe(d,o){if(d&1){let r=qs();cn(0,"textarea",2),ca(1,"translate"),xi("keydown",function(f){Pi(r);let M=on();return Bi(M.onKeydown(f))}),mn()}if(d&2){let r=on();Nn("formControl",r.textareaControl)("placeholder",ha(1,8,r.placeholder))("name",r.name)("readonly",r.readonly)("required",r.required)("libAutoResizeTextarea",r.activeAutoResizeTextarea)("autoResizeMinRows",r.minRows)("autoResizeMaxRows",r.maxRows)}}function XUe(d,o){if(d&1){let r=qs();cn(0,"textarea",3),xi("keydown",function(f){Pi(r);let M=on();return Bi(M.onKeydown(f))}),mn()}if(d&2){let r=on();Nn("formControl",r.textareaControl)("placeholder",r.placeholder)("name",r.name)("readonly",r.readonly)("required",r.required)("rows",r.rows)}}var bte=(()=>{class d{set name(r){this._name=r}get name(){return this._name}set placeholder(r){this._placeholder=r}get placeholder(){return this._placeholder}set readonly(r){this._readonly=r}get readonly(){return this._readonly}set required(r){this._required=r}get required(){return this._required}set minRows(r){this._minRows=r}get minRows(){return this._minRows}set maxRows(r){this._maxRows=r}get maxRows(){return this._maxRows}set activeAutoResizeTextarea(r){this._activeAutoResizeTextarea=r}get activeAutoResizeTextarea(){return this._activeAutoResizeTextarea}set clearValue(r){r?(this.textareaControl.reset(),this._clearValue=!1):this._clearValue=r}get clearValue(){return this._clearValue}set rows(r){this._rows=r}get rows(){return this._rows}constructor(){this.textareaControl=new eR,this.textAreaValueChange=new pr,this._name="",this._placeholder="",this._readonly=!1,this._required=!1,this._rows=1,this._activeAutoResizeTextarea=!1,this._minRows=1,this._maxRows=1,this._clearValue=!1}ngOnInit(){this._textareaSubscription=this.textareaControl.valueChanges.subscribe(r=>{this.textAreaValueChange.emit(r)})}getTextareaValue(){return this.textareaControl.value}onKeydown(r){return["<",">"].includes(r.key)?(r.preventDefault(),!1):!0}ngOnDestroy(){this._textareaSubscription?.unsubscribe()}static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-textarea"]],inputs:{name:"name",placeholder:"placeholder",readonly:"readonly",required:"required",minRows:"minRows",maxRows:"maxRows",activeAutoResizeTextarea:"activeAutoResizeTextarea",clearValue:"clearValue",rows:"rows"},outputs:{textAreaValueChange:"textAreaValueChange"},standalone:!0,features:[as],decls:2,vars:1,consts:[[3,"formControl","placeholder","name","readonly","required","libAutoResizeTextarea","autoResizeMinRows","autoResizeMaxRows"],[3,"formControl","placeholder","name","readonly","required","rows"],[3,"keydown","formControl","placeholder","name","readonly","required","libAutoResizeTextarea","autoResizeMinRows","autoResizeMaxRows"],[3,"keydown","formControl","placeholder","name","readonly","required","rows"]],template:function(p,f){p&1&&gr(0,YUe,2,10,"textarea",0)(1,XUe,1,6,"textarea",1),p&2&&fs(f.activeAutoResizeTextarea?0:1)},dependencies:[oA,tk,h5,Uue,Wue,Bwe,Ko,xc],styles:["textarea[_ngcontent-%COMP%]{font-size:1.28rem;font-family:Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;font-weight:400;padding:.4rem .4rem .4rem .3rem;border-radius:0;border:.1rem solid;border-color:var(--issue-details-view-select-border-color);background-color:var(--issue-details-view-select-background-color);resize:none;width:calc(100% - .8rem);margin-right:.8rem;box-sizing:border-box;white-space:normal;line-height:1.6rem}textarea[_ngcontent-%COMP%]:hover{background-color:var(--control-background-hover-color);border-radius:0;border:.1rem solid;border-color:var(--issue-details-view-select-border-color)}textarea[_ngcontent-%COMP%]:focus-visible{border-radius:0;border:.1rem solid;border-color:var(--issue-details-view-select-border-color);outline:none}textarea[_ngcontent-%COMP%]::placeholder{color:var(--dark-gray-color)}"]})}}return d})();function QUe(d,o){if(d&1&&(cn(0,"div",2)(1,"div",9),Wr(2),mn()()),d&2){let r=on(2);Zt(2),v0(r.isActUserAuthor?"":r.displayname)}}function ZUe(d,o){if(d&1){let r=qs();cn(0,"div",10),xi("click",function(){Pi(r);let f=on(2);return Bi(f.close())})("keydown",function(f){Pi(r);let M=on(2);return Bi(M.onKeyPress(f))}),mn()}}function KUe(d,o){if(d&1&&(cn(0,"div",4),Wr(1),mn()),d&2){let r=on(2);Zt(),v0(r.message)}}function JUe(d,o){if(d&1){let r=qs();cn(0,"lib-bimplus-attachments",11),xi("getAttachment",function(f){Pi(r);let M=on(2);return Bi(M.getAttachment.emit(f))}),mn()}if(d&2){let r=on(2);Nn("attachments",r.attachments)}}function $Ue(d,o){if(d&1&&(cn(0,"a",6),Zr(1,"div",12),ca(2,"translate"),cn(3,"div",13),Wr(4),mn()()),d&2){let r=o.$implicit;Bo("href",r.link,uT),Zt(),Bo("title",ha(2,4,"_Attachment_link")),Zt(2),Bo("title",r.name),Zt(),v0(r.name)}}function eje(d,o){if(d&1&&gr(0,$Ue,5,6,"a",7),d&2){let r=on(2);Nn("ngForOf",r.attachmentLinkItems)}}function tje(d,o){if(d&1&&(cn(0,"a",6),Zr(1,"div",14),ca(2,"translate"),cn(3,"div",13),Wr(4),mn()()),d&2){let r=o.$implicit;Bo("href",r.url,uT),Zt(),Bo("title",ha(2,4,"_Hyperlink")),Zt(2),Bo("title",r.url),Zt(),v0(r.name)}}function nje(d,o){if(d&1&&(cn(0,"div",8),Wr(1),mn()),d&2){let r=on(2);Zt(),Sa(" ",r.date," ")}}function ije(d,o){if(d&1&&(cn(0,"div",1),gr(1,QUe,3,1,"div",2)(2,ZUe,1,0,"div",3)(3,KUe,2,1,"div",4)(4,JUe,1,1,"lib-bimplus-attachments",5)(5,eje,1,1,"a",6)(6,tje,5,6,"a",7)(7,nje,2,1,"div",8),mn()),d&2){let r=on();LC(r.isActUserAuthor?"author":""),Zt(),fs(r.isActUserAuthor?-1:1),Zt(),fs(r.isActUserAuthor?2:-1),Zt(),fs(r.message!==void 0?3:-1),Zt(),fs(r.attachments.length?4:-1),Zt(),fs(r.attachmentLinkItems.length?5:-1),Zt(),Nn("ngForOf",r.hyperlinks),Zt(),fs(r.date&&r.date.length>0?7:-1)}}var rje={hideDeleteAttachmentButton:!0,hideAttachmentSize:!0},vte=(()=>{class d{constructor(){this.outputActionCommentEvent=new pr,this.getAttachment=new pr,this._message=void 0,this.api=null,this.attachmentLinkItems=[],this._date="",this._action="close",this._commentId="",this._isActUserAuthor=!0,this._displayname="",this.hyperlinks=[],this.attachments=[]}set message(r){this._message=r}get message(){return this._message}set date(r){let p=new Intl.DateTimeFormat(void 0,{timeStyle:"short"}).format(new Date(r));this._date=p}get date(){return this._date}set action(r){this._action=r}get action(){return this._action}set commentId(r){this._commentId=r}get commentId(){return this._commentId}set isActUserAuthor(r){this._isActUserAuthor=r}get isActUserAuthor(){return this._isActUserAuthor}set displayname(r){this._displayname=r}get displayname(){return this._displayname}emitAction(r){this.outputActionCommentEvent.emit(r)}close(){let r={action:this.action,data:{commentId:this.commentId}};this.emitAction(r)}onKeyPress(r){(r.key==="Escape"||r.key==="Esc")&&this.close()}formatTime(r){let p=window.navigator.language,f=new Date(r);return p.includes("en")?pJ(f,"hh:mm a",p):pJ(f,"hh:mm",p)}static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-comment"]],inputs:{api:"api",attachmentLinkItems:"attachmentLinkItems",message:"message",date:"date",action:"action",commentId:"commentId",isActUserAuthor:"isActUserAuthor",displayname:"displayname",hyperlinks:"hyperlinks",attachments:"attachments"},outputs:{outputActionCommentEvent:"outputActionCommentEvent",getAttachment:"getAttachment"},standalone:!0,features:[Ml([{provide:f7,useValue:rje}]),as],decls:1,vars:1,consts:[[1,"comment-item-container",3,"class"],[1,"comment-item-container"],[1,"comment-header"],[1,"comment-close"],[1,"comment-item-text"],["listOnly","",3,"attachments"],["target","_blank",1,"item-row",3,"href"],["class","item-row","target","_blank",3,"href",4,"ngFor","ngForOf"],[1,"comment-item-date"],[1,"comment-title"],[1,"comment-close",3,"click","keydown"],["listOnly","",3,"getAttachment","attachments"],[1,"attachment-link-icon",3,"title"],[1,"text",3,"title"],[1,"link-icon",3,"title"]],template:function(p,f){p&1&&gr(0,ije,8,9,"div",0),p&2&&fs(f.message!==void 0?0:-1)},dependencies:[rm,xc,fte],styles:[`.new-comment-attachment{display:flex;align-items:center;gap:.4rem}.new-comment-attachment .text{line-height:2.4rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.link-icon{background:url("./assets/Links_18_gray.svg") no-repeat center;width:1.8rem;height:1.8rem;cursor:pointer;display:flex}.attachment-link-icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center;width:1.8rem;height:1.8rem;cursor:pointer;display:flex}.item-row{display:flex;gap:.2rem;align-items:center;line-height:2.4rem}.comment-item-container{font:400 1.28rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;background-color:var(--comments-list-item-container-background-color);border-radius:.4rem;margin:1rem 8rem 1rem 1rem;padding:.8rem}.comment-item-container.author{background-color:var(--comments-item-comment-author-background-color);margin:1rem 1rem 1rem 8rem}.comment-item-container a{text-decoration:none!important;color:var(--ui-text-1-color)}.comment-item-container .comment-header{display:inline-flex;justify-content:space-between;align-items:center;width:100%}.comment-item-container .comment-header .comment-title{font-weight:700}.comment-item-container .comment-close{background:url("./assets/bimplus_WebIcons_Cross.svg") no-repeat center;background-size:2rem;height:2rem;width:2rem;border:none;cursor:unset;float:right}.comment-item-container .comment-close:hover{cursor:pointer}.comment-item-container .comment-item-text{margin:.8rem 0;word-break:break-all;color:var(--ui-text-1-color)}.comment-item-container .hyperlink .link-icon{background-size:1.8rem}.comment-item-container .comment-attachments-list{line-height:2.4rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;color:var(--ui-text-1-color)}.comment-item-container .comment-attachments-list .attachment-object-item{width:100%}.comment-item-container .comment-attachments-list .attachment-object-item .attachment-object-link{display:inline-flex;align-items:center}.comment-item-container .comment-attachments-list .attachment-icon,.comment-item-container .comment-attachments-list .links-icon,.comment-item-container .comment-attachments-list .attachmentLink-icon{width:1.5rem;height:1.5rem;margin:0 .2rem}.comment-item-container .comment-attachments-list .tab-attachments{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.comment-item-container .comment-attachments-list .tab-attachmentlinks{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.comment-item-container .comment-attachments-list .tab-hyperlinks{background:url("./assets/Links_18_gray.svg") no-repeat center}.comment-item-container .comment-attachments-list .icon:hover{cursor:pointer}.comment-item-container .comment-item-date{text-align:end;color:var(--comments-list-item-date-color)}lib-bimplus-attachments{--bim-attachment-item-border-bottom: none;--bim-attachment-item-background-position: 0 center;--bim-attachment-item-padding-left: 1.3rem;--bim-attachment-item-background-image: url("./assets/Attachment_18_gray.svg");--bim-attachment-item-background-size: 1.8rem}lib-links-to-documents{--bim-attachment-name-padding: 0;--bim-attachment-item-background-position: 0;--attachment-row-border-bottom: none;--bim-attachment-item-background-image: url("./assets/Attachmentlink_18_gray.svg");--bim-attachment-delete-button: #444;--attachment-row-margin: 0;--bim-attachment-item-background-size: 1.8rem;--bim-attachment-delete-button-font-weight: bold;--bim-attachmentlink-item-left-padding: 2.3rem}
12852
- `],encapsulation:3})}}return d})();var gte=(()=>{class d{constructor(r){this.decorators=r,this.bimplusAttachmentsService=Ja(hF)}deleteComment(r){return bd(this.api.comments.delete(r))}downloadAttachment(r){let{id:p,fileName:f}=r;if(!this.api)return;let M=this.api,T=`${M.getApiTeamUrl()}attachments/${p}/download?api-token=${M.getAccessToken()}&openInBrowser=true`;this.bimplusAttachmentsService.download(T,f)}postComments(r,p,f,M,T){return bd(this.api.objects.postComment(r,p)).pipe(IM(U=>{let{id:x}=U,H=M.map(ne=>{let Oe=new FormData;return Oe.append("file",ne.file),Oe.append("name",ne.fileName),Oe.append("size",ne.file.size.toString()),Oe.append("type",ne.file.type),Oe.append("objectId",x),Oe});return(H.length?Ez(H.map(ne=>bd(this.api.objects.postAttachment(x,ne,void 0,"")))):tp([])).pipe(Vu(()=>x))}),IM(U=>T.length?zfe(T,U,this.api).pipe(Vu(()=>U)):tp(U)),IM(U=>f.length?this.manageHyperLinks(U,f).pipe(Vu(()=>U)):tp(U)),QY(null),NZ(),xZ(U=>(console.error("Error in postComments:",U),tp(null))))}decorateComment(r){if(r.attachmentLinks&&r.attachmentLinks.length>0){let p=r.attachmentLinks.map(f=>this.decorators.decorateLink(this.api,f,[r.id]));r.attachmentLinks=p}}decorateComments(r){return r.forEach(p=>{this.decorateComment(p)}),r}loadComments(r){return bd(this.api.objects.getComments(r)).pipe(Vu(p=>{if(!p)throw new Error("Comments response is undefined");return this.decorateComments(p)}))}manageHyperLinks(r,p){let f=[];return p.forEach(M=>{if(!M)return;let T=JSON.stringify({name:M.name,objectId:M.objectId,url:M.url}),U=this.api?.objects.postHyperlink(r,T).catch(x=>{console.log(x)});f.push(U)}),bd(Promise.all(f))}static{this.\u0275fac=function(p){return new(p||d)(Gs(lte))}}static{this.\u0275prov=za({token:d,factory:d.\u0275fac})}}return d})();var yte=(()=>{class d{constructor(){this._statusBarData=new Du({title:"",statusBarVisible:!1})}get statusBarVisible(){return this._statusBarData.value.statusBarVisible}get title(){return this._statusBarData.value.title}get statusBarData(){return this._statusBarData.value}get statusBarDataSubscription(){return this._statusBarData}setStatusBarData(r){this._statusBarData.next(r)}static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275prov=za({token:d,factory:d.\u0275fac,providedIn:"root"})}}return d})();var aje=()=>["new-comment-attachments"],kwe=()=>[];function oje(d,o){if(d&1){let r=qs();cn(0,"div",22),Zr(1,"div",22),cn(2,"div",23),Wr(3),mn(),cn(4,"span",24),xi("click",function(){let f=Pi(r).$implicit,M=on(3);return Bi(M.removeNewCommentAttachment(f))})("keydown",function(f){let M=Pi(r).$implicit,T=on(3);return Bi(T.removeNewCommentAttachmentKeypress(f,M))}),mn()()}if(d&2){let r=o.$implicit;Nn("ngClass","new-comment-attachment "+r.type)("title",r.type==="Hyperlink"?r.url:r.name),Zt(),Nn("ngClass","icon-small "+r.type)("title",r.type==="Hyperlink"?r.url:r.name),Zt(2),Sa("",r.name," "),Zt(),Bo("title",r.deleteButtonTitle)}}function lje(d,o){if(d&1&&(cn(0,"div",7),gr(1,oje,5,6,"div",21),mn()),d&2){let r=on(2);Zt(),Nn("ngForOf",r.newCommentAttachments)}}function cje(d,o){if(d&1){let r=qs();cn(0,"form",8)(1,"div",25),Zr(2,"div",26),cn(3,"lib-bimplus-input-text-field",27),ca(4,"translate"),xi("enterKeyPressed",function(){Pi(r);let f=on(2);return Bi(f.onEnterKeyPressedInHyperlinkForm())}),mn()(),cn(5,"div",25),Zr(6,"div",28),cn(7,"lib-bimplus-input-text-field",29),ca(8,"translate"),xi("enterKeyPressed",function(){Pi(r);let f=on(2);return Bi(f.onEnterKeyPressedInHyperlinkForm())}),mn()(),cn(9,"lib-bimplus-buttons-row",17),xi("buttonClicked",function(f){Pi(r);let M=on(2);return Bi(M.hyperlinkButtonRowButtonClicked(f))}),mn()()}if(d&2){let r=on(2);Nn("formGroup",r.hyperlinkForm),Zt(3),Bo("placeholder",ha(4,4,"_Name")),Zt(4),Bo("placeholder",ha(8,6,"_URL")),Zt(2),Nn("items",r.hyperlinkButtonRowItems)}}function uje(d,o){d&1&&(cn(0,"div",20),Wr(1),ca(2,"translate"),mn()),d&2&&(Zt(),Sa(" ",ha(2,1,"_No comments found")," "))}function dje(d,o){if(d&1&&(cn(0,"div",31),Wr(1),mn()),d&2){let r=on().$implicit,p=on(3);Zt(),Sa(" ",p.formatDate(r.createdAt)," ")}}function pje(d,o){if(d&1){let r=qs();gr(0,dje,2,1,"div",31),cn(1,"lib-bimplus-comment",32),xi("outputActionCommentEvent",function(f){Pi(r);let M=on(3);return Bi(M.handleActionCommentEvent(f))})("getAttachment",function(f){Pi(r);let M=on(3);return Bi(M.onGetAttachment(f))}),mn()}if(d&2){let r,p,f=o.$implicit,M=on(3);fs(f.createdAt&&M.isSameDate(f.createdAt)?0:-1),Zt(),Nn("message",f.text)("api",M.api)("date",f.createdAt?f.createdAt:"")("commentId",f.id)("attachments",(r=f.attachments)!==null&&r!==void 0?r:XH(10,kwe))("attachmentLinkItems",(p=f.attachmentLinks)!==null&&p!==void 0?p:XH(11,kwe))("hyperlinks",f.hyperlinks)("isActUserAuthor",M.isActUserAuthor(f))("displayname",M.displayName(f))}}function hje(d,o){if(d&1&&(Sp(0,pje,2,12,"lib-bimplus-comment",30,wM),ca(2,"async")),d&2){let r=on(2);zp(ha(2,0,r.commentsList$))}}function fje(d,o){if(d&1){let r=qs();cn(0,"div",2)(1,"div",3)(2,"lib-bimplus-textarea",4),xi("textAreaValueChange",function(f){Pi(r);let M=on();return Bi(M.onTextareaValueChange(f))}),mn()(),cn(3,"lib-bimplus-attachments",5,0),xi("addAttachment",function(f){Pi(r);let M=on();return Bi(M.onAddAttachment(f))})("deleteAttachment",function(f){Pi(r);let M=on();return Bi(M.onDeleteAttachment(f))}),mn(),cn(5,"lib-links-to-documents",6,1),xi("attachmentsLinkChange",function(f){Pi(r);let M=on();return Bi(M.onAttachmentsLinkChange(f))}),mn(),gr(7,lje,2,1,"div",7)(8,cje,10,8,"form",8),cn(9,"div",9)(10,"div",10),Zr(11,"div",11),cn(12,"div",12),ca(13,"translate"),xi("click",function(){Pi(r);let f=Ef(4);return Bi(f.open())})("keydown",function(){Pi(r);let f=Ef(4);return Bi(f.open())}),mn(),cn(14,"div",13),ca(15,"translate"),xi("click",function(){Pi(r);let f=on();return Bi(f.addHyperlinkIconClicked())})("keydown",function(f){Pi(r);let M=on();return Bi(M.addHyperlinkIconKeypress(f))}),mn(),cn(16,"div",14),ca(17,"translate"),xi("click",function(){Pi(r);let f=Ef(6),M=on();return Bi(f.createAttachmentLink(M.api))})("keydown",function(){Pi(r);let f=Ef(6),M=on();return Bi(f.createAttachmentLink(M.api))}),mn(),Zr(18,"div",15),mn(),cn(19,"div",16)(20,"lib-bimplus-buttons-row",17),xi("buttonClicked",function(f){Pi(r);let M=on();return Bi(M.buttonRowButtonClicked(f))}),mn()()(),Zr(21,"div",18),cn(22,"div",19)(23,"lib-bimplus-scrollable-container"),gr(24,uje,3,3,"div",20),ca(25,"async"),gr(26,hje,3,2),mn()()()}if(d&2){let r,p=on();Zt(2),Nn("placeholder",p.placeholder)("name",p.name)("readonly",p.readonly)("activeAutoResizeTextarea",!0)("minRows",p.minRows)("maxRows",p.maxRows)("clearValue",p.clearTextareaValue()),Zt(),LC(XH(32,aje)),Nn("attachments",p.attachmentsState()),Zt(2),Nn("attachments",p.attachmentLinkItems)("api",p.api)("project",p.project)("canCreateAttachmentLink",!0)("canDeleteAttachmentLink",!0)("wormholeSelector",p.wormholeSelector)("env",p.env),Zt(2),fs(p.newCommentAttachments.length>0?7:-1),Zt(),fs(p.isAddingHyperlink?8:-1),Zt(4),Nn("title",ha(13,24,"_Add attachment")),Zt(2),Nn("title",ha(15,26,"_Add hyperlink")),Zt(2),Nn("title",ha(17,28,"_Add_attachment_link")),Zt(4),Nn("items",p.buttonRowItems),Zt(4),fs(((r=ha(25,30,p.commentsList$))==null?null:r.length)===0?24:26)}}var mje={showNoAttachmentsFound:!1,hideAttachmentSize:!0},Fwe=(()=>{class d extends Rc{set rootObjectId(r){this._rootObjectId=r}get rootObjectId(){return this._rootObjectId}set userId(r){this._userId=r}get userId(){return this._userId}constructor(r,p,f,M,T,U,x){super(p),this.dialogService=r,this.datePipe=f,this.formBuilder=M,this.bimplusAttachmentsService=T,this.bimplusObjectCommentsListService=U,this.statusBarService=x,this.project=null,this.wormholeSelector="localEmbeddedModalId",this.env="prod",this.attachmentLinkItems=[],this.commentsList$=new Du([]),this.loading=so(!1),this.attachmentsState=so([]),this.buttonRowItems=[],this.hyperlinkButtonRowItems=[],this.textAreaValue=null,this.lastShownDate="",this.placeholder="",this.name="",this.readonly=!1,this.autoResizeTextarea=!0,this.minRows=3,this.maxRows=10,this.clearValue=!1,this.statusBarTitleMessage=this.translateService.instant("_Loading"),this.newAttachmentIDs=[],this.isAddingHyperlink=!1,this.newCommentAttachments=[],this._rootObjectId="",this._userId="",this.hyperlinkForm=this.formBuilder.group({name:["",[]],url:["",[kz.required,kz.pattern(/^[^<>]*$/),kz.pattern(/^(?!\s*$).+/)]]})}isCreateButtonDisabled(){return!(this.textAreaValue||this.newAttachmentIDs?.length>0||this.getHyperlinks(this.rootObjectId)?.length>0||this.attachmentsState()?.length>0)}checkCreateButtonState(){this.buttonRowItems?.[0]&&(this.buttonRowItems[0].disabled=this.isCreateButtonDisabled())}ngOnInit(){this.bimplusObjectCommentsListService.api=this.api,this.loadComments();let r=[{id:"submit",title:this.translateService.instant("_Add comment"),tooltip:this.translateService.instant("_Add comment"),disabled:this.isCreateButtonDisabled(),buttonStyle:"primary"}];this.placeholder=this.translateService.instant("_Place comment text here"),this.name=this.translateService.instant("comment"),this.buttonRowItems=r,this.hyperlinkButtonRowItems.push({id:"cancel-hyperlink",title:this.translateService.instant("_Cancel"),tooltip:this.translateService.instant("_Cancel"),disabled:!1,buttonStyle:"primary"},{id:"add-hyperlink",title:this.translateService.instant("_Add hyperlink"),tooltip:this.translateService.instant("_Add hyperlink"),disabled:!0,buttonStyle:"primary"}),this.hyperlinkForm.statusChanges.subscribe(p=>{this.hyperlinkButtonRowItems[1].disabled=p!=="VALID"})}ngOnChanges(r){r.rootObjectId&&!r.rootObjectId.firstChange&&this.loadComments()}onAttachmentsLinkChange(r){let p=r.map(M=>(M.iconClass="fa fa-link",M.iconTitle=this.translateService.instant("_Attachment_link"),M.deleteButtonTitle=this.translateService.instant("_Delete_attachmentlink"),M)),f=this.newCommentAttachments.filter(M=>M?.type==="Hyperlink");this.newCommentAttachments=[...f,...p],this.newAttachmentIDs=r.map(M=>M.id),this.checkCreateButtonState()}onAddAttachment(r){let p=this.bimplusAttachmentsService.getAttachment(r);this.attachmentsState.update(f=>[...f,p]),this.checkCreateButtonState()}onDeleteAttachment(r){this.attachmentsState.update(p=>p.filter(f=>f!==r)),this.checkCreateButtonState()}onGetAttachment(r){this.bimplusObjectCommentsListService.downloadAttachment(r)}onTextareaValueChange(r){this.textAreaValue=r,this.checkCreateButtonState()}handleActionCommentEvent(r){if(r.action==="delete"){let p=r.data;this.openDialogDeleteComment(p.commentId)}}actionDialogClose(r){this.dialogService.close(r)}openDialogDeleteComment(r){this.dialogService.open(mte,{options:{position:"middle",positionOptions:{},overlayClickEnabled:!1,overlayVisibilityEnabled:!0,draggable:!0},data:{title:this.translateService.instant("_Comment delete confirmation title"),message:this.translateService.instant("_Comment delete confirmation message"),acceptCallback:()=>{this.deleteComment(r)}}})}isSameDate(r){if(!r)return!1;let p=this.datePipe.transform(r,"shortDate");return this.lastShownDate===p?!1:(this.lastShownDate=r,!0)}buttonRowButtonClicked(r){if(r.id==="submit"){if(!this.api||!this.rootObjectId)return;this.loading.set(!0);let p={text:this.textAreaValue,objectId:this.rootObjectId},f=JSON.stringify(p);this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Creating new comment")}),this.bimplusObjectCommentsListService.postComments(this.rootObjectId,f,this.getHyperlinks(this.rootObjectId),this.attachmentsState(),this.newAttachmentIDs).pipe(IM(()=>this.bimplusObjectCommentsListService.loadComments(this.rootObjectId))).subscribe({next:M=>this.commentsList$.next(M),complete:()=>{this.attachmentsState.set([]),this.newCommentAttachments=[],this.attachmentLinkItems=[],this.newAttachmentIDs=[],this.textAreaValue=null,this.clearValue=!0,this.buttonRowItems[0].disabled=!0,this.loading.set(!1),this.statusBarService.setStatusBarData({statusBarVisible:!1,title:""})}})}}hyperlinkButtonRowButtonClicked(r){r.id==="add-hyperlink"?this.addNewCommentHyperlink():r.id==="cancel-hyperlink"&&(this.hyperlinkForm.reset(),this.isAddingHyperlink=!1)}addNewCommentHyperlink(){if(!this.hyperlinkForm.valid)return;let r=this.hyperlinkForm.value.url.trim();RegExp(/^http(s?):\/\//).exec(r)||(r="https://"+r);let p=this.hyperlinkForm.value.name?.trim()??"";p===""&&(p=r);let f={id:"",type:"Hyperlink",nameShort:p,name:p,url:r,iconClass:"fa fa-link",iconTitle:this.translateService.instant("_Hyperlink"),deleteButtonTitle:this.translateService.instant("_Remove hyperlink")};this.newCommentAttachments.push(f),this.hyperlinkForm.reset(),this.isAddingHyperlink=!1,this.checkCreateButtonState()}deleteComment(r){this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Deleting the comment")}),this.bimplusObjectCommentsListService.deleteComment(r).subscribe(()=>this.loadComments())}addHyperlinkIconClicked(){this.isAddingHyperlink=!this.isAddingHyperlink}addHyperlinkIconKeypress(r){(r.key==="Enter"||r.key===" ")&&this.addHyperlinkIconClicked()}removeNewCommentAttachment(r){this.newCommentAttachments=this.newCommentAttachments.filter(p=>p!==r),r?.type!=="Hyperlink"&&(this.attachmentLinkItems=this.attachmentLinkItems.filter(p=>p.id!==r.id),this.newAttachmentIDs=this.newAttachmentIDs.filter(p=>p!==r.id)),this.checkCreateButtonState()}removeNewCommentAttachmentKeypress(r,p){(r.key==="Enter"||r.key===" ")&&this.removeNewCommentAttachment(p)}isActUserAuthor(r){return r.author?.id===this.userId}displayName(r){return r.author?.displayname?r.author?.displayname:""}formatDate(r){if(window.navigator.language.includes("en")){let f=new Date(r);return f.getMonth()+"/"+f.getDate()+"/"+f.getFullYear()}return new Intl.DateTimeFormat(void 0,{dateStyle:"short"}).format(new Date(r))}clearTextareaValue(){return this.clearValue}loadComments(){this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Loading comments list")}),this.loading.set(!0),this.bimplusObjectCommentsListService.loadComments(this.rootObjectId).subscribe({next:r=>{this.commentsList$.next(r)},complete:()=>{this.loading.set(!1),this.statusBarService.setStatusBarData({statusBarVisible:!1,title:""})}})}getHyperlinks(r){return this.newCommentAttachments.filter(p=>p?.type==="Hyperlink").map(p=>nm(wc({},p),{objectId:r}))}onEnterKeyPressedInHyperlinkForm(){this.addNewCommentHyperlink()}static{this.\u0275fac=function(p){return new(p||d)(vi(hT),vi(ja),vi(mJ),vi(HJ),vi(hF),vi(gte),vi(yte))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-object-comments-list"]],inputs:{api:"api",project:"project",wormholeSelector:"wormholeSelector",env:"env",attachmentLinkItems:"attachmentLinkItems",rootObjectId:"rootObjectId",userId:"userId"},standalone:!0,features:[Ml([mJ,gte,hF,{provide:f7,useValue:mje}]),ll,rp,as],decls:1,vars:1,consts:[["attachments",""],["linksToDocuments",""],[1,"comment-tab-container"],[1,"textarea-container"],[3,"textAreaValueChange","placeholder","name","readonly","activeAutoResizeTextarea","minRows","maxRows","clearValue"],["listOnly","",3,"addAttachment","deleteAttachment","attachments"],["listOnly","","hideAttachmentSize","","showEmptyMessage","false",3,"attachmentsLinkChange","attachments","api","project","rootObjectId","canCreateAttachmentLink","canDeleteAttachmentLink","wormholeSelector","env"],[1,"new-comment-attachment-list"],[1,"hyperlink-input-form",3,"formGroup"],[1,"comments-tab-attachments-section"],[1,"comments-attachments-list"],[1,"tab-attachments","icon","attachments-icon","hidden"],[1,"attachment-icon","icon-small","interactive",3,"click","keydown","title"],[1,"link-icon","icon-small","interactive",3,"click","keydown","title"],[1,"attachment-link-icon","icon-small","interactive",3,"click","keydown","title"],[1,"tab-attachmentlinks","icon","attachments-icon","hidden"],[1,"add-comment"],[3,"buttonClicked","items"],[1,"comments-separator"],[1,"scrollable-content-container"],[1,"no-comments-found"],[3,"ngClass","title",4,"ngFor","ngForOf"],[3,"ngClass","title"],[1,"text"],[1,"cancel-icon",3,"click","keydown","title"],[1,"hyperlink-input-row"],[1,"link-icon","icon-next-to-text-input"],["formControlName","name",1,"flex-grow",3,"enterKeyPressed","placeholder"],[1,"icon-next-to-text-input"],["formControlName","url",1,"flex-grow",3,"enterKeyPressed","placeholder"],["action","delete",3,"message","api","date","commentId","attachments","attachmentLinkItems","hyperlinks","isActUserAuthor","displayname"],[1,"comment-list-date"],["action","delete",3,"outputActionCommentEvent","getAttachment","message","api","date","commentId","attachments","attachmentLinkItems","hyperlinks","isActUserAuthor","displayname"]],template:function(p,f){p&1&&gr(0,fje,27,33,"div",2),p&2&&fs(f.loading()?-1:0)},dependencies:[rm,qo,Oc,fJ,bte,vte,o4,Ko,xc,l4,x$,fte,Dwe,JC,BJ,h5,nk,oA,kB,zX],styles:[`:host{height:100%;display:flex;flex-direction:column;flex:1}.link-icon{background:url("./assets/Links_18_gray.svg") no-repeat center}.attachment-icon{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.attachment-link-icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.icon{height:2rem;width:2rem;margin:0 .2rem}.icon-small{height:100%;width:1.8rem;margin:0 .2rem}.icon-small.Hyperlink{background:url("./assets/Links_18_gray.svg") no-repeat center}.icon-small.Attachment{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.icon-small.AttachmentLink{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.icon-next-to-text-input{width:1.8rem;margin:.3rem .2rem 0}.interactive{cursor:pointer}.flex{display:flex}.flex-grow{flex-grow:1}.hyperlink-input-row{display:flex;gap:.2rem}.hyperlink-input-row lib-bimplus-input-text-field{margin-top:.2rem}.new-comment-attachment-list{margin:0 .6rem .2rem 0}.new-comment-attachments{--bim-attachment-item-background-size: 1.8rem}.new-comment-attachment{padding-left:.8rem;display:grid;grid-template-columns:auto 1fr auto;column-gap:.4rem}.new-comment-attachment .text{line-height:2.4rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.new-comment-attachment .cancel-icon{flex:1;background:url("./assets/bimplus_WebIcons_Cross.svg") no-repeat center;background-size:1.8rem;width:3.2rem;max-width:3.2rem;cursor:pointer}.new-comment-attachment.attachment-link .icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.new-comment-attachment.hyperlink .icon{background:url("./assets/Links_18_gray.svg") no-repeat center}.hyperlink-input-form{padding-left:.8rem;padding-right:.8rem;display:flex;flex-direction:column;gap:.2rem}.comment-tab-container{height:100%;display:flex;flex-direction:column;flex:1}.comment-tab-container .scrollable-content-container{position:relative;flex:1;width:100%}.comment-tab-container .scrollable-content-container lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;flex:1;width:100%}.comment-tab-container .textarea-container{margin-left:.8rem}.comment-tab-container .comments-tab-attachments-section{display:inline-flex;width:100%;justify-content:space-between;margin:1rem .8rem .8rem 0}.comment-tab-container .comments-tab-attachments-section .comments-attachments-list{align-items:center;margin-left:.8rem}.comment-tab-container .comments-tab-attachments-section .add-comment{display:inline-flex;align-items:center;margin-right:.8rem}.comment-tab-container .comments-attachments-list{display:inline-flex}.comment-tab-container .comments-attachments-list .attachments-icon{height:2rem;width:2rem;margin:0 .2rem;cursor:pointer}.comment-tab-container .comments-attachments-list .tab-attachments{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.comment-tab-container .comments-attachments-list .tab-attachmentlinks{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.comment-tab-container .comments-attachments-list .tab-hyperlinks{background:url("./assets/Links_18_gray.svg") no-repeat center}.comment-tab-container .comments-separator{margin:0 .8rem;border-bottom:solid .1rem var(--comments-chat-comments-separator-border-color)}.comment-tab-container textarea::-webkit-scrollbar-track{background-color:var(--main-menu-apps-container-background-color-enabled)}.comment-tab-container textarea::-webkit-scrollbar-thumb{background-color:var(--propertymanager-object-tree-scrollable-border-color);border-radius:.5rem}.comment-tab-container textarea::-webkit-scrollbar{width:.7rem;background:var(--storage-info-placeholder-text-color-enabled)}.comment-tab-container .comment-list-date{text-align:center;margin-top:1.2rem}.comment-tab-container .hidden{display:none}.comment-tab-container .no-comments-found{padding:2.5rem .5rem;color:var(--details-controls-details-not-found-text-color);text-align:center}lib-bimplus-attachments{--bim-attachment-item-border-bottom: none;--bim-attachment-delete-button-icon-color: #444;--bim-attachment-delete-button-icon-font-weight: bold;--bim-attachment-item-background-image: url("./assets/Attachment_18_gray.svg")}lib-links-to-documents{--attachment-row-border-bottom: none;--bim-attachment-item-background-image: url("./assets/Attachmentlink_18_gray.svg");--bim-attachment-delete-button: #444;--attachment-row-margin: 0;--bim-attachment-item-background-size: 1.8rem;--bim-attachment-delete-button-font-weight: bold}
12852
+ `],encapsulation:3})}}return d})();var gte=(()=>{class d{constructor(r){this.decorators=r,this.bimplusAttachmentsService=Ja(hF)}deleteComment(r){return bd(this.api.comments.delete(r))}downloadAttachment(r){let{id:p,fileName:f}=r;if(!this.api)return;let M=this.api,T=`${M.getApiTeamUrl()}attachments/${p}/download?api-token=${M.getAccessToken()}&openInBrowser=true`;this.bimplusAttachmentsService.download(T,f)}postComments(r,p,f,M,T){return bd(this.api.objects.postComment(r,p)).pipe(IM(U=>{let{id:x}=U,H=M.map(ne=>{let Oe=new FormData;return Oe.append("file",ne.file),Oe.append("name",ne.fileName),Oe.append("size",ne.file.size.toString()),Oe.append("type",ne.file.type),Oe.append("objectId",x),Oe});return(H.length?Ez(H.map(ne=>bd(this.api.objects.postAttachment(x,ne,void 0,"")))):tp([])).pipe(Vu(()=>x))}),IM(U=>T.length?zfe(T,U,this.api).pipe(Vu(()=>U)):tp(U)),IM(U=>f.length?this.manageHyperLinks(U,f).pipe(Vu(()=>U)):tp(U)),QY(null),NZ(),xZ(U=>(console.error("Error in postComments:",U),tp(null))))}decorateComment(r){if(r.attachmentLinks&&r.attachmentLinks.length>0){let p=r.attachmentLinks.map(f=>this.decorators.decorateLink(this.api,f,[r.id]));r.attachmentLinks=p}}decorateComments(r){return r.forEach(p=>{this.decorateComment(p)}),r}loadComments(r){return bd(this.api.objects.getComments(r)).pipe(Vu(p=>{if(!p)throw new Error("Comments response is undefined");return this.decorateComments(p)}))}manageHyperLinks(r,p){let f=[];return p.forEach(M=>{if(!M)return;let T=JSON.stringify({name:M.name,objectId:M.objectId,url:M.url}),U=this.api?.objects.postHyperlink(r,T).catch(x=>{console.log(x)});f.push(U)}),bd(Promise.all(f))}static{this.\u0275fac=function(p){return new(p||d)(Gs(lte))}}static{this.\u0275prov=za({token:d,factory:d.\u0275fac})}}return d})();var yte=(()=>{class d{constructor(){this._statusBarData=new Du({title:"",statusBarVisible:!1})}get statusBarVisible(){return this._statusBarData.value.statusBarVisible}get title(){return this._statusBarData.value.title}get statusBarData(){return this._statusBarData.value}get statusBarDataSubscription(){return this._statusBarData}setStatusBarData(r){this._statusBarData.next(r)}static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275prov=za({token:d,factory:d.\u0275fac,providedIn:"root"})}}return d})();var aje=()=>["new-comment-attachments"],kwe=()=>[];function oje(d,o){if(d&1){let r=qs();cn(0,"div",22),Zr(1,"div",22),cn(2,"div",23),Wr(3),mn(),cn(4,"span",24),xi("click",function(){let f=Pi(r).$implicit,M=on(3);return Bi(M.removeNewCommentAttachment(f))})("keydown",function(f){let M=Pi(r).$implicit,T=on(3);return Bi(T.removeNewCommentAttachmentKeypress(f,M))}),mn()()}if(d&2){let r=o.$implicit;Nn("ngClass","new-comment-attachment "+r.type)("title",r.type==="Hyperlink"?r.url:r.name),Zt(),Nn("ngClass","icon-small "+r.type)("title",r.type==="Hyperlink"?r.url:r.name),Zt(2),Sa("",r.name," "),Zt(),Bo("title",r.deleteButtonTitle)}}function lje(d,o){if(d&1&&(cn(0,"div",7),gr(1,oje,5,6,"div",21),mn()),d&2){let r=on(2);Zt(),Nn("ngForOf",r.newCommentAttachments)}}function cje(d,o){if(d&1){let r=qs();cn(0,"form",8)(1,"div",25),Zr(2,"div",26),cn(3,"lib-bimplus-input-text-field",27),ca(4,"translate"),xi("enterKeyPressed",function(){Pi(r);let f=on(2);return Bi(f.onEnterKeyPressedInHyperlinkForm())}),mn()(),cn(5,"div",25),Zr(6,"div",28),cn(7,"lib-bimplus-input-text-field",29),ca(8,"translate"),xi("enterKeyPressed",function(){Pi(r);let f=on(2);return Bi(f.onEnterKeyPressedInHyperlinkForm())}),mn()(),cn(9,"lib-bimplus-buttons-row",17),xi("buttonClicked",function(f){Pi(r);let M=on(2);return Bi(M.hyperlinkButtonRowButtonClicked(f))}),mn()()}if(d&2){let r=on(2);Nn("formGroup",r.hyperlinkForm),Zt(3),Bo("placeholder",ha(4,4,"_Name")),Zt(4),Bo("placeholder",ha(8,6,"_URL")),Zt(2),Nn("items",r.hyperlinkButtonRowItems)}}function uje(d,o){d&1&&(cn(0,"div",20),Wr(1),ca(2,"translate"),mn()),d&2&&(Zt(),Sa(" ",ha(2,1,"_No comments found")," "))}function dje(d,o){if(d&1&&(cn(0,"div",31),Wr(1),mn()),d&2){let r=on().$implicit,p=on(3);Zt(),Sa(" ",p.formatDate(r.createdAt)," ")}}function pje(d,o){if(d&1){let r=qs();gr(0,dje,2,1,"div",31),cn(1,"lib-bimplus-comment",32),xi("outputActionCommentEvent",function(f){Pi(r);let M=on(3);return Bi(M.handleActionCommentEvent(f))})("getAttachment",function(f){Pi(r);let M=on(3);return Bi(M.onGetAttachment(f))}),mn()}if(d&2){let r,p,f=o.$implicit,M=on(3);fs(f.createdAt&&M.isSameDate(f.createdAt)?0:-1),Zt(),Nn("message",f.text)("api",M.api)("date",f.createdAt?f.createdAt:"")("commentId",f.id)("attachments",(r=f.attachments)!==null&&r!==void 0?r:XH(10,kwe))("attachmentLinkItems",(p=f.attachmentLinks)!==null&&p!==void 0?p:XH(11,kwe))("hyperlinks",f.hyperlinks)("isActUserAuthor",M.isActUserAuthor(f))("displayname",M.displayName(f))}}function hje(d,o){if(d&1&&(Sp(0,pje,2,12,"lib-bimplus-comment",30,wM),ca(2,"async")),d&2){let r=on(2);zp(ha(2,0,r.commentsList$))}}function fje(d,o){if(d&1){let r=qs();cn(0,"div",2)(1,"div",3)(2,"lib-bimplus-textarea",4),xi("textAreaValueChange",function(f){Pi(r);let M=on();return Bi(M.onTextareaValueChange(f))}),mn()(),cn(3,"lib-bimplus-attachments",5,0),xi("addAttachment",function(f){Pi(r);let M=on();return Bi(M.onAddAttachment(f))})("deleteAttachment",function(f){Pi(r);let M=on();return Bi(M.onDeleteAttachment(f))}),mn(),cn(5,"lib-links-to-documents",6,1),xi("attachmentsLinkChange",function(f){Pi(r);let M=on();return Bi(M.onAttachmentsLinkChange(f))}),mn(),gr(7,lje,2,1,"div",7)(8,cje,10,8,"form",8),cn(9,"div",9)(10,"div",10),Zr(11,"div",11),cn(12,"div",12),ca(13,"translate"),xi("click",function(){Pi(r);let f=Ef(4);return Bi(f.open())})("keydown",function(){Pi(r);let f=Ef(4);return Bi(f.open())}),mn(),cn(14,"div",13),ca(15,"translate"),xi("click",function(){Pi(r);let f=on();return Bi(f.addHyperlinkIconClicked())})("keydown",function(f){Pi(r);let M=on();return Bi(M.addHyperlinkIconKeypress(f))}),mn(),cn(16,"div",14),ca(17,"translate"),xi("click",function(){Pi(r);let f=Ef(6),M=on();return Bi(f.createAttachmentLink(M.api))})("keydown",function(){Pi(r);let f=Ef(6),M=on();return Bi(f.createAttachmentLink(M.api))}),mn(),Zr(18,"div",15),mn(),cn(19,"div",16)(20,"lib-bimplus-buttons-row",17),xi("buttonClicked",function(f){Pi(r);let M=on();return Bi(M.buttonRowButtonClicked(f))}),mn()()(),Zr(21,"div",18),cn(22,"div",19)(23,"lib-bimplus-scrollable-container"),gr(24,uje,3,3,"div",20),ca(25,"async"),gr(26,hje,3,2),mn()()()}if(d&2){let r,p=on();Zt(2),Nn("placeholder",p.placeholder)("name",p.name)("readonly",p.readonly)("activeAutoResizeTextarea",!0)("minRows",p.minRows)("maxRows",p.maxRows)("clearValue",p.clearTextareaValue()),Zt(),LC(XH(33,aje)),Nn("attachments",p.attachmentsState()),Zt(2),Nn("attachments",p.attachmentLinkItems)("api",p.api)("project",p.project)("canCreateAttachmentLink",!0)("canDeleteAttachmentLink",!0)("wormholeSelector",p.wormholeSelector)("env",p.env)("inputBaseUrl",p.inputBaseUrl),Zt(2),fs(p.newCommentAttachments.length>0?7:-1),Zt(),fs(p.isAddingHyperlink?8:-1),Zt(4),Nn("title",ha(13,25,"_Add attachment")),Zt(2),Nn("title",ha(15,27,"_Add hyperlink")),Zt(2),Nn("title",ha(17,29,"_Add_attachment_link")),Zt(4),Nn("items",p.buttonRowItems),Zt(4),fs(((r=ha(25,31,p.commentsList$))==null?null:r.length)===0?24:26)}}var mje={showNoAttachmentsFound:!1,hideAttachmentSize:!0},Fwe=(()=>{class d extends Rc{set rootObjectId(r){this._rootObjectId=r}get rootObjectId(){return this._rootObjectId}set userId(r){this._userId=r}get userId(){return this._userId}constructor(r,p,f,M,T,U,x){super(p),this.dialogService=r,this.datePipe=f,this.formBuilder=M,this.bimplusAttachmentsService=T,this.bimplusObjectCommentsListService=U,this.statusBarService=x,this.project=null,this.wormholeSelector="localEmbeddedModalId",this.env="prod",this.attachmentLinkItems=[],this.inputBaseUrl="",this.commentsList$=new Du([]),this.loading=so(!1),this.attachmentsState=so([]),this.buttonRowItems=[],this.hyperlinkButtonRowItems=[],this.textAreaValue=null,this.lastShownDate="",this.placeholder="",this.name="",this.readonly=!1,this.autoResizeTextarea=!0,this.minRows=3,this.maxRows=10,this.clearValue=!1,this.statusBarTitleMessage=this.translateService.instant("_Loading"),this.newAttachmentIDs=[],this.isAddingHyperlink=!1,this.newCommentAttachments=[],this._rootObjectId="",this._userId="",this.hyperlinkForm=this.formBuilder.group({name:["",[]],url:["",[kz.required,kz.pattern(/^[^<>]*$/),kz.pattern(/^(?!\s*$).+/)]]})}isCreateButtonDisabled(){return!(this.textAreaValue||this.newAttachmentIDs?.length>0||this.getHyperlinks(this.rootObjectId)?.length>0||this.attachmentsState()?.length>0)}checkCreateButtonState(){this.buttonRowItems?.[0]&&(this.buttonRowItems[0].disabled=this.isCreateButtonDisabled())}ngOnInit(){this.bimplusObjectCommentsListService.api=this.api,this.loadComments();let r=[{id:"submit",title:this.translateService.instant("_Add comment"),tooltip:this.translateService.instant("_Add comment"),disabled:this.isCreateButtonDisabled(),buttonStyle:"primary"}];this.placeholder=this.translateService.instant("_Place comment text here"),this.name=this.translateService.instant("comment"),this.buttonRowItems=r,this.hyperlinkButtonRowItems.push({id:"cancel-hyperlink",title:this.translateService.instant("_Cancel"),tooltip:this.translateService.instant("_Cancel"),disabled:!1,buttonStyle:"primary"},{id:"add-hyperlink",title:this.translateService.instant("_Add hyperlink"),tooltip:this.translateService.instant("_Add hyperlink"),disabled:!0,buttonStyle:"primary"}),this.hyperlinkForm.statusChanges.subscribe(p=>{this.hyperlinkButtonRowItems[1].disabled=p!=="VALID"})}ngOnChanges(r){r.rootObjectId&&!r.rootObjectId.firstChange&&this.loadComments()}onAttachmentsLinkChange(r){let p=r.map(M=>(M.iconClass="fa fa-link",M.iconTitle=this.translateService.instant("_Attachment_link"),M.deleteButtonTitle=this.translateService.instant("_Delete_attachmentlink"),M)),f=this.newCommentAttachments.filter(M=>M?.type==="Hyperlink");this.newCommentAttachments=[...f,...p],this.newAttachmentIDs=r.map(M=>M.id),this.checkCreateButtonState()}onAddAttachment(r){let p=this.bimplusAttachmentsService.getAttachment(r);this.attachmentsState.update(f=>[...f,p]),this.checkCreateButtonState()}onDeleteAttachment(r){this.attachmentsState.update(p=>p.filter(f=>f!==r)),this.checkCreateButtonState()}onGetAttachment(r){this.bimplusObjectCommentsListService.downloadAttachment(r)}onTextareaValueChange(r){this.textAreaValue=r,this.checkCreateButtonState()}handleActionCommentEvent(r){if(r.action==="delete"){let p=r.data;this.openDialogDeleteComment(p.commentId)}}actionDialogClose(r){this.dialogService.close(r)}openDialogDeleteComment(r){this.dialogService.open(mte,{options:{position:"middle",positionOptions:{},overlayClickEnabled:!1,overlayVisibilityEnabled:!0,draggable:!0},data:{title:this.translateService.instant("_Comment delete confirmation title"),message:this.translateService.instant("_Comment delete confirmation message"),acceptCallback:()=>{this.deleteComment(r)}}})}isSameDate(r){if(!r)return!1;let p=this.datePipe.transform(r,"shortDate");return this.lastShownDate===p?!1:(this.lastShownDate=r,!0)}buttonRowButtonClicked(r){if(r.id==="submit"){if(!this.api||!this.rootObjectId)return;this.loading.set(!0);let p={text:this.textAreaValue,objectId:this.rootObjectId},f=JSON.stringify(p);this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Creating new comment")}),this.bimplusObjectCommentsListService.postComments(this.rootObjectId,f,this.getHyperlinks(this.rootObjectId),this.attachmentsState(),this.newAttachmentIDs).pipe(IM(()=>this.bimplusObjectCommentsListService.loadComments(this.rootObjectId))).subscribe({next:M=>this.commentsList$.next(M),complete:()=>{this.attachmentsState.set([]),this.newCommentAttachments=[],this.attachmentLinkItems=[],this.newAttachmentIDs=[],this.textAreaValue=null,this.clearValue=!0,this.buttonRowItems[0].disabled=!0,this.loading.set(!1),this.statusBarService.setStatusBarData({statusBarVisible:!1,title:""})}})}}hyperlinkButtonRowButtonClicked(r){r.id==="add-hyperlink"?this.addNewCommentHyperlink():r.id==="cancel-hyperlink"&&(this.hyperlinkForm.reset(),this.isAddingHyperlink=!1)}addNewCommentHyperlink(){if(!this.hyperlinkForm.valid)return;let r=this.hyperlinkForm.value.url.trim();RegExp(/^http(s?):\/\//).exec(r)||(r="https://"+r);let p=this.hyperlinkForm.value.name?.trim()??"";p===""&&(p=r);let f={id:"",type:"Hyperlink",nameShort:p,name:p,url:r,iconClass:"fa fa-link",iconTitle:this.translateService.instant("_Hyperlink"),deleteButtonTitle:this.translateService.instant("_Remove hyperlink")};this.newCommentAttachments.push(f),this.hyperlinkForm.reset(),this.isAddingHyperlink=!1,this.checkCreateButtonState()}deleteComment(r){this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Deleting the comment")}),this.bimplusObjectCommentsListService.deleteComment(r).subscribe(()=>this.loadComments())}addHyperlinkIconClicked(){this.isAddingHyperlink=!this.isAddingHyperlink}addHyperlinkIconKeypress(r){(r.key==="Enter"||r.key===" ")&&this.addHyperlinkIconClicked()}removeNewCommentAttachment(r){this.newCommentAttachments=this.newCommentAttachments.filter(p=>p!==r),r?.type!=="Hyperlink"&&(this.attachmentLinkItems=this.attachmentLinkItems.filter(p=>p.id!==r.id),this.newAttachmentIDs=this.newAttachmentIDs.filter(p=>p!==r.id)),this.checkCreateButtonState()}removeNewCommentAttachmentKeypress(r,p){(r.key==="Enter"||r.key===" ")&&this.removeNewCommentAttachment(p)}isActUserAuthor(r){return r.author?.id===this.userId}displayName(r){return r.author?.displayname?r.author?.displayname:""}formatDate(r){if(window.navigator.language.includes("en")){let f=new Date(r);return f.getMonth()+"/"+f.getDate()+"/"+f.getFullYear()}return new Intl.DateTimeFormat(void 0,{dateStyle:"short"}).format(new Date(r))}clearTextareaValue(){return this.clearValue}loadComments(){this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Loading comments list")}),this.loading.set(!0),this.bimplusObjectCommentsListService.loadComments(this.rootObjectId).subscribe({next:r=>{this.commentsList$.next(r)},complete:()=>{this.loading.set(!1),this.statusBarService.setStatusBarData({statusBarVisible:!1,title:""})}})}getHyperlinks(r){return this.newCommentAttachments.filter(p=>p?.type==="Hyperlink").map(p=>nm(wc({},p),{objectId:r}))}onEnterKeyPressedInHyperlinkForm(){this.addNewCommentHyperlink()}static{this.\u0275fac=function(p){return new(p||d)(vi(hT),vi(ja),vi(mJ),vi(HJ),vi(hF),vi(gte),vi(yte))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-object-comments-list"]],inputs:{api:"api",project:"project",wormholeSelector:"wormholeSelector",env:"env",attachmentLinkItems:"attachmentLinkItems",inputBaseUrl:"inputBaseUrl",rootObjectId:"rootObjectId",userId:"userId"},standalone:!0,features:[Ml([mJ,gte,hF,{provide:f7,useValue:mje}]),ll,rp,as],decls:1,vars:1,consts:[["attachments",""],["linksToDocuments",""],[1,"comment-tab-container"],[1,"textarea-container"],[3,"textAreaValueChange","placeholder","name","readonly","activeAutoResizeTextarea","minRows","maxRows","clearValue"],["listOnly","",3,"addAttachment","deleteAttachment","attachments"],["listOnly","","hideAttachmentSize","","showEmptyMessage","false",3,"attachmentsLinkChange","attachments","api","project","rootObjectId","canCreateAttachmentLink","canDeleteAttachmentLink","wormholeSelector","env","inputBaseUrl"],[1,"new-comment-attachment-list"],[1,"hyperlink-input-form",3,"formGroup"],[1,"comments-tab-attachments-section"],[1,"comments-attachments-list"],[1,"tab-attachments","icon","attachments-icon","hidden"],[1,"attachment-icon","icon-small","interactive",3,"click","keydown","title"],[1,"link-icon","icon-small","interactive",3,"click","keydown","title"],[1,"attachment-link-icon","icon-small","interactive",3,"click","keydown","title"],[1,"tab-attachmentlinks","icon","attachments-icon","hidden"],[1,"add-comment"],[3,"buttonClicked","items"],[1,"comments-separator"],[1,"scrollable-content-container"],[1,"no-comments-found"],[3,"ngClass","title",4,"ngFor","ngForOf"],[3,"ngClass","title"],[1,"text"],[1,"cancel-icon",3,"click","keydown","title"],[1,"hyperlink-input-row"],[1,"link-icon","icon-next-to-text-input"],["formControlName","name",1,"flex-grow",3,"enterKeyPressed","placeholder"],[1,"icon-next-to-text-input"],["formControlName","url",1,"flex-grow",3,"enterKeyPressed","placeholder"],["action","delete",3,"message","api","date","commentId","attachments","attachmentLinkItems","hyperlinks","isActUserAuthor","displayname"],[1,"comment-list-date"],["action","delete",3,"outputActionCommentEvent","getAttachment","message","api","date","commentId","attachments","attachmentLinkItems","hyperlinks","isActUserAuthor","displayname"]],template:function(p,f){p&1&&gr(0,fje,27,34,"div",2),p&2&&fs(f.loading()?-1:0)},dependencies:[rm,qo,Oc,fJ,bte,vte,o4,Ko,xc,l4,x$,fte,Dwe,JC,BJ,h5,nk,oA,kB,zX],styles:[`:host{height:100%;display:flex;flex-direction:column;flex:1}.link-icon{background:url("./assets/Links_18_gray.svg") no-repeat center}.attachment-icon{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.attachment-link-icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.icon{height:2rem;width:2rem;margin:0 .2rem}.icon-small{height:100%;width:1.8rem;margin:0 .2rem}.icon-small.Hyperlink{background:url("./assets/Links_18_gray.svg") no-repeat center}.icon-small.Attachment{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.icon-small.AttachmentLink{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.icon-next-to-text-input{width:1.8rem;margin:.3rem .2rem 0}.interactive{cursor:pointer}.flex{display:flex}.flex-grow{flex-grow:1}.hyperlink-input-row{display:flex;gap:.2rem}.hyperlink-input-row lib-bimplus-input-text-field{margin-top:.2rem}.new-comment-attachment-list{margin:0 .6rem .2rem 0}.new-comment-attachments{--bim-attachment-item-background-size: 1.8rem}.new-comment-attachment{padding-left:.8rem;display:grid;grid-template-columns:auto 1fr auto;column-gap:.4rem}.new-comment-attachment .text{line-height:2.4rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.new-comment-attachment .cancel-icon{flex:1;background:url("./assets/bimplus_WebIcons_Cross.svg") no-repeat center;background-size:1.8rem;width:3.2rem;max-width:3.2rem;cursor:pointer}.new-comment-attachment.attachment-link .icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.new-comment-attachment.hyperlink .icon{background:url("./assets/Links_18_gray.svg") no-repeat center}.hyperlink-input-form{padding-left:.8rem;padding-right:.8rem;display:flex;flex-direction:column;gap:.2rem}.comment-tab-container{height:100%;display:flex;flex-direction:column;flex:1}.comment-tab-container .scrollable-content-container{position:relative;flex:1;width:100%}.comment-tab-container .scrollable-content-container lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;flex:1;width:100%}.comment-tab-container .textarea-container{margin-left:.8rem}.comment-tab-container .comments-tab-attachments-section{display:inline-flex;width:100%;justify-content:space-between;margin:1rem .8rem .8rem 0}.comment-tab-container .comments-tab-attachments-section .comments-attachments-list{align-items:center;margin-left:.8rem}.comment-tab-container .comments-tab-attachments-section .add-comment{display:inline-flex;align-items:center;margin-right:.8rem}.comment-tab-container .comments-attachments-list{display:inline-flex}.comment-tab-container .comments-attachments-list .attachments-icon{height:2rem;width:2rem;margin:0 .2rem;cursor:pointer}.comment-tab-container .comments-attachments-list .tab-attachments{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.comment-tab-container .comments-attachments-list .tab-attachmentlinks{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.comment-tab-container .comments-attachments-list .tab-hyperlinks{background:url("./assets/Links_18_gray.svg") no-repeat center}.comment-tab-container .comments-separator{margin:0 .8rem;border-bottom:solid .1rem var(--comments-chat-comments-separator-border-color)}.comment-tab-container textarea::-webkit-scrollbar-track{background-color:var(--main-menu-apps-container-background-color-enabled)}.comment-tab-container textarea::-webkit-scrollbar-thumb{background-color:var(--propertymanager-object-tree-scrollable-border-color);border-radius:.5rem}.comment-tab-container textarea::-webkit-scrollbar{width:.7rem;background:var(--storage-info-placeholder-text-color-enabled)}.comment-tab-container .comment-list-date{text-align:center;margin-top:1.2rem}.comment-tab-container .hidden{display:none}.comment-tab-container .no-comments-found{padding:2.5rem .5rem;color:var(--details-controls-details-not-found-text-color);text-align:center}lib-bimplus-attachments{--bim-attachment-item-border-bottom: none;--bim-attachment-delete-button-icon-color: #444;--bim-attachment-delete-button-icon-font-weight: bold;--bim-attachment-item-background-image: url("./assets/Attachment_18_gray.svg")}lib-links-to-documents{--attachment-row-border-bottom: none;--bim-attachment-item-background-image: url("./assets/Attachmentlink_18_gray.svg");--bim-attachment-delete-button: #444;--attachment-row-margin: 0;--bim-attachment-item-background-size: 1.8rem;--bim-attachment-delete-button-font-weight: bold}
12853
12853
  `],encapsulation:3,changeDetection:0})}}return d})();var qwe=(()=>{class d{get title(){return this._title}constructor(r){this.statusBarService=r,this._title=""}ngOnInit(){this.statusBarService.statusBarDataSubscription.subscribe(r=>{this._title=r.title})}closeClick(){this.statusBarService.setStatusBarData({title:"",statusBarVisible:!1})}closeKeyDown(r){(r.key==="Enter"||r.key==="Escape")&&this.closeClick()}static{this.\u0275fac=function(p){return new(p||d)(vi(yte))}}static{this.\u0275cmp=ss({type:d,selectors:[["lib-bimplus-status-bar"]],standalone:!0,features:[as],decls:3,vars:1,consts:[[1,"statusBar-container"],[1,"status-bar-text",3,"innerHTML"],["title","Close",1,"close-button",3,"click","keydown"]],template:function(p,f){p&1&&(cn(0,"div",0),Zr(1,"span",1),cn(2,"div",2),xi("click",function(){return f.closeClick()})("keydown",function(T){return f.closeKeyDown(T)}),mn()()),p&2&&(Zt(),Nn("innerHTML",f.title,SC))},styles:[`.statusBar-container{display:flex;align-items:center;position:fixed;box-sizing:border-box;left:0;color:var(--status-bar-color);width:100%;height:3.3rem;line-height:1.7;padding:.5rem 3.5rem;background:url("./assets/progress-spinner.svg") no-repeat var(--clashdetection-empty-line-image-background-color);background-position:.2rem .2rem;background-size:3rem 3rem;bottom:0;will-change:opacity transform;animation:fade_in 1s cubic-bezier(.14,.18,.16,1.02) infinite;animation-iteration-count:1;z-index:2}.statusBar-container.hidden{display:none}.close-button{position:absolute;right:0;color:var(--status-bar-close-button-color);width:3.2rem;height:3.2rem;flex-grow:0;flex-shrink:0;background:url("./assets/bimplus_Components_Overlay_Dialog_Cross_White.svg") no-repeat;background-position:center;cursor:pointer}@keyframes fade_in{0%,14%{opacity:0;transform:translateY(1rem) scale(.95)}15%{opacity:.25}30%,to{opacity:1;transform:translateY(0) scale(1)}}
12854
12854
  `],encapsulation:3})}}return d})();var bje=typeof global=="object"&&global&&global.Object===Object&&global,Wwe=bje;var vje=typeof self=="object"&&self&&self.Object===Object&&self,gje=Wwe||vje||Function("return this")(),Mte=gje;var yje=Mte.Symbol,fF=yje;var Uwe=Object.prototype,Mje=Uwe.hasOwnProperty,Ije=Uwe.toString,VQ=fF?fF.toStringTag:void 0;function wje(d){var o=Mje.call(d,VQ),r=d[VQ];try{d[VQ]=void 0;var p=!0}catch{}var f=Ije.call(d);return p&&(o?d[VQ]=r:delete d[VQ]),f}var jwe=wje;var Aje=Object.prototype,Oje=Aje.toString;function _je(d){return Oje.call(d)}var Gwe=_je;var Tje="[object Null]",Eje="[object Undefined]",Vwe=fF?fF.toStringTag:void 0;function Cje(d){return d==null?d===void 0?Eje:Tje:Vwe&&Vwe in Object(d)?jwe(d):Gwe(d)}var Ywe=Cje;function Dje(d){return d!=null&&typeof d=="object"}var Xwe=Dje;var Sje="[object Symbol]";function zje(d){return typeof d=="symbol"||Xwe(d)&&Ywe(d)==Sje}var Qwe=zje;var Lje=/\s/;function xje(d){for(var o=d.length;o--&&Lje.test(d.charAt(o)););return o}var Zwe=xje;var Rje=/^\s+/;function Nje(d){return d&&d.slice(0,Zwe(d)+1).replace(Rje,"")}var Kwe=Nje;function Pje(d){var o=typeof d;return d!=null&&(o=="object"||o=="function")}var dH=Pje;var Jwe=NaN,Bje=/^[-+]0x[0-9a-f]+$/i,Hje=/^0b[01]+$/i,kje=/^0o[0-7]+$/i,Fje=parseInt;function qje(d){if(typeof d=="number")return d;if(Qwe(d))return Jwe;if(dH(d)){var o=typeof d.valueOf=="function"?d.valueOf():d;d=dH(o)?o+"":o}if(typeof d!="string")return d===0?d:+d;d=Kwe(d);var r=Hje.test(d);return r||kje.test(d)?Fje(d.slice(2),r?2:8):Bje.test(d)?Jwe:+d}var Lfe=qje;var Wje=function(){return Mte.Date.now()},Ite=Wje;var Uje="Expected a function",jje=Math.max,Gje=Math.min;function Vje(d,o,r){var p,f,M,T,U,x,H=0,J=!1,ne=!1,Oe=!0;if(typeof d!="function")throw new TypeError(Uje);o=Lfe(o)||0,dH(r)&&(J=!!r.leading,ne="maxWait"in r,M=ne?jje(Lfe(r.maxWait)||0,o):M,Oe="trailing"in r?!!r.trailing:Oe);function Ne(tn){var ki=p,Ii=f;return p=f=void 0,H=tn,T=d.apply(Ii,ki),T}function Ye(tn){return H=tn,U=setTimeout(St,o),J?Ne(tn):T}function ft(tn){var ki=tn-x,Ii=tn-H,zi=o-ki;return ne?Gje(zi,M-Ii):zi}function Nt(tn){var ki=tn-x,Ii=tn-H;return x===void 0||ki>=o||ki<0||ne&&Ii>=M}function St(){var tn=Ite();if(Nt(tn))return Dt(tn);U=setTimeout(St,ft(tn))}function Dt(tn){return U=void 0,Oe&&p?Ne(tn):(p=f=void 0,T)}function Zn(){U!==void 0&&clearTimeout(U),H=0,p=x=f=U=void 0}function kn(){return U===void 0?T:Dt(Ite())}function gi(){var tn=Ite(),ki=Nt(tn);if(p=arguments,f=this,x=tn,ki){if(U===void 0)return Ye(x);if(ne)return clearTimeout(U),U=setTimeout(St,o),Ne(x)}return U===void 0&&(U=setTimeout(St,o)),T}return gi.cancel=Zn,gi.flush=kn,gi}var pH=Vje;var Yje="Expected a function";function Xje(d,o,r){var p=!0,f=!0;if(typeof d!="function")throw new TypeError(Yje);return dH(r)&&(p="leading"in r?!!r.leading:p,f="trailing"in r?!!r.trailing:f),pH(d,o,{leading:p,maxWait:o,trailing:f})}var xfe=Xje;var bF=function(){return bF=Object.assign||function(o){for(var r,p=1,f=arguments.length;p<f;p++){r=arguments[p];for(var M in r)Object.prototype.hasOwnProperty.call(r,M)&&(o[M]=r[M])}return o},bF.apply(this,arguments)};function tAe(d){return!d||!d.ownerDocument||!d.ownerDocument.defaultView?window:d.ownerDocument.defaultView}function nAe(d){return!d||!d.ownerDocument?document:d.ownerDocument}var iAe=function(d){var o={},r=Array.prototype.reduce.call(d,function(p,f){var M=f.name.match(/data-simplebar-(.+)/);if(M){var T=M[1].replace(/\W+(.)/g,function(U,x){return x.toUpperCase()});switch(f.value){case"true":p[T]=!0;break;case"false":p[T]=!1;break;case void 0:p[T]=!0;break;default:p[T]=f.value}}return p},o);return r};function rAe(d,o){var r;d&&(r=d.classList).add.apply(r,o.split(" "))}function sAe(d,o){d&&o.split(" ").forEach(function(r){d.classList.remove(r)})}function aAe(d){return".".concat(d.split(" ").join("."))}var Nfe=!!(typeof window<"u"&&window.document&&window.document.createElement),Qje=Object.freeze({__proto__:null,addClasses:rAe,canUseDOM:Nfe,classNamesToQuery:aAe,getElementDocument:nAe,getElementWindow:tAe,getOptions:iAe,removeClasses:sAe}),mF=null,$we=null;Nfe&&window.addEventListener("resize",function(){$we!==window.devicePixelRatio&&($we=window.devicePixelRatio,mF=null)});function eAe(){if(mF===null){if(typeof document>"u")return mF=0,mF;var d=document.body,o=document.createElement("div");o.classList.add("simplebar-hide-scrollbar"),d.appendChild(o);var r=o.getBoundingClientRect().right;d.removeChild(o),mF=r}return mF}var m7=tAe,Rfe=nAe,Zje=iAe,b7=rAe,v7=sAe,vT=aAe,YQ=function(){function d(o,r){r===void 0&&(r={});var p=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var f=m7(p.el);p.scrollXTicking||(f.requestAnimationFrame(p.scrollX),p.scrollXTicking=!0),p.scrollYTicking||(f.requestAnimationFrame(p.scrollY),p.scrollYTicking=!0),p.isScrolling||(p.isScrolling=!0,b7(p.el,p.classNames.scrolling)),p.showScrollbar("x"),p.showScrollbar("y"),p.onStopScrolling()},this.scrollX=function(){p.axis.x.isOverflowing&&p.positionScrollbar("x"),p.scrollXTicking=!1},this.scrollY=function(){p.axis.y.isOverflowing&&p.positionScrollbar("y"),p.scrollYTicking=!1},this._onStopScrolling=function(){v7(p.el,p.classNames.scrolling),p.options.autoHide&&(p.hideScrollbar("x"),p.hideScrollbar("y")),p.isScrolling=!1},this.onMouseEnter=function(){p.isMouseEntering||(b7(p.el,p.classNames.mouseEntered),p.showScrollbar("x"),p.showScrollbar("y"),p.isMouseEntering=!0),p.onMouseEntered()},this._onMouseEntered=function(){v7(p.el,p.classNames.mouseEntered),p.options.autoHide&&(p.hideScrollbar("x"),p.hideScrollbar("y")),p.isMouseEntering=!1},this._onMouseMove=function(f){p.mouseX=f.clientX,p.mouseY=f.clientY,(p.axis.x.isOverflowing||p.axis.x.forceVisible)&&p.onMouseMoveForAxis("x"),(p.axis.y.isOverflowing||p.axis.y.forceVisible)&&p.onMouseMoveForAxis("y")},this.onMouseLeave=function(){p.onMouseMove.cancel(),(p.axis.x.isOverflowing||p.axis.x.forceVisible)&&p.onMouseLeaveForAxis("x"),(p.axis.y.isOverflowing||p.axis.y.forceVisible)&&p.onMouseLeaveForAxis("y"),p.mouseX=-1,p.mouseY=-1},this._onWindowResize=function(){p.scrollbarWidth=p.getScrollbarWidth(),p.hideNativeScrollbar()},this.onPointerEvent=function(f){if(!(!p.axis.x.track.el||!p.axis.y.track.el||!p.axis.x.scrollbar.el||!p.axis.y.scrollbar.el)){var M,T;p.axis.x.track.rect=p.axis.x.track.el.getBoundingClientRect(),p.axis.y.track.rect=p.axis.y.track.el.getBoundingClientRect(),(p.axis.x.isOverflowing||p.axis.x.forceVisible)&&(M=p.isWithinBounds(p.axis.x.track.rect)),(p.axis.y.isOverflowing||p.axis.y.forceVisible)&&(T=p.isWithinBounds(p.axis.y.track.rect)),(M||T)&&(f.stopPropagation(),f.type==="pointerdown"&&f.pointerType!=="touch"&&(M&&(p.axis.x.scrollbar.rect=p.axis.x.scrollbar.el.getBoundingClientRect(),p.isWithinBounds(p.axis.x.scrollbar.rect)?p.onDragStart(f,"x"):p.onTrackClick(f,"x")),T&&(p.axis.y.scrollbar.rect=p.axis.y.scrollbar.el.getBoundingClientRect(),p.isWithinBounds(p.axis.y.scrollbar.rect)?p.onDragStart(f,"y"):p.onTrackClick(f,"y"))))}},this.drag=function(f){var M,T,U,x,H,J,ne,Oe,Ne,Ye,ft;if(!(!p.draggedAxis||!p.contentWrapperEl)){var Nt,St=p.axis[p.draggedAxis].track,Dt=(T=(M=St.rect)===null||M===void 0?void 0:M[p.axis[p.draggedAxis].sizeAttr])!==null&&T!==void 0?T:0,Zn=p.axis[p.draggedAxis].scrollbar,kn=(x=(U=p.contentWrapperEl)===null||U===void 0?void 0:U[p.axis[p.draggedAxis].scrollSizeAttr])!==null&&x!==void 0?x:0,gi=parseInt((J=(H=p.elStyles)===null||H===void 0?void 0:H[p.axis[p.draggedAxis].sizeAttr])!==null&&J!==void 0?J:"0px",10);f.preventDefault(),f.stopPropagation(),p.draggedAxis==="y"?Nt=f.pageY:Nt=f.pageX;var tn=Nt-((Oe=(ne=St.rect)===null||ne===void 0?void 0:ne[p.axis[p.draggedAxis].offsetAttr])!==null&&Oe!==void 0?Oe:0)-p.axis[p.draggedAxis].dragOffset;tn=p.draggedAxis==="x"&&p.isRtl?((Ye=(Ne=St.rect)===null||Ne===void 0?void 0:Ne[p.axis[p.draggedAxis].sizeAttr])!==null&&Ye!==void 0?Ye:0)-Zn.size-tn:tn;var ki=tn/(Dt-Zn.size),Ii=ki*(kn-gi);p.draggedAxis==="x"&&p.isRtl&&(Ii=!((ft=d.getRtlHelpers())===null||ft===void 0)&&ft.isScrollingToNegative?-Ii:Ii),p.contentWrapperEl[p.axis[p.draggedAxis].scrollOffsetAttr]=Ii}},this.onEndDrag=function(f){p.isDragging=!1;var M=Rfe(p.el),T=m7(p.el);f.preventDefault(),f.stopPropagation(),v7(p.el,p.classNames.dragging),p.onStopScrolling(),M.removeEventListener("mousemove",p.drag,!0),M.removeEventListener("mouseup",p.onEndDrag,!0),p.removePreventClickId=T.setTimeout(function(){M.removeEventListener("click",p.preventClick,!0),M.removeEventListener("dblclick",p.preventClick,!0),p.removePreventClickId=null})},this.preventClick=function(f){f.preventDefault(),f.stopPropagation()},this.el=o,this.options=bF(bF({},d.defaultOptions),r),this.classNames=bF(bF({},d.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=xfe(this._onMouseMove,64),this.onWindowResize=pH(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=pH(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=pH(this._onMouseEntered,this.stopScrollDelay),this.init()}return d.getRtlHelpers=function(){if(d.rtlHelpers)return d.rtlHelpers;var o=document.createElement("div");o.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=o.firstElementChild,p=r?.firstElementChild;if(!p)return null;document.body.appendChild(r),r.scrollLeft=0;var f=d.getOffset(r),M=d.getOffset(p);r.scrollLeft=-999;var T=d.getOffset(p);return document.body.removeChild(r),d.rtlHelpers={isScrollOriginAtZero:f.left!==M.left,isScrollingToNegative:M.left!==T.left},d.rtlHelpers},d.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:eAe()}catch{return eAe()}},d.getOffset=function(o){var r=o.getBoundingClientRect(),p=Rfe(o),f=m7(o);return{top:r.top+(f.pageYOffset||p.documentElement.scrollTop),left:r.left+(f.pageXOffset||p.documentElement.scrollLeft)}},d.prototype.init=function(){Nfe&&(this.initDOM(),this.rtlHelpers=d.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},d.prototype.initDOM=function(){var o,r;this.wrapperEl=this.el.querySelector(vT(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(vT(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(vT(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(vT(this.classNames.offset)),this.maskEl=this.el.querySelector(vT(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,vT(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(vT(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(vT(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(vT(this.classNames.track)).concat(vT(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(vT(this.classNames.track)).concat(vT(this.classNames.vertical))),this.axis.x.scrollbar.el=((o=this.axis.x.track.el)===null||o===void 0?void 0:o.querySelector(vT(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(vT(this.classNames.scrollbar)))||null,this.options.autoHide||(b7(this.axis.x.scrollbar.el,this.classNames.visible),b7(this.axis.y.scrollbar.el,this.classNames.visible))},d.prototype.initListeners=function(){var o=this,r,p=m7(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),p.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var f=!1,M=p.ResizeObserver||ResizeObserver;this.resizeObserver=new M(function(){f&&p.requestAnimationFrame(function(){o.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),p.requestAnimationFrame(function(){f=!0})}this.mutationObserver=new p.MutationObserver(function(){p.requestAnimationFrame(function(){o.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},d.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var o=m7(this.el);this.elStyles=o.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,p=this.heightAutoObserverEl.offsetHeight<=1,f=this.heightAutoObserverEl.offsetWidth<=1||r>0,M=this.contentWrapperEl.offsetWidth,T=this.elStyles.overflowX,U=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var x=this.contentEl.scrollHeight,H=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=p?"auto":"100%",this.placeholderEl.style.width=f?"".concat(r||H,"px"):"auto",this.placeholderEl.style.height="".concat(x,"px");var J=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&H>r,this.axis.y.isOverflowing=x>J,this.axis.x.isOverflowing=T==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=U==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var ne=this.axis.x.isOverflowing?this.scrollbarWidth:0,Oe=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&H>M-Oe,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&x>J-ne,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},d.prototype.getScrollbarSize=function(o){var r,p;if(o===void 0&&(o="y"),!this.axis[o].isOverflowing||!this.contentEl)return 0;var f=this.contentEl[this.axis[o].scrollSizeAttr],M=(p=(r=this.axis[o].track.el)===null||r===void 0?void 0:r[this.axis[o].offsetSizeAttr])!==null&&p!==void 0?p:0,T=M/f,U;return U=Math.max(~~(T*M),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(U=Math.min(U,this.options.scrollbarMaxSize)),U},d.prototype.positionScrollbar=function(o){var r,p,f;o===void 0&&(o="y");var M=this.axis[o].scrollbar;if(!(!this.axis[o].isOverflowing||!this.contentWrapperEl||!M.el||!this.elStyles)){var T=this.contentWrapperEl[this.axis[o].scrollSizeAttr],U=((r=this.axis[o].track.el)===null||r===void 0?void 0:r[this.axis[o].offsetSizeAttr])||0,x=parseInt(this.elStyles[this.axis[o].sizeAttr],10),H=this.contentWrapperEl[this.axis[o].scrollOffsetAttr];H=o==="x"&&this.isRtl&&(!((p=d.getRtlHelpers())===null||p===void 0)&&p.isScrollOriginAtZero)?-H:H,o==="x"&&this.isRtl&&(H=!((f=d.getRtlHelpers())===null||f===void 0)&&f.isScrollingToNegative?H:-H);var J=H/(T-x),ne=~~((U-M.size)*J);ne=o==="x"&&this.isRtl?-ne+(U-M.size):ne,M.el.style.transform=o==="x"?"translate3d(".concat(ne,"px, 0, 0)"):"translate3d(0, ".concat(ne,"px, 0)")}},d.prototype.toggleTrackVisibility=function(o){o===void 0&&(o="y");var r=this.axis[o].track.el,p=this.axis[o].scrollbar.el;!r||!p||!this.contentWrapperEl||(this.axis[o].isOverflowing||this.axis[o].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[o].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(o))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[o].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(o))),this.axis[o].isOverflowing?p.style.display="block":p.style.display="none")},d.prototype.showScrollbar=function(o){o===void 0&&(o="y"),this.axis[o].isOverflowing&&!this.axis[o].scrollbar.isVisible&&(b7(this.axis[o].scrollbar.el,this.classNames.visible),this.axis[o].scrollbar.isVisible=!0)},d.prototype.hideScrollbar=function(o){o===void 0&&(o="y"),!this.isDragging&&this.axis[o].isOverflowing&&this.axis[o].scrollbar.isVisible&&(v7(this.axis[o].scrollbar.el,this.classNames.visible),this.axis[o].scrollbar.isVisible=!1)},d.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},d.prototype.onMouseMoveForAxis=function(o){o===void 0&&(o="y");var r=this.axis[o];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(o),b7(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?b7(r.scrollbar.el,this.classNames.hover):v7(r.scrollbar.el,this.classNames.hover)):(v7(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(o)))},d.prototype.onMouseLeaveForAxis=function(o){o===void 0&&(o="y"),v7(this.axis[o].track.el,this.classNames.hover),v7(this.axis[o].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(o)},d.prototype.onDragStart=function(o,r){var p;r===void 0&&(r="y"),this.isDragging=!0;var f=Rfe(this.el),M=m7(this.el),T=this.axis[r].scrollbar,U=r==="y"?o.pageY:o.pageX;this.axis[r].dragOffset=U-(((p=T.rect)===null||p===void 0?void 0:p[this.axis[r].offsetAttr])||0),this.draggedAxis=r,b7(this.el,this.classNames.dragging),f.addEventListener("mousemove",this.drag,!0),f.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(f.addEventListener("click",this.preventClick,!0),f.addEventListener("dblclick",this.preventClick,!0)):(M.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},d.prototype.onTrackClick=function(o,r){var p=this,f,M,T,U;r===void 0&&(r="y");var x=this.axis[r];if(!(!this.options.clickOnTrack||!x.scrollbar.el||!this.contentWrapperEl)){o.preventDefault();var H=m7(this.el);this.axis[r].scrollbar.rect=x.scrollbar.el.getBoundingClientRect();var J=this.axis[r].scrollbar,ne=(M=(f=J.rect)===null||f===void 0?void 0:f[this.axis[r].offsetAttr])!==null&&M!==void 0?M:0,Oe=parseInt((U=(T=this.elStyles)===null||T===void 0?void 0:T[this.axis[r].sizeAttr])!==null&&U!==void 0?U:"0px",10),Ne=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],Ye=r==="y"?this.mouseY-ne:this.mouseX-ne,ft=Ye<0?-1:1,Nt=ft===-1?Ne-Oe:Ne+Oe,St=40,Dt=function(){p.contentWrapperEl&&(ft===-1?Ne>Nt&&(Ne-=St,p.contentWrapperEl[p.axis[r].scrollOffsetAttr]=Ne,H.requestAnimationFrame(Dt)):Ne<Nt&&(Ne+=St,p.contentWrapperEl[p.axis[r].scrollOffsetAttr]=Ne,H.requestAnimationFrame(Dt)))};Dt()}},d.prototype.getContentElement=function(){return this.contentEl},d.prototype.getScrollElement=function(){return this.contentWrapperEl},d.prototype.removeListeners=function(){var o=m7(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),o.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},d.prototype.unMount=function(){this.removeListeners()},d.prototype.isWithinBounds=function(o){return this.mouseX>=o.left&&this.mouseX<=o.left+o.width&&this.mouseY>=o.top&&this.mouseY<=o.top+o.height},d.prototype.findChild=function(o,r){var p=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector;return Array.prototype.filter.call(o.children,function(f){return p.call(f,r)})[0]},d.rtlHelpers=null,d.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},d.getOptions=Zje,d.helpers=Qje,d}();var Bfe=function(d,o){return Bfe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,p){r.__proto__=p}||function(r,p){for(var f in p)Object.prototype.hasOwnProperty.call(p,f)&&(r[f]=p[f])},Bfe(d,o)};function Kje(d,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");Bfe(d,o);function r(){this.constructor=d}d.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}var Hfe=YQ.helpers,Pfe=Hfe.getOptions,cD=Hfe.addClasses,Jje=Hfe.canUseDOM,oAe=function(d){Kje(o,d);function o(){for(var r=[],p=0;p<arguments.length;p++)r[p]=arguments[p];var f=d.apply(this,r)||this;return o.instances.set(r[0],f),f}return o.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(r){r.getAttribute("data-simplebar")!=="init"&&!o.instances.has(r)&&new o(r,Pfe(r.attributes))})},o.removeObserver=function(){var r;(r=o.globalObserver)===null||r===void 0||r.disconnect()},o.prototype.initDOM=function(){var r=this,p,f,M;if(!Array.prototype.filter.call(this.el.children,function(x){return x.classList.contains(r.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),cD(this.wrapperEl,this.classNames.wrapper),cD(this.contentWrapperEl,this.classNames.contentWrapper),cD(this.offsetEl,this.classNames.offset),cD(this.maskEl,this.classNames.mask),cD(this.contentEl,this.classNames.contentEl),cD(this.placeholderEl,this.classNames.placeholder),cD(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),cD(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),(p=this.contentWrapperEl)===null||p===void 0||p.setAttribute("tabindex",this.options.tabIndex.toString()),(f=this.contentWrapperEl)===null||f===void 0||f.setAttribute("role","region"),(M=this.contentWrapperEl)===null||M===void 0||M.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var T=document.createElement("div"),U=document.createElement("div");cD(T,this.classNames.track),cD(U,this.classNames.scrollbar),T.appendChild(U),this.axis.x.track.el=T.cloneNode(!0),cD(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=T.cloneNode(!0),cD(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}YQ.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},o.prototype.unMount=function(){YQ.prototype.unMount.call(this),o.instances.delete(this.el)},o.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(o.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},o.handleMutations=function(r){r.forEach(function(p){p.addedNodes.forEach(function(f){f.nodeType===1&&(f.hasAttribute("data-simplebar")?!o.instances.has(f)&&document.documentElement.contains(f)&&new o(f,Pfe(f.attributes)):f.querySelectorAll("[data-simplebar]").forEach(function(M){M.getAttribute("data-simplebar")!=="init"&&!o.instances.has(M)&&document.documentElement.contains(M)&&new o(M,Pfe(M.attributes))}))}),p.removedNodes.forEach(function(f){var M;f.nodeType===1&&(f.getAttribute("data-simplebar")==="init"?!document.documentElement.contains(f)&&((M=o.instances.get(f))===null||M===void 0||M.unMount()):Array.prototype.forEach.call(f.querySelectorAll('[data-simplebar="init"]'),function(T){var U;!document.documentElement.contains(T)&&((U=o.instances.get(T))===null||U===void 0||U.unMount())}))})})},o.instances=new WeakMap,o}(YQ);Jje&&oAe.initHtmlApi();var $je=Y_(Ffe(),1);var dEn=Y_(cAe(),1);var jfe=Y_(uAe(),1);var hAe=Y_(dAe(),1);var Gfe=function(d){return d.BimplusViewer="bimplusViewer",d.ModelViewerBlack="modelViewerBlack",d.ModelViewer="modelViewer",d.ConnexisViewer="connexisViewer",d.ConnexisViewerBlack="connexisViewerBlack",d}(Gfe||{});var pEn=Math.PI/180,hEn=2*Math.PI;var fEn=new Fo("bimplus-tabs-switcher-config");var mEn=new Fo("bimplus-attachments-config"),XQ=class{constructor(o){this.id=o.id??"",this.fileName=o.fileName??"",this.size=o.size??0}},pAe=class{static{this.attachment=new XQ({})}static create(o){return this.attachment=new XQ(o),this}static setId(o){return this.attachment.id=o,this}static setFileName(o){return this.attachment.fileName=o,this}static setSize(o){return this.attachment.size=o,this}static setFile(o){return this.attachment.file=o,this}static build(){let o=structuredClone(this.attachment);return this.attachment=new XQ({}),o}};var mAe=Y_(fAe());var eGe=()=>({active:"bimplus_Components_Connexis_Active",default:"bimplus_Components_Connexis_Disabled"}),tGe=d=>({id:"commentsd",title:"test",img:d});function nGe(d,o){if(d&1){let r=qs();cn(0,"lib-bimplus-main-menu",22),xi("bimplusMainMenuClicked",function(f){Pi(r);let M=on();return Bi(M.bimplusMainMenuClicked(f))})("bimplusMainMenuOverlayClicked",function(){Pi(r);let f=on();return Bi(f.bimplusMainMenuOverlayClicked())}),mn()}if(d&2){let r=on();Nn("selectedLanguage",r.languageStringsService.currentLanguage)("localizedStrings",r.languageStringsService.currentLanguageStrings)("isTouch",r.isTouch)("showHorizontalMenuIcons",r.isTouch)("appsWithInfo",r.appsWithInfo)("appsOrder",r.appsOrder)("menuItemsOrder",r.menuItemsOrder)}}var bAe=(()=>{class d{constructor(r,p){this.translateService=r,this.languageStringsService=p,this.logoState=Gfe.BimplusViewer,this.isTouch=!1,this.isBimplusMainMenuVisible=!0,this.isNavbarMenuActive=!0,this.selectedZoom="100",this.messages="",this.contextMenuItems=[],this.contextMenuData=[],this.treeData=[],this.treeDataStringified=null,this.treeDataContextMenu=null,this.appsWithInfo=["portalSelectProjectBtn","portalBimUsers","portalBimModels"],this.appsOrder=["portalBimUsers","portalBimModels","portalBimDocuments","portalBimProjectSettings","portalBimProcesses","dividerprojectmanagement","portalBimViewerBtn","portalCloudViewerBtn","portalConnexisBtn","portalBimAutoconverterBtn","dividerapps","portalTeamManagementBtn","portalPropertyManagerBtn"],this.menuItemsOrder=["portalBimUsers","portalBimModels","portalBimDocuments","portalBimProjectSettings","portalBimProcesses"],this.showDialog=!1,this.activeTab=so("object-properties"),this.languageStringsService.currentLanguage$.pipe(fk()).subscribe({next:f=>{this.translateService.use(f),mAe.default.locale(f)}}),this.languageStringsService.currentLanguageStrings$.pipe(fk()).subscribe({next:f=>{this.translateService.setTranslation(this.languageStringsService.currentLanguage,f)}})}log(r,p,f,M){let T=`EVENT : ${r}. `+(f?`INDEX: ${p?.detail?.index} ACTION: ${p?.detail?.action}`:`VALUE: ${p?.detail}`);(M?()=>window.alert(T):()=>console.log(T))()}ngOnInit(){this.initLanguage(),window.BimPlus={bimplusNavbarClicked:r=>{this.log("Navbar clicked",r),r?.detail==="menu"&&(this.isNavbarMenuActive=!this.isNavbarMenuActive)}},this.initMessages(),this.initContextMenu()}bimplusLanguageSelected(r){this.log("bimplusLanguageSelected",{detail:r}),this._switchLanguage(r)}onActiveTab(r){this.log("onActiveTab",{detail:r},!1)}_switchLanguage(r){r&&this.languageStringsService.setCurrentLanguage(r)}bimplusUserMenuClicked(r){this.log("bimplusUserMenuClicked",r,!0)}bimplusTouchModeSelected(r){this.log("bimplusTouchModeSelected",{detail:r}),this.isTouch=r==="touch"}bimplusMainMenuClicked(r){this.log("bimplusUserMenuClicked",{detail:r},!0,!0)}bimplusMainMenuOverlayClicked(){this.log("bimplusMainMenuOverlayClicked",{detail:""},!1,!0)}bimplusStorageInfoClicked(r){this.log("bimplusStorageInfoClicked",{detail:r},!1,!0)}bimplusContactClicked(r){this.log("bimplusContactClicked",{detail:r},!1,!0)}bimplusZoomSelected(r){this.log("bimplusZoomSelected",{detail:r}),this.selectedZoom=r;let p=62.5*(Number(r)/100),f=document.querySelector("html");f&&(f.style.fontSize=p+"%")}bimplusNotifyDeleteMessage(r){let p=JSON.parse(r),f=this.messages&&JSON.parse(this.messages)?.messages?.filter?.(M=>M.id!==p.id);this.messages=f&&JSON.stringify({messages:f})||""}bimplusNotifyDeleteAllMessages(){this.messages=""}bimplusNotifyMessageAction(r){this.log("This is notify message action handler",{detail:r},!1,!0)}selectedNodes(r){this.log("selectedNodes",{detail:JSON.stringify(r)})}initLanguage(){this.languageStringsService.languageFilesUri="/assets/languages",this._switchLanguage("en")}initMessages(){this.messages=JSON.stringify({messages:[{id:"ALFA",type:"info",title:"Import successful",text:"kolizia.ifc has been imported",linkText:"Click here to open the project",link:"#/"},{id:"BETA",type:"info",title:"Clash detection done",text:"Clash detection on the project House1 with preset has been done.",linkText:"Click here to open the project"},{id:"OMEGA",type:"info",title:"Model export finished",text:"",linkText:"Click here to download `00 EMPTY__revision_comparison1.ifc` model."},{id:"OMEGA1",type:"info",title:"Model export finished",text:"Structural model included. Reinforcement of Hospital.ifc has been imported.",linkText:["Click here to download `XXXX` model.","Click here to download `YYYYY` model."],links:["#/1","#/2"]},{id:"TEST3",type:"info",title:"Clash detection done",text:"Clash detection on the project Bridge with preset has been done."},{id:"TEST4",type:"info",title:"Clash detection done",text:"Clash detection on the project Bridge with preset has been done."},{id:"TEST5",type:"info",title:"Clash detection done",text:"Clash detection on the project Bridge with preset has been done."},{id:"TEST6",type:"info",title:"Clash detection done",text:"Clash detection on the project Bridge with preset has been done."}]})}initContextMenu(){this.contextMenuItems=[{id:"openFile",title:"Open file",icon:"./favicon.ico",tooltip:"Open file tooltip",disabled:()=>!0},{id:"separator"},{id:"closeFile",title:"Close file",icon:"./favicon.ico",disabled:()=>!0},{id:"deleteFile",title:"Delete file",icon:"./favicon.ico"},{id:"separator"},{id:"renameFile",title:"Rename file",icon:"./favicon.ico",action:r=>{console.log(r)},tooltip:"Rename file tooltip"},{id:"renameFile",title:"Looooooooooooooooooooooooooooooooooooooooooooooooooooong item name",icon:"./favicon.ico",action:r=>{console.log(r)},tooltip:"Looooooooooooooooooooooooooooooooooooooooooooooooooooong item name"}],this.contextMenuData=[{name:"Folder 5",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-24",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"}]}]}setupTreeData(r){let p=[];switch(r){case"Folders3":p.push({name:"Folders3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07",children:[{name:"Folder 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"Folder 1 - 1 very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong name",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",children:[{name:"File 1 - 1 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-03",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"},{name:"File 1 - 1 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-04",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"},{name:"File 1 - 1 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-05",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"}]},{name:"File 1 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-06",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01"},{name:"File 1 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-07",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01"}]},{name:"Folder 4",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-22",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[]},{name:"Folder 5",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-24",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"},{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-25",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"}]}]});break;case"Folders2":p.push({name:"Folders2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07",children:[{name:"Folder 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"Folder 1 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",children:[{name:"File 1 - 1 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-03",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"},{name:"File 1 - 1 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-04",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"},{name:"File 1 - 1 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-05",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"}]},{name:"Folder 1 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-06",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",children:[]},{name:"Folder 1 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-07",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",children:[]}]},{name:"Folder 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-08",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 2 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-09",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-08"},{name:"Folder 2 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-10",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-08",children:[{name:"File 2 - 2 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-11",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-10"},{name:"File 2 - 2 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-12",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-10"},{name:"File 2 - 2 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-13",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-10"}]},{name:"File 2 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-14",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-08"}]},{name:"Folder 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-15",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 3 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-16",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-15"},{name:"File 3 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-17",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-15"},{name:"Folder 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-18",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-15",children:[{name:"File 3 - 3 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-19",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-18"},{name:"File 3 - 3 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-20",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-18"},{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-21",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-18"}]}]},{name:"Folder 4",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-22",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[]},{name:"Folder 5",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-24",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"}]}]});break;default:p.push({id:"dbc08cd2-9f50-465b-9b54-da29c4988d07",children:[{id:"78b8109a-aac3-4307-8ddb-745a64710d36",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07",name:"General folder",type:"DocumentFolder",number:1,level:1,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"123756a8-c06f-4954-8851-93f95b1629c1",children:[{id:"36a92f23-98e7-42db-b150-b0dae491d355",children:[{id:"2bbfbce5-beb8-49b1-bbef-430b061318c9",structureElementId:"86b65d1e-0490-45f2-abd6-402a176bc219",parent:"36a92f23-98e7-42db-b150-b0dae491d355",name:"Allplan_QTO-QTO-2024-02-16-08-27-15.xlsx",type:"Attachment",number:0,level:3},{id:"9eb72c59-f019-4679-9bf4-07f8055388d4",structureElementId:"cc9c8694-4d70-4066-9475-d4375e67d7a0",parent:"36a92f23-98e7-42db-b150-b0dae491d355",name:"Allplan_QTO-QTO-2024-02-16-08-24-49.xlsx",type:"Attachment",number:0,level:3}],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"ELEMENTS",type:"DocumentFolder",number:1,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"73ad9d94-3ace-4124-b533-b4e2cbe07ab1",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"IFC",type:"DocumentFolder",number:2,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"0378d1be-7b77-4705-a347-adda0ec04674",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"LOG",type:"DocumentFolder",number:3,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"abfd2209-225b-452d-91c9-d33269e47334",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"ISSUES",type:"DocumentFolder",number:4,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"094c8e91-7023-4c1e-8afb-6480d34cd4d1",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"SLIDESHOWS",type:"DocumentFolder",number:5,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"d5d9ea2f-0337-4321-8917-3d485a76247a",children:[],color:4285988983,folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"OTHER MODELS",type:"DocumentFolder",number:6,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}}],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07",name:"MY DOCUMENTS",type:"DocumentFolder",number:2,level:1,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}}],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,parent:"d71d6daf-1114-42c4-84ad-5807837cac7b",name:"Folders1",type:"DocumentFolder",number:0,level:0});break}r==="Folders3"?(this.treeData=p,this.treeDataStringified=null,this.treeDataContextMenu={objectContextMenuitems:[{id:"openFile",title:"Open file",icon:"./favicon.ico",tooltip:"Open file tooltip"},{id:"separator"},{id:"closeFile",title:"Close file",icon:"./favicon.ico",disabled:()=>!0},{id:"deleteFile",title:"Delete file",icon:"./favicon.ico",disabled:()=>!1},{id:"separator"},{id:"renameFile",title:"Rename file",icon:"./favicon.ico",action:f=>{console.log(f)},tooltip:"Rename file tooltip"}],folderContextMenuitems:[{id:"renameFolder",title:"Rename folder",icon:"./favicon.ico",tooltip:"Rename folder tooltip"},{id:"deletFolder",title:"Delete folder",tooltip:"Delete folder tooltip"}]}):(this.treeData=[],this.treeDataStringified=JSON.stringify(p),this.treeDataContextMenu=null)}getNode(){let p=document.querySelector("lib-bimplus-flat-tree")?.get_node?.({id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"},!1);console.log(p)}selectNode(){document.querySelector("lib-bimplus-flat-tree")?.select_node?.("dbc08cd2-9f50-465b-9b54-da29c4988d07-24")}static{this.\u0275fac=function(p){return new(p||d)(vi(ja),vi(yMe))}}static{this.\u0275cmp=ss({type:d,selectors:[["app-root"]],standalone:!0,features:[Ml([]),as],decls:28,vars:33,consts:[[1,"bimplus-components-navbar","visible"],["isNavbarMessageVisible","false","teamInfo","test_team","projectInfo","00 Quickstart project and some very very long text","teamInfoOffset","0.9rem","isDev","true","isStage","true","isNavbarInfoVisible","true",3,"logoState","isNavbarMenuVisible","isNavbarMenuActive","isTouch"],[3,"activeTabChange","activeTab"],[3,"activeTabChange","activeTab","bimplusTabComponentModel"],["showIcons","true","triggerTitle","File context menu",3,"items","data"],[3,"bimplusNotifyMessageAction","bimplusNotifyDeleteMessage","bimplusNotifyDeleteAllMessages","selectedLanguage","localizedStrings","messages"],[3,"bimplusStorageInfoClicked","selectedLanguage","localizedStrings","usedStorage"],[3,"bimplusContactClicked"],[3,"bimplusZoomSelected","selectedZoom"],[3,"bimplusTouchModeSelected","selectedMode","selectedLanguage","localizedStrings"],[3,"bimplusLanguageSelected","selectedLanguage"],["userName","Test User","userPhotoUrl","https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMS36RRWYaTysG471mlormL1bYN3-QIabbo30rDitKRoaDs3EA&s","buttonTitle","testuser@allplan.com","allowRcaItem","true",3,"bimplusLanguageSelected","bimplusUserMenuClicked","selectedLanguage","localizedStrings","isTouch"],["projectName","00 Quickstart project and some very very long text","projectImageUrl","https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMS36RRWYaTysG471mlormL1bYN3-QIabbo30rDitKRoaDs3EA&s","isDev","true","isStage","true","teammembersSubscribed","true","propertymanagerSubscribed","true","projectActiveItem","projectlist","menuActiveItem","projectmembers",3,"selectedLanguage","localizedStrings","isTouch","showHorizontalMenuIcons","appsWithInfo","appsOrder","menuItemsOrder"],[1,"floating-panels-wrapper"],[3,"selectedLanguage","localizedStrings","noModelsMessage"],[1,"tree-data","tree-data-1",3,"click","keypress"],[1,"tree-data","tree-data-2",3,"click","keypress"],[1,"tree-data","tree-data-3",3,"click","keypress"],[1,"tree-data","tree-data-3","get-node",3,"click","keypress"],[1,"tree-data","tree-data-3","select-node",3,"click","keypress"],[1,"tree"],["enableSelect","true","enableParentHighlighting","true","multiSelect","true","oneLevelMultiSelect","false","showFoldersIcons","true","showObjectsIcons","true","enableDragAndDrop","true","treeTitle","FLAT TREE","paddingIndent","2.8rem",1,"flat-tree",3,"selectedNodes","treeData","treeDataStringified","contextMenus"],["projectName","00 Quickstart project and some very very long text","projectImageUrl","https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMS36RRWYaTysG471mlormL1bYN3-QIabbo30rDitKRoaDs3EA&s","isDev","true","isStage","true","teammembersSubscribed","true","propertymanagerSubscribed","true","projectActiveItem","projectlist","menuActiveItem","projectmembers",3,"bimplusMainMenuClicked","bimplusMainMenuOverlayClicked","selectedLanguage","localizedStrings","isTouch","showHorizontalMenuIcons","appsWithInfo","appsOrder","menuItemsOrder"]],template:function(p,f){p&1&&(cn(0,"div",0)(1,"lib-bimplus-navbar",1)(2,"lib-bimplus-tabs-switcher",2),Zw("activeTabChange",function(T){return sA(f.activeTab,T)||(f.activeTab=T),T}),cn(3,"lib-bimplus-tab",3),xi("activeTabChange",function(T){return f.activeTab.set(T)}),mn()(),Zr(4,"lib-bimplus-context-menu",4),cn(5,"lib-bimplus-notify",5),xi("bimplusNotifyMessageAction",function(T){return f.bimplusNotifyMessageAction(T)})("bimplusNotifyDeleteMessage",function(T){return f.bimplusNotifyDeleteMessage(T)})("bimplusNotifyDeleteAllMessages",function(){return f.bimplusNotifyDeleteAllMessages()}),mn(),cn(6,"lib-bimplus-storage-info",6),xi("bimplusStorageInfoClicked",function(T){return f.bimplusStorageInfoClicked(T)}),mn(),cn(7,"lib-bimplus-contact",7),xi("bimplusContactClicked",function(T){return f.bimplusContactClicked(T)}),mn(),cn(8,"lib-bimplus-zoom",8),xi("bimplusZoomSelected",function(T){return f.bimplusZoomSelected(T)}),mn(),cn(9,"lib-bimplus-touch-menu",9),xi("bimplusTouchModeSelected",function(T){return f.bimplusTouchModeSelected(T)}),mn(),cn(10,"lib-bimplus-language-menu",10),xi("bimplusLanguageSelected",function(T){return f.bimplusLanguageSelected(T)}),mn(),cn(11,"lib-bimplus-user-menu",11),xi("bimplusLanguageSelected",function(T){return f.bimplusLanguageSelected(T)})("bimplusUserMenuClicked",function(T){return f.bimplusUserMenuClicked(T)}),mn()()(),gr(12,nGe,1,7,"lib-bimplus-main-menu",12),cn(13,"div",13),Zr(14,"lib-bimplus-floating-bar-project-navigator",14),mn(),cn(15,"div",15),xi("click",function(){return f.setupTreeData("Folders1")})("keypress",function(){return f.setupTreeData("Folders1")}),Wr(16,"Folders1"),mn(),cn(17,"div",16),xi("click",function(){return f.setupTreeData("Folders2")})("keypress",function(){return f.setupTreeData("Folders2")}),Wr(18,"Folders2"),mn(),cn(19,"div",17),xi("click",function(){return f.setupTreeData("Folders3")})("keypress",function(){return f.setupTreeData("Folders3")}),Wr(20,"Folders3"),mn(),cn(21,"div",18),xi("click",function(){return f.getNode()})("keypress",function(){return f.getNode()}),Wr(22,"get_node (from Folders3)"),mn(),cn(23,"div",19),xi("click",function(){return f.selectNode()})("keypress",function(){return f.selectNode()}),Wr(24,"select_node (from Folders3)"),mn(),cn(25,"div",20)(26,"lib-bimplus-scrollable-container")(27,"lib-bimplus-flat-tree",21),xi("selectedNodes",function(T){return f.selectedNodes(T)}),mn()()()),p&2&&(Zt(),Nn("logoState",f.logoState)("isNavbarMenuVisible",f.isBimplusMainMenuVisible)("isNavbarMenuActive",f.isNavbarMenuActive)("isTouch",f.isTouch),Zt(),Qw("activeTab",f.activeTab),Zt(),Nn("activeTab",f.activeTab())("bimplusTabComponentModel",Kf(31,tGe,XH(30,eGe))),Zt(),Nn("items",f.contextMenuItems)("data",f.contextMenuData),Zt(),Nn("selectedLanguage",f.languageStringsService.currentLanguage)("localizedStrings",f.languageStringsService.currentLanguageStrings)("messages",f.messages),Zt(),Nn("selectedLanguage",f.languageStringsService.currentLanguage)("localizedStrings",f.languageStringsService.currentLanguageStrings)("usedStorage",90),Zt(2),Nn("selectedZoom",f.selectedZoom),Zt(),Nn("selectedMode",f.isTouch?"touch":"desktop")("selectedLanguage",f.languageStringsService.currentLanguage)("localizedStrings",f.languageStringsService.currentLanguageStrings),Zt(),Nn("selectedLanguage",f.languageStringsService.currentLanguage),Zt(),Nn("selectedLanguage",f.languageStringsService.currentLanguage)("localizedStrings",f.languageStringsService.currentLanguageStrings)("isTouch",f.isTouch),Zt(),fs(f.isNavbarMenuActive?12:-1),Zt(2),Nn("selectedLanguage",f.languageStringsService.currentLanguage)("localizedStrings",f.languageStringsService.currentLanguageStrings)("noModelsMessage","_Loading project details"),Zt(13),Nn("treeData",f.treeData)("treeDataStringified",f.treeDataStringified)("contextMenus",f.treeDataContextMenu))},dependencies:[QJ,KJ,JJ,e$,t$,i$,a$,l$,c$,kC,VR,hte,l4,o$,qo,pte],styles:[`*,html{font-size:100%;margin:0;padding:0}html{font-size:62.5%}body{background-color:gray}.hidden{display:none}bimplus-main-menu{height:50vh}lib-bimplus-floating-bar-project-navigator{position:absolute}.floating-panels-wrapper{position:relative}.tree-data{background-color:#fff;font-size:1.5rem;width:fit-content;padding:.5rem;border-style:solid;border-width:.2rem;border-radius:.5rem;margin:.5rem;cursor:pointer}.tree{width:20%;height:250px}
12855
12855
  `],encapsulation:2})}}return d})();var iGe=d=>new E$(d,"./assets/languages/strings_",".json"),Yfe=class{handle(o){return console.warn("Missing translation string "+o.key),o.key}};c5(void 0,null,function*(){let d=yield e3e({providers:[Vge(),o1e(Ko.forRoot({missingTranslationHandler:{provide:FB,useClass:Yfe},isolate:!0,defaultLanguage:"en",loader:{provide:BR,useFactory:iGe,deps:[Aue]}}))]}),o=uh(uye,{injector:d.injector});customElements.define("bimplus-connection-designer",o);let r=uh(cye,{injector:d.injector});customElements.define("bimplus-connection-designer-result",r);let p=uh(QJ,{injector:d.injector});customElements.define("bimplus-contact",p);let f=uh(hye,{injector:d.injector});customElements.define("bimplus-floating-bar-hide-objects",f);let M=uh(fye,{injector:d.injector});customElements.define("bimplus-floating-bar-isolation-objects",M);let T=uh(KJ,{injector:d.injector});customElements.define("bimplus-floating-bar-project-navigator",T);let U=uh(JJ,{injector:d.injector});customElements.define("bimplus-language-menu",U);let x=uh(e$,{injector:d.injector});customElements.define("bimplus-main-menu",x);let H=uh(t$,{injector:d.injector});customElements.define("bimplus-navbar",H);let J=uh(i$,{injector:d.injector});customElements.define("bimplus-notify",J);let ne=uh($J,{injector:d.injector});customElements.define("bimplus-project-menu",ne);let Oe=uh(wye,{injector:d.injector});customElements.define("bimplus-sidenav",Oe);let Ne=uh(sk,{injector:d.injector});customElements.define("bimplus-sidenav-drawer-content",Ne);let Ye=uh(a$,{injector:d.injector});customElements.define("bimplus-storage-info",Ye);let ft=uh(Tye,{injector:d.injector});customElements.define("bimplus-tool-hub",ft),ft.prototype.toggleSubItemsView=function(oa){return this.ngElementStrategy.componentRef.instance.toggleSubItemsView(oa)};let Nt=uh(o$,{injector:d.injector});customElements.define("bimplus-touch-menu",Nt);let St=uh(l$,{injector:d.injector});customElements.define("bimplus-user-menu",St);let Dt=uh(c$,{injector:d.injector});customElements.define("bimplus-zoom",Dt);let Zn=uh(vMe,{injector:d.injector});customElements.define("bimplus-object-navigator",Zn);let kn=uh(kC,{injector:d.injector});customElements.define("bimplus-flat-tree",kn);let gi=uh(VR,{injector:d.injector});customElements.define("bimplus-context-menu",gi);let tn=uh(GJ,{injector:d.injector});customElements.define("loading-spinner",tn);let ki=uh(gMe,{injector:d.injector});customElements.define("bimplus-tooltip-message-element",ki);let Ii=uh(l4,{injector:d.injector});customElements.define("bimplus-scrollable-container-element",Ii);let zi=uh(bAe,{injector:d.injector});customElements.define("bimplus-app-wrapper-internal-element",zi);let jr=uh(wMe,{injector:d.injector});customElements.define("bimplus-overlay-dialog-warning",jr);let Cr=uh(AMe,{injector:d.injector});customElements.define("resizable-panel",Cr);let Ir=uh(OMe,{injector:d.injector});customElements.define("object-properties-header",Ir);let Xi=uh(_we,{injector:d.injector});customElements.define("object-properties",Xi);let Tr=uh(Swe,{injector:d.injector});customElements.define("lib-bimplus-overlay-dialog-error",Tr);let ur=uh(hte,{injector:d.injector});customElements.define("bimplus-tabs-switcher",ur);let Ji=uh(Fwe,{injector:d.injector});customElements.define("bimplus-object-comments-list",Ji);let Os=uh(bte,{injector:d.injector});customElements.define("bimplus-textarea",Os);let Ur=uh(mte,{injector:d.injector});customElements.define("bimplus-overlay-dialog-delete",Ur);let Jr=uh(vte,{injector:d.injector});customElements.define("bimplus-comment",Jr);let Bs=uh(C$,{injector:d.injector});customElements.define("bimplus-link-tooltip-message",Bs);let Zs=uh(qwe,{injector:d.injector});customElements.define("bimplus-status-bar",Zs)});export{Yfe as BimplusMissingTranslationHandler};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimplus-webcomponents",
3
- "version": "0.0.161",
3
+ "version": "0.0.162",
4
4
  "license": "MIT",
5
5
  "author": "",
6
6
  "description": "bim+ webcomponents library",